Input
  • inputVariable ( 1 or more input time series)
  • maxGapLength
Output
  • indexUsedInputTimeSeries
  • outputVariable
Description

This transformation merges input time series. If input time series contains a gap larger than maxGapLength, then it will be replaced (toggled instead of merged) with the next input time series in the hierarchy. Otherwise, it will merge the input time series.

Configuration example

 

<?xml version="1.0" encoding="UTF-8"?>
<transformationModule version="1.0" 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/transformationModule.xsd">
	<!--Input time series-->
	<variable>
		<variableId>P_6_1</variableId>
		<timeSeriesSet>
			<moduleInstanceId>HuangChuanRain6to1</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>P.obs</parameterId>
			<locationSetId>RainGauges_HuangChuan</locationSetId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="hour" multiplier="1"/>
			<!--<aggregationPeriod unit="hour" start="-6" end="0"/>-->
			<relativeViewPeriod unit="day" start="-16" end="0"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
	</variable>
	<variable>
		<variableId>Q_out</variableId>
		<timeSeriesSet>
			<moduleInstanceId>HuangChuan_Update_Pre</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>Q.obs</parameterId>
			<locationSetId>HydroGauges_HuangChuan</locationSetId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="hour" multiplier="1"/>
			<relativeViewPeriod unit="day" start="-16" end="0"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
	</variable>
	<!--Output time series-->
	<variable>
		<variableId>index</variableId>
		<timeSeriesSet>
			<moduleInstanceId>HuangChuan_Update_Pre</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>index</parameterId>
			<locationId>50203100</locationId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="hour" multiplier="1"/>
			<relativeViewPeriod unit="day" start="-16" end="0" startOverrulable="true"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
	</variable>
	<variable>
		<variableId>Qout</variableId>
		<timeSeriesSet>
			<moduleInstanceId>HuangChuan_Update_Pre</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>Q.u</parameterId>
			<locationSetId>HydroGauges_HuangChuan</locationSetId>
			<timeSeriesType>simulated historical</timeSeriesType>
			<!--<timeStep unit="nonequidistant"/>-->
			<timeStep unit="hour" multiplier="1"/>
			<relativeViewPeriod unit="day" start="-16" end="0"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
	</variable>
	<!--Transformations-->
	<transformation id="merge_toggle">
		<merge>
			<toggle>
				<inputVariable>
					<variableId>P_6_1</variableId>
					<locationId>50228800</locationId>
				</inputVariable>
				<inputVariable>
					<variableId>Q_out</variableId>
				</inputVariable>
				<maxGapLength unit="hour" multiplier="5"/>
				<indexUsedInputTimeSeries>
					<variableId>index</variableId>
				</indexUsedInputTimeSeries>
				<mergedTimeSeries>
					<variableId>Qout</variableId>
				</mergedTimeSeries>
			</toggle>
		</merge>
	</transformation>
 </transformationModule>

a: maxGapLength = 5 hours                                                                                     b: maxGapLength = 100 hours

(figure 1: first input, figure 4: second input, figure 2: merged time series, figure 3: indexUsedInputTimeSeries)

  • No labels