hydromt_wflow.WflowModel.setup_lakes#
- WflowModel.setup_lakes(lakes_fn: str | Path | GeoDataFrame, rating_curve_fns: List[str | Path | DataFrame] | None = None, min_area: float = 10.0, add_maxstorage: bool = False, output_names: Dict = {'lake_area__count': 'lake_area_id', 'lake_location__count': 'lake_outlet_id', 'lake_surface__area': 'lake_area', 'lake_water__rating_curve_coefficient': 'lake_b', 'lake_water__rating_curve_exponent': 'lake_e', 'lake_water__rating_curve_type_count': 'lake_rating_curve', 'lake_water__storage_curve_type_count': 'lake_storage_curve', 'lake_water_flow_threshold-level__elevation': 'lake_outflow_threshold', 'lake_water_surface__initial_elevation': 'lake_initial_depth', 'lake~lower_location__count': 'lake_lower_id'}, geom_name: str = 'lakes', **kwargs)[source]#
Generate maps of lake areas and outlets.
Also meant to generate parameters with average lake area, depth and discharge values. The data is generated from features with
min_area
[km2] (default 1 km2) from a database with lake geometry, IDs and metadata. Data required are lake ID ‘waterbody_id’, average area ‘Area_avg’ [m2], average volume ‘Vol_avg’ [m3], average depth ‘Depth_avg’ [m] and average discharge ‘Dis_avg’ [m3/s].If rating curve data is available for storage and discharge they can be prepared via
rating_curve_fns
(see below for syntax and requirements). Else the parameters ‘lake_b’ and ‘lake_e’ will be used for discharge and for storage a rectangular profile lake is assumed. See Wflow documentation for more information.If
add_maxstorage
is True, the maximum storage of the lake is added to the output (controlled lake) based on ‘Vol_max’ [m3] column of lakes_fn.Adds model layers:
lake_area_id map: lake IDs [-]
lake_outlet_id map: lake IDs at outlet locations [-]
lake_area map: lake area [m2]
lake_initial_depth map: lake average water level [m]
lake_outflow_threshold map: lake outflow threshold water level [m]
meta_lake_mean_outflow map: lake average discharge [m3/s]
lake_b map: lake rating curve coefficient [-]
lake_e map: lake rating curve exponent [-]
lake_rating_curve map: option to compute rating curve [-]
lake_storage_curve map: option to compute storage curve [-]
lake_lower_id map: optional, lower linked lake locations [-]
LakeMaxStorage map: optional, maximum storage of lake [m3]
lakes geom: polygon with lakes and wflow lake parameters
- Parameters:
lakes_fn –
Name of GeoDataFrame source for lake parameters.
Required variables for direct use: ‘waterbody_id’ [-], ‘Area_avg’ [m2], ‘Depth_avg’ [m], ‘Dis_avg’ [m3/s], ‘lake_b’ [-], ‘lake_e’ [-], ‘lake_rating_curve’ [-], ‘lake_storage_curve’ [-], ‘lake_outflow_threshold’ [m], ‘lake_lower_id’ [-]
Required variables for parameter estimation: ‘waterbody_id’ [-], ‘Area_avg’ [m2], ‘Vol_avg’ [m3], ‘Depth_avg’ [m], ‘Dis_avg’[m3/s]
rating_curve_fns (str, Path, pandas.DataFrame, List, optional) –
Data catalog entry/entries, path(s) or pandas.DataFrame containing rating curve values for lakes. If None then will be derived from properties of lakes_fn. Assumes one file per lake (with all variables) and that the lake ID is either in the filename or data catalog entry name (eg using placeholder). The ID should be placed at the end separated by an underscore (eg ‘rating_curve_12.csv’ or ‘rating_curve_12’)
Required variables for storage curve: ‘elevtn’ [m+REF], ‘volume’ [m3]
Required variables for rating curve: ‘elevtn’ [m+REF], ‘discharge’ [m3/s]
min_area (float, optional) – Minimum lake area threshold [km2], by default 10.0 km2.
add_maxstorage (bool, optional) – If True, maximum storage of the lake is added to the output (controlled lake) based on ‘Vol_max’ [m3] column of lakes_fn. By default False (natural lake).
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 lakes geometry in the staticgeoms folder, by default ‘lakes’ for lakes.geojson.
kwargs (optional) – Keyword arguments passed to the method hydromt.DataCatalog.get_rasterdataset()