Description
This selection ensemble member by index transformation takes the value of the ensemble member that matches its index with the value of a provided time series. Inputs are an ensemble with multiple time series and a time series with indices. Output is one time series.
Some notes as to behaviour:
- Missing values in the index time series result in missing values in the output time series.
- Index values for which no matching ensemble member is found result in missing values in the output time series
Example
Statistics Ensemble Member Index Of Max
<?xml version="1.0" encoding="UTF-8"?> <transformationModule version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/transformationModule.xsd"> <variable> <variableId>inputMemberIndex</variableId> <timeSeriesSet> <moduleInstanceId>InputModuleInstance</moduleInstanceId> <valueType>scalar</valueType> <parameterId>index</parameterId> <locationId>H-2001</locationId> <timeSeriesType>external forecasting</timeSeriesType> <timeStep unit="day"/> <relativeViewPeriod unit="day" start="-4" end="0"/> <readWriteMode>add originals</readWriteMode> </timeSeriesSet> </variable> <variable> <variableId>inputEnsemble</variableId> <timeSeriesSet> <moduleInstanceId>InputModuleInstance</moduleInstanceId> <valueType>scalar</valueType> <parameterId>Q.m</parameterId> <locationId>H-2001</locationId> <timeSeriesType>external forecasting</timeSeriesType> <timeStep unit="day"/> <relativeViewPeriod unit="day" start="-4" end="0"/> <readWriteMode>add originals</readWriteMode> <ensembleId>EnsembleA</ensembleId> </timeSeriesSet> </variable> <variable> <variableId>output</variableId> <timeSeriesSet> <moduleInstanceId>InputModuleInstance</moduleInstanceId> <valueType>scalar</valueType> <parameterId>MemberIndex</parameterId> <locationId>H-2001</locationId> <timeSeriesType>external forecasting</timeSeriesType> <timeStep unit="day"/> <relativeViewPeriod unit="day" start="-4" end="0"/> <readWriteMode>add originals</readWriteMode> </timeSeriesSet> </variable> <transformation id="selectionEnsembleIndex"> <selection> <ensembleMemberByIndex> <memberIndex> <variableId>inputMemberIndex</variableId> </memberIndex> <ensemble> <variableId>inputEnsemble</variableId> </ensemble> <outputVariable> <variableId>output</variableId> </outputVariable> </ensembleMemberByIndex> </selection> </transformation> </transformationModule>
An example of the output is shown in below plot. Note that (1) below plot was not produced with above snippet of code; (2) the somewhat unexpected behaviour in the lower panel is due to the input timeseries.