<div dir="ltr">I am going to try it. Thanks!</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 29, 2016 at 11:14 AM, David Brown <span dir="ltr"><<a href="mailto:dbrown@ucar.edu" target="_blank">dbrown@ucar.edu</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">A small correction to Dennis' last message:<div><br></div><div>The fill color of areas with missing data are controlled using the resource cnMissingValFillColor. By default this is set to "transparent" meaning that the background color will show up in these areas, but you can set it to any color you want.</div><div> -dave</div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 28, 2016 at 9:38 PM, Chao Luo <span dir="ltr"><<a href="mailto:chaoluo888@gmail.com" target="_blank">chaoluo888@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">Thanks, Dennis! This works. <span class="m_4748453924827390999HOEnZb"><font color="#888888"><div><div><br></div><div>Chao</div></div></font></span></div><div class="m_4748453924827390999HOEnZb"><div class="m_4748453924827390999h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 28, 2016 at 7:57 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</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><div><div><div>By default, 'gsn_csm_contour_map' uses 'gray' to fill land.<br><br></div>See: <a href="http://www.ncl.ucar.edu/Applications/maponly.shtml" target="_blank">http://www.ncl.ucar.edu/Applic<wbr>ations/maponly.shtml</a><br><br></div>To turn this off:<br></div> res@mpFillOn = False<br><br>===<br></div>The areas with no data (_FillValue) are set to the background color... white here<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_4748453924827390999m_-308072296265286732h5">On Wed, Dec 28, 2016 at 7:40 PM, Chao Luo <span dir="ltr"><<a href="mailto:chaoluo888@gmail.com" target="_blank">chaoluo888@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_4748453924827390999m_-308072296265286732h5"><div dir="ltr"><div class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-adn m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-ads" style="padding-bottom:20px;padding-left:8px;font-size:medium"><div class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-gs" style="margin-left:44px"><div id="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-:m9" class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-ii m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-gt m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-adP m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-adO" style="font-size:12.8px;margin-bottom:0px;margin-left:0px;padding-bottom:5px"><div id="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-:m8" class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-a3s m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-aXjCH m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-m15946db53ce45052"><div dir="ltr">Hi,<div><br></div><div>I am using NCL script to plot map contour. The plot shows gray and white color, which they are not defined in the script. I have tried some map color fill options, it is still problem. Any suggestions and comments are very appreciated.</div><div><br></div><div>Thanks,</div><div><br></div><div>Chao</div><div><br></div><div>attachments are plot and script</div><div><br></div><div> load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_code.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_csm.ncl"</div><div>;load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/shea_util.ncl"</div><div> load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/contributed.ncl"</div><div><br></div><div>procedure metaUtil (z[*][*][*]:numeric, time[*], lat[*], lon[*])</div><div><br></div><div>begin</div><div> z!0 = "time" ; name dimensions</div><div> z!1 = "lat"</div><div> z!2 = "lon"</div><div> z&time = time ; assign coordinate variables</div><div> z&lat = lat</div><div> z&lon = lon</div><div>end</div><div><div>begin</div><div> f = addfile ("data/IC_TO_CG.hdf", "r")</div><div> lat = f->Latitude</div><div> lon = f->Longitude</div><div> time = f->Day_of_year</div><div>; print(f)</div><div> IC2CG = f->IC_TO_CG(:,:,:) ; IC to CG ratio</div></div><div><div> IC2CG@_FillValue = -1</div><div><br></div><div>;;;;average data to annualy data</div><div>; AvgTime_IC_TO_CG = dim_avg_Wrap(IC2CG(Latitude|:, Longitude|:, Day_of_year|:) )</div><div><br></div><div> AvgTime_July = dim_avg_Wrap(IC2CG(Latitude|:, Longitude|:, Day_of_year|181:211) )</div><div> AvgTime_Aug = dim_avg_Wrap(IC2CG(Latitude|:, Longitude|:, Day_of_year|212:242) )</div><div><br></div><div> printVarSummary(AvgTime_July)</div><div><br></div><div>;;;;; read mask data</div><div> f = addfile ("/home/cluo/<a href="http://landmask.nc/" target="_blank">landmask.nc</a>","r")</div><div> lat_mask = f->lat</div><div> lon_mask = f->lon</div><div> land = f->land(:,:,:)</div><div> printVarSummary(land)</div><div> mask1 = land</div><div> printVarSummary(mask1)do i=0, 360-1</div><div> ii = 360+i</div><div> do j=0, 360-1</div><div> jj = 359-j</div><div> mask1(0,j,i) = land(0,jj,ii)</div><div> end do</div><div> end do</div><div><br></div><div> do i=360, 720-1</div><div> ii = i-360</div><div> do j=0, 360-1</div><div> jj = 359-j</div><div> mask1(0,j,i) = land(0,jj,ii)</div><div> end do</div><div> end do</div><div><br></div><div> do i = 0, 720-1</div><div> do j = 1, 360-1</div><div> if (mask1(0,j,i).ne.0) then</div><div> AvgTime_July(j,i) = 0</div><div> end if</div><div> end do</div><div> end do</div></div><div><div>;*************create plots*******************</div><div> wks = gsn_open_wks ("ps", "narr") ; open workstation</div><div> gsn_define_colormap(wks,"BlAqG<wbr>rYeOrRe") ; choose colormap</div><div>; gsn_define_colormap (wks,"gui_default") ; choose color map</div><div> plot = new(1,graphic)</div><div><br></div><div> res = True ; plot mods desired for original grid</div><div><br></div><div> res@gsnDraw = False ; Don't draw plot or advance the</div><div> res@gsnFrame = False ; frame after plot is created.</div><div><br></div><div> res@cnFillOn = True ; color fill</div><div> res@cnLinesOn = False ; no contour lines</div><div> res@gsnSpreadColors = True ; use total colormap</div><div> res@gsnSpreadColorStart = 4</div><div> res@gsnSpreadColorEnd = -1</div><div> res@mpGridAndLimbOn = False</div><div> res@pmTickMarkDisplayMode = "Always" ; turn on tickmarks</div><div> res@tmXTOn = False</div><div> res@gsnAddCyclic = False ; regional data</div><div> res@mpOutlineOn = True ; turn on map outline</div><div> res@mpOutlineBoundarySets = "USStates" ; turn on state boundaries</div><div>; res@mpOutlineBoundarySets = "National"</div><div><br></div><div><br></div><div> ;;;; set boundary for subregion plot</div><div> res@mpLimitMode = "LatLon"</div><div> res@mpMinLonF = -125</div><div> res@mpMaxLonF = -70</div><div> res@mpMinLatF = 25</div><div> res@mpMaxLatF = 50</div><div> res@mpPerimOn = True</div><div> res@mpCenterLonF =-97</div><div> res@mpCenterLatF = 35</div></div><div><div>res@gsnCenterString = "Monthly mean IC/CG, August" ; draw center subtitle</div><div> res@gsnCenterStringFontHeightF<wbr>=25</div><div> res@gsnLeftString = "" ; draw left subtitle</div><div> res@cnLevelSelectionMode = "ExplicitLevels" ; set explicit contour levels</div><div> res@cnLevels = (/1,2.,3.,4.,5.,6.,8.,10./)</div><div> res@cnFillColors = (/10,20,30,40,50,65,75,85,96/)</div><div> res@gsnCenterString = "Climatology IC/CG, averaged in July"</div><div> plot(0) = gsn_csm_contour_map(wks,AvgTim<wbr>e_July(:,:),res) </div></div><div><br></div><div><div> resP = True</div><div> resP@gsnPanelYWhiteSpacePercen<wbr>t = 5</div><div> resP@gsnPanelXWhiteSpacePercen<wbr>t = 5</div><div> resP@cnFillColors = (/5,10,20,30,40,50,65,75,85,9<wbr>6/)</div><div> resP@gsnMaximize = True</div><div>; resP@gsnPanelLabelBar = True</div><div> resP@lbLabelBarOn = True</div><div> resP@gsnPaperOrientation = "portrait"</div><div>; resP@lbOrientation = "vertical" ; vertical label bar</div><div> resP@lbOrientation = "horizontal"</div><div> resP@lbLabelAutoStride = True ; nice label bar labels</div><div> resP@lbTitleOn = True</div><div> resP@lbLabelFont = "helvetica"</div><div>; resP@lbTitleString = "Sig lvl"</div><div> resP@lbTitlePosition = "Bottom"</div><div> resP@lbTitleFontHeightF = .022</div><div> resP@lbTitleDirection = "Across"</div><div>; resP@txString = title</div><div> gsn_panel(wks,plot,(/1,1/),res<wbr>P)</div></div><div>end</div></div></div></div><div class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-hq m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-gt m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-a10" id="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-:n2" style="font-size:12.8px"><div id="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-:n5"></div><div class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-aQH" id="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-:n4"><div class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-aZK"></div></div></div><div class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-hi"></div></div><div class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-ajx"></div></div><div class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-gA m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-gt m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-acV" style="font-size:12.8px;background-image:initial;background-color:rgb(255,255,255);border-bottom-left-radius:0px;border-bottom-right-radius:0px;border-top:none"><div class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-gB m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-xu"><div class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-ip m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-iq" style="margin-right:5px;padding-top:12px;padding-right:0px;padding-left:8px;border-top:1px solid rgb(216,216,216)"><div id="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-:ma"><table class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-cf m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-FVrZGe"><tbody><tr><td class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-amq"><img id="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-:0_1" name="m_4748453924827390999_m_-308072296265286732_m_-884517789712184682_m_8539315846516895931_:0" src="https://ssl.gstatic.com/ui/v1/icons/mail/no_photo.png" class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-ajn m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-bofPge"></td><td class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-amr" style="width:731.333px"><div class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-nr m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-tMHS5d"><div class="m_4748453924827390999m_-308072296265286732m_-884517789712184682m_8539315846516895931gmail-amn"><br></div></div></td></tr></tbody></table></div></div></div></div></div>
<br></div></div>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>