Add on_face to OBC_segment_data_type#926
Merged
Hallberg-NOAA merged 1 commit intoJul 8, 2025
Merged
Conversation
dc5e154 to
6a735a1
Compare
|
This PR does not change answers for the NWA and NEP configurations. |
theresa-cordero
approved these changes
Jul 8, 2025
Added the new on_face element to the OBC_segment_data_type to indicate where a field is staggered, and the used this to simplify the code and the logical tests in initialize_segment_data and update_OBC_segment_data. The new function field_is_on_face() is used to set the on_face elements. Also, duplicated code that determines whether data requirements have been satisfied has been moved into a single block of code that used regardless of whether the data is specified or provided from a file. There is also the new routine field_is_tidal that can be used to determine the appropriate vertical extent of a field within the model. With these changes, there has been a substantial consolidation of the blocks of code that allocates and initializes the various input buffers. In addition, some of the duplicated code setting the tracer reservoir values for temperatures, salinities and other "obgc" tracers has been consolidated into a single block of code. The code setting the SSH at boundaries was also consolidated rather than having duplicate blocks with and without the ramping enabled. Several redundant logical tests or unneeded arrays were also eliminated. With these changes, MOM_open_boundary.F90 is shorter by about 190 lines and should be easier to read and maintain. There are no changes to publicly visible interfaces, and all answers are bitwise identical.
6a735a1 to
f6a6bd2
Compare
Member
Author
|
This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/28002. |
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.
Added the new
on_faceelement to theOBC_segment_data_typeto indicate where a field is staggered, and the used this to simplify the code and the logical tests ininitialize_segment_data()andupdate_OBC_segment_data(). The new functionfield_is_on_face()is used to set theon_faceelements. Also, duplicated code that determines whether data requirements have been satisfied has been moved into a single block of code that used regardless of whether the data is specified or provided from a file. There is also the new routinefield_is_tidal()that can be used to determine the appropriate vertical extent of a field within the model. With these changes, there has been a substantial consolidation of the blocks of code that allocates and initializes the various input buffers.In addition, some of the duplicated code setting the tracer reservoir values for temperatures, salinities and other "obgc" tracers has been consolidated into a single block of code. The code setting the SSH at boundaries was also consolidated rather than having duplicate blocks with and without the ramping enabled. Several redundant logical tests or unneeded arrays were also eliminated.
With these changes, MOM_open_boundary.F90 is shorter by about 190 lines and should be easier to read and maintain. There are no changes to publicly visible interfaces, and all answers are bitwise identical.