Skip to content
Snippets Groups Projects
Commit 52708865 authored by ivar's avatar ivar
Browse files

In case of restart=True (cycle>1) my.basedir is set correctly to the exec-dir

parent 9fbe70f4
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment