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

Ismail SEZEN sezenismail at gmail.com
Mon Oct 9 06:13:19 MDT 2017


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>



More information about the ncl-talk mailing list