hydromt_delwaq.delwaq.DelwaqModel¶
-
class
hydromt_delwaq.delwaq.
DelwaqModel
(root=None, mode='w', config_fn=None, mtype='EM', hydromodel_name='wflow', hydromodel_root=None, data_libs=None, deltares_data=False, logger=<Logger hydromt_delwaq.delwaq (WARNING)>)[source]¶ This is the delwaq model class
-
__init__
(root=None, mode='w', config_fn=None, mtype='EM', hydromodel_name='wflow', hydromodel_root=None, data_libs=None, deltares_data=False, logger=<Logger hydromt_delwaq.delwaq (WARNING)>)[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
([root, mode, config_fn, mtype, …])Initialize self.
build
(region[, res, write, opt])Single method to setup and write a full model schematization and configuration from scratch
dw_WriteSegmentOrExchangeData
(ttime, fname, …)Writes a timestep to a segment/exchange data file (appends to an existing file or creates a new one).
Writes Delwaq netCDF geometry file (config/B3_waqgeom.nc).
get_config
(*args[, fallback, abs_path])Get a config value at key(s).
read
()Method to read the complete model schematization and configuration from file.
read_config
([config_fn])Initialize default config and fill with config at <config_fn>
read_forcing
()Read and forcing at <root/?/> and parse to dict of xr.DataArray
Read Delwaq EM geometry file
read_hydromaps
([crs])Read hydromaps at <root/hydromodel> and parse to xarray
Read Delwaq pointer file
read_results
()Read results at <root/?/> and parse to dict of xr.DataArray
read_states
()Read states at <root/?/> and parse to dict of xr.DataArray
read_staticgeoms
()Read and staticgeoms at <root/staticgeoms> and parse to geopandas
read_staticmaps
([crs])Read staticmaps at <root/staticdata> and parse to xarray
set_config
(*args)Update the config dictionary at key(s) with values.
set_crs
(crs)Embed coordinate reference system staticmaps metadata.
set_forcing
(data[, name])Add data to forcing attribute which is a dictionary of xarray.DataArray.
set_hydromaps
(data[, name])Add data to hydromaps re-using the set_staticmaps method
set_results
(data[, name])Add data to results attribute which is a dictionary of xarray.DataArray.
set_root
(root[, mode])Initialized the model root.
set_states
(data[, name])Add data to states attribute which is a dictionary of xarray.DataArray.
set_staticgeoms
(geom, name)Add geom to staticmaps
set_staticmaps
(data[, name])Add data to staticmaps
setup_basemaps
(region[, include_soil])Setup the delwaq model schematization using the hydromodel region and resolution.
setup_config
(**cfdict)Update config with a dictionary
setup_emission_mapping
(source_name)This component derives several emission maps based on administrative boundaries.
setup_emission_raster
(emission_fn[, …])Setup one or several emission map from raster data.
setup_emission_vector
(emission_fn[, …])Setup emission map from vector data.
setup_hydrology_forcing
(hydro_forcing_fn, …)Setup Delwaq hydrological fluxes.
setup_monitoring
(mon_points, mon_areas, **kwargs)Setup Delwaq monitoring points and areas options.
test_model_api
()Test compliance to model API instances.
update
([model_out, write, opt])Single method to setup and write a full model schematization and configuration from scratch
write
()Method to write the complete model schematization and configuration to file.
write_config
()Write config files in ASCII format at <root/config>.
write_forcing
([write_nc])Write staticmaps at <root/staticdata> in binary format and NetCDF (if write_nc is True).
Write geometry at <root/staticdata> in ASCII and binary format.
Write hydromaps at <root/hydromodel> in PCRaster maps format.
write_monitoring
(monpoints, monareas)Writes monitoring files and config in ASCII format.
Write pointer at <root/dynamicdata> in ASCII and binary format.
write_results
()write results at <root/?/> in model ready format
write_states
()write states at <root/?/> in model ready format
write_staticgeoms
()Write staticmaps at <root/staticgeoms> in model ready format
write_staticmaps
()Write staticmaps at <root/staticdata> in NetCDF and binary format.
Attributes
bounds
Returns shape of staticmaps.
config
Returns parsed model configuration.
coords
Returns coordinates of staticmaps.
crs
Returns coordinate reference system embedded in staticmaps.
dims
Returns spatial dimension names of staticmaps.
forcing
dict of xarray.dataarray representation of all forcing
height
Returns height of staticmaps.
xarray.dataset representation of all hydrology maps
region
Returns geometry of region of the model area of interest.
res
Returns coordinates of staticmaps.
results
dict xarray.dataarray representation of model results
root
Path to model folder.
shape
Returns shape of staticmaps.
states
dict xarray.dataarray representation of all states
staticgeoms
geopandas.GeoDataFrame representation of all model geometries
staticmaps
xarray.dataset representation of all parameter maps
transform
Returns spatial transform staticmaps.
width
Returns width of staticmaps.
-