<div dir="ltr"><div><div><div><div>Hi,<br><br></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><br></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><br>; xy plot<br>x_regrid_SJ_xy=x_regrid_SJ({<span style="color:rgb(255,0,0)">5:15:5}</span>,:)<br><br>res1 = True ; plot mods desired<br>res1@tiMainString = "lat-plot "+tostring(year) <br>res1@xyLineThicknesses = (/<span style="color:rgb(255,0,0)">1.0,1.0,1.0/</span>) <br>res1@xyLineColors = (/"<span style="color:rgb(255,0,0)">blue","green","red"</span>/) ; change line color<br><br></div>Hope that helps...<br></div>Rick<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 9, 2018 at 4:16 AM, Kiswendsida Hyacinthe GUIGMA via ncl-talk <span dir="ltr"><<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:verdana,helvetica,sans-serif;font-size:16px"><div id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3034"><span id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3070">Hello dear NCL users,</span></div><div dir="ltr" id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3050"><span id="m_-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 id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3133" dir="ltr"><span id="m_-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 id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4832" dir="ltr"><span id="m_-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></span></div><div id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4934" dir="ltr"><span id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3058">(0) 42179<br id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4939">(1) 42197</span></div><div id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4969" dir="ltr"><span id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3058">which proves that they are scalars.</span></div><div id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4970" dir="ltr"><span id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3058">Can anyone please help me?</span></div><div id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4971" dir="ltr"><span id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3058">Please have a look at my code. <br></span></div><div id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4972" dir="ltr"><br><span id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3058"></span></div><div id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4973" dir="ltr"><span id="m_-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></span></div><div id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3049"><div id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_4996"> </div><div id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_5079">Thank you in advance. <br></div><div id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_5008"><br></div></div><div id="m_-2011562530845677968yui_3_16_0_ym19_1_1515495507640_3114" class="m_-2011562530845677968signature">-----------------------------<br>GUIGMA</div></div></div><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>