-
Notifications
You must be signed in to change notification settings - Fork 61
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
wave structure computation into wave_speeds #354
wave structure computation into wave_speeds #354
Conversation
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #354 +/- ##
============================================
+ Coverage 38.29% 38.38% +0.08%
============================================
Files 269 268 -1
Lines 76180 76010 -170
Branches 14011 13987 -24
============================================
+ Hits 29174 29176 +2
+ Misses 41767 41595 -172
Partials 5239 5239
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
d34b3b7
to
d503396
Compare
7adfb2c
to
cec4542
Compare
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.
Thank you for this PR. For the most part, this looks like it should work, but there is something about this PR has me confused. Why was it necessary to move the subroutine wave_speeds()
from MOM_wave_speed to MOM_internal_tides? Unless there is a compelling reason for this move, I think that it should be returned to the MOM_wave_speed module.
This structure is problematic because wave_speeds()
is still using the same wave_speed_CS
control structure from the MOM_wave_speed module, which is now being made transparent. It is also problematic because it makes it hard to see what changes needed to be made in wave_speeds()
to make it work properly.
This PR passes our testing, but this could be mostly because the impacted code is not being exercised by our testing. The visual inspection of these changes is therefore all the more important. If the move between modules is in fact necessary for some compelling reason, please consider making these changes in two separate PRs, one of which makes the necessary code changes, and the other does nothing other than move the wave_speeds subroutine.
The move of commit 1: changes to the I can split into 3 different PRs if that's easier to review, with the drawback of adding to the regression pipeline. |
cec4542
to
405adaf
Compare
I've undone commit 3 which was conflicting with your rebase @Hallberg-NOAA |
wave_speeds now computes the wave structures (eigenvectors) for each mode speed (eigenvalue) similarly to the wave_speed (singular) function. This is a replacement for the MOM_wave_structure function, which could be removed in a subsequent PR. Additional arrays for mode strucures and integral quantities are passed as output hence this is a breaking change for the call to wave_speeds. However it is only called once in diabatic_driver and is used exclusively for internal tides ray tracing. The dimensional solutions for the wave structures are now computed inside MOM_internal_tides, and new diagnostics are added. An out-of-bounds bug is also corrected for the computation of an averaged coriolis parameter.
8d898e9
to
9b616c7
Compare
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.
These changes have addressed the primary issues with the previous version. There should be some future refactoring which will avoid the need for transparent types, but holding this up any longer would be disruptive of important development efforts.
Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/19452 ✔️ |
wave_speeds now computes the wave structures
(eigenvectors) for each mode speed (eigenvalue)
similarly to the wave_speed (singular) function.
This is a replacement for the MOM_wave_structure
function, which could be removed in a subsequent PR.
Additional arrays for mode structures and integral
quantities are passed as output hence this is a
breaking change for the call to wave_speeds.
However it is only called once in diabatic_driver
and is used exclusively for internal tides ray tracing.
This also requires to make int_tides structure public,
this could be reverted by moving wave_speeds into
MOM_internal_tides if necessary in a following PR.
The dimensional solutions for the wave structures are
now computed inside MOM_internal_tides, and new
diagnostics are added.
An out-of-bounds bug is also corrected for the computation
of an averaged Coriolis parameter.