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

wgrib2: -text

Introduction

The -text option writes the grid values to a specified file as a text (ascii) file. The default format (-header) is (per decoded grib message)

   NX NY
   val-1
   val-2
   ...
   val-(NX*NY)
Where NX and NY are the dimension of the grid and val-N is the Nth grid point in WE:SN order. When the -no_header option is used, the format is
   val-1
   val-2
   ...
   val-(NX*NY)
The default order of the data is WE:SN which differs from wgrib's order which is equivalent to the "-order raw" in wgrib2. Another difference is that wgrib's -text option requires a filename. The undefined value is 9.999e20. The format of the output is unchanged from wgrib except the order, number of columns and precision can be altered by the user.

Usage

-text file_name
      "-" sends the data to the terminal/stdout

Example

$ wgrib2 test.grb2 -s | grep ":RH:2 m" | wgrib2 -i test.grb2 -text data.txt
285:36796469:d=2005090200:RH:2 m above ground:60 hour fcst
The above line extracts the 2 meter RH from file test.grb2 and writes it in data.txt

See also: -netcdf, -spread, -bin, -ieee


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