[ncl-talk] See nearest latitude-longitude

Borja Sas González saszalez at gmail.com
Fri Aug 9 09:49:04 MDT 2019


Does anyone know any way to pass the x again, and return the corresponding
lon/lat coordinate?

El jue., 8 ago. 2019 a las 9:22, Borja Sas González (<saszalez at gmail.com>)
escribió:

> I am trying to see what is the closest point to an established latitude
> and longitude. I need to see the nearest point in latitude, longitude.
> First I convert the data to xy and then convert it back to lon-lat, but I
> can't refine the script since right now it returns 4 coordinates. How can I
> do better?
>
> begin
>
>   a = addfile("/path/to/nc/file.nc","r")
>
>   lat = 28.290147
>   lon = -16.377643
>
>   res = True
>   res at returnInt = False ; return real values
>   loc = wrf_user_ll_to_xy(a, lon, lat, res)
>   print(loc)
>
>   loc2 = wrf_user_xy_to_ll(a, loc, loc, res)
>   print(loc2)
>
> end
>
> --
> Borja Sas González
>


-- 
Borja Sas González
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190809/1ffde71a/attachment.html>


More information about the ncl-talk mailing list