# Re: [ferret_users]intelligent interpolation method

Hi Peter,

| Suppose we have additional data (they say we have it in here) for
| the interpolation, how can i do that in a proper way?

You should define what "proper" means.

Since you don't say what kind of "additional data" you have,
let's continue to assume that we have a set of scattered
data of the form

lon1 lat1 alt1
lon2 lat2 alt2
lon3 lat3 alt3
. . . . .

and that our goal is to produce a gridded data from this set.

| What kind of interpolation
| is e.g. SCAT2GRID using? We need to know whether it is taking into
| account the roughness, surface relief, statistical linking between
| surface and variable,
| etc., dont we?

I guess you should read the Ferret manual.  Ferret has a number of
functions whose names start with "SCAT2GRID".  Some take kind of
moving averages and others do simple interpolations.  (I'm not sure
Ferret has polynomial fitting or the like.)

Again, what is "proper" depends on your goal.  Do you want
as smooth a result as possible? (Again we have to define "smooth".
Maybe we want to minimize second derivatives?  Moving averages are
probably good for this purpose.)   Do you allow gridded values
to be different from the original scattered data even when their
locations coincide? (Moving averages have this property.)
Do you allow artificial extrema?  (Say, neighboring datapoints have
altitudes of 800m and 900m but the gridded data located inbetween can
be 1000m to allow for sharp curvature.  To preserve roughness of the
topography, you might have to accept this property.  Some polynomial
fitting behaves like this.)

I'm no expert in this area.  I recommend that you check out
a textbook of numerical methods (such as "Numerical Recipe").
You'll find various methods with different characteristics
under the heading of interpolation.

Ryo