46 integer :: template_num
48 integer,
dimension(MAXLEN) :: mapgrid
57 data (
templates(1)%mapgrid(j), j = 1, 19) &
58 /1, 1, 4, 1, 4, 1, 4, 4, 4, 4, 4, -4, 4, 1, -4, 4, 4, 4, 1/
63 data (
templates(2)%mapgrid(j), j = 1, 22) &
64 /1, 1, 4, 1, 4, 1, 4, 4, 4, 4, 4, -4, 4, 1, -4, 4, 4, 4, 1, -4, 4, 4/
69 data (
templates(3)%mapgrid(j), j = 1, 22) &
70 /1, 1, 4, 1, 4, 1, 4, 4, 4, 4, 4, -4, 4, 1, -4, 4, 4, 4, 1, -4, 4, -4/
75 data (
templates(4)%mapgrid(j), j = 1, 25) &
76 /1, 1, 4, 1, 4, 1, 4, 4, 4, 4, 4, -4, 4, 1, -4, 4, 4, 4, 1, -4, 4, 4, -4, 4, -4/
81 data (
templates(5)%mapgrid(j), j = 1, 19) &
82 /1, 1, 4, 1, 4, 1, 4, 4, 4, -4, 4, 1, -4, -4, 4, 1, 4, 4, 4/
87 data (
templates(6)%mapgrid(j), j = 1, 18) &
88 /1, 1, 4, 1, 4, 1, 4, 4, 4, -4, 4, 1, -4, 4, 4, 4, 1, 1/
93 data (
templates(7)%mapgrid(j), j = 1, 22) &
94 /1, 1, 4, 1, 4, 1, 4, 4, 4, -4, 4, 1, -4, 4, 4, 4, 1, 1, -4, -4, -4, 4/
99 data (
templates(8)%mapgrid(j), j = 1, 19) &
100 /1, 1, 4, 1, 4, 1, 4, 4, 4, 4, 4, -4, 4, 1, -4, 4, 4, 4, 1/
105 data (
templates(9)%mapgrid(j), j = 1, 22) &
106 /1, 1, 4, 1, 4, 1, 4, 4, 4, 4, 4, -4, 4, 1, -4, 4, 4, 4, 1, -4, 4, 4/
111 data (
templates(10)%mapgrid(j), j = 1, 22) &
112 /1, 1, 4, 1, 4, 1, 4, 4, 4, 4, 4, -4, 4, 1, -4, 4, 4, 4, 1, -4, 4, -4/
117 data (
templates(11)%mapgrid(j), j = 1, 25) &
118 /1, 1, 4, 1, 4, 1, 4, 4, 4, 4, 4, -4, 4, 1, -4, 4, 4, 4, 1, -4, 4, 4, -4, 4, -4/
123 data (
templates(12)%mapgrid(j), j = 1, 5) /4, 4, 4, 1, 1/
128 data (
templates(13)%mapgrid(j), j = 1, 8) /4, 4, 4, 1, 1, -4, 4, 4/
133 data (
templates(14)%mapgrid(j), j = 1, 8) /4, 4, 4, 1, 1, -4, 4, -4/
138 data (
templates(15)%mapgrid(j), j = 1, 11) /4, 4, 4, 1, 1, -4, 4, 4, -4, 4, -4/
143 data (
templates(16)%mapgrid(j), j = 1, 21) &
144 /1, 1, 4, 1, 4, 1, 4, 4, 4, -4, 4, 1, 4, 4, 4, 4, 1, 4, 4, 4, 4/
149 data (
templates(17)%mapgrid(j), j = 1, 11) /1, 1, 2, 1, -4, 4, 4, 1, 1, 1, 4/
154 data (
templates(18)%mapgrid(j), j = 1, 16) &
155 /1, 1, 4, 1, 4, 1, 4, 4, 4, -4, 4, 1, 4, 4, 1, 1/
160 data (
templates(19)%mapgrid(j), j = 1, 7) /4, 4, -4, 4, 4, 4, 1/
165 data (
templates(20)%mapgrid(j), j = 1, 20) &
166 /1, 1, 4, 1, 4, 1, 4, 4, 4, 4, -4, 4, 1, 4, 4, 1, 2, 1, 1, 2/
171 data (
templates(21)%mapgrid(j), j = 1, 28) &
172 /1, 1, 4, 1, 4, 1, 4, 4, 4, 4, -4, 4, 1, -4, 4, 1, 4, 1, -4, 1, 1, -4, 2, 1, 1, 1, 1, 1/
177 data (
templates(22)%mapgrid(j), j = 1, 16) &
178 /4, 1, -4, 1, 1, -4, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2/
183 data (
templates(23)%mapgrid(j), j = 1, 22) &
184 /1, 1, 4, 1, 4, 1, 4, 4, 4, -4, 4, 1, -4, 4, 4, 4, 1, 1, -4, -4, -4, 4/
189 data (
templates(24)%mapgrid(j), j = 1, 19) &
190 /1, 1, 4, 1, 4, 1, 4, 4, 4, 4, 4, -4, 4, 1, -4, 4, 4, 4, 1/
195 data (
templates(25)%mapgrid(j), j = 1, 19) &
196 /1, 1, 4, 1, 4, 1, 4, 4, 4, 4, 4, -4, 4, 1, -4, 4, 4, 4, 1/
201 data (
templates(26)%mapgrid(j), j = 1, 21) &
202 /1, 1, 4, 1, 4, 1, 4, 4, 4, 4, 4, -4, 4, 1, -4, 4, 4, 4, 1, 4, 4/
209 data (
templates(27)%mapgrid(j), j = 1, 13) &
210 /1, 1, 4, 1, 4, 1, 4, 4, 4, 4, 4, 1, 1/
217 data (
templates(28)%mapgrid(j), j = 1, 16) &
218 /1, 1, 4, 1, 4, 1, 4, 4, 4, 4, 4, 1, 1, -4, 4, 4/
225 data (
templates(29)%mapgrid(j), j = 1, 22) &
226 /1, 1, 4, 1, 4, 1, 4, 4, 4, -4, 4, 1, -4, 4, 4, 1, 4, 4, -4, -4, -4, -4/
233 data (
templates(30)%mapgrid(j), j = 1, 4) &
241 data (
templates(31)%mapgrid(j), j = 1, 17) &
242 /1, 1, 4, 1, 4, 1, 4, 4, 4, -4, 4, 4, 4, 1, 4, 4, 1/
257 integer,
intent(in) :: number
263 if (number.eq.
templates(j)%template_num)
then
294 integer,
intent(in) :: number
295 integer,
intent(out) :: nummap, map(*), iret
296 logical,
intent(out) :: needext
303 if (index.ne.-1)
then
306 map(1:nummap) =
templates(index)%mapgrid(1:nummap)
310 print *,
'getgridtemplate: Grid Template ', number,
' not defined.'
335 integer,
intent(in) :: number, list(*)
336 integer,
intent(out) :: nummap, map(*)
337 integer i, index, n, ni, nj
340 if (index.eq.-1)
return
342 if (.not.
templates(index)%needext)
return
344 map(1:nummap) =
templates(index)%mapgrid(1:nummap)
346 if (number.eq.120)
then
353 elseif (number.eq.4)
then
364 elseif (number.eq.5)
then
375 elseif (number.eq.1000)
then
381 elseif (number.eq.1200 )
then
403 integer,
intent(in) :: number
410 if (index .ne. -1)
then
This Fortran module contains info on all the available GRIB2 Grid Definition Templates used in [Secti...
subroutine getgridtemplate(number, nummap, map, needext, iret)
Get the grid template information for a specified Grid Definition Template.
integer, parameter maxtemp
maximum number of entries in the template
integer, parameter maxlen
maximum number of octets in mapgrid
integer function getgdtlen(number)
This function returns the initial length (number of entries) in the static part of specified Grid Def...
subroutine extgridtemplate(number, list, nummap, map)
Generate the remaining octet map for a given Grid Definition Template, if required.
integer function getgridindex(number)
Return the index of specified Grid Definition Template.
type(gridtemplate), dimension(maxtemp) templates
a gridtemplate type