This transformation calculates a weighted average of of a parameter (for example water temperature) measured at the same location, but at different heights (different z layers). The (water) depth is divided into layers. The weight of the temperature is the thickness of the layer it was measured in. The area that should be averaged is configurable. This area can contain more layers, partial layers, or a single (partial) layer. If the area contains a partial layer, the weight of that layer is only the part that is included in the calculation. If the area start and end are the same the transformation simply extracts the temperature of one layer from a scalar map into a scalar time series.

The area of the calculation can be counted from a standard point of comparison (0 m) or the current water level, which changes in time. Input waterLevelReference is optional.
If waterLevelReference is configured the starting point of the top water layer should be updated with each time step to math the water stand.


The input has to be a scalar map time series, where the domain axis is the Z layers.


Config example:

	<transformation id="StatisticsVerticalAverageScalarZLayerFunctionTest">
		<statisticsVerticalLayers>
			<averageScalarVerticalLayers>
				<input>
					<variableId>input</variableId>
				</input>
				<waterLevelReference>
					<variableId>waterLevelReference</variableId>
				</waterLevelReference>
				<startDepth>-2</startDepth>
				<endDepth>-15</endDepth>
				<outputVariable>
					<variableId>output</variableId>
				</outputVariable>
			</averageScalarVerticalLayers>
		</statisticsVerticalLayers>
	</transformation>
  • No labels