Skip Navigation Links 
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-small_grib

wgrib2: -small_grib


The -small_grib option writes the grid values to a grib2 file with the same grid spacing but a smaller domain. The grid point locations are unchanged. This option is used to make a regional subset and only works for certain grids such as the lat-lon, rotated lat-lon, Mercator and Lambert conformal.


-small_grib LonW:LonE LatS:LatN file_name
For west longitudes and south latitudes, you can use negative values. The file_name is the output file. LonE must have a numerical value greater than LonW. For example for left boundary=20W and the right boundary=60E, you can use LonE=340 and LonW=420. You can also use LonE=-20 and LonW=60.


$ wgrib2 fcst.grb2 -small_grib 10:20 -20:20 small.grb
1:0:d=2007032600:HGT:1000 mb:anl:

$ wgrib2 small.grb -grid
        lat-lon grid:(21 x 81) units 1e-06 input WE:SN output WE:SN res 48
        lat -20.000000 to 20.000000 by 0.500000
        lon 10.000000 to 20.000000 by 0.500000 #points=1701
The first line writes a small grib file from 10E-20E and 20S-20N. Often you want to preserve the grib compression. In this case, you would add the option -set_grib_type same to the wgrib2 command line.

See also: -undefine, -ijsmall_grib -set_grib_type

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: Feb 16, 2016
Disclaimer Privacy Policy