g2gdf - Makes Grib-2 Descriptor Files for GrADS v1.9

- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- SEE ALSO
- AUTHOR
- COPYRIGHT

# NAME

g2gdf - Makes Grib-2 Descriptor Files for GrADS v1.9

# SYNOPSIS

     g2gdf.pl [-h] [-0|-verf] [-o gdf_fname] [-I inv_fname]  grib2_filename   # -h for a full man page

# DESCRIPTION

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:

Grib-2 Descriptor File (.gdf)

  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.

Inventory File (.inv)

  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

# OPTIONS

-0

  use analysis time (same as in g2ctl).

-g FILENAME

  specify the name of the g2ctl utility; default is g2ctl.exe on Cygwin, g2ctl.pl elsewhere.

-h

  prints this message

-I FILENAME

  output inventory file name; default is derived from grib2 filename with extension ``.inv''.

-o FILENAME

  output gdf file name; default is derived from grib2 filename with extension ``.gdf''.

-verf

  uses verification time (same as in g2ctl)

-w FILENAME

  specify the name of the wgrib2 utility; default is wgrib2

# SEE ALSO

- 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.

# AUTHOR

Arlindo da Silva <dasilva@opengrads.org>

# COPYRIGHT

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