API reference#

DELWAQ model class#

Initialize#

DelwaqModel([root, mode, config_fn, mtype, ...])

This is the delwaq model class

Setup methods#

DelwaqModel.setup_config(**cfdict)

Update config with a dictionary

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

Setup the delwaq model schematization using the hydromodel region and resolution.

DelwaqModel.setup_monitoring(mon_points, ...)

Setup Delwaq monitoring points and areas options.

DelwaqModel.setup_hydrology_forcing(...[, ...])

Setup Delwaq hydrological fluxes.

DelwaqModel.setup_sediment_forcing(...[, ...])

Setup Delwaq hydrological fluxes.

DelwaqModel.setup_emission_raster(emission_fn)

Setup one or several emission map from raster data.

DelwaqModel.setup_emission_vector(emission_fn)

Setup emission map from vector data.

DelwaqModel.setup_emission_mapping(region_fn)

This component derives several emission maps based on administrative boundaries.

DelwaqModel.setup_roads(roads_fn, ...[, ...])

Setup roads statistics needed for emission modelling.

Attributes#

DelwaqModel.region

Returns the geometry of the model area of interest.

DelwaqModel.crs

Returns coordinate reference system embedded in region.

DelwaqModel.res

Returns the resolution of the model staticmaps.

DelwaqModel.root

Path to model folder.

DelwaqModel.config

Model configuration.

DelwaqModel.staticmaps

Model static maps.

DelwaqModel.staticgeoms

This property will be deprecated in future versions, use geom()

DelwaqModel.forcing

Model forcing.

DelwaqModel.basins

DelwaqModel.hydromaps

xarray.dataset representation of all hydrology maps

High level methods#

DelwaqModel.read()

Method to read the complete model schematization and configuration from file.

DelwaqModel.write()

Method to write the complete model schematization and configuration to file.

DelwaqModel.build([region, write, opt])

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

DelwaqModel.update([model_out, write, opt])

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

DelwaqModel.set_root(root[, mode])

Initialize the model root.

General methods#

DelwaqModel.setup_config(**cfdict)

Update config with a dictionary

DelwaqModel.get_config(*args[, fallback, ...])

Get a config value at key(s).

DelwaqModel.set_config(*args)

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

DelwaqModel.read_config([config_fn])

Parse config from file.

DelwaqModel.write_config()

Write config files in ASCII format at <root/config>.

DelwaqModel.set_staticmaps(data[, name])

This method will be deprecated in future versions.

DelwaqModel.read_staticmaps([crs])

Read staticmaps at <root/staticdata> and parse to xarray

DelwaqModel.write_staticmaps()

Write staticmaps at <root/staticdata> in NetCDF and binary format.

DelwaqModel.set_staticgeoms(geom, name)

This method will be deprecated in future versions, use set_geoms()

DelwaqModel.read_staticgeoms()

Read and staticgeoms at <root/staticgeoms> and parse to geopandas

DelwaqModel.write_staticgeoms()

Write staticmaps at <root/staticgeoms> in model ready format

DelwaqModel.set_forcing(data[, name, ...])

Add data to forcing attribute.

DelwaqModel.read_forcing()

Read and forcing at <root/?/> and parse to dict of xr.DataArray

DelwaqModel.write_forcing([write_nc])

Write staticmaps at <root/staticdata> in binary format and NetCDF (if write_nc is True).

DelwaqModel.set_hydromaps(data[, name])

Add data to hydromaps re-using the set_staticmaps method

DelwaqModel.read_hydromaps([crs])

Read hydromaps at <root/hydromodel> and parse to xarray

DelwaqModel.write_hydromaps()

Write hydromaps at <root/hydromodel> in PCRaster maps format.

DELWAQ workflows#

workflows.emissions

workflows.segments

workflows.roads