Overview

The DHI_PRESA import function (<importType>DHI_PRESA</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>

 

Signal nameparameter idlocation id
CONDU_E01A10C197QAL37QAL37E01A10
CONDU_E01A10C189QAL34QAL34E01A10
CONDU_E01A10C183QAL32QAL32E01A10
CONDU_E01A09D166NEMBA2NEMBA2E01A09
CONDU_E01A09C167PORCE  
CONDU_E01A09C166VEMBAVEMBAE01A09
CONDU_E01A09C162QAL24QAL24E01A09
CONDU_E01A09C156QAL22QAL22E01A09
CONDU_E01A05C68QALI3QALI3E01A05
CONDU_E01A05C64QAL12QAL12E01A05
CONDU_E01A05C60QALI1QALI1E01A05
CONDU_E01A01D7PLUPLUE01A01
CONDU_CAI_MB_QENTQENTCAI_MB
CONDU_CAI_MB_QCANQCANCAI_MB
CONDU_CAI_MB_PACT  
CONDU_APIL_AE_NIVNIVAPIL_AE
CONDU_AFOR_AI_QAFOQAFOAFOR_AI
CONDU_AFOR_AE_QCANQCANAFOR_AE
CONDU_AFOR_AE_NIVRRNIVRRAFOR_AE
CONDU_AFOR_AE_NIVRNIVRAFOR_AE
CONDU_AFOR_AE_NIVCNIVCAFOR_AE
CONDU_AERE_AI_QAQAAERE_AI
CONDU_AERE_AE_QCQCAERE_AE
CONDU_AERE_AE_NIVCNIVCAERE_AE
CONDU_AERE_AE_NAF2NAF2AERE_AE
CONDU_AERE_AE_NAF1NAF1AERE_AE

Configuring the Import

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="ImportDhiPresa">
		<moduleId>TimeSeriesImportRun</moduleId>
	</moduleInstanceDescriptor>
...
</moduleInstanceDescriptors>

 

An example of the DHI_PRESA import configuration will be given here. The importType is named DHI_PRESA which should be configured in the general section of the import.
Special attention should be given to the timezone since DHI_PRESA data is stored in local time;

<?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>DHI_PRESA</importType>
			<folder>$IMPORT_FOLDER$/import/dhi_presa</folder>
			<idMapId>dhiPresaMapId</idMapId>
			<importTimeZone>
				<timeZoneName>CET</timeZoneName>
			</importTimeZone>
		</general>
		<timeSeriesSet>
			<moduleInstanceId>ImportDhiPresa</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>Q.m</parameterId>
			<locationId>FewsLocation</locationId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="second" multiplier="1"/>
			<relativeViewPeriod unit="minute" start="0" end="10"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
	</import>
</timeSeriesImportRun>

The IdMapping configuration dhiPresMapId.xml is very important because this maps the internal FEWS Id's to the DHI_PRESA Id's. An example IdMapping file for the DHI_PRESA 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="NEMBA2"/>

	<location internal="FewsLocation" external="E01A09"/>
	....
</idMap>

Example DHI_PRESA file

 

Date_and_Time,CONDU_E01A10C197QAL37,CONDU_E01A10C189QAL34,CONDU_E01A10C183QAL32,CONDU_E01A09D166NEMBA2,CONDU_E01A09C167PORCE,CONDU_E01A09C166VEMBA,CONDU_E01A09C162QAL24,CONDU_E01A09C156QAL22,CONDU_E01A05C68QALI3,CONDU_E01A05C64QAL12,CONDU_E01A05C60QALI1,CONDU_E01A01D7PLU,CONDU_CAI_MB_QENT,CONDU_CAI_MB_QCAN,CONDU_CAI_MB_PACT,CONDU_APIL_AE_NIV,CONDU_AFOR_AI_QAFO,CONDU_AFOR_AE_QCAN,CONDU_AFOR_AE_NIVRR,CONDU_AFOR_AE_NIVR,CONDU_AFOR_AE_NIVC,CONDU_AERE_AI_QA,CONDU_AERE_AE_QC,CONDU_AERE_AE_NIVC,CONDU_AERE_AE_NAF2,CONDU_AERE_AE_NAF1
2014-05-05 00:00:48,0.000000,0.000000,0.000000,153.480000,89.978073,33.543484,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,1796.000000,845.000000,821.000000,0.000000,0.000000,1422.000000,0.434000,0.449000,0.966000,6.711419,6.119000,1.530000,0.542000,0.510000
2014-05-05 00:04:19,0.000000,0.000000,0.000000,153.480000,89.978073,33.543484,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,1789.000000,849.000000,831.000000,0.000000,1.770736,1431.000000,0.440000,0.453000,0.964000,6.448431,5.892000,1.530000,0.542000,0.500000