Versions Compared

Key

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

Introduction

The HABITAT model is a stand-alone effect module to calculate the habitat suitability of species and species groups using environmental variables and response curves. The environmental variables are based on field measurements or extracted from other models like Delft3D-Flow and Delwaq. When the environmental variables are extracted from Delft3D-FLOW, D-Flow-Flexible Mesh (D-Flow FM) or Delwaq many manual pre-processing steps must be performed to create suitable input maps for HABITAT. Habitat uses structured, regular grids (*.asc format) as input, whereas D-Flow FM and Delwaq use unstructured and curvilinear grid formats. Additionally, many HABITAT models use spatiotemporal statistics of environmental variables, e.g. average summer water levels, average concentration of suspended sediments during the growing season or the 5th percentile of the flow velocity.

...

DeltaShell contains a scripting functionality that can be used to automatically setup and run models. As such, this development provides an opportunity to link D-Flow FM and Delwaq, including morphology, to HABITAT. The scripting functionality allows not only for a faster setup of HABITAT models, it may also facilitate in a more automated process of converting output of D-Flow FM, Delft3D-Flow and Delwaq into input for HABITAT via Python routines.

Aim

The aim of this project is to couple D-Flow FM (Flexible Mesh) and Delwaq to HABITAT within the DeltaShell environment in a more automated way.

...

  1. Model coupling in DeltaShell
    1. Development of a tool to compute relevant ecological statistics from D-Flow FM and Delwaq as input for HABITAT
    2. Setup of an integrated model with D-Flow FM, Delwaq and HABITAT
  2. Testing the model coupling on two case studies.

Method

Delwaq2Raster tool

To connect the output of D-Flow FM and Delwaq to HABITAT, a tool was developed. This tool was based on the already available tool Delwaq2Raster (D2R), which facilitated the extraction of layers with water quality data from Delwaq and converting these data to *.asc format.

The tool was modified so that it now can select multiple spatiotemporal statistics from *.map files, convert these to *.asc files and save them in a selected folder. An initial (*ini) file is created that can be manually adapted to include more statistics, which can be loaded again in the GUI. Future developments will include the use of Delft3D-FM and D-Flow FM output (*trim-files and netCDF-files).

 


Model case studies

Two testcases were selected to test the model coupling and the Delwaq2Raster tool. As a relatively small testcase the model from Van Oorschot (2017) of the Allier River in France was used. The model reflects a natural meandering river with active morphological behavior. A water quality model was added to this model containing dissolved oxygen. Additionally, a HABITAT model was built for the Altlantic salmon and for macrophytes. For both species groups the response curves for flow velocity and water depth were taken from Van Oorschot et al. (2018). The response curves were supplemented with oxygen for Salmon[2]. The model was originally designed with a regular grid of 25x25 m. But to be able to test the conversion from unstructured, curvilinear grids to regular *.asc format, the grid was converted to an unstructured grid and several parts were made curvilinear. In total, the grid contains 6144 elements with varying size. A Python script was created to automatically create the HABITAT model structure and insert the response curves (Appendix A).

The other larger testcase was the model of the Funagira reservoir and a reach downstream of the Tenryuu River in Japan. Due to the long computation times of the hydro-morphodynamic model, i.e. more than 1 week for a year run, it was not practicable to use this model for testing purposes within a feasible time. Therefore, this testcase was omitted.

Results

Description of D2R tool

The starting point of the D2R coupling tool, was the DELWAQ2RASTER tool developed by Bert Jagers (no documentation available). This tool calculates temporal statistics (e.g. average, minimum and maximum) from curvilinear Delwaq output maps (*.map files) and transforms it to a regular (*.asc) grid. The user interface of D2R (Figure 1) comprises six parts. The ‘Configuration’ part is not available yet, but the functioning of the other parts is described in detail below.

...

Figure 1: Main user interface of the D2R tool.

Input and setting

The ‘Input and setting’ part (Figure 0.2) allows the user to select the map file from which to select environmental variables. In this part, also the grid file of the D-Flow FM, Delft3D 4 or Delwaq simulation is selected and the user can define the location of the lower left corner. Defining the other corners will be a feature in next versions of the D2R tool. Subsequently the user can define the cell size, upon which the number of cells for the raster grid is calculated. Next, the user can set the name and location to save the template (i.e. the header specifications) of the raster grid. Lastly, the user can select how the cell values of the unstructured or curvilinear grid needs to be converted to a raster cell and what the cut-off level of minimum area of an unstructured or curvilinear cell is to take it into account. In this way, cells with a cell-size that is too small to contribute to the calculated cell, can be omitted.

...

Figure 2: ‘Input and setting’ part of the D2R tool.

Define statistics

In the ‘Define statistics’ part (Figure 3) the user can select the required substances for the HABITAT simulation from the substances that are available in the selected input file. Currently, only *.map files are supported. The user can choose the statistics (mean, max, min, standard deviation and percentiles) which are then applied to the selected time frame. The user can give a name to the output. At the moment, there is a maximum of 15 substances with statistics that can be calculated at once.

...

Figure 3: ‘Define statistics’ part of the D2R tool.

Load ini-file

The ‘load ini-file’ button allows the user to select a previous created ini file. This ini-file is created by D2R, the user or a mix of the two. Based on the selected ini-file, D2R fills out the user defined parts in ‘Input and setting’ and ‘Define statistics’.

Save ini-file

This button saves the settings defined by the user in the ‘Input and setting’ and ‘Define statistics’ parts to an *.ini file. This file can be loaded again, even after being manual adapted. The ‘Save ini-file’ must be clicked before D2R can be run.

Run ini-file

This button starts the actual conversion of mesh to raster and applies statistics to the time series.

Coupled models

Not all versions of DeltaShell could be used to combine all required plugins of the models due to compatibility issues. Several combinations were tested and eventually, all models could be run within Deltashell version 1.4.0.47063, with D-Flow FM version 1.6.1.47098, Delwaq version 3.7.17.47098 and HABITAT version 3.0.1.45873 (Figure 4).

...

Figure ‎5 Screenshot of the DeltaShell User Interface where output parameters of the D-Flow FM model and Delwaq models can be viewed parallel to each other.

Discussion

The aim of this study was to couple D-Flow FM and Delwaq to HABITAT within the DeltaShell environment. For the small case-study of the Allier River we succeeded to run the hydro-morphodynamic model and the water quality model in an integrated way. Additionally, the HABITAT model is built in the same DeltaShell environment. However, the coupling of the models could not be completely tested because it is not yet possible to convert D-Flow FM results to HABITAT input. The D2R tool can now be used within DeltaShell to calculate statistics for the HABITAT simulations, but currently only supports *.map files.

However, we found that the current DeltaShell environment is less suitable for running large, complex models. For these types of models, computer clusters would be a better solution. We would recommend the DeltaShell environment for the initial setup of models and testing of relatively small models. As a workaround for not running large models within DeltaShell, it is possible to run the models outside DeltaShell and load their output into DeltaShell. Subsequently D2R can be used to calculate spatiotemporal statistics. This can be done within DeltaShell or in a standalone setup. Subsequently, these spatiotemporal statistics can be used in HABITAT to calculate habitat suitability models. However, in this way the integrated setup in one User Interface is lost.

Conclusions

  • The D2R tool was further developed to work within DeltaShell and calculate spatiotemporal statistics from Delwaq output and convert this to unstructured, curvilinear *.asc rasters.
  • It was possible to setup a Delft3d-FM, Delwaq and HABITAT model train in DeltaShell
  • The Delft3d-FM and Delwaq models could be run in an integrated matter
  • Model integration of Delft3D-FM, Delwaq and HABITAT within DeltaShell in its current form is feasible for smaller models in the order of 1000-6000 elements. For larger models, computer clusters are more efficient.
  • The D2R tool will be expanded to support Delft3D 4,  D-Flow FM and D-Waq output  (*trim-files and netCDF-files).
  • The D-Flow FM and Delwaq results will be converted to HABITAT input with the D2R tool
  • The HABITAT model will be run to test and complete the model coupling within DeltaShell

Future developments

References

Van Oorschot, 2017. Riparian vegetation interacting with river morphology: modelling long-term ecosystem responses to invasive species, climate change, dams and river restoration. PhD thesis.

...