|
NCEPLIBS-g2
3.4.7
|
This subroutine returns the Grid Definition, and Product Definition for a given data field. More...
Go to the source code of this file.
Functions/Subroutines | |
| subroutine | gettemplates (cgrib, lcgrib, ifldnum, igds, igdstmpl, igdslen, ideflist, idefnum, ipdsnum, ipdstmpl, ipdslen, coordlist, numcoord, ierr) |
| This subroutine returns the Grid Definition, and Product Definition for a given data field. More... | |
This subroutine returns the Grid Definition, and Product Definition for a given data field.
Definition in file gettemplates.F90.
| subroutine gettemplates | ( | character(len = 1), dimension(lcgrib), intent(in) | cgrib, |
| integer, intent(in) | lcgrib, | ||
| integer, intent(in) | ifldnum, | ||
| integer, dimension(*), intent(out) | igds, | ||
| integer, dimension(*), intent(out) | igdstmpl, | ||
| integer | igdslen, | ||
| integer, dimension(*), intent(out) | ideflist, | ||
| integer, intent(out) | idefnum, | ||
| integer, intent(out) | ipdsnum, | ||
| integer, dimension(*), intent(out) | ipdstmpl, | ||
| integer | ipdslen, | ||
| real, dimension(*), intent(out) | coordlist, | ||
| integer, intent(out) | numcoord, | ||
| integer, intent(out) | ierr | ||
| ) |
This subroutine returns the Grid Definition, and Product Definition for a given data field.
Since there can be multiple data fields packed into a GRIB2 message, the calling routine indicates which field is being requested with the ifldnum argument.
| [in] | cgrib | Character array that contains the GRIB2 message |
| [in] | lcgrib | Length (in bytes) of GRIB message array cgrib. |
| [in] | ifldnum | Specifies which field in the GRIB2 message to return. |
| [out] | igds | Contains information read from the appropriate GRIB Grid Definition Section 3 for the field being returned. Must be dimensioned >= 5.
|
| [out] | igdstmpl | Contains the data values for the specified Grid Definition Template (NN=igds(5)). Each element of this integer array contains an entry (in the order specified) of Grid Defintion Template 3.NN. |
| [out] | igdslen | Number of elements in igdstmpl. i.e. number of entries in Data Representation Template 5.N (N=idrsnum). |
| [out] | ideflist | (Used if igds(3) .ne. 0) This array contains the number of grid points contained in each row (or column). (part of Section 3). |
| [out] | idefnum | (Used if igds(3) .ne. 0) The number of entries in array ideflist. i.e. number of rows (or columns) for which optional grid points are defined. |
| [out] | ipdsnum | Product Definition Template Number (see Code Table 4.0). |
| [out] | ipdstmpl | Contains the data values for the specified Product Definition Template (N=ipdsnum). Each element of this integer array contains an entry (in the order specified) of Product Defintion Template 4.N. A safe dimension for this array can be obtained in advance from maxvals(4), which is returned from subroutine gribinfo(). |
| [out] | ipdslen | Number of elements in ipdstmpl. i.e. number of entries in Product Defintion Template 4.N (N=ipdsnum). |
| [out] | coordlist | Array containg floating point values intended to document the vertical discretisation associated to model data on hybrid coordinate vertical levels. (part of Section 4) The dimension of this array can be obtained in advance from maxvals(5), which is returned from subroutine gribinfo(). |
| [out] | numcoord | number of values in array coordlist. |
| [out] | ierr | Error return code.
|
Definition at line 66 of file gettemplates.F90.
References g2_gbytec(), unpack3(), and unpack4().