Skip to content
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

Open
wants to merge 1 commit into
base: dev/gfdl
Choose a base branch
from

Conversation

Hallberg-NOAA
Copy link
Member

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 into dev/gfdl, but retaining them for now seems like they may help the PR review process.

  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.
@Hallberg-NOAA Hallberg-NOAA added the enhancement New feature or request label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants