DFLOW USER'S MANUAL
by
Lewis A. Rossman
Water and Hazardous Waste Treatment Research Division
Risk Reduction Engineering Laboratory
Cincinnati, Ohio 45268
RISK REDUCTION ENGINEERING LABORATORY
OFFICE OF RESEARCH AND DEVELOPMENT
U.S. ENVIRONMENTAL PROTECTION AGENCY
CINCINNATI, OHIO 45268
-------
DISCLAIMER
The information in this document has been funded wholly or
in part by the U.S. Environmental Protection Agency (EPA). It has
been subjected to the Agency's peer and administrative review,
and has been approved for publication as an EPA document. Mention
of trade names or commercial products does not constitute
endorsement or recommendation for use.
11
-------
FOREWORD
Today's rapidly developing and changing technologies and
industrial products and practices frequently carry with them the
increased generation of materials that, if improperly dealt with,
can threaten both public health and the environment. The U.S.
Environmental Protection Agency (EPA) is charged by Congress with
protecting the Nation's land, air, and water resources. Under a
mandate of national environmental laws, the Agency strives to
formulate and implement actions leading to a compatible balance
between human activities and the ability of natural systems to
support and nurture life. These laws direct the EPA to perform
research to define our environmental problems, measure the
impacts, and search for solutions.
The Risk Reduction Engineering Laboratory is responsible for
planning, implementing, and managing research, development, and
demonstration programs to provide an authoritative, defensible
engineering basis in support of the policies, programs, and
regulations of the EPA with respect to drinking water,
wastewater, pesticides, toxic substances, solid and hazardous
wastes, and Superfund-related activities. This publication is one
of the products of that research and provides a vital
communication link between the researcher and the user community.
ms'
The purpose of this user's manual is to describe the
operation of a computer program called DFLOW. This program
computes various types of statistically-based river flows that
are used in water quality modeling studies and waste load
allocations.
E. Timothy Oppelt, Director
Risk Reduction Engineering Laboratory
-------
ABSTRACT
DFLOW is a computer program for estimating design stream
flows for use in water quality studies. This manual describes the
use of the program on both the EPA's IBM mainframe system and on
a personal computer (PC). The mainframe version of DFLOW can
extract a river's daily flow record from EPA's STORET system and
convert it into a format suitable for downloading to a PC. Both
the mainframe and PC versions can compute aquatic life design
flows based on either continuous duration or annual extreme value
flow statistics and a human health design flow equal to a river's
harmonic mean flow. The manual also describes the computational
methods employed by DFLOW.
IV
-------
CONTENTS
Page
Foreword iii
Abstract iv
Figures vi
1. Introduction 1
2. Operating Instructions 3
3. Computational Procedures 15
References 24
Appendix
A. Operation of PC DFLOW 25
-------
FIGURES
Number
Page
1 Sample STORET Flow Retrieval 5
2 Sample Flow File Conversion 6
3 Sample Biologically-Based Design Flow 7
4 Sample Extreme Value Design Flow 11
5 Sample Human Health Design Flow 12
6 Sample Exit From DFLOW 13
7 Sample DFLOW Session Log • 14
8 Initial Portion of a PC Flow File 26
VI
-------
1. INTRODUCTION
DFLOW is a computer program for estimating design flows for
use in water quality studies. A design flow is a river flow with
a specified frequency of not being exceeded, as determined from
historical daily flow records. The mainframe version of DFLOW can
extract daily flow records from the US Environmental Protection
Agency's (EPA's) STORET data base and then compute design flows
from these records. It also provides a facility to convert
extracted flow files into a format that can be downloaded to a
personal computer (PC). A PC version of DFLOW is available to
compute design flows for flow records downloaded from STORET or
obtained from other sources .
DFLOW implements EPA guidance on design flows for protection
of aquatic life (U.S. Environmental Protection Agency, 1986) and
for protection of human health. It computes three different types
of design flows in accordance with this guidance. The biologic-
ally-based and extreme value-based design flows are used in
conjunction with aquatic life water quality criteria. The
biologically-based design flow limits the frequency of all flow
events within the period of record that are below the design
flow. The extreme value design flow limits the frequency of years
containing flows below the design flow. It corresponds to the
traditional definition of design flow (e.g., the 7-day, ten year
(7Q10) low flow). A third type of design flow, the human health
design flow, applies to water quality criteria for protection of
human health under lifetime exposure. It is computed as the
harmonic mean of the daily flow record.
DFLOW runs interactively on either the EPA mainframe or on a
DOS-compatible PC. The user should be prepared to supply DFLOW
with the following kinds of information:
-------
* the number of the US Geological Survey (USGS) stream
gage whose daily flow record is to be extracted from
STORET and the state where it is located (mainframe
version only), or a data file containing a record of daily
flow values (PC version only)
* the type of design flow to be computed (biologically
-based, extreme value, or human health),
* the portion of the record to be analyzed (optional),
* defining parameters for extreme value design flows and
for biologically-based design flows (if default values are
not chosen).
More detailed descriptions of the defining parameters for the
biologically-based and extreme value design flows are provided in
the material that follows.
-------
2. OPERATING INSTRUCTIONS
These instructions apply to the mainframe version of DFLOW.
Operation of the PC version is described in Appendix A. DFLOW can
be accessed through EPA's National Computing Center's IBM 3090
mainframe by users with an authorized STORET account. After
entering the STORET environment under the TSO operating system,
the DFLOW program can be invoked by entering the command:
WQAB DFLOW
An opening message screen provides information about the current
program version number, latest bug fixes, and a user support
phone number. After reading this screen and pressing the Enter
key, the following main menu of choices will appear:
DFLOW MAIN MENU
ENTER THE NUMBER OF THE PROCEDURE YOU WISH TO EXECUTE:
1 - RETRIEVE FLOW DATA FROM STORET
2 - CONVERT FLOW DATA FOR DOWNLOADING
3 - COMPUTE DESIGN FLOWS
4 - EXIT THE PROGRAM
OPTION ==>
The first choice is used to retrieve a record of daily flow data
for a specific USGS flow gage from STORET. Options 2 and 3 cannot
be used unless a flow record is first extracted from STORET. The
second option is used to convert a flow record that has been
retrieved from STORET into a file format that can be.downloaded
onto a PC. Users who work exclusively on the mainframe will not
-------
need to invoke this option. The third option executes the design
flow estimation procedures of DFLOW, while the last option
terminates the program and returns the user to the operating
system.
Figure 1 illustrates a sample flow retrieval (option 1).
There are three items of information that the user is prompted to
supply: the name of the river (8 or less characters), an 8-digit
USGS flow gage number, and the 2-character postal abbreviation of
the state in which the gage is located. The river name can be any
label that the user wants to assign to the river -- it need not
be the actual name of the river. After these three items are
entered, DFLOW submits a batch job to the STORET system to
retrieve daily flow data for the designated flow gage. The time
required to complete the retrieval depends on how heavily the
mainframe is being used. Normally, it should take no more than a
few minutes. When ready to proceed, the user presses the Enter
key to bring up the main DFLOW menu once again. If the retrieval
was successful, the retrieved flow data will be placed in a
dataset named "river".FLOW (where "river" is the user-supplied
river name) in the user's catalog.
An example of using option 2 of DFLOW for converting a
STORET flow file into one suitable for downloading to a PC is
shown in Figure 2. The user first supplies the name of a river
for which a STORET flow retrieval was made previously using
DFLOW's option 1. An error message results if a flow dataset for
the named river cannot be found in the user's catalog. The user
then designates whether the entire period of record or only a
portion of the record should be converted. Upon completion of the
conversion process, DFLOW alerts the user that the converted flow
data resides in a dataset named "river".DOWNLOAD, where "river"
is the user-supplied river name. The actual process of
downloading the flow data onto a PC would be done outside of the
DFLOW program, using a mainframe-to-PC file transfer procedure.
-------
D F 1. 0 W MAIN MENU
ENTER THE NUMBER OF THE PROCEDURE YOU WISH TO EXECUTE:
1 - RETRIEVE FLOW DATA FROM STORET
" 2 i CONVERT FLOW DATA FOR DOWNLOADING ' ''
3 - COMPUTE DESIGN FLOWS
4 - EXIT THE PROGRAM "
OPTION ==> 1
OF RIVER {8 OR LESS CHARACTERS) ~> quimip
8-DIGIT USGS FLOW GAGE NUMBER ==> 01196500
2-CHARACTER STATE ABBREVIATION _% ==> ct
JOB MRF (JOB07164) SUBMITTED %
SUBMIT COMPLETED ' , ,
, RETRIEVED FLOW DATA WILL BE STORED "iN DATASET 'QUlNNIP.FLOW'.
YOU MIGHT WANT TO WAIT NOW FOR 'FLOW RETRIEVAL JOB TO FINISH.
PRESS KEY WHEN READY TO .CONTINUE ...
10. 04. ZZ JOB07164 $HASP165 MRF64 ENDED AT NCCIBM1 CN(OO)
Figure 1. Sample STORET Flow Retrieval
DFLOW's third'main menu option, the computation of design flows,
is illustrated in Figures 3 through 5. The user first supplies
the name of a river for which flow data had been previously
retrieved. An error message results if a flow dataset for the
river cannot be found in the user's catalog. The user then
selects the type of design flow to be calculated from a menu of
the following choices: biologically-based, extreme value, or
human health.
Figure 3 portrays selection of a biologically-based design
flow computation. The user specifies whether the design flow is
for acute (CMC) or chronic (CCC) water quality criteria and then
whether default parameter settings apply or not. The parameters
for a biologically-based design flow are as follows:
-------
D F L 0 W MAIN MENU
ENTER THE NUMBER OF THE PROCEDURE YOU U!SH TO EXECUTE:
f - RETRIEVE PLOW DATA FROH^STORET
2 - CONVERT FLOW DATA FOR DOWNLOADING
3 - COMPUTE DESIGN FLOWS ^
4 - EXIT THE PROGRAM
OPTION ==> Z " ^ - - , " "% ,
NAME OF RIVER TO CONVERT (8 OR LESS CHARACTERS) ==> quirwip
FLOW FILE CONVERSION FOR USGS GAGE 01196500
KEY TO CONTINUE ..,
Figure 2. Sample Flow File Conversion
-------
s 'D F t 0 W MAIN MENU,,'
:====================================:================:===
ENTER THE NUMBER OF THE PROCEDURE YOU WISH TO EXECUTE:
1 - RETRIEVE FLOW DATA FROM STORET
- 2 - CONVERT FLOU DATA FOR DOWNLOADING,
3 - COMPUTE'DESIGN FLOWS -' ••'„,,„
4 - EXIT THE PROGRAM
OPTION ==> 3
NAME OF RIVER TO ANALYZE (8 OR LESS CHARACTERS)^ ==> quimip
DESIGN FLOWS FOR USGS "GAGE" 01196500 - ' ,
QUINNIPIAC R AT WALLINGFORD, CT
ENTER THE NUMBER OF THE DESIGN FLOW YOU WISH JO CALCULATE:
1 • AQUATIC LIFE, BIOLOGICALLY-BASED " ,
2 - AQUATIC LIFE, EXTREME VALUE
3 - HUMAN HEALTH, HARMONIC MEAN
4 - RETURN JO MAIN MENU " ' ' '
WHICH TYPE OF WATER QUALITY CRITERION APPLIES: ____
1 - CRITERION MAXIMUM CONCENTRATION (ACUTE)
2 - CRITERION CONTINUOUS CONCENTRATION (CHRONIC)
'*"
SHOULD DEFAULT SETTINGS BE USED FOR THE BIO-BASED DESIGN FLOW PARAMETERS
(AS DESCRIBED IN US EPA TECHNICAL GUIDANCE MANUALJ3N DESIGN FLOWS):
1 - YES , ,
2 - NO ' ;
i -
HOW DO YOU WANT TO ANALYZED THE AVAILABLE FLOW RECORD:
1'- ANALYZE THE ENTIRE AVAILABLE RECORD
2 - ANALYZE ONLY A PORTION OF' THE RECORD
2 '' ' *- -- ,
WHAT IS THE FIRST YEAR OF THE FLOW RECORD TO BE ANALYZED
1900 '* ' , ' '
WHAT IS THE LAST YEAR OF THE 'FLOW RECORD TO BE ANALYZED^
1977
Figure 3. Sample Biologically-Based Design Flow
-------
* DESIGN FLOWS FOR'USGS GAGE 01196500 ,
QUINNIPIAC R AT WALUNGFORD, CT " /*
PERIOD" OF RECORD ANALYZED
, , ' '- 1931
ALLOWED NUMBER OF EXCURSIONS ..,-• :
BIO-BASED CCC (CHRONIC) DESIGN FLOW - f",':
PRESS KE'Y TO CONTINUE
— , ,
-.s -,-,
TO 1977
15.68
25.35 CFS
s
ENTER A FLOW (CFS) FOR WHICH YOU WANT AN
EXCURSION TABLE (OR 0 FOR NO TABLE) "
25.35
s
-"
WATER QUALITY EXCURSIONS FOR 1931-1977 AT DESIGN FLOW OF 25.35 CFS
f ' CLUSTER PERIOD -
| " NUMBER OF
j START DATE EXCURSIONS
! OCT 2, 1931 3.25
'
1 '
I
j -OCT 13, 1932 1.50
I AUG 14, 1936 2.25
j OCT 22, 1965 ' 1.75
j AUG 5,. 1966 5.00
I
}~ AUG 12, 1970 1.75
j TOTAL 15.50
% - " EXCURSION "PERIODS [
- DURATION AVERAGE % \
- START DATE (DAYS) ^ EXCURSION * j
OCT 2, 1931
NOV 11, 1931
NOV 26, 1931
OCT 13, 1932
AUG 14, 1936
SOCT 22, 1965
1 AUG 5, 1966
AUG 19, 1966
AUG 12, 1970
* PERCENTAGE BY WHICH A CRITERION CONCENTRATION
PRESS - KEY TO CONTINUE
... .
'4 3.1 {
5 1.4
^4 16.0 |
6 8.3 |
9 "41.8 j
7 13.2 }
12 4.9 j
25 31.7 ' {
r 21.4 ,}
•'-" - r
WOULD BE EXCEEDED.
-
ENTER A FLOW (CFS) FOR WHICH YOU WANT AN
, EXCURSION TABLE (OR 0 FOR NOJABLE)
0
,
,-
Figure 3 . Continued
Number of days in a flow averaging period - a number
between 1 and 30; default values are 1 day for acute
water quality criteria and 4 days for chronic criteria.
Average number of years between excursions - the length
of time, on average, between occurrences of m-day
average flows below the design flow, where m is the
flow averaging period specified above; default value is
3 years.
8
-------
Length of excursion clustering period - the length of
time used to cluster excursions (i.e., occurrences of
in-day average flows below the design flow) together;
default value is 120 days.
Maximum number of excursions counted per cluster - a
ceiling placed on the number of design flow excursions
that are actually counted within a clustering period;
default value is 5.
As an example of how these parameters determine a design
flow, consider a situation with 30 years of flow record where a
design flow for chronic water quality criteria is being
calculated. Under the default parameter values, a design flow
would be chosen so that the total number of past occurrences of
non-overlapping 4-day average flows below this flow is as close
to, but no greater than, 30/3 or 10, excluding those that exceed
5 within any 120 day period.
If default parameter values are not used, the user is
prompted to enter values for each one. Then the user has the
option of using the entire flow record in the analysis or only a
portion of the record. For the latter case, the user is prompted
for the first and last years to be analyzed. A response of 1900
for the first year causes DFLOW to use the first available year
in the retrieved streamflow record. A response of 1999 for the
last year allows DFLOW to consider flows up to last year
available in the flow record.
The output from DFLOW for a biologically-based design flow,
as shown in Figure 3, lists the period of record analyzed, the
allowed number of excursions below the design flow over this
period, and the value of the computed design flow. After this,
the user is prompted for a design flow from which a water quality
excursion table is constructed. This table shows when a water
quality criterion for a hypothetical toxicant would have been
exceeded during the historical period of record. These criterion
-------
excursions occur when river flows are below the design flow. A
sample excursion table is shown in Figure 3. The right hand side
of the table lists individual excursion periods (consecutive days
where each in-day average flow is below the design flow) and their
average magnitude (the average percent difference between each in-
day average flow in the period and the design flow). The left
hand side of the table divides up the individual excursions
periods into clusters and counts up the number of discrete
excursions (the total duration of excursion days divided by the
averaging period) within each cluster. Note that under the
default excursion parameters used in this example, no more than 5
excursions are counted within any 120-day cluster period. The
process of DFLOW requesting a design flow and then producing an
excursion table continues until the user responds with a flow of
0. The program then returns to the menu of design flow choices.
Figure 4 illustrates the computation of an extreme value
design flow. The user is prompted to supply values for the flow
averaging period and the return period. The flow averaging period
(call it m) has the same meaning as in the biologically-based
design flow. However the return period'now represents the number
of years, on average, between occurrences of years with one or
more in-day average flows below the design flow. For example, a
return period of 10 years means that, on average, one of every
ten years will have flow events that are below the design flow
value. Note that in contrast to the biologically-based design
flow, no information is conveyed on how many such flow events
occur within each such year or over the total period of record.
After specifying the averaging and return periods, the user
can opt to use the entire flow record or some designated portion
as explained above. The output of the calculation shows the
actual period of record analyzed and the resulting extreme value
design flow. The program then returns to the design flow menu.
10
-------
DESIGN FLOWS FOR USGS GAGE 01196500
QUINNIP1AC R AT WALLlNGFORD,s CT
ENTER THE NUMBER OF THE DESIGN FLOW YOU WISH TO CALCULATE:
1 -" AQUATIC LIFE, BIOLOGICALLY-BASED
V2 - AQUATIC LIFE, EXTREHE VALUE
3 - HUMAN HEALTH, HARMONIC MEAN
4 - RETURN TO MAIN MENU
* " "
2
ENTER VALUES FOR THE FOLLOWING PARAMETERS {TYPICAL VALUES ARE
SHOWN IN PARENTHESES):
FLOW AVERAGING PERIOD (7 DAYS)
RETURN PERIOD ON YEARS WITH EXCURSIONS (10 YEARS)
? " ' ~ '
10 ' e "
HOW DO YOU WANT TO ANALYZE THE AVAILABLE FLOW RECORD:
1 - ANALYZE THE ENTIRE AVAILABLE RECORD
" 2 - ANALYZE ONLY A PORTION OF THE RECORD
? • ,', , '. ' ~ ~ '•. '
2 - '
WHAT IS THE FIRST, YEAR OF THE >LOW RECORD TO BE ANALYZED'
? „
1900
•• S
WHAT "IS THE LAST YEAR '' OF THE FLOW RECORD, TO BE ANALYZED
? ^ ' - -" "
1977 .
DESIGN FLOWS FOR USGS GAGE 01196500
QUINNIPIAC R AT WALLINGFORD, CT
PERIOD OF RECORD ANALYZED
7-Q-10 DESIGN/LOW
' -\ '
PRESS KEY TO CONTINUE ...
: 1931 TO 1977 _
: , 32.41 CFS
Figure 4. Sample Extreme Value Design Flow
Figure 5 illustrates computation of a human health design
flow, i.e., a harmonic mean flow. Once again the user has the
option of specifying that only some portion of the flow record be
analyzed. After this, the resulting harmonic mean flow is
displayed, then the user is returned to the design flow menu.
11
-------
DESIGN FLOWS FOR USGS GAGE 01196500
QUINNIPIAC R AT WALLINGFORD, CT \,
ENTER THE NUMBER OF THE DESIGN FLOW YOU WISH TO CALCULATE:
1 - AQUATIC LIFE, BIOLOGICALLY-BASED
2 - AQUATIC LIFE, EXTREME VALUE
3 - HUMAN HEALTH, 'HARMONIC MEAN ""
4 - RETURN TO MAIN MENU -
HOW DO YOU WANT TO ANALYZE THE AVAILABLE FLOW RECORDS
1 - ANALYZE THE ENTIRE AVAILABLE RECORD
2 - ANALYZE ONLY A PORTION OF THE RECORD
DESIGN FLOWS FOR USGS GAGE 01196500 '
QUINNIPIAC R AT WALLINGFORD, CT '
PERIOD OF RECORD ANALYZED ; 1931 TO 1988
HUMAN'HEALTH (HARMONIC MEAN)" DESIGN FLOW : 113.69 CFS
PRESS KEY TO CONTINUE ... ' , ,
Figure 5. Sample Human Health Design Flow
NOTE: The harmonic mean of a sample of values is the reciprocal of the mean of the reciprocals of the
individual values within the sample.
The last choice on the design flow menu returns the user to
the main DFLOW menu. Prior to returning to the main menu, DFLOW
asks the user if the output from the design flow computations
should be saved in a dataset (see Figure 6) . If the user answers
yes, then the output is placed in a dataset named "river".LOG
(where "river" is the name of the river supplied previously by
the user). After the DFLOW session is over, this dataset can be
printed out by the user so that a hardcopy record of the
computations is available. (There are several ways to print a
dataset from a TSO session on the NCC IBM mainframe. Consult the
NCC Users Guide or, if using remote telecommunication via a PC,
12
-------
the users manual for your PC communications software.) The "LOG"
dataset for the examples shown in Figures 3 through 5 is
displayed in Figure 7.
DESIGN FLOWS FOR"USGS GAGE 01196500
QUINNIPIAC R AT WALUNGFORD, CT
ENTER JHE NUMBER OF THE DESIGN FLOW'YOU WISH TO CALCULATE:
1 - AQUATIC LIFE, BIOLOGICALLY-BASED
2 - AQUATIC LIFE, EXTREME VALUE
3 ~ HUMAN HEALTH, HARMONIC HEAM
4 - RETURN TO MAIN MENU' - , ,
?
4 s ' ' '-,
DO YOU WISH TO SAVE THE OUTPUT FOR THIS RIVER IN A DATASET:
'1 - YES ,
2 - NO
OUTPUT CAN BE FOUND IN DATASET 'QUINNIP.LOG1.
PRESS KEY TO CONTINUE .'..
DFLOW MAIN MENU
ENTER THE NUMBER OF THE PROCEDURE YOU WISH TO EXECUTE:
t - RETRIEVE FLOW DATA FROM STORET
,- 2 - CONVERT FLOW DATA FOR DOWNLOADING
- 3 - COMPUTE DESIGN /LOWS „
4 - EXIT THE PROGRAM "
f •* / * f
OPTION ==> 4
READY
Figure 6. Sample Exit From DFLOW
13
-------
BIO-BASED DESIGN FLOW PARAMETERS
LENGTH OF FLOW AVERAGING PERIOD
AVERAGE INTERVAL BETWEEN EXCURSIONS
LENGTH OF EXCURSION CLUSTERING PERIOD
MAX. NUMBER OF EXCURSIONS PER CLUSTER
4 DAYS
3.0 YEARS
120.0"DAYS
5,0'
DESIGN FLOWS FOR USGS GAGE 01196500
QUINNIPIAC R AT WALLINGFORD, CT
PERIOD OF RECORD ANALYZED
ALLOWED NUMBER OF EXCURSIONS
BIO-BASED CCC (CHRONIC) DESIGN FLOW
1931 TO 1977
15.68
25.35 CFS
WATER QUALITY EXCURSIONS FOR 1931-1977 AT DESIGN FLOW OF 25.35 CFS
1
\
t
CLUSTER PERIOD
„
NUMBER OF
{ START DATE EXCURSIONS
I
I
1
!
j
i
i
t
- i
i
*
OCT
*
OCT
AUG
OCT"
AUG
AUG
2,
13,
14,
22,
5,
12,
1931
1932
1936^
1965 ,
1966^
1970
% TOTAL 15
PERCENTAGE BY WHICH
DESIGN
FLOWS FOR USGS
QUINNIPIAC
3.25
1.50
2.25
1.75
5.00
*
EXCURSION PERIODS
11
START DATE
OCT
NOV
f NOV
OCT
-AUG
OCT
AUG
AUG
1 .75 ' j AUG
.50
2,
11,
26,
13,
14,
22,
5,'
19,
12,
1931
1931
1931
1932
1936
1965
1966
1966
1970 "
DURATION
(DAYS)
4
5
4
6
9
7
12
x'25
"7
AVERAGE. %
i
l
i
EXCURSION * j
3.
1
l
1.4 !
16.
8.
41.
" 13.
4.
31.
21.
0
3
8
2
9
7
4
1
1
l
i
i
i
1
i
i
A CRITERION CONCENTRATION
WOULD-BE
EXCEEDED
•„
GAGE 01196500
R AT WALLINGFORD, CT
PERIOD OF RECORD ANALYZED
7-Q-10 DESIGN FLOW
; 1931 TO 1977
: 32.41 CFS
DESIGN FLOWS FOR USGS'GAGE 01196500
QUINNIPIAC R AT WALLINGFORD, CT
PERIOD OF RECORD ANALYZED : 1931 TO 1988
HUMAN HEALTH (HARMONIC MEAN)'DESIGN FLOW : ' ' 113.69 CFS
Figure 7. Sample DFLOW Session Log
14
-------
3. COMPUTATIONAL PROCEDURES
This section describes the computational steps employed by
DFLOW for each of the three types of design flows considered. It
begins with the extreme value design flow, since this type of
design flow also serves as a starting point in computing the
biologically-based design flow.
Extreme Value Design Flow
The extreme value design flow is computed from the sample of
lowest m-day average flows for each year of record, where "m" is
the user-supplied flow averaging period. Established practice
uses arithmetic averaging to calculate these m-day average flows.
A log Pearson Type III probability distribution is fitted to the
sample of annual minimum m-day flows. The design flow is the
value from the distribution whose probability of not being
exceeded is 1/R, where R is the user-supplied return period. The
procedure is modified slightly to accommodate situations where
some annual low flows are zero.
Step 1. Initialize each element of a vector X of daily flow
values to UNKNOWN (i.e., a very large number such as IxlO20) .
Step 2. Read in daily flow values from the retrieved STORET flow
file into X, where X(l) corresponds to the first day of record.
(Note: February 29th of leap years is ignored.)
Step 3. Create m-day running arithmetic averages from the daily
flows in X, and replace the daily flows of X with these values.
The running average of X(i), X(i+l), ..., X(i+m-l) is placed in
15
-------
Step 4. Find the lowest m-day running average value for each
water year recorded in X (where a water year begins on April 1)
and store the resulting values in vector Y. Let NY denote the
number of entries in Y.
Step 5. Let N be the number of non-zero entries in Y. Assume that
these Y-values are a sample drawn from a log Pearson Type III
probability distribution. The design flow, DFLOW, is the value
from this distribution whose probability of not being exceeded is
1/R, where R is the user-supplied return period. Use the
following procedure to find DFLOW:
Step 5a. Find the mean (U), standard deviation (S), and
skewness coefficient (G) of the natural logarithms of the
non-zero entries in Y.
Step 5b. Let FO be the fraction of entries in Y that are
zero:
FO = (NY - N)/NY
,'
Let P be the cumulative probability corresponding to the
user-supplied return period of R years, adjusted for the
presence of zero-flow years:
P = (1/R - F0)/(l - FO).
In other words, if FO is the probability of having a year
with zero stream flow, and 1/R is the allowed probability of
a year with an excursion below the design flow, then P is
the corresponding excursion probability in years with non-
zero flows.
Step 5c. Let Z be the standard normal deviate corresponding
to cumulative probability P. Z can be computed using the
16
-------
following formula (Joiner and Rosenblatt, 1971):
Z = 4.91(P'14 - (i-p)-14)
Step 5d. Compute the gamma deviate, K, corresponding to the
standard normal deviate Z and skewness G using the Wilson-
Hilferty transformation (Loucks et al., 1981):
K = (2/G) ([1 + G*Z/6 - G2/36]3 - 1)
Step 5e. Compute DFLOW as exp(U + K*S).
Biologically-Based Design Flow
A descriptive definition of the biologically-based design
flow is presented in U.S. Environmental Protection Agency (1986).
It is computed by starting with a trial design flow, then
counting how often this flow is not exceeded by m-day average
flows in the historical record. (In contrast with the traditional
method of computing extreme value design flows, the m-day flow
averages are harmonic means, not arithmetic ones. The reason why
is explained in Rossman (1990)). This count is compared to the
allowed number of such occurrences, and the trial design flow is
adjusted accordingly. The specific computational steps involved
are as follows;
Step 1. Initialize each element of a vector X of daily flow
values to UNKNOWN (i.e., a very large number such as ixlO20) .
Step 2. Read in daily flow values from the retrieved STORET flow
file into X, where X(l) corresponds to the first day of record.
(Note: February 29th of leap years is ignored.)
17
-------
Step 3. Create m-day running harmonic averages from the daily
flows in X, and replace the daily flows of X with these values.
The running average of X(i), X(i+l), ..., X(i+m-l) is placed in
X(i) and is computed as follows;
.Define B(j) as l/X(i+j-i) if X(i-fj-i) > 0, and 0 otherwise,
for j = 1 to m. Let DSUM be the sum of B(j) for j = 1 to m
and mo be the number of B(j) values that equal 0. Then
replace X(i) with X(i) = (m-mO)/DSUM*(m-mO)/m.
Note that this procedure takes into account the possibility of
zero flows when forming a harmonic average.
Step 4. Compute an extreme value m-day average trial design-flow
(DFLOW) using the biologically-based average number of years
between flow excursions (R) as the return period.
Step 5. Compute the allowed number of flow excursions, A, (i.e.,
the number of distinct m-day average flows allowed to be'below '
the design flow) over the NDAYS of streamflow record: A =
NDAYS/365/R.
Step 6. Use the procedure described below to compute the number
of biologically-based flow excursions resulting under the trial
design flow DFLOW. Because the trial flow was computed as an
extreme value flow, the resulting number of biologically-based
excursions will most likely be larger than the allowed number, A.
If it is not, then keep increasing the trial design flow by some
fixed increment until the resulting number of excursions exceeds
Step 7. Use the Method of False Position (Carnahan et al., 1969)
to successively refine the estimate of the biologically-based
design flow as follows:
18
-------
Step 4a. Set lower and upper bounds on the design flow with
their corresponding excursion counts:
FL = 0; XL = 0.
FU = DFLOW; XU = number of excursions under DFLOW.
Step 4b. Check on convergence of the bounds. If FU - FL is
within 0.5% of FL, then end with DFLOW = FU; If XL is within
0.005 of A, then end with DFLOW = FL. If XU is within 0.005
of A, then end with DFLOW = FU. Otherwise proceed to the
next step.
Step 4c. Interpolate between the bounds to find a new trial
design flow, FT:
FT = FL + (FU - FL)*(A - XL)/(XU - XL)
and compute the number of excursions (XT) occurring for this
flow (see procedure described below).
Step 4d. Update the bounds based on the value of XT:
If XT <= A, then set FL = FT and XL = XT. Otherwise set FU =
FT and XU = XT. Then return to the convergence check of Step
4b.
The process used to count the number of flow excursions for
a given design flow proceeds in two phases. The first phase
identifies all excursion periods in the period of record. An
excursion period is a sequence of consecutive days where each day
belongs to an m-day running average flow that is below the given
design flow. Recall that "m" is the flow averaging period set by
the user. Phase two groups these excursion periods into excursion
clusters and counts up the total number of excursions occurring
within all clusters. An excursion cluster consists of all
excursion periods falling within a prescribed length of time from
the start of the first period in the cluster (120 days is the
default cluster length). The number of excursions counted per
cluster is subject to an upper limit whose default value is 5.
19
-------
Before describing the detailed procedures for each of these
phases a simple numerical example will be used to illustrate the
method. Suppose that the design flow under consideration is 100
cfs and that the period of record yields a sequence of 4-day
running average flows as follows:
Day
1
2
3
4-12
13
14
15
16-512
4 -Day Avg
Flow, cfs
34
65
25
> 100
57
34
26
> 100
Day
513
to
545
546
to
end
4-Day Avg.
Flow, cfs
< 100
> 100
The first flow excursion period for this record consists of
the 4-day averages occurring on days 1, 2 and 3. Thus the period
extends from day 1 to day 6 (days 4, 5 and 6 belong to the
averaging period that begins on day 3). There are two other
excursion periods consisting of days 13 to 18 and 513 to 548.
Under the default clustering parameters, there are 2 excursion
clusters; cluster 1 contains periods 1 and 2, and cluster 2
_,•"''"
contains period 3. The number of excursions in each cluster is as
follows:
Start Length, # Excursions # Excursions
Cluster Period Day Days in Period in Cluster
1
1
2
4
13
6
6
6/4 =
6/4 =
1.5
1.5
3
.0
513
36
36/4 =9.0
5.0
Note that the number of excursions in each period equals the
period length divided by the averaging period. The nominal number
of excursions in cluster 2 is 9, and since this exceeds the limit
of 5, only 5 are counted. The total number of excursions for the
design flow of 100 cfs in this example is 3 + 5 = 8.
20
-------
The detailed procedure for counting biologically-based flow
excursions under a specified design flow is as follows:
PHASE 1
Define Pl(i) = day which begins excursion period i,
P2(i) = day which ends excursion period i,
XP(i) = number of excursions in period i,
XKLfoax = maximum cluster length (e.g., 120 days).
t = current day of record.
Step 1. Set i = 0, P2(0) = 0, and t = 1.
Step 2. If the m-day running average beginning on day t is
greater or equal to the specified design flow then proceed to
Step 5.
Step 3. If the current day t is more than a day beyond the end of
the current excursion period (t > P2(i) +1), or if the length of
the current excursion period equals XKL^ then begin a new
excursion period by setting:
i = i + 1
Pl(i) = -b
*P2(i) = m - 1
XP(i) = 0.
Step 4. Update the ending day of the current excursion period and
the excursion count for this period:
P2(i) = P2(i) + 1
XP(i) = (P2(i) - Pl(i)) / m.
Step 5. Proceed to the next day of record (t = t + 1) . If not at
the end of the record then return to Step 2 . Otherwise proceed to
phase 2 .
21
-------
PHASE 2
Define ± = current excursion period,
k = current excursion cluster,
Kl = day of record which begins cluster k,
XK(K) = number of excursions in cluster k,
XKmax = maximum number of excursions counted per
cluster (e.g., 5),
Step i. Set i = 1, k = 0, and Kl = a large negative number.
Step 2. If the length of the current cluster is greater than the
maximum length (i.e., P2(i) - Kl > XKI^X) then begin a new
cluster with excursion period i, i.e.,
k = k + 1
Kl = Pl(k)
XK(k) =0.
Step 3. Update the excursion count for the current cluster,
XK(k) = minimum{XK(k) + XP(i) , XKmax}.
Step 4. Proceed to the next excursion period (i = i + 1) and
return to Step 2. If no more excursion periods remain, then total
up the number of excursions in each cluster (XK(1) + XK(2) + ...
+ XK(k)) to determine the total number of excursions.
Human Health Design Flow
The overall harmonic mean daily flow can serve as a design
flow for human health water criteria that are based on lifetime
exposures. (See Rossman (1990) for justifying the use of the
harmonic mean.) Computation of the harmonic mean flow begins by
reading daily flow values into a vector X. Then the following
steps are followed:
22
-------
Step 1. Set NDAYS = 0, NZEROS = 0, DSUM = 0 and t = 1.
Step 2. If X(t) equals UNKNOWN, then go to Step 5. Otherwise set
NDAYS = NDAYS + 1.
Step 3. If X(t) equals 0, then set NZEROS = NZEROS + 1 and got to
step 5.
Step 4. Set DSUM = DSUM + l/X(t).
Step 5. Set t = t + 1. If the end of the record has not been
reached then return to Step 2.
Step 6. Compute the design flow HMEAN as
HMEAN = (NDAYS - NZEROS) / DSUM * DR
where DR = (NDAYS - NZEROS) / NDAYS.
Note that this procedure takes into account the possibility of
days with zero flow. The final estimate of the harmonic mean is a
weighted average of the harmonic mean of the non-zero flows and
zero. The weight attached to the harmonic mean of the non-zero
flows is simply the fraction of the total days of record that
have non-zero flows.
23
-------
REFERENCES
Carnahan, B., H.A. Luther, and J.O. Wilkes, (1969), Applied
Numerical Methods,. Wiley, New York.
Joiner, B.L., and Rosenblatt, J.R., (1971),"Some properties of
the range in samples from Tukey's symmetric lambda
distributions", J. Amer. Statistical Assoc., 66:394-399.
Loucks, D.P., Stedinger, J.R., and Haith, D.A., (1981), Water
Resource Systems Planning and Analysisr Prentice-Hall, Inc.,
Englewood Cliffs, NJ.
Rossman, L.A., 1990, "Design Stream Flows Based on Harmonic
Means", Journal of Hydraulic Engineering (in press).
U.S. Environmental Protection Agency, 1986, "Technical Guidance
Manual for Performing Wasteload Allocation, Book VI, Design
Conditions: Chapter 1 - Stream Design Flow for Steady-State
Modeling", Office of Water Regulations and Standards, Washington,
D.C.
24
-------
01196500
32
32
32
32
32
32
32
32
32
32
32
32
01
01
01
01
01
01
01
01
01
01
01
01
01
02
03
04
05
'06
07
08
09
10
11
12
38
121
174
142
107
*110
281
270
190
147
155
155
.00
.00 "
.00
.00
•°°
. 00
. 00 * ' ' ""
.00 " "
• oo
.00 . ,
.^00
. 00 „
Figure 8. Initial Portion of a PC Flow File
To execute the program, the following command is used:
DPLOW
The user is then prompted to enter the name of the streamflow
file (1 to 8 characters, without the .FLO extension). If the flow
file cannot be found or accessed, an error message results and
the program terminates. Otherwise, it uses the same menus, data
prompts, and output displays as the mainframe version. Upon
exiting the program, a log of the computations is saved in a file
whose prefix is the same as the streamflow file and has an
extension of .LOG. This file can be printed to produce a hardcopy
of the calculations.
26
------- |