NCEPLIBS-w3emc 2.12.0
|
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. | |
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:
[in] | lugb | logical unit of the unblocked grib data file. |
[in] | lugi | logical unit of the unblocked grib index file. |
[in] | jf | integer maximum number of data points to unpack. |
[in] | j | integer number of messages to skip (=0 to search from beginning) (<0 to reopen index file and search from beginning). |
[in] | jpds | integer (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] | jgds | integer (22) gds parameters for which to search (only searched if jpds(3)=255) (=-1 for wildcard). |
[out] | grib | Grib data array before it is unpacked. |
[out] | kf | Integer number of data points unpacked. |
[out] | k | Integer message number unpacked (can be same as j in calling program in order to facilitate multiple searches). |
[out] | kpds | Integer (25) unpacked pds parameters. |
[out] | kgds | Integer (22) unpacked gds parameters. |
[out] | lb | Logical (kf) unpacked bitmap if present. |
[out] | f | Real (kf) unpacked data. |
[out] | iret | Integer return code.
|