NCEPLIBS-g2  3.4.5
pdstemplates.f
Go to the documentation of this file.
1 
6 
53 
54  module pdstemplates
55 
56  integer,parameter :: maxlen=200
57  integer,parameter :: maxtemp=43
58 
60  integer :: template_num
61  integer :: mappdslen
62  integer,dimension(MAXLEN) :: mappds
63  logical :: needext
64  end type pdstemplate
65 
66  type(pdstemplate),dimension(MAXTEMP) :: templates
67 
68  data templates(1)%template_num /0/ ! Fcst at Level/Layer
69  data templates(1)%mappdslen /15/
70  data templates(1)%needext /.false./
71  data (templates(1)%mappds(j),j=1,15)
72  & /1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4/
73 
74  data templates(2)%template_num /1/ ! Ens fcst at level/layer
75  data templates(2)%mappdslen /18/
76  data templates(2)%needext /.false./
77  data (templates(2)%mappds(j),j=1,18)
78  & /1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1,1/
79 
80  data templates(3)%template_num /2/ ! Derived Ens fcst at level/layer
81  data templates(3)%mappdslen /17/
82  data templates(3)%needext /.false./
83  data (templates(3)%mappds(j),j=1,17)
84  & /1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1/
85 
86  data templates(4)%template_num /3/ ! Ens cluster fcst rect. area
87  data templates(4)%mappdslen /31/
88  data templates(4)%needext /.true./
89  data (templates(4)%mappds(j),j=1,31)
90  & /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,
91  & 1,-1,4,-1,4/
92 
93  data templates(5)%template_num /4/ ! Ens cluster fcst circ. area
94  data templates(5)%mappdslen /30/
95  data templates(5)%needext /.true./
96  data (templates(5)%mappds(j),j=1,30)
97  & /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,
98  & 1,-1,4,-1,4/
99 
100  data templates(6)%template_num /5/ ! Prob fcst at level/layer
101  data templates(6)%mappdslen /22/
102  data templates(6)%needext /.false./
103  data (templates(6)%mappds(j),j=1,22)
104  & /1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1,1,-1,-4,-1,-4/
105 
106  data templates(7)%template_num /6/ ! Percentile fcst at level/layer
107  data templates(7)%mappdslen /16/
108  data templates(7)%needext /.false./
109  data (templates(7)%mappds(j),j=1,16)
110  & /1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1/
111 
112  data templates(8)%template_num /7/ ! Error at level/layer
113  data templates(8)%mappdslen /15/
114  data templates(8)%needext /.false./
115  data (templates(8)%mappds(j),j=1,15)
116  & /1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4/
117 
118  data templates(9)%template_num /8/ ! Ave or Accum at level/layer
119  data templates(9)%mappdslen /29/
120  data templates(9)%needext /.true./
121  data (templates(9)%mappds(j),j=1,29)
122  & /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/
123 
124  data templates(10)%template_num /9/ ! Prob over time interval
125  data templates(10)%mappdslen /36/
126  data templates(10)%needext /.true./
127  data (templates(10)%mappds(j),j=1,36)
128  & /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,
129  & 1,1,1,4,1,1,1,4,1,4/
130 
131  data templates(11)%template_num /10/ ! Percentile over time interval
132  data templates(11)%mappdslen /30/
133  data templates(11)%needext /.true./
134  data (templates(11)%mappds(j),j=1,30)
135  & /1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,2,1,1,1,1,1,1,4,
136  & 1,1,1,4,1,4/
137 
138  data templates(12)%template_num /11/ ! Ens member over time interval
139  data templates(12)%mappdslen /32/
140  data templates(12)%needext /.true./
141  data (templates(12)%mappds(j),j=1,32)
142  & /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,
143  & 4,1,1,1,4,1,4/
144 
145  data templates(13)%template_num /12/ ! Derived Ens fcst over time int
146  data templates(13)%mappdslen /31/
147  data templates(13)%needext /.true./
148  data (templates(13)%mappds(j),j=1,31)
149  & /1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1,
150  & 2,1,1,1,1,1,1,4,1,1,1,4,1,4/
151 
152  data templates(14)%template_num /13/ ! Ens cluster fcst rect. area
153  data templates(14)%mappdslen /45/
154  data templates(14)%needext /.true./
155  data (templates(14)%mappds(j),j=1,45)
156  & /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,
157  & 1,-1,4,-1,4,2,1,1,1,1,1,1,4,1,1,1,4,1,4/
158 
159  data templates(15)%template_num /14/ ! Ens cluster fcst circ. area
160  data templates(15)%mappdslen /44/
161  data templates(15)%needext /.true./
162  data (templates(15)%mappds(j),j=1,44)
163  & /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,
164  & 1,-1,4,-1,4,2,1,1,1,1,1,1,4,1,1,1,4,1,4/
165 
166  data templates(16)%template_num /20/ ! Radar Product
167  data templates(16)%mappdslen /19/
168  data templates(16)%needext /.false./
169  data (templates(16)%mappds(j),j=1,19)
170  & /1,1,1,1,1,-4,4,2,4,2,1,1,1,1,1,2,1,3,2/
171 
172  data templates(17)%template_num /30/ ! Satellite Product
173  data templates(17)%mappdslen /5/
174  data templates(17)%needext /.true./
175  data (templates(17)%mappds(j),j=1,5)
176  & /1,1,1,1,1/
177 
178  data templates(18)%template_num /254/ ! CCITTIA5 Character String
179  data templates(18)%mappdslen /3/
180  data templates(18)%needext /.false./
181  data (templates(18)%mappds(j),j=1,3)
182  & /1,1,4/
183 
184  data templates(19)%template_num /1000/ ! Cross section
185  data templates(19)%mappdslen /9/
186  data templates(19)%needext /.false./
187  data (templates(19)%mappds(j),j=1,9)
188  & /1,1,1,1,1,2,1,1,4/
189 
190  data templates(20)%template_num /1001/ ! Cross section over time
191  data templates(20)%mappdslen /16/
192  data templates(20)%needext /.false./
193  data (templates(20)%mappds(j),j=1,16)
194  & /1,1,1,1,1,2,1,1,4,4,1,1,1,4,1,4/
195 
196  data templates(21)%template_num /1002/ ! Cross section processed time
197  data templates(21)%mappdslen /15/
198  data templates(21)%needext /.false./
199  data (templates(21)%mappds(j),j=1,15)
200  & /1,1,1,1,1,2,1,1,4,1,1,1,4,4,2/
201 
202  data templates(22)%template_num /1100/ ! Hovmoller grid
203  data templates(22)%mappdslen /15/
204  data templates(22)%needext /.false./
205  data (templates(22)%mappds(j),j=1,15)
206  & /1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4/
207 
208  data templates(23)%template_num /1101/ ! Hovmoller with stat proc
209  data templates(23)%mappdslen /22/
210  data templates(23)%needext /.false./
211  data (templates(23)%mappds(j),j=1,22)
212  & /1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,4,1,1,1,4,1,4/
213 
214  data templates(24)%template_num /31/ ! Satellite Product
215  data templates(24)%mappdslen /5/
216  data templates(24)%needext /.true./
217  data (templates(24)%mappds(j),j=1,5)
218  & /1,1,1,1,1/
219 
220  data templates(25)%template_num /15/ ! Ave or Accum at level/layer
221  data templates(25)%mappdslen /18/ ! For ICAO WAFS products
222  data templates(25)%needext /.false./
223  data (templates(25)%mappds(j),j=1,18)
224  & /1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1,1/
225 
226  data templates(26)%template_num /40/ ! Analysis or Forecast at a horizontal or in a
227  data templates(26)%mappdslen /16/ ! horizontal layer at a point in time for
228  data templates(26)%needext /.false./ ! atmospheric chemical constituents
229  data (templates(26)%mappds(j),j=1,16)
230  & /1,1,2,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4/
231 
232  data templates(27)%template_num /41/ ! Individual ensemble forecast, control and
233  data templates(27)%mappdslen /19/ ! perturbed, at horizontal level or
234  data templates(27)%needext /.false./ ! in a horizontal layer at a point in time for
235  data (templates(27)%mappds(j),j=1,19) ! atmospheric chemical constituents
236  & /1,1,2,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1,1/
237 
238  data templates(28)%template_num /42/ ! Average, Accumulation, and/or extreme values or other
239  data templates(28)%mappdslen /30/ ! statistically-processed values at horizontal level or
240  data templates(28)%needext /.true./ ! in a horizontal layer in contnunuous or non-continuous time
241  data (templates(28)%mappds(j),j=1,30) ! interval for atmospheric chemical constituents
242  & /1,1,2,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,2,1,1,1,1,1,1,4,
243  & 1,1,1,4,1,4/
244 
245  data templates(29)%template_num /43/ ! Individual ensemble forecast, control and
246  data templates(29)%mappdslen /33/ ! perturbed, at horizontal level or in a horizontal
247  data templates(29)%needext /.true./ ! layer at a point in a continuous or non-continuous time
248  data (templates(29)%mappds(j),j=1,33) ! interval for atmospheric chemical constituents
249  & /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,
250  & 1,1,1,4,1,4/
251 
252  data templates(30)%template_num /44/ ! Analysis or Forecast at a horizontal or in a
253  data templates(30)%mappdslen /21/ ! horizontal layer at a point in time for
254  data templates(30)%needext /.false./ ! Aerosol
255  data (templates(30)%mappds(j),j=1,21)
256  & /1,1,2,1,-1,-4,-1,-4,1,1,1,2,1,1,2,1,-1,-4,1,-1,-4/
257 
258  data templates(31)%template_num /45/ ! Individual ensemble forecast, control and
259  data templates(31)%mappdslen /24/ ! perturbed, at horizontal level or in a horizontal
260  data templates(31)%needext /.false./ ! layer at a point in time for Aerosol
261  data (templates(31)%mappds(j),j=1,24)
262  & /1,1,2,1,-1,-4,-1,-4,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1,1/
263 
264  data templates(32)%template_num /46/ ! Ave or Accum or Extreme value at level/layer
265  data templates(32)%mappdslen /35/ ! in a continuous or non-continuous time interval
266  data templates(32)%needext /.true./ ! for Aerosol
267  data (templates(32)%mappds(j),j=1,35)
268  & /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,
269  & 1,1,4,1,1,1,4,1,4/
270 
271  data templates(33)%template_num /47/ ! Individual ensemble forecast, control and
272  data templates(33)%mappdslen /38/ ! perturbed, at horizontal level or in a horizontal
273  data templates(33)%needext /.true./ ! in a continuous or non-continuous time interval
274  data (templates(33)%mappds(j),j=1,38) ! for Aerosol
275  & /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,
276  & 1,1,1,1,1,4,1,1,1,4,1,4/
277 
278  data templates(34)%template_num /51/ ! Categorical forecasts at a horizontal level or
279  data templates(34)%mappdslen /16/ ! in a horizontal layer at a point in time
280  data templates(34)%needext /.true./
281  data (templates(34)%mappds(j),j=1,16)
282  & /1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1/
283 !
284 ! PDT 4.91
285 !
286  data templates(35)%template_num /91/ ! Categorical forecasts at a horizontal level or
287  data templates(35)%mappdslen /36/ ! in a horizontal layer in a continuous or
288  data templates(35)%needext /.true./ ! non-continuous time interval
289  data (templates(35)%mappds(j),j=1,36)
290  & /1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1,1,-1,-4,-1,-4,
291  & 2,1,1,1,1,1,1,4,1,1,1,4,1,4/
292 
293  data templates(36)%template_num /32/ ! Analysis or forecast at a horizontal level or
294  data templates(36)%mappdslen /10/ ! in a horizontal layer at a point in time for
295  data templates(36)%needext /.true./ ! for simulate (synthetic) Satellite data
296  data (templates(36)%mappds(j),j=1,10)
297  & /1,1,1,1,1,2,1,1,4,1/
298 !
299 ! PDT 4.48
300 !
301  data templates(37)%template_num /48/ ! Analysis or forecast at a horizontal level or
302  data templates(37)%mappdslen /26/ ! in a horizontal layer at a point in time for
303  data templates(37)%needext /.false./ ! Optical Properties of Aerosol
304  data (templates(37)%mappds(j),j=1,26)
305  & /1,1,2,1,-1,-4,-1,-4,1,-1,-4,-1,-4,1,1,1,2,1,1,4,1,-1,-4,
306  & 1,-1,-4/
307 !
308 ! PDT 4.50 VALIDATION
309 !
310  data templates(38)%template_num /50/ ! Analysis or Forecast of a multi component
311  data templates(38)%mappdslen /21/ ! parameter or matrix element at a point in time
312  data templates(38)%needext /.false./ !
313  data (templates(38)%mappds(j),j=1,21)
314  & /1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1,4,4,4,4/
315 !
316 ! PDT 4.52 VALIDATION
317 !
318  data templates(39)%template_num /52/ ! Analysis or forecast of Wave parameters
319  data templates(39)%mappdslen /15/ ! at the Sea surface at a point in time
320  data templates(39)%needext /.false./ !
321  data (templates(39)%mappds(j),j=1,15)
322  & /1,1,1,1,1,1,1,1,2,1,1,4,1,-1,-4/
323 !
324 ! PDT 4.33 (07/29/2013)
325 !
326  data templates(40)%template_num /33/ ! Individual ensemble forecast, control, perturbed,
327  data templates(40)%mappdslen /18/ ! at a horizontal level or in a horizontal layer
328  data templates(40)%needext /.true./ ! at a point in time for simulate (synthetic) Satellite data
329  data (templates(40)%mappds(j),j=1,18)
330  & /1,1,1,1,1,2,1,1,4,1,2,2,2,-1,-4,1,1,1/
331 !
332 ! PDT 4.34 (07/29/2013)
333 !
334  data templates(41)%template_num /34/ ! Individual ensemble forecast, control, perturbed,
335  data templates(41)%mappdslen /32/ ! at a horizontal level or in a horizontal layer,
336  data templates(41)%needext /.true./ ! in a continuous or non-continuous interval
337  data (templates(41)%mappds(j),j=1,32) ! for simulate (synthetic) Satellite data
338  & /1,1,1,1,1,2,1,1,4,1,2,2,2,-1,-4,1,1,1,2,1,1,1,
339  & 1,1,1,4,1,1,1,4,1,4/
340 !
341 ! PDT 4.53 (07/30/2013)
342 !
343  data templates(42)%template_num /53/ ! Partitioned parameters at
344  data templates(42)%mappdslen /19/ ! horizontal level or horizontal layer
345  data templates(42)%needext /.true./ ! at a point in time
346  data (templates(42)%mappds(j),j=1,19)
347  & /1,1,1,1,4,2,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4/
348 !
349 ! PDT 4.54 (07/30/2013)
350 !
351  data templates(43)%template_num /54/ ! Individual ensemble forecast, controli and perturbed,
352  data templates(43)%mappdslen /22/ ! at a horizontal level or in a horizontal layer
353  data templates(43)%needext /.true./ ! at a point in time for partitioned parameters
354  data (templates(43)%mappds(j),j=1,22)
355  & /1,1,1,1,4,2,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1,1/
356 
357  contains
358 
369 
370  integer function getpdsindex(number)
371 
372  integer,intent(in) :: number
373 
374  getpdsindex=-1
375 
376  do j=1,maxtemp
377  if (number.eq.templates(j)%template_num) then
378  getpdsindex=j
379  return
380  endif
381  enddo
382 
383  end function
384 
410 
411  subroutine getpdstemplate(number,nummap,map,needext,iret)
412 
413  integer,intent(in) :: number
414  integer,intent(out) :: nummap,map(*),iret
415  logical,intent(out) :: needext
416 
417  iret=0
418 
419  index=getpdsindex(number)
420 
421  if (index.ne.-1) then
422  nummap=templates(index)%mappdslen
423  needext=templates(index)%needext
424  map(1:nummap)=templates(index)%mappds(1:nummap)
425  else
426  nummap=0
427  needext=.false.
428  print *,'getpdstemplate: PDS Template ',number,
429  & ' not defined.'
430  iret=1
431  endif
432 
433  end subroutine
434 
457 
458  subroutine extpdstemplate(number,list,nummap,map)
459 
460  integer,intent(in) :: number,list(*)
461  integer,intent(out) :: nummap,map(*)
462 
463  index=getpdsindex(number)
464  if (index.eq.-1) return
465 
466  if ( .not. templates(index)%needext ) return
467  nummap=templates(index)%mappdslen
468  map(1:nummap)=templates(index)%mappds(1:nummap)
469 
470  if ( number.eq.3 ) then
471  n=list(27)
472  do i=1,n
473  map(nummap+i)=1
474  enddo
475  nummap=nummap+n
476  elseif ( number.eq.4 ) then
477  n=list(26)
478  do i=1,n
479  map(nummap+i)=1
480  enddo
481  nummap=nummap+n
482  elseif ( number.eq.8 ) then
483  if ( list(22).gt.1 ) then
484  do j=2,list(22)
485  do k=1,6
486  map(nummap+k)=map(23+k)
487  enddo
488  nummap=nummap+6
489  enddo
490  endif
491  elseif ( number.eq.9 ) then
492  if ( list(29).gt.1 ) then
493  do j=2,list(29)
494  do k=1,6
495  map(nummap+k)=map(30+k)
496  enddo
497  nummap=nummap+6
498  enddo
499  endif
500  elseif ( number.eq.10 ) then
501  if ( list(23).gt.1 ) then
502  do j=2,list(23)
503  do k=1,6
504  map(nummap+k)=map(24+k)
505  enddo
506  nummap=nummap+6
507  enddo
508  endif
509  elseif ( number.eq.11 ) then
510  if ( list(25).gt.1 ) then
511  do j=2,list(25)
512  do k=1,6
513  map(nummap+k)=map(26+k)
514  enddo
515  nummap=nummap+6
516  enddo
517  endif
518  elseif ( number.eq.12 ) then
519  if ( list(24).gt.1 ) then
520  do j=2,list(24)
521  do k=1,6
522  map(nummap+k)=map(25+k)
523  enddo
524  nummap=nummap+6
525  enddo
526  endif
527  elseif ( number.eq.13 ) then
528  if ( list(38).gt.1 ) then
529  do j=2,list(38)
530  do k=1,6
531  map(nummap+k)=map(39+k)
532  enddo
533  nummap=nummap+6
534  enddo
535  endif
536  n=list(27)
537  do i=1,n
538  map(nummap+i)=1
539  enddo
540  nummap=nummap+n
541  elseif ( number.eq.14 ) then
542  if ( list(37).gt.1 ) then
543  do j=2,list(37)
544  do k=1,6
545  map(nummap+k)=map(38+k)
546  enddo
547  nummap=nummap+6
548  enddo
549  endif
550  n=list(26)
551  do i=1,n
552  map(nummap+i)=1
553  enddo
554  nummap=nummap+n
555  elseif ( number.eq.30 ) then
556  do j=1,list(5)
557  map(nummap+1)=2
558  map(nummap+2)=2
559  map(nummap+3)=1
560  map(nummap+4)=1
561  map(nummap+5)=4
562  nummap=nummap+5
563  enddo
564  elseif ( number.eq.31 ) then
565  do j=1,list(5)
566  map(nummap+1)=2
567  map(nummap+2)=2
568  map(nummap+3)=2
569  map(nummap+4)=1
570  map(nummap+5)=4
571  nummap=nummap+5
572  enddo
573  elseif ( number.eq.32 ) then
574  do j=1,list(10)
575  map(nummap+1)=2
576  map(nummap+2)=2
577  map(nummap+3)=2
578  map(nummap+4)=-1
579  map(nummap+5)=-4
580  nummap=nummap+5
581  enddo
582  elseif ( number.eq.33 ) then
583  n=list(10)
584  do i=1,n
585  map(nummap+i)=1
586  enddo
587  nummap=nummap+n
588  elseif ( number.eq.34 ) then
589  if ( list(25).gt.1 ) then
590  do j=2,list(25)
591  do k=1,6
592  map(nummap+k)=map(26+k)
593  enddo
594  nummap=nummap+6
595  enddo
596  endif
597  n=list(10)
598  do i=1,n
599  map(nummap+i)=1
600  enddo
601  nummap=nummap+n
602  elseif ( number.eq.42 ) then
603  if ( list(23).gt.1 ) then
604  do j=2,list(23)
605  do k=1,6
606  map(nummap+k)=map(24+k)
607  enddo
608  nummap=nummap+6
609  enddo
610  endif
611  elseif ( number.eq.43 ) then
612  if ( list(26).gt.1 ) then
613  do j=2,list(26)
614  do k=1,6
615  map(nummap+k)=map(27+k)
616  enddo
617  nummap=nummap+6
618  enddo
619  endif
620  elseif ( number.eq.46 ) then
621  if ( list(28).gt.1 ) then
622  do j=2,list(28)
623  do k=1,6
624  map(nummap+k)=map(29+k)
625  enddo
626  nummap=nummap+6
627  enddo
628  endif
629  elseif ( number.eq.47 ) then
630  if ( list(31).gt.1 ) then
631  do j=2,list(31)
632  do k=1,6
633  map(nummap+k)=map(32+k)
634  enddo
635  nummap=nummap+6
636  enddo
637  endif
638  elseif ( number.eq.51 ) then
639  do j=1,list(16)
640  map(nummap+1)=1
641  map(nummap+2)=1
642  map(nummap+3)=-1
643  map(nummap+4)=-4
644  map(nummap+5)=-1
645  map(nummap+6)=-4
646  nummap=nummap+6
647  enddo
648  elseif ( number.eq.53 ) then
649  n=list(4)
650  do i=1,n
651  map(nummap+i)=1
652  enddo
653  nummap=nummap+n
654  elseif ( number.eq.54 ) then
655  n=list(4)
656  do i=1,n
657  map(nummap+i)=1
658  enddo
659  nummap=nummap+n
660  elseif ( number.eq.91 ) then
661  if ( list(29).gt.1 ) then
662  do j=2,list(29)
663  do k=1,6
664  map(nummap+k)=map(30+k)
665  enddo
666  nummap=nummap+6
667  enddo
668  endif
669  n=list(16)
670  do i=1,n
671  map(nummap+i)=1
672  enddo
673  nummap=nummap+n
674  endif
675 
676  end subroutine
677 
688 
689  integer function getpdtlen(number)
690 
691  integer,intent(in) :: number
692 
693  getpdtlen=0
694 
695  index=getpdsindex(number)
696 
697  if (index.ne.-1) then
698  getpdtlen=templates(index)%mappdslen
699  endif
700 
701  end function
702 
703  end module
pdstemplates::extpdstemplate
subroutine extpdstemplate(number, list, nummap, map)
This subroutine generates the remaining octet map for a given Product Definition Template,...
Definition: pdstemplates.f:459
pdstemplates::getpdstemplate
subroutine getpdstemplate(number, nummap, map, needext, iret)
This subroutine returns PDS template information for a specified Product Definition Template 4....
Definition: pdstemplates.f:412
pdstemplates::getpdtlen
integer function getpdtlen(number)
This function returns the initial length (number of entries) in the "static" part of specified Produc...
Definition: pdstemplates.f:690
pdstemplates::templates
type(pdstemplate), dimension(maxtemp) templates
template in type of pdstemplate
Definition: pdstemplates.f:66
pdstemplates::maxtemp
integer, parameter maxtemp
MAXTEMP maximum number of templates.
Definition: pdstemplates.f:57
pdstemplates
This Fortran Module contains info on all the available GRIB2 Product Definition Templates used in Sec...
Definition: pdstemplates.f:54
pdstemplates::maxlen
integer, parameter maxlen
MAXLEN max length of entries.
Definition: pdstemplates.f:56
pdstemplates::pdstemplate
Definition: pdstemplates.f:59
pdstemplates::getpdsindex
integer function getpdsindex(number)
This function returns the index of specified Product Definition Template 4.NN (NN=number) in array te...
Definition: pdstemplates.f:371