scrollbar |
---|
...
Table of Contents |
---|
Water Coach script configuration
What | script_config.xml (stand alone WaterCoach), or waterCoachScript.xml (embedded WaterCoach, from 2016.01 and up) |
---|---|
Description | Configuration of a script in the |
Water Coach | |
schema location | http://fews.wldelft.nl/watercoachschemas/version1.0/script_config.xsd |
---|
, or http://fews.wldelft.nl/schemas/version1.0/waterCoachScript.xsd |
In a script configuration, the start and end timeIn a scenario configuration, the start and end time of a scenario, and events for a scenario the script are specified. A scenario must be script is a directory in the scenario/script database in which files relevant for that scenario script are collected, including the script configuration file. For more information, see scenario/script database.
Section | |||||
---|---|---|---|---|---|
|
...
|
...
|
...
|
Section | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Section | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Section | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Section | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Code Block | ||
---|---|---|
| ||
<script xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/watercoachschemas/version1.0/script_config.xsd">
<title>Water Wolf</title>
<timeZone>
<offset>+00:00</offset>
</timeZone>
<dataStart date="2019-10-07" time="09:00:00"/>
<dataStop date="2019-10-11" time="09:00:00"/>
<displayStart date="2020-01-01" time="12:00:00"/>
<workflow>
<workflowId>Export_Meren_WC</workflowId>
<schedulingInterval unit="minute" multiplier="10"/>
<schedulingStart date="2020-01-01" time="12:01:00"/>
</workflow>
<workflow>
<workflowId>Import_Rivieren_Forecast_WC</workflowId>
<schedulingInterval unit="minute" multiplier="10"/>
<schedulingStart date="2020-01-01" time="12:02:00"/>
</workflow>
</script> |
Example script
An example of a script configuration is given here:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2009 sp1 (http://www.altova.com) by ICT (Stichting Deltares) -->
<script xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/waterCoachScript.xsd">
<title>Demonstration</title>
<dataStart date="2007-10-04" time="10:00:00"/>
<dataStop date="2007-10-04" time="13:05:00"/>
<displayStart date="2012-11-23" time="09:55:00"/>
<stories>
<inbox>
<title>inbox</title>
<frame>
<title lang="EN">Session start</title>
<start date="2007-10-04" time="10:05:05"/>
<popup>true</popup>
<requiredExperienceLevel>0</requiredExperienceLevel>
<requiredExperienceLevel>1</requiredExperienceLevel>
<file lang="EN">start_session.txt</file>
</frame>
<frame>
<title lang="EN">Help</title>
<start date="2007-10-04" time="10:05:15"/>
<popup>false</popup>
<requiredExperienceLevel>0</requiredExperienceLevel>
<requiredExperienceLevel>1</requiredExperienceLevel>
<message lang="EN">If you need help, take a look at file://%fewsRegionDir%\Help.pdf</message>
</frame>
<frame>
<title lang="EN">KNMI analysis_1</title>
<start date="2007-10-04" time="10:06:05"/>
<popup>false</popup>
<requiredExperienceLevel>0</requiredExperienceLevel>
<requiredExperienceLevel>1</requiredExperienceLevel>
<file lang="EN">windfield_03111200.pdf</file>
</frame>
<frame>
<title lang="EN">Assignment 1</title>
<start date="2007-10-04" time="10:16:00"/>
<popup>false</popup>
<requiredExperienceLevel>0</requiredExperienceLevel>
<once>true</once>
<file lang="EN">assignment_1.txt</file>
</frame>
</inbox>
<story color="aquamarine">
<title>KNMI</title>
<frame>
<title lang="EN">Telephone call</title>
<start date="2007-10-04" time="10:06:00"/>
<stop date="2007-10-04" time="10:16:00"/>
<popup>true</popup>
<requiredExperienceLevel>0</requiredExperienceLevel>
<requiredExperienceLevel>1</requiredExperienceLevel>
<file lang="EN">phonecall_knmi_1.txt</file>
</frame>
<frame>
<title lang="EN">KNMI phoneline is busy</title>
<start date="2007-10-04" time="10:16:00"/>
<stop date="2007-10-04" time="11:05:00"/>
<popup>false</popup>
<requiredExperienceLevel>0</requiredExperienceLevel>
<requiredExperienceLevel>1</requiredExperienceLevel>
<message lang="EN">KNMI phoneline is busy. PLease try again later.</message>
<message lang="NL">KNMI telefoonlijn is ingesprek. Probeer het later nogmaals.</message>
</frame>
</story>
<story color="goldenrod">
<title>HMCZ</title>
<frame>
<title lang="EN">Telephone call</title>
<start date="2007-10-04" time="11:07:00"/>
<stop date="2007-10-04" time="12:07:00"/>
<popup>false</popup>
<requiredExperienceLevel>0</requiredExperienceLevel>
<file lang="EN">phonecall_hmcz_1.txt</file>
</frame>
</story>
<story color="forest green">
<title>HMCN</title>
<frame>
<title lang="EN">Telephone call</title>
<start date="2007-10-04" time="10:08:00"/>
<stop date="2007-10-04" time="12:08:00"/>
<popup>false</popup>
<requiredExperienceLevel>0</requiredExperienceLevel>
<file lang="EN">phonecall_hmcn_1.txt</file>
</frame>
</story>
</stories>
<forecastTable>
<header>
<column id="sector">sector</column>
<column id="station">station</column>
<column id="astro_date" lang="EN">date</column>
<column id="astro_time" lang="EN">time astro high tide</column>
<column id="astro_level" unit="cm" isExport="true" exportName="H.tidal.astronomic">astro water level</column>
<column id="svsd_forecast" unit="cm" isEditable="true" exportName="H.tidal.peak">forecast</column>
</header>
<row id="Vlissingen">
<cell columnId="sector">Schelde</cell>
<cell columnId="station">Vlissingen</cell>
<cell columnId="astro_date" lang="EN">January 1</cell>
<cell columnId="astro_time">19:16</cell>
<cell columnId="astro_level">237</cell>
</row>
<row id="HoekVanHolland">
<cell columnId="sector">West Holland</cell>
<cell columnId="station">Hoek van Holland</cell>
<cell columnId="astro_date" lang="EN">January 1</cell>
<cell columnId="astro_time">20:01</cell>
<cell columnId="astro_level">122</cell>
</row>
</forecastTable>
<forecastNote>
<initialText lang="EN">Here you can add notes to support your forecast.</initialText>
</forecastNote>
<dictionaryFiles>
<dictionaryFile lang="EN">Dictionary_1.xml</dictionaryFile>
</dictionaryFiles>
</script>
|
Dictionary file configuration
Anchor | ||||
---|---|---|---|---|
|
What | dictionary.xml (stand alone WaterCoach), or waterCoachDictionary.xml (embedded WaterCoach, from 2016.01 and up) |
---|---|
Description | Configuration of a dictionary file in the Water Coach |
schema location | http://fews.wldelft.nl/watercoachschemas/version1.0/dictionary.xsd, or http://fews.wldelft.nl/schemas/version1.0/waterCoachDictionary.xsd |
Section | |||||||
---|---|---|---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Example dictionary
An example of a dictionary file configuration is given here:
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/waterCoachDictionary.xsd">
<entry>
<word>ACCESS C</word>
<definition>
ACCESS C (1 hour high resolution 36 hour models covering limited domains). Same
disaggregation and sub-area estimation as for OCF.
</definition>
</entry>
<entry>
<word>ACCESS R</word>
<definition>
ACCESS R (1 hour medium resolution 72 hour model). Same disaggregation and
sub-area estimation as for OCF.
</definition>
</entry>
<entry>
<word>ACCESS G</word>
<definition>
ACCESS G (3 hour low resolution model). Same disaggregation and sub-area
estimation as for OCF.
</definition>
</entry>
<entry>
<word>ECMWF</word>
<definition>
ECMWF (3 hour low resolution model). Same disaggregation and sub-area
sestimation as for OCF.
</definition>
</entry>
</dictionary> |
Events
In the section Events
of the scenario configuration, an arbitrary number of events can be specified according to the following schema:
Each event must have a title by specifying the Title
-key. This title will be used in the list of actions that the user can invoke from the drop-down menu in the scenario window of the FEWS Game. The title can be different for various languages:
...
<Event>
<Title lang="NL">Telefoongesprek</Title>
<Title lang="GE">Anruf</Title>
<Title>Telephone call</Title>
</Event>
If the language attribute for Title
is specified and it corresponds to the preferred language in the application configuration, then this title is used in the scenario. If no language attribute is found that corresponds the the preferred language, then the default Title
for which no language attribute was specified will be used.
The Type
of an event can be equal to either static
, dynamic
or static and dynamic
. A static event will be executed at the indicated time and will be lost thereafter, i.e. the event can not be invoked again by the user. A dynamic event will be available after the indicated time as an action in the drop-down menu of the scenario window and can be invoked by the user. A static and dynamic event will be executed at the indicated time, but is also available as an action in the drop-down menu.
The Time
-key indicates when a static event will be executed or when a dynamic event will be available as an action to the user. As with the Start
- and Stop
-keys, the Time
-key has attributes date
and time
following the format YYYY-MM-DD
and hh:mm:ss
, respectively.
For a dynamic event, a delay can be specified with the Delay
-key (which only has a time
attribute). For example,
...
<Delay time="00:00:30"/>
indicates that the event will be executed 30 seconds after the user invoked it.
A condition can be added to an event; the event will only be executed if this condition is fulfilled. For now, the only supported condition is one based on a forecast published by the user. A condition must be specified according to:
where
Type
must be equal to "Forecast",Station
is the name of the forecast station (see below),Operator
is one of "lt" (less than), "gt" (greater than), "le" (less than or equal to), or "ge" (greater than or equal to), andValue
is the reference value to compare to.
An example in which a condition is used:
...
<Event>
<Title>condition</Title>
<Type>static and dynamic</Type>
<Time date="2008-03-13" time="00:01:00"/>
<Condition>
<Type>Forecast</Type>
<Station>Lowestoft</Station>
<Operator>ge</Operator>
<Value>300</Value>
</Condition>
<File>emergency_telephone_call.txt</File>
</Event>
One of the following two actions can be associated with an event:
File
: the specified file is executed (e.g. a pdf-file that is displayed in Adobe Reader),NewTime
: the scenario time is shifted to the specified time.
The File
-key has an optional language attribute that behaves the same as for the Title
-key. The NewTime
-key has the same date
and time
attributes as Start
, Stop
, and Time
.
Forecasts
Locations for which a water level forecast must be made are specified in the Forecasts
-section. The schema for this section is as follows:
The time zone can be specified with the TimeZone
-key; for now, only "GMT" is supported.
For each forecast in the list of forecasts, the following items must be specified:
Sector
: the name of the sector to which the forecast station belongs,Station
: the name of the forecast station,FewsLocation
: the name of the forecast station in the FEWS configuration,AstroDateTime
: the date/time of the astronomical high tide for which a water level forecast must be made,AstroWaterLevel
: the astronomical water level of the high tide.
The AstroDateTime
-key has two attributes date
and time
with format YYYY-MM-DD} and {{hh:mm:ss
, respectively.
Example
A complete example of a scenario configuration is given here:
Code Block | |
---|---|
xml | xml |
title | Example of scenario configuration |
<?xml version="1.0" encoding="UTF-8"?>
<Scenario xmlns="http://localhost" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://localhost ../../xml-schemas/scenario_config.xsd">
<Name>storm surge March 10-13</Name>
<Start date="2008-03-12" time="04:00:00"/>
<Stop date="2008-03-12" time="18:00:00"/>
<NextEventButton>yes</NextEventButton>
<Events>
<Event>
<Title lang="NL">Start zitting</Title>
<Title lang="EN">Session start</Title>
<Type>static and dynamic</Type>
<Time date="2008-03-12" time="04:00:05"/>
<File lang="NL">start_zitting_NL.txt</File>
<File lang="EN">start_zitting_EN.txt</File>
</Event>
<Event>
<Title lang="NL">KNMI weeranalyse 12 maart, 0:00 uur</Title>
<Title lang="EN">KNMI analysis March 12, 12:00 midnight</Title>
<Type>dynamic</Type>
<Time date="2008-03-12" time="04:00:05"/>
<File lang="NL">weerkaart_12maart_00uur.pdf</File>
<File lang="EN">weerkaart_12maart_00uur.pdf</File>
</Event>
<Event>
<Title lang="NL">KNMI weeranalyse 12 maart, 12:00 uur</Title>
<Title lang="EN">KNMI analysis March 12, 12:00 noon</Title>
<Type>dynamic</Type>
<Time date="2008-03-12" time="04:00:05"/>
<File lang="NL">weerkaart_12maart_12uur.pdf</File>
<File lang="EN">weerkaart_12maart_12uur.pdf</File>
</Event>
<Event>
<Title lang="NL">KNMI weeranalyse 13 maart, 0:00 uur</Title>
<Title lang="EN">KNMI analysis March 13, 12:00 midnight</Title>
<Type>dynamic</Type>
<Time date="2008-03-12" time="04:00:05"/>
<File lang="NL">weerkaart_13maart_06uur.pdf</File>
<File lang="EN">weerkaart_13maart_06uur.pdf</File>
</Event>
<Event>
<Title lang="NL">Telefoon KNMI</Title>
<Title lang="EN">Telephone call KNMI</Title>
<Type>static and dynamic</Type>
<Time date="2008-03-12" time="04:10:00"/>
<File lang="NL">telefoon_knmi_bericht1_NL.txt</File>
<File lang="EN">telefoon_knmi_bericht1_EN.txt</File>
</Event>
<Event>
<Title lang="NL">Opdracht 1</Title>
<Title lang="EN">Exercise 1</Title>
<Type>static and dynamic</Type>
<Time date="2008-03-12" time="04:11:00"/>
<File lang="NL">opdracht1_NL.txt</File>
<File lang="EN">opdracht1_EN.txt</File>
</Event>
</Events>
<Forecasts>
<TimeZone>GMT</TimeZone>
<Forecast>
<Sector>Schelde</Sector>
<Station>Vlissingen</Station>
<AstroDateTime date="2008-03-12" time="17:16:00"/>
<AstroWaterLevel>237</AstroWaterLevel>
</Forecast>
<Forecast>
<Sector>West Holland</Sector>
<Station>Hoek van Holland</Station>
<AstroDateTime date="2008-03-12" time="18:01:00"/>
<AstroWaterLevel>122</AstroWaterLevel>
</Forecast>
</Forecasts>
</Scenario>
|