Versions Compared

Key

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

...

  • csv - new file with Booleans to enable/disable
  • LocationSets.xml
  • ModifierTypes.xml

This example has been configured for an OC, using a workflow for URBS model runs within the Tweed region, consisting of three catchments (see image of structure of workflow and metadata below). 

  • The workflow consists of pre/post-processing modules, rainfall merge modules, general adapters for model deployment and model simulation, and an archiving module. 
  • The modifier will be configured for each of the three catchments, and the archiving module.
    Multiple modifier attributes have been configured to provide greater flexibility in enabling/disabling both modules and workflows.
     

Structure of the workflow and required “metadata/config”

Code Block
languagexml
titleLocationSets.xml
linenumberstrue
collapsetrue
<locationSets version="1.1" 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/locationSets.xsd">
	<locationSet id="SystemSettings">
		<csvFile>
			<file>SystemSettings.csv</file>
			<geoDatum>WGS 1984</geoDatum>
			<id>%ID%</id>
			<name>%Name%</name>
			<x>0</x>
			<y>0</y>
			<attribute id="URBS_Deploy" name="URBS - Deploy Model">
				<boolean>%URBS_Deploy%</boolean>
			</attribute>
			<attribute id="URBS_Merge" name="URBS - Merge Rainfall">
				<boolean>%URBS_Merge%</boolean>
			</attribute>
			<attribute id="URBS_Fcst" name="URBS Forecast">
				<boolean>%URBS_Fcst%</boolean>
			</attribute>
			<attribute id="Archive" name="Archive">
				<boolean>%Archive%</boolean>
			</attribute>
		</csvFile>
	</locationSet>
	<locationSet id="SystemSettings_Tweed">
		<locationId>Burringbar_System</locationId>
		<locationId>Crabbes_System</locationId>
		<locationId>TweedR_System</locationId>
		<locationId>Tweed_System</locationId>
	</locationSet>
</locationSets>
Code Block
languagexml
titleModifierTypes.xml
linenumberstrue
collapsetrue
<modifierTypes 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/modifierTypes.xsd">
	<attributeModifiers>
		<locationAttributeModifier id="RunProcess" name="Run Process">
			<expiryTime unit="day" multiplier="36500"/>
			<modifiableGroup name="Enable/Disable Modules and Workflows">
				<locationSetId>SystemSettings</locationSetId>
				<attribute id="URBS_Deploy"/>
				<attribute id="URBS_Merge"/>
				<attribute id="URBS_Fcst"/>
				<attribute id="Archive"/>
				<panelLayout>
					<tableLayout id="Process_Table" height="100" width="100">
						<title>Run Process</title>
						<defaultColumnWidth>50</defaultColumnWidth>
						<attributeId width="50">URBS_Deploy</attributeId>
						<attributeId width="50">URBS_Merge</attributeId>
						<attributeId width="50">URBS_Fcst</attributeId>
						<locationOrientation>row</locationOrientation>
					</tableLayout>
					<tableLayout id="Archive_Table" height="100" width="100">
						<title>Archive</title>
						<defaultColumnWidth>50</defaultColumnWidth>
						<attributeId width="50">Archive</attributeId>
						<locationOrientation>row</locationOrientation>
					</tableLayout>
				</panelLayout>
			</modifiableGroup>
		</locationAttributeModifier>
	</attributeModifiers>
</modifierTypes>


 

The example below has been configured for an Operator Client, using a workflow for URBS model runs within the Tweed region, consisting of three catchments. The workflow consists of pre/post-processing modules, rainfall merge modules, general adapters for model deployment and model simulation, and an archiving module. 

The modifier will be configured for each of the three catchments, and the archiving module. Multiple modifier attributes have been configured to provide greater flexibility in enabling/disabling both modules and workflows. 

A structure of the workflow and required “metadata/config” is displayed below. 

 

At the catchment level, an enabled tag is configured for each of the three modules within the catchment workflow. Each enabled attributeId <attributeId> is associated to the module to be modified, allowing flexibility in toggling each module. 

 

Code Block
languagexml
titleWorkflow: URBS_Burringbar_Modifiers_Forecast.xml

...

linenumberstrue
collapsetrue
<workflow 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/workflow.xsd" version="1.1">
	<properties>
		<string key="CATCHMENT" value="Burringbar"/>
		<string key="TIME_ZONE" value="AEST"/>
		<int key="MODEL_START" value="-7"/>
		<string key="REGION" value="Tweed"/>
	</properties>
	<activity>
		<properties>
			<string key="CATCHMENT" value="Burringbar"/>
		</properties>
		<enabled locationId="Burringbar_System" attributeId="URBS_Deploy"/>
		<runIndependent>true</runIndependent>
		<workflowId>Update_Model_Directory</workflowId>
	</activity>
	<activity>
		<properties>
			<string key="CATCHMENT" value="Burringbar"/>
		</properties>
		<enabled locationId="Burringbar_System" attributeId="URBS_Merge"/>
		<runIndependent>true</runIndependent>
		<moduleInstanceId>URBS_Merge_Rainfall</moduleInstanceId>
		<moduleConfigFileName>URBS_Merge_Rainfall</moduleConfigFileName>
	</activity>
	<activity>
		<properties>
			<string key="CATCHMENT" value="Burringbar"/>
		</properties>
		<enabled locationId="Burringbar_System" attributeId="URBS_Fcst"/>
		<runIndependent>true</runIndependent>
		<moduleInstanceId>URBS_Burringbar_Forecast</moduleInstanceId>
	</activity>
</workflow>

...

To configure the location of the modified attribute, a dummy variable must be created, which was configured within a transformation module (URBS_Merge_Rainfall in this example). The other two modules in the workflow are general adapter modules, which I’m unsure if variable’s can be configured in the way that is required (potentially in the export/import activity sections). The variable contains each of the locations configured in the SystemSettings.csv, which can then be referenced across the entire workflow, as long as transformation URBS_Merge_Rainfall is configured within the workflow. 

 

Code Block
languagexml
titleModule: URBS_Merge_Rainfall.xml

...

linenumberstrue
collapsetrue
	<variable>
        <variableId>Dummy_Modifier_1</variableId>
		<timeSeriesSet>
			<moduleInstanceId>URBS_Merge_Rainfall</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>P.obs</parameterId>
			<locationSetId>SystemSettings_$REGION$</locationSetId><!-- tag for template use -->
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="hour"/>
			<readWriteMode>read only</readWriteMode>
		</timeSeriesSet>
    </variable>

 

 Some tinkering is still required to summarise summarize the modifier display, although it works, toggling modules for the 3 catchments (Burringbar Creek, Crabbes Creek, Tweed River) and toggling the Archive workflow for the entire Tweed region workflow.