Overview
The URA import function (<importType>URA</importType>) imports external historical time series from a specific CSV files for FEWS Basque. Since the csv data is specified in local time format, a timezone has to be configured in the importer:
<importTimeZone> <timeZoneName>CET</timeZoneName> </importTimeZone>
- These files are received each 15 minutes and included all the signals for that interval.
- Their name gives the date and time.
- Time is local (i.e. +2 hr GMT in summer and +1hr GMT in winter)
- Each line of the file represents one signal
- There are 4 fields per line separated by ; They are:
- Code of station and signal.
- The first 4 characters represent the code of the station (for example A074)
- The last 5 characters represent the type of signal
- NRIO1: level in river in m;
- QRIO1: discharge in river in m3/s,
- PQUIN: precipitation in mm,
- TEMPE: temperature in ºC;
- NEMBA: level in reservoir;
- VEMBA: volume in reservoir in hm3,
- PORCE: percentage of filling in reservoir in %
- Date (day/month/year) and time (hour:minutes)
- Value of the signal. The “,” represents the decimal point
- Quality of the signal:
- BUENO/BUENA: good; FEWS quality flag: ORIGINAL_RELIABLE
- MALO/MALA: bad; FEWS quality flag: ORIGINAL_DOUBTFUL
- NO DATO: no data; FEWS quality flag: ORIGINAL_MISSING
Configuring the Import
An example of the URA configuration will be given here. The importType is named URA which should be configured in the general section of the import.
Special attention should be given to the timezone;
To make the importer known to FEWS, the import module has to be declared in the moduleInstanceDescriptors.xml in the RegionConfigFiles directory of the FEWS configuration:
<?xml version="1.0" encoding="UTF-8"?> <moduleInstanceDescriptors 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/moduleInstanceDescriptors.xsd" version="1.0"> <moduleInstanceDescriptor id="ImportURA"> <moduleId>TimeSeriesImportRun</moduleId> </moduleInstanceDescriptor> ... </moduleInstanceDescriptors> </idMap>
An example import configuration is shown below:
<?xml version="1.0" encoding="UTF-8"?> <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>URA</importType> <folder>$IMPORT_FOLDER$/import/chc</folder> <idMapId>chcMapId</idMapId> <importTimeZone> <timeZoneName>CET</timeZoneName> </importTimeZone> </general> <timeSeriesSet> <moduleInstanceId>ImportURA</moduleInstanceId> <valueType>scalar</valueType> <parameterId>Q.m</parameterId> <locationId>FewsLocation</locationId> <timeSeriesType>external historical</timeSeriesType> <timeStep unit="minute" multiplier="5"/> <relativeViewPeriod unit="minute" start="0" end="100"/> <readWriteMode>add originals</readWriteMode> </timeSeriesSet> </import> </timeSeriesImportRun>
The IdMapping configuration chcMapId is very important because this maps the internal FEWS Id's to the CHC Id's. An example IdMapping file for the CHC importer is shown below.:
<?xml version="1.0" encoding="UTF-8"?> <idMap version="1.1" 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"> <parameter internal="Q.m" external="QRIO1"/> <location internal="FewsLocation" external="1080"/> .... </idMap>
Example URA file
A074L17NRIO1; 10/12/13 06:00; 0000,410; BUENA A074L65QRIO1; 10/12/13 06:00; 0006,680; BUENA A074L85PQUIN; 10/12/13 06:00; 0000,000; BUENA A075L17NRIO1; 10/12/13 06:00; 0000,520; BUENA A075L65QRIO1; 10/12/13 06:00; 0002,230; BUENA A165L17NRIO1; 10/12/13 06:00; 0000,430; BUENA A165L65QRIO1; 10/12/13 06:00; 0002,360; BUENA