|
NCEPLIBS-g2
3.4.8
|
Find the number of Local Use Sections and gridded fields in a GRIB2 message, and the maximum sizes of template arrays. More...
Go to the source code of this file.
Functions/Subroutines | |
| subroutine | gribinfo (cgrib, lcgrib, listsec0, listsec1, numlocal, numfields, maxvals, ierr) |
| Find the number of Local Use Sections and gridded fields in a GRIB2 message, and the maximum sizes of template arrays. More... | |
Find the number of Local Use Sections and gridded fields in a GRIB2 message, and the maximum sizes of template arrays.
Definition in file gribinfo.F90.
| subroutine gribinfo | ( | character(len = 1), dimension(lcgrib), intent(in) | cgrib, |
| integer, intent(in) | lcgrib, | ||
| integer, dimension(3), intent(out) | listsec0, | ||
| integer, dimension(13), intent(out) | listsec1, | ||
| integer, intent(out) | numlocal, | ||
| integer, intent(out) | numfields, | ||
| integer, dimension(7), intent(out) | maxvals, | ||
| integer, intent(out) | ierr | ||
| ) |
Find the number of Local Use Sections and gridded fields in a GRIB2 message, and the maximum sizes of template arrays.
This subroutine also performs various checks to see if the message is a valid GRIB2 message. Also, a list of safe array dimensions is returned for use in allocating return arrays from routines getlocal(), gettemplates(), and getfields().
Array maxvals contains the maximum possible number of values that will be returned in argument arrays for routines getlocal(), gettemplates() and getfields(). Users can use this info to determine if their arrays are dimensioned large enough for the data that may be returned from the above routines, or to dynamically allocate arrays with a reasonable size.
This function is similar to gb_info(), but returns more information.
| [in] | cgrib | Character that contains the GRIB2 message. |
| [in] | lcgrib | Length (in bytes) of array cgrib. |
| [out] | listsec0 | Contains information needed for GRIB Indicator Section 0. Must be dimensioned >= 2.
|
| [out] | listsec1 | Contains information needed for GRIB Identification Section 1. Must be dimensioned >= 13.
|
| [out] | numlocal | The number of Local Use Sections (Section 2) found in the GRIB message. |
| [out] | numfields | The number of gridded fieldse found in the GRIB message. |
| [out] | maxvals | The maximum number of elements that could be returned in various arrays from this GRIB2 message.
|
| [out] | ierr | Error return code.
|
Definition at line 78 of file gribinfo.F90.
References g2_gbytec().