+Refactor homogenize_field and revise its interface #777
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 theunscale
argument 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_scale
argument that is the inverse of the previousscale
, and making the default for the use of reproducing sums to be true when theanswer_date
argument is absent. The twohomogenize_field
routines 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.