<div dir="ltr"><div><div><div><div>The region is so small that you can ignore the curvature of the earth and treat it like cartesian coordinates<br><br></div><div>A simple modification of Example 4 at: <br> <a href="http://www.ncl.ucar.edu/Applications/polyg.shtml">http://www.ncl.ucar.edu/Applications/polyg.shtml</a><br><br></div><div>See attachment<br></div><div>==========================================<br>undef("circle")<br>function circle(lon0[1]:numeric, lat0[1]:numeric, rkm[1]:numeric)<br>begin<br> R = rkm/111.2 ; 111.2 km/degree_of_latitude; hence R=>degrees<br> cir = ispan(0,360,1)*0.01745329 <br> ncirc = dimsizes(cir)<br><br> ; equations for circle<br> lonc = R*cos(cir) + lon0<br> latc = R*sin(cir) + lat0<br><br> lonlat = new ( (/2,ncirc/),typeof(lon0))<br> lonlat(0,:) = lonc <br> lonlat(1,:) = latc <br> lonlat@long_name = "lon=0, lat=1 locations of circle"<br> return(lonlat)<br>end<br><br><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 6, 2015 at 2:18 AM, grace <span dir="ltr"><<a href="mailto:313695096@qq.com" target="_blank">313695096@qq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:24px"><font style="line-height:30px" size="4">Hi,all:</font></span><div style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:23px"><span style="line-height:24px"><font style="line-height:30px" size="4"> I am wondering how to add a circle on a plot?</font></span></div><div style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:23px"><span style="line-height:24px"><font style="line-height:30px" size="4"> For example,I want to indicate a round area on a drawn plot,take A(130°E,45°N)as the origin,40km as radius.How to add a such circle on a drawn plot like </font></span><span style="white-space:pre-wrap;font-family:courier;line-height:16px"><font size="4"><b>gsn_add_polymarker</b></font></span></div><div style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:23px"><span style="line-height:1.5;font-size:large"><br></span></div><div style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:23px"><span style="line-height:24px"><font style="line-height:30px" size="4"> Do NCL have such function?</font></span></div><div style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:23px"><span style="line-height:24px"><font style="line-height:30px" size="4"> Or do you guys have some advice?</font></span></div><div style="font-family:'lucida Grande',Verdana,'Microsoft YaHei';line-height:23px"><span style="line-height:24px"><font style="line-height:30px" size="4"> any information will be appreciated<span style="line-height:0px"></span></font></span></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>