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

(*)Fix bug in h_neglect used to remap diagnostics to density space #572

Merged

Conversation

Hallberg-NOAA
Copy link
Member

Added explicit names to the h_neglect and h_neglect_edge arguments in a call to build_rho_column() in diag_remap_update(). These were problematic because these arguments were previously in the wrong positions and hence were being used for the wrong (unused) variables inside of build_rho_column(). In Boussinesq mode, the results will be the same as long as there is no dimensional rescaling being applied to thicknesses, and it this were being tested it would have resulted in a dimensional consistency test failure. In non-Boussinesq mode, the values of H_subroundoff as used for this coordinate will be off by a factor of RHO_KV_CONVERT (usually 1035), but these thicknesses are so small that they do not matter unless ANGSTROM is explicitly set to zero (when no dimensional rescaling is being used). To summarize, this fixes a bug that has been around since 2017, and while this fix could slightly change some diagnostics that are remapped to density, it only does so in circumstances that are unlikely to have been realized. No answer changes were detected in the MOM6-examples regression suite, and almost certainly none ever would be in any existing use of MOM6.

  Added explicit names to the h_neglect and h_neglect_edge arguments in a call
to build_rho_column in diag_remap_update.  These were problematic because these
arguments were previously in the wrong positions and hence were being used for
the wrong variables inside of build_rho_column.  In Boussinesq mode, the results
will be the same as long as there is no dimensional rescaling being applied to
thicknesses, and it this were being tested it would have resulted in a
dimensional consistency test failure.  In non-Boussinesq mode, the values of
H_subroundoff as used for this coordinate will be off by a factor of
RHO_KV_CONVERT (usually 1035), but these thicknesses are so small that they do
not matter unless ANGSTROM is explicitly set to zero (when no dimensional
rescaling is being used).  To summarize, this fixes a bug that has been around
since 2017, and while this fix could slightly change some diagnostics that are
remapped to density, it only does so in circumstances that are unlikely to have
been realized.  No answer changes were detected in the MOM6-examples regression
suite, and almost certainly none ever would be in any existing use of MOM6.
@Hallberg-NOAA Hallberg-NOAA added the bug Something isn't working label Feb 28, 2024
Copy link

codecov bot commented Feb 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 37.20%. Comparing base (f2e7abf) to head (db921bc).

Files Patch % Lines
src/framework/MOM_diag_remap.F90 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           dev/gfdl     #572   +/-   ##
=========================================
  Coverage     37.20%   37.20%           
=========================================
  Files           271      271           
  Lines         80475    80475           
  Branches      15008    15008           
=========================================
  Hits          29942    29942           
  Misses        44961    44961           
  Partials       5572     5572           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Hallberg-NOAA Hallberg-NOAA changed the title (*)Fix bug in h_neglect used to remap diagnostics\s to density space (*)Fix bug in h_neglect used to remap diagnostics to density space Feb 28, 2024
@marshallward
Copy link
Member

Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/22481 ✔️

@marshallward marshallward merged commit 86c5ed9 into NOAA-GFDL:dev/gfdl Feb 28, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants