-
Notifications
You must be signed in to change notification settings - Fork 69
+Refactor totalTandS to optionally work with scaled variables #827
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
+Refactor totalTandS to optionally work with scaled variables #827
Conversation
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.
This looks good to me. I added some comments that you may want to consider before merging.
508d45f
to
4e27812
Compare
This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/27056. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev/gfdl #827 +/- ##
============================================
- Coverage 21.66% 21.66% -0.01%
============================================
Files 137 137
Lines 33238 33245 +7
Branches 5972 5973 +1
============================================
Hits 7202 7202
- Misses 25479 25486 +7
Partials 557 557 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Refactored totalTandS and totalStuff to optionally work with scaled variables, by adding an optional unit_scale_type argument and a optional argument specifying the unscaling of thickness to totalTandS and an optional unscale argument to totalStuff. The comments describing the units of 19 variables were modified to reflect the various units that might be used. All solutions are bitwise identical, and output is unchanged when dimensional rescaling is not being used, but the debugging output can now be unaltered by the use of dimensional rescaling. There are new optional arguments to two publicly visible routines. This change has been tested via calls to totalTandS added to step_MOM_thermo, but because totalTandS is only intended for debugging, these testing calls are commented out. I am uncertain whether to ultimately retain these comments to illustrate the use of totalTandS or whether to delete them before this PR is merged in, but retaining them for now seems like they may help the PR review process.
4e27812
to
15d9b37
Compare
Refactored
totalTandS()
andtotalStuff()
to optionally work with scaled variables, by adding an optionalunit_scale_type
argument and a optional argument specifying the unscaling of thickness tototalTandS()
and an optionalunscale
argument tototalStuff()
. The comments describing the units of 19 variables were modified to reflect the various units that might be used. All solutions are bitwise identical, and output is unchanged when dimensional rescaling is not being used, but the debugging output can now be unaltered by the use of dimensional rescaling. There are new optional arguments to two publicly visible routines.This change has been tested via calls to
totalTandS()
added tostep_MOM_thermo()
, but becausetotalTandS()
is only intended for debugging, these testing calls are commented out. I am uncertain whether to ultimately retain these comments to illustrate the use oftotalTandS()
or whether to delete them before this PR is merged into dev/gfdl, but retaining them for now seems like they may help the PR review process.