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

Home » Public Forums » archive » Re: Regridding routines
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Regridding routines [message #42949] Tue, 08 March 2005 10:52
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
sdj@tiscali.it wrote:
> Dear All,
>
> This is an ongoing problem I cannot seem to solve.
>
> I have some data in array a = fltarr(4320, 2160) which I need to regrid
> to an array b = fltarr(4096, 2048).
>
> The data in 'a' are ocean related with valid values appearing only on
> the sea pixels, all land pixels are set to some default value (say
> -9999.0).
>
> All the methods I tried using to regrid the data introduce a
> substantial error.
>

Hi,

I am not sure that this is an answer to your question, but if all you
want to do is resize then you could perform the following.

;make up dummy data
nX = 200L
nY = 300L
x = Hanning(nX, nY)
;assign a portion of the data the not-a-number value
x[Lindgen((nX*nY)*0.25)] = !Values.F_NAN
;resize the data array
y = CONGRID(x, nX, nY + 0.3*nY,/INTERP)
;show the data
tv, bytscl(x, /NAN)
tv, bytscl(y,/NAN), nx+10,0


If you need more sophisticated gridding - then you should look into
Grid_Input and GridData.

Hope this is helpful,
Ben
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Error handing in embedded applications
Next Topic: Automatic Compilation

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

Current Time: Fri Oct 10 01:03:43 PDT 2025

Total time taken to generate the page: 1.44065 seconds