Commit 7cc70ba6 authored by Peters, Wouter's avatar Peters, Wouter
Browse files

outputdir needs name change after recover from crash

parent 4f95cc96
......@@ -381,10 +381,12 @@ class CycleControl(dict):
- copying all data from the restart/one-ago folder (:meth:`~da.tools.initexit.CycleControl.MoveRestartData`),
- replacing all ``rc-file`` items with those from the ``da_runtime.rc`` in the restart/current dir
- resetting the seed of the random number generator to the value it had before the crash (:meth:`~da.tools.initexit.CycleControl.RandomSeed`)
- replacing the output dir name, since it has the sample time in it...
"""
import da.tools.rc as rc
import shutil
from da.tools.general import CreateDirs
# Replace rc-items with those from the crashed run's last rc-file (now in restart.current dir)
......@@ -407,6 +409,12 @@ class CycleControl(dict):
msg = "Replaced randomseed file with previous cycles' last values" ; logging.debug(msg)
# Re-create the output dir for this time step, if needed
filtertime = self['time.start'].strftime('%Y%m%d')
self['dir.output'] = os.path.join(self['dir.da_run'],'output',filtertime)
CreateDirs(os.path.join(self['dir.output']))
return None
def Finalize(self):
......
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