|
NCEPLIBS-g2
3.4.7
|
Generate an index record for a message in a GRIB2 file. More...
Go to the source code of this file.
Functions/Subroutines | |
| subroutine | getg2ir (LUGB, MSK1, MSK2, MNUM, CBUF, NLEN, NNUM, NMESS, IRET) |
| Generate an index record for a message in a GRIB2 file. More... | |
Generate an index record for a message in a GRIB2 file.
Definition in file getg2ir.F90.
| subroutine getg2ir | ( | integer, intent(in) | LUGB, |
| integer, intent(in) | MSK1, | ||
| integer, intent(in) | MSK2, | ||
| integer, intent(in) | MNUM, | ||
| character(len = 1), dimension(:), pointer | CBUF, | ||
| integer, intent(out) | NLEN, | ||
| integer, intent(out) | NNUM, | ||
| integer, intent(out) | NMESS, | ||
| integer, intent(out) | IRET | ||
| ) |
Generate an index record for a message in a GRIB2 file.
The index record contains byte offsets to the message, it's length, and byte offsets within the message to each section. The index file record format is documented in subroutine ixgb2().
| [in] | lugb | Unit of the unblocked GRIB file. Must be opened by baopen() or baopenr(). |
| [in] | msk1 | Number of bytes to search for first message. |
| [in] | msk2 | Number of bytes to search for other messages. |
| [in] | mnum | Number of GRIB messages to skip (usually 0). |
| [out] | cbuf | Pointer to a buffer that will get the index records. If any memory is associated with cbuf when this subroutine is called, cbuf will be nullified in the subroutine. Initially cbuf will get an allocation of 5000 bytes. realloc() will be used to increase the size if necessary. Users must free memory that cbuf points to when cbuf is no longer needed. |
| [out] | nlen | Total length of index record buffer in bytes. |
| [out] | nnum | Number of index records, zero if no GRIB messages are found. |
| [out] | nmess | Last GRIB message in file successfully processed |
| [out] | iret | Return code.
|
Definition at line 37 of file getg2ir.F90.