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 two bugs in convert_temp_salt_for_TEOS10 #560

Conversation

Hallberg-NOAA
Copy link
Member

Fixed two bugs on a single line of convert_temp_salt_for_TEOS10(). The first bug was a reversal in the order of the temperature and salinity arguments to poTemp_to_consTemp(), resulting in temperatures that closely approximate the salinities. The second bug that was fixed on this line was temperatures being rescaled with a factor that is appropriate for salinities. This bug-fix will change answers dramatically for any cases that use the ROQUET_RHO, ROQUET_SPV and TEOS10 equations of state and initialize the model with INIT_LAYERS_FROM_Z_FILE = True.

  Fixed two bugs on a single line of convert_temp_salt_for_TEOS10.  The first
bug was a reversal in the order of the temperature and salinity arguments to
poTemp_to_consTemp, resulting in temperatures that closely approximate the
salinities.  The second bug that was fixed on this line was temperatures being
rescaled with a factor that is appropriate for salinities. This bug-fix will
change answers dramatically for any cases that use the ROQUET_RHO, ROQUET_SPV
and TEOS10 equations of state and initialize the model with
INIT_LAYERS_FROM_Z_FILE = True.
@Hallberg-NOAA Hallberg-NOAA added the bug Something isn't working label Jan 30, 2024
Copy link

codecov bot commented Jan 30, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (671c85d) 37.21% compared to head (ea42f47) 37.21%.

Files Patch % Lines
src/equation_of_state/MOM_EOS.F90 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           dev/gfdl     #560   +/-   ##
=========================================
  Coverage     37.21%   37.21%           
=========================================
  Files           271      271           
  Lines         80405    80405           
  Branches      14992    14992           
=========================================
  Hits          29925    29925           
  Misses        44919    44919           
  Partials       5561     5561           

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

@jkrasting jkrasting self-requested a review February 1, 2024 22:21
Copy link

@jkrasting jkrasting left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hallberg-NOAA - I tested this fix in a candidate configuration of OM5. It corrects the initialization error caused by the improper ordering of arguments to poTemp_to_consTemp() and not using the C_to_degC scaling term for temperature.

Copy link
Member

@marshallward marshallward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marshallward
Copy link
Member

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

@marshallward marshallward merged commit 07bace6 into NOAA-GFDL:dev/gfdl Feb 7, 2024
12 checks passed
@Hallberg-NOAA Hallberg-NOAA deleted the convert_temp_salt_for_TEOS10_bugfix branch May 10, 2024 21:42
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.

3 participants