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/
350 data (
templates(44)%mappds(j), j = 1, 29) &
351 /1, 1, 2, 1, -1, -4, -1, -4, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, &
359 data (
templates(45)%mappds(j), j = 1, 7) &
360 /1, 1, 2, 2, 2, 2, 1/
367 data (
templates(46)%mappds(j), j = 1, 24) &
368 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1/
375 data (
templates(47)%mappds(j), j = 1, 38) &
376 /1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, &
377 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4/
384 data (
templates(48)%mappds(j), j = 1, 6) &
401 integer,
intent(in) :: number
407 if (number .eq.
templates(j)%template_num)
then
436 integer,
intent(in) :: number
437 integer,
intent(out) :: nummap, map(*), iret
438 logical,
intent(out) :: needext
445 if (index.ne.-1)
then
448 map(1:nummap) =
templates(index)%mappds(1:nummap)
452 print *,
'getpdstemplate: PDS Template ', number, &
476 integer,
intent(in) :: number, list(*)
477 integer,
intent(out) :: nummap, map(*)
478 integer :: i, index, k, n, j
481 if (index .eq. -1)
return
483 if (.not.
templates(index)%needext)
return
485 map(1:nummap) =
templates(index)%mappds(1:nummap)
487 if (number .eq. 3)
then
493 elseif (number .eq. 4)
then
499 elseif (number .eq. 8)
then
500 if (list(22).gt.1)
then
503 map(nummap + k) = map(23 + k)
508 elseif (number .eq. 9)
then
509 if (list(29).gt.1)
then
512 map(nummap + k) = map(30 + k)
517 elseif (number .eq. 10)
then
518 if (list(23).gt.1)
then
521 map(nummap + k) = map(24 + k)
526 elseif (number .eq. 11)
then
527 if (list(25).gt.1)
then
530 map(nummap + k) = map(26 + k)
535 elseif (number .eq. 12)
then
536 if (list(24).gt.1)
then
539 map(nummap + k) = map(25 + k)
544 elseif (number .eq. 13)
then
545 if (list(38).gt.1)
then
548 map(nummap + k) = map(39 + k)
558 elseif (number .eq. 14)
then
559 if (list(37).gt.1)
then
562 map(nummap + k) = map(38 + k)
572 elseif (number .eq. 30)
then
581 elseif (number .eq. 31)
then
590 elseif (number .eq. 32)
then
599 elseif (number .eq. 33)
then
605 elseif (number .eq. 34)
then
606 if (list(25).gt.1)
then
609 map(nummap + k) = map(26 + k)
619 elseif (number .eq. 35)
then
628 elseif (number .eq. 42)
then
629 if (list(23).gt.1)
then
632 map(nummap + k) = map(24 + k)
637 elseif (number .eq. 43)
then
638 if (list(26).gt.1)
then
641 map(nummap + k) = map(27 + k)
646 elseif (number .eq. 46)
then
647 if (list(28).gt.1)
then
650 map(nummap + k) = map(29 + k)
655 elseif (number .eq. 47)
then
656 if (list(31).gt.1)
then
659 map(nummap + k) = map(32 + k)
664 elseif (number .eq. 51)
then
674 elseif (number .eq. 53)
then
680 elseif (number .eq. 54)
then
686 elseif (number .eq. 57)
then
698 map(nummap + 11) = -1
699 map(nummap + 12) = -4
701 map(nummap + 14) = -1
702 map(nummap + 15) = -4
705 elseif (number .eq. 61)
then
706 if (list(31) .gt. 1)
then
709 map(nummap + k) = map(32 +k)
714 elseif (number .eq. 91)
then
715 if (list(29).gt.1 )
then
718 map(nummap + k) = map(30 + k)
743 integer,
intent(in) :: number
748 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.