- Timestamp:
- Nov 4, 2016, 4:47:40 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/model_graphics.py
r1268 r1270 890 890 print 'WRF_toCF('+ values +', ' + ifilen + ')' 891 891 for s1out in output: print s1out 892 # Removing file in order to make sure that it will be redone 893 print ' ' + fname + " removing file '" + ifilen + "' ..." 894 sub.call('rm ' + ifilen + ' >& /dev/null', shell=True) 892 895 quit(-1) 893 896 if db: … … 901 904 print 'LMDZ_toCF('+ Tunits +'!since!'+ Tref + ', ' + ifilen + ')' 902 905 for s1out in output: print s1out 906 # Removing file in order to make sure that it will be redone 907 print ' ' + fname + " removing file '" + ifilen + "' ..." 908 sub.call('rm ' + ifilen + ' >& /dev/null', shell=True) 903 909 quit(-1) 904 910 if db: … … 949 955 print 'time_reset(' + minf.timemodif + ', ' + fileon + ', time)' 950 956 for s1out in output: print s1out 957 # Removing file in order to make sure that it will be redone 958 print ' ' + fname + " removing file '" + fileon + "' ..." 959 sub.call('rm ' + fileon + ' >& /dev/null', shell=True) 951 960 quit(-1) 952 961 if db: … … 1158 1167 # pinterp: pressure interpolation (to the given $plevels) 1159 1168 vals=plevels + ',1,1' 1160 print fname + '; Lluis vals:', vals, 'plevels:', plevels1161 1169 if dofile: 1162 1170 try: … … 1182 1190 1183 1191 # adding CF lon,lat,time in WRF files 1184 if minf.name == 'WRF' :1192 if minf.name == 'WRF' or minf.name == 'WRF_LMDZ': 1185 1193 values = vdnx + ':' + vdny + ':'+ Tref + ':' + Tunits 1186 ncvar.WRF_toCF(values, fileon) 1194 try: 1195 with gen.Capturing() as output: 1196 ncvar.WRF_toCF(values, fileon) 1197 except: 1198 print errmsg 1199 print 'ncvar.WRF_toCF(' + values+ ', ' + fileon + ')' 1200 for s1out in output: print s1out 1201 # Removing file in order to make sure that it will be redone 1202 print ' ' + fname + " removing file '" + fileon + "' ..." 1203 sub.call('rm ' + fileon + ' >& /dev/null', shell=True) 1204 quit(-1) 1187 1205 1188 1206 # vertical interpolation variables are no more needed … … 1440 1458 print 'ivars('+fileon+')' 1441 1459 for s1out in output: print s1out 1460 # Removing file in order to make sure that it will be redone 1461 print ' ' + fname + " removing file '" + fileon + "' ..." 1462 sub.call('rm ' + fileon + ' >& /dev/null', shell=True) 1442 1463 quit(-1) 1443 1464 … … 1452 1473 print errmsg 1453 1474 print 'fvaradd(' + prevfile + ',' + CFvn +', '+fileon+')' 1475 ncvar.fvaradd(prevfile+','+CFvn, fileon) 1454 1476 for s1out in output: print s1out 1477 # Removing file in order to make sure that it will be redone 1478 print ' ' + fname + " removing file '" + fileon + "' ..." 1479 #sub.call('rm ' + fileon + ' >& /dev/null', shell=True) 1455 1480 quit(-1) 1456 1481 … … 1465 1490 print errmsg 1466 1491 print 'cleaning_varsfile('+totalvarkeeps+','+fileon+')' 1492 ncvar.cleaning_varsfile(totalvarkeeps,fileon) 1467 1493 for s1out in output: print s1out 1494 # Removing file in order to make sure that it will be redone 1495 print ' ' + fname + " removing file '" + fileon + "' ..." 1496 sub.call('rm ' + fileon + ' >& /dev/null', shell=True) 1468 1497 quit(-1) 1469 1498 … … 3302 3331 print 'ivars('+fileon+')' 3303 3332 for s1out in output: print s1out 3333 # Removing file in order to make sure that it will be redone 3334 print ' ' + fname + " removing file '" + fileon + "' ..." 3335 sub.call('rm ' + fileon + ' >& /dev/null', shell=True) 3304 3336 quit(-1) 3305 3337 … … 3315 3347 print 'fvaradd(' + prevfile + ',' + CFvn +', ' + fileon + ')' 3316 3348 for s1out in output: print s1out 3349 # Removing file in order to make sure that it will be redone 3350 print ' ' + fname + " removing file '" + fileon + "' ..." 3351 sub.call('rm ' + fileon + ' >& /dev/null', shell=True) 3317 3352 quit(-1) 3318 3353 … … 3328 3363 print 'cleaning_varsfile('+totalvarkeeps+','+fileon+')' 3329 3364 for s1out in output: print s1out 3365 # Removing file in order to make sure that it will be redone 3366 print ' ' + fname + " removing file '" + fileon + "' ..." 3367 sub.call('rm ' + fileon + ' >& /dev/null', shell=True) 3330 3368 quit(-1) 3331 3369 … … 3970 4008 print 'ncvar.CDO_toCF(' + ofile + ')' 3971 4009 for s1out in output: print s1out 4010 # Removing file in order to make sure that it will be redone 4011 print ' ' + fname + " removing file '" + ofile + "' ..." 4012 sub.call('rm ' + ofile + ' >& /dev/null', shell=True) 3972 4013 quit(-1) 3973 4014
Note: See TracChangeset
for help on using the changeset viewer.