Skip to content

Commit

Permalink
last shape for massive run (actual progress, 52%)
Browse files Browse the repository at this point in the history
  • Loading branch information
menta78 committed May 3, 2018
1 parent 2730916 commit 7c29544
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 20 deletions.
18 changes: 10 additions & 8 deletions CORDEXRuns/lfLaunchAllCORDEX.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
lisfloodcmd = '{python} {lisflood}'.format(python=py, lisflood=lisfloodpy)

scenarios = ['historical', 'rcp85', 'rcp45']
scenarios = ['rcp85', 'rcp45']

dtReWarmUp = relativedelta(months = 1)

def launchAll(scenarios=scenarios, outDir=outDir, runDirRoot=runDirRoot, dtReWarmUp=dtReWarmUp, preliminaryRun=False):
meteoDataDirectory = '/eos/jeodpp/data/projects/CRITECH/ADAPTATION/lisflood/input/LAEAETRS89_BIAS_CORDEX'
runDir = os.path.join(runDirRoot, 'conf')
initDir = os.path.join(runDirRoot, 'init')
tmpOutDir = os.path.join(runDirRoot, 'tmpout')

models = """
IPSL-INERIS-WRF331F_BC
Expand Down Expand Up @@ -231,7 +231,9 @@ def launchSingleModel(scen, mdl, calendarDayStart, calendarDayEnd, calendar, wuC
outDir=outDir, runDirRoot=runDirRoot):
runDir = os.path.join(runDirRoot, 'conf')
initDir = os.path.join(runDirRoot, 'init')
tmpOutDir = os.path.join(runDirRoot, 'tmpout')
#tmpOutDir = os.path.join(runDirRoot, 'tmpout')
tmpOutDirPrefix = '/scratch2/critechproc/lisflood'

calUnitStr = 'days since ' + calendarDayStart.strftime('%Y-%m-%d')
try:
stepEnd = netCDF4.date2num(calendarDayEnd, calUnitStr, calendar)
Expand Down Expand Up @@ -273,11 +275,11 @@ def launchSingleModel(scen, mdl, calendarDayStart, calendarDayEnd, calendar, wuC
except:
pass

tmpOutDirMdl = os.path.join(tmpOutDir, scen, mdl, wUseStr)
try:
os.makedirs(tmpOutDirMdl)
except:
pass
tmpOutDirMdl = '_'.join([tmpOutDirPrefix, scen, mdl, wUseStr])
#try:
# os.makedirs(tmpOutDirMdl)
#except:
# pass

outDirMdl = os.path.join(outDir, scen, mdl, wUseStr)
try:
Expand Down Expand Up @@ -337,7 +339,7 @@ def launchSingleModel(scen, mdl, calendarDayStart, calendarDayEnd, calendar, wuC
os.system('condor_submit -disable ' + condorSubScrptFile)
#time.sleep(45)
#time.sleep(600)
time.sleep(120)
time.sleep(180)



Expand Down
26 changes: 17 additions & 9 deletions lisfloodRunManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,15 +282,23 @@ def executeNextRun(self):


def iterateRun(self):
starttime = time.time()
while True:
print('""" RUN MANAGER STATE """')
self._printState()
print('"""')
if not self.executeNextRun():
return
endtime = time.time()
print('All done. Elapsed time = ' + str(int(round(endtime - starttime))) + ' s')
try:
try:
os.makedirs(self.tmpOutDir)
except:
pass

starttime = time.time()
while True:
print('""" RUN MANAGER STATE """')
self._printState()
print('"""')
if not self.executeNextRun():
return
endtime = time.time()
print('All done. Elapsed time = ' + str(int(round(endtime - starttime))) + ' s')
finally:
os.rmtree(self.tmpOutDir, True)



Expand Down
2 changes: 1 addition & 1 deletion template/lisfloodCondorSubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ executable = @EXECUTABLE@
+Owner="critechproc"

RequestCpus = 8
RequestMemory = 100Gb
RequestMemory = 10Gb

#Standar outputs
#Output = @CONF_DIR@/condor_job.$(Cluster)_$(Process).out
Expand Down
2 changes: 1 addition & 1 deletion template/settingsEurope.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,7 @@ TIMESTEP RELATED PARAMETERS
</comment>

<!-- menta -->
<textvar name="numCPUs_parallelKinematicWave" value="10"/>
<textvar name="numCPUs_parallelKinematicWave" value="20"/>

<!-- menta -->
<!--<textvar name="CalendarConvention" value="proleptic_gregorian"/>-->
Expand Down
2 changes: 1 addition & 1 deletion template/settingsEurope_cold.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1539,7 +1539,7 @@ TIMESTEP RELATED PARAMETERS
</comment>

<!-- menta -->
<textvar name="numCPUs_parallelKinematicWave" value="10"/>
<textvar name="numCPUs_parallelKinematicWave" value="20"/>

<!-- menta -->
<textvar name="CalendarConvention" value="@CALENDAR_CONVENTION@"/>
Expand Down

0 comments on commit 7c29544

Please sign in to comment.