floodresilience.dynamic_boundary_conditions.river.main_river
Main river script used to read and store REC data in the database, fetch OSM waterways data, create a river network and its associated data, and generate the requested river model input for BG-Flood etc.
Attributes
Functions
|
Read and store REC data in the database, fetch OSM waterways data, create a river network and its associated data, |
Module Contents
- floodresilience.dynamic_boundary_conditions.river.main_river.log
- floodresilience.dynamic_boundary_conditions.river.main_river.main(selected_polygon_gdf: geopandas.GeoDataFrame, flow_length_mins: int, time_to_peak_mins: int | float, maf: bool = True, ari: int | None = None, bound: floodresilience.dynamic_boundary_conditions.river.river_enum.BoundType = BoundType.MIDDLE, log_level: src.digitaltwin.utils.LogLevel = LogLevel.DEBUG) None
Read and store REC data in the database, fetch OSM waterways data, create a river network and its associated data, and generate the requested river model input for BG-Flood.
- Parameters:
selected_polygon_gdf (gpd.GeoDataFrame) – A GeoDataFrame representing the selected polygon, i.e., the catchment area.
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’.
log_level (LogLevel = LogLevel.DEBUG) – The log level to set for the root logger. Defaults to LogLevel.DEBUG. The available logging levels and their corresponding numeric values are: - LogLevel.CRITICAL (50) - LogLevel.ERROR (40) - LogLevel.WARNING (30) - LogLevel.INFO (20) - LogLevel.DEBUG (10) - LogLevel.NOTSET (0)
- floodresilience.dynamic_boundary_conditions.river.main_river.sample_polygon