Calculate the intensity of a rainfall event for a given duration and return period. It's based on the Sherman intensity-duration-frequency curve: I = k * T^a / (D + b)^c where: I = Intensity of the rainfall event [mm/h] k, a, b, c = Coefficients obtained through st
(
coefficient_k: float,
coefficient_a: float,
coefficient_b: float,
coefficient_c: float,
return_period: float,
duration: float,
)
| 15 | |
| 16 | |
| 17 | def rainfall_intensity( |
| 18 | coefficient_k: float, |
| 19 | coefficient_a: float, |
| 20 | coefficient_b: float, |
| 21 | coefficient_c: float, |
| 22 | return_period: float, |
| 23 | duration: float, |
| 24 | ) -> float: |
| 25 | """ |
| 26 | Calculate the intensity of a rainfall event for a given duration and return period. |
| 27 | It's based on the Sherman intensity-duration-frequency curve: |
| 28 | |
| 29 | I = k * T^a / (D + b)^c |
| 30 | |
| 31 | where: |
| 32 | I = Intensity of the rainfall event [mm/h] |
| 33 | k, a, b, c = Coefficients obtained through statistical distribution adjust |
| 34 | T = Return period in years |
| 35 | D = Rainfall event duration in minutes |
| 36 | |
| 37 | Parameters |
| 38 | ---------- |
| 39 | coefficient_k : float |
| 40 | Coefficient obtained through statistical distribution adjust. |
| 41 | coefficient_a : float |
| 42 | Coefficient obtained through statistical distribution adjust. |
| 43 | coefficient_b : float |
| 44 | Coefficient obtained through statistical distribution adjust. |
| 45 | coefficient_c : float |
| 46 | Coefficient obtained through statistical distribution adjust. |
| 47 | return_period : float |
| 48 | Return period in years. |
| 49 | duration : float |
| 50 | Rainfall event duration in minutes. |
| 51 | |
| 52 | Returns |
| 53 | ------- |
| 54 | intensity : float |
| 55 | Intensity of the rainfall event in mm/h. |
| 56 | |
| 57 | Raises |
| 58 | ------ |
| 59 | ValueError |
| 60 | If any of the parameters are not positive. |
| 61 | |
| 62 | Examples |
| 63 | -------- |
| 64 | |
| 65 | >>> rainfall_intensity(1000, 0.2, 11.6, 0.81, 10, 60) |
| 66 | 49.83339231138578 |
| 67 | |
| 68 | >>> rainfall_intensity(1000, 0.2, 11.6, 0.81, 10, 30) |
| 69 | 77.36319588106228 |
| 70 | |
| 71 | >>> rainfall_intensity(1000, 0.2, 11.6, 0.81, 5, 60) |
| 72 | 43.382487747633625 |
| 73 | |
| 74 | >>> rainfall_intensity(0, 0.2, 11.6, 0.81, 10, 60) |
nothing calls this directly
no outgoing calls
no test coverage detected