NOAA-GFDL / ocean_BGC

4 stars 27 forks source link

How to account for surface salt restoring fluxes? #32

Open dougiesquire opened 3 months ago

dougiesquire commented 3 months ago

Hi. We've recently ported our ocean BGC model WOMBAT (Whole Ocean Model or Biogeochemistry And Tropic dynamics) to the generic_tracers framework so that we can use it with both MOM5 and MOM6.

That model includes virtual flux adjustments to a few tracers when surface salt restoring is applied via a salt flux in the ocean model. Basically I need to adjust the stf array for a few tracers according to:

stf = stf + salt_restore * tracer_global / salt_global

where salt_restore is the restoring salt flux applied by the ocean model, and tracer_global and salt_global are constant parameters.

Obviously I need to modify/extend the generic_tracers API to allow passing the restoring salt flux from the ocean model, but there's no clear clean way to do this. For example, on face value it looks as though the virtual flux adjustments could be done in a generic_WOMBAT_update_from_coupler routine inside generic_tracer_coupler_get, but:

I'm a little surprised I'm the first to want to do this. Are COBALT, BLING etc never run with ocean salt restoring? Does anyone out there have suggestions for where/how the virtual flux adjustments could be included?

dougiesquire commented 2 months ago

I've a solution for this to allow the virtual flux correction to be optionally done in the generic_?_update_from_coupler routine for each generic tracer. I'll open a PR with the changes. It would be great to have them included in this repo if possible.

This did require adding a generic_tracer_update_from_coupler routine to generic_tracer.F90 to be called from the ocean model. To use the changes requires corresponding changes to the ocean model to call this routine (passing the salt flux) at the appropriate point. I'll link the changes needed to MOM5 and MOM6 in the PR.