HIST_ND() used for resampling point data onto grid [message #43174] |
Sat, 19 March 2005 11:25 |
MarioIncandenza
Messages: 231 Registered: February 2005
|
Senior Member |
|
|
HIST_ND() is a godsend. Now that I have that, the rest is simple. Yet I
can't think of how to do it. The answer, most likely, is somewhere in
the HISTOGRAM tutorial, but I have not penetrated that far into its
mysteries.
I have DATA(N), with XYT position information given by LON(N),LAT(N),
and TIMESTAMP(N). I can break this out beautifully with HIST_ND like
so:
hist_xyt=hist_nd(transpose([[mop_lon],[mop_lat],[mop_ts]]),[ 1,1,0.25],$
min=[-180,-90,154],max=[180,90,243],reverse=ri)
Now, I need to get the mean of DATA(N) (and I wouldn't mind getting the
variance either)for each bin in HIST_XYT(X,Y,T). I'm 100% confident
this can be done without a loop, but my brain is not giving me the
answer.
I don't have complete data coverage, so I'll need also to skip empty
bins.
Why am I working on a Saturday, anyway?
--Edward Hyer.
|
|
|