[ncl-talk] Plot with two color maps not getting southern hemisphere values
Adam Phillips
asphilli at ucar.edu
Wed Oct 28 15:18:29 MDT 2015
Hi Ioana,
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".
See example #1 here:
http://www.ncl.ucar.edu/Applications/contourLev.shtml#ex1
If you have any further questions please let ncl-talk know.
Adam
On Wed, Oct 28, 2015 at 2:20 PM, Ioana Colfescu <ioana.colfescu at ed.ac.uk>
wrote:
> 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.
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
--
Adam Phillips
Associate Scientist, Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/ 303-497-1726
<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151028/bb07b208/attachment.html
More information about the ncl-talk
mailing list