scrollbar |
---|
<p><br /></p> |
What | ThresholdValueSets.xml |
---|---|
Required | no |
Description | definition of threshold values for all locations and data types |
schema location | httphttps://fewsfewsdocs.wldelftdeltares.nl/schemas/version1.0/thresholdValueSets.xsd |
Table of Contents |
---|
Complementary to the definition of the types of thresholds identified, the values of the thresholds are defined in the ThresholdValueSets configuration (ThresholdValueSets.xml on a local filesystem).
...
- The values and what type each value is
- (Optional) Stage/Discharge conversions
- The timeSeriesSet a thresholdValueSet is associated with OR (since 2024.02) the timeSeries filter a thresholdValueSet is associated with
...
When configuring thresholdValueSets, make sure to only configure one thresholdValueSet per unique timeseriesSet. If the same timeseriesSet is used in a second thresholdValueSetssecond thresholdValueSets, the FEWS code will ignore this second thresholdValueSetsecond thresholdValueSet. When the FEWS system is started, an ERROR message will be logged when there are multiple thresholdValueSets multiple thresholdValueSets configured for the same timeseriesSetsame timeseriesSet.
Stage/Discharge conversions
TimeSeries Association
Since 2024.02, ThresholdValues can also be associated with timeSeries that are defined in the same thresholdValueSetSequence. The timeSeries act as a filter to determine which timeSeriesSets the thresholdValueSet is associated with. This is particularly handy to associate a thresholdValueSet with all timeSeriesSet for a parameter group. Note that the valueType always has to be specified and be either scalar or sample. For example:
Code Block | ||
---|---|---|
| ||
<thresholdValueSet id="id" name="Threshold value set with time series filter">
...
<timeSeries>
<valueType>scalar</valueType>
<parameterGroupId>Precipitation</parameterGroupId>
<parameterId>P.m</parameterId>
</timeSeries>
</thresholdValueSet> |
One thresholdValueSet can have either timeSeries or timeSeriesSets defined in its configuration, not both. This option is not yet implemented for all types of thresholdValueSets. It can be used with:
- levelThresholdValues
- maxThresholdValues
but it cannot be used for rateThresholdValues, stage/discharge conversions and forecastAvailableThresholdValue.
When configuring thresholdValueSets, make sure to only configure one thresholdValueSet per unique timeseriesSet, also if defined through a timeSeries. If the same timeseriesSet is used in a second thresholdValueSets, the FEWS code will ignore this second thresholdValueSet. When the FEWS system is started, an ERROR message will be logged when there are multiple thresholdValueSets configured for the same timeseriesSet.
Stage/Discharge conversions
Rating Curves are used in fews to convert between stage Rating Curves are used in fews to convert between stage (water level) and discharge (water flow) values. The optional stage and discharge elements in the thresholdValueSet should only and always be used if a rating curve is used in combination with thresholds.
...
EventTypeIds (otherwise known as EventCodes) are used as a prefix in logging messages for the MC to identify which threshold is crossed. When threshold messages need to be logged, a special predefined threshod activity is required in the workflows.
Code Block | ||||
---|---|---|---|---|
| ||||
<levelThresholdValue> <levelThresholdId>UKV</levelThresholdId> <valueFunction>1</valueFunction> <upActionLogEventTypeId>UKVRRCThreshold.crossed</upActionLogEventTypeId> </levelThresholdValue> |
...
ThresholdValueSet Schema
The latest version of the ThresholdValueSet schema can be found on the Deltares schema site: http://fews.wldelft.nl/schemas/version1.0/thresholdValueSets.xsd. The elements in the schema are shortly described below.
...
One or more qualifier ids the used rating curve should have all
ThresholdValueSetSequence
...
Specific values for max thresholds.
levelThresholdValue
levelThresholdId
...
One or more warnings that correspond to this threshold for the configured timeSeriesSet(s) or timeSeries. These warningAreas are e.g. used in the ThresholdOverviewDisplay threshold crossing counts tabs.
...
ID of the action message (=additional log.message) that must be logged if a threshold value is crossed DOWN. This id has to contain a dot, because the action event is only visible to the master controller if this id contains a dot, e.g. "Threshold_Name.Down". The event code need not be unique.
rateThresholdValue
rateThresholdId
...
An event threshold value is similar to a level threshold, only it has the possibility to be based on correlation events. See 07 Correlation Module - EOL in 2023#07CorrelationModule-LocationAttributeBasedEvents
The advantage to this is that for instance peak heights that occured through the years can be used in the correlation display as well as a threshold without storing the same information in different ways.
The <parameterIdFunction> specifies for which parameter the threshold is valid, the enabled function specifies whether the it should be included as threshold or not. This is mainly meant to filter out events needed for the correlation module that is not desired as threshold. This function is optional, when not configured the thresholds will be applied to all parameters of the timeseries associated with the threshold value set. When multiple different parameters are present in a plot in the Time Series Dialog and it is desired that the event thresholds are visible it might be needed to duplicate the attribute values for the different parameters because there will be no thresholds shown when multiple time sries have thresholds which are not identicalseries have thresholds which are not identical. When this duplicate configuration is undesired it might be better to remove this function.
The <enabledFunction> can refer to a boolean location attribute which specifies whether the event should be included as threshold or not. Default is false.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<thresholdValueSet id="EventThresholds" name="EventThresholds"> <eventThresholdValues> <eventThresholdId>LevelWarn</eventThresholdId> <valueFunction>@PEAK_HEIGHT_VALUE@</valueFunction> <labelFunction>@PEAK_HEIGHT_TIME@</labelFunction> <parameterIdFunction>@PEAK_HEIGHT_PAR@</parameterIdFunction> <enabledFunction>@PEAK_HEIGHT_ENABLED@</enabledFunction> </eventThresholdValues> <timeSeriesSet> <moduleInstanceId>ThresholdCheck</moduleInstanceId> <valueType>scalar</valueType> <parameterId>H.m</parameterId> <locationSetId>MultiValuedAttributeThresholds</locationSetId> <timeSeriesType>external historical</timeSeriesType> </eventThresholdValues> <timeStep unit="hour" divider="1" multiplier="1"/> <timeSeriesSet> <readWriteMode>add originals<<moduleInstanceId>ThresholdCheck</readWriteMode>moduleInstanceId> </timeSeriesSet> </thresholdValueSet> <valueType>scalar</valueType> <parameterId>H.m</parameterId> <locationSetId>MultiValuedAttributeThresholds</locationSetId> <timeSeriesType>external historical</timeSeriesType> <timeStep unit="hour" divider="1" multiplier="1"/> <readWriteMode>add originals</readWriteMode> </timeSeriesSet> </thresholdValueSet> |
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"? | ||||
Code Block | ||||
| ||||
<?xml version="1.0" encoding="UTF-8"?> <!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by Juzer Dhondia (WL | Delft Hydraulics) --> <!--Sample XML file generated by XMLSPY v5 rel. 4 U (http://www.xmlspy.com)--> <locationSets xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews httphttps://fewsfewsdocs.wldelftdeltares.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="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> <attribute id="PEAK_HEIGHT_ENABLED"> <boolean>%ACTIVE%</boolean> </attribute> </attributeFile> </csvFile> </locationSet> </locationSets> |
...
is used to log the info that the related forecast run was available within a certain time window when the observed threshold has been crossed.
deprecatedConversionChoice
...
Another example is showing the configuration for rainfall data. Different functionality is included in the thresholdValueSet shown below. The timeseriesSet is a 15 minute rainfall set for all raingauges rain gauges in a country. The rateThresholdValue element will check 24 hour accumulated rainfall totals and check these total values against a location attribute value @IFD_10Y_24h@. When this total value is crossed for a location, a log messages and event action message is logged. This event action has a grace time of 1 day, this means that if more 24 hour total values are crossed within a 24 hour period, no new event crossing messages for this location will be logged.
The aggregationLevelThresholdValues are used in the Spatial Display. When the accumulation slider computes new aggregated values, the correct thresholdvalue will be used for the aggregated time period.