[ncl-talk] See nearest latitude-longitude
Borja Sas González
saszalez at gmail.com
Fri Aug 9 10:09:29 MDT 2019
Fixed.
loc2 = wrf_user_xy_to_ll(a,loc(0),loc(1),True)
Borja Sas González
El vie., 9 ago. 2019 16:49, Borja Sas González <saszalez at gmail.com>
escribió:
> 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/8f9ebfeb/attachment.html>
More information about the ncl-talk
mailing list