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

*Cancel out Z_to_H factors in MOM_hor_visc.F90 #417

Merged
merged 3 commits into from
Jul 29, 2023

Conversation

Hallberg-NOAA
Copy link
Member

Cancelled out factors of GV%Z_to_H in MOM_hor_visc.F90 to simplify the code and reduce the dependence on the value of GV%Rho_0 in non-Boussinesq mode. This involved changing the units of 3 internal variables in horizontal_viscosity and one element in the hor_visc_CS type to use thickness units or their inverse. Because GV%Z_to_H is an exact power of 2 in Boussinesq mode, all answers are bitwise identical in that mode, but in non-Boussinesq mode this conversion involves multiplication and division by GV%Rho_0, so while all answers are mathematically equivalent, this change does change answers at roundoff in non-Boussinesq mode.

  Cancelled out factors of GV%Z_to_H in MOM_hor_visc.F90 to simplify the code
and reduce the dependence on the value of GV%Rho_0 in non-Boussinesq mode.  This
involved changing the units of 3 internal variables in horizontal_viscosity and
one element in the hor_visc_CS type to use thickness units or their inverse.
Because GV%Z_to_H is an exact power of 2 in Boussinesq mode, all answers are
bitwise identical in that mode, but in non-Boussinesq mode this conversion
involves multiplication and division by GV%Rho_0, so while all answers are
mathematically equivalent, this change does change answers at roundoff in
non-Boussinesq mode.
@Hallberg-NOAA Hallberg-NOAA added the answer-changing A change in results (actual or potential) label Jul 20, 2023
@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Merging #417 (079917b) into dev/gfdl (5efad9b) will decrease coverage by 0.01%.
The diff coverage is 33.33%.

❗ Current head 079917b differs from pull request most recent head 4776fc9. Consider uploading reports for the commit 4776fc9 to get more accurate results

@@             Coverage Diff              @@
##           dev/gfdl     #417      +/-   ##
============================================
- Coverage     38.15%   38.15%   -0.01%     
============================================
  Files           269      269              
  Lines         76786    76786              
  Branches      14131    14131              
============================================
- Hits          29301    29299       -2     
- Misses        42201    42203       +2     
  Partials       5284     5284              
Files Changed Coverage Δ
src/parameterizations/lateral/MOM_hor_visc.F90 50.17% <33.33%> (ø)

... 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

@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.

Seems straightforward

@marshallward
Copy link
Member

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

@marshallward marshallward merged commit 84056b1 into NOAA-GFDL:dev/gfdl Jul 29, 2023
10 checks passed
@Hallberg-NOAA Hallberg-NOAA deleted the nonBous_hor_visc 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
answer-changing A change in results (actual or potential)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants