Input
- input
Coefficient set
- interpolationType
- extrapolationType
- inputUnit (optional, since 2016.02)
- outputUnit (optional, since 2016.02)
- lookupTable (choice)
- lookupTableRow
- locationId / inputParameterId / outputParameterId / qualifierId (since 2017.02)
Output
- output
Description
The output will be calculated using a simple table lookup with the input value. The output value will be calculated by interpolation or extrapolation in the lookup table. The type of
interpolation can be configured in the coefficient set with the interpolation type option. The options available are:lineair and logarithmic. When the input value is outside the range
of the lookup table the behaviour of the transformation will be determined by the configured extrapolation type. Make sure the input and output values are configured in ascending order.
The options available are:
- notAllowed,
- maxMin,
- linear
If the first option, notAllowed, is configured an input value outside the range will return a missing value. The second option will return the minimum value or the maximum value in the lookup table. The third option linear enables the extrapolation for the function.
inputUnit: unit of the input values in the lookup table. When this unit is different from the input parameter unit the input values are converted using the config
units configured in the parameters.xml
ouputUnit: unit of the output values in the lookup table. When this unit is different from the output parameter unit the output values are converted using the config
units configured in the parameters.xml
Lookup using table directly specified in transformation config
<transformation id="simpleTableLookup"> <lookup> <simple> <input> <variableId>H1</variableId> </input> <coefficientSet> <interpolationType>linear</interpolationType> <extrapolationType>extrapolate</extrapolationType> <inputUnit>m</inputUnit> <outputUnit>mm</outputUnit> <lookupTable> <lookupTableRow input="1.8" output="4000"/> <lookupTableRow input="2.0" output="6000"/> <lookupTableRow input="2.2" output="8000"/> <lookupTableRow input="2.4" output="10000"/> <lookupTableRow input="2.6" output="12000"/> <lookupTableRow input="2.8" output="14000"/> <lookupTableRow input="3.0" output="16000"/> <lookupTableRow input="3.2" output="18000"/> <lookupTableRow input="3.4" output="20000"/> <lookupTableRow input="3.6" output="22000"/> </lookupTable> </coefficientSet> <output> <variableId>H2</variableId> </output> </simple> </lookup> </transformation>
Lookup using LookupTables.xml from RegionConfigFiles
Since 2017.02 it is possible to use LookupTables.xml from RegionConfig by referencing with locationId, inputParameterId & outputParameterId
<transformation id="simpleTableLookup"> <lookup> <simple> <input> <variableId>H1</variableId> </input> <coefficientSet> <interpolationType>linear</interpolationType> <extrapolationType>extrapolate</extrapolationType> <lookupTable> <locationId>H-2002</locationId> <inputParameterId>H.m</inputParameterId> <outputParameterId>H.obs</outputParameterId> </lookupTable> </coefficientSet> <output> <variableId>H2</variableId> </output> </simple> </lookup> </transformation>
Example LookupTables.xml from RegionConfig
<?xml version="1.0" encoding="UTF-8"?> <Tables xmlns="http://www.wldelft.nl/fews/PI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews/PI http://fews.wldelft.nl/schemas/version1.0/pi-schemas/pi_tables.xsd"> <table> <header> <locationId>H-2002</locationId> <a parameterId="H.m" units="m"/> <b parameterId="H.obs" units="m"/> <startDate date="2012-01-01" time="00:00:00"/> </header> <table> <row a="99" b="122.566570633982"/> <row a="158" b="216.30059062327"/> <row a="160" b="218.698850750015"/> <row a="162" b="221.058958199806"/> <row a="164" b="223.381719470149"/> <row a="166" b="225.667911902593"/> <row a="168" b="227.91859175558"/> <row a="170" b="230.884412887021"/> <row a="172" b="233.920464645294"/> <row a="174" b="237.492498877315"/> </table> </table> </Tables>
When 'b' needs to be looked up by 'a' ->
<locationId> of the PiTable
<inputParameterId1> => 'a'
<outputParameterId> => 'b'