Grads and Grib2 g2ctl.pl Question
Wesley Ebisuzaki
Wesley.Ebisuzaki at NOAA.GOV
Mon Jul 28 14:51:08 EDT 2008
Pablo,
I couldn't display the file because the "dx" and "dy" parameters were
not given.
1.1:4:grid_template=30:
Lambert Conformal: (571 x 591) input WE:SN output WE:SN res 0
Lat1 28.201020 Lon1 279.309660 LoV 315.000000
LatD 28.500000 Latin1 30.000000 Latin2 30.000000
LatSP -90.000000 LonSP 0.000000
North Pole (571 x 591) Dx 0.000000 m Dy 0.000000 m mode 0
This is common problem with NCEP grib2 files. The dx and dy values are
actually
encoded but a flag indicates that the dx/dy values are missing. You can
change the
flag value by
wgrib2 -set_flag_table_3.3 48 in.grb -grib out.grb
Once I did this, I could display the fields. You may need to upgrade
wgrib2 to get the
set_flag_table_3.3 option.
Wesley Ebisuzaki
Pablo Santos wrote:
> Hello:
>
> I have a grb2 file (http://www.srh.noaa.gov/mfl/research/cwarf_test.grb2)
> that I create a ctl file for using g2ctl.pl.
>
> The ctl file looks like this:
>
> [nawips at MFL-LW-WRFPOST ~/FIT_CSTAR_Test_data_files]$ cat cwarf_test.ctl
> dset ^cwarf_test.grb2
> index ^cwarf_test.grb2.idx
> undef 9.999E+20
> title cwarf_test.grb2
> * produced by g2ctl v0.0.3h
> * griddef=1.1:4:(571 x 591):grid_template=30: Lambert Conformal: (571 x 591)
> input WE:SN output WE:SN res 0 Lat1 28.201020 Lon1 279.309660 LoV 315.000000
> LatD 28.500000 Latin1 30.000000 Latin2 30.000000 LatSP -90.000000 LonSP
> 0.000000 North Pole (571
> dtype grib2
> xdef 571 linear 0 0.1
> ydef 591 linear 0 0.1
> tdef 17 linear 00Z08jun2008 3hr
> zdef 1 linear 1 1
> vars 3
> DIRPWsfc 0,1,0 10,0,10 ** surface none Primary Wave Direction [deg]
> HTSGWsfc 0,1,0 10,0,3 ** surface none Significant Height of Combined Wind
> Waves and Swell [m]
> PERPWsfc 0,1,0 10,0,11 ** surface none Primary Wave Mean Period [s]
> ENDVARS
>
> But this seems to be a preprojected grib2 I am trying to display which means
> I need the pdef line added to the ctl file. Is there a way to make the
> g2ctl.pl utility do that? If not, could someone help me figure out for this
> particular grid what the pdef line is supposed to look like?
>
> Below is the syntax of what the pdef line I am supposed to add to the ctl
> file is supposed to look like. I am trying to figure out what the line is
> supposed to look like based on the output of the wgrib2 command below:
>
> [nawips at MFL-LW-WRFPOST ~/FIT_CSTAR_Test_data_files]$ wgrib2 -grid
> cwarf_test.grb2
> 1.1:4:grid_template=30:
> Lambert Conformal: (571 x 591) input WE:SN output WE:SN res 0
> Lat1 28.201020 Lon1 279.309660 LoV 315.000000
> LatD 28.500000 Latin1 30.000000 Latin2 30.000000
> LatSP -90.000000 LonSP 0.000000
> North Pole (571 x 591) Dx 0.000000 m Dy 0.000000 m mode 0
>
> Does anyone know? In any case, if someone can help it would be appreciated.
> Thanks.
>
> Pablo
>
> PDEF isize jsize LCCR latref lonref iref jref Struelat Ntruelat slon dx dy
> PDEF isize jsize LCC latref lonref iref jref Struelat Ntruelat slon dx dy
> Example: PDEF 103 69 lccr 30 -88 51.5 34.5 20 40 -88 90000 90000
> Args:
> isize The size of the native grid in the x direction
> jsize The size of the native grid in the y direction
> latref reference latitude
> lonref reference longitude (in degrees, E is positive, W is negative)
> iref i of ref point
> jref j of ref point
> Struelat S true lat
> Ntruelat N true lat
> slon standard longitude
> dx grid X increment in meters
> dy grid Y increment in meters
>
More information about the gradsusr
mailing list