comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: GRIDDATA woes
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: GRIDDATA woes [message #59026] Tue, 04 March 2008 13:14 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kenneth P. Bowman writes:

>> Compute the "interpolation coordinates" from the original grid
>> j �= VALUE_LOCATE(y_original, y)
>> yj = j + (y - y_original[j])/(y_original[j+1] - y_original[j])

To tell you the truth, I can't get this to work at all. :-(

IDL> lat = [-87.5, 50, 25, 0, 30, 45, 64, 87.5]
IDL> y = Scale_Vector(findgen(7), -87.5, 87.5)
IDL> j = Value_Locate(lat, y)
IDL> yj = j + (y - lat[j])/(lat[j+1] - lat[j])
% Program caused arithmetic error: Floating illegal operand
IDL> print, yj
0.000000 0.212121 0.424242 3.00000 3.97222 5.70175 -NaN

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Speeding up a call to the where function
Next Topic: GRIDDATA woes

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 10:54:30 PDT 2025

Total time taken to generate the page: 0.80048 seconds