-
Notifications
You must be signed in to change notification settings - Fork 60
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
bugfix: static h_new shape remaining_transport_sum #82
bugfix: static h_new shape remaining_transport_sum #82
Conversation
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #82 +/- ##
=========================================
Coverage 29.05% 29.05%
=========================================
Files 244 244
Lines 71905 71905
=========================================
Hits 20892 20892
Misses 51013 51013
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.
I agree with this correction.
I'm not so sure about the assertion
|
@klindsay28 I think you are right, it will change it from a zero-indexed field to a 1-indexed field (in symmetric mode), and may change answers. Thanks for catching that. Do you have any tests which can check this? It doesn't seem to have been detected in our regression suite. |
The NCAR specific test suite doesn't have any tests with
For a test to catch this change, you would need to have |
This patch redefines `h_new` to match the shape of a center-point rather than a v-face point. Dynamic memory builds would have been unaffected by this, and older GCC (~7.3.0) compilers appear to have not objected to the shape mismatch, but this raised an error in newer GCCs (~9.3.0). Since this redefines `h_new` from zero-based to 1-based indexing in the y-axis, answer changes are very possible.
db7fa0f
to
efa503b
Compare
I am very confident that this PR will not impact any existing solutions. Until we accepted #37 near the end of 2021, this code would not have worked at all due to a segmentation fault, and had not worked since at least July 2019. No one appears to have noticed, which means that no one was using this part of the code. The offline tracer mode is a useful idea, but it was never fully implemented, and never had been incorporated into any regression tests, primarily because the postdoc who was working on it accepted a well-deserved new position abroad (working with a different ocean modeling system) before it was fully complete. As of this year, it is now compiling, running, reproducing across layouts, and passing dimensional consistency tests, but this bug suggests that it is not being fully tested in all modes (e.g., symmetric or non-symmetric memory). |
I've updated the commit log to indicate that answer changes are likely (assuming anyone used this, at least). |
This has passed TC testing and pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/14928. |
This patch redefines
h_new
to match the shape of a center-point ratherthan a v-face point.
Dynamic memory builds would have been unaffected by this, and older GCC
(~7.3.0) compilers appear to have not objected to the shape mismatch,
but this raised an error in newer GCCs (~9.3.0).
This should not affect answers, since the loops never strayed into theseredundant undefined regions.