May-22-2018, 04:53 PM
(This post was last modified: May-22-2018, 04:53 PM by Lightning1800.)
Hi killerrex,
As per post #14, here is what I have so far:
Many thanks, and I would appreciate any feedback!
As per post #14, here is what I have so far:
Quantity=Q Quantity2=np.zeros(Quantity.shape) Year=np.arange(Quantity.shape[0])//365 n_year = max(Year)+1 onedaymax=np.empty((n_year, )+Quantity.shape[1:3]) fivedaymax=np.empty((n_year, )+Quantity2.shape[1:3]) for time in range(Quantity.shape[0]): Prec5[time,...] fiveconsecutivedays=np.sum(Quantity[time-2:time+2,...], axis=0) if time==0, 1, 51099, 51,100 continue for y in range(n_year): onedaymax[y, ...]=np.max(Quantity[Year==y, ...], axis=0) fivedaymax[y, ...]=np.max(Quantity2[Year==y, ...], axis=0)I'm not sure if that first for loop is the right approach (again, as per the goal specified in post #14). The "if time" portion is intended to omit the first two days and last two days of the period, but I'm unsure if that it specified correctly for my purposes. What would you modify there?
Many thanks, and I would appreciate any feedback!