<div dir="ltr"><div class="gmail_default" style="font-size:small">Tabish,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks for providing your files offline.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">There are a number of ways adding the domain boxes to your WRF map plot could be done. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Since I don't have a lot of time to clean this up, I decided to combine the code from plotgrids.ncl and the wrf_wps_dom function to create a new function called "wrf_add_wps_dom". This function takes a map created from "wrf_map_overlays" and adds the domain boxes to it, based on a namelist.wps file.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I've attached the script for the new function, and a modified version of wrf_wps_ter4.ncl that uses it. Basically, you want to call wrf_map_overlays as usual, but you need to set:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">pltres@PanelPlot = True</font></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">which tells wrf_map_overlays not to remove the contour plot after it's done. This allows you to then call wrf_add_wps_dom to add the lines and text to the existing map. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Here's a code snippet of what it looks like:</div><div class="gmail_default" style="font-size:small">
<p class=""><font face="monospace, monospace"><span class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"<br></span>load "./wrf_add_dom.ncl"</font></p><p class=""><font face="monospace, monospace"> . . .</font></p></div><div class="gmail_default" style=""><div class="gmail_default" style=""><font face="monospace, monospace"> contour = wrf_contour(a,wks,ter,res)</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"> pltres = True ; Set plot options</font></div><div class="gmail_default" style=""><font face="monospace, monospace"> mpres = True ; Set map options</font></div><div class="gmail_default" style=""><font face="monospace, monospace"> pltres@PanelPlot = True ; Don't remove contour plot after the overlay</font></div><div class="gmail_default" style=""><font face="monospace, monospace"> plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres) ; Plot the data over a map background</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"> plot = wrf_add_wps_dom(wks,plot) ; Add domain boxes to map</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"> draw(plot) ; This will draw contours, map, domain lines, and text</font></div><div class="gmail_default" style=""><font face="monospace, monospace"> frame(wks)</font></div><div class="gmail_default" style=""><br></div><div class="gmail_default" style="">--Mary</div><div class="gmail_default" style=""><br></div><div style="font-size:small"><br></div></div>
</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 19, 2016 at 4:27 PM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></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 class="gmail_default" style="font-size:small">Tabish,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">This is an excellent question. I will try to come up with an example for you tonight or tomorrow. I want to do a "good" example so I can include it on our examples website.</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><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Apr 19, 2016 at 3:22 PM, Tabish Ansari <span dir="ltr"><<a href="mailto:tabishumaransari@gmail.com" target="_blank">tabishumaransari@gmail.com</a>></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="gmail_default" style="font-family:trebuchet ms,sans-serif">Hi<br><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">I've been using the standard example scripts plotgrids.ncl to preview domain and <a href="http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/BASIC/wrf_wps_ter4.ncl" target="_blank">wrf_wps_ter4.ncl</a> to plot terrain. The first script reads in the namelist.wps while the second one reads in the <a href="http://geo_em.d0x.nc" target="_blank">geo_em.d0x.nc</a> file.<br><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">I need to plot the topography using the wrf_map_overlays() function just the same way as in wrf_wps_ter4.ncl but I also need to overlay a box depicting the next nest(s) like in plotgrids.ncl. How can I achieve that?<br><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Thanks in advance!<br><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Tabish<br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br clear="all"></div><div><div><div dir="ltr"><div><div><font size="1"><span style="font-family:tahoma,sans-serif">Tabish U Ansari<br></span></font></div><font size="1"><span style="font-family:tahoma,sans-serif">PhD student, Lancaster Environment Center<br></span></font></div><font size="1"><span style="font-family:tahoma,sans-serif">Lancaster Univeristy<br> <span>Bailrigg</span>, <span>Lancaster</span>, <br><span>LA1 4YW</span>, <span>United Kingdom</span></span></font><br></div></div></div>
</div>
<br></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>
<br></blockquote></div><br></div>
</blockquote></div><br></div>