src.dynamic_boundary_conditions.river.hydrograph
This script handles the task of obtaining REC river inflow scenario data, whether it’s Mean Annual Flood (MAF) or Average Recurrence Interval (ARI)-based, and generates corresponding hydrograph data for the requested scenarios.
Attributes
Functions
|
Selects and renames specific columns that represent REC river inflow data from the input GeoDataFrame. |
|
Extracts valid ARI (Annual Recurrence Interval) values from the column names of the REC river inflow data. |
|
Obtain the requested REC river inflow scenario data, which can be either Mean Annual Flood (MAF)-based or |
|
Generate hydrograph data for the requested REC river inflow scenario. |
Module Contents
- src.dynamic_boundary_conditions.river.hydrograph.log
- src.dynamic_boundary_conditions.river.hydrograph.clean_rec_inflow_data(rec_inflows_w_input_points: geopandas.GeoDataFrame) geopandas.GeoDataFrame
Selects and renames specific columns that represent REC river inflow data from the input GeoDataFrame.
- Parameters:
rec_inflows_w_input_points (gpd.GeoDataFrame) – A GeoDataFrame containing data for REC river inflow segments whose boundary points align with the boundary points of OpenStreetMap (OSM) waterways within a specified distance threshold, along with their corresponding river input points used in the BG-Flood model.
- Returns:
A GeoDataFrame with selected and renamed columns representing REC river inflow data.
- Return type:
gpd.GeoDataFrame
- src.dynamic_boundary_conditions.river.hydrograph.extract_valid_ari_values(rec_inflow_data: geopandas.GeoDataFrame) List[int]
Extracts valid ARI (Annual Recurrence Interval) values from the column names of the REC river inflow data.
- Parameters:
rec_inflow_data (gpd.GeoDataFrame) – A GeoDataFrame containing REC river inflow data with column names that include ARI values.
- Returns:
A list of valid ARI values extracted from the column names of the REC river inflow data.
- Return type:
List[int]
- src.dynamic_boundary_conditions.river.hydrograph.get_rec_inflow_scenario_data(rec_inflows_w_input_points: geopandas.GeoDataFrame, maf: bool = True, ari: int | None = None, bound: src.dynamic_boundary_conditions.river.river_enum.BoundType = BoundType.MIDDLE) geopandas.GeoDataFrame
Obtain the requested REC river inflow scenario data, which can be either Mean Annual Flood (MAF)-based or Average Recurrence Interval (ARI)-based scenario data.
- Parameters:
rec_inflows_w_input_points (gpd.GeoDataFrame) – A GeoDataFrame containing data for REC river inflow segments whose boundary points align with the boundary points of OpenStreetMap (OSM) waterways within a specified distance threshold, along with their corresponding river input points used in the BG-Flood model.
maf (bool = True) – Set to True to obtain MAF-based scenario data or False to obtain ARI-based scenario data.
ari (Optional[int] = None) – The Average Recurrence Interval (ARI) value. Valid options are 5, 10, 20, 50, 100, or 1000. Mandatory when ‘maf’ is set to False, and should be set to None when ‘maf’ is set to True.
bound (BoundType = BoundType.MIDDLE) – Set the type of bound (estimate) for the REC river inflow scenario data. Valid options include: ‘BoundType.LOWER’, ‘BoundType.MIDDLE’, or ‘BoundType.UPPER’.
- Returns:
A GeoDataFrame containing the requested REC river inflow scenario data.
- Return type:
gpd.GeoDataFrame
- Raises:
ValueError –
If ‘ari’ is provided when ‘maf’ is set to True (i.e. ‘maf’ is True and ‘ari’ is not set to None).
If ‘ari’ is not provided when ‘maf’ is set to False (i.e. ‘maf’ is False and ‘ari’ is set to None).
If an invalid ‘ari’ value is provided.
- src.dynamic_boundary_conditions.river.hydrograph.get_hydrograph_data(rec_inflows_w_input_points: geopandas.GeoDataFrame, flow_length_mins: int, time_to_peak_mins: int | float, maf: bool = True, ari: int | None = None, bound: src.dynamic_boundary_conditions.river.river_enum.BoundType = BoundType.MIDDLE) geopandas.GeoDataFrame
Generate hydrograph data for the requested REC river inflow scenario.
- Parameters:
rec_inflows_w_input_points (gpd.GeoDataFrame) – A GeoDataFrame containing data for REC river inflow segments whose boundary points align with the boundary points of OpenStreetMap (OSM) waterways within a specified distance threshold, along with their corresponding river input points used in the BG-Flood model.
flow_length_mins (int) – Duration of the river flow in minutes.
time_to_peak_mins (Union[int, float]) – The time in minutes when flow is at its greatest (reaches maximum).
maf (bool = True) – Set to True to obtain MAF-based scenario data or False to obtain ARI-based scenario data.
ari (Optional[int] = None) – The Average Recurrence Interval (ARI) value. Valid options are 5, 10, 20, 50, 100, or 1000. Mandatory when ‘maf’ is set to False, and should be set to None when ‘maf’ is set to True.
bound (BoundType = BoundType.MIDDLE) – Set the type of bound (estimate) for the REC river inflow scenario data. Valid options include: ‘BoundType.LOWER’, ‘BoundType.MIDDLE’, or ‘BoundType.UPPER’.
- Returns:
A GeoDataFrame containing hydrograph data for the requested REC river inflow scenario.
- Return type:
gpd.GeoDataFrame
- Raises:
ValueError – If the specified ‘time_to_peak_mins’ is less than half of the river flow duration.