<html><head></head><body><div class="ydp5995867ayahoo-style-wrap" style=""><div style="font-family: bookman old style, new york, times, serif; font-size: 16px;"></div>
        <div style="font-family: bookman old style, new york, times, serif; font-size: 16px;">Dear Mary</div><div style="font-family: bookman old style, new york, times, serif; font-size: 16px;">As you suggested I add following line:</div><div style="font-family: bookman old style, new york, times, serif; font-size: 16px;"><span>    res_tot@cnLineDrawOrder<span style="white-space: pre-wrap;">       </span>   = "PostDraw"</span><br></div><div style="">and it works well. Now I have contour lines and also raster contours become smooth. However I still have problem with outlineboundaries and also province shapefiles. I've used below line:</div><div style="">    <span style="background-color: rgb(253, 248, 105);">res_ter</span>@mpOutlineDrawOrder = "PostDraw"<br></div><div style=""><span>However as you may guess it doesn't work, because after that I have:<br>    <span style="background-color: rgb(253, 248, 105);">res_tot</span>@cnFillDrawOrder<span style="white-space: pre-wrap;">     </span>   = "PostDraw"</span></div><div style="">Same problem is for province shapefile, as province boundaries are masked (red lines). But interesting (may be just for me) markers in other shapefile (MASA, OIGG, ...) are not masked!</div><div style="">So the remained problem is masking of <span><span style="color: rgb(0, 0, 0); font-family: bookman old style, new york, times, serif; font-size: 16px;">outlineboundaries and province boundaries in shapefile (WRF4.png is attached).</span></span></div><div style=""><br></div><div style="">I'll be thankful if I could have your help about it.</div><div style=""><br></div><div style="">Sincerely</div><div style="">Ehsan</div>
        
        </div><div id="yahoo_quoted_5524361529" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Thursday, December 20, 2018, 8:29:02 PM GMT+3:30, Mary Haley <haley@ucar.edu> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="yiv3174720689"><div><div dir="ltr"><div class="yiv3174720689gmail_default" style="font-size:small;">Hi Ehsan,</div><div class="yiv3174720689gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv3174720689gmail_default" style="font-size:small;">Good catch on the inland water resource addition!</div><div class="yiv3174720689gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv3174720689gmail_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="yiv3174720689gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv3174720689gmail_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="yiv3174720689gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv3174720689gmail_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="yiv3174720689gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv3174720689gmail_default" style="font-size:small;">Good luck,</div><div class="yiv3174720689gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv3174720689gmail_default" style="font-size:small;">--Mary</div><div class="yiv3174720689gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv3174720689gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv3174720689gmail_default" style="font-size:small;"><br clear="none"></div></div><br clear="none"><div class="yiv3174720689gmail_quote"><div class="yiv3174720689yqt1453147482" id="yiv3174720689yqt25221"><div dir="ltr">On Thu, Dec 20, 2018 at 6:41 AM Ehsan Taghizadeh <<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>> wrote:<br clear="none"></div><blockquote class="yiv3174720689gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div><div class="yiv3174720689gmail-m_6806275183275965050ydpcc96338cyahoo-style-wrap" style=""><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);"> (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 clear="none"></div><div>and it seems works (<span><span style="color:rgb(0,0,0);">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);">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);">precipitation</span></span>  and boundaries <span><span style="color:rgb(0,0,0);">(</span><span style="color:rgb(0,0,0);">WRF3.png in attached</span><span style="color:rgb(0,0,0);">)</span></span>! Beside that I've got RasterFill for precipitation. I've used </div><div><span></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><br clear="none"></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 clear="none"></div><div>    overlay(plot_terrain, plot_raintot)</div><div>    draw(plot_terrain)</div><div>    frame(wks)</div><div><br clear="none"></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 clear="none"></div><div>Sincerely</div><div>Ehsan</div></div>
        
        </div><div class="yiv3174720689gmail-m_6806275183275965050yahoo_quoted" id="yiv3174720689gmail-m_6806275183275965050yahoo_quoted_5541221122">
            <div style="">
                
                <div>
                    On Wednesday, December 19, 2018, 7:55:28 PM GMT+3:30, Mary Haley <<a rel="nofollow" shape="rect" ymailto="mailto:haley@ucar.edu" target="_blank" href="mailto:haley@ucar.edu">haley@ucar.edu</a>> wrote:
                </div>
                <div><br clear="none"></div>
                <div><br clear="none"></div>
                <div><div id="yiv3174720689gmail-m_6806275183275965050yiv7983377680"><div><div dir="ltr"><div dir="ltr"><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small;">Ehsan,</div><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv3174720689gmail-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="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small;">  res@mpFillOn = True</div><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small;">  res@mpOceanFillColor = "SkyBlue"     ; use whatever color you want</div><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small;">  res@mpLandFillColor = "Transparent"    ; to make sure land doesn't get filled</div><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv3174720689gmail-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="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small;">  res@cnFillDrawOrder = "Draw"     ; Also can try "predraw"</div><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small;">  res@mpFillDrawOrder = "PostDraw"</div><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small;">You can see some masking examples at:</div><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default"><a rel="nofollow" shape="rect" target="_blank" href="http://www.ncl.ucar.edu/Applications/mask.shtml">http://www.ncl.ucar.edu/Applications/mask.shtml</a><br clear="none"></div><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default"><br clear="none"></div><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default">Use your browser search to look for "draworder".</div><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default"><br clear="none"></div><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default">--Mary</div><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default"><br clear="none"></div></div></div><br clear="none"><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_quote"><div class="yiv3174720689gmail-m_6806275183275965050yiv7983377680yqt3075401081" id="yiv3174720689gmail-m_6806275183275965050yiv7983377680yqt33075"><div dir="ltr">On Wed, Dec 19, 2018 at 8:13 AM Ehsan Taghizadeh <<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>> wrote:<br clear="none"></div><blockquote class="yiv3174720689gmail-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" target="_blank" href="https://www.ncl.ucar.edu/Applications/grid_fill.shtml">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" target="_blank" href="http://landsea.nc">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="yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail-m_1321186817594108357ydpf8cdb824yahoo-style-wrap"></div></div>_______________________________________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br clear="none">
</blockquote></div></div></div></div></div>
            </div>
        </div></div>_______________________________________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br clear="none">
</blockquote></div></div></div></div></div>
            </div>
        </div></body></html>