|
NCEPLIBS-g2
3.4.8
|
Generate an index record for each field in a GRIB2 message. More...
Go to the source code of this file.
Functions/Subroutines | |
| subroutine | ixgb2 (LUGB, LSKIP, LGRIB, CBUF, NUMFLD, MLEN, IRET) |
| Generate an index record for each field in a GRIB2 message. More... | |
Generate an index record for each field in a GRIB2 message.
Definition in file ixgb2.F90.
| subroutine ixgb2 | ( | integer | LUGB, |
| integer | LSKIP, | ||
| integer | LGRIB, | ||
| character(len = 1), dimension(:), pointer | CBUF, | ||
| integer | NUMFLD, | ||
| integer | MLEN, | ||
| integer | IRET | ||
| ) |
Generate an index record for each field in a GRIB2 message.
The index records are written to index buffer pointed to by cbuf. All integers in the index are in big-endian format.
This subroutine is called by getg2ir(), which packages the index records into an index file.
The index buffer returned contains index records with the format:
| [in] | lugb | Unit of the unblocked GRIB file. Must be opened by baopen() or baopenr(). |
| [in] | lskip | Number of bytes to skip before GRIB message. |
| [in] | lgrib | Number of bytes in GRIB message. When subroutine is called, this must be set to the size of the cbuf buffer. |
| [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] | numfld | Number of index records created. |
| [out] | mlen | Total length of all index records. |
| [out] | iret | Return code
|
Definition at line 55 of file ixgb2.F90.
References g2_gbytec(), and g2_sbytec().
Referenced by getg2ir().