<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 12px; font-family: Helvetica, sans-serif;">
<div>
<div>
<div>Hello again,</div>
<div><br>
</div>
<div>Thank you both for the info, and I seem to have fixed that issue, but now it appears I am back to square 1. The error reads:</div>
<div>
<div>fatal:No coordinate variable exists for dimension (lat) in variable (ll_ind)</div>
</div>
<div><br>
</div>
<div>As always, full code is below the sig.</div>
<div><br>
</div>
<div>Thanks again,</div>
<div>Taylor M Hughlett, Ph.D.<br>
UTA Earth and Environmental Sciences<br>
500 Yates St.<br>
Geoscience Bldg Rm 117<br>
Arlington, TX 76013-0049</div>
</div>
</div>
<div><br>
</div>
<div>
<div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;</div>
<div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;</div>
<div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;</div>
<div><br>
</div>
<div>begin</div>
<div><br>
</div>
<div>;**************************************************</div>
<div>; Set file paths and plot specifics</div>
<div>;**************************************************</div>
<div><br>
</div>
<div>print(&quot;Setting File Paths&quot;)</div>
<div><br>
</div>
<div>;***** File Paths and Names *****</div>
<div><br>
</div>
<div>case &nbsp; &nbsp; &nbsp; = &quot;b.e12.B1850C5CN.f09_g16.YD13ka.003&quot;</div>
<div>filen &nbsp; &nbsp; &nbsp;= &quot;b.e12.B1850C5CN.f09_g16.YD13ka.003.pop.SFWF.1_cat_840.nc&quot;</div>
<div>file_loc &nbsp; = &quot;/glade/scratch/hughlett/csm/b.e12.B1850C5CN.f09_g16.YD13ka.003/ocn/tseries/cat/&quot;</div>
<div>grid &nbsp; &nbsp; &nbsp; = &quot;b.e12.B1850C5CN.f09_g16.YD13ka.003.pop.h.0810.nc&quot;</div>
<div>grid_loc &nbsp; = &quot;/glade/scratch/hughlett/csm/b.e12.B1850C5CN.f09_g16.YD13ka.003/ocn/hist/&quot;</div>
<div>plot_loc &nbsp; = &quot;/glade/scratch/hughlett/plots/b.e12.B1850C5CN.f09_g16.YD13ka.003/timeseries&quot;</div>
<div><br>
</div>
<div>;***** Variable to Plot *****</div>
<div><br>
</div>
<div>var &nbsp; &nbsp; &nbsp; &nbsp;= &quot;SFWF&quot;</div>
<div><br>
</div>
<div>;***** Text for Plot *****</div>
<div><br>
</div>
<div>CenterString = &quot;Surface Freshwater Flux&quot;</div>
<div>YAxisString &nbsp;= &quot;SFWF (Sverdrups)&quot;</div>
<div>XAxisString &nbsp;= &quot;Years&quot;</div>
<div><br>
</div>
<div>;***** Start and End Time for Plot *****</div>
<div><br>
</div>
<div>plot_begin = 0001</div>
<div>plot_end &nbsp; = 840</div>
<div><br>
</div>
<div>;***** Data Options (0 = no, 1 = yes) *****</div>
<div><br>
</div>
<div>smooth &nbsp;= 0</div>
<div>dtrd &nbsp; &nbsp;= 0</div>
<div>ncwrite = 0</div>
<div><br>
</div>
<div>;**************************************************</div>
<div>; Read In and Process Data</div>
<div>;**************************************************</div>
<div><br>
</div>
<div>print(&quot;Reading in and processing data&quot;)</div>
</div>
<div>
<div>;***** Read in All Variables *****</div>
<div><br>
</div>
<div>fvar &nbsp;= addfile(file_loc&#43;filen,&quot;r&quot;)</div>
<div>fgrid = addfile(grid_loc&#43;grid,&quot;r&quot;)</div>
<div><br>
</div>
<div>var0 &nbsp;= fvar-&gt;SFWF(:,:,:)</div>
<div>lat2d = fgrid-&gt;TLAT</div>
<div>lon2d = fgrid-&gt;TLONG</div>
<div>salt &nbsp;= fgrid-&gt;SALT</div>
<div><br>
</div>
<div>lat = 50</div>
<div>lon = 28</div>
<div><br>
</div>
<div><br>
</div>
<div>;***** Create a More Plottable Timeline *****</div>
<div><br>
</div>
<div>years = ispan(plot_begin,plot_end,1)</div>
<div>nyrs = dimsizes(years)</div>
<div><br>
</div>
<div>;***** Get indicies of the point to plot *****</div>
<div><br>
</div>
<div>ll_ind = getind_latlon2d( lat2d, lon2d, lat, lon)</div>
<div><br>
</div>
<div>ll_ind!0 = &quot;lat&quot;</div>
<div>ll_ind!1 = &quot;lon&quot;</div>
<div><br>
</div>
<div>copy_VarCoords_n(salt,ll_ind,(/2,3/))</div>
<div><br>
</div>
<div>;**************************************************</div>
<div>; Open workstation, set plot resources, and plot</div>
<div>;**************************************************</div>
<div><br>
</div>
<div>print(&quot;Creating Plot&quot;)</div>
<div><br>
</div>
<div>;***** Create Plot Name *****</div>
<div><br>
</div>
<div>pname = var &#43; &quot;.&quot; &#43; case &#43; &quot;_&quot; &#43; &quot;timeseries_0m&quot; &#43; plot_begin &#43; &quot;-&quot; &#43; plot_end</div>
<div><br>
</div>
<div>;***** Open workstation *****</div>
<div><br>
</div>
<div>wks = gsn_open_wks(&quot;ps&quot;,plot_loc&#43;pname)</div>
<div><br>
</div>
<div>;***** Set Resources *****</div>
<div><br>
</div>
<div>res &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= True</div>
<div>res@gsnMaximize &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= True</div>
<div>res@gsnFrame &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = False</div>
<div>res@gsnDraw &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= False</div>
<div>res@vpHeightF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= .23</div>
<div>res@vpWidthF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = .783</div>
<div>res@tiXAxisFontHeightF &nbsp; = .015</div>
<div>res@tiYAxisFontHeightF &nbsp; = .015</div>
<div>res@tmYLLabelFontHeightF = .015</div>
<div>res@tmXBLabelFontHeightF = .015</div>
<div>res@gsnLeftString &nbsp; &nbsp; &nbsp; &nbsp;= &quot; &quot;</div>
<div>res@gsnRightString &nbsp; &nbsp; &nbsp; = &quot; &quot;</div>
<div>res@xyLineColor &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= (/&quot;black&quot;/)</div>
</div>
<div>
<div>res@gsnCenterString &nbsp; &nbsp; &nbsp;= CenterString</div>
<div>res@tiYAxisString &nbsp; &nbsp; &nbsp; &nbsp;= YAxisString</div>
<div>res@tiXAxisString &nbsp; &nbsp; &nbsp; &nbsp;= XAxisString</div>
<div>res@trYMinF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 15</div>
<div>res@trYMaxF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 19</div>
<div><br>
</div>
<div>;***** Create New Plot *****</div>
<div><br>
</div>
<div>plot &nbsp; &nbsp; &nbsp;= new(1,graphic)</div>
<div>plot(0) &nbsp; = gsn_csm_xy (wks,years,var0(:,ll_ind&amp;lat,ll_ind&amp;lon),res)</div>
<div><br>
</div>
<div>print(&quot;Plot Created&quot;)</div>
<div><br>
</div>
<div>end</div>
</div>
<div><br>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Alan Brammer &lt;<a href="mailto:abrammer@albany.edu">abrammer@albany.edu</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Thursday, February 2, 2017 at 11:20 AM<br>
<span style="font-weight:bold">To: </span>&quot;Hughlett, Taylor M&quot; &lt;<a href="mailto:taylor.hughlett@uta.edu">taylor.hughlett@uta.edu</a>&gt;<br>
<span style="font-weight:bold">Cc: </span>&quot;<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&quot; &lt;<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>Re: [ncl-talk] Dimension (nlon) of (var0) does not have an associated coordinate variable<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Yeah, Guido is right. &nbsp;
<div class=""><br class="">
</div>
<div class="">I didn’t test the code I wrote. &nbsp;Do a printVarSummary(ll_ind) and read the docs and you’ll see&nbsp;<span style="font-family: Helvetica, sans-serif;" class="">getind_latlon2d always returns a 2-d array. &nbsp;</span></div>
<div class=""><font face="Helvetica,sans-serif" class=""><br class="">
</font></div>
<div class=""><font face="Helvetica,sans-serif" class="">for a&nbsp;single point it should be (0,0) and (0,1) for lat | &nbsp;lon indices. &nbsp;Examples in the docs show you how to double check that it is all working as desired. &nbsp;</font></div>
<div class=""><font face="Helvetica,sans-serif" class=""><br class="">
</font></div>
<div class=""><font face="Helvetica,sans-serif" class=""><br class="">
</font></div>
<div class=""><font face="Helvetica,sans-serif" class="">Alan.</font></div>
<div class=""><font face="Helvetica,sans-serif" class=""><br class="">
</font></div>
<div class=""><font face="Helvetica,sans-serif" class=""><br class="">
</font>
<div>
<blockquote type="cite" class="">
<div class="">On 2 Feb 2017, at 12:17, Guido Cioni &lt;<a href="mailto:guidocioni@gmail.com" class="">guidocioni@gmail.com</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
I'm pretty sure NCL is referring to <font face="Menlo" class="">ll_ind</font>, which is 2-Dimensional :) &nbsp;(see&nbsp;<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>).<br class="">
<div class="">
<div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; 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;" class="">
<br class="Apple-interchange-newline">
Guido Cioni</div>
<div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; 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;" class="">
<a href="http://guidocioni.altervista/" class="">http://guidocioni.altervista</a>.org</div>
</div>
<br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On 02 Feb 2017, at 18:14, Hughlett, Taylor M &lt;<a href="mailto:taylor.hughlett@uta.edu" class="">taylor.hughlett@uta.edu</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 12px; font-family: Helvetica, sans-serif;" class="">
<div class="">
<div class="">Good afternoon,</div>
<div class=""><br class="">
</div>
<div class="">Thank you very much for the suggestion! I have used the function that you recommended, but now I am receiving the following error:</div>
<div class=""><br class="">
</div>
<div class="">Number of subscripts do not match number of dimensions of variable,(1) Subscripts used, (2) Subscripts expected</div>
<div class=""><br class="">
</div>
<div class="">It occurs at the line where I actually create the plot:</div>
<div class=""><br class="">
</div>
<div class="">plot(0) &nbsp; = gsn_csm_xy (wks,years,var0(:,ll_ind(0),ll_ind(1)),res)</div>
<div class=""><br class="">
</div>
<div class="">I have checked that var0 is three dimensional, and I have specified three subscripts required…</div>
<div class=""><br class="">
</div>
<div class="">Have I missed something?</div>
<div class=""><br class="">
</div>
<div class="">Taylor M Hughlett, Ph.D.<br class="">
UTA Earth and Environmental Sciences<br class="">
500 Yates St.<br class="">
Geoscience Bldg Rm 117<br class="">
Arlington, TX 76013-0049</div>
</div>
<div class=""><br class="">
</div>
<div class="">The Full Code:</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;</div>
<div class="">load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;</div>
<div class="">load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;</div>
<div class=""><br class="">
</div>
<div class="">begin</div>
<div class=""><br class="">
</div>
<div class="">;**************************************************</div>
<div class="">; Set file paths and plot specifics</div>
<div class="">;**************************************************</div>
<div class=""><br class="">
</div>
<div class="">print(&quot;Setting File Paths&quot;)</div>
<div class=""><br class="">
</div>
<div class="">;***** File Paths and Names *****</div>
<div class=""><br class="">
</div>
<div class="">case &nbsp; &nbsp; &nbsp; = &quot;b.e12.B1850C5CN.f09_g16.YD13ka.003&quot;</div>
<div class="">filen &nbsp; &nbsp; &nbsp;= &quot;b.e12.B1850C5CN.f09_g16.YD13ka.003.pop.SFWF.1_cat_840.nc&quot;</div>
<div class="">file_loc &nbsp; = &quot;/glade/scratch/hughlett/csm/b.e12.B1850C5CN.f09_g16.YD13ka.003/ocn/tseries/cat/&quot;</div>
<div class="">grid &nbsp; &nbsp; &nbsp; = &quot;b.e12.B1850C5CN.f09_g16.YD13ka.003.pop.h.0810.nc&quot;</div>
<div class="">grid_loc &nbsp; = &quot;/glade/scratch/hughlett/csm/b.e12.B1850C5CN.f09_g16.YD13ka.003/ocn/hist/&quot;</div>
<div class="">plot_loc &nbsp; = &quot;/glade/scratch/hughlett/plots/b.e12.B1850C5CN.f09_g16.YD13ka.003/timeseries&quot;</div>
<div class=""><br class="">
</div>
<div class="">;***** Variable to Plot *****</div>
<div class=""><br class="">
</div>
<div class="">var &nbsp; &nbsp; &nbsp; &nbsp;= &quot;SFWF&quot;</div>
<div class=""><br class="">
</div>
<div class="">;***** Text for Plot *****</div>
<div class=""><br class="">
</div>
<div class="">CenterString = &quot;Surface Freshwater Flux&quot;</div>
<div class="">YAxisString &nbsp;= &quot;SFWF (Sverdrups)&quot;</div>
<div class="">XAxisString &nbsp;= &quot;Years&quot;</div>
<div class=""><br class="">
</div>
<div class="">;***** Start and End Time for Plot *****</div>
<div class=""><br class="">
</div>
<div class="">plot_begin = 0001</div>
<div class="">plot_end &nbsp; = 840</div>
<div class=""><br class="">
</div>
<div class="">;***** Data Options (0 = no, 1 = yes) *****</div>
<div class=""><br class="">
</div>
<div class="">smooth &nbsp;= 0</div>
<div class="">dtrd &nbsp; &nbsp;= 0</div>
<div class="">ncwrite = 0</div>
<div class=""><br class="">
</div>
<div class="">;**************************************************</div>
<div class="">; Read In and Process Data</div>
<div class="">;**************************************************</div>
<div class=""><br class="">
</div>
<div class="">print(&quot;Reading in and processing data&quot;)</div>
</div>
<div class="">
<div class="">;***** Read in All Variables *****</div>
<div class=""><br class="">
</div>
<div class="">fvar &nbsp;= addfile(file_loc&#43;filen,&quot;r&quot;)</div>
<div class="">fgrid = addfile(grid_loc&#43;grid,&quot;r&quot;)</div>
<div class=""><br class="">
</div>
<div class="">var0 &nbsp;= fvar-&gt;SFWF(:,:,:)</div>
<div class="">lat2d = fgrid-&gt;TLAT</div>
<div class="">lon2d = fgrid-&gt;TLONG</div>
<div class=""><br class="">
</div>
<div class="">lat = 50</div>
<div class="">lon = 28</div>
<div class=""><br class="">
</div>
<div class="">;***** Create a More Plottable Timeline *****</div>
<div class=""><br class="">
</div>
<div class="">years = ispan(plot_begin,plot_end,1)</div>
<div class="">nyrs = dimsizes(years)</div>
<div class=""><br class="">
</div>
<div class="">;***** Get indicies of the point to plot *****</div>
<div class=""><br class="">
</div>
<div class="">ll_ind = getind_latlon2d( lat2d, lon2d, lat, lon)</div>
<div class=""><br class="">
</div>
<div class="">;**************************************************</div>
<div class="">; Open workstation, set plot resources, and plot</div>
<div class="">;**************************************************</div>
<div class=""><br class="">
</div>
<div class="">print(&quot;Creating Plot&quot;)</div>
<div class=""><br class="">
</div>
<div class="">;***** Create Plot Name *****</div>
<div class=""><br class="">
</div>
<div class="">pname = var &#43; &quot;.&quot; &#43; case &#43; &quot;_&quot; &#43; &quot;timeseries_0m&quot; &#43; plot_begin &#43; &quot;-&quot; &#43; plot_end</div>
<div class=""><br class="">
</div>
<div class="">;***** Open workstation *****</div>
<div class=""><br class="">
</div>
<div class="">wks = gsn_open_wks(&quot;ps&quot;,plot_loc&#43;pname)</div>
<div class=""><br class="">
</div>
<div class="">;***** Set Resources *****</div>
<div class=""><br class="">
</div>
<div class="">res &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= True</div>
<div class="">res@gsnMaximize &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= True</div>
<div class="">res@gsnFrame &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = False</div>
<div class="">res@gsnDraw &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= False</div>
<div class="">res@vpHeightF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= .23</div>
<div class="">res@vpWidthF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = .783</div>
<div class="">res@tiXAxisFontHeightF &nbsp; = .015</div>
<div class="">res@tiYAxisFontHeightF &nbsp; = .015</div>
<div class="">res@tmYLLabelFontHeightF = .015</div>
<div class="">res@tmXBLabelFontHeightF = .015</div>
<div class="">res@gsnLeftString &nbsp; &nbsp; &nbsp; &nbsp;= &quot; &quot;</div>
<div class="">res@gsnRightString &nbsp; &nbsp; &nbsp; = &quot; &quot;</div>
<div class="">res@xyLineColor &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= (/&quot;black&quot;/)</div>
<div class="">res@gsnCenterString &nbsp; &nbsp; &nbsp;= CenterString</div>
<div class="">res@tiYAxisString &nbsp; &nbsp; &nbsp; &nbsp;= YAxisString</div>
<div class="">res@tiXAxisString &nbsp; &nbsp; &nbsp; &nbsp;= XAxisString</div>
<div class="">res@trYMinF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 15</div>
<div class="">res@trYMaxF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 19</div>
<div class=""><br class="">
</div>
<div class="">;***** Create New Plot *****</div>
</div>
<div class="">
<div class=""><br class="">
</div>
<div class="">plot &nbsp; &nbsp; &nbsp;= new(1,graphic)</div>
<div class="">plot(0) &nbsp; = gsn_csm_xy (wks,years,var0(:,ll_ind(0),ll_ind(1)),res)</div>
<div class=""><br class="">
</div>
<div class="">print(&quot;Plot Created&quot;)</div>
<div class=""><br class="">
</div>
<div class="">end</div>
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<span id="OLK_SRC_BODY_SECTION" class="">
<div style="font-family: Calibri; font-size: 11pt; text-align: left; border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0in 0in; border-top-color: rgb(181, 196, 223);" class="">
<span style="font-weight:bold" class="">From: </span>Alan Brammer &lt;<a href="mailto:abrammer@albany.edu" class="">abrammer@albany.edu</a>&gt;<br class="">
<span style="font-weight:bold" class="">Date: </span>Wednesday, February 1, 2017 at 2:15 PM<br class="">
<span style="font-weight:bold" class="">To: </span>&quot;Hughlett, Taylor M&quot; &lt;<a href="mailto:taylor.hughlett@uta.edu" class="">taylor.hughlett@uta.edu</a>&gt;<br class="">
<span style="font-weight:bold" class="">Cc: </span>&quot;<a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a>&quot; &lt;<a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a>&gt;<br class="">
<span style="font-weight:bold" class="">Subject: </span>Re: [ncl-talk] Dimension (nlon) of (var0) does not have an associated coordinate variable<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
&nbsp;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 =&nbsp;</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.&nbsp;</div>
<div class=""><font face="Helvetica,sans-serif" class="">&nbsp; &nbsp; ; LON2D &nbsp;= lon2d(::1,::1) &nbsp; &nbsp; &nbsp; &nbsp;;; I don’t think (::1,::1) does anything,&nbsp;</font><span style="font-family: Helvetica, sans-serif;" class="">&nbsp;it will take all values with an increment of 1, i.e.&nbsp;the&nbsp;whole&nbsp;array.&nbsp;</span></div>
<div class="">
<div class="" style="font-family: Helvetica, sans-serif;">&nbsp; &nbsp; ; LAT2D &nbsp;= lat2d(::1,::1)<span class="Apple-tab-span" style="white-space:pre"></span>&nbsp; &nbsp;; &nbsp; so this is just redundant characters which aren’t needed.&nbsp;</div>
</div>
<div class="">You don’t need to replicate a variable that already exists.&nbsp;</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 &amp; syntax not the @ syntax, but coordinate subscripting won’t work with 2d coordinates anyway.&nbsp;</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 =&nbsp;getind_latlon2d( lat2d, lon2d,&nbsp;</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="">…&nbsp;</font></div>
<div class=""><span style="font-family: Helvetica, sans-serif;" class="">plot(0) &nbsp; = 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,&nbsp;</div>
<div class=""><br class="">
</div>
<div class="">Alan</div>
<div class=""><br class="">
</div>
<br class="">
<div class="">
<div style="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="font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-position: normal; font-variant-caps: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: 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; border-spacing: 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&nbsp;Environmental Sciences,<br class="">
University at Albany,&nbsp;State University of New&nbsp;York,&nbsp;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>
</div>
</div>
</span></div>
_______________________________________________<br class="">
ncl-talk mailing list<br class="">
<a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">
List instructions, subscriber options, unsubscribe:<br class="">
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</span>
</body>
</html>