Versions Compared

Key

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

...

In order to use the adapter some knowledge of both Delft-FEWS and Delft3D is required.

1. Directory structure

To minimise the number of choices that have to be made by the user, the Delft3D adapter expects a fixed set of directories and files. Roughly speaking: anything for which a reasonable default can be set, has been fixed. This means for example that the description of the export activities in the Delft-FEWS configuration files must use these directory and file names. The advantage is that there are much less opportunities for making mistakes (see the section on configuration errors). 

...

Directory/file

Purpose

input

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

input/timeseries.xml

XML-file with (scalar) timeseries

input/map_<param>.xml

XML-file describing the map stacks with parameter "param" (see the documentation of the keywords)

stateInput

Contains all the files with the initial conditions and other static information that together constitute the "state" from which the computation must start

stateInput/export_states.xml

The XML-file describing the time of the state files.
(Export from the point of view of Delft-FEWS)

output/timeseries_<runId>.xml

XML-file with the resulting (scalar) timeseries, to be imported by Delft-FEWS

output/fewsParameter>.xml

XML-file describing the resulting map stacks with FEWS parameter "FEWS-param" (see the documentation of the keywords)

stateOutput

Contains all the files with the final results, useful as initial conditions.

stateOutput/import_states.xml

The XML-file describing the time of the final state files.
(Import from the point of view of Delft-FEWS)

2. Configuration file

The Delft3D adapter uses a fixed set of directories and files to do most of its work. Some items do have to be specified in a separate configuration file (to be placed in the root of the <rootDir>), as these may vary from application to application. This section describes the structure of the configuration file.

...

Each section will now be described in more detail.

2.1 Section: <general>

In the <general> section the following options can be specified:

...

  • Delft3D-FLOW requires the name of the file (*.grd) that defines the grid for the meteorological data. It is written in the header of the file with air pressure and so on.
  • Delft3D-WAQ requires the name of the LGRID and CCO files, so that the segment function files can be written properly. This information is needed by the postadapter as well, in order to export the results on a grid. To avoid duplication, the information is given in the general section.

2.2 Section: <preAdapter>

The <preAdapter> section contains one keyword only, the name of the timeseries (found in the timeseries XML file exported by Delft-FEWS) that is to be used as to determine the time frame of the simulation.

...

The name of the timeseries is to be formed in this way: "external name of the parameter/external name of the location". For instance: if the external parameter name is "H" and the location is "Southern boundary", then the name for that time series is: "H/Southern boundary".

2.3 Section: <postAdapter>

The section <postAdapter> describes the actions to be taken after completion of the model run. Rather than blindly export all the results from the model run to Delft-FEWS and let it pick up the timeseries and map stacks of interest, the adapter exports only those timeseries and map stacks described in this section.

...

For parameters defined per layer you must specify the layer as well as the location. Note that as FEWS only handles two-dimensional data (time,x,y). The layer number (z dimension) can be included as either a qualifier or childLocations in FEWS.

Command-line option -swapNorthSouth

Since 2013.02 there is an option to swap north and south in the Delft3DPostAdapter for regular grids.

Code Block
xml
xml
			<executeActivity>
				<description>Delft3D Adapter</description>
				<command>
					<className>nl.wldelft.fews.adapter.delft3d.Delft3DPostAdapter</className>
				</command>
				<arguments>
					<argument>%ROOT_DIR%</argument>
					<argument>AGM.Flow.HC.xml</argument>
					<argument>-swapNorthSouth</argument>
				</arguments>
				<timeOut>10800000</timeOut>
				<overrulingDiagnosticFile>%ROOT_DIR%/diagnostics/delft3dpostadapter.xml</overrulingDiagnosticFile>
			</executeActivity>

Command-line option -skipFirstTimeStep

In 2013.02 a commandline option was added to skip the first timestep of a forecast in the Delft3DPreWaveAdapter. This is to be used for forecasts only so that the warm state will be picked up correctly.

Export types

The postAdapter will export scalar timeseries to the XML file timeseries_<runId>.xml. 2D maps are exported to ArcInfo ASCII files names <fewsParameter>.xml.

...

For examples, see the adapterConfiguration_example_*.xml files attached to this WiKi page.

3. Template files and keywords

In the table below the various keywords are explained. It is important to note that these keywords are filled whenever they are encountered in a template file – the keywords are not associated with a particular type of file. The format for the keywords and any arguments there may be is as follows: 

...

For examples, see the MDF, MDW, BCC, WND, BND and INP files attached to this WiKi page.

4. Running model adapter and Delft3D from FEWS

The Delft3D model adapter and executable can be executed from FEWS in the following way:

...

For examples, see the generalAdapter_example_*.xml files attached to this WiKi page.

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)

6. HowTo's

6.1 Grid definition Delft3D in FEWS

...