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

*+Correct oblique OBC restarts #219

Merged

Conversation

Hallberg-NOAA
Copy link
Member

This PR includes a series of commits that correct the fact that the model was
not reproducing across restarts with OBLIQUE open boundary conditions, as is
discussed extensively at github.com//issues/208. Unfortunately,
MOM6 is not yet reproducing answers when the OBLIQUE_TAN OBCs. The primary
changes are:

  • Replaced certain OBC-related variables in the restart files to avoid
    reusing the same variables for fields that are not co-located
  • Project the some values of gtot_[NSEW] outward at OBC points in btstep
  • Added two (OBCmaskCu and OBCmaskCv) to the ocean_grid_type and
    dyn_horgrid_type to mask out values over land or at OBC points
  • Simplify the some sections code applying OBCs by using these new masks
  • Apply OBC-related masks in several places to avoid using thicknesses from
    outside the physical domain, as demonstrated by the new invariance of the
    ESMG Bering test case to changes in the value of OBC_SILLY_THICK
  • Corrected some comments describing variables in the OBC_segment_type
  • Eliminated several unused OBC arguments

All answers in the MOM6-examples test suite are bitwise identical, but this
will change (fix) solutions with oblique OBCs and OBC_RAD_VEL_WT < 1. In those
cases where the answers change, they were not reproducing across restarts of had
solutions that depended on arbitrary values from outside of the domain, so there
were no defensible solutions to presever. The commits included in this PR
include:

  • f86d8d5c7 +Eliminate unused OBC arguments
  • 39df08e87 *+Added G%OBCmaskCu and G%OBCmaskCv
  • 8b020737c +Attempt to fix an imperfect restart issue.
  • 9788316c6 *+Corrected some oblique OBC restarts

@codecov
Copy link

codecov bot commented Oct 13, 2022

Codecov Report

Merging #219 (d96e5ce) into dev/gfdl (cd2852a) will decrease coverage by 0.53%.
The diff coverage is 37.76%.

@@             Coverage Diff              @@
##           dev/gfdl     #219      +/-   ##
============================================
- Coverage     37.72%   37.18%   -0.54%     
============================================
  Files           263      263              
  Lines         71834    73035    +1201     
  Branches      13385    13608     +223     
============================================
+ Hits          27098    27161      +63     
- Misses        39728    40859    +1131     
- Partials       5008     5015       +7     
Impacted Files Coverage Δ
src/parameterizations/lateral/MOM_MEKE.F90 41.92% <ø> (ø)
...parameterizations/lateral/MOM_interface_filter.F90 0.00% <0.00%> (ø)
...ameterizations/lateral/MOM_mixed_layer_restrat.F90 73.46% <ø> (ø)
...arameterizations/lateral/MOM_thickness_diffuse.F90 47.34% <0.00%> (ø)
src/core/MOM_open_boundary.F90 25.56% <23.52%> (+0.22%) ⬆️
src/core/MOM_transcribe_grid.F90 44.17% <50.00%> (+0.17%) ⬆️
...eterizations/lateral/MOM_lateral_mixing_coeffs.F90 42.74% <61.53%> (+2.26%) ⬆️
src/framework/MOM_dyn_horgrid.F90 55.81% <80.00%> (+0.15%) ⬆️
src/core/MOM_barotropic.F90 58.96% <92.85%> (+0.21%) ⬆️
src/core/MOM_grid.F90 71.11% <100.00%> (+0.21%) ⬆️
... and 3 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Hallberg-NOAA
Copy link
Member Author

Upon further assessment, it now appears that this PR will correct all of the known problems with cases with OBCs not reproducing across restarts. As a result, after this PR is merged in #208 can be closed.

@Hallberg-NOAA Hallberg-NOAA linked an issue Oct 14, 2022 that may be closed by this pull request
Hallberg-NOAA and others added 4 commits October 21, 2022 10:12
  Added separate restart variables for some of the oblique OBC restart variables
at north-south or east-west faces.  Before this fix, some of the full 3-d arrays
for restarts were being overwritten for oblique OBC segments that join at
adjacent corners on the north-east side of tracer points, as is noted in
github.com/NOAA-GFDL/issues/208.  The discussion surrounding this issue
confirms that there are cases using oblique OBCs (like some North-West Atlantic
cases) that do not past the restart reproducibility tests.  Some halo updates
were also corrected, in accordance with the introduction of these new variables
and their proper staggering locations.  In a number of places, the proper
case-sensitive horizontal indexing convention, as described in
github.com/NOAA-GFDL/MOM6/wiki/Code-style-guide#soft-case-convention, is now
being used.  This commit also corrected the comments describing a number of the
variables in the OBC_segment_type to make it clearer where they are discretized.

  This changes the names of oblique OBC-related variables in the restart files,
but since the previous version did not reproduce across restarts, there does not
seem to be any point in retaining those incorrect answers.  All answers in the
MOM6-examples test suite are bitwise identical, but this will change (fix)
solutions with oblique OBCs and OBC_RAD_VEL_WT < 1.
  Added two new arrays (OBCmaskCu and OBCmaskCv) to the ocean_grid_type and
dyn_horgrid_type to mask out values over land or at open boundary condition
points.  Without open boundary conditions, these arrays are identical to
mask2dCu and mask2dCv.  These arrays are used in some of the lateral
parameterization modules to zero out certain gradient-dependent fluxes at open
boundary points.  With these changes, the Bering test case solutions no longer
exhibit any dependence on whether DEBUG_OBC is true or false or the value of
OBC_SILLY_THICK, so this commit should help to address some of the issues
discussed in github.com/NOAA-GFDL/issues/208.  All answers are bitwise
identical in the MOM6-examples test cases, but they change for some other tests
that use open boundary conditions more extensively, and there are new arrays in
some transparent types.
  Eliminated OBC arguments that are no longer used by three internal routines in
MOM_lateral_mixing_coeffs.  All answers are bitwise identical.
@marshallward
Copy link
Member

Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/17209 ✔️

@marshallward marshallward merged commit 84682aa into NOAA-GFDL:dev/gfdl Oct 25, 2022
adcroft pushed a commit to adcroft/MOM6 that referenced this pull request Dec 7, 2022
…date_16may2022

(*)Merge MOM6/main from 16 May 2022
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.

Oblique OBCs have problematic restarts in some cases
3 participants