This seems to have cropped up in ncl 6.x. It used to work properly for me, but fails in 6.2 and also failed in 6.1.2. I am trying to attach two plots vertically. An xy plot on the top and a contour plot on the bottom. I get the following error when I try to attach:
warning:NhlGetValues:Error retrieving tmYLLabelFontHeightF
fatal:["Execute.c":8567]:Execute: Error occurred at or near line 7619 in file $NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl
fatal:["Execute.c":8567]:Execute: Error occurred at or near line 824 in file tests/curtain_seac4rs_er2.ncl
fatal:["Execute.c":8565]:Execute: Error occurred at or near line 73
I modified the code in gsn_code so that it gets the values from the contour attribute and that seems to work; although, it prints out many other warning messages. Is the a better work around for this? The change I tried was near ine 7609:
do i=0,nplots-1
if(found_plots(i)) then
; CGB Hack - to work around plot bug
tmpplot = new_plots(i)
; getvalues new_plots(i)
getvalues tmpplot@contour
"tmYLMajorLengthF" : mj_lengths(i)
"tmYLMajorOutwardLengthF" : mjo_lengths(i)
"tmYLMinorLengthF" : mn_lengths(i)
"tmYLMinorOutwardLengthF" : mno_lengths(i)
"tmYLLabelFontHeightF" : font_heights(i)
end getvalues
delete(tmpplot)
end if
end do
Leaving a lot of the routine out, he way I use gsn_attach_plots is:
resData = True
resData@gsnDraw = False
resData@gsnFrame = False
resData@trYMinF = res@cnMinLevelValF
resData@trYMaxF = res@cnMaxLevelValF
resData@trXMinF = res@trXMinF
resData@trXMaxF = res@trXMaxF
resData@xyLineThicknessF = 4.
resData@gsnLeftString = pdata@long_name
resData@gsnRightString = pdata@units
resData@tiYAxisString = fieldname + " (" + pdata@units + ")"
resData@tiMainString = campaignName + ", " + orbit_num(lastJ)
; Attach this plot to the bottom.
resData@gsnAttachPlotsXAxis = True
newPlot = gsn_attach_plots(dataPlot, plot, resData, res)
draw(wks)
frame(wks)
Thanks,
Chuck
--------------------------------------------------------------
Charles Bardeen
National Center for Atmospheric Research
P.O. Box 3000, Boulder, CO 80307-3000
Phone: (303) 497-1752, Fax: (303) 497-1400
bardeenc@ucar.edu
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Apr 15 22:43:41 2014
This archive was generated by hypermail 2.1.8 : Wed Apr 16 2014 - 09:14:14 MDT