WflowSbmModel#
The WflowSbmModel class represents the main hydrological model implementation using the SBM concept.
Note
Note that this class inherits from WflowBaseModel and thereby includes all base functionalities, I/O routines, and setup methods from the base model.
Also, note that some setup methods are overridden or extended to include SBM-specific parameters and data.
To know more about this, see WflowBaseModel.
|
Class to read, write, build, update wflow-SBM models. |
Setup methods#
Configuration#
Defines and manages model configuration, global parameters, and output settings.
Set the config dictionary at key(s) with values. |
|
Set the default gauge map based on basin outlets. |
|
|
Generate constant parameter maps for all active model cells. |
Topography and Rivers#
Prepares elevation maps, drainage networks, and river-related features used to simulate flow routing and floodplain processes.
|
Build the DEM and flow direction for a Wflow model. |
|
Set full river parameter maps including river depth and bank elevation. |
|
Set the river width parameter based on power-law relationship with a predictor. |
Set river Manning roughness coefficient for SBM. |
|
|
Add floodplain information to the model schematisation. |
Reservoirs and Glaciers#
Adds reservoirs and glaciers, and defines their impact on hydrological storage and flow regulation.
Generate maps of reservoir areas, outlets and parameters. |
|
Generate maps of controlled reservoir areas, outlets and parameters. |
|
|
Generate maps of glacier areas, area fraction and volume fraction. |
Land Use and Vegetation#
Defines land use and vegetation properties, including LULC and LAI maps, which influence evapotranspiration and interception processes.
|
Derive several wflow maps based on landuse-landcover (LULC) data. |
Derive several wflow maps based on vector landuse-landcover (LULC) data. |
|
Set up landuse maps and parameters including for paddy fields. |
|
|
Set leaf area index (LAI) climatology maps per month [1,2,3,...,12]. |
Derive cyclic LAI maps from a LULC data source and a LULC-LAI mapping table. |
|
|
Set the vegetation_root_depth. |
Soil#
Sets up soil-related data including soil maps and hydraulic properties.
|
Derive several (layered) soil parameters. |
|
Set KsatHorFrac parameter values from a predetermined map. |
Correct vertical saturated hydraulic conductivity with vegetation properties. |
Water Demands and Allocation#
Defines domestic, irrigation, and other water demand maps and allocation parameters.
|
Create water demand allocation areas. |
Create the fraction of water allocated from surface water. |
|
|
Prepare domestic water demand maps from a raster dataset. |
Prepare domestic water demand maps from statistics per capita. |
|
|
Create water demand maps from other sources (e.g. industry, livestock). |
|
Add required information to simulate irrigation water demand from grid. |
Add required information to simulate irrigation water demand from vector. |
Forcing#
Sets up meteorological forcing inputs such as precipitation, temperature, and potential evapotranspiration.
|
Generate gridded precipitation forcing at model resolution. |
Generate gridded precipitation from point timeseries (requires wradlib). |
|
|
Generate gridded temperature and reference evapotranspiration forcing. |
|
Prepare PET forcing from existig PET data. |
States#
Defines initial hydrological state variables such as soil moisture and groundwater storage.
|
Prepare cold states for Wflow. |
Output Locations#
Defines outlets, gauges, and spatial masks used for reporting model results.
|
Set the default gauge map based on basin outlets. |
|
Set a gauge map based on |
|
Set area map from vector data to save wflow outputs for specific area. |
Other Setup Methods#
Additional high-level utilities to modify model geometry, link external models, or upgrade model versions.
|
Add data variable(s) from |
Connect wflow to a 1D model by deriving linked subcatch (and tributaries). |
|
Upgrade the model to wflow v1 format. |
|
|
Clip model to region. |
Components#
If you are using python, you can access and update the model data using the components such as config, staticmaps etc.
This is for example useful for computing statictics, plotting etc.
The components data are usually xarray, dictionnary or geopandas objects and can be accessed via the data property: model.staticmaps.data.
The components of the WflowSbmModel are:
Model Component |
Component class |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I/O methods#
If you are using python, you can read and write the different model components using the methods below.
|
Single method to build a model from scratch based on settings in steps. |
|
Single method to update a model based the settings in steps. |
|
Read components from disk. |
|
Write the complete model schematization and configuration to file. |
Component-level API#
The table below summarizes the important methods and attributes for each component. These allow for fine-grained reading, writing, modification, and inspection of component data. They are particularly useful when working interactively in Python, for example when updating specific configuration parameters, clipping static maps, or inspecting the forcing data.
Each component exposes a data attribute, which holds the underlying model data
(e.g. dict, xarray.Dataset, or geopandas.GeoDataFrame),
and supports a common set of I/O and manipulation methods such as
read(), write(), and set().
For general I/O at the model level, refer to:
WflowSbmModel and its
read() and
write() methods.
The following table provides a detailed overview of the component-level APIs.
Component class |
Methods |
Attributes |
|---|---|---|
Attributes#
Other useful model attributes if you are using python:
Returns coordinate reference system embedded in region. |
|
Model root |
|
Return the pyflwdir.FlwdirRaster object parsed from wflow ldd. |
|
Returns a basin(s) geometry as a geopandas.GeoDataFrame. |
|
Return a river geometry as a geopandas.GeoDataFrame. |