Available since 2018.02. 
Description and usage

This transformation function is used to calculate an output value based on a lookup table. This function uses 3 input variables to perform the lookup.

The output will be calculated by performing a lookup in a 3 data cube. The transformation supports interpolation, but not extrapolation. If a point in the data cube is missing, the transformation will attempt to calculate it from surrounding data points.  If there are too many surrounding points missing, a missing value will be returned.

Input 1Input 2Input 3output
251000.110
251000.220
252000.120
252000.240
253000.130
253000.230
501000.120
501000.240
502000.140
502000.280
503000.180

50

3000.2160

 

For a value of 25 for Input1, 200 for Input2 and 0.2 for Input3, it will return 40.  For input values which are not exactly equal to the input values listed in the table the output has to be calculated. This function can determine the output  linear interpolation.  For a value of 25 for Input1, 150 for Input2 and 0.2 for Input3, it will return 30. 

Each time series is assigned a variable ID which is used in the actual expression. For definition of input and output time series see transformation – inputs & outputs. 

Only supports linear interpolation.

Configuration

A basic configuration of the function is described below. This describes the main elements and attributes required and provides an example configuration.

Input1 

required element defining the identifier of the first input time series. 

Input2 

Required element defining the identifier of the second input time series.

Input3

Required element defining the identifier of the second input time series. 

 

maxCircValueInput1, maxCircValueInput2, maxCircValueInput3, maxCircValueOutput

Optional fields. If a field is set, it will indicate that the given value is circular (such as wind direction). The minimum value is default 0, the maximum value is configured.  If a circular value appears that equals the maximum (like 360 with wind direction) it will be automatically set to 0.  If a value appears outside of the range (0-maxValue) it will be automatically adjusted to fall within the boundaries. ( For example wind direction 730 would be 10, -20 would become 340.)
If the fields are not configured, the values will be considered not circular. 

InterpolationType 

Required element. Has to be linear. 

extrapolationType 

Required element , needs to be  notAllowed . 

output 

Required element defining the identifier of the output time series. If more than one output is needed, a separate transformation needs to be set up for each output. 

input1Unit, input2Unit, input3Unit, outputUnit, 

Required element. Needs to contain the unit. The transformation supports unit conversion. If no conversion is configured, the input/out of the time series headers  needs to be in the same unit as it is configured in the coefficientSet (see bellow).If they are not the same, and no conversion is configured, a warning will be logged, but unit conversion will not take place.

csvFile

Required element.  File name of the data source.  The decimal separator has to be a "." (like 91.7) , as  "," (like 63,2) is not recognized. The CSV file needs to be placed in the MapLayerFiles folder.

input1Column, input2Column, input3Column, outputColumn

Required elements.  These are the names of the columns in CSV file, which should be used for the transformation.

<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2007 sp2 (http://www.altova.com) by WL | Delft Hydraulics (WL | Delft Hydraulics) -->
<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">
   <!--4 variables (with any name) need to be configured to be used as inputs and output.-->
   <variable>
      <variableId>input1</variableId>
      <timeSeriesSet>
         <moduleInstanceId>ThreeDimensionalLookupFromCsvTest</moduleInstanceId>
         <valueType>scalar</valueType>
         <parameterId>H.m</parameterId>
         <locationId>H-2001</locationId>
         <timeSeriesType>external historical</timeSeriesType>
         <timeStep unit="nonequidistant"/>
         <relativeViewPeriod unit="day" start="-1" end="10"/>
         <readWriteMode>add originals</readWriteMode>
      </timeSeriesSet>
   </variable>
   <variable>
      <variableId>input2</variableId>
      <timeSeriesSet>
         <moduleInstanceId>ThreeDimensionalLookupFromCsvTest</moduleInstanceId>
         <valueType>scalar</valueType>
         <parameterId>H.obs</parameterId>
         <locationId>H-2001</locationId>
         <timeSeriesType>external historical</timeSeriesType>
         <timeStep unit="nonequidistant"/>
         <relativeViewPeriod unit="day" start="-1" end="10"/>
         <readWriteMode>add originals</readWriteMode>
      </timeSeriesSet>
   </variable>
   <variable>
      <variableId>input3</variableId>
      <timeSeriesSet>
         <moduleInstanceId>ThreeDimensionalLookupFromCsvTest</moduleInstanceId>
         <valueType>scalar</valueType>
         <parameterId>H.sim</parameterId>
         <locationId>H-2001</locationId>
         <timeSeriesType>external historical</timeSeriesType>
         <timeStep unit="nonequidistant"/>
         <relativeViewPeriod unit="day" start="-1" end="10"/>
         <readWriteMode>add originals</readWriteMode>
      </timeSeriesSet>
   </variable>
   <variable>
      <variableId>output</variableId>
      <timeSeriesSet>
         <moduleInstanceId>ThreeDimensionalLookupFromCsvTest</moduleInstanceId>
         <valueType>scalar</valueType>
         <parameterId>H.updated</parameterId>
         <locationId>H-2001</locationId>
         <timeSeriesType>external historical</timeSeriesType>
         <timeStep unit="nonequidistant"/>
         <relativeViewPeriod unit="day" start="-1" end="10"/>
         <readWriteMode>add originals</readWriteMode>
      </timeSeriesSet>
   </variable>
   <transformation id="3dLookupTest">
      <lookup>
         <threeDimensionalLookup>
            <input1>
               <variableId>input1</variableId>
            </input1>
            <input2>
               <variableId>input2</variableId>
            </input2>
            <input3>
               <variableId>input3</variableId>
            </input3>
			<maxCircValueInput2>360</maxCircValueInput2>
            <coefficientSet>
               <!--Only linear interpolation is supported-->
               <interpolationType>linear</interpolationType>
               <!--extrapolation is not supported-->
               <extrapolationType>notAllowed</extrapolationType>
               <input1Unit>m</input1Unit>
               <input2Unit>m</input2Unit>
               <input3Unit>m</input3Unit>
               <outputUnit>m</outputUnit>
               <!--Name of datafile, needs to be in MapLarFiles folder.-->
               <csvFile>lookup3d.csv</csvFile>
               <!--These are the names of the coluumns in CSV file, which should be used for the transformation-->
               <input1Column>Sea level</input1Column>
               <input2Column>Water height</input2Column>
               <input3Column>River water level</input3Column>
               <outputColumn>Simulated data</outputColumn>
            </coefficientSet>
            <output>
               <variableId>output</variableId>
            </output>
         </threeDimensionalLookup>
      </lookup>
   </transformation>
</transformationModule>