mnlevy1981 / MOM6

Modular Ocean Model
Other
2 stars 0 forks source link

add_MARBL (init): generalize grid for input files (ICs and forcing) #69

Open mnlevy1981 opened 2 years ago

mnlevy1981 commented 2 years ago

Right now, we require the MARBL tracer initial conditions to come from a netCDF file where the grid matches the MOM6 grid but it should be possible to have MOM interpolate if the grids don't match. This would be useful for running single-column MOM with MARBL enabled.

Details:

mnlevy1981 commented 1 year ago

Following conversation with @klindsay28, it would be ideal to have all inputs to MOM that MARBL needs on a standard (1 degree by 1 degree?) grid, and then we can let MOM6 interpolate everything. This will require a thorough accounting of all the forcing files we provide to make sure they are being read in with the proper subroutines / interpolation options; it might also require a change to the workflow used to generate the iron sediment / vent flux files.

Additionally, we should ensure that the initial conditions are consistent in terms of POP's autotroph_zero_consistency_enforce() function (for a given autotroph, if any of Chl, C, P, Fe, or Si are zero then they are all 0, as is CaCO3)

mnlevy1981 commented 1 year ago

(renamed to better encompass additional thoughts from my previous comment)

mnlevy1981 commented 1 year ago

Notes from more conversation (with @klindsay28 and @ashao):

  1. We are currently initializing tracers with tracer_Z_init, but should using MOM_initialize_tracer_from_Z() instead. This function will handle horizontal interpolation for us.
  2. Iron sediment fluxes are currently read in using MOM_read_data(); we should run it by @matt-long, but if it makes sense to provide these fluxes on a standard grid instead of the model grid they should be read in via horiz_interp_and_extrap_tracer() (which is what MOM_initialize_tracer_from_Z() does under the covers).
  3. Nitrogen deposition and river fluxes both rely on the same steps: first, init_external_field() saves the file / variable access information. Second, time_interp_external() reads the field.

    • River fluxes must be provided on the model grid, to ensure the mapping is consistent with how the coupler maps other riverine inputs.
    • Ndep can be interpolated, and we don't need to change the functions we are using: time_interp_external() takes an optional horiz_interp_type argument. We should be able to use build_horiz_interp_weights() to construct horz_interp.
mnlevy1981 commented 1 year ago

@billsacks pointed out in the CSEG meeting today that it might be possible to provide river fluxes a 1 degree grid and use the CDEPS version of shr_stream to read it in; if that approach allows us to specify a mapping file then we won't need to do the mapping offline every time a new grid is introduced, because we can just point CDEPS to the file the mediator is already using for the non-BGC river fluxes.

I don't know if that would be a good approach, or if it would cause problems with turning MARBL on in MOM6 outside of CESM (e.g. the solo_driver/ cap for modeling a single column).

mnlevy1981 commented 1 year ago

Three commits have made progress towards this:

3d8e164 then does some cleanup, removing NDEP_SCALE_FACTOR and cleaning up how we apply unit conversion.

Outstanding tasks (perhaps for a new issue after we update dev/ncar):

  1. Update iron fluxes (sediment and vent); currently still on the MOM grid
  2. Update how river fluxes are handled; these are also on the MOM grid, though some might come through the coupler eventually?

Also, reading back through this issue I realized I didn't address

Additionally, we should ensure that the initial conditions are consistent in terms of POP's autotroph_zero_consistency_enforce() function (for a given autotroph, if any of Chl, C, P, Fe, or Si are zero then they are all 0, as is CaCO3)