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

+Use RHO_PGF_REF for the pressure gradient forces #392

Merged
merged 3 commits into from
Jul 20, 2023

Conversation

Hallberg-NOAA
Copy link
Member

Use the new runtime parameter RHO_PGF_REF instead of RHO_0 to set the reference density that is subtracted off from the other densities when calculating the finite volume pressure gradient forces. Although the answers are mathematically equivalent for any value of this parameter, a judicious choice can reduce the impacts of roundoff errors by about 2 orders of magnitude. By default, RHO_PGF_REF is set to RHO_0, and all answers are bitwise identical. However, there is a new runtime parameter that appears in many of the MOM_parameter_doc.all files.

  Use the new runtime parameter RHO_PGF_REF instead of RHO_0 to set the
reference density that is subtracted off from the other densities when
calculating the finite volume pressure gradient forces.  Although the answers
are mathematically equivalent for any value of this parameter, a judicious
choice can reduce the impacts of roundoff errors by about 2 orders of
magnitude.  By default, RHO_PGF_REF is set to RHO_0, and all answers are bitwise
identical.  However, there is a new runtime parameter that appears in many of
the MOM_parameter_doc.all files.
@Hallberg-NOAA Hallberg-NOAA added the enhancement New feature or request label Jun 30, 2023
@codecov
Copy link

codecov bot commented Jun 30, 2023

Codecov Report

Merging #392 (79f3b7d) into dev/gfdl (25feaf2) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 79f3b7d differs from pull request most recent head 09c99f7. Consider uploading reports for the commit 09c99f7 to get more accurate results

@@             Coverage Diff              @@
##           dev/gfdl     #392      +/-   ##
============================================
- Coverage     38.17%   38.17%   -0.01%     
============================================
  Files           269      269              
  Lines         76553    76553              
  Branches      14076    14076              
============================================
- Hits          29226    29224       -2     
- Misses        42077    42079       +2     
  Partials       5250     5250              
Impacted Files Coverage Δ
src/core/MOM_PressureForce_FV.F90 40.69% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@adcroft adcroft left a comment

Choose a reason for hiding this comment

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

I had to re-read since the difference between CS%Rho0 and GV%Rho0 was not easily discerned in the terminal. Testing at https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/19898

@marshallward
Copy link
Member

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

The confusion between CS%Rho0 and GV%Rho0 seems ambiguous to me as well, and perhaps CS%Rho0 should be renamed in the future.

@marshallward marshallward merged commit a5129ca into NOAA-GFDL:dev/gfdl Jul 20, 2023
10 checks passed
@Hallberg-NOAA Hallberg-NOAA deleted the add_RHO_PGF_REF branch November 8, 2023 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants