Versions Compared

Key

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

...

With the fixedColdState option, the cold state can be fixed to a selected dateTime .  When configured, by the user can fix the cold state selection in the GUI by selecting the checkbox "Keep cold state at current selection". This property fixed coldState is inherited by the downstream nodes. 

Note: When a user selects the option to fix a cold state to a certain date/time then this will only impact the local client. Only when the user starts a server run for this node the changes (modifiers) will be send to the server and impact the other users.

To enable this option, you need to configure the fixedColdState in a few files (config examples are give below):

  • Topology.xml

...

    • <fixedColdState>, which defines the location attribute modifier in FEWS to store the selected cold state:
      • locationId: location the modifiers will be made.
      • modifierTypeId: refers to modifier type id as defined in ModifierTypes.xml
      • fixedColdStateLocationAttributeId: attribute in which the selected cold state dateTime is stored. This is a date/time attribute.
      • fixedcoldStateGroupLocationAttributeId: attribute in which the cold state group is stored. This is a text attribute.
    • <workflowId>, which should refer to a workflow including the lcoationId mentioned above
  • ModifierTypes.xml
    • <locationAttributeModifier> to define the modifierTypeId as referenced in the Topology
    • <modifiersGroup> (optional) if you make use of modifiersGroup make sure to list the locationAttributeModifier id here as well
  • LocationSets.xml
    • <attribute> to add both cold state attributes to the relevant locations
    • <dateTimePattern> to define the format of the dateTime attribute
  • basins.csv
    • add column to create (empty) attributes as defined in locationSets.xml

Note: the location for which the fixedColdState is configured needs to be part of the workflow which is connected to that topology node.  


Code Block
languagexml
titleTopology.xml
			<node 
Code Block
languagexml
titleTopology.xml
			<node id="coldRelativeStateStartTimeNode">
				<workflowId>workflow2</workflowId>
				<coldState unit="hour" multiplier="6"/>
 				<fixedColdState>
					<locationId>basinA</locationId>
					<modifierTypeId>coldStateModifier</modifierTypeId>
					<fixedColdStateLocationAttributeId>coldStateDateTime</fixedColdStateLocationAttributeId>
					<fixedColdStateGroupLocationAttributeId>coldStateGroup</fixedColdStateGroupLocationAttributeId>
				</fixedColdState>
			</node>

The selected cold state is stored a location attribute modifier in FEWS. The location id defines for which location the modifiers will be made. The fixedColdStateLocationAttributeId defines which attribute will be used to store the selected state. Note that this attribute must be a date/time attribute. The cold state group will be stored in the fixedColdStateGroupLocationAttributeId. This attribute must be a text attribute.  The modifierTypeId defines the modifier type for which the modifiers will be made.

This modifier must be configured in the modifierTypes.xml.  Below an example.


Code Block
languagexml
titleModifierTypes.xml
	<attributeModifiers>
		<locationAttributeModifier id="coldStateModifier" name="fixed cold state">
			<modifiableGroup name="coldStateModifiableGroup">
				<locationSetId>basins</locationSetId>
				<attribute id="coldStateDateTime"></attribute>
  				<attribute id="coldStateGroup"></attribute>
		    </modifiableGroup>
		</locationAttributeModifier>
	</attributeModifiers>


Code Block
titleLocationSets.xml
<locationSet id="basins">
		<csvFile>
			<file>basins.csv</file>
			<geoDatum>WGS 1984</geoDatum>
			<id>%BASIN%</id>
			<name>%SHORT_NAME%</name>
			<dateTimePattern>yyyy-mm-dd HH:mm</dateTimePattern>
			<x>0</x>
			<y>0</y>
			<z>0</z>
			<attribute id="coldStateDatetime
Code Block
languagexml
titleModifierTypes.xml
	<attributeModifiers>
		<locationAttributeModifier id="coldStateModifier" name="fixed cold state">
			<modifiableGroup name="coldStateModifiableGroup">
				<locationSetId>basins<<dateTime>%coldStateDatetime%</locationSetId>dateTime>
				<attribute id="group"><</attribute>
				<attribute id="coldStatecoldStateGroup"></attribute>>
			<	<text>%coldStateGroup%</modifiableGroup>text>
		</locationAttributeModifier>
	</attributeModifiers>

In addition it is important the location which is configured in the topology.xml is part of the workflow which is connected to the topology node.  

...

	</attribute>
		</csvFile>
	</locationSet>


Code Block
titlebasins.csv
BASIN, SHORT_NAME, coldStateDatetime, coldStateGroup
basinA, basinA, ,
basinB, basinB, ,



Alternatively, in FEWS release 2019.02 and higher a fixed cold state start date/time can be configured:

...