Introduction
The Correlation or Peak Height Display can be added to your Delft-FEWS system to interactively use Water Levle or Flow peaks in correlations. There are several configuration files that involved to enable the correlation functionality:
- Topology (RegionConfigFiles)
This is an optional feature that can be used to link the peak height location for which the correlation display should be shown. Only the forecast location (mostly the downstream locations) should be listed. When a location for which a peak heights relation exist is listed in the topology tree, the correlation display can be automatically activated. - CorrelationDisplay (DisplayConfigFiles)
Links the correct CorrelationEvents and PeakheightsTravelTimes configuration files and set the type of matching to be used to link events (i.e. SelectionType). When the SelectionType is set the “combined” for the forecast location the behavior will be as follows:- Events are first matched on “eventId” and if these are missing, matching takes additionally place based on “travel time” (OR relation).
- Events that have a mismatch based on travel time, but do have an EventId match will be part of the selection.
- Events that have a match based on travel time, but do not have an EventId match will be part of the selection.
The selection in the GUI can be refined using the filter options in the display.
- TravelTimes configuration (TravelTimesFiles)
A location can sometimes appear as forecast location (DS), sometimes as support (US) location. One forecast location may be correlated with multiple support locations. All support parameters for a single forecast location must have the same parameters. It is important to check that a locationId has the same name attached at all occurrences in the TravelTimeSets configuration file. Having multiple names for the same locationId will result in an error in the Delft-FEWS GUI. - CorrelationEventSets (CorrelationEventSetsFiles)
Definition of the events used in establishing a correlation between locations
Correlation display
The correlation display is a display plug-in that can be used to interactively use correlations between time series for multiple locations. The display allows the user to interactively establish correlation between upstream and downstream locations and derive a forecast based on these correlations. For each correlation display to be used interactively, the correlationEventSets configuration will be used. The layout of the display cannot be configured. When available in the config folder, the name of the XML file for configuring the display with is for example PeakHeightsDisplay_NSW_Armidale_H.xml. The image below shows the root elements of the configuration display configuration.
inputTimeSerieInfo
TimeSeriesSet defined for the input data. This time series set is used when applying the correlation established to a complete hydrograph.
eventSetsDescriptorId
Id of the correlationEventSets to be used in the display. The event set must be defined in the CorrelationEventSets configuration.
travelTimesDescriptorId
Id of the travelTimes to be used in the display. The mimimum and maximum allowed travel times must be defined in the travelTimes configuration.
eventSelectionType
Method to be used in matching events. Events at the support and forecast location can be paired either on the basis of common EventId's, or on the basis of a selection on travel time, where events at the upstream and downstream location are paired if these are found to belong to the same hydrological event as defined using travel time criteria defined in the TravelTimes Configuration. Enumeration of options includes;
- eventid
- traveltime
- combined
outputTimeSerieInfo
TimeSeriesSet defined for the output data. This time series set is used only for displaying the temporary time series to be displayed when applying the correlation established to a complete hydrograph. This time series is not saved in the database.
correlationDisplayOptions
Root element of options element for setting line colours in the scatter plot and other correlation display panels.
- scatterplotOptions: Options for setting the properties of the scatter plot. The lineStyle of the scatter plot is "none" by definition (need not be defined). Thresholds can be made invisible by configuring <thresholds visible"false/> this will apply to scatter plot as well as travel times plot.
- equationOptions and displayOptions. Options for setting the properties of the regression line determined with the equation established.
- preferredColor: Preferred colour for plotting scatter plot / regression line. For enumeration see timeSeriesDisplay Configuration in System Configuration.
- markerStyle: Marker style for scatter plot / regression line. For enumeration see timeSeriesDisplay Configuration in System Configuration.
- markerSize: Marker size for scatter plot / regression line in points.
defaultEquation
This allows for hte selection of a default correlation equarion in the display
Definition of the equation type to be applied in determining the correlation. Enumeration of options include
- polynomial
- simple_linear
- exponential_divide
- exponential_multiply
- power
- logarithmic
- hyperbolic
userDefinedRelation
This allows for a user defined equation in the display
An example correlation Display file is attached.
The correlation displayuses two associated configuration items to establish correlations, these are the CorrelationEventSets and the TravelTimes.
CorrelationEventSets
This configuration file is related to the Correlation display, and is used to define the events used in establishing a correlation. The configuration file is in the CorrelationEventSets (table or directory). Each configuration defined is referenced using a CorrelationEventSetsId as defined in the Regional Configuration.
- comment: Optional comment for correlation event sets configuration. Used for reference purposes only.
- correlationEventSet: Root element for defining set of events at a location to be used in establishing correlations.
- locationId: LocationId for which events are defined
- parameterId: ParameterId for which events are defined.
- event: Definition of events at the specified location for the specified parameter. Attributes;
- eventId : String ID for the event (may be used in matching events)
- value : value of the event
- date : event data (yyyy-MM-dd).
- time : event time (hh:mm:ss).
- tag : optional tag for event (may be used in event selection)
Location Attribute Based Events
Since 2019.01 it is possible to define correlation events based on (multivalued) location attributes.
The advantage to this is the possibility to store the events in csv format
<?xml version="1.0" encoding="UTF-8"?> <correlationEventSets xsi:schemaLocation="http://www.wldelft.nl/fews https://fewsdocs.deltares.nl/schemas/version1.0/correlationEventSets.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews"> <timeZone>GMT</timeZone> <correlationEventSet> <locationSetId>MultiValuedAttributePeakHeights</locationSetId> <eventIdAttributeId>EVENT_ID</eventIdAttributeId> <eventParameterLocationAttributeId>PEAK_HEIGHT_PAR</eventParameterLocationAttributeId> <eventTimeLocationAttributeId>PEAK_HEIGHT_TIME</eventTimeLocationAttributeId> <eventValueLocationAttributeId>PEAK_HEIGHT_VALUE</eventValueLocationAttributeId> </correlationEventSet> </correlationEventSets>
<?xml version="1.0" encoding="UTF-8"?> <locationSets xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews https://fewsdocs.deltares.nl/schemas/version1.0/locationSets.xsd" version="1.1"> <locationSet id="MultiValuedAttributePeakHeights"> <csvFile> <file>MultiValuedAttributePeakHeightsLocations.csv</file> <geoDatum>WGS 1984</geoDatum> <id>%ID%</id> <name>%NAME%</name> <x>%X%</x> <y>%Y%</y> <z>0</z> <attributeFile> <csvFile>MultiValuedAttributePeakHeightsLocationAttributes.csv</csvFile> <id>%ID%</id> <dateTimePattern>dd-MM-yyyy</dateTimePattern> <attribute id="EVENT_ID"> <text>%PAR%%VALUE%%TIME%</text> </attribute> <attribute id="PEAK_HEIGHT_PAR"> <text>%PAR%</text> </attribute> <attribute id="PEAK_HEIGHT_TIME"> <dateTime>%TIME%</dateTime> </attribute> <attribute id="PEAK_HEIGHT_VALUE"> <number>%VALUE%</number> </attribute> </attributeFile> </csvFile> </locationSet> </locationSets>
ID,PAR,VALUE,TIME,ACTIVE PH_locA,H.m,0.1,01-01-2001,true PH_locA,H.m,0.2,02-02-2002,false PH_locA,H.m,0.3,03-03-2003,true PH_locA,H.sim,0.4,04-04-2004,false PH_locA,H.sim,0.5,05-05-2005,true PH_locA,H.sim,0.6,06-06-2006,true PH_locB,H.m,1.1,11-10-2011,true PH_locB,H.m,1.2,12-10-2012,false PH_locB,H.m,1.3,13-10-2013,true PH_locB,H.m,1.4,14-10-2014,false PH_locB,H.sim,1.5,15-10-2015,true PH_locB,H.sim,1.6,16-10-2016,false PH_locB,H.sim,1.7,17-10-2017,false PH_locB,H.sim,1.8,18-10-2018,true
TravelTimes
This configuration file is related to the Correlation display, and is used to define the travel time between locations. These travel times may be used in matching events. The configuration file is in the TravelTimes (table or directory). Each configuration defined is referenced using a TravelTimes Id as defined in the Regional Configuration.
Elements of the TravelTimes configuration
- travelTime: Root element for defining a set of travel times. Multiple entries may exist.
- downstreamLocation: LocationId of the downstream (forecast) location. Attributes;
- id : Id of the location
- name : name of the location (for reference purposes only)
- upstreamLocation: LocationId of the upstream (support) location. Multiple entries may exist. Attributes;
- id : Id of the location
- name : name of the location (for reference purposes only)
- travelTime: Definition of the travel time between the location (average) Attributes;
- unit unit of time (enumeration of: second, minute, hour, day, week)
- multiplier defines the number of units given above in a time step.**
- divider same function as the multiplier, but defines fraction of units in time step.**
- validPeriod: Window around travel time for determining validity of event to be matched.
- unit unit of time (enumeration of: second, minute, hour, day, week)
- start : start of validity period
- end : start of validity period
An example TravelTimes file is attached.