47 integer :: template_num
49 integer,
dimension(MAXLEN) :: mappds
58 data (
templates(1)%mappds(j), j = 1, 15) &
59 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4/
64 data (
templates(2)%mappds(j), j = 1, 18) &
65 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1/
70 data (
templates(3)%mappds(j), j = 1, 17) &
71 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1/
76 data (
templates(4)%mappds(j), j = 1, 31) &
77 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 1, 1, -4, -4, 4, 4, &
83 data (
templates(5)%mappds(j), j = 1, 30) &
84 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 1, 1, -4, 4, 4, &
90 data (
templates(6)%mappds(j), j = 1, 22) &
91 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, -1, -4, -1, -4/
96 data (
templates(7)%mappds(j), j = 1, 16) &
97 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1/
102 data (
templates(8)%mappds(j), j = 1, 15) &
103 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4/
108 data (
templates(9)%mappds(j), j = 1, 29) &
109 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4/
114 data (
templates(10)%mappds(j), j = 1, 36) &
115 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, -1, -4, -1, -4, 2, 1, 1, 1, &
116 1, 1, 1, 4, 1, 1, 1, 4, 1, 4/
121 data (
templates(11)%mappds(j), j = 1, 30) &
122 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 2, 1, 1, 1, 1, 1, 1, 4, &
128 data (
templates(12)%mappds(j), j = 1, 32) &
129 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, &
135 data (
templates(13)%mappds(j), j = 1, 31) &
136 /1, 1, 1, 1, 1, 2, 1, 1, 4, 1, -1, -4, 1, -1, -4, 1, 1, &
137 2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 1, 4, 1, 4/
142 data (
templates(14)%mappds(j), j = 1, 45) &
143 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 1, 1, -4, -4, 4, 4, &
144 1, -1, 4, -1, 4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4/
149 data (
templates(15)%mappds(j), j = 1, 44) &
150 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 1, 1, -4, 4, 4, &
151 1, -1, 4, -1, 4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4/
156 data (
templates(16)%mappds(j), j = 1, 19) &
157 /1, 1, 1, 1, 1, -4, 4, 2, -4, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2/
162 data (
templates(17)%mappds(j), j = 1, 5) &
168 data (
templates(18)%mappds(j), j = 1, 3) &
174 data (
templates(19)%mappds(j), j = 1, 9) &
175 /1, 1, 1, 1, 1, 2, 1, 1, -4/
180 data (
templates(20)%mappds(j), j = 1, 16) &
181 /1, 1, 1, 1, 1, 2, 1, 1, -4, 4, 1, 1, 1, 4, 1, 4/
186 data (
templates(21)%mappds(j), j = 1, 15) &
187 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, 1, 1, 4, 4, 2/
192 data (
templates(22)%mappds(j), j = 1, 15) &
193 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4/
198 data (
templates(23)%mappds(j), j = 1, 22) &
199 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 4, 1, 1, 1, 4, 1, 4/
204 data (
templates(24)%mappds(j), j = 1, 5) &
210 data (
templates(25)%mappds(j), j = 1, 18) &
211 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1/
216 data (
templates(26)%mappds(j), j = 1, 16) &
217 /1, 1, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4/
222 data (
templates(27)%mappds(j), j = 1, 19) &
223 /1, 1, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1/
228 data (
templates(28)%mappds(j), j = 1, 30) &
229 /1, 1, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, &
235 data (
templates(29)%mappds(j), j = 1, 33) &
236 /1, 1, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, &
242 data (
templates(30)%mappds(j), j = 1, 21) &
243 /1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -2, 1, -1, -4, 1, -1, -4/
248 data (
templates(31)%mappds(j), j = 1, 24) &
249 /1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1/
254 data (
templates(32)%mappds(j), j = 1, 35) &
255 /1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, &
256 1, 1, 4, 1, 1, 1, 4, 1, 4/
261 data (
templates(33)%mappds(j), j = 1, 38) &
262 /1, 1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, &
263 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4/
268 data (
templates(34)%mappds(j), j = 1, 16) &
269 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1/
276 data (
templates(35)%mappds(j), j = 1, 36) &
277 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, -1, -4, -1, -4, &
278 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4/
283 data (
templates(36)%mappds(j), j = 1, 10) &
284 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1/
291 data (
templates(37)%mappds(j), j = 1, 26) &
292 /1, 1, 2, 1, -1, -4, -1, -4, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, &
300 data (
templates(38)%mappds(j), j = 1, 21) &
301 /1, 1, 1, 1, 1, 2, 1, 1, 4, 1, -1, -4, 1, -1, -4, 1, 1, 4, 4, 4, 4/
308 data (
templates(39)%mappds(j), j = 1, 15) &
309 /1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 4, 1, -1, -4/
316 data (
templates(40)%mappds(j), j = 1, 18) &
317 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, 2, 2, 2, -1, -4, 1, 1, 1/
324 data (
templates(41)%mappds(j), j = 1, 32) &
325 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, 2, 2, 2, -1, -4, 1, 1, 1, 2, 1, 1, 1, &
326 1, 1, 1, 4, 1, 1, 1, 4, 1, 4/
333 data (
templates(42)%mappds(j), j = 1, 19) &
334 /1, 1, 1, 1, 4, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4/
341 data (
templates(43)%mappds(j), j = 1, 22) &
342 /1, 1, 1, 1, 4, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1/
358 integer,
intent(in) :: number
364 if (number .eq.
templates(j)%template_num)
then
393 integer,
intent(in) :: number
394 integer,
intent(out) :: nummap, map(*), iret
395 logical,
intent(out) :: needext
402 if (index.ne.-1)
then
405 map(1:nummap) =
templates(index)%mappds(1:nummap)
409 print *,
'getpdstemplate: PDS Template ', number, &
433 integer,
intent(in) :: number, list(*)
434 integer,
intent(out) :: nummap, map(*)
435 integer :: i, index, k, n, j
438 if (index .eq. -1)
return
440 if (.not.
templates(index)%needext)
return
442 map(1:nummap) =
templates(index)%mappds(1:nummap)
444 if (number .eq. 3)
then
450 elseif (number .eq. 4)
then
456 elseif (number .eq. 8)
then
457 if (list(22).gt.1)
then
460 map(nummap + k) = map(23 + k)
465 elseif (number .eq. 9)
then
466 if (list(29).gt.1)
then
469 map(nummap + k) = map(30 + k)
474 elseif (number .eq. 10)
then
475 if (list(23).gt.1)
then
478 map(nummap + k) = map(24 + k)
483 elseif (number .eq. 11)
then
484 if (list(25).gt.1)
then
487 map(nummap + k) = map(26 + k)
492 elseif (number .eq. 12)
then
493 if (list(24).gt.1)
then
496 map(nummap + k) = map(25 + k)
501 elseif (number .eq. 13)
then
502 if (list(38).gt.1)
then
505 map(nummap + k) = map(39 + k)
515 elseif (number .eq. 14)
then
516 if (list(37).gt.1)
then
519 map(nummap + k) = map(38 + k)
529 elseif (number .eq. 30)
then
538 elseif (number .eq. 31)
then
547 elseif (number .eq. 32)
then
556 elseif (number .eq. 33)
then
562 elseif (number .eq. 34)
then
563 if (list(25).gt.1)
then
566 map(nummap + k) = map(26 + k)
576 elseif (number .eq. 42)
then
577 if (list(23).gt.1)
then
580 map(nummap + k) = map(24 + k)
585 elseif (number .eq. 43)
then
586 if (list(26).gt.1)
then
589 map(nummap + k) = map(27 + k)
594 elseif (number .eq. 46)
then
595 if (list(28).gt.1)
then
598 map(nummap + k) = map(29 + k)
603 elseif (number .eq. 47)
then
604 if (list(31).gt.1)
then
607 map(nummap + k) = map(32 + k)
612 elseif (number .eq. 51)
then
622 elseif (number .eq. 53)
then
628 elseif (number .eq. 54)
then
634 elseif (number .eq. 91)
then
635 if (list(29).gt.1 )
then
638 map(nummap + k) = map(30 + k)
663 integer,
intent(in) :: number
668 if (index .ne. -1)
then
Information on all GRIB2 Product Definition Templates used in Section 4 - the Product Definition Sect...
subroutine extpdstemplate(number, list, nummap, map)
This subroutine generates the remaining octet map for a given Product Definition Template,...
integer function getpdsindex(number)
This function returns the index of specified Product Definition Template in array templates.
integer function getpdtlen(number)
This function returns the initial length (number of entries) in the static part of specified Product ...
integer, parameter maxtemp
MAXTEMP maximum number of templates.
integer, parameter maxlen
MAXLEN max length of entries.
type(pdstemplate), dimension(maxtemp) templates
template in type of pdstemplate
subroutine getpdstemplate(number, nummap, map, needext, iret)
This subroutine returns PDS template information for a specified Product Definition Template.
This is the defined type for a Product Definition Section (PDS) template.