floodresilience.dynamic_boundary_conditions.rainfall.main_rainfall
Main rainfall script used to fetch and store rainfall data in the database, and to generate the requested rainfall model input for BG-Flood, etc.
Attributes
Functions
| 
 | Fetch and store rainfall data in the database, and generate the requested rainfall model input for BG-Flood. | 
Module Contents
- floodresilience.dynamic_boundary_conditions.rainfall.main_rainfall.main(selected_polygon_gdf: geopandas.GeoDataFrame, rcp: float | None, time_period: str | None, ari: float, storm_length_mins: int, time_to_peak_mins: int | float, increment_mins: int, hyeto_method: floodresilience.dynamic_boundary_conditions.rainfall.rainfall_enum.HyetoMethod, input_type: floodresilience.dynamic_boundary_conditions.rainfall.rainfall_enum.RainInputType, log_level: src.digitaltwin.utils.LogLevel = LogLevel.DEBUG) None
- Fetch and store rainfall data in the database, and generate the requested rainfall model input for BG-Flood. - Parameters:
- selected_polygon_gdf (gpd.GeoDataFrame) – A GeoDataFrame representing the selected polygon, i.e., the catchment area. 
- rcp (Optional[float]) – Representative Concentration Pathway (RCP) value. Valid options are 2.6, 4.5, 6.0, 8.5, or None for historical data. 
- time_period (Optional[str]) – Future time period. Valid options are “2031-2050”, “2081-2100”, or None for historical data. 
- ari (float) – Average Recurrence Interval (ARI) value. Valid options are 1.58, 2, 5, 10, 20, 30, 40, 50, 60, 80, 100, or 250. 
- storm_length_mins (int) – Storm duration in minutes. 
- time_to_peak_mins (Union[int, float]) – The time in minutes when rainfall is at its greatest (reaches maximum). 
- increment_mins (int) – Time interval in minutes. 
- hyeto_method (HyetoMethod) – Hyetograph method to be used. Valid options are HyetoMethod.ALT_BLOCK or HyetoMethod.CHICAGO. 
- input_type (RainInputType) – The type of rainfall model input to be generated. Valid options are ‘uniform’ or ‘varying’, representing spatially uniform rain input (text file) or spatially varying rain input (NetCDF file). 
- 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.rainfall.main_rainfall.sample_polygon