dear all,
I tried to draw vector if  zonal winds are significant at 95%. I used
the code below and i didn't obtained what i needed.
Can someone help me?
;************************************************
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"
;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
;************************************************
begin
;============================== =============================
  a = addfile("olr02.nc", "r")  ; kelvin_olr
  b = addfile("uwnd02.nc", "r") ; kelvin_uwind
  c = addfile("vwnd02.nc", "r") ; krlvin_vwind
  d = addfile("hgt02.nc", "r") ; krlvin_vwind
 ;============================== DAY 5 =============================
 olr1      = short2flt(a->olr(5,:, :))
  u1        = short2flt(b->uwnd(5, {850}, :, :))
  v1        = short2flt(c->vwnd(5, {850}, :, :))
  uu1s        = short2flt(d->hgt(5, {850}, :, :))
  olr1    =  lonFlip(olr1)
  u1      =  lonFlip(u1)
  v1      =  lonFlip(v1)
;============================== DAY6=============================
 olr2      = short2flt(a->olr(6,:, :))
  u2        = short2flt(b->uwnd(6, {850}, :, :))
  v2        = short2flt(c->vwnd(6, {850}, :, :))
  uu2s      = short2flt(d->hgt(6, {850}, :, :))
  olr2    =  lonFlip(olr2)
  u2      =  lonFlip(u2)
  v2      =  lonFlip(v2)
   uu2    =  lonFlip(uu2s)
;============================== DAY7 =============================
 olr3      = short2flt(a->olr(7,:, :))
  u3        = short2flt(b->uwnd(7, {850}, :, :))
  v3        = short2flt(c->vwnd(7, {850}, :, :))
  uu3s        = short2flt(d->hgt(7, {850}, :, :))
  olr3    =  lonFlip(olr3)
  u3      =  lonFlip(u3)
  v3      =  lonFlip(v3)
 uu3 =  lonFlip(uu3s)
;============================== DAY8 =============================
 olr4     = short2flt(a->olr(8,:, :))
  u4       = short2flt(b->uwnd(8, {850}, :, :))
  v4       = short2flt(c->vwnd(8, {850}, :, :))
  ;uu4       = short2flt(b->uwnd(8, {850}, :, :))
   uu4s        = short2flt(d->hgt(8, {850}, :, :))
  olr4   =  lonFlip(olr4)
  u4     =  lonFlip(u4)
  v4     =  lonFlip(v4)
 uu4 =  lonFlip(uu4s)
  lat   = b->lat
  lon   = b->lon
  time  = a->time
;************************************************
; create plots: create colormap using named colors
;               unequal contour levels
;************************************************
    works = getenv("GRAPHIC_WORKS")
      wks = gsn_open_wks("eps", "olr_wind")             ; open a ps file
       colors2          = (/"wh-bl-gr-ye-re"/)
      colors3	 = (/"precip3_16lev"/)
     gsn_define_colormap(wks, colors3)
     plot    = new(4,"graphic")
     cplot    = new(4,"graphic")
     res     = True               ; plot mods desired
   res@gsnDraw              = False        ; do not draw picture
   res@gsnFrame             = False        ; do not advance frame
   res@gsnMaximize          = True             ; maximize panel area
   res@mpMinLonF            =  -30.               ; select a subregion
   res@mpMaxLonF            =   60.
   res@mpMinLatF            =  -20.
   res@mpMaxLatF            =   20.
  res@gsnSpreadColors     = True	        ; use full colormap
  res@gsnSpreadColorStart  = -1                 ; start with last color
  res@gsnSpreadColorEnd   = 2
  res@cnLevelSelectionMode = "ManualLevels"     ; set manual contour levels
  res@cnMinLevelValF       = -35               ; set min contour level
  res@cnMaxLevelValF       = 0                ; set max contour level
  res@cnLevelSpacingF      = 5               ; set contour spacing
  res@tmXBTickSpacingF = 10
  res@tmYLTickSpacingF = 10
  res@vcRefMagnitudeF           = 10
 ;*  SIGNIFICANCE ;;;;;;;;;;;;;;;;
  ;res@vcMagnitudeF = (/.95/) ;
  res@cnLevels = (/ .95 /)
  ;res@vcMagnitudeF = (/.95/)
  res@vcRefAnnoOrthogonalPosF   = -1.0            ; move ref vector
  res@vcRefAnnoArrowLineColor   = "black"         ; change ref vector color
  res@vcRefAnnoArrowUseVecColor = False           ; don't use vec color for ref
  res@vcGlyphStyle            = "CurlyVector"     ; turn on curley vectors
  res@vcLineArrowColor        = "black"           ; change vector color
  res@mpDataSetName         = "Earth..1"
  res@mpOutlineBoundarySets = "national"
  res@mpFillOn              = False
  res@mpGeophysicalLineThicknessF = 3.0          ; thickness of outlines;;
  res@gsnAddCyclic    = True
;;;;;;;;;;;;;
   res@cnFillOn             = True               ; turn on color for contours
   res@cnLinesOn            = False              ; turn off contour lines
   res@gsnScalarContour     = True               ; contours desired
   res@gsnSpreadColors      = True               ; use full color map
   res@tiMainString   = ""
   res@gsnRightString      = ""
   res@gsnLeftString      = ""
resP                      = True             ; modify the panel plot
  resP@gsnMaximize          = True             ; maximize panel area
  resP@gsnPanelRowSpec      = True             ; specify 1 top, 2 lower level
  resP@gsnPanelLabelBar     = True             ; add common colorbar
plot(0)=gsn_csm_vector_scalar_map_ce(wks, u1,  v1,  olr1, res)
plot(1)=gsn_csm_vector_scalar_map_ce(wks, u2,  v2,  olr2, res)
plot(2)=gsn_csm_vector_scalar_map_ce(wks, u3,  v3,  olr3, res)
plot(3)=gsn_csm_vector_scalar_map_ce(wks, u4,  v4,  olr4, res)
;*********************************
; add contours of wind speed to plot
;********************************
 resP@lbTitleFontHeightF= .019                 ; make title smaller,"10"
 resP@gsnPanelFigureStrings= (/"5 JUN","6 JUN"," 7 JUN","8 JUN"/)
 resP@lbOrientation            = "Vertical"     ; vertical label bar
delete(res)
  res                 = True
  res@gsnDraw         = False
  res@gsnFrame        = False
  res@cnInfoLabelOn   = False
  res@tiMainString    = ""
  res@gsnLeftString      = ""
  res@cnLevelSpacingF      = 10.              ; SST contour spacing
  cplot(0)= gsn_csm_contour(wks, uu1, res)
  cplot(1)= gsn_csm_contour(wks, uu2, res)
  cplot(2)= gsn_csm_contour(wks, uu3, res)
  cplot(3)= gsn_csm_contour(wks, uu4, res)
  overlay(plot(0), cplot(0))
  overlay(plot(1), cplot(1))
  overlay(plot(2), cplot(2))
  overlay(plot(3), cplot(3))
gsn_panel(wks,plot,(/1,1,1,1/),resP)
end
-- ------------------------------------------------------------------- ------------------------------------------------------------------- Sinclaire ZEBAZE PhD student University of YAOUNDE I Faculty of science Department of Physics Laboratory of Environmental modelling and Atmospheric Physics (LEMAP) P.O.BOX 812 YAOUNDE - CAMEROON Phone: (237) 77834713 Email: s.zebaze@gmail.com ------------------------------------------------------------------- ------------------------------------------------------------------- _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Thu Jan 10 09:12:29 2013
This archive was generated by hypermail 2.1.8 : Mon Jan 14 2013 - 14:31:38 MST