Overview
The AifsMLObservations import function (<importType>AifsMLObservations</importType>) imports time series. The AifsML format is a very specific XML format developed at the Bureau of Meteorology in Australia. Files with this format are produced in the home made Content Reviewer (WET) software that is used to generate official flow forecasts. This import is targeted to observations. A related import (AifsML) can be used to import forecasts from the warnings element.
The time series parser looks for:
- location id: From the station element the bom-id attribute is used.
- observation time: From the period element the time-utc attribute is used if no other time has been specified for an element.
- If for an element a start-time-utc attribute is specified, that value will be used for the observation time.
- If for an element a end-time-utc attribute is specified, that value will be used for the observation time (for example rainfall).
- parameter id: From the "element" element the type attribute is used. Correct, in this case, we are going to use ‘rain_hour’
- unit: From the "element" element the units attribute is used.
There is an XML schema available on the Bureau web site: http://www.bom.gov.au/schema/v1.5/product.xsd
Example
Example files can be obtained from the Bureau of Meteorology or generated from the XML schema. An extract of a Aifs
No Format |
---|
<?xml version="1.0" encoding="UTF-8"?>
<product version="1.4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.bom.gov.au/weather/schema/v1.4/product.xsd">
<amoc>
<source>
<sender>Australian Government Bureau of Meteorology</sender>
<region>Victoria</region>
<office>VICFWC</office>
<copyright>http://www.bom.gov.au/other/copyright.shtml</copyright>
<disclaimer>http://www.bom.gov.au/other/disclaimer.shtml</disclaimer>
</source>
<identifier>WARNINGID</identifier>
......
</amoc>
<warning>
<warning-info>
......
<text type="warning_sequence">1</text>
<text type="warning_title_text">warning title</text>
</warning-info>
<area aac="STATIONID" description="Station name" type="river-site" parent-aac=".....">
<forecast-period start-time-local=".." end-time-local=".." start-time-utc="2014-08-21T01:41:31Z" end-time-utc="..">
<element type="prediction" time-local="2014-08-22T17:59:00+10:00" sequence="1">Fall below</element>
<element type="value" units="m" time-local="2014-08-22T17:59:00+10:00" sequence="1">2.60</element>
<element type="prediction" time-local="2014-08-22T11:40:00+10:00" sequence="2">Remain around</element>
<element type="value" units="m" time-local="2014-08-22T11:40:00+10:00" sequence="2">2.50</element>
.....
</forecast-period>
</area>
</warning>
<observations/>
</product> |
Details of the import format
From the elements within <amoc>, only the <identifier> and <issue-time-utc> elements are used by the parser.
Within <warning><warning-info> the parser only looks for <text> elements with attribute type="warning_sequence" and attribute type="warning_title_text"
Only <area> elements inside the <warning> element with <forecast_text> children, will result in events. The aac attribute will be used for location for all forecast_text children.
Inside the <forecast-period> element the text elements with the same sequence numbers are correlated and used to construct an event.