23subroutine prlevel(ipdtn, ipdtmpl, labbrev)
26 integer,
intent(in) :: ipdtn
27 integer,
intent(in) :: ipdtmpl(*)
28 character(len = 40),
intent(out) :: labbrev
30 character(len = 10) :: tmpval1, tmpval2
58 if (ipdtmpl(ipos) .eq. 100 .and. &
59 ipdtmpl(ipos + 3) .eq. 255)
then
60 call frmt(tmpval1, ipdtmpl(ipos + 2), ipdtmpl(ipos + 1) + 2)
61 labbrev = trim(tmpval1)//
" mb"
62 elseif (ipdtmpl(ipos) .eq. 100 .and. &
63 ipdtmpl(ipos + 3) .eq. 100)
then
64 call frmt(tmpval1, ipdtmpl(ipos + 2), ipdtmpl(ipos + 1) + 2)
65 call frmt(tmpval2, ipdtmpl(ipos + 5), ipdtmpl(ipos + 4) + 2)
66 labbrev = trim(tmpval1)//
" - "//trim(tmpval2)//
" mb"
67 elseif (ipdtmpl(ipos) .eq. 101)
then
68 labbrev(1:30) =
" Mean Sea Level "
69 elseif (ipdtmpl(ipos) .eq. 102 .and. &
70 ipdtmpl(ipos + 3) .eq. 255)
then
71 call frmt(tmpval1, ipdtmpl(ipos + 2), ipdtmpl(ipos + 1))
72 labbrev = trim(tmpval1)//
" m above MSL"
73 elseif (ipdtmpl(ipos) .eq. 103 .and. &
74 ipdtmpl(ipos + 3) .eq. 255)
then
75 call frmt(tmpval1, ipdtmpl(ipos + 2), ipdtmpl(ipos + 1))
76 labbrev = trim(tmpval1)//
" m above ground"
77 elseif (ipdtmpl(ipos) .eq. 103 .and. &
78 ipdtmpl(ipos + 3) .eq. 103)
then
79 call frmt(tmpval1, ipdtmpl(ipos + 2), ipdtmpl(ipos + 1))
80 call frmt(tmpval2, ipdtmpl(ipos + 5), ipdtmpl(ipos + 4))
81 labbrev = trim(tmpval1)//
" - "//trim(tmpval2)//
" m AGL"
82 elseif (ipdtmpl(ipos) .eq. 104 .and. &
83 ipdtmpl(ipos + 3) .eq. 255)
then
84 call frmt(tmpval1, ipdtmpl(ipos + 2), ipdtmpl(ipos + 1))
85 labbrev = trim(tmpval1)//
" sigma"
86 elseif (ipdtmpl(ipos) .eq. 104 .and. &
87 ipdtmpl(ipos + 3) .eq. 104)
then
88 call frmt(tmpval1, ipdtmpl(ipos + 2), ipdtmpl(ipos + 1))
89 call frmt(tmpval2, ipdtmpl(ipos + 5), ipdtmpl(ipos + 4))
90 labbrev = trim(tmpval1)//
" - "//trim(tmpval2)//
" sigma"
91 elseif (ipdtmpl(ipos) .eq. 105 .and. &
92 ipdtmpl(ipos + 3) .eq. 255)
then
93 call frmt(tmpval1, ipdtmpl(ipos + 2), ipdtmpl(ipos + 1))
94 labbrev = trim(tmpval1)//
" hybrid lvl"
95 elseif (ipdtmpl(ipos).eq.105 .and. &
96 ipdtmpl(ipos + 3).eq.105)
then
97 call frmt(tmpval1, ipdtmpl(ipos + 2), ipdtmpl(ipos + 1))
98 call frmt(tmpval2, ipdtmpl(ipos + 5), ipdtmpl(ipos + 4))
99 labbrev = trim(tmpval1)//
" - "//trim(tmpval2)//
" hybrid lvl"
100 elseif (ipdtmpl(ipos) .eq. 106 .and. &
101 ipdtmpl(ipos + 3) .eq. 255)
then
102 call frmt(tmpval1, ipdtmpl(ipos + 2), ipdtmpl(ipos + 1))
103 labbrev = trim(tmpval1)//
" m below land"
104 elseif (ipdtmpl(ipos).eq.106 .and. &
105 ipdtmpl(ipos + 3).eq.106)
then
106 call frmt(tmpval1, ipdtmpl(ipos + 2), ipdtmpl(ipos + 1))
107 call frmt(tmpval2, ipdtmpl(ipos + 5), ipdtmpl(ipos + 4))
108 labbrev = trim(tmpval1)//
" - "//trim(tmpval2)//
" m DBLY"
109 elseif (ipdtmpl(ipos) .eq. 107)
then
110 labbrev(1:30) =
" Isentropic level"
111 elseif (ipdtmpl(ipos).eq.108 .and. &
112 ipdtmpl(ipos + 3).eq.108)
then
113 call frmt(tmpval1, ipdtmpl(ipos + 2), ipdtmpl(ipos + 1) + 2)
114 call frmt(tmpval2, ipdtmpl(ipos + 5), ipdtmpl(ipos + 4) + 2)
115 labbrev = trim(tmpval1)//
" - "//trim(tmpval2)//
" mb SPDY"
116 elseif (ipdtmpl(ipos) .eq. 110)
then
117 labbrev(1:30) =
" Layer bet 2-hyb lvl"
118 elseif (ipdtmpl(ipos).eq.109 .and. &
119 ipdtmpl(ipos + 3).eq.255)
then
120 call frmt(tmpval1, ipdtmpl(ipos + 2), ipdtmpl(ipos + 1)-6)
121 labbrev = trim(tmpval1)//
" pv surface"
122 elseif (ipdtmpl(ipos) .eq. 111)
then
123 labbrev(1:30) =
" Eta level"
124 elseif (ipdtmpl(ipos) .eq. 114)
then
125 labbrev(1:30) =
" Layer bet. 2-isent."
126 elseif (ipdtmpl(ipos) .eq. 117)
then
127 labbrev(1:30) =
" Mixed layer depth"
128 elseif (ipdtmpl(ipos) .eq. 120)
then
129 labbrev(1:30) =
" Layer bet. 2-Eta lvl"
130 elseif (ipdtmpl(ipos) .eq. 121)
then
131 labbrev(1:30) =
" Layer bet. 2-isob."
132 elseif (ipdtmpl(ipos) .eq. 125)
then
133 labbrev(1:30) =
" Specified height lvl"
134 elseif (ipdtmpl(ipos) .eq. 126)
then
135 labbrev(1:30) =
" Isobaric level"
136 elseif (ipdtmpl(ipos) .eq. 160)
then
137 labbrev(1:30) =
" Depth below sea lvl"
138 elseif (ipdtmpl(ipos) .eq. 170)
then
139 labbrev(1:30) =
" Ionospheric D-region lvl"
140 elseif (ipdtmpl(ipos) .eq. 1)
then
141 labbrev(1:30) =
" Surface "
142 elseif (ipdtmpl(ipos) .eq. 2)
then
143 labbrev(1:30) =
" Cloud base lvl"
144 elseif (ipdtmpl(ipos) .eq. 3)
then
145 labbrev(1:30) =
" Cloud top lvl"
146 elseif (ipdtmpl(ipos) .eq. 4)
then
147 labbrev(1:30) =
" 0 Deg Isotherm"
148 elseif (ipdtmpl(ipos) .eq. 5)
then
149 labbrev(1:30) =
" Level of adiabatic"
150 elseif (ipdtmpl(ipos) .eq. 6)
then
151 labbrev(1:30) =
" Max wind lvl"
152 elseif (ipdtmpl(ipos) .eq. 7)
then
153 labbrev(1:30) =
" Tropopause"
154 elseif (ipdtmpl(ipos) .eq. 8)
then
155 labbrev(1:30) =
" Nom. top"
156 elseif (ipdtmpl(ipos) .eq. 9)
then
157 labbrev(1:30) =
" Sea Bottom"
158 elseif (ipdtmpl(ipos) .eq. 10)
then
159 labbrev(1:30) =
" Entire Atmosphere"
160 elseif (ipdtmpl(ipos) .eq. 11)
then
161 labbrev(1:30) =
" Cumulonimbus Base"
162 elseif (ipdtmpl(ipos) .eq. 12)
then
163 labbrev(1:30) =
" Cumulonimbus Top"
164 elseif (ipdtmpl(ipos) .eq. 20)
then
165 labbrev(1:30) =
" Isothermal level"
166 elseif (ipdtmpl(ipos) .eq. 200)
then
167 labbrev(1:30) =
" Entire Atmosphere"
168 elseif (ipdtmpl(ipos) .eq. 201)
then
169 labbrev(1:30) =
" Entire ocean"
170 elseif (ipdtmpl(ipos) .eq. 204)
then
171 labbrev(1:30) =
" Highest Frz. lvl"
172 elseif (ipdtmpl(ipos) .eq. 206)
then
173 labbrev(1:30) =
" Grid scale cloud bl"
174 elseif (ipdtmpl(ipos) .eq. 207)
then
175 labbrev(1:30) =
" Grid scale cloud tl"
176 elseif (ipdtmpl(ipos) .eq. 209)
then
177 labbrev(1:30) =
" Boundary layer cbl"
178 elseif (ipdtmpl(ipos) .eq. 210)
then
179 labbrev(1:30) =
" Boundary layer ctl"
180 elseif (ipdtmpl(ipos) .eq. 211)
then
181 labbrev(1:30) =
" Boundary layer cl"
182 elseif (ipdtmpl(ipos) .eq. 212)
then
183 labbrev(1:30) =
" Low cloud bot. lvl"
184 elseif (ipdtmpl(ipos) .eq. 213)
then
185 labbrev(1:30) =
" Low cloud top lvl"
186 elseif (ipdtmpl(ipos) .eq. 214)
then
187 labbrev(1:30) =
" Low cloud layer"
188 elseif (ipdtmpl(ipos) .eq. 215)
then
189 labbrev(1:30) =
" Cloud ceiling"
190 elseif (ipdtmpl(ipos) .eq. 220)
then
191 labbrev(1:30) =
" Planetary boundary"
192 elseif (ipdtmpl(ipos) .eq. 221)
then
193 labbrev(1:30) =
" Layer 2 Hybrid lvl "
194 elseif (ipdtmpl(ipos) .eq. 222)
then
195 labbrev(1:30) =
" Mid. cloud bot. lvl"
196 elseif (ipdtmpl(ipos) .eq. 223)
then
197 labbrev(1:30) =
" Mid. cloud top lvl"
198 elseif (ipdtmpl(ipos) .eq. 224)
then
199 labbrev(1:30) =
" Middle cloud layer"
200 elseif (ipdtmpl(ipos) .eq. 232)
then
201 labbrev(1:30) =
" High cloud bot. lvl"
202 elseif (ipdtmpl(ipos) .eq. 233)
then
203 labbrev(1:30) =
" High cloud top lvl"
204 elseif (ipdtmpl(ipos) .eq. 234)
then
205 labbrev(1:30) =
" High cloud layer"
206 elseif (ipdtmpl(ipos) .eq. 235)
then
207 labbrev(1:30) =
" Ocean Isotherm lvl"
208 elseif (ipdtmpl(ipos) .eq. 236)
then
209 labbrev(1:30) =
" Layer 2-depth below"
210 elseif (ipdtmpl(ipos) .eq. 237)
then
211 labbrev(1:30) =
" Bot. Ocean mix. lyr"
212 elseif (ipdtmpl(ipos) .eq. 238)
then
213 labbrev(1:30) =
" Bot. Ocean iso. lyr"
214 elseif (ipdtmpl(ipos) .eq. 239)
then
215 labbrev(1:30) =
" layer ocean sfc 26C"
216 elseif (ipdtmpl(ipos) .eq. 240)
then
217 labbrev(1:30) =
" Ocean Mixed Layer"
218 elseif (ipdtmpl(ipos) .eq. 241)
then
219 labbrev(1:30) =
" Order Seq. Of Data"
220 elseif (ipdtmpl(ipos) .eq. 242)
then
221 labbrev(1:30) =
" Con. cloud bot. lvl"
222 elseif (ipdtmpl(ipos) .eq. 243)
then
223 labbrev(1:30) =
" Con. cloud top lvl"
224 elseif (ipdtmpl(ipos) .eq. 244)
then
225 labbrev(1:30) =
" Conv. cloud layer"
226 elseif (ipdtmpl(ipos) .eq. 245)
then
227 labbrev(1:30) =
" Lowest lvl wet bulb"
228 elseif (ipdtmpl(ipos) .eq. 246)
then
229 labbrev(1:30) =
" Max. equi. potential"
230 elseif (ipdtmpl(ipos) .eq. 247)
then
231 labbrev(1:30) =
" Equilibrium level"
232 elseif (ipdtmpl(ipos) .eq. 248)
then
233 labbrev(1:30) =
" Shallow con. cld bl"
234 elseif (ipdtmpl(ipos) .eq. 249)
then
235 labbrev(1:30) =
" Shallow con. cld tl"
236 elseif (ipdtmpl(ipos) .eq. 251)
then
237 labbrev(1:30) =
" Deep conv. cld bl"
238 elseif (ipdtmpl(ipos) .eq. 252)
then
239 labbrev(1:30) =
" Deep conv. cld tl"
240 elseif (ipdtmpl(ipos) .eq. 253)
then
241 labbrev(1:30) =
" Lowest bot. lvl sup"
242 elseif (ipdtmpl(ipos) .eq. 254)
then
243 labbrev(1:30) =
" highest top lvl sup"
245 write(labbrev, fmt =
'(1x,I4," (Unknown Lvl)")') ipdtmpl(ipos)
296subroutine prvtime(ipdtn, ipdtmpl, listsec1, tabbrev)
299 integer,
intent(in) :: ipdtn
300 integer,
intent(in) :: ipdtmpl(*), listsec1(*)
301 character(len = 110),
intent(out) :: tabbrev
303 character(len = 16) :: reftime, endtime
304 character(len = 12) :: tmpval2
305 character(len = 12) :: tmpval
306 character(len = 10) :: tunit
307 integer,
dimension(200) :: ipos, ipos2
308 integer :: is, itemp, itemp2, iunit, iuni2t2, iunit2, iutpos, iutpos2, j
310 data ipos /7*0, 16, 23, 17, 19, 18, 32, 31, 27*0, 17, 20, 0, 0, 22, &
313 data ipos2 /7*0, 26, 33, 27, 29, 28, 42, 41, 27*0, 22, 30, 0, 0, 32, &
319 if ((ipdtn .ge. 0 .and. ipdtn .le. 15) .or. ipdtn .eq. 32 &
320 .or. ipdtn .eq. 50 .or. ipdtn .eq. 51 &
321 .or. ipdtn .eq. 91)
then
323 elseif (ipdtn .ge. 40 .and. ipdtn .le. 43)
then
325 elseif (ipdtn .ge. 44 .and. ipdtn .le. 47)
then
327 elseif (ipdtn .eq. 48)
then
329 elseif (ipdtn .eq. 52)
then
336 selectcase(ipdtmpl(iutpos))
364 if (ipdtn .eq. 0)
then
368 iutpos2 = ipos2(ipdtn)
369 if (iutpos2 .gt. 0)
then
370 selectcase(ipdtmpl(iutpos2))
391 write(reftime, fmt =
'(i4,3i2.2,":",i2.2,":",i2.2)') (listsec1(j), j = 6, 11)
392 itemp = abs(ipdtmpl(iutpos + 1)) * iunit
393 write(tmpval,
'(I0)') itemp
394 write(tabbrev, fmt =
'("valid at ", i4)') ipdtmpl(iutpos + 1)
397 if ((ipdtn .ge. 0 .and. ipdtn .le. 7) .or. ipdtn .eq. 15 &
398 .or. ipdtn .eq. 20 .or. (ipdtn .ge. 30 .and. ipdtn .le. 32) &
399 .or. ipdtn .eq. 40 .or. ipdtn .eq. 41 .or. ipdtn .eq. 44 &
400 .or. ipdtn .eq. 45 .or. ipdtn .eq. 48 .or. &
401 (ipdtn .ge. 50 .and. ipdtn .le. 52))
then
402 tabbrev =
"valid " // trim(tmpval) //
" " // trim(tunit) //
" after " // reftime
405 write(endtime, fmt =
'(i4,3i2.2,":",i2.2,":",i2.2)') (ipdtmpl(j), j = is, is + 5)
406 itemp2 = abs(ipdtmpl(iutpos2 + 1)) * iunit2
407 itemp2 = itemp + itemp2
408 write(tmpval2,
'(I0)') itemp2
409 if (ipdtn .eq. 8 .and. ipdtmpl(9) .lt. 0)
then
410 tabbrev =
"(" // trim(tmpval) //
" -" &
411 // trim(tmpval2) //
") valid " // trim(tmpval) // &
412 " " // trim(tunit) //
" before " &
413 // reftime //
" to " //endtime
414 elseif ((ipdtn .ge. 8 .and. ipdtn .le. 14) .or. &
415 (ipdtn .ge. 42 .and. ipdtn .le. 47) .or. &
417 tabbrev =
"(" // trim(tmpval) //
" -" &
418 // trim(tmpval2) //
" hr) valid " // trim(tmpval) // &
419 " " // trim(tunit) //
" after " &
420 // reftime //
" to " // endtime