<div dir="ltr">Hi <span style="font-size:12.8px">Ioana</span>,<div>You are setting cnLevelSelectionMode = "ExplicitLevels", but you are setting cnMinLevelValF, cnMaxLevelValF, and cnLevelSpacingF. If you want to set those three resources, you need to set cnLevelSelectionMode = "ManualLevels".</div><div><br></div><div>See example #1 here:</div><div><a href="http://www.ncl.ucar.edu/Applications/contourLev.shtml#ex1">http://www.ncl.ucar.edu/Applications/contourLev.shtml#ex1</a><br></div><div><br></div><div>If you have any further questions please let ncl-talk know.</div><div>Adam</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 28, 2015 at 2:20 PM, Ioana Colfescu <span dir="ltr"><<a href="mailto:ioana.colfescu@ed.ac.uk" target="_blank">ioana.colfescu@ed.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
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.<br>
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 ?<br>
<br>
..............................................<br>
res@vpXF = 0.08<br>
res@vpYF = 0.88<br>
res@vpWidthF = 0.80<br>
res@vpHeightF = 0.60<br>
res@sfXArray = lon<br>
res@sfYArray = lat<br>
res@gsnAddCyclic = False<br>
; resources for the two plots<br>
tres = res<br>
dres = res<br>
<br>
;---set resources specific to plot 1<br>
tres@cnLevelSelectionMode = "ExplicitLevels"<br>
res@cnMinLevelValF = -0.08 ; set min contour level<br>
res@cnMaxLevelValF = 0.08 ; set max contour level<br>
res@cnLevelSpacingF = 0.006<br>
tres@mpDataSetName = "Earth..4"<br>
.......................................<br>
tres@mpMinLatF = min(lat) ; zoom in on map<br>
tres@mpMaxLatF = max(lat)<br>
tres@mpMinLonF = min(lon)<br>
tres@mpMaxLonF = max(lon)<br>
tres@tiMainOffsetYF = -0.04 ; moves title closer to plot.<br>
<br>
;---set resources specific to second plot<br>
dres@cnLevelSelectionMode = "ExplicitLevels"<br>
dres@cnMinLevelValF = -0.008 ; set min contour level<br>
dres@cnMaxLevelValF = 0.008 ; set max contour level<br>
dres@cnLevelSpacingF = 0.0006<br>
dres@lbOrientation = "Vertical"<br>
dres@pmLabelBarOrthogonalPosF = -0.01 ; move labelbar closer to plot<br>
........................................<br>
dres@mpShapeMode = "FreeAspect"<br>
dres@vpWidthF = 0.8<br>
dres@vpHeightF = 0.4<br>
dres@lbLabelFontHeightF =.01 ; make labels larger<br>
ter_plot = gsn_csm_contour_map(wks,agcms1(1,1,:,:),tres)<br>
<br>
dbz_plot = gsn_csm_contour(wks,agcms1(1,1,{-25:25},:)*100,dres)<br>
overlay(ter_plot,dbz_plot)<br>
draw(ter_plot)<br>
frame(wks)<br>
<br>
Thanks,<br>
Ioana<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
-- <br>
The University of Edinburgh is a charitable body, registered in<br>
Scotland, with registration number SC005336.<br>
<br>
</font></span><br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</div>