<div dir="ltr">Thanks, Dennis!  This works. <div><div><br></div><div>Chao</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 28, 2016 at 7:57 PM, Dennis Shea <span dir="ltr">&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</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><div><div><div>By default, &#39;gsn_csm_contour_map&#39; uses &#39;gray&#39; to fill land.<br><br></div>See: <a href="http://www.ncl.ucar.edu/Applications/maponly.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Applications/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="h5">On Wed, Dec 28, 2016 at 7:40 PM, Chao Luo <span dir="ltr">&lt;<a href="mailto:chaoluo888@gmail.com" target="_blank">chaoluo888@gmail.com</a>&gt;</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="h5"><div dir="ltr"><div class="m_-884517789712184682m_8539315846516895931gmail-adn m_-884517789712184682m_8539315846516895931gmail-ads" style="padding-bottom:20px;padding-left:8px;font-size:medium"><div class="m_-884517789712184682m_8539315846516895931gmail-gs" style="margin-left:44px"><div id="m_-884517789712184682m_8539315846516895931gmail-:m9" class="m_-884517789712184682m_8539315846516895931gmail-ii m_-884517789712184682m_8539315846516895931gmail-gt m_-884517789712184682m_8539315846516895931gmail-adP m_-884517789712184682m_8539315846516895931gmail-adO" style="font-size:12.8px;margin-bottom:0px;margin-left:0px;padding-bottom:5px"><div id="m_-884517789712184682m_8539315846516895931gmail-:m8" class="m_-884517789712184682m_8539315846516895931gmail-a3s m_-884517789712184682m_8539315846516895931gmail-aXjCH m_-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 &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_code.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_csm.ncl&quot;</div><div>;load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/shea_util.ncl&quot;</div><div> load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/contributed.ncl&quot;</div><div><br></div><div>procedure metaUtil (z[*][*][*]:numeric, time[*], lat[*], lon[*])</div><div><br></div><div>begin</div><div>   z!0  = &quot;time&quot;    ; name dimensions</div><div>   z!1  = &quot;lat&quot;</div><div>   z!2  = &quot;lon&quot;</div><div>   z&amp;time = time    ; assign coordinate variables</div><div>   z&amp;lat  = lat</div><div>   z&amp;lon  = lon</div><div>end</div><div><div>begin</div><div>  f       = addfile (&quot;data/IC_TO_CG.hdf&quot;, &quot;r&quot;)</div><div>  lat   = f-&gt;Latitude</div><div>  lon   = f-&gt;Longitude</div><div>  time  = f-&gt;Day_of_year</div><div>; print(f)</div><div>  IC2CG =  f-&gt;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 (&quot;/home/cluo/<a href="http://landmask.nc/" target="_blank">landmask.nc</a>&quot;,&quot;r&quot;)</div><div>    lat_mask =  f-&gt;lat</div><div>    lon_mask =  f-&gt;lon</div><div>    land = f-&gt;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 (&quot;ps&quot;, &quot;narr&quot;)          ; open workstation</div><div>  gsn_define_colormap(wks,&quot;BlAqG<wbr>rYeOrRe&quot;)        ; choose colormap</div><div>; gsn_define_colormap (wks,&quot;gui_default&quot;)         ; 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&#39;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  = &quot;Always&quot;           ; 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 = &quot;USStates&quot;          ; turn on state boundaries</div><div>; res@mpOutlineBoundarySets = &quot;National&quot;</div><div><br></div><div><br></div><div>  ;;;; set boundary for subregion plot</div><div>   res@mpLimitMode = &quot;LatLon&quot;</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         = &quot;Monthly mean IC/CG, August&quot;             ; draw center subtitle</div><div>  res@gsnCenterStringFontHeightF<wbr>=25</div><div>  res@gsnLeftString           = &quot;&quot;                         ; draw left subtitle</div><div>  res@cnLevelSelectionMode = &quot;ExplicitLevels&quot; ; 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         = &quot;Climatology IC/CG, averaged in July&quot;</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 = &quot;portrait&quot;</div><div>; resP@lbOrientation       = &quot;vertical&quot; ; vertical label bar</div><div>  resP@lbOrientation       = &quot;horizontal&quot;</div><div>  resP@lbLabelAutoStride   = True       ; nice label bar labels</div><div>  resP@lbTitleOn           = True</div><div>  resP@lbLabelFont = &quot;helvetica&quot;</div><div>; resP@lbTitleString       = &quot;Sig lvl&quot;</div><div>  resP@lbTitlePosition     = &quot;Bottom&quot;</div><div>  resP@lbTitleFontHeightF  = .022</div><div>  resP@lbTitleDirection    = &quot;Across&quot;</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_-884517789712184682m_8539315846516895931gmail-hq m_-884517789712184682m_8539315846516895931gmail-gt m_-884517789712184682m_8539315846516895931gmail-a10" id="m_-884517789712184682m_8539315846516895931gmail-:n2" style="font-size:12.8px"><div id="m_-884517789712184682m_8539315846516895931gmail-:n5"></div><div class="m_-884517789712184682m_8539315846516895931gmail-aQH" id="m_-884517789712184682m_8539315846516895931gmail-:n4"><div class="m_-884517789712184682m_8539315846516895931gmail-aZK"></div></div></div><div class="m_-884517789712184682m_8539315846516895931gmail-hi"></div></div><div class="m_-884517789712184682m_8539315846516895931gmail-ajx"></div></div><div class="m_-884517789712184682m_8539315846516895931gmail-gA m_-884517789712184682m_8539315846516895931gmail-gt m_-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_-884517789712184682m_8539315846516895931gmail-gB m_-884517789712184682m_8539315846516895931gmail-xu"><div class="m_-884517789712184682m_8539315846516895931gmail-ip m_-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_-884517789712184682m_8539315846516895931gmail-:ma"><table class="m_-884517789712184682m_8539315846516895931gmail-cf m_-884517789712184682m_8539315846516895931gmail-FVrZGe"><tbody><tr><td class="m_-884517789712184682m_8539315846516895931gmail-amq"><img id="m_-884517789712184682m_8539315846516895931gmail-:0_1" name="m_-884517789712184682_m_8539315846516895931_:0" src="https://ssl.gstatic.com/ui/v1/icons/mail/no_photo.png" class="m_-884517789712184682m_8539315846516895931gmail-ajn m_-884517789712184682m_8539315846516895931gmail-bofPge"></td><td class="m_-884517789712184682m_8539315846516895931gmail-amr" style="width:731.333px"><div class="m_-884517789712184682m_8539315846516895931gmail-nr m_-884517789712184682m_8539315846516895931gmail-tMHS5d"><div class="m_-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>