gc_clkwise failure

From: Dave Allured - NOAA Affiliate <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Mon Apr 15 2013 - 18:06:12 MDT

NCL team,

The following demonstrates two large simple polygons over the Pacific
ocean. Both are written in clockwise order, yet the function
gc_clkwise returns the wrong value for the first polygon.

lats = (/ 15, 40, 0, -30, -30 /)
lons = (/ 150, 210, 260, 265, 160 /)
func = gc_clkwise (lats, lons)
print ("Result #1 = " + func)

lons(3) = 250
func = gc_clkwise (lats, lons)
print ("Result #2 = " + func)

mac56:~/ncl/bugs/gc_clkwise 63> ncl demo.gc_clkwise.ncl
 NCAR Command Language Version 6.1.2
(0) Result #1 = False
(0) Result #2 = True

I believe that both polygons conform to the documented constraint that
each must be containted in a hemisphere. We get the same behavior
with NCL 6.0.0 and 6.1.2 on Mac OS 10.8.3, 64-bit x86 CPU. Am I
mistaken, or is this a bug in the function? Thanks for looking into
this.

--Dave
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Apr 15 18:06:24 2013

This archive was generated by hypermail 2.1.8 : Tue Apr 23 2013 - 12:54:13 MDT