Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This transformation can be used to determine the number of threshold level for a certain location by using location attributes.

The location attributes define for each output location which time series should be used to determine the threshold level. Also the range for each threshold can be defined here.

An example is shown below. To configure a multi variate threshold transformation you must configure:

1) the attribute values in a csv-file,

2) the attribute definitions in the locationSets.xml file,

3) the transformation itself in module config file.

crossings of a set of input time series at each time step separately and write that number to the output time series.

An attribute id must be configured which specifies the attribute of the input locations that contain the threshold value.

An attribute id must be configured which specifies the attribute that must have the same value to match input and output locations.Below an example is shown of all the three components. 

 

Below an example of csv-file which defines the values of the attributes

Code Block
languagexml
idID;variable;inputLocationSetId;ruleId;numberOfTimeSeries;lowerBoundInputAttributeId;lowerBound;ruleOutcome
MultiVarHyFSOutput1;ForecastRain;MultiVarHyFSInput;rule0;1;thv0;-999;-1
MultiVarHyFSOutput1;ForecastRain;MultiVarHyFSInput;rule1;2;thv1;10;1
MultiVarHyFSOutput1;ObservedRain;MultiVarHyFSInput;rule2;2;thv2;10;2
MultiVarHyFSOutput1;ObservedFlooding;MultiVarHyFSInput;rule3;2;thv3;10;3
MultiVarHyFSOutput1;ForecastRain;MultiVarHyFSInput;rule4;2;thv4;20;4
MultiVarHyFSOutput1;ForecastRain;MultiVarHyFSInput;rule5;2;thv5a;20;5
MultiVarHyFSOutput1;ObservedRain;MultiVarHyFSInput;rule5;2;thv5b;10;5
MultiVarHyFSOutput1;ForecastRain;MultiVarHyFSInput;rule6;2;thv6a;20;6
MultiVarHyFSOutput1;ObservedFlooding;MultiVarHyFSInput;rule6;2;thv6b;10;6
MultiVarHyFSOutput1;ObservedRain;MultiVarHyFSInput;rule7;2;thv7;20;7
MultiVarHyFSOutput1;ObservedRain;MultiVarHyFSInput;rule8;2;thv8a;20;8
MultiVarHyFSOutput1;ObservedFlooding;MultiVarHyFSInput;rule8;2;thv8b;10;8
MultiVarHyFSOutput1;ObservedFlooding;MultiVarHyFSInput;rule9;2;thv9;20;9THRESHOLD;MATCHING
Input1;1;Output1
Input2;2;Output2
Input2;2.4;Output2
Input3;3;Output1
Input3;3.6;Output1
Input3;3.8;Output2
Input4;4;Output1
Input4;4.1;Output1
Input4;4.4;Output2
Input4;4.5;Output2
InputX;5;X

 

Below an example of a module config file which defines the transformation

...

Below an example of the definition of a locationSet with attributes.

Code Block
languagexml
	<locationSet id="MultiVariateThresholdsHyFSCountThresholdCrossingsInput">
		<csvFile>
			<file>MultiVariateThresholdsHyFS   <csvFile>
      <file>CountThresholdCrossingsInput.csv</file>
			<id>%id%<      <id>%ID%</id>
			<x>%x%<      <x>%X%</x>
			<y>%y%<      <y>%Y%</y>
			<attribute id="thv0">
				<number>%thv0%</number>
			</attribute>
			      <attributeFile>
         <csvFile>CountThresholdCrossingsInputMultivaluedAttributes.csv</csvFile>
         <id>%ID%</id>
         <attribute id="thv1Matching">
				<number>%thv1%</number>
			</attribute>
			            <text>%MATCHING%</text>
         </attribute>
         <attribute id="thv2Threshold">
				<number>%thv2%</number>
			            <number>%THRESHOLD%</number>
         </attribute>
			<attribute id="thv3">
				<number>%thv3%</number>
			</attribute>
			<attribute id="thv4">
				<number>%thv4%</number>
			</attribute>
			<attribute      </attributeFile>
   </csvFile>
</locationSet>
<locationSet id="thv5aCountThresholdCrossingsOutput">
				<number>%thv5a%</number>
			</attribute>
			<attribute id="thv5b">
				<number>%thv5b%</number>
			</attribute>
			<attribute id="thv6a">
				<number>%thv6a%</number>
			</attribute>
			<attribute id="thv6b">
				<number>%thv6b%</number>
			</attribute>
			<attribute id="thv7">
				<number>%thv7%</number>
			</attribute>
			<attribute id="thv8a">
				<number>%thv8a%</number>
			</attribute>
			<attribute id="thv8b">
				<number>%thv8b%</number>
			</attribute>
			<attribute id="thv9">
				<number>%thv9%</number>
			</attribute>
			<attributeFile>
				<csvFile>MultiVariateThresholdsAttributesHyFS.csv</csvFile>
				<id>%id%</id>
				<attribute id="inputLocationSetId">
					<text>%inputLocationSetId%</text>
				</attribute>
				<attribute id="variable">
					<text>%variable%</text>
				</attribute>
				<attribute id="ruleId">
					<text>%ruleId%</text>
				</attribute>
				<attribute id="lowerBoundInputAttributeId">
					<text>%lowerBoundInputAttributeId%</text>
				</attribute>
				<attribute id="lowerBound">
					<number>%lowerBound%</number>
				</attribute>
				<attribute id="ruleOutcome">
					<number>%ruleOutcome%</number>
				</attribute>
				<attribute id="numberOfTimeSeries">
					<number>%numberOfTimeSeries%</number>
				</attribute>
			</attributeFile>
		</csvFile>
	   <csvFile>
      <file>CountThresholdCrossingsOutput.csv</file>
      <id>%ID%</id>
      <x>%X%</x>
      <y>%Y%</y>
      <attribute id="Matching">
         <text>%ID%</text>
      </attribute>
   </csvFile>
</locationSet>