NCEPLIBS-g2  3.4.5
skgb.f File Reference

This subroutine generates an index record for each field in a grib2 message. More...

Go to the source code of this file.

Functions/Subroutines

subroutine skgb (LUGB, ISEEK, MSEEK, LSKIP, LGRIB)
 This subroutine searches a file for the next grib 1 message. More...
 

Detailed Description

This subroutine generates an index record for each field in a grib2 message.

Author
Mark Iredell
Date
1995-10-31

Definition in file skgb.f.

Function/Subroutine Documentation

◆ skgb()

subroutine skgb (   LUGB,
  ISEEK,
  MSEEK,
  LSKIP,
  LGRIB 
)

This subroutine searches a file for the next grib 1 message.

A grib 1 message is identified by its indicator section, i.e. an 8-byte sequence with 'grib' in bytes 1-4 and 1 in byte 8. If found, the length of the message is decoded from bytes 5-7. The search is done over a given section of the file. The search is terminated if an eof or i/o error is encountered. PROGRAM HISTORY LOG:

  • 1993-11-22 Mark Iredell
  • 1995-10-31 Mark Iredell add call to baread.
  • 1997-03-14 Mark Iredell check for '7777'.
  • 2001-12-05 Stephen Gilbert modified to also look for grib2 messages.
  • 2009-12-14 Boi Vuong modified to increase length of seek (512).
Parameters
[in]LUGBinteger unit of the unblocked grib file.
[in]ISEEKinteger number of bytes to skip before search.
[in]MSEEKinteger maximum number of bytes to search.
[out]LSKIPinteger number of bytes to skip before message.
[out]LGRIBinteger number of bytes in message (0 if not found)
Author
Mark Iredell
Date
1995-10-31

Definition at line 33 of file skgb.f.