<div dir="ltr">Hi All,<div><br><div>I&#39;m working with NCL v. 6.0.0.  I am trying to make a 3 panel plot, with filled contours.  However, when I try to set explicit colors for the third panel (I would like to do a Red-White-Blue theme, centered on a white zero), I cannot get the appropriate colors plotted.  I am using con_Lev_4.ncl as an example (<a href="http://www.ncl.ucar.edu/Applications/contourLev.shtml">http://www.ncl.ucar.edu/Applications/contourLev.shtml</a>).</div><div><br></div><div>I have also tried setting this to manual levels with a max, min and interval for the contours and using a prescribed color table, such as hotcold_18lev, but the colormap defaults to the same as the top two panels.</div><div><br></div><div>I&#39;ve copied my script here, and the output figure is attached. </div><div>Does anyone have ideas on how to change this third panel so the colors are Red-White-Blue themed?  </div><div><br></div><div>Thanks,</div><div>Mira</div><div><br></div><div><br></div><div><br></div><div><br></div><div><div><br></div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot; </div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot; </div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot; </div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl&quot; </div><div>;************************************************ </div><div>begin </div><div>;************************************************ </div><div>; read in netCDF files</div><div>;************************************************ </div><div>a = addfile(&quot;<a href="http://SLP.mon.mean.nc">SLP.mon.mean.nc</a>&quot;,&quot;r&quot;) ; sea level pressure </div><div><br></div><div>;************************************************ </div><div>; read in zonal [u] and meridional [v] moisture transport (water vapor)</div><div>;************************************************ </div><div><br></div><div>slp = a-&gt;PRMSL_GDS0_MSL_S123(1:648,:,:) </div><div><br></div><div><br></div><div>;***************************************************************</div><div>; geneerate a new longitude list that is monotonically increasing</div><div>;***************************************************************</div><div>g0_lat_1 = a-&gt;g0_lat_1</div><div>g0_lon_2 = a-&gt;g0_lon_2</div><div>g0_lon_2 = where(g0_lon_2.gt.180, g0_lon_2-360, g0_lon_2); change it from 220to 30 to be -110 to 30</div><div>g0_lon_2&amp;g0_lon_2 = g0_lon_2</div><div>printVarSummary(g0_lon_2)</div><div><br></div><div>slp&amp;g0_lon_2 = g0_lon_2 ; replace with &#39;correct&#39; ordering</div><div>slp&amp;g0_lon_2 = g0_lon_2</div><div><br></div><div>printVarSummary(slp)</div><div><br></div><div><br></div><div>; Calculate the seasonal averages.</div><div>slpDJF = month_to_season(slp, &quot;DJF&quot;)</div><div><br></div><div>printVarSummary(slpDJF)</div><div><br></div><div><br></div><div>; this data starts at 1958 (this is index 0), so 1963=5, 1973=15 etc.</div><div><br></div><div><br></div><div>slpDJF_lon_hi = slpDJF((/8,10,11,16,25,26,36,37,41,47/),:,:)</div><div>slpDJF_lon_lo = slpDJF((/5,6,22,27,29,33,34,38,45,48/),:,:)</div><div><br></div><div>slpAvgTime_hi = dim_avg_n_Wrap(slpDJF_lon_hi,0)</div><div>slpAvgTime_lo = dim_avg_n_Wrap(slpDJF_lon_lo,0)</div><div><br></div><div>printVarSummary(slpAvgTime_hi)</div><div>printVarSummary(slpAvgTime_lo)</div><div><br></div><div><br></div><div>; sneaky way to copy metadata over first.</div><div>diff_slp = slpAvgTime_hi;</div><div>diff_slp = slpAvgTime_lo - slpAvgTime_hi</div><div><br></div><div>printVarSummary(diff_slp)</div><div><br></div><div><br></div><div>;************************************************ </div><div>; create plot </div><div>;************************************************ </div><div>wks = gsn_open_wks(&quot;ps&quot;,&quot;Panel_lon_SLP&quot;) <span class="gmail-Apple-tab-span" style="white-space:pre">                </span>; open a ps file </div><div>gsn_define_colormap(wks,&quot;temp1&quot;)</div><div><br></div><div>plot = new(3,graphic)<span class="gmail-Apple-tab-span" style="white-space:pre">                                </span>; create a plot array</div><div><br></div><div>;---- set common resources for all plots</div><div>res <span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>= True</div><div>res@gsnDraw<span class="gmail-Apple-tab-span" style="white-space:pre">                </span>= False <span class="gmail-Apple-tab-span" style="white-space:pre">                </span>; dont draw</div><div>res@gsnFrame<span class="gmail-Apple-tab-span" style="white-space:pre">                </span>= False<span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>; dont advance frame</div><div>res@cnInfoLabelOn<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>= False<span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>; trn off cn info label</div><div>res@gsnAddCyclic = False<span class="gmail-Apple-tab-span" style="white-space:pre">                </span>; has to do with wrapping the lonitude at 0/360</div><div>res@cnFillPalette = &quot;matlab_jet&quot;</div><div><br></div><div><br></div><div>;;************************************************ </div><div>;; Choose a subregion </div><div>;;************************************************ </div><div>res@mpMaxLatF = 90 <span class="gmail-Apple-tab-span" style="white-space:pre">                                </span>;maximum latitude </div><div>res@mpMinLatF = 25 <span class="gmail-Apple-tab-span" style="white-space:pre">                                </span>;minimum latitude </div><div>res@mpMaxLonF = 30<span class="gmail-Apple-tab-span" style="white-space:pre">                                </span>; max lon</div><div>res@mpMinLonF = -110<span class="gmail-Apple-tab-span" style="white-space:pre">                                </span>; min lon</div><div>res@mpOutlineBoundarySets = &quot;National&quot;</div><div>res@mpOutlineOn = True<span class="gmail-Apple-tab-span" style="white-space:pre">                                </span>; turn map outline on</div><div>res@mpOutlineDrawOrder = &quot;PostDraw&quot;</div><div>res@mpFillOn = False<span class="gmail-Apple-tab-span" style="white-space:pre">                                </span>; turn map fill off</div><div>res@cnFillOn = True<span class="gmail-Apple-tab-span" style="white-space:pre">                                </span>; turn on color fill</div><div>res@cnLinesOn = False<span class="gmail-Apple-tab-span" style="white-space:pre">                                </span>; turn off contour lines</div><div>res@lbOrientation = &quot;Vertical&quot;<span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>; make labels vertical</div><div>res@cnFillPalette = &quot;BlWhRe&quot;</div><div>res@cnLevelSelectionMode = &quot;ManualLevels&quot;<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>; set manual contour levels</div><div>res@cnMinLevelValF = 100000<span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>; set min contour level</div><div>res@cnMaxLevelValF = 102400<span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>; set max countrou level</div><div>res@cnLevelSpacingF = 400<span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>; set contour spacing</div><div><br></div><div><br></div><div>plot(0) = gsn_csm_contour_map(wks,slpAvgTime_hi,res)</div><div>plot(1) = gsn_csm_contour_map(wks,slpAvgTime_lo,res)</div><div><br></div><div>delete(res@cnLevelSpacingF)<span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>; delete resources before reseting</div><div>res@cnLevelSelectionMode = &quot;ExplicitLevels&quot; ;<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>set explicit contour levels</div><div>res@cnLevels = (/ -900, -700., -500., -300., -100., 100., 300., 500., 700., 900./) ; set levels</div><div>res@cnFillColors = (/ 23,30,36,41,45,-1,59,63,68,74/)  ; set the colors to be used</div><div><br></div><div>plot(2) = gsn_csm_contour_map(wks,diff_slp,res)</div><div><br></div><div><br></div><div>;************************************************</div><div>; create panel</div><div>;************************************************</div><div>resP = False<span class="gmail-Apple-tab-span" style="white-space:pre">                                        </span>; modify the panel plot</div><div>resP@txString = &quot;lon - SLP&quot;</div><div>gsn_panel(wks,(/plot/),(/3,1/),resP)<span class="gmail-Apple-tab-span" style="white-space:pre">                </span>; now draw as one plot;</div><div> </div><div><br></div><div>end </div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div>