Building a model#

This plugin allows to build a complete D-Water Quality model from available data. Once the configuration and data libraries are set, you can build a model by using:

activate hydromt-delwaq
hydromt build delwaq path/to/built_model "{'wflow': path/to/wflow_model}" -i delwaq_build.yml -d data_sources.yml -vv

The recommended region options for a proper implementation of this model are:

  • model

Alternatively, to start from a complete new region, you can start by first using HydroMT to build the linked hydrological/hydraulic model for your case and then build DELWAQ.

Warning

As of now, DELWAQ models can only be built on top of existing Wflow models.

Configuration file#

Settings to build or update a D-Water Quality model are managed in a configuration file. In this file, every option from each model methods can be changed by the user in its corresponding section.

Below is an example of build configuration yml file that can be used to build a WQ model for modelling Total Nitrogen (TN) released by households.

global:
  data_libs:
    - local_sources.yml

setup_basemaps:
  mask: rivers
  surface_water: sfw
  boundaries:
    - land
    - soil
    - sett
  fluxes:
    - sfw>sfw
    - land>sfw
    - soil>sfw
    - sfw>sett
  maps:
    - rivmsk
    - lndslp
    - strord
    - N
    - SoilThickness
    - thetaS

setup_monitoring:
  mon_points: segments
  mon_areas: subcatch

setup_hydrology_forcing:
  hydro_forcing_fn: wflow_output_wq
  starttime: "2010-02-04 00:00:00"
  endtime: "2010-02-10 00:00:00"
  timestepsecs: 86400
  add_volume_offset: True
  override:
    - sfw>sfw

Selecting data#

Data sources in HydroMT are provided in one of several yaml libraries. These libraries contain required information on the different data sources so that HydroMT can process them for the different models. There are three ways for the user to select which data libraries to use:

  • If no yaml file is selected, HydroMT will use the data stored in the hydromt-artifacts which contains an extract of global data for a small region around the Piave river in Northern Italy.

  • Another options for Deltares users is to select the deltares-data library (requires access to the Deltares P-drive). In the command lines examples below, this is done by adding –deltares-data to the build / update command line.

  • Finally, the user can prepare its own yaml library (or libraries) (see HydroMT documentation to check the guidelines). These user libraries can be added either in the command line using the -d option and path/to/yaml or in the ini file with the data_libs option in the [global] sections.