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

wgrib2: -persistent

Introduction

When wgrib2 opens a file, the file may be marked as persistent or transient. If a file is marked as transient, wgrib2 will close the file as part of its normal "finalize" procedure. If a file is marked as persistent, the file will closed when the system terminates the program. If you run the wgrib2 utility, it makes no difference who closes the files. However, when you use the C/Fortran API, it makes a major difference. When you write C/Fortran programs that calls the wgrib2 API, you may want to use the same file thousands of times. It is better to open the file once rather than thousands of times. The -persistent option marks an already open file as persistent. The -transient option marks an already open file as transient. When opening a file, the default is to mark the file as persistent.

Usage

-persistent FILE
  FILE must be already opened
See also: -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: March 15, 2016
Disclaimer Privacy Policy