+Store next predictor step Coriolis accelerations in restarts#207
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #207 +/- ##
============================================
+ Coverage 37.15% 37.20% +0.04%
============================================
Files 262 262
Lines 72761 72871 +110
Branches 13598 13619 +21
============================================
+ Hits 27035 27112 +77
- Misses 40712 40743 +31
- Partials 5014 5016 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
c326249 to
78e7105
Compare
Added the new overloaded interface only_read_from_restarts to allow for variables that are not registered to be stored in restart files to be read from the restart files. Versions of this routine that work on 2d, 3d or 4d arrays and pairs of 3d arrays have been added for now, although the pattern should be clear enough if other sizes of arrays are needed. They use the new private routine find_var_in_restart_files to determine whether a named variable is in the restart files and the full path to the appropriate file. These routines allow for the contents of the restart files to be gracefully altered, while preserving the ability to use restart files with the previous format. All answers are bitwise identical, but there is a new public interface.
Added the option to store the Coriolis and advective accelerations from the end of one split RK2 dynamics time step for use in the predictor phase of the next time step, in order to allow for a future commit that will properly remap these accelerations in ALE mode. This change is controlled by the new runtime parameter STORE_CORIOLIS_ACCEL, and it leads to changes in the fields that are saved in the restart files. This commit also includes the necessary changes to allow the restart files written in one mode to be read in the other and give bitwise identical restarts. Because the next step's predictor CAu and CAv accelerations now have to coexist with the previous step's CAu and CAv accelerations, which are used for derived diagnostics (like energy budget terms), the predictor CAu and CAv terms have to be stored in new variables, CS%CAu_pred and CS%CAv_pred, and there is a new accel_diag_ptrs type in the dyn_split_RK2 control structure to diagnose truncation errors arising in the predictor step. Several comments have also been modified to document the dimensions of variables. All answers and diagnostics are bitwise identical.
78e7105 to
2065acf
Compare
adcroft
approved these changes
Sep 30, 2022
Member
adcroft
left a comment
There was a problem hiding this comment.
Approved, pending https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/16929
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.
This PR adds the option to store Coriolis and momentum self-advection
accelerations for use in the next predictor step in the restart file with the
split RK2 time stepping scheme, rather than storing the horizontal volume
transports and time-averaged thicknesses. This option is controlled by the new
runtime parameter STORE_CORIOLIS_ACCEL, with the default being to use the new
restart file contents. In order to maintain identical diagnostics, separate
arrays are used for the predictor and corrector versions of the Coriolis
accelerations.
The PR also includes the addition of a new capability (based on one that has
long been in use in SIS2) to read extra variables from restart files. This new
capability allows for the contents in restart files to be modified, and the PR
includes code to read either the new or old versions of the restart file, with
either setting of STORE_CORIOLIS_ACCEL, and give bitwise identical restarts.
All solutions and diagnostics are bitwise identical, but there are new entries
in the MOM_parameter_doc files, and by default the contents of the restart files
are changed.
The commits in this PR include: