<html><head></head><body><div class="ydp11c48cdbyahoo-style-wrap" style="font-family: bookman old style, new york, times, serif; font-size: 16px;"><div></div>
<div>Dear Mary</div><div><br></div><div>I've changed a little your script, as I just want "2m RH" and "10 u,v". I've also added my shape files. However I had my two main problems, yet.</div><div>1- I couldn't have countries boundaries, in spite of adding following lines:</div><div><br></div><div><span><div style="color: rgb(0, 0, 0); font-family: bookman old style, new york, times, serif; font-size: 16px;"><span><div style="color: rgb(0, 0, 0); font-family: bookman old style, new york, times, serif; font-size: 16px;">rh_res = wrf_map_resources(f,rh_res) ; Required for setting native WRF map projection</div><div style="color: rgb(0, 0, 0); font-family: bookman old style, new york, times, serif; font-size: 16px;">(instead of: tc_res = wrf_map_resources(f,tc_res))</div><div style="color: rgb(0, 0, 0); font-family: bookman old style, new york, times, serif; font-size: 16px;"><br></div></span>;---Boundaries<span style="white-space: pre-wrap;"> (</span>3 following lines Don't work???)</div><div style="color: rgb(0, 0, 0); font-family: bookman old style, new york, times, serif; font-size: 16px;"> rh_res@mpDataSetName = "Earth..4" ; 1 through 4</div><div style="color: rgb(0, 0, 0); font-family: bookman old style, new york, times, serif; font-size: 16px;"> rh_res@mpNationalLineColor = "black" ; "mpCountyLineColor" doesn't work</div><div style="color: rgb(0, 0, 0); font-family: bookman old style, new york, times, serif; font-size: 16px;"> rh_res@mpNationalLineThicknessF = 2.5 ; "mpCountyLineThicknessF" doesn't work</div><div><br></div></span></div><div><br></div><div>2- I want to draw "RH" contours for all values, and fill it just for RH>=80%.</div><div><br></div><div>Attached file is output of edited script.</div><div><br></div><div><span><div> </div></span></div><div><br></div><div>Sincerely</div><div>Ehsan</div><div><br></div>
</div><div id="yahoo_quoted_3033562869" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Thursday, November 15, 2018, 9:23:21 PM GMT+3:30, Mary Haley <haley@ucar.edu> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv7279426491"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="yiv7279426491gmail_default" style="font-size:small;">Ehsan,</div><div class="yiv7279426491gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv7279426491gmail_default" style="font-size:small;">Please include ncl-talk when you have followup questions about ncl-talk, unless we specifically ask to take the conversation offline.</div><div class="yiv7279426491gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv7279426491gmail_default" style="font-size:small;">[1] If you are attaching shapefile outlines, in general you don't also want to be drawing NCL's map outlines. So, you shouldn't need to set mpOutlineBoundarySets or mpDataSetName.</div><div class="yiv7279426491gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv7279426491gmail_default" style="font-size:small;">If you do need to set these for some reason, then you need to set these resources for when you call one of the gsn map functions, like gsn_csm_map or gsn_csm_contour_map.</div><div class="yiv7279426491gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv7279426491gmail_default" style="font-size:small;">[2] To just fill in the RH2 values above 80, you can give gsn_csm_contour one contour level and then provide two colors to indicate what color you want for everything less than that level, and what color you want for everything greater than or equal to it.</div><div class="yiv7279426491gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv7279426491gmail_default" style="font-size:small;">Something like this:</div><div class="yiv7279426491gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv7279426491gmail_default" style="font-size:small;"><div class="yiv7279426491gmail_default"><font face="monospace, monospace"> rh_res@cnFillOn = True</font></div><div class="yiv7279426491gmail_default"><font face="monospace, monospace"> rh_res@cnLevelSelectionMode = "ExplicitLevels"</font></div><div class="yiv7279426491gmail_default"><font face="monospace, monospace"> rh_res@cnLevels = 80.</font></div><div class="yiv7279426491gmail_default"><font face="monospace, monospace"> rh_res@cnFillColors = (/"transparent","navyblue"/)</font></div><div class="yiv7279426491gmail_default"><font face="monospace, monospace"> rh_res@cnLineLabelsOn = False</font></div><div class="yiv7279426491gmail_default"><font face="monospace, monospace"> rh_res@lbLabelBarOn = False</font></div><div class="yiv7279426491gmail_default"><font face="monospace, monospace"><br clear="none"></font></div><div class="yiv7279426491gmail_default"><font face="arial, helvetica, sans-serif">Note that this will fill in everything where RH2 >= to 80 (not RH 2 > 80). If you really need to do this for RH2 > 80, then you can use a slightly bigger value for the contour level.</font></div><div class="yiv7279426491gmail_default"><font face="arial, helvetica, sans-serif"><br clear="none"></font></div><div class="yiv7279426491gmail_default"><font face="arial, helvetica, sans-serif">Another way to do this is to use the "where" function:</font></div><div class="yiv7279426491gmail_default"><br clear="none"></div><div class="yiv7279426491gmail_default"><font face="arial, helvetica, sans-serif">rh2@_FillValue = -999</font></div><div class="yiv7279426491gmail_default"><font face="arial, helvetica, sans-serif">rh2 = where(rh2.gt.80,rh2,rh2@_FillValue)</font></div><div class="yiv7279426491gmail_default"><font face="arial, helvetica, sans-serif"><br clear="none"></font></div><div class="yiv7279426491gmail_default"><font face="arial, helvetica, sans-serif">When you do this, however, you may notice that the RH2 contours are now blocky looking, because NCL can't give you smooth contours at locations that go up against a bunch of missing values. Also you will now get a warning:</font></div><div class="yiv7279426491gmail_default"><font face="arial, helvetica, sans-serif"><br clear="none"></font></div><div class="yiv7279426491gmail_default"><font face="arial, helvetica, sans-serif"></font><div class="yiv7279426491gmail_default">warning:ContourPlotSetValues: Data values out of range of levels set by EXPLICITLEVELS mode</div><div><br clear="none"></div><div>because NCL is not finding any values below 80, and it's just warning you about this.</div></div><div class="yiv7279426491gmail_default"><font face="arial, helvetica, sans-serif"><br clear="none"></font></div><div class="yiv7279426491gmail_default">I've attached a sample script that shows RH2 (filled in navy blue) and the difference between using "where" and not.</div><div class="yiv7279426491gmail_default"><br clear="none"></div><div class="yiv7279426491gmail_default">--Mary</div><div class="yiv7279426491gmail_default"><br clear="none"></div></div><div class="yiv7279426491gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv7279426491gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv7279426491gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv7279426491gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv7279426491gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv7279426491gmail_default" style="font-size:small;"><br clear="none"></div></div></div></div><div class="yiv7279426491yqt5688011736" id="yiv7279426491yqt81433"><div class="yiv7279426491gmail_extra"><br clear="none"><div class="yiv7279426491gmail_quote">On Wed, Nov 14, 2018 at 11:11 PM, Ehsan Taghizadeh <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>></span> wrote:<br clear="none"><blockquote class="yiv7279426491gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div></div>
<div>Dear Mary</div><div>Thank you very much for your helpful reply. I used "<span>wrf_gsn_5.ncl"</span> from</div><div><span><a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Applications/wrfgsn.shtml" style="color:rgb(25,106,212);text-decoration-line:underline;font-family:Helvetica Neue, Helvetica, Arial, sans-serif;">https://www.ncl.ucar.edu/ Applications/wrfgsn.shtml</a></span><br clear="none"></div><div>and added shapefiles to "map".</div><div>I need two <span><span style="color:rgb(0,0,0);font-family:bookman old style, new york, times, serif;font-size:16px;">more </span></span>helps now, and I'll be thankful if I could have any suggestion again:</div><div><br clear="none"></div><div>1- where should I add boundaries</div><div><span></span><div>@mpOutlineBoundarySets <span style="white-space:pre-wrap;"> </span>= "National"</div><div>@mpDataSetName = "Earth..4" ; 1 through 4<br clear="none"></div><div><br clear="none"></div></div><div>I've tried to add them to "res_map", but it seems doesn't work!</div><div><br clear="none"></div><div>2- I've used "2m Relative Humidity" and contoured it. How could I fill it just for RH>80% (just one color)</div><div><br clear="none"></div><div>If it helps I could attach the script. However I've attached one sample of output.</div><div><br clear="none"></div><div>Sincerely</div><div>Ehsan</div>
</div><div id="yiv7279426491m_5839482278452081718yahoo_quoted_2292740708">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;"><span class="yiv7279426491">
</span><div>
On Wednesday, November 14, 2018, 8:51:23 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="yiv7279426491m_5839482278452081718yiv1388694067"><div><span class="yiv7279426491"></span><div dir="ltr"><div dir="ltr"><div style="font-size:small;">Ehsan,</div><div style="font-size:small;"><br clear="none"></div><div style="font-size:small;">Please see example wrf_gsn_5.ncl and wrf_nogsn_5.ncl at</div><div style="font-size:small;"><br clear="none"></div><div><a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Applications/wrfgsn.shtml">https://www.ncl.ucar.edu/ Applications/wrfgsn.shtml</a><br clear="none"></div><div><br clear="none"></div><div>It shows you how to overlay several WRF plots on top of each other, using WRF plotting functions, and gsn_csm plotting functions.</div><div><br clear="none"></div><div>Adding shapefile outlines should be done to the map plot, and I believe there's an example on the same page.</div><div><br clear="none"></div><div>--Mary</div><div><br clear="none"></div></div></div><div><br clear="none"><div><span class="yiv7279426491">On Wed, Nov 14, 2018 at 12:49 AM, Ehsan Taghizadeh <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>></span> wrote:<br clear="none"></span><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div id="yiv7279426491m_5839482278452081718yiv1388694067yqt98647"><div><span class="yiv7279426491"></span><div>Hi,</div><div>I have some basic problems about overlaying different quantities of WRF, for a few months and unfortunately, until now I couldn't solve it and I'll be thankful if I could have any help for this.</div><div>I saw "<a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Training/Tutorials/WRF_Users_Workshop/WRF_NCL.shtml">https://www.ncl.ucar.edu/ Training/Tutorials/WRF_Users_ Workshop/WRF_NCL.shtml</a>", (<span><a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Training/Tutorials/WRF_Users_Workshop/Scripts/wrf_demo_plot_tc_gsn_shapefiles.ncl" style="margin:0px;padding:0px;color:rgb(133,45,133);font-family:verdana, sans-serif;font-size:13.3333px;">wrf_demo_plot_tc_gsn_ shapefiles.ncl</a></span>). It is near to what if want. I just want to add some quantities to it and overlay on it"</div><div><span>uv10 = wrf_user_getvar(f0,"uvmet10", it); <span> u at 10 m, mass point</span> </span></div><span class="yiv7279426491"></span><div><span><span>rh2 = wrf_user_getvar(f,"rh2",0)<span><span style="color:rgb(0,0,0);font-family:bookman old style, new york, times, serif;font-size:16px;">;</span></span><span style="white-space:pre-wrap;"> </span> 2m Relative Humidity (%)</span><br clear="none"></span></div><div><span><span><br clear="none"></span></span></div><div><span><span>I mean overlay of "uv10" as vector and "rh2" as contour, on "terrain" and "shapefiles".</span></span></div><div><span><span>I've written some scripts and I could send it. I want to use "gsn_csm_countour", "gsn_csm_vector", and "overlay" for related quantities.</span></span></div><div><span><span>I hear from Mary Haley "<span><span style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:small;">I recommend that people use the gsn_csm_contour_map function for plotting WRF data when they need to add a lot of customization to the plot</span></span>", for that reason I pointed "gsn".</span></span></div><div><span><span><br clear="none"></span></span></div><div><span><span>I'll be thankful for any help. As I said above I have this problem for a few months, before August, when I tried to plot a cross-section of WRF quantities with overlaying them. For now, I just want vector and contour, not a cross-section.</span></span></div><div><span><span><br clear="none"></span></span></div><div><span><span>Sincerely</span></span></div><span><font color="#888888"></font></span><div><span><span>Ehsan</span></span></div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"></div></div></div><span class="yiv7279426491"><br clear="none">______________________________ _________________<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">
<br clear="none"></span></blockquote></div><br clear="none"></div></div></div></div>
</div>
</div></div></blockquote></div><br clear="none"></div></div></div></div></div>
</div>
</div></body></html>