<html><head></head><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1515573291997_5351">Dear Rick,</div><div id="yui_3_16_0_ym19_1_1515573291997_5572" dir="ltr">as I said the reference lines I would like to plot are vertical: I set some values of x. <br></div><div id="yui_3_16_0_ym19_1_1515573291997_5573" dir="ltr">But as you noted, it is quit confusing because I used <span id="yui_3_16_0_ym19_1_1515573291997_5672">gsnXRefLine but in the error description NCL is using </span><span id="yui_3_16_0_ym19_1_1515573291997_5673">gsnYRefLine!!!</span></div><div id="yui_3_16_0_ym19_1_1515573291997_5739" dir="ltr"><span id="yui_3_16_0_ym19_1_1515573291997_6079">Concerning the dimensions, it is true that the leftmost dimension length is 3 but this is to have 3 different lines (actually each line represents one single latitude). The x-axis being the time, what I would like is to set 2 specific time values. And this is something which was possible in my previous scripts by affecting these values to </span><span id="yui_3_16_0_ym19_1_1515573291997_6080">gsnXRefLine. When I set res1@gsnXRefLine=(/SJ_10,SJ_15/) I have a 1D array of length 2 that was allowing me to have these 2 vertical lines. <br></span></div><div id="yui_3_16_0_ym19_1_1515573291997_6355" dir="ltr"><span id="yui_3_16_0_ym19_1_1515573291997_6385">So what I think it is that NCL is interpreting my </span><span id="yui_3_16_0_ym19_1_1515573291997_6390">gsnXRefLine as </span><span id="yui_3_16_0_ym19_1_1515573291997_6391">gsnYRefLine. If it is so, could you suggest me any solution.</span></div><div id="yui_3_16_0_ym19_1_1515573291997_6644" dir="ltr"><br><span id="yui_3_16_0_ym19_1_1515573291997_6391"></span></div><div id="yui_3_16_0_ym19_1_1515573291997_6677" dir="ltr"><span id="yui_3_16_0_ym19_1_1515573291997_6391">Kindest regards<br></span></div><div id="yui_3_16_0_ym19_1_1515573291997_6442" dir="ltr"><br><span id="yui_3_16_0_ym19_1_1515573291997_6391"></span></div><div id="yui_3_16_0_ym19_1_1515573291997_6633" dir="ltr"><span id="yui_3_16_0_ym19_1_1515573291997_6391">PS: I am attaching the data, the txt file(which was missing) and the code itself. To that I add a plot that I did by the past(and which was working perfectly) to explain you what is the expected result.<br></span></div><div id="yui_3_16_0_ym19_1_1515573291997_5284"><span></span></div><div id="yui_3_16_0_ym19_1_1515573291997_5579"> </div><div id="yui_3_16_0_ym19_1_1515573291997_5580" class="signature">-----------------------------<br>GUIGMA</div> <div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: verdana, helvetica, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> On Tuesday, 9 January 2018, 14:58, Rick Brownrigg <brownrig@ucar.edu> wrote:<br></font></div>  <br><br> <div class="y_msg_container"><div id="yiv2000427597"><div><div dir="ltr"><div><div><div><div>Hi,<br clear="none"><br clear="none"></div>I was unable to run your script because it depends upon an ascii file that was not included. I'm also a bit confused about whether its gsn<span style="color:rgb(255,0,0);">Y</span>RefLine or gsn<span style="color:rgb(255,0,0);">X</span>RefLine at issue, as only the later is referenced in your script. Assuming its the later, it is not actually a scalar, but a 1D array of length 2. It needs to be of the same size as the left-most dimensions of your data arrays: x_regrid_SJ_xy&time, x_regrid_SJ_xy.<br clear="none"><br clear="none"></div>Given these lines below, I would surmise the data's leftmost dimension is of length 3 -- try using printVarSummary on those variables to verify:<br clear="none"><br clear="none">; xy plot<br clear="none">x_regrid_SJ_xy=x_regrid_SJ({<span style="color:rgb(255,0,0);">5:15:5}</span>,:)<br clear="none"><br clear="none">res1 = True                      ; plot mods desired<br clear="none">res1@tiMainString = "lat-plot "+tostring(year)  <br clear="none">res1@xyLineThicknesses = (/<span style="color:rgb(255,0,0);">1.0,1.0,1.0/</span>)         <br clear="none">res1@xyLineColors      = (/"<span style="color:rgb(255,0,0);">blue","green","red"</span>/)          ; change line color<br clear="none"><br clear="none"></div>Hope that helps...<br clear="none"></div>Rick<br clear="none"></div><div class="yiv2000427597gmail_extra"><br clear="none"><div class="yiv2000427597gmail_quote">On Tue, Jan 9, 2018 at 4:16 AM, Kiswendsida Hyacinthe GUIGMA via ncl-talk <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>></span> wrote:<br clear="none"><blockquote class="yiv2000427597gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv2000427597yqt7756562387" id="yiv2000427597yqt63822"><div><div style="color:#000;background-color:#fff;font-family:verdana, helvetica, sans-serif;font-size:16px;"><div id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3034"><span id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3070">Hello dear NCL users,</span></div><div dir="ltr" id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3050"><span id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3058">I am running a NCL script and I am facing a error that I don't understand at all. Actually the script was working perfectly and then it stopped for a reason I ignore. </span></div><div dir="ltr" id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3133"><span id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3058">Actually I am doing a simple xy-plot (with the gsn_csm_xy) and I want to add two reference lines (vertically). But I got the following error:</span></div><div dir="ltr" id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4832"><span id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3058">" ref_line_interp: error: gsnYRefLine must be a scalar or an array of length ncurves". However when I print res@gsnXRefLine it gives me this: <br clear="none"></span></div><div dir="ltr" id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4934"><span id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3058">(0)     42179<br id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4939" clear="none">(1)     42197</span></div><div dir="ltr" id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4969"><span id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3058">which proves that they are scalars.</span></div><div dir="ltr" id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4970"><span id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3058">Can anyone please help me?</span></div><div dir="ltr" id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4971"><span id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3058">Please have a look at my code. <br clear="none"></span></div><div dir="ltr" id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4972"><br clear="none"><span id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3058"></span></div><div dir="ltr" id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4973"><span id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3058">I'd just like to mention that I have upgraded my NCL from  version 6.0.0 to 6.4.0. Could that be the problem?<br clear="none"></span></div><div id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3049"><div id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4996"> </div><div id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_5079">Thank you in advance. <br clear="none"></div><div id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_5008"><br clear="none"></div></div><div class="yiv2000427597m_-2011562530845677968signature" id="yiv2000427597m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3114">-----------------------------<br clear="none">GUIGMA</div></div></div></div><br clear="none">______________________________ _________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/ mailman/listinfo/ncl-talk</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div><br><br></div>  </div> </div>  </div></div></body></html>