my_means = np.array( [ np.mean(x[i*365:i*365+10,:,:], 0) for i in range(10) ] )
The second argument to mean is "axis", so it will mean the time axis, but leave the x and y axes alone. That will give you an array that's 10x100x100 (so you'll need to make multiple plots). Obviously, watch out for leap years or calendars with days != 365.
ServerError: 'Server error 403: "Request too big=18900.0 Mbytes, max=500.0"'
I could increase the "max" parameter on the server but this could get quite large. I was wondering if I should be using another approach for coding this type of request? If I just want to get a single value for each year it works fine like this with no size error:var = tmp.array[0:18250:365,int(100),int(100)]It's just when I try to average the 10-day window that I get the error:
var = np.array( [ np.mean(tmp[i*365:i*365+10,int(100),int(100)], 0) for i in range(10) ] )
Do you recommend a different approach?
var = np.mean( np.array([ tmp[i:18250:365,100,100] for i in range(10) ]), axis=0 )
Thanks,-Bruce--
You received this message because you are subscribed to the Google Groups "pydap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pydap+un...@googlegroups.com.
To post to this group, send email to py...@googlegroups.com.
Visit this group at http://groups.google.com/group/pydap?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
var = np.mean( np.array([ tmp[i:18250:365,100,100] for i in range(10) ]), axis=0 )This will create an array of size (10, 50, 1, 1), corresponding to 10 days, 50 years and a point location. We then average across the 10 first days, resulting on a (50, 1, 1) array.Let me know if it works.Thanks,--Rob
-Bruce--
You received this message because you are subscribed to the Google Groups "pydap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pydap+un...@googlegroups.com.
To post to this group, send email to py...@googlegroups.com.
Visit this group at http://groups.google.com/group/pydap?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Indeed, this looks like a bug. Each request has only 200 bytes!I think the problem is in the way the THREDDS server aggregates the data. It seems that it's trying to request the entire dataset; 18900.0 Mbytes is exactly its size (55y * 365d * 442lat * 523lon * 4bytes).Can you send me your script so I can take a look?Thanks,--Rob