Skip to content

(*)Fix northern Flather OBCs in southern halos#888

Merged
marshallward merged 1 commit into
NOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:irregular_OBC_fix
Apr 28, 2025
Merged

(*)Fix northern Flather OBCs in southern halos#888
marshallward merged 1 commit into
NOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:irregular_OBC_fix

Conversation

@Hallberg-NOAA
Copy link
Copy Markdown
Member

Added additional logic to avoid segmentation faults from applying Flather open boundary conditions near the opposite side of the computational domain (e.g., applying a Northern Flather boundary condition on the southern edge of the domain). This situation does not arise when open boundaries are only found on the edges of a domain, but in parallel cases with sloped OBCs (such as the ESMG-configs rotated seamount test case) this atypical situation can arise. The key point to the specific fix is to note that when such a case arises, the OBC velocity in the outer halo point does not subsequently impact the solution on that PE either because its effects are masked out by land or OBC points at the neighboring orthogonal velocities, and then they are overwritten by a halo update (perhaps several steps later). All answers are bitwise identical in all cases that have been tested and were working before, and the ESMG/rotated_seamount test case is now running correctly (and giving identical answers) for a variety of PE counts.

@Hallberg-NOAA Hallberg-NOAA added the bug Something isn't working label Apr 24, 2025
  Added additional logic to avoid segmentation faults from applying Flather open
boundary conditions near the opposite side of the computational domain (e.g.,
applying a Northern Flather boundary condition on the southern edge of the
domain).  This situation does not arise when open boundaries are only found on
the edges of a domain, but in parallel cases with sloped OBCs (such as the
ESMG-configs rotated seamount test case) this atypical situation can arise.  The
key point to the specific fix is to note that when such a case arises, the OBC
velocity in the outer halo point does not subsequently impact the solution on
that PE either because its effects are masked out by land or OBC points at the
neighboring orthogonal velocities, and then they are overwritten by a halo
update (perhaps several steps later).  All answers are bitwise identical in all
cases that have been tested and were working before, and the
ESMG/rotated_seamount test case is now running correctly (and giving identical
answers) for a variety of PE counts.
Copy link
Copy Markdown

@kshedstrom kshedstrom left a comment

Choose a reason for hiding this comment

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

It works for me.

@marshallward
Copy link
Copy Markdown
Member

@marshallward
Copy link
Copy Markdown
Member

@Hallberg-NOAA can you submit this to the PR to main?

@marshallward
Copy link
Copy Markdown
Member

@marshallward
Copy link
Copy Markdown
Member

This has also been merged into the submission branch to main.

mom-ocean#1664

@marshallward marshallward merged commit 601fdfb into NOAA-GFDL:dev/gfdl Apr 28, 2025
102 checks passed
@Hallberg-NOAA Hallberg-NOAA deleted the irregular_OBC_fix branch June 17, 2025 15:52
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