Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Re: GRIDDATA wo...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 26 of 28 Topic 5497 of 6249
Post > Topic >>

Re: GRIDDATA woes

by "ben.bighair" <ben.bighair@[EMAIL PROTECTED] > Mar 4, 2008 at 02:46 PM

On Mar 4, 4:14 pm, David Fanning <n...@[EMAIL PROTECTED]
> wrote:
> 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
>

Hi,

I think it comes a little clearer for me to leave VALUE_LOCATE out of
it.  Instead simply   normalize the output coords into the input
coordinate space.  Something like this...

ilon = Scale_Vector(findgen(10), 10.0, 70.0)
ilat = [-87.5, 50, 25, 0, 30, 45, 64, 87.5]

olon = Scale_Vector(findgen(12), 0.0, 90.0)
olat = Scale_Vector(findgen(7), -87.5, 87.5)

ix = (olon - min(ilon)) / (max(ilon) - min(ilon))
iy = (olat - min(ilat)) / (max(ilat) - min(ilat))

idim = [n_elements(ilon), n_elements(ilat)]
iZ = HANNING(idim[0], idim[1])

oZ = INTERPOLATE(iZ, ix, iy, /GRID, MISSING = !VALUES.F_NAN)

It doesn't address the question about assuming a flat dataspce when
the data are really in spherical coordinates.  You might have a good
solution to transform the coordinates to a projected space then
interpolate, but I really don't know for sure.  Taking the data as
delivered, it is not projected at all - it just comes with two of the
three parts needed to specify spherical coords plus a data value.  The
radius is whatever you want (in this case I was hoping to be on
earth).

Ben
 




 28 Posts in Topic:
GRIDDATA woes
"ben.bighair" &  2008-03-02 18:57:27 
Re: GRIDDATA woes
Bill Gallery <wgallery  2008-03-03 11:00:55 
Re: GRIDDATA woes
David Fanning <news@[E  2008-03-04 10:05:13 
Re: GRIDDATA woes
"Kenneth P. Bowman&q  2008-03-03 08:24:14 
Re: GRIDDATA woes
David Fanning <news@[E  2008-03-04 08:35:55 
Re: GRIDDATA woes
"Kenneth P. Bowman&q  2008-03-04 21:04:16 
Re: GRIDDATA woes
David Fanning <news@[E  2008-03-04 22:04:32 
Re: GRIDDATA woes
David Fanning <news@[E  2008-03-04 12:49:54 
Re: GRIDDATA woes
"Kenneth P. Bowman&q  2008-03-04 20:55:19 
Re: GRIDDATA woes
David Fanning <news@[E  2008-03-05 07:57:59 
Re: GRIDDATA woes
Kenneth Bowman <k-bowm  2008-03-05 10:05:10 
Re: GRIDDATA woes
Kenneth Bowman <k-bowm  2008-03-05 08:14:03 
Re: GRIDDATA woes
David Fanning <news@[E  2008-03-04 14:14:37 
Re: GRIDDATA woes
David Fanning <news@[E  2008-03-04 09:03:31 
Re: GRIDDATA woes
"ben.bighair" &  2008-03-04 08:05:59 
Re: GRIDDATA woes
David Fanning <news@[E  2008-03-04 10:14:46 
Re: GRIDDATA woes
"Kenneth P. Bowman&q  2008-03-04 21:02:39 
Re: GRIDDATA woes
James Kuyper <jameskuy  2008-03-05 11:38:10 
Re: GRIDDATA woes
"Kenneth P. Bowman&q  2008-03-05 07:46:41 
Re: GRIDDATA woes
Brian Larsen <balarsen  2008-03-04 08:23:04 
Re: GRIDDATA woes
Bill Gallery <wgallery  2008-03-04 09:43:26 
Re: GRIDDATA woes
David Fanning <news@[E  2008-03-04 10:54:50 
Re: GRIDDATA woes
Bill Gallery <wgallery  2008-03-04 14:17:35 
Re: GRIDDATA woes
David Fanning <news@[E  2008-03-04 16:58:42 
Re: GRIDDATA woes
pgrigis@[EMAIL PROTECTED]  2008-03-04 14:39:31 
Re: GRIDDATA woes
"ben.bighair" &  2008-03-04 14:46:46 
Re: GRIDDATA woes
"ben.bighair" &  2008-03-04 19:14:26 
Re: GRIDDATA woes
David Fanning <news@[E  2008-03-04 22:10:22 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 6:20:57 CDT 2008.