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