[ncl-talk] fatal:Variable (lbar_zone) is undefined

Adam Phillips asphilli at ucar.edu
Mon Oct 9 10:34:06 MDT 2017


Hello,
Please note that on the NCL email list support page (
http://www.ncl.ucar.edu/Support/email_lists.shtml) it states:
"The NCL/NCARG team monitors all mailing lists, and we generally try to
answer questions within a few hours when posted during normal working hours
(Mon-Fri 8am-5pm MT)."
As your original email was posted on Saturday it is quite unlikely that it
will be responded to until Monday. There are occasional exceptions to this,
depending on the schedules of NCL support staff as well as volunteers who
are willing to respond.

To answer your query, I've copied stream_11.ncl from the examples website
here:
http://www.ncl.ucar.edu/Applications/stream.shtml#ex11

and modified it to use the uvt.nc file available here:
http://www.ncl.ucar.edu/Applications/Data/

and attached it and the resulting graphic here.

Note that to turn off the individual labelbar you need to set lbLabelBarOn
= False. To turn on a single labelbar for the panel plot you need to set
gsnPanelLabelBar to True in your panel resource list. Finally, to orient
the labelbar vertically you need to set lbOrientation = "vertical" in your
panel resource list.

See the following websites:
http://www.ncl.ucar.edu/Applications/panel.shtml
http://www.ncl.ucar.edu/Applications/labelbar.shtml
available from the main applications page here:
http://www.ncl.ucar.edu/Applications/

Also, note that the resource gsnOldLabelBar does not exist, and that
lbLabelsOn will turn off the labelbar labels (when set in the panel
resource list in the attached example).

Hopefully that all makes sense. If not, or if you have further questions,
please only respond to the ncl-talk email list and not to me personally.
Adam








On Mon, Oct 9, 2017 at 6:13 AM, Ismail SEZEN <sezenismail at gmail.com> wrote:

> UP! NEED ATTENTION!
> Let me simplify the question. Can somebody give a clean example how to
> create  streamline plots (with gsn_csm_streamline_scalar_map) in panels
> with a single label bar on the right?
>
> it said in the http://mailman.ucar.edu/mailman/listinfo/ncl-talk page
> that "report bugs on NCL”. Does someone from NCL-team read this emails?
>
> > On 8 Oct 2017, at 02:34, Ismail SEZEN <sezenismail at gmail.com> wrote:
> >
> > Hello,
> >
> > NCAR Command Language Version 6.4.0
> >
> > I want to plot streamlines (gsn_csm_streamline_scalar_map) in panels
> (gs_panels) and remove the Labelbar and add PanelLabelBar. So, I started to
> play with the following settings.
> >
> >     res at gsnOldLabelBar = False
> >     res at lbLabelBarOn  = False
> >     res at lbLabelsOn  = False
> >
> > a) If I set all the values above to True, I get Labelbar below the plots
> in panels.
> > b) If gsnOldLabelBar = False and lbLabelBarOn = True, LabelBar is shown
> below plots and also I see some artifical x and y axis labels except
> latitude and longitudes.
> > c) If gsnOldLabelBar = True and lbLabelBarOn = False; NCL throws
> following error:
> >
> > fatal:Variable (lbar_zone) is undefined
> >
> > This error comes from the Line 12331 of gsn_csm.ncl file. See the code
> block at the end of this email. Something is wrong with the logic. It seems
> False and True logic is missing.
> >
> > d) If I set all the values above to False, I don’t see LabelBar below
> plot but still I get artifical x and y axis labels like 0, 20, 40, 60
> etc... (see the attached image)
> >
> > The only way for me to remove LabelBars is comment the add_labelbar
> function in line 12331. Is this a bug or am I missing something?
> >
> > ; CODE BLOCK FROM gsn_csm.ncl
> > ; Line —> 12320
> >     if(lbar_on.and.use_old_lbar)
> >       if(.not.infolabel_on)
> >         lbar_zone = 2
> >       else
> >         lbar_zone = 3
> >       end if
> >       lbres = get_res_eq(res2,(/"lb","pm"/))
> >     end if
> >     if(use_old_lbar)
> >       add_labelbar(wks,streamline_object,lbar_zone,font_height, \
> >                     "streamline",lbar_on,lbres)
> >     end if
> >     if(use_mgr_lbar)
> >       fix_labelbar(streamline_object,font_height,lbar_on,stres)
> >     end if
> >
> > <Screen Shot 2017-10-08 at 02.30.34.png>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>



-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171009/bfa14c34/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stream_11.ncl
Type: text/x-ncl
Size: 1636 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171009/bfa14c34/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stream.png
Type: image/png
Size: 361593 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171009/bfa14c34/attachment-0001.png>


More information about the ncl-talk mailing list