<div dir="ltr">Hi Mira,<div>First off, if you do not have a land/sea mask available for the dataset that you are analyzing, it would be best to use the built-in NCL function landsea_mask:</div><div><a href="https://www.ncl.ucar.edu/Document/Functions/Shea_util/landsea_mask.shtml">https://www.ncl.ucar.edu/Document/Functions/Shea_util/landsea_mask.shtml</a></div><div>There are numerous examples available on the bottom of that page.</div><div><br></div><div>For your averaging question: If you want to average over a rectangle and you are analyzing a rectilinear grid you can use wgt_areaave_Wrap:</div><div><a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/wgt_areaave_Wrap.shtml">https://www.ncl.ucar.edu/Document/Functions/Contributed/wgt_areaave_Wrap.shtml</a><br></div><div><br></div><div>You can use index or coordinate subscripting to specify your rectangle; see example #3 on that page for examples of both. If you do not know what coordinate subscripting is I strongly suggest you peruse the following links:</div><div><a href="https://www.ncl.ucar.edu/Document/Language/subscript_coord.shtml">https://www.ncl.ucar.edu/Document/Language/subscript_coord.shtml</a></div><div><a href="http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclVariables.shtml#Subscripts">http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclVariables.shtml#Subscripts</a></div><div><br></div><div>Finally, if you&#39;d like to chose a grid cell closest to a lat/lon point you can again use coordinate subscripting. An example:</div><div><br></div><div>; arr is a 3 dimensional array ordered time x latitude x longitude with coordinate variables time, lat, and lon</div><div>plat = 35.</div><div>plon = 15.</div><div>pt = arr(:, {plat},{plon})</div><div>printVarSummary(pt) </div><div><br></div><div>Finally: If you have not done so I would highly recommend you read through the mini-language manual here:</div><div><a href="http://www.ncl.ucar.edu/Document/Manuals/language_man.pdf">http://www.ncl.ucar.edu/Document/Manuals/language_man.pdf</a><br></div><div><br></div><div>Hope that helps. If not or if you have further questions please respond to the ncl-talk email list.</div><div>Adam</div><div><br></div><div>  </div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 27, 2015 at 12:30 PM,  <span dir="ltr">&lt;<a href="mailto:mberdahl@envsci.rutgers.edu" target="_blank">mberdahl@envsci.rutgers.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I have model output for the north atlantic/greenland region and I would<br>
like to take regional averages of precipitation.  I&#39;m wondering how to<br>
define the regions with NCL.  For example, I would like to take the<br>
average of precipitation over the Southeast of Greenland, this region<br>
would have to be a polygon defined by the user.  I would only like to<br>
consider grid cells on land as well.  Does anyone have any advice on this?<br>
<br>
Independent of this, I would like to be able to choose the grid cell<br>
closest to a lat/lon point that is user-defined.  Can someone point me in<br>
the right direction please?<br>
<br>
Thanks very much,<br>
Mira<br>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</div>