mnlevy1981 / MOM6

Modular Ocean Model
Other
2 stars 0 forks source link

(add_MARBL): list of questions to ask experts #27

Closed mnlevy1981 closed 3 years ago

mnlevy1981 commented 4 years ago

Will try to set up a call with Andrew, Gustavo, and / or Keith in near future; this issue is just a place for me to enumerate all the questions I have:

  1. call to marbl_instances%surface_flux_compute()

    1. looks like it belongs in column_physics() and not surface_state()?
    2. How do I read a forcing file?
    3. What do I do with the flux after it is computed?
  2. Initialization: I want to generate marbl_in via python scripts, and have MOM read it in (POP uses open and read on master task, and broadcasts line by line)

    • Same question re: diag_table (want python to generate MARBL contribution to diags)
  3. FMS issue? I want to call post_data column by column for a 3D field (compute (i0, j0, :), then compute (i1, j1, :), etc)

  4. Saved state will need to go into restart files; how?

mnlevy1981 commented 4 years ago

Not just struggling with forcing fields from files (see #15), also need to find examples of data that should be coming in through coupler. For surface_flux_compute() so far I have

if (CS%u10_sqr_ind > 0) marbl_instances%surface_flux_forcings(CS%u10_sqr_ind)%field_0d(1) = 2.5e5 ! pop gets from coupler
if (CS%sss_ind > 0) marbl_instances%surface_flux_forcings(CS%sss_ind)%field_0d(1) = tv%S(i,j,1)
if (CS%sst_ind > 0) marbl_instances%surface_flux_forcings(CS%sst_ind)%field_0d(1) = tv%T(i,j,1)
if (CS%ifrac_ind > 0) marbl_instances%surface_flux_forcings(CS%ifrac_ind)%field_0d(1) = 0 ! pop gets from coupler
if (CS%dust_dep_ind > 0) marbl_instances%surface_flux_forcings(CS%dust_dep_ind)%field_0d(1) = 0 ! pop gets from coupler
if (CS%fe_dep_ind > 0) marbl_instances%surface_flux_forcings(CS%fe_dep_ind)%field_0d(1) = 0 ! pop gets from coupler (but can read from file)
if (CS%nox_flux_ind > 0) marbl_instances%surface_flux_forcings(CS%nox_flux_ind)%field_0d(1) = 0 ! pop gets from file
if (CS%nhy_flux_ind > 0) marbl_instances%surface_flux_forcings(CS%nhy_flux_ind)%field_0d(1) = 0 ! pop gets from file
if (CS%atmpress_ind > 0) marbl_instances%surface_flux_forcings(CS%atmpress_ind)%field_0d(1) = 1 ! pop gets from coupler (but can read from file)
if (CS%xco2_ind > 0) marbl_instances%surface_flux_forcings(CS%xco2_ind)%field_0d(1) = 284.7 ! pop gets from coupler
if (CS%xco2_alt_ind > 0) marbl_instances%surface_flux_forcings(CS%xco2_alt_ind)%field_0d(1) = 284.7 ! pop gets from coupler

So I need to find where in memory MOM has

I looked in the CFC tracer module as well as https://github.com/NOAA-GFDL/ocean_BGC

For Keith -- how was POP's ndep input file generated? (in mean time, map gx1v7 file to tx0.66v1)

mnlevy1981 commented 4 years ago

src/core/MOM_forcing_type.F90 contains the forcing datatype, which is passed to column_physics() [variable name is fluxes]; p_surf or p_surf_full might be what we want for atmpress, need to figure out R L2 T-2 unit. No luck with other fields

mnlevy1981 commented 4 years ago

Latest update for forcings:

!        These fields are getting the correct data
if (CS%sss_ind > 0) marbl_instances%surface_flux_forcings(CS%sss_ind)%field_0d(1) = tv%S(i,j,1)
if (CS%sst_ind > 0) marbl_instances%surface_flux_forcings(CS%sst_ind)%field_0d(1) = tv%T(i,j,1)
if (CS%ifrac_ind > 0) marbl_instances%surface_flux_forcings(CS%ifrac_ind)%field_0d(1) = fluxes%area_berg(i,j)
! Is there a better way to convert?
!    * Does MOM6 already have a conversion factor saved somewhere?
!    * Should I save (1.0/101325.0) as a parameter in this module? (Or somewhere else?)
if (CS%atmpress_ind > 0) marbl_instances%surface_flux_forcings(CS%atmpress_ind)%field_0d(1) = fluxes%p_surf(i,j) / 101325.0 ! Pa -> atm

!        These fields are receiving physically-reasonable values
if (CS%u10_sqr_ind > 0) marbl_instances%surface_flux_forcings(CS%u10_sqr_ind)%field_0d(1) = 2.5e5 ! pop gets from coupler
if (CS%dust_dep_ind > 0) marbl_instances%surface_flux_forcings(CS%dust_dep_ind)%field_0d(1) = 0 ! pop gets from coupler
if (CS%fe_dep_ind > 0) marbl_instances%surface_flux_forcings(CS%fe_dep_ind)%field_0d(1) = 0 ! pop gets from coupler (but can read from file)
if (CS%nox_flux_ind > 0) marbl_instances%surface_flux_forcings(CS%nox_flux_ind)%field_0d(1) = 0 ! pop gets from file
if (CS%nhy_flux_ind > 0) marbl_instances%surface_flux_forcings(CS%nhy_flux_ind)%field_0d(1) = 0 ! pop gets from file
if (CS%xco2_ind > 0) marbl_instances%surface_flux_forcings(CS%xco2_ind)%field_0d(1) = 284.7 ! pop gets from coupler
if (CS%xco2_alt_ind > 0) marbl_instances%surface_flux_forcings(CS%xco2_alt_ind)%field_0d(1) = 284.7 ! pop gets from coupler

Note that fluxes%area_berg seems to be 0 everywhere, so maybe that's NOT the right value for ice fraction (tested in both C and G compsets)

mnlevy1981 commented 3 years ago

Closing this; discussions with others have addressed most of the concerns and I'll open fresh issue tickets for any lingering problems.