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..
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 data section (time series) in the file starts with %ASCI or ASCII
- The second header line contains the location ID, parameter ID and qualifier ID.
In the old header formatting (using <importType> "SHD"): the header %GL-04140875-10-0 is split by the '-' character, so first part %GL is ignored, the second part is used as location ID, the third as the parameter ID and the forth as the qualifier ID (if present).
In the new header formatting (using <importType> "shd-extloc", available since 2017.01): the header %GL-04140875-10-0 the starting % is removed, then the header is split by the '-' character, the first and second part are used as location ID (separated by '-', "GL-04140875" for the example), the third as the parameter ID and the forth as the qualifier ID.
- The third header line contains the unit. The header %Schwanden Sernf - Abfluss - m3/s is split by the '-' character, only last part is used (m3/s)
- 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.
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.
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.
Java source code
Delft-FEWS Java import parser source code: ShdTimeSeriesParser.java