src.dynamic_boundary_conditions.river.river_inflows

This script handles the task of obtaining REC river inflow data along with the corresponding river input points used for the BG-Flood model.

Attributes

log

Functions

get_elevations_near_rec_entry_point(...)

Extracts elevation values and their corresponding coordinates from the Hydrologically Conditioned DEM in the

get_min_elevation_river_input_point(...)

Locate the river input point with the lowest elevation, used for BG-Flood model river input, from the

get_rec_inflows_with_input_points(→ geopandas.GeoDataFrame)

Obtain data for REC river inflow segments whose boundary points align with the boundary points of

Module Contents

src.dynamic_boundary_conditions.river.river_inflows.log
src.dynamic_boundary_conditions.river.river_inflows.get_elevations_near_rec_entry_point(rec_inflows_row: pandas.Series, hydro_dem: xarray.Dataset) geopandas.GeoDataFrame

Extracts elevation values and their corresponding coordinates from the Hydrologically Conditioned DEM in the vicinity of the entry point of the REC river inflow segment.

Parameters:
  • rec_inflows_row (pd.Series) – Represents data pertaining to an individual REC river inflow segment, including its entry point into the catchment area and the boundary line it aligns with.

  • hydro_dem (xr.Dataset) – Hydrologically Conditioned DEM for the catchment area.

Returns:

A GeoDataFrame containing elevation values and their corresponding coordinates extracted from the Hydrologically Conditioned DEM in the vicinity of the entry point of the REC river inflow segment.

Return type:

gpd.GeoDataFrame

src.dynamic_boundary_conditions.river.river_inflows.get_min_elevation_river_input_point(rec_inflows_row: pandas.Series, hydro_dem: xarray.Dataset) geopandas.GeoDataFrame

Locate the river input point with the lowest elevation, used for BG-Flood model river input, from the Hydrologically Conditioned DEM for the specific REC river inflow segment.

Parameters:
  • rec_inflows_row (pd.Series) – Represents data pertaining to an individual REC river inflow segment, including its entry point into the catchment area and the boundary line it aligns with.

  • hydro_dem (xr.Dataset) – Hydrologically Conditioned DEM for the catchment area.

Returns:

A GeoDataFrame containing the river input point with the lowest elevation, used for BG-Flood model river input, from the Hydrologically Conditioned DEM for the specific REC river inflow segment.

Return type:

gpd.GeoDataFrame

src.dynamic_boundary_conditions.river.river_inflows.get_rec_inflows_with_input_points(engine: sqlalchemy.engine.Engine, catchment_area: geopandas.GeoDataFrame, rec_network_data: geopandas.GeoDataFrame, distance_m: int = 300) geopandas.GeoDataFrame

Obtain 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 for the BG-Flood model.

Parameters:
  • engine (Engine) – The engine used to connect to the database.

  • catchment_area (gpd.GeoDataFrame) – A GeoDataFrame representing the catchment area.

  • rec_network_data (gpd.GeoDataFrame) – A GeoDataFrame containing the REC river network data.

  • distance_m (int = 300) – Distance threshold in meters for spatial proximity matching. The default value is 300 meters.

Returns:

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 for the BG-Flood model.

Return type:

gpd.GeoDataFrame

Raises:

NoRiverDataException – If no REC river segment is found crossing the catchment boundary.