@@ -261,6 +261,10 @@ def check_inargs():
261
261
d ['mlevs' ] = d ['mlevs' ].replace (',' , ', ' )
262
262
d ['tlevs' ] = d ['tlevs' ].replace (',' , ', ' )
263
263
d ['dlevs' ] = d ['dlevs' ].replace (',' , ', ' )
264
+
265
+ # default value for year
266
+ d ['iyr' ] = d ['iys' ]
267
+ d ['imth' ] = d ['ims' ]
264
268
265
269
266
270
def create_directories ():
@@ -335,17 +339,17 @@ def create_directories():
335
339
def restart_flag ():
336
340
"Create restart.qm containing flag for restart. This flag signifies that CCAM completed previous month"
337
341
338
- sdate = d ['iyr' ]* 100 + d ['imth' ]
342
+ cdate = d ['iyr' ]* 100 + d ['imth' ]
339
343
edate = d ['iye' ]* 100 + d ['ime' ]
340
344
341
345
if d ['dmode' ] == "postprocess" :
342
- if sdate > edate :
346
+ if cdate > edate :
343
347
print ("Reached end of postprocessing time-period" )
344
348
write2file (d ['hdir' ]+ '/restart5.qm' , "Complete" , mode = 'w+' )
345
349
else :
346
350
write2file (d ['hdir' ]+ '/restart5.qm' , "True" , mode = 'w+' )
347
351
else :
348
- if sdate > edate :
352
+ if cdate > edate :
349
353
print ("Reached end of simulation time-period" )
350
354
write2file (d ['hdir' ]+ '/restart.qm' , "Complete" , mode = 'w+' )
351
355
sys .exit (0 )
@@ -1733,12 +1737,16 @@ def set_postprocess_options(fname):
1733
1737
if inv_schmidt == 1. :
1734
1738
if d ['minlat' ] == - 999. :
1735
1739
d ['minlat' ] = - 90.
1740
+ print (dict2str ("-> Adjust minlat to {minlat}" ))
1736
1741
if d ['maxlat' ] == - 999. :
1737
1742
d ['maxlat' ] = 90.
1743
+ print (dict2str ("-> Adjust maxlat to {maxlat}" ))
1738
1744
if d ['minlon' ] == - 999. :
1739
1745
d ['minlon' ] = 0.
1746
+ print (dict2str ("-> Adjust minlon to {minlon}" ))
1740
1747
if d ['maxlon' ] == - 999. :
1741
1748
d ['maxlon' ] = 360.
1749
+ print (dict2str ("-> Adjust maxlon to {maxlon}" ))
1742
1750
1743
1751
# Replace undefined postprocess output with global settings
1744
1752
res = d ['reqres' ]
0 commit comments