2 import os,sys,subprocess
4 'G104':
'nps:255:60 220.525:147:90755 -0.268:110:90755' ,
5 'G218':
'lambert:265.000:25 226.514:614:12190.58 12.190:428:12190.58' ,
22 def __init__(self,outgrid,infile,outfile,wind_rot=None):
23 self.outgrid = outgrid
25 self.outfile = outfile
26 self.wind_rot = wind_rot
30 options =
' '.join([
'-set_grib_type same -new_grid_winds ',self.wind_rot,
' -new_grid', ncep_grids.get(self.outgrid)])
31 print "running: %s" % (
' '.join([
'wgrib2 ', self.infile, options, self.outfile]))
32 os.system(
' '.join([
'wgrib2', self.infile, options, self.outfile]))