Changeset 0e29ef4 in flexpart.git for preproc/python/FlexpartTools.py
- Timestamp:
- Jan 29, 2015, 9:13:29 AM (9 years ago)
- Branches:
- master, 10.4.1_pesei, FPv9.3.1, FPv9.3.1b_testing, FPv9.3.2, GFS_025, bugfixes+enhancements, dev, fp9.3.1-20161214-nc4, grib2nc4_repair, release-10, release-10.4.1, scaling-bug, univie
- Children:
- 3372ef9
- Parents:
- 30006de
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
preproc/python/FlexpartTools.py
r5763793 r0e29ef4 353 353 index_keys=["date","time","stepRange"] 354 354 indexfile="date_time_stepRange.idx" 355 silentremove(indexfile) 355 356 grib=GribTools(inputfiles.files) 356 357 iid=grib.index(index_keys=index_keys, index_file = indexfile) 357 358 359 print 'index done...' 358 360 silentremove("fort.10") 359 361 silentremove("fort.11") … … 389 391 step = grib_get(gid, 'stepRange') 390 392 cflextime = self.getFlexpartTime(type,step, time) 393 # print 'cyear '+cyear+'/'+cmonth+'/'+'/EI'+cyear[2:4]+cmonth+cday+cflextime 391 394 while 1: 392 395 if gid is None: break … … 420 423 # create the corresponding output file fort.15 (generated by CONVERT2) + fort.16 (paramId 167 and paramId 168) 421 424 mkdir_p(outputdir+'/'+cyear+'/'+cmonth+'/') 425 print "outputdir = " + outputdir+'/'+cyear+'/'+cmonth+'/'+'/EI'+cyear[2:4]+cmonth+cday+cflextime 422 426 fout = open(outputdir+'/'+cyear+'/'+cmonth+'/EI'+cyear[2:4]+cmonth+cday+cflextime,'wb') 423 427 shutil.copyfileobj(open('fort.15','rb'), fout) … … 427 431 grib_index_release(iid) 428 432 429 def clean(self):433 def __del__(self): 430 434 print "clean" 431 435 silentremove("fort.10") 436 silentremove("fort.11") 437 silentremove("fort.12") 438 silentremove("fort.13") 439 silentremove("fort.15") 440 silentremove("fort.16") 441 silentremove("fort.18") 442 silentremove("VERTICAL.EC") 443 silentremove("date_time_stepRange.idx") 444
Note: See TracChangeset
for help on using the changeset viewer.