WARNING: alpha code - testing version - comments wanted
grb2grid
Grb2grid takes (NCEP) GRIB-1 files and makes ascii grid files for GIS.
The program grb2grid.pl should not be confused with the the
GRIB2GRID
package found in the ERSI Support Center.
Grb2grid.pl was born because a River Forecast Center (RFC) user wanted to
use some NARR (North America Regional Reanalysis) data. That's good news
because they were a target user of NARR. However the user lacked
experience with GRIB files and really wanted the data in a GIS format.
Real bad news when people who could benefit from NARR can't read the files.
So either half your potential users will have to learn to read grib or a
conversion utility would have to be written.
Warning: I don't have access to a GIS and I had to bother a coworker down the hall
to test out the program. Don't expect answers to any GIS question. Odds
are in your favor that you know more about GIS that I (WNE) do.
Warning: This program may never be formally released. The grib2grid.gs-type of
program is attractive and perhaps this program uses a better approach.
Requirements
- grb2grid.pl
- copygb on your path
- wgrib on your path
- Perl
- linux (i86)
Linux is listed as a requirement because copygb is distributed as a linux
only program. Sure copygb will run on other platforms but porting large
fortran packages by non-fortran users was ruled "cruel and unusual
punishment" in a recent Supreme Court (US) ruling and may violate
Article Five of the Universal Declaration of Human Rights (rest of the world).
How the program works
On the command line, you invoke the program with the name of the input grib file
and the parameters for a "raster file" (lat-lon grid). The script then runs
copygb to create a new grib file for the specified lat-lon grid. The program then
runs wgrib to write the grid point values to the ascii grid file.
Usage
From the command prompt, type
$ grb2grid.pl
You should see a help page with a list of the required parameters.
Support
- Want to port code to another machine? See requirements.
- Want to run under windows? See requirements.
- GIS question? Not here.
Sounds harsh but porting code is time comsuming and requires some
one who knows the local machine and is experienced (someone once asked me
about the various compiler options for a machine that I've never seen) and I'm
a GIS novice (I saw my coworker read in a grid file, and make a pretty plot).
GRIB-2
The GRIB-2 format is going to replace GRIB-1. So what happens to the GIS users?
Good news is that the guts of the program (copygb, wgrib) have GRIB-2 counterparts.
So writing a grib-2 version shouldn't be that difficult.
Comparison of grb2grid and GRIB2GRID
The GRIB2GRID package
is a AML and GrADS script. The guts of the conversion is done by GrADS. The input
file has to be readable by GrADS and must use an xdef and ydef which are linear.
The program is not restricted to GRIB which is nice. As the comments suggest "many improvements
possible".
Grb2grid only works with grib files but will accept grids that are not supported by grib2grid
such as Mercator, Gaussian and some model grids. In addition, grb2grid will make subregions
at the user-specified resolution. The script will convert an entire grib file but requires
copygb which is only supported in linux.
Comments: Wesley.Ebisuzaki@noaa.gov, updated 5/1/2006
|