-
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
Refactor ice shelf rescaling and diagnostic calcs #795
Refactor ice shelf rescaling and diagnostic calcs #795
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.
I have run dimensional consistency tests that confirm these changes to scaling factors are correct. Comments documenting or correcting the units of variables also appear to be correct.
Refactored the volume_above_floatation, write_ice_shelf_energy and ice_shelf_solve_outer routines to work in rescaled units by making use of the unscale arguments to reproducing_sum(). Also added or corrected comments documenting the units of 11 real variables in these routines. The routine integrate_over_Ice_sheet_area was converted into a function and var_scale was renamed to unscale for more consistency with the rest of the MOM6 code. Additionally, add_shelf_flux and update_shelf_mass were modified to use the scale arguments to time_interp_external. A total of 12 rescaling variables were eliminated or moved into unscale arguments, and 2 blocks of code that scale input variables were eliminated. All answers and diagnostics are bitwise identical, and no interfaces are changed.
Revised volume_above_floatation and integrate_over_ice_sheet_area to return values in scaled units, and added conversion factors to the register_scalar_field calls in MOM_ice_shelf so that all unit unscaling of diagnostics occurs via the diag mediator and not in the code itself. After this commit, all of the dimensional scaling factors for diagnostics in the ice_shelf code occur via conversion factors that are immediately adjacent to the declaration of the units of those diagnostics, facilitating comparison for consistency. The declared units of one diagnostic, "taub_beta", were revised from "MPa s m-1" to "MPa yr m-1" to be consistent with its conversion factor, which was also corrected (essentially by a factor of [Z L-1 ~> 1]. Several missing unit conversion factors for rates of mass change were also added, and about 15 missing or incorrect units in lines documenting real variables were added or fixed. The input scale factor for the (perhaps unused) variable INPUT_VEL_ICE_SHELF was corrected from `US%m_s_to_L_T*US%m_to_Z` to just `US%m_s_to_L_T`. With these changes, all solutions are bitwise identical, apart from regional cases with a specified inflow when run with dimensional rescaling. The ice shelf diagnostics should now be invariant when dimensional rescaling is applied, and the units of the ice shelf diagnostics are now all consistent with the required rescaling factors.
d9344bd
to
62334f3
Compare
This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/25977. |
This PR consists of two commits that refactor the MOM6 ice_shelf code to work more extensively in rescaled variables, and to do the unscaling of all diagnostics by the conversions arguments to
register_diag_field()
orregister_scalar_field()
calls.These change make use of the recently added unscale argument to
reproducing_sum()
. Several missing unit conversion factors for rates of mass change were also added, and the diagnostics have now been verified to pass dimensional consistency testing. After these commits, all of the dimensional scaling factors for diagnostics in the ice_shelf code occur via conversion factors that are immediately adjacent to the declaration of the units of those diagnostics, facilitating comparison for consistency.The specific changes included refactoring of
volume_above_floatation()
,write_ice_shelf_energy()
andice_shelf_solve_outer()
to work in rescaled arguments, and the conversion ofintegrate_over_Ice_sheet_area()
into a function that returns the integral in rescaled units.The declared units of one diagnostic, "taub_beta", were revised from "MPa s m-1" to "MPa yr m-1" to be consistent with its conversion factor, which was also corrected (essentially by a factor of [Z L-1 ~> 1]).
The input scale factor for the (perhaps unused) variable
INPUT_VEL_ICE_SHELF
was corrected fromUS%m_s_to_L_T*US%m_to_Z
to justUS%m_s_to_L_T
. This could change answers for some rescaled configurations with forced inflow into an ice sheet, such as that of Goldberg et al., (2010), but such configurations do not appear to be used much.As a part of these changes, comments documenting the units of about 26 real variables were added or corrected.
With these changes, all solutions in our test cases are bitwise identical and are passing dimensional consistency testing. The ice shelf diagnostics should now be invariant when dimensional rescaling is applied, and the units of the ice shelf diagnostics are now all consistent with the required rescaling factors. The commits in this PR include: