[ncl-talk] Plot with two color maps not getting southern hemisphere values

Ioana Colfescu ioana.colfescu at ed.ac.uk
Wed Oct 28 14:20:30 MDT 2015


Hi,
I'm trying to plot a field using two color maps - one for the 'higher  
latitudes' and another one for the tropics. The area in the lower lats  
I try to plot is S to N for example 25S to 25N.When I try to plot this  
area, using the second color bar it doesn't work ( see plot attached -  
second color bar starts at around 0 not -25) so I only get the  
positive plotted values.
I attached the plot and the code part that is relevant to the problem  
I have. Could anyone please help me figure out what should I do to  
have the second plot from 25S to 25N ?

..............................................
   res at vpXF                  = 0.08
   res at vpYF                  = 0.88
   res at vpWidthF              = 0.80
   res at vpHeightF             = 0.60
   res at sfXArray              = lon
   res at sfYArray              = lat
   res at gsnAddCyclic          = False
; resources for the two plots
   tres                       = res
   dres                       = res

;---set resources specific to  plot 1
   tres at cnLevelSelectionMode  = "ExplicitLevels"
   res at cnMinLevelValF       = -0.08                ; set min contour level
   res at cnMaxLevelValF       =  0.08               ; set max contour level
   res at cnLevelSpacingF      =  0.006
   tres at mpDataSetName         = "Earth..4"
.......................................
   tres at mpMinLatF             = min(lat)    ; zoom in on map
   tres at mpMaxLatF             = max(lat)
   tres at mpMinLonF             = min(lon)
   tres at mpMaxLonF             = max(lon)
   tres at tiMainOffsetYF        = -0.04   ; moves title closer to plot.

;---set resources specific to second plot
   dres at cnLevelSelectionMode  = "ExplicitLevels"
   dres at cnMinLevelValF       = -0.008                ; set min contour level
   dres at cnMaxLevelValF       =  0.008               ; set max contour level
   dres at cnLevelSpacingF      =  0.0006
   dres at lbOrientation         = "Vertical"
   dres at pmLabelBarOrthogonalPosF = -0.01    ; move labelbar closer to plot
........................................
   dres at mpShapeMode  = "FreeAspect"
   dres at vpWidthF      = 0.8
   dres at vpHeightF     = 0.4
   dres at lbLabelFontHeightF =.01                 ; make labels larger
   ter_plot = gsn_csm_contour_map(wks,agcms1(1,1,:,:),tres)

   dbz_plot = gsn_csm_contour(wks,agcms1(1,1,{-25:25},:)*100,dres)
   overlay(ter_plot,dbz_plot)
   draw(ter_plot)
   frame(wks)

Thanks,
Ioana










-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: overlay.ps
Type: application/postscript
Size: 587484 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151028/a71c80c1/attachment-0001.ps 


More information about the ncl-talk mailing list