Refactor ice shelf rescaling and diagnostic calcs#795
Merged
Hallberg-NOAA merged 2 commits intoNOAA-GFDL:dev/gfdlfrom Jan 8, 2025
Merged
Refactor ice shelf rescaling and diagnostic calcs#795Hallberg-NOAA merged 2 commits intoNOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA merged 2 commits intoNOAA-GFDL:dev/gfdlfrom
Conversation
alex-huth
approved these changes
Jan 6, 2025
alex-huth
left a comment
There was a problem hiding this comment.
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.
marshallward
approved these changes
Jan 7, 2025
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
Member
Author
|
This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/25977. |
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.
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_SHELFwas corrected fromUS%m_s_to_L_T*US%m_to_Zto 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: