<div dir="ltr"><div class="gmail_default" style="font-size:small">Saurabh,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I think the problem is that you&#39;ve misspelled &quot;gsnSpreadColors&quot;. You have it as &quot;gsnSpreadcolors&quot; (small &#39;c&#39;).</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You should have gotten an error:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">







<p class="">warning:gsnSpreadcolors is not a valid resource in wrf_contour at this time=</p><p class="">It&#39;s important to pay attention to these errors because they will indicate if you are misspelling a resource or else applying a resource that it doesn&#39;t recognize.</p></div><div class="gmail_default" style="font-size:small">There are a number of other things wrong with this code which go beyond the color issue.</div><div class="gmail_default" style="font-size:small">The first is that you are calling &quot;wrf_contour&quot; with resources that have nothing to do with WRF contour plots and will likely give you errors.  These are the resources:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div class="gmail_default">  opts@mpDataBaseVersion = &quot;MediumRes&quot;</div><div class="gmail_default">  opts@mpOutlineOn = True</div><div class="gmail_default">  opts@gsLineColor      = &quot;Black&quot;</div><div class="gmail_default">  opts@gsLineThicknessF= 3.0</div><div class="gmail_default">  opts@gsnLeftString   = &quot;&quot;</div><div class="gmail_default">  opts@gsnRightString = &quot;&quot;<br>  opts@txFontHeightF            = 0.05<br>  opts@pmTickMarkDisplayMode = &quot;Always&quot;</div><div class="gmail_default"><br></div><div class="gmail_default">The first two resources are for map plots only. </div><div class="gmail_default"><br></div><div class="gmail_default">The &quot;gs&quot; resources are for when you are adding polylines to a plot via gsn_add_polyline, gsn_polyline, or gsn_polyline_ndc. </div><div class="gmail_default"><br></div><div class="gmail_default">The &quot;gsnLeft/RightString&quot; resources are not recognized by wrf_contour.</div><div class="gmail_default"><br></div><div class="gmail_default">&quot;txFontHeightF&quot; is for text strings (gsn_text, gsn_text_ndc, etc).</div><div class="gmail_default"><br></div><div class="gmail_default"> &quot;pmTickMarkDisplayMode&quot; is not recognized by wrf_contour. </div><div class="gmail_default"><br></div><div class="gmail_default">You should have gotten error messages for all of these.</div><div class="gmail_default"><br></div><div class="gmail_default">The second is that you have these two resources:</div><div class="gmail_default"><br></div><div class="gmail_default"><div class="gmail_default">  opts@sfXArray = lon2d</div><div class="gmail_default">  opts@sfYArray = lat2d</div><div class="gmail_default"><br></div><div class="gmail_default">but these should not be added, because when you use wrf_contour in conjunction with wrf_map_overlays, it uses the map projection information on the file to get the correct plot.  If you include these two resources, you will likely confuse things. I suggest removing them.</div><div class="gmail_default"><br></div><div class="gmail_default">--Mary</div></div><div class="gmail_default"><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 20, 2016 at 9:42 AM, Saurabh Singh <span dir="ltr">&lt;<a href="mailto:saurabhsingh123op@gmail.com" target="_blank">saurabhsingh123op@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>
<span><span>Dear ncl</span></span></div><div><span><span><br></span></span></div><div><span><span>I am trying to use color palette for opts resource but I am just getting black and white screen however in the same panel plot it was implemented on res@. ncl version 6.3.0; I don&#39;t understand what is going wrong</span></span></div><div><span><span><br></span></span></div><div>
<span><span>cl = (/2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16/)</span></span>

</div><div><span><span> opts@gsnMaximize    =False<br clear="none">
  opts@mpDataBaseVersion = &quot;MediumRes&quot;<br clear="none">
  opts@sfXArray = lon2d<br clear="none">
  opts@sfYArray = lat2d<br clear="none">
  opts@cnFillOn = True  <br clear="none">
  opts@mpOutlineOn = True<br clear="none">
  opts@gsLineColor      = &quot;Black&quot;<br clear="none">
  opts@FieldTitle= &quot;WRF-SON&quot;<br clear="none">
  opts@NoHeaderFooter = True<br clear="none">
  opts@gsLineThicknessF= 3.0<br clear="none">
  opts@gsnSpreadcolors =False<br clear="none">
  opts@cnSpanFillPalette        = True<br clear="none">
  opts@gsnLeftString         = &quot;&quot;       ; turn off subtitles<br clear="none">
  opts@gsnRightString        = &quot;&quot;<br clear="none">
  ;opts@gsnCenterString       = &quot;WRF&quot;<br clear="none">
  opts@lbLabelBarOn = False<br clear="none">
  opts@lbTitleOn = False<br clear="none">
  opts@txFontHeightF            = 0.05<br clear="none">
  opts@cnInfoLabelFontHeightF   = 0.02<br clear="none">
  opts@cnLevelSelectionMode = &quot;ExplicitLevels&quot;<br clear="none">
  opts@pmTickMarkDisplayMode = &quot;Always&quot;<br clear="none">
  opts@cnLevels     = cl<br clear="none">
  opts@cnFillPalette = &quot;precip3_16lev&quot;<br clear="none">

    <br clear="none"><br clear="none">
  contour = wrf_contour(b,wks,full(:,:),opts)<br clear="none">
 <br clear="none">
  plot(0) = wrf_map_overlays(b,wks,(/contour/),pltres,mpres)</span></span>

<br clear="all"></div><div><br></div><div>
<span><span> res                =True<br clear="none">
 res@cnFillOn       =True<br clear="none">
 ;res@gsnMaximize    =True<br clear="none">
 ;res@tiMainString   =&quot;this is my first trmm plot&quot;<br clear="none">
 res@mpMinLatF    = latS     ; range to zoom in on<br clear="none">
 res@mpMaxLatF    = latN<br clear="none">
 res@mpMinLonF    = lonL<br clear="none">
 res@mpMaxLonF    = lonR<br clear="none">
 res@PanelPlot = True<br clear="none">
; res@pmLabelBarOrthogonalPosF = 0.30<br clear="none">
 res@mpDataBaseVersion = &quot;LowRes&quot;<br clear="none">
 res@gsnAddCyclic =False<br clear="none">
 res@vpWidthF =0.88<br clear="none">
 res@vpHeightF =0.88<br clear="none">
 res@gsnLeftString         = &quot;TRMM-SON&quot;       ; turn off subtitles<br clear="none">
  res@gsnRightString        = &quot;&quot;<br clear="none">
  res@gsnCenterString       = &quot;&quot;<br clear="none">
 res@cnLevelSelectionMode = &quot;ExplicitLevels&quot;<br clear="none">
 res@gsnStringFontHeightF = 0.025<br clear="none">
 res@lbLabelBarOn = False<br clear="none">
  res@pmTickMarkDisplayMode = &quot;Always&quot;<br clear="none">
  res@cnInfoLabelFontHeightF   = 0.0001<br clear="none">
 ;res@tmXBLabelFontHeightF   = 0.005<br clear="none">
   res@tiMainFontHeightF   = 0.00025<br clear="none">
 res@NoHeaderFooter = True<br clear="none">
 res@FieldTitle= &quot;TRMM&quot;<br clear="none">
   res@cnInfoLabelFontHeightF   = 0.0001<br clear="none">
 res@cnLevels     = cl<br clear="none">
 cl = (/2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16/)<br clear="none">
 res@cnFillPalette = &quot;precip3_16lev&quot;<br clear="none">
 ;res@cnFillColors         = (/&quot;white&quot;,&quot;honeydew2&quot;,&quot;honeydew3&quot;,&quot;LightSkyBlue3&quot;,&quot;LightSkyBlue&quot;,\<br clear="none">
    ;         &quot;darkslategray1&quot;,&quot;PaleGreen&quot;,&quot;lightseagreen&quot;,&quot;Yellow&quot;,&quot;khaki4&quot;,\<br clear="none">
     ;        &quot;Brown&quot;,&quot;magenta&quot;/)<br clear="none">
    <br clear="none">
 <br clear="none">
 plot(1) = gsn_csm_contour_map(wks,rain2,res)</span></span>

<b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><br></div><div><br></div><div><br></div><div><br></div><div>- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><font size="2" style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif"><span>With regards</span><span></span></font><font size="2" style="font-family:arial,helvetica,sans-serif"><span style="color:rgb(0,0,0)"><span><br></span></span></font><font size="2" style="font-family:arial,helvetica,sans-serif"><span style="color:rgb(0,0,0)"><span>Saurabh Kumar singh</span><span></span>
</span></font><br style="color:rgb(51,204,0)"><br><font size="1" style="color:rgb(102,102,102)"> <b><i><span lang="EN-GB" style="font-family:Webdings">P</span></i></b><b><i><span lang="EN-GB" style="font-family:Tahoma,sans-serif"> : </span></i></b><b><i><span lang="EN-GB" style="font-family:Arial,sans-serif"> </span></i></b><b><i><span lang="EN-GB" style="font-family:Tahoma,sans-serif">Please consider the environment before printing this e-mail</span></i></b> </font><br style="color:rgb(102,102,102)"><br><br><br></div></div>
</div>
<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></div>