Page tree
Skip to end of metadata
Go to start of metadata
Description

Calculates for each timestep in the output time series the time (in minutes) to/from the nearest data point in the input time series, which typically is the result of any one of the other selection transformations.

If the nearest value is in the past, the resulting value is negative, in the future the resulting value is positive. Whenever the time since the last value and the time to to future value are the same, the positive (future) value will be returned.

Input

Non-equidistant Timeseries, which typically is the output of any one of the other selection transformations.

Output

Equidistant Timeseries containing the time to/from the nearest time in the input time series.

Configuration example


TimeToSelectionFunctionTest 1.00 default.xml
<transformationModule ...>
	<transformation id="time to selection function test">
		<selection>
			<timeToSelection>
				<inputVariable>
					<timeSeriesSet>
						<moduleInstanceId>SelectionPeaksFunctionTest</moduleInstanceId>
						<valueType>scalar</valueType>
						<parameterId>H.tidal</parameterId>
						<locationId>H-2010</locationId>
						<timeSeriesType>external historical</timeSeriesType>
						<timeStep unit="nonequidistant"/>
						<relativeViewPeriod unit="day" start="0" end="7"/>
						<readWriteMode>editing visible to all future task runs</readWriteMode>
					</timeSeriesSet>
				</inputVariable>
				<outputVariable>
					<timeSeriesSet>
						<moduleInstanceId>SelectionPeaksFunctionTest</moduleInstanceId>
						<valueType>scalar</valueType>
						<parameterId>H.updated</parameterId>
						<locationId>H-2010</locationId>
						<timeSeriesType>external historical</timeSeriesType>
						<timeStep unit="minute" multiplier="15"/>
						<aggregationPeriod start="-7" end="7" unit="hour"/>
						<relativeViewPeriod unit="day" start="0" end="7"/>
						<readWriteMode>add originals</readWriteMode>
					</timeSeriesSet>
				</outputVariable>
			</timeToSelection>
		</selection>
	</transformation>
</transformationModule>

Note; This transformation is available in FEWS release 2019.02 and later.


  • No labels