-
Notifications
You must be signed in to change notification settings - Fork 62
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
+Add and use optional unscale args to reproducing_sum #767
+Add and use optional unscale args to reproducing_sum #767
Conversation
|
d6f594e
to
193c83e
Compare
I have updated this PR to eliminate the changes to the |
Added the new optional unscale argument to reproducing_sum() and reproducing_sum_EFP(). When this is used, the resulting real sum is restored to the same scaling as the input arrays, but when there is an EFP_type returned it is the same as it would have been had the input array been rescaled before it was passed in. All answers are bitwise identical, but thre is a new optional argument to a two publicly visible interfaces.
Added the new element RZL2_to_kg to the unit_scale_type for convenience when rescaling masses and other globally integrated variables. All answers are bitwise identical, but there is a new element in a transparent type.
Revised write_energy() and accumulate_net_input() to work more extensively in dimensionally rescaled variables by using the new unscale arguments to the reproducing_sum functions. As a result of these changes, 15 rescaling factors were eliminated or moved toward the end of write_energy(). All answers are bitwise identical.
Use reproducing_sum with unscale to calculate the global mass diagnostic, globally integrated ocean surface area, offline tracer transport residuals and in calculating the OBC inflow area in tidal_bay_set_OBC_data(). This change allows for the elimination or replacement of 6 rescaling factors and one added instance with a consistent conversion factor and diagnostic units occur on the same line. All answers are bitwise identical.
193c83e
to
03ed726
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.
This looks very good now. The change to reproducing_sum_2d
is much better than the one I proposed, and no such change was needed to reproducing_EFP_sum_3d
. (My suggestion would have probably made it worse!)
This PR has been tested at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/25745. |
This PR consists of a series of 4 commits that adds optional
unscale
arguments to the publicly visiblereproducing_sum()
interfaces inMOM_coms
, and then uses them to refactor the routines inMOM_sum_output
and 4 other modules to eliminate about 19 dimensional rescaling factors, and to work more broadly in rescaled variables for dimensional consistency testing.All answers are bitwise identical, but there are new optional arguments to 2 publicly visible interfaces and a new element in the transparent unit_scale_type. This commits in this PR include: