Skip Navigation Links 
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 -inv_f77

wgrib2: -inv_f77


The -inv_f77 option writes the match inventory (see the -match_inv option) to a file that is readable by a fortran unformatted I/O statement. The format is more or less standand and consistes of a 4-byte integer of number of bytes in the character string, the character string and 4-byte integer with the length of the character string as a trailer. If the match inventory is shorter than the character string, it is padded with blanks. If the match inventory is longer, it simply truncated. Not all fortran compilers support this format.


   OPTION = "ieee" or "bin"
      bin = native format
      ieee = 4-byte big_endian header/trailer (default)
             4-byte little_endian header/trailer (by option)
   CLEN = integer, the length of the character string
   FILE = output file


  wgrib2 IN.grb -inv_f77 bin 100  inv.dat

  character*100  m_inv
  read(11) m_inv
  write(*,*) 'first record:',trim(m_inv)
  read(11) m_inv
  write(*,*) 'second record:',trim(m_inv)

The -inv_f77 option was added to facilitate the writing of fortran codes that can read wgrib2 output. See also: -match_inv

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