Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{scrollbar}

Table of Contents

Introduction

This page describes how you can use OpenDA in combination with Delft-FEWS. OpenDA is an open interface standard for (and free implementation of) a set of tools to quickly implement data assimilation and calibration for arbitrary numerical models. If you want to make a workflow in Delft-FEWS to either use data assimilation or calibrate a model automatically, then you can use OpenDA for this. In order to use OpenDA in combination with Delft-FEWS, knowledge of both Delft-FEWS and OpenDA is required. For more information about OpenDA see the OpenDA website.

...

Runtime arguments for OpenDaInFews:

For an algorithm run:

-f <FEWS pi run file path relative to working dir> -a <OpenDA application config file (.oda file) path relative to working dir>

Example:

-f run_info.xml -a enkf_run.oda

For a single ( stoch ) model run:

-f <FEWS pi run file path relative to working dir> -m <modelFactory or stochModelFactory <stochModelFactory full className> <modelFactory or stochModelFactory <stochModelFactory config file path relative to pi run file dir>

Example:

-f run_info.xml -m org.openda.blackbox.wrapper.BBStochModelFactory stochModelConfig.xml

For a single model run:-f <FEWS pi run file path relative to working dir> -m <modelFactory full className> <modelFactory config file path relative to pi run file dir>
Example:-f run_info.xml -m org.openda.blackbox.wrapper.BBModelFactory modelConfig.xml

The recommended way to run OpenDaInFews is to use a batch script to setup the Java classpath and invoke the OpenDaInFews main method. Such a batch script can be started from a command prompt or directly from a Delft-FEWS workflow. It is also possible to invoke the OpenDaInFews main method directly from another Java program. However, it is highly recommended to use the batch script approach, in order to avoid problems with loading of dependencies like e.g. jar and dll files from models. While it is possible to make such a batch script yourself, it is also possible to use the batch script called run_openda_in_fews.bat. This batch script is included in the OpenDaInFews binaries since 2012-11-15 (revision 3640), and will be part of future OpenDaInFews releases. This batch script passes its runtime arguments to OpenDaInFews, so the batch script needs the same runtime arguments that are listed in the table above.

...

Using a batch script (recommended):

Code Block

<exportActivities>
	<exportRunFileActivity>
		<exportFile>%REGION_HOME%/Models/OpenDaConfig/run_info.xml</exportFile>
	</exportRunFileActivity>
</exportActivities>
<executeActivities>
	<executeActivity>
		<description>OpenDa in Fews adapter</description>
		<command>
			<executable>%REGION_HOME%/Models/OpenDA/bin/run_openda_in_fews.bat</executable>
		</command>
		<arguments>
			<argument>-f</argument>
			<argument>%REGION_HOME%/Models/OpenDaConfig/run_info.xml</argument>
			<argument>-a</argument>
			<argument>%REGION_HOME%/Models/OpenDaConfig/enkf_run.oda</argument>
		</arguments>
		<timeOut>100000000</timeOut>
		<overrulingDiagnosticFile>%REGION_HOME%/Models/OpenDaConfig/diagnostics/diagnostics.xml</overrulingDiagnosticFile>
	</executeActivity>
</executeActivities>

Calling OpenDaInFews directly from Delft-FEWS:

Code Block

<exportActivities>
	<exportRunFileActivity>
		<exportFile>%REGION_HOME%/Models/OpenDaConfig/run_info.xml</exportFile>
	</exportRunFileActivity>
</exportActivities>
<executeActivities>
<executeActivity>
	<description>OpenDa in Fews adapter</description>
		<command>
			<className>nl.deltares.openda.fews.OpenDaInFews</className>
			<binDir>%REGION_HOME%/Models/OpenDA/bin/</binDir>
		</command>
		<arguments>
			<argument>-f</argument>
			<argument>%REGION_HOME%/Models/OpenDaConfig/run_info.xml</argument>
			<argument>-a</argument>
			<argument>%REGION_HOME%/Models/OpenDaConfig/enkf_run.oda</argument>
		</arguments>
		<timeOut>100000000</timeOut>
		<overrulingDiagnosticFile>%REGION_HOME%/Models/OpenDaConfig/diagnostics/diagnostics.xml</overrulingDiagnosticFile>
	</executeActivity>
</executeActivities>

...