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 > wgrib2-grib
 

wgrib2: -grib

Introduction

The -grib option writes the data in GRIB-2 format. This option only writes the current field (record/submessage) if the GRIB message contains multiple fields (records/submessages). If you want to copy the entire GRIB-2 message, use the -GRIB option.

-grib vs. -grib_out

These two options do similar things, they write a grib message to a specified file. The -grib writes the grib message and -grib_out option takes the decoded grib message, converts it back into grib2 and then writes it out. Obviously the latter option is much slower. You only use -grib_out when you have modified the data (grid) values. For example, you may have set many of the points to undefined in order to the data volume. Since the data values have changed, you have to use the -grib_out in order to create the smaller grib file.

Usage

-grib file_name

Example

$ wgrib2 test.grb2 -s | grep ":RH:2 m" | wgrib2 -i test.grb2 -grib rh.grb
285:36796469:d=2005090200:RH:2 m above ground:60 hour fcst
The above line writes the 2 m RH from file test.grb2 into rh.grb (grib-2 format).

See also: -GRIB, -grib_out -append


NOAA/ National Weather Service
National Centers for Environmental Prediction
Climate Prediction Center
5830 University Research Court
College Park, Maryland 20740
Climate Prediction Center Web Team
Page last modified: May 15, 2005
Disclaimer Privacy Policy