Environmental Engineering Reference
In-Depth Information
neighboring grid points are computed based on linear interpolation if the contour
level lies between the variable values of these two positions x i
and x j , i.e. if
u ( x i )
> v > u ( x j ) hold. In a second step the algorithm draws
lines connecting the calculated positions within the same block.
Contours can also be created if positions are not distributed on a rectangular grid.
An intermediate operation is to interpolate and extrapolate given data to a rectan-
gular grid. This is done by the griddata command. The command has several
parameters and options and the graphical output, i.e. the exact locations of the
contour lines may be quite different, if different options are used.
We demonstrate the procedure for a dataset that is available in three columns:
x -coordinates, y -coordinates and values, all gathered in an array X . The following
command sequence can be used to produce a figure of filled contours:
< v < u ( x j )or u ( x i )
[x,y] = meshgrid(linspace(xmin,xmax,100),linspace(ymin,ymax,100));
z = griddata (X(:,1),X(:,2),X(:,3),x,y);
contourf (x,y,z);
xmin , ymin , xmax and ymax are the limits of the x - and y -region. By the first
command the mesh is calculated and stored in the variables x and y . The second
command initiates the interpolation. Interpolated data are stored in variable z . The
last command produces the plot.
Of course the interpolation depends on gridsize of the mesh. But also the
interpolation method is important. There are four options currently implemented
in MATLAB
®
:
'Linear': triangle-based linear interpolation (default)
'Cubic': triangle-based cubic interpolation
'Nearest': nearest neighbor interpolation
'v4': biharmonic interpolation
The influence on the outcome is demonstrated for a data-set that was extracted
from 100 borehole logs. For each borehole the file contains the information, if a
certain subsurface strata was detected or not. The detection of that highly imperme-
able strata is connected to a value of hydraulic conductivity (see Chap. 11.3).
Detection is identified with a vertical hydraulic conductivity of 10 8 m/s, while
there is a high conductivity of 10 3 m/s otherwise. The interpolations using the four
different methods available in MATLAB
, lead to very different results that are
®
presented in Fig. 13.6 .
Results from linear and cubic interpolation look most similar at first sight, but
a closer look reveals that the cubic method delivers negative values at several places
of the map. Like other material properties and like concentrations, conductivities
can not take negative values and the result of cubic interpolation is thus not
appropriate for processing in an environmental model.
Biharmonic spline is a method, for which the curvature of the approximated
surface plays an important role (Sandwell 1987 ). As a result local peaks in the data
set have an influence on a larger region in their vicinity. The method is not
appropriate in this example, as the regions with negative values are even more
extended than for cubic interpolation.
Search WWH ::




Custom Search