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). Each Z layer is represented by a TimeSeriesSet. (They have to have the same geometry). The entire (water) depth is divided into layers. The z layers are the center points of these water layers.

In the average calculation the weight of the parameter is the thickness of the water layer it was measured in. The calculation is done per grid cell. The (vertical) area that should be averaged is configurable. This area can contain more water layers, partial water layers, or a single (partial) layer. If the averaging area contains a partial layer, the weight of that water layer is only the part that is included in the calculation. If the averaging area start and end are the same the transformation simply extracts the temperature of one layer from the time series array.

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 match the water stand. If the water level has a missing value, no avergae will be calculated.


Config example:

<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">

   <variable>
      <variableId>input</variableId>
      <timeSeriesSet>
         <moduleInstanceId>StatisticsVerticalAverageGridZLayerFunctionTest</moduleInstanceId>
         <valueType>grid</valueType>
         <parameterId>temperatre</parameterId>
         <locationSetId>ZLayerAverage</locationSetId>
         <timeSeriesType>external historical</timeSeriesType>
         <timeStep unit="day"></timeStep>
         <relativeViewPeriod unit="day" start="0" end="3"/>
         <readWriteMode>add originals</readWriteMode>
      </timeSeriesSet>
   </variable>
    <variable>
      <variableId>waterReferenceLevel</variableId>
      <timeSeriesSet>
         <moduleInstanceId>StatisticsVerticalAverageGridZLayerFunctionTest2</moduleInstanceId>
         <valueType>grid</valueType>
         <parameterId>waterLevel</parameterId>
         <locationId>ZLayerAverage_0</locationId>
         <timeSeriesType>external historical</timeSeriesType>
         <timeStep unit="day"></timeStep>
         <relativeViewPeriod unit="day" start="0" end="3"/>
         <readWriteMode>add originals</readWriteMode>
      </timeSeriesSet>
   </variable>
   <variable>
      <variableId>output</variableId>
      <timeSeriesSet>
         <moduleInstanceId>StatisticsVerticalAverageGridZLayerFunctionTest2</moduleInstanceId>
         <valueType>grid</valueType>
         <parameterId>averageTemperature</parameterId>
         <locationId>ZLayerAverage_0</locationId>
         <timeSeriesType>external historical</timeSeriesType>
         <timeStep unit="day"></timeStep>
         <relativeViewPeriod unit="day" start="0" end="3"/>
         <readWriteMode>add originals</readWriteMode>
      </timeSeriesSet>
   </variable>
   <transformation id="StatisticsVerticalAverageGridZLayerFunctionTest2">
      <statisticsVerticalLayers>
         <averageGridZLayers>
            <input>
               <variableId>input</variableId>
            </input>
            <waterLevelReference>
               <variableId>waterReferenceLevel</variableId>
            </waterLevelReference>
            <startDepth>-2.5</startDepth>
            <endDepth>-13</endDepth>
            <outputVariable>
               <variableId>output</variableId>
            </outputVariable>
         </averageGridZLayers>
      </statisticsVerticalLayers>
   </transformation>
</transformationModule>


  • No labels