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

updating ML_diffusivity to latest dev/gfdl #1

Merged
merged 18 commits into from
Jul 29, 2024
Merged

Conversation

aakashsane
Copy link
Owner

No description provided.

c2xu and others added 18 commits July 24, 2024 14:51
The module MOM_harmonic_analysis computes the constant coefficients
of sine/cosine functions for the SSH and barotropic velocity fields
of each tidal constituent.
Performance optimization for subroutine HA_solver.
  Optionally corrected a bug (essentially a sign error) in the selection of
where MASS_WEIGHT_IN_PRESSURE_GRADIENT is applied in non-Boussinesq test cases.
The (incorrect) non-Boussinesq version of the test for where interfaces are
outside of the range of hydrostatic consistency due to interactions with
bathymetry was converted from the (correct) Boussinesq version without properly
taking into account that pressure increases downward while height increases
upward.  This bug is repeated 12 times in 6 different specific volume integral
routines, including in the analytical specific volume integrals with 4 equations
of state.

  To accommodate these corrections as well as a future expansion of the
mass weighting to apply near the surface under ice-shelves or icebergs, the
previous optional logical argument (useMassWghtInterp) was replaced with a new
optional integer argument (MassWghtInterp) that can be used to encode
information about where this weighting is applied as well as whether to fix this
bug.

  This combination of settings (MASS_WEIGHT_IN_PRESSURE_GRADIENT = True and
non-Boussinesq) does not seem to be widely used yet (it is not used in the GFDL
regression suite), so rather than preserving the old (incorrect) solutions by
default, this bug is corrected by default.  However, the previous answers can be
recovered by setting the new runtime parameter MASS_WEIGHT_IN_PGF_NONBOUS_BUG to
true.  This parameter that is only used (and logged) for non-Boussinesq cases
with MASS_WEIGHT_IN_PRESSURE_GRADIENT set to true.  It is intended that this new
runtime bug-fix parameter will be obsoleted with an aggressive schedule if it
is not needed to recreate any production runs.

  In addition, there are two new diagnostics, MassWt_u and MassWt_v, that show
the fractional (0 to 1) effects of the mass weighting in the pressure gradient
forces at the velocity points, along with the new diagnostic subroutines
diagnose_mass_weight_Z and diagnose_mass_weight_p that calculate these
diagnostics by layer in code that replicates the 13 copies for various
equations of state and vertical structures within layers.

  By default, this commit does change answers in non-Boussinesq cases that use
MASS_WEIGHT_IN_PRESSURE_GRADIENT = True, and there is a new runtime parameter
in such cases.  There are also two new diagnostics.  Answers are bitwise
identical in all Boussinesq cases.
@aakashsane
Copy link
Owner Author

merged

@aakashsane aakashsane merged commit 60dd73c into ML_diffusivity Jul 29, 2024
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.

5 participants