sum and count values across time
Added by mini max about 1 month ago
Hello everyone,
I would like to sum and count the number of consecutive events that change in time with a defined threshold.
For example, I have time sequence
0,100,200,100,0,50,0,100,100,300
First, I need to sum up the consecutive series, i.e. to get
0,400,0,50,400
secondly, using the threshold >=400 to calculate the number of events during the whole time, i.e.
2
How can I do it with cdo?
Thank you very much!
Replies (3)
RE: sum and count values across time - Added by mini max about 1 month ago
Dear Karin,
thank you for the reply!
Unfortunately, I couldn't solve my problem with these operators.
I need to sum values between zeros, but consecsum sum only number of events.
Thank you!
RE: sum and count values across time - Added by Karin Meier-Fleischer about 1 month ago
IMO, guessing that you have a 1-dimensional time series data array, you should write script to do this, e.g. Python.