[ncl-talk] See nearest latitude-longitude

Borja Sas González saszalez at gmail.com
Thu Aug 8 02:22:59 MDT 2019


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190808/91121e49/attachment.html>


More information about the ncl-talk mailing list