You are on page 1of 31

Computers& GeosciencesVol. 7+ No. 4, pp. 335-365, 1981 009g-3004181/040355.-31$ff2.

00/0
Printed in Great Britain. © 1981 Pergamon Press Ltd.

THE DESIGN OF OPTIMAL SAMPLING SCHEMES


FOR LOCAL ESTIMATION AND MAPPING
OF REGIONALIZED VARIABLES--II

PROGRAM AND EXAMPLESt

A. B. MCBRATNEY
Department of Soil Science, University of Aberdeen, Scotland
and

R. WEBSTER
Rothamsted Experimental Station, Harpenden, Hertfordshire, England

(Received 6 December,1980; revised 13 February 1981)

Abstract--A FORTRAN IV program, OSSFIM, is presented for calculating estimation variances when interpolat-
ing by kriging from regular rectangular and triangular grids of data and previously-determined semi-variogram. The
variances are computed for a range of grid spacings and block sizes, and the results graphed. The user chooses a
block size, and can read from the appropriate graph the sample spacing corresponding to any prescribed maximum
tolerable error. This is the optimal sampling scheme. Use of the program is illustrated with two examples showing
different types of variation in soil. In one, the pH of topsoil is isotropic with a spherical semi-variogram and
negligible nugget variance. An equilateral triangular grid is the best sampling scheme: it is approximately 10 per
cent more efficient than a square grid. In the other example, variation is linear but anisotropic with a large nugget
variance. In these circumstances, a triangular grid has no advantage over a rectangular one, which should be
elongated in the ratio 1.88 to 1 in the direction of minimum variation.

Key Words: Geostatistics, Kriging, Regionalized variables, Sampling, Soil Survey, Soil Science.

INTRODUCTION by solving equations (10) and (14) of Part I given the


In Part I of this paper (McBratney, Webster, and Bur- semi-variogram model (linear, linear with sill, spherical,
gess, 1981), we reviewed the traditional approach to exponential or gaussian), the type of grid (square or
earth resource survey, and soil survey in particular. We triangular), the search radius or number of points to be
drew attention to the limits on the precision of local used for interpolation, the grid spacing and the block
estimation that arise from using a regional classification, size. This program may be employed only when the drift
and showed how these might be overcome using is constant, but this is unlikely to be a serious limitation
Matheron's (1965, 1971) theory of regionalized variables. in soil survey (Webster and Burgess, 1980).
We showed that for any given sampling effort a trian- The within-block variance 7(V, V) is calculated first
gular grid provides the most precise estimates, and that by FUNCTION WBLVAR using an equally-weighted
if the variation over a region is isotropic then the grid discrete approximation (Clark, 1976; Journel and Huij-
should be equilateral. Nevertheless, square grids are bregts, 1978). It derives solely from the semi-variogram.
almost as precise, and for practical reasons frequently The other quantities depend also on the grid spacing and
would be preferred. Since regionalized variable theory pattern.
links precision of estimates with both spacing and SUBROUTINE FNDPTS derives a neighbourhood
configuration of sampling, it is possible to design an grid which can be either triangular or square, containing
optimal sampling scheme to achieve a specified pre- up to 100 grid points. It can be centered either on the
cision. Part I explains the rationale and presents the center of a grid cell or on a grid node, and can be defined
necessary theory. Part II provides a computer program, either by a limiting search radius or maximum number of
OSSF1M, for designing a sampling scheme, and illus- grid points. Specifying a search radius ensures a sym-
trates its use with examples from soil survey. The same metric neighbourhood grid but will produce different
notation has been retained in the two parts. numbers of points for cell-centered or grid-centered and
for square and triangular grids, and this has an effect on
THE PROGRAM the calculated kriging variance. A specified number of
OSSFIM, which is listed in Appendix 1, is a FOR- points may be calculated but the neighbourhood grid
TRAN IV program that computes estimation variances might not be symmetric, and the furthermost points are
chosen arbitrarily, This also only has a small effect on
*Reprints available from Rothamsted Experimental Station. the calculated kriging variance. However, these effects
335
336 A. B. MCBRATNEY and R. WEBSTER

can be diminished by specifying a large search radius or that for any one direction, xi and h are scalar quantities,
large numbers of points. In general, 40 points is sufficient and we have changed the notation accordingly. Models
for comparing different configurations. Coordinates of were fitted then to the experimental semi-variogram
the n points on the neighbourhood grid are transformed using weighted, non-linear least-squares. The weights
to correspond to real grid spacings. were equal to n(h), thereby obtaining the best fit near
SUBROUTINE KRGERR solves the kriging equation the origin (Journel and Huijbregts, 1978). Further
A-~ b = c , where A is the symmetric matrix of semi- examples and discussion are given by Burgess, Webster
variances between grid points calculated using FUNC- and McBratney (in press).
TION GAMMAH, and b contains the average semi-
variance y(x, 1,0 calculated by FUNCTION SEMAV Example I: pH at Broom's Barn
using an equally-weighted discrete approximation. The first example is for the pH of the top 15 cm of soil
Matrix A is inverted in SUBROUTINE INVERS and at Broom's Barn Experimental Station, Suffolk, England.
multiplied by b to give the vector c of weights a, i= Figure 1 shows the estimated semi-variances for 8 direc-
1, 2 . . . n, for each of the n points. tions up to a lag of 400 m. The solid line is the model of
A Lagrange variable is addded to the set of simul- best fit over the first 8 lag intervals, 320 m. It is isotropic
taneous linear equations to minimize the kriging variance and spherical with the following equation:
with respect to each X, subject to the constraint that
Iy(h)=0.021+0.330{~ h 2 ~ for h ~<196.4
196.4
iz: [3'(h) = 0.021 + 0.330 for h > 196.4,
(2)
and a Lagrange parameter ~, is contained also in vector c
(Journel and Huijbregts, 1978). The transpose of vector b where h is in meters. This type of semi-variogram is rare
is multiplied by vector e to give for soil properties in that it has a small nugget variance.
The pH at Broom's Barn seems to be continuous with
~, ,~,~,(x,, E) + ¢.
i~l
little or no short-range variation. The reasons for this are
twofold. Firstly, the measurements were obtained from
25 bulked cores 15cm deep taken over a 16xl6m
The within-block variance 3'(V, V) is subtracted and o'r ~ square. Secondly, a property such as pH can be smoothed
calculated. The kriging variance is obtained for several through chemical equilibration, and this process may
grid spacings and block sizes for either square or trian- even explain the shape of the semi-variogram.
gular grids or both in one run of the program. Figure 2 shows the maximum kriging variance for
The input to the program is described on lines I 11-237 point (16 m x 16 m x 0.15 m cuboid) estimates as a function
of the listing (Appendix I). The output consists of tables of grid spacing. The error increases with an approximately
of tyK2 and o-g for specified spacings and block sizes for sigmoid shape with increased grid spacing up to about
each type of grid. There is an option for graphic output 280 m, at which distance the sample points involved in
using the GHOST system (Calderbank and Prior, 1977), the interpolation become effectively independent; that is
and the graphs shown in Figures 3-8 were produced in are outside the range of the semi-variogram. The value of
this manner. All calls to the graphics system are in 0.360 for trr 2 at grid spacings greater than 280 m is equal
SUBROUTINE OSSGRF; users who do not have access to the sill variance plus the sill variance/40 which is
to GHOST therefore need change only this subroutine. equivalent to the estimation variance of classical statis-
Sample input and output files are listed in Appendix 2. tics. The triangular grid is always better than the square
grid up to this distance. The differences between the two
EXAMPLES compare closely with those found by Matrrn (1960) for
The two examples that follow derive from surveys of global estimates from square and triangular grids.
the soil on experiment stations, one devoted to sugar The comparison in this and subsequent figures are for
beet production in lowland agriculture, the other con- square and triangular grids with the same sampling in-
cerned with hill grazing. In both surveys, measurements tensity and the actual distances between points on the
previously had been made on square grids. To conform triangular grid are 1.0746 times greater. The grid spacings
to the reconnaissance procedure that is recommended in for the triangular grids on the graphs are what we shall
Part I, the semi-variograms were computed for the two term the equivalent square grid spacings. In this situa-
stations by treating the grids as a series of parallel tion, reasonable point estimates of pH could be made,
transects in several directions. For each direction, there- since the 'points' are 16mx 16m squares. However,
fore, the semi-variance is plots in field experiments are often larger--0.04 ha--and
we have chosen to design a scheme that will estimate
i n(h) means of blocks 20m x20m with a maximum error,
~(h) = ~ ~ ~z(x,)- z(x, + h)) 2, (1) trKmax, of 0.2 pH unit. Figure 3 shows a graph of trr 2
against grid spacing for blocks of 20m x 20m x0.15 m,
where z(x~) are values at points x, such that data are and for cell-centered blocks is similar in appearance to
available both at x~ and x~ + h, and n(h) is the number of Figure 2. The kriging variance reaches a plateau at
pairs of data points separated by a gap equal to h. Note approximately 280m with a value of 0.313, which is
Design of optimal samplingschemes for local estimation--II 337

0.5

I o •
o,, ~ • ~o ~ I~g
o ,
~
:t ~ ' o"f ~

°//o°
6
A A "116 & v ~ ADO eOA
[] ~ v'~
o
0.3 17 ~ v
o

y(h)
o" oO
e÷ o
0.2

0.1 • N-S A SSE-NNW


o W-E + ENE-WSW
D NW-SE • WNW-ESE
v NE-SW x NNE-SSW

I I I I I
0 2 4 6 8 10
h (distance / 40m)
Figure 1. Semi-variogramof pH of top soil over Broom's Barn ExperimentalStation with estimates for 8 directions
and fitted model shown by solid line.

equal to the sill variance plus the sill variance/40 minus similar to that near the ordinate in Figure 3 caused by
the within-blocks variance for 0.04 ha blocks. The grid- using only the nearest 40 points to the block center for
centered blocks have smaller estimation errors, but the interpolation. Therefore, with this size of block, not all
errors become larger at small grid spacings. There is an grid points within the block are employed and the esti-
apparent increase in the kriging error for very small grid mation variance increases accordingly.
spacings, because the few points, from which estimates
are made, are concentrated in the centers of the blocks. Example 2: thickness of peat at Lephinmore
This practice is not prudent. We require a grid spacing The example derives from a soil survey of Lephinmore
that corresponds to a maximum kriging error of 0.2 pH farm, Argyll, Scotland. Blanket peat is extensive and its
units, or ~g2 of 0.04. This is 40.8 m for the square grid thickness (in cm) has been recorded at points 100 m apart
and 42.8 m equivalent square grid spacing for the trian- on a square grid. Figure 5 illustrates the estimated semi-
~42.8"[2 variances for 8 directions up to a lag of 1000 m. Spatial
gular grid. This represents a saving of 1.40.8J or 10.0%
dependence is linear and geometrically anisotropic. The
for the triangular over the square grid, which seems following model was fitted to the sample semi-variances:
valuable. Hence, a practical sampling recommendation is
an equilateral grid with sample supports 45 m apart
which has an equivalent square grid spacing of 41.8 m. 7(h, 0) = 504 + {2202 cos2(0 - I. 194) +
1172 sin2(0 - 1.194)}'12h (3)
The same information might be required for blocks of a
different size, and, if so, can be derived from Figure 4 in
which the kriging variance is plotted against block size where h is in kilometers, 0 is in radians and 0 - - 0 is
for the 45 m triangular grid, and the 41.8 m square grid west-east. The two solid lines in Figure 5 define the
for the sake of comparison. Thus, estimates for l ha envelope within which the fitted model lies. The semi-
might be desired for advisory purposes. For these, the variogram has a large nugget variance, and is typical of
error is 0.08 pH units. In this survey, because the 'point' soil variables that are measured on small (true point)
estimates cover an area of 16 m x 16 m, their estimation supports and show rapid fluctuations over small dis-
error is only 0.28 pH units. In Figure 4, the square grid is tances. In this situation, the variation in peat thickness is
always worse in terms of O'gm,,
2 up to 90 m, including the largely a function of the microtopography of the land
block sizes between 50m and 90m where the grid- surface before the peat began to form. The anisotropy is
centered blocks have higher estimation variances. Beyond caused by different variations in thickness across and up
90 m, there seems to be a negligible difference between the slopes.
the grids at this sampling intensity. The apparent in- For the sake of this analysis, we require the semi-
crease in cry:2 above 260 m is a computational artefact variogram model only for the direction of maximum
338 A.B. McB~TNEY and R. WEBs'r~

~OINTS

/I /

//
0.3

I III/

II
I II
0.2
2
OK
/1/!
// I/

0.1

o.o L I J A I I I l
0 .5O tO0 150 20O 25O 3OO 350 400

GRID SPACING (m)

(;BID r ~ . 3.5t., ~m," ,f p,U,.,~,a For U,~'~#4U.~. ~o

CELA.-CENTBED

EQUIL.KT'E~ TRI~',IGUI~R G~ID r ~ . 3./5 ~u~raFp,~IJdfCt,~.Ir~,Je~.40

. . . . . . . . . . . . CEL~--C~I'BED

Figure 2. Topsoil pH at Broom's Barn. Graph of maximum kriging variance of points as function of grid spacing for
square and equilateral triangular grids, in this and subsequent figures, shape of function is interpolated from 20
estimates of kriging variance.
Design of optimal sampling schemes for local estimation--lI 339

2o°oo m
0°3

0.2 /

2
OK

0°I

20°00 m

0.0
/ I i I i I I I
0 ,~0 "100 "150 2OO 25O 3OO 350 /.00

GRID SPACING ( m)

SOJ,'NREGRID , ' ~ - 3.~ ~d'p,C't,,u,,~r.rUta'I~-/-,O

CELL.-CENTRED ............... GRID-(~

F_(IJILAI'EBAL TRI,~(;IJ.,~ GRID ~ • 3.¢.5 ruma-d" ~ ~ far ~ . ¢,.0

.............................. CELL,--CENTRED GRI D-CI3~FHr..U

Figure 3. Topsoil at Broom's Barn. Graph of kriging variance of 20 m x 20 m blocks centered at middle of grid
cells and at grid points as function of grid spacing for "square and equilateral triangular grids.
340 A.B. McBP.ATNEYand R. WEBSTER

0.06

0o0~

2
OK

0.(~

(-.lo88 m

0 . 0 0 t.. I ~ t I t --
0 50 "100 150 200 250 30O

SIZE OF BLOCK SIDE (m)

C~L,L.--CENTBED ............... GRI D-CENI'RED

EQUILATI~I.. "I"BI~I~LI,.~RGRID , ~ . 3.~.5 ~ • ~ u ~ F'gr~ . ~0

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F..EL~-CEN'r~IED GRIO--CENT~

Figure 4, Topsoil pH at Broom's Barn. Graph of kriging variance of square blocks centered at middle of grid cells
and at grid points on 45 m equilateral triangular grid and 41.8 m square grid as function of length of block size.
Design of optimal sampling schemes for local estimation--II 341

1000

800 A
AA A

L o

Y(h) V

400

200
• N-S A SSE-NNW
o W-E + ENE-WSW
n NW-SE • WNW-ESE
v NE-SW x NNE-SSW

I I I 1 |
0 2 4 6 8 10
h (distance/lOOm)
Figure 5. Semi-variogram of thickness of peat at Lephinmore with estimates for 8 directions. Two solid lines show
envelope of fitted model.
342 A.B. MCBRATNEYand R. WEBSTER

800

J
/
50O

400

2
OK
3OO

200

100

0 t I I I I
0°0 0oi 0°2 0.3 0,4 0.5

GRID SPACING (~rnl


SQO~qE GRID ~ = 3°~

EQUILp~TERAI_ TRIANC4_LA~ (3RID ~ : 3-L5 rLW~a£"ai,~u~KIrmrbtm'l:IP.WLan- ~.0

............ CE]-~-CE-N~

Figure 6. Depth of peat (cm) at Lephinmore in direction of maximum variation. Graph of maximum kriging
variance of points as function of grid spacing for square and equilateral triangular grids.
Design of optimal sampling schemes for local estimation--II 343

12,0

." f 0.10 ~'q


./ /

100
/." ...4/"
..'" /7

80 //

2
60
0K

40

20

0 I I I I I
0.0 0.I 0.2 0°3 0°¢ 0.5

GRID SPACING ( k l n )

S{I..I,~qE GRID ~ - 3.54

CEI_L~ ............... (~RID-CENTRED

EQUILATERAL I'RI,~(;LI_.~ GRID ~ - 3.z5 ~ ~" ~ ~ f'~"~ - ~.0

.............................. F.,ELL~ GBI~RE.D

Figure 7. Depth of peat (cm) at Lephinmore in direction of maximum variation. Graph of kriging variance of I ha
(100 m × 100 m) blocks centered at middle of grid cells and at grid points as function of grid spacing in direction of
maximum variation for rectangular and isosceles triangular grids.
344 A. R. MCBRATNEY and R. WEBSTER

30

20

2
OK
0o06

10

L , I |
0,0 0 1 0.2 0=3 0.4

S ] ZE OF BLOCK S I DE ~kin)

SOOR~E. O:~ID ~ ~ 3°54 ~ d" ~ ,,~ ear :.,x,a"~_-~-m. 4.0

CEU.,-CENTC~r_.D . . . . . . . . . . . . O:~ID- ~

Figure 8. Depth of peat (cm) at Lephinmore in direction of maximum variation. Graph of kriging variance of square
blocks centered at middle of grid cells and at grid points for 60 m x I IO m rectangular grid as function of length of
block side.
Design of optimal sampling schemes for local estimation--II 345

variation and the anisotropy ratio. The model is block width for the 6 0 m x l l0m grid. The estimation
errors are small, and do not decrease rapidly with in-
y(h)= 504 + 220 h (4) creasing positions of the block relative to the grid. It is
interesting to note that although the kriging error for a
and the anisotropy r is 220/117 = 1.88. I ha block on this grid is approximately 5 cm the error of
Figure 6 shows the effect of the large nugget variance a point estimate is 23 cm?
in that for point estimates there is only a small increase
in error as the grid spacing is increased, and this error is Acknowledgments--Wethank Mr. J. S. Bibby and Mr. G. Hud-
very large. There is no detectable difference between the son of the Soil Survey of Scotland for access to the Lephinmore
data and Mrs. J. W. Munden for help in developing the program,
square and equilateral triangular grids because of the A. B. McBratney was supported by a studentship from the
large nugget variance. The errors for grid spacings less Department of Agriculture and Fisheries for Scotland.
than 0.1 km are probably over-estimated because the
extrapolation of the semi-variogram to the ordinate takes
no account of the (unknown) semi-variances in these
REFERENCES
small intervals.
Burgess, T. M., Webster, R., and McBratney, A. B., in press,
For such a variable property, point estimates are of Optimal interpolation and isarithmic mapping of soil proper-
little consequence, and for management purposes, inter- ties. IV. Sampling strategy: Jour. Soil Science, v. 32.
est is likely to be in I ha (0.1 km x 0.1 km) blocks. A reason- Calderbank, V. J., and Prior, W. A. J., 1977, The GHOST
able maximum error would be 5 cm corresponding to a graphical output system. User Manual: UKAEA Culham
Laboratory, Abingdon, 125 p.
kriging variance of 25 cm 2. Figure 7 shows the kriging Clark, l., 1976, Some practical computational aspects of mine
variance for 100 m x 100 m blocks plotted against sample planning: In advanced geostatistics in the mining industry.
spacing a in the direction of maximum variation. Guarascio M., David, M., and Huijbregts, C., eds.,: Reidel,
However, in order to take account of the geometric Dordrecht, 461 p.
anisotropy present, an optimal sampling scheme will Journel, A. G., and Huijbregts, C. J., 1978, Mining geostatistics:
Academic Press, London, 600 p.
have a sample spacing b equal to ra in the direction of McBratney, A. B., Webster, R., and Burgess, T. M., 1981, The
minimum variation. The variances shown in Figure 7 are design of optimal sampling schemes for local estimation of
much smaller than those for point estimates, because the regionalised variables. I. Theory and Method: Computers &
nugget variance is so large. We also see that to achieve a Geosciences, v. 7, no. 4, p. 331-334.
kriging variance of approximately 25 cm: there is no Mat~rn, B., 1960, Spatial variation: Meddelanden frAn Statens
Skogiorskningsinstitut, v. 49, no. 5, 144 p.
perceptible merit in the triangular grid, for the same Matheron, G., 1965, Les variables r~gionalis~eset leur estima-
reason. Therefore, we should recommend survey on a tion: Masson, Paris, 305 p.
rectangular grid, with an internode spacing of 63 m in the Matheron, G., 1965, The theory of regionalised variables and its
direction of maximum variation, or 60 m if a round figure applications: Les Cahiers du Centre de Morphologie Math~m-
atique, no. 5, Centre de Gc~ostatistique,Fontainebleau, 211 p.
is desired, and an internode spacing of 60 r or l l0m in Webster, g., and Burgess, T. M., 1980,Optimal interpolation and
the perpendicular direction. isarithmic mapping of soil properties. Ill. Changing drift and
Figure 8 shows the kriging variance as a function of universal kriging: Jour. Soil Science, v. 31, no. 3, p. 505-524.

APPENDIX 1

0001C O S S F I M
0002C
0003C Optimal Sampling Scheme For Isarithmic Mapping
0004C (of r e g i o n a l i s e d variables)
0005C
0006C
0007C Program to find the standard error of a kriged estimate
0008C for points or square blocks of a given size from a square
0009C or equilateral triangular grid of a given spacing from
0010C knowledge of the s e m i - v a r i o g r a m of the property. The
O011C m a x i m u m kriging standard error is a measure of the
0012C g o o d n e s s of the sampling grid. For point kriging the
0013C m a x i m u m standard error of e s t i m a t i o n occurs at the
0014C m i d d l e of a grid cell. For block kriging the m a x i m u m
0015C standard error of estimation occurs either at a d a t u m
0016C point or at the middle of a grid cell. Hence a
0017C sampling scheme can be chosen after weighing the
0018C a c c e p t a b l e error against the effort or cost.
0019C
0020C
0021C
0022 REAL XSQGRD(100),YSQGRD(100),XTRGRD(100),YTRGRD(100)
346 A. B. M c B ~ E Y and R. WEBSTER

0023 & ,TITLE(32),BLKLEN(20),GRDSPC(20),XSQCEN(2),YSQCEN(2)


0024 & ,XTRCEN(2),YTRCEN(2),XNUGRD(100),YNUGRD(100),SERROR(20,20)
0025 & ,RTABM(20),RTABKM(20),VARWBL(20),FMTB(16),FMTG(16)
0026 INTEGER INDEX(50),OUT,TYPKRG,TYPGRD,PNTFND
0027 LOGICAL SQGRID,BOTH,CENCEL,VAKANS,KMETRE,SAMENO
0028 COMMON /SEMMOD/ MODTYP,CO,GRAD,CSLMCO,ARANGE,SILL
0029 DATA IN,OUT,MAXPTS,NUMPTS,MXBLGR/5,6,50,100,20/
0030 DATA RTABKM/4H ,4K S,4H p,4HG a,4Hr c,4Hi i,
0031 & 4Hd n,4H g,4H ,4H(km),10*4H /
0032 DATA RTABM/4H ,4H S,4H p,4HG a,4Hr c,4Hi i,
0033 & 4Hd n,4H g,4H ,4H (m),10*4H /
0034C
0035C set up notional interpolation points at the middle
0036C of grid cells and at grid points near the centre of
0037C the square and equilateral triangular grids respectively
0038C
0039 DATA XSQCEN(1),YSQCEN(1)/4.5,4.5/
0040 DATA XSQCEN(2),YSQCEN(2)/4.0,4.0/
0041 DATA XTRCEN(1),YTRCEN(1)/5.3728,5.2734/
0042 DATA XTRCEN(~),YTRCEN(2)/5.3728,4.6530/
0043C
0044C set up co-ordinates of square grid
0045C
0046 DATA XSQGRD/0.0,1 0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9 0
0047 1 ,0.0,i 0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9 0
0048 2 ,0.0,i 0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9 0
0049 3 ,0.0,i 0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9 0
0050 4 ,0.0,i 0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9 0
0051 5 ,0.0,i 0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9 0
0052 6 ,0.0,i 0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9 0
0053 7 ,0.0,i 0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9 0
0054 8 ,0.0,i 0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9 0
0055 9 ,0.0,i 0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9 O/
0O56 DATA YSQGRD/0.0,0 0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0 0
0057 1 ,1.0,1 0,i.0,i.0,I 0 , 1 . 0 , 1 . 0 , 1 . 0 , 1 . 0 , 1 . 0
0058 2 ,2.0,2.0,2.0,2.0,2 0,2.0,2.0,2 0,2.0,2.0
0059 3 ,3.0,3.0,3.0,3.0,3 0,3.0,3.0,3 0,3.0,3.0
0060 4 ,4.0,4.0,4.0,4.0,4 0,4.0,4.0,4 0,4.0,4.0
0061 5 .5.0,5.0,5.0,5.0,5 0,5.0,5.0,5 0,5.0,5.0
0062 6 ,6.0,6.0,6.0,6.0,6 0,6.0,6.0,6 0,6.0,6.0
0063 7 ,7.0,7.0,7.0,7.0,7 0,7.0,7.0,7 0,7.0,7.0
0064 8 ,8.0,8.0,8.0,8.0,8 0,8.0,8.0,8.0,8.0,8.0
0065 9 ,9.0,9.0,9.0,9.0,9 0,9.0,9.0,9.0,9.0,9.0/
0066C
0067C set up co-ordinates of equilateral triangular grid of
0068C same sampling density as square grid
0069C
0070 DATA XTRGRD/2.6864,3.7610,4.8356,5.9101,6.9847,8.0593
0071 1 ,2.1491,3.2237,4.2983,5.3728,6.4474,7.5220,8.5966
0072 2 ,1.6119,2.6864,3.7610,4.8356,5.9101,6.9847,8.0593
0073 & ,9.1338
0074 3 ,1.0746,2.1491,3.2237,4.2983,5.3728,6.4474,7.5220
0075 & ,8.5966,9.6711
0076 4 ,0.5373,1.6119,2.6864,3.7610,4.8356,5.9101,6.9847
0077 & ,8.0593,9.1338,10.2084
0078 5 ,0.0000,1.0746,2.1491,3.2237,4.2983,5.3728,6.4474
0079 & ,7.5220,8.5966,9.6711,10.7457
0080 6 ,0.5373,1.6119,2.6864,3.7610,4.8356,5.9101,6.9847
0081 & ,8.0593,9.1338,10.2084
0082 7 ,1.0746,2.1491,3.2237,4.2983,5.3728,6.4474,7.5220
0083 & ,8.5966,9.6711
0084 8 ,1.6119,2.6864,3.7610,4.8356,5.9101,6.9847,8.0593
0085 & ,9.1338
0086 9 ,2.1491,3.2237,4.2983,5.3728,6.4474,7.5220,8.5966
0087 T ,2.6864,3.7610,4.8356,5.9101,6.9847,8.0593
0088 E ,0.5373,10.2084,5.3728/
0089 DATA YTRGRD/0.0000,0.0000,0.0000,0.0000,0.0000,0.0000
0090 1 ,0.9306,0.9306,0.9306,0.9306,0.9306,0.9306,0.9306
0091 ,1.8612,1.8612,1.8612,1.8612,1.8612,1.8612,1.8612
0092 ,1.8612
0093 ,2.7918,2.7918,2.7918,2.7918,2.7918,2.7918,2.7918
0094 ,2.7918,2.7918
0095 ,3.7224,3.7224,3.7224,3.7224,3.7224,3.7224,3.7224
0096 ,3.7224,3.7224,3.7224
0097 ,4.6530,4.6530,4.6530,4.6530,4.6530,4.6530,4.6530
0098 ,4.6530,4.6530,4.6530,4.6530
Design of optimal samplingschemes for local estimation--lI 347

0099 6 ,5.5836,5.5836,5.5836,5.5836,5.5836,5.5836,5.5836
0100 & ,5.5836,5.5836,5.5836
0101 7 ,6.5142,6.5142,6.5142,6.5142,6.5142,6.5142,6.5142
0102 & ,6.5142,6.5142
0103 8 ,7.4448,7.4448,7.4448,7.4448,7.4448,7.4448,7.4448
0104 & ,7.4448
0105 9 ,8.3754,8.3754,8.3754,8.3754,8.3754,8.3754.,8.3754
0106 T ,9.3060,9.3060,9.3060,9.3060,9.3060,9.3060
0107 E ,1.8612,1.8612,10.2366/
0108C
0109C ..........................................
0110C
0111C INPUT
0112C
0113C
0114C Records 1-2 FORMAT(16A4)
0115C
0116C ITITLE two lines of title each of
0117C 64 c h a r a c t e r s
0118C
0119C
0120C Record 3 FORMAT(80Y) free format
0121C
0122C TYPKRG 0 for point kriging
0123C 1 for block kriging
0124C UNITKM a value which relates the
0125C distance units in the semi-
0126C v a r i o g r a m model to the
0127C kilometre, e.g. if model is in
0128C units of 50m then UNITKM=0.05.
0129C NOTE. The program switches from
0130C metres to kilometres if
0131C UNITKM.gt.0.099.
0132C NSPACE number of grid spacings required
0133C in one run of program (max 20)
0134C NBLOCK number of block sizes required
0135C in one run of program (max 20)
0136C
0137C
0138C Record 4 FORMAT(80Y) free format
0139C
0140C TYPGRD 3 for an equilateral triangular
0141C grid
0142C 4 for a square grid with the same
0143C sampling density as the
0144C triangular
0145C 5 for both
0146C PNTFND 0 to find points by specifying
0147C radius
0148C i to find points by specifying
0149C number of points to be found
0150C RADIUS the search radius for points in
0151C units of square grid intervals.
0152C 2.0< RADIUS >3.5 p r o b a b l y
0153C (ignored if PNTFND.eg.I)
0154C NREQRD number of points required for
0155C i n t e r p o l a t i o n (max set to 50).
0156C (ignored if PNTFND.eg.0)
0157C
0158C
0159C Record 5 FORMAT(80Y) specifies s e m i - v a r i o g r a m model in
0160C direction of m a x i m u m variation
0161C
0162C MODTYP I linear model (no sill)
0163C 2 linear with sill model
0164C 3 spherical model
0165C 4 exponential model
0166C 5 g a u s s i a n model
0167C CO value for nugget variance
0168C GRAD gradient of linear part of linear
0169C models. For other models
0170C GRADs0.0
0171C CSLMCO value for sill v a r i a n c e - n u g g e t
0172C variance. Input 0.0 for
0173C linear models.
0174C ARANGE a value for the range of the
0175C model. This is a distance

CAGEO VoW.7. No. 4--B


348 A. B. M c B ~ E y and R. WES~ER

0176C parameter in units related to


0177C km by UNITKM in Record 3 above.
0178C Input 0.0 for linear model
0179C without sill.
0180C RATIO the a n i s o t r o p y ratio a number >=i
0181C (if isotropic RATIO = i)
0182C if isotropic this parameter can
0183C also be used to find e s t i m a t e s
0184C of rectangular blocks with sides
0185C BLKLEN and BLKLEN/RATIO.
0186C
0187C
0188C Record 6 FORMAT(80Y) option for graph plotting
0189C
0190C IGHOST 0 for no graphical output
0191C i for graphical output using the
0192C ghost graphical output system
0193C
0194C
0195C Optional Record 6B
0196C ' FORMAT(80Y) specifies graphical output
0197C
0198C SCALE value which d e t e r m i n e s size of
0199C graphical output. At R.E.S.
0200C a SCALE value of 0.i=5.6cm
0201C 0 . 1 < S C A L E < 0 . 8 usually.
0202C WIDTH value which d e t e r m i n e s the ratio
0203C of the x-axis length to the
0204C y-axis length
0205C ICOLOR 0 for plots in black ink
0206C 1 for plots in red, green and
0207C black ink
0208C XINC the x axis increment (this is
0209C the d i s t a n c e axis)
0210C YINC the y axis increment (this is
0211C v a r i a n c e axis)
0212C YMAX the m a x i m u m variance expected
0213C
0214C
0215C Record 7 FORMAT(16A4) sPecifies data format
0216C
0217C FMTG format for the NSPACE grid
0218C spacings
0219C
0220C
0221C Records 8-X FORMAT(FMTG)
0222C
0223C GRDSPC the NSPACE grid spacings in same
0224C d i s t a n c e units as semi-
0225C var iogr am
0226C
0227C
0228C Record (X+I) FORMAT(16A4) specifies data format
0229C
0230C FMTB format for the N B L O C K block sizes
0231C
0232C
0233C Records (X+2)-Y FORMAT(FMTB)
0234C
0235C BLKLEN the NBLOCK block sizes in same
0236C d i s t a n c e units as semi-
0237C variogram
0238C
0239C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
0240C
0241C
0242C read data
0243C
0244 READ(IN,100) T I T L E
0245 READ(IN,101) T Y P K R G , U N I T K M , N S P A C E , N B L O C K
0246 READ(IN,101) T Y P G R D , P N T F N D , R A D I U S , N R E Q R D
0247 READ(IN,101) M O D T Y P , C O , G R A D , C S L M C O , A R A N G E , R A T I O
0248 READ(IN,101) IGHOST
0249 IF(IGHOST.EQ.I) READ(IN,101) S C A L E , W I D T H , I C O L O R , X I N C , Y I N C , Y M A X
O25O READ(IN,100) FMTG
Design of optimal sampling schemes for local estimation--lI 349

0251 READ(IN,FMTG) (GRDSPC(1),I-I,NSPACE)


0252 READ(IN,100) FMTB
0253 READ(IN,FMTB) (BLKLEN(I),I=I,NBLOCK)
0254C
0255C data read
0256C
0257 100 FORMAT(16A4)
0258 i01 FORMAT (80Y)
0259 IF(TYPKRG.EQ.0.AND.NBLOCK.GT.I) NBLOCK=I
0260 IF(TYPKRG.EQ.0) BLKLEN(1)=0.0
0261 IF(UNITKM.GE.0.1) KMETRE=.TRUE.
0262 IF(UNITKM.LT.0.1) KMETRE=.FALSE.
0263 IF(KMETRE) GOTO 6
0264 DO 2 I=I,NSPACE
0265 2 GRDSPC(I)=GRDSPC(I)*I000.0*UNITKM
0266 DO 4 I=I,NBLOCK
0267 4 BLKLEN(I)=BLKLEN(I)*I000.0*UNITKM
0268 ARANGE=ARANGE*I000.0*UNITKM
0269 GRAD=GRAD/(1000.0*UNITKM)
0270 GOTO 12
0271 6 DO 8 I=I,NSPACE
0272 8 GRDSPC(1)=GRDSPC(I)*UNITKM
0273 DO 10 I=I,NBLOCK
0274 10 B L K L E N ( I ) = B L K L E N ( I ) * U N I T K M
0275 ARANGE=ARANGE*UNITKM
0276 GRAD=GRAD/UNITKM
0277C
0278C write out information from steering data
0279C
0280 12 WRITE(OUT,105) TITLE
0281 GOTO (14,16,18,20,22),MODTYP
0282 14 WRITE(OUT,106) CO,GRAD
0283 GOTO 24
0284 16 CSLMCO-GRAD*ARANGE
0285 SILL=CO+CSLMCO
0286 WRITE(OUT,107) C O , G R A D , A R A N G E , S I L L , A R A N G E
0287 GOTO 24
0288 18 SILL-CO+CSLMCO
0289 WRITE(OUT,108) C O , C S L M C O , A R A N G E , A R A N G E , A R A N G E , S I L L , A R A R G E
0290 GOTO 24
0291 20 WRITE(OUT,109) C O , C S L M C O , A R A N G E
0292 GOTO 24
0293 22 WRITE(OUT,f10) C O , C S L M C O , A R A N G E
0294 24 IF(KMETRE) WRITE(OUT,Ill) RATIO
0295 IF(.NOT.KMETRE) WRITE(OUT,If2) RATIO
0296C
0297C finish writing information from steering data
0298C
0299 105 FORMAT(//10X,16A4/10X,16A4//10X,' Alex McBratney ',
0300 & ' Department of Soils and Plant Nutrition,'/
0301 & 10X,' Rothamsted Experimental Station, Harpenden. '//
0302 & 10X,' Optimal Sampling Strategy For Isarithmic Mapping'///)
0303 106 F O R M A T ( / / 1 0 X , ' L I N E A R MODEL',/15X,
0304 & 'GAMMA(H) = ',F12.6,' + ',F12.6,' H ')
0305 107 F O R M A T ( / / 1 0 X , ' L I N E A R WITH SILL MODEL'/15X,
0306 & 'GAMMA(H) = ',F12.6,' + ',F12.6,' H ; H < ',FI2.6/,15X,
0307 & 'GAMMA(H) = ',FI2.6,19X,'; H >= ',FII.6)
0308 108 F O R M A T ( / / 1 0 X , ' S P H E R I C A L MODEL'/15X,
0309 & 'GAMMA(H) = ',F12.6,' + ',FI2.6,'(I.SH/',FI2.6,' + ',
0310 & '0.5 (H**3/',FI2.6,'**3)) ; H < ',FI2.6/,15X,
0311 & 'GAMMA(H) = ',FI2.6,63X,' ; H >= ',FII.6)
0312 109 F O R M A T ( / / 1 0 X , ' E X P O N E N T I A L MODEL'/15X,
0313 & 'GAMMA(H) = ',F12.6,' + ',F12.6,' (i - EXP(-H/'
0314 & ,F12.6,' ))')
0315 110 F O R M A T ( / / 1 0 X , ' G A U S S I A N MODEL'/15X,
0316 & 'GAMMA(H) = ',F12.6,' + ',F]2.6,' (i - EXP(-H**2/'
0317 & ,F12.6,'*'2 ))')
0318 iii FORMAT(25X,'DISTANCES (H) ARE IN KILOMETRES'//
0319 & 10X,'ANISOTROPY RATIO IS SET TO ',F5.3)
0320 112 FORMAT(25X,'DISTANCES (H) ARE IN METRES'//
0321 & 10X,'ANISOTROPY RATIO IS SET TO ',F5.3)
0322C
0323C set up logical variables
0324C
0325 IF(PNTFND.EQ.0) SAMENO=.FALSE.
350 A.B. M c B ~ E Y a n d R. WEB~ER

0326 IF(PNTFND.EQ.I) SAMENO=.TRUE.


0327 IF(SAMENO) N F O U N D - N R E Q R D
0328 IF(TYPGRD.EO.3) S Q G R I D = . F A L S E .
0329 IF(TYPGRD.EQ.4) S Q G R I D = . T R U E .
0330 IF(TYPGRD.EQ.5) BOTH=.TRUE.
0331 IF(TYPGRD.EQ.5) S Q G R I D = . T R U E .
0332C
0333C calculate the w i t h i n - b l o c k variance for the N B L O C K b l o c k s
0334C
0335 DO 28 K = I , N B L O C K
0336 IF(TYPKRG.EQ.0) GOTO 26
0337 YLENTH=BLKLEN(K)/RATIO
0338 V A R W B L (K) = W B L V A R (BLKLEN (K) ,YLENTH)
0339 GOTO 28
0340 26 VARWBL(K) =0.0
0341 28 CONTINUE
0342 IF(TYPKRG.EQ.0) GOTO 42
0343C
0344C write out w i t h i n - b l o c k variances
0345C
0346 WRITE(OUT,If3)' TITLE
0347 WRITE(OUT,114)
0348 IF(NBLOCK.LE.10) GOTO 30
0349 NK=I0
0350 NLEFT=NBLOCK-10
0351 GOTO 32
0352 30 N K = N B L O C K
0353 NLEFT=0
0354 32 LK=I
0355 GOTO 36
0356 34 LK=II
0357 NK=NBLOCK
0358 NLEFT=0
0359 WRITE(OUT,133)
0360 36 IF(.NOT.KMETRE) GOTO 38
0361 WRITE(OUT,128)
0362 GOTO 40
0363 38 W R I T E ( O U T , 1 2 9 )
0364 40 WRITE(OUT,130) (BLKLEN(K),K=LK,NK)
0365 WRITE(OUT,115) (VARWBL(K),K=LK,NK)
0366 IF(NLEFT.GT.0) GOTO 34
0367 113 FORMAT(IHI,32A4///)
0368 114 F O R M A T ( 1 0 X , ' W I T H I N - B L O C K VARIANCES',///)
0369 115 F O R M A T ( 1 3 X , 1 0 ( I X , F 1 0 . 4 ) )
0370 42 ICOUNT=0
0371C
0372C perform c a l c u l a t i o n s
0373C
0374 44 DO 94 I=i,2
0375 IF(I.EQ.I) C E N C E L = . T R U E .
0376 IF(I.EQ.2) C E N C E L - . F A L S E .
0377 I F ( T Y P K R G . E Q . 0 . A N D . I . E Q . 2 ) GOTO 94
0378 DO 56 J = I , N S P A C E
0379 GSPACE=GRDSPC(J)
0380 IF(.NOT.SQGRID) GOTO 48
0381 DO 46 JJ~l,100
0382 XNUGRD(JJ)=XSQGRD(JJ)*GSPACE
0383 46 YNUGRD(JJ)=YSQGRD(JJ)*GSPACE
0384 XC=XSQCEN(I)*GSPACE
0385 YC=YSQCEN(I)*GSPACE
0386 RADIUS-RADIUS*GSPACE
0387 GOTO 52
0388 48 DO 50 JJ=l,100
0389 XNUGRD(JJ)=XTRGRD(JJ)*GSPACE
0390 50 YNUGRD(JJ)=YTRGRD(JJ)*GSPACE
0391 XC=XTRCEN(I)*GSPACE
0392 YC=YTRCEN(I)*GSPACE
0393 RADIUS-RADIUS*GSPACE
0394 52 IF(J.EQ.I) CALL F N D P T S ( S A M E N O , X N U G R D , Y N U G R D , X C , Y C ,
0395 & NUMPTS,INDEX,RADIUS,MAXPTS,NFOUND)
0396 RADIUS=RADIUS/GSPACE
0397 DO 54 K = I , N B L O C K
0398 YLENTHzBLKLEN(K)/RATIO
0399 NCALL=K
0400 IFAIL=0
0401 CALL KRGERR (NCALL,XNUGRD,YNUGRD,XC,YC,VARKRG,NFOUND,
Design of optimal sampling schemes for local estimation--II 351

0402 & INDEX,TYPKRG,BLKLEN(K),YLENTH,VARWBL(K),IFAIL)


0403 SERROR(J,K)=VARKRG
0404 IF(IFAIL.EQ.I) WRITE(OUT,137) GSPACE,BLKLEN(K)
0405 54 CONTINUE
0406 56 CONTINUE
0407C
0408C output results in tabular form via line printer
0409C
0410 DO 92 L=I,2
0411 IF(L.EQ.I) GOTO 62
0412 VARANS=.FALSE.
0413 DO 60 J = I , N S P A C E
0414 DO 58 K = I , N B L O C K
0415 SERROR(J,K)-SQRT(SERROR(J,E))
0416 58 CONTINUE
0417 60 CONTINUE
0418 GOTO 64
0419 62 VARANS=.TRUE.
0420 64 WRITE(OUT,f13) T I T L E
0421 IF(VAI~NS.AND.SQGRID.AND.CENCEL) WRITE(OUT,120)
0422 IF(.NOT.VARANS.AND.SQGRID.AND.CENCEL) WRITE(OUT,121)
0423 IF(VARANS.AND.SQGRID.AND..NOT.CENCEL) WRITE(OUT,122)
0424 IF(.NOT.VARANS.AND.SQGRID.AND..NOT.CENCEL) WRITE(OUT,123)
0425 IF(VARANS.AND..NOT.SQGRID.AND.CENCEL) WRITE(OUT,124)
0426 IF(.NOT.VARANS.AND..NOT.SQGRID.AND.CENCEL) WRITE(OUT,125)
0427 IF(VARANS.AND..NOT.SQGRID.AND..NOT.CENCEL) WRITE(OUT,126)
0428 IF(.NOT.VARANS.AND..NOT.SQGRID.AND..NOT.CENCEL) WRITE(OUT,127)
0429 120 F O R M A T ( 1 0 X , ' K R I G I N G VARIANCES FOR A SQUARE GRID'
0430 & ,' WITH I N T E R P O L A T I O N POINTS AT THE CENTRES OF GRID CELLS'///)
0431 121 F O R M A T ( 1 0 X , ' K R I G I N G STANDARD ERRORS FOR A SQUARE GRID WITH',
0432 & ' I N T E R P O L A T I O N POINTS AT THE CENTRES OF GRID CELLS'///)
0433 122 F O R M A T ( 1 0 X , ' K R I G I N G VARIANCES FOR A SQUARE GRID'
0434 &' WITH I N T E R P O L A T I O N POINTS AT GRID POINTS'///)
0435 123 F O R M A T ( 1 0 X , ' K R I G I N G STANDARD ERRORS FOR A SQUARE GRID'
0436 &' WITH I N T E R P O L A T I O N POINTS AT GRID POINTS'///)
0437 124 F O R M A T ( 1 0 X , ' K R I G I N G VARIANCES FOR AN'
0438 &' E Q U I L A T E R A L T R I A N G U L A R GRID WITH INTERPOLATION'
0439 &' POINTS AT THE CENTRE OF GRID CELLS'///)
0440 125 F O R M A T ( 1 0 X , ' K R I G I N G STANDARD ERRORS FOR AN EQUILATERAL'
0441 &' T R I A N G U L A R GRID WITH I N T E R P O L A T I O N POINTS AT THE'
0442 &' C E N T R E OF GRID CELLS'///)
0443 126 F O R M A T ( 1 0 X , ' K R I G I N G VARIANCES FOR AN EQUILATERAL'
0444 &' T R I A N G U L A R GRID WITH I N T E R P O L A T I O N POINTS AT GRID'
0445 &' POINTS'///)
0446 127 F O R M A T ( 1 0 X , ' K R I G I N G STANDARD ERRORS FOR AN EQUILATERAL'
0447 &' T R I A N G U L A R GRID WITH I N T E R P O L A T I O N POINTS AT GRID'
0448 &' POINTS'///)
0449 IF(NBLOCK.LE.10) GOTO 66
0450 NK=I0
0451 NLEFT=NHLOCK-10
0452 GOTO 68
0453 66 NK=NBLOCK
0454 NLEFT=0
0455 68 LK=I
0456 GOTO 72
0457 70 LK=II
0458 NK=NBLOCK
0459 NLEFT=0
0460 WRITE(OUT,133)
0461 72 IF(TYPKRG.EQ.0) GOTO 78
0462 IF(.NOT.KMETRE) GOTO 74
0463 WRITE(OUT,128)
0464 GOTO 76
0465 74 WRITE(OUT,129)
0466 76 WRITE(OUT,130) (BLKLEN(K), K=LK,NK)
0467 GOTO 80
0468 78 WRITE(OUT,136)
0469 80 DO 84 J = I , N S P A C E
0470 IF(KMETRE) GOTO 82
0471 WRITE(OUT,131) RTABM(J), GRDSPC(J), (SERROR(J,K), K=LK,NK)
0472 GOTO 84
0473 82 ~RITE(OUT,131) RTABKM(J), GRDSPC(J), (SERROR(J,K),K=LK,NK)
0474 84 CONTINUE
0475 IF(NSPACE.GE.10) GOTO 90
0476 NSPCPI=NSPACE+I
047#7 DO 88 J = N S P C P I , 1 0
352 A. B. M c B ~ m ' and R. WEss'rF.~

0478 IF(KMETRE) GOTO 86


0479 WRITE(OUT,132) RTABM(J)
0480 GOTO 88
0481 86 WRITE(OUT,132) RTABKM(J)
0482 88 CONTINUE
0483 90 IF(NLEFT.GT.0) GOTO 70
0484 IF(.NOT.SQGRID) WRITE(OUT,133)
0485 IF(.NOT.SQGRID) WRITE(OUT,134)
0486 WRITE(OUT,135) RADIUS,NFOUND
0487 128 FORMAT(20X,'Size of block side (km)'/)
0488 129 FORMAT(20X,'Size of block side (m)'/)
0489 130 F O R M A T ( 1 3 X , I O ( 2 X , F 7 . 2 , 2 X ) , / )
0490 131 F O R M A T ( I X , A 4 , 1 X , F 7 . 2 , 1 0 ( 1 X , F I O . 4 ) )
0491 132 FORMAT(IX,A4)
0492 133 FORMAT(///)
0493 134 FORMAT(10X,'**NOTE for c o m p a r a t i v e purposes the grid'
0494 &' spacings are equivalent to spacings on square grids with'
0495 & /10X, 'the same sampling intensity.'
0496 & 3X, 'The actual distances between grid points'
0497 & ' are 1.0746 time6 greater.')
0498 135 F O R M A T ( / / , I O X , ' S e a E c h radius -',F6.3,5X,'Number of points',
0499 &' used for interpolation ~',I3)
0500 136 FORMAT(18X,'Point estimates',/)
0501 137 FORMAT(10X,'** INVERSION FAILED WITH GRID SPACING',
0502 & FI0.4,' AND BLOCK SIZE',FI0.4)
0503C
0504C optionally output results in graphical form
0505C using the GHOST Graphical Output System
0506C
0507 IF(IGHOST.NE.1) GOTO 92
0508 IF(NSPACE.EQ.I.AND.NBLOCK.EQ.I) GOTO 92
0509 IF(VARANS) CALL O S S G R F ( S E R R O R , M X B L G R , G R D S P C , N S P A C E , B L K L E N , N B L O C K ,
0510 & SOGRID,CENCEL,KMETRE,ICOLOR,SCALE,WIDTH,XINC,YINC,TYPKRG,YMAX,
0511 & RADIUS,NFOUND,TITLE,BOTH)
0512 92 CONTINUE
0513 94 CONTINUE
0514C
0515C if both types of grid required now go back and
0516C compute errors for equilateral triangular grid
0517C
0518 ICOUNT=ICOUNT+I
0519 IF(ICOUNT.EQ.2) BOTHz. FALSE.
0520 IF(BOTH) SQGRID-.FALSE.
0521 IF(BOTH) GOTO 44
0522C
0523C end of main program OSSFIM
0524C
0525 STOP
0526 END

0527 SUBROUTINE FNDPTS(SAMENO,XX,YY,XCEN,YCEN,NDATPT,IDENT,RADIUS,


0528 & MAXPT,NFOUND)
0529C
0530C Subroutine to find the grid points required to krige a
0531C point or block given the search radius or the number
0532C of points to be found. The maximum number of grid points
0533C is MAXPT.
0534C
0535 REAL XX(1),YY(1),DIST(100)
0536 INTEGER IDENT(1),OUT
0537 LOGICAL SAMENO
0538 DATA OUT/6/
0539 IF (SAMENO) GOTO 180
0540C
0541C find all the points within the given search radius
0542C
0543 105 NFOUND=0
0544 DO 120 K=I,NDATPT
0545 XKMXC=XX(K)-XCEN
0546 YKMYC=YY(K)-YCEN
0547 D=SQRT(XKMXC*XKMXC+YKMYC*YKMYC)
0548 IF(D.GT.RADIUS) GOTO 120
0549 NFOUND=NFOUND+I
0550 IF(NFOUND.GT.MAXPT) GOTO 130
0551 IDENT(NFOUND)=K
0552 120 CONTINUE
Design of optimal sampling schemes for local estimation--II 353

0553 GOTO 150


0554 130 R A D I U S = R A D I U S * 0 . 9
0555 WRITE(OUT,160) N F O U N D , R A D I U S
0556 WRITE(OUT,140) M A X P T , R A D I U S
0557 140 F O R M A T ( I H I , / / 1 0 X , ' M O R E THAN',I3,' GRID POINTS FOUND WITHIN'
0558 & ,' SEARCH R A D I U S ' / 1 0 X , ' T H E SEARCH RADIUS HAS BEEN REDUCED'
0559 & ,' TO',IX,FI0.4)
0560 GOTO 105
0561 160 F O R M A T ( 1 0 X , ' N F O U N D = ' , I 5 , 2 X , ' R A D I U S = ' , F I 0 . 4 )
0562 150 RETURN
0563C
0564C find a set of NFOUND points which are nearest
0565C to the point or block centre to be interpolated
0566C
0567 180 DO 190 K = I , N D A T P T
0568 XKMXC=XX(K)-XCEN
0569 YKMYC=YY(K)-YCEN
0570 DIST(K)=SQRT(XKMXC*XKMXC+YKMYC*YKMYC)
0571 190 CONTINUE
0572 NREQRD=NFOUND
0573 IF(NREQRD.GT.MAXPT) N R E Q R D = M A X P T
0574 NFOUND=0
0575 200 D=I.0E06
0576 DO 210 K = I , N D A T P T
0577 IF(D.LT.DIST(K)) GOTO 210
0578 D=DIST(K)
0579 ID=K
0580 210 CONTINUE
0581 NFOUND=NFOUND+I
0582 DIST(ID)=I.0E07
0583 IDENT(NFOUND)=ID
0584 RADIUS=D
0585 IF(NFOUND.LT.NREQRD) GOTO 200
0586 RETURN
0587 END

0588 SUBROUTINE KRGERR(NCALL,XX,YY,XCEN,YCEN,KRGVAR,


0589 & NUMPTS,IDENT,KRGTYP,XDIS,YDIS,SGSQRZ,IFAIL)
0590C
0591C S u b r o u t i n e to calculate the kriging e s t i m a t i o n variance
0592C for a point or block in 2 d i m e n s i o n a l space.
0593C
0594C Arguments
0595C XX YY arrays holding the grid c o - o r d i n a t e s
0596C XCEN YCEN c o - o r d i n a t e s of the point or centre of
0597C block to be interpolated
0598C KRGVAR returns the kriging variance
0599C NUMPTS number of points to be used for interpolation
0600C IDENT array holding an index of the NUMPTS points
0601C KRG~YP 0 for point kriging 1 for block kriging
0602C XDIS YDIS length of block in X and Y d i r e c t i o n s
0603C SGSQRZ the w i t h i n - b l o c k s variance
0604C IFAIL returns i if matrix inversion fails
0605C
0606C Requires FUNCTIONs GAMMAH, SEMAV and INVERS
0607C
0608C
0609C
0610 REAL X X ( 1 ) , Y Y ( 1 ) , K R G V A R
0611 DOUBLE PRECISION A ( 5 1 , 5 1 ) , B ( 5 1 ) , C ( 5 1 ) , D S U M
0612 INTEGER IDENT(NUMPTS)
0613 COMMON / S E M M O D / M O D T Y P , C O , G R A D , C S L M C O , A R A N G E , S I L L
0614 DATA IADIM/51/
0615 NORDER=NUMPTS+I
0616 IF(NCALL.NE.I) GOTO 135
0617C
0618C initialise symmetric matrix A
0619C (semi-variance between chosen grid points)
0620C
0621 DO i00 J = I , I A D I M
0622 DO i00 L=I,I~d31M
0623 A(J,L)=0.0D0
0624 i00 A ( L , J ) = 0 . 0 D 0
0625C
354 A. B. McB~TNEYand R. WE~'~x

0626C calculation of matrix


0627C
0628 DO 120 J-I,NUMPTS
0629 DO 120 Lml,J
0630 IF(J.EQ.L) GOTO 105
0631 II-IDENT(J)
0632 I2-IDENT(L)
0633 A(J,L)-GAMMAH(XX(II),YY(II),XX(I2),YY(I2))
0634 A(L,J) -A(J, L)
0635 GOTO 120
0636 105 A(J,L) -0.0D0
0637 120 CONTINUE
0638 DO 130 L-I,NUMPTS
0639 A(NORDER,L)-I.0D0
0640 130 A(L,NORDER) sl.0D0
0641 A(NORDER,NORDER)-0.0D0
0642C
0643C initialise vector B
0644C (semi-variance between grid points and the
0645C point or block to be interpolated)
0646C
0647 135 DO 140 K=I,IADIM
0648 140 B(K) m0.0D0
0649C calculation of vector B
0650 DO 170 M-I,NUMPTS
0651 I1 -IDENT(M)
0652 IF (KRGTYP) 150,150,160
0653 150 B(M)=GAMMAH(XCEN,YCEN,XX(II),YY(I1))
0654 GOTO 170
0655 160 B(M)-SEMAV(XX(II),YY(II),XCEN,YCEN,XDIS,YDIS)
0656 170 CONTINUE
0657 B(NORDER)-I.0D0
0658C
0659C invert matrix A its inverse is returned in A
0660C
0661 IF(NCALL.NE.I) GOTO 180
0662 CALL INVERS(A,IADIM,NORDER,IFAIL)
0663 IF(IFAIL.NE.0) RETURN
0664C
0665C multiply inverse A by vector B to find weights vector C
0666C
0667 180 DO 200 J=I,NORDER
0668 DSUM=0.0D0
0669 DO 190 K=I,NORDER
0670 190 DSUM=DSUM+A(J,K)*B(K)
0671 C(J)-DSUM
0672 200 CONTINUE
0673C
0674C calculation of the estimation variance of the
0675C of the kriged estimate of the point or block
0676C
0677 KRGVAR=0.0
0678 DO 210 K=I,NORDER
0679 210 KRGVAR-KRGVAR+B(K)*C(K)
0680 KRGVAR-KRGVAR-SGSQRZ
0681 RETURN
0682 END

0683 FUNCTION WBLVAR(DX,DY)


0684C
0685C Function for calculating the variance within a rectangular
0686C block with sides parallel and perpendicular to the co-ordinate
0687C system using an equally weighted ~iscrete approximation.
0688C
0689C Arguments
0690C DX DY length of block in x and y directions
0691C
0692C Requires FUNCTION GAMMAH
0693C
0694C
0695C
0696 COMMON /SEMMOD/ MODTYP,CO,GRAD,CSLMCO,ARANGE,SILL
0697 DATA NEST,R2NEST,RNSTSQ/8,0.0625,0.015625/
0698C
0699C NEST should be an even number
0700C
Design of optimal sampling schemes for local estimation--II 355

0701 DINCX=R2NEST*DX
0702 DINCYsR2NEST*DY
0703 WBLVAR=0.0
0704 DO I0 I=I,NEST
0705 DO lO J=I,NEST
0706 XBLCOs(FLOAT(2*I)-I.O)*DINCX
0707 YBLCO=(FLOAT(2*J)-I.O)*DINCY
0708 DO i0 K~I,NEST
0709 DO i0 L'I,NEST
0710 XXBLCOz(FLOAT(2*K)-I.0)*DINCX
0711 YYBLCO~(FLOAT(2*L)-I.0)*DINCY
0712 WBLVAR=WBLVAR+GAMMAH(XBLCO,YBLCO,XXBLCO,YYBLCO)
0713 i0 CONTINUE
0714 WBLVARsWBLVAR*RNSTSQ*RNSTSQ
0715 RETURN
0716 END

0717 FUNCTION SEMAV(X,Y,XCEN,YCEN,DX,DY)


0718C
0719C Function for calculating the semi-variance of a grid point
0720C and a rectangular block with sides parallel and perpendicular
0721C to the co-ordinate system using an equally weighted discrete
0722C approximation.
0723C
0724C Arguments
0725C X Y co-ordinates of the grid point
0726C XCEN YCEN co-ordinates of the centre of the block
0727C DX DY length of block in x and y directions
0728C
0729C Requires FUNCTION GAMMAH
0730C
0731C
0732 COMMON /SEMMOD/ MODTYP,CO,GRAD,CSLNCO,ARANGE,SILL
0733 DATA NEST,R2NEST,RNSTSQ/8,0.0625,O.015625/
0734C
0735C NEST should be an even number
0736C
0737 SUMGAM=0.0
0738 XEDGE=XCEN-DX*0.5
0739 YEDGEzYCEN-DY*0.5
0740 DINCXwR2NEST*DX
0741 DINCYmR2NEST*DY
0742 DO 10 I=I,NEST
0743 DO i0 J-I,NEST
0744 XBLKCO-XEDGE+(FLOAT(2*I)-I.0)*DINCX
0745 YBLKCO-YEDGE+(FLOAT(2*J)-I.0)*DINCY
0746 SUMGAM-SUMGAM+GAMMAH(X,Y,XBLKCO,YBLKCO)
0747 I0 CONTINUE
0748 SEMAV - SUMGAM*RNSTSQ
0749 RETURN
0750 END

0751 FUNCTION GAMMAH(XI,YI,X2,Y2)


0752C
0753C Function for calculating the semi-variance between
0754C two points.
0755C
0756C Arguments
0757C X1 Y1 co-ordinates of the first point
0758C X2 Y2 co-ordinates of the second point
0759C
0760C
0761C
0762 COMMON /SEMMOD/ MODTYP,CO,GRAD,CSLMCO,ARANGE,SILL
0763 XINX2-XI-X2
0764 YIMY2-YI-Y2
0765 H-SQRT(XlNX2*XIMX2+YIMY2*YIMY2)
0766 GOTO~10,20,30,40,50),MODTYP
0767C
0768C isotropic linear model (no sill)
0769C
0770 10 GAMMAH-CO+GRAD*H
0771 RETURN
0772C
0773C isotropic linear with sill model
356 A. B. McBgAT~mYand R. WEKSTn

0774C
0775 20 IF(H.LT.ARANGE) GOTO 25
0776 GAMMAH-SILL
0777 RETURN
0778 25 GAMMAH-CO+GRAD*H
0779 RETURN
0780C
0781C isotropic spherical model
0782C
0783 30 IF(H.LT.ARA~GE) GOTO 35
0784 GAMMAB - SILL
0785 RETURN
0786 35 HOVERA-H/ARANGE
0787 GAMMAH-CO+CSLMCO*(I.5*HOVERA-0.5*HOVERA*HOVERA*HOVERA)
0788 RETURN
0789C
0790C isotropic exponential model
0791C
0792 40 HOVERA--H/ARANGE
0793 GAMMAH - CO+CSLMCO*(I.0-EXP(HOVERA))
0794 RETURN
0795C
0796C isotropic gsussian model
0797C
~798 50 HOVERAsH/ARANGE
0799 HOVERA--HOVERA*HOVERA
0800 GAMMAH s CO+CSLMCO*(I.0-EXP(HOVERA))
0801 RETURN
0802 END
0803 SUBROUTINE INVERS(SYMMAT,ISDIM,ISIZE,IFAULT)
0804C
0805C Subroutine for inverting a symmetric matrix, SYMMAT.
0806C It requires a small (machine dependent) value for TOL
0807C as a criterion of singularity.
0808C
0809C Arguments
0810C SYMMAT the symmetric matrix, its inverse is returned
0811C in SYMMAT
0812C ISDIM the dimensions of SYMMAT (max set to 51)
0813C ISIZE the order of SYMMAT (max ISDIM)
0814C IFAULT error indicator. A value of 0 is returned
0815C if inversion is successful, 1 if
0816C unsuccessful (matrix non positive definite).
0817C
0818C
0819 DOUBLE PRECISION SYMMAT(ISDIM, I S D I M ) , D ( 5 1 ) , E ( 5 1 ) , Y , W , T O L
0820 INTEGER Z(51),P
0821C
0822 DATA TOL/I.0D-12/
0823 DO i00 J-I,ISIZE
0824 i00 Z(J) -J
0825 DO 160 I-I,ISIZE
0826 K=I
0827 Y=SYMMAT(I, I)
0828 L=I-I
0829 P-I+1
0830 IF(P.GT.ISIZE) GOTO 120
0831 DO 105 J-P,ISIZE
0832 W=SYMMAT ( I ,J)
0833 IF(DABS(W) .LE.DABS(Y)) GOTO 105
0834 K~J
0835 Y=W
0836 105 CONTINUE
0837 120 IF(DABS(Y) .LT.TOL) GOTO 200
0838 Y-I. 0D0/Y
0839 DO 130 J-I,ISIZE
0840 E(J) -SYMMAT (J, K)
0841 SYMMAT (J, K) -SYMMAT (J, I)
0842 SYMMAT (J, I) --E(J) *Y
0843 SYMMAT (I ,J) -SYMMAT (I ,J) *Y
0844 130 D(J) =SYMMAT ( I ,J)
0845C
0846 SYMMAT(I, I) -Y
0847 J-Z (1)
0848 Z(1)=Z(K)
0849 Z(K)=J
0850 DO 150 KsI,ISIZE
Design of optimal sampling schemes for local estimation--ll 357

0851 IF(K.EQ.I) GOTO 150


0852 DO 140 J=I,ISIZE
0853 IF(J.EQ.I) GOTO 140
0854 SYMMAT(K,J)=SYMMAT(K,J)-D(J)*E(K)
0855 140 CONTINUE
0856 150 CONTINUE
0857 160 CONTINUE
0858C
0859 DO 190 I=I,ISIZE
0860 170 K=Z(I)
0861 IF(K.EQ.I) GOTO 190
0862 DO 180 J=I,ISIZE
0863 W=SYMMAT(I,J)
0864 SYMMAT(I,J)=SYMMAT(K,J)
0865 180 SYMMAT(K,J)=W
0866 P=Z (I)
0867 Z(I)=Z(K)
0868 Z(K)=P
0869 GOTO 170
0870 190 CONTINUE
0871 IFAULT=0
0872 GOTO 210
0873 200 IFAULT=I
0874 210 RETURN
0875 END

0876 SUBROUTINE OSSGRF (SERROR,MXBLGR,GRDSPC,NSPACE,BLKLEN,NBLOCK,


0877 & SQGRID,CENCEL,KMETRE,ICOLOR,SCALE,WIDTH,XINC,YINC,KRGTYP,YMAX,
0878 & RADIUS,NFOUND,TITLE,BOTH)
0879C
0880C Subroutine to plot graphs of kriging variance versus
0881C grid spacing or size of block side.
0882C
0883C Requires GHOST subroutines
0884C
0885 REAL SERROR (MXBLGR,MXBLGR),BLKLEN(1),GRDSPC(1),TITLE(1),
0886 & GSTVEC(20)
0887 LOGICAL SOGRID,CENCEL,KMETRE,COLOUR,POINTK,BOTH
0888 IF(ICOLOR.EQ.0)COLOUR=.FALSE.
0889 IF(ICOLOR.EQ.I)COLOUR=.TRUE.
0890 IF(KRGTYP.EQ.0) POINTK-.TRUE.
0891 IF(KRGTYP.EQ.I) POINTK-.FALSE.
0892 CALL CTRSET(8)
0893 IF(BOTH.AND..NOT.CENCEL) GOTO 121
0894 IF(BOTH.AND..NOT.SOGRID) GOTO 121
0895 CALL PAPER(l)
0896 XL=0.2
0897 XH=0.2+SCALE*0.8*WIDTH
0898 YL=0.2
0899 YH=0.2+SCALE*0.8
0900 YLL=YL-(YH-YL)*0.3
0901 CL=0.0
0902 CH=0.95
0903 XMIN=0.0
0904 YMIN=0.0
0905 DO 120 J=I,NSPACE
0906 DO 105 K=I,NBLOCK
0907 YMAXzAMAX1 (YMAX,SERROR(J,K))
0908 105 CONTINUE
0909 120 CONTINUE
0910 XMAX=BLKLEN (NBLOCK)
0911 IF(NBLOCK.EQ.I) XMAX-GRDSPC(NSPACE)
0912 XMAX=XMAX+XMAX*0.01
0913 RX=(XMAX-XMIN)*0.1
0914 RX2P5=RX*2.5
0915 XHALF=0.5*(XMAX-XMIN)
0916 YHALF=0.5*(YMAX-YMIN)
0917 RY=(YMAX-YMIN)*0.133
0918 RYHALF=0.5*RY
0919 RYIP5=RY+RYHALF
0920 RY2=RY*2.0
0921 RY2P5=RY2+RYHALF
0922 RY2P6=RY2P5+0.1*RY
0923 CALL MAp (XMIN,XMAX,YMIN,YMAX+RYHALF)
0924 CALL PSPACE (XL,XH,YL,YH)
0925 CALL CSPACE (CL,CH,CL,CH)
358 A. B. McBRATNEYand R. WEBSTFm

0926 SIZE=SCALE*7.0+1.0
0927 IMAG=INT(SIZE)
0928 CALL CTRMAG(IMAG)
0929 CALL BLKPEN
0930 CALL AXESSI(XINC,YINC)
0931 CALL BOX (XMIN,XMAX,YMIN,yMAX+RYHALF)
0932 121 CALL MAP(XMIN,XMAX,YMIN-RY2P6,YMIN)
0933 CALL PSPACE(XL,XH,YLL,YL)
0934 IF(BOTH.AND..NOT.POINTK) GOTO 124
0935 IF(CENCEL) GOTO 122
0936 IF(COLOUR) CALL GRNPEN
0937 IF(.NOT.COLOUR) CALL BROKEN(2,3,2,3)
0938 GOTO 134
0939 122 IF(BOTH) GOTO 123
0940 IF(COLOUR) CALL REDPEN
0941 GOTO 133
0942 123 IF(COLOUR.AND.SQGRID) CALL REDPEN
0943 IF(COLOUR.AND..NOT.SQGRID) CALL GRNPEN
0944 IF(.NOT.COLOUR.AND..NOT.SQGRID) CALL BROKEN(2,3,2,3)
0945 IF(SQGRID) GOTO 133
0946 GOTO 135
0947 124 IF(.NOT.CENCEL) GOTO 126
0948 IF(.NOT.SQGRID) GOTO 125
0949 IF(COLOUR) CALL REDPEN
0950 GOTO 133
0951 125 IF(COLOUR) CALL GRNPEN
0952 IF(.NOT.COLOUR) CALL BROKEN(I,1,1,1)
0953 GOTO 135
0954 126 IF(.NOT.SQGRID) GOTO 127
0955 IF(COLOUR) CALL REDPEN
0956 CALL BROKEN(I,3,1,3)
0957 GOTO 134
0958 127 IF(COLOUR) CALL GRNPEN
0959 CALL BROKEN(5,2,5,2)
0960 GOTO 136
0961 133 CALL POSITN(XMIN+RX,YMIN-RYIPL)
0962 IF(CENCEL) GOTO 137
0963 GOTO 138
0964 134 CALL POSITN(XHALF+RX,YMIN-RYIPL)
0965 IF(CENCEL) GOTO 137
0966 GOTO 138
0967 135 CALL POSITN(XMIN+RX,YMIN-RY2P5)
0968 IF(CENCEL) GOTO 137
0969 GOTO 138
0970 136 CALL POSITN(XHALF+RX,YMIN-RY2P5)
0971 IF(.NOT.CENCEL) GOTO 138
0972 137 CALL LINE(RX2P5,0.0)
0973 CALL TYPECS(' CELL-CENTRED',14)
0974 GOTO 139
0975 138 CALL LINE(RX2P5,0.0)
0976 CALL TYPECS(' GRID-CENTRED',14)
0977 139 CALL MAP(XMIN,XMAX,YMIN,YMAX+RYHALF)
0978 CALL PSPACE(XL,XH,YL,YH)
0979 IF(NBLOCK.EQ.I) GOTO 160
0980 DO 150 J=I,NSPACE
0981 DO 140 K=I,NBLOCK
0982 GSTVEC(K)=SERROR(J,K)
0983 140 CONTINUE
0984 CALL POSITN(BLKLEN(1),GSTVEC(1))
0985 CALL CURVEO(BLKLEN,GSTVEC,I,NBLOCK)
0986 IF(BOTH.AND.SQGRID.AND.CENCEL) GOTO 145
0987 IF(.NOT.BOTH.AND.CENCEL) GOTO 145
0988 GOTO 150
0989 145 CALL SPACE(3)
0990 CALL TYPENF(GRDSPC(J),2)
0991 IF(.NOT.KMETRE) GOTO 148
0992 CALL TYPECS(' km',3)
0993 GOTO 150
0994 148 CALL TYPECS(' m',2)
0995 150 CONTINUE
0996 GOTO 200
0997 160 DO 170 J=I,NSPACE
0998 GSTVEC(J)=SERROR(J,I)
0999 170 CONTINUE
1000 CALL POSITN(GRDSPC(1),GSTVEC(1))
1001 CALL CURVEO(GRDSPC,GSTVEC,I,NSPACE)
1002 CALL SPACE(3)
Design of optimal sampling schemes for local estimation--ll 359
1003 I F ( B O T H . A N D . . N O T . S Q G R I D ) GOTO 200
1004 IF(POINTK) GOTO 175
1005 CALL TYPENF(BLKLEN(1),2)
1006 GOTO 180
1007 175 CALL TYPECS('POINTS',6)
1008 GOTO 200
1009 i80 IF(.NOT.KMETRE) GOTO 190
i010 CALL TYPECS(' km',3)
i011 GOTO 200
1012 190 CALL TYPECS(' m',2)
1013 200 IF(.NOT.CENCEL) GOTO 280
1014 CALL CTRMAG(IMAG+2)
1015 IF(COLOUR) CALL REDPEN
1016 CALL P L O T C S ( X M I N , Y M A X + R Y , T I T L E , 6 4 )
1017 CALL BLKPEN
1018 CALL CTRMAG(IMAG+I)
1019 CALL P O S I T N ( X H A L F - R X , Y M I N - R Y H A L F )
1020 IF(NBLOCK.EQ.I) GOTO 220
1021 CALL T Y P E C S ( ' S I Z E OF BLOCK SIDE',IS)
1022 GOTO 230
1023 220 CALL T Y P E C S ( ' G R I D SPACING',12)
1024 230 IF(.NOT.KMETRE) GOTO 240
1025 CALL TYPECS(' (km)',5)
1026 GOTO 250
1027 240 CALL TYPECS( ' (m)',4)
1028 250 CALL CTRSET(4)
1029 CALL CTRMAG(IMAG+2)
1030 CALL POSITN(XMIN-RX,YHALF)
1031 CALL TYPENC(29)
1032 CALL CTRSET(8)
1033 CALL SUFFIX
1034 CALL TYPECS('K',I)
1035 CALL NORMAL
1036 CALL P O S I T N ( X M I N - R X , Y H A L F )
1037 CALL CTRSET(4)
1038 CALL TYPENC(29)
1039 CALL CTRSET(8)
1040 CALL SUPFIX
1041 CALL TYPECS('2',I)
1042 CALL NORMAL
1043 CALL P O S I T N ( X M I N + R X , Y M I N - R Y )
1044 I F ( B O T H . A N D . . N O T . S Q G R I D ) CALL P O S I T N ( X M I N + R X , Y M I N - R Y 2 )
1045 CALL CTRMAG(IMAG)
1046 IF(SQGRID) GOTO 260
1047 CALL TYPECSq ' E Q U I L A T E R A L T R I A N G U L A R GRID ',28)
1048 GOTO 270
1049 260 CALL TYPECSq 'SQUARE GRID ',12)
1050 270 CALL CTRMAG~IMAG-I)
1051 CALL TYPECS ' radius = ',I0)
1052 CALL CTRMAG IMAG)
1053 CALL TYPENF RADIUS,2)
1054 CALL CTRMAG IMAG-I)
1055 CALL TYPECS ' number of points used for i n t e r p o l a t i o n =',44)
1056 CALL CTRMAGqIMAG)
1057 CALL TYPENI(NFOUND)
1058 280 I F ( B O T H . A N D . . N O T . P O I N T K . A N D . . N O T . S Q G R I D . A N D . . N O T . C E N C E L )
1059 & CALL GREND
1060 IF(.NOT.BOTH.AND..NOT.POINTK.AND..NOT.CENCEL) CALL GREND
1061 I F ( B O T H . A N D . P O I N T K . A N D . . N O T . S Q G R I D ) CALL GREND
1062 I F ( . N O T . B O T H . A N D . P O I N T K ) CALL GREND
1063 CALL FULL
1064 CALL BLKPEN
1065 RETURN
1066 END
360 A.B. McBI~TNEYand R. WEBSTER

APPENDIX 2

Topsoil pH at Broom's Barn E x p e r i m e n t a l Station


Isotropic spherical semi-variogram model,
1 0.04 15 I0
303.50
3 0.021 0.0 0.330 4.91 1.0
0
(5F4.2)
0.5 1.0 1.5 2.0 2.5
3.0 3.5 4.0 4.5 5.0
5.5 6.0 6.5 7.0 7.5
(5F5.3)
0.5 0.75 1.O 1.25 1.5
2.0 2.5 3.75 5.0 7.5
APPENDIX 3

Topsoil pH at Broom's Barn Experimental Station


Isotropic spherical semi-variogram model.

Alex McBratney Department of Soils and Plant Nutrition,


Rothamsted Experimental Station, Harpenden.

Optimal Sampling Strategy For Isarithmic Mapping

SPHERICAL MODEL
t
GAMMA(H) = 0.021000 + 0.330000(1.5H/ 196.399830 + 0.5 (H**3/ 196.399830"'3)) ; H < 196.399830
GAMMA(H) = 0.351000 ; H >= 196.399830 a
DISTANCES (H) ARE IN METRES

ANISOTROPY RATIO I S SET TO 1.000


B

Topsoil pH at Broom's Barn Experimental Station Isotropic spherical semi-variogram model. o

WITHIN-BLOCK VARIANCES
o

T
Size of block side (m)

20.00 30.00 40.00 50.00 60.00 80.00 I00.00 150.00 200.00 300.00
0.0470 0.0600 0.0728 0.0855 0.0980 0.1226 0.1461 0.1992 0.2408 0.2893
Topsoil pH at Broom's Barn Experimental Station Isotropic spherical semi-variogram model.

KRIGING VARIANCES FOR AN EQUILATERAL TRIANGULAR GRID WITH INIERPOLATION POINTS A~ THE CENTRE OF G R I D CELLS

Size of block side (m)

20.00 30.00 40.00 50.00 60.00 80.00 ]00.00 150.00 200.00 300.00

20.00 0.0123 0 0076 0.0053 0.0039 0.0029 0.00]9 0.0013 0.0017 0.0087 0.0387
S 40.00 0.0363 0 0273 0.0201 0.0148 0.0115 0.0079 0.0057 0.0029 0.0018 0.0027
p 60.00 0.0619 0 0515 0.0423 0.0342 0.0275 0.018] 0.0132 0.0076 0.0044 0.0023 t~
~m
a 80.00 0.0885 0 0775 0.0673 0.0580 0.0496 0.0355 0.0255 0.0142 0.0089 0.0045
c 100.00 0 ]167 0 ]052 0.0943 0.0842 0.0747 0.0579 0.0440 0.0235 0 0152 0.0078
i ]20.00 0 1490 0 1370 0.1255 0.1145 0.]040 0.0846 0.0675 0.0366 0 0221 0.0122 -¢
n 140.00 0 1857 0 1733 0.1612 0.]494 0.1379 0.1162 0.0961 0.0552 0 031l 0.0152
g 160.00 0 2206 0.2078 0.1953 0.]830 0.1709 0.1475 0.1254 0.0775 0 0441 0.0188
180.00 0 2517 0.2388 0.2260 0.2134 0.2008 0.1764 0.1530 0.1004 0 0604 0.0250
(m) 200.00 0 2763 0.2633 0.2504 0.2375 0 2247 0.1997 0.1755 0.1202 0 0764 0.0328
220.00 0.2927 0.2797 0.2666 0.2537 0 2408 0.2155 0.1909 0.1343 0.0889 0.0395
240.00 0.3028 0.2897 0.2767 0.2637 0 2508 0.2254 0.2007 0.1440 0.0983 0.0454
260.00 0.3084 0.2953 0.2823 0.2693 0 2565 0.2312 0.2066 0.]504 0.]050 0.0507
280.00 0.3110 0.2980 0.2850 0.2721 0 2593 0.2342 0.2099 0.1545 0.1098 0.0553
300.00 0.3121 0.2991 0.2861 0.2733 0 2606 0.2357 0.2117 0.1570 0.1130 0.0591

* * N O T E for c o m p a r a t i v e p u r p o s e s the grid s p a c i n g s are e q u i v a l e n t to s p a c i n g s on s q u a r e g r i d s w i t h


the same s a m p l i n g i n t e n s i t y . The actual d i s t a n c e s b e t w e e n g r i d p o i n t s are 1 . 0 7 4 6 t i m e s g r e a t e r .

Search radius = 3.500 Number o£ points used for interpolation = 42


F%

Topsoil pH at Broom's Barn Experimental Station Isotropic spherical semi-variogram model.

KRIGING STANDARD ERRORS FOR AN EQUILATERAL TRIANGULAR GRID WITH INTERPOLATION POINTS AT THE CENTRE OF G R I D CELLS

Size of block side (m)

20.00 30.00 40.00 50.00 60.00 80.00 100.00 150.00 200.00 300.00
20.00 0.1110 0.0873 0.0731 0.0625 0.0541 0.0435 0.0364 0.0418 0.0932 0.1967
S 40.00 0 1906 0.1652 0.1416 0.1218 0 1073 0.0887 0.0753 0 0541 0.0430 0.0519
P 60.00 0 2487 0.2270 0.2057 0.1851 0 1657 0.1345 0.1148 0 0870 0.0666 0.0484
G a 80.00 0 2975 0.2784 0.2595 0.2409 0 2227 0.1883 0.1597 "0 1192 0.0945 0.0670
r c i00.00 0 3415 0.3243 0.3071 0.2901 0 2733 0.2406 0.2099 0 1535 0.1232 0.0881
i i 120.00 0 3860 0.3701 0.3543 0.3384 0 3225 0.2909 0.2598 0 1912 0.1487 0.1104
d n 140.00 0 4309 0.4163 0.4015 0.3865 0 3714 0.3408 0.3100 0 2350 0.1764 0.1232
g 160.00 0 4696 0.4559 0.4419 0.4278 0 4134 0.3841 0.3542 0 2785 0.2099 0.1372
180.00 0 5017 0.4887 0.4754 0.4619 0 4482 0.4200 0.3911 0 3169
(m) 0.2458 0.1582
200.00 0 5257 0.5131 0.5004 0.4873 0 4741 0.4469 0.4189 0.3467 0.2765 0.1811 o
220.00 0 5410 0.5288 0.5164 0.5037 0 4907 0.4642 0.4369 0.3665 0.2982 0.1987
240.00 0 5503 0.5382 0.5260 0.5135 0 5008 0.4748 0.4480
E
0.3795 0.3135 0.2131
260.00 0.5553 0.5434 0.5313 0.5190 0.5064 0.4808 0.4546 0.3878 0.3241 0.2252
280.00 0.5577 0.5459 0.5339 0.5217 0.5092 0.4840 0.4582 0.3931 0.3314 0.2352
300.00 0.5586 0.5469 0.5349 0.5228 0.5105 0.4855 0.4601 0.3962 o
0.3362 0.2432
T

**NOTE for c o m p a r a t i v e purposes the grid spacings are e q u i v a l e n t to spacings on square grids with
the same sampling intensity. The actual d i s t a n c e s between grid points are 1.0746 times greater.

Search radius = 3.500 Number of points used for interpolation = 42


Topsoil pH at Broom's Barn Experimental Station Isotropic spherical semi-variogram model.

KRIGING VARIANCES FOR AN EQUILATERAL TRIANGULAR GRID WITH INTERPOLATION POINTS AT GRID POINTS

Size of block side (m)

20.00 30.00 40.00 50.00 60.00 80.00 100.00 150.00 200.00 300.00

20.00 0.0109 0.0080 0.0054 0.0038 0.0029 0.0019 0.0013 . 0.0027 0.0121 0.0474
S 40.00 0.0188 0.0181 0.0167 0.0147 0.0124 0.0081 0.0055 0.0030 0.0019 0 0042
p 60.00 0.0226 0.0235 0.0236 0.0231 0.0220 0.0187 0.0146 0.0073 0.0046 0 0024
G a 80.00 0.0249 0.0268 0.0281 0.0287 0.0288 0.0276 0.0250 0.0154 0.0087 0 0047
r c 100.00 0.0270 0.0298 0.0321 0.0338 0.0349 0.0357 0.0346 0.0264 0.0160 0 0077
i i 120.00 0.0282 0.0316 0.0345 0.0368 0.0386 0.0407 0.0409 0.0349 0.0244 0 0117
d n 140.00 0.0286 0.0323 0.0355 0.0381 0.0402 0.0431 0.0440 0.0399 0.0309 0 0154
g 160.00 0.0288 0.0325 0.0358 0.0385 0.0408 0.0440 0.0454 0.0432 0.0364 0 0214 =-
180.00 0.0288 0.0326 0.0359 0.0387 0.0411 0.0446 0.0466 0.0461 0.0416 0 0294
(m) 200.00 0.0288 0.0326 0.0360 0.0389 0.0413 0.0451 0.0474 0.0482 0.0454 0 0366
220.00 0.0288 0.0326 0.0360 0.0389 0.0414 0.0451 0.0475 0.0488 0.0470 0.0409
240.00 0.0288 0.0326 0.0360 0.0389 0.0414 0.0451 0.0475 0.0490 0.0476 0.0433
260.00 0.0288 0.0326 0.0360 0.0389 0.0414 0.0451 0.0475 0.0490 0.0478 0.0445 ~m
280.00 0.0288 0.0326 0.0360 0.0389 0.0414 0.0451 0.0475 0.0490 0.0478 0.0451
300.00 0.0288 0.0326 0.0360 0.0389 0.0414 0.0451 0.0475 0.0490 0.0478 0.0453

**NOTE for c o m p a r a t i v e purposes the grid spacings are e q u i v a l e n t to spacings on square grids with
the same sampling intensity. The actual d i s t a n c e s between grid points are 1.0746 times greater.

Search radius = 3.500 Number of points used for interpolation = 37


Topsoil pH at Broom's Barn Experimental Station Isotropic spherical semi-variogram model.

KRIGING STANDARD ERRORS FOR AN EQUILATERAL TRIANGULAR GRID WITH INTERPOLATION POINTS AT GRID POINTS

Size of block side (m) --.

20.00 30.00 40.00 50.00 60.00 80.00 ]00.00 150.00 200.00 300.00

20.00 0.1045 0.0896 0.0737 0.0620 0.0540 0.0436 0.0366 0.0524 0.ii00 0.2177
S 40.00 0.1371 0.1345 0.1290 0 1211 0.1113 0.0899 0.0744 0.0551 0.0434 0.06~2
P 60.00 0.1504 0.1533 0.1537 0 1519 0.1483 0.1366 0.1208 0.0854 0.0678 0.0490
G a 80.00 0.1577 0.1637 0.1675 0 1694 0.1697 0.1662 0.1580 0.1240 0.0935 0.0685 --.
r c I00.00 0.1642 0.1727 0.1792 0 1838 0.1869 0.1889 0.1861 "0.1626 0.1264 0.0875
i i 120.00 0.1679 0.1778 0.1857 0 1919 0.1965 0.2018 0.2023 0.1868 0.1562 0.1081
d n 140.00 0.1692 0.1797 0.1883 0 1952 0.2006 0.2075 0.2098 0.1997 0.1758 0.]240
g 160.00 0.1697 0.1804 0.1892 0 1963 0.2020 0.2097 0.2131 0 2077 0.1907 0.1463
180.00 0.1698 0.1805 0.1895 0 1968 0.2028 0.2113 0.2158 0 2148 0.2039 0.1715
(m) 200.00 0.1698 0.1807 0.1897 0 1972 0.2033 0.2123 0.2176 0 2195 0.2131 0 .]914
220.00 0.1698 0.1807 0.1897 0 1972 0.2034 0.2124 0.2179 0 2210 0.2168 0.2023
240.00 0.1698 0.1807 0.1897 0 1972 0.2034 0.2124 0.2180 0 2213 0.2182 0.2081
260.00 0.1698 0.1807 0.1897 0.1972 0.2034 0.2124 0.2180 0 2214 0.2186 0.2110
280.00 0.1698 0.1807 0.1897 0.1972 0.2034 0.2124 0.2180 0.2214 0.2187 0,2123
300.00 0.1698 0.1807 0.1897 0.1972 0.2034 0.2124 0.2180 0.2214 0.2187 0.2129

T
**NOTE for c o m p a r a t i v e purposes the grid spacings are equivalent to spacings on square grids with
the same sampling intensity. The actual d i s t a n c e s b e t w e e n grid points are 1.0746 times greater.

Search radius = 3.500 Number of points used for interpolation = 37

You might also like