<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Ehsan,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Good catch on the inland water resource addition!</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">When you set cnFillDrawOrder to PostDraw, this causes the filled contours to be drawn last, and since these are raster contours and hence blocky looking, you are seeing the artefacts of the blocks bleeding into the contour lines</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">There is a cnLineDrawOrder resource, so perhaps try setting to to "PostDraw" and see if it gets drawn on top of the filled contours. You might have to play around with the cnFillDrawOrder too, maybe setting it to "Draw" instead of "PostDraw".</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If you continue to have problems, let us know.  There are other ways to do this kind of ordering, but it can get a little more involved.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Good luck,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Dec 20, 2018 at 6:41 AM Ehsan Taghizadeh <<a href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_6806275183275965050ydpcc96338cyahoo-style-wrap" style="font-family:"bookman old style","new york",times,serif;font-size:16px"><div></div>
        <div>Dear Mary</div><div>Your answer is exactly what I want. However I still have 2 problems and I'll be thankful for any help about them.</div><div>1. Caspian sea and Black sea didn't fill<span><span style="color:rgb(0,0,0);font-family:"bookman old style","new york",times,serif;font-size:16px"> (WRF1.png in attached)</span></span>! So I added following line:</div><div>    <span style="background-color:rgb(253,248,105)">res_ter</span>@mpInlandWaterFillColor = "SkyBlue"<br></div><div>and it seems works (<span><span style="color:rgb(0,0,0);font-family:"bookman old style","new york",times,serif;font-size:16px">WRF2.png in attached</span></span>).</div><div>2. However in both figures I missed last shaded contours (here <span><span style="color:rgb(0,0,0);font-family:"bookman old style","new york",times,serif;font-size:16px">precipitation</span></span>) on water lands! So I added following line too:</div><div><div>  <span style="background-color:rgb(253,248,105)">res_tot</span>@cnFillDrawOrder = "PostDraw"     ; Also can try "Predraw"</div><div>Now I missed contour lines for both <span><span style="color:rgb(0,0,0);font-family:"bookman old style","new york",times,serif;font-size:16px">precipitation</span></span>  and boundaries <span><span style="color:rgb(0,0,0);font-family:"bookman old style","new york",times,serif;font-size:16px">(</span><span style="color:rgb(0,0,0);font-family:"bookman old style","new york",times,serif;font-size:16px">WRF3.png in attached</span><span style="color:rgb(0,0,0);font-family:"bookman old style","new york",times,serif;font-size:16px">)</span></span>! Beside that I've got RasterFill for precipitation. I've used </div><div><span><div>  res_tot@cnFillMode           = "RasterFill"</div><div>however it didn't affect for figures (WRF1.png and WRF2.png), but it affected WRF3.png!</div></span><br></div><div>My plot lines are as below:</div><div><div>    plot_terrain = gsn_csm_contour_map(wks,HGT,res_ter)</div><div><span style="white-space:pre-wrap">    </span>add_outlines_to_map(wks,plot_terrain)<span style="white-space:pre-wrap">        </span>; OK</div><div>    add_places_to_map(wks,plot_terrain)<span style="white-space:pre-wrap">    </span>; OK</div><div>    plot_raintot = gsn_csm_contour(wks,RainTotal,res_tot)</div><div><br></div><div>    overlay(plot_terrain, plot_raintot)</div><div>    draw(plot_terrain)</div><div>    frame(wks)</div><div><br></div>I hope my email is clear and I ask my problem correctly. Also I attached my script, even though it seems sloppy and doesn't have input data!</div><div>Any help will be appreciated.</div><div><br></div><div>Sincerely</div><div>Ehsan</div></div>
        
        </div><div id="gmail-m_6806275183275965050yahoo_quoted_5541221122" class="gmail-m_6806275183275965050yahoo_quoted">
            <div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
                
                <div>
                    On Wednesday, December 19, 2018, 7:55:28 PM GMT+3:30, Mary Haley <<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="gmail-m_6806275183275965050yiv7983377680"><div><div dir="ltr"><div dir="ltr"><div class="gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small">Ehsan,</div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small">Do you mean that you want to fill the ocean in some solid color and hence mask any data in that area? If so, you can try:</div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small">  res@mpFillOn = True</div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small">  res@mpOceanFillColor = "SkyBlue"     ; use whatever color you want</div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small">  res@mpLandFillColor = "Transparent"    ; to make sure land doesn't get filled</div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small">You might also need to set some draw order resources, to make sure the filled contours and filled map areas get drawn in the right order:</div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small">  res@cnFillDrawOrder = "Draw"     ; Also can try "predraw"</div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small">  res@mpFillDrawOrder = "PostDraw"</div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small">You can see some masking examples at:</div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default"><a rel="nofollow" shape="rect" href="http://www.ncl.ucar.edu/Applications/mask.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/mask.shtml</a><br clear="none"></div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default"><br clear="none"></div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default">Use your browser search to look for "draworder".</div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default"><br clear="none"></div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default">--Mary</div><div class="gmail-m_6806275183275965050yiv7983377680gmail_default"><br clear="none"></div></div></div><br clear="none"><div class="gmail-m_6806275183275965050yiv7983377680gmail_quote"><div class="gmail-m_6806275183275965050yiv7983377680yqt3075401081" id="gmail-m_6806275183275965050yiv7983377680yqt33075"><div dir="ltr">On Wed, Dec 19, 2018 at 8:13 AM Ehsan Taghizadeh <<a rel="nofollow" shape="rect" href="mailto:ehsantaghizadeh@yahoo.com" target="_blank">ehsantaghizadeh@yahoo.com</a>> wrote:<br clear="none"></div><blockquote class="gmail-m_6806275183275965050yiv7983377680gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>Hi,</div><div>May I ask how to fill sea (lake, ...) areas differently from land. I've tried using "<a rel="nofollow" shape="rect" href="https://www.ncl.ucar.edu/Applications/grid_fill.shtml" target="_blank">https://www.ncl.ucar.edu/Applications/grid_fill.shtml</a>" (<span>grid_fill_5.ncl</span>) and I've got attached map.</div><div>That part which I used from grid_fill_5.ncl are:</div><div><br clear="none"></div><div><span></span><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div><div>; Read/open NCL'ls crude (1x1) land-sea mask</div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div><div><br clear="none"></div><div>  a2    = addfile("$NCARG_ROOT/lib/ncarg/data/cdf/<a rel="nofollow" shape="rect" href="http://landsea.nc" target="_blank">landsea.nc</a>","r")</div><div>  lsdata = a2->LSMASK</div><div>  lsm  = landsea_mask(lsdata, xlat, xlong)</div><div><br clear="none"></div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div><div><br clear="none"></div><div>     HGT2  := HGT                                  ; replicate for plot</div><div>     HGT2  = where(lsm.eq.0 , HGT2@_FillValue , HGT2)</div><div>     HGT2  = where(lsm.eq.2 , HGT2@_FillValue , HGT2)</div><div>     HGT2  = where(lsm.eq.4 , HGT2@_FillValue , HGT2)</div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div><div><br clear="none"></div>where "HGT" is "<span>Terrain Height</span>" of WRF. The issue of the attached file is raster filled of sea areas. However is there a better way to fill sea areas?</div><div><br clear="none"></div><div>Sincerely</div><div>Ehsan</div><div class="gmail-m_6806275183275965050yiv7983377680gmail-m_1321186817594108357ydpf8cdb824yahoo-style-wrap"></div></div>_______________________________________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br clear="none">
</blockquote></div></div></div></div></div>
            </div>
        </div></div>_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>