Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Overview

Excerpt
hiddentrue

Imports ASCII type time series data (level forecasts) from Bayern, location Raunheim am Main.

...

Imports ASCII type time series data (level forecasts) from Bayern, location Raunheim am Main.

Structure of the Bayern file

Data is to be obtained through a http request. Data obtained from the URL must be stored as an ASCII-file in order for the parser to process it. The data consists of three sections; a header, the time series data and a footer.

...

The following snippet illustrates a sample data file :

No Format
    \    ---------------------------\-
       Messstelle \| 24095302
    \    ---------------------------\-
       21.07.2011 05:00 \| 167
       21.07.2011 06:00 \| 165
       21.07.2011 07:00 \| 163
       21.07.2011 08:00 \| 160
                .
                .
                .
                   .
                .
                .
    23.07.2011 04:00 \| 199
       23.07.2011 05:00 \| 199
    \    ---------------------------\-
       Datenart: Wasserstand \[cm\]
       Alle Vorhersagewerte ohne GewährGewähr.
       Datenbankabfrage: 21.07.2011 09:33

The footer is completely ignored by the parser.

Configuration

To import forecast data from Bayern, stored into an Acii file, configure a module like:

Code Block
xml
xml
<?xml version="1.0" encoding="UTF-8"?>
<timeSeriesImportRun xmlns="[http://www.wldelft.nl/fews|http://www.wldelft.nl/fews]" xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance|http://www.w3.org/2001/XMLSchema-instance]" xsi:schemaLocation="[http://www.wldelft.nl/fews|http://www.wldelft.nl/fews] [http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsd|http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsd]">
&nbsp;	<import>
&nbsp;&nbsp;<\		<!--Bayern-->
&nbsp;&nbsp;<general>
&nbsp;&nbsp;&nbsp;		<general>
			<importType>Bayern</importType>
&nbsp;&nbsp;&nbsp;			<folder>$IMPORT_FOLDER_BAYERN$</folder>
&nbsp;&nbsp;&nbsp;			<failedFolder>$IMPORT_FOLDER_BAYERN$</failedFolder>
&nbsp;&nbsp;&nbsp;			<backupFolder>$BACKUP_FOLDER_BAYERN$</backupFolder>
&nbsp;&nbsp;&nbsp;			<idMapId>IdImportBayern</idMapId>
&nbsp;&nbsp;&nbsp;			<unitConversionsId>ImportBayernUnits</unitConversionsId>
&nbsp;&nbsp;&nbsp;<importTimeZone>
&nbsp;&nbsp;&nbsp;&nbsp;<\			<importTimeZone>
				<!--EPS is in GMT-->
&nbsp;&nbsp;&nbsp;&nbsp;				<timeZoneOffset>+00:00</timeZoneOffset>
&nbsp;&nbsp;&nbsp;			</importTimeZone>
&nbsp;&nbsp;&nbsp;			<dataFeedId>Bayern-DF</dataFeedId>
&nbsp;&nbsp;&nbsp;			<reportChangedValues>true</reportChangedValues>
&nbsp;&nbsp;		</general>
&nbsp;&nbsp;<timeSeriesSet>
&nbsp;&nbsp;&nbsp;		<timeSeriesSet>
			<moduleInstanceId>ImportBayern</moduleInstanceId>
&nbsp;&nbsp;&nbsp;			<valueType>scalar</valueType>
&nbsp;&nbsp;&nbsp;			<parameterId>wlevel</parameterId>
&nbsp;&nbsp;&nbsp;			<locationSetId>Bayern</locationSetId>
&nbsp;&nbsp;&nbsp;			<timeSeriesType>external forecasting</timeSeriesType>
&nbsp;&nbsp;&nbsp;			<timeStep unit="hour" multiplier="1"/>
&nbsp;&nbsp;&nbsp;			<readWriteMode>add originals</readWriteMode>
&nbsp;&nbsp;&nbsp;			<synchLevel>1</synchLevel>
&nbsp;&nbsp;&nbsp;			<expiryTime unit="day"/>
&nbsp;&nbsp;&nbsp;			<ensembleId>Bayern</ensembleId>
&nbsp;&nbsp;		</timeSeriesSet>
&nbsp;	</import>
</timeSeriesImportRun>

idMapping

The parser assigns the numerical ID found in the header to LocationID as well as ParameterID.
To map these to current FEWS location and parameter an idMapping can be configured.
For example:

Code Block
xml
xml
<?xml version="1.0" encoding="UTF-8"?>
<idMap version="1.1" xmlns="[http://www.wldelft.nl/fews|http://www.wldelft.nl/fews]" xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance|http://www.w3.org/2001/XMLSchema-instance]" xsi:schemaLocation="[http://www.wldelft.nl/fews|http://www.wldelft.nl/fews] [http://fews.wldelft.nl/schemas/version1.0/idMap.xsd|http://fews.wldelft.nl/schemas/version1.0/idMap.xsd]">
&nbsp;  <parameter external="24095302" internal="P.voorsp.ens"/>
&nbsp;  <location external="24095302" internal="KNMI_NL001"/>
</idMap>