# loop through until startdate incremented upto enddate print "Going to start progress on", startdate # call analysis conversion function w.r.t data assimilated # during short forecast hour - 00UTC. convertAnlFiles(inPath, outPath, tmpPath, UMtype=UMtype, UMInAnlFiles=UMInAnlFiles, UMInShortFcstFiles=UMInShortFcstFiles, targetGridFile=targetGridFile, targetGridResolution=targetGridResolution, date=startdate, utc='00', convertVars=neededVars, latitude=requiredLat, longitude=requiredLon, pressureLevels=pressureLevels, extraPolateMethod=extraPolateMethod, fillFullyMaskedVars=fillFullyMaskedVars, soilFirstSecondFixedSurfaceUnit=soilFirstSecondFixedSurfaceUnit, anlFileNameStructure=anlOutGrib2FilesNameStructure, createGrib2CtlIdxFiles=createGrib2CtlIdxFiles, createGrib1CtlIdxFiles=createGrib1CtlIdxFiles, convertGrib2FilestoGrib1Files=convertGrib2FilestoGrib1Files, grib1FilesNameSuffix=grib1FilesNameSuffix, removeGrib2FilesAfterGrib1FilesCreated=removeGrib2FilesAfterGrib1FilesCreated, anl_step_hour=anl_step_hour, anl_aavars_reference_time=anl_aavars_reference_time, anl_aavars_time_bounds=anl_aavars_time_bounds, overwrite=overwriteFiles, lprint=debug, setGrib2TableParameters=setGrib2TableParameters, wgrib2Arguments=wgrib2Arguments, callBackScript=callBackScript) print "Time lag incremented by 1" sDay += lag startdate = sDay.strftime('%Y%m%d') # end of while sDay <= eDay:
print "Going to start progress on", startdate # call analysis conversion function w.r.t data assimilated # during short forecast hour - 00UTC. convertAnlFiles(inPath, outPath, tmpPath, UMtype=UMtype, UMInAnlFiles=UMInAnlFiles, UMReanalysis=UMReanalysis, UMInShortFcstFiles=UMInShortFcstFiles, targetGridFile=targetGridFile, targetGridResolution=targetGridResolution, date=startdate, utc='00', convertVars=neededVars, latitude=requiredLat, longitude=requiredLon, pressureLevels=pressureLevels, extraPolateMethod=extraPolateMethod, fillFullyMaskedVars=fillFullyMaskedVars, soilFirstSecondFixedSurfaceUnit=soilFirstSecondFixedSurfaceUnit, anlFileNameStructure=anlOutGrib2FilesNameStructure, createGrib2CtlIdxFiles=createGrib2CtlIdxFiles, createGrib1CtlIdxFiles=createGrib1CtlIdxFiles, convertGrib2FilestoGrib1Files=convertGrib2FilestoGrib1Files, grib1FilesNameSuffix=grib1FilesNameSuffix, removeGrib2FilesAfterGrib1FilesCreated=removeGrib2FilesAfterGrib1FilesCreated, anl_step_hour=anl_step_hour, anl_aavars_reference_time=anl_aavars_reference_time, anl_aavars_time_bounds=anl_aavars_time_bounds, overwrite=overwriteFiles, lprint=debug, setGrib2TableParameters=setGrib2TableParameters, wgrib2Arguments=wgrib2Arguments, write2NetcdfFile=write2NetcdfFile, callBackScript=callBackScript) print "Time lag incremented by 1" sDay += lag startdate = sDay.strftime('%Y%m%d')
""" This is simple script to invoke parallel conversion function from um2grb2 and pass the assimilated / forecasted hour as argument. hour : 06 Output : It creates analysis - 1 file (um_ana_06hr_date.grib2). Written by : Arulalan.T Date : 07.Dec.2015 """ import os, sys from g2utils.um2grb2 import convertAnlFiles sys.path.append(os.path.abspath(os.path.dirname(__file__))) from loadconfigure import inPath, outPath, tmpPath, date # call analysis conversion function w.r.t data assimilated during short forecast hour. convertAnlFiles(inPath, outPath, tmpPath, date, hr='06')