Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify rain events from time series #10

Open
fenclmar opened this issue Jan 17, 2024 · 1 comment
Open

Identify rain events from time series #10

fenclmar opened this issue Jan 17, 2024 · 1 comment
Labels
enhancement New feature or request method

Comments

@fenclmar
Copy link

fenclmar commented Jan 17, 2024

Function for Identifying starts and ends of individual rainfall events based on (local) rain rate time series (e.g. single rain gauge).

arguments:

  • rain rate (or attenuation?) time series (as xarray?)
  • minimum length of dry spell separating two events
  • cumulative rainfall threshold to consider interval dry (by default zero, but for longer aggregation times it might be some positive number, e.g. 0.5 mm)

output:

  • table with start and end times (enabling easy sub setting of time series)

alternately the function might return:

  • segmented time series in a form of list (not really modular solution)
  • array of event ids having length of original time series indicating e.g. by nan (0,0,0,0, nan,nan,nan, 1,1,1, nan,nan,nan, 2,2,2, ...)
@cchwala
Copy link
Member

cchwala commented Jan 17, 2024

Sounds good!

If I would have to decide now, I would say this is the best solution for the output:

array of event ids having length of original time series indicating e.g. by nan (0,0,0,0, nan,nan,nan, 1,1,1, nan,nan,nan, 2,2,2, ...)

I can easily be used to subset the events (using time_series_array[event_ids.where(event_number)] or something similar) or to get all of the via a groupby (not sure, but I think this will work seamlessly in xarray)

@cchwala cchwala added the enhancement New feature or request label Jan 17, 2024
@cchwala cchwala added the method label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request method
Projects
None yet
Development

No branches or pull requests

2 participants