overlay

From: MingXuan Chen <chen_at_nyahnyahspammersnyahnyah>
Date: Tue, 4 Dec 2007 10:36:39 -0700

Hello,
    I want to place vertical velocity contour over zonal wind
contour. According to http://www.ncl.ucar.edu/Applications/conOncon.shtml
,
I used overlay procedure overlay(plota,plotb), it doesn't work. I
don't know what is wrong.

   Thank you very much for your help.

Mingxuan

  Please see my code. NCL is versio 4.3.1.
--------------------------
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"
begin
........
   wks2 = gsn_open_wks("ps","Fig2t")
   res2 = True
   res2_at_cnFillOn = False
   res2_at_cnLevelSelectionMode = "ManualLevels" ; set manual contour
levels
   res2_at_cnLinesOn = True
res2_at_cnMinLevelValF = -5.5
res2_at_cnMaxLevelValF = 5.5
res2_at_cnLevelSpacingF = 1.0
   res2_at_cnMonoLineColor = True
   res2_at_cnLineColor="Black"
   res2_at_tiMainString ="t=26 min."
   res2_at_tiXAxisString = "X (km)"
   res2_at_tiYAxisString = "Height (km)"
res2_at_gsnDraw = False ; do not draw picture
res2_at_gsnFrame = False ; do not advance frame
res2_at_gsnContourZeroLineThicknessF = 0
res2_at_gsnContourNegLineDashPattern = 1

   wres= True
   wres_at_gsnDraw = False ; do not draw picture
   wres_at_gsnFrame = False ; do not advance frame
   wres_at_cnInfoLabelOn = False ;turn off cn info label
   wres_at_cnFillOn = False
   wres_at_cnLinesOn = True
   wres_at_cnLevelSelectionMode = "ExplicitLevels"
   wres_at_cnLevels =(/-0.5,0,0.5/)
   wres_at_gsnContourNegLineDashPattern = 1
   wres_at_gsnRightString = overlay(plota,plotb) "
   wres_at_gsnLeftString = " "
   wres_at_tiXAxisString = " "
   wres_at_cnMonoLineColor = True
   wres_at_cnLineColor="red"
    plotb =gsn_csm_contour(wks2,ww26,wres)
    plota = gsn_csm_contour(wks2,uu26,res2) ; contour the variable
   overlay(plota,plotb)
   draw(plota)
    frame(wks2)
end

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Dec 04 2007 - 10:36:39 MST

This archive was generated by hypermail 2.2.0 : Wed Dec 05 2007 - 10:17:04 MST