NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
skgb.f File Reference

Search for next grib message. More...

Go to the source code of this file.

Functions/Subroutines

subroutine skgb (lugb, iseek, mseek, lskip, lgrib)
 This subprogram searches a file for the next grib 1 message.
 

Detailed Description

Search for next grib message.

Author
Mark Iredell
Date
1993-11-22

Definition in file skgb.f.

Function/Subroutine Documentation

◆ skgb()

subroutine skgb (   lugb,
  iseek,
  mseek,
  lskip,
  lgrib 
)

This subprogram 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:

  • Mark Iredell 1993-11-22
  • Mark Iredell 1995-10-31 Add call to baread.
  • Mark Iredell 1997-03-14 Check for '7777'.
  • Stephen Gilbert 2001-12-05 Modified to also look for grib2 messages.
Parameters
[in]LUGBInteger logical unit of input 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
1993-11-22

Definition at line 26 of file skgb.f.