API reference#
DELWAQ model class#
Initialize#
|
Delwaq model class. |
Setup methods#
|
Update config with a dictionary. |
|
Prepare delwaq schematization using the hydromodel region and resolution. |
|
Prepare Delwaq monitoring points and areas options. |
|
Prepare Delwaq hydrological fluxes. |
|
Prepare Delwaq sediment fluxes. |
|
Prepare Delwaq climate fluxes. |
|
Prepare one or several emission map from raster data. |
|
Prepare emission map from vector data. |
|
Derive several emission maps based on administrative boundaries. |
Attributes#
Returns the geometry of the model area of interest. |
|
Returns coordinate reference system embedded in the model grid. |
|
Returns the resolution of the model grid. |
|
Path to model folder. |
|
Model configuration. |
|
Model static gridded data as xarray.Dataset. |
|
Model geometries. |
|
Model forcing. |
|
Derive basins from geoms or hydromaps. |
|
xarray.dataset representation of all hydrology maps. |
|
Dictionnary of schematisation attributes of a Delwaq model. |
|
Fast accessor to nrofseg property of pointer. |
|
Fast accessor to nrofexch property of pointer. |
|
Fast accessor to surface_water name property of pointer. |
|
Fast accessor to fluxes property of pointer. |
High level methods#
Read the complete model schematization and configuration from file. |
|
Write the complete model schematization and configuration to file. |
|
|
Single method to build a model from scratch based on settings in opt. |
|
Single method to update a model based the settings in opt. |
|
Initialize the model root. |
General methods#
|
Update config with a dictionary. |
|
Get a config value at key(s). |
|
Update the config dictionary at key(s) with values. |
|
Read config files in ASCII format at <root/config>. |
Write config files in ASCII format at <root/config>. |
|
|
Add data to grid. |
|
Read grid at <root/staticdata> and parse to xarray. |
Write grid at <root/staticdata> in NetCDF and binary format. |
|
|
Add data to the geoms attribute. |
Read and geoms at <root/geoms> and parse to geopandas. |
|
Write grid at <root/geoms> in model ready format. |
|
|
Add data to forcing attribute. |
Read and forcing at <root/?/> and parse to dict of xr.DataArray. |
|
|
Write grid at <root/staticdata> in binary format. |
|
Add data to hydromaps re-using the set_grid method. |
|
Read hydromaps at <root/hydromodel> and parse to xarray. |
Write hydromaps at <root/hydromodel> in PCRaster maps format. |
|
|
Add model attribute property to pointer. |
Read Delwaq pointer file. |
|
Write Delwaq netCDF geometry file (config/B3_waqgeom.nc). |
D-Emission model class#
Initialize#
|
Demission model class. |
Setup methods#
|
Update config with a dictionary. |
|
Prepare demission schematization using the hydromodel region and resolution. |
Prepare Delwaq monitoring points and areas options. |
|
Prepare Demission hydrological fluxes. |
|
|
Prepare Delwaq climate fluxes. |
|
Prepare one or several emission map from raster data. |
|
Prepare emission map from vector data. |
|
Derive several emission maps based on administrative boundaries. |
|
Prepare roads statistics needed for emission modelling. |
Attributes#
Returns the geometry of the model area of interest. |
|
Returns coordinate reference system embedded in the model grid. |
|
Returns the resolution of the model grid. |
|
Path to model folder. |
|
Model configuration. |
|
Model static gridded data as xarray.Dataset. |
|
Model geometries. |
|
Model forcing. |
|
Derive basins from geoms or hydromaps. |
|
xarray.dataset representation of all hydrology maps. |
|
Pandas DataFrame containing the geometry of the EM compartment. |
|
Fast accessor to nrofseg property of pointer. |
|
Fast accessor to nrofexch property of pointer. |
|
Fast accessor to fluxes property of pointer. |
High level methods#
Read the complete model schematization and configuration from file. |
|
Write the complete model schematization and configuration to file. |
|
|
Single method to build a model from scratch based on settings in opt. |
|
Single method to update a model based the settings in opt. |
|
Initialize the model root. |
General methods#
|
Update config with a dictionary. |
|
Get a config value at key(s). |
|
Update the config dictionary at key(s) with values. |
|
Read config files in ASCII format at <root/config>. |
Write config files in ASCII format at <root/config>. |
|
|
Add data to grid. |
|
Read grid at <root/staticdata> and parse to xarray. |
Write grid at <root/staticdata> in NetCDF and binary format. |
|
|
Add data to the geoms attribute. |
Read and geoms at <root/geoms> and parse to geopandas. |
|
Write grid at <root/geoms> in model ready format. |
|
|
Add data to forcing attribute. |
Read and forcing at <root/?/> and parse to dict of xr.DataArray. |
|
|
Write forcing at <root/dynamicdata> in binary format. |
|
Add data to hydromaps re-using the set_grid method. |
Read hydromaps at <root/hydromodel> and parse to xarray. |
|
Write hydromaps at <root/hydromodel> in PCRaster maps format. |
|
Write geometry at <root/staticdata> in ASCII and binary format. |
|
Write Delwaq netCDF geometry file (config/B3_waqgeom.nc). |
DELWAQ workflows#
config#
|
Prepare base config dictionnary. |
|
Prepare time config dictionnary. |
emissions#
|
Return emission map. |
|
Return gridded emission data from vector. |
|
Return administrative boundaries map and related parameter maps. |
forcing#
|
Calculate hydrology forcing data. |
Calculate hydrology forcing data for emission model. |
|
|
Calculate sediment forcing data. |
|
Prepare Delwaq climate fluxes. |
geometry#
|
Compute geometry data for demission. |
roads#
Compute roads statistics per country of interest. |
|
Compute roads statistics per segment/grid cell. |
segments#
|
Return base information maps from hydromodel. |
|
Return geometry information maps from hydromodel. |
|
Return map with Delwaq segment ID and pointer. |