0

I have a timeseries of daily rainfall for 50 years. I am doing a seasonal trend analysis for the winter season (October-November):

import scikits.timeseries as ts
import datetime as dt

start_date = dt.datetime(1954,1,1)
end_date = dt.datetime(2003,12,31)

dateRange = ts.date_array(start_date,end_date,freq='D')
dly_series = ts.time_series(dates=dateRange,freq='D',data=rain)

# Autumn season OctNov
oct_series = dly_series[dly_series.month == 10]
nov_series = dly_series[dly_series.month == 11]

# October November months daily series
on_dly_series = ts.concatenate((oct_series,nov_series)) 
loc = np.where(on_dly_series.data >= 1.0)[0]
corr_dates = on_dly_series.dates[loc]

I am interested in getting the sum of all October daily rainfall of a year satisfying the above condition of > 1mm. Similarly for the month of November.

Pedro Romano
  • 10,973
  • 4
  • 46
  • 50
user1142937
  • 314
  • 5
  • 19
  • What is your question (i.e. what problem are you having in achieving your goal)? – Josh Heitzman Nov 15 '12 at 20:17
  • The problem is I would like to get the sum of monthly rainfall for only those days in a year having rainfall in excess of 1mm (basically a rainy day) for each year. I am not sure how to do it. – user1142937 Nov 16 '12 at 06:08

0 Answers0