src.dynamic_boundary_conditions.rainfall.hyetograph
Get hyetograph data and generate interactive hyetograph plots for sites located within the catchment area.
Functions
|
Clean and transpose the retrieved scenario data from the database for sites within the catchment area and |
|
Perform temporal interpolation on the transposed scenario data to the desired time interval |
|
Get the incremental rainfall depths (difference between current and preceding cumulative rainfall) |
|
Get the incremental rainfall depths for sites within the catchment area for a specific storm duration. |
|
Add time information (seconds, minutes, and hours column) to the hyetograph data based on the |
|
Transform the storm length incremental rainfall depths for sites within the catchment area based on |
|
Convert hyetograph depths data to hyetograph intensities data for all sites within the catchment area. |
|
Get hyetograph intensities data for all sites within the catchment area and return it in Pandas DataFrame format. |
|
Transform hyetograph intensities data for all sites within the catchment area from wide format to long format. |
|
Create interactive individual hyetograph plots for sites within the catchment area. |
Module Contents
- src.dynamic_boundary_conditions.rainfall.hyetograph.get_transposed_data(rain_depth_in_catchment: pandas.DataFrame) pandas.DataFrame
Clean and transpose the retrieved scenario data from the database for sites within the catchment area and return it in transposed Pandas DataFrame format.
- Parameters:
rain_depth_in_catchment (pd.DataFrame) – Rainfall depths for sites within the catchment area for a specified scenario retrieved from the database.
- Returns:
A DataFrame containing the cleaned and transposed scenario data.
- Return type:
pd.DataFrame
- src.dynamic_boundary_conditions.rainfall.hyetograph.get_interpolated_data(transposed_catchment_data: pandas.DataFrame, increment_mins: int, interp_method: str) pandas.DataFrame
Perform temporal interpolation on the transposed scenario data to the desired time interval for sites within the catchment area.
- Parameters:
transposed_catchment_data (pd.DataFrame) – Transposed scenario data retrieved from the database.
increment_mins (int) – Time interval in minutes.
interp_method (str) – Temporal interpolation method to be used. Refer to ‘scipy.interpolate.interp1d()’ for available methods. One of ‘linear’, ‘nearest’, ‘nearest-up’, ‘zero’, ‘slinear’, ‘quadratic’, ‘cubic’, ‘previous’, or ‘next’.
- Returns:
A DataFrame containing the scenario data interpolated at the desired time interval for sites within the catchment area.
- Return type:
pd.DataFrame
- Raises:
ValueError –
If the specified ‘increment_mins’ is out of range.
If the specified ‘interp_method’ is not supported.
- src.dynamic_boundary_conditions.rainfall.hyetograph.get_interp_incremental_data(interp_catchment_data: pandas.DataFrame) pandas.DataFrame
Get the incremental rainfall depths (difference between current and preceding cumulative rainfall) for sites within the catchment area and return it in Pandas DataFrame format.
- Parameters:
interp_catchment_data (pd.DataFrame) – Interpolated scenario data for sites within the catchment area.
- Returns:
A DataFrame containing the incremental rainfall depths.
- Return type:
pd.DataFrame
- src.dynamic_boundary_conditions.rainfall.hyetograph.get_storm_length_increment_data(interp_increment_data: pandas.DataFrame, storm_length_mins: int) pandas.DataFrame
Get the incremental rainfall depths for sites within the catchment area for a specific storm duration.
- Parameters:
interp_increment_data (pd.DataFrame) – Incremental rainfall depths for sites within the catchment area.
storm_length_mins (int) – Storm duration in minutes.
- Returns:
Incremental rainfall depths for sites within the catchment area for the specified storm duration.
- Return type:
pd.DataFrame
- Raises:
ValueError – If the specified ‘storm_length_mins’ is less than the minimum storm duration available in the data.
- src.dynamic_boundary_conditions.rainfall.hyetograph.add_time_information(site_data: pandas.DataFrame, storm_length_mins: int, time_to_peak_mins: int | float, increment_mins: int, hyeto_method: src.dynamic_boundary_conditions.rainfall.rainfall_enum.HyetoMethod) pandas.DataFrame
Add time information (seconds, minutes, and hours column) to the hyetograph data based on the selected hyetograph method.
- Parameters:
site_data (pd.DataFrame) – Hyetograph data for a rainfall site or gauge.
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.
- Returns:
Hyetograph data with added time information.
- Return type:
pd.DataFrame
- Raises:
ValueError – If the specified ‘time_to_peak_mins’ is less than half of the storm duration.
- src.dynamic_boundary_conditions.rainfall.hyetograph.transform_data_for_selected_method(interp_increment_data: pandas.DataFrame, storm_length_mins: int, time_to_peak_mins: int | float, increment_mins: int, hyeto_method: src.dynamic_boundary_conditions.rainfall.rainfall_enum.HyetoMethod) pandas.DataFrame
Transform the storm length incremental rainfall depths for sites within the catchment area based on the selected hyetograph method and return hyetograph depths data for all sites within the catchment area in Pandas DataFrame format.
- Parameters:
interp_increment_data (pd.DataFrame) – Incremental rainfall depths for sites within the catchment area.
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.
- Returns:
Hyetograph depths data for all sites within the catchment area.
- Return type:
pd.DataFrame
- src.dynamic_boundary_conditions.rainfall.hyetograph.hyetograph_depth_to_intensity(hyetograph_depth: pandas.DataFrame, increment_mins: int, hyeto_method: src.dynamic_boundary_conditions.rainfall.rainfall_enum.HyetoMethod) pandas.DataFrame
Convert hyetograph depths data to hyetograph intensities data for all sites within the catchment area.
- Parameters:
hyetograph_depth (pd.DataFrame) – Hyetograph depths data for sites within the catchment area.
increment_mins (int) – Time interval in minutes.
hyeto_method (HyetoMethod) – Hyetograph method to be used.
- Returns:
Hyetograph intensities data for all sites within the catchment area.
- Return type:
pd.DataFrame
- src.dynamic_boundary_conditions.rainfall.hyetograph.get_hyetograph_data(rain_depth_in_catchment: pandas.DataFrame, storm_length_mins: int, time_to_peak_mins: int | float, increment_mins: int, interp_method: str, hyeto_method: src.dynamic_boundary_conditions.rainfall.rainfall_enum.HyetoMethod) pandas.DataFrame
Get hyetograph intensities data for all sites within the catchment area and return it in Pandas DataFrame format.
- Parameters:
rain_depth_in_catchment (pd.DataFrame) – Rainfall depths for sites within the catchment area for a specified scenario retrieved from the database.
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.
interp_method (str) – Temporal interpolation method to be used. Refer to ‘scipy.interpolate.interp1d()’ for available methods. One of ‘linear’, ‘nearest’, ‘nearest-up’, ‘zero’, ‘slinear’, ‘quadratic’, ‘cubic’, ‘previous’, or ‘next’.
hyeto_method (HyetoMethod) – Hyetograph method to be used.
- Returns:
Hyetograph intensities data for all sites within the catchment area.
- Return type:
pd.DataFrame
- src.dynamic_boundary_conditions.rainfall.hyetograph.hyetograph_data_wide_to_long(hyetograph_data: pandas.DataFrame) pandas.DataFrame
Transform hyetograph intensities data for all sites within the catchment area from wide format to long format.
- Parameters:
hyetograph_data (pd.DataFrame) – Hyetograph intensities data for sites within the catchment area.
- Returns:
Hyetograph intensities data in long format.
- Return type:
pd.DataFrame
- src.dynamic_boundary_conditions.rainfall.hyetograph.hyetograph(hyetograph_data: pandas.DataFrame, ari: float) None
Create interactive individual hyetograph plots for sites within the catchment area.
- Parameters:
hyetograph_data (pd.DataFrame) – Hyetograph intensities data for sites within the catchment area.
ari (float) – Average Recurrence Interval (ARI) value. Valid options are 1.58, 2, 5, 10, 20, 30, 40, 50, 60, 80, 100, or 250.
- Returns:
This function does not return any value.
- Return type:
None