hydromt_delwaq.DemissionModel#

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

Demission 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_filename (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_filename (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[, maps])

Prepare demission 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_emission_mapping(region_fn[, mapping_fn])

Derive several emission maps based on administrative boundaries.

setup_emission_raster(emission_fn[, ...])

Prepare one or several emission map from raster data.

setup_emission_vector(emission_fn[, ...])

Prepare emission map from vector data.

setup_hydrology_forcing(hydro_forcing_fn, ...)

Prepare Demission hydrological fluxes.

setup_monitoring([mon_points, mon_areas])

Prepare Delwaq monitoring points and areas options.

setup_roads(roads_fn, highway_list, country_list)

Prepare roads statistics needed for emission modelling.

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

List of fluxes.

forcing

Return the forcing component.

geometry

Return the geometry component.

geoms

Return the geoms component.

hydromaps

Return the hydromaps component.

name

nrofexch

Number of exchanges.

nrofseg

Number of segments.

region

Return the model's region component.

staticdata

Return the staticdata component.

data_catalog

DataCatalog for data access

root

Model root