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

wgrib2: -rewind_proc CW2

Introduction

The wgrib2 library can either close or not close the files after calls to the wgrib2 subroutine. Closing the file frees up resources and helps prevent you from getting the "Too Many Files Open" error message. However, reopening files is a slow operation and you usually keep the files open if you plan to read/write to the file again.

If you are reading from a previously opened and not-closed file, you will normally continue reading from where the last call to the wgrib2 subroutine stopped. Sometimes this the preferred behavior. Sometimes, you want the library to start reading the file from the beginning.

The -rewind_proc option rewinds an already open file during the processing phase.

Usage

-rewind_proc FILE
  FILE must be already opened
  This command is only useful in callable wgrib2
See also: -persistent -rewind_final -rewind_init -transient

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: Sep 9, 2016
Disclaimer Privacy Policy