scrollbar |
---|
Table of Contents |
---|
This page briefly describes the Delft3D model adapter for Delft-FEWS, using an XML run file. There is also a Delft3D adapter with NetCDF run file.
...
The following directories and files are used. The directories are taken as subdirectories of the <rootDir> that you give in the configuration of the general adapter module.
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. |
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 Delft-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. |
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.
...
In the <general> section the following options can be specified:
Keyword | Value | Description |
---|---|---|
general | FLOW, WAQ, PART, WAVE | String indicating the type of Delft3D module |
runId |
String used to identify the template input file. Relevant input files for each Delft3D module are listed below. | |
stateFileId |
Prefix of the state file filename | ||
workDir |
Directory where the computational models will run | |
modelDir |
Directory containing the template files (static model input). These files are copied to the workDir by the model adapter prior to running a simulation. | |
auxiliaryGridFile |
See below. | ||
fieldFileFormat |
Control the format of the meteo and other field files (Check) | ||
outputTimeSeriesInOneFile |
Copies all output timeseries to one output XML file if true. (Check) | |
geoDatum |
Indication of the coordinate system used for the output XML files by the postAdapter (defaults to WGS-1984). | ||
timeZone |
Indication of the time zone used for the output XML files by the postAdapter (defaults to GMT). | ||
online | MORPHOLOGY | Copies extra morphology files for the FLOW pre- and post-adapter |
rstNcFileSubscript |
Specifies the extension for restart files in case of Deft3D-FLOW Flexible Mesh | ||
warnAboutUnusedSeries |
If true, give a warning about timeseries that are specified but not used. If false, an informational message is given instead |
See the XSD schema file for more background information.
The runId used specified in the <general> section is used by the preAdapter to determine which files to scan for placeholder keywords (see below).
Module | Template files | Purpose |
---|---|---|
FLOW | <runid>.mdf | Master definition file |
WAQ, ECO | <runid>.inp | Main input file, the only file that is supposed to contain keywords for this module. |
PART | <runid>.inp | Like WAQ |
WAVE | <runid>.mdw |
FLOW_FM | <runid>.mdu | see http://publicwiki.deltares.nl/display/MD/D-Flow+FM+model+adapter |
Both Delft3D-FLOW and Delft3D-WAQ require the name of a grid file (the keyword <auxiliaryGridFile>):
...
Code Block | ||||
---|---|---|---|---|
| ||||
<map parameter="Mean wave direction" layer="1" fewsParameter="Wave.direction.mean.ext" fewsLocation="Guanabara.wave.ext"/> <map parameter="Mean wave period" layer="1" fewsParameter="Wave.period.mean.ext" fewsLocation="Guanabara.wave.ext"/> <map parameter="Peak wave direction" layer="1" fewsParameter="Wave.direction.peak.ext" fewsLocation="Guanabara.wave.ext"/> <map parameter="Peak wave period" layer="1" fewsParameter="Wave.period.peak.ext" fewsLocation="Guanabara.wave.ext"/> <map parameter="Sign.wave height" layer="1" fewsParameter="Wave.sign.height.ext" fewsLocation="Guanabara.wave.ext"/> |
For examples, see the adapterConfiguration_example_*.xml files attached to this WiKi page.
3. Template files and keywords
Delft3D-PART (example):
For PART the option <formatForPart>NEFIS</formatForPart> has been added to switch converting the model output from the binary map files to the NEFIS map files, because the binary map files do not support file sizes above 2GB and NEFIS map files do.
Code Block | ||||
---|---|---|---|---|
| ||||
<postAdapter>
<mapOutput>
<formatForPart>NEFIS</formatForPart>
<map parameter="Oil" layer="1" fewsParameter="Oil.simulated.L1" fewsLocation="delwaq.nonaggregated.L1"/>
<map parameter="localdepth" layer="20" fewsParameter="WaterDepth.sim" fewsLocation="delwaq.nonaggregated"/>
<map parameter="Oil disp" layer="1" fewsParameter="Oil.dispersed.simulated.L1" fewsLocation="delwaq.nonaggregated.L1"/>
<map parameter="Oil disp" layer="2" fewsParameter="Oil.dispersed.simulated.L2" fewsLocation="delwaq.nonaggregated.L2"/>
<map parameter="Oil disp" layer="3" fewsParameter="Oil.dispersed.simulated.L3" fewsLocation="delwaq.nonaggregated.L3"/> |
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 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:
...
(Technical note: the entire text from the opening "$(" to the trailing ")" is replaced, without a trailing new line, by whatever the contents should be. The arguments should not contain commas parenthesis and there should be at least one space after the comma. This syntax makes it easy to implement the template mechanism.)
Keyword | Description |
---|---|
FLOW_TIME_START | Start of the simulation (format in accordance with Delft3D-FLOW). |
FLOW_TIME_STOP | Stop of the simulation (format in accordance with Delft3D-FLOW) |
FLOW_TIME_RST | Duration of the simulation – useful for setting the time interval of writing the restart files so that only one restart file is written at the end of the simulation. |
FLOW_TIMESERIES | Placeholder to fill in the timeseries in the so-called tim format (only the time and data, not the header). |
FLOW_MAPSTACK | Placeholder for the name of the file that will hold the scalar field data (as found in the map stack files). It should be followed by the name of the parameter:
|
WAVE_TIMEFRAME | Placeholder to fill values for TimePoint from start time to end time with specified increment. Example: $(WAVE_TIMEFRAME: 60, USE_WATERLEVEL_FLOW, USE_CURRENTS_FLOW)
|
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). |
WAQ_MAPSTACK | Placeholder for the name of the file that will hold the scalar field data (as found in the map stack files). It should be followed by the name of the parameter:
|
PART_RUNID | The run ID for the Delft3D-PART computation (used in the filename.dat file) |
PART_TIME_START | Placeholder to fill in start time in PART format, similar to WAQ and FLOW keywords. |
PART_TIME_STOP | Placeholder to fill in end time in PART format, similar to WAQ and FLOW keywords. |
PART_TIMESERIES | Placeholder to fill in the timeseries in the PART format, similar to the WAQ and FLOW timeseries keywords. |
PART_MAPSTACK | Placeholder to fill in mapstacks in the PART format. Example: ^(PART_MAPSTACK: x_wind,m s-1) |
PART_INIFILE | File name for the initial patch - the header information is to be written by Delft-FEWS. Example: |
PART_TIMESERIES
^(PART_INIFILE: patch.ini) |
PART_ |
SHAPEFILE | File name for the shape file holding the polygon within which the particles will be released. |
Example: ^(PART_ |
SHAPEFILE: patch.shp) Use in combination with the keyword "PART_INIFILE". The coordinates will be appended to the ini-file as written by FEWS. | |
TEKAL_FILE | Additional keyword for PART. Example: ^(TEKAL_FILE: dispers.pol) |
TEKAL_VALUES | Additional keyword for PART. Example: ^(TEKAL_VALUES: lon.cleaned/obs1, lat.cleaned/obs1) |
COUP_TIME_START | Start time of coupling (in seconds; time frame is that of Delft3D-FLOW) |
COUP_TIME_STOP | Stop time of coupling (in seconds; ditto) |
P.M. | Keywords specific to Delft3D-WAVE |
For examples, see the MDF, MDW, BCC, WND, BND and INP files attached to this WiKi page.
...
To import gridded output from Delft3D into Delft-FEWS, a grid definition needs to be specified in the Delft-FEWS grids.xml file. This grid file can be generated using the Matlab script print_Delft3D_grid.m attached to this WiKi. For WAQ models coupled over complex domains, the grid information generated by Delft3D is often not easily read in Delft-FEWS. The ccotoldbn tool can be used in this case to convert the *.lga and *.cco file from a WAQ model into a shape file. Examples and documentation are attached to this wiki page below. ccotoldbn.exe ccotoldbn-readme.txt
Attachments |
---|