XML_for_observations..

advertisement
21.8.2012
Description of XML-format for export of observations in the Sochi region
File name
Described in this document output XML-files with collected observations are formed at the
project server with a fixed customizable time frequency. Each file contains all station
observations received within the latest predefined time slot.
XML-file name corresponds to a moment of file writing. It is formed as follows:
YYYYZZDDHHMMSS.xml,
where:
YYYY - year; ZZ - month; DD - day; HH - hour; MM - minutes; SS – seconds.
Delayed observations (if any) are written into files YYYYZZDDHHMMSS.1.xml,
YYYYZZDDHHMMSS.2.xml, … etc.).
File structure
Each file contains a message with the following nested structure: root element («message») ->
station («station») -> time block («report») -> meteorological parameters («parameter»).
Each message starts with declaration of XML version and document encoding:
<?xml version="1.0" encoding="UTF-8" ?>
It is followed by the root document element <message> indicating the beginning of the
information part of the message.
A message consists of several sections. Each section contains information for one
meteorological station. Number of sections corresponds to the number of stations.
Each section is confined by tags of section beginning and end:
<station ID="index" > …. </station> .
Here “index” is a station identifier. This is a standard 5-digit meteorological station index, if it
is available. Otherwise, this is an internal numeric station identifier (takes values <1000) from
the project data base (List of internal identifiers is available in the attached .xls-file).
Optional descriptors of element station:
Lon, Lat, Z, Name, Provider – longitude, latitude (in degrees in the form of real values),
altitude above the sea level (integer [m]), station name, information provider (e.g., «I» IRAM, «RH» - Roza-Khutor, «L» - Lanit, «M» - Megafon, «S» - SYNOP stations etc.).
Example: <station ID="26004" Lon=".." Lat=".." Z=".." > …. </station> .
Each station section contains time blocks with description of observed meteorological
parameters.
Date and time of observations within a time block are formed in accordance with ISO8601
standard requirements with indication of a time zone.
Example:
<report TIME="24-02-2012T07:40:03+00:00" >
… description of meteorological parameters …
1
</report>.
There are two kinds of transmitted meteorological variables – instantaneous values and values
associated with some time interval (for example, mean wind speed or gusts). To correctly
interpret the observations, for interval variables the corresponding time slot must be defined in
the XML-file.
It is implied that the end of time interval coincides with the time presented in <report
TIME="..." >.
Each meteorological variable is described by one ore several specifiers of parameter element
(see Table 1):
<parameter .. specifiers of a meteorological variable >
value of a meteorological variable
</parameter>.
The basic specifier VAR presents a name of meteorological parameter. Other specifiers are used
when there is such a need to specify the basic description of a meteorological variable (e.g.,
indication of vertical level of measurements; precipitation phase etc.).
For interval variables description of a meteorological variable is supplemented by the specifier
PROC of processing type (MIN, MAX or average value AVE; accumulated total for a fixed time
interval - SUM; accumulated total for a period from some fixed moment in the past - ACC) and a
specifier of time interval in the integer form with indication (without a delimiter) of
measurement units (“M” – minutes, “H” - hours).
The lists of parameters and their specifiers can be expanded.
If some specifier value is not used, this specifier can be omitted or its value can be replaced by
the data absence identifier «*».
XML-file is terminated by the closing tag </message> .
Example of XML-file:
<?xml version="1.0" encoding="utf-8" ?>
<message>
<station ID="37093" LAT="43.9097" LON="39.3381" Z="9">
<report TIME="24-02-2012T07:40:03+00:00" >
<parameter VAR="TA" > 3.1 </parameter>
<parameter VAR="TG" Z= "20C"> 2.5 </parameter>
<parameter VAR="TD" > 2.7 </parameter>
<parameter VAR="WD" PROC="AVE" T="10M" > 32 </parameter>
<parameter VAR="WS" PROC="AVE" T="10M" > 6 </parameter>
<parameter VAR="P" TYPE="L" PROC="SUM" T="1H" > 3.2 </parameter>
<parameter VAR="PI" TYPE="L" PROC="MAX" T="1H" > 5 </parameter>
<parameter VAR="P" PROC="ACC" > 167 </parameter>
<parameter VAR="P" PROC="SUM" T="1H" > 2 </parameter>
<parameter VAR="PI" PROC="MAX" T="10M" > 3 </parameter>
<parameter VAR="V" PROC="MIN" > 5400 </parameter>
</report>
</station>
2
</message>
3
Table 1
Parameter
name
WS
Meteorological
Possible
parameters and
specifiers
units
Wind Speed [m/s] PROC,
T
TYPE,
Z,
QC
Possible values of specifiers and comments
PROC – specifier of processing type for data
sequence within a specified time interval. Possible
values of PROC:
INS (default) – instantaneous value, MIN –
minimal value, MAX – maximal value, AVE –
temporal average value for the period specified by
specifier T.
T – specifier of the time interval duration and unit
of its measurement («H» - hours, «M» - minutes,
«S» - seconds) without a delimiter. Default value T="0M" (instantaneous value).
TYPE – specifier of wind speed component:
“0” (default) – for horizontal wind component;
“1” – for vertical wind component (WS is positive
for up-going wind component).
Z – height of observations above the ground and
the unit of its measurement («M» - meters, «C» centimetres) without a delimiter. For wind speed
the default value is Z=”10M”.
WD
TA
Wind Direction
[°]
Air Temperature
[°C]
PROC,
T, Z, QC
PROC,
T,
Z,
QC
QC – quality control flag:
QC=”0” – no quality control was applied
(default);
QC=”1” – data passed quality control, but
information is suspicious;
QC=”5” – data passed quality control.
Negative values of the flag – data did not pass the
quality control.
Possible values of specifiers PROC, Z, T, QC – as
for WS.
Possible values of specifiers PROC, T, QC – as
for WS.
TC
Comfort
Temperature [°C]
PROC,
T, Z, QC
Z – height of observations above the ground and
the unit of its measurement («M» - meters, «C» centimetres) without a delimiter. For TA the
default value is Z=”2M”.
Possible values of specifiers PROC, T, Z, QC – as
for TA.
TD
Dew Point
Temperature [°C]
Snow
PROC,
T, Z, QC
Z,
Possible values of specifiers:
PROC, T, Z, QC – as for TA.
Z – height of observations above the ground.
TS
4
Temperature [°C]
TG
RH
P
Ground
Temperature [°C]
Relative
Humidity [%]
Precipitation
[mm]
PROC,
T,
QC
Z,
PROC,
T,
QC
PROC, T,
QC, Z
TYPE,
PROC,
T,
QC
Possible values of specifier Z:
1) “S” – snow surface (default);
2) numerical value and the unit of its
measurement («C» - centimetres, «M» - meters)
without a delimiter
Possible values of specifiers PROC, T, QC – as
for WS.
Z – depth of observations below the ground.
Possible values of specifier Z:
1) “S” – ground surface (default);
2) numerical value and the unit of its
measurement («C» - centimetres, «M» - meters)
without a delimiter
Possible values of specifiers PROC, T, QC – as
for WS.
Possible values of specifiers PROC, T, Z, QC – as
for TA.
TYPE – precipitation phase:
“L” – liquid precipitation;
“S” – solid precipitation;
“LS” – liquid and solid precipitation with
prevailing liquid phase; “SL” – solid and liquid
precipitation with prevailing solid phase.
If TYPE is absent then P is interpreted as total
precipitation.
PROC – specifies the procedure for calculation of
precipitation totals. Possible values of PROC:
SUM – precipitation total for a fixed period,
ACC – precipitation total for the period from
some fixed moment in the past to the period
defined in the <report TIME="..." >;
EVN – precipitation total for the period from the
beginning of latest precipitation event.
PI
AP
Precipitation
Intensity [mm/h]
Atmospheric
Pressure [hPa]
TYPE,
PROC,
T,
QC
Z,
QC,
PROC, T
Possible values of specifiers T, QC – as for WS.
TYPE – precipitation phase:
“L” – liquid precipitation;
“S” – solid precipitation;
“LS” – liquid and solid precipitation with
prevailing liquid phase; “SL” – solid and liquid
precipitation with prevailing solid phase.
PROC, T, QC – as for WS.
Z – height of observations:
“MSL” - at Mean Sea Level,
“STN” – at station level
Possible values of specifier PROC, T, QC – as for
WS.
5
V
Visibility [m]
HS
HC
Snow Depth [cm]
Cloud Base
Height [m]
RSWR
RSUM
SS
WW
Reflected SortWave Irradiance
[Watt/m2]
Total irradiance
[Watt/m2]
Snow Surface
State
Present or past
weather
conditions
PROC, T,
QC
QC
PROC,
T,
Z,
QC
PROC, T,
QC
PROC, T,
QC
QC
PROC,
T,
QC
Possible values of specifiers PROC, T, QC – as
for WS.
Possible values of specifier QC – as for WS.
PROC, T, QC - as for WS.
Z – specifier of cloud base height reference level:
“MSL” – Mean Sea Level;
“STN” – station level (default).
Possible values of specifiers PROC, T, QC – as
for WS.
Possible values of specifiers PROC, T, QC – as
for WS.
Possible values of SS:
1 – dry snow; 2 – moist snow;
3 – wet snow; 4 – very wet snow; 5 – soaked
snow.
Possible values of specifier QC – as for WS.
Possible values of WW – see Table2.
Possible values of specifier PROC: INS, AVE.
For present weather specifier PROC=”INS”
(default) can be omitted.
Specifiers PROC=”AVE” and T are used for
description of past weather for the period T.
WW is coded in accordance with FM 12 SYNOP
Code, Table 4677.
Possible values of specifier QC – as for WS.
……
6
Table 2
Present weather reported from an automatic weather station
(CODE TABLE 4680 from WMO-No.306
(Manual on Codes, Vol I.1 Part A – Alphanumeric Codes))
Code
Weather phenomenon
00 No significant weather observed
01 Clouds generally dissolving or becoming less developed during the past hour
02 State of sky on the whole unchanged during the past hour
03 Clouds generally forming or developing during the past hour
04 Haze or smoke, or dust in suspension in the air, visibility equal to, or greater than, 1 km
05 Haze or smoke, or dust in suspension in the air, visibility less than 1 km
06–09 Reserved
10 Mist
11 Diamond dust
12 Distant lightning
13–17 Reserved
18 Squalls
19 Reserved
Code figures 20–26 are used to report precipitation, fog (or ice fog) or thunderstorm at the
station during the preceding hour but not at the time of observation.
20 Fog
21 PRECIPITATION
22 Drizzle (not freezing) or snow grains
23 Rain (not freezing)
24 Snow
25 Freezing drizzle or freezing rain
26 Thunderstorm (with or without precipitation)
27 BLOWING OR DRIFTING SNOW OR SAND
28 Blowing or drifting snow or sand, visibility equal to, or greater than, 1 km
29 Blowing or drifting snow or sand, visibility less than 1 km
30 FOG
31 Fog or ice fog in patches
32 Fog or ice fog, has become thinner during the past hour
33 Fog or ice fog, no appreciable change during the past hour
34 Fog or ice fog, has begun or become thicker during the past hour
35 Fog, depositing rime
36–39 Reserved
40 PRECIPITATION
41 Precipitation, slight or moderate
42 Precipitation, heavy
43 Liquid precipitation, slight or moderate
44 Liquid precipitation, heavy
45 Solid precipitation, slight or moderate
46 Solid precipitation, heavy
47 Freezing precipitation, slight or moderate
48 Freezing precipitation, heavy
49 Reserved
50 DRIZZLE
51 Drizzle, not freezing, slight
7
52 Drizzle, not freezing, moderate
53 Drizzle, not freezing, heavy
54 Drizzle, freezing, slight
55 Drizzle, freezing, moderate
56 Drizzle, freezing, heavy
57 Drizzle and rain, slight
58 Drizzle and rain, moderate or heavy
59 Reserved
60 RAIN
61 Rain, not freezing, slight
62 Rain, not freezing, moderate
63 Rain, not freezing, heavy
64 Rain, freezing, slight
65 Rain, freezing, moderate
66 Rain, freezing, heavy
67 Rain (or drizzle) and snow, slight
68 Rain (or drizzle) and snow, moderate or heavy
69 Reserved
70 SNOW
71 Snow, slight
72 Snow, moderate
73 Snow, heavy
74 Ice pellets, slight
75 Ice pellets, moderate
76 Ice pellets, heavy
77 Snow grains
78 Ice crystals
79 Reserved
80 SHOWER(S) or INTERMITTENT PRECIPITATION
81 Rain shower(s) or intermittent rain, slight
82 Rain shower(s) or intermittent rain, moderate
83 Rain shower(s) or intermittent rain, heavy
84 Rain shower(s) or intermittent rain, violent
85 Snow shower(s) or intermittent snow, slight
86 Snow shower(s) or intermittent snow, moderate
87 Snow shower(s) or intermittent snow, heavy
88 Reserved
89 Hail
90 THUNDERSTORM
91 Thunderstorm, slight or moderate, with no precipitation
92 Thunderstorm, slight or moderate, with rain showers and/or snow showers
93 Thunderstorm, slight or moderate, with hail
94 Thunderstorm, heavy, with no precipitation
95 Thunderstorm, heavy, with rain showers and/or snow showers
96 Thunderstorm, heavy, with hail
97–98 Reserved
99 Tornado
Notes:
(1)
This code table includes terms on several levels to cover simple and increasingly complex
stations.
8
(2)
Generic terms for weather (e.g. fog, drizzle) are intended for use at stations capable of
determining types of weather but no other information. Generic terms are included in the code
table using all capital letters.
(3)
Code figures for generic precipitation (code figures 40–48) are arranged in order of
increasing complexity. For example, a very simple station that can sense only the presence or
absence of precipitation would use code figure 40 (precipitation). At the next level, a station
capable of sensing amount but not type would use code figure 41 or 42. A station capable of
sensing gross type (liquid, solid, freezing) and amount would use code figures 43–48. A station
capable of reporting actual types of precipitation (e.g. drizzle or rain), but not the amount, would
use the appropriate whole decile number (e.g. 50 for generic drizzle, 60 for generic rain).
9
Download