Description

This statisticsEnsemble transformation take the member index of the ensemble time series that has the max value. Input is an ensemble with multiple time series. Output is one time series. Per time step the member index of the ensemble time series with the max value is taken for that time step and written to the output value.

Some notes as to behaviour:

  • If the maximum is 'supplied' by more than one ensemble member, then the member with the lowest index is selected.
  • If the input timeseries is partially undefined, the output will be empty at those times.

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>input</variableId>
      <timeSeriesSet>
         <moduleInstanceId>InputModuleInstance</moduleInstanceId>
         <valueType>scalar</valueType>
         <parameterId>Q.forecast</parameterId>
         <locationId>H-2001</locationId>
         <timeSeriesType>external forecasting</timeSeriesType>
         <timeStep unit="day"/>
         <relativeViewPeriod unit="day" start="-3" 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"/>
         <readWriteMode>add originals</readWriteMode>
      </timeSeriesSet>
   </variable>
   <transformation id="ensemble index of max test">
      <statisticsEnsemble>
         <memberIndexOfMax>
            <inputVariable>
               <variableId>input</variableId>
            </inputVariable>
            <outputVariable>
               <variableId>output</variableId>
            </outputVariable>
         </memberIndexOfMax>
      </statisticsEnsemble>
   </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.

  • No labels