|
NCEPLIBS-g2
3.4.5
|
This Fortran Module contains info on all the available GRIB2 Grid Definition Templates used in Section 3 (GDS). More...
Data Types | |
| type | gridtemplate |
Functions/Subroutines | |
| subroutine | extgridtemplate (number, list, nummap, map) |
| This subroutine generates the remaining octet map for a given Grid Definition Template, if required. More... | |
| integer function | getgdtlen (number) |
| This function returns the initial length (number of entries) in the "static" part of specified Grid Definition Template 3.number. More... | |
| integer function | getgridindex (number) |
| This function returns the index of specified Grid Definition Template 3.NN in array templates. More... | |
| subroutine | getgridtemplate (number, nummap, map, needext, iret) |
| This subroutine grid template information for a specified Grid Definition Template 3.NN. More... | |
Variables | |
| integer, parameter | maxlen =200 |
| maximum number of octets in mapgrid More... | |
| integer, parameter | maxtemp =31 |
| maximum number of entries in the template More... | |
| type(gridtemplate), dimension(maxtemp) | templates |
| a gridtemplate type More... | |
This Fortran Module contains info on all the available GRIB2 Grid Definition Templates used in Section 3 (GDS).
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. (See Template 3.120 as an example) This module also contains two subroutines. Subroutine getgridtemplate returns the octet map for a specified Template number, and subroutine extgridtemplate 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 gridtemplates::gridtemplate |
Definition at line 50 of file gridtemplates.f.
| Data Fields | ||
|---|---|---|
| integer, dimension(maxlen) | mapgrid | |
| integer | mapgridlen | |
| logical | needext | |
| integer | template_num | |
| subroutine gridtemplates::extgridtemplate | ( | 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 Grid 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 Grid Definition Template 3.NN that is being requested. |
| [in] | list | The list of values for each entry in the Grid Definition Template. |
| [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 GDS. |
Definition at line 341 of file gridtemplates.f.
| integer function gridtemplates::getgdtlen | ( | integer, intent(in) | number | ) |
This function returns the initial length (number of entries) in the "static" part of specified Grid Definition Template 3.number.
| [in] | number | NN, indicating the number of the Grid Definition Template 3.NN that is being requested. |
Definition at line 408 of file gridtemplates.f.
| integer function gridtemplates::getgridindex | ( | integer, intent(in) | number | ) |
This function returns the index of specified Grid Definition Template 3.NN in array templates.
| [in] | number | NN, indicating the number of the Grid Definition Template 3.NN that is being requested. |
Definition at line 262 of file gridtemplates.f.
| subroutine gridtemplates::getgridtemplate | ( | integer, intent(in) | number, |
| integer, intent(out) | nummap, | ||
| integer, dimension(*), intent(out) | map, | ||
| logical, intent(out) | needext, | ||
| integer, intent(out) | iret | ||
| ) |
This subroutine grid template information for a specified Grid Definition Template 3.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.
| [in] | number | NN, indicating the number of the Grid Definition Template 3.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 GDS. |
| [out] | needext | Logical variable indicating whether the Grid Defintion Template has to be extended. |
| [out] | iret | Error return code.
|
Definition at line 296 of file gridtemplates.f.
| integer, parameter gridtemplates::maxlen =200 |
maximum number of octets in mapgrid
Definition at line 47 of file gridtemplates.f.
| integer, parameter gridtemplates::maxtemp =31 |
maximum number of entries in the template
Definition at line 48 of file gridtemplates.f.
| type(gridtemplate), dimension(maxtemp) gridtemplates::templates |
a gridtemplate type
Definition at line 57 of file gridtemplates.f.