On Fri, 2007-06-01 at 12:26 -0400, Case.Jon wrote:
Does anyone know of a way to calculate the standard deviation of a specific grid using GDLIST?
There is a function to give you the average of a scalar grid over the GAREA, but I don't see a way to specify a GFUNC that can calculate the standard deviation.
Actually, the only missing link I need is to find the number of non-missing grid points in the array. I haven't identified such a utility though.
You can determine the number of non-missing grid points in your sub
using a function like:
GDPFUN = ysum(xsum(bool(S)))
The bool(S) function will provide a 1/0 output with 1's at existing
the column sumation of the individual row sums will produce a grid of
the number of non-missing points at all points. You could further assign
value to just the non-missing point locations (but not needed here)
GDPFUN = mask(ysum(xsum(bool(S))),S)
The standard deviation of the grid area could be done in GDPLOT2 similar
(or the individual terms above can be computed in GDDIAG to output with
Unidata User Support