Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CTDAS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NearRealTimeCTDAS
CTDAS
Commits
7cc70ba6
Commit
7cc70ba6
authored
14 years ago
by
Peters, Wouter
Browse files
Options
Downloads
Patches
Plain Diff
outputdir needs name change after recover from crash
parent
4f95cc96
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
da/tools/initexit.py
+8
-0
8 additions, 0 deletions
da/tools/initexit.py
with
8 additions
and
0 deletions
da/tools/initexit.py
+
8
−
0
View file @
7cc70ba6
...
@@ -381,10 +381,12 @@ class CycleControl(dict):
...
@@ -381,10 +381,12 @@ class CycleControl(dict):
- copying all data from the restart/one-ago folder (:meth:`~da.tools.initexit.CycleControl.MoveRestartData`),
- 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
- 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`)
- 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
da.tools.rc
as
rc
import
shutil
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)
# 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):
...
@@ -407,6 +409,12 @@ class CycleControl(dict):
msg
=
"
Replaced randomseed file with previous cycles
'
last values
"
;
logging
.
debug
(
msg
)
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
return
None
def
Finalize
(
self
):
def
Finalize
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment