The GLOBEC Kriging Software Package - EasyKrig3.0, May 1, 2004
Copyright (c) 1998, 2001, 2004. property of Dezhang Chu and Woods Hole Oceanographic Institution.
All Rights Reserved.
1. INTRODUCTION
1.1 General Information
1.1.1 About kriging
This section provides a brief theoretical background for kriging. If the user(s) is not interested in
the theoretical background, he/she can skip this section and go to section 1.1.2 directly.
Kriging is a technique that provides the Best Linear Unbiased Estimator of the unknown
fields (Journel and Huijbregts, 1978; Kitanidis, 1997). It is a local estimator that can provide
the interpolation and extrapolation of the originally sparsely sampled data that are assumed to be
reasonably characterized by the Intrinsic Statistical Model (ISM). An ISM does not require the quantity
of interest to be stationary, i.e. its mean and standard deviation are independent of position, but rather
that its covariance function depends on the separation of two data points only, i.e.
E[(z(x) - m)(z(x') - m) ] = C(h), (1)
where m is the mean of z(x) and C(h) is the covariance function with lag h, with h being the distance
between two samples x and x':
h = || x - x' ||. (2)
Another way to characterize an ISM is to use a semi-variogram,
gamma(h) = 0.5* E[ (z(x) - z(x') )^2]. (3)
The relation between the covariance function and the semi-variogram is
gamma(h) = C(0) - C(h). (4)
The kriging method is to find a local estimate of the quantity at a specified location, x(L).
This estimate is a weighted average of the N adjacent observations:
z(x(L)) = sum( lambda(i) z(x(i)), (5)
where i is from 1 to N, and x(L) are the coordinates of an arbitrary point whose value is what
we want to estimate.
The weighting coefficients lammbda(i) can be determined based on the minimum estimation variance criterion:
See Eq.(6) in Description.doc file (6)
subject to the normalization condition.
sum(lambda(i)) = 1, (7)
where i is from 1 to N. Note that we don't know the exact value at , but we are trying to find a predicted
value that provides the minimum estimation variance. The resultant kriging equation can be expressed as
See Eq.(8) in Description.doc file (8)
where mu is the Lagrangian coefficient. In addition, we have replaced the covariance function with
the normalized covariance function [normalized by C(0)]. Equivalently, by using Eq. (4), the kriging
equation can also be expressed in terms of the semi-variogram as
See Eq.(9) in Description.doc file (9)
where we have used normalized semi-variogram, i.e., semi-variogram normalized by C(0) as we did in deriving Eq. (8).
Having obtained the weighting coefficients (lambda_beta) and the Lagrangian coefficient (mu) by solving either Eq. (8) or
Eq. (9), the kriging variance, Eq. (6), can be expressed as:
See Eq.(8) in Description.doc file (10)
The above equations are the basis of the Easykrig software package.
1.1.2 Brief description of EasyKrig3.0
The EasyKrig program package uses a Graphical User Interface (GUI) to simplify the operation. It requires MATLAB 5.3 or
higher with or without optimization toolbox (see section 2.2) and consists of five components, or processing stages:
(1) data preparation, (2) variogram computation, (3) kriging, (4) visualization and (5) saving results. It allows the
user to process anisotropic data, select an appropriate model from a list of variogram models, and a choice of kriging
methods, as well as associated kriging parameters, which are also common features of the other existing software
packages. One of the major advantages of this program package is that the program minimizes the users' requirements to
"guess" the initial parameters and automatically generates the required default parameters. In addition, because it
uses a GUI, the modifications from the initial parameter settings can be easily performed. Another feature of this
program package is that it has a built-in on-line help library that allows the user to obtain the descriptions of the
use of parameters and operation options easily.
The current EasyKrig3.0 is the upgraded version of the previous version (EasyKrig2.1). In addition to having corrected
some programming errors in the previous version (mostly GUI related errors), there are many new features included in
the current version:
· Matlab Version 6.x compatible
· Capable of handling 3-D data
· Enhanced batch file processing capability
· More flexible in loading input data and saving output data
· Capable of handling the customized grid file
· More examples with detailed step by step instructions are provided to allow user(s) to master the functionality
of the software package more quickly and easily.
Although this software package lacks some abilities such as Co-kriging, it does provide a convenient tool for
geostatistical applications and should also help scientists from other fields.
For people who do not want to use GUI but only interested in function-based m-files can go to a different website
that provides a function-based m-file Kriging package (http://globec.whoi.edu/software/kriging/V3/intro_v3.html)
developed by Caroline Lafleur and Yves Gratton, INRS-Océanologie, Universit du Qubec Rimouski.
1.2 Getting Started
1.2.1 Operating systems
The software was originally developed under MATLAB 6.5 on a PC (windows 2000) and intended to be computer and/or
operating system independent. The program has been tested on various machines (PC, Macintosh, and Sun Workstation)
and operating systems (windows 2000/Xp, Linux) and performs fine.
1.2.2 Down-load the program
The user needs to download the compressed file from GLOBEC web site first, the URL is
ftp://globec.whoi.edu/pub/software/kriging/easy_krig/V3.0/
and the compressed file is
Windows 95/98/NT/2000/XP and Linux: easy_krig30.zip
Unix: easy_krig30.tar.Z
Macintosh: easy_krig30mac.zip
After having downloaded the file, the user needs to uncompress the file. A directory of easy_krig3.0 will be
created and you are ready to run the program.
1.2.3 Quick start
Start MATLAB and go to the designated easy_krig3.0 home directory. Just type "startkrig" in the MATLAB
command window, a window will pop up. This window is the base window, called the Navigator window. The Menubar in this
window contains many options you can choose. Now you are ready to move on.
Note: You can add the kriging home directory to the Matlab search path and run the program from other directories.
However, you have to make sure that there are no functions of your own having the same names as those used for
easy_krig3.0. Since the program will allow you to load and save files using a file browser, it is recommended that
you run the program under the easy_krig3.0 home directory.
The program provides a full on-line help function that provides the descriptions the use of almost all of the
selectable functions, options, and parameters. It is quite self-explanatory and easy to use.
2. DATA PROCESSING STAGES
There are several data processing stages (tasks) that are selectable from the Menubar on the top of the Navigator
window, as well as other task windows. By selecting or clicking on any of the tasks, a window corresponding to the
selected task will pop up. On each task window including the Navigator window, the descriptions and explanations
of every option and selection in each task window can b