Overview
Imports Swiss Hydro Data time series data as ASCII files that are delivered to FOEN in Switzerland. The files contain discharge time series in m3/s and water levels in cm. The files have a name that contains the delivery date ("hbchaFEWS.2016041223.txt"), this information is not used when importing the files..
Configuration (Example)
A complete import module configuration consists of an ID Mapping file and an Import Module Instance file. Examples of the two are provided below.
The SHD file has the following characteristics:
- Header lines start with a %
- A new datasection (time series) in the file starts with %ASCII
- The third header line contains the location ID, Parameter ID and Unit
- All rows that does not start with % are data lines
- Missing value identifier is expected to be: blank
- First column contains data with format "dd.MM.yyyy"
- Second column contains time with format ""HH:mm:ss" or ""HH:mm"
- Third column contains value with decimal point.
ModuleConfigFiles/
The following example of an Import Module Instance will import the time series as equidistant 1 hour interval series for time zone GMT+1 hour.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<timeSeriesImportRun xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsd">
<import>
<general>
<importType>SHD</importType>
<folder>$IMPORT_FOLDER_ROOT$//hbcha</folder>
<failedFolder>$FAILED_FOLDER_ROOT$</failedFolder>
<idMapId>ImportSwiss</idMapId>
<unitConversionsId>ImportHydroUnits</unitConversionsId>
<missingValue>-999</missingValue>
<importTimeZone>
<timeZoneOffset>+01:00</timeZoneOffset>
</importTimeZone>
<dataFeedId>Import.HBCHA</dataFeedId>
</general>
<timeSeriesSet>
<moduleInstanceId>Observed</moduleInstanceId>
<valueType>scalar</valueType>
<parameterId>Q.m</parameterId>
<locationSetId>HydroStations_ALL</locationSetId>
<timeSeriesType>external historical</timeSeriesType>
<timeStep unit="hour" multiplier="1"/>
<readWriteMode>add originals</readWriteMode>
</timeSeriesSet>
<timeSeriesSet>
<moduleInstanceId>Observed</moduleInstanceId>
<valueType>scalar</valueType>
<parameterId>H.m</parameterId>
<locationSetId>HydroStations_ALL</locationSetId>
<timeSeriesType>external historical</timeSeriesType>
<timeStep unit="hour" multiplier="1"/>
<readWriteMode>add originals</readWriteMode>
</timeSeriesSet>
</import>
</timeSeriesImportRun>
|
IdMapFiles/
The ID mapping file will contain a mapping of the parameters and locations in the data file with the internal parameter and location ID’s of the Delft-FEWS application.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<idMap xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/idMap.xsd" version="1.1">
<!--mapped Observed water level data series-->
<parameter external="2" internal="H.m"/>
<parameter external="10" internal="Q.m"/>
<locationIdFunction externalLocationFunction="@EXTERNAL_ID@" internalLocationSet="HydroStations_ImportSwiss"></locationIdFunction>
</idMap>
|
Example File/
Code Block | ||||
---|---|---|---|---|
| ||||
%ASCII-Tabelle/von HydroPro; ©HBCHa 2016
%HBBEa-A013-10-10
%Zweisimmen - Abfluss - m3/s
11.04.2016 01:00 6.589
11.04.2016 02:00 6.610
11.04.2016 03:00 6.494
11.04.2016 04:00 6.411
11.04.2016 05:00 6.395
11.04.2016 06:00 6.291
11.04.2016 07:00 6.254
11.04.2016 08:00
11.04.2016 09:00 6.116
11.04.2016 10:00 6.145
........
|
Java source code
Delft-FEWS Java import parser source code: ShdTimeSeriesParser.java