The DIMR-software is used to run a SOBEK 3 model in Delft-FEWS. In the General Adapter of Delft-FEWS we refer to the different components of the dimr-tool. This wiki will describe what you need to do to convert a SOBEK3 model to a dimr-model and how to set-up the different components of your Delft-FEWS configuration. Read the steps in this guide to implement your SOBEK 3 model in Delft-FEWS using the dimr-software.
The Delft-FEWS DIMR-adapter requires a fixed folder structure:
dimr_bin | sub-folder with binaries for the DIMR-software. |
---|---|
dimr_model | sub-folder with DIMR-files that describe the SOBEK3 model. |
fews-dimr-adapter-bin | sub-folder with binaries for the fews adapter that communicates with the DIMR. |
Input | sub-folder with input files requried to run the model. |
Logs | sub-folder for the log-files that are created during the model run. |
Follow the steps below to set-up a DIMR model folder in your Delft-FEWS system.
Create a rootDir folder for your SOBEK 3 model at $REGION_HOME$/Modules/<put_your_rootDir_here>. All sub-folders described in the table above can be put in this Modules folder. |
The contents of the Modules folder can now be filled. We will start with the download of the dimr_bin files.
The DIMR is part of DeltaShell and its binaries can be downloaded from our build server.
Write down the build number of the dimr-tool you will need this in step 3. |
The actual model files must be created by converting your SOBEK 3 model. DeltaShell contains standard functionality to aid you in this step.
Take a look at the build numer of the dimr-tool from step 3. Open an instance of DeltaShell with a build number that corresponds to the build number of the dimr_bin.
It is possible that a message will appear in DeltaShell stating that your project was made in an older version and needs to be migrated to the latest version of DeltaShell. Press "Yes" and the model will automatically migrate to this version.
When your model can finish awithout displaying errors it is possible to convert the SOBEK 3 model to a dimr-model.
|
The contents of the fews-dimr-adapter-bin folder can be downloaded.
The DIMR and Delft-FEWS are communicating through the fews adapter. This adapter is part of Delft-FEWS and must be downloaded from the build.deltares.nl:
|
The folders Input and Logs will be filled when you run the model.
Delft-FEWS will need a state file to be able to run the SOBEK model. In order to generate the first state files of the SOBEK model it is recommended to do a stand-alone run of the DIMR/SOBEK from the command line.
or in newer versions of the software
|
Delft-FEWS can distribute model files to FSS machines. It is recommended to zip the model files and put it in the Delft-FEWS configuration.
|
Not yet completed
An example of the general section of the general adapter can be found below.
In the example configuration above it can be seen that the working directory of the DIMR should always be the folder ./dimr_model. The Delft-FEWS exports timeseries to the folder .\Input. After the modelrun is completed the output of the model is expected in the folder .\dflow1d/output. |
The activities section is divided into four sub-sections: startUp-, export-, execute- and importActivities. The contents of all of these sections will be discussed in the info sections below. When you want to test your configuration during the building process then it is recommended to start with the startUpActivity, ExportActivities and ExecuteActivity sections. When no information (e.g. timeseries, states) are provided to the model DIMR will take its own default timeseries and states to perform a model run. Hence, this trick enables you to test if the model can be run from Delft-FEWS. The importDir can be checked to see if output has been generated.
Similarly, it is also possible to define a single input timeseries in the exportActivities. The DIMR will add default values to the missing timeseries in order to start the run. This trick allows you to check early on whether your ExportActivity and IdMapping is working properly.
Not yet completed |
Not yet completed |
Not yet completed |
In the ImportActivities the state files and the timeseries can be imported to Delft-FEWS. It is important to convert the extension of the state files before you import it to Delft-FEWS, this can be done by adding the </relativeExportFile> to your configuration. |
<?xml version="1.0" encoding="UTF-8"?> <Run xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews/PI" xsi:schemaLocation="http://www.wldelft.nl/fews/PI http://fews.wldelft.nl/schemas/version1.0/pi-schemas/pi_run.xsd" version="1.5"> <timeZone>0.0</timeZone> <startDateTime date="2017-03-26" time="06:00:00"/> <endDateTime date="2017-03-29" time="06:00:00"/> <time0 date="2017-03-26" time="06:00:00"/> <workDir>X:\XXX\DimrPreAdapterTest\piRunFile1d2dRTC\dimr_model</workDir> <inputTimeSeriesFile>X:\XXX\piRunFile1d2dRTC\Input\export_pi_flow1d.xml</inputTimeSeriesFile> <inputTimeSeriesFile>X:\XXX\piRunFile1d2dRTC\Input\export_pi_fm.xml</inputTimeSeriesFile> <inputTimeSeriesFile>X:\XXX\piRunFile1d2dRTC\Input\export_pi_fbc.xml</inputTimeSeriesFile> <outputDiagnosticFile>notUsed.xml</outputDiagnosticFile> <properties> <!-- Reference to dimr configuration file, relative to parent directory of the/this pi-run.xml file --> <!-- This file will be read to see which components of the dimr are used and find references to .md1d, .mdu, flow1d2d.ini and/or fbc runtime config --> <string key="dimrConfigFile" value="../dimr_config.xml"/> <!-- Specify which of the above time series xml files is meant for flow1d --> <string key="piFileForFlow1d" value="inputTimeSeriesFile-1"/> <!-- Specify which of the above time series xml files is meant for FM --> <string key="piFileForFm" value="inputTimeSeriesFile-2"/> <!-- Specify which of the above time series xml files is meant for FBC (rtc1) --> <string key="piFileForFbc" value="inputTimeSeriesFile-3"/> </properties> </Run> |