hydromt_wflow.WflowModel.setup_reservoirs#
- WflowModel.setup_reservoirs(reservoirs_fn: str | GeoDataFrame, timeseries_fn: str | None = None, min_area: float = 1.0, output_names: Dict = {'reservoir_area__count': 'reservoir_area_id', 'reservoir_location__count': 'reservoir_outlet_id', 'reservoir_surface__area': 'reservoir_area', 'reservoir_water__max_volume': 'reservoir_max_volume', 'reservoir_water_demand~required~downstream__volume_flow_rate': 'reservoir_demand', 'reservoir_water_release-below-spillway__max_volume_flow_rate': 'reservoir_max_release', 'reservoir_water~full-target__volume_fraction': 'reservoir_target_full_fraction', 'reservoir_water~min-target__volume_fraction': 'reservoir_target_min_fraction'}, geom_name: str = 'reservoirs', **kwargs)[source]#
Generate maps of reservoir areas and outlets.
Also meant to generate parameters with average reservoir area, demand, min and max target storage capacities and discharge capacity values.
The data is generated from features with
min_area
[km2] (default is 1 km2) from a database with reservoir geometry, IDs and metadata.Data requirements for direct use (i.e. wflow parameters are data already present in reservoirs_fn) are reservoir ID ‘waterbody_id’, area ‘reservoir_area’ [m2], maximum volume ‘reservoir_max_volume’ [m3], the targeted minimum and maximum fraction of water volume in the reservoir ‘reservoir_target_min_fraction’ and ‘reservoir_target_full_fraction’ [-], the average water demand ‘reservoir_demand’ [m3/s] and the maximum release of the reservoir before spilling ‘reservoir_max_release’ [m3/s].
In case the wflow parameters are not directly available they can be computed by HydroMT based on time series of reservoir surface water area. These time series can be retrieved from either the hydroengine or the gwwapi, based on the Hylak_id the reservoir, found in the GrandD database.
The required variables for computation of the parameters with time series data are reservoir ID ‘waterbody_id’, reservoir ID in the HydroLAKES database ‘Hylak_id’, average volume ‘Vol_avg’ [m3], average depth ‘Depth_avg’ [m], average discharge ‘Dis_avg’ [m3/s] and dam height ‘Dam_height’ [m]. To compute parameters without using time series data, the required variables in reservoirs_fn are reservoir ID ‘waterbody_id’, average area ‘Area_avg’ [m2], average volume ‘Vol_avg’ [m3], average depth ‘Depth_avg’ [m], average discharge ‘Dis_avg’ [m3/s] and dam height ‘Dam_height’ [m] and minimum / normal / maximum storage capacity of the dam ‘Capacity_min’, ‘Capacity_norm’, ‘Capacity_max’ [m3].
Adds model layers:
reservoir_area_id map: reservoir IDs [-]
reservoir_outlet_id map: reservoir IDs at outlet locations [-]
reservoir_area map: reservoir area [m2]
reservoir_max_volume map: reservoir max volume [m3]
reservoir_target_min_fraction map: reservoir target min frac [m3/m3]
reservoir_target_full_fraction map: reservoir target full frac [m3/m3]
reservoir_demand map: reservoir demand flow [m3/s]
reservoir_max_release map: reservoir max release flow [m3/s]
reservoirs geom: polygon with reservoirs and wflow reservoir parameters
- Parameters:
reservoirs_fn (str) –
Name of data source for reservoir parameters, see data/data_sources.yml.
Required variables for direct use: ‘waterbody_id’ [-], ‘reservoir_area’ [m2], ‘reservoir_max_volume’ [m3], ‘reservoir_target_min_fraction’ [m3/m3], ‘reservoir_target_full_fraction’ [m3/m3], ‘reservoir_demand’ [m3/s], ‘reservoir_max_release’ [m3/s]
Required variables for computation with timeseries_fn: ‘waterbody_id’ [-], ‘Hylak_id’ [-], ‘Vol_avg’ [m3], ‘Depth_avg’ [m], ‘Dis_avg’ [m3/s], ‘Dam_height’ [m]
Required variables for computation without timeseries_fn: ‘waterbody_id’ [-], ‘Area_avg’ [m2], ‘Vol_avg’ [m3], ‘Depth_avg’ [m], ‘Dis_avg’ [m3/s], ‘Capacity_max’ [m3], ‘Capacity_norm’ [m3], ‘Capacity_min’ [m3], ‘Dam_height’ [m]
timeseries_fn ({'gww', 'hydroengine', None}, optional) – Download and use time series of reservoir surface water area to calculate and overwrite the reservoir volume/areas of the data source. Timeseries are either downloaded from Global Water Watch ‘gww’ (using gwwapi package) or JRC ‘jrc’ (using hydroengine package). By default None.
min_area (float, optional) – Minimum reservoir area threshold [km2], by default 1.0 km2.
output_names (dict, optional) – Dictionary with output names that will be used in the model netcdf input files. Users should provide the Wflow.jl variable name followed by the name in the netcdf file.
geom_name (str, optional) – Name of the reservoirs geometry in the staticgeoms folder, by default “reservoirs” for reservoirs.geojson.
kwargs (optional) – Keyword arguments passed to the method hydromt.DataCatalog.get_rasterdataset()