Removes remap_via_sub_cells(), moving code into remapping_core_h()#693
Merged
Hallberg-NOAA merged 1 commit intoAug 1, 2024
Merged
Conversation
Hallberg-NOAA
approved these changes
Aug 1, 2024
Member
Hallberg-NOAA
left a comment
There was a problem hiding this comment.
These changes seem very sensible to me.
…_h() This commit addresses a `\todo` added in NOAA-GFDL#662, namely that the functions remap_via_sub_cells() and remap_via_sub_cells_om4() could, and should, be moved up into remapping_core_h(), as well as into the obsolete remapping_core_w(). In that PR, the function remap_via_sub_cells() had been modularized into three other functions, and the near-duplicatem remap_via_sub_cells_om4(), called the two of the same functions as well as an out-of-date version of the third function. Since the reampping_core_h() function calls is already brief, calling one function in addition to remap_via_sub_cells(), and since remap_via_sub_cells() is only called from remapping_core_*(), we can remove a level of call-tree depth depth by copying remap_via_sub_grid() into reampping_core_h() and removing the unused function(s).
eb7a5c9 to
3069058
Compare
Member
|
This has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/24326. |
This was referenced Nov 27, 2024
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 addresses a
\todoadded in #662, namely that the functions remap_via_sub_cells() and remap_via_sub_cells_om4() could, and should, be moved up into remapping_core_h(), as well as into the obsolete remapping_core_w().In that PR, the function remap_via_sub_cells() had been modularized into three other functions, and the near-duplicate remap_via_sub_cells_om4(), called two of the same functions as well as an out-of-date version of the third function.
Since the remapping_core_h() function calls is already brief, calling one function in addition to remap_via_sub_cells(), and since remap_via_sub_cells() is only called from remapping_core_*(), we can remove a level of call-tree depth depth by copying remap_via_sub_grid() into reampping_core_h() and removing the unused function(s).