Skip to content

Zero out bt_pgf_u at OBC points#880

Merged
marshallward merged 1 commit intoNOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:fix_OBC_pressure_work_diags
Apr 20, 2025
Merged

Zero out bt_pgf_u at OBC points#880
marshallward merged 1 commit intoNOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:fix_OBC_pressure_work_diags

Conversation

@Hallberg-NOAA
Copy link
Copy Markdown
Member

Added 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.

@Hallberg-NOAA Hallberg-NOAA added the bug Something isn't working label Apr 17, 2025
@Hallberg-NOAA Hallberg-NOAA requested a review from herrwang0 April 17, 2025 22:17
@Hallberg-NOAA
Copy link
Copy Markdown
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.)

Copy link
Copy Markdown

@herrwang0 herrwang0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@Hallberg-NOAA Hallberg-NOAA force-pushed the fix_OBC_pressure_work_diags branch from 791e585 to b7ba4ca Compare April 19, 2025 12:37
@Hallberg-NOAA
Copy link
Copy Markdown
Member Author

This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/27169.

@marshallward marshallward merged commit f2e67e6 into NOAA-GFDL:dev/gfdl Apr 20, 2025
49 of 51 checks passed
@Hallberg-NOAA Hallberg-NOAA deleted the fix_OBC_pressure_work_diags branch April 22, 2025 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants