Skip to content

+Store next predictor step Coriolis accelerations in restarts#207

Merged
marshallward merged 2 commits into
NOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:store_CAu
Oct 4, 2022
Merged

+Store next predictor step Coriolis accelerations in restarts#207
marshallward merged 2 commits into
NOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:store_CAu

Conversation

@Hallberg-NOAA
Copy link
Copy Markdown
Member

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:

  • c326249ae +Add new runtime parameter STORE_CORIOLIS_ACCEL
  • 5cc7829df +Add only_read_from_restarts

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 17, 2022

Codecov Report

Merging #207 (2065acf) into dev/gfdl (ffa9eeb) will increase coverage by 0.04%.
The diff coverage is 49.67%.

@@             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     
Impacted Files Coverage Δ
src/framework/MOM_restart.F90 32.64% <40.00%> (+2.54%) ⬆️
src/core/MOM_dynamics_split_RK2.F90 63.55% <55.91%> (-2.01%) ⬇️
config_src/infra/FMS1/MOM_domain_infra.F90 36.11% <0.00%> (+0.17%) ⬆️
src/core/MOM_CoriolisAdv.F90 51.49% <0.00%> (+0.74%) ⬆️
...c/parameterizations/vertical/MOM_vert_friction.F90 60.51% <0.00%> (+1.49%) ⬆️

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

  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.
Copy link
Copy Markdown
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.

@marshallward marshallward merged commit 5201c34 into NOAA-GFDL:dev/gfdl Oct 4, 2022
@Hallberg-NOAA Hallberg-NOAA deleted the store_CAu branch February 2, 2023 14:10
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