Skip to content

Fix how fluxes sent to MARBL are treated when DT_THERMO is bigger than coupling interval#419

Merged
mnlevy1981 merged 3 commits into
NCAR:dev/ncarfrom
mnlevy1981:MARBL_forcing_accum
Apr 16, 2026
Merged

Fix how fluxes sent to MARBL are treated when DT_THERMO is bigger than coupling interval#419
mnlevy1981 merged 3 commits into
NCAR:dev/ncarfrom
mnlevy1981:MARBL_forcing_accum

Conversation

@mnlevy1981
Copy link
Copy Markdown
Collaborator

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, and seaice_bc_flux to forcing_type -- these fields are used to compute dust_flux and iron_flux, and they need to be in the forcing_type to compute the diagnostics correctly (I couldn't figure out how to make the post_data() calls work with the large DT_THERMO).

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.
@mnlevy1981
Copy link
Copy Markdown
Collaborator Author

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 aux_mom_MARBL that runs with DT_THERMO=7200 and that should change answers between dev/ncar and this branch.

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)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mike is investigating if this call can be removed. It was introduced when MARBL was brought in.

Copy link
Copy Markdown
Collaborator

@klindsay28 klindsay28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@mnlevy1981
Copy link
Copy Markdown
Collaborator Author

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 have verified that this call is unnecessary, and I removed it in da74cad (the tests in the aux_mom_MARBL testlist show no changes in baseline comparisons when I remove the call). I'm happy with the results of the test suite, though I found an issue in what is being compared (ESCOMP/MOM_interface#323). This PR is ready for final review / being merged

@mnlevy1981 mnlevy1981 merged commit 780454e into NCAR:dev/ncar Apr 16, 2026
52 checks passed
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

Successfully merging this pull request may close these issues.

3 participants