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

Home » Public Forums » archive » Interpolation problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Interpolation problem [message #36824] Mon, 03 November 2003 03:21 Go to previous message
sdj is currently offline  sdj
Messages: 20
Registered: November 2003
Junior Member
Dear All,

I have a problem with interpolating data, neither of the IDL functions
INTERPOLATE/INTERPOL/BILINEAR seem to work.

I have a 2-d array on a regular grid with valid values which are all
+ve. Non valid values are set to -9999 and some 'intermediate' values
I
would like to interpolate are set to -1.
How can I interpolate over the x, y grid the 'intermediate' values set
to -1 without taking into account the non-valid values ?

I've tried the following, but it does not work (my output values are
exactly the same as my input values).

;a is a fltarr(x, y) -> 'a' being meteorological values at 'x' lon
;and 'y' lat
nx = n_elements(a(*, 0)) ; no. elements x
ny = n_elements(a(0, *)) ; no. elements y
d = where(a EQ -1, count1) ; find 1-d index of values to be
interpolated
xd = d mod nx ;x index of values to be interpolated
yd = d / nx ; y index of values to be interpolated

;I "try" to have the a(xd, yd) values interpolated, but my output
;values are exactly the same as my input values
int_val = INTERPOLATE(a, xd, yd, missing = -9999)

INTERPOL and BILINEAR don't work either, have you got any idea of how
to do this sort of operation ?

Thanks in advance for the help.

Best Regards,
Pepe
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Keywords/Parameters and Common Blocks
Next Topic: Keywords/Parameters and Common Blocks

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

Current Time: Wed Oct 08 14:52:35 PDT 2025

Total time taken to generate the page: 0.00458 seconds