hydromt_wflow.WflowSedimentModel#
- class hydromt_wflow.WflowSedimentModel(root=None, mode='w', config_fn=None, data_libs=None, deltares_data=False, logger=<Logger hydromt_wflow.wflow_sediment (WARNING)>)[source]#
This is the wflow sediment model class, a subclass of WflowModel
Initialize a model.
- Parameters:
root (str, optional) – Model root, by default None
mode ({'r','r+','w'}, optional) – read/append/write mode, by default “w”
config_fn (str, optional) – Model simulation configuration file, by default None. Note that this is not the HydroMT model setup configuration file!
data_libs (List[str], optional) – List of data catalog yaml files, by default None
**artifact_keys – Additional keyword arguments to be passed down.
logger – The logger to be used.
- __init__(root=None, mode='w', config_fn=None, data_libs=None, deltares_data=False, logger=<Logger hydromt_wflow.wflow_sediment (WARNING)>)[source]#
Initialize a model.
- Parameters:
root (str, optional) – Model root, by default None
mode ({'r','r+','w'}, optional) – read/append/write mode, by default “w”
config_fn (str, optional) – Model simulation configuration file, by default None. Note that this is not the HydroMT model setup configuration file!
data_libs (List[str], optional) – List of data catalog yaml files, by default None
**artifact_keys – Additional keyword arguments to be passed down.
logger – The logger to be used.
Methods
__init__
([root, mode, config_fn, data_libs, ...])Initialize a model.
build
([region, write, opt])Single method to build a model from scratch based on settings in opt.
clip_forcing
([crs])Return clippped forcing for subbasin.
clip_staticmaps
(region[, buffer, align, crs])Clip staticmaps to subbasin.
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])Parse config from file.
Read forcing
read_geoms
([fn])Read model geometries files at <root>/<fn> and add to geoms property.
read_intbl
(**kwargs)Read and intbl files at <root/intbl> and parse to xarray
read_maps
([fn])Read model map at <root>/<fn> and add to maps component.
Read results at <root/?/> and parse to dict of xr.DataArray/xr.Dataset
Read states at <root/?/> and parse to dict of xr.DataArray
Read and staticgeoms at <root/staticgeoms> and parse to geopandas
read_staticmaps
(**kwargs)Read staticmaps
read_staticmaps_pcr
([crs])Read and staticmaps at <root/staticmaps> and parse to xarray
read_tables
(**kwargs)Read table files at <root> and parse to dict of dataframes
set_config
(*args)Update the config dictionary at key(s) with values.
set_crs
(crs)Set the coordinate reference system.
set_flwdir
([ftype])Parse pyflwdir.FlwdirRaster object parsed from the wflow ldd
set_forcing
(data[, name, split_dataset])Add data to forcing attribute.
set_geoms
(geom, name)Add data to the geoms attribute.
set_intbl
(df, name)Add intbl <pandas.DataFrame> to model.
set_maps
(data[, name, split_dataset])Add raster data to the maps component.
set_results
(data[, name, split_dataset])Add data to results attribute.
set_root
(root[, mode])Initialize the model root.
set_states
(data[, name, split_dataset])Add data to states attribute.
set_staticgeoms
(geom, name)Set the geometries.
set_staticmaps
(data[, name])Add data to staticmaps.
set_tables
(df, name)Add table <pandas.DataFrame> to model.
setup_areamap
(area_fn, col2raster[, nodata])Setup area map from vector data to save wflow outputs for specific area.
setup_basemaps
(region[, res, ...])This component sets the
region
of interest andres
(resolution in degrees) of the model.setup_canopymaps
([canopy_fn])Setup sediments based canopy height maps.
setup_config
(**cfdict)Update config with a dictionary.
setup_config_output_timeseries
(mapname[, ...])This components sets the default gauge map based on basin outlets.
setup_constant_pars
([dtype, nodata])Setup constant parameter maps for all active model cells.
setup_floodplains
(hydrography_fn, ...[, ...])This components adds floodplain information to the model schematistation.
setup_gauges
([gauges_fn, source_gdf, ...])This components sets a gauge map based on
gauges_fn
data.setup_glaciers
([glaciers_fn, min_area])This component generates maps of glacier areas, area fraction and volume fraction, as well as tables with temperature threshold, melting factor and snow-to-ice convertion fraction.
setup_laimaps
([lai_fn])This component sets leaf area index (LAI) climatology maps per month.
setup_lakes
([lakes_fn, min_area])This component generates maps of lake areas and outlets as well as parameters with average lake area, depth a discharge values.
setup_lulcmaps
([lulc_fn, lulc_mapping_fn, ...])This component derives several wflow maps are derived based on landuse- landcover (LULC) data.
setup_maps_from_raster_reclass
(raster_fn, ...)HYDROMT CORE METHOD: Add data variable(s) to maps object by reclassifying the data in
raster_fn
based onreclass_table_fn
.setup_maps_from_rasterdataset
(raster_fn[, ...])HYDROMT CORE METHOD: Add data variable(s) from
raster_fn
to maps object.setup_outlets
([river_only, toml_output, ...])This components sets the default gauge map based on basin outlets.
setup_precip_forcing
([precip_fn, ...])Setup gridded precipitation forcing at model resolution.
setup_region
(region[, hydrography_fn, ...])Set the region of interest of the model.
setup_reservoirs
(reservoirs_fn[, ...])This component generates maps of lake areas and outlets as well as parameters with average reservoir area, demand, min and max target storage capacities and discharge capacity values.
setup_riverbedsed
([bedsed_mapping_fn])Setup sediments based river bed characteristics maps.
setup_rivers
(*args, **kwargs)This components copies the functionality of WflowModel, but removes the river_routing key from the config
setup_riverwidth
([predictor, fill, fit, ...])This component sets the river width parameter based on a power-lay relationship with a predictor.
setup_rootzoneclim
(run_fn, forcing_obs_fn[, ...])This component sets up the RootingDepth by estimating the catchment-scale root-zone storage capacity from observed hydroclimatic data (and optionally also for climate change historical and future periods).
setup_soilmaps
([soil_fn, usleK_method])Setup sediments based soil parameter maps.
setup_staticmaps_from_raster
(raster_fn, ...)This component adds data variable(s) from
raster_fn
to staticmaps object.setup_temp_pet_forcing
([temp_pet_fn, ...])Setup gridded reference evapotranspiration forcing at model resolution.
test_model_api
()Test compliance with HydroMT Model API.
update
([model_out, write, opt])Single method to update a model based the settings in opt.
write
()Method to write the complete model schematization and configuration to file.
write_config
([config_name, config_root])Write config to <root/config_fn>.
write_data_catalog
([root, data_lib_fn, ...])Write the data catalog to data_lib_fn.
write_forcing
([fn_out, freq_out, chunksize, ...])write forcing at
fn_out
in model ready format.write_geoms
([fn])Write model geometries to a vector file (by default GeoJSON) at <root>/<fn>.
write_intbl
()Write intbl at <root/intbl> in PCRaster table format.
write_maps
([fn])Write maps to netcdf file at <root>/<fn>.
write_results
()write results at <root/?/> in model ready format
write states at <root/?/> in model ready format
Write staticmaps at <root/staticgeoms> in model ready format
Write staticmaps
write_staticmaps_pcr
()Write staticmaps at <root/staticmaps> in PCRaster maps format.
write_tables
()Write tables at <root>.
Attributes
api
Return all model components and their data types.
Returns a basin(s) geometry as a geopandas.GeoDataFrame.
bounds
Returns the bounding box of the model region.
Model configuration.
coords
Returns the coordinates of model staticmaps.
Returns coordinate reference system embedded in region.
dims
Returns spatial dimension names of staticmaps.
Returns the pyflwdir.FlwdirRaster object parsed from the wflow ldd.
Model forcing.
geoms
Model geometries.
height
Returns the height of the model staticmaps.
intbl
Returns a dictionary of pandas.DataFrames representing the wflow intbl files.
maps
Model maps.
Returns the geometry of the model area of interest.
Returns the resolution of the model staticmaps.
Model results.
Returns a river geometry as a geopandas.GeoDataFrame.
Path to model folder.
shape
Returns the shape of the model staticmaps.
Model states.
Access the geometryes.
Model static maps.
tables
Returns a dictionary of pandas.DataFrames representing the wflow intbl files.
transform
Returns the geospatial transform of the model staticmaps.
width
Returns the width of the model staticmaps.