Versions Compared

Key

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

...

forecastThresholdCrossingXml

WORK-IN-PROGRESS (TO DO ANNE 

Jira
serverDeltares Issue Tracker
serverId20635570-6a34-3a69-a785-26a57a470c5b
keyFEWS-19342
)

The forecastThresholdCrossingXml report generates an xml-file containing threshold crossing information for a given ensemble time series. An example of a generated xml file can be found here.

Configuring the forecastThresholdCrossingXml report requires at least two input variables to be configured. One input variable containing the forecast ensemble time series for which the report must be generated, and a second input variable containing the a time series which has the current level (value) for the same locations. Optionally, additional forecast scenario input variables can be defined, each containing forecast time series (no ensemble) for the same locations as the ensemble input variable.

The example generated xml file was generated using the following configuration:

Code Block
languagexml
titleExample config for forecastThresholdCrossingXml
<report>
   <inputVariable variableId="forecast_series">
      ...
   </inputVariable>
   <inputVariable variableId="ensemble_series">
      ...
   </inputVariable>
   <inputVariable variableId="level_series">
      ...
   </inputVariable>
   <forecastThresholdCrossingXml fileName="threshold-crossing.xml" locationNameAttribute="REPORT_NAME" externalLocationIdAttribute="EXTERNAL_ID">
      <forecastThresholdCrossingXmlTemplate>ForecastThresholdCrossing_template.xml</forecastThresholdCrossingXmlTemplate>
      <forecastEnsembleTimeSeries>ensemble_series</forecastEnsembleTimeSeries>
      <forecastScenarios>
         <forecastTimeSeries id="1" name="Forecast Policy" numberFormatId="numberFormatId">forecast_series</forecastTimeSeries>
      </forecastScenarios>
      <percentileScenarios>
         <percentile name="90% likely">90</percentile>
         <percentile name="75% likely">75</percentile>
      </percentileScenarios>
      <currentLevelTimeSeries numberFormatId="numberFormatId">level_series</currentLevelTimeSeries>
      <floodClasses>
         <default>less-than-minor</default>
         <floodClass thresholdId="levelThreshold1">minor</floodClass>
         <floodClass thresholdId="levelThreshold2">moderate</floodClass>
         <floodClass thresholdId="levelThreshold3">major</floodClass>
      </floodClasses>
      <additionalThresholds>
         <thresholdId>levelThreshold3</thresholdId>
         <thresholdId>levelThreshold4</thresholdId>
         <thresholdId>levelThreshold4</thresholdId>
      </additionalThresholds>
      <siteFigures>
         <siteFigure>
            <id>1</id>
            <name>@NAME@Forecast1</name>
            <fileName>@NAME@-forecast-1.png</fileName>
            <type>png</type>
            <alternativeText>Graphical forecast for @NAME@</alternativeText>
            <viewPort left="0" top="0" width="800" height="600"/>
         </siteFigure>
         <siteFigure>
            <id>2</id>
            <name>@NAME@Forecast2</name>
            <fileName>@NAME@-forecast-2.png</fileName>
            <type>png</type>
            <alternativeText>Graphical forecast for @NAME@</alternativeText>
            <viewPort left="100" top="100" width="900" height="700"/>
         </siteFigure>
      </siteFigures>
   </forecastThresholdCrossingXml>
   <template>ForecastThresholdCrossing_template.xml</template> <!-- irrelevant, the report module will use the <forecastThresholdCrossingXmlTemplate> element to determine the template -->
   <outputSubDir>thresholdcrossing</outputSubDir>
   <outputFileName>crossingTest.html</outputFileName> <!-- irrelevant, the report module will use the "filename" attribute of the <forecastThresholdCrossingXml> element to determine the output file name -->
</report>

The ForecastThresholdCrossing_template.xml can contain normal report tags which will be replaced as usual. This report type also allows several report specific tags:

  • %GENERATION_TIME% : The system time at the moment the report is generated.
  • %FORECAST_START_TIME% : the t0 with which the report is generated.
  • %NEXT_GENERATION_TIME% : if the workflow in which the report is generated is a scheduled task, the next time at which this task will run is reported. Otherwise: "N/A".
  • %PREVIOUS_GENERATION_TIME% : if the workflow in which the report is generated has been run before, the last time at which the workflow was run is reported. Otherwise: "N/A"
  • %ENSEMBLE% : this tag will be replaced with the <ensemble> element and all of its sub-elements as described below.

The forecastThresholdCrossingXml report type generates an <ensemble> element for the given ensemble input time series. This ensemble element will first contain a number of <scenario> elements equal to the number of forecast scenario time series specified in the configuration. The id and name attributes of each of these <scenario> elements will match the configured id and name for the <forecastTimeSeries> in the configuration. After the <scenario> elements, there will be a <sites> element in which for each location in the given ensemble time series, the current level (taken from the level time series), figures (determined using the <siteFigures> in the configuration) and threshold crossings for each of the scenarios (both the configured forecast and percentile scenarios) will be reported. The thresholds which are to be included in the report are all the thresholds named in the <floodClasses> element as well as the thresholds configured in the <additionalThresholds> element.

With each value reported for the forecast scenario time series as well as the level time series, the report will also contain a "flood-class". This flood class is determined using the <floodClasses> configured. The flood class corresponding to a value is the highest of the configured flood class thresholds which is exceeded by the value, or the configured default flood class if none of the thresholds is exceeded.

For each of the configured <percentileScenarios> a percentile time series will be calculated. For example for a percentile of 90, FEWS will calculate the (100 - 90) = 10th percentile value for the ensemble time series for each time step (the value for which 90% of ensembles have a higher value) to obtain a "90% likely" time series. The generated report file will then include whether this calculated percentile time series exceeded each of the thresholds and if so, the earliest exceedance time step. 

floodScenarioXml

WORK-IN-PROGRESS (TO DO RUDIE: 

Jira
serverDeltares Issue Tracker
serverId20635570-6a34-3a69-a785-26a57a470c5b
keyFEWS-19742
)

...