Commit 0dff7870 authored by Peters, Wouter's avatar Peters, Wouter
Browse files

moving the restart data now before collecting new, also purging the...

moving the restart data now before collecting new, also purging the restart/current folder before collecting data
parent 591f8a48
......@@ -410,8 +410,8 @@ class CycleControl(dict):
dummy = self.RandomSeed('write')
dummy = self.WriteNewRCfile()
dummy = self.CollectRestartData()
dummy = self.MoveRestartData(io_option='store')
dummy = self.CollectRestartData()
dummy = self.SubmitNextCycle()
def CollectRestartData(self):
......@@ -420,15 +420,19 @@ class CycleControl(dict):
attribute "RestartFileList" which is a simple list of files that can be appended by other objects/methods that
require restart data to be saved.
Currently, the following files are included
.. note: Before collecting the files in the ``RestartFileList``, the restart/current directory will be emptied and
recreated. This prevents files from accumulating in the restart/current and restart/one-ago folders. It
also means that if a file is missing from the ``RestartFileList``, it will not be available for check-pointing
if your run crashes or dies!
Currently, the following files are included:
- The ``randomseed.pickle`` file
- The ``da_runtime.rc`` file
- The savestate.nc file
- ...
* The ``da_runtime.rc`` file
* The savestate.nc file
* The files in the ``ObservationOperator.RestartFileList``, i.e., restart data for the transport model
Note that we assume that the restart files for the ObservationOperator reside in a separate folder, i.e, the
ObservationOperator does *not* write directly to the restart dir!
.. note: We assume that the restart files for the :class:`~da.baseclasses.observationoprator.ObservationOperator`
reside in a separate folder, i.e, the ObservationOperator does *not* write directly to the restart dir!
"""
......@@ -438,6 +442,10 @@ class CycleControl(dict):
targetdir = os.path.join(self['dir.restart.current'])
msg = "Purging the current restart directory before collecting new data" ; logging.info(msg)
CreateDirs(os.path.join(targetdir),forceclean=True)
msg = "Collecting the required restart data" ; logging.info(msg)
msg = " to directory: %s " % targetdir ; logging.debug(msg)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment