|
NCEPLIBS-g2
3.4.5
|
This Fortran Module allows access to predefined GRIB2 Grid Definition Templates stored in a file. More...
Functions/Subroutines | |
| subroutine | getgridbyname (lunit, name, igdtn, igdtmpl, iret) |
| This subroutine searches a file referenced by fortran unit lunit for a Grid Definition Template assigned to the requested name. More... | |
| subroutine | getgridbynum (lunit, number, igdtn, igdtmpl, iret) |
| This subroutine searches a file referenced by fortran unit lunit for a Grid Definition Template assigned to the requested number. More... | |
| integer function | readgrids (lunit) |
| This function reads the list of GDT entries in the file associated with fortran unit, lunit. More... | |
Variables | |
| integer, parameter | maxtemp =200 |
| maximum template number for grid definition. More... | |
| integer | num_grids =0 |
| the number of grids. More... | |
This Fortran Module allows access to predefined GRIB2 Grid Definition Templates stored in a file.
The GDTs are represented by a predefined number or a character abbreviation. At the first request, all the grid GDT entries in the file associated with input Fortran file unit number, lunit, are read into a linked list named gridlist. This list is searched for the requested entry. Users of this Fortran module should only call routines getgridbynum and getgridbyname.
The format of the file scanned by routines in this module is as follows. Each line contains one Grid entry containing five fields, each separated by a colon, ":". The fields are:
| subroutine g2grids::getgridbyname | ( | integer, intent(in) | lunit, |
| character(len=8), intent(in) | name, | ||
| integer, intent(out) | igdtn, | ||
| integer, dimension(*), intent(out) | igdtmpl, | ||
| integer, intent(out) | iret | ||
| ) |
This subroutine searches a file referenced by fortran unit lunit for a Grid Definition Template assigned to the requested name.
The input file format is described at the top of this module.
| [in] | lunit | Unit number of file containing Grid definitions |
| [in] | name | Grid name of the requested Grid definition |
| [out] | igdtn | NN, indicating the number of the Grid Definition Template 3.NN |
| [out] | igdtmpl | An array containing the values of each entry in the Grid Definition Template. |
| [out] | iret | Error return code.
|
| subroutine g2grids::getgridbynum | ( | integer, intent(in) | lunit, |
| integer, intent(in) | number, | ||
| integer, intent(out) | igdtn, | ||
| integer, dimension(*), intent(out) | igdtmpl, | ||
| integer, intent(out) | iret | ||
| ) |
This subroutine searches a file referenced by fortran unit lunit for a Grid Definition Template assigned to the requested number.
The input file format is described at the top of this module.
| [in] | lunit | Unit number of file containing Grid definitions |
| [in] | number | Grid number of the requested Grid definition |
| [out] | igdtn | NN, indicating the number of the Grid Definition Template 3.NN |
| [out] | igdtmpl | An array containing the values of each entry in the Grid Definition Template. |
| [out] | iret | Error return code.
|
| integer function g2grids::readgrids | ( | integer, intent(in) | lunit | ) |
This function reads the list of GDT entries in the file associated with fortran unit, lunit.
All the entries are stored in a linked list called gridlist.
| [in] | lunit | Fortran unit number associated the the GDT file. |
| integer, parameter g2grids::maxtemp =200 |