Skip to content

Generalized MOM restart function#1

Closed
marshallward wants to merge 3 commits into
cspencerjones:MOM-internal-restartfrom
marshallward:new_save_restart
Closed

Generalized MOM restart function#1
marshallward wants to merge 3 commits into
cspencerjones:MOM-internal-restartfrom
marshallward:new_save_restart

Conversation

@marshallward
Copy link
Copy Markdown

This patch merges the internal save_restart function with the new save_MOM6_internal_state function into a new general MOM restart function.

It also makes an effort to eliminate MOM_restart as a driver dependency, narrowing the required MOM API for existing and future drivers.

Also removes the restart_CSp argument from MOM_wave_interface_init, since it appeared to be used for nothing.

@marshallward
Copy link
Copy Markdown
Author

I reckon we should get feedback from @adcroft and @Hallberg-NOAA before adding this to the PR.

Copy link
Copy Markdown

@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.

I like this revision. It implements what we discussed the restarts should look like.

@marshallward
Copy link
Copy Markdown
Author

I added a new feature which creates the RESTART directory if it is missing. The save_MOM_restart function feels like the right place to invoke it.

@marshallward
Copy link
Copy Markdown
Author

@cspencerjones If you like, I can handle this one over at NOAA-GFDL/MOM6, entirely up to you though.

adcroft and others added 3 commits July 12, 2023 09:59
As described in issue mom-ocean#372, I would like to be able to create restart files that
contain information about the particle location. These files will be written at
the same time as other restart files. I cannot add these calls directly to the
driver, because the driver does not have information about the particle location.
We have added save_MOM6_internal_state as a subroutine in MOM.F90, and
we added calls to this subroutine from each of the drivers. We hope this will
allow for more new packages to write restart files in the future.

Co-authored by Spencer Jones <spencerjones@tamu.edu>
This patch merges the internal `save_restart` function with the new
`save_MOM6_internal_state` function into a new general MOM restart
function.

It also makes an effort to eliminate `MOM_restart` as a driver
dependency, narrowing the required MOM API for existing and future
drivers.

Also removes the `restart_CSp` argument from `MOM_wave_interface_init`,
since it appeared to be used for nothing.
MOM simulations typically abort of the restart directory (usually
RESTART) are absent.  This patch adds POSIX support for mkdir() and
creates the directory if it is missing.
@marshallward
Copy link
Copy Markdown
Author

These changes will be handled in a separate PR to dev/gfdl.

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.

2 participants