获取给定时间序列的月度数据sim

时间:2012-11-15 16:25:34

标签: python scikits

我的每日降雨量timeseries为50年。我正在对冬季(10月至11月)进行季节性趋势分析:

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]

我有兴趣获得满足上述> 1mm条件的一年中10月每日降雨量的总和。同样适用于11月份。

0 个答案:

没有答案