<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Alan,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I couldn't find the particular line you are referring to. I also grepped for "ref_line" and then "0" and don't see a reference to setting ref_line to 0.  I do, however, believe this might have been a bug in an older version of NCL.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Are you sure this is NCL V6.4.0 where you saw the issue? Here's how I did the grep:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="">







<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace" style=""> % grep ref_line $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl | grep "0"</font></span></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace" style=""><br></font></span></p>and here are the results that came up:</div><div class="gmail_default" style=""><br><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">      </span>ygrtr(i,0:ngrtr(i)-5:5)<span class="gmail-Apple-converted-space">  </span>= ref_lines(i)</font></span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">      </span>yless(i,0:nless(i)-5:5) = ref_lines(i)</font></span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">      </span>yequal(i,0:nequal(i)-1:5) = ref_lines(i)</font></span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace">;;<span class="gmail-Apple-converted-space">    </span>return(conform_dims((/nref,4/),ref_line_color(0,:),1))</font></span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">    </span>ref_line_pattern := rfres@$pattern_res1$(0)</font></span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">    </span>ref_line_pattern = 0</font></span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">    </span>ref_line_pattern := 0</font></span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">    </span>ref_line_thickness = rfres@$thickness_res1$(0)</font></span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">    </span>ref_line_thickness = 1.0</font></span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">    </span>ref_line_thickness := 1.0</font></span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">      </span>ref_line_pattern <span class="gmail-Apple-converted-space">  </span>:= 0</font></span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">      </span>ref_line <span class="gmail-Apple-converted-space">          </span>:= get_res_value_keep(rfres,"gsn" + str_upper(reftype)+"RefLine",0)</font></span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">  </span>ref_line<span class="gmail-Apple-converted-space">    </span>:= get_res_value_keep(rfres,"gsn" + str_upper(reftype)+"RefLine",0)</font></span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"><span class="gmail-Apple-converted-space">      </span>yref_line = yref_line_list[0]</font></span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace" style=""><span class="gmail-Apple-converted-space" style="">      </span>xref_line = xref_line_list[0]</font></span></p><br>Can you type this on your end and see if you get something different?</div><div class="gmail_default" style=""><br></div><div class="gmail_default" style=""><br>Thanks,<br><br>--Mary<p class="gmail-p1" style="font-size:18px;margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:Monaco;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 16, 2018 at 8:34 AM, Alan Brammer 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 dir="ltr"><div style="font-family:verdana,sans-serif">NCL devs:</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">Came across a bug in 6.4.0 when plotting a bar chart through gsn_csm_xy() that stems to a call to get_ref_line_options()</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">at line 4588 in gsn_csm.ncl a variable is initialised as</div><div><span style="font-family:verdana,sans-serif">      </span><font face="monospace, monospace">ref_line = 0 ; </font><font face="arial, helvetica, sans-serif">setting ref_line to be an integer</font></div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">but then a couple lines down on line 4607  there is:</div><div><font face="monospace, monospace">    ref_line = get_res_value_keep(rfres,"<wbr>trYMinF",min(y))</font></div><div><span style="font-family:verdana,sans-serif">but unless </span><font face="monospace, monospace">y</font><font face="verdana, sans-serif"> or </font><font face="monospace, monospace">trYMinF</font><font face="verdana, sans-serif"> are integers this will fail with an Assignment Type mismatch. </font></div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">Easy fix is to replace = with := on line 4607 in gsn_csm.ncl  (line 23 of get_ref_line_options)</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">Function doesn't appear to exist in versions before 6.4.0 so seems like a new problem. </div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">Thanks,</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">Alan</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></div>