MOM6: +(*)Dimensional consistency completion#1040
Merged
Merged
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.
Collaborator
Author
|
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.
|
marshallward
approved these changes
Dec 6, 2019
Collaborator
marshallward
left a comment
There was a problem hiding this comment.
Very good changes but recommend renaming tmp_scale to something more meaningful in the future.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: