<div dir="ltr">Hi Kunal,<div>The examples shown on the area_poly_sphere documentation page also illustrate how to use gc_clkwise and gc_qarea, the latter having the requirement of input lat/lon arrays having a size of 4. This was done to show that the results are the same between gc_qarea and area_poly_sphere (when input lat/lon arrays are of size 4). Try just calling area_poly_sphere and all should be well.</div><div>Adam</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 5, 2018 at 9:32 AM, Kunal Bali <span dir="ltr"><<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@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"><div>Dear Dennis Sir, </div><div>Thanks for this suggestion. </div><div><br></div>I tried that one, but I think these examples are applicable to rectangular box only with the 4 lat lon grid points. <div><br></div><div>I followed the examples on that page. e.g. <br><div><br></div><div><div>ncl 0> rsph = 1.0</div><div>ncl 1> lonv = (/77.98,77.96,79.01,80.02,80.<wbr>98,81.57,81.98,83.01,84.00,83.<wbr>99,83.01,83.01,80.98,81.00,80.<wbr>01,79.64,79.63,79.01,77.98/)</div><div>ncl 2>  latv = (/31.00,29.70,29.15,28.82,28.<wbr>43,28.01,27.98,27.47,27.38,28.<wbr>64,28.99,29.40,29.56,29.99,30.<wbr>05,30.01,30.61,30.64,31.00/)</div><div>ncl 3> qorder     = gc_clkwise(latv, lonv)  </div><div>ncl 4> qarea_gc   = gc_qarea(latv, lonv) </div><div><font color="#ff0000">fatal:gc_qarea: the last (rightmost) dimension of arrays must be 4   </font></div><div><font color="#ff0000">fatal:["Execute.c":8576]:<wbr>Execute: Error occurred at or near line 4</font></div></div><div><br></div><div><br></div><div><br></div><div class="gmail_extra"><br clear="all"><div><div class="m_-5100322060097048020gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>---<br></div><div>Kunal Bali<br></div><div><br></div><div><br></div><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Mon, Feb 5, 2018 at 9:09 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@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><div>Did you look at any of the functions?<br><br></div>Click "Functions" ; Click "Alphabetical Listing"; Search 'area'<br><br></div>Keep going till you find something: Like .......<br><div><div><br><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/area_poly_sphere.shtml" target="_blank">http://www.ncl.ucar.edu/Docume<wbr>nt/Functions/Built-in/area_pol<wbr>y_sphere.shtml</a><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-5100322060097048020h5">On Mon, Feb 5, 2018 at 5:32 AM, Kunal Bali <span dir="ltr"><<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@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_-5100322060097048020h5"><div dir="ltr"><div><div><div><div>Dear NCL users,<br><br></div>I have coordinates such as <br>lonv = (/77.98,77.96,79.01,80.02,80.9<wbr>8,81.57,81.98,83.01,84.00,83.9<wbr>9,83.01,83.01,80.98,81.00,80.0<wbr>1,79.64,79.63,79.01,77.98/)<br> <br>  latv = (/31.00,29.70,29.15,28.82,28.4<wbr>3,28.01,27.98,27.47,27.38,28.6<wbr>4,28.99,29.40,29.56,29.99,30.0<wbr>5,30.01,30.61,30.64,31.00/)<br><br><br></div>from that, I am able to plot the polygon line e.g.<br><br><br><img src="cid:ii_jda76qwk0_16165f22b570bc3f" style="margin-right:0px" width="214" height="183"><br> <br><br></div>So, could anyone please let me know how to calculate the area (in km) of this polygon box?<br><br><br></div>thank you<br clear="all"><div><div><div><div><div><div><div class="m_-5100322060097048020m_-5591494292313564852m_-803635958625206016gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>---<br></div><div>Kunal Bali<br></div><br><div><br></div><div><br></div><div><p style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div></div></div></div></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>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</div>