<div dir="ltr"><div>The <a href="http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_polygon.shtml"><b>gsn_polygon </b></a>procedure allows you to enter arrays</div><div><br></div><div> gsn_polygon(wks, plot, xlon , ylat , gspoly) ; will plot all values with one call</div><div> gsn_polygon(wks, plot, xlonr, ylatr, gspoly) <br></div><div><br></div><div>I have no ideq what the difference between xlon and xlonr is.<br></div><div><br></div><div>The same for <a href="http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_text.shtml"><b>gsn_text</b></a> <br></div><div><br></div><div><div> gsn_text(wks, plot, city, xlon , ylat , gstxt) ; will plot all values with one call</div><div><br></div><div>*You* will likely have to add some location offset so text and circle do not overlap.<br></div><div>===</div><div>If for some reason you want to loop.</div><div><br></div><div> nloc = dimsizes(xlon)</div><div><br></div><div> ncity = dimsizes(city)</div><div><br></div><div> do n=0,nloc-1</div><div> gsn_polygon(wks, plot, xlon(n) , ylat(n) , gsres)</div><div> gsn_text(wks, plot, city(n), xlon(n) , ylat(n) , gstxt)</div><div> end do<br></div><div><br></div><div>Good luck<br></div><div> </div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 20, 2020 at 5:00 AM Sri.durgesh Nandini-Weiss via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</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">Hello dear NCL users,<br>
<br>
I wonder if some one can help me with this script, i am trying to plot a <br>
map only with some circles around specific lat:lon, e.g. london. <br>
Somewhat close to ncl example: poly_8_lbar.ncl<br>
<br>
I am also attaching the figure i want to get as well as my script.<br>
<br>
<br>
;==============================================================<br>
; Open the file: Read only the user specified period<br>
; =============================================================<br>
<br>
; =============================================================<br>
; Extracting selected cities<br>
; =============================================================<br>
<br>
<br>
ylat=(/ 48., 38., 34., -1., -8., -10., -30., -45., -24., -13., <br>
-14., 24.,\<br>
22., 29., 37., 41., 51., 44., 65., 36., 14., 9., <br>
6., -9.,\<br>
-38., -30., -7., 24., 22., 22., 13., -13., 18., 31., <br>
39., 45.,\<br>
-34., -39.,-55./)<br>
<br>
xlon=(/-125.,-123.,-119., -81., -79., -80., -71., -57., -46., -38., <br>
-38., -82.,\<br>
-80., -90., -76., -74., -71., -70., 1., -2., -30., -14., <br>
3., 13.,\<br>
19., 31., 40., 67., 68., 91., 100., 107., 114., 122., <br>
122., 145.,\<br>
153., 145.,-140./)<br>
<br>
ylatr=(/ 48., 37.8, 34., -1., -8.2, -12.2, -30., -35., -24., -13.2, <br>
-3.6, 23.5,\<br>
25.7, 29., 36.8, 41., 42.4, 44., 51.5, 38.5, 14.5, <br>
9., 6., -9.,\<br>
-34.3, -30., -7., 24., 18.7, 22., 13., -5.2, 22., 31., <br>
39., 38.7,\<br>
-34.4, -39.,-55./)<br>
<br>
xlonr=(/-125.,-123.,-119., -81., -79., -77., -71.5, -57., -46., -38.2, <br>
-38.3, -82.2,\<br>
-80., -90., -76., -74., -71., -70., 1., -9.4, -17.6, -14., <br>
3., 13.,\<br>
18.5, 31.4, 40., 67., 72.5, 91., 100., 107., 114.4, 122., <br>
122., 139.7,\<br>
152.6, 145.,-140./)<br>
<br>
city=(/"Vancouver","San Francisco","Los Angeles","Manta","Trujillo","Lima",\<br>
"Gran La Serena","Buenos Aires","Sao <br>
Paulo","Salvado","Fortaleza","Havana",\<br>
"Miami","New Orleans","Virginia Beach","New <br>
York","Boston","Portland",\<br>
"London","Lisbon","Dakar","Conakry","Lagos","Luanda","Cape <br>
Town","Durban",\<br>
"Dar es Salaam","Gadap <br>
Town","Mumbai","Chittagong","Bangkok","Jakarta",\<br>
"Hong <br>
Kong","Shanghai","Dalian","Tokyo","Sydney","Melbourne","Global mean"/)<br>
<br>
;==================================================================<br>
; Here is a section of my code that draws a color fill plot<br>
;====================================================================<br>
<br>
wks = gsn_open_wks("pdf","map_cities")<br>
res = True<br>
res@cnFillOn = True ; turn on color<br>
<br>
res@gsnFrame = False ; don't advance frame<br>
res@cnInfoLabelOn = False ; turn off cn info label<br>
res@cnFillOn = True ; turn on color<br>
<br>
res@mpDataBaseVersion = "MediumRes"<br>
res@cnLinesOn = False<br>
<br>
res@mpCenterLonF = 30.<br>
<br>
res@mpOutlineOn = True<br>
res@mpPerimOn = False<br>
res@gsnMaximize = True ; large format in <br>
landscape<br>
<br>
res@mpLandFillColor = "tan"<br>
res@mpOceanFillColor = "LightBlue"<br>
res@mpInlandWaterFillColor = "Blue"<br>
<br>
At this point, it of course plots a standard map only, but i haven't <br>
figured out how to loop in the polygons based on the lat and lon of my <br>
selected cities gridpoints.<br>
<br>
I wonder if someone can help me code the remainder bit of it?<br>
<br>
Would be really grateful!<br>
<br>
Sri<br>
<br>
<br>
-- <br>
Dr. Sri Nandini-Weiß<br>
Research Scientist<br>
<br>
Universität Hamburg<br>
Center for Earth System Research and Sustainability (CEN)<br>
Cluster of Excellence 'Climate, Climatic Change, and Society' (CLICCS)<br>
<br>
Bundesstrasse 53, 20146 Hamburg<br>
Tel: +49 (0) 40 42838 7472<br>
<br>
_______________________________________________<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></blockquote></div>