[ncl-talk] Ref line problem

Rick Brownrigg brownrig at ucar.edu
Tue Jan 9 07:58:55 MST 2018


Hi,

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 gsnYRefLine or
gsnXRefLine 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.

Given these lines below, I would surmise the data's leftmost dimension is
of length 3 -- try using printVarSummary on those variables to verify:

; xy plot
x_regrid_SJ_xy=x_regrid_SJ({5:15:5},:)

res1 = True                      ; plot mods desired
res1 at tiMainString = "lat-plot "+tostring(year)
res1 at xyLineThicknesses = (/1.0,1.0,1.0/)
res1 at xyLineColors      = (/"blue","green","red"/)          ; change line
color

Hope that helps...
Rick

On Tue, Jan 9, 2018 at 4:16 AM, Kiswendsida Hyacinthe GUIGMA via ncl-talk <
ncl-talk at ucar.edu> wrote:

> Hello dear NCL users,
> 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.
> 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:
> " ref_line_interp: error: gsnYRefLine must be a scalar or an array of
> length ncurves". However when I print res at gsnXRefLine it gives me this:
> (0)     42179
> (1)     42197
> which proves that they are scalars.
> Can anyone please help me?
> Please have a look at my code.
>
> 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?
>
> Thank you in advance.
>
> -----------------------------
> GUIGMA
>
> _______________________________________________
> 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/20180109/5a1649ed/attachment.html>


More information about the ncl-talk mailing list