<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""> If you were plotting a map, like Barry Lynn's similar question today also on ncl-talk, you would want to do:<div class=""><br class=""></div><div class=""><span style="font-family: Helvetica, sans-serif;" class="">var0@lon2d = </span><span style="font-family: Helvetica, sans-serif;" class="">lon2d</span><div class="" style="font-family: Helvetica, sans-serif;">var0@lat2d = lat2d</div></div><div class="" style="font-family: Helvetica, sans-serif;"><br class=""></div><div class="" style="font-family: Helvetica, sans-serif;">The below lines are not needed. </div><div class=""><font face="Helvetica, sans-serif" class=""> ; LON2D = lon2d(::1,::1) ;; I don’t think (::1,::1) does anything, </font><span style="font-family: Helvetica, sans-serif;" class=""> it will take all values with an increment of 1, i.e. the whole array. </span></div><div class=""><div class="" style="font-family: Helvetica, sans-serif;"> ; LAT2D = lat2d(::1,::1)<span class="Apple-tab-span" style="white-space:pre">        </span> ; so this is just redundant characters which aren’t needed. </div></div><div class="">You don’t need to replicate a variable that already exists. </div><div class=""><br class=""></div><div class=""><div class="" style="font-family: Helvetica, sans-serif;">To set coordinate variables named nlon and nlat, you want to use the & syntax not the @ syntax, but coordinate subscripting won’t work with 2d coordinates anyway. </div><div class="" style="font-family: Helvetica, sans-serif;"><br class=""></div><div class="" style="font-family: Helvetica, sans-serif;">So instead get the index of the point you want using:</div><div class=""><font face="Helvetica, sans-serif" class=""><a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/getind_latlon2d.shtml" class="">https://www.ncl.ucar.edu/Document/Functions/Contributed/getind_latlon2d.shtml</a></font></div><div class="">e.g.</div><div class=""><br class=""></div><div class=""><font face="Helvetica, sans-serif" class="">ll_ind = getind_latlon2d( lat2d, lon2d, </font><span style="font-family: Helvetica, sans-serif;" class="">28,50)</span></div><div class=""><font face="Helvetica, sans-serif" class="">…</font></div><div class=""><font face="Helvetica, sans-serif" class="">… </font></div><div class=""><span style="font-family: Helvetica, sans-serif;" class="">plot(0) = gsn_csm_xy (wks, years, var0(:, ll_ind(0), ll_ind(1) ), res)</span></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Good luck, </div><div class=""><br class=""></div><div class="">Alan</div><div class=""><br class=""></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">##############################<br class="">Alan Brammer,<div class="">Post-Doc Researcher</div><div class=""><br class=""></div><div class="">Department of Atmospheric and Environmental Sciences,<br class="">University at Albany, State University of New York, Albany, NY, 12222<div class=""><a href="mailto:abrammer@albany.edu" class="">abrammer@albany.edu</a><br class="">##############################</div></div></div></span></div></div></div></div></body></html>