[ncl-talk] Find the nearest 9 points of a station

Yun Yue yunyue at huskers.unl.edu
Mon May 11 15:32:29 MDT 2015


Hi Dennis,

I need the index values of the closest 9 single pixels.

Your codes are very helpful.

Thanks very much Dennis.

Yun


________________________________
From: Dennis Shea <shea at ucar.edu>
Sent: Monday, May 11, 2015 16:26
To: Yun Yue
Cc: ncl-talk at ucar.edu
Subject: Re: [ncl-talk] Find the nearest 9 points of a station

The index values of the closest single ?swath or grid? pt is given by:

http://www.ncl.ucar.edu/Document/Functions/Contributed/getind_latlon2d.shtml

====================

Attached is a slightly mangled function which I modified for your purpose...
It is UNTESTED . Look at the code. Fix if necessary.



On Mon, May 11, 2015 at 1:05 PM, Yun Yue <yunyue at huskers.unl.edu<mailto:yunyue at huskers.unl.edu>> wrote:

Hi  NCL users,

Say I have a station's lat and lon, I also have MODIS data. In order to find the nearest 9 pixels' index to this station, I could calculate distance between every pixel and the station, then find the nearest 9 pixels.

Is there any NCL function to find 9 pixels' index in a faster way?

Thank you very much.

Yun

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150511/1182930b/attachment.html 


More information about the ncl-talk mailing list