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

wgrib2: -last

Introduction

The -last FILE option writes the results of last inventory option to FILE. The FILE can be a disk file, temporary file or memory file. If the -last option preceeds any inventory options, then the "grib message number[.submessage number:byte location" will be written to the file.

The -last option was designed for callable wgrib2 to obtain inventory information. Note the -s_out FILE option should be replaced by the more powerful -s -last FILE syntax.

Usage

-last FILE

Example

This example writes the values of 0E, 10 N to the file 'txt'.

$ wgrib2 gep19.t00z.pgrb2af180 -s -last txt -lon 0 10 -last txt -nl_out txt
1:0:d=2009060500:HGT:200 mb:180 hour fcst:ENS=+19:lon=0.000000,lat=10.000000,val=12439.8
2:46042:d=2009060500:TMP:200 mb:180 hour fcst:ENS=+19:lon=0.000000,lat=10.000000,val=219.5
...
$ cat txt
d=2009060500:HGT:200 mb:180 hour fcst:ENS=+19lon=0.000000,lat=10.000000,val=12439.8
d=2009060500:TMP:200 mb:180 hour fcst:ENS=+19lon=0.000000,lat=10.000000,val=219.5
...

writing two files

$ wgrib2 gep19.t00z.pgrb2af180 -s -last txt1 -lon 0 10 -last txt -nl_out txt1 \
    -s -last txt2 -lon 40 10 -last txt2 -nl_out txt2
See also: -last0

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: July 1, 2015, March 5, 2018
Disclaimer Privacy Policy