Versions Compared

Key

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

...

Code Block
titleexportRunFileActivity
<exportRunFileActivity>
     <exportFile>paramAdapter_runinfo.xml</exportFile>
     <properties>
          <string key="urbsIniFile" value="%ROOT_DIR%\model\$SUBCATCHMENT$.ini"/>
          <string key="rdfFile" value="%ROOT_DIR%\model\$SUBCATCHMENT$.rdf"/>
          <string key="URBS_BIN" value="$MODULES_BIN$\urbs"/>
     </properties>
</exportRunFileActivity>

Properties URBS parameter adapter

For this adapter, some optional properties can be configured

parameterSeriesFile 

When this property is configured, the adapter will read a pi xml file and will extract the first non missing value for each time series and will replace the values in the .ini file that matches the key of the parameter of that time series.

 For example the value 48.0 will be taken from the next time series file and used to write "URBS_IL=48.0" to the urbs.ini file instead of the value taken from the PiParameters.xml file.

This is only done for the  "Initial Dam Volumes and Levels", "Catchment and Channel Routing Parameters" and "Rainfall Runoff Parameters" sections in the .ini file.

Execute Activities

Before executing the URBS model, two adapters are called: the parameter adapter to create the model.ini file and the pre-adapter to convert the time series (see Figure above). As can be noted, each adapter creates its own diagnostics file to keep track of success and failure.

Code Block
titleExecute Activity
<executeActivities>
	<executeActivity>
		<description>Run parameter adapter</description>
		<command>
			<className>nl.wldelft.urbs.ParameterAdapter</className>
			<binDir>%ROOT_DIR%\..\..\..\delft-adapters</binDir>
		</command>
		<arguments>
			<argument>%ROOT_DIR%\input\paramAdapter_runinfo.xml</argument>
		</arguments>
		<timeOut>400000</timeOut>
	</executeActivity>
	<executeActivity>
		<description>Run PreAdapter</description>
		<command>
			<executable>%ROOT_DIR%\..\..\bin\preadapter.exe</executable>
		</command>
		<arguments>
			<argument>%ROOT_DIR%\input\Input.xml</argument>
			<argument>%ROOT_DIR%\model\$SUBCATCHMENT$.ini</argument>
			<argument>%ROOT_DIR%\logs\urbsdiag_pre.xml</argument>
			<argument>%ROOT_DIR%\model\$SUBCATCHMENT$.vec</argument>
			<argument>%ROOT_DIR%\model\$SUBCATCHMENT$.rdf</argument>
		</arguments>
		<timeOut>1200000</timeOut>
		<overrulingDiagnosticFile>%ROOT_DIR%\logs\urbsdiag_pre.xml</overrulingDiagnosticFile>
	</executeActivity>
	<executeActivity>
		<description>Run modelAdapter (using cmd.exe /c to properly terminate)</description>
		<command>
			<executable>c:\$WINCOMMANDSHELL$</executable>
		</command>
		<arguments>
			<argument>/c</argument>
			<argument>%ROOT_DIR%\model\modelAdapter.bat</argument>
		</arguments>
		<timeOut>1200000</timeOut>
	</executeActivity>
	<executeActivity>
		<description>Run PostAdapter</description>
		<command>
			<executable>%ROOT_DIR%\..\..\bin\postadapter.exe</executable>
		</command>
		<arguments>
			<argument>%ROOT_DIR%\output\$SUBCATCHMENT$.csv</argument>
			<argument>%ROOT_DIR%\logs\urbsout.log</argument>
			<argument>%ROOT_DIR%\logs\urbserr.log</argument>
			<argument>%ROOT_DIR%\output\Output.xml</argument>
			<argument>%ROOT_DIR%\logs\urbsdiag_post.xml</argument>
		</arguments>
		<timeOut>1200000</timeOut>
		<overrulingDiagnosticFile>%ROOT_DIR%\logs\urbsdiag_post.xml</overrulingDiagnosticFile>
	</executeActivity>
</executeActivities>

Import Activities

The Import Activities are not different from any other General Adapter Run. The time series from URBS are imported from the Output.xml file produced by the URBS post adapter. 

Special Functions URBS parameter adapter

For the URBS parameter adapter, some optional functionality can be configured that are unique to this adapter. This optional functionality allows editing of a parameter value with a time series; this is implemented to enable copying of URBS loss values from a time series file to the URBS parameter ini file. The time series with values for the URBS parameter file need to be exported in a new PI Time Series XML file; i.e. params_series.xml.

Image Added

The exported run file requires a reference to this exported PI XML file with a key = parameterSeriesFile. When this property is configured, the  URBS parameter adapter will read a PI XML file and extract the first non missing value for each time series and replaces the values in the .ini file that matches the parameterId of that time series; in this example URBS_IL.  For example the value 48.0 will be taken from the time series file below and used to write "URBS_IL=48.0" to the urbs.ini file instead of the value taken from the PiParameters.xml file. This function that replaces URBS parameter values with time series values can only be done for the "Initial Dam Volumes and Levels", "Catchment and Channel Routing Parameters" and "Rainfall Runoff Parameters" sections in the URBS .ini file.

Code Block
languagexml
titleExample parameterSeriesFile.xml
<TimeSeries xmlns="http://www.wldelft.nl/fews/PI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews/PI http://fews.wldelft.nl/schemas/version1.0/pi-schemas/pi_timeseries.xsd" version="1.10">
    <timeZone>10.0</timeZone>
    <series>
        <header>
            <type>instantaneous</type>
            <locationId>tweed_uki</locationId>
            <parameterId>URBS_IL</parameterId>
            <ensembleId>IFD</ensembleId>
            <ensembleMemberIndex>0</ensembleMemberIndex>
            <timeStep unit="second" multiplier="86400"/>
            <startDate date="2018-05-21" time="10:00:00"/>
            <endDate date="2018-05-24" time="10:00:00"/>
            <missVal>-99.0</missVal>
            <stationName>tweed_uki</stationName>
            <lat>-28.46995606962717</lat>
            <lon>153.2671548515222</lon>
            <x>153.2671548515222</x>
            <y>-28.46995606962717</y>
            <z>0.0</z>
            <units>mm</units>
        </header>
        
Code Block
languagexml
titleExample parameterSeriesFile.xml
<TimeSeries xmlns="http://www.wldelft.nl/fews/PI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews/PI http://fews.wldelft.nl/schemas/version1.0/pi-schemas/pi_timeseries.xsd" version="1.10">
    <timeZone>10.0</timeZone>
    <series>
        <header>
            <type>instantaneous</type>
            <locationId>tweed_uki</locationId>
            <parameterId>URBS_IL</parameterId>
            <ensembleId>IFD</ensembleId>
            <ensembleMemberIndex>0</ensembleMemberIndex>
            <timeStep unit="second" multiplier="86400"/>
            <startDate date="2018-05-21" time="10:00:00"/>
            <endDate date="2018-05-24" time="10:00:00"/>
            <missVal>-99.0</missVal>
            <stationName>tweed_uki</stationName>
            <lat>-28.46995606962717</lat>
            <lon>153.2671548515222</lon>
            <x>153.2671548515222</x>
            <y>-28.46995606962717</y>
            <z>0.0</z>
            <units>mm</units>
        </header>
        <event date="2018-05-21" time="10:00:00" value="-99.0" flag="8"/>
        <event date="2018-05-2221" time="10:00:00" value="48-99.0" flag="08"/>
        <event date="2018-05-2322" time="10:00:00" value="4048" flag="0"/>
        <event date="2018-05-24" time="10:00:00" value="-99.0" flag="8"/>
    </series>
</TimeSeries>

locationParameterSeriesFile

When this property is configured, the adapter will read a pi xml file and will extract the first non missing value for each time series and will replace the values in the .ini file that matches the key of the location of that time series.

For example the value 48.0 will be taken from the next time series file and used to write "URBS_IL=48.0" to the urbs.ini file instead of the value taken from the PiParameters.xml file.

...

23" time="10:00:00" value="40" flag="0"/>
        <event date="2018-05-24" time="10:00:00" value="-99.0" flag="8"/>
    </series>
</TimeSeries>

vecFile

a vec file can be configured which will get the "URBS_VEC_TAGS" group from the Parameters.xml and will replace the corresponding tags is the specified vec file with the values of the parameter.

...