VARIOG2D A Computer Program For Estimati PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Computers & Geosciences 27 (2001) 549–561

VARIOG2D: a computer program for estimating


the semi-variogram and its uncertainty$
Eulogio Pardo-Igúzquiza, Peter A. Dowd*
Department of Mining and Mineral Engineering, University of Leeds, Leeds LS2 9JT, UK
Received 29 June 1999; received in revised form 1 August 2000; accepted 30 August 2000

Abstract

VARIOG2D is a Fortran-77 program that provides four basic operations for semi-variogram analysis: inference of
the experimental semi-variogram, estimation of the variance–covariance matrix of the experimental semi-variogram,
fitting a theoretical model by non-linear generalised least squares and estimation of the uncertainty of the semi-
variogram model parameters. Although software for estimating the semi-variogram by the method of moments is
widely available, there is no generally available software for assessing the uncertainty of the experimental semi-
variogram. VARIOG2D provides the exact variance–covariance matrix of the experimental semi-variogram, which can
be used for attaching standard errors to the experimental semi-variogram, for assessing the correlation between the
different semi-variogram lag estimates and for fitting a model by generalised least squares. In addition, the generalised
least-squares fitting procedure allows an evaluation of the uncertainty of the experimental semi-variogram and of the
semi-variogram model parameters. A case study shows the application of the variance–covariance matrix of the
experimental semi-variogram and the performance and capabilities of the program. # 2001 Published by Elsevier
Science Ltd.

Keywords: Geostatistics; Variance–covariance matrix; Standard error; Generalised least squares; Soil science

1. Introduction along each direction. This semi-variogram is variously


called the estimated, experimental or empirical semi-
The semi-variogram function is the basic tool of variogram. In the second stage of semi-variogram
geostatistical applications such as kriging or conditional analysis, a theoretical model (described by a mathema-
simulation. In general, the semi-variogram function is tical function with a small number of parameters) is
unknown for a particular application and must be fitted to the experimental semi-variogram. The model is
estimated from the experimental data. The classic then used with the relevant geostatistical operators in
estimator, the method of moments (Matheron, 1965), applications. However, this basic procedure ignores the
is widely used by practitioners and many computer uncertainty associated with statistical estimates from a
programs are widely available for its computation limited set of experimental data. The experimental semi-
(Englund and Sparks, 1991; Deutsch and Journel, variogram (the semi-variogram estimates for a finite
1992; Pannatier, 1996). number of lags) is uncertain and the theoretical model
Typically, the semi-variogram is estimated for a given fitted to it is also uncertain. Although these uncertainties
number of directions and for a given number of lags can be assessed and used in applications, a method for
such assessment has not been incorporated in the most
$
Code available from server at http://www.iamg.org/ popular computer programs for semi-variogram
CGEditor/index.htm. estimation.
*Corresponding author. The program presented in this paper makes possible
E-mail address: [email protected] (P.A. Dowd). the estimation of both the uncertainty of the

0098-3004/01/$ - see front matter # 2001 Published by Elsevier Science Ltd.


PII: S 0 0 9 8 - 3 0 0 4 ( 0 0 ) 0 0 1 6 5 - 5
550 E. Pardo-Igúzquiza, P.A. Dowd / Computers & Geosciences 27 (2001) 549–561

experimental semi-variogram and the uncertainty of tolerance and dk is the mean distance between the
semi-variogram model parameters. The exact variance– points of the kth class defined as
covariance matrix of the experimental semi-variogram NðkÞ
estimates the former uncertainty, and the approximate 1 X  ‘ 
dk ¼ X  X2‘ ; ð4Þ
variance–covariance matrix of the semi-variogram NðkÞ ‘¼1 1
model parameters assesses the latter uncertainty. The  
variance–covariance matrix of the experimental semi- where x‘1  x‘2  is the Euclidean norm used to compute
variogram may be used on its own; for example, the distance between two points.
standard errors may be attached to each semi-variogram In practice, the experimental semi-variogram may be
lag estimate as well as confidence regions that include a calculated for different directions, and irregularly
given confidence level for all the semi-variogram lags located data require an angle tolerance as well as a
simultaneously. Other examples of application are distance tolerance. Other parameters that must be
based on the use of the variance–covariance matrix for specified are the number of lags K, and the length of
fitting a theoretical model to the experimental semi- the elemental lag h. The semi-variogram will be
variogram by generalised least squares, which takes into calculated at lags (h; 2h; . . . ; Kh}. An angle tolerance of
account both the estimation variance of each semi- 908 defines an omni-directional semi-variogram. Prac-
variogram lag and the correlation between semi- tical details of this calculation may be found in Isaaks
variogram lag estimates. and Srivastava (1989). ^gðdk Þ is known as the empirical,
There are different methods of approximation for the experimental or estimated semi-variogram and it is
evaluation of the uncertainty of semi-variogram model estimated at only the K specified lags and possibly for
parameters, i.e. the transfer of uncertainty in the different directions; each particular value is also known
experimental semi-variogram into uncertainty of the as semi-variogram lag estimate.
semi-variogram model parameters. One method is to
use non-linear generalised least squares to fit a
theoretical model to the experimental semi-variogram 3. Uncertainty evaluation
and to use classic inversion theory to estimate the
variance–covariance matrix of the semi-variogram The uncertainty of the experimental semi-variogram is
model parameter estimates. A more detailed description defined by its variance–covariance matrix, which is the
of the different steps of semi-variogram analysis is given K
K matrix G where the kk0 element is equal to
below. ½Gkk0 ¼ Cov½^gðdk Þ; ^gðdk0 Þ ð5Þ
and the diagonal elements give the variance of the semi-
2. Semi-variogram estimation variogram estimates
½Gkk ¼ Cov½^gðdk Þ; ^gðdk Þ ¼ Var½^gðdk Þ: ð6Þ
The semi-variogram is defined as (Matheron, 1965)
n o An exact evaluation of G is given in Pardo-Igúzquiza
gðhÞ ¼ 12E ½Zðx þ hÞ  ZðxÞ2 ð1Þ and Dowd (2000), where the kk0 element is given by
½Gkk0 ¼ Covf^gðdk Þ; ^gðdk0 Þg
and is normally estimated by the method of moments
(Journel and Huijbregts, 1978) NðkÞ
X NðkXÞ
0
1 1 ‘s 2
¼ ½C  ;
1 X
NðhÞ NðkÞNðk Þ ‘¼1 s¼1 2 11
0
^gðhÞ ¼ ½Zðx þ hÞ  ZðxÞ2 ; ð2Þ
2NðhÞ ‘¼1 ‘s 2 ‘s 2 ‘s 2
þ 12½C12  þ 12½C21  þ 12½C22 
where NðhÞ is equal to the number of pairs of values in ‘s ‘s ‘s ‘s ‘s ‘s ‘s ‘s
 C11 C12  C21 C22  C11 C21  C12 C22
which the separation distance is equal to h. If the data
are irregularly located, Eq. (2) takes the form ‘s ‘s
þ C11 ‘s ‘s
C22 þ C12 C21 ð7Þ
NðkÞ
X
1 where ‘s
C12¼ EfZ1‘ Z2s g, ‘s
C21 ¼ EfZ2‘ Z1s g, ‘s
C11 ¼ EfZ1‘ Z1s g,
^gðdk Þ ¼ ½Z1‘  Z2‘ 2 ; ð3Þ
2NðkÞ ‘s
C22 ¼ EfZ2‘ Z2s g.
‘¼1
In the calculation of the covariance between the kth
where Z1‘
 Zðx‘1 Þ is the first value of the ‘th pair lag and the k0 th lag of the experimental semi-variogram,
of experimental data used in the computation of ^gðdk Þ, ‘ is the index for the data pairs of the kth lag and s is the
Z2‘  Zðx‘2 Þ is the second value of the ‘th pair of index for the data pairs for the k0 th lag, 1 is the subscript
experimental
 ‘  data used in the computation of ^gðdk Þ, for the first datum of the pair for any lag and 2 is the
x  x‘  2 ½hk  e; hk þ e, in which e is a distance subscript for the second datum of the pair for any lag.
1 2
E. Pardo-Igúzquiza, P.A. Dowd / Computers & Geosciences 27 (2001) 549–561 551

Any statistical approach to obtaining the result variogram model value for lag di and with semi-
expressed by Eq. (7) requires assumptions about the variogram model parameters y.
statistical behaviour of the random function Z. For our The minimisation of Eq. (8) is non-linear in the semi-
purposes we have assumed that Z is a second-order variogram model parameters.
stationary random function and, solely for the evalua-
tion of fourth-order moments, that Z is Gaussian
(Pardo-Igúzquiza and Dowd, 2001). Eq. (7) explicitly 5. Uncertainty of semi-variogram model parameters
takes into account the spatial location of the
experimental data, the correlation between the experi- Once a theoretical model has been fitted to the
mental data and the multiple re-use of experimental experimental semi-variogram, the uncertainty of interest
data to form pairs for the computation of the semi- is that of the semi-variogram model parameters. The
variogram lag estimates. The variance–covariance main problem is how to transfer the uncertainty of the
matrix may be used to calculate standard errors of the experimental semi-variogram into the uncertainty of
semi-variogram estimates (one confidence interval for the semi-variogram model parameters. There are various
each lag) or to give confidence regions that include a possibilities, one of which is provided by generalised
given confidence level for all the semi-variogram lag least-squares model fitting. An approximate variance–
estimates simultaneously. The Bonferroni method can covariance matrix of the estimated semi-variogram
be used to obtain rectangular confidence regions or a model parameters, under the assumption that their
parametric method may be used to obtain multi- distribution is Gaussian, is given by standard non-linear
dimensional elliptical regions (Pardo-Igúzquiza and inversion theory as the matrix C (Manke, 1984; Wood-
Dowd, 2001). bury and Sudicky, 1991)

C  ½J T G1 J1 ; ð9Þ


4. Fitting a model
where J is the K
N Jacobian, or sensitivity matrix, for
In geostatistical operations, such as kriging or condi- which the ijth element is defined as follows:
tional simulation, the experimental semi-variogram is not ½Jij ¼ qgðdi Þ=qyj evaluated for the generalised least-
used directly but is replaced by a model fitted to it. There squares estimates ^ y. K is the number of experimental
are many different ways of obtaining a ‘best’ fit of the semi-variogram lag values. N is the number of semi-
model to the experimental semi-variogram. The most variogram model parameters.
common method is fitting by eye, that is, using a
graphical computer program to fit a model that the
operator judges satisfactory. Another, more quantitative,
6. Program description
method is weighted least squares (Cressie, 1985; Gotway,
1991; Zhang, Van Eijkeren and Heemink, 1995; Jian
The program VARIOG2D uses eight external sub-
et al., 1996; Pardo-Igúzquiza, 1999).
routines as shown in Fig. 1.
Weighted least squares takes into account the
uncertainty of each semi-variogram lag, but it assumes
that the different semi-variogram lag estimates are
uncorrelated. The manner in which the uncertainty of
the semi-variogram lag is evaluated used to be a crude
approximation, for example the number of pairs used to
compute the semi-variogram lag estimate.
Generalised least-squares (GLS) accounts for both the
uncertainty of the semi-variogram lag estimates and the
correlations among them. GLS estimates the semi-
variogram model parameters as those values that
minimise the functional FðyÞ:
^  CðyÞÞT G1 ðC
FðyÞ ¼ ðC ^  CðyÞÞ; ð8Þ
where y represents the parameters to be estimated
(nugget effect, variance, range, etc.), G1 is the inverse
of the variance–covariance matrix of the experimental
semi-variogram, C ^ ¼ ð^gðd1 Þ; ^gðd2 Þ; . . . ; ^gðdK ÞÞT , K is the
number of lags of the experimental semi-variogram,
C ¼ ðgðd1 ; yÞ; gðd2 ; yÞ; . . . ; gðdK ; yÞÞT , gðdi ; yÞ is the semi- Fig. 1. VARIOG2D and its eight external subroutines.
552 E. Pardo-Igúzquiza, P.A. Dowd / Computers & Geosciences 27 (2001) 549–561

The program has three different operating modes PTOL lag length tolerance
characterised by differences in the input and the output. TANG angle tolerance
CRESUL name of the output file that will contain
Operating mode 1:
the results
Input
The first line specifies the operating mode, i.e. the tasks
* Parameter file. to be performed by the program. The second line
Output specifies the name of the input data file. Each record of
* Experimental semi-variogram. the input file must contain the X co-ordinate, Y co-
ordinate and attribute value for each observation and
Operating mode 2: the values must be separated by at least one blank space.
Input The third line specifies the number of geographical
* Parameter file. directions for calculating the experimental semi-vario-
* Semi-variogram model file. gram. The maximum number of directions is set to 4 in
the matrix dimensions in the program but, obviously,
Output
may be increased to any number subject to computer
* Experimental semi-variogram. memory restrictions. The next lines, in number equal to
* Variance–covariance matrix of the experimental semi- the number of directions specified in the third line, must
variogram. contain the direction angles defining each direction. The
Operating mode 3: angle must be in degrees and is measured counter-
clockwise from the X-axis (or E–W direction) to the
Input desired directions. For example, if the four main
* Parameter file. geographical directions are required, i.e. E–W, NE–SW,
* Semi-variogram model file. N–S and NW–SE, the specified direction angles are 0,
* Parameters to be estimated by non-linear GLS. 45, 90 and 1358. The next line specifies the number of
* Bounds of the search area for the parameters in the lags, followed, in the next two lines, by the lag tolerance
parameter space. and the angle tolerance. If an omni-directional semi-
Output variogram is required, the angle tolerance should be
* Experimental semi-variogram. specified as 908. The name of the output file that will
* Variance–covariance matrix of the experimental contain the results is specified in the last line. Table 1
semi-variogram. shows a parameter file that will be used in Section 7. In
* Estimates of semi-variogram model parameters. addition to the contents of the parameter file listed
* Variance–covariance matrix of the estimates of semi- above, the name of the file that contains the semi-
variogram model parameters. variogram model must be entered for operating modes 2
and 3. This file has the following format:
Operating mode 1 is used for estimating the experi-
mental semi-variogram without any further calculation. PE nugget variance
Operating mode 2 also estimates the experimental semi- NE number of nested structures (apart from the
variogram but, in addition, evaluates its variance– nugget variance)
covariance matrix. In addition to the mode 2 functions, IT(1) type of semi-variogram model for the first
operating mode 3 fits a model to the experimental semi- structure
variogram by non-linear GLS and evaluates the
variance–covariance matrix of the semi-variogram Table 1
model parameters. Example of parameter file
All three operating modes of VARIOG2D require an
input parameter file with the following content: 1
R5.DAT
4
IOPERA operating mode (1, 2 or 3) 0.0
CDATA name of the input data file containing the 45.0
experimental data (X, Y, Value) 90.0
NDIR number of directions 135.0
AAX(1) first direction angle 6
... 30.0
AAX(NDIR) NDIRth direction angle 20.0
15.0
NPAS number of lags
R5VAR.VAR
PAS lag length
E. Pardo-Igúzquiza, P.A. Dowd / Computers & Geosciences 27 (2001) 549–561 553

CM(1) sill of the semi-variogram of the first Table 2


structure Example of variogram model file. Model is pure nugget effect
AX(1) range of the semi-variogram of the first 1.340000
structure 1
PH(1) anisotropy angle of the semi-variogram of 1
the first structure 0.000000E+00
RAN(1) anisotropy ratio of the semi-variogram of 10.000000
the first structure 0.000000E+00
... 1.000000
IT(NE) type of semi-variogram model of the NEth
structure
CM(NE) sill of the semi-variogram model of the Table 3
NEth structure Example of variogram model file
AX(NE) range of the semi-variogram model of the 6.400000E01
NEth structure 1
PH(NE) anisotropy angle of the semi-variogram of 1
the NEth structure 7.000000E01
RAN(NE) anisotropy ratio of the semi-variogram of 90.000000
the NEth structure 90.000000
2.500000
The first line of the semi-variogram model file is the
nugget variance. Anisotropy in the nugget variance is
not considered. The second line specifies the number of
variogram by, for example, fitting by eye using a
nested structures (apart from the nugget variance) or
computer program with a graphical display. Alterna-
nested semi-variograms. The maximum number is set to
tively, a pure nugget effect could be used as a first
3. The next five lines are repeated NE times and specify
approximation and the model can then be refined by
each nested semi-variogram (i ) by model type ITði Þ, sill
running the program in operating mode 3; a model will
CMði Þ, range AXði Þ, anisotropy angle PHði Þ and
then be fitted by generalised least squares and the
anisotropy ratio RANði Þ.
procedure may be repeated using the semi-variogram
The types of semi-variogram models implemented in
model file containing the model fitted by GLS.
the current version of VARIOG2D are
The use of an estimate of the semi-variogram for the
Spherical ITðiÞ ¼ 1 evaluation of the variance–covariance matrix is standard
statistical practice and not a drawback of the methodol-
Exponential ITðiÞ ¼ 2 ogy described here. For example, the sampling variance
Gaussian ITðiÞ ¼ 3 of the experimental variance (s2 ) is given by
Varfs2 g ¼ 2ðs2 Þ2 =n, where s2 is the population variance
The anisotropy angle is specified in degrees and is the and n the number of data used in the computation of the
angle between the X-axis and the direction of longest sampling variance. Because the population variance s2 is
range measured counter-clockwise from the X-axis. The unknown, the estimate s2 is used instead, and the
anisotropy ratio, RAN(i )  1, is the ratio of the shortest variance of the experimental variance is estimated by
to the longest range of the ellipse of anisotropy, Varfs2 g ¼ 2ðs2 Þ2 =n.
AY(i )=AX(i )/RAN(i ). If RAN(i )=1 the semi-vario- In operating mode 3, a semi-variogram model is fitted
gram structure is isotropic. Tables 2 and 3 show to the experimental semi-variogram by non-linear GLS
examples of semi-variogram model files used in the case using the variance–covariance matrix estimated by
study. Eq. (7). The program requests the number of parameters
To specify a pure nugget effect, PE>0, NE=1, to be estimated:
CM(1)=0 and AX(1)>0 with an arbitrary value.
PH(1) and RAN(1) may also have arbitrary values. An NUMBER OF SEMI-VARIOGRAM MODEL
example of a semi-variogram model file with a pure PARAMETERS TO ESTIMATE
nugget effect is shown in Table 2. 2. (RANGE, SILL)
The semi-variogram model is required for the evalua- 3. (NUGGET EFFECT, RANGE, SILL)
tion of the variance–covariance matrix of the experi- 4. (RANGE X, RANGE Y, ANISOTROPY ANGLE,
mental semi-variogram by Eq. (7). The ‘true’ semi- SILL)
variogram model is unknown and an estimate is used 5. (NUGGET EFFECT, RANGE X, RANGE Y,
instead. One possibility is to run the program in mode 1 ANISOTROPY ANGLE, SILL)
first and to fit a model to the experimental semi- OPTION- - ->
554 E. Pardo-Igúzquiza, P.A. Dowd / Computers & Geosciences 27 (2001) 549–561

When the number of semi-variogram model parameters, where


NPARA, is equal to 2, the program fits an isotropic
model with no nugget effect (i.e. nugget effect set equal NDIR number of directions
to 0.0); with NPARA=3, the model is isotropic with VAR experimental variance
nugget effect. With NPARA=4 the semi-variogram NPAS number of lags
model is anisotropic with no nugget effect and with DIRðiÞ direction angle of the ith direction
NPARA=5 the semi-variogram model is anisotropic Dði; jÞ mean distance for the ith direction, jth lag
with nugget effect. The model fitted by non-linear GLS Gði; jÞ estimated semi-variogram for the ith direction
is thus limited to nugget variance and a structure and jth lag
(isotropic or anisotropic). NPði; jÞ number of experimental data pairs for the ith
The type of semi-variogram model must be specified: direction and jth pair
1. SPHERICAL This is also the output given in operating modes 2 and 3,
2. EXPONENTIAL with the exception that line
3. GAUSSIAN
Dði; jÞ; Gði; jÞ; NPði; jÞ
OPTION - - ->
Next, for each parameter the limits of the search region is replaced by the line
must be entered. For example, if the number of Dði; jÞ; Gði; jÞ; NPði; jÞ; SEði; jÞ;
parameters in the model is 2, the program will display
the following interactive dialogue: where SEði; jÞ is the standard error of the semi-
variogram lag estimate Gði; jÞ.
DEFINITION OF THE SEARCH REGION IN In addition, for operating mode 2, the complete
PARAMETER SPACE variance–covariance matrix of each directional semi-
RANGE X (ACTUAL VALUE: 90.0) variogram is written to the output file together with the
LOWER LIMIT - - ->10.0 covariance matrix between the semi-variogram lags for
UPPER LIMIT - - ->230.0
SILL (ACTUAL VALUE: 0.68)
Table 4
LOWER LIMIT - - ->0.3
Example of output file in operating model 1
UPPER LIMIT - - ->1.5
4 1.337726
The actual values shown by the program are the values 6 0.000000E+00
stored in the semi-variogram model file previously entered. 26.376070 1.284335 140
The limits 10, 230, 0.2 and 1.5 are fed in by the user. 53.294190 1.390069 124
The program estimates the semi-variogram model 85.990930 1.463858 138
parameters as the values that minimise Eq. (8). The 119.824400 1.381955 368
minimisation is performed by a nested direct search in 155.510000 1.279237 187
which the area search is progressively shrunk around the 185.253200 1.166164 124
minimum at each iteration. The number of iterations is 6 45.000000
37.091290 1.411779 135
set to 5 but could be modified if desired.
71.955820 1.237810 90
The results generated by the program will depend on 92.406430 1.463447 249
the operating mode used, and will be written to the 124.161300 1.475325 266
output file specified in the last line of the parameter file. 151.235100 1.423416 233
Some results are also displayed on the screen. In 179.806300 1.175616 329
operating mode 1 the output is the experimental lag 6 90.000000
semi-variogram for each direction. The format is 26.416770 9.567161E01 143
52.762370 1.185899 133
86.957570 1.518181 181
NDIR VAR 121.114900 1.297260 462
NPAS DIR(1) 155.784800 1.302162 302
Dð1; 1Þ Gð1; 1Þ NP(1, 1) 185.052100 1.313904 239
... ... ... 6 135.000000
Dð1; NPASÞ Gð1; NPASÞ NP(1, NPAS) 37.325600 1.293547 130
... ... ... 72.123780 1.560415 78
NPAS DIR(NDIR) 91.867920 1.197152 222
DðNDIR; 1Þ GðNDIR; 1Þ NP(NDIR, 1) 123.927200 1.340467 222
... ... ... 151.546600 1.353018 178
180.050000 1.194308 232
DðNDIR; NPASÞ GðNDIR; NPASÞ NP(NDIR, NPAS)
E. Pardo-Igúzquiza, P.A. Dowd / Computers & Geosciences 27 (2001) 549–561 555

Table 5
Example of output file (part only) in operating model 2. Complete output file contains variance–covariance matrix plus standard
deviation correlation matrix, for all possible combinations of directions. Full table is available on server at http://www.iamg.org/
CGEditor/index.htm

4 1.337726
6 0.000000E+00
26.376070 1.284335 140 1.926213E01
53.294190 1.390069 124 2.001382E01
85.990930 1.463858 138 2.027539E01
119.824400 1.381955 368 1.788677E01
155.510000 1.279237 187 2.044454E01
185.253200 1.166164 124 2.394554E01
6 45.000000
37.091290 1.411779 135 1.942542E01
71.955820 1.237810 90 2.277560E01
92.406430 1.463447 249 1.831311E01
124.161300 1.475325 266 1.856410E01
151.235100 1.423416 233 1.869772E01
179.806300 1.175616 329 1.812790E01
6 90.000000
26.416770 9.567161E01 143 1.911242E01
52.762370 1.185899 133 1.951052E01
86.957570 1.518181 181 1.931973E01
121.114900 1.297260 462 1.748244E01
155.784800 1.302162 302 1.823519E01
185.052100 1.313904 239 1.837432E01
6 135.000000
37.325600 1.2935547 130 1.966582E01
72.123780 1.560415 78 2.374251E01
91.867920 1.197152 222 1.903037E01
123.927200 1.340467 222 1.926820E01
151.546600 1.353018 178 2.038161E01
180.050000 1.194308 232 2.064019E01

Variance–covariance matrix
Direction 1 and direction 1
0.0371 0.0239 0.0234 0.0232 0.0226 0.0218
0.0239 0.0401 0.0243 0.0236 0.0221 0.0204
0.0234 0.0243 0.0411 0.0239 0.0221 0.0201
0.0232 0.0236 0.0239 0.0320 0.0243 0.0229
0.0226 0.0221 0.0221 0.0243 0.0418 0.0316
0.0218 0.0204 0.0201 0.0229 0.0316 0.0573
Direction 1 and direction 2
0.0238 0.0241 0.0240 0.0238 0.0237 0.0233
0.0240 0.0244 0.0249 0.0248 0.0242 0.0236
0.0234 0.0247 0.0248 0.0255 0.0245 0.0238
0.0235 0.0238 0.0245 0.0247 0.0248 0.0241
0.0228 0.0227 0.0227 0.0225 0.0237 0.0236
0.0218 0.0207 0.0211 0.0196 0.0220 0.0222
Direction 1 and direction 3
0.0232 0.0236 0.0241 0.0238 0.0237 0.0236
0.0233 0.0237 0.0241 0.0242 0.0242 0.0239
0.0233 0.0237 0.0239 0.0241 0.0237 0.0239
0.0234 0.0239 0.0240 0.0243 0.0240 0.0234
0.0234 0.0239 0.0241 0.0237 0.0236 0.0230
0.0230 0.0230 0.0228 0.0220 0.0219 0.0215
Direction 1 and direction 4
0.0240 0.0238 0.0239 0.0235 0.0231 0.0226
0.0242 0.0250 0.0247 0.0244 0.0239 0.0230
0.0236 0.0244 0.0251 0.0250 0.0243 0.0231
0.0237 0.0244 0.0250 0.0253 0.0253 0.0247
0.0229 0.0221 0.0239 0.0239 0.0247 0.0263
0.0217 0.0208 0.0215 0.0215 0.0229 0.0271
556 E. Pardo-Igúzquiza, P.A. Dowd / Computers & Geosciences 27 (2001) 549–561

each pair of directions. The matrices are repeated in the VARANI: VARANI evaluates the semi-variogram
form standard deviation-correlation. function between two locations. It is possible to evaluate
In operating mode 3 the output includes, in addition an isotropic model as well as a range anisotropic model.
to that generated by operating mode 2, the value of the GLSVAR: This subroutine evaluates the uncertainty
fitting function (Eq. (9)) at the minimum, the estimates of the semi-variogram model parameter estimates.
of the semi-variogram model parameters and their The assessment is made by estimating the variance–
standard error, and the complete variance–covariance covariance matrix of the estimates given in Eq. (9).
matrix and standard deviation-correlation matrix of the MATINV: This subroutine evaluates the inverse of a
estimates. matrix by its LU decomposition. It uses two other
Examples of the output file for operating models 1, 2 subroutines, LUDCMP and LUBKSB, the description
and 3 are shown in Tables 4–6, respectively, and were and code of which is given in Press et al. (1992, pp.
obtained by running VARIOG2D with the data file 287–288). Basically LUDCMP performs the LU
discussed in Section 7. decomposition and LUBKSB gives the inverse matrix
The function of each external subroutine is explained from the LU decomposition.
below. MATPROC: This subroutine calculates the product
CHIFIT2: This subroutine performs the non-linear matrix of two matrices.
GLS fitting using the experimental semi-variogram and
the variance–covariance matrix of the experi-mental
semi-variogram calculated in the main program 7. Case study
VARIOG2D.
EVALUA: This subroutine evaluates the objective Operating mode 3 will not be required for every
function given by Eq. (8). application as the output from modes 1 or 2 may

Table 6
Example of output file in operating model 3. In addition to information shown in table, mode 3 output file includes information in
mode 2 output file (Table 5). Only additional information is shown here

Value of the fitting function: 16.853230


First parameter: Nugget effect
Estimated value: 6.395999E01
With SE: 2.364075E01
Second parameter: Range X
Estimated value: 101.078400
With SE: 54.518160
Third parameter: Range Y
Estimated value: 34.852800
With SE: 13.615610
Fourth parameter: Anisotropy angle
Estimated value: 98.870390
With SE: 15.857020
Fifth parameter: Sill
Estimated value: 7.053920E01
With SE: 2.804830E01
Complete variance–covariance matrix of the variogram model parameters
(Anisotropy angle in radians)
0.05589 7.03429 0.36038 0.00270 0.05227
7.03429 2972.22900 196.05560 8.20051 7.19756
0.36038 196.05570 185.38490 1.55679 0.00559
0.00270 8.20051 1.55679 0.07659 0.00389
0.05227 7.19757 0.00559 0.00389 0.07867

Standard deviation-correlation matrix


0.23641 0.54578 0.11196 0.04125 0.78831
0.54578 54.51816 0.26412 0.54350 0.47069
0.11196 0.26412 13.61561 0.41314 0.00146
0.04125 0.54350 0.41314 0.27676 0.05014
0.78831 0.47069 0.00146 0.05014 0.28048
E. Pardo-Igúzquiza, P.A. Dowd / Computers & Geosciences 27 (2001) 549–561 557

contain the desired results. The results provided by number that appears in the first line changed from 1
operating mode 1 are not new and may be obtained to 2.
from a variety of widely available software. The The program requests the semi-variogram model file
originality of VARIOG2D lies in the tasks performed and, for a pure nugget effect, the file shown in Table 2 is
by operating modes 2 and 3. The three operating modes entered. The output file obtained from running the
are illustrated by a case study of steady-state infiltration program in mode 2 is shown in Table 5. Assuming that
(in m s1 105) soil science data. The original 157 the pure nugget effect model is correct, the variance–
observations are given in Loague and Gander (1990, covariance matrix of the experimental semi-variogram
Table 5). The spatial locations of the data on a quasi- has been calculated by the program. The experimental
regular grid are shown in Fig. 2A. A contour map of the semi-variogram and the experimental semi-variogram
data set is shown in Fig. 2B.  2 SE (obtained from the diagonal of the variance–
The first step is to run the program in mode 1 to covariance matrix) for the four principal geographical
obtain the experimental semi-variogram. The experi- directions are shown in Figs. 3A–D. The semi-vario-
mental semi-variogram is calculated for the four gram estimate for the first lag in the N–S direction is
principal geographical directions (E–W, NE–SW, significant (i.e. differs from the assumed pure nugget
N–S and NW–SE) and for 6 lags along each direction effect model) at the 95% confidence level as the
with an elementary lag length of 30 m, lag tolerance confidence interval for that lag (0.574, 1.338) does not
of 20 m and angle tolerance of 158. The parameter contain the pure nugget effect value of 1.34 (m s1 105)2
file is shown in Table 1. The experimental semi- assumed as the model.
variogram is shown in Fig. 3 and the output file is It would seem that a more appropriate model is an
shown in Table 2. anisotropic model with the longest range in approxi-
As a first approximation we can assume a pure nugget mately the N–S direction and the shortest range in the
effect and run VARIOG2D in operating mode 2. The perpendicular direction and with a significant propor-
parameter file is that shown in Table 1 but with the tion of the variance modelled as a nugget effect. Using

Fig. 2. (A) Locations of 157 steady-state infiltration data. (B) Contour plot with contour interval of 0.5 m s1 105 and using inverse
distance weighting procedure for interpolation, i.e. without assuming any particular stochastic model. X and Y co-ordinates are given
in meters in both figures.
558 E. Pardo-Igúzquiza, P.A. Dowd / Computers & Geosciences 27 (2001) 549–561

Fig. 3. Experimental directional variograms.

an interactive graphical computer program, the fitted Table 7


model is a nugget variance of 0.74 (m s1 105)2 together Limits of search region in five-dimensional parameters space
with a spherical anisotropic model with anisotropy angle Parameter Lower limit Upper limit
of 908, long range 90 m and anisotropy ratio 2.5 (i.e. the
shortest range is along the E–W direction and has a Nugget effect 0.0 1.3
value of 36 m). The anisotropic behaviour of the steady- Range X 10.0 200.0
state infiltration rate in the study area is depicted in Range Y 5.0 100.0
Anisotropy angle 30.0 150.0
Fig. 2B.
Sill 0.5 1.6
VARIOG2D was run in operating mode 3 with the
new semi-variogram model file (Table 3) and the output
is shown in Table 6. Table 6 shows only the additional
information that the program gives in mode 3 over that
supplied by mode 2 (Table 5). Note, however, that the range X: 101.1 m SE: 54.5 m,
variance–convariance matrix of the experimental semi- range Y: 34.8 m SE: 13.6 m,
variogram is not that shown in Table 5 because a anisotropy angle: 98.88 SE: 15.88,
different semi-variogram model was used in operating where SE is the standard error.
mode 3.
The boundaries imposed on the parameter space for The complete variance–covariance matrix of the
the search of the minimum of the functional given in estimates is shown in Table 6. The experimental semi-
Eq. (8) are shown in Table 7. variogram and the fitted model are shown in Figs. 4
The model fitted by GLS is: and 5.
The results of the case study are consistent with the
nugget variance: results obtained by Pardo-Igúzquiza and Dowd (1998)
0.639 (m s1 105)2 SE: 0.236 (m s1 105)2, using the same data set and a maximum likelihood
sill: 0.705 (m s1 105)2 SE: 0.280 (m s1 105)2, approach to inference.
E. Pardo-Igúzquiza, P.A. Dowd / Computers & Geosciences 27 (2001) 549–561 559

8. Conclusions quantified. VARIOG2D provides an approach for


estimating the experimental semi-variogram and its
The uncertainty associated with the experimental uncertainty as given by its sampling variance–convar-
semi-variogram estimated from observations can be iance matrix. Approaches such as this are especially

Fig. 4. Directional variograms and 95% confidence limits for each variogram lag using  2 SE obtained from variance–convariance
matrix of experimental variogram (g: experimental variogram) for directions: (A) E–W; (B) NE–SW; (C) N–S and (D) NW–SE.
560 E. Pardo-Igúzquiza, P.A. Dowd / Computers & Geosciences 27 (2001) 549–561

Fig. 4. (Continued).

important for small numbers of experimental data where measure of its uncertainty. VARIOG2D provides a tool
the uncertainty has important consequences for applica- for solving the problem.
tions. In addition, VARIOG2D provides non-linear,
generalised least-squares fitting of a theoretical model to
the experimental semi-variogram and evaluates the
uncertainty of the semi-variogram model parameter Acknowledgements
estimates by calculating their variance–convariance
matrices. It should become good geostatistical practice The authors wish to thank the reviewers for their
to report the experimental semi-variogram with some constructive comments.
E. Pardo-Igúzquiza, P.A. Dowd / Computers & Geosciences 27 (2001) 549–561 561

Fig. 5. Experimental variogram and model fitted by GLS.

References Manke, W., 1984. Geophysical Data Analysis: Discrete Inverse


Theory. Academic Press, San Diego, CA, 285pp.
Cressie, N., 1985. Fitting variogram models by weighted least Matheron, G., 1965. Les Variables Régionalizées and leur
squares. Mathematical Geology 17 (5), 563–586. Estimation. Masson, Paris, 305pp.
Deutsch, C.V., Journel, A.G., 1992. GSLIB Geostatistical Pannatier, Y., 1996. Variowin. Software for Spatial Data
Software Library and User’s Guide. Oxford University Press, Analysis in 2D. Springer, New York, NY, 91pp.
New York, NY, 340pp. Pardo-Igúzquiza, E., 1999. VARFIT: a fortran-77 program for
Englund, E., Sparks, A., 1991. Geo-EAS User’s Guide. EPA- fitting variogram models by weighted least squares.
EMSL, Las Vegas, NV. Computers & Geosciences 25 (3), 251–261.
Gotway, C.A., 1991. Fitting semi-variogram models by Pardo-Igúzquiza, E., Dowd, P.A., 1998. Maximum likelihood
weighted least squares. Computers & Geosciences 17 (1), inference of spatial covariance parameters of soil properties.
171–172. Soil Science 163 (3), 212–219.
Isaaks, E.H., Srivastava, R.M., 1989. An Introduction to Pardo-Igúzquiza, E., Dowd, P.A., 2001. Variance–covariance
Applied Geostatistics. Oxford University Press, New York, matrix of the experimental variogram: assessing variogram
NY, 561pp. uncertainty. Mathematical Geology, in press.
Jian, X., Olea, R.A., Yu, Y., 1996. Semi-variogram modelling Press, H.W., Teukolsky, S.A., Vetterling, W.T., Flannery, B.P.,
by weighted least squares. Computers & Geosciences 22 (3), 1992. Numerical Recipes in Fortran. 2nd edn. Cambridge
387–397. University Press, New York, 964pp.
Journel, A.G., Huijbregts, Ch.J., 1978. Mining Geostatistics. Woodbury, A.D., Sudicky, E.A., 1991. The geostatistical
Academic Press, New York, 600pp. characteristics of the Borden aquifer. Water Resources
Loague, K., Gander, G.A., 1990. R-5 Revisited. 1. Research 27 (4), 533–546.
Spatial variability of infiltration on a small Zhang, X.F., Van Eijkeren, J.C.H., Heemink, A.W., 1995. On
rangeland catchment. Water Resources Research 26 (5), the weighted least-squares method for fitting a semi-
957–971. variogram model. Computers & Geosciences 17 (1), 171–172.

You might also like