set gxout grid - skipping or combining fields?
Brian Doty
doty at COLA.IGES.ORG
Thu Feb 21 16:29:44 EST 2008
As Jennifer has suggested, if your output grid is set up just right
(offset by a half grid box, and double the spacing of the input grid)
the operation of lterp will result in the output grid being an
average of the four surrounding input grid points. lterp strictly
does bi-linear interpolation.... Brian
PS: In my experience, linear interpolation is usually fairly safe but
is rarely the "best" interpolation. What is the "best" interpolation
is highly dependent on the data being used and the kind of analysis
being done. Data with poorly behaved higher order derivatives (eg,
precipitation) or data that contains discontinuities (eg, any surface
or near-surface variables at or near land/water boundaries) present
particularly difficult interpolation problems. If at all possible,
don't interpolate!
On Feb 20, 2008, at 9:19 AM, Arlindo da Silva wrote:
> On Feb 20, 2008 9:11 AM, Jennifer Adams <jma at cola.iges.org> wrote:
> Hei, Stefan --
> The skip() function in GrADS will degrade the resolution in the way
> you suggest. Something like:
> ga-> d skip(var,2,2)
> Since you you are using GrADS 2.0, the lterp() function is now
> built in and will allow you to interpolate from one grid to
> another. The algorithm in lterp is bi-linear interpolation from the
> nearest neighbors, so if you define your destination grid to have
> points at the centers of the 2x2 grid areas in your source data,
> then lterp will do the same thing as aave().
>
> I am confused. Is the algorithm in lterp() linear interpolation or
> does it switch to coservative box-averaging when coarsening the
> grid? This is important to avoid aliasing.
>
> Arlindo
>
> --
> Arlindo da Silva
> dasilva at alum.mit.edu
More information about the gradsusr
mailing list