<div dir="auto">Fixed.<div dir="auto"><br></div><div dir="auto"><span style="font-family:sans-serif;font-size:12.8px">loc2 = wrf_user_xy_to_ll(a,loc(0),</span><span style="font-family:sans-serif;font-size:12.8px">loc(1),True)</span><br><br><div data-smartmail="gmail_signature" dir="auto">Borja Sas González</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El vie., 9 ago. 2019 16:49, Borja Sas González <<a href="mailto:saszalez@gmail.com">saszalez@gmail.com</a>> escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">Does anyone know any way to pass the x again, and return the corresponding lon/lat coordinate?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El jue., 8 ago. 2019 a las 9:22, Borja Sas González (<<a href="mailto:saszalez@gmail.com" target="_blank" rel="noreferrer">saszalez@gmail.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">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?</div><div dir="ltr"><br></div><div dir="ltr">begin<br><br></div><div dir="ltr"> a = addfile("/path/to/nc/<a href="http://file.nc" target="_blank" rel="noreferrer">file.nc</a>","r")<br><br> lat = 28.290147<br> lon = -16.377643<br><br> res = True<br> res@returnInt = False ; return real values<br> loc = wrf_user_ll_to_xy(a, lon, lat, res)<br> print(loc)<br><br> loc2 = wrf_user_xy_to_ll(a, loc, loc, res)<br> print(loc2)<br><br>end<div><br></div>-- <br><div dir="ltr" class="m_7059426298093381341gmail-m_6820267684239788443gmail_signature">Borja Sas González</div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_7059426298093381341gmail_signature">Borja Sas González</div>
</blockquote></div>