[ncl-talk] calculate area of polygon box

Kunal Bali kunal.bali9 at gmail.com
Mon Feb 5 09:32:45 MST 2018


Dear Dennis Sir,
Thanks for this suggestion.

I tried that one, but I think these examples are applicable to
rectangular box only with the 4 lat lon grid points.

I followed the examples on that page. e.g.

ncl 0> rsph = 1.0
ncl 1> lonv =
(/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/)
ncl 2>  latv =
(/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/)
ncl 3> qorder     = gc_clkwise(latv, lonv)
ncl 4> qarea_gc   = gc_qarea(latv, lonv)
fatal:gc_qarea: the last (rightmost) dimension of arrays must be 4
fatal:["Execute.c":8576]:Execute: Error occurred at or near line 4




---
Kunal Bali





On Mon, Feb 5, 2018 at 9:09 PM, Dennis Shea <shea at ucar.edu> wrote:

> Did you look at any of the functions?
>
> Click "Functions" ; Click "Alphabetical Listing"; Search 'area'
>
> Keep going till you find something: Like .......
>
> http://www.ncl.ucar.edu/Document/Functions/Built-in/area_poly_sphere.shtml
>
> On Mon, Feb 5, 2018 at 5:32 AM, Kunal Bali <kunal.bali9 at gmail.com> wrote:
>
>> Dear NCL users,
>>
>> I have coordinates such as
>> lonv = (/77.98,77.96,79.01,80.02,80.98,81.57,81.98,83.01,84.00,83.9
>> 9,83.01,83.01,80.98,81.00,80.01,79.64,79.63,79.01,77.98/)
>>
>>   latv = (/31.00,29.70,29.15,28.82,28.43,28.01,27.98,27.47,27.38,28.6
>> 4,28.99,29.40,29.56,29.99,30.05,30.01,30.61,30.64,31.00/)
>>
>>
>> from that, I am able to plot the polygon line e.g.
>>
>>
>>
>>
>>
>> So, could anyone please let me know how to calculate the area (in km) of
>> this polygon box?
>>
>>
>> thank you
>> ---
>> Kunal Bali
>>
>>
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180205/24c1222b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: area.png
Type: image/png
Size: 27216 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180205/24c1222b/attachment.png>


More information about the ncl-talk mailing list