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
Container Registry
Model registry
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
CTDAS
CTDAS
Commits
52708865
Commit
52708865
authored
12 years ago
by
ivar
Browse files
Options
Downloads
Patches
Plain Diff
In case of restart=True (cycle>1) my.basedir is set correctly to the exec-dir
parent
9fbe70f4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
da/tm5/observationoperator.py
+13
-2
13 additions, 2 deletions
da/tm5/observationoperator.py
with
13 additions
and
2 deletions
da/tm5/observationoperator.py
+
13
−
2
View file @
52708865
...
...
@@ -79,7 +79,7 @@ class TM5ObservationOperator(ObservationOperator):
self
.
DaCycle
=
{}
msg
=
'
Observation Operator initialized: %s (%s)
'
%
(
self
.
Identifier
,
self
.
Version
,)
;
logging
.
info
(
msg
)
def
Initialize
(
self
):
"""
Execute all steps needed to prepare the ObsOperator for use inside CTDAS, only done at the very first cycle normally
...
...
@@ -111,10 +111,19 @@ class TM5ObservationOperator(ObservationOperator):
self
.
CompileTM5
()
else
:
NewItems
=
{
'
my.basedir
'
:
self
.
DaCycle
[
'
dir.exec
'
]
,
}
self
.
ModifyRC
(
NewItems
)
# Replace the rc filename for TM5 with the newly created one in the new run directory
workingcopytm5rc
=
os
.
path
.
join
(
self
.
tm_settings
[
'
rundir
'
],
self
.
tm_settings
[
'
install.rc
'
]
)
self
.
RcFileName
=
workingcopytm5rc
msg
=
'
Working copy of the tm5.rc file is in place (%s)
'
%
workingcopytm5rc
;
logging
.
debug
(
msg
)
...
...
@@ -439,6 +448,7 @@ class TM5ObservationOperator(ObservationOperator):
sourcedir
=
self
.
DaCycle
[
'
dir.restart.current
'
]
targetdir
=
self
.
tm_settings
[
self
.
savedirkey
]
self
.
outputdir
=
self
.
tm_settings
[
self
.
outputdirkey
]
#IV test
for
file
in
os
.
listdir
(
sourcedir
):
...
...
@@ -575,6 +585,7 @@ class TM5ObservationOperator(ObservationOperator):
DaPlatForm
=
self
.
DaCycle
.
DaPlatForm
tm5submitdir
=
os
.
path
.
join
(
self
.
tm_settings
[
self
.
rundirkey
])
msg
=
'
tm5submitdir
'
,
tm5submitdir
;
logging
.
info
(
msg
)
# Go to executable directory and start the subprocess, using a new logfile
...
...
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