|
NCEPLIBS-g2
3.4.5
|
This Fortran Module contains info on all the available GRIB2 Product Definition Templates used in Section 4 (PDS). More...
Data Types | |
| type | pdstemplate |
Functions/Subroutines | |
| subroutine | extpdstemplate (number, list, nummap, map) |
| This subroutine generates the remaining octet map for a given Product Definition Template, if required. More... | |
| integer function | getpdsindex (number) |
| This function returns the index of specified Product Definition Template 4.NN (NN=number) in array templates. More... | |
| subroutine | getpdstemplate (number, nummap, map, needext, iret) |
| This subroutine returns PDS template information for a specified Product Definition Template 4.NN. More... | |
| integer function | getpdtlen (number) |
| This function returns the initial length (number of entries) in the "static" part of specified Product Definition Template 4.number. More... | |
Variables | |
| integer, parameter | maxlen =200 |
| MAXLEN max length of entries. More... | |
| integer, parameter | maxtemp =43 |
| MAXTEMP maximum number of templates. More... | |
| type(pdstemplate), dimension(maxtemp) | templates |
| template in type of pdstemplate More... | |
This Fortran Module contains info on all the available GRIB2 Product Definition Templates used in Section 4 (PDS).
Each Template has three parts: The number of entries in the template (mapgridlen); A map of the template (mapgrid), which contains the number of octets in which to pack each of the template values; and a logical value (needext) that indicates whether the Template needs to be extended. In some cases the number of entries in a template can vary depending upon values specified in the "static" part of the template. (Template 4.3 as an example)
This module also contains two subroutines. getpdstemplate() returns the octet map for a specified Template number, and extpdstemplate() will calculate the extended octet map of an appropriate template given values for the "static" part of the template. See docblocks below for the arguments and usage of these routines.
PROGRAM HISTORY LOG:
| type pdstemplates::pdstemplate |
Definition at line 59 of file pdstemplates.f.
| Data Fields | ||
|---|---|---|
| integer, dimension(maxlen) | mappds | |
| integer | mappdslen | |
| logical | needext | |
| integer | template_num | |
| subroutine pdstemplates::extpdstemplate | ( | integer, intent(in) | number, |
| integer, dimension(*), intent(in) | list, | ||
| integer, intent(out) | nummap, | ||
| integer, dimension(*), intent(out) | map | ||
| ) |
This subroutine generates the remaining octet map for a given Product Definition Template, if required.
Some Templates can vary depending on data values given in an earlier part of the Template, and it is necessary to know some of the earlier entry values to generate the full octet map of the Template.
PROGRAM HISTORY LOG:
| [in] | number | NN, indicating the number of the Product Definition Template 4.NN that is being requested. |
| [in] | list | An array containing the number of octets that each the Product Definition Template 4.NN. |
| [out] | nummap | Number of entries in the Template. |
| [out] | map | An array containing the number of octets that each template entry occupies when packed up into the PDS. |
Definition at line 459 of file pdstemplates.f.
| integer function pdstemplates::getpdsindex | ( | integer, intent(in) | number | ) |
This function returns the index of specified Product Definition Template 4.NN (NN=number) in array templates.
| [in] | number | NN, indicating the number of the Product Definition Template 4.NN that is being requested. |
Definition at line 371 of file pdstemplates.f.
| subroutine pdstemplates::getpdstemplate | ( | integer, intent(in) | number, |
| integer, intent(out) | nummap, | ||
| integer, dimension(*), intent(out) | map, | ||
| logical, intent(out) | needext, | ||
| integer, intent(out) | iret | ||
| ) |
This subroutine returns PDS template information for a specified Product Definition Template 4.NN.
The number of entries in the template is returned along with a map of the number of octets occupied by each entry. Also, a flag is returned to indicate whether the template would need to be extended.
PROGRAM HISTORY LOG:
| [in] | number | NN, indicating the number of the Product Definition Template 4.NN that is being requested. |
| [out] | nummap | Number of entries in the Template. |
| [out] | map | An array containing the number of octets that each template entry occupies when packed up into the PDS. |
| [out] | needext | Logical variable indicating whether the Product Defintion Template has to be extended. |
| [out] | iret | Error return code.
|
Definition at line 412 of file pdstemplates.f.
| integer function pdstemplates::getpdtlen | ( | integer, intent(in) | number | ) |
This function returns the initial length (number of entries) in the "static" part of specified Product Definition Template 4.number.
| [in] | number | NN, indicating the number of the Product Definition Template 4.NN that is being requested. |
Definition at line 690 of file pdstemplates.f.
| integer, parameter pdstemplates::maxlen =200 |
MAXLEN max length of entries.
Definition at line 56 of file pdstemplates.f.
| integer, parameter pdstemplates::maxtemp =43 |
MAXTEMP maximum number of templates.
Definition at line 57 of file pdstemplates.f.
| type(pdstemplate), dimension(maxtemp) pdstemplates::templates |
template in type of pdstemplate
Definition at line 66 of file pdstemplates.f.