<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've misspelled "gsnSpreadColors". You have it as "gsnSpreadcolors" (small 'c').</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'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'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 "wrf_contour" 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 = "MediumRes"</div><div class="gmail_default"> opts@mpOutlineOn = True</div><div class="gmail_default"> opts@gsLineColor = "Black"</div><div class="gmail_default"> opts@gsLineThicknessF= 3.0</div><div class="gmail_default"> opts@gsnLeftString = ""</div><div class="gmail_default"> opts@gsnRightString = ""<br> opts@txFontHeightF = 0.05<br> opts@pmTickMarkDisplayMode = "Always"</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 "gs" 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 "gsnLeft/RightString" resources are not recognized by wrf_contour.</div><div class="gmail_default"><br></div><div class="gmail_default">"txFontHeightF" is for text strings (gsn_text, gsn_text_ndc, etc).</div><div class="gmail_default"><br></div><div class="gmail_default"> "pmTickMarkDisplayMode" 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"><<a href="mailto:saurabhsingh123op@gmail.com" target="_blank">saurabhsingh123op@gmail.com</a>></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'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 = "MediumRes"<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 = "Black"<br clear="none">
opts@FieldTitle= "WRF-SON"<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 = "" ; turn off subtitles<br clear="none">
opts@gsnRightString = ""<br clear="none">
;opts@gsnCenterString = "WRF"<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 = "ExplicitLevels"<br clear="none">
opts@pmTickMarkDisplayMode = "Always"<br clear="none">
opts@cnLevels = cl<br clear="none">
opts@cnFillPalette = "precip3_16lev"<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 ="this is my first trmm plot"<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 = "LowRes"<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 = "TRMM-SON" ; turn off subtitles<br clear="none">
res@gsnRightString = ""<br clear="none">
res@gsnCenterString = ""<br clear="none">
res@cnLevelSelectionMode = "ExplicitLevels"<br clear="none">
res@gsnStringFontHeightF = 0.025<br clear="none">
res@lbLabelBarOn = False<br clear="none">
res@pmTickMarkDisplayMode = "Always"<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= "TRMM"<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 = "precip3_16lev"<br clear="none">
;res@cnFillColors = (/"white","honeydew2","honeydew3","LightSkyBlue3","LightSkyBlue",\<br clear="none">
; "darkslategray1","PaleGreen","lightseagreen","Yellow","khaki4",\<br clear="none">
; "Brown","magenta"/)<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>