Fix how fluxes sent to MARBL are treated when DT_THERMO is bigger than coupling interval#419
Conversation
When DT_THERMO is larger than the coupling interval, MOM6 stores a weighted average of fluxes used by the thermodynamics over the multiple intervals. Several forcings used for MARBL were not included in this process. Also, dust_flux and iron_flux are computed from five constituent classes (atmospheric fine / coarse dust, sea ice dust, atmospheric black carbon, and sea ice black carbon); these five fields were not being accumulated correctly in cases where DT_THERMO is larger than the coupling interval. This commit contains a first attempt at fixing that -- moving the enable_averages() call into convert_driver_fields_to_forcings() and only calling it / post_data() when flux_used = true. These diagnostics are still wrong in this commit, though.
Added five new fields to forcing_type so they can be added to history files from forcing_diagnostics() with the rest of the flux fields. This fixes the issue where these fields were not being accumulated correctly when DT_THERMO was greater than the coupling interval.
|
I'll take this out of draft mode once I run the CESM test suite. My expectation is that existing tests will be bit-for-bit, but I'd also like to add a test to |
| OS%restore_salinity, OS%restore_temp) | ||
|
|
||
| ! enable_averages() is necessary to post forcing fields to diagnostics | ||
| call enable_averages(dt_coupling, OS%Time + Ocean_coupling_time_step, OS%diag) |
There was a problem hiding this comment.
Mike is investigating if this call can be removed. It was introduced when MARBL was brought in.
klindsay28
left a comment
There was a problem hiding this comment.
Looks good to me, once the necessity of the enable_averages call in subroutine update_ocean_model of mom_ocean_model_nuopc.F90 is determined.
I had added enable_averages() when I put some post_data() calls in a routine called from convert_IOB_to_fluxes(), but I moved those calls to forcing_diagnostics() so we are back to not calling post_data() from this part of the code.
I have verified that this call is unnecessary, and I removed it in da74cad (the tests in the |
When I added MARBL forcings to the MOM6
forcing_type, I did not realize there were functions in place to account for accumulating forcings correctly when the thermodynamic time step is larger than the coupling interval. This PR fixes that oversight.Note that I also needed to add
atm_fine_dust_flux,atm_coarse_dust_flux,atm_bc_flux,seaice_dust_flux, andseaice_bc_fluxtoforcing_type-- these fields are used to computedust_fluxandiron_flux, and they need to be in theforcing_typeto compute the diagnostics correctly (I couldn't figure out how to make thepost_data()calls work with the largeDT_THERMO).