Skip to content

+Use RHO_PGF_REF for the pressure gradient forces#392

Merged
marshallward merged 3 commits into
NOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:add_RHO_PGF_REF
Jul 20, 2023
Merged

+Use RHO_PGF_REF for the pressure gradient forces#392
marshallward merged 3 commits into
NOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:add_RHO_PGF_REF

Conversation

@Hallberg-NOAA
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
@Hallberg-NOAA Hallberg-NOAA deleted the add_RHO_PGF_REF branch November 8, 2023 23:13
dhruvbalwada pushed a commit to dhruvbalwada/MOM6 that referenced this pull request Jan 31, 2026
* Add three new CVMix parameters

CVMix moved three hard-coded fortran parameters to user-defined parameters than
can be set via cvmix_init_kpp(). This PR allows users to set those three
parameters via MOM_input / MOM_override, but the MOM6 default values match the
CVMix default values (which match the previously-hardcoded values)

* Update CVMix external in pkg/

Need updated CVMix API that includes ER_Cb, ER_Cs, and ER_Cu arguments to
CVMix_init_kpp()

* Description comments weren't in right format

The comments describing the new variables of the KPP_Cs class were "!" not "!<"
so doxygen didn't recognize them
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