+Refactor homogenize_field and revise its interface#777
Merged
Hallberg-NOAA merged 1 commit intoJan 8, 2025
Merged
Conversation
MJHarrison-GFDL
approved these changes
Jan 7, 2025
MJHarrison-GFDL
left a comment
There was a problem hiding this comment.
It is unlikely that the public interface is being used with the optional arguments outside of the MOM6 repository, so it is safe to make the change.
marshallward
approved these changes
Jan 7, 2025
Refactored the homogenize_field routine in MOM_horizontal_regridding to make use of the unscale argument to reproducing_sum(), and revised its interface to make it more nearly consistent with the interface to homogenize_field_t() in MOM_forcing_type. The interface changes include revising the order of the arguments, making the weight argument options, replacing the scale argument with an optional tmp_scale argument that is the inverse of the previous scale, and making the default for the use of reproducing sums to be true when the answer_date argument is absent. The two homogenize_field routines now give equivalent behavior when none of the optional arguments to homogenize_field() are absent. The homogenize_field calls in MOM_temp_salt_initialize_from_Z() and the horiz_interp_and_extrap_tracer() routines have been modified in accordance with the interface changes. All answers are bitwise identical, but the interface to a publicly visible routine has been substantially changed to the point where any calls using the previous interface will not compile.
3babe99 to
7e7d994
Compare
Member
Author
|
This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/25975. |
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 the
homogenize_field()routine in MOM_horizontal_regridding to make use of theunscaleargument toreproducing_sum(), and revised its interface to make it more nearly consistent with the interface tohomogenize_field_t()inMOM_forcing_type.The interface changes include revising the order of the arguments, making the weight argument options, replacing the scale argument with an optional
tmp_scaleargument that is the inverse of the previousscale, and making the default for the use of reproducing sums to be true when theanswer_dateargument is absent. The twohomogenize_fieldroutines now give equivalent behavior when none of the optional arguments tohomogenize_field()are absent. Thehomogenize_field()calls inMOM_temp_salt_initialize_from_Z()and thehoriz_interp_and_extrap_tracer()routines have been modified in accordance with the interface changes.All answers are bitwise identical, but the interface to a publicly visible routine has been substantially changed to the point where any calls using the previous interface will not compile.