Commit a76f0fa7 authored by Peters, Wouter's avatar Peters, Wouter
Browse files

fixed error in ParseOptions and brushed up the documentation strings

parent 40390dcc
......@@ -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: optslist=[item[0] for item in opts]
return opts, arguments
return optslist, 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
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