Hi Nisha,
You can use the output from gc_inout:
http://www.ncl.ucar.edu/Document/Functions/Built-in/gc_inout.shtml
(See example #3)
gc_inout will return data of type logical, and you can use that data in
a where statement to mask out your data array.
http://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml
Then you can average over the remaining (non-missing) data.
Hope that helps.. If not, please respond to ncl-talk..
Adam
On 07/13/2012 02:35 PM, Manisha Ganeshan wrote:
> Hello,
>
> Is there a NCL function that can compute the indices of all points
> lying inside a pre-defined polygon? For example, I have used
> gsn_add_polygon function to draw a polygon on a contour map, but I now
> wish to find an average value of a quantity over points lying inside
> this polygon.
>
> Thanks,
> Nisha
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-- ______________________________________________________________ Adam Phillips asphilli@ucar.edu NCAR/Climate and Global Dynamics Division (303) 497-1726 P.O. Box 3000 Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jul 13 16:13:03 2012
This archive was generated by hypermail 2.1.8 : Wed Jul 18 2012 - 14:33:00 MDT