So, you want the average of the data inside the polygonal region for each day. The function PT_IN_POLY can be used to make a mask. What you need is wht's done in FAQ:
Here's an example like the one in the pt_in_poly documentation but for a variable with a time axis
yes? use coads_climatologyThe variable "sst_in_poly" has the same data as sst, but is marked as missing everywhere outside the polygon, and it's on the same XYT grid as sst. This means we can take the XY average over the globe or any region that contains the polygon, and the result is the data within the polygon averaged on the grid in XY.
yes? list sst_in_poly[x=@ave,y=@ave]One detail about using this function - you'll notice I defined the mask with a region in L,
The polygon definition is in XY and so of course it doesn't depend on the time direction. Why bother to give a time? (By the way any value of L would give exactly the result.) If I hadn't done that, then the variable "mask" would be 3D - defined on the XY grid and repeated for each value of T. This is no big deal with a short time axis like this, but if there were a long time axis, or a grid with even more dimensions, it's inefficient and would require more memory to load the same mask at each and every time point.
On 5/11/2015 11:20 PM, Nitin Patil wrote: