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

wgrib2: -for

Introduction

The -for option selects the range of record numbers upon which to operate using the "for" syntax. If you want to operate on records 10 to 20, you would use the parameter 10:20. If you want to operate on all the even records from 10 to 20, you would use 10:20:2. The restrictions are the start value must be less than the ending value and the step has to be greater than zero.

The -for option ignores the submessage number when selecting the fields.

Usage

-for I:J:K        same as for n = I to J by K
-for I:J          same as for n = I to J by 1
-for I::K         same as for n = I to MAX_INTEGER by K
-for I            same as for n = I to MAX_INTEGER by 1

Example

 $ wgrib2 file.grb2  -for 4:5
4:13335:d=2008120200:RH:750 mb:anl:
5:17098:d=2008120200:TMP:2743 m above mean sea level:anl:
See also: -if_rec -match -for_n

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