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

Allow passing salt flux restoring/correction to generic tracers #389

Open
dougiesquire opened this issue Jul 25, 2024 · 0 comments · May be fixed by #390
Open

Allow passing salt flux restoring/correction to generic tracers #389

dougiesquire opened this issue Jul 25, 2024 · 0 comments · May be fixed by #390

Comments

@dougiesquire
Copy link
Collaborator

dougiesquire commented Jul 25, 2024

We've recently suggested changes to NOAA-GFDL/ocean_BGC generic_tracers to provide a way to pass the salt restoring/correction applied by the ocean model to generic tracers. Those proposed changes add a new subroutine generic_tracer::generic_tracer_update_from_coupler that receives the salt flux and passes it on the generic tracer's update_from_coupler routine if it is needed. Currently this feature is only utilised by the WOMBAT generic tracers.

To use this feature requires corresponding changes to the calling ocean model. Below is a summary of how the relevant MOM5 code is implemented currently, and proposed changes (bold text indicates new routines).

Currently:

  • generic_tracer::generic_tracer_coupler_get is called via ocean_generic_mod::ocean_generic_sbc <- ocean_tpm_mod::ocean_tpm_sbc <- ocean_sbc_mod::get_ocean_sbc <- ocean_model_mod::update_ocean_model
  • generic_tracer::generic_tracer_coupler_get calls
    • g_tracer_utils::g_tracer_coupler_get to update the tracer boundary values for each prognostic tracer
    • the generic tracer's update_from_coupler routine

Proposed changes

  • Replace the call to generic_tracer::generic_tracer_coupler_get with a call to a new generic_tracer::generic_tracer_coupler_accumulate. NOAA-GFDL/ocean_BGC generic_tracers already includes this routine. In MOM5, this routine will simply call g_tracer_utils::g_tracer_coupler_get to update the tracer boundary values for each prognostic tracer.
  • Add a new generic_tracer::generic_tracer_update_from_coupler routine that receives the salt restoring/correction flux array and passes it on the generic tracer's update_from_coupler routine if it is needed. This is the same as the suggested changes described above.
  • Call the new generic_tracer::generic_tracer_update_from_coupler via ocean_generic_mod::ocean_generic_sbc_adjust <- ocean_tpm_mod::ocean_tpm_sbc_adjust <- ocean_sbc_mod::flux_adjust <- ocean_model_mod::update_ocean_model, passing the applied salt flux restoring/correction array.

I'll follow up with a PR demonstrating the proposed changes.

Import notes:

  • The proposed changes should not change the current behaviour of MOM5 if the generic_tracer code in the local ocean_shared directory is used.
  • If an external generic_tracer codebase is used (e.g. NOAA-GFDL/ocean_BGC), that codebase will need to include the new generic_tracer::generic_tracer_update_from_coupler routine.
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 a pull request may close this issue.

1 participant