hydromt_delwaq.DelwaqModel#

class hydromt_delwaq.DelwaqModel(root: str | Path | None = None, mode: str = 'w', config_filename: str | Path | None = None, data_libs: list[str | Path] | None = None)[source]#

Delwaq model class.

Initialize a model.

Parameters:
  • root (str, optional) – Model root, by default None

  • mode ({'r','r+','w', 'w+'}, optional) – read/append/write mode, by default “w”

  • config_fn (str or Path, optional) – Model simulation configuration file, by default None. Note that this is not the HydroMT model setup configuration file!

  • data_libs (List[str, Path], optional) – List of data catalog configuration files, by default None

__init__(root: str | Path | None = None, mode: str = 'w', config_filename: str | Path | None = None, data_libs: list[str | Path] | None = None)[source]#

Initialize a model.

Parameters:
  • root (str, optional) – Model root, by default None

  • mode ({'r','r+','w', 'w+'}, optional) – read/append/write mode, by default “w”

  • config_fn (str or Path, optional) – Model simulation configuration file, by default None. Note that this is not the HydroMT model setup configuration file!

  • data_libs (List[str, Path], optional) – List of data catalog configuration files, by default None

Methods

__init__([root, mode, config_filename, ...])

Initialize a model.

add_component(name, component)

Add a component to the model.

build(*[, write])

Single method to build a model from scratch based on settings in steps.

close()

Close all components by closing their open files.

from_dict(model_dict)

Construct a model with the components and other init arguments in the yaml file located at path.

from_yml(path)

Construct a model with the components and other init arguments in the yaml file located at path.

get_component(name)

Get a component from the model.

read()

Read the complete model schematization and configuration from file.

setup_basemaps(region[, mask, ...])

Prepare delwaq schematization using the hydromodel region and resolution.

setup_climate_forcing(climate_fn, starttime, ...)

Prepare Delwaq climate fluxes.

setup_config(data)

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

setup_hydrology_forcing(hydro_forcing_fn, ...)

Prepare Delwaq hydrological fluxes.

setup_monitoring([mon_points, mon_areas])

Prepare Delwaq monitoring points and areas options.

setup_sediment_forcing(sediment_fn, ...[, ...])

Prepare Delwaq sediment fluxes.

setup_staticdata_from_rasterdataset(raster_data)

Add data variable(s) from raster_data to grid component.

test_equal(other)

Test if two models are equal, based on their components.

update(*[, model_out, write, steps, ...])

Single method to update a model based the settings in steps.

write()

Write the complete model schematization and configuration to file.

write_data_catalog([root, data_lib_path, ...])

Write the data catalog to data_lib_path.

write_waqgeom()

Write Delwaq netCDF geometry file (config/B3_waqgeom.nc).

Attributes

basins

Derive basins from geoms or hydromaps.

config

Return the config component.

crs

Returns coordinate reference system embedded in region.

fluxes

Fast accessor to fluxes property of pointer.

forcing

Return the forcing component.

geoms

Return the geoms component.

hydromaps

Return the hydromaps component.

name

nrofexch

Fast accessor to nrofexch property of pointer.

nrofseg

Fast accessor to nrofseg property of pointer.

pointer

Return the pointer component.

region

Return the model's region component.

staticdata

Return the staticdata component.

surface_water

Fast accessor to surface_water name property of pointer.

data_catalog

DataCatalog for data access

root

Model root