Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for MASK_OUTSIDE_OBCS with MASKING_DEPTH #752

Open
wants to merge 5 commits into
base: dev/gfdl
Choose a base branch
from

Conversation

kshedstrom
Copy link

The MASK_OUTSIDE_OBCS flag doesn't know about the MASKING_DEPTH and this should take care of the problem.

Copy link
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

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

These changes mirror the code setting the MASKING_DEPTH elsewhere in the MOM6 code, and they make sense to me to add them here as well.

 - Otherwise, the tracer values just outside the OBC get updated
 based on fluxes at the OBC and quickly go out of bounds of the
 equation of state.
 - The previous version did the wrong thing at northern boundaries,
 at a southern corner too.
 - It hasn't yet caused a blowup that I know of, but better to
   prevent any trouble while we're thinking about it.
@kshedstrom
Copy link
Author

I am hopefully done changing things on this branch now.

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 72.50000% with 11 lines in your changes missing coverage. Please review.

Project coverage is 36.65%. Comparing base (31a4d8b) to head (d59cf6d).

Files with missing lines Patch % Lines
src/core/MOM_open_boundary.F90 0.00% 4 Missing ⚠️
src/tracer/MOM_tracer_advect.F90 75.00% 0 Missing and 4 partials ⚠️
src/core/MOM_barotropic.F90 85.00% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           dev/gfdl     #752      +/-   ##
============================================
+ Coverage     36.63%   36.65%   +0.01%     
============================================
  Files           278      278              
  Lines         84143    84182      +39     
  Branches      15833    15851      +18     
============================================
+ Hits          30826    30855      +29     
- Misses        47504    47507       +3     
- Partials       5813     5820       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adcroft
Copy link
Member

adcroft commented Nov 11, 2024

@kshedstrom In commit 01b0dc4 you updated the way to handle the v-direction which I think makes sense. However, you didn't change the way the u-direction is handled and left it in the form of the previous commit. I don't think this explains the MacOS fails (which @marshallward suspects is a new gnu-compiler options thing) but currently I think it breaks the rotational symmetry rule.

Copy link
Member

@adcroft adcroft left a comment

Choose a reason for hiding this comment

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

@Hallberg-NOAA earlier approved the first version, and I agree with Bob that this seems like a good fix. However, a subsequent "better" commit broke symmetry (see #752 (comment)). This seems easy to fix (apply to u- what was done to v-) but in the mean-time I'll mark this as "changes requested".

@kshedstrom
Copy link
Author

The symmetric version worked for EW boundaries, but not NS boundaries. The algorithm is sweeping across lines of i and is inherently non-symmetric. With non-zero turns, it would need fixing, I suppose. I'll have to investigate how the turns are actually done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants