Re: Is there confliction between "gsnContourZeroLineThicknessF" and "gsnContourZeroLineThicknessF" when panel the contour maps in NCL5.2.1?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Jul 29 2010 - 11:46:02 MDT

Hi Li,

Thanks for providing the script and data up front.

There's something very strange happening with your script. I'll take a look at it more this afternoon. You are right: there is a difference between 5.2.0 and 5.2.1, but I don't know yet what change we made that would cause this.

--Mary

On Jul 29, 2010, at 3:27 AM, lxf wrote:

> Hi,
> In new version 5.2.1 of NCL, there seems confliction between "gsnContourZeroLineThicknessF" and "gsnContourZeroLineThicknessF" when panel the contour maps.
> That is to say:
> ;----------------------------------------------------
> ; This two settings seems controvacy if both set on
> res@gsnContourZeroLineThicknessF = 1.5 ; doubles thickness of zero contour
> res@gsnContourNegLineDashPattern = 2 ; sets negative contours to dash pattern 1 ;
> ;----------------------------------------------------
>
> The following is my scripts(the data is attached behind the letter):
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
> undef("sub_draw_hor")
> function sub_draw_hor(wks,h,opt,ti)
> local wks,h,res,res1,plot,plot1,ploth,opt,ti
> begin
> ;
> ; draw Plots
> ;......
> print (""+ti)
> ;wks =gsn_open_wks("eps",outname)
> ;gsn_define_colormap(wks,"nrl_sirkes") ; choose color map
> res = True
> res@gsnDraw = False ; don't draw yet
> res@gsnFrame = False ; don't advance frame yet
> res@gsnMaximize = False
>
> res@cnFillOn = False ; True ;False ;True ;False ;True ; turn on color for contours
> res@cnLinesOn = True ;False ;True ;False ; turn off contour lines
> res@cnLineLabelsOn = False
>
> ;res@vpXF = 0.2
> ;res@vpYF = 0.8
> res@vpWidthF = 0.14
> res@vpHeightF = 0.08
> res@gsnPaperOrientation = "portrait"
>
> res@tiMainString = "" ; ti
> res@tiMainOn = False ; ti
> res@tiXAxisOn = False
> res@gsnLeftString = ti
> res@gsnLeftStringFontHeightF = 0.005
> res@gsnCenterString = ""
> res@gsnRightString = ""
> res@tmXBOn = opt
> res@tmXTOn = False
> res@tmYROn = False
>
> res@cnLineLabelsOn = False ; turn off line labels
> res@cnInfoLabelOn = False
>
> ;res@cnInfoLabelOn = False
> ;res@cnLineLabelFormat = "@*+^sg"
>
> res@tmYLMode = "Explicit" ; label independently
> res@tmYLValues = h&time(::8)
> res@tmYLLabels = (/0,0.5,1,1.5,2/)
> ;res@tmYLLabelFontHeightF = 0.020
>
> ; res@gsnContourLineThicknessesScale = 1.;
> ;res@gsnContourLineThicknessF = 1.
>
> ;----------------------------------------------------
> ; This two settings seems controvacy if both set on
> res@gsnContourZeroLineThicknessF = 1.5 ; doubles thickness of zero contour
> res@gsnContourNegLineDashPattern = 2 ; sets negative contours to dash pattern 1
> ;
> ;----------------------------------------------------
> res@cnLevelSelectionMode ="ManualLevels"
> res@cnLevelSpacingF = 10
> res@cnMinLevelValF = -60.
> res@cnMaxLevelValF = 60.
>
> plot = gsn_csm_contour(wks, h(time|:,lat|:), res)
>
>
> return(plot)
>
>
> end
>
> ;====================================================================
> begin
>
>
> outname = "./t"
>
>
> f = addfile ("t.nc" , "r")
> printVarSummary(f)
> a0 = f->a0
> a1 = f->a1
> a2 = f->a2
> a3 = f->a3
> printVarSummary(a0)
> ;return
> ;
> ; draw Plots
> ;......
> wks =gsn_open_wks("eps",outname)
> gsn_define_colormap(wks,"nrl_sirkes") ; choose color map
> plots = new(4,graphic)
>
>
> opt = False
> ti = "a)aa "
> plots(0)=sub_draw_hor(wks,a0,opt,ti)
>
> opt = False
> ti = "c)bbbb"
> plots(1)=sub_draw_hor(wks,a1,opt,ti)
>
> opt = True
> ti = "b)ccccc"
> plots(2)=sub_draw_hor(wks,a2,opt,ti)
>
> opt = True
> ti ="d)ddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
> plots(3)=sub_draw_hor(wks,a3,opt,ti)
>
>
>
> resP = True ; modify the panel plot
> resP@gsnMaximize = True
>
> resP@gsnFrame = False
> resP@gsnPaperOrientation = "portrait"
> resP@gsnPanelBottom = 0.05
> resP@gsnPanelLabelBar = False
> resP@gsnPanelScalePlotIndex = 1
>
>
>
>
> gsn_panel(wks,plots,(/2,2/),resP)
> frame(wks)
>
>
> end
>
>
>
> Any help or suggestion is appriciatable.
>
> Sincerely,
> Li
>
> <t.nc>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jul 29 11:46:18 2010

This archive was generated by hypermail 2.1.8 : Fri Jul 30 2010 - 13:45:56 MDT