Versions Compared

Key

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

...

Report_Coastal_Forecast 1.00 default.xml

Report_Coastal_Forecast

File name for the Report_Coastal_Forecast configuration.

1.00

Version number

default

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


Figure 89 Elements of the Reports configuration

...

Below are two examples of a config and the resulting plot.


Code Block
xml
xml
		<chart id="Example7" formatId="chartFormat2" width="500" height="306">
			<timeSeries preferredColor="green" lineStyle="solid;thick" axis="right" visibleInLegend="true" label="Gemessen">series1</timeSeries>
			<timeSeries preferredColor="red" lineStyle="solid;thick" axis="right" visibleInLegend="true" label="COSMO2">series2</timeSeries>
			<timeSeries preferredColor="orange" lineStyle="solid;thick" axis="left" visibleInLegend="true" label="COSMO7">series3</timeSeries>
			<timeSeries preferredColor="violet" lineStyle="solid;thick" axis="left" visibleInLegend="true" label="ECMWF">series4</timeSeries>
			<fileName>Example7</fileName>
		</chart>


Image Modified
Threshold line only for timeseries on the left y axis

Stage/discharge plots

When a discharge is displayed, it is possible to show the stage on the right axis. It is not possible to configure this rating on the left axis (and the timeseries on the right axis), since a plot has to have at least one timeseries on the left axis.

...

Below an configuration and resulting plot. The option reverse is applicable only to deprecated rating curves.


Code Block
xml
xml
		<chart id="Example4" formatId="chartFormat1" width="900" height="300">
			<rightAxis>
				<ratingCurve>
					<ratingCurveId>location1</ratingCurveId>
					<reverse>true</reverse>
				</ratingCurve>
			</rightAxis>
			<timeSeries axis="left" preferredColor="blue" markerStyle="none" lineStyle="solid;thick" label="geen verwachting" visibleInLegend="true">series1</timeSeries>
			<fileName>Example4</fileName>
		</chart>


Image Modified
Threshold line only for timeseries on the left y axis


Code Block
xml
xml
		<chart id="Example8" formatId="chartFormat1" width="900" height="300">
			<rightAxis>
				<ratingCurve>
					<ratingCurveId>location1</ratingCurveId>
					<reverse>true</reverse>
				</ratingCurve>
			</rightAxis>
			<timeSeries axis="both" preferredColor="blue" markerStyle="none" lineStyle="solid;thick" label="geen verwachting" visibleInLegend="true">series1</timeSeries>
			<timeSeries axis="left" preferredColor="black" markerStyle="circle" lineStyle="solid;thick" label="meetwaarde" markerSize="3">series2</timeSeries>
			<fileName>Example8</fileName>
		</chart>


Image Modified
Threshold line only for timeseries on the left y axis

For adding a chart to a report the following aspects are important to configure:

...

  • File details like width and height can be retrieved using image processing software.
  • The x0 and y0 elements are margins/shifts of the position of the map compared to the left-upper point of the report (e.g. an A4-sheet). This left-upper point is (0,0). The x0/y0 refer to the left-upper point of the image.
  • The mapFormat is used for positioning the map on the page (relative to all other content) and therefor it is placed in a so-called [DIV] tag. This type of html tag puts everything which is configured within that tag in that position on the page. The following table explains the references of the number in this format:

Position

Type

Variable

0

number

Absolute x position of map image.

1

number

Absolute y position of map image.

2

number

Image width.

3

number

Image height

4

number

Image filename.

5 (optional)

number

Reference to a clickable map (#clickmap by default)

  • The overlayFormat is used for positioning location and/or warning icons on the map based on:
  • The map itself (defined in mapFormat);
  • X and Y coordinates of the required locations from the Locations.xml;
  • Note that in case of numbers bigger than 999, it can be that the output may contain unwanted commas, e.g. width 1274 is printed in the reports as 1,274. In order to avoid this, it is recommended to use

    Code Block
    {<position>, number, #}

    instead of

    Code Block
    {<position>, number}

    .

  • Note that when providing a single quote within a snippet of javascript of OverlayFormat in a format field of the report XML configuration and the report appears to be missing this single quote character, this can be fixed by adding the additional escape character in the form of an additional single quote. A more verbose alternative is to put &#39;&#39; or &apos;&apos;.

Position

Type

Variable

0

number

Absolute x position of status icon.

1

number

Absolute y position of status icon.

2

string

Image filename.

3

string

Status description.

4

string

Location name.

5 (optional)

string

Html-link for opening a individual html page (forecastlocation.html)

The mapFormat and overlayFormat elements are configured in html language in which some parts needs to be dynamically filled in. The result will be valid html. The map itself is placed as the bottom 'layer' using the <DIV> tag attributes (index="0") in the mapFormat. Objects defined in the overlayFormat are given higher indices to place them 'on top of the map' and will always be visible (location icons, warning icons).

...

A clickable map is an image on a html page containing 'hot spots' where the cursor change from the normal 'arrow' to a 'pointing finger' during a mouse-over event. These hot spots can contain hyperlinks to other pages.

mapFormat


No Format
&lt;div style="TOP:{1, number, #}px;
LEFT:{0, number, #}px;
position:absolute;Z-index:0"&gt;
&lt;img border="0" src="{4}"
width="{2,number,#}" height="{3, number, #}"
usemap="{5}"&gt;
&lt;/div&gt;


When adding the string "usemap="{5}" to the mapFormat (see above) the outcome in the html page will be (printed in bold).

...

Hyperlinks can be added to the overlayFormat. By using the following option, hyperlinks to individual reports will be added automatically. They will have a fixed (non-configurable) name, "forecastlocation.html" and assuming it is located in a directory with the same name as the locationId compared to where this report with the map is located in the directory structure.

overlayFormat


No Format
&lt;div style="TOP:{1,number,#}px;
LEFT:{0,number,#}px;
position:absolute;Z-index:1"&gt;
&lt;a href="{5}"&gt;
&lt;img border="0" src="{2}" title="{4}: {3}"&gt;
&lt;/a&gt;
&lt;/div&gt;\n


When adding href="{5}" to the overlayFormat (at that location) a hyperlink is being added to the icon placed on the map. In html it will look like this.

...

  1. table: original table;
  2. rowPerLocationHtmlTable: table with a row per location
  3. rowPerLocationCSVTable: csv table with a row per locations
  4. htmlTable: new style table with same functionality as 'table';
  5. countTables:
    1. thresholdsCrossingsTable: table containing numbers (count) of threshold crossings.
    2. thresholdsCrossingsCountTable: new thresholdsCrossingTable
    3. flagCountTable
    4. flagSourceCountTable
  6. maximumStatusTable: table containing (coloured) indicating threshold crossings over time.
  7. mergedPrecipitationTable: table containing (merged) precipitation figures in specific time intervals
  8. systemStatusTable: tables containing system (management) information;
    1. liveSystemStatus: information about live system: MC and FSS('s);
    2. exportStatus: information about exported files/reports;
    3. importStatus: information about files imported;
    4. scheduledWorkflowStatus: information about (next) scheduled workflows;
    5. completedWorkflowStatus: information about number of workflows completed in last 24 hrs.
    6. currentForecastStatus: information about which workflows are set to CURRENT;
    7. logMessageListing list of logmessages (based on a query)
    8. forecastHistory: historic overview of forecasts.

...

Code Block
languagexml
<declarations>
	  <rowPerLocationHtmlTableFormat id="rowPerLocationFormat1" tableStyle="tableStyle3" >
  	   
  	   <column>
	  	<header>Naam</header>
	  	<format>_data_yellow</format>
		<function>LOCATIONATTRIBUTE(shortname)</function>
	    </column>
	   
	       <column>
	    	<header>Tijd maximale overschrijding</header>
	    	<function>THRESHOLDCROSSING(MAX_DATETIME;Qobserved;dateFormat1)</function>
	     </column>			            
	   
	      
	       <column>
	    	<header>Waarde maximale overschrijding (m3/s)</header>
	    	<function>THRESHOLDCROSSING(MAX_VALUE;Qobserved;numberFormat1)</function>
	     </column>			            

	     <column>
	     	 <header>Tijd maximale waterstand</header>
	         <function>MAXTIME(Hobserved;dateFormat1)</function>
	     </column>
	     
	     <column>
	     	 <header>Maximale waterstand (m)</header>
	         <function>MAXVALUE(Hobserved;numberFormat1)</function>
	     </column>
	     
	  </rowPerLocationHtmlTableFormat>
</declarations>

rowPerLocationCSVTable
Anchor
rowPerLocationCSVTable
rowPerLocationCSVTable

This table is a generic table type and contains for each configured location one row with several columns, separated by commas. The data displayed in a particular column are result of the function that is configured for that column. For each column the following elements can be configured:

  • header : text to display in the column header,
  • width: optional, width of the column
  • function: function that determines/computes the value displayed in the column.

Note that the xml schema allows element 'format', however the format is not applicable to csv table type Also this report type uses templates. The template should contain at least table name. An example:

{noformat}

$TABLE(myTable)$

{noformat}

The rowPerLocationCsvTable can be configured directly in <report> section, or in the <declarations> section and reffered from the <report> section.

Example of the configuration in <report> section:


Code Block
<report>
	<locationId>M-1000</locationId>
	<locationId>H-2091</locationId>
	<rowPerLocationCsvTable id="myTable">
		<column>
			<header>Naam</header>
			<function>LOCATIONATTRIBUTE(shortname)</function>
		</column>
		<column>
			<header>Tijd maximale overschrijding</header>
			<function>THRESHOLDCROSSING(MAX_DATETIME;Qobserved;dateFormat1)</function>
		</column>
		<column>
			<header>Waarde maximale overschrijding (m3/s)</header>
			<function>THRESHOLDCROSSING(MAX_VALUE;Qobserved;numberFormat1)</function>
		</column>


htmlTable
Anchor
htmlTable
htmlTable

...

The following classes are generated automatically and are added after the tableStyleX in which X stand for an integer in the range 1 to 10.

class

description

specific for

_beforeT0

date/time indication before time zero (TO) of the forecast

time column (most left column)

_firstAfterT0

date/time indication of the first occurrence after time zero (T0) of the forecast

time column (most left column)

_afterT0

date/time indication after time zero (TO) of the forecast

time column (most left column)

_data

default indication of data content of a cell

data cells

_anyString

user defined cellFormat

data cells

_datamax

addition to current style if value is maximum of that series (_data_datamax or _anyString_datamax)

data cells

_leftcol

default indication of a row header

 

_header

default indication of a column header

 

_threshold_n

indication of threshold level (n=0,1,2,...)

threshold tables (colouring of backgrounds)

countTables

thresholdsCrossingsTable
Anchor
thresholdsCrossingsTable
thresholdsCrossingsTable

...

Source: 12 hrs of 15min data
Display: maximumStatus with 15 minute data, time header by the hour (with minutes)
Configuration

 

value

explanation

timeStepsInTable

48

(12*4=48 timesteps)

timeStepsAggregation

1

each column represent 1 timestep

timeHeaderInterval

4

4 columns have a merged header (hour)

timeHeaderDisplayMinutes

true

minute indication

Result: table with 48 time columns with 12 aggregated headers visualising the hour with a minute indication (like in first figure of this section)

Source: 6 hrs of 15min data
Display: maximumStatus with hourly data (no minute indication)
Configuration

 

value

explanation

timeStepsInTable

24

(6*4=24 timesteps)

timeStepsAggregation

4

4*15min aggregate to 1 hour

timeHeaderInterval

1

each hour 'column' has its own header

timeHeaderDisplayMinutes

false

no minute indication in header

Result: table with 6 (time) columns indicating the 'worst' status of that hour.

...

In a configuration the following timeSeries/InputVariables exist:

Name

Parameter

LocationSet

Locations

Catchment1_Waterlevel_Obs

H.obs

Catchment1_Locs

Loc1
Loc2
Loc3

Catchment1_Waterlevel_For

H.simulated

Catchment1_Locs

Loc1
Loc2
Loc3

Catchment2_Waterlevel_Obs

H.obs

Catchment2_Locs

Loc4
Loc5
Loc6

Catchment2_Waterlevel_For

H.simulated

Catchment2_Locs

Loc4
Loc5
Loc6

The geographical hierarchy is that Area 1 contains 2 Catchments (Catchment1 and Catchment2)

...

  • tableStyle: a choice of tableStyle which can be influenced by using the corresponding classes in a cascading style sheet. Choices are tableStyle1 to tableStyle10;
  • id: unique identifier (as reference to this table);
  • statusTableSubType: Choice for one of the subtypes of systemStatusTables: Choices are: liveSystemStatus, exportStatus, importStatus, scheduledWorkflowStatus, completedWorkflowStatus, currentForecastStatus, logMessageListing, forecastHistory;
  • tableTitle: a text for a title for this table;
  • headerRows: integer value for the number of header rows;
  • itemHeader: header text for the 'Item' column;
  • benchmarkHeader: header text for the 'Benchmark' column;
  • statusHeader: header text for the 'Status' column;
  • statusHeaderSplit: value indicating the number of header rows in the status column.
  • extraOutputFieldHeader: Additional Field definition specifically for import related topics. Recommended fields are:
    • Last file imported
    • Nr. of files read
    • Nr. of files failed
  • showOutputFieldsOnly: boolean value for displaying the outputfields only.

Remark: when defining extraOutputFieldHeaders it is important to maintain the same order in the declarations sections (definition of the fields) and in the report section (referencing the content) otherwise the header and the content will not correspond.

Report Section


Figure 117 Example of the configuration of an importStatus table in the report section

...

Since this table is not referring to a benchmark (it is just reading the configuration) the value for showOutputFieldsOnly is set to true. Only these fields are displayed.

remark: One reference to an existing workflow is sufficient to extract all scheduled workflows out of the database, that's why it seems that there is only one table row configured here. In fact, this table will be filled with ALL scheduled workflows when configured as above.

Report Section


Figure 120 Example of the configuration of a scheduledWorkflowStatus table in the report section

...