da_fm_decoder.inc

References to this file elsewhere.
1 subroutine da_fm_decoder (fm, platform, synop, ship,  metar, pilot, sound,   &
2                                       satem, satob, airep, gpspw, gpsref,  &
3                                       ssmi_retrieval, ssmi_tb, ssmt1, ssmt2, &
4                                       qscat,profiler, buoy, other)
5 
6    !---------------------------------------------------------------------------  
7    ! Purpose: Given the WMO code fm, return the observation platform type and 
8    ! increment the corresponding counter if present.
9    !
10    ! Returned platforms are reduced to 10 output classes:
11    !
12    !   Name    WMO Codes     WMO Code names
13    !   synop    12,14       'SYNOP','SYNOP MOBIL'
14    !   ship     13, 17      'SHIP'
15    !   metar    15,16       'METAR','SPECI'
16    !   pilot    32,33,34    'PILOT','PILOT SHIP','PILOT MOBIL'
17    !   sound    35,36,37,38 'TEMP','TEMP SHIP, 'TEMP DROP','TEMP MOBIL'
18    !   satem    86          'SATEM'
19    !   satob    88          'SATOB'
20    !   airep    42, 96,97   'AIREP', 'AMDAR'
21    !   gpspw    111         'GPSPW'
22    !   gpsztd   114         'GPSZD'
23    !   gpsref   116         'GPSRF'
24    !   ssmi_retrieval 125         'SSMI_RETRIEVAL'
25    !   ssmi_tb  126         'SSMI_TB'
26    !   SSM/T1   121         'SSMT1'
27    !   SSM/T2   122         'SSMT2'
28    !   QSCAT    281         'QSCAT'
29    !   Profiler 132         'PROFI'
30    !   Buoy     18,19       'BUOY '
31    !   other      Any other code
32    !----------------------------------------------------------------------------
33 
34     implicit none
35 
36     integer,              intent (in)    :: fm
37     character (LEN = 40), intent (out)   :: platform
38     integer, optional,    intent (inout) :: synop, ship,  metar, &
39                                             pilot, sound, satem, &
40                                             satob, airep, gpspw, &
41                                             ssmi_retrieval, ssmi_tb,&
42                                             ssmt1, ssmt2, qscat, &
43                                             profiler, buoy, gpsref, &
44                                             other
45 
46    if (trace_use_frequent) call da_trace_entry("da_fm_decoder")
47 
48    select case(fm)
49 
50       !  Report of surface observations from a fixed land station
51 
52       case (12) ; platform = 'SYNOP'
53          if (present (synop)) synop = synop + 1
54 
55       !  Report of surface observations from a sea station
56 
57       case (13) ; platform = 'SHIP'
58          if (present (ship)) ship  = ship + 1
59 
60       !  Report of surface observations from a mobile land station
61 
62       case (14) ; platform = 'SYNOP MOBIL'
63          if (present (synop)) synop  = synop + 1
64 
65       !  Aviation routine weather report (with/without trend forecast)
66 
67       case (15) ; platform = 'METAR'
68          if (present (metar)) metar  = metar + 1
69 
70       !  Aviation selected special weather report 
71       !  (with/without trend forecast)
72 
73       case (16) ; platform = 'SPECI'
74          if (present (metar)) metar  = metar + 1
75 
76       !  Report of buoy observation
77 
78       case (18,19) ; platform = 'BUOY'
79          if (present (buoy)) buoy  = buoy + 1
80 
81       !  Report of ground radar weather observation
82 
83       case (20) ; platform = 'RAdoB'
84          if (present (other)) other  = other + 1
85 
86       !  Radiological data report (monitored on a routine basis and/or 
87       !  in case of accident
88 
89       case (22) ; platform = 'RADREP'
90          if (present (other)) other  = other + 1
91 
92       !  Upper-wind report from a fixed land station
93 
94       case (32) ; platform = 'PILOT'
95          if (present (pilot)) pilot = pilot + 1
96 
97       !  Upper-wind report from a sea station
98 
99       case (33) ; platform = 'PILOT SHIP'
100          if (present (pilot)) pilot = pilot + 1
101 
102       !  Upper-wind report from a mobile land station
103 
104       case (34) ; platform = 'PILOT MOBIL'
105          if (present (pilot)) pilot = pilot + 1
106 
107       !  Upper-level pressure, temperature, humidity and wind report 
108       !  from a fixed land station
109 
110       case (35) ; platform = 'TEMP'
111          if (present (sound)) sound = sound + 1
112 
113       !  Upper-level pressure, temperature, humidity and wind report 
114       !  from a sea station
115 
116       case (36) ; platform = 'TEMP SHIP'
117          if (present (sound)) sound = sound + 1
118 
119       !  Upper-level pressure, temperature, humidity and wind report 
120       !  from a sonde released by carrier balloons and aircraft
121 
122       case (37) ; platform = 'TEMP DROP'
123          if (present (sound)) sound = sound + 1
124 
125       !  Upper-level pressure, temperature, humidity and wind report 
126       !  from a mobile land station
127 
128       case (38) ; platform = 'TEMP MOBIL'
129          if (present (sound)) sound = sound + 1
130 
131       !  Upper-level temperature, wind and air density from a land 
132       !  rocketsonde station
133 
134       case (39) ; platform = 'ROCOB'
135          if (present (other)) other = other + 1
136 
137       !  Upper-level temperature, wind and air density from a 
138       !  rocketsonde station on a ship
139 
140       case (40) ; platform = 'ROCOB SHIP'
141          if (present (other)) other = other + 1
142 
143       !  Upper-air report from an aircraft 
144       !  (other than weather reconnaissance aircraft)
145 
146       case (41) ; platform = 'CODAR'
147          if (present (other)) other = other + 1
148 
149       !  Aircraft report (aircraft meteorological data relay)
150 
151       case (42) ; platform = 'AMDAR'
152          if (present (airep)) airep = airep + 1
153 
154       !  Ice analysis
155 
156       case (43) ; platform = 'ICEAN'
157          if (present (other)) other = other + 1
158 
159       !  Analysis in full form
160 
161       case (45) ; platform = 'IAC'
162          if (present (other)) other = other + 1
163 
164       !  Analysis in abbreviated form
165 
166       case (46) ; platform = 'IAC FLEET'
167          if (present (other)) other = other + 1
168 
169       !  Processed data in form of grid-point values
170 
171       case (47) ; platform = 'GRID'
172          if (present (other)) other = other + 1
173 
174       !  Processed data in form of grid-point values (abbreviated code form)
175 
176       case (49) ; platform = 'GRAF'
177          if (present (other)) other = other + 1
178 
179       !  Forecast upper wind and temperature for aviation
180 
181       case (50) ; platform = 'WinTEM'
182          if (present (other)) other = other + 1
183 
184       !  Aerodrome forecast
185 
186       case (51) ; platform = 'TAF'
187          if (present (other)) other = other + 1
188 
189       !  Area forecast for aviation
190 
191       case (53) ; platform = 'ARFOR'
192          if (present (other)) other = other + 1
193 
194       !  Route forecast for aviation
195 
196       case (54) ; platform = 'ROFOR'
197          if (present (other)) other = other + 1
198 
199       !  Radiological trajectory dose forecast 
200       !  (defined time of arrival and location)
201 
202       case (57) ; platform = 'RAdoF'
203          if (present (other)) other = other + 1
204 
205       !  Forecast for shipping
206 
207       case (61) ; platform = 'MAFOR'
208          if (present (other)) other = other + 1
209 
210       !  Report of marine surface observations along a ship's track
211 
212       case (62) ; platform = 'TRACKOB'
213          if (present (other)) other = other + 1
214 
215       !  Report of bathymetrical observation
216 
217       case (63) ; platform = 'BATHY'
218          if (present (other)) other = other + 1
219 
220       !  Temperature salinity and current report from a sea station
221 
222       case (64) ; platform = 'TRESAC'
223          if (present (other)) other = other + 1
224 
225       !  Report of spectral wave information from sea station or from
226       !  a remote platform (airecraft or satellite)
227 
228       case (65) ; platform = 'WAVEOB'
229          if (present (other)) other = other + 1
230 
231       !  Report of hydrological observations from a hydrological station
232 
233       case (66) ; platform = 'HYDRA'
234          if (present (other)) other = other + 1
235 
236       !  Hydrological forecast
237 
238       case (67) ; platform = 'HYFOR'
239          if (present (other)) other = other + 1
240 
241       !  Report of monthly values from a land station
242 
243       case (71) ; platform = 'CLIMAT'
244          if (present (other)) other = other + 1
245 
246       !  Report of monthly means and total from an ocean weather station
247 
248       case (72) ; platform = 'CLIMAT SHIP'
249          if (present (other)) other = other + 1
250 
251       !  Report of monthly means for an oceanic area
252 
253       case (73) ; platform = 'NACLI CLinP SPLCI CLISA inCLI'
254          if (present (other)) other = other + 1
255 
256       !  Report of monthly aerological means from a land station
257 
258       case (75) ; platform = 'CLIMAT TEMP'
259          if (present (other)) other = other + 1
260 
261       !  Report of monthly aerological means from an ocean weather station
262 
263       case (76) ; platform = 'CLIMAT TEMP SHIP'
264          if (present (other)) other = other + 1
265 
266       !  Synoptic report of bearings of sources of atmospherics
267 
268       case (81) ; platform = 'SFAZI'
269          if (present (other)) other = other + 1
270 
271       !  Synoptic report of the geographical location of sources of 
272       !  atmopsherics
273 
274       case (82) ; platform = 'SFLOC'
275          if (present (other)) other = other + 1
276 
277       !  Detailed report of the distribution of sources of atmospherics
278       !  by bearings for any period up to including 24 hours
279 
280       case (83) ; platform = 'SFAZU'
281          if (present (other)) other = other + 1
282 
283       !  Report of synoptic interpretation of cloud data obtained by a
284       !  meteorlogical satellite
285 
286       case (85) ; platform = 'SAREP'
287          if (present (other)) other = other + 1
288 
289       !  Report of satellite remote upper-air soundings of 
290       !  pressure, temperature and humidity
291 
292       case (86) ; platform = 'SATEM'
293          if (present (satem)) satem = satem + 1
294 
295       !  Report of satellite clear radiance observations
296 
297       case (87) ; platform = 'SARAD'
298          if (present (other)) other = other + 1
299 
300       !  Report of satellite remote upper-air soundings of 
301       !  pressure, temperature and humidity
302 
303       case (88) ; platform = 'SATOB'
304          if (present (satob)) satob = satob + 1
305 
306       !  Airep reports (not a WMO report)
307 
308       case (96:97) ; platform = 'AIREP'
309          if (present (airep)) airep = airep + 1
310 
311       !  GPS Precipitable Water Vapor or GPS Zineth Total Delay
312       !  (not a WMO report)
313 
314       case (111) ; platform = 'GPSPW'
315          if (present (gpspw)) gpspw = gpspw + 1
316       case (114) ; platform = 'GPSZD'
317          if (present (gpspw)) gpspw = gpspw + 1
318 
319       !  GPS Refractivity (not a WMO report)
320 
321       case (116) ; platform = 'GPSRF'
322          if (present (gpsref)) gpsref = gpsref + 1
323 
324       case (121) ; platform = 'SSMT1'
325          if (present (ssmt1)) ssmt1 = ssmt1 + 1
326 
327       case (122) ; platform = 'SSMT2'
328          if (present (ssmt2)) ssmt2 = ssmt2 + 1
329 
330       case (125) ; platform = 'SSMI_RETRIEVAL'
331          if (present (ssmi_retrieval)) ssmi_retrieval = ssmi_retrieval + 1
332 
333       case (126) ; platform = 'SSMI_TB'
334          if (present (ssmi_tb)) ssmi_tb = ssmi_tb + 1
335 
336       case (281) ; platform = 'QSCAT'
337          if (present (qscat)) qscat = qscat + 1
338 
339       case (132) ; platform = 'PROFI'
340          if (present (profiler)) profiler = profiler + 1
341       !  Others
342 
343       case default;
344                    platform = 'UNKNOWN'
345           if (present (other)) other = other + 1
346 
347    end select
348 
349    !  Reduce the platform name to one of the 10 classes
350 
351    select case (trim (platform))
352 
353       case ('SYNOP','SYNOP MOBIL');                       platform = "SYNOP";
354       case ('SHIP');                                      platform = "SHIP";
355       case ('METAR','SPECI');                             platform = "METAR";
356       case ('PILOT','PILOT SHIP','PILOT MOBIL');          platform = "PILOT";
357       case ('TEMP','TEMP SHIP','TEMP DROP','TEMP MOBIL'); platform = "SOUND";
358       case ('SATEM');                                     platform = "SATEM";
359       case ('SATOB');                                     platform = "SATOB";
360       case ('AIREP');                                     platform = "AIREP";
361       case ('OTHER');                                     platform = "OTHER";
362       case ('BUOY');                                      platform = "BUOY";
363       case ('PROFI');                                     platform = "PROFI";
364       case default;                                       platform = "OTHER";
365 
366    end select
367 
368    if (trace_use_frequent) call da_trace_exit("da_fm_decoder")
369      
370 end subroutine da_fm_decoder 
371 
372