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
a76f0fa7
Commit
a76f0fa7
authored
14 years ago
by
Peters, Wouter
Browse files
Options
Downloads
Patches
Plain Diff
fixed error in ParseOptions and brushed up the documentation strings
parent
40390dcc
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/tools/initexit.py
+15
-9
15 additions, 9 deletions
da/tools/initexit.py
with
15 additions
and
9 deletions
da/tools/initexit.py
+
15
−
9
View file @
a76f0fa7
...
...
@@ -70,7 +70,6 @@ import os
import
sys
import
shutil
import
datetime
import
da.tools.rc
as
rc
...
...
@@ -104,7 +103,6 @@ class CycleControl(dict):
self
.
DaSystem
=
None
# to be filled later
self
.
RestartFileList
=
[]
# List of files needed for restart, to be extended later
def
__str__
(
self
):
"""
String representation of a CycleControl object
...
...
@@ -124,6 +122,7 @@ class CycleControl(dict):
"""
This method loads a DA Cycle rc-file with settings for this simulation
"""
import
da.tools.rc
as
rc
rcdata
=
rc
.
read
(
RcFileName
)
for
k
,
v
in
rcdata
.
iteritems
():
...
...
@@ -330,10 +329,12 @@ class CycleControl(dict):
* ``${da_rundir}/restart/current``
* ``${da_rundir}/restart/one-ago``
Note that the exec dir will actually be a simlink to the directory where
the observation operator executable lives. This directory is passed through
the ``da.rc`` file. The observation input files will be placed in the exec dir,
and the resulting simulated values will be retrieved from there as well.
.. note: The exec dir will actually be a simlink to the directory where
the observation operator executable lives. This directory is passed through
the ``da.rc`` file.
.. note: The observation input files will be placed in the exec dir,
and the resulting simulated values will be retrieved from there as well.
"""
from
da.tools.general
import
CreateDirs
...
...
@@ -540,6 +541,7 @@ class CycleControl(dict):
def
WriteRC
(
self
,
fname
):
"""
Write RC file after each process to reflect updated info
"""
import
da.tools.rc
as
rc
dummy
=
rc
.
write
(
fname
,
self
)
msg
=
'
Wrote expanded rc-file (%s)
'
%
(
fname
)
;
logging
.
debug
(
msg
)
...
...
@@ -678,9 +680,9 @@ def ParseOptions():
arguments
[
key
]
=
arg
if
opts
:
opts
=
opts
[
0
]
if
opts
:
opts
list
=
[
item
[
0
]
for
item
in
opts
]
return
opts
,
arguments
return
opts
list
,
arguments
def
ValidateOptsArgs
(
opts
,
args
):
"""
...
...
@@ -708,5 +710,9 @@ def ValidateOptsArgs(opts,args):
if
__name__
==
"
__main__
"
:
pass
sys
.
path
.
append
(
'
../../
'
)
opts
,
args
=
ParseOptions
()
print
opts
print
args
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