-
Notifications
You must be signed in to change notification settings - Fork 232
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
MOM6: +(*)Dimensional consistency completion #1040
MOM6: +(*)Dimensional consistency completion #1040
Conversation
Added conversion factors to 4 mass-flux diagnostics and comments to 4 others on why no conversion factors are needed. All answers are bitwise identical.
Added scale arguments to 5 chksum calls and grouped another two chksum calls while also adding the right scaling argument. All answers are bitwise identical.
Undoes the dimensional scaling of the cell areas before taking their global sum, so that the reproducing sum does not overflow when there is dimensional rescaling. All answers are bitwise identical when there is no rescaling, but this eliminates a source of inadvertent overflows or underflows in the global sums, and there is a new optional argument to compute_global_grid_integrals.
Corrects the dimensionally inconsistent expressions for the CFL number in the tracer advection code, in which a negligible thickness had been added to the cell volume to avoid division by zero. This change does not alter the solutions in the MOM6-examples test cases, but now it permits dimensional rescaling of lengths over a much larger range, and it could change answers if the minimum layer thicknesses are small enough.
Unscale interface heights before taking a global average via a reproducing sum in non-Boussinesq mode global diagnostics to permit dimensional consistency testing over a larger range. All answers are bitwise identical.
Added an optional tmp_scale argument to global_i_mean and global_j_mean to specify an internal rescaling of variables being averaged before the reproducing sum. All answers are bitwise identical, but there are new optional arguments to two public interfaces.
Use tmp_scale when taking the i-mean interface heights for i-mean sponges, to give a greatly expanded range of dimensional consistency testing. All answers are bitwise identical.
This PR is being tested with https://gitlab.gfdl.noaa.gov/ogrp/MOM6/pipelines/9465 |
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #1040 +/- ##
============================================
+ Coverage 45.09% 45.09% +<.01%
============================================
Files 212 212
Lines 62578 62588 +10
============================================
+ Hits 28217 28222 +5
- Misses 34361 34366 +5
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good changes but recommend renaming tmp_scale
to something more meaningful in the future.
This PR corrects some dimensionally inconsistent expressions in the tracer
advection code and cleans up or improves dimensional consistency testing in a
few places, with dimensional rescaling now working over at least a range of
2^-120 to 2^120 ~= 1.3e+/-36 for all 5 rescaled units (T, L, H, R, and Z). At this
point, I believe that instrumenting the MOM6 code for dimensional consistency
testing is essentially complete, and there are unlikely to be any more
inconsistent expressions that are exercised by the MOM6-examples regression
tests. No answers in the MOM6-examples test suite or MOM_parameter_doc files
are changed. The commits in this PR include: