Skip to content

+Attempt to fix an imperfect restart issue.#6

Closed
kshedstrom wants to merge 37 commits into
Hallberg-NOAA:oblique_OBC_restart_fixfrom
ESMG:oblique_fix
Closed

+Attempt to fix an imperfect restart issue.#6
kshedstrom wants to merge 37 commits into
Hallberg-NOAA:oblique_OBC_restart_fixfrom
ESMG:oblique_fix

Conversation

@kshedstrom
Copy link
Copy Markdown

Fixes dependence on pbce outside of OBCs.

jiandewang and others added 30 commits June 22, 2022 08:33
…n-20220602

update to main 20220602 commit
…n-20220603

update to main branch 20220629 commit
…ESMF-managed threading.

authored-by: Gerhard Theurich <gerhard.j.theurich@noaa.gov>
…n-20220729

(1) update to MOM6 main branch 20220729 commit (GFDL-candidate-20220721)  (2) cap update: supporting traditional and ESMF-managed threading
- These are updates required to setup OBC segments for OBGC tracers.
- Since COBALT package has more than 50 tracers using the MOM6 table
  mechanism for setting up OBC segments is not feasible. Rather, this
  update delegates such setup to mechanims used in ocean_BGS tracers
  leaving MOM6 mechanism for native tracers intact.
- These are updates required to setup OBC segments for OBGC tracers.
- Since COBALT package has more than 50 tracers using the MOM6 table
  mechanism for setting up OBC segments is not feasible. Rather, this
  update delegates such setup to mechanims used in ocean_BGS tracers
  leaving MOM6 mechanism for native tracers intact.
- Fixed issues caught by MOM6 githubCI
    - These are updates required to setup OBC segments for OBGC tracers.
    - Since COBALT package has more than 50 tracers using the MOM6 table
      mechanism for setting up OBC segments is not feasible. Rather, this
      update delegates such setup to mechanims used in ocean_BGS tracers
      leaving MOM6 mechanism for native tracers intact.
    - Fixed issues caught by MOM6 githubCI
- These are updates required to setup OBC segments for OBGC tracers.
- Since COBALT package has more than 50 tracers using the MOM6 table
  mechanism for setting up OBC segments is not feasible. Rather, this
  update delegates such setup to mechanims used in ocean_BGS tracers
  leaving MOM6 mechanism for native tracers intact.
- Fixed issues caught by MOM6 githubCI
- These are updates required to setup OBC segments for OBGC tracers.
- Since COBALT package has more than 50 tracers using the MOM6 table
  mechanism for setting up OBC segments is not feasible. Rather, this
  update delegates such setup to mechanims used in ocean_BGS tracers
  leaving MOM6 mechanism for native tracers intact.
- Fixed issues caught by MOM6 githubCI
    - These are updates required to setup OBC segments for OBGC tracers.
    - Since COBALT package has more than 50 tracers using the MOM6 table
      mechanism for setting up OBC segments is not feasible. Rather, this
      update delegates such setup to mechanims used in ocean_BGS tracers
      leaving MOM6 mechanism for native tracers intact.
    - Fixed issues caught by MOM6 githubCI
- COBALT tracers do not need as frequent segment bc updates and can
  use a larger update period to speed up the model.
  This commit introduces a new parameter DT_OBC_SEG_UPDATE_OBGC
  that can be adjusted for obc segment update period.
- This commit applies the change only to BGC tracers but can easily
  be changed to apply for all.
- COBALT tracers do not need as frequent segment bc updates and can
  use a larger update period to speed up the model.
  This commit introduces a new parameter DT_OBC_SEG_UPDATE_OBGC
  that can be adjusted for obc segment update period.
- This commit applies the change only to BGC tracers but can easily
  be changed to apply for all.
- COBALT tracers do not need as frequent segment bc updates and can
  use a larger update period to speed up the model.
  This commit introduces a new parameter DT_OBC_SEG_UPDATE_OBGC
  that can be adjusted for obc segment update period.
- This commit applies the change only to BGC tracers but can easily
  be changed to apply for all.
…in-20220820

update to MOM6 20220820 main branch
change t-freeze calcualtion for sppt
  Updated the default values for KV_ML_INVZ2, BAROTROPIC_TIDAL_SAL_BUG,
LAYER_Z_INIT_IC_EXTRAP_BUG, and KAPPA_SHEAR_VERTEX_PSURF_BUG. Also completed
obsoleting of HENYEY_IGW_BACKGROUND_NEW.  This PR will change answers in some
cases, unless the MOM_input files already included lines with the following
settings, or otherwise explicitly set these parameters:

  KV_ML_INVZ2 = 0.0
  BAROTROPIC_TIDAL_SAL_BUG = False
  LAYER_Z_INIT_IC_EXTRAP_BUG = False
  KAPPA_SHEAR_VERTEX_PSURF_BUG = False

For each of these parameters, there is another parameter (such as BULKMIXEDLAYER
or TIDES) whose value determines whether they might be used in a particular
case.  To determine whether or why answers for a particular configuration might
change with this PR, compare the MOM_parameter_doc.all files from equivalent
runs before and after these code changes to determine whether any of these
parameters are taking the default value.  This commit could change answers in
some cases that use default values for these parameters, and the entries in some
MOM_parameter_doc files will change.  The answers in the MOM6-examples test
suite are bitwise identical, due to some entries that were recently added to the
MOM_input files for these cases.
- The unit conversion factor was missing causing a crash in a newer
test.
- Avoid low initial values in the tracer reservoirs
* Description of wt_eta related  variables
* Longname of PFu_BT
Logging BT halo size parameters should happen after the modification in
clone_MOM_domain, where they are lower-bounded by the domain halo.
This commit fixes this and therefore may result a change of parameters
in MOM_parameter_doc.layout in past runs.
This commit fixes the conflicting timestamps for diagnostics at the BT
step level (do_hifreq_output=True).
Instead of the actual dtbt, a nominal time interval is used to "squeeze"
output at all nstep+nfilter steps into a time interval of a single
baroclinic timestep.
This patch re-implements the FMS2 implementations of `open_ASCII_file`
and `open_namelist_file` to remove their dependency on FMS1 functions
which have been staged for deletion.

Note that if a file is opened with `mpp_open` but closed with
`close_file_unit`, then it will raise an error in `fms_io_exit`.
This will no longer be an issue after all references to `mpp_open` have
been removed.  But in the meantime, we will need to ensure that all
unit-based `close_file` calls were not opened with `mpp_open`.

There is also a minor patch to `.testing/Makefile` which selects the
framework ("infra") source dependency, rather than hard-set to FMS1.
Hallberg-NOAA and others added 7 commits September 22, 2022 03:57
FMS2: open_ASCII_file and open_namelist_file
  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.
@kshedstrom
Copy link
Copy Markdown
Author

Sorry, didn't mean to add to the PR, just using github to share files.

@kshedstrom kshedstrom closed this Oct 7, 2022
Hallberg-NOAA added a commit that referenced this pull request Aug 7, 2025
Adds analogous code to MOM_dynamics_split_RK2b.F90 that is identical to the
code that was added to MOM_dynamics_split_RK2.F90 to avoid readjusting the
barotropic mass source to try to reconcile the baroclinic and barotropic sea
surface heights.  By default all answers are bitwise identical, but the runtime
parameter BT_ADJ_CORR_MASS_SRC will not appear in the MOM_parameter_doc files
for cases with SPLIT_RK2B set to True.
Hallberg-NOAA added a commit that referenced this pull request Aug 29, 2025
Adds analogous code to MOM_dynamics_split_RK2b.F90 that is identical to the
code that was added to MOM_dynamics_split_RK2.F90 to avoid readjusting the
barotropic mass source to try to reconcile the baroclinic and barotropic sea
surface heights.  By default all answers are bitwise identical, but the runtime
parameter BT_ADJ_CORR_MASS_SRC will not appear in the MOM_parameter_doc files
for cases with SPLIT_RK2B set to True.
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.

7 participants