The Delf3D model adapter uses template input files for each of the Delft3D models run using this adapter. This implies that a number of adaptations have to be made to particular model input files as provided with the original model. More specific, to those model input files in which dynamic data or settings have to be included based on data provided by FEWS, being:

  1. Model attribute files with dynamic timeseries data.
  2. Model master definition files (*.mdf for FLOW, *.inp for WAQ and PART and *.mdw for WAVE) in which the modelling timeframe is defined.

In these templates, placeholder keywords have to 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. In the below section, these template files and keywords are descibed per Delft3D module.

NOTE: USE SI UNITS AT ALL TIMES!
NOTE: USE NaN AT ALL TIME!
CHECK FOR PRESENCE OF -999 and ft etc BY ADAPTER AND GIVE WARNING?
CHECK FOR MISMATCH IN TIMEZONE BETWEEN FEWS TIMESERIES AND MODEL? NOT ALWAYS SPECIFIED IN MDF, EXPLICIT MENTIONING IN MANUAL

Delft3D-FLOW

Delft3D-FLOW (referred to as FLOW hereinafter) applies a wide range of attibute files for different types of input data. Essentially, all forcing data is contained in these files, and the FLOW Master Definition File (MDF) referres to these. For FLOW, the Delft3D model adapter distinguishes between the following types of files:

  1. Files containing timeseries data (*.bct, *.bcc, *.bcb, *.dis, *.eva, *.tem, *.wnd)
  2. Files containing gridded data (gridded meteorological forcing)
  3. The master definition file (*.mdf)

In these files, keywords should be included in the following way:

Files containing timeseries data

Each timeseries which has to be updated by the Delft3D model adapter based on data provided by FEWS, has to be replaced by the following keyword.

Keyword

Description

FLOW_TIMESERIES

Placeholder to fill in the timeseries in the so-called tim format (only the time and data including the 'number of records' entry where applicable, not the header). The keyword should be followed by the names of all timeseries that should be filled in there, separated by spaces (see example below). Note that naming of timeseries should be done in accordance with naming conventions described in Naming conventions.


Example, based on discharge input file

table-name 'Discharge : 1'
contents 'inoutlet '
location 'Location_1 '
time-function 'non-equidistant'
reference-time 01012008
time-unit 'minutes'
interpolation 'linear'
parameter 'time ' unit 'min'
parameter 'flux/discharge rate ' unit 'm3/s'
parameter 'Salinity ' unit 'ppt'
parameter 'Temperature ' unit '°C'
FLOW_TIMESERIES 'q/bound-1' 's/bound-1' 't/bound-1'


In this particular case, timeseries for discharge, salinity and temperature will be added by the model adapter for this location. Note that a fixed reference time is assumed. The model adapter will subsequently determine the relative timeframe of the included timeseries with respect to this reference time (as required by FLOW).

Files containing gridded data

Files containing gridded data are build from scratch by the model adapter, based on mapStack data exported by the general adapter (see section Configuration workflow). This can be achieved based on placeholder keywords in the MDF file (see next section).

The master definition file

In the master definition file the following keywords have to be included:

Keyword

Description

FLOW_TIME_START

Start of the simulation (format in accordance with Delft3D-FLOW). This is actually the time in minutes since the reference time, found in the mdf-file.

FLOW_TIME_STOP

Stop of the simulation (format in accordance with Delft3D-FLOW)

FLOW_TIME_RST

Total simulation duration, applies to output restart (state) file at end of model simulation. Note that if this keyword is omitted and a fixed interval in specified, the postAdapter will select the last restart file written by the model.

FLOW_MAPSTACK

Placeholder for the name of the file that will hold the gridded forcing data (as found in the mapstack files exported by FEWS). It should be followed by the name of the parameter, for example, FLOW_MAPSTACK 'pressure'. In this case, XML mapStack data described by the file map_pressure.xml will be used to construct the input file pressure.dat for FLOW. What about the name for the reference grid?


Example MDF file

...
Itdate= #2008-01-01#
Tunit = #M#
Tstart= FLOW_TIME_START
Tstop = FLOW_TIME_STOP
Dt = 10
...
Restid= #<runId>.rst#
...
Flmap = FLOW_TIME_START 60 FLOW_TIME_STOP
Flhis = FLOW_TIME_START 10 FLOW_TIME_STOP
Flpp = FLOW_TIME_START 0 FLOW_TIME_STOP
...
Flrst = FLOW_TIME_RST
...
Filwu = FLOW_MAPSTACK 'windu'
Filwv = FLOW_MAPSTACK 'windv'
Filwp = FLOW_MAPSTACK 'pressure'
Filwr = FLOW_MAPSTACK 'humidity'
Filwt = FLOW_MAPSTACK 'temperature'
Filwc = FLOW_MAPSTACK 'cloudiness'


Additional notes on preparation of FLOW model for Delft3D model adapter

Some additional items which have to be taken into account during preparation of a Delft3D model for usage by the Delft3D model adapter are;

  1. The adapter assumes a fixed reference time is applied. This time (as indicated in the MDF template file) will be used to determine the relative time frame for all timeseries in the attribute files. This also implies that the reference time as indicated in the MDF file and in these attribute files have to be identical.
  2. The adapter assumes that astronomical tidal forcing data is provided with the original model (if applicable). This implies that tidal components as prescribed in the *.bca and *.cor files will be used. These components are static forcing from the vantage point of FEWS.
  3. The interval for map and timeseries output as specified in the MDF (Flmap and Flhis) should correspond with the interval of the PI XML data imported by FEWS under <importActivities> in the general adapter.
  4. The model adapter will check all attribute files found in the static data repository (<modelDir>, see section Configuration workflow) for the abovementioned keywords, as will it check the MDF file. Note that the name of the MDF file should match the <runId> as specified in the model adapter configuration file (see section XML configuration scheme). The user is free in naming fo the attribute files.
  5. In is assumed that the FLOW model starts from a spatially varying restart file at all times, whether this is a 'warm' state file or a 'cold' initial state file. This file has a fixed name at all times. This implies that the model output state (restart file) is renamed to this fixed name by the model adapter. During configuration, a cold state file in a similar format as a restart file must be provided.

Delft3D-WAQ

In contrary to Delft3D-FLOW, Delft3D-WAQ applies a single input file, *.inp file (through additional files can be included in the *.inp file using the INCLUDE statement). Both the simulation timeframe, timeseries data and gridded data are specified in this file.

The following keywords can be included in the *.inp file:

Keyword

Description

WAQ_TIME_START

Start of the simulation (format in accordance with Delft3D-WAQ/ECO: yyyy/mm/dd-hh:mm:ss)

WAQ_TIME_STOP

Stop of the simulation (format in accordance with Delft3D-WAQ/ECO: yyyy/mm/dd-hh:mm:ss)

WAQ_TIMESERIES

Placeholder to fill in the timeseries in the WAQ /ECO format (only the time and data, not the header). The keyword should be followed by the names of all timeseries that should be filled in there, separated by spaces (see example below).

WAQ_MAPSTACK

Placeholder for the name of the file that will hold the gridded forcing data (as found in the mapstack files exported by FEWS). It should be followed by the name of the parameter, for example, WAQ_MAPSTACK 'windvel'. In this case, XML mapStack data described by the file map_windvel.xml will be used to construct the input file windvel.dat for WAQ.

In addition to these keywords, it is important to note that the inp file should refer to the communication files as output by a preceeding FLOW simulation. In all likelyhood, this FLOW simulation was during an earlier phase of the FEWS workflow, in a <workDir> specified in the model adapter configuration file (see sections Configuration workflow and XML configuration scheme). The communication file paths in the inp file should point towards this <workDir>. Note that it is stongly advised to use relative paths in this case!

Below, examples of an *.inp template file are provided.

Example INP file (timeframe)

...
WAQ_TIME_START ; start time
WAQ_TIME_STOP ; stop time
0 ; constant timestep
0003000 ; time step
...
WAQ_TIME_START WAQ_TIME_STOP 0120000 ; monitoring
WAQ_TIME_START WAQ_TIME_STOP 0120000 ; map, dump
WAQ_TIME_START WAQ_TIME_STOP 0120000 ; history
...

Example INP file (path of communication files)

...
-2 ; first area option
'..\<workDir FLOW>\com-new.are' ; area file
;
-2 ; first flow option
'..\<workDir FLOW>\com-new.flo' ; flow file
;
...

Example INP file (timeseries data 1)

...
TIME BLOCK
DATA
'Continuity' 'Salinity' 'DetC' 'DetN' 'DetP'
WAQ_TIMESERIES 's/bound-1' 'DetC/bound-1' 'DetN/bound-1' 'DetP/bound-1'
...

Example INP file (timeseries data 2)

...
FUNCTIONS
'Wind'
LINEAR
DATA ;

WAQ_TIMESERIES 'windvel/bound-1'
...

Example INP file (gridded data)

...
SEG_FUNCTIONS
'Radsurf' ; name of segment function
ALL
WAQ_MAPSTACK 'sunshine'
...

Example INP file (initial conditions and restart)

...
'<runId>.res' ; initial conditions in binary file
'<runId>.res' ; binary file
...

Delft3D-PART

Delft3D-WAVE

  • No labels