Average within a circle
Tom Pollard
tomp at EARTHLINK.NET
Thu Oct 13 10:40:05 EDT 2005
On Oct 13, 2005, at 4:09 AM, M. Mahakur wrote:
> I have gridded data along with UNDEF values at certain grid
> locations. I
> wants to find the 'ave' (if possible 'aave') of a certain parameter
> available within a circle of radius (say 2 degree), and I wants to
> loop
> this in time. I will specify the centre of circle at various
> TDEF's. The
> centre of the circle during most of the times does not coincide with
> any grid point.
>
> Can anybody kindly provide me the script or some hints.
I'm not sure just how to do this in GrADS, but I'd try to multiply
the gridded data by the function that's 1.0 inside the circle and 0.0
outside the circle,
sqrt( pow(x-x0,2) + pow(y-y0,2) ) <= radius
and take the average of that.
Cheers,
Tom
More information about the gradsusr
mailing list