This section outlines the different steps required in setting up the Delft3D-FEWS adapter for a Delft3D model and a FEWS application. This process is represented as a number of workflows (or steps). The FEWS configurator should fellow these steps and adhere to the conventions therein in order to setup a Delft3D-FEWS system. Some specifics on naming conventions and template files are outlined in separate sections (see sections Adapter configuration - naming conventions and Adapter configuration - template files ).

Setting up a Delft3D-FEWS application consists of three basic steps:

  1. Preparing the Delft3D model setup. Note; It is assumed a fully setup and calibrated model is provided for configuration in FEWS (see section Design philosophy). This fully setup model is subsequently prepared for usage from FEWS in this step.

  2. Preparing the model adapter XML scheme (hereinafter called Delft3Dmodel.xml, but other names can prescribed by the user).

  3. Preparing the General Adapter XML scheme (hereinafter called GeneralAdapter.xml, but other names can be prescribed by the user).

These three steps are outlined below in more detail. Before doing so, however, the user should setup a directory structure which adheres to the conventions listed below.

Note that, for reference, examples of each of the steps listed below are provided in section Example configuration.

Directory structure

To minimize the number of choices that have to be made by the user (thus reducing the possibility for mistakes), the Delft3D-FEWS adapter expects a fixed set of directories and files. Some directories, however, are changeable by the user for practical purposes. This (mandatory) directory structure is illustrated by figure 1.


Figure 1: mandatory directory structure for setting up Delft3D-FEWS configuration.

The directory structure illustrated in figure 1 is elaborated in more detail in the below table. Conventions as indicated in this table should be adhered to be the user when setting up a Delft3D-FEWS application.

Directory/file

Purpose

Status

%rootdir%

Root directory of Delft3D module. For example, %FEWS_root%/Modules or %FEWS_root%/Modules/Flow. Can be prescribed by the user in GeneralAdapter.xml

Changeable

%rootdir%/input/

Contains all the files with timeseries and map stacks exported by Delft-FEWS

Fixed

%rootdir%/input/timeseries.xml

XML-file with (scaler) timeseries, exported from GeneralAdapter.xml

Fixed

%rootdir%/input/map_<param>.xml

XML-file describing the map stacks with parameter <param> (see naming conventions in section Adapter configuration - naming conventions )

Fixed

%rootdir%/stateInput/

Contains the initial conditions (state) from which the computation must start. Exported from GeneralAdapter.xml

Fixed

%rootdir%/stateInput/state.xml

The XML-file describing the time of the state files

Fixed

%rootdir%/output/

Contains all the files with timeseries and map stacks as output by the adapter (model results) and to be imported by Delft-FEWS

Fixed

%rootdir%/output/timeseries.xml

XML-file with the modelled (scaler) timeseries, to be imported by Delft-FEWS

Fixed

%rootdir%/output/map_<param>.xml

XML-file describing the modelled map stacks with parameter <param> (see naming conventions in section Adapter configuration - naming conventions )

Fixed

%rootdir%/stateOutput/

Contains the new state file produced by the model, to be imported by Delft-FEWS.

Fixed

%rootdir%/stateOutput/state.xml

The XML-file describing the time of the new state files, to be imported by Delft-FEWS

Fixed

%rootdir%/logs/

Contains the diagnostics file produced by the GeneralAdapter and by the model adapter

Fixed

%rootdir%/logs/diagnostics.xml

The XML-file containing diagnostic information as output by the GeneralAdapter and by the model adapter

Fixed

%rootdir%/<workdir>

Directory in which the model computation will be run. Specified by the user in Delft3Dmodel.xml. For example, %rootdir%/Flow or %rootdir%/<modelname>

Changeable

%rootdir%/<modeldir>

Directory in which the static (non-changing) model schematisation is stored, to be copied to <workdir> by the model adapter. Specified by the user in Delft3Dmodel.xml. For example, %rootdir%/FlowSchematisation or %rootdir%/<modelname>Schematisation

Changeable

Note that it is possible to include multiple <workdir>'s and <modeldir>'s in a %rootdir% folder (for example, FLOW and WAQ model). In this case, all fixed folders will be shared by both models.

Step 1: Preparing the Delft3D model setup

For a Delft3D model to be used with the Delft3D-FEWS adapter, a number of adaptations have to be made to particular model input files. This process is illustrated by the workflow in figure 2. The different steps in this workflow are elaborated in more detail below.


Figure 2: workflow of required adaptations to Delft3D model for usage in Delft3D-FEWS application.

  • 1a) The Delft3D-FEWS adapter work using template model input files. In these templates, placeholder keywords can be assigned, which are replaced by dynamic data from FEWS by the model adapter. These placeholder keywords have to be included during configuration of the Delft3D-FEWS application. Naming conventions for keywords and template files are described in sections Adapter configuration - naming conventions and Adapter configuration - template files .

  • 1b) In a similar fashion, the simulation time frame has to be updated by the model adapter for new model simulations. This is achieved by including placeholder keywords for the model timeframe in the MDF (FLOW) or INP (WAQ, PART) files. Additionally, for FLOW simulations applying gridded meteorological forcing, placeholder keywords have to be included for the spatially varying meteorological fields in the MDF file. Naming conventions for keywords and template files are described in sections Adapter configuration - naming conventions and Adapter configuration - template files .

  • 1c) In case WAQ or PART simulations where the hydrodynamics are obtained from a preceeding FLOW simulation (in the form of communication files), the WAQ template files should refer to the correct FLOW <workdir> (see directory structure) where the communication files are stored.

  • 1d) Once all template files are prepared, both these template files and the static model schematisation (grid files etc) have to be included in the appropriate <modeldir> (see directory structure)

Step 2: Preparing the General Adapter XML scheme

By default, the FEWS general adapter module is used to execute the Delft3D adapter, export the necessary input and state data for a model simulation and import the necessary output and state data prepared by the model adapter. This is described in more detail in section Adapter configuration - generalAdapter configuration . The general adapter module must be configured in the correct way to provide the required input to the Delft3D adapter, execute the Delft3D adapter and import the output provided by this adapter. This process is illustrated by the workflow in figure 3. The different steps in this workflow are elaborated in more detail below.


Figure 3: workflow of required configuration to general adapter scheme (GeneralAdapter.xml).

  • 1a) In the <general> section of the GeneralAdapter.xml, the correct <rootDir> has be be specified (hereinafter specified as %rootdir%, see also directory structure described above).

  • 1b, 1c and 1d) The <exportDir>, <importDir> and <diagnosticFile> directories have to be set to the appropriate paths, based on the %rootdir% specified at step 1a and the directory structure described above (respectively %rootdir%/input, %rootdir%/output and %rootdir%/logs/diagnostics.xml).

  • 2a) Under <exportActivities>, <exportStateActivity> the <stateExportDir> should be set to %rootdir%/stateInput. The <StateConfigFile> should be set to %rootdir%/stateInput/state.xml. See also directory structure above.

  • 2b) Under <exportActivities>, <exportTimeSeriesActivity>, dynamic timeseries data should be exported to %rootdir%/input/timeseries.xml. Under <exportActivities>, <exportMapStacksActivity>, dynamic mapstack data (grids) should be exported to %rootdir%/input/map_<param>.xml, where <param> is a parameter dependant keyword described in section xxx.

  • 3a) Under <executeActivities>, <executeActivity>, <command>, the pre-adapter, adapter and model adapter have to be executed with the <classname> option, refering to the appropriate JAVA class (include names!). Under <arguments>, the following execution arguments are mandatory: 1) %rootdir%, and 2) model adapter XML scheme (Delft3Dmodel.xml) (at which location?).

  • 4a) In <importActivities>, <importStateActivity>, the <stateConfigFile> should be set to %rootdir%/stateOutput/state.xml (see directory structure described above).

  • 4b) In <importActivities>, <importTimeSeriesActivity>, the appropriate timeseries as prepared by the model adapter based on mapping relations described in the Delft3Dmodel.xml file have to be included. Note that in this case, no importIdMap is required. In <importActivities>, <importMapStacksActivity>, the appropriate map stacks as prepared by the model adapter based on mapping relations described in the Delft3Dmodel.xml file have to be included. Note that in this case, no importIdMap is required.

Step 3: Preparing the model adapter XML scheme

Include text


Figure 3: workflow of required configuration to model adapter scheme (Delft3Dmodel.xml).

  • No labels