Overview

The AifsML import function (<importType>AifsML</importType>) imports forecast time series with comments from specific XML files. 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.

The time series parser looks for the following elements in the AiflML file.

Amoc

The Amoc element of the XML file contains information on the Warning identifier and the issue time.

  • Identifier will be imported and stored as warning identifier property.
  • The external forecast time of the forecast is stored in the issue-time-utc element. There is therefore only one external forecast time in each warning xml file.

Warning Sequence

A Warning element can have information for 'river-basin' types and 'river-site' area types. When a ' river-basin' type has a 'warning_sequence' element type then the warning_sequence is used as a property for all location warnings in the same warning element.

Warning Prediction

The warning prediction contains the forecaster information included in the warning for the river-site. Each XML file can only have one Warning prediction in an area element.

 

Assumptions:

  • This warning_prediction will be used for all forecast values in the area element and added as warning_prediction_text property.

River Level Prediction

The river level prediction contains all information for the warning that is send out. See the following example:

 <text type="river_level_prediction">Value[FFWDELIM]4.50[FFWDELIM][FFWDELIM][FFWDELIM] [FFWDELIM][HYFS]4.50,Is likely to remain below 4.50 metres during Tuesday</text>

 

 Assumptions:

  • The different fields are always separated by [FFWDELIM].
  • The first field contains the Prediction Level Type and is a String value.
  • The second field will be ignored for now. If there is a value in this field, it is the actual value for 'Value' Level Forecast Type and it should be the same as the sixth [HyFS] field.
  • The third field contains the “Prediction Lower Value”. If the field is empty or contains a ##, a missing value is assumed. Otherwise a Float value is assumed.
  • The fourth field contains the “Prediction Upper Value”. If the field is empty or contains a ##, a missing value is assumed. Otherwise a Float value is assumed.
  • The fifth field contains the “Prediction Level” and is a String value.
  • The value after the [HYFS] marker contain the Prediction Level Value and the Warning Prediction Text separated by the first colon (,). The Prediction Level Value is either an exact prediction level value or a mean value of the prediction range.

Time

The time element contains all time information for the values in the River Level Prediction element. See the following example:

 <element type="time">Day [FFWDELIM]1970-01-01 00:00:00[FFWDELIM]2016-09-13 10:22:00[FFWDELIM]2016-09-20 10:58:00[FFWDELIM]Morning [FFWDELIM] [HYFS]2016-09-20T12:00:00+10:00 </element>

 Assumptions:

  • The different fields are always separated by [FFWDELIM].
  • The first field contains the “Target Time Type”.
  • The second field will be ignored for now. If there is a value in this field, it is the time for DateTime Target Time Type and it should be the same as the sixth field.
  • The third field will be ignored.
  • The fourth field will be ignored.
  • The fifth field contains the “Part Day Value” and will be converted to a time period.
  • The sixth field contains a [HYFS] marker after which the “Target Time Value” is set. The time is in the format yyyy-MM-dd'T'HH:mm:ss followed by the Time zone. This time is used as the event time (same as in the current import).

 The Part Day Value classification table is used to convert the part day name to a time range used in HyFS.

Part Day Value Classifications

The following assumptions have been made about the part day value classifications:

  • The event times are always inside or equal the time period of the part day classification. For example: event time is: 2016-08-11T04:00:00+10:00 can have an event type Early Morning (since the range is from 0:00 until 6:00) but not an event type Afternoon, since 04:00 is not part of the range 12:00-18:00. The event time should be always inside or equal to the time period of the part day classification.
  • For the day of part classifications of “Early Evening”, “Evening”, “Late”, “Night” and “Late Evening” the end time should be read as “0:00” and NOT “1:00”, which the last column suggests.
  • If the Target Time Type is “Day”, the Part Day Value will be ignored (this is an error in old versions of the Warning XML files). The Start and End time will be midnight to midnight.
  • With the Part Day Types FEWS will set the start and end periods in the properties of a forecasted value. The start and end periods will use the time zone of the imported forecast.

 In the Delft-FEWS code the following table is used to convert the part day classification. 

Part Day Type (event type)

Part Day Mean time (event time)

Start From

End To

Morning

06:00

00:00

12:00

Afternoon

15:00

12:00

18:00

Evening

21:00

18:00

00:00

Early

04:00

00:00

08:00

Early Morning

03:00

00:00

06:00

Early Afternoon

13:30

12:00

15:00

Early Evening

19:30

18:00

21:00

Late

21:00

18:00

00:00

Late Morning

10:30

09:00

12:00

Late Afternoon

16:30

15:00

18:00

Late Evening

22:30

21:00

00:00

Overnight

00:00

18:00

06:00

Night

21:00

18:00

00:00

 

The AifML xml uses some custom time zones. The time zone conversion from WET to FEWS can be found from the table below:

WET

FEWS

State

EST

AEST

VIC, TAS, NSW, QLD

EDT

AET

VIC, TAS, NSW

CST

ACST

SA, NT

CDT

ACT

SA

WST

AWT

WA

 

There is an XML schema available on the Bureau web site: http://www.bom.gov.au/weather/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

<?xml version="1.0" encoding="UTF-8"?>
<product version="1.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.bom.gov.au/schema/v1.5/product.xsd">
	<amoc>
...
		<identifier>IDQ20805</identifier>
		<issue-time-utc>2016-01-05T23:16:53Z</issue-time-utc>
		<issue-time-local tz="EST">2016-01-06T09:16:53+10:00</issue-time-local>
		<sent-time>2016-01-05T23:16:53Z</sent-time>
		<expiry-time>2016-01-06T06:30:00Z</expiry-time>
		<validity-bgn-time-local tz="EST">2016-01-06T12:00:00+10:00</validity-bgn-time-local>
		<validity-end-time-local tz="EST">2016-01-06T16:29:59+10:00</validity-end-time-local>
		<status>O</status>
		<service>HFW</service>
		<sub-service>WFL</sub-service>
		<product-type>W</product-type>
		<phase>NEW</phase>
	</amoc>
	<warning>
		<warning-info>
			<text type="warning_title">Initial Minor Flood Warning for the Lower Brisbane River</text>
			<text type="warning_subtitle">downstream of Wivenhoe Dam</text>
			<text type="priority">PRIORITY: The Bureau and Emergency Services would appreciate this message being broadcast regularly.</text>
			<text type="warning_advice">##</text>
			<text type="warning_advice_contact">##</text>
			<text type="warning_next_issue">The next warning will be issued by 12:30 pm EST on Wednesday 06 January 2016.</text>
			<text type="product_footer">This advice is also available by dialling 1300 659 219. Warning, rainfall and river information are available at www.bom.gov.au/qld/flood. The latest weather forecast is available at www.bom.gov.au/qld/forecasts.</text>
		</warning-info>
		<area aac="QLD_RS030" description="Brisbane River at Moggill" type="river-site" parent-aac="QLD_RC097">
			<!--===================-->
			<!--NON-HAZARD ELEMENTS-->
			<!--===================-->
			<!--locale[QLD_RS030]/period[variable]-->
			<!--non-warning-info-elements-exist='yes'-->
			<!--locale[QLD_RS030]/period[variable_1]-->
			<!--non-warning-info-elements-exist='yes'-->
			<forecast-period start-time-local="2016-01-06T09:16:39+10:00" end-time-local="2016-01-06T09:16:39+10:00" start-time-utc="2016-01-05T23:16:39Z" end-time-utc="2016-01-05T23:16:39Z">
				<text type="river_level_prediction">FloodClass[FFWDELIM][FFWDELIM][FFWDELIM][FFWDELIM]Minor[FFWDELIM][HYFS]10.00,May exceed the minor flood level (10.00 m) Thursday afternoon</text>
				<text type="hydrograph_type">Exceed</text>
				<element type="warning_likelihood">Medium</element>
				<element type="time">PartDay[FFWDELIM]1970-01-01 00:00:00[FFWDELIM]2016-01-07 09:09:00[FFWDELIM]1970-01-01 00:00:00[FFWDELIM]Afternoon[FFWDELIM][HYFS]2016-01-07T15:00:00+10:00</element>
			</forecast-period>
		</area>
	</warning>
</product>



Java source code

AifsMLTimeSeriesParser.java

 

 
  • No labels