Versions Compared

Key

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

...

Code Block
 <executeActivities>
    <executeActivity>
       <description>Delft3D Adapter</description>
       <command>
          <className>nl.wldelft.fews.adapter.delft3d.Delft3DPreAdapter</className>
       </command>
       <arguments>
          <argument>%ROOT_DIR%</argument>
          <argument><adapter configuration file></argument>
       </arguments>
       <timeOut>10800000</timeOut>
       <overrulingDiagnosticFile>%ROOT_DIR%\diagnostics\delft3dpreadapter.xml</overrulingDiagnosticFile>
    </executeActivity>
    <executeActivity>
       <description>Run delftflow</description>
       <command>
          <executable>bin/deltares_hydro.exe</executable>
       </command>
       <arguments>
          <argument>config-flow2d3d.ini</argument>
       </arguments>
       <timeOut>90000000</timeOut>
       <overrulingDiagnosticFile>%ROOT_DIR%/dcsmv5_Diagnostic_Placeholder.xml</overrulingDiagnosticFile>
    </executeActivity>
    <executeActivity>
       <description>Delft3D Adapter</description>
       <command>
          <className>nl.wldelft.fews.adapter.delft3d.Delft3DPostAdapter</className>
       </command>
       <arguments>
          <argument>%ROOT_DIR%</argument>
          <argument><adapter configuration file></argument>
       </arguments>
       <timeOut>10800000</timeOut>
       <overrulingDiagnosticFile>%ROOT_DIR%\diagnostics\delft3dpostadapter.xml</overrulingDiagnosticFile>
    </executeActivity>
</executeActivities>

...

The Delft3D model executable can be called directly (as shown in the above example), of by calling an external batch file to execute the model.

5. Configuration errors

The adapter checks for the following types of errors:

  • Are any of the timeseries and map stacks found in the input directory not used in the input for the Delft3D module? (This would mean some timeseries was forgotten in the template files.)
  • Are all the timeseries and map stacks as encountered in the template files indeed available from the export by Delft-FEWS? If not, the proper data can not be filled in in the files and the computation can not run properly.
  • Do all timeseries filled in in a particular table have the same start and stop time and the same time step? (The adapter does not attempt to correct any mismatch – this should be done via the Delft-FEWS configuration)

5. Technical documentation

This section describes the actual implementation of the adapter. It is meant mainly to help the implementors.

The class Delft3DPreAdapter has the following task:

  • Copy the files found in the template directory to the work directory.
  • Identify for which module the input should be prepared and call upon the specific class for that module to identify the keywords in the files and provide suitable replacements.
  • Scan all input files and replace the keywords (more precisely: the text "$(...)") by the text given by the specific preadapters.

(This way we have a very general mechanism to manipulate input files based on templates)

The preadapter classes that are specific to the Delft3D modules may prepare other files as well, especially files that have to be written from the start: the files containing the mapstacks are a prime example for this.

The class Delft3DPostAdapter takes care of processing the output files from the various Delft3D modules in response to the instructions found in the configuration file. As use is made of a general library (the same as used in Delft3D-GPP), the details are all hidden and the post adapter code is fairly compact.

There are a few details particular to the Delft3D modules:

  • Delft3D-FLOW produces, in general, a series of restart files. Only the last one is made known to FEWS.
  • Delft3D-PART does not have initial conditions files or restart files.
  • Delft3D-WAQ produces a restart file at the end of the computation.
  • P.M.: Delft3D-WAVE

Note that to keep the interaction between the preadapter and the post adapter at a minimum (the preadapter handles the start and stop time for the computation and the post adapter needs to know the stop time to properly register the restart files), we use a small auxiliary file containing that information.Generating Delft3D grid file for FEWS
State files and names

Attachments