[ncl-talk] "bug" in get_ref_line_options v6.4.0

Mary Haley haley at ucar.edu
Tue Jan 16 13:27:41 MST 2018


Hi Alan,

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.

Are you sure this is NCL V6.4.0 where you saw the issue? Here's how I did
the grep:

 % grep ref_line $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl | grep "0"


and here are the results that came up:

      ygrtr(i,0:ngrtr(i)-5:5)  = ref_lines(i)

      yless(i,0:nless(i)-5:5) = ref_lines(i)

      yequal(i,0:nequal(i)-1:5) = ref_lines(i)

;;    return(conform_dims((/nref,4/),ref_line_color(0,:),1))

    ref_line_pattern := rfres@$pattern_res1$(0)

    ref_line_pattern = 0

    ref_line_pattern := 0

    ref_line_thickness = rfres@$thickness_res1$(0)

    ref_line_thickness = 1.0

    ref_line_thickness := 1.0

      ref_line_pattern   := 0

      ref_line           := get_res_value_keep(rfres,"gsn" +
str_upper(reftype)+"RefLine",0)

  ref_line    := get_res_value_keep(rfres,"gsn" +
str_upper(reftype)+"RefLine",0)

      yref_line = yref_line_list[0]

      xref_line = xref_line_list[0]

Can you type this on your end and see if you get something different?


Thanks,

--Mary



On Tue, Jan 16, 2018 at 8:34 AM, Alan Brammer via ncl-talk <
ncl-talk at ucar.edu> wrote:

> NCL devs:
>
> 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()
>
> at line 4588 in gsn_csm.ncl a variable is initialised as
>       ref_line = 0 ; setting ref_line to be an integer
>
> but then a couple lines down on line 4607  there is:
>     ref_line = get_res_value_keep(rfres,"trYMinF",min(y))
> but unless y or trYMinF are integers this will fail with an Assignment
> Type mismatch.
>
>
> Easy fix is to replace = with := on line 4607 in gsn_csm.ncl  (line 23
> of get_ref_line_options)
>
> Function doesn't appear to exist in versions before 6.4.0 so seems like a
> new problem.
>
>
> Thanks,
>
> Alan
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180116/5d21d033/attachment.html>


More information about the ncl-talk mailing list