Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
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.

...

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.

Code Block
languagexml
linenumberstrue
<?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>

...