Zero out bt_pgf_u at OBC points#880
Merged
marshallward merged 1 commit intoNOAA-GFDL:dev/gfdlfrom Apr 20, 2025
Merged
Conversation
Member
Author
|
The red-X for changing certain diagnostics in test cases with open boundary conditions with this PR is expected. (In fact, it is the whole point of this PR.) |
herrwang0
approved these changes
Apr 18, 2025
herrwang0
left a comment
There was a problem hiding this comment.
Thanks for making corrections to this oversight!
Add code to zero out bt_pgf_u and bt_pgf_v at open boundary condition points, thereby altering the pressure diagnostics that are derived from these arrays. At OBCs, the pressure force is not well defined, and in fact the u_accel_bt and v_accel_bt arrays upon which recently added calculation of bt_pgf_u and bt_pgf_v are based is immediately replaced by a different OBC-specific expression for the accelerations at OBC points. Moreover, at OBC points bt_pgf_u and bt_pgf_v were being calculated using values of eta_anom that were projected outward across OBCs, but where this means that two different OBCs could be trying to set these projected values of eta_anom to two different values (e.g, at a convex corner in OBC segments or at back-to-back OBC segments separated by a single land point). In such cases the diagnostic becomes indeterminate depending on which OBC segment is applied first. Zeroing out this diagnostic removes this ambiguity. This change does change (and correct) some diagnostics in energy budgets at OBC points, but all solutions are bitwise identical and public interfaces are unaltered.
791e585 to
b7ba4ca
Compare
Member
Author
|
This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/27169. |
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.
Added code to zero out
bt_pgf_uandbt_pgf_vat open boundary condition points, thereby altering the pressure diagnostics that are derived from these arrays. At OBCs, the pressure force is not well defined, and in fact theu_accel_btandv_accel_btarrays upon which recently added calculation ofbt_pgf_uandbt_pgf_vare based is immediately replaced by a different OBC-specific expression for the accelerations at OBC points. Moreover, at OBC pointsbt_pgf_uandbt_pgf_vwere being calculated using values ofeta_anomthat were projected outward across OBCs, but where this means that two different OBCs could be trying to set these projected values ofeta_anomto two different values (e.g, at a convex corner in OBC segments or at back-to-back OBC segments separated by a single land point). In such cases the diagnostic becomes indeterminate depending on which OBC segment is applied first. Zeroing out this diagnostic removes this ambiguity. This change does change (and correct) some diagnostics in energy budgets at OBC points, but all solutions are bitwise identical and public interfaces are unaltered.