Read a grib index file and return its index contents.
More...
Go to the source code of this file.
|
subroutine | getgir (lugb, msk1, msk2, mnum, mbuf, cbuf, nlen, nnum, iret) |
| Read a grib file and return its index contents.
|
|
Read a grib index file and return its index contents.
- Author
- Mark Iredell
- Date
- 1995-10-31
Definition in file getgir.f.
◆ getgir()
subroutine getgir |
( |
|
lugb, |
|
|
|
msk1, |
|
|
|
msk2, |
|
|
|
mnum, |
|
|
|
mbuf, |
|
|
character, dimension(mbuf) |
cbuf, |
|
|
|
nlen, |
|
|
|
nnum, |
|
|
|
iret |
|
) |
| |
Read a grib file and return its index contents.
The index buffer returned contains index records with the internal format:
- byte 001-004: bytes to skip in data file before grib message.
- byte 005-008: bytes to skip in message before pds.
- byte 009-012: bytes to skip in message before gds (0 if no gds).
- byte 013-016: bytes to skip in message before bms (0 if no bms).
- byte 017-020: bytes to skip in message before bds.
- byte 021-024: bytes total in the message.
- byte 025-025: grib version number.
- byte 026-053: product definition section (pds).
- byte 054-095: grid definition section (gds) (or nulls).
- byte 096-101: first part of the bit map section (bms) (or nulls).
- byte 102-112: first part of the binary data section (bds).
- byte 113-172: (optional) bytes 41-100 of the pds.
- byte 173-184: (optional) bytes 29-40 of the pds.
- byte 185-320: (optional) bytes 43-178 of the gds.
Program history log:
- Mark Iredell 1995-10-31
- Mark Iredell 1996-10-31 Augmented optional definitions to byte 320.
- Parameters
-
[in] | lugb | integer unit of the unblocked grib file. |
[in] | msk1 | integer number of bytes to search for first message. |
[in] | msk2 | integer number of bytes to search for other messages. |
[in] | mnum | integer number of index records to skip (usually 0). |
[in] | mbuf | integer length of cbuf in bytes. |
[out] | cbuf | character*1 (mbuf) buffer to receive index data. |
[out] | nlen | integer length of each index record in bytes. |
[out] | nnum | integer number of index records (=0 if no grib messages are found). |
[out] | iret | integer return code.
- 0: all ok.
- 1: cbuf too small to hold index data.
|
- Note
- Subprogram can be called from a multiprocessing environment. Do not engage the same logical unit from more than one processor.
- Author
- Mark Iredell
- Date
- 1995-10-31
Definition at line 44 of file getgir.f.