On Mar 4, 6:58 pm, David Fanning <n...@dfanning.com> wrote:
> Bill Gallery writes:
>> On the other hand, I don't understand the implications of the /sphere
>> option: without it, you appear to be interpolating on a flat surface.
>> What happens near the poles? What about crossing the meridian from 359
>> deg to 0 deg? I never investigated these question. Perhaps you can
>> elucidate them in your white paper.
>
> Yes, exactly my plan, but at the moment it looks like I will have to
> re-write GRIDDATA from scratch in order to understand it. :-(
>
> I always get an ominous feeling when I've asked the same
> question three or four times and get nothing but silence
> back. An obvious topic for a Ph.D. thesis, is my first
> thought. In this case, I was hoping the author might be
> listening in and could tell us why he added the darn
> SPHERE keyword in the first place. Surely he had something
> other than confounding users in mind. :-)
>
Hi,
I updated the example code using Bill's suggestions and a small
twist...
http://www.tidewater.net/~pemaquid/ccw_fail.pro
This test function now allows you to specify the triangulation method
("qhull" or "triangulate") and the /SPHERE keyword. Here's the
results using the different keyword combinations...
SeaDAS> z = ccw_fail(olon = olon, olat = olat, trimethod = "qhull",
sphere = 0) ;works
SeaDAS> z = ccw_fail(olon = olon, olat = olat, trimethod = "qhull",
sphere = 1) ;doesn't work
% GRIDDATA: Triangle 5 not in counterclockwise order.
% GRIDDATA: Triangle 6 not in counterclockwise order.
.
.
.
SeaDAS> z = ccw_fail(olon = olon, olat = olat, trimethod =
"triangulate", sphere = 0) ;works
SeaDAS> z = ccw_fail(olon = olon, olat = olat, trimethod =
"triangulate", sphere = 1) ;works
QHULL and TRIANGULATE use different algorithms, so I suppose it is
reasonable that they produce different outputs. So, I compared the
results of each and sure enough they are different...
QHULL, lon, lat, qtr,/DELAUNAY
TRIANGULATE, lon, lat, ttr, /DEGREES
help, qtr,ttr
QTR LONG = Array[3, 744557] ;QHULL's triangulation
TTR LONG = Array[3, 742122] ;TRIANGULATES
triangulation
So, I am not sure what to think. The locations are specified to be on
a grid it is unlikely that the issue is duplicates points (within some
tolerance). For grins I called QHULL with the SPHERE keyword
assigned...
QHULL, lon, lat, sqtr, /DELAUNAY, SPHERE = s
help, sqtr
SQTR LONG = Array[3, 744578]
Hahaha! Time to call it quits for the day!
Cheers,
Ben
|