Skip Navigation Links www.nws.noaa.gov 
NOAA logo - Click to go to the NOAA home page National Weather Service   NWS logo - Click to go to the NWS home page
Climate Prediction Center
 
 

 
About Us
   Our Mission
   Who We Are

Contact Us
   CPC Information
   CPC Web Team

 
HOME > Monitoring_and_Data > Oceanic and Atmospheric Data > Reanalysis: Atmospheric Data > WGRIB
 

wgrib

WGRIB is a program to manipulate, inventory and decode GRIB files. The program is known to work on machines ranging from 486s to Cray supercomputers. (One fellow even ported it to a 286!) The program is Y2K friendly (NCO Y2K testing procedure).

wgrib (gributil) is an operational NCEP program. On the IBM/SP, it can be found at /nwprod/util/exec/wgrib,

Highlights for v1.8.x:

  • Support for simple-packed spectral data (Luis Kornblueh). Note: you still need spectral -> grid routines.
  • Cleanup of triangular grid support (Luis Kornblueh)
  • New and improved tables
  • More grid information, including scanning mode
  • fixed bug in grid vs earth relative north (-v option only)

Highlights for v1.7.x:

  • scans entire file for grib messages (D. Haalman)
  • Added German Weather Service (DWD) tables 201, 202, 203 and 2
    Support for triangular grid (Helmut P. Frank)
  • fractional mb (NCEP local extension)
  • added new levels
  • updated NCEP operational GRIB table
  • fixed thinned grids with bitmap
  • NCEP ensemble support
  • fixed -H option
  • Support for the 3/6/12 hour forecast time units
  • Fixed a bug with bitmap when the precision is greater than 24 bits. This is more of a theoretical problem as most people (NCEP and ECMWF) limit the precision to 16 bits and I can't imagine anyone using more than 24 bit of precision for any meteorological data. Thanks LB for finding the bug.
  • Source code in a tar file. For people who want to read the source code before it is combined into wgrib.c.
  • more time codes like SECONDS
  • New or updated ECMWF grib tables: 128 129 130 131 140 150 160 170 180

Highlights for v1.6.x:

  • fixed a problem with identifying 1997 Reanalysis files.
  • fixed a problem with the GDS header in the -H option
  • optional binary output of PDS and GDS (-H option)
  • -d all (decode entire file)
  • thinned grid support
  • fix of my mis-interpretation on how year 2000 is stored in GRIB
  • NCEP operational table
  • updated documentation

Under testing:

Note: there were two definitions for SNOC and CWAT in the operational and Reanalysis grib tables. For the time being, I'm calling snow cover "SNOWC" and canopy water "CNWAT."

To do:

  • ECMWF ensemble information

Documentation:

Source code:

  • C source code Netscape: shift+left_mouse_button, (If your browser alters the code, use anonymous ftp to download /pub/wgrib/wgrib.c)
  • ftp://ftp.cpc.ncep.noaa.gov/wd51we/wgrib (FTP access: documentation, test files, etc.)
  • wgrib.tar See above for source code. (For people who want to read or re-use the source code.)

Compiled versions:

Windows: find vs. grep and egrep

You should use grep or egrep instead of the MS-DOS "find" command.
The (e)grep command is more flexible and it is consistent with the
documentation. Public domain versions exist for ms-dos, windows and
Win32 machines. Personally I would look for a grep based on GNU source
code. In your favorite internet search engine look for "+grep +gnu +windows".

2 GB limit, 32 vs 64 bit computers:

Wgrib is limited to 2 GB files when used on 32-bit machines such as a pentium-4. (2 GB is the maximum value of a 32-bit integer.) On 64-bit machines, the 2 gig limit is replaced by a really big number.

Future attractions:

  • gribw grib decode/encode library (beta testing)
  • ECMWF ensemble meta data

Links:

back

comments: Wesley.Ebisuzaki@noaa.gov


NOAA/ National Weather Service
National Centers for Environmental Prediction
Climate Prediction Center
5200 Auth Road
Camp Springs, Maryland 20746
Climate Prediction Center Web Team
Page last modified: May 15, 2005
Disclaimer Privacy Policy