Skip to content

*Cancel out Z_to_H factors in MOM_hor_visc.F90#417

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

*Cancel out Z_to_H factors in MOM_hor_visc.F90#417
marshallward merged 3 commits into
NOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:nonBous_hor_visc

Conversation

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

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
Copy Markdown
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
Copy Markdown
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
@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