Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mnlevy1981 opened this issue Sep 22, 2022 · 5 comments
Open

Comments

@mnlevy1981
Copy link
Owner

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:

  • Currently, initialize_MARBL_tracers() calls tracer_Z_init()
  • T and S are initialized from src/initialization/MOM_state_initialization.F90:MOM_temp_salt_initialize_from_Z() with a call to horiz_interp_and_extrap_tracer() (note that there are several parameters used configure the interpolation)
@mnlevy1981
Copy link
Owner Author

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 mnlevy1981 changed the title add_MARBL (init): horizontally interpolate initial conditions add_MARBL (init): generalize grid for input files (ICs and forcing) Feb 22, 2023
@mnlevy1981
Copy link
Owner Author

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

@mnlevy1981
Copy link
Owner Author

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
Copy link
Owner Author

@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
Copy link
Owner Author

Three commits have made progress towards this:

  • f3f75e6 sets the default initial condition file for MARBL tracers to one using the WOA horizontal grid
  • a2d5500 gets NDEP from the NUOPC cap, and 78d6f44 does the same in the solo_driver cap

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)

mnlevy1981 pushed a commit that referenced this issue Aug 10, 2023
Subroutine adjustEtaToFitBathymetry had a hard-wired parameter
(hTolerance = 0.1) controlling the tolerance when adjusting the
thickness to fit the bathymetry. This patch adds an user-controlled
parameter (THICKNESS_TOLERANCE), which replaces hTolerance.
THICKNESS_TOLERANCE is only activated when ADJUST_THICKNESS=True.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant