floodresilience.dynamic_boundary_conditions.river.main_river ============================================================ .. py:module:: floodresilience.dynamic_boundary_conditions.river.main_river .. autoapi-nested-parse:: 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 ---------- .. autoapisummary:: floodresilience.dynamic_boundary_conditions.river.main_river.log floodresilience.dynamic_boundary_conditions.river.main_river.sample_polygon Functions --------- .. autoapisummary:: floodresilience.dynamic_boundary_conditions.river.main_river.main Module Contents --------------- .. py:data:: log .. py:function:: main(selected_polygon_gdf: geopandas.GeoDataFrame, flow_length_mins: int, time_to_peak_mins: Union[int, float], maf: bool = True, ari: Optional[int] = 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. :param selected_polygon_gdf: A GeoDataFrame representing the selected polygon, i.e., the catchment area. :type selected_polygon_gdf: gpd.GeoDataFrame :param flow_length_mins: Duration of the river flow in minutes. :type flow_length_mins: int :param time_to_peak_mins: The time in minutes when flow is at its greatest (reaches maximum). :type time_to_peak_mins: Union[int, float] :param maf: Set to True to obtain MAF-based scenario data or False to obtain ARI-based scenario data. :type maf: bool = True :param ari: 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. :type ari: Optional[int] = None :param bound: Set the type of bound (estimate) for the REC river inflow scenario data. Valid options include: 'BoundType.LOWER', 'BoundType.MIDDLE', or 'BoundType.UPPER'. :type bound: BoundType = BoundType.MIDDLE :param log_level: 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) :type log_level: LogLevel = LogLevel.DEBUG .. py:data:: sample_polygon