hydromt_wflow.WflowModel.setup_reservoirs_simple_control#
- WflowModel.setup_reservoirs_simple_control(reservoirs_fn: str | GeoDataFrame, timeseries_fn: str | None = None, overwrite_existing: bool = False, duplicate_id: str = 'error', 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__rating_curve_type_count': 'reservoir_rating_curve', 'reservoir_water__storage_curve_type_count': 'reservoir_storage_curve', 'reservoir_water_demand~required~downstream__volume_flow_rate': 'reservoir_demand', 'reservoir_water_release-below-spillway__max_volume_flow_rate': 'reservoir_max_release', 'reservoir_water_surface__initial_elevation': 'reservoir_initial_depth', 'reservoir_water~full-target__volume_fraction': 'reservoir_target_full_fraction', 'reservoir_water~min-target__volume_fraction': 'reservoir_target_min_fraction'}, geom_name: str = 'meta_reservoirs_simple_control', **kwargs)[source]#
Generate maps of controlled reservoir areas, outlets and parameters.
Also generates parameters with average reservoir area, demand, min and max target storage capacities and discharge capacity values.
This function adds reservoirs with simple control operations to the model. It prepares rating and storage curves parameters for the reservoirs modelled with the following rating curve types (see Wflow reservoir concepts ):
4 simple reservoir operational parameters
Created reservoirs can be added to already existing ones in the model overwrite_existing=False (default) or overwrite them overwrite_existing=True.
The data is generated from features with
min_area
[km2] (default is 1 km2) from a database with reservoir geometry, IDs and metadata. Parameters can be directly provided in the GeoDataFrame or derived using common properties such as average depth, area and discharge.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], initial depth ‘reservoir_initial_depth’ [m], rating curve type ‘reservoir_rating_curve’ [-], storage curve type ‘reservoir_storage_curve’ [-], 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_initial_depth map: reservoir initial water level [m]
reservoir_rating_curve map: option to compute rating curve [-]
reservoir_storage_curve map: option to compute storage curve [-]
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]
meta_reservoirs_simple_control geom: polygon with reservoirs and parameters
reservoirs geom: polygon with all reservoirs as in the model
- 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_initial_depth’ [m], ‘reservoir_rating_curve’ [-], ‘reservoir_storage_curve’ [-], ‘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.
overwrite_existing (bool, optional) – If False (default), update existing reservoirs in the model with the new reservoirs_fn data.
duplicate_id (str, optional {"error", "skip"}) – Action to take if duplicate reservoir IDs are found when merging with existing reservoirs. Options are “error” to raise an error (default); “skip” to skip adding new reservoirs.
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 “meta_reservoirs_simple_control” for meta_reservoirs_simple_control.geojson.
kwargs (optional) – Keyword arguments passed to the method hydromt.DataCatalog.get_rasterdataset()