Averaging between arrays with missing values

From: Michael Tosca <mtosca_at_nyahnyahspammersnyahnyah>
Date: Wed, 4 Jun 2008 10:16:16 -0700

I have a set of arrays (all same month) that contain lat and lon
points. I wish to compute an average value for each lat/lon point from
all the arrays, however, some points (different in each array dataset)
contain missing values, so that when i just add the arrays and divide
by 'n' any lat/lon point that has at least ONE missing value in one of
the arrays is essentially "thrown out".

My question is: how can i average over the arrays and simply disregard
a point when it has a missing value and use the remaining points to
compute the average. For example, if I have 10 arrays, and one lat/lon
point only has a vlue in 4 of the 10 arrays, I want the average value
of that point in the resulting dataset to be an average of the 4
available data. The "avg" function doesn't work because it averages
over a single array, whereas I want to average between several arrays.
Here's a sample of the code I'm using to average:

MISR_ASO_ElNino = MISR_ASO_2002
MISR_ASO_ElNino = (MISR_ASO_2002 + MISR_ASO_2004 + MISR_ASO_2006 ) / 3

Thanks!
-Mike
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jun 04 2008 - 11:16:16 MDT

This archive was generated by hypermail 2.2.0 : Wed Jun 04 2008 - 15:43:54 MDT