<div dir="ltr">Thanks a lot Mary for your kind suggestion. I will put it in my plot.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 5, 2017 at 10:40 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">The key to adding markers, text, lines, or polygons to a WRF plot that was generated using wrf_map_overlays is to set the special resource "PanelPlot" to True, which tells wrf_map_overlays to not draw the plot after the overlay, *and* to not remove all the overlays. It looks something like this:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><div class="gmail_default" style="font-size:small"><span style="font-family:monospace,monospace">  mapres = True</span><br></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">  pltres = True</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">  pltres@PanelPlot = True     ; Tells wrf_map_overlays to not draw plot and   </font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">                              ; to not remove the contours afterwards.        </font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">  plot = wrf_map_overlays(a,wks,<wbr>contour,pltres,mapres)</font></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Then you can add whatever you want to the "plot", using lat/lon values:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">;---Add two dots and two text strings at location of US cities.                            </font></div><div class="gmail_default"><font face="monospace, monospace">  lats  = (/   29.95,       33.75,      36.16,      41.88/)</font></div><div class="gmail_default"><font face="monospace, monospace">  lons  = (/  -90.07,      -84.39,     -86.78,     -87.63/)</font></div><div class="gmail_default"><font face="monospace, monospace">  tstrs = (/"New Orleans","Atlanta", "Nashville", "Chicago"/)</font></div><div class="gmail_default"><font face="monospace, monospace">  mkres = True</font></div><div class="gmail_default"><font face="monospace, monospace">  txres = True</font></div><div class="gmail_default"><font face="monospace, monospace">  mkres@gsMarkerIndex = 16 ; filled dot                                                    </font></div><div class="gmail_default"><font face="monospace, monospace">  txres@txFontHeightF = 0.015</font></div><div class="gmail_default"><font face="monospace, monospace">  txres@txJust        = "CenterLeft"</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">  mkid = gsn_add_polymarker(wks,plot,<wbr>lons,lats,mkres)</font></div><div class="gmail_default"><font face="monospace, monospace">  txid = gsn_add_text(wks,plot,"   " + tstrs,lons,lats,txres)</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">  draw(plot)</font></div><div class="gmail_default"><font face="monospace, monospace">  frame(wks)</font></div></div></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I've attached a sample script and the resultant PNG, which I will add to our example page somewhere.</div><span class="HOEnZb"><font color="#888888"><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></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 5, 2017 at 3:59 AM, swati shewale <span dir="ltr"><<a href="mailto:shewaleswati16@gmail.com" target="_blank">shewaleswati16@gmail.com</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">about above query, I went through function 'str_get_cols'. I understood it. Now I want to put single city (Ahmedabad) annotation in my plotting. I am afraid as am handling wrf file, Can I  accommodate it? please find the attachment, annotation.txt (contains single city), annotation.ncl (wish to put all the statements from this file to wrf_annotation.ncl so that It could reflect Ahmedabad city). kindly provide suggestion. <br></div><div class="m_4768279843904455802HOEnZb"><div class="m_4768279843904455802h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 5, 2017 at 12:30 PM, swati shewale <span dir="ltr"><<a href="mailto:shewaleswati16@gmail.com" target="_blank">shewaleswati16@gmail.com</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">Thanks a lot Mary for quick response. I did download text file provided in link before running annotation_5.ncl. Actually to see values of lons in print statement, I removed minus sign from below statement that leads to blank plot (this I rectify while comparing with your script, thanks for your time). If text file includes all positive lons, why here used minus?   <br><div>  lons       = -tofloat(str_get_field(data,3,<wbr>" "))<br><br>Also what 22 signifies in below statement<br><br>   city_state = str_get_cols(data,22,-1)<br></div></div><div class="m_4768279843904455802m_6618704328052343853HOEnZb"><div class="m_4768279843904455802m_6618704328052343853h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 4, 2017 at 9:32 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">This example works with NCL V6.2.0 (I just verified this). However, I still highly recommend that you upgrade. V6.2.0 is 3.5 years old.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Did you modify annotate_5.ncl at all?  I've attached a version that loops through each city and plots each text string and marker one at a time, just in case.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">This method is NOT recommended as it is slower and more memory intensive.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If this continues to not work for you, then please include the full script and the annotate5.txt file you are using, so we can be sure something else isn't going on.</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="m_4768279843904455802m_6618704328052343853m_2706595098057777131h5">On Mon, Dec 4, 2017 at 3:48 AM, swati shewale <span dir="ltr"><<a href="mailto:shewaleswati16@gmail.com" target="_blank">shewaleswati16@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="m_4768279843904455802m_6618704328052343853m_2706595098057777131h5"><div dir="ltr">Dear NCL users<br><br>I wish to add annotations to my plot. I gone through below link. <br><br><a href="https://www.ncl.ucar.edu/Applications/annotate.shtml" target="_blank">https://www.ncl.ucar.edu/Appli<wbr>cations/annotate.shtml</a><br><br>for time being I took example 5 (<a href="https://www.ncl.ucar.edu/Applications/Scripts/annotate_5.ncl" target="_blank">annotate_5.ncl</a>) as it is, It gives me plot without annotation (attached here). Is it because my NCL version is 6.2.0? <br><br></div>
<br></div></div>______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>