[ncl-talk] Attaching plots along the Y axis
Adam Phillips
asphilli at ucar.edu
Tue Sep 1 11:16:36 MDT 2015
Hi Seyni,
I just ran your script here using a NCEP Reanalysis I file I had and it
worked fine. I had to set gsnDraw and gsnFrame = False for each of the two
resource lists to avoid 3 frames being drawn, but even without those
resources the script ran fine. I tested the script in NCL v6.3.0 and
v6.2.1.
If you are running an older version of NCL I recommend you upgrade to
6.3.0. I've attached the plot for reference.
If you have any further issues please respond to the ncl-talk email list.
Adam
On Sat, Aug 29, 2015 at 2:39 PM, Salack Seyni <abutawakalt at gmail.com> wrote:
> Dear Folks,
>
> I'm having a hard time to attach two plots. Seperately they're fine but
> attaching then along the Y axis is giving an error message. Do anyone have
> an idea of what is missing here?
>
> ********The program is given below**********
> u_latH1 = u_latH->uwnd(0,0:12,:,0)
> h_u1 = h_u->uwnd(0,0:12,0,0)
>
>
> u_latH1!0 = "la"
> u_latH1!1 = "lev"
> h_u1!0 = "lev"
>
> wks = gsn_open_wks("ps", "dry_ensoonly_profile" ) ; open
> workstation
>
> ;==============================================
> ; create first plot
> ;=============================================
>
> res = True
> res at tiMainString = "DtC [strg ENSO]" ; title
> res at cnLevelSpacingF = 5.0
> res at gsnContourZeroLineThicknessF = 2.
> res at gsnContourNegLineDashPattern = 1
> res at lbLabelAutoStride = True
> res at cnLevelSelectionMode = "ManualLevels"
> res at cnMinLevelValF = -25.
> res at cnMaxLevelValF = 5.
> res at cnLineLabelsOn = True
> res at tmYRMode = "Automatic"
>
> base_plot = gsn_csm_pres_hgt(wks, u_latH1, res )
>
> ;==============================================
> ; create second plot
> ;=============================================
>
> xyres = True
> xyres at tiMainString = "Absolute anomaly w.r.t
> 1981-2010"
> xyres at trYReverse = True ; reverse Y-axis
> xyres at xyDashPatterns = 15 ; choose dash
> patterns
> xyres at trXMinF = -2
> xyres at trXMaxF = 2
>
> sec_plot = gsn_csm_xy(wks,h_u1,h_u1&lev,xyres)
>
> ;==============================================
> ; attach plots
> ;=============================================
>
> newplot = gsn_attach_plots(base_plot,(/sec_plot/),res,xyres)
> draw(base_plot)
> frame(wks)
>
>
> *********The error message*************
> Copyright (C) 1995-2013 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.1.2
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> warning:NhlGetValues:Error retrieving tmXBLabelFontHeightF
> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 7338 in
> file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl
>
> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 63 in
> file uwnd_plot.ncl
>
>
> Thank you in advance.
>
> best regards,
>
> Seyni
>
>
>
> --
> ---
> Dr. Seyni Salack,
> Karlsruhe Institute of Technology (KIT)
> Campus Alpin - Institute of Meteorology and Climate Research (IMK-IFU)
> Ballengasse 19a
> 82467 Garmisch-Partenkirchen, Germany
> Mobile: +49-(0)175-8411934 | Landline: +49-(0)8821-183246 | Skype: sesawu
> Email: seyni.salack at kit.edu / abutawakalt at gmail.com, Twitter: @ssalack
> ---
>
> _______________________________________________
> 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/20150901/865d37eb/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dry_ensoonly_profile.png
Type: image/png
Size: 114444 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150901/865d37eb/attachment.png
More information about the ncl-talk
mailing list