Overview
Excerpt | ||
---|---|---|
| ||
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 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]"> <import> <\ <!--Bayern--> <general> <general> <importType>Bayern</importType> <folder>$IMPORT_FOLDER_BAYERN$</folder> <failedFolder>$IMPORT_FOLDER_BAYERN$</failedFolder> <backupFolder>$BACKUP_FOLDER_BAYERN$</backupFolder> <idMapId>IdImportBayern</idMapId> <unitConversionsId>ImportBayernUnits</unitConversionsId> <importTimeZone> <\ <importTimeZone> <!--EPS is in GMT--> <timeZoneOffset>+00:00</timeZoneOffset> </importTimeZone> <dataFeedId>Bayern-DF</dataFeedId> <reportChangedValues>true</reportChangedValues> </general> <timeSeriesSet> <timeSeriesSet> <moduleInstanceId>ImportBayern</moduleInstanceId> <valueType>scalar</valueType> <parameterId>wlevel</parameterId> <locationSetId>Bayern</locationSetId> <timeSeriesType>external forecasting</timeSeriesType> <timeStep unit="hour" multiplier="1"/> <readWriteMode>add originals</readWriteMode> <synchLevel>1</synchLevel> <expiryTime unit="day"/> <ensembleId>Bayern</ensembleId> </timeSeriesSet> </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 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]"> <parameter external="24095302" internal="P.voorsp.ens"/> <location external="24095302" internal="KNMI_NL001"/> </idMap> |