<div dir="ltr"><div><div><div>The index values of the closest single ?swath or grid? pt is given by:<br><br><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/getind_latlon2d.shtml">http://www.ncl.ucar.edu/Document/Functions/Contributed/getind_latlon2d.shtml</a><br><br></div>====================<br><br></div><div>Attached is a slightly mangled function which I modified for your purpose... <br></div><div>It is UNTESTED . Look at the code. Fix if necessary.<br><br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 11, 2015 at 1:05 PM, Yun Yue <span dir="ltr">&lt;<a href="mailto:yunyue@huskers.unl.edu" target="_blank">yunyue@huskers.unl.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi  NCL users,<br>
</p>
<p>Say I have a station&#39;s lat and lon, I also have MODIS data. In order to find the nearest 9 pixels&#39; index to this station, I could calculate distance between every pixel and the station, then find the nearest 9 pixels.<br>
</p>
<p>Is there any NCL function to find 9 pixels&#39; index in a faster way?<br>
</p>
<p>Thank you very much.<span class="HOEnZb"><font color="#888888"><br>
</font></span></p><span class="HOEnZb"><font color="#888888">
<p>Yun<br>
</p>
</font></span></div>
</div>

<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>