Skip to content

Latest commit

 

History

History
69 lines (50 loc) · 3.29 KB

wflow_build.rst

File metadata and controls

69 lines (50 loc) · 3.29 KB

Building a model

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

hydromt build wflow path/to/built_model -r "{'basin': [x, y]}" -i wflow_build.ini -d data_sources.yml -vvv

Note

From HydroMT version 0.7.0 onwards the region argument is optional and should be preceded by a -r or --region flag. The resolution (previously -r) argument has been moved to the setup_basemaps section in the .ini configuration file.

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

  • basin
  • subbasin

The coordinate reference system (CRS) of the model will be the same as the one of the input hydrography data. If the region is specified using point coordinates or a bounding box, the coordinates used should match the CRS of the hydrography data. If the user wants to use a different CRS, we advise to reproject the hydrography data to the desired CRS before building the model. You can find some examples on how to do this in the example notebook.

Configuration file

Settings to build or update a Wflow model are managed in a configuration file. In this file, every option from each model method <model_methods> can be changed by the user in its corresponding section.

Note that the order in which the components are listed in the ini file is important:

  • setup_basemaps should always be run first to determine the model domain
  • setup_rivers should be run right after setup_basemaps as it influences several other setup components (lakes, reservoirs, riverwidth, gauges)

Below is an example ini file that can be used to build a complete Wflow model .ini file <../_examples/wflow_build.ini>. Each section corresponds to a model component with the same name.

../_examples/wflow_build.ini

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 either --dd or --deltares-data to the build / update command line.
  • Finally, the user can prepare its own yaml libary (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.

Example: Build Wflow model <../_examples/build_model.ipynb>