<div dir="ltr"><div class="gmail_default" style="font-size:small">Ehsan,</div><div class="gmail_default" style="font-size:small"><br></div>Please look at the last script I sent you, the one called WRF_pcp_tv_mod_layers.ncl<span class="gmail_default" style="font-size:small">.</span><div><span class="gmail_default" style="font-size:small"><br></span></div><div><span class="gmail_default" style="font-size:small">It shows how to create the various plots that you want, in the order that you want everything drawn. If you want to see the mpGeophysical/National lines, then instead of adding them to the terrain plot, try adding them to the code that creates "wrf_map", as this is the last plot that gets drawn on top of everything else.</span></div><div><span class="gmail_default" style="font-size:small"><br></span></div><div><span class="gmail_default" style="font-size:small">--Mary</span></div><div><span class="gmail_default" style="font-size:small"><br></span></div><div><span class="gmail_default" style="font-size:small"><br></span></div><div><span class="gmail_default" style="font-size:small"></span>
</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 21, 2018 at 6:38 PM 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_8950290118309776017ydp32493cyahoo-style-wrap" style="font-family:"bookman old style","new york",times,serif;font-size:16px"><div></div>
<div>Dear Mary,</div><div>I really appreciate for your time and very helpful reply and script.</div><div>You are right <span><span style="color:rgb(0,0,0);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:small">whether I want the rain totals over land and water</span></span>. So your attached figure is what I want. However, the problem is that country boundaries have been covered by rain! I mean (<span>mpGeophysicalLineColor and <span>mpNationalLineColor</span></span>) which have taken black color, have gone under rain contours.</div><div><br></div><div>Sincerely</div><div>Ehsan</div>
</div><div id="gmail-m_8950290118309776017yahoo_quoted_6139599904" class="gmail-m_8950290118309776017yahoo_quoted">
<div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
<div>
On Saturday, December 22, 2018, 3:42:12 AM 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_8950290118309776017yiv8654573924"><div><div dir="ltr"><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small">Ehsan,</div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small">I was concerned that the last script might have slowed down the plotting too much, so I created a second version that is faster. It goes back to setting tfDoNDCOverlay=True, which makes the plotting faster. </div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small">This time, however, instead of using "overlay" to overlay the plots, the script simply creates three plots:</div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small">1. Filled terrain plot over a map</div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small">2. Filled rain total plot </div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small">3. WRF map with city markers, text, and shapefile outlines added</div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small">and then it makes sure these three plots have the same vpXF / vpYF / vpWidthF / vpHeightF values and draws them one after. This script takes about 4 seconds on my Mac compared to 11 seconds for the other one. The advantage of this script is that you don't have to deal with as many "DrawOrder" resources, as the draw order is controlled by creating individual plots and drawing them in the order you want them to appear.</div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small">--Mary</div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small"><br clear="none"></div></div><br clear="none"><div class="gmail-m_8950290118309776017yiv8654573924yqt0405435661" id="gmail-m_8950290118309776017yiv8654573924yqt79703"><div class="gmail-m_8950290118309776017yiv8654573924gmail_quote"><div dir="ltr">On Fri, Dec 21, 2018 at 8:34 AM Mary Haley <<a rel="nofollow" shape="rect" href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>> wrote:<br clear="none"></div><blockquote class="gmail-m_8950290118309776017yiv8654573924gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small">Ehsan,</div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small">That's what I wasn't sure of, whether you wanted the rain totals over land and water.</div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small">This involved a minor tweak to a draw order resource. Is the attached what you want?</div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small">Here are some of the changes I had to make to get this script to work:</div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small"><ul><li>In order to get the markers and shapefile polylines to not be covered up, I had to add them to the rain total plot, since this plot is the one that gets drawn last.<br clear="none"><br clear="none"></li><li>Since the rain total plot was a simple contour plot with no concept of X and Y coordinate values, you can't add lat/lon markers and shapefile polylines to it because it needs lat/lon information to do this. So, I had to add sfXArray and sfYArray resources for this plot, and that makes it possible to attach lat/lon stuff to it.<br clear="none"><br clear="none"></li><li>To stay consistent, I also set sfXArray and sfYArray to the terrain plot.<br clear="none"><br clear="none"></li><li>Now that sfX/YArray are being set, you do NOT want to set tfDoNDCOverlay for either plot. Also, you must set gsnAddCyclic to False for both plots so it doesn't try to add a longitude cyclic point.</li></ul></div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small">Unfortunately, when you set sfX/YArray, this means your plot takes a longer to draw, because now it is doing a transformation calculation.</div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small">See attached.</div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small">--Mary</div><div class="gmail-m_8950290118309776017yiv8654573924gmail_default" style="font-size:small"><br clear="none"></div></div><br clear="none"><div class="gmail-m_8950290118309776017yiv8654573924gmail_quote"><div dir="ltr">On Fri, Dec 21, 2018 at 12:39 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_8950290118309776017yiv8654573924gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061ydp4e36db3fyahoo-style-wrap"><div></div>
<div>Dear Mary,</div><div>In your attached figure, water in lake cover total rain and this is wrong! But poly line of shapefile are seen under rain total and this is OK.</div><div><br clear="none"></div><div>Sincerely</div><div>Ehsan</div>
</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yahoo_quoted" id="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yahoo_quoted_5700866310">
<div>
<div>
On Friday, December 21, 2018, 4:30:42 AM GMT+3:30, Mary Haley <<a rel="nofollow" shape="rect" href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div id="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666"><div><div dir="ltr"><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail_default" style="font-size:small">Thanks for providing the files.</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail_default" style="font-size:small">I think I understand the ordering of everything that you want, and it can be really frustrating trying to do this with NCL.</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail_default" style="font-size:small">The issue is simply that since the lines and markers are being added to the terrain map, and then the rain total contours are being drawn on top of that, they are going to cover up the lines and markers.</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail_default" style="font-size:small">The solution seem to be to add the lines and markers to the rain total plot instead, but in order to do this, you have to provide lat/lon coordinate information to the rain total map, so that the lines and markers are added in the correct locations.</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail_default" style="font-size:small">Before I go any further with this, can you tell me if the attached image is what you are looking for?</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail_default" style="font-size:small">thanks,</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail_default" style="font-size:small">--Mary</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail_default" style="font-size:small"><br clear="none"></div></div><br clear="none"><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail_quote"><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666yqt0146387486" id="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666yqt68244"><div dir="ltr">On Thu, Dec 20, 2018 at 4:43 PM 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_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796ydpf19213c8yahoo-style-wrap"><div></div>
<div>Dear Mary,</div><div>I'm so sorry that this debugging has been prolonged. I've tried to fix the problems by myself, however unfortunately I failed.</div><div>I've put input data files in ftp: (<span>wrfout_d01_2018-12-19.tar.gz, <span>shp_stations.tar.gz, <span>shp_ostan.tar.gz</span></span></span>), also my color table (<span>tvprecp.rgb</span>).</div><div>I've also attached my script, and two figures which reflect my problem. As you can see, national boundaries (black poly lines) and province boundaries (red poly lines) are masked in WRF5.png by precipitation contours.</div><div><br clear="none"></div><div>I hope you have time to consider my problem again.</div><div>Sincerely</div><div>Ehsan</div>
</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yahoo_quoted" id="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yahoo_quoted_5662902415">
<div>
<div>
On Friday, December 21, 2018, 2:01:08 AM GMT+3:30, Mary Haley <<a rel="nofollow" shape="rect" href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div id="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640"><div><div dir="ltr"><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail_default" style="font-size:small">I'm not sure I follow all that logic, because I'm losing track of what's being drawn when. :-)</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail_default" style="font-size:small"><br clear="none"></div>But, this might work:<br clear="none"><br clear="none"> lnres@gsPolyDrawOrder = "PostDraw" <div><br clear="none"></div><div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail_default" style="font-size:small">If that doesn't work, then I'll need more clarification on what you mean by things being masked or not masked. For example, in the image you provided, I can see the red province lines, but I'm not sure where you were expecting the markers to show up.</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail_default" style="font-size:small">At some point I may need to have your script and data if I'm going to continue debugging this.</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail_default" style="font-size:small">--Mary</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail_default" style="font-size:small"><br clear="none"></div><br clear="none"></div></div><br clear="none"><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail_quote"><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640yqt5776879907" id="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640yqt12836"><div dir="ltr">On Thu, Dec 20, 2018 at 12:36 PM 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_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936ydp5995867ayahoo-style-wrap"><div></div>
<div>Dear Mary</div><div>As you suggested I add following line:</div><div><span> res_tot@cnLineDrawOrder<span style="white-space:pre-wrap"> </span> = "PostDraw"</span><br clear="none"></div><div>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> <span style="background-color:rgb(253,248,105)">res_ter</span>@mpOutlineDrawOrder = "PostDraw"<br clear="none"></div><div><span>However as you may guess it doesn't work, because after that I have:<br clear="none"> <span style="background-color:rgb(253,248,105)">res_tot</span>@cnFillDrawOrder<span style="white-space:pre-wrap"> </span> = "PostDraw"</span></div><div>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>So the remained problem is masking of <span><span style="color:rgb(0,0,0)">outlineboundaries and province boundaries in shapefile (WRF4.png is attached).</span></span></div><div><br clear="none"></div><div>I'll be thankful if I could have your help about it.</div><div><br clear="none"></div><div>Sincerely</div><div>Ehsan</div>
</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yahoo_quoted" id="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yahoo_quoted_5524361529">
<div>
<div>
On Thursday, December 20, 2018, 8:29:02 PM GMT+3:30, Mary Haley <<a rel="nofollow" shape="rect" href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div id="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689"><div><div dir="ltr"><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_default" style="font-size:small">Hi Ehsan,</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_default" style="font-size:small">Good catch on the inland water resource addition!</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_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-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_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-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_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-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_default" style="font-size:small">Good luck,</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_default" style="font-size:small">--Mary</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_default" style="font-size:small"><br clear="none"></div></div><br clear="none"><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_quote"><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689yqt1453147482" id="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689yqt25221"><div dir="ltr">On Thu, Dec 20, 2018 at 6:41 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_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050ydpcc96338cyahoo-style-wrap"><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="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yahoo_quoted" id="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yahoo_quoted_5541221122">
<div>
<div>
On Wednesday, December 19, 2018, 7:55:28 PM GMT+3:30, Mary Haley <<a rel="nofollow" shape="rect" href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div id="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680"><div><div dir="ltr"><div dir="ltr"><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small">Ehsan,</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-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_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small"> res@mpFillOn = True</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small"> res@mpOceanFillColor = "SkyBlue" ; use whatever color you want</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small"> res@mpLandFillColor = "Transparent" ; to make sure land doesn't get filled</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-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_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small"> res@cnFillDrawOrder = "Draw" ; Also can try "predraw"</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small"> res@mpFillDrawOrder = "PostDraw"</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small">You can see some masking examples at:</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default" style="font-size:small"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-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_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default">Use your browser search to look for "draworder".</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default"><br clear="none"></div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default">--Mary</div><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_default"><br clear="none"></div></div></div><br clear="none"><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680gmail_quote"><div class="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-m_6806275183275965050yiv7983377680yqt3075401081" id="gmail-m_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-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_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-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_8950290118309776017yiv8654573924gmail-m_-2055739261839121041gmail-m_-6062358963142451061yiv7096928666gmail-m_3489896141552581796yiv8834999640gmail-m_-7625574039524878936yiv3174720689gmail-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 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 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 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 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>
</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>