g2ctl
g2ctl takes GRIB2 files and makes GrADS control files.
For grib-1 files, see grib2ctl.
Once you have made a control file and index file, GrADS can
read grib2 files. Note that whenever you update g2ctl, you
must update wgrib2.
1/25/2008 First public release
For analyses:
$ g2ctl -O grib2_file >grib2_file.ctl
$ gribmap -O -i grib2_file.ctl
$ grads
Landscape mode? (no for portrait):
ga-> open grib2_file.ctl
For forecasts:
$ g2ctl grib2_file >grib2_file.ctl
$ gribmap -i grib2_file.ctl
$ grads
Landscape mode? (no for portrait):
ga-> open grib2_file.ctl
Important Options
-0 .. use analysis times
-365 .. use 365 day calendar
-no_profile .. no z coordinate
-raw .. use a raw grid
-ens "e1,..,en" .. a list of quoted ensemble names
Templating
GrADS supports some templates by using the GrADS
templating names. For example,
g2ctl pgb.2008010100.f%f2 >forecast.ctl
gribmap -i forecast.ctl
 
g2ctl -0 pgb.%y4%m2%d2%h2.f00 >analysis.ctl
gribmap -0 -i analysis.ctl
 
g2ctl -ens "e1,e2,e3" %e.2008010100.%f2 >ens.ctl
gribmap -i ens.ctl
The supported template names are:
%y4 - four digit year code
%y2 - two digit year code
%m2 - two digit month code
%m1 - one or two digit month code
%h2 - two digit hour code
%h1 - one or two digit hour code
%f3 - three digit forecast hour code
%f2 - two or three digit forecast hour code
%e - ensemble name (specified by -ens option)
Ensembles
Grads v2 now supports
ensembles. Ensemble files come in two flavors. All the ensemble
members are within one file or each ensemble member is in its own
file. For the first case, g2ctl should handle it
it correctly. For the second case, you have to specify
the ensemble names and use the template option.
g2ctl -ens "e1,e2,e3" %e.2008010100.%f2 >ens.ctl
gribmap -i ens.ctl
Note that the first ensemble member specified sets the time range.
Requirements
The current versions of wgrib2
GrADS v2.0+, perl
and the
g2ctl script
Problems
- make sure you have grib-2 files (test with wgrib2)
- make sure wgrib2 is current and on your path
- make sure gribmap is version 2
- make sure GrADS is version 2
- only some grids are supported
To Do
Gaussian thinned grids (GrADS problem, I think)
Statistical processing support is preliminary
Comments: Wesley.Ebisuzaki@noaa.gov
|