Fix a rescaling bug with MEKE_EQUILIBRIUM_ALT#133
Conversation
Corrected a bug in a dimensional rescaling factor that will cause test cases using MEKE with MEKE_EQUILIBRIUM_ALT = True to fail dimensional consistency testing. However, answers are unchanged when no rescaling is used. This minor bug has been in the code since the MEKE_EQUILIBRIUM_ALT was first introduced in 2019. All answers in the existing MOM6-examples test suite are bitwise identical.
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #133 +/- ##
=========================================
Coverage 33.45% 33.45%
=========================================
Files 262 262
Lines 71385 71385
Branches 13323 13323
=========================================
Hits 23884 23884
Misses 43029 43029
Partials 4472 4472
Continue to review full report at Codecov.
|
|
Curiously, this was previously fixed in mom-ocean#1491 |
The commit appears in the history: 9011801b617ef6c09a2e48f8685532886122d10f And yet the file reports that the scaling factor has been unchanged for years: https://github.com/mom-ocean/MOM6/blame/main/src/parameterizations/lateral/MOM_MEKE.F90 All a bit worrying. Maybe I failed to merge maih to dev/gfdl? That would be monumentally dumb, but I do recall some drama around it.
|
|
I spot checked other diffs from this PR contribution (other dimensional MEKE fixes, CFC code, etc), and as far as I can tell everything else is in there. So odd... |
|
A possibility is that the change was lost during by-hand conflict resolution during a merge. My mod changed I suspect it was during a main->dev/gfdl merge. Testing of that merge must have missed this omission, I suspect because it didn't cover |
|
That sounds plausible. I don't see any other missing changes, and a hand-merge would be the place for a small error to appear. I was more worried about a total loss of the content, but that doesn't seem to have happened. I guess we'll just have to be more careful. (Or develop better unit tests!) |
|
I accidentally replied while still editing - deleted and re-sent. This issue was indeed caused by a bad conflict resolution. The GH history for MOM_MEKE.F90, https://github.com/NOAA-GFDL/MOM6/commits/dev/gfdl/src/parameterizations/lateral/MOM_MEKE.F90, shows things chronologically. It turns out none of the commits in a line between 9011801..6979c29 are not at fault 6979c29 2021-08-26 +()Add option for MEKE to calculate total depth That's because this relevant line was being edited on several branches at once: Above you can see that 8a0ae94 changed |
* Update mom_cap.F90 to add end of run restart file functionality controlled by write_restart_at_endofrun configuration option in CMEPS. Author: Daniel Sarmient

Corrected a bug in a dimensional rescaling factor that will cause test cases
using MEKE with MEKE_EQUILIBRIUM_ALT = True to fail dimensional consistency
testing. However, answers are unchanged when no rescaling is used. This minor
bug has been in the code since the MEKE_EQUILIBRIUM_ALT was first introduced in
2019. All answers in the existing MOM6-examples test suite are bitwise
identical.