Closed AndreGilerson closed 3 years ago
Additionally, there is a small error with the annual series, where events[COL.START].year
attribute is called. Since events[COL.START]
is a Series, it does not have the attribute. This is fixed by iterating over all entries in the Series and calling the year attribute from each entry individually.
Hi! Thanks for the message!
1) you are right. but I rather adapt the function calculate_u_w
. In this case the function rain_events
runs as expected, even with "not so useful" parameters.
2) it is even easier than that: events[COL.START].dt.year.values
dose the trick.
According to the DWA A-531 Chapter 4.2, rain events should be at least 4 hours apart to be statistically independent. This period is defined as the default parameter in the rain_events function. However, during function calls in e.g. calculate_u_uw() smaller gap periods are used. Therefore a new check is added, such that even if the method is called with a min_gap < 4 hours, it still will be at least 4 hours.