WflowSedimentModel#

The WflowSedimentModel class extends Wflow functionality with sediment transport modeling.

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 sediment-specific parameters and data. For a full list of inherited methods and attributes, see WflowBaseModel.

WflowSedimentModel([root, config_filename, ...])

The wflow sediment model class, a subclass of WflowBaseModel.

Setup methods#

These methods are used to add data, parameters, and components to your Wflow Sediment model and to build or update it step by step.

Configuration#

Defines and manages model configuration, global parameters, and output settings.

WflowSedimentModel.setup_config(data)

Set the config dictionary at key(s) with values.

WflowSedimentModel.setup_config_output_timeseries(mapname)

Set the default gauge map based on basin outlets.

WflowSedimentModel.setup_constant_pars(**kwargs)

Generate constant parameter maps for all active model cells.

Topography and Rivers#

Prepares elevation maps, drainage networks, and sediment-related river properties used to route flow and sediment.

WflowSedimentModel.setup_basemaps(region, ...)

Build the DEM and flow direction for a Wflow model.

WflowSedimentModel.setup_rivers(hydrography_fn)

Set all river parameter maps.

WflowSedimentModel.setup_riverwidth([...])

Set the river width parameter based on power-law relationship with a predictor.

WflowSedimentModel.setup_riverbedsed([...])

Generate sediments based river bed characteristics maps.

Reservoirs#

Adds natural and man-made reservoirs and defines their impact on sediment storage and transport.

WflowSedimentModel.setup_natural_reservoirs(...)

Generate maps of natural reservoir areas (lakes) and outlets.

WflowSedimentModel.setup_reservoirs(...[, ...])

Generate maps of reservoir areas and outlets.

Land Use and Vegetation#

Defines land use and vegetation properties that influence sediment erosion and deposition processes.

WflowSedimentModel.setup_lulcmaps(lulc_fn, *)

Derive several wflow maps based on landuse-landcover (LULC) data.

WflowSedimentModel.setup_lulcmaps_from_vector(...)

Derive several wflow maps based on vector landuse-landcover (LULC) data.

WflowSedimentModel.setup_canopymaps(canopy_fn)

Generate sediments based canopy height maps.

Soil#

Sets up soil-related data including soil maps.

WflowSedimentModel.setup_soilmaps([soil_fn, ...])

Generate sediments based soil parameter maps.

Output Locations#

Defines model output points and areas such as outlets, gauges, and spatial masks for reporting results.

WflowSedimentModel.setup_outlets([...])

Set the default gauge map based on basin outlets.

WflowSedimentModel.setup_gauges(gauges_fn[, ...])

Set a gauge map based on gauges_fn data.

WflowSedimentModel.setup_areamap(area_fn, ...)

Set area map from vector data to save wflow outputs for specific area.

Other Methods#

Additional high-level utilities to manage model geometry, upgrade versions, or modify spatial extent.

WflowSedimentModel.setup_grid_from_raster(...)

Add data variable(s) from raster_fn to grid object.

WflowSedimentModel.upgrade_to_v1_wflow([...])

Upgrade the model to wflow v1 format.

WflowSedimentModel.clip(region[, ...])

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

model.config

WflowConfigComponent

model.staticmaps

WflowStaticmapsComponent

model.geoms

WflowGeomsComponent

model.forcing

WflowForcingComponent

model.states

WflowStatesComponent

model.tables

WflowTablesComponent

model.output_grid

WflowOutputGridComponent

model.output_scalar

WflowOutputScalarComponent

model.output_csv

WflowOutputCsvComponent

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.