+Refactor totalTandS to optionally work with scaled variables#827
Merged
Hallberg-NOAA merged 1 commit intoApr 8, 2025
Merged
Conversation
marshallward
reviewed
Apr 7, 2025
marshallward
reviewed
Apr 7, 2025
marshallward
reviewed
Apr 7, 2025
marshallward
approved these changes
Apr 7, 2025
Member
marshallward
left a comment
There was a problem hiding this comment.
This looks good to me. I added some comments that you may want to consider before merging.
508d45f to
4e27812
Compare
Member
Author
|
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
This was referenced Apr 23, 2025
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.
Refactored
totalTandS()andtotalStuff()to optionally work with scaled variables, by adding an optionalunit_scale_typeargument and a optional argument specifying the unscaling of thickness tototalTandS()and an optionalunscaleargument 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.