[SciPy-user] converting hourly series to annual unneccessaryly masks data

Pierre GM pgmdevlist@gmail....
Thu Jan 8 13:08:00 CST 2009


> I need averages for all hours over the years:

Irrespectively of the day ? That is, you need just 24 values ? Why  
wouldn't you convert to daily instead, and take the mean over axis=0 ?
If you need hourly averages per year, try looping over the years,  
selecting the data falling into each year, converting to daily and  

Note that if you don't specify `func` in `convert`, you're currently  
limited to 1D data in input.

> atest.mean(0)
> => this the data array for the new one-year hourly time series (8760  
> h).
> And since the data is masked at the and, I am lacking a day when I  
> build the
> timeseries.

??? You have one extra day, with data completely masked. That  
shouldn't change your results.

> I mean if my long-term years contain a leap year I neeed the masked  
> points but
> normally not.

Sorry, that won't be possible. If you really wanna stick to 365d  
years, just drop the last 24 points of each line
 >>> atest[:,:-24]

More information about the SciPy-user mailing list