<div dir="ltr"><span id="gmail-5dd320ca-338b-42f3-a606-470f0b199dd8" class="gmail-GINGER_SOFTWARE_mark">okay</span>, <span id="gmail-488401d6-095f-4041-b4b4-a579e47c8f78" class="gmail-GINGER_SOFTWARE_mark">thanks</span> for this suggestion, Adam sir. <div><br></div><div>I tried </div><div><br></div><div><div><span id="e08b4f91-37cc-4f6c-a606-ffef2379cbc1" class="gmail-GINGER_SOFTWARE_mark GINGER_SOFTWARE_mark">ncl</span> 9> <span id="gmail-1a87f2e1-fad2-44db-a5b2-b6818f8db056" class="gmail-GINGER_SOFTWARE_mark">rsph</span> = 6371 <font color="#ff0000"><b>--> to get area in km^2</b></font>                                                                                                             </div><div><span id="gmail-56297f8d-e547-4ad7-8d83-1a7dffbb2d75" class="gmail-GINGER_SOFTWARE_mark">ncl</span> 10>  <span id="gmail-bedc56b8-a26e-43b7-9bc0-220787e50963" class="gmail-GINGER_SOFTWARE_mark">latv</span> = (/31.00,29.70,29.15,28.82,28.43,28.01,27.98,27.47,27.38,28.64,28.99,29.40,29.56,29.99,30.05,30.01,30.61,30.64,31.00/)</div><div><span id="gmail-f79d59a1-8a37-4d74-8883-4d14d32d5d0e" class="gmail-GINGER_SOFTWARE_mark">ncl</span> 11> <span id="gmail-b57de779-d83c-4c1e-b48a-bd91df7e3f95" class="gmail-GINGER_SOFTWARE_mark">lonv</span> = (/77.98,77.96,79.01,80.02,80.98,81.57,81.98,83.01,84.00,83.99,83.01,83.01,80.98,81.00,80.01,79.64,79.63,79.01,77.98/)  </div><div>ncl 12> qarea_poly = area_poly_sphere(latv, lonv, rsph)                                                                               </div><div><span id="gmail-0b8423ec-aae3-4bbf-969e-569c94a8a183" class="gmail-GINGER_SOFTWARE_mark">ncl</span> 13> <span id="gmail-4b098997-f15b-4ca4-b824-2c1785467097" class="gmail-GINGER_SOFTWARE_mark">print</span> ("qarea_poly="+qarea_poly)                                                                                              </div><div>(0)<span class="gmail-Apple-tab-span" style="white-space:pre"> </span><b><font color="#ff0000">qarea_poly=5.0997e+08   ---> the calculated area is very large. <span id="gmail-85077501-b602-4b72-be12-93f34f9660ac" class="gmail-GINGER_SOFTWARE_mark">it</span> seems like <span id="gmail-215d584f-bdab-4578-b718-489931e1fb05" class="gmail-GINGER_SOFTWARE_mark">wrong</span>.</font></b></div><div><b><font color="#ff0000"><br></font></b></div><div><font color="#ff0000"><b>I mean from <span class="gmail-GINGER_SOFTWARE_mark">figure (previous mail)</span>, the longitude ranges from 78 to 84 = 6 <span id="gmail-3507d1d3-af34-4d80-ad47-3c3a9d7eb1b1" class="gmail-GINGER_SOFTWARE_mark">degree</span> = ~660 km </b></font></div><div><b><font color="#ff0000">                                                                  <span id="gmail-a482d5c0-c771-4108-8fdf-8d4a2f7df25f" class="gmail-GINGER_SOFTWARE_mark">latitude</span> rages almost 1 degree = 110 km</font></b></div><div><b><font color="#ff0000">                                                                  <span id="gmail-b996c823-60ed-4a2b-a3ed-402406d4909c" class="gmail-GINGER_SOFTWARE_mark">so</span> it could be 660 x 110 = ~72600 km^2 and from the above function it's </font></b><b><font color="#ff0000">5.0997e+08</font></b></div></div><div><b><font color="#ff0000"><br></font></b></div><div><br></div><div><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_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 10:16 PM, Adam Phillips <span dir="ltr"><<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@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">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"><div><div class="h5"><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.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/)</div><div>ncl 2>  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/)</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]:Execu<wbr>te: 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_1510714598437043430m_-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_1510714598437043430m_-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_1510714598437043430m_-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_1510714598437043430m_-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" 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><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_1510714598437043430gmail_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/<wbr>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>
</font></span></div>
</blockquote></div><br></div></div>