Skip to content
Snippets Groups Projects
Commit 483c4f1a authored by Peters, Wouter's avatar Peters, Wouter
Browse files

restrict moving of output to jobfile to non-interactive jobs only

parent c835f48d
Branches
No related tags found
No related merge requests found
......@@ -53,7 +53,6 @@ class CycleControl(object):
# Add some useful variables to the rc-file dictionary
self.da_settings['jobrcfilename'] = self.RcFileName
self.da_settings['log'] = logging.root.handlers[0].baseFilename
self.da_settings['dir.da_submit'] = os.getcwd()
self.da_settings['da.crash.recover'] = '-r' in opts
self.da_settings['verbose'] = '-v' in opts
......@@ -67,7 +66,6 @@ class CycleControl(object):
msg = "===============================================================" ; print msg
msg = "DA Cycle rc-file is %s" % self.RcFileName ; print msg
msg = "DA Cycle log file is %s" % self.da_settings['log'] ; print msg
msg = "DA Cycle run directory is %s" % self.da_settings['dir.da_run'] ; print msg
msg = "DA Cycle inverse system is %s" % self.da_settings['da.system'] ; print msg
msg = "DA Cycle forecast model is %s" % self.da_settings['forecast.model'] ; print msg
......@@ -616,12 +614,14 @@ def CleanUpCycle(DaCycle):
# move log file to rundir/jobs
jobdir = os.path.join(DaCycle.da_settings['dir.da_run'],"jobs")
logfile = DaCycle.da_settings['log']
joblogfile = os.path.join(jobdir,'cycle.%s.log'%DaCycle.da_settings['time.start'])
dummy = shutil.move(logfile,joblogfile)
msg = "....Moved %s to %s"%(logfile,joblogfile) ; logging.debug(msg)
logfile = 'das.o%s'%DaCycle.DaPlatForm.GetMyID()
msg = "The complete log file is now at: %s"%(joblogfile) ; logging.info(msg)
if os.path.exists(logfile):
joblogfile = os.path.join(jobdir,'cycle.%s.log'%DaCycle.da_settings['time.start'].strftime('%Y%m%d'))
dummy = shutil.move(logfile,joblogfile)
msg = "....Moved %s to %s"%(logfile,joblogfile) ; logging.debug(msg)
msg = "The complete log file is now at: %s"%(joblogfile) ; logging.info(msg)
if __name__ == "__main__":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment