Water Research Vol. 14, pp. 1427 to 1434 C) Pergamon Press Ltd 1980. Printed in Great Britain
00431354/80/10011427502.00/0
MASS BALANCE A. E. WARN and J. S. BREW Directorate of Resource Planning, Angllan Water Authority, Diploma House, Grammar School Walk, Huntingdon, Cambridgeshire PEI8 6NZ, England (Received October 1979)
AbstractThe mass balance equation is often used to calculate river quality downstream of a discharge using mean and percentiles of river and discharge flow and quality data. This approach cannot produce means and percentiles of downstream river quality nor the discharge quality required to achieve set mean or percentiles of downstream river quality. An analytical approach is described which enables such calculations to be done. The method is compared with simple mass balance, and with a computer based method, Monte Carlo simulation. Some numerical examples are presented which show the magnitude of the errors which can result from using the incorrect equations.
INTRODUCTION
River pollution calculations make use of the mass balance equation, to estimate river quality downstream of an effluent discharge (Warn, 1978; Fawcett, 1975; Pearson, 1979; National Water Council 1976). The equation is: T = (FC + fc)/(F + f)
discharge quality and requires little more effort to use than the simple mass balance methods. ANALYTICALMETHOD The mass balance equation can be rewritten as: T=Cz+c(1
z = 1/(1 + ~b)
(1)
where F is the river flow upstream of the discharge; f is the flow of the discharge; C is the concentration of pollutan, t in the river upstream of the discharge and c is the concentration in the discharge. T is the concentration in the river downstream of the discharge. It is tempting to assume that appropriate statistics of upstream flow and quality can be substituted into equation (1) to produce specific mean or percentile values of T. An example of this would be to use annual mean values of the upstream variables in the hope that this would give the annual mean downstream river quality. This kind of simple mass balance procedure is wrong in principle and will produce incorrect results for almost any real river pollution problem. This is because the distribution of downstream quality depends on interactions between the upstream flows and qualities which are not modelled by this use of equation (1). This error is not widely recognised and simple mass balance has been used to calculate mean quality in river models (Warn, 1978; Fawcett, 1975; Pearson, 1979), and percentiles of quality when setting consent conditions for effluent discharges to rivers (National Water Council, 1976). This paper compares two methods which allow the correct calculation of mean and percentile values of T using means and standard deviations of the other variables in equation (1). The first method is an analytical approach which can be used on a programmable calculator, the other method uses computer simulation by the M o n t e Carlo technique (Buff'a, 1972). Either method relates mean and percentile values of downstream quality to percentile values of
z)
(2)
where (3)
and = f/F
(4)
This rearrangement enables the calculation of the mean and standard deviation of T by steps involving the calculation of mean and standard deviation of the following variables: (A) the quotient, f/F, i.e. ~; (B) z a n d (I  z); (C) the sum of the products, Cz and c(l  z). Step A The distribution of ~b is characterised in terms of its logarithm using (Kendall & Stuart, 1958):
m(ln~) m0nf)  m(lnF)
(5)
s2(ln~b) = s2(lnf) + s2(lnF)
(6)
where
~inx) =
ln[,,~x)/x/~
(7)
and s2(lnx) = ln[l + k2(x)].
(8)
In these equations, m and s are the mean and standard deviation of the associated variable, and k is the coefficient of variation, i.e. k = s/ra.
(9)
The use of equations (5) and (6) presumes that the logarithms of f and F are normally distributed and uncorrelated. Step B From the distributions of f and F, it follows that ~ which equals f/F is lognormally distributed (Kendall & Stuart, 1958). Thus, t, where:
1427
t
In ~  ra(ln ~) son ~b)
1428
A.E. WARN and J. S. BREW
has a standardised normal distribution and: q~ ffi exp Ira(In ~) + ts(ln 0)]. To obtain the moments of (1  z), i.e. ~b/(1 + ~b), the expression is written as a function of t, i.e.:
l + d'
1 + exp I  r e ( I n 0)  ts(In 0)]
ary. These permit the rapid integration of equation (10) using standard methods like Simpson's Rule. The results can also be obtained using statistical tables (Johnson, 1970, Pearson & Hartley, 1972) but this is tedious. Programs which perform the calculations covered by equations (5)(15) and Appendices A and B have been written for the Texas Instruments TI59 calculator and coded in FORTRAN for a computer. The computer program is designed for use at a terminal and requires the user to respond to questions by typing in data.
It follows that the moments about the origin are given by:
Data _® I + e x p [  m ( I n ~ )  ts(Inq~)] x
__ exp W/2~t
dt
(10)
s(lnF) ffi x/d z + 2 In[m(F)/q(F)]  d
for r = 1, 2.... etc., because the term:
V/2"n
Mean and standard deviation are required for F, C, f and c. If fiver flow is available as mean and a percentile, its standard deviation may be found by assuming lognormal behaviour and using: m(lnF) ffi InCm(F)]  ½s2(lnF).
In the above, q(F) is the percentile value, and d is the corresponding standard normal deviate found from statistical tables.
T
is the probability density function of the standardised normal distribution. Equation (10) chara~terises the Johnson's $~ distribution (Kend,*ll & Stuart, 1958; Johnson, 1970). Equation (10) is integrated numerically for r ffi 1 and r = 2 to obtain #'1 and #~ from which: m(l   z ) = # ' l (1 z) and s2(1  z)  #~(1  z)  mZ(l  z).
Step C This step is done using: re(T) = ,.(1  z)[m(c)  m(C)] + re(C)
(It)
and: s2(T) ffi sZ(z)[m(C)  m(c)] 2
+ s'(C)[s'(z) + ~,'(z)] + sZ(c){sZ(z) + [1  m(z)]2}.
(12)
These equations are derived in Appendix A; flow and quality are assumed uncorrelated. The equations do not depend on any extra assumptions about the form of the distributions of c, C and z. If some distribution is assumed for T, percentile values may be calculated. Thus, for a lognormal distribution, the 95percentile is q(T) in: q(T)  expl'm(lnT) + 1.6449s(lnT)]
(14) (15)
(13)
where the terms on the right hand side can be calculated using equations (7) and (8).
Calculating discharge quality Equations (5)(13) produce the mean and specific percentiles of river water quality downstream of a discharge. Sometimes, it is required to achieve some specific river quality, and to calculate the discharge quality which will provide this. This can be done by making an initial guess of the discharge quality and calculating q(T) from equations (5) to (13). The discharge quality can then be progressively and automatically amended until the target river quality is achieved. Details are in Appendix B.
Calculation The complex part of the calculation is Step B, and, for speed, a programmable calculator or computer is neeess
MONTE CARLO SIMULATION M e a n and percentiles of river quality downstream of a discharge can also be calculated by Monte Carlo simulation (Buffa, 1972) using a computer (Thames Water Authority, 1979; Warn, 1979a~ In this, a value is drawn randomly from each of the distributions of F, C, f and c, and these four values are used to calculate T using the mass balance equation. This sequence of random selection and mass balance is repeated until enough values of T have been calculated to define its distribution. Monte Carlo calculations were used to check the results of the analytical procedure by applying both methods to more than 200 examples. The Monte Carlo calculations each comprised 3000 mass balance calculations and the distributions of F, f, C and c were presumed lognormal. 95percentile values of T were taken as the 150th largest value, i.e. no direct assumption was made about the distribution of T. RESULTS
Accuracy of simple mass balance Table 1 contrasts downstream river quality calculated by simple mass balance with mean and percentile levels calculated by the analytical method. The Table shows that use of equation (1) with mean data leads to underestimates of the mean downstream fiver quality. Also shown in Table 1 are the results of using equation (1) with 95% exceedence river flow, 5% exceede n c e discharge quality, mean river quality and mean discharge flow. These results show that this particular formulation fails to produce 5% exceedence values of the downstream river quality. Table 1 shows how the results vary with the river flow data. In the Anglian region, most discharges enter streams whose 95% exceedence fiver flow is 1020% of the mean.
Mass balance
1429
Table 1. Comparison of methods Data:
Mean upstream river flow, re(F) 95% exceedence river flow Mean upstream river quahty, re(C) Corresponding standard deviation, s(C) Mean discharge flow, re(f) Corresponding standard deviation, sff) Mean discharge quality, re(c) Corresponding standard deviation, s(c)
100 as below 2 1 20 8 15 7
Calculated downstream river quality 95% Exceedence river flow
Mean and standard deviation Analytical method(*) 4.2 (1.8) 4.5 (2.1) " 5.0 (2.8) 5.8 (3.6) 6.6 (4.4)
60 40 20 10 5
Mean Simplemass balance 4.2 4.2 4.2 4.2 4.2
5% Exceedence Analytical method 7.6 8.4 10.3 12.5 14.7
Simplemass balance 8.6 10.7 15.1 19.5 23.0
(*) Identical results are produced by Monte Carlo simulation.
Accuracy of analytical method The Monte Carlo calculations reproduced the results of the analytical procedure for a range of problems based on real examples. The difference in the 95percentile values of T produced by the two methods averaged 3% for 100 example~ SENSITIVITY T O DATA A N D A S S U M P T I O N S
Table 2 shows how the results of the analytical method and simple mass balance vary with changes in data. The error in using simple mass balance often increases with: (a) decrease in 95~ exceedence river flow; (b) decrease in pollution load in the upstream river; (c) increase in the pollution load provided by the discharge [which is mathematically equivalent to (b)]. These trends are reversed when the dilution and pollution load provided by the upstream river are dominated by the discharge. Also, in some calcula
tions, the effects represented by the coefficients of variation of C, f and c can be important. The overall impression is that simple mass balance produces results which tend to be biased and the size of the error tends to vary with factors (ak 0a) and (c) just discussed. However, in any calculation, the absolute error depends also on the pollutant and data particular to the local circumstances.
l.~normal data The analytical method assumes lognormal distributions for river and discharge flow. Options to test the sensitivity of results to the assumption have been built into the Monte Carlo method (Warn, 1979a). In its usual form, the lognormal distribution implies that the logarithm of the variable is normally distributed. Variables so distributed give straight fines when plotted on lognormal probability paper. If these plots are curved, the variable is usually better represented by a three parameter lognormal distribution (Kendall & Stuart, 1958; Bloomer & Sexton,
Table 2. Variation of error in simple mass balance calculations with values of flow and quality data 95% Exe~dcnce river "flow
re(f) ffi 100 s(f)  40
Data as in Table 1 except where stated otherwise below re(f)  5 re(C) ffi 4 re(C) = 1 re(c) ffi 40 s(f) = 2 s(C) = 2 s(C) = 0.5 s(c) ffi 4o
re(c)  4 s(c) ffi I
Error in calculated mean river quality (~o) 60 40 20 10 5
2 7 21 38 57
2 8  15 21
60 40 20 10 5
11 22 32 36 36
15 21 24 24 22
1
0
3  14 30 51
 1
2
3
8
4  13 23 35
10 29 52 77
10 31 56 84
10 14 19 24
20 31 40 43 42
33 22 5 7 13
Error incalculated 5~exceedenceriver quality (%) 38 0 16 23 12 26 3 27 34 9 31 37 16 33 37
1430
A.E. WARN and J. S. BREW
Table 3. Effect of river flow distribution on the calculated river quality downstream of a discharge 95% Exceedence river flow (Other data as Table I) 60 40 20 10 5
Calculated river quality downstream of discharge Mean 5% Exeeedence A B C A B C 4.3 4.6 5.2 6.1 6.9
4.2 4.5 5.0 5.8 6.6
4.2 4.5 5.0 5.6 6.4
7.7 8.6 10.9 13.1 15.3
7.6 7.6 8.4 8.3 10.3 10.0 12.5 12.3 14.7 14.0
Calculations assume river flow plus a constant is lognormally distributed. The constants are minus onehalf of the 95% exceedeace river flow, zero and plus onehalf of the 95% exceedence river flow for A, B and C respectively. 1972). In this, the sum of the variable and a constant is distributed lognormally. Table 3 shows how the results of calculations are affected by changing the river flow distribution. For each discharge the calculation is done three times, each repeat using a different assumption about the river flow distribution. These were: (a) river flow is lognormal; (b) the sum of the river flow and a positive constant is lognormal;
(c) the difference between the river flow and a positive constant is lognormal. The constant was onehalf of llae 95~ exceedence river flow. The results show that the calculated river quality is not much affected by this range of river flow conditions. Figure 1 shows how the shape of the flow duration curve is changed by the assumptions (a), (b) and (c). The results of Table 3 were calculated by Monte Carlo simulation; it is not yet possible to do these tests using the analytical method. However, these and other calculations (Warn, 1979b) indicate that the results of the analytical method are not much affected
Percent exceedence
Fig. 1. Flow duration curves for sensitivity tests. (a) Flow is lognormal; (b) flow plus constant is lognormal; (c) flow minus constant is lognormal.
Table 4. Effect of correlation between river and discharge data on the calculated river quality downstream of a discharge Variables presumed correlated F and C F and f F and c C and f C and c f and c
Calculated river quality downstream of discharge Mean 5To Exceedence 0.8 0.0 0.8 0.8 0.0 0.8 4.9 5.2 5.8 5.1 4.9 4.7
5.0 5.0 5.0 5.0 5.0 5.0
5.1 4.8 4.4 5.0 5.1 5.4
10.6 11.6 15.0 10.1 9.4 8.6
10.3 10.3 10.3 10.3 10.3 10.3
10.0 8.8 7.0 10.4 11.5 12.5
Value at the head of the columns is the correlation coefficient between the logarithms of the indicated variables. Otherwise all data are as in Table 1 with a 955/0exceedence river flow of 20. by the need to assume that the logarithm of the river and discharge flows is normally distributed.
Correlation All possible correlations between F, C, f and c, can be investigated using the Monte Carlo method (Warn, 1979a). In the development of the equations, it was assumed that the variables were uncorrelated. Table 4 shows how the results of Monte Carlo simulation would change ff there were strong correlation between the variables, For each of six possible correlations, three separate calculations have produced results for negative, zero and positive correlation. In these examples the extent of correlation assumed was much larger than usually found from actual data. The assumption of zero correlation is obviously wrong for the case of the upstream river flow and upstream river quality. For some pollutants an inverse relation between flow and quality is expected whenever a steady pollution load has mixed with a variable river flow. (Though the correlation will be diminished to the extent that natural purification can operate). For other pollutants, strong positive correlations occur where the action of rainfall washes pollution from the land into the river. This does not mean that such correlation has a large effect on the results of calculations. Table 4 shows that even a strong relation between upstream river flow and upstream river quality has a small effect on results. Part of the reason for this lies in the consequences of ignoring, say, inverse correlation between upstream river flow and quality. Whilst implying an optimistic impression of river quality under conditions of low river flow, such an act actually leads to a pessimistic impression of the total river load summed over all river flows. In terms of the combinations of events which lead, say, to 5To exceedence river quality downstream of the discharge, these two effects tend to compensate. In contrast, for upstream river flow and discharge quality, potential causes of correlation are less
Mass balance
1431
coefficient for, say, river quality was coupled with a low coefficient for discharge quality. The errors are made insignificant by characterising T as a three parameter lognormal distribution (Kendall & Stewart, 1958; Bloomer & Sexton, 1972; Warn & Brew, 1979). Details are in Appendix C. This modification could not be fitted onto the calculator. Thus the calculator program should not be used where the coefficient of variation for quality data exceeds a value of 2.
C
F
srmula~
COMPARISON O F METHODS a
Percentile
Fig. 2. River quality distribution downstream of discharge (jagged line: from Monte Carlo simulation; straight line: assuming lognormal). obvious and strong correlations are unlikely in real problems. Table 4 shows that if there were a strong correlation between upstream river flow and discharge quality, then it would certainly affect the results. At present, the only correlation which can be handled by the analytical method is that between upstream river flow and discharge flow (warn and Brew, 1979). Calculations to date have confirmed the indications of Table 4 that those correlations which do affect results are unlikely to be present in real problems. For critical calculations, where there is evidence that an unusual correlation is important, the actual correlation coefficient must be determined and Monte Carlo simulation used for the calculations.
Distribution of T In the analytical method, T is assumed to be lognormal in order to estimate percentiles from the moments of the distribution. This assumption cannot produce serious errors because for all real problems, the results agree with those from Monte Carlo simulation which makes no direct assumption about the distribution of T. Figure 2 compares a typical distribution produced by simulation with that expected if T were lognormal. The maximum difference between the cumulative Monte Carlo distribution and the lognormal was typically 2%. The chance of obtaining this difference by sampling from the lognormal distribution was calculated by the KolmogorovSmirnov test to be 95% for a sample size of 500 and 10% for a sample size of 3000. In order to find the limits of the analytical method calculations were devised with features not usually found in real problems. Results showed that the analytical method could produce errors in excess of 5%, for quality data with coefficient of variation greater than two. The biggest errors occurred where such a
The Monte Carlo method gives approximate values of the mean and standard deviation of T even where the distributions assumed for its data are accurate. In theory, with a sufficiently large number of mass balance calculations, the accuracy can be made as good as required. In practice, errors in the 5To exceedence values of T were 5To with 3000 calculations. The Monte Carlo method cannot be used on a calculator and requires more computer storage and time than the computer version of the analytical method. The Monte Carlo method is versatile because it can cope with data that are not lognormal and with correlation between the variables (Warn, 1979b). The method is particularly useful in problems of pollution control by river flow augmentation (Warn, 1979b). The analytical method gives accurate values of the mean and standard deviation of T provided the assumption of lognormal flows is accurate. However, any percentile calculated for T is approximate because it depends on the distribution assumed for T. The analytical method cannot cope with flows which are not lognormal nor can it yet handle correlations which involve river or discharge quality. Some advantage is obtained by using both methods. The scale of the analytical method can be exploited by using it for routine calculations on a calculator or where a computer is unavailable or unpopular. The versatility of the Monte Carlo method can be applied to handle unusual problems and to check the sensitivity of results to assumptions where critical decisions are involved. The sampling errors of the Monte Carlo method can be checked using the computer version of the analytical method. PRACTICAL CONSIDERATIONS
River pollution control involves the protection and achievement of specific river uses. The quality requirements of these uses must be defined statistically (i.e. as means or percentiles) or else there is no objective way of using the results of monitoring to assess whether river uses are at risk or overprotected to the extent of wasting resources. Unfortunately, simple mass balance causes error when its results are assumed to be means and percentiles. Errors in the calculated mean and percentile
t432
a. [~.WARN and I S. BR~;w
values of T of 20'~; are typical but the magnitude of the error depends in part on the particulars of each calculation. The main problem with simple mass balance is this unpredictability of the error. Tables t and 2 give results for two types of simple mass balance. The first method, dealing with mean data, often produces an underestimate of the effect of the discharge on the river. This sort of calculation leads to a calculated discharge quality which is too lax with respect to achieving the river quality target_ This, in turn. could lead to a failure to protect river quality. The second method, dealing with 5°~; exceedence data, usually exaggerates the effect of the discharge on river quality. This leads to a calculated discharge quality which is too strict. This could distort the proper allocation of resources between pollution control projects. Where resources are limited, the unnecessary concentration or resources on particular projects will mean that other projects cannot be started. The second method has a further weakness in that it fails to recognise instances where the river quality target is not achievable no matter what the discharge quality. This effect occurs where the upstream river quality is already worse than the downstream target. This condition is rrmsked by the use of mean data for the upstream quality data but 5~,; exceedence levels for the downstream target. Thus in the expression: c =.
T(F + f)  C F
the discharge quality, c, will be positive if T is numerically greater than C. This will occur even where the quality represented by the mean qualitY, C is really already worse than that represented by the 5 ~ exceedence quality T. In this circumstance, the river quality target can only be achieved in practice by improving river quality upstream of the discharge. A correctly calculated discharge quality would be negative. When using simple mass balance to calculate the discharge quality which will achieve some river quality target more subtle effects can result than the straightforward bias referred to already. The above discussion has noted how the size of the error introduced by simple mass balance varies with hydrology and river and discharge load. These tendencies lead to an extra and unnecessary bias towards pollution control projects which are located in regions with: (a) the most variable hydrology; (b) the least demanding river uses and river quality targets. If the object is only to achieve an impression of the relative impact of sources of a particular pollutant then the errors in using simple mass balance may be acceptable. This is because for a single catchment and a single pollutant, the errors take the form of a fairly consistent bias. Even here though, moderate errors
from simple mass balance lead to large errors ~3 assessing the relative importance of point anti diffuse sources of pollution and natural purification Another result of using simple mass balance is that the value of data is reduced in a way which as both unnecessary and wasteful in the contexl of the resources spent in collecting it. Suppose each item of" data in a simple mass balance calculation ~s known with 95°0 confidence to be within a range of plus or minus 20°o. It is then likely that the error in the calculated result attributable to these errors will lie in the range 1525°/o (9 50/ o confidence} depending on the distributions of the errors. I~'he calculation of this combined error can be done by Monte Carlo simulation (Warn, 1979b).] The risk in using simple mass balance is that this data error will be compounded with that in the method of calculation. As discussed above this latter error can range from zero to 50~,~,and varies in a complex way the particulars of each calculation Hence even where data are poor, it is unwise to incur the additional errors in using simple mass balance, CONCLUSIONS 1. The mass balance equation is often used to calculate river quality downstream of a discharge. Even if data used in the equation are means or percentiles, the percentile represented by the calculated quality is unknown. 2. The correct result can be obtained using an analytical method programmed for a calculator or computer, and by Monte Carlo simulation using a computer. AcknowledgementsThe authors wish to thank Mr P. H. Bray, Chief Executive, Anglian Water Authority, for permission to publish this paper and Mr K. F. Clarke and Dr C. Page who have supervised the work and made contributions. This work was initially stimulated by discussions with Mr D. R. H. Price of the Scientific Directorate of the Anglian Water Authority and by the work on the Monte Carlo method by Mr G. Thompson of Thames Water Authority. The authors are also grateful for the contributions of the two referees of the paper. REFERENCES
Buffa E. S. (1972) Operations Management: Problems and Models. John Wiley & Sons, London (or other standard texts on Operations Research). Bloomer R. H. G and Sexton J. R. 11972) The generation of synthetic river flow data. Water Resources Board, Reading. Fawcett A. (1975) A management model for river quality. Proceedings of a Symposium on the Bedford Ouse Stud~,. Anglian Water Authority. Johnson N. L. (1970) Tables to facilitate Fitting Ss Curves. With an Appendix by J. O. Kitchen. University of North Carolina. Institute of Statistics, Mimeo Series No. 557. Kendall M. G. and Stuart A. (1958t The Advanced Theor~ of Statistics, Vol. 1. Charles Griffen & Co.. London for other standard texts~. National Water Council (1976) Final report of working party on consent conditions for effluent discharges to freshwater streams. Unpublished document
Mass balance Pearson M. J. (1979) The Ouse model. Its application to the catchments of the Rivers Cam and Rhee. Paper presented at a Conference on River Pollution Control, organised by the Water Research Centre. Pearson E. S. & Hartley H. O. (1972) Biometrika Tables for Statisticians, Vol. 2. Cambridge University Press. Thames Water Authority (1979) River water qualitythe next stage: review of discharge consent conditions. Warn A. E. (1978) The Trent mathematical model. Mathematical Models in Water Pollution Control (Edited by James A.) Chapter 17. John Wiley & Sons, Chichester. Warn A. (1979a) Anglian Water Authority, computer program for Monte Carlo calculations. Warn A. (1979b) Anglian Water Authority. Unpublished results. Warn A. & Brew J. (1979) Anglian Water Authority. Computer program for analytical method.
APPENDIX A
The sum of correlated products (Kendall & Stuart, •958)
1433
Substituting from (A10) into (A9) and from (A9) to (A8)
gives: s2(T) = S2(2)Ira(C)  ra(c)'] 2 + F(C) IF(z) + m2(z)] + s2(c) {si(z) + [1  re(z)] 2} which is the required expression for the variance of T. APPENDIX B
Calculation of discharge quality which achieves a target river quality For no discharge, i.e. a discharge quality, ml(c) and sl(c), of zero, the downstream percentile river quality, ql(T), would be the same as that upstream, i.e. ql(C). If a guess is made of the discharge quality, m2(c) and s2(c), which would achieve the target river quality, qo(T), then the actual river quality downstream of the discharge, q2(T), may be calculated by the method given in the text. If this is not close enough to the target quality, the estimate of discharge quality is revised using:
Equation (2) is: T = Cz + c(1  z).
(2)
In deriving the moments of T, the following theorems are used. For any two variables, x and y: m(x ± y) = ra(x) ± ra(y)
(A1)
m3(c ) =
(A2) (A3)
In particular, where x and y are the same variable: s:(x)
=
Cov(x, x)
= m (x 2)  m2(x)
(A4)
or where x and y are uncorrelated: S2(xy) = m2(X)S2(y) + s2(x)m2(y) + S2(X)52(y).
q2(T)  ql(T)
+ ml(c ) (B1)
S3(C) = S2(C) m3(C)/m2(C).
where x and y are correlated with covariance Coy(x, y), i.e.: Cov(x, y) = re(x, y)  m(x) re(y).
[qo(T)  ql(T)] [m2(c)  m,(c)]
and, preserving the coefficient of variation rather than the standard deviation:
where x and y are possibly correlated. s2(x + y) = s2(x) + s2(y) ± 2Coy(x, y)
(AS)
Thus, using (AI) and (A2), given m(1  z) and s2(l  z) from Step B:
(12)
(B2)
A new downstream river quality, qa(T), is then calculated. If this, too, is not close enough to the target river quality, Equations (Bl) and (B2) are reapplied using the data which had produced the best two estimates of downstream river quality. This sequence is repeated until a discharge quality is found which achieves the target river quality to the required level of precision. This iterative calculation is done automatically by programs written for both calculator and computer. The desired discharge quality is reached to within 1% after 14 cycles. In each cycle the calculation is reentered at Step C (of the main text) so that there is no need to recalculate ~b, z or (1  z) APPENDIX C
re(z) = 1  m(l  z)
(A6) Characterising T as a shifted lognormal distribution (Kendall & Stuart, 1958; Bloomer & Sexton, 1972)
with: s2(z) = s2(1  z).
(A7)
Assuming that neither c nor C is correlated with z the expression for re(T) follows immediately. Using A1 : re(T) = m(Cz) + m[c(l  z)l. Substituting from (A3), recalling that Cov(x,y) is zero if x and y are uncorrelated, and using (A6) gives: re(T) = m(1  z)[m(c)  re(C)] + re(C) which is the required
(11)
expression for the mean of T.
From (2), using (A2):
Assuming lognormal distributions, the third moments o f c and C can be derived using: ~dx) = s'(x)Es'(x)/m2(x) + 3]/m(x).
(el)
The third moment of (I  z) is calculated by integrating equation riO) for r ffi 3 to give #h(z). Then: #3(z) =/l~(z)  3m(l  z)s2(z)  m3(l  z).
(C2)
Extending the method of Appendix A gives the third moment of T as: iJafF) = #3(z)# + m(l  z)#[3s2(z) + m2(l  z)]
s:(T) = s2(Cz) + s: [e(1

z)'l
+ Cov[Cz, c(1  z)].
+ #a(z)M(3S 2 + M 2) + #3(C) + 6m(1  z)MS2s2(2)
(AS)
Using (A3):
+ 3/~3(C)['s2(z) + m2(1  z)']
Cov(Cz, c[l  z)] = m[Czc(l  z)]  m(Cz)m[c(l  z)] = re(C) re(c)m[z(1  z)]  ngC) re(z) re(c) ngl  z) = m(C) re(c) C o y [ z , (1  z)].
 3#3(C)m(1  z)
(A9)
where:
Similarly, from (A3): COV[Z, (1  z)] = m[z(l  z)]  m(z)m(l  z) = s2(z).
 6Ms2(C)s:(z)
= re(c)  ~dC), M = re(c)  re(C) (AIO)
S 2 = s~(c) + s2(C).
(C3)
1434
a E. WARN and J. S. BREw
If T is distributed as 3parameter lognormal with shift parameter 6, then T  6 has a 2parameter lognormal distribution and the first three m o m e n t s are related according to:
where ff~,(T 6) is the ith estimate of m ( r  ot and ffq(T  6) equals re(T). This scheme was iterated until the change in estimate was less than 0.1°(,. The shift parameter is given by:
s ' ( T  0 ) ~ s 2 ( T  0, + i! #3(T  6) = ~  ~ _ 3) [mZ(T 1 3] "!'
0 = mtT)  m{T  0) {C4)
Since m o m e n t s above the first are unaffected by the shift, the equation can be rearranged to give an iterative scheme to estimate m{T  6}:
s'Yrt )
sq'r~
~(0i
~ T  6) is used to calculate m[In(T  6)] and s(ln(T  oi from equations (7) and (8) and percentiles are obtained from a modification of equation t l3}: q(T) = exp{ m[ln{T  6}] + 1.6449s[ln(T  3i] + o or on the rare occasions where m[ln{T  3)] is negative:
 3!,
Ics~
qiT) = exp{m[ln(T  ,5)]  1.6449s[ln{T  6l] + 0',