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

Find and unpacks a grib message. More...

Go to the source code of this file.

Functions/Subroutines

subroutine getgb1 (lugb, lugi, jf, j, jpds, jgds, grib, kf, k, kpds, kgds, lb, f, iret)
 Find and unpack a grib message.
 

Detailed Description

Find and unpacks a grib message.

Author
Mark Iredell
Date
1994-04-01

Definition in file getgb1.f.

Function/Subroutine Documentation

◆ getgb1()

subroutine getgb1 (   lugb,
  lugi,
  jf,
  j,
integer, dimension(25)  jpds,
integer, dimension(*)  jgds,
character*1, dimension(*)  grib,
  kf,
  k,
integer, dimension(25)  kpds,
integer, dimension(*)  kgds,
logical, dimension(*)  lb,
real, dimension(*)  f,
  iret 
)

Find and unpack a grib message.

Read an associated grib index file (unless it already was read). Find in the index file a reference to the grib message requested. The grib message request specifies the number of messages to skip and the unpacked pds and gds parameters. (A requested parameter of -1 means to allow any value of this parameter to be found.) If the requested grib message is found, then it is read from the grib file and unpacked. Its message number is returned along with the unpacked pds and gds parameters, the unpacked bitmap (if any), and the unpacked data. If the grib message is not found, then the return code will be nonzero.

Program history log:

  • Mark Iredell 1994-04-01
  • Ralph Jones 1995-05-10 Add one more parameter to getgb and change name to getgb1.
Parameters
[in]lugblogical unit of the unblocked grib data file.
[in]lugilogical unit of the unblocked grib index file.
[in]jfinteger maximum number of data points to unpack.
[in]jinteger number of messages to skip (=0 to search from beginning) (<0 to reopen index file and search from beginning).
[in]jpdsinteger (25) pds parameters for which to search (=-1 for wildcard) look in doc block of w3fi63 for array kpds for list of order of unpacked pds values. In most cases you only need to set 4 or 5 values to pick up record.
[in]jgdsinteger (22) gds parameters for which to search (only searched if jpds(3)=255) (=-1 for wildcard).
[out]gribGrib data array before it is unpacked.
[out]kfInteger number of data points unpacked.
[out]kInteger message number unpacked (can be same as j in calling program in order to facilitate multiple searches).
[out]kpdsInteger (25) unpacked pds parameters.
[out]kgdsInteger (22) unpacked gds parameters.
[out]lbLogical (kf) unpacked bitmap if present.
[out]fReal (kf) unpacked data.
[out]iretInteger return code.
  • 0 All ok.
  • 96 Error reading index file.
  • 97 Error reading grib file.
  • 98 Number of data points greater than jf.
  • 99 Request not found.
  • other w3fi63 grib unpacker return code.
Author
Mark Iredell
Date
1994-04-01

Definition at line 51 of file getgb1.f.