NCEPLIBS-w3emc 2.12.0
|
Finds a grib message. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | getgbmp (lugb, lugi, jg, j, jpds, jgds, mbuf, cbuf, nlen, nnum, mnum, kg, k, kpds, kgds, g, iret) |
Read a grib index file (or optionally the grib file itself) to get the index buffer (i.e. | |
subroutine getgbmp | ( | lugb, | |
lugi, | |||
jg, | |||
j, | |||
integer, dimension(200) | jpds, | ||
integer, dimension(200) | jgds, | ||
mbuf, | |||
character, dimension(mbuf) | cbuf, | ||
nlen, | |||
nnum, | |||
mnum, | |||
kg, | |||
k, | |||
integer, dimension(200) | kpds, | ||
integer, dimension(200) | kgds, | ||
character, dimension(jg) | g, | ||
iret | |||
) |
Read a grib index file (or optionally the grib file itself) to get the index buffer (i.e.
table of contents) for the grib file. Find in the index buffer 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. Its message number is returned along with the unpacked pds and gds parameters and the packed grib message. If the grib message is not found, then the return code will be nonzero.
Program history log:
[in] | lugb | integer unit of the unblocked grib data file. |
[in] | lugi | integer unit of the unblocked grib index file (=0 to get index buffer from the grib file). |
[in] | jg | integer maximum number of bytes in the grib message. |
[in] | j | integer number of messages to skip (=0 to search from beginning) (<0 to read index buffer and skip -1-j messages). |
[in] | jpds | integer (200) pds parameters for which to search (=-1 for wildcard).
|
[in] | jgds | integer (200) gds parameters for which to search (only searched if jpds(3)=255) (=-1 for wildcard).
|
[in] | mbuf | integer length of index buffer in bytes. |
[in,out] | cbuf | character*1 (mbuf) index buffer (initialize by setting j=-1). |
[in,out] | nlen | integer length of each index record in bytes (initialize by setting j=-1). |
[in,out] | nnum | integer number of index records (initialize by setting j=-1). |
[in,out] | mnum | integer number of index records skipped (initialize by setting j=-1). |
[out] | kg | integer number of bytes in the grib message. |
[out] | k | integer message number unpacked (can be same as j in calling programin order to facilitate multiple searches). |
[out] | kpds | integer (200) unpacked pds parameters. |
[out] | kgds | integer (200) unpacked gds parameters. |
[out] | g | character*1 (kg) grib message. |
[out] | iret | integer return code.
|