g2gdf - Makes Grib-2 Descriptor Files for GrADS v1.9 |
g2gdf - Makes Grib-2 Descriptor Files for GrADS v1.9
g2gdf.pl [-h] [-0|-verf] [-o gdf_fname] [-I inv_fname] grib2_filename # -h for a full man page
Uses g2ctl.pl
and wgrib2
to create a ctl-like file for the OpenGrADS
v1.9 extension g2
. This extension allows the reading of Grib-2 datasets
in GrADS v1.9.0-rc1 and later.
From a Grib-2 file specified on the command line this script generates 2 auxiliary text files:
This is a modified version of the control (.ctl) file generated by
g2ctl. The DSET
record is altered and the OPTIONS
record is set
to template
so that any attemmpt to access any variable in this
dataset returns all UNDEFs. In addition, global attributes dset
and
inventory
are set with the real Grib-2 and inventory file names.
The GrADS user defined extensions g2open
and g2
parses this file
and interfaces to the data file through the wgrib2
utility.
This is a modified version of the regular inventory produced by
wgrib2
. Here we modify the variable names to match those generated
by g2ctl
. For example, pressure-level HGT
is renamed to HGTprs
.
Notice that utility gribmap
is not used by the g2
extension. Therefore, there is no need to create the usual gribmap
index (.idx
) file.
On input, one can specify a single Grib-2 file name or a regular GrADS template, e.g.,
% g2gdf.pl model.25.f%f3.grb2
which produces the following output:
Descriptor: model.25.ffff.grb2.gdf Inventory: model.25.ffff.grb2.inv Data Dir: ./ Grib files: model.25.f000.grb2 model.25.f024.grb2 model.25.f048.grb2 model.25.f072.grb2
use analysis time (same as in g2ctl).
specify the name of the g2ctl utility; default is g2ctl.exe on Cygwin, g2ctl.pl elsewhere.
prints this message
output inventory file name; default is derived from grib2 filename with extension ``.inv''.
output gdf file name; default is derived from grib2 filename with extension ``.gdf''.
uses verification time (same as in g2ctl)
specify the name of the wgrib2 utility; default is wgrib2
http://opengrads.org/ - OpenGrADS Home Page
http://www.iges.org/grads/ - Official GrADS Home Page
http://opengrads.org/doc/udxt/grib2/grib2.html - The Grib-2 extension for GrADS v1.9.
http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/ - Wes
Ebisuzaki's (and many co-authors) excellent wgrib2
utility
http://www.cpc.ncep.noaa.gov/products/wesley/g2ctl.html - Wes
Ebisuzaki's (and many co-authors) excellent g2ctl
utility for
creating GrADS descriptor files for Grib-2 files.
Arlindo da Silva <dasilva@opengrads.org>
Copyright (c) 2006-2008 Arlindo da Silva. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
g2gdf - Makes Grib-2 Descriptor Files for GrADS v1.9 |