Introduction
The program EXDEC takes care of the extraction and decoding of the weather reports needed for the construction of the Actual Meteorological Database (AMD). The input for the EXDEC program consists of a file named GTS:Iyymmdd.DAT (yy=year, mm=month, dd=day). This file contains the MAIN-hour and INTERMEDIATE-hour SYNOP (FM 12-VIII) and METAR (FM 15-VIII) reports of all countries of interest of one day, received through the GTS (Global Telecommunication System). In this chapter the tasks performed by the EXDEC program are described.
Bulletin-checking
Before extracting the weather observations from the file GTS:I yymmdd .DAT the EXDEC program checks the bulletins on specific errors and removes these errors. Note that this is not a check on the correctness of the observations (see chapter 3), but a check on the correctness of the bulletin construction.
First a bulletin (regardless whether it is a SYNOP or METAR) is checked on:
- the presence of empty lines , which are removed from the bulletin;
- the presence of the NNNN sequence at the end of the bulletin, which is removed from the bulletin;
- the presence of lines which only contain an =-sign . The =-sign is moved to the end of the previous line and the empty line thus created is removed from the bulletin;
- the presence of single or multiple spaces at the beginning of a line, which are removed from the bulletin.
After this step the program checks whether the bulletin is a SYNOP-report or a METAR-report, and SYNOP-checking or METAR-checking is performed.
SYNOP-checking
The SYNOP-report is checked consecutively on:
- the presence and correctness of the AAXX identification, which is added when missing or modified when wrong;
- the presence of the sequence 100EEE , which is removed;
- the presence of alphabetical characters (except AAXX and NIL), which are converted to their telex number equivalent;
- the presence of commas , which are replaced by spaces;
- the presence of strange characters in front or at the end of a group which does not consist of 5 digits. These characters are replaced by spaces;
- mutilation of the 333 identification group (e.g. '3 3 3' or ' 33 '), which is corrected;
- the presence of single characters , which are replaced by a single space;
- the presence of multiple spaces , which are reduced to a single space;
- the presence of groups of 8, 10 and 11 characters (i.e. an identification group attached to a normal group, two normal groups attached to each other or two normal groups not separated by a space), which are separated into two groups;
- the presence of a double =-sign at the end of a line, which is reduced to a single one.
After this step the corrected SYNOP-report is ready for the actual data extraction.
METAR-checking
Since mistakes in a METAR-report are very rare, the METAR-report is only checked on:
- the presence of multiple spaces, which are reduced to a single space.
After this step the corrected METAR-report is ready for the data extraction.
Data extraction
The objective of the data extraction process is to select only those observations from the bulletins which are of importance for the construction of the Actual Meteorological Database. In Appendix A a list of meteorological stations is given. Each station is marked with an F or an S which denotes its status concerning the construction of the database. Observations of stations marked with:
- F: are not decoded because these stations are not located in the area of interest;
- S: are decoded and will become part of the AMD if on the day under consideration: - at least the 6 and 18 UTC bulletins are provided;
- at least values for air temperature, dew-point temperature, wind speed, total cloud cover, pressure and precipitation are reported.
The result of the data extraction process is that the coded observations of the stations marked with S extracted from the file GTS:Iyymmdd.DAT are added to an intermediate database named CODED. This database consists of three files: an index file (REALDATA:CODED.IDX), a data file (REALDATA:CODED.BIN) and a file with a pointer to the last written datarecord (REALDATA:CODED.PTR). In CODED the extracted MAIN-hour and INTERMEDIATE-hour observations of the past seven days are stored.
The data extraction process follows the same steps for SYNOP-reports and METAR-reports, except for a date-time check on SYNOP-reports: reports older than three days are skipped. The date-time check is not possible for METAR-reports because these reports do not contain the date (only time is included). From the bulletin one line is read, which in principle contains the observations of one station. The program checks if the line contains a complete observation, which is assumed to be the case if one of the following criteria is met:
- the line is the last line in the bulletin
- the line ends with an =-sign
- the line contains the string NIL (only for SYNOP-reports)
- the next line contains the string NIL (only for SYNOP-reports)
- the line and the next line contain together more than 132 characters in a METAR-report and more than 172 characters in a SYNOP-report
- the next line starts with a station number which is legal in this bulletin and the fourth group (the temperature group) starts with '1' (only for SYNOP-reports)
If the observation is complete and also proves to be a real observation (i.e. the line does not contain NIL) the station identification is checked. The station identification must:
- have an integer value in a SYNOP-report or a code in a METAR-report
- be a legal station identification
- be permitted to occur in a bulletin from this country
- not be denoted with an F in the station list (Appendix A)
- not yet be decoded with the same coded observation, or in case of a METAR-report, no SYNOP-report of the same station is decoded already
Only if all foregoing criteria are met the observation is stored in the database CODED and submitted to the decoding procedure.
Data decoding
The observations which are stored in the database CODED are also submitted to the decoding process. After this process the decoded observations are stored in the intermediate database DECODED. This database has the same structure as the database CODED (index file: REALDATA:DECODED.IDX, data file: REALDATA:DECODED.BIN, pointer file: DECODED.PTR) and contains the extracted decoded observations of the past seven days.
SYNOP-decoding
Before decoding a SYNOP-observation the EXDEC program tries to find and correct more errors in the coded observation. The correct structure of an SYNOP-observation is given in Fig. 2.1.
Fig. 2.1. FM 12-VIII, SYNOP - Report of surface observation from a land station. Section 2 contains maritime data and is of no importance.
The observation is checked consecutively on:
- the presence of identical groups after the Nddff group. If two consecutive groups are equal one group is deleted;
- a missing IrIxhVV or Nddff group. If 1snTTT is the third group, 2snTdTdTd the fourth group and 3PoPoPoPo or 4PPPP the fifth group a dummy group '///// ' or two dummy groups '///// ///// ' are inserted;
- the presence of no more than three groups before the 1snTTT group. If 1snTTT is the fifth group, 2snTdTdTd the sixth group and 3PoPoPoPo or 4PPPP the seventh group there is one group to many. The double group is removed, and if no double group is found the fourth group is removed;
- the presence of a '1' as first character of the fourth group (1snTTT). If no '1' is present and the fifth group is 2snTdTdTd a '1' is added in front of the fourth group (when it consists of four characters) or its first character is modified into '1' (when it consists of five characters);
- the presence of a '2' as first character of the fifth group (2snTdTdTd ). If no '2' is present and the fourth group is 1snTTT and the sixth group is 3PoPoPoPo or 4PPPP a '2' added in front of the fifth group or its first character is modified into '2';
- the presence of a '3' as first character of the sixth group (3PoPoPoPo ). If no '3' is present and the fourth group is 1snTTT, the fifth group is 2snTdTdTd and the seventh group is 4PPPP a '3' is added in front of the fifth group or its first character is modified into '3';
- the correctness of the sequence of the groups in section 1 . A wrong sequence is modified whenever there is no doubt about the mistake, otherwise the groups at wrong positions are ignored;
- the presence and position of the 333 identification group . If this group is missing it is inserted, and if it is at a wrong position it is moved to the correct position;
- the presence of a 1snTxTxTx group or a 2snTnTnTn group in section 3 of the 6 UTC and 18 UTC bulletin and the correctness of the identifiers of these groups. A '1' as identifier in the 6 UTC bulletin is modified into a '2' when the next group does not start with a '2' (some countries provide both 1snTxTxTx and 2snTnTnTn in the 6 UTC bulletin). A '2' as identifier in the 18 UTC bulletin is always modified into a '1'.
After this enhancement procedure the observation is decoded. Decoded values are obtained for the elements listed in table II.1. Derived values are computed from observed values using the equations given in Appendix B. All values are stored in the database DECODED.
Table II.1. Elements which are decoded or derived from a SYNOP-report.
| Element |
Description |
Units |
| Observed |
|
|
| IIIii |
Station number |
code |
| h |
Height of the base of the lowest cloud |
code |
| VV |
Horizontal visibility |
code (codes 90-99 are converted: 90=0, 91=1, 92=2, 93=5, 94=10, 95=20, 96=40, 97=60, 98=70, 99=84 ) |
| N |
Total cloud cover |
oktas |
| dd |
Wind direction |
degrees |
| ff |
Wind speed (at 10 metres) |
knots |
| TTT |
Air temperature |
°C |
| TdTdTd |
Dew-point temperature |
°C |
| UUU |
Relative humidity |
% |
| PoPoPoPo |
Pressure at station level |
hPa |
| PPPP |
Pressure at sea level |
hPa |
| a |
Characteristic of pressure tendency during the three hours preceding the time of observation |
code |
| ppp |
Amount of pressure tendency at station level in the three hours preceding the observation time |
hPa |
| RRR |
Amount of precipitation fallen during the period preceding observation time, as indicated by tR |
millimetres |
| tR |
Duration of period of reference for amount of precipitation |
hours |
| ww |
Present weather |
code |
| W1 |
Past weather |
code |
| W2 |
Past weather |
code |
| Nh |
Amount of CL clouds present or, if no CL cloud is present, the amount of CM cloud present |
oktas |
| CL |
Clouds of genera Stratocumulus, Stratus, Cumulus, and Cumulonimbus |
code |
| CM |
Clouds of genera Altocumulus, Altostratus and Nimbostratus |
code |
| CH |
Clouds of genera Cirrus, Cirrocumulus and Cirrostratus |
code |
| Observed |
|
|
| TxTxTx |
Maximum temperature |
° C |
| TnTnTn |
Minimum temperature |
° C |
| 55j2j3j4 |
Duration of sunshine |
hours |
| E |
State of the soil |
code |
| |
|
|
| Derived |
|
|
| PoPoPoPo |
Pressure at station level |
hPa |
| Tw |
Wet bulb temperature |
° C |
| Θw |
Wet bulb potential temperature |
° C |
| NS |
Amount of shadow clouds |
oktas |
| RH |
Relative humidity |
% |
| e |
Vapor pressure |
hPa |
| Δe |
Vapor pressure deficit |
hPa |
| δes/δT |
Slope of saturation vapor pressure vs. temperature curve |
hPa/ ° C |
METAR-decoding
The structure of a METAR-observation is given in Fig. 2.2. The observation is directly subjected to the decoding procedure, in which decoded values are obtained for the elements listed in table II.2. Derived values are computed from observed values as described in Appendix B. All values are stored in the database DECODED.
Fig. 2.2. FM 15-VIII, METAR - Aviation routine weather report.
Table II.2. Elements which are decoded or derived from a METAR-report.
| Element |
Description |
Units |
| Observed |
|
|
| CCCC |
Station code |
code |
| GGgg |
Time of observation |
Hours and minutes (UTC) |
| ddd |
Wind direction |
degrees |
| ff |
Wind speed (at 10 metres) |
knots |
| VVVV |
Horizontal visibility |
code (converted from metres to VV-code in SYNOP-report) |
| N |
Total cloud cover (addition of N s of C L , C M and C H clouds) |
oktas |
| CAVOK |
Word replacing visibility, present weather and cloud data under specified conditions |
VV = 60
ww = 1
N = 1 |
| w'w' |
Significant present and forecast weather |
code (converted from text to ww-code in SYNOP-report according to table II.3) |
| T'T' |
Air temperature |
° C |
| Td'Td' |
Dew-point temperature |
° C |
| PHPHPHPH |
Pressure at station level |
hPa |
| |
|
|
| Derived |
|
|
| PoPoPoPo |
Pressure at station level |
hPa |
| Tw |
Wet bulb temperature |
° C |
| Θw |
Wet bulb potential temperature |
° C |
| NS |
Amount of shadow clouds |
oktas |
| RH |
Relative humidity |
% |
| e |
Vapor pressure |
hPa |
| Δe |
Vapor pressure deficit |
hPa |
| δes/δT |
Slope of the saturation vapor pressure vs. temperature curve |
hPa/ ° C |
Table II.3. Translation of weather in METAR-report to ww-code of SYNOP-report.
| METAR |
SYNOP |
METAR |
SYNOP |
METAR |
SYNOP |
| FU |
04 |
-SS |
31 |
+RADZ |
59 |
| HZ |
05 |
-DS |
31 |
-RA |
61 |
| SA |
06 |
SS |
31 |
RA |
63 |
| DU |
07 |
DS |
31 |
+RA |
65 |
| PO |
08 |
+SS |
34 |
-FZRA |
66 |
| RESS |
09 |
+DS |
34 |
FZRA |
67 |
| REDS |
09 |
-MIBLSN |
36 |
+FZRA |
67 |
| BR |
10 |
MIBLSN |
36 |
-RASN |
68 |
| MIBCFG |
11 |
+MIBLSN |
37 |
-SNRA |
68 |
| MIFG |
12 |
-BLSN |
38 |
RASN |
69 |
| VCSH |
16 |
BLSN |
39 |
SNRA |
69 |
| TS |
17 |
+BLSN |
39 |
+RASN |
69 |
| SQ |
18 |
VCFG |
40 |
+SNRA |
69 |
| FC |
19 |
BCFG |
41 |
-SN |
71 |
| REDZ |
20 |
-FG |
43 |
SN |
73 |
| RESG |
20 |
FG |
45 |
+SN |
75 |
| RERA |
21 |
MIFZFG |
48 |
IC |
76 |
| RESN |
22 |
FZFG |
49 |
SG |
77 |
| RERASN |
23 |
-DZ |
51 |
PE |
79 |
| RESNRA |
23 |
DZ |
53 |
-SHRA |
80 |
| REFRRA |
24 |
+DZ |
55 |
-RASH |
80 |
| REFRDZ |
24 |
-FZDZ |
56 |
SHRA |
81 |
| RESHRA |
25 |
FZDZ |
57 |
+SHRA |
81 |
| RESHSN |
26 |
+FZDZ |
57 |
++SHRA |
82 |
| RESHGR |
27 |
-DZRA |
58 |
-SHRASN |
83 |
| RESHGS |
27 |
-RADZ |
58 |
-SHSNRA |
83 |
| RESHPE |
27 |
DZRA |
59 |
SHRASN |
84 |
| REFG |
28 |
+DZRA |
59 |
SHSNRA |
84 |
| RETS |
29 |
RADZ |
59 |
+SHRASN |
84 |
Table II.3. Translation of weather in METAR-report to ww-code of SYNOP-report.
| METAR |
SYNOP |
METAR |
SYNOP |
METAR |
SYNOP |
| +SHSNRA |
84 |
RARETS |
92 |
TSSN |
95 |
| -SHSN |
85 |
+RARETS |
92 |
-TSGR |
96 |
| SHSN |
86 |
-SNRETS |
93 |
-TSPE |
96 |
| +SHSN |
86 |
-GRRETS |
93 |
-TSGS |
96 |
| -SHPE |
87 |
-PERETS |
93 |
TSPE |
96 |
| -SHGS |
87 |
SNRETS |
94 |
TSGS |
96 |
| SHPE |
88 |
+SNRETS |
94 |
+TSRA |
97 |
| SHGS |
88 |
GRRETS |
94 |
+TSSN |
97 |
| +SHPE |
88 |
+GRRETS |
94 |
TSSS |
98 |
| +SHGS |
88 |
PERETS |
94 |
TSDS |
98 |
| -SHGR |
89 |
+PERETS |
94 |
+TSSS |
98 |
| SHGR |
90 |
-TSRA |
95 |
+TSDS |
98 |
| +SHGR |
90 |
-TSSN |
95 |
+TSGR |
98 |
| -RARETS |
91 |
TSRA |
95 |
+TSPE |
98 |
| |
|
|
|
TSGS |
99 |
Messages
Messages generated by the EXDEC program are written to a log file. In table II.4 the possible messages are described. Also, the module which performs the OBSERVATION-checking writes the original observation line and the changed line to the log file if changes are made.
Table II.4. Description of the messages generated by the EXDEC program.
| Message |
Module |
Description |
%I-DEC AAXX <- ->header not
correct <HEADING> |
SYNOP-checking |
Heading SYNOP-report is mutilated |
%I-DEC synop not accepted
<HEADING> |
Data extraction SYNOP |
SYNOP-report older than three days |
| %I-DEC NIL next <HEADING> |
Data extraction SYNOP |
Observation assumed complete: next line contains NIL |
| %I-DEC 172 <HEADING> |
Data extraction SYNOP |
Observation assumed complete: line plus next line exceed 172 characters |
| %I-DEC no next <HEADING> |
Data extraction SYNOP |
Observation assumed complete: next line has legal station number |
| %I-DEC no int <HEADING> |
Data extraction SYNOP |
Station number not an integer |
| %I-DEC no unknown <HEADING> |
Data extraction SYNOP |
Station number unknown |
| %I-DEC no mismatch <HEADING> |
Data extraction SYNOP |
Station number not permitted in bulletin of this country |
| %I-DEC metar not accepted <HEADING> |
Data extraction
METAR |
Invalid hour reference in header |
| %I-DEC code next <HEADING> |
Data extraction METAR |
Observation assumed complete: next line has legal station code |
| %I-DEC 132 <HEADING> |
Data extraction METAR |
Observation assumed complete: line plus next line exceed 132 characters |
| Message |
Module |
Description |
| %I-DEC code unknown <HEADING> |
Data extraction METAR |
Station code unknown |
| %I-DEC code mismatch <HEADING> |
Data extraction METAR |
Station code not permitted in bulletin of this country |
|