Versions Compared

Key

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

scrollbar

What

nameofinstance.xml

Description

Configuration for the new version of the transformation module

schema location

http://fews.wldelft.nl/schemas/version1.0/transformationModule.xsd

Entry in ModuleDescriptors

<moduleDescriptor id="TransformationModule">
<description>Transformation Module</description>
<className>nl.wldelft.fews.system.plugin.transformationmodule.TransformationModule</className>
</moduleDescriptor>

Contents

Table of Contents
Children Display

Anchor
_Toc154574412
_Toc154574412
Anchor
_Toc95297266
_Toc95297266
Transformation Module Configuration (New Version)

The Transformation module is a general-purpose module that allows for generic transformation and manipulation of time series data. The module may be configured to provide for simple arithmetic manipulation, time interval transformation, shifting the series in time etc, as well as for applying specific hydro-meteorological transformations such as stage discharge relationships etc.

An improvement version of the FEWS Transformation Module is currently under construction. The new version is much more easy to configure than the old version. The new version uses a new schema for configuration, also several new transformations are added.

Configuration    

When available as configuration on the file system, the name of an XML file for configuring an instance of the transformation module called for example TransformHBV_Inputs may be:

TransformHBV_Inputs 1.00 default.xml.

TransformHBV_Inputs

File name for the TransformHBV_Inputs configuration.

1.00

Version number

default

Flag to indicate the version is the default configuration (otherwise omitted).

...

Both the transformations and coefficient sets can be configured to be time dependent. This can be used for instance to define a given coefficient value to be 3 from 1 January 2008 to 1 January 2009, and to be 4 from 1 January 2009 onwards. This can be done by defining multiple periodCoefficientSets, each one with a different period, as in the following xml example.

Code Block
xml
xml

<periodCoefficientSet>
  <period>
    <startDateTime date="2008-01-01" time="00:00:00"/>
    <endDateTime date="2009-01-01" time="00:00:00"/>
  </period>
  <structure>
    <pumpFixedDischarge>
      <discharge>3</discharge>
    </pumpFixedDischarge>
  </structure>
</periodCoefficientSet>
<periodCoefficientSet>
  <period>
    <validAfterDateTime date="2009-01-01"/>
  </period>
  <structure>
    <pumpFixedDischarge>
      <discharge>4</discharge>
    </pumpFixedDischarge>
  </structure>
</periodCoefficientSet>

...

If for a given transformation there are different coefficientSets configured for different periods in time, then the following rule is used. The start of a period is always inclusive. The end of a period is exclusive if another period follows without a gap in between, otherwise the end of the period is inclusive. If for example there are three periodCoefficientSets defined (A, B and C), each with a different period, as in the following xml example. Then at 2002-01-01 00:00:00 periodCoefficientSet A is valid. At 2003-01-01 00:00:00 periodCoefficientSet B is valid since the start of the period is inclusive. At 2004-01-01 00:00:00 periodCoefficientSet B is still valid, since there is a gap after 2004-01-01 00:00:00. At 2011-01-01 00:00:00 periodCoefficientSet C is valid, since no other periods follow (the period of C is the last period in time that is defined). This same rule applies to time-dependent transformations.

Code Block
xml
xml

<periodCoefficientSet>
  <!-- periodCoefficientSet A -->
  <period>
    <startDateTime date="2002-01-01" time="00:00:00"/>
    <endDateTime date="2003-01-01" time="00:00:00"/>
  </period>
  ...
</periodCoefficientSet>
<periodCoefficientSet>
  <!-- periodCoefficientSet B -->
  <period>
    <startDateTime date="2003-01-01" time="00:00:00"/>
    <endDateTime date="2004-01-01" time="00:00:00"/>
  </period>
  ...
</periodCoefficientSet>
<periodCoefficientSet>
  <!-- periodCoefficientSet C -->
  <period>
    <startDateTime date="2010-01-01" time="00:00:00"/>
    <endDateTime date="2011-01-01" time="00:00:00"/>
  </period>
  ...
</periodCoefficientSet>

 

Run transformations for a set of selected locations

In some cases it is usefull to run a transformation only for a specific set of locations. For example when the entire workflow has already ran and there is only a change at a specific location. This situation can occur, for example, when a water level has been editted or when the configuration is changed.

...

This functionality is now available in FEWS.However it is important to understand that this functionality cannot be used in all workflows. The functionality can be applied for transformations only. It cannot be used for running models or secondary validations. When a transformation is started for a location selection than the transformation will only start when the location of one of the input time series is selected. When a transformation has created output for a location which was not selected by the user than this location whill be added to the selection.

It is possible to run a workflow for a selected set of locations from the IFD, the task dialog and the manual forecast dialog. By default workflows cannot be run for a selected set of locations. To enable this the option allowSelection should be set to true in the workflowdescriptor of the workflow. Below an example.

Code Block
xml
xml

<workflowDescriptor id="FillRelations" forecast="false" visible="true"autoApprove="false">
  <description>Met deze taak worden de gaten groter dan 2 uur gevuld dmv. relaties.</description>
  <allowSelection>true</allowSelection>
  <schedulingAllowed>true</schedulingAllowed>
</workflowDescriptor>

 

When a node in the IFD is selected with a workflow which has the allowSelection option set true, the GUI will look like this:

In the property dialog below the tree with the nodes two selection boxes will appear.

...

In the taskrun dialog an additinal checkbox will appear.

 

 Which locations should the user select?

The transformation will run for the selected locations. If one the input timeseries is selected in the filters or in the map the transformation will run.

...

Therefore it is by default not possible to run a workflow for a specific location selection. This is only possible when in the workflowdescriptors the option allowSelection is to true. This option should only be set to true when the configurator has checked that the workflow is suitable for running for a specific location.

Steps to follow when implementing selection specific calculations

The following steps should be followed when this functionality is implemented.
1) Decide in which situations this functionality is needed
2) Make a list of the workflows which need to run in this type of situations
3) Ensure that the workflow only consists of transformations for which this functionality can be used.
4) Move transformations or other parts of the workflow which are suitable for this type of operations to another workflow
5) Set the option allowSelection to true in the workflow descriptor for the workflow which can be used for selection specific calculations
6) When the workflows will be started from the taskrun dialog of the manual forecast dialog no additional configuration is needed. These displays are available in almost every FEWS system. However when the IFD will be used for this. the following additional steps should be taken.

Implement selecion specific calculations for IFD

First step is to create a topology.xml to configure the content of the tree from which the workflows should be started.

...

Below an example (part of the topology.xml)

Code Block
xml
xml

<nodes id="HDSR"><nodes id="oppervlaktewaterstand"><relativePeriod unit="week" start="-52" end="0" />
  <node id="vul gaten kleiner dan 2 uur">
   <previousNodeId>secondary validatie</previousNodeId>
   <workflowId>FillGap2H_WerkOpvlWater</workflowId>
   <filterId>Fillgap</filterId>
  <localRun>false</localRun>
 </node>
 <node id="vul gaten groter dan 2 uur">
  <previousNodeId>vul gaten kleiner dan 2 uur</previousNodeId>
  <workflowId>FillRelations</workflowId>
  <localRun>false</localRun>
 </node>
 <node id="berekening debieten">
  <previousNodeId>vul gaten groter dan 2 uur</previousNodeId>
  <workflowId>DebietBerekening</workflowId>
  <localRun>false</localRun>
 </node>
 <node id="sample werkfilterdata nonequi naar 15min">
  <previousNodeId>berekening debieten</previousNodeId>
  <workflowId>SampleRuwNaar15M</workflowId>
  <localRun>false</localRun>
 </node>
 <node id="langsprofielen berekenen">
  <previousNodeId>sample werkfilterdata nonequi naar 15min</previousNodeId>
  <workflowId>Langsprofiel</workflowId>
  <localRun>false</localRun>
 </node>
 <node id="aggregatie van kwartier naar uur">
  <previousNodeId>langsprofielen berekenen</previousNodeId>
  <workflowId>AggregeerWerkOpvlWater</workflowId>
  <localRun>false</localRun>
 </node>
 <node id="Peilbesluit evaluatie">
  <previousNodeId>aggregatie van kwartier naar uur</previousNodeId>
  <workflowId>PeilbesluitEvaluatie</workflowId>
  <localRun>false</localRun>
 </node>
 <node id="export LIZARD">
  <previousNodeId>Peilbesluit evaluatie</previousNodeId>
  <workflowId>ExportCIW</workflowId>
  <localRun>false</localRun>
 </node>
 <node id="export WIS-REPORTS">
  <previousNodeId>export LIZARD</previousNodeId>
  <workflowId>ExportCIW</workflowId>
  <localRun>false</localRun>
 </node>
</nodes>

second step is to add the following line the explorer.xml to add the IFD tool window to the system.

Code Block
xml
xml

<explorerTask name="Forecasts">
  <taskClass>nl.wldelft.fews.gui.plugin.selection.SegmentSelectionDialog</taskClass>
  <toolbarTask>false</toolbarTask>
  <menubarTask>false</menubarTask>
  <toolWindow>true</toolWindow>
  <loadAtStartup>true</loadAtStartup>
</explorerTask>

List of all available transformations

For the most recent development version see the xsd schema at http://fews.wldelft.nl/schemas/version1.0/transformationTypes.xsd

...