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

+(*)Pseudo-salt tracer flux fix with KPP #628

Merged
merged 3 commits into from
May 30, 2024

Conversation

Hallberg-NOAA
Copy link
Member

This series of two pull requests replicates the calculation of the surface salt flux used with KPP inside of the pseudo-salt column physics code, correcting a mismatch in the dimensional rescaling between salinities and the pseudo-salt tracer. Having eliminated the only instance where fluxes%KPP_salt_flux was being used, this element was removed from the forcing type, and 5 allocatable elements of diabatic_CS were replaced with simple arrays in the 3 routines where they are used. This change could reduce the high-water memory footprint of the model when KPP is in use, and it simplifies inter-module dependencies. This pull request partially addresses the issue noted at github.com/mom-ocean/issues/1226. All answers are bitwise identical when no dimensional rescaling is being used, but they will change (and be corrected) when salinity is being rescaled. There is also the elimination of an element in a transparent type.

The commits in this PR include:

  • 0f37773e9 +Eliminate fluxes%KPP_salt_flux
  • 9b305c255 (*)Correct rescaling of KPP pseudo-salt flux

  Calculate the rescaled pseudo-salt flux when KPP is in use inside of
pseudo_salt_tracer_column_physics(), rather than using fluxes%KPP_salt_flux.
This commit also corrects for the fact that salinity and pseudo-salt have
scaling that differs by a factor of US%S_to_ppt, which was not previously being
taken into account.  All answers are bitwise identical when no dimensional
rescaling is being used, but they will change (and be corrected) when salinity
is being rescaled.
  Eliminated the KPP_salt_flux element of the forcing type, which is no longer
being used after the revisions to pseudo_salt_tracer_column_physics.  Also moved
5 allocatable arrays (KPP_NLTheat, KPP_NLTscalar, KPP_buoy_flux, KPP_temp_flux
and KPP_salt_flux) out of diabatic_CS, replacing them with ordinary arrays in
diabatic_ALE(), diabatic_ALE_legacy() and layered_diabatic().  This change could
reduce the high-water memory footprint of the model when KPP is in use.  All
answers are bitwise identical, but one element of a publicly visible type has
been eliminated.
@Hallberg-NOAA Hallberg-NOAA added bug Something isn't working refactor Code cleanup with no changes in functionality or results labels May 11, 2024
@marshallward
Copy link
Member

@marshallward marshallward merged commit 506d186 into NOAA-GFDL:dev/gfdl May 30, 2024
10 checks passed
@Hallberg-NOAA Hallberg-NOAA deleted the pseudo_salt_fix branch June 5, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working refactor Code cleanup with no changes in functionality or results
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants