SEPA
United States      '
Environmental Protection
A9ency
                                 Office of
                                 Water Programs Operations
                                 Washington DC 20460 (WH-595)
                                  EPA-430/9-79-004
                                  February 10, 1979
Water
1978 Needs Survey
                                Do not remove. This document
                                should be retained in the EPA
                                Region 5 Library Collection.
Continuous Stormwater  Pollution
Simulation System-
Users Manual

                                            FRD-

-------
                   DISTRIBUTION STATEMENT
Additional copies of this document may be purchased from:

               National Technical  Information Servut;
               Springfield, Virginia  22151
               Telephone:  703-557-4650

To obtain a copy of the source deck of the computer program
described in this users manual from EPA, contact:

               National Technical  Information Service
               Springfield, Virginia  22151
               Telephone:  703-557-4763
                             or

               Mr. Richard Kezer
               Facility Requirements Division (Wh-595)
               Office of Water Program Operations
               Environmental Protection Agency
               401 M Street, S.W.
               Washington, D.C.  20460
               Telephone: 202-426-4443

-------
         1978 NEEDS SURVEY
  CONTINUOUS STORMWATER POLLUTION
         SIMULATION SYSTEM
            USERS MANUAL
          Project Officer

         Philip H. Graham
  Facility Requirements Division
Office of Water Program Operations
  Environmental Protection Agency
        401 M Street, S.W.
      Washington, D.C.  20460
      Contract No. 689-01-3993
    EPA Report No. 430/9-79-004
         FRD Report No. 4
         February 10, 1979


U-S, Environmental  Protection A^3f
Region V, Library
230 South Dearborn  Street     »-
Chicago, Illinois  60604 ^^

-------
     CONTENTS
                                                            Page

TABLES                                                      iv

FIGURES                                                     v

ACKNOWLEDGEMENTS                                            vi

Chapter

   1      INTRODUCTION AND OVERVIEW                         1-1
               SYSTEM STRUCTURE                             1-1*
               COMPUTATIONAL SEQUENCE                       1-3
               MAIN PROGRAM                                 1-3
               INPUT DATA FOR MAIN                          1-4

   2      RAINFALL SIMULATOR (MODULE 10)                    2-1
               PURPOSE                                      2-1
               DEFINITIONS AND ASSUMPTIONS                  2-1
               MATHEMATICAL MODELS                          2-3
               LOG TRANSFORMATIONS                          2-5
               SIMULATION PROCESS                           2-5
               INPUT REQUIREMENTS                           2-6

   3      WATERSHED RUNOFF (MODULE 20)                      3-1
               SCS RAINFALL-RUNOFF PROCLbURE                3-1
               TIME-AREA ROUTING                            3-4
               COMPUTATIONAL PROCESS                        3-8
               INPUT DATA                                   3-8

   4      POLLUTION ACCUMULATION AND WASHOFF
          (MODULE 30)                                       4-1
               ACCUMULATION                                 4-1
               WASHOFF                                      4-1
               INPUT DATA                                   4-3
               SELECTION OF THE WATERSHED WASHOFF
                 COEFFICIENT K                              4-3
               SELECTION OF POLLUTANT DECAY RATES          4-5
               SELECTION OF POLLUTANT ACCUMULATION RATE    4-6
               COMPUTATIONAL SEQUENCE                       4-9
           SEWER  SYSTEM  INFILTRATION (MODULE  40)              5-1
               INFILTRATION  QUANTITY                        5-1
               INFILTRATION  QUALITY                         5-2
               COMPUTATIONAL SEQUENCE                       5-4
               INPUT  DATA                                   5-5
                 U,S. Environmental Protection Agency

-------
CONTENTS—Continued
Chapter                                                     Page

   6      STORAGE/TREATMENT (MODULE 50)                     6-1
               COMPUTATIONAL PROCESS                        6-1
               INPUT DATA                                   6-3

   7      DRY-WEATHER WASTEWATER TREATMENT PLANT
          FLOW (MODULE 60)                                  7-1
               FLOW RATIOS                                  7-1
               INPUT DATA                                   7-1

   8      UPSTREAM FLOW (MODULES 70 AND 71)                 8-1
               DAILY STREAMFLOW (MODULE 70)                 8-1
               INPUT DATA (MODULE 70)                       8-3
               STOCHASTIC MONTHLY STREAMFLOW
                 SIMULATOR (MODULE 71)                      8-3
               INPUT DATA (MODULE 71)                       8-5

   9      RECEIVING WATER RESPONSE (MODULES 80,
          81, AND 82)                                       9-1
               PURPOSE AND OVERVIEW                         9-1
               UPSTREAM FLOW QUALITY                        9-1
               SUSPENDED SOLIDS RESPONSE (MODULE 80)        9-4
               DISSOLVED OXYGEN RESPONSE (MODULE 81)        9-4
                    Receiving Water Hydraulics              9-5
                    Saturation DO                           9-6
                    Carbonaceous Waste Decay Rate Kl        9-8
                    Nitrogenous Waste Decay Rate K3         9-9
                    Atmospheric Reaeration Rate K2          9-10
                    Sediment Uptake Rate SB                 9-12
                    Dissolved Oxygen in a Stream            9-14
                    Dissolved Oxygen in an Estuary          9-16
                    Computational Sequence                  9-17
               DISSOLVED LEAD RESPONSE (MODULE 82)          9-19
                    Conversions and Definitions             9-21
                    Determination of [CT] for Each Inflow   9-24
                    Mixing of Inflows                       9-24
                    Determination of pH for Mixed Flows     9-25
                    Precipitation Determination             9-25
                    Dissolved Lead Determination            9-27
                    Computational Sequence                  9-27
               INPUT DATA                                   9-28

REFERENCES

Appendix

   A      CODING INSTRUCTIONS                               A - 1

   B      FORTRAN LISTING OF CONTINUOUS STORMWATER
          POLLUTION SIMULATION SYSTEM  (CSPSS)               B - 1

   C      EXAMPLE PROBLEMS                                  C - 1
                              ill

-------
     TABLES
Table                                                       Page

 1-1      Module Code Definitions                           1-5

 3-1      Rainfall Runoff Computations                      3-2

 3-2      CN Values                                         3-5

 3-3      Example Time-Area Routing for LF = 2              3-7

 4-1      Estimating Annual Pollutant Yield                 4-7

 7-1      Hourly Flow Ratios                                7-2

 7-2      Daily Flow Ratio                                  7-2

 9-1      Example Upstream Flow Water Quality
          Matrix for Des Moines, Iowa                       9-3

 9-2      Example Computation of Hydraulic Constants
          for a Free Flowing Stream                         9-7

 9-3      Average Values of Oxygen Uptake of River
          Bottoms                                           9-13

 9-4      Estimated Longitudinal Tidal Dispersion
          Coefficients                                      9-18

 9-5      Equilibrium Constants for the Dissolved
          Lead Response Model                               9-21

-------
     FIGURES
Figure

 1-1      General flow chart for CSPSS

 2-1      Rainfall array definition sketch

 2-2      Monthly rainfall and season definition for
          Des Moines, Iowa

 3-1      Example cumulative rainfall runoff curves

 3-2      Chart for selection of CN II values

 4-1      Pollution accumulation washoff functions

 4-2      Chart for selection of K  values

 5-1      Definition sketch illustrating infiltration
          overflow array

 6-1      Definition sketch storage/treatment system

 8-1      Definition sketch showing upstream flow, mixing
          zone, and receiving zone

 9-1      Example cumulative frequency curves for dissolved
          oxygen

-------
     ACKNOWLEDGEMENTS
This report was prepared by CH2M HILL,  Inc.   Michael J.  Mara
served as project systems analyst and was responsible for development
of the computer code.  Michael G. Cullum and Norman N.  Hatch were
instrumental in the formulation of the dissolved lead response
portion of the receiving water module.   Typing and editorial
services were provided by the Gainesville Office Word Processing
Center.  Ronald L. Wycoff served as project manager and was
responsible for overall design of the simulation program.
                              VI

-------
B     Chapter 1
     INTRODUCTION AND OVERVIEW
The Continuous Storm-water Pollution Simulation System (CSPSS)  .
has been developed for use in the 1978 'Facilities Needs Estimate
for Control of Pollution from Combined Sewer Overflow (CSO),
Category V, and for Urban Storm-water Runoff, Category VI.  The
model has been applied to 14 selected urban area/receiving water
systems and used to estimate the impact of CSO and urban runoff
on receiving water quality on a continuous, long-term basis.   The
three main objectives of these studies are (1) determine if a
particular urban area/ receiving water system is presently experi-
encing a receiving water quality water problem, (2) determine how
much of the problem, if any, is due to CSO and urban stormwater
runoff, and (3) determine the level of pollutant removal required
to achieve selected water quality goals.


SYSTEM STRUCTURE

The Continuous Stormwater Pollution Simulation System is structured
as a series of modules, each designed to perform a certain set of
hydrologic or water quality computations.  These modules are
nested; that is, output of one may become input to another.  In
some cases, more than one option is available to perform a given
function, and the system is structured such that additional
modules may be developed and added in the future with a minimum
of changes to the existing modules.

Basic functions which may be simulated on a continuous basis are
listed as follows.

1.   Local rainfall.

2.   Local runoff.

3.   Pollutant washoff.

4.   Sewer system infiltration.

5.   Storage/treatment.

6.   Dry-weather wastewater flow.

7.   Receiving water streamflow.

8.   Receiving water quality response.

These modules may be executed in logical sequential order to
produce the desired simulation.  A general flow chart of the
simulation system is shown in Figure 1-1.
                               1-1

-------
MAIN















\














r i


RAINFALL
(RAINFL)
I


RUNOFF
(RUNOFF)
1



(30)
WASHOFF^
(RUNQLT)
I




SEWER @
SYSTEM
INFILTRATION
(INFL)
I
DRY- ® ®
WEATHER STREAMFLOW
FLOW (UPSTREAM)
(DRYWEA) (DSRD)
(5(3)
STORAGE/ v-x
TREATMENT
(STOR)
1 1 1


(STREAM/ESTUARY)
(RECWAT)
FIGURE 1-1. General flow chart of CSPSS.

-------
The numbers given in each box on Figure 1-1 are module identifiers
which are associated with each computation routine.  The series
10 through 50 (rainfall through storage/treatment) constitutes
the urban runoff and combined sewer system pollution generation
simulation.  The 60 module and 70 module generate wastewater
treatment flow and upstream receiving water flow, respectively.
Output from the 10 through 50 series and modules 60 and 70 are
input to module 80 which computes receiving water quality resulting
from these inputs.


COMPUTATIONAL SEQUENCE

The basic computational sequence involves the generation of a
number of arrays.  The first array is the rainfall array, developed
in the rainfall module (10), which drives the remainder of the
urban runoff pollution generation sequence.

The runoff module (20) converts the rainfall array to a runoff
array which represents the hydrologic response of the urban area.
Either one or two watersheds may be represented, and, therefore,
either one or two runo'ff arrays may be generated.

The washoff module (30) simulates the processes of pollution
accumulation and subsequent pollutant washoff for four constituents:
suspended solids (SS), five-day biochemical oxygen demand (BOD),
total kjeldahl nitrogen (TKN), and lead (Pb).  Thus, four runoff
quality arrays are defined for each watershed.

The sewer system infiltration module (40) is optional and applies
to sewer systems subject to infiltration-induced overflow.  This
module will generate an infiltration array based on the recent
time history of daily rainfall.  Quality arrays for SS, BOD, TKN,
and Pb are also developed, and these arrays are combined with the
runoff quantity and quality arrays.

The storage/treatment module  (50) simulates the effects of a
storage/treatment system on the runoff hydrograph and on runoff
quality.

The receiving water response module (80) determines the water
quality response of the receiving stream immediately downstream
of the urban area to all waste sources, including urban stormwater
runoff, combined sewer overflow, wastewater treatment plant
effluent, and upstream flow.  Constituents simulated include
suspended solids concentrations, minimum dissolved oxygen concent-
rations, and total and dissolved lead concentrations.


MAIN PROGRAM

The main program referred to  as module CSPSS in Appendix B is a
control module which reads the input data, calls the proper
subroutine at the proper time, and transfers information from one
                               1-3

-------
module to the next.  Only basic control data are used directly by
main.  These data include the number of years in the simulation,
the time step of the simulation, the number of urban watersheds
in the simulation (1 or 2), a starting value for the random
number generator, and a listing of the option modules selected.

Allowable time steps are 4, 6, 8, 12, and 24 hours.  A shorter
time step could be used with a program modification to increase
all array sizes.  However, for the purpose of the Needs Survey, a
minimum time step of 4 hours was used.

Option selection is specified by a series of two-digit integer
numbers which correspond to the module indentifier numbers previously
discussed.  Option identification numbers which are currently
available are defined in Table 1-1.

Currently most major functions have only one computational module
available to simulate the process.  However, the main program
logic is structured such that up to 10 modules can be developed
for each function and added to the simulation system with a
minimum amount of effort required in receding the program logic
control.

For example, the runoff module (20) is based on the Soil Conservation
Service rainfall/runoff equation.  If a future user preferred to
compute runoff based on Horton's infiltration equation, then a
routine could be written to compute the runoff from the infiltration
equation based on the watershed infiltration constants and the
rainfall array.  This module could then be assigned an identifier
in the range of 21 to 29.  The main program would be modified to
accept this new identifier and to call the new runoff computation
module when the new identifier is specified.

The main program logic provides a framework for future expansion
of CSPSS which could enhance the usefulness and flexibility of
the system.


INPUT DATA FOR MAIN

The input data required specifically for the logic control functions
of the main program are:

1.   Location, i.e., city name.

2.   Number of years in simulation.

3.   Time step of simulation  in hours.

4.   Number of watersheds.
                               1-4

-------
Table 1-1
Module Code Definitions

Code

 10            Stochastic rainfall simulator

 20            Runoff by Soil Conservation Service rainfall/
               runoff technique

 30            Watershed pollution accumulation/washoff

 40            Excess sewer infiltration

 50            Storage/treatment

 60            Dry-weather wastewater treatment plant flow

 70            Daily streamflow

 71            Stochastic monthly streamflow simulator

 80            Suspended solids response

 81            Suspended solids and dissolved oxygen response

 82            Suspended solids, dissolved oxygen, and
               dissolved lead response
                               1-5

-------
5.   Starting value for random number generator.

6.   List of options selected.

The starting value for the random number generator should be a
7-digit odd integer.  Coding instructions for MAIN may be found
in Appendix A.
                               1-6

-------
     Chapter 2
     RAINFALL SIMULATOR (MODULE 10)
PURPOSE

The purpose of the rainfall simulator is to develop an array of
rainfall depths for a period of 1 year which is representative of
point rainfall for the urban area under consideration.  The
rainfall array is developed for the time step used in the simulation
(i.e., 4 hours or 24 hours) and preserves certain statistical
characteristics of observed rainfall events.  It is assumed that
all precipitation occurs as rainfall.  Snowmelt is not simulated.

Two seasons are defined for the purpose of rainfall simulation,
which means that rainfall depths are assumed to belong to one of
two different statistical populations, depending on time of
occurrence.  These two populations may represent a wet season and
a dry season or a summer season and a winter season as defined by
the user.  Certain rainfall statistics for each season must be
defined and input by the user.


DEFINITIONS AND ASSUMPTIONS

Rainfall simulation is based on the assumption that adjacent
rainfall events are independent and that the time between events,
the duration of events, and rainfall depths can be represented by
certain standard distribution models.  Independence among rainfall
events is a function of the time between rainstorms.  Therefore,
in order to assure independence, a minimum time between storms or
interevent time must be defined.  The minimum interevent time
varies from 8 to 24 hours depending upon the time step chosen,
and is discussed further in the last section of this chapter
entitled "Input Requirements."

Figure 2-1 is a definition sketch which illustrates the terms
used in the simulation.  The time between storms (TBS) is defined
as the time interval from the end of one rainfall event to the
beginning of the next rainfall event, and the duration of the
storm (DS) is defined as the time interval from the beginning of
rainfall to the end of rainfall within a given event.  TBS values
and DS values will always be even multiples of the time step
(IDT) used in the simulation.

Rainfall depths (RDi.-.RD ) for each time unit within a single
rainfall event are developed based on the assumption that adjacent
rainfall depths within a single event are interrelated.  However,
each rainfall event is considered to be independent of all other
rainfall events.
                               2-1

-------
                       CO
                       Q
                                    CO
                                    CO
                                                  Q
                                                        c
                                                                               u
                                                                               •*-•
                                                                               0)
                       CO
                           I |
                           +-• O
                           —  -
                           O o
                                                  I*
                                                  .E a
                                                   
                                                03


                                                4S
                                                c
                                                '5
                                                                               CM
                                                                               UJ
                                                                               GC
                                                                               D
                                                                               a
                                                                               ul
                        ill
                        ;— & O
                        *~ « /S
                          CO w
 I
f,
O
 I
oo
O
CN

C)

-------
MATHEMATICAL MODELS

Synthetic observations of the time between storms and duration of
storms (TBS and DS) are generated by Monte Carlo sampling of an
exponential distribution.  The transformation function is given
as follows for TBS (1,2).


                    TBS = -ln(RN)TBSA                       (2-1)


where

     TBS  = a random observation of the time between storms
            in hours.

     RN   = a uniformly distributed random number on* the
            interval 0 to 1.0.

     TBSA = the average time between storms in hours for a
            given season as determined from analysis of a
            sample rainfall record.


The transformation function used for the duration of storms (DS)
is mathematically identical to Equation 2-1.  Thus, the distribution
for TBS and DS are fully defined by the mean.

Synthetic observations of rainfall depths for each time period
within a given event are generated by a two-step procedure.
First the rainfall depth for the first time period (RNj) is
generated by Monte Carlo sampling of a log normal distribution.
The transformation function is as follows (2).


               RDj = EXP(NV-ad + RDM)                       (2-2)


where

     RDi = a random observation of rainfall depth in inches
           for the first time period of an event.

     NV  = normally distributed random variable with a mean
           of zero and a standard deviation of 1, N(0,l).

     cr^  = log transformation of the standard deviation of
           rainfall depths for a given season and time
           interval (IDT).

     RDM = log transformation of the mean of the rainfall
           depths for a given season and time interval (IDT).
                               2-3

-------
Values for a , and RDM are determined from analysis of a sample
rainfall record.  First the mean ((j ) and standard deviation (a )
are computed from the sample rainfall record.  These sample
statistics are then transformed to the log normal distribution
parameters a, and RDM by application of the proper transformation
relationship.  These parameter transformation relationships are
discussed in a subsequent section of this chapter.

Once the rainfall depth for the first time interval of an event
(RDX) has been established, then the rainfall depth for all
subsequent time intervals of the same rainfall event (RD2...RD )
are computed by application of a first-order Markov model.  This
procedure is described by the following equations (2,3).
                                                            (2-3)
yi = RDM + Pd(yi_1 - RDM) +
NVa
                                               - Pd2 )
(2-4)
                                                             (2-5)
where

     y. -, = the natural logarithm of the preceding rainfall
            depth RD-L.-L-

     y.   = the natural logrithm of the current rainfall
       1     depth RDi.

     p ,   = log transformation of the correlation coefficient
            between adjacent rainfall depths  (i.e., lag 1
            correlation coefficient).

The terms RDM, NV, and a, are as previously defined.


Equation 2-4  states that the rainfall depth for time period  i,
where  i is greater than 1, is a function of the previous rainfall
depth, the average rainfall depth, and a random process.  The
random process is a function of the standard  deviation of rainfall
depths and the correlation coefficient between adjacent rainfall
depths.  The  transformed correlation coefficient, p,, is a weighting
factor which  determines the relative importance of the dependent,
or deterministic, component of the simulation and the independent,
or random, component  of the simulation.  If p, is near 1.0,  then
all rainfall  depths for a given event will be nearly equal to  the
rainfall depth for the first time period.  If p, is near 0.0,
then adjacent rainfall depths will approach independence and
Equations 2-4 and 2-5 will approach the Monte Carlo sampling
technique given in Equation 2-2.
                               2-4

-------
LOG TRANSFORMATIONS

As previously discussed, the distribution of rainfall depths is
assumed to be log-normal.  The estimated parameters of a log
normal distribution (RDM, ad, and p,) cannot be computed directly
from a sample of rainfall depths, bat are related to the raw data
sample statistics by a set of transformation functions.

For convenience, let us define the rainfall data set as a series
of observations xx, x2, XS...K  and their logarithms as yj,  y2,
ys...y .  Then the following parameters are defined for the
rainfaSl data and the log-normal distribution of rainfall depth.

     H  = mean rainfall depth.
      X

     a  = standard deviation of rainfall depths.
      X

     p  = lag 1 correlation coefficient of rainfall depths.
      X
     p  = RDM = mean of log-normal distribution model of
      v   rainfall depths.

     a  = a-, = standard deviation of log-normal distribution
      -^   model of rainfall depths.

     p  = p, = lag 1 correlation coefficient of logarithms
      y   or rainfall depth.

Given p , a , and p , then p  , a , and p  are determined as
follows*(2,§).     x        y   y       y


                    py = In MX - ay2/2                      (2-6)
                    rr       I ~ -v     \   ' £
                     y _
                                                             (2-7)
                         ln[p  EXP(a 2) - p  + l]
                       _     x      y      x                 / o o i
                    p	^j,	            (2-8,
                     J              y

SIMULATION PROCESS

The rainfall simulation process for one year can be described in
11 steps as follows.

1.   Read input data and initialize.
                               2-5

-------
2.   Set time equal to zero.

3.   Compute parameters of log-normal distribution of rainfall,
     using Equations 2-6,  2-7,  and 2-8.

4.   Generate time between storms.

5.   Set rainfall depths between storms  equal to zero.

6.   Determine month and season.

7.   Generate duration of storm.

8.   Generate depth of rain for each time period of storm.

9.   Repeat steps 4 through 8 until annual array is filled.

10.  Output annual rainfall summary.

11.  Return to main program.


INPUT REQUIREMENTS

Input data required for the rainfall simulation are listed below.
Coding instruction are given in Appendix A.

1.   Months in season 1.

2.   Months in season 2.

3.   Mean time between storms in hours for seasons 1 and 2.

4.   Mean duration of storms in hours for seasons 1 and 2.

5.   (j , a , and p  for rainfall depths observed in the selected
     txme interval (IDT) for season 1 and for season 2.  Rainfall
     depths are measured in inches.

The season definition is left to the judgment of the user.
However, fairly obvious breakpoints can usually be determined
from a bar graph of monthly rainfall.  Figure 2-2 is such  a bar
graph for Des Moines, Iowa.  In this case, season 1 is defined as
months 1, 2, 3, 11, and 12  (winter) and season 2 is defined as
months 4, 5, 6, 7, 8, 9, and 10 (summer).  Occasionally there
will be some question concerning in which season a month near the
breakpoint should be placed.  From a practical standpoint, it
probably does not matter a great deal which season includes the
transitional month.

The choice of time interval (IDT) is also a decision which is
influenced by judgment.  In general, the choice of a time  step
should be a function of the dissolved oxygen response of the
receiving water.  If a given receiving stream responds quickly to
                               2-6

-------

1 1
c
o
cu
IV
GO
^ t

1






CM
C
o
0)







v
j k





0
ro *^







































1 1 1
CM




»-

o
O)



00



^ I
h-
o
CD


in


*

CO





fM



-
o o o o
CO CM r-
("!} TIVJNIVa ATH1NOIAI





CD
§
_o
co"
C
V)
o>
Q
0
c
o
c
• —
0)
•o
c
s
en
T3
C
ro
"ro
c
CD
z
0
^
CM

CM

UJ
CC

^J

LL




-------
wasteloads, then the computation time interval should be short.
However, if the receiving water response is sluggish, then a
longer time interval is acceptable.  For the purpose of the Needs
Survey, a 4-hour computation time interval was used on all free
flowing freshwater stream systems, and a 24-hour computation time
interval was used on all tidal river/estuary receiving water
systems.

Once a time interval is established, then a minimum interevent
time must be chosen before a sample rainfall set is analyzed.
The "minimum interevent time" is defined as the minimum number of
dry hours which must be observed before rainfall events are
considered to be independent.  That is, if a dry period less than
the minimum interevent time is observed, the rainfall amounts
(both preceding and following the dry period) are considered to
be part of the same event.  If a dry period greater than the
minimum interevent time is observed, then the rainfall amounts
preceding and following the dry period are considered to be
independent rainfall events.  The minimum interevent times
used in the Needs Survey are given as follows.


                                        Minimum Interevent
          IDT (hours)                      Time (hours)

              4                                 8
              6                                 8
              8                                 8
             12                                12
             24                                24

Once the seasons, time step, and the minimum interevent time are
established, then data sets can be defined by examination of the
sample  rainfall records.  Statistical analysis of these data sets
will yield the required input data.
                               2-8

-------
     Chapter 3
     WATERSHED RUNOFF (MODULE 20)
The purpose of this portion of the simulation is to transform the
annual rainfall array into an annual runoff array.  One or two
runoff arrays may be generated.  In general, one runoff array
will represent the hydrologic response of the urban area served
by combined sewers, and the other runoff array will represent the
hydrologic response of the urban area served by separate sewers.
However, in the case of an urban area which does not have any
combined sewer service area, the user has the option of generating
two runoff arrays, each of which represents the hydrologic response
of a portion of the urban area, or the user may generate only one
runoff array which represents the entire urban area.

The method used is based on a rainfall runoff relationship developed
by the Soil Conservation Service (SCS).  The SCS rainfall/runoff
relationship was chosen because it is a simple relationship which
accounts for the major factors influencing direct surface runoff
such as land use, soil type, antecedent rainfall, initial losses,
and variation of the rainfall/runoff ratio during a given event.
Other simpler relationships, such as the rational method, do not
account for all of the above factors, and more sophisticated
procedures require continuous soil moisture accounting which is
computationally complex and requires detailed knowledge of watershed
characteristics.

Once the runoff arrays are generated, then a simple hydrologic
routing (time-area) may be applied to each array to account for
watershed storage.  This step will redistribute the flows with
respect to time.  However, the total volumes will remain unchanged.


SCS RAINFALL-RUNOFF PROCEDURE

The SCS rainfall-runoff equation is given as follows (4).


                    RUN = (RAIN - 0.2S)2                    (3_l}
                    KUN    RAIN + 0.8S                      {* L>

where

     RUN  = cumulative runoff in inches.

     RAIN = cumulative rainfall in inches.

        S = potential soil water storage in inches.
                               3-1

-------
In the SCS method, the potential soil water storage, S, is related
to antecedent precipitation and watershed characteristics by the
watershed curve number or CN value.  This empirical relationship
is given as follows (4).
                    S = (1,000/CN) - 10
                                                 (3-2)
Thus, if the CN value is zero, potential soil water storage is
infinite and runoff would always be zero.  If the CN value is
equal to 100, potential soil water storage is zero and runoff
will always be 100%.

In the SCS method, the initial loss or minimum amount of rainfall
necessary to produce runoff is assumed to be 0.2S.  Therefore,
Equation 3-1 applies only if the total event rainfall is greater
then 0.2S.  If total event rainfall is less than this value,
runoff does not occur.

Equation 3-1 relates total runoff to total rainfall for a given
watershed and antecedent condition.  In order to determine runoff
volumes for each time period in a runoff-producing rainfall
event, it is necessary to construct a cumulative rainfall curve
for the event, as illustrated on Figure 3-1.  Equation 3-1 is
applied at the end of each time period, which results in the
development of a cumulative runoff curve also illustrated on
Figure 3-1.  The difference between adjacent cumulative runoff
values defines the runoff occurring in each time period.

This computational process is illustrated in Table 3-1 which is
based on a total rainfall amount of 1.8 inches and a CN value of
90 as per Figure 3-1.
Table 3-1
Rainfall Runoff Computations
 Time
Period

  1

  2

  3

  4

  5
Rainfall
(inches)

  0.3

  0.5

  0.5

  0.3

  0.2
Cumulative
 Rainfall
 (inches)

   0.30

   0.80

   1.30

   1.50

   1.80
Cumulative
  Runoff
 (inches)

   0.01

   0.20

   0.53

   0.76

   0.93
 Runoff
(inches)

  0.01

  0.19

  0.33

  0.23

  0.17
                              3-2

-------
q
CN
 ddONna

   q

	T
LO
o'
 I
                                                                        IT)

                       ".
                                                   I  I
                                                   d tr
                  S
                    «=-/
                    3/^

      o
      O5
      CJ
                                                    /
                        CO
                        o
                        g
                        E

                        a.
                                                             §
                                         CN
                                                                                          V)
                                                                                          cu



                                                                                          CJ
                                                                                          o
                                                                                          c
                                                           01
                                                           o
                                                          _cu

                                                           Q.

                                                           E
                                                           as
                                                           X
                                                          LU
                                                          ro
                                                          LU
                                                          oc
                                                          D
                                                          g
                                                          LL
                                                                    q
                                                                    d
p
Csi
                                    1
                                   o
                     1
                     in
                     O

-------
Runoff computations in module 20 are based on the above equations
and procedures.

CN values are user supplied and may be considered runoff calibration
parameters.  The suggested procedure is to estimate the CN value
for normal antecedent moisture conditions (AMC II) and to assign
CN values for dry conditions (AMC I) and wet conditions (AMC III)
based on the CN value selected for AMC II.  The relationship
between CN values for the three antecedent moisture conditions is
given in Table 3-2.

Given the average annual rainfall and an estimated or observed
annual runoff, the CN value for AMC II can be estimated from
Figure 3-2.  The curves illustrated in Figure 3-2 were developed
by numerous applications of the runoff module while varying
rainfall and CN values.  CN values should be adjusted until the
simulated annual runoff is representative of the prototype.

The selection of a CN value to be applied to a given rainfall
event (i.e., CN I, CN II, or CN III) is a function of the antecedent
5-day precipitation.  The objective of the selection procedure is
to choose CN II approximately two-thirds of the time.  CN I (dry)
and CN III  (wet) should be selected about one-sixth of the time
each.  Criteria for this selection are internal to the simulation
process, which should work well where annual rainfall is in the
range of 25 to 40 inches.  Outside of this range CN I or CN III
may be selected more often than is reasonable.  If the user
believes this to be the case, the option may be bypassed by
assigning a constant value (CN II) to all CN values.  In this
manner, CN  II will be used in all runoff computations regardless
of antecedent conditions.
TIME-AREA ROUTING

In a case where the hydrologic response time (i.e., time of
concentration) is large compared to the simulation time step
(IDT), an approximate hydrologic routing by the time-area method
is included.

The parameter used to determine if routing is necessary is the
lag factor  (LF) defined as follows.


                         LF = TC/IDT                         (3-3)

where

     LF = lag factor.

     TC = time of concentration in hours.

    IDT = simulation time step in hours.
                              3-4

-------
Table 3-2
CN Values (from Reference 4)
AMC II
(Normal)
100
99
98
97
96
95
94
93
92
91
90
89
88
87
86
85
84
83
82
81
80
79
78
77
76
75

AMC I
(Dry)
100
97
94
91
89
87
85
83
81
80
78
76
75
73
72
70
68
67
66
64
63
62
60
59
58
57

AMC III
(Wet)
100
100
99
99
99
98
98
98
97
97
96
96
95
95
94
94
93
93
92
92
91
91
90
89
89
88
3-5

-------
10
  20           30
ANNUAL RAINFALL (in)
 FIGURE 3-2.  Chart for selection of CN II values.

-------
If LF is less then 1.5, all runoff occurring in a given- time
interval is assumed to appear as runoff at the watershed outlet
during that time period, and hydrologic routing is not performed.
However, if LF is greater than or equal to 1.5, then hydrologic
routing by the time-area method is performed.

The time- area method as defined here is actually an averaging
method whereby the discharge occurring at the outlet is a weighted
average of the runoff values generated by the preceding n time
units where n equals the lag factor rounded to the nearest whole
unit.

Consider, for example, a case were TC = 8 hours and IDT = 4 hours.
In this case LF = 2 and routing will occur.  The runoff for any
time period, t in this case, is computed as follows.
                    RUN(t) = RUN(t) + RUN(t-l)              (3_4)


Applying this routing procedure to the runoff values developed in
Table 3-1 yields the routed values given in Table 3-3 .
Table 3-3
Example Time-Area Routing for LF = 2
Time
Interval
1
2
3
4
5
6
7
Runoff
( inches )
0.01
0.19
0.33
0.23
0.17
0.00
0.00
Routed Runoff
( inches )
0.005
0.100
0.260
0.280
0.200
0.085
0.000
The routing illustrated above increased the total period of
runoff from five time periods to six, and reduced the maximum
runoff rates from 0.33 inches per IDT to 0.28 inches per IDT.
                               3-7

-------
COMPUTATIONAL PROCESS

The computational process for the runoff module for each watershed
can be described in 16 steps as follows.

1.   Search rainfall array for rainfall depth greater than 0.0.

2.   Set runoff array = 0.0 for rainless time periods.

3.   Determine duration of rainfall event.

4.   Determine total storm rainfall.

5.   Determine 5-day antecedent rainfall.

6.   Determine antecedent moisture condition and select CN value.

7.   Determine if rainfall event produces runoff.

8.   If rainfall event did not produce runoff, set runoff array =
     0.0 for storm period and go to step 1.

9.   Determine runoff volume for each time period in storm.

10.  Repeat steps 1 through 9 until runoff for entire year has
     been computed.

11.  Compute lag factor and determine if routing is required.

12.  If routing is not required, go to step 14.

13.  Route annual runoff array by time-area method.

14.  Convert all flows from inches per IDT to cfs.

15.  Output annual runoff summary.

16.  Return to main program.


INPUT DATA

Input data required for the runoff module  are:

1.   Months in dormant (winter) season.

2.   Months in growing (summer) season.

3.   Watershed data as follows.

     a.   CN values (CN I, CN II, and CN  III).
                               3-8

-------
     b.    Drainage area in acres.

     c.    Time of concentration in hours.

     d.    Washoff coefficient in inches'1.

Coding "instructions may be found in Appendix A.

Season definitions are required because the AMC  selection criteria
are slightly different for winter and summer. This is an attempt
to account for slightly greater initial losses during periods of
active plant growth.  This definition of seasons need not correspond
to the seasons defined for the purpose of rainfall simulation.

The drainage area should correspond to the total urban area
tributary to the subject receiving water served  by the type of
drainage system (i.e., combined sewer or separate sewer) being
simulated.

If the total drainage area is adjusted by an areawide runoff
coefficient and if all CN values are read in at  a value of 100,
then the runoff array generated would be identical to a runoff
array generated by application of the runoff coefficient directly
to the rainfall array (i.e.,  rational method).  That is, runoff
would always be a constant portion of rainfall.   This technique
may be appropriate when applied to highly impervious watersheds
where the areawide runoff coefficient is greater than approximately
80%.  However, the user should be aware that some summaries
produced by the program are related to the drainage area read as
input and, therefore, must be adjusted by the ratio of the drainage
area read in to the actual drainage area to be correct.  The
summaries in question are those that show runoff or overflows in
inches per year.  All other data will be accurate as printed.

The washoff coefficient (item d above) is considered a watershed
parameter and is, therefore,  part of the watershed input data.
However, it is not used in the runoff computations but is used in
pollutant washoff computations.  Selection of an appropriate
washoff coefficient is discussed in Chapter 4, "Pollution Accumulation
and Washoff."
                               3-9

-------
     Chapter 4
     POLLUTION ACCUMULATION AND WASHOFF (MODULE 30)
The objective of the pollution accumulation and washoff module is
to simulate the process of pollutant accumulation or buildup on
the watershed during dry periods and subsequent pollutant washoff
during periods of runoff.  Pollutants considered are those which
are evaluated in the receiving water impact analysis and include
suspended solids (SS), five-day biochemical oxygen demand (BOD),
total kjeldahl nitrogen (TKN), and lead (Pb).  The accumulation
and removal of each of the above pollutants are computed for each
time step in the year, and annual quality arrays for each are
developed.
ACCUMULATION

Watershed pollutant accumulation at the end of any time period,
t, is related to the accumulation at the end of the previous time
period, t-1, by the following recursion formula (5).
where
 /t\

-_-i \
                     (t)
                                     - R)
              pollutant accumulation at time t in Ib/acre.

              pollutant accumulation at time t-1 in Ib/acre
          R = pollutant removal or decay rate in fraction removed
              per simulation time step.

          Y = pollutant accumulation rate in Ib/acre per simulation
              time step.


If R is a nonzero value, then the pollution accumulation function
given above is nonlinear.  If R equals zero, then the accumulation
function becomes linear and a constant unbounded accumulation
rate of Y Ib/acre/At is assumed.  Figure 4-1 illustrates the
pollution accumulation and washoff functions for the case where
R = 0 and for the case where R / 0.  Selection of the R parameter
is discussed in detail in a subsequent section of this chapter.
WASHOFF

Watershed pollutant washoff at the end of any time period, t,
related to the accumulation at the end of the previous time
                                                       is
                               4-1

-------
o
 II

cc

 o
 3

 E

 u
 o
 n
 ^
 ra
 o>
 c
                                                                                                                                                   


                                                                                                                                                   O

                                                                                                                                                   '4-*

                                                                                                                                                   O


                                                                                                                                                   3
1

C

O
3

E
3
O
O
CO

c
o
                                                                                                                                                   o
                                                                                                                                                   Q.
                                                                                                                                                   LJJ

                                                                                                                                                   CC

                                                                                                                                                   D



                                                                                                                                                   LL

-------
period, t-1, and to runoff during time period t, by the following
equation (5).


               V) = L
-------
                                                             in
                                                             ro
                                    u.
                                    HI

                                    O
                                    o
                                                                 O
                                                             CN
                                                                             CO
                                                                             o

                                                                             c
                                                                             o
                                                                             o>
                                                                             en

                                                                             u.

                                                                             O
                                                                             ro


                                                                            O


                                                                            CN
                                                                            LU
                                                                            cc

O
o
o
LO
in
CN
                 SS3NSnOIAa3dlAII lN3Dd3d

-------
For combined sewer systems where the major portion of the pollutants
accumulate in the collection system, a minimum value of 4.6
should be used.  A default value of 4.6 is built into the program
and will be used in the washoff computations if the user does not
supply a site specific value.


SELECTION OF POLLUTANT DECAY RATES

Selection of appropriate pollutant decay rates is largely a
matter of judgment.  Some investigators believe that all pollution
accumulation is linear and, therefore, decay rates are zero;
while others believe that pollution accumulation is nonlinear and
approaches some maximum limiting value during long dry periods.

If the pollutant decay rate (Rd) is expressed as fraction removed
per day, then the reciprocal of Rd  (1.0/Rd) is equal to the ratio
of the maximum possible watershed load to the daily accumulation
rate (Y).

The decay rates used in the Needs Survey simulations are specified
as follows.

          Pollutant                     Decay Rate (Rd)

             BOD                           0.0667

             TKN                           0.0667

             SS                            0.0

             Pb                            0.0

The concept of a decay or removal rate R may also be used to
simulate the effects of best management practices (BMP).  R may
be expressed in terms of a removal  component (Rr) and a decay
component (Rd) as follows.


                         R = Rr + Rd                        (4-3)

where

      R = total pollutant removal rate.

     Rr = pollutant removal rate due to physical particle
          removal, i.e., streetsweeping.

     Rd = pollutant removal rate due to decay or other
          natural processes.


Previous discussion has focused on  the component Rd which is
equal to the total R if BMP's are not practiced.  However, if a


                               4-5

-------
management practice can be associated with an Rr value,  then the
effect of this management practice on washoff quality can be
simulated by increasing the total R value used in the simulation.

For example, consider a homogeneous sto'rm sewered urban watershed
served by curbs and gutters.  It may be desirable to evaluate a
proposed streetsweeping program whereby one-quarter of the watershed
streets are swept every day by vacuum-type sweepers.  Assuming
that the vacuum sweeper pickup efficiency is 80% and that one-half
of all watershed pollutants are located in the street gutter,
then Rr may be evaluated as Rr = 0.80 x 1/4 x 1/2 = 0.10.  That
is, Rr is equal to the sweeper pickup efficiency times the fraction
of watershed swept each day times the pollutant availability
factor.  In this case, 10% of all watershed pollutants would be
removed by sweeping each day.  If the pollutant of interest were
BOD and the background decay rate Rd were equal to 0.067, then
the total pollutant removal rate R would be 0.167.


SELECTION OF POLLUTANT ACCUMULATION RATE

The pollution accumulation rate is a calibration parameter which,
when adjusted, will affect the total annual pollution yield
generated by a watershed.  The objective, then, is to choose an
accumulation rate which will simulate prototype pollutant production
as closely as possible.

If total annual pollutant yield of the prototype is unknown, then
it must be estimated by emperical methods.  A suggested method is
reported in Table 4-1 (6).  The method presented in Table 4-1
will give estimates of total pollutant yield in terms of Ib/acre/year
for BOD, SS, TKN, and Pb.  If the watershed decay rate R is zero
(SS and Pb), then a first approximation of Y may be estimated by
Equation 4-4.


                         Y = M/360                           (4-4)


where M is the annual yield as determined by application of the
procedures outlined in Table 4-1.

If the watershed decay rate is 0.067 (BOD and TKN), then Y may be
estimated by Equation 4-5.


                         Y = 2.25 M/360                      (4-5)


where all terms are as previously defined.  Y values should be
adjusted until the desired annual pollutant yields are obtained.

The procedure outlined in Table 4-1 was originally developed by
Heaney, Huber, and Nix (6) for BOD, SS, VS, PO4,  and total N.


                               4-6

-------
Table 4-1
Estimating Annual Pollutant Yield
(Adapted from Heaney, Huber, and Nix, 1976)

The following equations may be used to predict annual average
loading rates as a function of land use, precipitation, and
population density".

Separate Areas

                                            lb
               M0 = 0(1,j) •  P •  f2(PD.)
                s   -*-'-'   -   -^v-~d/  acre-yr

Combined Areas

                                            lb
               MC = P(i,D) •  P •  f2(PDd)
where
           M = pounds of pollutant j generated per acre of land
               use i per year

           P = annual precipitation, inches per year

             = developed population density, persons per acre

         a , p = factors given in table below

     f2(PDd) = population density function
Land Uses
          i = 1    Residential
          i = 2    Commercial
          i=3    Industrial
          i = 4    Other developed, e.g., parks, cemeteries,
                   schools (assume PD, = 0)
Population Functions
          i = 1    f2(PD,) = 0.142 + 0.218 •  PD °'54
          i = 2,3  f2(PD;J) =1.0               a
          i = 4    f2(PDd) = 0.142
Pollutants
          j = 1    BOD5
          j = 2    Suspended solids (SS)
          j = 3    Total Kjeldahl nitorgen (TKN)
          j = 4    Lead (Pb)
                              4-7

-------
Table 4-1—Continued

Factors a and p for Equations

Separate factors, a, and combined factors, p, have units
Ib/acre-in.  To convert to kg/ha-cm, multiply by 0.442.
Separate
Areas,  a
Combined
Areas, p
 Land Use,  i

1. Residential
2. Commercial
3. Industrial
4. Other

1. Residential
2. Commercial
3. Industrial
4. Other
                                       Pollutant, j
                            1. BODS   2. SS
 0.799
 3.20
 1.21
 0.113

 3.29
13.2
 5.00
 0.467
 16.3
 22.2
 29.1
  2.70

 67.2
 91.8
120.0
 11.1
3. TKN

0.089
0.200
0.188
0.041

0.505
1.140
1.065
0.234
4. Pb

0.0216
0.0866
0.0328
0.0031

0.0216
0.0866
0.0328
0.0031
                               4-8

-------
The a and p values presented here for TKN and Pb were developed
from statistical analysis of available data summaries specifically
for the Needs Survey application.


COMPUTATIONAL SEQUENCE

The computational sequence for the watershed pollution accumulation
and washoff module is described in eight steps as follows.

1.   Read pollution accumulation rates removal rates and washoff
     coefficient for each watershed.

2.   Initialize watershed pollutant loads.

3.   Calculate watershed pollutant load at end of time period
     using Equation 4-1.

4.   If runoff for time period is greater than zero, calculate
     watershed pollutant washoff using Equation 4-2.

5.   Subtract washoff (if any) obtained in step 4 from accumulation
     obtained in step 3 to obtain actual watershed load at end of
     time period.

6.   Repeat steps 3 through 5 for entire year.

7.   Convert washoff quality arrays from units of pounds per acre
     per time period to mg/1.

8.   Compute loading summaries and return to main program.
                               4-9

-------
     Chapter 5
     SEWER SYSTEM INFILTRATION (MODULE 40)
The purpose of the infiltration component is to construct a daily
array of excess sewer infiltration values for wastewater collection
systems.  This array is added to the runoff array before processing
by the storage/treatment model or receiving water model.  Thus,
it is primarly intended for use in combined sewer systems.

The infiltration module is optional and should be used when there
is evidence that infiltration alone will cause treatment plant
bypass or overflow and when the annual quantity of such overflows
are known or can be estimated.

Sewer system infiltration rates are dependent on many factors
such as soil type, ground-water table elevations, type of collection
system, and age and condition of collection system as well as
local rainfall.  There are no general mathematical models available
which account for all of the above parameters.  Therefore,  simulation
of sewer system infiltration is subject to much uncertainty, and
the results must be reviewed by the user for reasonableness.


INFILTRATION QUANTITY

Total infiltration quantity is computed from the daily rainfall
array by an emperical equation developed from analysis of observed
rainfall and infiltration data for the City of Baltimore, Maryland
(7).

     INF(J) = 2.4 + 11.3*DRAIN(J) + 11.6*DRAIN(J-l)
              + 5.5*DRAIN(J-2) + 6.4*DRAIN(J-3)
              + 4.8*DRAIN(J-4) + 3.6*DRAIN(J-5)
              + 1.0*DRAIN(J-6) + 1.5*DRAIN(J-7)
              + 1.4*DRAIN(J-8) + 1.8*DRAIN(J-9)             (5-1)

where

        INF(J) = sewer system infiltration rate for day J
                in gallons per minute per inch of pipe
                diameter per mile of sewer.

     DRAIN(J) to DRAIN(J-9) = daily rainfall in inches from
                the current day (J) to the 9th day previous
                (J-9).


Total infiltration production rate given above (gpm/inch/mile) is
converted to total infiltration rate in cubic feet per second
(cfs) for the prototype by application of the following equation.
                               5-1

-------
        INF(J) = INF(J)*DIA*LENGTH*INFADJ*0.002228          (5-2)

where

        DIA = average sewer diameter in inches.

     LENGTH = total sewer system length in miles.

     INFADJ =•• a calibration factor which can be used to adjust
              the annual infiltration volume generated by the
              model to prototype conditions.


Application of Equations 5-1 and 5-2 to a given daily rainfall
array and sewer system will produce a daily total infiltration
array.  However, a substantial portion of this infiltration may
be intercepted and treated by existing dry-weather treatment
facilties, which generally have treatment capacities three to
four times greater than expected average sanitary wastewater flow
rates.  Thus, only those flows greater than the excess treatment
plant capacity will result in untreated overflow.  The excess
treatment plant capacity is given by Equation 5-3.


               EXCAP = (DWFR - 1.0JDWF                 (5-3)

where

     EXCAP = excess treatment plant capacity in cfs.

      DWFR = ratio of the treatment plant capacity to the
             average sanitary wastewater flow rate (dry-weather
             flow).

       DWF = expected average dry-weather flow rate generated
             by the combined sewer area in  cfs.


The value EXCAP is subtracted from each value in  the total
infiltration array to produce the excess or infiltration overflow
array.  This concept is illustrated in Figure 5-1.


INFILTRATION QUALITY

Infiltration is assumed to be pure water which mixes with the
sanitary wastewater in the collection system.  Based on this
assumption, infiltration quality arrays are developed  for BOD,
SS, TKN, and Pb by a simple dilution calculation.  Initial
concentrations  in the sanitary wastewaters  are assumed as follows.
                               5-2

-------
II
 \
               Q

               O


               CC
               LL

               g
               Q
                          o
                                                            03



                                                            O
                                                            CD

                                                            O
                                                            c
                                                            o
                                                            O5
                                                            C
                                                 LLJ
                                                            c
                                                            O
                                                            0>
                                                           Q
                                                           in
                                                           UJ
                                                           cc
                                                           D

-------
               Pollutant                Strength

                  BOD                    200 mg/1

                  SS                     200 mg/1

                  TKN                     40 mg/1

                  Pb                    0.04 mg/1


The dilution factor for each day with excess infiltration is
computed by Equation 5-4.


               DILFAC = [EXINF(J) + DWF*DWFR]/DWF           (5-4)


where

       DILFAC = dilution factor.

     EXINF(J) = excess infiltration for time period J in cfs.


All other terms are as previously defined.  The excess infiltration
quality arrays are then computed as follows.


                    IOBOD(J) = 200/DILFAC                   (5-5)

                     IOSS(J) = 200/DILFAC                   (5-6)

                    IOTKN(J) = 40/DILFAC                    (5-7)

                     IOPb(J) = 0.04/DILFAC                  (5-8)


Where IOBOD, IOSS, IOTKN, and lOPb sub J are the quality values
for each time period J with infiltration overflow.


COMPUTATIONAL SEQUENCE

The computational sequence for the combined sewer infiltration
module may be described in 7 steps as follows.

1.   Read input data.

2.   Develop daily rainfall array from IDT rainfall array.


3.   Compute total infiltration  array by application of equations
     5-1 and 5-2.
                               5-4

-------
4.   Compute infiltration overflow array by application of
     Equation 5-3.

5.   Compute infiltration overflow quality arrays for BOD, SS,
     TKN, and Pb.

6.   Add excess infiltration quantity and quality arrays to
     runoff quantity and quality arrays developed for the wastershed
     by modules 20 and 30.

7.   Return to main program.


INPUT DATA

Input data required for the combined sewer infiltration computation
are listed below.  Coding instructions are given in Appendix A.

1.   Watershed number (1 or 2).

2.   Computation code:  0 = infiltration is not computed,
     1 = infiltration computed.

3.   Average diameter of sewers in inches.

4.   Total length of sewer system in miles.

5.   Average domestic wastewater flow generated by sewered area
     in cfs.

6.   Ratio of sewer flow to dry-weather flow at which overflow
     occurs.

7.   Infiltration adjustment factor.  This factor is equal to 1.0
     if adjustment to computed infiltration array is unnecessary.

Pisano and Queiroz (8) have developed the following equations
which relate total length of sewer systems to area served.


                         L = 168.95A'928                    (5-9)

                         L = 239.41A*928                    (5-10)

where

     L = total sewer length in feet.

     A = total area served in acres.


Equation 5-9 applies to low population density systems  (10-20
persons/acre), whereas Equation 5-10 applies to high population
density systems  (30-60 persons/acre).  The correlation  coefficient
                               5-5

-------
of the above equation is 0.906.  Similar relationships for average
sewer diameter are not available.

Limited experience to date indicates that the infiltration overflow
array generated by application of the procedure described herein
is relatively large and that an infiltration adjustment factor
(INFADJ) on the interval 0.2 to 0.8 is generally required to
produce reasonable values of total annual overflow volume and
total annual duration of overflow.
                               5-6

-------
••  Chapter 6
     STORAGE/TREATMENT (MODULE 50)
The purpose of the storage/treatment module is to modify the
runoff quantity and quality arrays in such a manner as to simulate
the operation of stormwater runoff storage and treatment facilities.

Computation of storage, treatment, and overflow is accomplished
on a simulation time step basis throughout the year.  For every
time period in which runoff occurs, the treatment facilities are
utilized to treat as much runoff as possible.  When the runoff
rate exceeds the treatment rate, storage is utilized to contain
the runoff.  When runoff is less than the treatment rate, the
excess treatment rate is utilized to diminish the storage level.
If the storage capacity is exceeded, all excess runoff is considered
overflow and does not pass through the storage facility.  This
overflow is lost from the system and cannot be treated later.
The treated runoff array is then added to the overflow array and
the combined quality is computed to produce the new modified
runoff arrays.  This concept is illustrated in Figure 6-1.

The quality of the runoff waters in storage is considered to be
the quality of the composite mixture during any time step.  Thus,
storage will have an attenuation effect on both the quantity and
quality of runoff.  However, actual removal of pollutants from
the runoff waters in storage is not simulated.  Thus, the treatment
which occurs in storage is assumed to be negligible.

The physical, chemical, and biological aspects of wastewater
treatment are not simulated directly in this module.  Instead,
effluent quality for each constituent is computed by application
of a user-supplied treatment efficiency to the stored runoff
waters.
COMPUTATIONAL PROCESS

The storage/treatment simulation computations can be described in
7 steps as follows.

1.   Read storage/treatment input data.

2.   Generate storage inflow, storage outflow, and overflow
     arrays  (see Figure 6-1).

3.   Generate storage volume and storage quality arrays.

4.   Generate treated outflow quality arrays.
                               6-1

-------
                           ORIGINAL RUNOFF ARRAY
                                   (RUN (J))
                          INFLOW (J)
                     STORAGE
                          OUTFLOW (J)
                    TREATMENT
       OVERFLOW (J)
                           TREATED
                           OUTFLOW (J)
                 NEW RUNOFF ARRAY (RUN (J))
FIGURE 6-1. Definition sketch storage/treatment system.

-------
5.   Sum overflow and treated outflow arrays (quantity and quality)
     to form new runoff arrays.

6.   Summarizes annual discharges,  overflow events,  overflow
     volumes, and output results.

7.   Return to main program.


INPUT DATA

The required input data for each watershed are listed as follows.
Coding instructions may be found in Appendix A.

1.   Design treatment rate for stormwater treatment facility in
     cfs.

2.   Maximum storage volume of storage facility in ft3.

3.   Initial volume in storage at the beginning of the simulation
     in ft3.

4.   Quality (BOD, SS, TKN, and Pb) of initial stormwater in
     storage in mg/1.

5.   Treatment plant pollutant removal efficiencies at the design
     treatment rate for each constituent (BOD, SS, TKN,  and Pb)
     expressed as fraction of each pollutant removed by the
     treatment process.

Items 3 and 4 above apply at the beginning of time step 1, year
1.  For subsequent years, the residual values in storage at the
end of the previous year's simulation, if any, will be used as
initial values for the following year.  For the purpose of the
Needs Survey, Items 3 and 4 were read in as zero values.
                               6-3

-------
     Chapter 7
     DRY-WEATHER WASTEWATER TREATMENT PLANT FLOW (MODULE 60)
The purpose of the dry-weather flow module is to create an array
of flow values which represents base wastewater flow generated by
the entire urban area.  Both domestic and industrial waste sources
should be considered.  Average values of wastewater effluent
quality for SS, BOD, TKN, and Pb are applied to the time variant
flow array in order to generate representative dry-weather point
source wasteloads to the receiving water.


FLOW RATIOS

Dry-weather point source flow magnitude is varied by hour of the
day and by day of the week by application of the appropriate flow
ratios.  These flow ratios are multiplied by the mean dry-weather
wastewater effluent flow rate to obtain a representative time
variant flow rate.  The ratios used are the standard national
average default values used in the "STORM" model (9), as presented
in Tables 7-1 and 7-2.
INPUT DATA

Input data required for the dry-weather flow module are described
as follows.  Coding instructions may be found in Appendix A.

1.   Mean dry-weather wastewater flow rate in cfs.  This value
     should include all municipal and industrial WWTP's serving
     the urban area which discharge to the receiving water.

2.   Flow-weighted average effluent quality of point sources
     included in Item 1, in mg/1.  The parameters of interest
     are:

     a.   BOD

     b.   SS

     c.   TKN

     d.   Pb

     e.   DO deficit
                               7-1

-------
Table 7-1
Hourly Flow
Hour of
Day
1
2
3
4
5
6
7
8
9
10
11
12

Ratios (After

Ratio
0.6
0.5
0.5
0.5
0.5
0.8
0.8
1.4
1.5
1.5
1.4
1.4

Reference 9)
Hour of
Day
13
14
15
16
17
18
19
20
21
22
23
24



Ratio
1.3
1.3
1.3
1.2
1.2
1.1
1.1
1.0
1.0
0.8
0.7
0.6
Table 7-2
Daily Flow Ratio (After
Reference 9)
Day of
Week
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
Ratio
1.08
1.04
0.92
1.03
1.00
0.96
0.95
7-2

-------
     Chapter 8
     UPSTREAM FLOW (MODULES 70 AND 71)
The purpose of the streamflow modules is to provide an array of
flow values which is representative of the upstream flow entering
the urban area.  Only quantitative aspects of the upstream flow
are considered in this portion of the simulation system.  Upstream
flow quality is considered in the receiving water response module
which is discussed in Chapter 9.

There are two options available for upstream flow.  The first
(module 70) reads in and stores an array of observed daily flow
values for a period of up to 5 years.  The second (module 71) is
a stochastic streamflow simulator which will generate synthetic
values of monthly flows.  Module 71 is similar in structure to
the rainfall generator presented in Chapter 2.

For the purpose of the Needs Survey, module 70 was used for all
site studies since the time distribution of streamflow is better
defined on a daily basis than on a monthly basis.

The term upstream flow as used here refers to all waters entering
the upstream boundary of the urban area which are available to
blend with the local urban runoff, combined sewer overflow, and
wastewater treatment plant effluents.  These flows may be generated
by one or more major streams as illustrated on Figure 8-1.
Refering to Figure 8-1, flows Q. and QB are the flows of interest,
and their summation defines the upstream flow array which is to
be read into or simulated by the model.

Several additional important concepts are illustrated in Figure 8-1.
First, the receiving stream within the limits of the urban area
is considered a mixing zone.  This zone accepts the upstream
flows and mixes these flows with the local urban-area-induced
flows, including urban runoff, combined sewer overflow, and
wastewater treatment plant effluent.  These local flows are added
to the upstream flow in order to produce the total outflow from
the urban area, represented as Q_ on Figure 8-1.  The total outflow
(quantity and quality) from the urban area becomes the inflow to
the receiving water response portion of the simulation.


DAILY STREAMFLQW (MODULE 70)

It is suggested that a minimum of 10 years of daily streamflow
record be obtained for each site.  This record should then be
examined to determine which 5-year sequence in the 10-year record
provides the best representation of the long-term streamflow.
                              8-1

-------
            RIVER B
RIVERA
FIGURE 8-1. Definition sketch showing upstream flow, mixing zone, and receiving zone.

-------
There are six possible 5-year sequences available in the 10 years
of record, i.e., years 1 through 5, years 2 through 6, years 3
through 7, etc.  The mean annual flow for each of these 5-year
sequences should be compared to the long-term mean annual flow,
and that sequence which yields a mean most nearly equal to the
long-term mean should be selected.

The simulation assumes that a year is composed of 12 months, each
30 days long.  This assumption was made to simplify internal flow
control and time-step accounting procedures.  However, the observed
streamflow record must be modified in order to adjust for the
above assumption.  It is suggested that for a normal  (365-day)
year every 73rd value should be deleted from the data set and
that for a leap year (366 days) every 60th value should be deleted.
This procedure will yield a 360-day year, or 1,800 streamflow
observations for the 5-year sequence.


INPUT DATA (MODULE 70)

The input data required for module 70 are discussed above.  Data
may be entered for 1, 2, 3, 4, or 5 years, but not for portions
of a year.  Thus, allowable data sets will contain 360, 720,
1,080, 1,440, or 1,800 daily streamflow values.  Coding instructions
are given in Appendix A.


STOCHASTIC MONTHLY STREAMFLOW SIMULATOR (MODULE 71)

Synthetic observations of monthly streamflow may be generated by
application of a first-order Markov model similar to  the Markov
model described in Chapter 2, "Rainfall Simulator."   Mathematically,
these models are nearly identical.  However, the parameters are
defined differently.

Monthly streamflows are assumed to be defined by a log normal
distribution, and the first monthly value for the first year
(Q/i/i\) is generated by Monte Carlo sampling of a log normal
distribution (2).
where
                    Q(1/1) = EXPfNV-d! + QMi)               (8-1)
       i/i\ = a random observation of monthly streamflow
           '   for the first month of the first year.

         NV = a normally distributed random variable with
              a mean of zero and a standard deviation of
                               8-3

-------
         (T! = log transformation of the standard deviation
              of monthly flows for month 1 (January).

        QMX = log transformation of the mean of monthly flows
              for month I (January).


Once the monthly streamflow for the first month of the simulation
has been established, then monthly flows for all subsequent
months are computed by application of the first-order Markov
model.  This procedure is described by the following equations
(2,3).
                   + NV a.. V(l - p2)                        (8-3)
                                = EXP(YU,j)>
where
     Y, •  • i \ = log of monthly flow for year i and month j-1.
       ( i / J~J- /
       Y, •  • v = log of monthly flow for year i and month j .
        v i / J i
          QM . = log transformation of the mean of flows for
            •*   month j .

           p . = log transformation of correlation coefficient
            -1   between flow in month j and month j-1.

           a . = log transformation of standard deviation of
            ^   flows for month j .

         a • _-, = log transformation of standard deviation of
          -^~    flows for month j-1.

        QM-  , = log transformation of mean of flows for
          -1"1   month j-1.

 In order to  apply the above model, a sample of monthly flow  data
 must be obtained and the mean and standard deviation of flows  for
 each month must be computed.  In  addition, the correlation
 coefficient between adjacent monthly flows (lag  1 correlation
                               8-4

-------
coefficient) must be determined.  Parameters for the model are
then obtained by application of the transformation functions
presented in Chapter 2.  Thus, at total of 36 different parameters
is required to define the monthly streamflow simulator.


INPUT DATA (MODULE 71)

The input data required for the stochastic monthly streamflow
generator are the statistics of the raw data set as described
above.  The log transformations are performed internally.  Specifically
the data required for each month (1...12) are:

1.   Mean of monthly flows.

2.   Standard deviation of monthly flows.

3.   Correlation coefficient between flow in current month and
     flow in previous month.

Coding instructions are found in Appendix A.
                                 -  5

-------
     Chapter 9
     RECEIVING WATER RESPONSE (MODULES 80,  81,  AND 82)
PURPOSE AND OVERVIEW

The purpose of the receiving water response portion of the simulation
is to compute the water quality of the receiving water on a
continuous basis due to the combined effects of all waste sources.
Water quality parameters considered are:  (1) suspended solids
concentrations, (2) minimum dissolved oxygen concentrations,  (3)
equilibrium dissolved lead concentrations, and (4) total lead
concentrations.  In addition, total annual discharge of all
pollutants to the receiving water is determined.

The receiving water response module will generate the data required
to construct a cumulative frequency distribution for each water
quality parameter considered.  Cumulative frequency curves may be
developed for existing prototype conditions or for proposed
conditions.  The difference between existing condition and proposed
condition curves can then be compared to quantify the receiving
water quality impact of the proposed improvements.

An example of these curves for minimum dissolved oxygen is shown
in Figure 9-1.  In this case, simulation of the existing conditions
shows that the DO standard of 5.0 mg/1 will not be met 30% of the
time.  Simulation of a proposed condition (say an extensive
storage/treatment system for CSO) shows that the DO standard of
5.0 mg/1 will be exceeded only 2% of the time.  Thus, this decrease
in frequency of exceedance of the water quality standard is one
measure of the water quality enhancement which would be obtained
if the proposed improvements were constructed.  Another measure
of the water quality impact of the proposed improvements is given
by the area between the existing conditions curve and the proposed
conditions curve as shown on Figure 9-1.  This area has the units
of DO in mg/1 and represents the average increase in minimum DO
levels of the receiving water under proposed conditions.  Similar
curves may be constructed from the simulation results for suspended
solids, total lead, and dissolved lead.


UPSTREAM FLOW QUALITY

The background upstream flow quality is specified by the user by
reading in an upstream flow water quality matrix.  An example of
such a matrix is presented in Table 9-1.  The parameters must be
quantified by month and must include temperature, background DO
deficit, chloride content, 5-day BOD, suspended solids, TKN,  and
total lead.  The chloride content is important only when dealing
with a river/estuary system.  Where the receiving water is a
freshwater stream, zero values should be entered.

-------
 0)
 3
 nj
 o
o
Q
CD

                                                           Proposed improvements
                                Minimum DO (mg/l)
FIGURE 9-1. Example of cumulative frequency curves for minimum dissolved
                                                                      oxygen.

-------
   rH

CM  tr
o

o
o
o
                                             H
                                             O
                   CM
                   O











































H
1
CTi
3
fd
H
rd
O


CO
5)
P!
-H
O
£
CO
D
Q

Ij
ri
0

IX
-H
M
•P
rd
S

^1
-P
•H
(0
3
cx
!H
<1J
-P
rd
0
t—^
fe

i
0)
M
-p

l§^

H
1
X
w


U5rH
Qv.
N
O O1
CQ S




CO
 Oi
Q5

Q



M
3
-P
rd '-"•
(U o
p.^^
g
(U
H



G
0
S


OOOCOOOOOOOOO

^(N^mmrrjrocMrorrjc^ir)
rH rH rH







oooooooooooo

oooooooooooo











r>ll\rs]t^c^c^r^r^[\r^r^t^
oooooooooooo








oounootncooooooo
rHOrHC^OCnCN
-------
Ideally the values entered in the upstream flow water quality
matrix should be monthly means determined by analysis of observed
records of water quality measured upstream of the urban area.  If
records near the upstream boundary of the urban area are not
available, then records from a nearby station which is not affected
by urbanization can be used.  If no water quality records are
available, then reasonable values of background quality may be
obtained from the literature.  A good source for such information
is reference 10, "Loading Functions for Assessment of Water
Pollution From Nonpoint Sources."


SUSPENDED SOLIDS RESPONSE (MODULE 80)

Suspended solids is assumed to be a conservative substance during
the time period required for inflows to mix.  Thus, suspended
solids concentration occurring in the receiving water during each
time step is computed as the flow weighted average of all suspended
solids entering the mixing zone (see Figure 7-1) during that time
step.  This computation is performed as follows.
                              X SS.^
                  cc = -L~J-    	
                  bb         a                              (g_1)
where

        SS = SS concentration for time period in mg/1.

        Q. = flow rate generated by source i (urban storm
             water CSO, WWTP or upstream flow) for time
             period in cfs.

       SS. = suspended solids concentration generated by
          1   source i for time period in mg/1.


DISSOLVED OXYGEN RESPONSE (MODULE 81)

The dissolved oxygen response model is a one-dimensional completely
mixed plug flow freshwater river or river/estuary representation.
Application of this model is limited to free-flowing freshwater
streams and tidal river esturaries where the flow primarily
occurs along one dimension.  In general, if the length of the
receiving water system is large compared to the width, then the
model can be applied.  The model cannot be applied to impounded
rivers or to multidimensional estuary systems.

Parameters of the system are considered constant throughout the
length of stream under consideration.  Thus, the model is a lumped
parameter representation rather than a distributed parameter
representation.
                               9-4

-------
Before the actual DO budget computations can be performed for
each time step in the simulation, several system parameters must
be defined.  These parameters include:  the mean depth of flow,
the velocity of flow, the saturation value for dissolved oxygen,
and the reaction coefficients such as the waste decay rate Kl,
the reaeration rate K2, and the sediment uptake rate SB.

Receiving Water Hydraulics

The relationship between depth of flow and flow rate is represented
by the following equation (11).
                         H = UiQ* + p3                     (9-2)


where

     H = mean depth of flow in feet.

     Q = total flow in the receiving water in cfs.

     Pi, p2, and p3 = constants.


In a free flowing freshwater stream, p3 will represent some
minimum value of depth, while px and p2 define the stage discharge
relationship for the reach.  If open channel flow applies, then
the following relationships may be used to estimate pj and p2  (11)
                    Pi =
                              n
                         1.49 B SQ1/2
(9-3)
                         P2 = 0.6                            (9-4)


where

      n = Manning roughness coefficient for the channel.

      B = the average width of the stream in the receiving reach
          in feet.

     S  = the average channel bottom slope of the stream in
          the receiving reach in feet per foot.


In general, B and S  can be measured from USGS topographic maps,
and n can be estimated from values reported in the literature.
For example, see Chow, 1959 (12), pages 101 to 123.
                               9-5

-------
In a deep tidal estuary where stage is relatively uneffected by
changes in the freshwater flow Q,  the constant p3 may be set
equal to the mean depth at mean water level,  and pl and (B2 maY ^e
set equal to zero.

The relationship between velocity of flow and flow rate is represented
in the model by the following equation (13).
                         V = aiQ02                          (9-5)


where

             V = average velocity of flow in feet per second.

     «! and «2 = constants.


The <*! and a2 values used in equation 9-5 should be based on the
depth/flow relationship defined in Equation 9-2.  That is, for
every value of Q, there is a corresponding value of depth defined
by Equation 9-2, and for every value of depth, there is a value
of cross sectional area of flow computed as B x H.  The average
velocity of flow is then computed by dividing the flow rate Q by
the cross sectional area A.  Values of Q versus V may then be
plotted on log-log paper to determine the proper coefficient al
and a2.  This procedure i^ illustrated in Table 9-2.

Saturation DO

Dissolved oxygen saturation is a  function of temperature and
chloride content and is defined in the receiving water module by
the following equations.


          DOSAT = 14.652 - 0.410222*T + 0.00799*T2
                  - 0.00007777*T3                            (9-6)


          DOSAT = DOSAT*(1.0 - CC/100,000)                   (9-7)


where

     DOSAT =  saturation value of  dissolved oxygen in mg/1.

         T =  receiving water temperature in degrees centigrade.

        CC =  chloride concentration in mg/1.
                               9-6

-------
Table 9-2
Example Computation of Hydraulic Constants
(ot's and p's) for a Free Flowing Stream

Known from maps:  B = 300 feet      assume:
                 SQ = 0.0005 feet per foot
  Pi
             n
        1.49 B
                      "6
                                    0 03
                                             n = 0.03
                             . 49(300)(0. 0005)
                                                 ° *6
                                                     =0.0306
                    Pa = 0.6
                                    = 0.0
                    H = 0.0306 Q°'6 + 0.0
  Q
(cfs)

   100
   500
 1,000
 2,000
 5,000
10,000
H
iftl
0.48
1.27
1.93
2.93
5.07
7.69
Area, A
(ft2)
144
381
579
879
1,521
2,307
                                                            V
                                                        (ft/sec)

                                                          0.69
                                                          1.31
                                                          1.73
                                                          2.28
                                                          3.29
                                                          4.33
from log-log plot of Q vs. V

                  «! = 0.104
                     = 0.407

                    V = 0.104 Q° •407
                              9-7

-------
Equation 9-6 relates saturation dissolved oxygen to temperature
for freshwater systems (14).  Equation 9-7 presents an approximate
relationship which defines an adjustment to the computed saturation
value in systems which contains significant chlorides.  Equation
9-7 was developed from analysis of dissolved oxygen solubility
data reported in Reference 15.

Carbonaceous Waste Decay Rate Kl

The CBOD or carbonaceous waste decay rate is assumed to be a
constant value for each type of waste source.  The overall waste
decay rate is computed as the weighted average of the decay rates
for each source.  Kl values for carbonaceous oxygen demand at 20°
C are assumed as follows.


     	Source	       Kl, day"1 (base e)

     Upstream flow                       0.16
     Stormwater                          0.16
     Wastewater effluent                 0.23
     Combined sewer overflow             0.40


The above values of carbonaceous waste decay rate are default
values which are built into the program.  If the user does not
supply specific values for Kl, then these values are assigned.
The program assumes that runoff from watershed 1 is combined
sewer overflow  (Kl = 0.40) and that runoff from watershed 2 is
separate stormwater runoff  (Kl = 0.16).  The user may override
these assumptions by specifying a Kl value for each watershed,
for the upstream flow, and for the dry-weather flow.

The ability to  specify Kl values is most useful in the case where
the receiving water is a shallow stream.  It has been shown that
for shallow flow (less than 8 feet deep), the instream carbonaceous
waste decay rate is greater than the typical laboratory values
which are used  here as default values.  The following equation
can be used to  estimate the effect of stream depth on Kl  (16).


                    K1H = K1*(8/H)-434                      (9-8)


where

     KlH = carbonaceous waste decay rate  for a stream with
           a mean depth H less than 8 feet.

      Kl = typical or laboratory value of carbonaceous waste
           decay rate.

       H = mean depth of receiving stream in feet.
                               9-8

-------
The relationship defined by Equation 9-8 is only an approximation,
and considerable scatter in the data have been observed.  Kl
values as large as 4.0 for domestic wastes have been reported for
very shallow (less than 3-foot mean depth) receiving streams.
Therefore, in this case of a shallow stream, the Kl value may be
used as a calibration parameter.

The Kl value for the total mixed flow is then computed by the
following equation.
                    Kl = •*• x 4	                    (9-9)

                           2 QT*BOD.
                           i=l  x    x


where

       Q. = flow rate from source i (e.g., CSO), in cfs.

     BOD• = carbonaceous oxygen demand from source i in mg/1.

      Kl- = waste decay rate for source i as defined above
            in day~x.


Kl is then adjusted for receiving water temperature by application
of Equation 9-10 (14).


                         Kl = K1(1.047)               <9-10)


where all terms are as previously defined.


Nitrogenous Waste Decay Rate K3

The nitrogenous waste decay rate at 20° C is assumed to be equal
to 0.10 day'1 base e for all sources (11).  This value is adjusted
for receiving water temperature as follows (11).


                         K3 = 0.10(1.017)*T~20)             (9-11)


where

     K3 = nitrogenous waste decay rate in day"1.
                               9-9

-------
Atmospheric Reaeration Rate K2

Atmospheric reaeration of streams and estuaries has been the
subject of numerous investigations.   Most of these studies have
resulted in the development of empirical relationships which
relate the reaeration rate to the hydraulic parameters of depth
of flow and velocity of flow.  However,  choosing the proper
emprical relationship for a given case has been largely a matter
of engineering judgment.

In 1976, Covar (17) reviewed many of the commonly used K2 equations
and the data from which these equations were derived.  From this
review, specific criteria were developed by which the most appropriate
equation could be selected for a given set of hydraulic conditions.
The Covar criteria have been incorporated into the receiving
water response module of CSPSS.

By these criteria, one of three equations is chosen based on flow
hydraulics.  These equations are:  (1) the O'Connor-Dobbins
equation, (2) the Churchill equation, and (3) the Owens equation.
Each of these equations is defined below.


1.   The O'Connor-Dobbins equation



                         K2 = 12g?.Y°'S                     (9-12)
2 .   The Churchill equation
                         K2 = ±*^
                              11.6 v°'969
3.   The Owens equation
                              91 7 \/0 • 6 7
                         K2 =    *-"5	                     (9-14)
where

     K2 = atmospheric reaeration coefficient in day'1 base  e.

      V = velocity of flow  in  feet per second.

      H = depth  of flow  in  feet.
                              9-10

-------
The selection criteria are outlined as follows.

1.   If depth is greater than 2.0 feet and velocity is less than
     or equal to 2.5 feet per second, the O'Connor-Dobbins equation
     is used.

2.   If depth is greater than 2.0 feet and velocity is greater
     then 2.5 feet per second, the Churchill equation is used.

3.   If depth is less than or equal to 2.0 feet, the Owens equation
     is used.

In most cases, the above procedure results in the computation of
reasonable values of the reaeration coefficient for flowing
streams and river/estuary systems, for each time step in the
simulation.  However, the user has the option of specifying a K2
value to be used in all dissolved oxygen response computations.
If this option is utilized, then the Covar K2 selection criteria
is bypassed, and the K2 value read in by the user is applied at
each time step.  This option is most useful in the case of a
shallow stream where the stage-discharge and the discharge-velocity
relationships are uncertain and where this uncertainly is reflected
in the computation of unrealisticly large values of the reaeration
rate.

The user also has the option to adjust the computed or specified
K2 values, if so desired, by application of a K2 adjustment
factor.
                         K2 = K2*K2ADJ                      (9-15)


where

     K2ADJ = a user-supplied adjustment factor.


This adjustment factor may be used to calibrate the DO budget
model to prototype conditions if sufficient data exist to define
the cumulative DO frequency curve in the receiving water under
existing conditions.  A default value of 1.0 is built into the
model.

The K2 value is adjusted for receiving water temperature by the
following equation (14).


                         K2 = K2(1.024)(T~20)               (9-16)


where all terms are as previously defined.
                               9-11

-------
All empirical equations discussed above (Equations 9-11, 9-12,
and 9-13) will yield values of the reaeration coefficient which
approach zero as the velocity of flow approaches zero.  However,
reaeration occurs even in still waters due to wind and wave
action.  Thus, Equations 9-11, 9-12, and 9-13 will yield unreal-
istically low values of K2 in cases where the velocity of flow is
near zero.  Therefore, a minimum value of the reaeration coefficient
is computed and compared to the value obtained by application of
the emperical equations.  The minimum value is defined as follows.


                         K2MIN = 2.0/H                      (9-17)


where

     K2MIN = minimum reaeration rate due to wind and wave
             action.

         H = mean depth in feet.


If K2 is less than K2MIN, then K2 is replaced by K2MIN.

Sediment Uptake Rate SB

Sediment uptake rate or benthic demand at 20° C is computed as
follows (14).
                         SB = SBA*3.281/H                    (9-18)


where

      SB = benthic demand in mg/l/day at 20° C.

     SBA = areal benthic demand in gm 02/m2/day.

       H = depth of  flow in feet.


SBA values are user-supplied and should be obtained  from previous
studies of the receiving water sediments, if available.  Typical
values as reported by Thomann  (14) are given in Table  9-3.

Sediment uptake rates are then adjusted for receiving  water
temperature by application of Equation 9-18.
                          SB  =  SB(1.065)(T~20)                (9-19)
 where  all  terms  are  as  previously defined.

                              9-12

-------
Table 9-3
Average Values of Oxygen Uptake of
River Bottoms (after Thomann 1972)
  Bottom Type and Location

Municipal sewage sludge—
outfall vicinity

Municipal sewage sludge—
"aged" downstream of outfall

Cellulosic fiber sludgea

Estuarine mud

Sandy bottom

Mineral soils
    Uptake (g 02/m2/day)
 	at 20° C	
                  Approximate
  Range             Average
   2-10.0


   1-2

   4-10

   1-2

 0.2-1.0

0.05-0.1
1.5

7

1.5

0.5

0.07
 Calculated from reported values of 2-5 and 3.5 at 11° C.
                              9-13

-------
Dissolved Oxygen in a Stream

The dissolved oxygen deficit of a freshwater stream is represented
by a plug flow model.  That is, the model simulates the dissolved
oxygen budget within each discrete unit of water generated by the
urban system in each time step of the simulation.  Mixing of
waters in adjacent plugs is assumed negligible.  As the discrete
plug moves downstream, the oxygen resources are being depleted by
waste decay, and oxygen resources are being added by reaeration.
These reactions are time-dependent and thus, the equations which
define the reactions are expressed as a function of time.

Oxygen demands considered are ultimate carbonaceous BOD (CBOD),
nitrogenous BOD (NBOD), sediment demand (SB), and background
dissolved oxygen deficit.  The only oxygen source considered is
atmospheric reaeration.

Ultimate carbanaceous BOD is computed as follows (13).


                    CBOD =  	BOD.. fl«K1                 (9-20)
                            (1.0 - e"5'° K1)


where

     CBOD = ultimate carbonaceous BOD in mg/1.

      BOD = 5-day BOD from all sources in mg/1.

       Kl = Composite carbonaceous waste decay rate as
            previously defined.


Ultimate nitrogenous oxygen demand (NBOD) is computed by application
of Equation 9-20 (11).


                         NBOD  = 4.57*TKN                    (9-21)


where

     NBOD = ultimate nitrogenous oxygen demand in mg/1.

      TKN = total Kjeldahl nitrogen  from all sources in mg/1.


The  dissolved  oxygen  deficit at any  time, t, is  computed for each
type of oxygen demand  as  follows.
                              9-14

-------
1.   For carbonaceous demand
                    K1*CBOD . -Kl*t    -K2*t,                ,Q ~9x
                            (e      - e      )                (9-22)
                1   K9 - TCI
                    JS.^ — JxJ.


2.    For nitrogenous demand


               D2 = K^NBOD (e-K3*t _ e-K2*t)                (9.23)
                    Jt\z — J\.j


3.    For benthic demand



                    D3 = || (1.0 - e'*2^)                   (9-24)



4.    For initial deficit



                    D4 = Do e"K2*t                           (9-25)


5.    For total deficit


                    DODEF  = Dj + D2 + D3 + D4                (9-26)


where

         t = travel time in the receiving reach  in days.

        Do = dissolved oxygen deficit in the receiving water
             upstream from the urban area in mg/1.

     DODEF = dissolved oxygen deficit at time  t,  in mg/1.

All other terms are as previously defined.


The procedure used in the  DO budget module for streams is  to
divide the receiving reach into 50 equal increments  (equal travel
times) and to solve the above equations for each increment.   This
computation yields a DO deficit array for the  plug flow.   This
array is then searched, and the maximum value  is saved.  The
minimum value of dissolved oxygen is then computed as follows.


                         DOMIN = DOSAT - DC                  (9-27)


                               9-15

-------
where

     DOMIN = minimum value of dissolved oxygen for time step
             in mg/1.

     DOSAT = saturation value of dissolved oxygen for a given
             temperature and chloride concentration in mg/1.

        DC = critical or maximum dissolved oxygen deficit in
             mg/1.


Dissolved Oxygen in an Estuary

The DO budget computations for a river/estuary are similar to the
computations for a freshwater stream.  However, the equations
which define the reactions have been modified to account for
tidal dispersion.  These modifications were first proposed by
O'Connor (18) and have been reported by Nemerow (19).  The modified
equations are:


1.   For carbonaceous demand


                  _ K1*CBOD ,^J1*X   _J2*X.                 /Q-28^
               Dl ~ K2 - Kl (e       6     }                 (9-28)


2.   For nitrogenous demand


                  = K3*NBOD , J3*X _  J2*X                  (9_29)
               D2   K2 - K3 (e             '                 (     '


3.   For benthic demand



               D3 = ff (1.0 - eJ2*X)                        (9-30)



4.   For initial deficit



               D4 = Do eJ2*X                                (9-31)
                               9-16

-------
where
               Jl =
               J2 =
               J3 =
VF
2*E
VF
2*E
VF
2*E
1.0
    -V
       1.0 +
1.0 -^ 1.0 +
4*K1*E
 1 VF2
             4*K2*E
               VF2
    V
1.0 -W 1.0 +
             4*K3*E
               VF2
(9-32)
                                   (9-33)
                      (9-34)
     VF = velocity of freshwater flow in miles per day.

      E = tidal dispersion coefficient in square miles
          per day.

      X = distance downstream from urban area in miles.

All other terms are as previously defined.

Equations 9-28 through 9-31 are applied in a manner similar to
Equations 9-22 through 9-25 in order to generate the desired DO
deficit array.  All other computations are as described in the
section on dissolved oxygen in a stream.

The tidal dispersion coefficient for the receiving water under
consideration should be obtained from previous studies, if available.
Typical values of the tidal dispersion coefficient as reported by
Thomann are given in Table 9-4.

Computational Sequence

The DO budget computations for each time step in the simulation
can be described in six steps as follows.

1.   Compute the total flow from all sources entering the receiving
     water in cfs.

2.   Compute the following parameters.

     a.   Velocity of flow, V, in feet per second.

     b.   Depth of flow, H, in feet.

     c.   Total 5-day BOD in mg/1.

     d.   Total nitrogenous oxygen demand, NBOD, in mg/1.

     e.   Initial DO deficit in mg/1.
                               9-17

-------
4
d Longitudinal Tidal Dispersion
ents (adapted from Thomann 1972)
Estuary Mi2/day Tracer Remarks
1 0)-H
Cft -P U
rd-H
4H
rH-H 4H
Xj -P V
fO CO O
EH W 0
2-7 Chlorides Torresdale, Pennsylvania, to Reedy
Island, Delaware
7-11 Chlorides Lower portion of estuary to Delaware
Bay
0.2-0.6 Dye Upper 25 mi. nonsaline portion
0)
SH
rd

rd
rH
Q

U
rd
S
O
-P
O

G
O
-H
•P
SH
O
ft
X!
CQ
-H
U
rd
SH
•H
S
LT>
CN
0)
rH
•H
g
CQ
0)
T)
-H
O
rH
CJ
0
1
0

u
fd
g
o
-p
o
PM
rH
O
O
o
o
rH
1
O
0
O
n
U
i
-H
S
o
Lf>
 CQ
SHTJ-H
o r* nl .**'!
^j i 1 1
O P rd
D -H fd d)
55 --W 55


















pj
O
-H
P
SH
O
ft

V
pj
•H
rH
rd
CQ
G
O
55
o
o
o
*.
LO
1
O
o
o
-
rH
1
XI
U

^
!>i
SH
0)
-P
P
rd
PQ

S
0
S^l
4H

•
-H
S

O
IT) rH
| X^
in cr>
CN S

CO
CQ

•H
SH

SH
0)
X!
tn
-H



>
o
rH
K
d)
tn
rrj
•H
SH
PQ

G
O

G
O


[5
o
rH
(U
XI

• o
•H rH
gm

un SH
CN D
i >
O-H
rH SH
SH
CU
>
•H
SH

X!
tn
-H
X!

^.

O
O rH
00 *H

CQ
0)
-P
fd
UH
	 j
r~1
CO
CO
0)
T)
-H
SH
O
J
r— i
XI
u

t*1
-p
-H
pj
-H
i
i — !
rd
CO

t>i
-P
•H
G
-H
^i
1~~\
fd
CO

K*1
-P
-H
G
•H
i
rH
rd
CO

>i
P
-H
G
-H
t
r— J
rd
CO
                     cn
                            00
                                     00    rH
                                                 co

                                                 CN

                                                 00
                      0)
                            O
                            CO
                           w
                                           SH
                                           0)
                                           -P
                                           G
                                           -H
                                           G
                                           rd
                                           rH
                                           Cn

                                           W
SH
o>

0)
CO
      T3
       G
       rd
      rH

       G
      W
                                                 CO
X!
EH
          G
          fd
         rH
          Cn
          G
         W
          co
          0)
XJ
EH
9-18

-------
     f.

     g.

     h.

     i.

     j.

     k.
Saturation DO concentration, DOSAT, in mg/1.

Carbonaceous waste decay rate, Kl, in day'1.

Ultimate carbonaceous oxygen demand, CBOD, in mg/1.

Atmospheric reareration rate, K2, in day"1.

Nitrogenous waste decay rate, K3, in day'1.

Benthic demand, SB, in mg/l/day.
3.   If the receiving water is an estuary (E ? 0), then compute
     the following addition parameters.

     a.   Velocity of freshwater flow, VF, in miles per day.

     b.   Reaction exponents, Jl, J2, and J3.

4.   Compute the DO deficit curve for 50 equally spaced points on
     the receiving stream.

5.   Find the maximum DO deficit, DC, and compute the minimum DO,
     DOMIN, in mg/1.

6.   Test for a calibration point.  If DIST1 ^ 0, then compute
     the DO at distance DIST1 (DOXl).

The above sequence is repeated for every time step in the simulation
intil the annual arrays are filled.  These arrays, the DOMIN
array and the DOXl array, are then analyzed, and a cumulative
frequency table is developed and printed for each.


DISSOLVED LEAD RESPONSE (MODULE 82)

The equilibrium dissolved lead response model for CSPSS is based
on the assumption that a lead carbonate (PbCO3) system governs
the chemistry of lead in natural waters.  In most cases, it is
generally accepted that lead carbonate chemistry will control
dissolved lead content for most natural waters where pH is in a
reasonable range and total lead concentrations are not excessive.
When the lead carbonate system governs the chemistry of aquatic
lead, the solubility of lead is a function of total alkalinity,
total hardness, and pH of the receiving water after mixing.  The
dissolved lead equilibrium model developed here is based primarily
on information presented by Stumm and Morgan (20).

The purpose of the model is to compute total and dissolved lead
concentrations in the receiving water for each time step of the
simulation.  In addition, maximum annual 96-hour and time average
mean dissolved lead concentrations are also computed.
                               9-19

-------
The lead carbonate model does not consider lead forming the
insoluble hydroxy-carbonate solid phase, Pb3 (C03)2 (OH)2, as well
as the insoluble sulfate and phosphate phases.   Also not considered
is the formation of soluble organo-lead complexes with humic,
fulvic, and tannic acids, which are common (and largely unquantified)
constituents in natural runoff.  Further, the model is based on a
"closed aqueous system," that is, not open to the atmosphere.

The effects of the above limitations are, in part, offsetting.
Although the consideration of the additional solid phases might
serve to decrease predicted dissolved lead concentrations, the
additional consideration of soluble lead complexes with organic
acids would have the net effect of increasing soluble lead concent-
rations.  Also adsorption and desorption may be important factors
in determing the fate of lead, and this mechanism is not considered.
Adsorption which will tend to decrease dissolved lead concentrations
is associated with alkaline and neutral waters, whereas desorption
which will tend to increase dissolved lead concentrations is
associated with acidic waters.

Because of these uncertainties, dissolved lead concentrations
found in nature may be higher or lower than values predicted by
this formulation.  However, the model will yield a reasonable
approximation of the dissolved lead content in natural waters.

The integral chemical reaction which forms the basis of the
dissolved lead response model is given by the following formula.



                    PbC03 ^ Pb++ + C03 =                      (9-35)


In order to solve the above chemical reaction at equilibrium
conditions, several other reactions in the receiving water must
be considered.  These reactions are defined by the following
formulas.
                    H2C03 =^ HCO3" +  H                       (9-36)



                    HC03~ ^ C03=  + H+                       (9-37)



                      H20 - H+ + OH~                         (9-38)


Equilibrium constants which are used in the solution of Equations
9-35 through  9-38  are defined in Table 9-5.  These constants  are
utilized in the mathematical solution of the equilibrium reactions
defined above.



                               9-20

-------
          Table 9-5
          Equilibrium Constants for the
          Dissolved Lead Response Model


           K   = 1.5 x 10"13
             p                     Equation 9-35
          pKgp = 12.824
               = 4.45 x 10"'
                                   Equation 9-36
               = 6.35
            K2 = 4.69 x 10"11
                                   Equation 9-37
           pK2 = 10.33
            K  = 10"14
                                   Equation 9-38
           PXW = 14.0
Conversions and Definitions

Before proceeding with the development of the mathematical
relationships which define the equilibrium dissolved lead response
model, several relationships among the variables should be defined.
These relationships will be useful in the forthcoming equations.
It should be noted that brackets [ ] always express a concentration
in moles per liter, while the absence of brackets expresses a
concentration in milligrams per liter.

The relationship between the H  ion and pH is expressed as follows.
                           --=                             (9-39)
                           10pH
conversely;
                      pH = Log -~-                         (9-39a)
                              9-21

-------
The relationship between the OH  ion and the H  ion is given by
the following equation.


                           10~14
                   [OH ] = ±2—                            (9-40)
                 -
Concentration of total hardness, TH, total alkalinity, TA, and
lead, Pb, may be converted from moles per liter to milligrams per
liter by application of the following series of linear
transformations .
                    TH = [TH] X (1.0 x 105)                 (9-41)


                    TA = [TA] X (1.0 x 105)                 (9-42)


                    Pb = [Pb](2.0719 x 105)                 (9-43)


where

       TH = total hardness as mg/1 CaC03.

      [TH] = total hardness as moles/1 CaC03.

       TA = total alkalinity as mg/1 CaC03.

      [TA] = total alkalinity as moles/1  CaC03.

       Pb = lead concentration as mg/1.

      [Pb] = lead concentration as moles/1.


The activity of lead  is defined as follows.


                         APb =  [Pb]y                         (9-44)


where

      APb = activity  of lead as moles/1.

         •y = activity  coefficient of  lead,  dimensionless.

The total carbonic  species of each inflow  water  or of the mixed
receiving water is  defined by the following equation.
                               9-22

-------
[CT]  = [H2C03]  +
                         + [C03 ]
                                                             (9-45)
where
                  = [CT]On
                                                             (9-46)
and
           [C03] = [CT]a22
                                                             (9-47)
where
     a^ = ionization factor of HC03
                        [H]
/and
                                                             (9-48)
         = ionization factor of C03"


+l2       FH+
 L + 1 + i-
                                                             (9-49)
The activity coefficient for lead, y, used in the solution of
Equation 9-44, is determined by application of the Davies equation
(20).  The Davies equation defines a relationship between log  y,
the ionic strength  I of the solution, and the valence Z  of the
ion in question.  It has the following  form.
log y = -0.522
                          0.21
                                                             (9-50)
where
and
     Z = valence of ion in question
      I = 10~5(4TH - TA)
                                                             (9-51)
                               9-23

-------
Determination of [CT] for Each Inflow

The dissolved lead computation procedure for each time step in
the computation begins with the determination of the total carbonic
species [CT] for each of the four waters which make up the inflows
to the receiving water.  The [CT] for each inflow source is
determined by application of the following equation.


               rCT] = [TA] - [OH"] + [H+]                   (9-52)
                          a11 + 2a22


where all terms are as previously defined.


Mixing of Inflows

The inflows are now mixed, and the concentrations TA , TH  ,
[CT ], and  [Pb 1 are determined.  The subscript m inaicates
concentrations in the receiving water after mixing, and lead is
expressed in terms of total lead.
                              TAi

                    TAm = ±=±3	                         (9-53)
i=l   X
                              THi Qi
                                                             (9-54)
                                  J  Q±

                   [CTm]  = ^=^j	                       (9-55)
                             4

                           E  [Pb±]  Qi
                   [Pbm]  =  ±=±-s	                      (9-56)
                               9-24

-------
where

     Q. = inflow from source i in cfs and all other terms
          are as previously defined. -


Determination of pH for Mixed Flows

In order to determine the pH of the receiving water,  [H ] must
first be determined by application of the following equation.
          [Hm] = [CTm](of11 + 2°22) +  [OHJ "  [TAm]           (9-57)


where all terms are as previously defined.
an/ a22/ and  [OH~] are all functions of  [H ].  Therefore, a
closed form solution to Equation 9-57 does not exist.  Equation
9-57 is solved by application of the Newton-Raphson technique for
the solution of nonlinear equations of the form f(x) = 0  (21).
This technique appears to be free of convergence problems.
However, the possibility of convergence problems always exists
when numerical methods are employed.  Once [H±] is known, then pH
is determined by application of Equation  9-39a.

Precipitation Determination

Once the chemistry of the receiving water as determined in the
previous three steps is known, then the occurrence or nonoccurrence
of lead precipitation is determined by computing and comparing
two parameters, K and K_ .  The solution  for parameter K  is
defined by the following^series of equations and relationships.


                 K = Y[Pbm][CTm]cf2                          (9-58)

where

                Y  = ~^j                                    (9-59)


where


                d  = 21	s— - 0.21 1                     (9-60)
                               9-25

-------
where
where
               I  = 10"5(4TH  - TAm)                         (9-61)
                m           mm
                                                             (9-62)
where



                                                             (9-63)
where




              PK{  =  PKX  -  0.5[   +  m   -  0.21  \               (9--64)







and



                K,'  =  -4^                                    (9-65)
 where




               PK2' = PK2 - 2I - 0.2I                  (9-66)
 The solution for parameter K'_ is defined by the following
     . •                       °P
 equations .
                 K'  =   V                                  (9"67)
 where
                     = pK   - 4 [	55	0.21  )             (9-68)

                       P sp        + YT~       m
                                       in
                                9-26

-------
If K is less than K' ,  precipitation will not occur, and total
lead will equal dissolved lead.  If K is greater than K'   then
precipitation will occur, and only a portion of the tot!?' lead
will be dissolved.

Dissolved Lead Determination

If precipitation does occur, then the dissolved lead fraction is
determined by application of the following equations.



                                                            (9-69)
                            APb
                     PbmD = -   2.0219 x 105              (9-70)
where
    Apb _ = Actual dissolved lead activity in mixed inflows as
       "^   moles/liter.

     Pb _ = Actual dissolved lead concentration in mixed inflows
            as mg/1.


The above computations are repeated for every time step in the
simulation, and in this manner, a total lead array and dissolved
lead array are generated for the year.

Computational Sequence

The dissolved lead computations for each time step in the simulation
can be summarized in six steps as follows.

1.   Compute the total flow from all sources entering the receiving
     water in cfs.

2.   Determine the total carbonic species, [CT] , of each influent
     water.

3.   Determine the concentrations of total alkalinity, total
     hardness, total carbonic species, and total lead for the
     mixed inflow waters (i.e., receiving water).

4.   Compute the pH of the receiving water using the Newton-Raphson
     technique.

5.   Determine if lead precipitation occurs in the receiving
     water .

6.   Determine dissolved lead concentration.

                               9-27

-------
Reports generated by module 82 for each year in the simulation
include:  (1) cumulative frequency of total lead concentrations,
(2) cumulative frequency of dissolved lead concentrations, (3)
maximum annual 96-hour dissolved lead concentration, and (4)
long-term average dissolved lead concentration.


INPUT DATA

The input data required for the receiving water response portion
of CSPSS are considerably more extensive than are data requirements
for the other modules.  If module 80, suspended solids response,
is run, then all that is needed is background suspended solids
concentration by month for the receiving water upstream from the
urban area.  If module 81 is run, then the following data are
required.

1.   Hydraulic coefficients—a's and p's.

2.   K2 of receiving water in day"1 base e (optional).

3.   Sediment oxygen uptake rate in g 02/m2/day.

4.   Adjustment factor for computed K2 (optional).

5.   Distance to DO calibration point in miles  (optional).

6.   Length of receiving water reach in miles.

7.   Tidal dispersion coefficient in mi2/day  (for river/ estuary
     system).

8.   Waste decay rates (Kl values) for watershed 1, watershed 2,
     upstream flow, and dry-weather flow in day"1 base e  (optional).

9.   Background water quality matrix for receiving water.  The
     following water quality parameters must be defined by month.

     a.   Temperature, ° C.

     b.   DO deficit, mg/1.

     c.   Chloride concentration, mg/1 (for river/estuary system).

     d.   BOD5 concentration, mg/1.

     e.   Suspended solids concentration, mg/1.

     f.   TKN concentration, mg/1.

     If module 82 is  run, then background total lead  concentrations
     must be added to the above background water quality matrix.
     In addition, certain chemical parameters  for each inflow
     source must be defined.  The additional  parameters required
     are:

                              9-28

-------
     a.   Total alkalinity, mg/1.
     b.   Total hardness, mg/1.
     c.   pH, standard units.
Coding instructions may be found in Appendix A.
                              9-29

-------
     REFERENCES
1.   Hillier,  F. S. and Lieberman, G. J,  Introduction to Operations
     Research,  Holden-Day Inc.,  1967.

2.   Viessman,  W, Harbaugh,  T. E., and Knapp, J. W.,  Introduction
     to Hydrology, Intext, Inc.  1972.

3.   Fiering,  M. B. and Jackson, B. B., "Synthetic Stream Flows"
     Water Resources Monograph No. 1, American Geophysical Union,
     Washington, B.C. 1971.

4.   Mockus, V. et al.; "Hydrology" Section 4 SCS National
     Engineering Handbook Soil Conservation Service,  U.S.
     Department of Agriculture,  August 1972.

5.   Donigian,  A.S. and Crawford, N. H.,  "Modeling Nonpoint
     Pollution from the Land Surface" EPA-600/3-76-083, July
     1976.

6.   Heaney, J. P., Huber, W. C., and Nix,  S. J., "Stormwater
     Management Model Level I - Preliminary Screening Procedures"
     EPA-600/2-76-275, October 1976.

7.   Huber, W.  C. et al., "Storm Water Management Model Users
     Manual Version II" EPA-670/2-75-017, March 1975, p. 139.

8.   Pisano, W. C. and Queiroz,  C. S. "Procedures for Estimating
     Dry-Weather Pollutant Deposition in Sewerage Systems"
     EPA-600/2-77-120, July 1977.

9.   "Storage,  Treatment, Overflow Runoff Model Storm" Users
     Manual, The Hydrologic Engineering Center, U.S.  Army Corps
     of Engineers, Davis, California, July 1976.

10.  McElroy,  A.D. et al., "Loading Functions for Assessment of
     Water Pollution from Nonpoint Sources" EPA-600/ 2-76-151,
     May 1976.

11.  Grim, R.  L. and Lovelace, N. L., "Auto-Qual Modeling System"
     EPA-440/0-73-003, March 1973.

12.  Chow, V.  T., Open Channel Hydraulics,  New York:   McGraw Hill
     Book Co.,  1959.

13.  Heaney, J. P. et al. "Nationwide Evaluation of Combined
     Sewer Overflows and Urban Stormwater Discharges, Volume II:
     Cost Assessment and  Impacts" EPA-600/ 2-77-064,  March 1977.

-------
14.  Thomann,  R.  V.,  "Systems Analysis and Water Quality Management,"
     Environmental Science Services Division,  Environmental
     Research and Applications,  Inc.,  New York:  1972.

15.  Metcalf & Eddy,  Inc.  Wastewater Engineering, New York:
     McGraw Hill Book Co., 1972.

16.  Hydroscience Inc., "Simplified Mathematical Modeling of
     Water Quality,"  U.S.  Environmental Protection Agency,
     Washington,  D.C., March 1971.

17.  Covar, A. P., "Selecting the Proper Reaeration Coefficient
     for Use in Water Quality Models," Proceedings Conference on
     Environmental Modeling and Simulation, EPA 600/9-76-016 July
     1976.

18.  O'Connor, D. J., "Oxygen Balance of an Estuary," Journal of
     the Sanitary Engineering Division ASCE, May 1960.

19.  Nemerow,  N. L. Scientific Stream Pollution Analysis, McGraw
     Hill Book Co., 1974.

20.  Stumm, W. and Morgan, J. J., "Aquatic Chemistry; An
     Introduction Emphasizing Chemical Equilibria in Natural
     Waters," Wiley-Interscience Inc., New York, 1970.

21.  McCalla,  T. R.,  "Introduction to Numerical Methods and
     FORTRAN Programming," John Wiley & Sons,  Inc., New York,
     1967.

-------
Appendix A
CODING INSTRUCTIONS

-------
Module—Main

Input:    The following variables are inputed:

Card 1
     Col 1-40       Location

Card 2
     Col 1-2        Number of years to be simulated
     Col 3-4        Time interval for simulation (in hours)
     Col 5-6        Number of watersheds
     Col 7-15       Seed number for pseudorandom number
                    generator

Card 3
     Col 1-2        First option selected
     Col 3-4        Second option selected
     Col 5-6        Third option selected
     Col 15-16      Eighth option selected

Output:   Report on:

          The location of the analysis, number of years to be
          simulated, time interval for the simulation, number of
          watersheds, seed number for the pseudorandom generator,
          and options selected for this simulation.
                               A - 2

-------
Module 10:  Stochastic Rainfall Simulator

Input:    The following variables are inputed:

Card 1
     Col 1-2        Months in season 1, Col 1-2, 3-4, 5-6, etc.,
                    until all months in season 1 are entered
                    (1-12 allowable)

     Col 23-24

Card 2
     Col 1-2        Months in season 2, Col 1-2, 3-4, 5-6, etc.,
                    until all months in season 2 are entered
                    (1-12 allowable)

     Col 23-24

Card 3
     Col 1-10       Mean time between storms in hours--season 1
     Col 11-20      Mean time between storms in hours—season 2

Card 4
     Col 1-10       Mean duration of storm in hours—season 1
     Col 11-20      Mean duration of storm in hours—season 2

Card 5
     Col 1-10       Mean rainfall depth in inches—season 1
     Col 11-20      Standard deviation of rainfall depth in
                    inches—season 1
     Col 21-30      Correlation coefficient of rainfall depth—
                    season 1

Card 6
     Col 1-10       Mean rainfall depth in inches—season 2
     Col 11-20      Standard deviation of rainfall depth in
                    inches—season 2
     Col 21-30      Correlation coefficient of rainfall depth—
                    season 2

Output:   Report on input parameters and a summary of annual
          rainfall array, by season.
                               A - 3

-------
Module 20:  Runoff by Soil Conservation Service
            Rainfall/Runoff Technique

Input:    The following variables are inputed:

Card 1
     Col 1-2        Months in dormant season,  Col 1-2,  3-4, 5-6,
                    etc., until all months in dormant season are
                    entered (1-12 allowable)

     Col 23-24

Card 2
     Col 1-2        Months in growing season,  Col 1-2,  3-4, 5-6,
                    etc., until all months in growing season are
                    entered (1-12 allowable)

     Col 23-24

Card 3
     Col 1-10       CN1 for watershed i
     Col 11-20      CN2 for watershed i
     Col 21-30      CN3 for watershed i

Card 4
     Col 1-10       Drainage area in acres for watershed i
     Col 11-20      Time of concentration in hours for
                    watershed i
     Col 21-30      Washoff coefficient for watershed i

Note:     There is a set of Card 3 and Card 4 for each watershed.
          The first set of cards contains data for watershed 1, and
          the second set of cards contains data for watershed 2.

Output:   Report on input parameters and summary of annual runoff,
          by watershed.
                               A - 4

-------
Module 30:  Watershed Pollution Accumulation/Washoff

Input:    The following variables are inputed:
Card 1
     Col 1-10

     Col 11-20
Card 2
     Col 1-10

     Col 11-20
Card 3
     Col 1-10

     Col 11-20
Card 4
     Col 1-10
     Col 11-20
Accumulation rate for biochemical oxygen
demand in Ib/ac/day
Decay rate for biochemical oxygen demand
in fraction removed/day
Accumulation rate for total Kjeldahl nitrogen
in Ib/ac/day
Decay rate for total Kjeldahl nitrogen in
fraction removed/day
Accumulation rate for suspended solids
in Ib/ac/day
Decay rate for suspended solids in
fraction removed/day
Accumulation rate for lead in Ib/ac/day
Decay rate for lead in fraction removed/day
Note:     A set of Cards 1 to 4 is required for each watershed.
          Data for each watershed must be grouped together and
          watershed 1 data must precede watershed 2 data.

Output:   Report on input parameters.  Summary of annual
          runoff quality arrays and total annual washoff for
          each pollutant by watershed.
                              A - =;

-------
Module 40:  Excess Sewer System Infiltration

Input:    The following variables are inputed:

Card 1   (for watershed 1)
     Col 1          Watershed code (1 infiltration computed,
                    0 infiltration not computed)
     Col 2-11       Average pipe diameter, in inches
     Col 12-21      Pipe length, in miles
     Col 22-31      Average daily dry-weather flow, in cfs
     Col 32-41      Capacity ratio for wastewater treatment
                    plant
     Col 42-51      Infiltration adjustment factor

Card 2    (Same as Card 1) (Required for the other watershed)

Output:   Report on input parameters by watershed.  Summary of
          excess infiltration results and a summary of the
          resultant excess infiltration plus direct runoff
          quality array.

Note:     If a 0 is entered in Col 1, the remaining fields for
          that watershed may be left blank.
                               A - 6

-------
Module 50:  Storage/Treatment

Input:    The following variables are inputed:

Card 1
     Col 1-10       Maximum storage capacity watershed i, in ft3
     Col 11-20      Maximum treatment rate watershed i, in cfs
     Col 21-25      BOD removal efficiency watershed i
     Col 26-30      Suspended solids removal efficiency
                    watershed i
     Col 31-35      TKN removal efficiency watershed i
     Col 36-40      Lead removal efficiency watershed i

Card 2
     Col 1-10       Initial storage watershed i, in ft3
     Col 11-20      Initial BOD concentration watershed i,
                    in mg/1
     Col 21-30      Initial suspended solids concentration
                    watershed i, in mg/1
     Col 31-40      Initial TKN concentration watershed i,
                    in mg/1
     Col 41-50      Initial lead concentration watershed i,
                    in mg/1

Note:     A set of Cards 1 and 2 is required for each watershed.
          Data for each watershed must be grouped together,
          and watershed 1 data must precede watershed 2 data.

Output:   Report on input parameters and summary statistics on
          operation of treatment plant, the quality of the water
          discharged to the receiving stream, the number of
          overflow events, the number of days with overflow,
          and the annual volume of overflow in inches.
                               A - 7

-------
Module 60:  Dry-weather Wastewater Treatment Plant Flow

Input:    The following variables are inputed:

Card 1
     Col 1-10       Mean daily dry-weather flow for wastewater
                    treatment plant in cfs
     Col 11-20      Mean 5-day biochemical oxygen demand
                    concentration of dry-weather flow in
                    mg/1
     Col 21-30      Mean suspended solids concentration of
                    dry-weather flow in mg/1
     Col 31-40      Mean total Kjeldahl nitrogen concentration
                    of dry-weather flow in mg/1
     Col 41-50      Mean total lead concentration of dry-weather
                    flow in mg/1
     Col 51-60      Mean dissolved oxygen deficit of dry-
                    weather flow in mg/1

Output:   Report on input parameters.
                             A  -  8

-------
Module 70:  Daily Streamflow

Input:    The following variables are inputed on dataset
          FT08F001:

Card 1
     Col 2          Number of years of streamflow on data set
                    (1-5 allowable)

Cards 2 to 1,801
     Col 1-6        Daily streamflow in cfs

Note:     One to five years of streamflow data may be contained
          on this data set.  Thus, allowable number of cards
          read are 361, 721, 1,081, 1,441, and 1,801.

Output:   If improper amount of data is entered, then message
          is written and the job aborted; otherwise, output
          generated by this module includes the number of
          years of streamflow read and the first 10 values
          of daily streamflow on the data set.
                               A - 9

-------
Module 71:  Stochastic Monthly Streamflow Simulator

Input:    The following variables are inputed:

Cards 1 to 12       Monthly data (months 1 to 12)
     Col 1-10       Monthly mean streamflow in cfs
     Col 11-20      Standard deviation of monthly streamflow
                    in cfs
     Col 21-30      Correlation coefficient of monthly
                    streamflow

Output:   Report on input parameters and summary statistics
          for generated streamflow array.
                               A - 10

-------
Module 80:  Suspended Solids Response

Input:    The following variables are inputed:

Cards 1 to 12
     Col 41-50      Suspended solids concentration in upstream
                    flow (mg/1)

Output:   Report on input parameters and on cumulative frequency
          of suspended solids concentration in the receiving
          water.
                               A - 11

-------
Module 81:  Suspended Solids and Dissolved Oxygen Response

Input:    The following variables are inputed:

Card 1
     Col 1-10       <*!
     Col 11-20      a2

Card 2
     Col 1-10       pi
     Col 11-20      p2
     Col 21-30      p3
     Col 31-40      K2 for receiving stream day"1 tase e
                    (optional)

Card 3
     Col 1-10       Areal benthic uptake rate (gm 02/m2/day)
     Col 11-20      Calibration for K2 (K2ADJ, optional)
     Col 21-30      Distance from urban area to calibration point,
                    in miles
     Col 31-40      Length of receiving water reach, in miles
     Col 41-50      Tidal dispersion coefficient, in miles2/day
     Col 51-55      Kl for watershed 1 in day"1 base e
                    (default =0.40)
     Col 56-60      Kl for watershed 2 in day"1 base e
                    (default =0.16)
     Col 61-65      Kl for upstream flow in day"1 base e
                    (default =0.16)
     Col 66-70      Kl for dry-weather flow in day"1 base e
                    (default = 0.23)

Cards 4 to 15       (data for months 1 to 12)
     Col 1-10       Water temperature (month i)  (°C)
     Col 11-20      Dissolved oxygen deficit  (month i) (mg/1)
     Col 21-30      Chloride concentration (month i) (mg/1)
     Col 31-40      Biochemical oxygen demand concentration  (BOD5)
                    in upstream flow (month i) (mg/1)
     Col 41-50      Suspended solids concentration in upstream
                    flow (month i)  (mg/1)
     Col 51-60      Total Kjeldahl nitrogen concentration in
                    upstream flow  (month i) (mg/1)
     Col 61-70      Lead concentration in upstream flow  (month i)
                    (mg/1)  (necessary only if Module 82  is run)

Output:   Report on input parameters and cumulative distributions
          of minimum  dissolved oxygen, dissolved oxygen  at
          calibration point, portion of receiving water-
          affected by low DO, and  cumulative  distribution
          of suspended solids.
                              A - 12

-------
Module 82:  Suspended Solids, Dissolved Oxygen, and
            Dissolved Lead Response.

Input:    The following variables are inputed:

Cards 1 to 15  Same as Module 81
Card 16
     Col 1-10
     Col 11-20
     Col 21-30
     Col 31-40

Card 17
     Col 1-10
     Col 11-20
     Col 21-30
     Col 31-40

Card 18
     Col 1-10
     Col 11-20
     Col 21-30
     Col 31-40
Alkalinity— (CSO)
Alkalinity--(SW)
Alkalinity--(SF)
Alkalinity--(DW)
Hardness—combined sewer overflow (CSO)
Hardness—storm water (SW)
Hardness—streamflow (SF)
Hardness—dry-weather flow (DW)
pH—(CSO)
pH--(SW)
pH—(SF)
pH—(DW)
Output:   Report on input parameters, amount of lead in
          water column and sediment, cumulative frequency
          of total lead and dissolved lead concentrations,
          maximum annual 96-hour dissolved lead concentration,
          and long-term average dissolved lead concentration.
                               A - 13

-------
Appendix B
FORTRAN LISTING OF CONTINUOUS
STORMWATER POLLUTION SIMULATION
SYSTEM (CSPSS)

-------
This appendix contains a listing of alo. subprograms which constitute
CSPSS.  The subprogram name and a brief description of its purpose
are given below in the order in which it appears.

CSPSS

This is the main module.  It controls the processing of the
simulation.

AWP

This function calculates the annual washoff in pounds.

BODRD

This module reads input for DO budget model (modules 80-82).

BODRW

This is the DO budget model.

CCT

This function calculates the CT (total carbonic species) for the
dissolved lead model.

CFDO

This module accumulates the frequency of minimum dissolved oxygen
concentration on the ranges specified.

CFPB

This module accumulates the frequency of maximum lead concentrations
on the ranges specified.

CFSS

This module accumulates the frequency of maximum suspended solids
concentrations on the ranges specified.

CKSEL

This module validates the options that the user has selected.

DFN

This module is the  first derivative  of the function us.ed in  the
Newton-Raphson method to calculate the hydrogen ion concentration
in the lead model.

DOE

This module calculates  the  dissolved oxygen level  in  an
estuary.

                               B - 2

-------
DOS

This module calculates the dissolved oxygen level in a stream.

DRYWEA

This module reads the input for the dry-weather flow simulation
and calculates the value of dry-weather flow by time interval and
by day of the week.

DSRD

This module reads daily streamflow records.

EXXPON

This module generates a random observation from a exponential
distribution.

FN

This module is the function used in the Newton-Raphson method to
calculate the hydrogen ion concentration in the lead model.

GMSF

This module simulates monthly streamflow for the number of years
to be simulated.

I NFL

This module simulates excess infiltration.

INFLRD

This module read input for the excess infiltration simulation.

ISTR

This module reads monthly streamflow statistics and uses GMSF to
generate monthly streamflows.

LOGNOR

This module generates a random observation from a log normal
distribution.

MARKOV

This module generates a lag one Markov process with a log normal
distribution.
                               B - 3

-------
MONTH

This module determines the month of the current time step.

NWTRAF

This module uses the Newton-Raphson method to calculate the
hydrogen ion concentration in the lead model.

OAF

This module is the excess infiltration equation fitted for Baltimore,
Maryland.  See SWMM User's Manual, vers. 2, p. 139.

PBRW

This module is the dissolved lead simulation.

PER

This function calculates percent.

PUTDOS

This module calculates and writes the time average percent of
affected streamflow reach for specified levels of dissolved
oxygen concentrations.

PUTFDO

This module writes the cumulative minimum dissolved oxygen frequency
curve.

PUTFPB

This module writes the cumulative lead concentration frequency
curves (total and dissolved).

PUTFSS

This module writes the cumulative suspended solids concentration
frequency curve.

RAINFL

This module is the rainfall simulation  (module 10).

RAINRD

This module reads rainfall statistics  for  the rainfall simulation
model.
                               B - 4

-------
RANDOM

This module generates a random number on the 10,11 internal with
a uniform distribution.

RECWAT

This, module is the receiving water response simulation.

RUNOFF

This module simulates direct runoff using the SCS method.

RUNQLR

This subroutine reads input data for the runoff quality model.

RUNQLT

This module simulates pollution accumulation and washoff on the
watershed.

RUNRD

This subroutine reads input data for runoff model.

SEASON

This module determines which season the time step is in.

SSRW

This module calculates suspended solids concentrations in the
receiving water.

STOR

This module simulates storage/treatment of runoff.

STORRD

This module reads input for the storage/treatment model.

TRANS

This module transforms input rainfall and streamflow statistics
to log form.

XL2

This function calculates the load on the watershed per time
interval.
                               B -  5

-------
XMIX

This module calculates the average concentration resulting from
the mixing of four different inputs.

XM2

This function calculates the washoff on the watershed per time
interval.
                               B - 6

-------
c
c
c
c
c
c
c
c
c
c
c
c
c
  DEVELOPED BY:
           FOR:
  CH2K! HILL INC.
  7201 N.W. 11TH PLACE
  GAINESVILLE FLORIDA 32602

  FACILITIES REQUIREMENTS DIVISION
  U.S. ENVIRONMENTAL PROTECTION
  AGENCY
  WASHINGTON D.C.
c
C-HERE
C
                     BLOCK DATA *

     BLOCK DATA
     COMMON /GLOBL1/ALF1,ALF2,BETA1,BETA2,BETA3,SBA,K2ADJ,DIST1,
     DIST2,E,T(12),DUS(12),CC(12),QDW(42),BODDW,SSDH,TKNDW,PBDW,
     BOOUSF(12),TKNUSF(12),SSUSF(12),PBUSF(I2),K2SPEC,DOW,
     K1W1,K1W2,K1USF,K10WF
     COMMON /STR2/QDUS(360,5),QMUS(12,5),QMSF(12),SDMSFf12).CCMSFC12)
     COMMON /10/IIN.IRIV.IOUT
     DATA IIN/5/.IR1V/8/.10UT/6/

     IS WHERE YOU INITIALIZE ANY VARIABLES IN COMMON
          ODUS/1800*0.0/
          OMUS/60*0.0/,OMSF/12*0.0/,SDMSF/12*0.0/
          ODW/42*0.0/
       REAL
       REAL
       REAL
       END
C********************* MAIN *=<
C
       COMMON /GLOBAL/IDT,NYR,LOC(10),IRN1.IWSD
       COMMON /IO/IIN,1RIV,IOUT
       DIMENSION ISEL(8)
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
1000
1001
1002
THIS MODULE CONTROLS PROCESSING IN ALL OTHER MODULES

OPTIONS SELECTABLE ARE :
  OPTIONS

  "To
    20
    21
    30
    40
    50
    60
    70
    71
    80
    81
    82
DESCRIPTION
 RAINFALL SIMULATION
 RUNOFF BY SCS EQUATION
 RUNOFF BY COEFFICIENT METHOD
 POLLUTANT HASHOFF
 EXCESS INFILTRATION
 STORAGE / TREATMENT
 DRY WEATHER FLOW
 DAILY STREAMFLOW
 MONTHLY STREAMFLOW SIMULATION
 SUSPENDED SOLIDS RESPONSE
 SUSPENDED SOLIDS AND DISSOLVED OXYGEN RESPONSE
 SUSPENDED SOLIDS,DISSOLVED OXYGEN AMD
 LEAD RESPONSES
     FORMATOI2.I9)
     FORMATUOA4)
     FORMATC8I2)
                  B - 7
00000100
00000200
00000300
00000400
00000500
00000600
00000700
00000800
00000900
00001000
00001100
00001200
00001300
00001400
00001500
00001600
00001700
00001800
00001900
00002000
00002100
00002200
00002300
00002400
00002500
00002600
00002700
00002800
00002900
00003000
00003100
00003200
00003300
00003400
00003500
00003600
00003700
00003800
00003900
00004000
00004100
00004200
00004300
00004400
00004500
00004600
00004700
00004800
00004900
00005000
00005100
00005200
00005300
00005400
00005500
00005600
00005700
00005800
00005900
00006000
00006100

-------
1003   FORMAT('1',T26,'CONTINUOUS STORMWATER POLLUTION SIMULATION
     1',
     1/,T30,'FEBRUARY,1979',///,
     1 T2,'GENERAL SIMULATION CONTROL DATA*,20(•-•)//,
     2T22.'LOCATION: ',T32,10A4)
1004   FQRMATUX.T3,'NUMBER OF YEARS TO SIMULATE:•,T32t12t
     2/,T8,'TIHE INTERVAL IN HOURS;',T32 , 12,/
     3T10,'NUMBER OF WATERSHEDS:'»T32,12,/
     11X,T5,'SEED FPP RANDOM GENERATOR:•,T32,19)

  THLRE ARE 8640 HOURS  IN ONE YEAR -ASSUMED 360 DAYS OF 24 HRS
C
c
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
  - FOR TIME INTERVAL =4 THERE ARE 2160 EVENTS PER YEAR
*
*
*
      STEP 1
                 *
                 *
  - READ LOCATION

       READ UIN.lOOl) LOC
       WRITEtIOUT,1003)LOC
*
*
*
      STEP 2
                 *
                 *
                 *
- READ NUMBER OF
   TIME INTERVAL
                   YEARS TCT SIMULATE
                   OF SIMULATION
     NUMBER OF WATER SHEDS
     SEED NUMBER FOR RANDOM NUMBER GENERATOR

       READ (UN,1000) NYR, IDT, IWSD ,IRN1
       WRITEUOUT, 1004 )NYR, IDT, IWSD.IRN1
*
*
*
      STEP 3
                 *
                 *
                 *
  - READ OPTIONS SELECTED
       READ (UN, 1002} ISEL
*
*
      STEP 4
                 *
                 *
                 *
  VALIDATE THE OPTIONS SELECTED
       CALL CKSELUSEL.£402)
                                    B - 8
SYSTEK)0006200
      00006210
      00006300
      00006400
      00006500
      00006600
      00006700
      00006800
      00006900
      00007000
      00007100
      00007200
      00007300
      00007400
      00007500
      00007600
      00007700
      00007800
      00007900
      00008000
      00008100
      00008200
      00008300
      00008400
      00008500
      00008600
      00008700
      00008800
      00008900
      00009000
      00009100
      00009200
      00009300
      00009400
      00009500
      00009600
      00009700
      00009800
      00009900
      00010000
      00010100
      00010200
      00010300
      00010400
      00010500
      00010600
      00010700
      00010800
      00010900
      00011000
      00011100
      00011200
      00011300
      00011400
      00011500
      00011600
      00011700
      00011800
      00011900
      00012000
      00012100

-------
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
6
c
c
c
    *«**«*«*$«*«*«
    *            *
    *   STEP 5   *
    *            *
    ««*«**********

  INITIALIZE FIRST SIMULATION YEAR

       NYEAR=1
    *«*«*****««« **
    *            *
    *   STEP 6   *
    *            *
  00 OPTIONS SFLECTED

       CONTINUE
       DO 7 1=1,8

   00 THE FOLLOWING ONLY FOR THE. FIRST YEAR OF  SIMULATION
7
10
C
  THE
30
C
c
C
C
 IFUSELU
 IFUSELU
 IFUSELU
 IFUSELU
 IFUSELU
 IFUSELU
 IFUSELU
 IFUSELU
 IFUSELU
 IFUSELU
 IFUSELU
 IFUSELU
 CONTINUE
 DO 30 1=1
FOLLOWING
 IFUSELU
 IFUSELU
 IFUSELU
 IFUSELU
 IFUSELU
 IFUSELU
 IFUSELU
 IFUSELU
 IFUSELU
  CONTINUE
                ).EC.O)GOTO 10
                KEG.10) CALL RAINRD
                ).E0.20) CALL RUNRD
                ).EG.30) CALL
                J.EC.40) CALL
                ).EC.50) CALL
                ).E0.60) CALL
                ).E0.70) CALL
                J.EG.71) CALL
                ).E0.80) CALL
                ).EC.81) CALL
                KEG.82) CALL
                              RUNQLR
                              INFLRD
                              STORRO
                              DRYWEA
                              DSRD  (NYSTRM,£403)
                              ISTR
                              BODRDUSELU))
                              BODRD(ISELU))
                              BODRDUSELU))
                 ,8
                OPTIONS ARE EXERCISABLE  EACH  YEAR
                 .EO.O)GOTO 35
                     10) CALL RAINFL(NYEAR)
                     20)
                     30)
                     40)
                     50)
                     80)
                     81)
.EG.
.EG.
.EG,
.EC,
.EC,
.EG,
.EC,
.EC.82)
                         CALL
                         CALL
                         CALL
                         CALL
                         CALL
                         CALL
                         CALL
                              RUNOFF(NYEAR)
                              RUNQLT(NYEAR)
                              INFL
                              STOROIYEAR)
                              RECWAT(NYEAR,1SELU),NYSTRM)
                              RECWAT(NYEAR,ISELU),NYSTRM)
                              RECWAT(NYEAR.ISEL(I),NYSTRM)
    *
    *
        STEP 7
                 *
                 *
C INCREMENT SIMULATION YEAR
35     NYEAR=NYEAR+1
C   *            *
C   *   STEP 8   *
C   *            *
c   **************
c
C  IS SIMULATION FINISHED ? ? ?
                                    B -  9
00012200
00012300
00012400
00012500
00012600
00012700
00012800
00012900
00013000
00013100
00013200
00013300
00013400
00013500
00013600
00013700
00013800
00013900
00014000
00014100
00014200
00014300
00014400
00014500
00014600
00014700
00014800
00014900
00015000
00015100
00015200
00015300
00015400
00015500
00015600
00015700
00015800
00015900
00016000
00016100
00016200
00016300
00016400
00016500
00016600
00016700
00016800
00016900
00017000
00017100
00017200
00017300
00017400
00017500
00017600
00017700
00017800
00017900
00018000
00018100
00018200

-------
       IF (NYEAR.LE.NYR)GO TO 10
50     CONTINUE
$99    STOP
402    STOP 300
403    STOP 305
       END
                           ************************
       FUNCTION AHP{R,IDTiCP)
        T1=R*62.*
       T2=T1*3600
       T3=T2*IDT
       T*=T3*CP
       AWP=T*/10000CO
       RETURN
       END
C
£#*****«***«««******  BODRD  *************************
C
       SUBROUTINE BOORD (OPT)
       COMMON /IO/IIN,IRIV,IOUT
       COMMON /GLOBL1/ALF1,ALF2,BETA1,BETA2,BETA3,SBA,K2ADJ,DIST1,
     1 DIST2,E,T<12),DUS<12),CCCl2),QDW<*2),BODDW,SSDWfTKNDH,PBDW,
     2 BODUSFU2>,TKNUSF<12},SSUSF(12),PBUSF<12),K2SPEC,DDW,
     3 K1W1,K1W2,K1USF,K10WF
       COMMON /PB1/TA(*),TH(*),PH(*)
      REAL K2AOJ.K2SPEC
       REAL K1H1.K1H2.K1USF.K1DHF
       INTEGER OPT
C
C  THIS MODULE READS BOD INPUT FOR DO BUDGET MODEL
C
1000
1001

1002
1003
1005
1006
       FORMAT('1',T26,'CONTINUOUS STORMWATER POLLUTION SIMULATION
      ',
       /,T30,'FEBRUARY,1979',///
       ,T2,'INPUT TO DO BUDGET MODEL',20{'-•)//
       T10,'ALPHA VALUES : •.T30.F12.8,T** .F12.8>
       FORMATUX. Til, 'BETA VALUES :'.T28 ,3(2X ,F12 .8)/.
       Til,'SPECIFIED K2 * ' ,T28 .F10.2 ,' 1/DAYM
       FORMAT(1X,T19,'SBA s'.T30.F10.2.' GM 02/M**2/DAY•,/,
         T17,'K2AOJ :',T30,F10.2
       /T17,'DIST1 :',T30,F10.2,» MILES',/,
       T17,'DIST2 r',T30,F10.2,' MILES*,/T21,'Els•,T30,F10.2,
       • MILES**2/DAY'/,
       TlO.'Kl WATERSHED 1 '.T30.F5.2,' I/DAY'/
       TlO.'Kl WATERSHED 2',T30,F5.2,• I/DAY'/
       TlO.'Kl STREAMFLOH',T30,F5.2.' I/DAY'/
       TlO.'Kl DRY WEATHER FLOW'.T30.F5.2,' 1/DAYM
       FORMAT (IX,' TEMP',T10,'DUS',T32.'CCM
       FORMAT(7F10.2)
       FORMAT(1X,I2,3X,6(2X,F8.2),2X,F8.*)
       FORMAT(3(/),T2,'UPSTREAM QUALITY ARRAY*,20('-'),//,
1007
         ,       ,   ,
       ,'BOO',
       T
       FORMAT(4F10.2)               B '- 10
      00018300
      00018*00
      00018500
      00018600
      00018700
      00018800
      00018900
      00019000
      00019100
      00019200
      00019300
      00019*00
      00019500
      00019600
      00019700
      00019800
      00019900
      00020000
      00020100
      00020200
      00020300
      00020*00
      00020500
      00020600
      00020700
      00020800
      00020900
      00021000
      00021100
      00021200
      00021300
      00021*00
      00021500
      00021600
      00021700
5YSTEM00021800
      00021810
      00021900
      00022000
      00022100
      00022200
      00022300
      00022*00
      00022500
      00022600
      00022700
      00022800
      00022900
      00023000
      00023100
      00023200
      00023300
      00023*00
      00023500
      00023510
      00023600
      00023700
      00023800
      00023900
      0002*000
      0002*100

-------
 *            *
 *   STEP 1   *
 *            *
 **************

READ ALPHA PARAMETERS
    READ (UN, 1004) ALF1.ALF2
   WRITE(IOUT,1000) ALF1.ALF2
1008   FORMAT(3(/),T2,'INPUT DATA FOR LEAD  SUBMODEL',20(•-•),//,
     1 T24,'CSO»,T40,'SKRf,T54,'USF»,T69,'WWTP»,//,
     2 T2,'ALKALINITY  (HG/L)•,T19,F10.2.T34,F10.2tT49,F10.2,T64,F1C.2//
     3 T2,'HARDNESS  (MG/L)',T19,F10.2,T34,F10.2,T49,F10.2.T64,F10.2//,
     4 T2,'PH',T19,F10.2,T34,F10.2,T49,F10.2,T64,F10.2)
10C9   FORMAT(5F10.2,4F5.2)
C DO SUSPENDED SOLIDS ONLY
       IF(OPT.EQ.80)GOTO  10
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
        STEP 2
              *
              *
              *
READ BETA PARAME TERSAND K2 AT 20 DEGREES C

    READ (UN, 1004) BETA1.BETA2,BETA3,K2SPEC
    WRITEUOUT.1001) BETA1 ,BETA2 ,BETA3,K2SPEC
    *
    *
        STEP 3
              *
              *
READ SBA-AREAL BENTHIC UPTAKE RATE (GM 02/M2/DAY)
     K2ADJ -FOR CALIBRATION OF K2
     DIST1-DISTANCE URBAN AREA TO CALIBRATION PT
     DIST2-OISTANCE OF REACH
     E - TIDAL DISPERSION COEFF

    READ (UN, 1009) SBA,K2ADJ,DI ST 1 ,0 IST2.E ,K1 HI ,K 1H2.K 1USF.K1D VF
    IF(K2ADJ.EQ.O.O)K2AOJ=1.0
    IF(K1W1.EC.O.C)K1H1=0.40
    IF(K1W2.EQ.O.O)K1W2=0.16
    IF(K1USF.EQ.O.O)K1USF=0.16
    IF(K1DWF.EQ.O.O)K1DMF=0.23
   HRITE(IOUT,1002) SBA,K2ADJ,DIST1,D IST2 ,E ,K1W1,K1H2,K1USF,K 1 DHF
    *
    *
    *
        STEP
              *
              *
C
C
C
C
C
C
C
C READ FOR EACH MONTH
C
C
C
C
C
                    T   WATER TEMPERATURE
                    DUS DO DEFICIT (MONTH 1,1=1,12)
                    CC  CHLORIDE CONC
                   BOD
                    TKN          B - 11
                    SS
 00024200
 00024300
,00024400
 00024500
 00024600
 00024700
 00024800
 00024900
 00025000
 00025100
 00025200
 00025300
 00025400
 00025500
 00025600
 00025700
 00025800
 00025900
 C0026000
 00026100
 00026200
 00026300
 00026400
 00026500
 00026600
 00026700
 00026800
 00026900
 00027000
 00027100
 00027200
 00027300
 00027400
 00027500
 00027600
 00027700
 00027800
 00027900
 00028000
 00028100
 00028200
 00028300
 00028400
 00028500
 00028600
 00028700
 00028800
 00028900
 00029000
 00029100
 00029200
 00029300
 00029400
 00029500
 00029600
 00029700
 00029800
 00029900
 00030000
 00030100
 00030200

-------
C
10
20
     1
                       PE
      WK1TE(IOUT,1006)
       DO 20 1=1 ,12
       READUIN.1004) Tm,DUS(I),CC(I),BODUSF(I>fSSUSF(I>,TKNUSF( 1) ,
       PBUSF(I)
       WRITEUOUT.10C5) I ,T( 1 ) ,DUSM ) ,CC(I ) .EODUSF ( I ) .SSUSF (I ) ,
       TKNUSF(I),PBUSF(I)
       1F(CPT.NE.82)GOTO  40
       READ UIN,1007MTA(n.I = l,4i
       READ ( IIN,1007)UH(I) ,1=1,*)
       READ tIIN,1007)(FH(n.I = l,4)
40
C
C
C
C
C
C
C
C
C




**
*
*
Jt
•V
**

CONTINUE

**********

STEP 5

**********

RETURN TO CALL




RE TURN
END


**
*
A
*
**

ING



C
C
C
C
                    MODULE
                           BODRW ******************************

       SUBROUTINE BODRW (QST.BST , CCS , BCS.QSF.CDR, MTH.
     1 FDO.FDOXl.TST.TCS.BODTC.BODTN.I.MTI.MO.ULOC.ULOS.CDO.DOMIN)
      COMMON /GLOBAL/IDT, NYRtLOC( 10 ), IRN 1 ,IHSD
       COMMON /GLOBL1/ALF1,ALF2,BETA1,BETA2,BETA3,SBA,K2ADJ,DIST1,
     1 DIST2.E,T(12),DUS(12)',CC(12).ODH(42),BODDW,SSDW,TKNDW,PBDH,
     2 EODUSF(12),TKNUSF(12),SSUSF(12),PBUSFU2),K2SPEC,DDH,
     3 K1H1.K1M2.K1USF.K1DMF
       DIMENSION FDOC16)  .FDOXH16) ,CDO<7)
       DIMENSION TEMDH50)
C
C
C
  THIS IS THE DO BUDGET MODEL
       REAL
       REAL
       REAL
       REAL
       REAL
       REAL
       REAL
       REAL
            K1,K2,K2ADJ.K2MIN,J1,J2
            LO.LON.K2SPEC
            K1W1.K1W2.K1USF.K1DHF
            J11.J12.J13,J14,J15,J16.J17

            LC1,L02,L03,L04
            K3,J3,MIC,M2,MIN,LON1,LON2,LON3,LON4
          = 2
-------
c
13     V=ALF1*QT**ALF2
C IF V IS ZERO THEN  INVALID DATA-ABORT  JOB
       IF(V.EO.O.OJSTOP 100
C STEP 3
C
C COMPUTE H DEPTH OF FLOW  (IN FEET)
C
       H=BETA1*QT**BETA2+BETA3
C IF H IS ZERO THEN  INVALID DATA-ABORT  JOB
       IF(H.EO.O.O)STOP 110
C STEP 4
C
C COMPUTE LO - INITIAL BOD LOAD  (MG/L)
C.        BOOT-TOTAL  BOD (# PER DT)

       L01=QST*6ST
       LD2=QCS*BCS
       L03=QSF*BODUSF(MTH)
       ULOC=AWP(OSF,IDT,BODUSF{MTH))
       L04=QDR*BODDN
       LO=(L01+L02+L03+L04)/QT
       BODTC=AWP(OT,IDT,L01
C
C
c
c
c
c
c
c
c
c
c
c
c
c
c
STEP 5

COMPUTE LON -INITIAL NBOD LOAD (MG/L»
        BODTN-TOTAL NBOD (# PER DT)

     LQN1=CST*TST*4.57
     LON2=QCS*TCS*4.57
     LDN3=OSF*TKNUSF(MTH)*4.57
     T1=TKNUSF(MTH)*4.57
     ULON=AWP(QSF,IDT,T1)
     LON4=QOR*TKNDW*4.57
     LON={LON1+LON2+LON3+LON4)/QT
     BODTN=AWP(QTtIDT,LON)
STEP 6

COMPUTE DO-INITIAL DO DEFICIT (MG/L)

     DO = (DUS(MTH)*CSF-»DDH*QDR)/QT
STEP 7

CALCULATE TEMPERATURES
ASSUMES TEMPERATUR READ IS FOR 15TH OF THE MONTH
FOR BEGINNING OF NEW MONTH
     IFCMTH.NE.MO)MTI=1
     IF(MTH.NE.MO)MO=MTH

     IFfMTH.NE.DGOTO 1
     TEMP=T(1)
     GOTO 10
     IF(MTH.NE .12)GOTO 2
     TEMP=T(12)
     GOTO 10
FOR MONTHS 2 TO 11 CALC BEGINNING OF MONTH TEMPERATURE
     CONTINUE
     IF(T(MTH).GT.T(MTH-1))GOTO 3
FOR T(MTH>.LE.T(MTH-1)            B - 1J
                  .5*(T(MTH)-T(MTH-D)
00036400
00036500
00036600
00036700
00036800
00036900
00037000
00037100
00037200
00037300
00037400
00037500
00037600
00037700
00037800
00037900
00038000
00038100
00038200
00038300
00038400
00038500
00038600
00038700
00038800
00038900
00039000
00039100
00039200
00039300
00039400
00039500
00039600
00039700
00039800
00039900
00040000
00040100
00040200
00040300
00040400
00040500
0004060O
00040700
00040800
00040900
00041000
00041100
00041200
00041300
00041400
00041500
00041600
00041700
00041800
00041900
00042000
00042100
00042200
00042300
00042400

-------
       GOTO 4
3      CONTINUE
C FOR T(MTH).GT.T(MTH-1)
       TEMPB=T(MTH)-.5*(T(MTH)-T(MTH-1>)
4      CONTINUE
C FOR MONTHS 2 TO 11 CALCULATE END OF MONTH TEMPERATURE
       IF(T(MTH).LE.T(MTH+1))GOTO 5
C FOR T(MTH).GT.T(HTH+1)
       TEMPE=T(MTH)-.5*(T(MTH)-T(MTH+1>)
       GOTO 6
5>      CONTINUE
C FOR T(MTH).LE.T(MTH+1)
       TEMPE=T(MTH)+.5*(T(HTH)-T(MTH+1»
6      CONTINUE
        DELTAT=(TEMPE-TEMPB)/(30.0*NTP)
C COUNT FROM BEGINNING OF MONTH FOR 30*NTP EVENTS
      TEMP = TEMPB-»MTI*DELTAT
       MTI=MTI+1
10     CONTINUE
C COMPUTE OOSAT -SATURATION VALUE OF DO (MG/L)
C CORRECT FOR TEMP (DEGREES CELSIUSI
C
       DOSAT=14.652-0.410222*TEMP+0.00799*TEMP**2
     1 -0.00007777*TEMP**3
C CORRECT FOR CHLORIDE CONC (MG/L)
       CHL=CC(MTH)
       OOSAT=DOSAT*(1.0-CHL/100000)
C STEP 8
C
C COMPUTE Kl -WASTE DECAY COEFF
C
       K11=L01*K1W2
       K12=L02*K1W1
       K13=L03*K1USF
       K14=L04*K1DHF
       K1=(K11+K12+K13-HU4)/(L01+L02+L03+LQ4)
       WRITE(6,1021)TEMP
       FORMAT(1X,E10.5)
       K1=K1*1.047**(TEMP-20.0)
       URITE(6,1021)K1
C
1021

C
C
C STEP 9
C
COMPUTE ULTIMATE BOD DEMAND FACTOR
       XF=1.0-EXP(-5.0*K1)
       FACTOR=1.0/XF
       LO=LO*FACTOR
C STEP 10
C
C COMPUTE K2-STREAM REARATION RATE (I/DAY)
C
C THE K2 VALUE IS COMPUTED FROM ONE OF THREE
C       OR IS GIVEN BY K2SPEC
C EMPIRICAL EQUATIONS AND ADJUSTED FOR
C TEMP AND MINIMUM VALUES AS FOLLOWS:
C
       1F(K2SPEC.GT.O.O)GOTO 46
       IF(H.GT.2.0.AND.V.LE.2.5) GO TO 20
       IF(H.GT.2.0.AND.V.GT.2.5) GO TO 30
       GO TO 40                      B -  14
00042500
00042600
00042700
00042800
00042900
00043000
00043100
00043200
00043300
00043400
00043500
00043600
00043700
00043800
00043900
00044000
00044100
00044200
00044300
00044400
00044500
00044600
00044700
00044800
00044900
00045000
00045100
00045200
00045300
00045400
00045500
00045600
00045700
00045800
00045900
00046000
00046100
00046200
00046300
00046400
00046500
00046600
00046700
00046800
00046900
00047000
00047100
00047200
00047300
00047400
00047500
00047600
00047700
00047800
00047900
00048000
00048100
00048200
00048300
00048400
00048500

-------
20     K2=12.9«V**0.5/H**1.5
       GO TO  45
30     K2=ll.fr*V**C.969/H«*1.673
       GO TO  45
40     K2=21.74*V**C.67/H**l.e5
45     GOTO 48
46     K2=K2SPEC
C  IF NO VALUE ENTERED  MAKE  K2ADJ=1
48     IF(K2ADJ.EQ.O.O)  K2ADJ = 1 .0
C  ADJUST K2
       K2=K2ACJ*K2
C  CORRECT FOR TEMP
       K2=K2*I.024**(TEMP-20.0)
C  CALCULATE MINIMUM  VALUE OXYGEN EXCHANGE
       K2M1N=2.0/H
       IF(K2MIN.GT.2.0)K2MIN^2.0
C  USE LARGER  K2 VALUE  K2 = MAX(K2,K2MIN )
       IF(K2MlN.GT.K2)K2=K2MIN
C  MAKE SURE K2 NOTECUAL  Kl  -  MAKES  D UNDEFINED
       IF(K2.EO.K1)  K2=C.99*K2
C
C  STEP 11
C
C  COMPUTE K3  ASSUMING  K3=0.10 AT 20 DEGREES  C
C
       K3=0.10*1.017**{TEMP-20.0)
       IF(K3.EQ.K2)K3=0.99*K3
C  STEP 12

C  COMPUTE SB  -BOTTOM SEDIMENT UPTAKE RATE  (MG/L/DAY)
C
C  CONVERT SBA TO (MG/MSC/DAY) TO (MG/L/DAY)
       SB=SBA*3.281/H
C  CORRECT UPTAKE FOR TEMP
       SB=SB*1 .065**(TEMP-20.0)
C  STEP 10
C
C  CHECK FOR AN ESTUARY
C
C  IF AN ESTUARY GO TO  STEP  13-A
       IF(fc.GT.O.O)  GO  TO 47
C  OTHERWISE GO TO STEP  13-B
       GO TO  75
47     CONTINUE
C  STEP 13-A
C
C  COMPUTE MIC,M2,MIN,J1,J2,J3
C
C  VF VELOCITY (MILES/DAY)
       VF=V*86400/5280
E4=4.0*E
E2=2.0*E
TK1=E4*K1
TEM1=1.0+(TK1/VF2>
MIC=SQRT(TEM1)
TK2=E4*K2
TEM2=1.0+(TK2/VF2)
M2=SORT(TEM2)
TK3=E4*K3
TEM3=1.0*(TK3/VF2)
                                         , _
                                       -  13
00048600
00048700
00048800
00048900
00049000
00049100
C0049200
00049300
00049400
00049500
00049600
00049700
00049800
00049900
00050000
0005C100
00050200
00050300
00050400
00050500
00050600
00050700
00050800
00050900
00051000
00051100
00051200
00051300
00051400
00051500
00051600
00051700
00051800
00051900
00052000
00052100
00052200
00052300
00052400
00052500
00052600
00052700
00052800
00052900
00053000
00053100
00053200
00053300
00053400
00053500
00053600
00053700
00053800
00053900
00054000
00054100
00054200
00054300
00054400
00054500
00054600

-------
       IF(DOXY
       IF(DOXY,
       IFtOOXY,
       IFtDOXY,
       IF(DOXY,
               LT
               LT
               LT
               LT,
               LT
                               .0
                               .0
                               .0
                               .0
                               .0
                               .0
                               .0
50

C
C
75
     MIN=SGRT(TEM3)
     J1=VF*(1.0-MIC)/E2
     J2=VF*(1.0-M2)/E2
     J3=VF*(1.0-MIN)/E2
     DELTAX=DIST2/50.0
     x=o.o
     DC=L.O
     DO 50 J=l,50
     CALL DOt(X,hlC,M2,MIN,Jl,J2»J3,Kl,K2,K3,LD,LON,SB,DO,Dl)
ACCUMULATE TIME AVERAGED DO SUMMARY
     DOXY=DOSAT-D1
     IF(LOXY.LE.O.O)CCO(1)=CDO<1)+1
                  0)CDO(2)=CDO(2)+1
                  0)CDn(3)=CDO(3)+l
                  0)CDO(4)=CDO(4)+1
                  G}CCO(5)=CDO(5)+1
                  Q)CDC(6)=CDD<6)+1
     IF(DOXY.LT.6.0)CDOm=CDO(7)+l
     IF (Dl .GT.DC)DC=D1
     X=X+DELTAX
     TEMD1(J)=D1
     CONTINUE
     GO TO 63
STEP 13-B
COMPUTE DC FOR A STREAM (E=0)
     VF=V*86<»CO/5280
     TMAX=DIST2/VF
     DELTAT=TMAX/50.0
     TIM^O.O
     DC=0.0
     DO 80 J=lt50
     CALL DDS
-------
       CALL DOSCTXl,Kl,K2,K3,LG,LON,S6,DOtDl)
       DOX1=DOSAT-D1
       GO TO 100
85     CONTINUE
C FOR ESTUARY  (E =0)
       X=DIST1
       CALL DOE(XtMIC,M2,MIN,Jl,J2,J3,Kl,K2,K3,LO,LON,SB,DO,Dl)
       DOX1=DOSAT-D1
100    CONTINUE
C STEP 16
C
C CUMULATIVE FREQUENCY  DO
C
       CALL CFOO (DOHIN.FDQ)
C
C CUMULATIVE FREQUENCY  DDX1
C
       IF(DIST1.NE.O.O)CALL CFDQ(DDX1.FDOX1)
C STEP 17
C
C RETURN TO CALLING MODULE
150

C
C
C
       RETURN
       END
                       CCT «*«****«*****««****««*
10

C
C *
C
       FUNCTION CCT(PH.A)
       REAL Kl ,K2
       Kl=4 .45E-7
       K2=4.69E-11
       HP=1.0/(10.0**PH)
       OH=1.0L-14/HP
       ALF10=(HP/K1 )-»(K2/HP)-H.O
       ALF1=1.0/ALF10
       ALF2Q=(HP*HP)/(K1*K2)
       ALF2=1.0/ALF2G
       CT1=A-OH+HP
       CT2=(ALF1+2*ALF2)
       CCT^CT1/CT2
       RETURN
       END
                     CFDO  **#$*****#***«************«****##«****
C
C
C
       SUBROUTINE CFDO  (DO, FDD)
       DIMENSION FDOU6)

   CUMULATIVE FREQUENCY DO
C ACCUM FREQ OF DO ON RANGES SPECIFIED
IF
IF
IF
IF
IF
IF
IF
IF
(00
(DO
(DO
(DO
(DO
(DO
(DO
(DO
.LE
.LE
.LE
.LE
.LE
.LE
.LE
.LE
.1
.2
.3
.5
.6
.7
.8
.C)
.0)
.0)
.C)
.C)
.0)
.0)
.0)
GOTO 1
GO TO
GO TO
GO TO
GO TO
GO TO
GO TO
GO TO
0
20
30
50
6C
70
80
                                    B - 17
00060800
00060900
00061000
00061100
00061200
00061300
00061400
00061500
00061600
00061700
00061800
00061900
00062000
00062100
00062200
00062300
00062400
00062500
00062600
00062700
00062800
00062900
00063000
00063100
00063200
00063300
00063400
000635CO
00063600
00063700
00063800
00063900
00064000
00064100
00064200
00064300
00064400
00064500
00064600
00064700
00064800
00064900
0006500O
00065100
00065200
00065300
00065400
00065500
00065600
00065700
00065800
00065900
00066000
00066100
00066200
00066300
00066400
00066500
00066600
00066700
00066800

-------
IF
IF
IF
IF
IF
IF
IF
(00
(DO
(00
(00
(DO
(00
(00
.LE,
.LE,
.LE,
.LE,
.LE,
.LE,
.LE,
.9.
.10
.11
.12
.13
.14
.15
0)
.0)
.0)
.0)
.0)
.0)
.0)
                      GO TO 90
                       GO TO 100
                       GO TO 110
                       GO TO 120
                       GO TO 130
                       GO TO 140
                       GO TO 150
       FDO(16)=FDO(16)+1.0
       GO TO 200
10     FDO(1)=FDO(1H1.C
       GO TO 200
20     FOO(2)=FDO(2)+1.0
       GO TO 200
30     FDO(3)=FOO(3)+1.0
       GO TO 200
40     FDO(4)=FDO(4)+1.0
       GO TO 200
50     FOO(5)=FOO(5)*1.0
       GO TO 200
€0     FDO(6)=FDO(6)+1.C
       GO TO 200
70     FDQ(7)=FDO(7)+1.G
       GO TO 200
80     FDO(8)=FDO(8)+1.0
       GO TO 200
90     FDO(9)=FDO(9)+1.0
       GO TO 200
100    FDO(10)=FDO(10)+1.0
       GO TO 200
110    FDO(11)=FDO(11)-U.O
       GO TO 200
120    FDO(12)=FDO(12)+1.0
       GO TO 200
130    FDO(13)=FDO(13)+1.0
       GO TO 200
140    FDO(14)=FDO(14J+1.0
       GO TO 200
150    FDO(15)=FDO(15)+1.0
2CO    RETURN
       END
C
C
C
            CFPB ************************
SUBROUTINE
DIMtNSION F
IF(P8.GE.O.
IF (PB
1F(PB
1F(PB
IF (PB
1F(PB
IF(PB
1F(PB
IF(PB
1F(PB
IF (PP
IF(PB
IF(PB
IF (PB
IF (PB.LT.O.
IF(PB.LT.O.
            ,LT.
            .LT,
            .LT,
            .LT,
            .LT.
            .LT,
            .LT.
            .LT,
            .LT.
            .LT,
            .LT.
            .LT.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
CFPB(PB.F)
(20)
O.ANO.PB
01OGOTO
015)GOTO
020)GOTO
025)GCTO
030)GOTO
035)GOTO
040)GOTO
045)GOTO
050)GOTO
06)GOTO
 LT.0.005)GOTO 10
 20
 30
 40
 50
 60
 70
 60
 90
 ICO
110
             .LT.O.
07)GOTO 120
08)GOTO 130
09)GOTO 140
1)GOTO 150
2)GOTO 160
                                    B - 18
00066900
00067000
00067100
00067200
00067300
00067400
00067500
00067600
00067700
00067800
00067900
00068000
00068100
00068200
00068300
00068400
00068500
00068600
00068700
00068800
00068900
00069000
00069100
00069200
00069300
00069400
00069500
00069600
00069700
00069800
00069900
00070000
00070100
00070200
00070300
00070400
00070500
00070600
00070700
00070800
00070900
00071000
00071100
00071200
00071300
00071400
00071500
00071600
00071700
00071800
00071900
00072000
00072100
00072200
00072300
00072400
00072500
00072600
00072700
00072800
00072900

-------
10
20
30
tO

70

fcC

90

100

11G

120

130

140

150

160

17<

180

190

200
250
IF(Pe.LT.G.3)GOTO
1F(PB.LT.C.4)GOTO
IF(PB.LT.G.5)tOTO
GOTO 2C3
F(l)=F(l)4l
GOTO 250
F(2)=F(2)+1
GOTO 250
F{3)=F(3)+1
GOTO 250
F(4)=F(4)+1
GOTO 250
F(5)=F(5)-H
GOTO 253
F(6)=F(6) + 1
GOTO 250
F(7)=F(7)+1
GOTO 250
F(8)=F(8)4l
GOTO 250
F(9)=F(9)*1
GOTO 250
F(10)=FUO)4l
GOTO 250
 F(11)=F{11)-»1
GOTO 250
F(12)=F(12)*1
GOTO 250
F(13)=F(13)+1
GOTO 250
F(14)=F(14)+1
GOTO 253
F(15)=F(15)+1
GOTO 250
F(16)=F(16)+1
GOTO 253
FI17}=F(17)+1
GOTO 250
F(18)=F(18)4l
GOTO 253
FU9)=F(19)-U
GOTO 25D
F(20)=F(20)«1
CONTINUE
RETURN
END
                         170
                         180
                         190
                      ChSS **************«**«**«**«««««***«*«****«*«*
      SUBROUTINE CFSS (SST.FSS)
C CUMULATIVE FRECUENCY OF SUSPENDED SOLIDS
       DIMENSION FSSC21)
C DEFAULT IS SST>500
       IF (SST.LE.25.0) GO TO 10
       IF (SST.LE.50.0) GO TO 20
       IF (SST.LE.75.0) GO TO 30
       IF (SST.LE. 100.0) GO TO 40
       IF (SST.LE. 125.0) GO TO 50
       IF (SST.LE. 150. 0) GO TO 60   B - 19
       IF (SST.LE. 175.0) GO TO 70
C0073COO
00073100
00073200
00073300
00073400
00073500
00073600
00073700
00073800
00073900
00074000
OOC74100
00074200
00074300
00074400
00074500
00074600
00074700
00074800
00074900
00075000
C0075100
00075200
00075300
00075400
00075500
00075600
00075700
00075800
00075900
00076000
00076100
00076200
00076300
00076400
00076500
00076600
00076700
00076800
00076900
00077000
00077100
00077200
00077300
00077400
00077500
00077600
00077700
00077800
00077900
00078000
00078100
00078200
00078300
00078400
00078500
00078600
00078700
C0078800
00078900
00079000

-------
1C
feu

90

100

110

12C

130

140

150

16C

170

18D

190

200

300

C
C«$
c
IF
IF
IF
IF
IF
IF
IF
IF
IF
IF
IF
IF
IF
{SST
(SST
(SST
(SST
(SST
(SST
(SST
(SST
(SST
(SST
(SST
(SST
(SST
•
•
•
•
•
•
•
*
*
*
•
•
•
LF
LF
LE
LE
LE
LE
LE
LE
LE
LE
LE
LE
LE
.200,
.225,
.25C,
.275,
.300,
.325,
.350,
.375.
.400.
.425.
.450.
.47f .
.50C.
,0)
,0)
.0)
.C)
.0)
.0)
,0)
,0)
.0)
,0)
,0)
. 0)
.0)
GO
GO
GO
GO
GO
GO
GO
GO
GO
-GO
GO
GO
GO
TO
TO
TO
TO
TO
TO
TO
TO
TO
TO
TO
TO
TO
EO
90
100
110
120
130
140
150
160
170
180
190
200
FSS(21)=FSS<21)+1.0
GC TO 300
FSS(1) = FSS(1M1.C
GO TO 300
FSS(2) = FSS(2)-U.C
GO TO 300
FSS(3)=FSS(3)+1.0
GU TO 300
FSS(4)=FSS(4}+1 .C
GO TO 330
FSS(5)=FSS(5)-»1.G
GO TO 3jO
FSS(6)=FSS(6H1.C
CO TO 300
       GO TO 3'JC
       FSS(8)-FSS(E
       GO TO 300
       FSS(9) = FSS(9
       GO TO 300
        FSS(10)=FSS
       GO TO 300
        FSS(11)=FSS
       GO TO 300
        FSS(12)=FSS
       GO TO 330
        FSS(13)=FSS
       GO TO 3JO
        FSS{14)=FSS
       GO TO 300
        FSS(15) = FSS
       GO TO 3JO
        FSSU6)=FSS
       GO TO 300
        FSS(17)^FSS
       GO TO 330
        FSS(18) = FSS
       GO TO 3JC
        FSS(19)=FSS
       GO TO 3 DO
        FSS(20)=FSS
       GO TO 300
       RETURN
       END
            )-»1.0

            H1.G

            (10)-»1 .0

            (11)+1.0

            (12)+1.0

            (13)-»1.0

            (14)+1.0

            «15)+1.0

            U6M1 .0

            (17)-tl.O

            (18)+1.C

            (19H1.0

            (2C)*1.0
                       CKSEL

       SUBROUTINE CKSEL (SEL,*)
                              B -  20
00079100
C0079200
C0079300
00079400
00079500
00079600
00079700
00079800
00079900
00080000
00080100
00080200
00080300
00080400
00080500
00080600
00080700
00080600
00080900
00081000
00081100
00081200
00081300
00081400
00081500
00081600
00081700
00081600
00081900
00082000
00082100
00082200
00082300
00082400
00082500
00082600
00082700
00082800
00082900
00083000
00083100
00083200
00083300
00083400
00083500
00083600
00083700
00083800
00083900
00084000
00084100
00084200
00084300
00084400
00084500
00084600
00084700
00084800
00084900
00085000
00085100

-------
c
c
c
c
c
c
c
c
c
1001
1009
1010
102C
1030
1040
1050
1060
1070
1071
1080
1081
10b2
     COMMON /IO/IIN.IRIV.IOUT
     INTEGER  SEL(8)

THIS MODULE VALIDATES THE OPTIONS SELECTED
 IF AN ERROR THIS MODULE PRINTS MESSAGE AND ABORTS  J3B
EXAMPLES OF COMPLETE
1020304050607082
1020304050607162
 RUNS ARE:
      FORMATCIX,//,TIC,"INVALID OPTIONS
     FORMATC//T2,'OPTIONS SELECTED  :')
                    SELECTED',SOX,12))
     FORMAT(T2,'10
     FORMAT(T2,'20
     FORMATd2,'3C
                .EO,
                .EC
                .EQ
                .EC
                  10JGO
                  60) GO
                  70) GO
                  71) GO
               EQ.101GO
               E0.201GO
               EC.30)GO
               E0.40JCO
  FORMAT(T2,'40
  FORMAT(T2,'50
  FOFMATCT2,'60
  FORMAT(T2,'70
  FORMAT{T2,'71
  FORMAT(T2,'80
  FORMAT(T2.'61
  FORMAT(T2,'82
1SE')
  IF(SEL(1)
  IF(SEL(l)
  IF(SELd)
  IF(SELd)
  GOTO 900
  CONTINUE
  DO  6 1=2,8
  IF(SEL(I).EC
  IF(SELd)
  IF(SELd)
  1F(SEL(
  IF(SEL(
  IF(SEL(
  IF(SEL(
  IF(SEL(I)
  IF(SELd)
  IF(SELd)
  IF(SEL(I)
  IF(SELd)
  GOTO 900
  CONTINUE
  IF(SELd-l)
  GOTO 900
  CONTINUE
  WRITE(IOUT,1C09)
  00  100 1=1,8
  IF(SELCI)
  IF(SEL( I)
  1F(S£L(I)
  IF(SEL( I)
  IF(SELd)
  IF(SEL( 1)
  IF(SELd)
  1F(SEL( I)
  1F(SEL(1)
RAINFALL SIMULATOR')
RUNOFF BY SCS EQUATION')
POLLUTANT HASHOFF')
EXCESS INFILTRATION')
STORAGE TREATMENT')
DRY WEATHER FLOW)
DAILY STRFAMFLOW)
MCNTHLY STREAMFLOW SIMULATION')
SUSPENDED SOLIDS RESPONSE')
SUSPENDED SOLIDS AND DISSOLVED OXYGEN RESPON
SUSPENDED SOLIDS,DISSOLVED OXYGEN, AND LEAD
    TO
    TO
    TO
    TO
5
5
5
5
                    0)GO TO 8
                          TO
                          TO
                          TO
                          TO
               ,EO,
               EC
               ,EQ
               ,EQ
               ,EO,
               ,EQ
               tEQ
                    50)GDTO
                    60)GOTO
                    70)GOTO
                    71JGOTO
                    80)GOTO
                    8DGOTO
                    B2)GOTO
                   LT.SFL(I))GO TO 8
I)
I)
I)
I)
I)
1)
I)
I)
1)
1)
.EO
.EO
.EC
.EC
.EQ
.EC
.EC
.EO
.EG
.EO
.10)GO
.2C) GO
.30)GO
.40JGC
.60)GO
.70) GO
. 7 1 ) GO
.eo)co
.fl)GO
TO
TO
TO
TO
TO
TO
TO
TO
TO
TO
10
20
30
40
50
60
70
71
80
81
                                    B - 21
      00085200
      00085300
      00085400
      00085500
      00085600
      00085700
      00085800
      00085900
      00086000
      00086100
      00086200
      00086300
      00086400
      00086500
      00086600
      00086700
      00086800
      00086900
      00087000
      00087100
      00087200
      00087300
SE'I   00087400
FESPON00087500
      00087600
      00087700
      00087800
      00087900
      00088000
      00088100
      00088200
      00088300
      00088400
      00088500
      00088600
      00088700
      00088800
      00088900
      00089000
      00089100
      00089200
      00089300
      00089400
      00089500
      00089600
      00089700
      00089800
      00089900
      00090000
      00090100
      00090200
      00090300
      00090400
      00090500
      00090600
      00090700
      00090800
      00090900
      00091000
      00091100
      00091200

-------
       IF(SEL(I).EQ.82)GO TO 82
       GO TO 100
10     WRITE(IOUT.IOIO)
       GOTO 1CD
20     WRITE(IOUT,1G20)
       GOTO 100
30     WRITEUOUT.1C30)
       GOTO ICO
40     WRITE(10UT,1040)
       GOTO 100
£0     WR1TEUOUT,1050)
       GOTO 100
60      WR1TEUOUT.1G60)
       GOTO 100
70     WRITE(IOUT,1070)
       GOTO 100
71     WRITE(IOUT,1071)
       GOTO 100
60     WRITEUOUT.lGeO)
       GOTO 100
Cl     WR1TE(IOUT,1C£1>
       GOTO ICO
82     WRITEUOUT.1082)
IOC    CONTINUE
8CO      RETURN
900      HRITE(IOUT,1001)SEL
         RETURN 1
       END
  ERROR CODES
  300     INVALID OPTIONS
   305    NOT ENOUGH DATA FOR STREAMFLDH
  100     INVALID ALPHA VALUES FOR STREAMFLOW VELOCITY
  110     INVALID BETA VALUES FOR STREAMFLOW DEPTH
C
C
C
C
C
C
                       «** DFN **************************
       FUNCTION DFN(TA,CT,C1,C2,U)
               ) + 1.0-»(C2/U)
       T2=<(U*U)/(C1*C2))+1.0-»(U/C2)
       T3=1/(T1*T1)
       T4=-1.C*CT*T3
       T5=<1/C1)-(C2/
-------


c



c



c

c



c
f J
C-1
c


c




c



c



c

c



c
c*
c

c
c
c
c
c
c
c
c
c
c
c
c
c

c


c
C=EXP(J21*XI )
DEF1=A*(B-C)
COMPUTE DEFICIT DUE TO NBOD
D=(K31*LON1)/(K21-K31)
E=EXP(J31*X1)
DEF2=D*(E-C)
COMPUTE DEFICIT DUE TO SEDIMENT DEMAND
F=SP1/K21
G=1.0-EXP(J21*X1)
DEF3=F*G
COMPUTE DEFICIT DUE TO INITIAL DEFICIT (DO)
DEF4=D01*EXP(J21*X1)
COMPUTE TOTAL DEFICIT Dl
D11=DEF1+DEF2+DEF3*DEF4
RETURN
END

f ************************* DOS ***********************************
SUBROUTINE DOS( T 1 ,K11 »K2 1 ,K31 ,L01 ,LON1 , SB1 ,D01 ,D 11 )
REAL K11.K21.K31 ,L01,LON1
COMPUTE DEFICIT DUfc TO C8DD
A=(K11*L01)/(K21-K11)
B=EXP(-1.0*K11*T1)
C=EXP(-1.0*K21*T1)
DEF 1-A*(B-C)
COMPUTE DEFICIT DUE TB NBOD
D=(K31*LON1)/(K21-K31)
E-EXP{-1. C*K31*T1 }
DEF2=D*(E-C)
COMPUTE DEFICIT DUE TO SEDIMENT DEMAND
F=SB1/K21
G=1.0-C
DEF3=F«G
COMPUTE DEFICIT DUE TC INITIAL DEFICIT (DO)
DEF4=rD01*C
COMPUTE TOTAL DEFICIT
D11=DEF1+DEF2+DEF3+DEF4
RETURN
END

?***«*«i^**««4$«*$$$ DRY **********************************

SUBROUTINE DRYWEA
THE DRY-WEATHER FLOW SIMULATOR WILL GENERATE RANDOM OBSERVATIONS
OF DRY-WEATHER FLOW, THE MEAN DAILY DRY-WEATHER FLOW DERIVED FROM
OBSERVED DATA.

INPUT DATA WILL BE

THE SPECIFIC RANDCM VARIABLE TO BE GENERATED IS:
1. THE DRY-WEATHER FLOW RATE PER UNIT OF TIME

AUTHOR - MIKE MARA

DATE DECEMBER 1977

CONTINUE



B - 23
00097400
00097500
00097600
00097700
00097800
00097900
C0098000
00098100
00098200
00098300
00098400
00098500
00098600
00096700
00096800
00098900
00099000
00099100
00099200
C0099300
00099400
00099500
00099600
00099700
C0099800
00099900
00100000
00100100
00100200
00100300
00100400
00100500
00100600
00100700
ooiooeoo
00100900
00101000
00101100
00101200
00101300
00101400
00101500
00101600
00101700
00101800
00101900
00102000
00102100
00102200
00102300
00102400
00102500
00102600
00102700
00102800
00102900
00103000
00103100
00103200
»n r\ i A *2 tiA A
"UU 1U->3UU
00103400

-------
    NAME
               DESCRIPTION/DIMENSION
    IDT      LENGTH OF 1 TIME UNIT  (HOURS)
    BQDW     MEAN DAILY DRY WEATHER FLOW  (CFS)
    BDDDK    BOD              DRY-WEATHER CONCENTRATION  (MG/L)
    SSDW     SUSPENDED SOLIDS DRY-WEATHER CONCENTRATION  (MG/L)
    TKNDW    TKN              DRY-WEATHER CONCENTRATION  (MG/L)
    PbDW     LEAD             DRY-WEATHER CONCENTRATION  (MG/L)
    OUTPUT VARIABLES 	

    NAME     DESCRIPTION/DIMENSION
c
c
t
c
c
c
c
c
c
c
c
c
c
c
f
c
c
c
c
c
c
c
c
       COMMON /GLOBAL/IDT,MYR,LOC(10).IRN1.IWSD
       CCMMON /GLOBL1/ALF 1.ALF2.BETA1 ,BETA2,BETA3,SBA,K2ADJ,D1ST1,
     1 DIST2.E ,T(12 ),DUS(12),CC(12),ODW(42),BODDW,SSDW,TKNDW,PBDW,
     2 BDDUSF(12),TKNUSF(12),SSUSF(12) ,PBUSF(12).K2SPEC,DDW,
     3 KIWI ,K1K2,K1USF,K1DWF
       COMMON /IO/I1N,IRIV,IOUT
       DIMENSION FDT(6) ,DFR(7),HRFR(24)
       REAL DFR/l.GE ,1.C4,0.92,1.03,1.00,0.96,0.95/
       REAL HRFR/D.fc.C.5,0.5,0.5,0.5,0.8,0.8,1.4,1.5,1.5,
     11.4,1 .4,1.3,1 .3,1 .3,1.2, l'.2,l .1 ,1.1,1 .0,1.0,0.8, 0.7,0.6/
1CCO   FORMAT(6F10.2)
1001   FORMAT(M',T2t,'CONTINUOUS  STORMWATER  POLLUTION  SIMULATION
COW
BDDDfc
SSDW
TKNDW
PEOW
DRY-WEATHER FLOW PER UNIT OF TIME (42) (CFS)
BCD
SUSPENDED
TKN
LEAD
DRY-WEATHER CONCENTRATION (MG/L)
SOLIDS DRY-WEATHER CONCENTRATION (MG/L)
DRY-WEATHER CONCENTRATION (MG/L)
DRY-WEATHER CONCENTRATION (MG/L)
     FORMAT(
     ,/,
     T30
     1'
     1
     2 ,12
     1T25
     2T24
     3T25
   5T25
           'FEBRUARY,1979',//
           ' INPUT TO DRY WEATHER  SUBMODEL*,201«-«),//,
             COW = '.F1C.2.1  CFS'/,
            BCDDW =  '.F1C.2,1 MG/L'/,
            SSDW = ',F1C.2,' MG/L'/,
            TKNDk =  ',F1G.2,' MG/L'/,
            PBDW = '.F1C.2,' MG/L'/,
           DDW = «,F10.2,« MG/L')
C STEP 1
C
C- READ BQDW,BODDW,SSDW,TKNDW,PBDW,DDW
C
       READ(I IN,1000) BCDW,BODDW,SSDW,TKNDW,PBDW,DDW
       WRITE (IOUT.1001) BQDW,BODDW,SSDW,TKNDW,PBDW,DDW
  ECHO THE INPUT
  STEP 2
- COMPUTE NUMBER CF PERIODS IN DAY
C
C
c
c
c
       NP=24/IDT
20     CONTINUE
C STEP 3
C
C CALCULATE ADJUSTMENT RATIOS
C
                                  B  -  24
      00103500
      C0103600
      00103700
      00103800
      00103900
      0010
-------
30
35
C STEP
C
C - CALC
     1=1
     DO 30 J=1,NP
     FOT(J)=D.O
     DO 30 J1=1,IDT
     FDT(J)=FDT(J)+HRFR{I)

      CONTINUE
     DO 35 J=1,NP
     FOT{J)=FDT(J)/IDT
      CONTINUE
     4
       THE DRYKWEATHER FLOW PER UNIT OF  TIME
       1 = 1
       DO
       DO
           IDA=1,7
           IHR=1,NP
40
C STEP
C
C
C
     COW(I)=BQDW*DFR(IDA)*FDT(IHR)
     1 = 141
      CONTINUE
     5
RETURN TO CALLING MODULE

     RETURN
     END
                        DSRD «**********«****««««*«**«*********
C
       SUBROUTINE DSRD  (NYRSTR,*)
       COMMON /IO/I1N.IPIV.10UT
       COMMON /GL08AL/IDT,NYR,LOC(10),IRN1,IWSO
       COMMON /STR2/GDUS(360,5),OMUS(12,5),QMSF{12),SDMSF(12),CCMSF(12)
C
C READ DAILY STREAMFLOW RECORDS
C
1000
1001
1002
1003
1004
1005
C GET
     FORMAHF6.3)
     FQRMATUX.'NOT
      JOB ABORTED')
     FDRMATU2)
     FORMAT!«1',T26,'CONTINUOUS
                      ENOUGH DAILY  STREAMFLOW DATA',/,
                                  STORMWATER  POLLUTION  SIMULATION
99
   I/,T30,'FEBRUARY,1979',///,
   1/T2,'INPUT FOR DAILY STREAMFLOH'.20(•-•)/,
   1//T2,'NUMBER OF YEARS OF STREAMFLOW FTEAD   ',
     FORMAT(//T2,'THE FIRST TEN VALUES ARE  :•/)
     FORMAT(T10,F6.0,' CFS')
    THE NUMBER OF YEARS OF STREAMFLOW TO BE READ
     READ(IRIV,1C02)NYRSTR
     IF(NYP.LT.NYRSTR)NYRSTR=NYR
     WRITt(IOUT,lCC3)NYRSTR
     DD 10 J=l,NYRSTR
     DO 10 1=1,360
     READ(IRIV,100G,EM)=99)QDUS{I,J}
     WRITEUOUT.1CG4)
     DO 2j 1=1,10
     KRITE(10UT,1GC5)QDUSU,1)
     CONTINUE
     RETURN
     KR1TE
-------
       END
C
c*****
C
                                EXXPON
C
C
C
C
C
C
C
C
C

C
C
C
C
C
C
C
C
C
      SUBROUTINE EXXPON(XMEAN,R)
C
C-GENERATE A RANDOM OBSERVATION
C-FROM AN EXPONENTIAL DISTRIBUTION
C
C
C
C
C
C
C
C
C
*
*
*
        STEP 1
                 *
                 *
  GET RANDOM NUMBER
      CALL RANDOM(X)
        STEP 2
  C/SLC  RANDOM VARIATE
      R=-1.J*(ALOG(X))*XMEAN
        STEP 3
  RETURN TL CALLING MODULE

      RETURN
      END
       FUNCTION FN(TA,CT,ClfC2.UJ

       T1=(U/C1)+1.C+(C2/U)
       T2=1.0/T1
       T3=((U*U)/(C1*C2))+1.0+(U/C2)
       T5=01/U
       FN=CT*(T2+T4)+T5-U-TA
       RETURN
       END
                        GMSF
      SUBROUTINE GMSF
       COMMON /IO/IlN,lFIVtIOUT
        CDKMON/GLOBAL/1DT,NYR.LOC(10)  .IRNl.IWSD
       COMMON /STR2/ODUS(360i5),QMUS(12t5),QMSF(12),SDMSF(12),CCMSF(12)
                           00115500
                           00115600
                           00115700
                           00115800
                           00115900
                           00116000
                           00116100
                           00116200
                           00116300
                           00116400
                           00116500
                           00116600
                           00116700
                           00116800
                           00116900
                           00117000
                           00117100
                           00117200
                           00117300
                           00117*00
                           00117500
                           00117600
                           00117700
                           00117800
                           00117900
                           00118000
                           00118100
                           00118200
                           00118300
                           00118*00
                           00118500
                           00118600
                           00118700
                           00118800
                           00118900
                           00119000
                           00119100
                           00119200
                           00119300
                           00119*00
                           00119500
                           00119600
                           00119700
                           00119800
                           00119900
                           00120000
                           00120100
                           00120200
                           00120300
                           00120*00
                           00120500
                           00120600
                           00120700
                             12080 0
                           00120900
                           00121000
                           00121100
                           00121200
                           00121300
luOO
       FORMAT( '1*,T26, 'CONTINUOUS STORMHATER
     l',/T30,                       B - 26
POLLUTION SIMULATION
                                                                  SYSTEM00121*00
                                                                        00121*10

-------
1001
1002
c
c
c
c
c
c
c
     1 'FEBRUARY,1979',//,T26,'MONTHLY  STREAMFLDW GENERATOR',//
     2 T2,'MONTH',T11,'YEAR',T21,'QUANTITY')
       FORKAT(1X,//,T3,12,T12,I2,T21,F10.2)
       CQRMAT(IX,//,T5,'AVERAGE ANNUAL  FLOW',F10.2)

      THIS MODULE GENERATES MONTHLY STREAMFLOWS
00121500
00121600
00121700
C0121600
  STEP 1

  GENERATE FIRST OBSERVATION  IN FIRST YEAR OF  SIMULATION

       ASUM=C.O
       IYEAR=1
       IMO=1
       ONMO=Ch'SF{l}
       SIG=SDMSF(1)
       CALL LOGNOR  (CNMO.SIG,VAL)
       QMUS(IMO,IYEAR)=VAL
       ASUM=ASUM+VAL
C STEP 2
C
C GENERATE MONTHLY  VALUES FOR MONTHS 2 TO 12
C
10     DO 20 IMO=2,12
       RAT10=SDMSFtlMO)/SDMSF(IMO-l)
       R = CCMSFUMO)
       SIG=SDMSF(1MO)
       QNMO=QMSFUMO)
       QNMOL1=QMSFUKO-1)
       QMUSL1= QMUSdMO-l.IYEAR)
15     CALL MARKOVCONMO.SIG,RATIO,QMUSL1 ,CNMOL1,VAL,R)
       ASUM=ASUM+VAL
20     QMUS(IMO,IYEAR)=VAL
21     CONTINUE
      WRITEUOUT.IOOO)
      00 25 1=1,12
25     hRITEUOUT.1001) I, IYEAR,OMUS( I , I YEAR )
       AVMUS=ASUM/12.0
       HRITE(10UT,1002)AVMUS
       ASUM=0.0
c
c
c
c
c
c
c
c
c

c
c
c
c
STEP 3
INCREMENT
IYEAR
STEP *
CHECK FOR


STEP


IF
5

COMPUTE



SIMULATION YEAR BY
=IYEAR+1
END OF SIMULATION

(IYEAR


FI



RST


.GT




.NYR


MONTH





)



GO


FLOW




TO


FOR

1

99


NE;

                                    YEAR
       IMO=1
       RATIO=SOMSF(1)/SDMSF(12)
       R=CCMSF(1)
       SIG=SDMSF(1)
       ONMO=QMSFU)
       CNMOL1=OMSF(12)
                                    B -  27
00122000
00122100
00122200
00122300
00122*00
00122500
00122600
00122700
00122800
00122900
00123000
00123100
00123200
00123300
00123400
00123500
00123600
00123700
00123800
00123900
0012*000
0012*100
0012*200
0012*300
0012**0(
0012*50(
0012*60(
0012* 70C
0012*80C
0012*900
00125000
00125100
00125200
00125300
00125*00
00125500
00125600
00125700
00125800
00125900
00126000
00126100
00126200
00126300
00126*00
00126500
00126600
00126700
00126800
00126900
00127000
00127100
00127200
00127300
00127*00
00127500

-------
       QMUSL1=QMUS(12,IYEAR-1)
       CALL MARKOV(QNMO,SIG,RATIO,QMUSL1.CNMOL1,VAL,R)
       CiMUSU.IYEAR)=VAL
       ASUM=ASUM-»VAL
c
c
c
c
99
STEP 6
GO TO STEP
GO TO
RETURN
END
2
10
C********************** I NFL **************************************
C
       SUBROUTINE 1NFL
       COMMON /1D/IIN,IRIV,IOUT
       COMMON /GLOBAL/IOT,NYR,LOC(10),IRN1,1WSD
       COMMON /INFIL/NSCOD(2),ADIA(2),ALENG(2),ADHF<2).RDWF(2),
     1 IAF(2)
       COMMON /IPO/ICORM(12),IGROHC12),CN1(2>.CN2{2),C'»I3<2},DA<2> ,
     1 TC(2),CWO(2)
       INTEGER MSCOD
       REAL IAF
       COMMON /RAIN/1SEAS1(12),ISEAS2(12),TBSA(2),DSA(2),RDA(2),
     1 RDSA(2),CCA{2),RDY(2160)
       COMMON /RUNQL/BOD(2,2160),TKN(2,2160),SS(2,2160),PB(2,2160)
       COMMON /RUNOF/RUN{2,2160)
       DIMENSION RF{360)
       REAL ICSS(360),IOBOD(360),IOTKN(360),IOPB(360),IOA(360)
       REAL IOSST.ICBODT,IOTKNT,10PBT,MSS,MPB,MTKN,MBOD
       REAL IQT.MAXFLO
       INTEGER TCEI
       REAL MX1R
       REAL MXCBGD.MXCTKN.MXCSS.MXCPB
1000   FORMATC1 *,'EXCESS INFILTRATION RESULTS
     1 T2,'TOTAL DURATION EXCESS INFILTRATION
     1 T2,'TOTAL AMOUNT PF EXCESS INFILTRATION
                                               FOR
12./
    WATERSHED ',
',16,' HOURS*,/
'.F10.2,'  INCHES',/
                   EXCESS INFILTRATION RATE  '.F10.2,' CFS')
                     EXCESS INFILTRATION PLUS RUNOFF QUALITY-STATI STICS
     1 T2, 'MAXIMUM
1001  FORMAT(//,'l
     1 FOR'
     1,5X, 'WATERSHED NO. ',13,/,
     1       T<.2,'BOL',T53,'TK*',T64,'SS',T75,'PB'/,
     1
     1
     1
C CALCULATE
            IX, 'MAXIMUM CONCENTRATIONS(MG/L)'.T32,4<1X,F11 .2),/
             IX, 'MEAN CONCENTRATIONS(MG/L)',T32,4UX,F11.2),/
             IX, 'TOTAL ANNUAL WASHOFF CLBS ) ' ,T32,* (IX ,F1 1 .0 ) ,/)
            THE NUMBER OF TIME PERIODS PER  DAY
C CALCULATE THE NUMBER OF TIME PERIODS PER YEAR
       NSTEPS=8640/IDT
C DEVELOP DAILY RAINFALL ARRAY
29     CONTINUE
C INITIALIZE THE AMOUNT OF RAINFALL THIS DAY —OR
       DR=0
       DO 30 I=1,NTP
C ACCUMULATE DAILY RAINFALL
       DR=DR+RDY(K)
30
       CONTINUE
                                     B - 28
00127600
00127700
00127800
00127900
00128000
00128100
00128200
00128300
00128400
00128500
00128600
00128700
00128800
00128900
00129000
00129100
00129200
00129300
00129400
00129500
00129600
00129700
00129800
00129900
00130000
00130100
00130200
00130300
00130400
00130500
00130600
00130700
00130800
00130900
00131000
00131100
00131200
00131300
00131400
00131410
00131500
00131600
00131700
00131800
00131900
00132000
00132100
00132200
00132300
00132400
00132500
00132600
00132700
00132800
00132900
00133000
00133100
00133200
00133300
00133400
00133500

-------
C PUT AMOUNT OF DAILY RAINFALL  IN  DAILY  RAINFALL ARRAY
       RF(LJ=DR
       IFU.GE.360JGO TO  35
       GO TO 29
35
C
C
C
C
C

C
C
C

C
C

C

C
C
C
C
C
CONTINUE



NOW THE RAINFALL ARRAY (DAILY) HAS BEEN BUILT — RF(360)


00 ANALYSIS FOR EACH WATERSHED
DO 999 NWS=1,IWSD

IF WATERSHED HAS NC INFILTRATION THEN GO TO END OF

IF(HSCOD(NWS).EQ.O) GOTO 999

TOTAL DURATION EXCESS INFILTRATION
TDEI=0
MAXIMUM INFILTRATION RATE
MXIR=0.0
COMPUTE TOTAL INFILTRATION ARRAY
ASSUME NO RAINFALL IN LAST 9 DAYS OF PREVIOUS

SOME CONSTANTS FOR COMPUTING INFILTRATION OVERFLOW






THIS








YEAR

ARRAY

                                                           MODULE
       C1=ADIA(NWS)
       C2=ALENG(NWS)
       C3=1AF(NWS)
       IOAm=OAF(RFU),0,0,0,0,0,0,0,0,0,Cl,C2,C3)
       IOA(2)=OAF{RF<2),RF(1),0,0,0,0,0,0,0,0,C1,C2,C3J
       IOAf3)=OAF(RF(3),RF(2),RFFLQ
C IF INFILTRATION AMOUNT LESS THAN  EXCESS  CAPACITY THEN  NO  OVERFLOW
       IF(IOA(J).LT.O.O)IOA(J)=0.0
       1F(10A(J).NE.O.O)TDEI=TDEI+1
       IF(MXIR.LE.IOA(J))MXIR=IDA(J)
25C    CONTINUE
C CONVERT TOTAL DURATION EXCESS  INFILTRATION  TO HOURS
       TOEI=TDEI*2
-------
c
c
c
c
c
t
c
c
c
c
c
c
c
  STEP 2

  COMPUTE INFILTRATION OVERFLOW QUALITY ARRAY

    INFILTRATION OVERFLOW QUALITY IS BASED ON THE FOLLOWING
    RAW WASTEWATER STRENGTHS
       8005=200 MG/L
       SS  =200 MG/L
       TKN = *0
       PB   = 0,
MG/L
0* MG/L
   COMPUTE SS BOD TKN AMD PB QUALITY

       DO 300 J=l,360
C
       IFUOA(J) .NE.O.OIGO TO 275
       IOSS(J)=0.0
       IOBOO(J)=0.0
       IOTKN(J)=0.0
       IOPB(J)=0.0
       GO TO 300
275    CONTINUE
C CALC DILUTION FACTOR = RATIO DF TOTAL FLOW TO DRY WEATHER FLOW
       D1LFAC=(IOA(J)+ADWF(NWS)*RDWF(NHS))/ADWF(NWS)
       10SS(J)=200/DILFAC
       IOBOD(J)=200/DILFAC
       IOTKN(J)=*0/D1LFAC
       ICPB(J)=0.0*/DILFAC
       CONTINUE
300
C
C
c
c
c
c
  STEP 3

  OUTPUT INFILTRATION OVERFLOW SUMMARY

  INITIALIZE VARIABLES
       IOT=0.0
       IOSST=0.0
       IOBODT=0.0
       IOTKNT=0.0
       IOPBT=0.0
       DO 400 J=l,360
  COMPUTE TOTALS
       IOT=IOT+IOA(J)
       IOSST=1QSST+IOA(J)*IOSS(J)
       IOBODT = IOBODT-»IOA(J)*IOBOD(J)
       10TKNT=IOTKNT+IOA(J)*IOTKN(J)
       IOPBT=IOPBT+IOA(JJ*IOPB(J)
  0    CONTINUE
  CONVERT TOTAL EXCESS INFILTRATION TO INCHES
C
C
c
c
c
c
  (ACRE-FEET)
       IOT=IOT/*3560.0
  (INCHES)
       IOT=IOT*12.0/DA(NWS)
       HRITE(IOUT,10CO)NWS,TDEI,IOT,MXIR

  STEP <•

  COMBINE INFILTRATION OVERFLOW ARRAY WITH RUNOFF ARRAY FOR
     WATERSHED                      B - 30
00139700
00139800
00139900
00140000
001*0100
001*0200
001*0300
001*0*00
001*0500
001*0600
001*0700
001*0800
001*0900
001*1000
001*1100
001*1200
001*1300
001*1*00
001*1500
001*1600
001*1700
001*1800
001*1900
001*2000
001*2100
001*2200
001*2300
001*2*00
001*2500
001*2600
001*2700
001*2800
001*2900
001*3000
001*3100
001*3200
001*3300
001*3*00
001*3500
001*3600
001*3700
001*3800
001*3900
001**000
001**100
001**200
001**300
001***00
001**500
001**600
001**700
001**800
001**900
001*5000
001*5100
001*5200
001*5300
001*5*00
001*5500
001*5600
001*5700

-------
500
       MXCPQD=0.0
       fXCTKN=O.C
       MXCSS=O.C
       MXCPB=O.C
       TOSS=0.0
       1DTKN=0.0
       TOPB=O.O
       TOBOD=C.O
       TOR=0.0
       DO 500 J=1,NSTEPS
       K=J/NTP
       K = K+1
       QT=RUN(NWS,J)-»IOA(K)
       IF(QT.GE.O.OOC1)GOTO
       SS(NWS,J)=0.0
       EOC(NWS,J)=0.0
       TKN(NWSfJ)=0.0
       PB(NWS,J)=0.0
       RUN(NWS,J)=O.G
       GOTO 5CO
       CONTINUE
999
909
C STEP
C
C
C
                          450
     SS(NWStJ)=QULSS
     QULBOD=(RUN(NWS.J)*BOD(NWS,J)+IOA(K)*IOBOO(K))/OT
     BOD(NWS,J)=OULBDD
     QULTKN=(RUN(NHSt»J)*TKN(NHS,J}-»10A(K)*IOTKN{K ))/OT
     TKN(NWS,J)=OULTKN
     OULPB=(RUN(NWS,J)*PB(NWS,J)+IOA(KJ*IOPB(K) J/OT
     PB(NWStJ)=QULPB
     RUN(NWS,J)=CT
     1F(HXCBOD.LT.OULBOD)MXCBOD=QULBOD
     1F(MXCTKN.LT.CULTKN)MXCTKN=OULTKN
     IF(MXCSS.LT.QULSS)MXCSS=QULSS
     IF(MXCFB.LT.CULPB)MXCPB=OULPB
     TOSS=TOSS+(OULSS«CTJ
     TOPB=TOPB+(OULPB*OTJ
     TDTKN=TOTKN4 (CULTKN*OT )
     TOBOO^TOBOD* (CULBOO*CT )
     TOR=TOR+OT
     CONTINUE
     AVSS=TOS5/TOR
     AVPB=TOPE/TOR
     AVTKN=TOTKN/TDR
     AVBOD=TOBOD/TOR
     WOBDO=AWP(TOR,IOT,AVBOD>
     WGTKN=AWP(TOR,IDT,AVTKN>
     WOSS*AWP(TOR,1DT,AVSS)
     WOPB = AWP(TOR ,IDT,AVPB)
     WRITE(IOUT,1001)NWS,MXCBOD,MXCTKN,HXCSS,MXCPB,AVBOD,AVTKN,
     AVSS,AVPB,WOeOD,KOTKN,KOSS,WOPB
     CONTINUE
     CONTINUE
     5
RETURN TO CALLING MODULE

    RETURN
    END
                   INFLRD
                                                                       001
-------
C                                                                        00151900
       SUBROUTINE INFLRD                                                 00152000
       COMMON /ID/1IN.1RIV.IOUT                                          00152100
       COMMON /GLOBAL/IDT,NYR,LOC(10),IRN1,1WSD                          00152200
       COMMON /INFIL/WSCCD(2),AD1A(2),ALENG(2),ADWF(2),RDWF(2),          00152300
     1 IAF(2)                                                            00152400
       INTEGER WSCD  ,WSCOD                                               00152500
       REAL LENGTH,IAF  .INFAF                                            00152600
loOO   FORMAT(II ,5F10-2)                                                 00152700
1002   FORHAT(«l',T2t,'CONTINUOUS  STDRMWATER  POLLUTION  SIMULATION SYSTEM00152800
     I1.                                                                 00152810
     1/.T30, 'FEBRUARY,1979«,///,                                         00152900
     1 T2,'EXCESS INFILTRATION  INPUT  DATA',20('-*)/>                     00153000
1001   FORMAT(                                                           00153010
     1 //T2,'WATERSHED:  ' , I2.T24,'CODE:  ',I2/                           00153100
     1 T2,'AVERAGE  PIPE DIAMETER:   '.F10.2,'  INCHES'/                   00153200
     1 T^,'TOTAL SYSTEM LENGTH:  '.F10.2,'  MILES'/                        00153300
     1 T2,»DRY WEATHER FLOW:  ',F10.2,' CFS'/                             00153400
     1 T2,'DRY WEATHER FLOW RATIO:  '.F10.2,/                             00153500
     1 T2,'INFILTRATION ADJUSTMENT  FACTOR:  »,F1G.2)                      00153600
       WRITE(10UT,1002)                                                  00153610
       DO 20 1=1 ,IWSC                                                    00153700
       READ(IIN,1000)WSCD,DIA,LENGTH,DWF,DWFR,INFAF                      00153800
       IF(INFAF.EO.O.O) 1NFAF = 1.0                                         00153900
       WR1T£(IOUT,1001)I.WSCD,D1A,LENGTH,DWF,DWFR,1NFAF                  00154000
       KSCCD(I)=WSCD                                                     00154100
       ALENGd )=LENGTH                                                   00154200
       ADIAd)=DIA                                                       00154300
       ADWF(I)=DWF                                                       00154400
       RDWF(I)=DWFR                                                      00154500
       lAFd) = INFAF                                                      00154600
20     CONTINUE                                                          00154700
       RETURN                                                            00154800
       END                                                               00154900
C                                                                        00155000
Cis*********************** ISTR ****************************************00155100
C                                                                        00155200
      SUBROUTINE ISTR                                                    00155300
C                                                                        00155400
C     THE INDEPENDENT  STREAMFLOW  SIMULATOR  WILL  GENERATE  RANDOM          00155500
C     OBSERVATIONS  OF  STREAMFLOW,  GIVEN  STATISTICS FROM  OBSERVED DATA-.  00155600
C                                                                        00155700
C     INPUT DATA HILL  BE                                                 00155800
C                                                                        00155900
C     THE SPECIFIC  RANDOM VARIABLES(S) TO  BE  GENERATED  IS(ARE):          00156000
C                                                                        00156100
C     1.                                                                 00156200
t                                                                        00156300
C     AUTHOR - MIKE MARA                                                 00156400
C                                                                        00156500
C     DATE     DECEMBER 1977                                             00156600
C                                                                        00156700
      CONTINUE                                                           00156800
C     INPUT VARIABLES  	 00156900
C                                                                        00157000
C     NAME     DESCRIPTION/DIMENSION                                     00157100
c     	   	00157200
C                                                                        00157300
C     OMSF     MEAN MONTHLY FLOW  (12)                                    00157400
C     SDMSF    STANDARD DEV OF  MEAN MONTHLY FLOW (12)                   00157500
C     CCMSF    LAG  1 CORR COEFF OF  ADJACENT MONTHLY FL3WS (12)           00157600
                                     B -  32

-------
c
c
c
i
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
      BODSF
      SSSF
      TKNSF
      PPSF
      NYR
BOD
SUSPENDED
TKN
LEAD
NUMBER OF
SOLIDS
STREAMFLOW
STREAMFLOW
STREAMFLOW
STREAMFLOW
CONC
CONC
CONC
CONC
(MG/L)
(MG/L)
(MG/L)
(MG/L)
YEARS OF SIMULATION
      CONTINUE

      OUTPUT VARIABLES 	

      NAME     DESCRIPTION/DIMENSION
      BODSF
      SSSF
      TKNSF
      PBSF
BOD
SUSPENDED
TKN
LEAD
SOLIDS
STREAMFLOW
STREAMFLOH
STREAMFLOW
STREAMFLOW
CONC
CONC
CONC
CONC
(MG/L)
(MG/L)
(MG/L)
(MG/L)
       COMMON /GLOBAL/ICT.NYR.LOCUO) .1RN1.IWSD
       COMMON /GLOBL1/ALF1,ALF2,BETA1,BETA2,BETA3,SBA,K2ADJ,DIST1,
     1 DIST2tE,T<12),DUS(12 ) ,CC(12),ODW(42).BODDW,SSDW,TKNDW.PBDW.
     2 BODUSF(12),TKNUSF(12),SSUSF(12),PBUSF(12),K2SPEC,DDW,
     3 K1W1,K1W2,K1USF,K1DWF
       COMMON /STR2/eDUS(360,5),OMUS(12,5),QMSF(12),SDMSF(12),CCMSF(12)
       COMMON /IO/I1N,IRIV,IOUT
IJOO  FORMAT(I2)
1001  FORMAT(5F10.2)
1003   FORMAT('1',T26,'CONTINUOUS STORMWATER POLLUTION  SIMULATION SYSTE
     I',/,
     1 T30,'FEBRUARY,1979',/
     2 //T25,'INPUT TO INDEPENDENT  STREAMFLOW'/
     3 ///,T2,'MONTH',T16.'MEAN',T31,'SD',
     1 T46,'CDRR CDEFF')
Iu05  FORMAT(1X,/,T3,I2,T11,F10.2,T26,F10.2.T41,F10.2)
  STEP 1
C
C
C-READ
C
9
10
15
C STLP
C-GfcNERATE
C
      CALL
  STEP 3
       MONTHLY STREAMFLCW STATISTICS

      WRITEUOUT.1003)
      DO 10 1=1,12
      READ (I1N.10C1) XO.XSD.XCC
      WR1TE(IOUT.10C5) l.XQ.XSD.XCC
      CONTINUE
      CALL TRANS (XC,XSD,XCC,QMSF(1),SDMSF(I).CCMSF(1))
      CONTINUE
       2
           MONTHLY FLOWS FOR NYR FLOWS
           GMSF
  RETURN TO CALLING MODULE

 ;    RETURN
      END
C********************* LHGNOR *******************************
       SUBROUTINE LOGNOR(MEAN,SD,R)
                                     B -  33
 00157700
 00157800
 00157900
 00158000
 00158100
 00158200
 00158300
 00158400
 00158500
-00158600
 00158700
 00158800
-00158900
 00159000
 00159100
 00159200
 00159300
 00159400
 00159500
 00159600
 00159700
 00159800
 00159900
 00160000
 00160100
 00160200
 00160300
 00160400
 00160500
M00160600
 00160610
 00160700
 00160800
 00160900
 00161000
 00161100
 00161200
 00161300
 00161400
 00161500
 00161600
 00161700
 00161800
 00161900
 00162000
 00162100
 00162200
 00162300
 00162400
 00162500
 00162600
 00162700
 00162800
 00162900
 00163000
 C0163100
 00163200
 00163300
 00163400
 00163500
 00163600

-------
       REAL MEAN,NV
C
t GENERATING A RANDOM NUMBER FROM A LOG NORMAL  0,1
C
c   **************
C   *            *
C   *   STEP 1   *
C   *            *
C   **************
C
C GENERATE 12 RANDOM NUMBERS ON UNIFORM 0,1  INTERVAL
C
       SUMRN=0.0
       DO 10 1=1,12
       CALL RANDOM (X)
10
C
C
C
C
C
C
C
C



C
C
C
C
C
C
C
C
C


C
C
C
C
C
C
C
SUHRN=SUMRN+X

* *
* STEP 2 *
* *
**************








CALCULATE NORMAL VARIATE

NV=SUMRN-6.0
P1=SD
P2=MEAN

**************
* *
* STEP 3 *
* *
**************

CALCULATE THE RANDOM

R=EXP(NV*SD+MEAN
P3=R

**************
* *
* STEP 4 *
* *
**************












VARIATE

)








C RETURN TO CALLING MODULE
C
ZO     RETURN
       END
C
C*********************** MARKOV ****************************
C
       SUBROUTINE MARKOV (MEAN,SO,RATIO,QL1,ML1,RD,CC)
       REAL NV,ML1,MEAN
C
C GENERATE A LAG ONE MARKOV SERIES 
C
c   **************
C   *            *                  B - 34
C   *   STEP 1   *
00163700
00163800
00163900
00164000
00164100
00164200
00164300
00164400
00164500
00164600
00164700
00164800
00164900
00165000
00165100
00165200
00165300
00165400
00165500
00165600
00165700
00165800
00165900
00166000
00166100
00166200
00166300
00166400
00166500
00166600
00166700
00166800
00166900
00167000
00167100
00167200
00167300
00167400
00167500
00167600
00167700
00167800
00167900
00168000
00168100
00168200
00168300
00168400
00168500
00168600
00168700
00168800
00168900
00169000
00169100
00169200
00169300
00169400
00169500
00169600
00169700

-------
C   *            *
f   -A. £.«..*,.Jl A.£.fc.A..K.*..*.«*-.fb
c
C GENERATE  12 RANDOM  NUMBERS ON UNIFORM 0,1 INTERVAL
C
       SUMRN=0.0
*      DO  10  1=1,12
       CALL RANDOM  (X)
       SUMRN-SUMRN+X
10
c
c
c
c
c
c
c
C CALCULATE NORMAL  VARIATE
C
       NV=SUMRN-6.0
    **************
    *            *
    *   STEP 2   *
    .*            *
    «*««$*********
       AQL1=ALOG(OL1)

    **************
    *            *
    *   STEP 3   *
    *            *
    **************
20
C
C
c
c
c
c
c
C CALC COEFF AND CORRECT  IF  GT  1
t
       COEFF=PAT10*CC
       IF (COEFF.GT.1.0)COEFF=1.0
    **************
    *            *
    *   STEP 4   *
    *            *
    **************
C
C
c
c
c
c
c
C CALCULATE VARIATE
C
       YI=MEAN+CCEFF*{ACL1-ML1)+NV*SD*SCRT(1-CC*CC)
3D     RD=EXP(YI)
       T6=RD
40     IF 
-------
C-GT,
C-36(
C
c
f
V
c
c
c
c
c
c
c
c
t
c
c
c














10

20

30

'tO

13

60

7u

to

90

100

110

120
150


C
C***=l
c
/EN THE NUMBER OF TIME UNITS PER YEAR(IUNITS=
X24/IDT), AND THE CURRENT TIME UNIT (IUNIT)
NAME DESCRIPTION


INPUT VARIABLES:

IUN1TS NO. OF TIME PER IODS/YEAR, EACH OF DURATION IDT
IUNIT CURRENT TIME PERIOD


OUTPUT VARIABLES:

MTH CURRENT MONTH
IMTH NO OF TIME PERIODS PER MONTH

IMTH=IUNITS/12
IF(IUNIT.LE.(01*IKTH))GO TO 10
1F( IUNIT. LE.(02*IMTH))GOTO 20
IF(IUNIT.LE.(C3*IMTH»GOTO 30
IF(IUNIT.LE.(04*IMTH))GOTO 40
1F(IUNIT.LE.(05*1MTH))GOTO 50
IF(1UNIT.LE.(06*IMTH))GOTO 60
IF( IUNIT. LE.(C7*IMTH))GOTO 70
IFUUNIT.LE.(Ce*IMTH))GOTO 80
IF(IUNIT.LE.(09*IMTH))GOTO 90
IF(1UNIT.LE.(1C*IMTH»GCTO 100
IFUUNIT.LE.U1*IPTH))GOTO 110
IFUUNIT.LE.(12*IMTHMGDTO 120
GO TO 150
MTH=1
GOTO 150
K!TH = 2
GOTO 150
MTH = 3
GOTO 150
I*TH = <»
GOTO 150
MTH = 5
GOTO 150
MTH = 6
GOTO 150
MTH = 7
GOTO 150
MTH^B
GOTO 150
MTH = 9
GOTO 150
MTH=10
GOTO 150
MTH=11
GOTO 150
MTH=12
CONTINUE
RETURN
END

SS*****:?***** NWTRAF ****************************
B - 36
00175900
00176COO
00176100
00176200
00176300

00176500
00176600
00176700
00176800
00176900
00177000
00177100
00177200
00177300
00177400
00177500
00177600
00177700
00177800
00177900
00178000
00178100
00178200
00178300
00178400
00178500
00178600
00178700
00178800
00178900
00179000
00179100
00179200
00179300
00179400
00179500
00179600
00179700
00179800
00179900
00180000
00180100
00180200
00180300
00180400
00180500
00180600
00180700
00180800
00180900
00181000
00181100
00181200
00181300
00181400
00181500
00181600
00181700
00181800
00181900

-------
       SUBROUTINE NKTRAFt TA1 ,CT1,X1 ,J)
       COMMON /IO/IIN,IRIV,10UT
       Cl=4.45E-7
       C2=4.69E-11
       REAL*8 FDF.TOL.F.DF
C
C THIS MODULE SOLVES THE LEAD EON FOR  H+
C USING NEWTON-RAPHSGN METHOD
C
1000   FORMAT(T2,»MAX EXCEEDED IN NWTRAF   X=»,E9.2,»  F=»,E9.2,
     1 • DF=',E9.2,' FDF=»,E9.2)
       DATA MAX,TOL/15,1.0E-11/
       NCT = 0
1      NCT=NCT+1
2      F=FN(TA1,CT1,C1,C2.X1}
       DF=DFN(TAl,CTliCl,C2,Xl)
4      FDF=F/DF
       X1=X1-FDF
*      IF(DABS(FDF).LT.TOL)RETURN
       IF(NCT.LT.HAX)GOTO 1
       WRITE(10UT,1000)X1 ,F,DF,FDF
       RETURN
       END
C
C*
C
                      OAF ***********************

       FUNCTION OAF(XLO,XL1,XL2,XL3,XL4,XL5,XL6.XL7,XL8,XL9,D,XL,X IA )
C INFILTRATION ECN FITTED FOR BALTIMORE, MD
C SEE SWMM, USERS MANUAL,VERS 2, P. 139
C
       Tl=2.
-------
       PK1=6.35
       K2=4.69E-11
c
c
c
c
c
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
STLP 1

CALC MIXES FOR ALKALINITY.HARDNESS.LEAD

     TACSO=TA(1)
     TASW=TA(2)
     TASF=TA(3)
     TADW=TA{4)
     TAM=XMIX(TACSO,QCSO,TASK,QSH,TASF,CSF,TADH,ODH)
     THCSO=TH(1)
     THSW=TH(2)
     THSF=TH(3)
     THDW=TH(4)
     THM = XMIX(THCSC,QCSO,THSHtOSWtTHSF.QSF,THDW,QDW)
P8M DISSOLVED LEAD IN WATER COLUMN
CONVERT PB TO  PE   PE = PB *2.0719E+5
     SPCSO=PBCSO/(2.0719E+5)
     SPSK=PBSW/(2.C719E+5)
     SPSF=PBSF/(2.0719E+5)
     SPDW=PBDW/(2.0719E-»5)
     BPEM=XMIX(SPCSO,CCSO,SPSH,QSH,SPSF,QSFtSPDWtQDW)

 STEP 2

CALC CTS
     PHCSO=PH(1)
     PHSW=PH<2)
     PHSF=PH(3J
       BTACSO=TACSO*1.0E-5
       BTASW=TASW*1.CE~5
       BTASF=TASF*l.CE-5
       CTCSa^CCT(PHCSO.BTACSO)
       CTSK=CCT(PHSW,BTASW)
       CTSF=CCT(PHSF,BTASF)
       CTDW=CCT{FHDW,ETADW)
STLP 3
COMPUTE CTMIX
     CTM^XKIX(CTCSO,QCSO,CTSH,GSH,CTSF,OSFfCTDH,ODW)
STEP 3 B

SOLVE FOR  H+  MIXED

USE NEWTON-RAPHSON METHOD

STARTING VALUE FOR  H+   HPM
     HPM=1.0L-9
     LTAM=TAM*1.0E-5
     CALL NKTPAF(BTAM,CTM,HPM,J1>
CONVEFT  H-»  MIXED TO PH MIXED
     PHM=ALOG1C(1.G/HFM)
     CONTINUE
PRECIPITATION DETERMINATION
                                    B -  38
00188100
00188200
00188300
00188400
00188500
00188600
00188700
00188800
00188900
00189000
00189100
00189200
00189300
00189*00
00189500
00189600
00189700
00189BOO
00189900
00190000
00190100
00190200
00190300
00190400
00190500
00190600
00190700
00190800
00190900
00191000
00191100
00191200
00191300
00191400
00191500
00191600
00191700
00191800
00191900
00192000
00192100
00192200
00192300
00192400
00192500
00192600
00192700
00192800
00192900
00193000
00193100
00193200
00193300
00193400
00193500
00193600
00193700
00193800
00193900
00194000
00194100

-------
       XIM=(4.0*THK-TAM)   *1.0E-5
       SXIM=SCRT(XIM)
       D1=((SXIM/(1.C+SX1M))-0.2*XIM)
        D=2*D1
       PPK1=PK1-0.5*D1
       PK1=1.0/(10**PPK1)
        PK2=1.0/(10**PPK2)
       PALF21=((HPM*HPM)/(PK1*PK2))+l.0+CHPM/PK2)
       PALF2=1.0/PALF21
       XK=G*BPBM*CTM*PALF2
       PPKSP=PKSP-4*D1
       PKSP = 1.0/UO**PPKSP)
C NO PRECIPITATION THEN DISSOLVED  PB  = PBM
       PBM=BPBM«2.0719E+5
       IF(XK.LT.PKSP)GOTO 20
C PRECIPITATION
       APBKD=FKSP/(CTM*PALF2)
       03=2.0719E+5
       PBMD=(APBMD/G)*03
C ACTUAL DISSOLVED LEAD IN THE MIXED  FLOWS
       CPBM=PBMO
C SEDIMENT LEAD AMOUNT
       SPBM=PBM-CPBM
       GOTO 40
20     CPBM=PBM
       SPBM=0.0
40      CONTINUE
       CPBM^CPBM
       SPBM=SPBM
       SSPBM=SPBM
41      CONTINUE
C CALCULATE THE AMOUNT OF SEDIMENT  =INFLOW-DISSOLVED
C FREQUENCY DISTRIBUTIONS OF DISSOLVED LEAD
            CFPB(CPBM.FPBD)
FREQUENCY
     CALL
FREQUENCY
     CALL
                            INFLOWING LEAD
            DISTRIBUTION OF
            CFPB(PBM.FPBI)
C CALC TOTAL FLOW
       QT=CCSO+QSH+OSF+ODW
C CALC WASHOFF OF LEAD  IN POUNDS PER  YEAR
       SPBWO=AHP(QT,1DT,SPBM)
       PBWO=AKP(OT,IDT,CPBM)
       UPBWO=AWP(QSF,IDT,PBSF)
       RETURN
       END
C
C***************** PER  ************************
C
       FUNCTION PER(R)
       COMMON /GLOBAL/IDT,NYR,LOC(10),IRN1tIHSD
       PER={R*IDT*100.0)/8640
       RETURN
       END
C
C************** PUTDOS  «***********«*«***««*«***
C
       SUBROUTINE PUTDOS(DIST2,CDO,IDT)
       COMMON /ID/UN,IRIV.IOUT
       DIMENSION CDO(7)             B -  39
1000   FORMAT(///,T2,'TIME AVERAGED PERCENT OF STREAM REACH  TO  •,F6.2,
00194200
C0194300
00194400
00194500
00194600
00194700
00194800
00194900
00195000
00195100
00195200
00195300
00195400
00195500
00195600
00195700
00195800
00195900
00196000
00196100
00196200
00196300
00196400
00196500
00196600
00196700
00196800
00196900
00197000
00197100
00197200
00197300
00197400
00197500
00197600
00197700
00197800
00197900
00198000
00198100
00198200
00198300
00198400
00198500
00198600
00198700
00198800
00198900
00199000
00199100
00199200
00199300
00199400
00199500
00199600
00199700
00199800
00199900
C0200COO
00200100
00200200

-------









C
C
C
1
1
1
1
1
1
1
1
1
1
1

i
T2
T2
T2
T2
T2
T2
T2
TZ
T2
)

COMPUTE


MILES DOWNSTREAM AT OR BELOW GIVEN DO
, 'DO', T20, 'PERCENT OF'/
.'CONCENTRATION' ,T20,' STREAM REACH'/
,'3.0', T2G.F7.4/
,'LESS
,'LESS
, 'LESS
,'LESS
, 'LE SS
,'LESS


THAN 1.0' ,T20,F7.4/
THAN 2.0' ,T20,F7.4/
THAN 3.C' .T20.F7.4/
THAN, 4. C' .T20.F7.4/
THAN 5.0' .T20.F7.4/
THAN 6.C',T20,F7.4/


AVERAGE PERCENT OF AFFECTED STREAM


                                               REACH
10
            = 
                         2.0',T2<»,F5.0,T38,F6.2,T50,F6.2)
                           0',T2*.F5.0,T38,F6.2,T50,F6.2)
                           0',T24,F5.0,T38,F6.2,T50,F6.2>
                           0' ,T2*,F5.0,T38,F6.2,T50,F6.2)
                           0',T2^,F5.0,T38,F6.2,T50,F6.2)
                         7.0',T2<»,F5.0,T38,F6.2,T50,F6.2)
                         8.0',T2*,F5.0,T38,F6.2,T50,F6.2)
                         9.0' ,T2
-------
PT=PER(FDO(1))
 CPT=CPT-»PT
WRITEHOUT.1001) FDO(1),P7,CPT

 TQCC=TOCC+FDO{2)
 PT=PERPT
 WRITEUOUT.10G3) F00(3>,PTtCPT

 70CC=TOCC-»FDG(4)
 PT=PER(FDO(4))
 CPT=CPT-»PT
 WRI7EUOU7,1004) FDO(4),PT,CP7

 70CC=70CC-»FDO(5)
 PT=PER(FOO(5J)
 CPT=CPT+PT
 WRITE(IOUT,1005> F00(5),PT,CPT

 TOCC=TOCC+FDO(6)
 PT=PER(FDO(6))
 CPT=CPT+PT
 WRlTE(10UTtlOG6) FDD(6)tPT,CPT

 TOCC=TOCC*FDO(7)
 PT=PER(FDO(7]>
 CPT=CPT*PT
 WRITE(10UT,1007> FDD(7),PT,CPT

 TOCC=TCCC+FDO(8)
 PT=PER(FOO(8))
 CPT=CPT+PT
 WRITE(IOUT,1008) FDO{8),PT,CPT

 TOCC=TDCC4FDO(9)
 PT=PER(FDO(9))
 CPT=CPT+PT
 WRITEdOUT.lCOQ) FDO(9);PT,CPT

TOCC=TOCC+FDO(10)
PT=PER(FDD(10))
 CPT=CPT+PT
HRITEUOUT.IOIO) FDO( 10) ,PT,CPT

TOCC=TOCC+FDO(11)
P7=PER(FOO(11))
 CPT=CPT+PT
WRITECIOUT.lOll) FDO(11),PT,CPT

TOCC=TOCC+FDO(12)
PT=PER(FDO(12)}
 CPT=CPT+PT
WRITE(IOUT,1012) FDO(12 ) ,PT,CPT
TOCC=TOCC+FDO(13)
PT=PER(FDO(13))
                              B - 41
00206300
00206400
00206500
00206600
00206700
00206800
00206900
00207000
00207100
00207200
00207300
00207400
00207500
00207600
C0207700
00207800
00207900
00208000
00208100
00208200
00208300
C0208400
00208500
00208600
00208700
00208800
00208900
00209000
00209100
00209200
00209300
00209400
00209500
C0209600
00209700
00209800
00209900
00210000
00210100
00210200
00210300
00210400
00210500
00210600
00210700
00210800
00210900
00211000
00211100
00211200
00211300
00211400
00211500
00211600
00211700
00211800
00211900
C0212000
00212100
00212200
00212300

-------


C




C




C







C
c****
C





1000






1001
1002
1003
1004
1005
1C 06
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022

C INI

C INI
CPT=CPT+PT
WRITE(IOUT,1013) FDO( 13) ,PT ,CPT

TOCC=TOCC+FDOd4)
PT=PER(FDOd4M
CPT=CPT*PT
WRITE(IOUT,1014) FDO( 14 ) ,PT ,CPT

TOCC=TOCC+FDOC15)
PT=PER(FDO(15))
CPT=CPT+PT
WRITEdOUT,1015) FDOC15 ) ,PT ,CPT

TOCC=TOCC*FDD(16)
PT=PER(FDOd6))
CPT=CPT+PT
WRITE(IOUT,1C16) FDO( 16) ,PT ,CPT
WRITE dOUT, 1017) TOCC
RETURN
END

««««««:«««««:$: PUTFPB ****************************

SUBROUTINE PUTFPB (FPB.IND.D 1ST)
COMMON /IO/I1N.IRIV.IOUT
DIMENSION ALO.2)
DATA AL/'TOTA','L ',' ' ,'DI SS', 'OLVE' , »D '/
DIMENSION FPB(20)
00212400
00212500
00212600
00212700
00212800
00212900
00213000
00213100
00213200
00213300
00213400
00213500
00213600
00213700
00213800
00213900
00214000
00214100
00214200
00214300
00214400
00214500
00214600
00214700
00214800
00214900
00215000
00215100
FORMAT('1',T26, 'CONTINUOUS STORMHATER POLLUTION SIMULATION SYSTEM00215200
I',/,
1 T30, 'FEBRUARY, 1979', //
2 T2, 'CUMULATIVE FREQUENCY- ',3A4,» LEAD' ,3X , 'TO',FB.2 ,3X,
2 'MILES DOWNSTREAM',//,
3 T7,«PB',T22, 'NUMBER OF ' ,T36 , 'PERCENT OF ' ,T50, 'CUMULATIVE'/
4 T2, 'CONCE NTR AT ION ', T2 1,' OCCURRENCES ',T39,'TI ME ',T50, 'PERCENT'/)
FORMATdX, '0.005 OR LESS • ,T24 ,F5 .0,T38,F6.2,T50,F6.2 )
FORMATdX, '0.005 TO 0 .010' ,T24 ,F5 .O.T38.F6 .2.T50 ,F6 .2)
FDRMATdX, '0.010 TO 0.015' ,T24 ,F5 .0,T38 .F6.2.T50 ,F6 .2)
FORMATdX, '0.015 TO 0.020* ,T24 ,F5. 0 ,T38,F6.2 .T50.F6.2 )
FdRMATdX, '0.020 TO 0.025' ,T24 ,F5. O.T38.F6 .2 .T50.F6.2)
FDRMATdX ,'0.025 TO 0.030' ,T24 ,F5 .O.T38.F6 .2 »T50 ,F6 .2)
FORMATdX, '0.030 TO 0.035 • ,T24 ,F5 .0, T38,F6 .2.T5D ,F6 .2)
FORMATdX, '0.035 TO 0.040' ,T24 ,F5 .O.T38 ,F6 .2.T50 ,F6 .2)
FORMATdX, '0.040 TO 0 .045' ,T24 ,F5 .O.T38 ,F6 .2,T50,F6 .2)
FORMATdX, '0.045 TO 0.05 ' .T24.F5.0 ,T38,F6.2 ,T50,F6.2 )
FORMATdX, '0.05 TO 0.06' ,T24 ,F5.0,T38,F6 .2 .T50.F6.2 )
FDRMATdX, '0.06 TO 0.07' ,T24 ,F5.0 ,T38 ,F6.2 .T50.F6.2 )
FORMATdX, '0.07 TO 0.08' ,T24 ,F5.0 ,T38,F6 .2 ,T50,F6.2 )
FORMATdX, '0.08 TD 0.09' ,T24 ,F5 .0,T38,F6 .2 ,T5C ,F6.2 )
FORMATdX, '0.09 TO 0. 1 ' ,T24 ,F5 .O.T38 , F6 .2.T50.F5 .2)
FORMATdX, '0.1 TO 0.2 ' ,T24 ,F5. 0,T38,F6.2,T50,F6. 2)
FORMATdX, '0.2 TO 0.3 ' ,T24 ,F5.0,T38,F6.2 ,T50,F6. 2)
FORMATdX, '0.3 TO 0.4 • ,T24 ,F5.C,T38,F6.2 ,T50,F6. 2)
FORMATdX, '0.4 TO 0.5 • ,T24 ,F5.0,T38,F6. 2 ,T50 ,F6. 2)
FORMATdX, 'GREATER THAN 0.5 ' ,T24,F5.0,T38,F6.2,T50,F6.2)
FORMATdX, 'GREATER THAN 0.5' ,T24 ,F5.0,T38,F6.2,T50,F6.2)
FORMAT(/,T10,'TOTAL=',T24,F5.0)
KRITEdQUT.lOCO) ( AL( J ,IND) , J= 1 ,3 ) ,DIST
TIALIZE TOTAL PE OCCURRENCES
TOCC=0.0 B - 42
TIALIZE CUMULATIVE PERCENTAGE
00215210
00215300
00215400
00215500
00215600
00215700
00215800
00215900
00216000
00216100
00216200
00216300
00216400
00216500
00216600
00216700
00216800
00216900
00217000
00217100
00217200
00217300
00217400
00217500
00217600
00217700
00217800
00217900
00218000
00218100
00218200
00218300

-------
 CPT=0.0
TOCC=TOCC+FPB(1)
PT=PER(FPB(1))
 CPT=CPT+PT
WFITF( IOUT.1CC1)  FPBd ),PT,CPT

 TOCC=TOCC+FP6(2)
 PT=PEK(FPP(2»
 CPT=CPT-»PT
 WRITE(IDUT,1002) FPB(2),PTtCPT

 TGCC=70CC+FPB(3)
 PT=PER{FPB(3))
 CPT=CPT+PT
 WRITEUOUT,10C3) FPB(3),PT,CPT

 TOCC=TOCC+FPB(4)
 P7=PER(FPB(4))
 CPT=CPT+PT
 WRITE(IOUT,1004) FPB(«) ,PT ,CPT

 TOCC=TOCC+FPE(5)
 PT=PER(FPB(5))
 CPT=CPT-»PT
 WKITEUOUT,1005) FPB{5 ) ,PT ,CPT

 TOCC=TOCC+FPB(6)
 PT=PER(Ff>B(6))
 CPT=CPT+PT
 WRITEUOUT,10G6) FPB (6 ) ,PT ,CPT

 TOCC=TOCC*FPB(7)
 PT=PER(FPB(71)
 CPT=CPT-»PT
 WRITEUOKT.IOG?) FPB(7) ,PT ,CPT

 TOCC=TCCC+FPB(8>
 PT=PER(FPB(8))
 CPT=CPT+PT
 HR1TEUOUT.10G8) FPB (8) iPT»CPT

 TOCC=TOCC+FPE(9)
 PT=PER(FPB(9)>
 CPT=CPT+PT
 WRITEUOUT.10G9) FPB(9) ,PT,CPT

TOCC=TOCC+FPB(10)
PT=PER(FPB(10))
 CPT=CPT+PT
WRITEdOUT.lOlO) FPB(10),PT,CPT

TOCC=TOCC+FPB(11)
PT-PER(FPB{11))
 CPT=CPT4PT
WRITEUOUT.1011) FPB(11),PT,CPT

TOCC=TOCC*FPB(J2)
PT=PER(FPB(12))
 CPT=CPT+PT
WRITE(IOUT,1012) FPB(12)tPTtCPT
                              B
- 43
00218400
00218500
00218600
00218700
00218800
00218900
00219000
00219100
00219200
00219300
00219400
00219500
00219600
00219700
00219800
00219900
00220000
00220100
00220200
00220300
00220400
00220500
00220600
00220700
00220800
00220900
00221000
00221100
00221200
00221300
00221400
00221500
00221600
00221700
00221800
00221900
00222000
00222100
00222200
00222300
00222400
00222500
00222600
00222700
00222600
00222900
00223000
00223100
00223200
00223300
00223400
00223500
00223600
00223700
00223800
00223900
00224000
00224100
00224200
00224300
00224400

-------
1000
1001
1002
1003
1004
1005
1006
      TOCC=TOCC*FPB(13)
      PT=PER(FPB(13))
       CPT=CPT+PT
      WRITt(IOUT,1013) FPB(13),PT ,CP7

      TOCC=TOCC+FPB(14)
      PT = PER(FPB(l
      PT=PER(FPB(15))
       CPT=CPT*PT
      WRITt(IOUT,1015) FPBU5),PT.CPT

      TOCC-TOCC*FPB(16)
      PT=PER(FPB(16J)
       CPT=CPT+PT
      WRITE{IDUT,1016) FPE (16 ) ,PT ,CPT

      TOCC=TOCC+FPB(17)
      PT=PER(FPB(17))
       CPT=CPT*PT
      WRITfc(IOUT,1017) FPB(17),PT,CPT

      TOCC=TOCC+FPB(18J
      PT=PtR(FPB(16))
       CPT=CPT*PT
      WRITE(IOUT,1018) FPB( 18 ) ,PT ,CPT

      TOCC=TOCC+FPB(19)
      PT=PERtFPB(19J)
      WR1TE(IOUT,1019) FPB{ 19 ) ,PT ,CPT

      TOCOTOCC+FPB(2C)
      PT=PER(FPB(2C)}
                  FPB (20 ) ,PT ,CPT
                  1CCC
      WRITE(IDUT,1C20)
      WRITE(10UT,1022)
       RETURN
       END
                  «$*« PUT FSS ***«««*«*«****«**«*****«****«****
 SUBROUTINE PUTFSS (FSS.D1ST)
  COMMON /IO/IIN,IPIV,IOUT
 DIMENSION FSS(21)
  FORMAT('1',T26,'CONTINUOUS STORMWATER POLLUTION SIMULATION  SYSTE
I'./,
1 130,'FEBRUARY,1979',/
2 T2,'CUMULATIVE FREQUENCY—SUSPENDED SOL IDS',3X,» TO',F8.2,3X ,
2 'MILES DOWNSTREAM',//,
3 T7,'SSf,T22,'NUMBER OF ' ,T36,'PERCENT OF ' ,T50 ,'CUMULATIVE•/
4 T2,'CONCENTRATION',T21,»OCCURRENCES',T39,'TIME',T50,'PERCENT'/)
  FORMAT(1X,'25 OR LESS ' ,T24,F5.0,T38,F6.2,T50,F6.2}
  FORMAT(1X,'25 TO 50',T24,F5.0,T38.F6.2.T50,F6.2)
  FORMAT(1X,'50 TO 75',T24,F5.O.T38.F6.2,T50,F6.2)
  FORMAT(1X,'75 TO 100',T24,F5.0,T38,F6.2,T50,F6.2)
  FORMAIUX.'ICG TO 125 ' ,T24 ,F5.0,T38,F6.2 ,T50,F6. 2 )
  FORMAT(1X,'125 TO
150',T2<»,F5.0,T3e,F6.2,T50,F6.2)
           B - 44
 00224500
 00224600
 00224700
 00224800
 00224900
 00225000
 00225100
 00225200
 00225300
 00225400
 00225500
 00225600
 00225700
 00225800
 00225900
 00226000
 00226100
 00226200
 00226300
 00226400
 00226500
 00226600
 00226700
 00226800
 00226900
 00227000
 00227100
 00227200
 00227300
 00227400
 00227500
 00227600
 00227700
 00227800
 00227900
 00228000
 00228100
 00228200
 00228300
 00228400
 00228500
 00228600
 00228700
 00228800
 00228900
 00229000
 00229100
 00229200
M00229300
 00229310
 00229400
 00229500
 00229600
 00229700
 00229800
 00229900
 00230000
 00230100
 00230200
 00230300
 00230400

-------
1007
1008
1009
1010
1011
1012
1013
       FORMATUX,'150 TO
FORMAT{1X,'175
                      1C
                      TD
1015
1016
1017
1018
1019
1020
1021
1022
FORMAT(1X,'200
FORMAT(1X,'225 TO
FORMAT(1X,'250 TC
FORKAT(1X,'275 TO
FORMAT(1X,'300 TO
FORMAT(1X,«325 TO
FORMAT(1X,'350 TO
FORMAT(1X,'375 TO
FORMAT(1X,«400 TO
175',T24,F5.
200',T24,F5.
225»,T24,F5.
250',T24,F5.
275',T24,F5.
300»,T24,F5.
325*,T24,F5.
350«,T24,F5.
375«,T24,F5.
400',T24,F5.
425',T24,F5.
450',T24,F5.
475',T24,F5.
       FORMAT(1X,'425 TO
       FORMAT(lX,t450 TO
       FORMAT(1X,'475 TO 500',T24,F5.
       FORMATdX,'GREATER  THAN  500',
       FORMAT ,PT ,CPT
           = TUCC-»FSS(7)
       PT=PER(FSS(7J)
       CPT=CPT+PT
       WRnE(IOUT,10C7) FSS(7),PT,CPT

       TOCC=TDCC+FSS(8)
       PT=PER(FSS(8))
       CPT=CPT+PT
       WRITE(IOUT,1C08) F SS(8 ) ,PT ,CPI
                                      - 45
00230500
00230600
00230700
00230800
00230900
00231000
00231100
00231200
00231300
00231400
00231500
00231600
00231700
00231800
00231900
00232000
00232100
00232200
00232300
00232400
00232500
00232600
00232700
00232800
00232900
00233000
00233100
00233200
00233300
00233400
00233500
00233600
00233700
00233800
00233900
00234000
00234100
00234200
00234300
00234400
00234500
00234600
00234 700
00234800
00234900
00235000
00235100
00235200
00235300
00235400
00235500
00235600
00235700
00235800
00235900
00236000
00236100
C0236200
C0236300
00236400
00236500

-------
 TOCC=TOCC+FSS{9)
 PT=PER(FSS<9))
 CPT=CPT*PT
 WRITEUOUT.1009) F SS<9) ,PT ,CPT

TOCC=TOCC+FSS(10)
PT=PER(FSS(10»
 CPT=CPT+PT
WRITEUCUT.1010) FSS(lO)tPT,CPT
    = TOCC-»FSSU1)
PT=PfcR(FSSUl))
 CPT=CPT+PT
WRITE(IOUTtlOll) FSS(11),PT,CPT

TOCOTOCOFSSU2)
PT=PER(FSS(12))
 CPT^CPT+PT
WRITE(IOUT,1012) FSS( 12) .PT.CPT

TOCC=TOCC4FSS(13)
PT=PER(FSSU3))
 CPT=CPT+PT
WRITE(IOUT,1013) FSS( 1 3) ,PT ,CPT
TQCOTQCC + FSS
PT=PER(FSS(H))
 CPT=CPT+PT
WRITE(IOUT,1014) FSS(l^), PT.CPT

TOCC=TOCC+FSS(15)
PT=PEK(FSS(15)J
 CPT=CPT+PT
WRITE(IOUT,1015) FSS( 15) .PT.CPT

TOCC=TOCC*FSS(16)
PT=PER(FSS(16))
 CPT=CPT+PT
KRITE(10UT,1016) FSS( 16 ) ,PT ,CPT

TOCC=TOCC*FSS(17)
PT=PER(FSS(17))
 CPT=CPT+PT
WR1TL(IOUT,1017) FSS( 17) ,PT ,CPT
    = TOCC-»FSS(18)
PT=PER(FSS(16))
 CPT=CPT+PT
WRITE(10UT,1018) FSS( 18) ,PT ,CPT

TOCC=TOCC+FSS(19)
PT=PER(FSS(19J)
 CPT=CPT+PT
WRITE(IOUT,1019) FSS( 19), PT.CPT

TDCC-TOCC*FSSC2C»
PT=PER(FSS(2O)
 CPT=CPT+PT
WRITEdOUT.1020) FSS(20) ,PT ,CPT
                              B
TDCC=TOCC+FSS(21)
- 46
00236600
00236700
00236800
00236900
00237000
00237100
00237200
00237300
00237400
00237500
00237600
00237700
00237800
00237900
00238000
00238100
00238200
00238300
00238*00
00238500
00238600
00238700
00238800
00238900
00239000
00239100
00239200
00239300
00239400
00239500
00239600
00239700
00239800
00239900
00240000
00240100
00240200
00240300
00240400
00240500
00240600
00240700
00240800
00240900
00241000
00241100
00241200
00241300
00241400
00241500
00241600
00241700
00241800
00241900
00242000
00242100
00242200
00242300
00242400
00242500
00242600

-------






t
c
c






c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c



c
c
c
c
c
c
c
c
c
c
c
c
c

r
L
c
c
c
c
c
c
c
c
c
c

PT = PtR(FSS(21»
CPT=CPT+PT
fcRlTHIOUT,1021) FSS(21),PT,CPT
WRITE(IOUT,1022) TDCC
RETURN
END

*$*********«***********«**«*** RAINFL *****V¥ ***********************

SUBROUTINE RA INFL (NYEAR )
COMMON /IC/I1N,1R1V,IOUT
DIMENSION IEVNT(2),TRAIN(2),NDPDS(2)
COMMON /GLOBAL/ILT,NYR,LOC(10),1RN1,IKSD
COMMON /RAIN/I SEA SI (12) .ISEAS2U2) ,TBSA (2 ) t DSA (2) ,RDA (2 ) ,RD S M2 )
1 ,CCA(2),RDY<2160)

THE RAINFALL SIMULATOR WILL GENERATE RANDOM OBSERVATIONS OF
RAINFALL, GIVEN RAINFALL STATISTICS DERIVED FROM OBSERVED DATA.
INPUT DATA WILL BE SELECTED RAINFALL STATISTICS AND NOT LARGE
QUANTITIES OF OBSERVED RECORDS.
THE SPECIFIC RANDOM VARIABLES TO BE GENERATED ARE:

1. TIME BETWEEN STORMS.

2. DURATION OF STORM.

3. MAGNITUDE CF STORM.

AUTHOR - STAN CARPENTER

DATE - NOVEMBER, 1977

CONTINUE



NAME DESCRIPTION/DIMENSION
ISEAS1 MONTHS IN SEASON 1 - (12)
ISEAS2 MONTHS IN SEASON 2 - (12)
TBSA MEAN TIME BETWEEN STORMS (HOURS) SEASON 1 AND 2-(2)
DSA MEAN DURATION OF STORMS (HOURS) SEASON 1 AND 2-(2)
RDA MEAN RAINFALL DEPTH (IN) 1 TIME UNIT SEAS-1 AND 2-(2)
ROSA SIGMA RAINFALL DEPTH (IN) SEASON 1 AND 2-12}
CCA LAG ONE CORR.COEFF1 TIME UNIT RAINFALL DEPTHS 1 AND 2(2)
NYRS NO. OF YEARS IN THE SIMULATION
IDT LENGTH OF 1 TIME UNIT (HOURS)


CONTINUE


NAME DESCRIPTION/DIMENSION
IUNITS NO. OF TIME INCREMENTS (IDT) PER YEAR
MTH CURRENT MONTH (01 TO 12)
NYEAR CURRENT YEAR
ISEAS CURRENT SEASON (01 OR 02)
ROY RAINFALL DEPTH ARRAY (UNITS/YEAR)
TBS GENERATED TIME BETWEEN STORMS( HOURS)
ITBS GENERATED TIME UNITS BETWEEN STORMS
DS GENERATED DURATION OF STORM
B - 47
00242700
00242800
00242900
00243000
00243JLOO
00243200
002433CO
00243400
00243500
00243600
002437GO
00243800
00243900
00244000
00244100
00244200
00244300
00244400
00244500
00244600
00244700
00244800
00244900
00245000
00245100
00245200
00245300
00245400
00245500
00245600
00245700
00245600
00245900
A f\ *y t*. A r*>r\ r\
"*UU£HO UUU
00246100
00246200
f\ A •) t. JL -jr\ f\
"UUt*f D JUU
00246400
00246500
00246600
00246700
00246800
00246900
00247000
00247100
00247200
00247300
00247400
00247500
_f\ n OA 7 /.nn
"UU c H r OUU
00247700
00247800
P A "y IM. "7 OO A
- (j U c. t r *?u u
00248000
00248100
00248200
00248300
00248400
00248500
00248600
00248700


-------
C
C
C
C
C
C
C
C
C
C
C
C
C
100
lie
122
IDS
ITME
RD
TRAIN
NOPDS
TROMAX
ICSMAX
SRDMAX
TRD
I UN IT
IEVNT


FORMAT
FORMAT
FORMAT
               GENERATE!- TIKE UMTS DURATION  OF  STORM
               TIME COUNTER  (HOURS)
               GENERATED RAINFALL DEPTH  CURRENT  TIME  UNIT  (IN)
               YEARLY TOTAL  RAINFALL  BY  SEASON  (2)
               NO.OF TIME PERIODS WITH RAIM BY  SEASON (2J-YEARLY
               MAXIMUM RAIN  FALL EVENT   TOTAL DEPTH  -YEARLY
               MAXIMUM kAIN  FALL EVENT   DURATION -YEARLY
               MAXIMUM RAIN  FALL DEPTH   IN A  SINGLE  TIME PLRIOD -YEARLY
               TLTAL' RAINFALL DEPTH ClJRRENT RAINFALL  EVENT
               CURRENT TIME  UNIT
               NO.OF RA1KFALL EVENTS  PY  SEASON(2)
130
          ,'1     RAINFALL STATISTICS FOR YEAR
          X,'TOTAL RAINFALL SEASON NO.',12,' =
          X.'NO.OF PERIODS WITH RAIN SEASON
1      IGX.'NO.OF RAINFALL EVENTS
 FORKATdCX .'MAXIMUM RAINFALL EVENT
1       /,10X,'MAXIMUM RAINFALL
                                                              INCHES',/)
                                                              ',!*,/,
                                          SEASON  NO. ',12,'  =  ',!*,/)
                                          TOTAL DEPTH  =',F6.2.'  INCHES',
                                                   =  '.F6.2,
                                                  NO. ',12,'
                                                         '  =
     1
             10X,'MAXIMUM DEPTH IN ONE',13,'  HR .PER IDD=•,F5 .2 , '  INCHES'
C-START A NEW YEAR-  INITIALIZE YEARLY VARIABLES  -(STEP  2)
C
      1UNITS=360*2*/ICT
1U    DO 12  1=1 .IUN1TS
12    RDY(I)=C.O
      DC 1*  1=1,2
      TRAIN(I)=O.C
      IEVNT(I)=0
1*    NQPDS(I)=0
      TRDMAX=0.0
      IDSfUX=C
      SRDMAX=0.0
      ITME^IDT
      IUN1T=1
C-DETERMINE
C
20
            TIME TO NEXT STORM-(STEP  1)
      CALL MONTHdUNITS.IUNIT.MTH)
      CALL SEASON(MTH,ISEAS1,ISEAS2,ISEAS)
      CALL EXXPDN(TBSA(ISEAS),TBS)
      TBS=TBS/IDT
      TBS=T3S+0.5
      1TBS=TPS
      !TME = lTMt-»lTBS*IDT
      IUNIT=ITME/IDT
C-GENERATE
C
      CALL
      CALL
      CALL
           DURATION OF STORM-(STEP 4,5 AND  6)
           MCNTH(IUN1TS,IUNIT,MTH)
           SEASUN(MTH,1SEAS1,1SEAS2,ISEAS)
           EXXPON(DSAdSEAS) ,DS)
      DS=DS/IDT
      DS=DS+0.5
                                     B  -  48
      IF(IDS.EQ.O)IDS=1
t
C-TEST FOR END OF YEAR-CSTEP 3)
C
      IF(ITME.GT.(36C*2*))GD TO *0
      IEVNT(ISEAS)=-IEVNTUSEAS)«1
 002*8800
 002*8900
 002*9000
 002*9100
 002*9200
 002*9300
 002*9*00
 002*9500
 002*9600
 002*9700
 002*9800
 002*9900
 G0250000
 00250100
 00250200
 00250300
 00250*00
 00250500
 00250600
100250700
 00250800
 00250900
 00251000
 00251100
 00251200
 00251300
 00251*00
 00251500
 00251600
 00251700
 00251800
 00251900
 00252000
 00252100
 00252200
 00252300
 00252*00
 00252500
 00252600
 00252700
 00252800
 00252900
 00253000
 00253100
 00253200
 00253300
 00253*00
 00253500
 00253600
 00253700
 00253800
 00253900
 0025*000
 0025*100
 0025*200
 0025*300
 0025**00
 0025*500
 0025*600
 0025*700
 0025*800

-------
      IF((1DS*1DT).GT.ICSMAX)IDSMAX=1DS*IDT
C
C-GENERATE RAINFALL  DEPTH  FOR  FIRST TIME UNIT-(STEP 7 4ND 6)
C
      CALL LOGNDR(RDAUSFAS) ,RDSA ( 1 SE AS ) ,RD )
      RDYUUNIT)=RD
      NOPDS{ISEAS)=NOPDS fl JtJirJ|.jfcJt.jtJu
KA iNKU vv-*-^"*r-vv-
J^^»Jv»^J<--»uwvw» *• ^,
v-vv-^tcv -v -w V
      SUBROUTINE RAINRD
       COMMON /10/I IN.IK'IV.IOUT
       COMMON /GLOPAL/IDT,NYR,LOC(10) ,IRN1,IKSD
      COMMON /RAIN/ 1 SEA SI (12) ,1SEAS2( 12 ) ,TBSA( 2 ) ,DSA ( 2) ,RDA (2 ) ,RDS A(2 )
     1 ,CCA(2),RDY(2160)
C-SUBROUTINE FAINRD  WILL  READ  THE  I NPJT DA FOR THE
C-RA1NFALL SIMULATOR  ANL  LIST  THE  INPUT DATA ENTERED.
0025490&
00255COO
00255100
00255200
00255300
00255400
00255500
00255600
00255700
00255800
00255900
00256OGO
C0256100
00256200
00256300
002564CO
00256500
00256600
00256700
OC256800
G0256900
00257000
00257100
00257200
00257300
00257400
00257500
00257600
00257700
00257800
00257900
00258000
00258100
00258200
00258300
00258400
00258500
00258600
00258700
00258800
00258900
00259000
00259100
0025920C
00259300
00259400
00259500
00259600
00259700
00259800
002599CO
00260000
00260100
00260200
C0260300
00260400
00260500
C0260600
C0260700
C0260800
00260900

-------
c
c
C-1NPUT FORMAT STATEMENTS
C
1GG   FORMAT(1212)
110   FORMAT(2F1C.2)
      FORMAT(3F1G.*)
      FORMATt'l',16X,'CLNTINUOUS STORMWATER POLLUTION  SIMULATION  SYSTEM
     I,/.
     125X,'FEPKUARY,197<>',//
     2,IX,'RAINFALL SIMULATOR INPUT DATA• ,20('-'),//
     1       /,1X,« MONTHS IN SEASON NO.  Is*)
      FORMAT(2*X,I2)
      FCRMAT(/,1X,« MONTHS IN SEASON NO.  2sM
      FORMAT(2*X,I2)
      FORMAT(//,36X,'SEASON NO. 1*,10X,•SEASON NO.  2',
     1       /,IX,'MEAN TIME BETWEEN STORMS•,1IX,Fl2.2
     1,' HOURS     '.F12.2,' HOURS',
     1       /,IX,'MEAN DURATION OF STORMS',12X
     1.F12.2,' HOURS    ',F12.2,' HOURS',//
     1        TIG,'INPUT RAINFALL DEPTH  STATISTICS=*,/
     1          T2,'SEASON ',T15,'MEAN',T31,'S.D.•,T*6,'CDRR  COEFF •)
      FORMAT(/T*,I2,T1S.F10.*,T31,F10.<«,T*6,F10.*)
120
500
5C6
C
C-READ
C
       THE INPUT DATA Ftp THE RAINFALL SIMULATOR

      WRITE(IDUf,50G)
      REACH IN, 100) USE ASH I ).!=!, 12)
      DC 50* 1-1,12
      IFUSEASHII.EC.OIGO TO 506
50*   WRITE(IOUT,506)1SEAS1(1)
506    CONTINUE
      WRITEUGUT,51C)
      READ( UN, 100) USE AS2(1 ),!=!, 12)
      DO 512 1=1 ,12
      IF(ISEAS2(I).EC.J)GO TO 516
512   WRITE (IOUT,51*)ISEAS2U)
516    CONTINUE
       READUlN.llOXTBSAU) ,1 = 1,2)
      READ( I IN, 110) (DSAU ),I=1,2)
       WRITE(ICUT,51P)TtSA,DSA
      DO U 1=^1,2
      READ (I1N,120)XM,XSD,XP
      WRITEUOUT.10C3) I.XM.XSD.XP
      CALL TRANS(XM,XSD,XP,RDA(I).RDSA(I) ,CCA(I ))
10    CONTINUE
11    CONTINUE
C
C-WRITE THE TITLE AND LIST THE INPUT DATA TO THE RAINFALL  SIMULATOR
C
      RETURN
      END
C
C********************** RANDOM ****************************
C
       SUBROUTINE RANDOM  (RN)
       COMMON /GLDbAL/IUT.NYR.LOCUG) ,IRN1,1WSD
C
C GENERATE A UNIFORMLY DISTRIPUTED  3,1 RANDOM  VAR1ATE
C                                    B  -  50
 00261000
 00261100
 00261200
 00261300
 00261400
 00261500
 00261600
•00261700
 00261710
 00261800
 00261900
 00262000
 00262100
 00262200
 00262300
 00262
-------
10     CONTINUE
       IRM = IRN1*131075
       R1=IRN1
2v>     DENOM = M
       RN=AfiS(Rl/DEKGM)
       R2=RN
       IF  (RN.EQ.0.0)  RN=O.C0001
30     RETURN
       END
C
f-.AAA.JU.h.ii.AA-AAAAAAAAAAAAAA T~) f~ f \ • A T AAAA.AAAAAA^.
-------
3
C
c
1C

11

51
C
c
c
c
c
c

c

c
       DO 3 1=1. 24
       PBMEMU ) = C.C
       CONTINUE

  INITIALIZE TIMfc AVERACED DO SUMMARY
       DC 4 1=1,7
       CDO( I) = 0.0
       CUNT INUt
       DG r. 1=1,20
       FlPf (I)=0.0
       FDPBd )=0.0
       CONT INUt
       DO 10 1=1,16
       FDOX1 (I ) = 0.0
       FDO(I)=C.O
        DO 11  J=l,21
       FSS(J)=C.O
       LQ blO  1 = 1, IB
       DQMEMU )=0.0
       CONTINUE
    ***«**=>*****$****«
    .A.                A
    *   INITIALIZE   *
      i. .*,.*. »«. JUA. jt
       '''"* •
  MONTHLY TIME INTERVAL
       MTI=1
  PREVIOUS MONTH
       M0=l
  TOTAL SEDIMENT LEAD
       TSPB=0.0
       TDPE=O.C
       TUPE=O.U
       TUSS=0.0
       TULCC=0.0
       TULDN=0.0
  TOTAL SUSPENDED SOLIDS
  TOTAL BOD
       TNBOD=C.O
       TCBCD=C.O
       PB96=0.0
       PE96MX=C.O
       SU|-!PB=-0.0
       D03MN=10.0
c
c
c
c
c
c
c
c
       NDWP=NTP*7
C NUHPER OF TIME STEPS
       NTS3=72/IDT
       NTS3L1=NTS3-1
        STEP 2
  CALCULATE NUMBER OF TIME PERIODS

       NSTLPS=8640/IDT
       NTS96=96/IDT
                        IN 3 DAYS
                                    B -  52
00273100
C0273200
00273300
00273400
00273500
00273600
00273700
00273800
00273900
00274000
00274100
00274200
00274300
00274400
00274500
00274600
00274700
00274800
00274900
00275000
00275100
00275200
00275300
00275400
00275500
00275600
00275700
00275800
00275900
00276000
00276100
00276200
00276300
00276400
00276500
00276600
00276700
00276800
00276900
00277000
00277100
00277200
00277300
00277400
00277500
00277600
00277700
00277800
00277900
00278000
00278100
00278200
00278300
00278400
00278500
00278600
00278700
00278800
00278900
00279000
00279100

-------
C
C
C
    *
    *
        STEP
C DO RECEIVING WATER ANALYSIS FDR EACH  TIME  PERIOD
C
       DO 20 I=1,NSTEPS
C DETERMINE VALUE OF DRY WEATHER FLOW TO  BE  USED
      IDW=MOOU.NDWP)
      IF(IDW.EQ.O)IDW=NCWP
      VDW=QDWUDW)
C DETERMINE VALUE OF MONTHLY  STREAMFLOW  TO  BE  USED
       CALL MONTH(NSTEPS,I,IMO)
      IYR=MOD(NYEAR,5)
      IF(IYR.EQ.O)IYR=5
      VSF=CMUS(IMO,IYR)
       SVSF=VSF
C HAS STREAMFLOW SIMULATOR USED
       IF(VSF.NE.O.O) GO TO 200
C DETERMINE VALUE OF DAILY STREAMFLOW USED
       J=l-l                  '
       IDAY=J/NTP
       IDAY=IDAY+1
C GET YEAR OF STREAMFLOW BASED ON NUMBER  OF  YEARS READ IN
       IF(NYS.EQ.O) STOP 155
       JYR=MOD(NYEAR,NYS)
       1F(JYR.£Q.O)JYR=NYS
      VSF=CDUStlDAY,JYR)
200   CONTINUE
      VSH=RUN(2,1)
      VCSO=RUN(ltI)
       IF(OPT.EQ.80)GO TO 202
       IF(OPT.E0.81 )GOTO 201
C
C
C
    *
    *
    *
        LEAD ANALYSIS
2320
2311
       PCSO=PB(ltI)
       PSW=Pfi(2tI)
       PSF=PBUSF(IMO)
       CALL PBRW(VCSO,VSW,VSF, VOW, PCSO, PSW,PSF ,PBOW , SP3 ,F IPB.FDPB , I.
     1 CPBWO,UPBWO,CPB,IDT)
       TSPB=TSPB+SPB
       TUPE=TUPB+UPBKO
       TDPB=TDPB*CPBWO
       SUMPB=SUMPB+CPB
       PBMEM(1)=CPB
       1FU.LT.NTS96-1)GOTO 2311
       PB96=O.C
       DO 2320 IT=1,NTS96
       PB96=Pfe96+PBMEM( IT)
        CONTINUE
       APB96=PB96/NTS96
       IF(APB96.GT.PB96MX)PB96MX=APB96
        CONTINUE
C LAG THE MEMORY OF LEAD CONCENTRATIONS  FOR  THE  NEXT  TIME  STEP
       L1NTS=NTS96-1
       DO 2322 IT=1, LINTS
       IT1=IT-1
                                    B
00279200
00279300
00279400
00279500
00279600
00279700
00279800
00279900
00280000
00280100
00280200
00280300
00280400
00280500
C0280600
00280700
C0280800
00280900
00281000
00281100
00281200
00281300
00281400
00281500
00281600
00281700
00281800
00281900
00282000
00282100
00282200
00282300
00282400
00282500
00282600
00282700
00282800
00282900
00283000
00283100
00283200
00283300
00283400
00283500
00283600
00283700
00283800
C0283900
00284000
00284100
00284200
00284300
00284400
00284500
00284600
00284700
00284800
00284900
00285000
00285100
00285200

-------
       PBKEM( NTS96-1T1)=PBMEM( NT 596-1 T)
2322   CDNTINUt
201    CONTINUE
C   *4*««*«**«*«*** **«***«***«*«««**«
c   *                               *
C
C
        DISSOLVED OXYGEN ANALYSIS
19
                                    *
                                    *
       bODSW=bOD(2.1)
       BODCSOBQDd.I)
               2,I)
               1 ,1)
       CALL BODRW ( VSK .EODSW , VCSOtBODCSO ,VSF ,VDW, IMO,
     1 FOO.FDOXl.TSl tTCStBODTC»BDDTN,I,MTI,MO,ULOC,ULO^,CDO,DOMIN)
       TNBOQ=TNBGD+EODTN
       TCBOD=TCBOD+PODTC
       TULOC=TULCC«ULOC
       TULON=TULON+ULON
       1F(OOKIN.LT.O.O)LOMIN=G.O
       TDOMN(1)=DOMIN
       DOS3=0.0
       IF(1.LT.NTS3L1)GDTC 112C
       DO 111C 11=1, NTS3
llli
1120
1130
202
C
C
c   ••
c
c
       CQN1INUE
       ADC3=DUS3/NTS3
       IF(A003.&T.D03MN)GOTO 1120
       COM INUE
       DO 1130 12=1tNTS3Ll

       DOMEM(NTS3-14)=DGMEM(NTS3-I2)
       CONTINUE
       CONTINUE
        SUSPENDED SOLIDS ANALYSIS
       SSSW=SS(2,1)
       SSCSO=SS( 1,1 )
       SSF=SSUSF(1HO)
       CALL SSRW (VSW,SSSW,VCSD,S5CSO,VSF,SSF,VDW,SSDW, SST ,FSS , I ,USSkD )
      TSS=TSS*SST
       TUSS=TUSS+USSKC
       CONTINUE
        STEP
20
C
C
c
c   *            ^

C PUT REPORT ON UPSTREAM WATER QUALITY
       WRITE(I OUT, 1001)NYEAR,TULOC,TULON,TUSS,TUPB
C PRINT CFOO
      IF(OF'T.NE .60)CALL PUTFDO(FDO,DIST2,IND)
       IF COPT .NE .80)WRITE(I OUT,1003JD03MN
       IF (CPT.NE.80)CALL PUTOOS(DIST2,CDO,IDT)
t PRINT FDOX1                       B - 54
       i N n =• ?
00285300
00285400
00285500
00285600
00285700
00285800
00285900
00286000
00286100
00286200
00286300
00286*00
00286500
00286600
00286700
00286800
00286900
00287000
00287100
00287200
00287300
00287400
'00287500
00287600
00287700
00287800
00287900
00288000
00288100
00288200
C0288300
00288400
00288500
00288600
00288700
00288800
00288900
00289000
00289100
00289200
00289300
00289400
00289500
00289600
00289700
00289800
00289900
00290000
00290100
00290200
00290300
00290400
00290500
00290600
00290700
00290600
00290900
00291000
00291100
00291200
00291300

-------





c


c


c
c
c
c
c
c
c
c


c
C.J
1
c











v.
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c

c
c
c
c
c
c
IFtDISTl.GT.C.OKALL PUT FDD ( FDOX 1 ,DI ST1 ,IND)
1ND=1
IF (OPT. EC. 82) CALL PUTFPP (FIPB , IND ,DI ST2 )
IND = 2
IF ( OPT. EO. 82) CALL PUTFPB (FDPB, IND ,DI ST2 )
CALC MEAN LEAD CONC
PBMEAN=SUMPB/NSTEPS
IF(OPT.E0.82)WRITE(IOUT,1002)Ffi96KX,PBMEAN
PRINT CFSS
CALL PUTFSS(FSS.D1ST2)
KRITE(IOUT,10CO)KYEAR,TNBOD,TCBQD,TSS,TDPB,TSPB

=t *
* STEP 5 *
* «

RETURN TO CALLING MODULE
CALL ARRAYU ,TDOMN)

RETURN
END

RUNG F
SUBROUTINE RUNOFF (NYfcAR )
COMMON /1C/IIN,IMV,10UT
DIMENSION CRH2l60),CRUN(2160)tTRUN(2),TDUR(2),RUNMAX(2)
DIMENSION XRUN(2160)
COMMON /GLOBAL/IDT, NYR.LOCUO) .IRN1,IWSD
COMMON /RAIN/1SEAS1(12).1SEAS2(12),TBSA(2),DSA(2) ,RDA (2 ) ,RDS A(2)
1 ,CCA(2),RDY(2160)
COMMON /RUNOF/RUN(2,216C)
COMMON /IRO/IDORM(12),IGROW(12),CN1(2),CN2(2),CN3(2),OA(2),TC<2)
DIMENSION SFA(4)
DATA SEA/'DORM', 'ANT', 'GROW1, 'ING'/
SUBROUTINE RUNOFF WILL TRANSFORM THE ANNUAL RAINFALL ARRAY
INTO AN ANNUAL RUNOFF ARRAY. THE METHOD USED IS 3ASED ON
A RAINFALL RUNOFF RELATIONSHIP DEVELOPED BY THE SCS. RUNOFF
PRODUCED BY ANY GIVEN RAINSTORM WILL BE A FUNCTION OF THE
TOTAL RAINFALL AMOUNT AND THE ANTECEDENT MOISTURE CONDITION.
THE AMC IS A FUNCTION OF THE TOTAL DEPTH OF RAINFALL OCCURRING
IN THE 5-DAY PERIOD IMMEDIATELY PRECEDING THE STORM.

ONCE THE RUNOFF ARRAY IS GENERATED. A SIMPLE HYDROLDGIC ROUTING
(TIME-AREA) WILL BE APPLIED TO ACCOUNT FOR WATERSHED STORAGE
(LAG OR K FACTOR) .

AUTHOR - STAN CARPENTER

DATE - DECEMBER 1977

CONTINUE




B - 55
NAME DESCRIPTION
00291400
00291500
00291600
00291700
00291800
00291900
00292 COO
00292100
C0292200
C0292300
00292400
00292500
/-i/\OQOi,Art
\J\J cMt. 6UU
00292700
00292800
00292900
(\t\ o G o f\t\ r\
00293000
00293100
00293200
00293300
00293400
00293500
00293600
00293700
f\(\fyt\i CArt
00293800
00293900
00294000
00294100
00294200
00294300
00294400
00294500
C0294600
00294700
00294800
00294900
00295000
00295100
00295200
00295300
00295400
00295500
00295600
00295700
00295600
00295900
00296000
00296100
00296200
C0296300
00296400
00296500
00296600
00296700
00296800
00296900
00297000
00297100
00297300
00297400

-------
t
c
c
c
c
c
c
c
L
C
C

C
c
c
c
(.
c
c
c
c
t
c
t
c
c
c
c
c
c
6oC

to*
6L8

61*

C

C-IN
C
5




1C




15

C
RDY RAINFALL DEPTH ARRAY (2160)
IDDRH MONTHS IN THE DORMANT SEASON (12)
IGROU MONTHS IN THE GROWING SEASON (12)
CM CN VALUE 1
CN2 CN VALUE 2
CN3 CN VALUfc 3
DA DRAINAGE AREA
TC TIME OF CONCENTRATION
ICT TIME UNIT LENGTH (HOURS)

CONTINUE




NAME DESCRIPTION
SUMRU TOTAL RAINFALL DEPTH PER STORM
IFIRST TIME UNIT AT START OF STORH
HAST TIME UNIT AT END OF STORM
IUNIT TIME UNIT COUNTER
ARF SUMMATION OF RAINFALL DEPTHS IN THE PRECEDING 5 DAYS
XLI INITIAL LOSS AMOUNT
CPI CUMULATIVE RAINFALL SUMMATION ARRAY (2160)
CRUN CUMULATIVE RUNOFF ARRAY (2160)
RUN OUTPUT RUNOFF ARRAY
S MAXIMUM SOIL STORAGE
XLF LAG FACTGR
ILF LAG FACTOR ROUNDED AND TRUNCATED


FORMAT(//,'l RUNOFF STATISTICS FOR YEAR NO. «,I3,5X
1, 'WATERSHED NO. ',I3,//J
FORMATUOX.'TCTAL RUNOFF '.2A*,* SEASON =',F6.2,1 INCHES1!/)
FORMATUCX, 'TOTAL DURATION OF RUNOFF »,2A*,f SEASON = »,
1F6.C,' HOURS',/)
FORMATdGX, 'MAXIMUM ',12,' HOUR RUNOFF RATE, ",2A4,f SEASON ',
1' = ',F8.2,' CFS ',/)

DO 90C IWS=1,IWSD
1TIALIZE YEARLY VARIABLES

ISTGP^36C*24/1DT
DO 10 I=1,ISTOP
RUN(IWS,I)=0.0
XRUN(I)=0.0
CR1 (I )=0.0
CRUNU)=O.G
DO 15 1=1,2
TRUN(I)=0.0
TDUR(I)=0.0
RUNMAX(I)=0.0
CONTINUE
IUNIT=0

C-SEARCH THE RAINFALL AFRAY FDR A DEPTH GREATER THAN ZERO
C
20




IUNIT=IUNIT4l
IF(IUN1T.GT.ISTOP)GO TO 100
IF(RDY( IUNIT) .EC. 0.0)GO TO 20 B _ 55
IFIRST=IUN1T
--UU^V fSUU
00297600
00297700
00297800
00297900
00298000
00298100
00298200
00298300
00298*00
00298500
00298600
00298700


00298900
00299000
00299200
00299300
00299*00
00299500
00299600
00299700
00299800
00299900
00300000
00300100
00300200
00300300
00300*00
00300500
00300600
00300700
00300800
00300900
00301000
00301100
00301200
00301300
00301*00
00301500
00301600
00301700
00301800
00301900
00302000
00302100
00302200
00302300
00302*00
00302500
00302600
00302700
00302800
00302900
00303000
00303100
00303200
00303300
00303*00
00303500

-------
c
c-
c
30
      SUMRD=RDY(IUNIT)

  SUM THE RAINFALL DEPTHS FDR  THIS  STORM
      IUNIT=IUNIT+1
      IFUUNIT.GT.ISTOP)GO  TO  32
      SUMRD = SUMRD+RDYUUNIT)
      IF(RDYUUNIT) .NE.0.01GO  TO  30
      IUNIT=IUNIT+1
      IFUUNIT.GT.ISTOP)GO  TO  32
      SUMRD=SUMRD+RDY( IUNIT)
      IF(RDYUUNIT) .NE.C.01GO  TO  30
      ILAST=IUNIT-2
      GO TO 35
32    ILAST=ISTOP
C
C-SUM THE RAINFALL  DEPTH  IN  THE PRECEDING 5-DAY TIME PERIOD
C
35    IF ( IF IRST.GE.( 120/1 DT+1 )) IFST=IFIRST- ( 120/1 DT)
      IF(IFIRST.LT.(120/IDT+1»1FST=1
      IL=IFIRST-1
      IF(IL.EG.O)IL = 1
      ARF=0.0
      DO 40 Il^IFST.IL
40    ARF=ARF+KDY(I1)
C
C-ASSIGN A CN VALUE
C
      CALL MONTH(ISTOP,IFIRST,MTH>
      CALL SEASON(MTH,IDORM,IGRDW,ISEAS)
      IF(ISEAS.E0.2)GO  TO ^5
      IF(ARF.EQ.O.O)CN=CN1(IHS)
C     IF(ARF.GE.O.O.AND.ARF.LT..08)CN=CN1(IWS*
      IF(ARF.GT.O.O.AND.ARF.LT.0.3)CN=CN2(IWS)
CC    IF(ARF.GE..08.ANO.ARF.LE.C.8)CN=CN2(IWS)
      IF(ARF.GE.0.3}CN=CN3(IHS)
C     IF (ARF.GT.0.8)CN=CN3(IWS)
      GO TO 48
45    IF(ARF.LT.0.02)CN=CN1(IWS>
CC    1F(ARF.GE.O.O.AND.ARF.LT..08)CN=CN1(IWS)
      IF(ARF.GT..02.AND.ARF.LT.0.8)CN=CN2(IWS)
C     IF(ARF.GE..08.AND.ARF.LE-.0.8)CN=CN2(IHS)
      IF(ARF.GE.0.8)CN=CN3(IWS)
C     IF(ARF.GT.0.8)CN=CN3(IWS)
-48    CONTINUE
C
C-DETERMINE IF THE RAINFALL EVENT PRODUCES RUNOFF
C
      S=1000./CN-10.
      IF(XLI .GE.SUMRD1GC TO 20
C
C-DEVELQP CUMULATIVE RAINFALL SUMMATIONS
C
      CRI (1FIRST)=KDY(IF1RST)
      IFUFIRST.EO.ILAST1GO TO 55
      I1 = 1F1RST-»1
      DO 50 12=11, IL/ST
      13=12-1
      CR1(I2)=RDY(I2} + CF:I (13)        B  -  57
50    CONTINUE
00303600
00303700
00303800
00303900
00304000
00304100
00304200
00304300
00304400
00304500
00304600
00304700
00304800
00304900
00305000
00305100
00305200
00305300
00305400
00305500
00305600
00305700
00305800
00305900
00306000
00306100
C0306200
00306300
00306400
00306500
00306600
00306700
00306800
00306900
00307000
00307100
00307200
00307300
00307400
00307500
00307600
00307700
00307800
00307900
00308000
00308100
00308200
00308300
003084CO
00308500
00308600
003087CO
00308800
00308900
00309000
00309100
CO309200
00309300
00309400
00309500
C0309600

-------
THE CUMULATIVE: RUNOFF BY TIME PERIOD
C-COMPUTE
C
55    DO 75 I1=IFIRST,ILAST
      IF(CR1(I1).LE.XLI)GO TO
      XNUM=(CR1(I1)-XLI}**2.0
      XDEN=CRI(I1)+4.0*XLI
      CRUN(I1)=XNUM/XDEK
      CONTINUE
                    75
THE RUNOFF DEPTH FOR EACH TIME PERIOD
75
C
C-COMPUTE
C
      XRUNUFIRST)=CRUNU FIRST)
      IF( IFIRST.EG.ILASmO TO 20
      I1=IFIRST+1
      DO 95 12=11,1LAST
      13=12-1
      XRUN(I2)=CRUN(I2)-CRUN(I3)
95    CONTINUE
      GO TO 20
C
C-ROUTE THE RUNOFF BY THE TIME AREA METHOD
C
100   XLF=TC(1WS)/1DT+0.5
      ILF=XLF
C
C-DETERMINE IF ROUTING IS REQUIRED
C
      IF(ILF.Gfc.2)GO TO 200
C
C-CONVERT THE RUNOFF DEPTHS TO RATE IN CFS IF NO ROUTING
C
105   DO 110 l^l.ISTOP
      IF(XRUN(I).EQ.O.OO)GO TO 110
      CALL MONTHUSTOP.I.MTH)
      CALL SEASON(MTH,IDORM.IGROH,ISEAS)
      TRUNUS£AS) = TRUN(ISEAS)+XRUN( I)
      RUN(IWS,1)=1.00833*DA(IWS)*XRUN(I»/IDT
      TOUR<1 SEAS )=TDUR(1SEAS) + IDT
      IF(ISEAS.EQ.1.AND.RUN(IWS.I).GT.RUNMAX<1))RUNMAX(1)=RUN(IHS,I»
      IF(ISEAS.EQ.2.AND.RUN(IWS,I).GT.RUNMAX(2))RUNMAXm=RUN
-------
      1F(ISEAS.EC.1.AND.RUN( 1WS,J) .GT.RUNMAXd ) )RUNMAX( 1) =RUN( IMS ,
      IF(ISEAS.EQ.2.AND.PUN(IWS,J).GT.RUNMAX(2))RUNMAX(2)=RUN(IWS,
300   CONTINUE
C
C-OUTPUT THE RUNOFF STATISTICS FOR THE CURRENT  YEAR
C
400   WRITE(IOUT,60C)NYEAR,IWS
      DO 602 1=1,2
       11=1-1
       12=2*11+1
602   WRITE(IOUT,604)SEA(I2J,SEA<12+1),TRUNU)
      DO 606 1=1,2
       11=1-1
       12=2*11+1
606   WRITEUOUT,606)SEA(I2),SEAU2+1),TDUR(I»
      DO 612 1=1,2
       11=1-1
       12=2*11+1
612   WRITEUOUT,614)IDT,SEAU2).SEA(12+1),RUNMAXU)
900    CONTINUE
      RETURN
      END
C
C******************* RUNOLR  *********«************************:
C
      SUBROUTINE RUNOLR
       COMMON /IO/I1N,IRIV,IOUT
       COMMON /GLOBAL/IDT,NYR,LOC(IO),IRN1,IWSD
      COMMON /RUNQR/YBOC(2),RBOD<2),YTKN(2»,RTKN(2),YSS<2),RSS(2)
     1,YPB<2),RPB(2)
C
C-
C-
C
C-INPUT FORMAT STATEMENTS
C
      FORMAT(2F10.4)
      FORMAT('1»,16X,'CONTINUOUS STORMWATER POLLUTION SIMULATION  S
     I,/
     1,25X,'FEBRUARY,1979•,//
     2,IX,'RUNOFF QUALITY INPUT DAT A*t20('-'),//)
      FORMATC1X,'INPUT DATA  FOR WATERSHED NO.'.IS,/,
     1       4X,*BOD ACC. RATE =»,F10.4,' f/AC/DAY*
     1,5X,'BOD REMOVAL RATE  =',F10.4,« FRACT/DAY',/,
     1       4X,'TKN ACC. RATE =',F10.4,' i/AC/DAY'
     1,5X,'TKN REMOVAL RATE  =',F10.4,« FRACT/DAY',/,
     1       4X,'SS ACC. RATE = ',F10.4,' f/AC/DAY",
     15X,«SS REMOVAL RATE =  ',F10.4,» FRACT/DAY•,/,
      SUBROUTINE RUNOLR WILL READ THE INPUT DATA FOR THE RUNOFF
      QUALITY MODULE AND LIST THE INPUT DATA ENTERED.
100
600
610
     1
             4X,'PB ACC. RATE = '.F10.4,' #/AC/DAY*
     l.SX.'PB REMOVAL RATE = '.F10.4,' FRACT/DAY',/)
C
C-READ
C
200
C
       THE INPUT DATA FOR THE RUNOFF SIMULATOR

      DO 200 1 = 1 ,IWSD
      REAOU IN,10C)Y60D(I ),RBOD(I)
      READ(IIN,100)YTKN(I),RTKN(I)
      READ(IIN,100)YSS(I),RSS(I)
      READ(IIN,100)YPB(I),RPB(I)
      CONTINUE                      B - 59
      00315800
J)     00315900
J)     00316000
      00316100
      00316200
      00316300
      00316400
      00316500
      00316600
      00316700
      00316800
      00316900
      00317000
      00317010
      00317020
      00317100
      00317200
      00317210
      00317220
      00317300
      00317400
      00317500
      00317600
      00317700
      00317800
      00317900
      00318000
      00318100
      00318200
      00318300
      00318400
      00318500
      00318600
      00318700
      00318800
      00318900
      00319000
      00319100
YSTEM'00319200
      00319210
      00319300
      00319400
      00319500
      00319600
      00319700
      00319800
      00319900
      00320000
      00320100
      00320200
      00320300
      00320400
      00320500
      00320600
      00320700
      00320800
      00320900
      00321000
      00321100
      00321200
      00321300

-------
C
C
C
C
C
C
C
C
C
C
C
c-

c
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C

C
C
C
C
C
C-LIST THE INPUT DATA TO THE RUNOFF QUALITY SIMULATOR
C
      WRITE(IOUT,600)
      DO 800 I=1,IWSD
      WRITE(IOUT,610)1,YBOD(I),RBQD(I),YTKN(1),RTKN(I),YSS(I),RSS<1),
     1 YPB(I).RPPU)
600   CONTINUE
      RETURN
      END
C

C
      SUBROUTINE RUNOLT(NYEAR)
       COMMON /IO/IIN,1RIV,IOUT
       COMMON /GLOBAL/IDT,NYR,LOC(10),IRN1,IWSD
      COMMON /RUNQL/BOD(2,2160),TKN(2,2160),SS(2,2160),PE(2,2160)
      COMMON /RUNOF/RUN(2,2160)
      COMMON /RUNQR/YBOD(2»,RBOD(2),YTKN(2),RTKN(2),YSS(2),RSS(2)
     1,YPB(2),RPB(2)
      COMMON /IRO/1DORM(12),IGROW(12),CN1(2),CN2(2),CN3(2),DA(2),TC(2),
     1 CWO(2)
        COMMON /SAVL1/S1(2),BODSI(2),SSSI(2),TKNSI(2),PBSI(2),SXBOD(2).
     1 SXSS(2),SXTKN(2),SXPB(2)
C     AWP(R,IDT,CP)=R*62.4*3600*IDT*CP/1000000.
      X(Y1,IDT)=Y1*IDT/?4.0
      Z(Z1,IDT)=7.5*Z1*24.0/IDT
      XL2(XL1,R,Y,XRUN)=(XL1*(1-R)+Y)-(XL1*(1-EXP(-4.6*XRUN*C1)1)
      XM2(XL1,XRUN)=(XL1*(1-EXP(-4.6*XRUN*C1)))*C2/XRUN

      SUBROUTINE RUNGLT WILL DETERMINE THE BOO ,TKN, SS AND PB
      QUAILTY ARRAYS BY WATERSHED FROM THE INPUT RUNOFF ARRAYS BY
      WATERSHED AND FROP THE 'ACCUMULATION AND RUNOFF RATES  BY
      WATERSHED AND BY POLLUTANT. OUTPUT WILL INCLUDE MAXIMUM
      POLLUTANT CONCENTRATIONS, MEAN POLLUTANT CONCENTRATIONS,
      TOTAL ANNUAL POLLUTANT WASHOFF, AND THE QUALITY ARRAYS FOR
      EACH WATERSHED AND EACH POLLUTANT.

      INPUT VARIABLES:
      CONTINUE
      NAME
DESCRIPTION
YBOD ACCUMULATION RATE FOR BOD FOR THE CURRENT WATERSHED
RBOD WASHOFF
YTK.N ACCUMULATION
RTKN WASHOFF
YSS ACCUMULATION
RSS WASHOFF
YPB ACCUMULATION
RPB WASHOFF
" BOD
TKN
TKN
SS
SS
PB
PB
IWS NO. OF WATERSHEDS








RUN RUNOFF ARRAY FOR THE CURRENT WATERSHED
DA(IWS) DRAINAGE AREA FOR THE CURRENT WATERSHED
OUTPUT VARIABLES:
CONTINUE
BOD BOD QUALITY ARRAY (2.2160)
TKN TKN * " «
SS SS " »B . 60
PB PB * « "






00321400
00321500
00321600
00321700
00321800
00321900
00322000
00322100
00322200
00322300
00322*00
00322500
00322600
00322700
00322800
00322900
00323000
00323100
00323200
00323300
00323400
00323500
00323600
00323700
00323800
00323900
00324000
00324100
00324200
00324300
00324400
00324500
00324600
00324700
00324800
00324900
00325000
00325100
00325200
00325300
00325400
00325500
00325600
00325700
00325800
00325900
00326000
00326100
00326200
00326300
00326400
00326500
00326600
00326700
00326800
00326900
00327000
00327100
00327200
00327300
00327400

-------
c
c
c
c
c
c
c
Cl
C2
XBOD
XTKN
XTKN
XSS
XPB
CONSTANT NO. 1
CONSTANT NO. 2
WASHOFF OF BOD BY TIME PERIOD
" » TKN " » *
" * TKN " " »
* • 55 • • •
» » PB " * "
CONTINUE
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
200





BOD SUM
TKNSUM
SSSUM
PBSUM
RUN SUM
BODMPC
TKNMPC
SSMPC
PBMPC
AWBOO
AWTKN
AWSS
AWPB
BDDMAX
TKNMAX
SSMAX
PB


TOTAL BOD CONCENTRATION
» TKN «
" SS "
« PB *
TOTAL RUNOFF
MEAN BOD CONCENTRATION (MG/L)
« TKN «
» SS "
" PB "
TOTAL ANNUAL HASHDFF BOD (LBSJ
» « "TKN
" « " SS
" " " PB
MAXIMUM CONCENTRATION BOD (MG/L)
" « TKN
" » SS
" " PB


FORMAT!//, '1 RUNOFF QUALITY - STATISTICS FOR YEAR NO.'
113, 5X,
1
1
1
1
•WATERSHED NO. *,I3,/,
T42,'BOD',T53.'TK'H',T64,'SS',T75,'PB'/,
IX, 'MAXIMUM CONCENTRATIONS(MG/L)',T32,.EO.O.O)CHOUWS)=4.fc
 BOOMAX=0.0
 TKNMAX=0.0
 SSMAX=0.0
 PBMAX=O.C
 BDDSUM=0.0
 TKNSUM=0.0
 SSSUM=0.0
 PBSUM=0.0
 RUNSUM=C.O
 CYBOD=X(YBOD(IKS),IDT)
 CRBOD=X(RBOD(IWS) ,IOT)
 CYTKN=X(YTKN(IWS),IDT)
 CRTKN=X(RTKN( IWS) ,1DT)
                                    B - 61
00327500
00327600
00327700
00327800
00327900
00328000
00328100
00328200
00328300
00328400
00328500
00328600
00328700
00328800
00328900
00329000
00329100
00329200
00329300
00329400
00329500
00329600
00329700
00329800
00329900
00330000
00330100
00330200
00330300
00330400
00330500
00330600
00330700
00330800
00330900
00331000
00331100
00331200
00331300
00331400
00331500
00331600
00331700
00331800
00331900
00332000
00332100
00332200
00332300
00332400
00332500
00332600
00332700
00332800
00332900
00333COO
00333100
00333200
00333300
00333400
00333500

-------
      CYSS=X(YSS(IWS).IDT)
      CRSS=X(RSS(IWSJ,IDT)
      CYPB=X(YPB(IWSKIDT)
      CRPB=X
-------
       SXSS(IWS)=XSS
       SXTKN(1WS)=XTKN
       SXPB(IWS)=XPB
C
C-CALCULATt THE CEAN POLLUTANT  CONCENTRATIONS £ AWP
C
      BODMPC=BODSUM/RUN SUM
      TKNMPC=TKNSUM/RUNSUM
      SSMPC=SSSUM/RUNSUM
      PPMPC=PBSUM/RUNSUK
      AWBOD=AWP(RUNSUM,IOT,BODMPC)
      AKTKN=AWP(RUNSUM,IDT,TKNMPC)
      AWSS=AWP{RUNSUM,I[T,SSMPC)
      AWPB=AWP(RUNSUP,IDT,PBMPC)
C
C-OUTPUT THE RESULTS OF THE  RUNOFF  QUALITY MODULE
C
      WRITL(IOUT,2CO)NYEAR,IWS  ,BODMAX,TKNMAX.SSMAX,PBMAX.BODMPC,
     1 TKNMPC,SSMPC,PBMPC,AWBOD,AWTKN,AWSS,AWPB
900    CONTINUE
      RETURN
      END
                     «:»«««««$«««:  RUNRD  **** *********************** ={**
C
      SUBROUTINE RUNRD
       COMMON /IO/IIN,IRIV,IOUT
       COMMON /GLOBAL/IDT,NYR,LOC(1Q),IRN1,IWSD
      COMMON /IRO/IDCRMU2),IGRDW(12),CN1(2),CN2(2),CN3(2) ,DA(2) , TCC2) ,
     1 CWO(2)
C
OSU6ROUTINE RUNRD WILL READ  THE  INPUT  DATA FOR THE RUNOFF SIMULATOR
C-ANO LIST THE  INPUT DATA  ENTERED.
C
C
C-1NPUT FORMAT  STATEMENTS
C
100   FORMAT(12I2)
      FORMAT(3F10.2)
      FORMATS 'I1, 16X , 'CONTINUOUS  STORMWATER POLLUTION SIMULATION SYSTEM
     I,/
     1.25X, 'FEBRUARY, 1979 •,//
     2, IX, 'RUNOFF    SIMULATOR INPUT  D ATA • ,20( •-•),//,
     1       /, IX, 'MONTHS  IN  DORMANT SEASONS')
      FORMAT(20200
 003^0300
 00340*00
 003*0500
 003*0600
 003*0700
 003*0800
 003*0900
 003*1000
 003*1100
 003*1200
 003*1300
 003*1*00
 003*1500
 003*1600
 003*1700
 003*1800
 003*1900
 003*2000
 003*2100
 003*2200
 003*2300
 003*2*00
 003*2500
 003*2600
 003*2700
 003*2800
 003*2900
 003*3000
 003*3100
 003*3200
 003*3300
 003*3*00
 003*3500
•003*3600
 003*3610
 003*3700
 003*3800
 003*3900
 003**000
 003**100
 003**200
 003**300
 003***00
 003**500
 003**600
 003**700
 003**800
 003**900
 003*5000
 003*5100
 003*5200
 003*5300
 003*5*00
 003*5500
 003*5600

-------
550   CONTINUE
C
C-LIST THE  INPUT DATA  TO  THE  RUNOFF  SIMULATOR
C
      WRlTb(IOUT,600)
      DO 604  1=1 ,12
      1F< IDORM(I).EO.C)GO TO  607
604   WRITE UCUT,6G6)IDORM(I )
607   CONTINUE
      WRlTfc{IOUT,608)
      00 610  1=1,12
      IF( 1GROW(I).EC.O)GO TO  612
610   WRITE(IOUT,606)1GROW(I )
612   CONTINUE
      00 650  1 = 1 ,1WSD
      WRITE{10UT,614)I,CN1(I),CN2U ),CN3(I) ,D
65C   CONTINUE
      RETURN
      END
                                                        ,CWO(I)
                              **  SEASON *****************************

      SUBROUTINE SE ASON (MTH, 1SE AS1 , ISEAS2 ,1 SEAS )
C-SUBROUT1NE SEASON KILL  DETERMINE  THE CURRENT SEASON USEAS)
C-GIVEN THE CURRENT HONTH (MTH),  AND TWO ARRAYS, ISEAS1= THE
C-MONTHS IN SEASON  1,  AND 1SEAS2= THE  MONTHS IN SEASON 2.
C
      DIMENSION  1SEAS1(12),1SEAS2(12)
      DO 10 1=1,12
      IF I MTH. fc O.I SEA SI ( I))ISEAS=01
      IF{MTH.EO.ISEAS2(I))ISEAS=02
10    CONTINUE
      RETURN
      END
C
C********************  SSRW *************************
C
       SUBROUTINE SSRW  (CSW, SSSW.QCSO .SSCSQ ,QUS ,SSUS,QDH ,S SOW ,
     1 SST1 ,FSS,1,SSWOU)
       COMMON /GLOBAL/ IDT ,NYR ,LOC ( 1 C ) , I RM , IWSD
       DIMENSION FSS(21)
C
C THIS MODULE ANALYZES  SUSPENDED  SOLIDS  IN  THE RECEIVING WATER
C
    C.A. -A A »*» -Jt. -«L *l^ wV A- Jt .", .^ JW Jt
    •*• -v V- •*•**• -^f •& vf -v -v- tf •*• -*
C   *            *
C   *   STEP 1   *
C   *            *
C COMPUTE TOTAL FLOW  (IN  CFS)
C
       CT=OSW+QCSO+GUS+GDW
       1F(CT.NE.O.C)GOTL'  20
       SSMAX=0.0
       SST1=0.0
       GOTO 30
C
C
                                     B - 64
        STEP 2
00345700
00345800
00345900
00346000
00346100
00346200
00346300
00346400
00346500
00346600
00346700
00346800
C0346900
00347000
00347100
00347200
00347300
00347400
00347500
00347600
00347700
00347800
00347900
00348000
00348100
00348200
00348300
00348400
00348500
00348600
00348700
00348800
00348900
00349000
00349100
00349200
00349300
00349400
00349500
00349600
00349700
00349800
00349900
00350000
00350100
00350200
00350300
00350400
00350500
00350600
00350700
00350800
C0350900
00351000
00351100
00351200
00351300
00351400
00351500
00351600
00351700

-------
c
c
c
C COMPUTE MAXIMUM SS CONC (MG/L)
CC
20     CONTINUE
       SS2=OCSO*SSCSO
       SS3=QUS*SSUS
       SS4=QDW*SSDW
       SSMAXMSSHSS2+SS3 + SS4 )/CT
C
c
c
c
c
c
cc


c
c
c
c
c
c
c
30
c
c
c
c
c
c
c
c
10

c
c*
c

c
c
c
**************
* *
* STEP 3 *
* *
**************

COMPUTE TOTAL SS (#/DT )
SST1=ANP(QT,IDT,SSMAX)
SSWOU=AWP(OUS,IDT,SSUS
«**********«««
* *
* STEP 4 *
* *
**************









)






CUMULATIVE CISTR OF SUSPENDED
CALL CFSS(SSMAX.FSS)
**************
* *
* STEP 5 *
* *
**************

RETURN TO CALLING MODULE

RETURN
END

********************** STOR

SUBROUTINE STOR (NYEAR













*

)

STORAGE / TREATMENT SIMULATOR


                                SOLIDS
10CO
       COMMON /GLOBAL/IDT ,NYR, LCC(IO) .IRN1.IWSD
      COMMON /IRO/IDORM(12),IGROW(12),CN1(2 ) ,CN2( 2 ) ,CN3 (2) tDA<2 ) ,TC(2)
        COMMON /RUNOF/ RUN{2,2160)
        COMMON /RUNQL/BCD(2,2160),TKN(2.2160),SS(2.216D),PB(2,2160 )
        COMMON /STOR1/ETBOD(2),ETSS(2),ETTKN{2),ETPB(2) ,SMAX( 2) , TM AX (2 )
        COMMON /SAVE1/SI(2),BODSH2),SSSI(2),TKNSI(2J,PBSI(2),SXBOC(2) ,
     1 SXSS(2),SXTKN(2),SXPB(2)
       COMMON /IO/IIN.IRIV.IOUT
       REAL L1BOD.L1SS,LITKN,LIPB,LSBOO,LSSS,LSTKN,LSPB
       FORMAT(//T20, 'RESULTS FOR STORAGE TREATMENT  •,
     1 T50,'YEAR'.T56,I2tT65, 'WATERSHED  :',T7*,12/,
     1 /T2, 'NUMBER OF HOURS STORAGE IS EMPT Y : • ,nC, 14 ,
     2 T50, 'PERCENT OF TOTAL TIME : • ,T72 ,F6.2 ,
     2 /T2, 'NUMBER OF HOURS WWTP OPERATING   t'.UO.H,
     3 T50, 'PERCENT OF TOTAL TIME: ' ,T72 .F6.2 ,
     3 /T2, 'NUMBER OF OVERFLOW HOURS  :*.T40,I4,
                                    B -  65
00351800
00351900
00352000
00352100
00352200
00352300
00352400
00352500
00352600
00352700
00352800
00352900
00353000
00353100
00353200
00353300
00353400
00353500
00353(00
00353700
00353800
C0353900
00354000
00354100
00354200
00354300
00354400
00354500
00354600
00354700
00354800
00354900
00355000
00355100
00355200
00355300
00355400
00355500
00355600
00355700
00355800
00355900
00356000
00356100
00356200
00356300
00356400
00356500
00356600
00356700
00356600
00356900
00357000
00357100
00357200
00357300
00357400
00357500
00357600
00357700
00357600

-------
     * /T2,'ANNUAL OVERFLOW VOLUME IN INCHES :',T39fF6.2,
     5 /T2,'NUMBER OF OVERFLOW EVENTS *',T*0,I*,
     6 /T2,'NUMBER OF DAYS WITH OVERFLOW ' ,T*0,1*)
1C01   FORMAT('1»,'S/T AND OVERFLOW SUMMARY FOR YEAR NO. »,I2.3X,
     1 'WATERSHED NO. ',I2//»T*2.'BOO',T53f'TKN*,T6*,'SS',T75,
     2 «PB'//,
     1 IX,'MAXIMUM CONCENTRATIDNS(MG/L)*,T32,*(1X,F11.2),/,
     1 IX,'MEAN CONCENTRATIONS(MG/L)',T32,*UX,F11.2),/,
     1 IX,'RESIDUAL ANNUAL WASHOFF(LBS)',T32,*(IX,F11.0),/)
10     CONTINUE
       DT3600=IDT*3600
       NSTEPS=86*0/IOT
       IDUNIT=2*/IDT
C
C
C
C
C
C

C
C
C

C

C

C

C

C INITIALIZE NUMBLR OF OVERFLOW EVENTS
        NOE=0
C INITIALIZE MAXIMUM CONCENTRATIONS
       BODMAX=0.0
       TKNMAX=G.O
       SSMAX=0.0
       PBMAX=0.0
C INITIALIZE SUMS
       S60D-C.O
       STKN=C.O
       SSS=0.0
       SPB=0.0
       RUNSUM=O.C
C INITIALIZE DAY COUNT
       1DCT=C
C INITIALIZE NO. OF DAYS WITH OVERFLOW
       NDO = 0
C INITIALIZE COUNTER FOR DAILY OVERFLOW  EVENTS
       INDO^O
C
C
C
C
C
C
C
  RUN STORAGE-TREATMENT FOR ALL WATERSHEDS FOR ONE YEAR

       DU 21 1 = 1 ,1WSD
  INITIALIZE CONDITIONS FOR  —THIS YEAR —THIS WATERSHED

  INITIALIZE NUMBER HOURS STORAGE IS ZERO
        NHSO=0
  INITIALIZE NUMBER HOURS TREATMENT NOT ZERO
       NHTNO=0
  INITIALIZE NUMBER OF HOURS OF OVERFLOW
       NOH = 0
  OVERFLOW VOLUME -ANNUAL
       OFLV=C.O
  INITIALIZE PREVIOUS PERIOD OVERFLOW
  DD ANNUAL ANALYSIS FOR A WATERSHED
       DO 20 J^l.NSTEPS
  FLOW INTO SYSTEM
       AINF=RUN(1,J)*DT3600
                                    B - 66
00357900
00358000
00358100
00358200
00358300
00358*00
00358500
00358600
00358700
00358800
00358900
00359000
00359100
00359200
00359300
00359*00
00359500
00359600
00359700
00359800
00359900
00360000
00360100
00360200
00360300
00360*00
00360500
00360600
00360700
00360800
00360900
00361000
00361100
00361200
00361300
00361*00
00361500
00361600
00361700
00361800
00361900
00362000
00362100
00362200
00362300
00362*00
00362500
00362600
00362700
00362600
00362900
00363000
00363100
00363200
00363300
00363*00
00363500
00363600
00363700
00363800
00363900

-------
C SUH STDRAGt PLUS  INFLCW
C OUTFL - FLOK< RATE CUT OF  STORAGE  €  INTG TREATMENT FOR TIME PERIOC
C         (FT**3/SEC)
2000   OUTFL=STQF/DT360t
C IS OUTFLOW RATE GREATFR  THAN  MAX  OUTFLOW RATE  ?
       IF(OUTFL.GT.TMAX(I HOUTFl =TMAX (I )
C CALCULATE AMT  IN STORAGE
       STOR=STOR-(OUTFL*DT360C)
C MIN VALUE FOR  STORAGE
        SMINI=.0001*SHAX(I )
        IF(STOR.LE.SMIN)STOR=O.C
2001   CONTINUE
C
C CHECK FOR OVERFLOW
C
C OVERFL - AMT OF RUNOFF  IN EXCESS  OF  STORAGE  VOLUME  (FT**3/SEC)
C          THIS  IS UNTREATED BYPASS
       SAVE=STOR
      1F(STOR.GT.SMAX(I ))STOR=SMAX( I)
      IF{STOR.fcC.SMAX(l))OVERFL=SAVE-SMAX(I)
      IFCSTOR.LT.SMAXU )) OVERFL =0.0
C KEEP TRACK OF  OVERFLOW  VOLUME  FOR ANNUAL STATISTICS
       OFLV=OFLV+OVERFL
      OVERFL=OVERFL/OT36&0
C KEEP TRACK OF  NUMBER HOURS OF  OVERFLOW
       IF(OVERFL.NE.0.0JNQH=NOH+IDT
2002   CONTINUE
C OVERFLO CUALITY
       QOBOO=BOD(I,J)
       OOSS=SSU,J)
       OOTKN=TKN(I,J)
       COPE=PE(I,J>
        CONTINUE
                           FOR  THIS  TIME  PERIOD
2009
C
C X1NF - INFLOW  TO  STORAGE
      XINF = RUN(I,J)-GVEF,FL
C INPUT QUALITY  FOR MIXING
       LIBOD=X1NF*BOD(I,J)*DT3600
       L1SS=XINF*SS(I,J)*OT36CO
       LITKN=XINF*TKN( I ,J)*DT3600
       L1PB=XINF*PB(I,J)*OT3600
2010   CONTINUE
C
C STORAGE QUALITY BEFORE MIXING
       LSBOD=SI( I)*BODSI (I)
       LSTKN=SI(I)*TKNSHI)
       LSSS=SI(I)*SSSI(I)
       LSPB=SI(I)*PBSI( I)
C
C CS QUALITY OF  STORAGE AFTER MIXING
2003   CONTINUE
C CALCULATE VOLUME OF  STORAGE AFTER MIXING
       X1NFSI=XINF*OT36GO + SH I)
       IFUINFSI .GT.SMIN) GO  TD  15
       QSBOD=0.0
       GSTKN=0.0
       OSPb=0.0
       QSSS=0.0
       BODSI(1)=0.0
       SSS1(I)=0.0
                                     B  -  67
0036^.000
C03641QO
0036A200
0036^300
00361400
0036*1^00
00364600
00364700
00364800
00364900
00365000
00365100
00365200
00365300
00365400
00365500
00365600
00365700
00365800
00365900
00366000
00366100
00366200
00366300
00366400
00366500
00366600
00366700
00366800
00366900
00367000
00367100
00367200
00367300
00367400
00367500
00367600
00367700
00367600
00367900
00368000
00368100
00368200
00368300
00368400
00368500
00368600
00368700
00368800
00368900
00369000
00369100
00369200
00369300
00369400
00369500
00369600
00369700
00369800
00369900
00370000

-------
                          STORAGE IS ZERO
       TKNS1(I)=0.0
       PBS1U)=0.0
C INCREMENT NUMBER HOURS
       NHSO=NHSO-»IDT
       GO TO 16
15     CONTINUE
       QSBOD={LIEOD4LSBOD)/XINFSI
       BODSKI ) = CSBBD
       CSSS=(LISS*LSSS)/(XINFSI)
       £SSI(I)=QSSS
       eSTKN=(LlTKN4LSTKN)/(XlNFSI)
       TKNS1(1}=GSTKN
       &SPB=(LIPP+LSPB)/(XINFSI )
       PBS1(I)=OSPB
       CONTINUE
2012
C
C TREATMENT
            OCCURS HERE
16     CONTINUE
C KEEP TRACK NUMBER OF HOURS TREATMENT NOT  EQUAL  ZERO
       IF(GUTFL.NE.O.O)NHTNO=NHTNO-»IDT
       GOTEOD = QS60D*U-ETBOD(IH
       QOTSS=QSSS*(1-ETSS(I))
       CGTTKN=QSTKN*(1-ETTKN(I))
       QOTPB = 6SPB*(1-ETPB(I»
2013   CONTINUE
C
C QUALITY SEND TO RECEIVING WATER
       OVERGT=OVERFL+OUTFL
       IF(OVEROT.GT.Q.O)GO TO 17
       bODU ,J)=0.0
       TKN(I ,J}=0.0
       SS(1,J)=0.0
       PB(1 ,J)-0.0
       GO TO 19
17     CONTINUE
       60D(I,J} = (QDEOD*OVERFL-»CDTBQD*CUTFL)/OVERDT
       SS(I,J)=(QCSS*OVERFL+OOTSS*OUTFL)/OVEROT
       TKN{I,J}=(QOTKN*CVERFL+QOTTKN*OUTFL)/GVEROT
       PB(I,J)^(COPP*OVFRFL+QOTPB*OUTFL)/CVEROT
19     CONTINUE
       PEOD=BOO(I,J)
       PSS = SSU,J)
       PTKN=TKN(I,J)
       PPB=PB(I,J)
C CHECK FOR NUMBER OF OVERFLOW EVENTS
       IF(CVERFL.NE.O.O.AND.POVRFL.EQ.O.O)NOE=NOE+1
C INITIALIZE LAG OVERFLOW FOR NEXT TIME PERIOD
       POVRFL^OVERFL
C
C SI - VOLUME IN STORAGE AT END OF TIME PERIOD  (FT**3J
        SKI )=STOR
C SAVE MAXIMUM CONCENTRATIONS
        IF(PeOD.GT.BOOMAX)BODMAX=PBOD
        1F(PTKN.GT.TKNMAX)TKNMAX=PTKN
        IF(PPB.GT.PBMAX)PBMAX=PPB
        IF(PSS.GT.SSPAX)SSMAX=PSS
C CALCULATE SUMMATION FOR MEAN CONCENTRATIONS AND RUNOFF
        SEOD=SBOD*PBOD  *OVEROT
        STKN=STKN*PTKN *OVEROT
        SSS=SSS+PSS *OVEROT          B  -  68
        SPB=SPB+PPB     *OVERCT
00370100
C0370200
00370300
00370400
00370500
00370600
00370700
00370800
00370900
00371000
00371100
00371200
00371300
00371400
00371500
00371600
00371700
00371800
00371900
00372000
00372100
00372200
00372300
00372400
00372500
00372600
00372700
00372800
00372900
00373000
00373100
00373200
00373300
00373400
00373500
00373600
00373700
00373800
00373900
00374000
00374100
0037420a
00374300
00374400
00374500
00374600
00374700
00374800
00374900
00375000
00375100
00375200
00375300
00375400
00375500
00375600
00375700
00375800
00375900
00376000
00376100

-------
  QUANTITY OF RUNOFF TO RECEIVING HATER
        RUN(I,J)=OVERGT
        RUNSUM=RUNSUM+OVEROT
  INCREMENT DAY
       IDCT=IDCT+1
       IFUDCT.GE.IDUNITJGO TO  100
       GO TO 120
  IF ANY OVERFLOW PERIODS THEN  ACCUM  ANOTHER  DAY  WITH OVERFLOW
100
        CONTINUE
       IF(GVERFL.GT.O.O)INDO=INDO+1
       IF(INDO.GT.O)NDO=NDO+1
C  REINITIALIZE DAY COUNT AND NO. OF  OVERFLOW  PERIODS  IN  DAY
110    CONTINUE
       IDCT=0
       INDO=0
       GO TO 20
C IF THIS TIME PERIOD HAD OVERFLOW KEEP  COUNT  NO.  OF OVERFLOWS THIS DAY
120    1F(OVERFL.GT.O.O)INDO=INDO+1
20     CONTINUE
C CONVERT ANNUAL OVERFLOW TO INCHES
       OFLV=OFLV/(43560*DA(1)J
       OFLV=OFLV*12.C
C PERCENT HOURS STORAGE EMPTY
       PHSC=NHSO*100.0/8640.0
C PERCENT TIME WWTP OPERATING
       PHTNO=NHTNO*100.0/8640.0
C WRITE REPORT FOR THIS WATERSHED FOR THIS  YEAR
       WRITE(IOUT,1000)NYEARtItNHSO,PHSO,NHTNO,PHTNO,N3H,OFLV,NOE,NDO
C CALC MEAN CONCENTRATIONS
       ABOD=SBOD/RUNSUM
       ATKN=STKN/RUNSUM
       ASS=SSS/RUNSUM
       APB=SPB/RUNSUM
C CALC ANNUAL WASHOFF
       AWOBOD=AWP(RUNSUf',lDT,ABOD)
       AHGTKN=AWP(RUNSUM,IDT«ATKN)
       AWOPB=AWP(RUNSUMiIDT,APB)
       AWOSS=AWP(RUNSUM,IDT,ASS)
       WRITE(IOUT,10Gl)NYEAR,I,BODMAX,TKNMAX,SSMAX,PBMAXt
       ABOD,ATKN,ASStAP6,AWOBOD,AWOTKN,AWOSS,AWOPE
       CONTINUE
       RETURN
       END
     1
21
C
C
C
                 ******** STORRD ***

       SUBROUTINE STORRD
       COMMON /IO/IlN,IkIV,IOUT

  THIS MODULE READS INPUT FDK STORAGE TREATMENT

       COMMON /GLOBAL/IDT,NYR.LOCdO) ,1RN1, IWSD
       COMMON /STORl/ETBOD(2)iETSS(2),ETPE(2)tETTKNt2),SMAX(2),TMAX{2)
        COMMON /SAVE1/SH2) .BODSI (2 ) ,SSSI (2 ) ,TKNS I (2 ) ,PBSI ( 2) ,SXBO C( 2) ,
     1 SXSS<2),SXTKN(2),SXPB(2)
C
1000
lc-01
1002
       FORMAT(2FlO.O,<.F5.
-------






1






1



c
c
c
c
c
c
c
c
c
c
c
c
c
i-
3
*
5
6
7
003
1
1
2
3
*
r
00*
!•
i/
i
KEAD
TMAX
SMAX
SI
BODSI
SSS1
TKNSI
PBSI
ETBOD
ETSS
ETTKN
ETPE

       T7, 'MAXIMUM TREATMENT RATE  : • ,T*0,F1 0.2 . •  CFS1/,
       T25, 'TREATMENT PLANT EFFICIENCIES  :',/,
       T26,«BOD s',T*0,F9.*/,
       T13, 'SUSPENDED SPLIDS : • ,T*0,F9. */,
       T26,'TKN : »,T*0,F9.*/,
T2
LEAD
                   ,T*0 ,F9.*
       FQRMAT(//,T25, 'INITIAL CCND1T10NS FOR STORAGE  :•
       T60, 'WATERSHED :',T72,I2/,
       T23, 'VOLUME : ' ,T*0 .F10.2 , • FT**3'/,
       T21»'EOD CONC : • ,T*0,F 10 .2, • MG/L1/,
       T22,'SS CONC  :',T*0,F10.2,' MG/L'/,
       T21,'TKN CONC :
       T20, 'LEAD CONC
       FORMAT('1',T26,
          1 ,T*0,F10.2,« MC/L'/,
          : ',T*0,F10.2,» MG/L')
          'CONTINUOUS STORMHATER
                                      POLLUTION  SIMULATION
       ,130,'FEBRUARY,1579',///,
       T26,'INPUT FOR STORAGE/TREATMENT',20('-•),//)
       INPUT
       -MAX TREATMENT RATE (CFS)
       -MAX STORAGE VOLUME (FT**3)
       -STORAGE VOLUME AT T=0 (FT**3)  (INITIAL)
         -QUALITY CF INITIAL RUNOFF IN STORGE  (MG/L)
        -TREATMENT PLANT EFFICIENCIES
       WRITEdOUT.lCC*)
       DU * I=1,IWSO
       RE AD(I IN. 1000) SMAX(I),TMAX(I),ETBOD(1),ETSS(I),ETTKN(I ),ETP
       WKITE(IOUT,1C02) l.SMAXd J.TMAX(I) .ETBOD(I) ,ETSS( I),ETTKN(1)
       ETPbd )
       RL ADMIN, 1001) SI (l).BODSId) ,SSSI (I) .TKNSI (1 ) ,P3SI ( I)
       KRITE(IOUT,1GC3)I,SI(I),BODSI(I),SSS1(I).TKNSI(I ),PBSI (I)
       CONTINUE
       RETURN
       END
       SUBROUTINE TRANS (XM,XSD,XR,TM ,TSD,TR)

  THIS MODULE TRANSFORMS DATA TO LOG FORM

  TRANSFORM EQUATIONS

  TV = LOG((XV/(XM*XM) ) + l )

  TM=LUG{XM)-(TV/2.C)

  TK = LOC(XK*f XMTV)-XR+1)/TV

   CONVERT SD TO VARIANCE
       XV=XSD*XSC


30     T3=T2+1.0                     B -  70
*0     TV=ALTG(T3)
      00382300
      00382*00
      00382500
      00382600
      00382700
      00382800
      00382900
      00383000
      00383100
      00383200
      00383300
      00383400
      00383500
5YSTEM00383600
      00383610
      00383700
      00383800
      00383900
      0038*000
      0038*100
      0038*200
      0038*300
      C038**00
      0038*500
      0038*600
      0038*700
      0038*800
      0038*900
      00385000
      00385100
      00385200
      00385300
E(I)   00385*00
,     00385500
      00385600
      00385700
      00385800
      00385900
      00386000
      00386100
      00386200
      00386300
      00386*00
      00386500
      00386600
      00386700
      00386800
      00386900
      00387000
      00387100
      00387200
      00387300
      00387*00
      00387500
      00387600
      00387700
      00387800
      00387900
      00388000
      00388100
      00388200

-------
50
60

60
90
100
110
       T4=ALPC(XM)
       T5=TV/2.0
       TM=T4-T5
       T6=EXP(TV)
       T7=XR*T6
       T8=T7-XR+1.0
       T9=ALOG(T8)
       TR=T9/TV
       TSO=SCRT(TV)
       RETURN
       END
                      XL2  ***«<**************«**

       FUNCTION XL2(XLl,RtY,XRUN,Cl,KDC)
       T3=EXP(T2)
       T<»=XL1*(1.0-T3)
       RETURN
      END
              «* XMIX *******************

       FUNCTION XMIX(A1,Q1,A2,02,A3,03,A<»,Q^)
       T1=A1«G1
       T2=A2*C2
       T3=A3*Q3
       RETURN
       END
C
C *«*«=***«*****«*** XH2 ««**«*****««****«*«***«
C
       FUNCTION XM2(XL1,XRUN,C1,C2,WOC)
       T1=-WOC*XRUN*C1
       T2=EXP(T1)
       T3=XL1*(1.0-T2)
       T
-------
Appendix C
EXAMPLE PROBLEMS

-------
Two example problems are presented in this appendix to demonstrate
the use of the program.  The results presented are computer-
generated and include a listing of all input variables.  Input
data are generally taken from the Philadelphia,  Pennsylvania,
site study.  However, the purpose of these examples is to illustrate
the use of the simulation and not necessarily to represent actual
urban area/receiving water conditions at Philadelphia.

The first example problem is a 1-year simulation utilizing all
modules except the storage/treatment module.  This problem
illustrates the use of the simulation in establishing existing or
baseline water quality conditions.

The second example problem is identical to the first except for
the addition of the storage/treatment module.  A storage capacity
of 0.5 inch and treatment rate of 0.005 inches per hour are
simulated for both the combined sewer watershed and the urban
stormwater runoff watershed.  The receiving water impact of these
facilities may be determined by comparison of the quality frequency
curves developed in problem 1 to the quality frequency curves
developed in problem 2.
                               C - 2

-------
               INPUT
PENNSYLVANIA  (PROB
PHILADELPHIA,
U24 2123-4567
10203040607062
 1 2 9101112
 3 4 5678
^2.178343981.3405405
42 .415094339.5217391
0.295881590.4C6493680.0
C.320573860.485167310. 145
 123 4101112
 56789
DATA PROBLEM 1
1)
           59


1
C

C.

















89.00
50000.00
78.00
6QOOO.OO
2.0260
C.2309
1.7700
0.00320
1.4940
0.4030
1.3800
wO.0032
40.00

1025.33
COOC0702
0.00
1.50
2.60
3.30
6.00
10.60
18.20
23.80
27.10
26.00
21.90
16.80
10.40
5.00
10.00
10.00
7.00
96.00
5.42
90.00
12.53
O.C667
0.0667
o.oc
0.00
0.0667
C.0667
C.OO
c.oo
16CO.OC

30.00
1.00
C.OO
1.00
0.70
0.60
0.60
0.80
1.40
3.40
3.60
3.80
2.70
2.60
1.80
1.00
10.00
10.00
6.30
99.00
4.6
96.00
1.9

578.15

30.00

20.65
13.00
20.00
16. OC
16.00
13.00
11.00
14.00
15.00
15.00
22.00
16.00
20.00
17.00
37.00
116.00
7.00


1.50

12.17


41.00
1.80
2.40
1.90
2.30
2.50
2.80
2.60
2.50
1.80
1.80
2.10
2.10
100.00
10.00
7.00


0.16

0.04


6.00
108.00
22.00
45.00
26.00
23.00
28.00
38.00
32.00
10.00
18.00
21.00
32.00











0.79
0.56
0.62
0.44
0.76
1.19
0.63
0.57
0.52
0.45
0.51
0.56











o.c
0.0
o.oc
0 .01
0.01,
0.013
0.013
0.015
0.016
0.012
0.020
0.019



                         C  -  3

-------

Card ( », Card
1 10527. 62
10098.
6902.
€.? 7s
7t f _> .
98U5 .
«i 1 fi 0 .
J ± V U .
c** 1 s
~v 1 J .
fifi IS .
Owl-'.
7**0 .
77*i(j .
f 1 ^ W •
7^r>5 •
7P47 .
f C ^ f •
c -a ti\
v J "Iv •
16020.
13300.
11655.
10865.
11210.
11210.
11 200.
11280.
Uf.S 0 .
\J ^ ' \J .
1 n 1^5 .
J V 1 £. -* .
933? .
9466 .
9524 .
6953.
Q7cc;
7 I ~- .
13260.
17055.
18955.
35180.
30345.
26870.
24140.
22750.
20095.
18565.
16405.
1439C.
12135.
ni no
i \f\j .
10838.
1 1 108.
10530.
9833 »
A 4 7ft
C ~ 1 1* •
C l r 1
C 1 w 1 .
8339 .
79 11 .
7337 .
8003 •
7SB1 .
( J O A .
t762 .
6244.
6549.
7206.
7424.
7274 .
7559.

t524. Card
5650. 123
6H81 .
6'^ 57.
5585 .
5674^
6193.
6731.
f219.
1816C.
14310.
11673.
1 0 32 7 .
168o8.
49300.
60480.
48725.
45235.
40615.
41640.
44555.
48620.
41985.
34935.
30015.
£6250.
23595.
21765.
20535.
20470.
19622.
17990.
16975.
16420.
15040.
13960.
13490.
12838.
12153.
11418.
10688.
9797.
9137.
8624 .
6518.
8197.
7769.
7391 .
695o.
6583.
6457.
7226.
22555.
44145.
381,40.
29755.
24785.
21315.
19260.
18290.
17170.
Upstream Flow
15605. Card
14590. 184
14915.
13475.
12262.
11316.
1019C.
10900.
16015.
23445.
i0225.
17945.
17400.
15B3C.
14700.
14620.
15480.
17230.
15905.
16c75.
18210.
17970.
15400.
15450.
44C70.
91985.
f 1335.
<0835.
54230.
46125.
38995.
32540.
27400.
23405.
JJ325.
1722C.
15970.
32250.
36435.
23995.
2 1 38 f .
199RC.
19775.
20785.
19825.
20800.
19710.
17125.
1543U.
13301.
16130.
14365.
17(8*.
21935.
30035.
30670.
25175.
21100.
18305.
16155.
14360.
Array
1 1 92 0 .
iu«55.
9211 .
7^67.
t363.
7P4V.
74l>7.
7C17.
t94J.
7036.
f893.
(613.
(892 .
7529.
75 14.
7501.
623j.
5810.
6943.
7153.
6250.
5157.
4778.
4968.
4689.
4522.
5256.
7050.
7000.
6389.
5950.
5580.
(.652.
(54,.
(173.
5711.
^694 .
5492.
4682 .
4443.
4297.
4662 .
4 5 it .
48(3.
4G59.
4796 .
5357.
^7L6 .
(.460.
6904 .
6'J86 .
4879.
4574 .
4^73.
3962.
4225.
4157.
413C.
4324.
4721 .
48 7P.

Card <,822 .
245 f?7fl.
7531 .
<639.
' J60.
f 803.
1391b.
17355.
12723.
9030.
6900.
5956.
1334.
5387.
1052.
49 H.
4845.
4864 .
4613.
1 1 78 .
14C4 .
1197.
4211 .
3747.
4414.
4645.
5010.
4977.
473b.
1726.
62t2.
6399.
61C7.
6791.
6076.
1780.
5 1 74 .
4589.
4356.
4307.
4244 .
49P9.
5674 .
(657.
1820.
4434 .
4099.
1648.
C049.
7871.
7313.
7259.
5672.
5555.
5064.
4870.
5017.
4727.
4977.
5043.
5388.

Card 59S4.
306 6259.
7851 .
11180.
12502.
11135.
1 0029.
967o .
10253.
14725.
26 305.
38525.
33210.
24170.
19440.
16495.
1 4 64 0 .
13130.
13265.
12337.
11 128.
126C7.
12607.
13065.
J3065.
17C27.
25960.
24635.
21490.
17470.
15305.
12926.
1 1 65 2 .

-------
                        CONTINUOUS STORMWATER
                            FEBRUARY,1979
POLLUTION SIMULATION SYSTEM
GENERAL SIMULATION CONTROL DATA-
                    LOCATION: PHILADELPHIA, PENNSYLVANIA
 NUMBER OF YEARS TO SIMULATES  1
      TIME INTERVAL IN HOURS! 24
        NUMfER OF WATERSHEDS?  2
   SEED FCF RANDOM GENERATOR: 1234567CO
           (PROB 1)
OPTIONS SELECTED :
10  RAINFALL SIMULATOR
20  RUNOFF BY SCS EQUATION
30  POLLUTANT WASHOFF
«0  EXCESS INFILTRATION
60  DRY HEATHER FLOW
70  DAILY STREAMFLOW
82  SUSPENDED SCLIDS,DISSOLVED OXYGEN, AND LEAD RESPONSE
                                      C - 5

-------
                CONTINUOUS STORMKATER POLLUTION SIMULATION SYSTEM
                        FEBRUARYf1979
RAINFALL SIMULATOR INPUT DATA	


 MONTHS IN SEASON NO. 1:
                        1
                        2
                        9
                       10
                       11
                       12

 MONTHS IN SEASON NO. 2:
                        3
                        4
                        5
                        6
                        7
                        8


                                   SEASON NO. 1          SEASON NO. 2
MEAN TIME PETHEEN STORMS                  92.18 HOURS           81.34 HOURS
MEAN DURATION OF STORMS                   42.42 HOURS           39.52 HOURS

        INPUT RAINFALL DEPTH STATISTICS!
SEASON       MEAN            S.D.           CORR COEFF

   1             0.2959          0.4065         0.0

   2             0.3206          0.4852         0.1456
                                       C  -  6

-------
                CONTINUOUS STORHKATER POLLUTION SIMULATION SYSTEM
                        FEBRUARY,1979
RUNOFF   SIMULATOR INPUT DATA-
MONTHS IN TPRHANT SEASON:
                        1
                        2
                        3

                       10
                       11
                       12

MONTHS IK CROWING SEASON:
                        5
                        6
                        7
                        8
                        9

WATERSHED NO.  1 DATA:
     CN1 =    89.00   CN2 =    96.00   CN3 »    99.00
    DRAINAGE AREA  =   50000.00 ACRES
    TIHE OF CONCENTRATION =       5.42 HOURS
        HASHOFF COEFFICIENT =
WATERSHED KG.  2 DATA:
     CN1 =    78.00   CN2 =    90.00   CN3 =    96.00
    DRAINAGE AREA  =   60000.00 ACRES
    TIME OF CONCENTRATION =      12.53 HOURS
        KASHOFF COEFFICIENT =       1.90
                                       C  -  7

-------
                CONTINUOUS STORMKATER POLLUTION SIMULATION SYSTEM
                        FEBRUARY,1979
RUNOFF QUALITY INPUT DATA-
INPUT DATA FOR WATERSHED NO.  1
   BOO ACC. RATE =    2.0260 3/AC/OAY
   TKN ACC. RATE =    0.2309 t/AC/DAY
   SS ACC. RATE =     1.7700 #/AC/OAY
   PB ACC. RATE =     0.0032 #/AC/DAY

INPUT DATA FOR WATERSHED NO.  2
   BOO ACC. RATE =    1.49*0 #/AC/DAY
   TKN ACC. RATE =    0.4030 K/AC/DAY
   SS ACC. RATE =     1.3800 f/AC/DAY
   PB ACC. RATE =     0.0032 #/AC/OAY
BOD REMOVAL RATE
TKN REMOVAL RATE
SS REMOVAL RATE =
PB REMOVAL RATE ••
BOD REMOVAL RATE
TKN REMOVAL RATE
SS REMOVAL RATE =
PB REMOVAL RATE =
0.0667 FRJCT/DAY
0.0667 FRACT/DAY
0.0    FRACT/DAY
0.0    FRACT/DAY
0.0667 FRACT/DAY
0.0667 FRACT/CAY
0.0    FRACT/OAY
0.0    FRACT/DAY
                                       C - 8

-------
                        CONTINUOUS STCRHKATER POLLUTION
                            FEBRUARY, 1979
                                SIMULATION SYSTEM
EXCESS INFILTRATION INPUT DATA-
WATERSHED:  1         CODE:
AVERAGE PIPE DIAMETERS
TOTAL SYSTEM LENGTH:    1600,
DRY HEATHER FLOW:     578.15
DRY WEATHER FLOW RATIOS
     1
     40.00 INCHES
     00 MILES
     CFS
      1.50
INFILTRATICN ADJUSTMENT FACTOR
              0.16
WATERSHED:  2         CODE:  0
AVERAGE PIPE DIAMETER:
TOTAL SYSTFM LENGTHS
DRY HEATHER FLOW:
DRY WEATHER FLOW RATIO:
INFILTRATION ADJUSTMENT
      0.0  INCHES
    .0  MILES
     CFS
      0.0
FACTORS       l.CO
0.0
                                       C -  9

-------
                       CONTINUOUS STCRMWATER POLLUTION SIMULATION SYSTEM
                           FEBRUARYt1979
INPUT TO CRY WEATHER StBMODEL-
                        QDH =    1025.33  CFS
                      BODDW =      30.00 MG/L
                       SSOH *      3C.OO MG/L
                      TKNDH =      12.17 MG/L
                       PBDH =       0.04 MG/L
                      OOW =       0.0  KG/L
                                      C - 10

-------
                        CONTINUOUS STCRMWATER  POLLUTION  SIMULATION  SYSTEM
                            FEBRUARY,1979
INPUT FCR FAILY STREAHFLOW	


NUMBER CF YFARS OF STREAMFLOW RtAD


THE FIRST TEN VALUES ARE :

        1C??7. CFS
        1CCS8. CFS
         6«02. CFS
         9?75. CFS
         96C5. CFS
         9160. CFS
         9615. CFS
         eei5. CFS
         7«»<(0. CFS
         7750. CFS
                                       C - 11

-------
CONTINUOUS STORMWATFR POLLUTION SIMULATION SYSTEM
    FEBRUARY,1979
i r»ru i i v











UPSTREAM
MONTH


1
2
3
4
5
6
7
8
9
10
11
12
ALPHA VALUES
PFTA VALUES
SPECIFIED K2 : '
SBA
K2ADJ
DJST1
DIST2
El
Kl KATEPSHEO 1
Kl WATERSHED 2
KI STREAHFLOW
Kl CRY WEATHER FLOW
fM / 1 1TV A DO A V _______

0.00000702 1
O.G 0
0.0 I/DAY
.COOOOOCO
.0

1.50 GH 02/M**2/DAY
1.00
10.00 MILES
41.00 H1LES



6.00 M1LES**2/DAY
0.4C I/DAY
0.16 I/DAY
0.16 I/DAY
0.?3 I/DAY


TIMP 00 CHLORIDE BOD
DEFICIT


?.60 0.70
3.30 0.60
6. CO 0.60
10.60 0.80
If. 20 1.40
23.80 3.40
27.10 3.60
2t.CO 3.80
21.90 2.70
16.80 2. 60
1 C . 40 1 . 80
5. CO 1.00
INPUT DATA FOR LEAD SUBMODEL-

AlKALINI
HARDNESS
PH
cso
TY (MG/L) 10.00
(Ft/LJ 10.00
7.00
CONC CONC


20.00 1.80
16.00 2.40
16.00 1.90
13.00 2.30
11.00 2.50
14.00 2.80
15.00 2.60
15.00 2.50
22.00 1.80
16.00 l.PO
20.00 2.10
17.00 2.10


SWR
10.00
10.00
6.30





SUSPENDED
SOLIDS


108.00
22.00
45.00
26.00
23.00
28.00
38.00
32.00
10.00
18.00
21.00
32.00


USF
37. CC
116. CO
7. CO
                                 2C.64S99390
                                    CONC

                                     0.79
                                     0.56
                                     0.62
                                     0.44
                                     0.76
                                     1.19
                                     0.63
                                     0.57
                                     0.52
                                     0.45
                                     0.51
                                     0.56
LEAD
CONC

0.0150
0.0150
O.C090
0.0110
0.0120
0.0130
C.C130
0.0150
0.0160
0.0120
0.02CO
0.0190
                                            WHIP

                                           100.00

                                            10.00

                                             7.00
               C - 12

-------
RAINFALL STATISTICS FOR YEAR NO.  1


    TOTAL RAINFALL SEASON NO. 1 =  22.11 INCHES

    TCTAL RAINFALL SEASON NO. 2 =  18.13 INCHES

    KC.QF PERIODS WITH RAIN SEASON NO. 1 =   62
    NC.QF RAINFALL EVENTS   SEASON NO. 1 =   31

    NC.OF PERIODS WITH RAIN SEASON NO. 2 =   61
    NO.OF RAINFALL EVENTS   SEASON NO. 2 =   30

    MAXIMUM RAINFALL EVENT TOTAL DEPTH =  6.38 INChES
    HAXIMUH RAINFALL EVENT DURATION =   168 HOURS
    MAXIMUM DEPTH IN ONE 24 HR.PERIOD= 6.07 INCHES
                                  C - 13

-------
RUNOFF STATISTICS FOR YEAR NO.   1     WATERSHED NC.   1






    TOTAL RUNOFF DORMANT  SEASON = 21.89 INCHES



    TOTAL RUNOFF GROWING  SEASON =  5.00 INCHES




    TCTAL DURATION OF RUNOFF DORMANT  SEASON = 1728. HOURS



    TOTAL DURATION OF RUNOFF GROWING  SEASON =  768. HOURS



    MAXIMUM 24 HOUR RUNOFF RATE. DORMANT  SEASON  = 11760.48 CFS



    MAXIMUM 24 HOUR RUNOFF RATE. GROWING  SEASON  =  1296.79 CFS
RUNOFF STATISTICS FOR YEAR NO.   1     WATERSHED NC.   2






    TCTAL RUNOFF DORMANT  SEASON = 17.13 INCHES




    TCTAL RUNOFF GROWING  SEASON =  2.85 INCHES




    TOTAL DURATION OF RUNOFF DORMANT  SEASON = 144C. HOURS




    TCTAL DURATION OF RUNOFF GROWING  SEASON =  552. HOURS




    MAXIMUM 24 HOUR RUNOFF RATE, DORMANT  SEASON  = 12390.71 CFS




    MAXIMUM 24 HOUR RUNOFF RATE* GROWING  SEASON  =  1229.30 CFS
                                   C - 14

-------
    RUNOFF QUALITY - STATISTICS FOR YEAR NO.
                                        BOD
MAXIMUM CCKCENTRATIONSCMG/L)        528.77
MEAN CONCENTRATIONS(MG/L)            64.72
TOTAL ANNUAL WASHOFF(LBS)        19714400.
1     WATERSHED NO.   1
     TKN        SS         FB
   60.26     1343.81        2.43
    7.38      106.31        0.19
2246834.   32382000.      56544.
    RUNOFF QUALITY - STATISTICS FOR YEAR NO.
                                        BOD
MAXIMUM CONCENTRATIONS(MG/L)        182.93
MEAN CONCE*TRATIONS(MG/L)            45.07
TOTAL ANNUAL HASHOFF(LBS)        12237439.
1     WATERSHED NO.   2
     TKN        SS         PB
   49.34      703.55        1.63
   12.16      111.38        0.26
3301025.   30244624.      7C133.
EXCESS INFILTRATION RESULTS FOR WATERSHED  1
TOTAL DURATION EXCESS INFILTRATION    1272 HOURS
TOTAL AMOUNT OF EXCESS INFILTRATION       3.95 INCHES
MAXIHJM EXCESS INFILTRATION RATE    1412.76 CFS
   EXCESS INFILTRATION PLUS RUNOFF QUALITY-STATISTICS  FOR
                                        BOO        TKN
MAXIMUM CCNCENTRATIONS(MG/L)        528.77       60.26
MEAN CONCENTR«TIONS(MG/L)            67.82        8.71
TOTAL ANNUAL WASHOFF(LBS)        23692640.    3042490.
                 WATERSHEC NO.
                SS         PB
             1343.81        2.43
              104.07        0.17
           36360240.      59339.
   UPSTREAM FLOW MATER QUALITY SUMMARY FOR YEAR  1
BOO -   59788256. f/YR
NBOD»    82601856. f/YR
SS *     882851072. f/YR
PB *      358386. f/YR
NOTE* BOO = 5 DAY BOD
      NBOD=ULTIMATE NITROGENOUS OXYGEN DEMAND (4.57 « TKN}
                                      C - 15

-------
                        CONTINUOUS STORMWATER POLLUTION SIMULATION SYSTEM
                            FEBRUARY,1979
CUMULATIVE FREQUENCY-MINIMUM DISSOLVED OXYGEN   TO      41.00   MILES DOWNSTREAM
     DO MIX
CONCENTRATION
1.0 OR LESS
1.0 TO 2.0
2.0 TO 3.0
3.0 TO 4.0
4.0 TO 5.0
5.0 TO 6.0
6.0 TO 7.0
7.0 TO 8.0
8.0 TO 9.0
9.0 TO 10.C
10.0 TO 11.0
11.0 TO 12.0
12.0 TO 13.0
13.0 TO 14.0
14.0 TO 15.0
GREATER THAN 15.0

        TCTAL=
          NUMBER OF
         OCCURRENCES
             139.
              10.
              22.
              33.
              19.
              44.
              48.
              30.
              13.
               2.
               0.
               0.
               0.
               0.
               0.
               0.

             360.
                PERCENT OF
                   TIME
                   38.61
                    2.78
                    6,11
                    9.17
                    5.28
                   12.22
                   13.33
                    8.33
                    3.61
                    0.56
                    0.0
                    0.0
                    0.0
                    0.0
                    0.0
                    0.0
CUMULATIVE
PERCENT
 38.61
 41.39
 47.50
 56.67
 61.94
 74.17
 87.50
 95.83
 99.44
100.00
100.00
100.00
100.00
100.00
100.00
100.00
MINIMUM 3 GAY DISSOLVED OXYGEN
                          0.0   MG/L
TIME AVERAGED PERCENT OF STREAM REACH TO
DO
CONCENTRATION
0.0
LESS THAN
LESS THAN
LESS THAN
LESS THAN
LESS THAK
LESS THAN
1.0
2.0
3.0
4.0
5.0
6.0
PERCENT OF
STREAM REACH
13.0869
21.3611
27.6778
34.5611
43.8167
51.1500
59.9944
                                41.00 MILES DOWNSTREAM AT OR BELOW GIVEN

                                                     CO CONCENTRATION.
                                      C - 16

-------
                        CONTINUOUS STORMHATER  POLLUTION  SIMULATION SYSTEM
                            FEBRUARYf1979
CUMULATIVE FREQUENCY-MINIMUM DISSOLVED OXYGEN    AT       10.00    HILES DOWNSTREAM
     00 MI*
CONCENTRATION
1.0 OR LESS
1.0 TO 2.0
2.0 TO 3.0
3.0 TO 4.C
4.0 TO 5.0
5.0 TO 6.0
6.0 TO 7.0
7.0 TO 8.0
8.0 TO 9.C
9.0 TO 1C.O
10.0 TO 11.0
11.0 TO 12.0
12.0 TO 13.C
13.0 TO 14.0
14.0 TO 15.0
GREATER THAN 15.0

        TOTAL=
 NUMBER OF
OCCURRENCES
    115.
     23.
     21.
     18.
     26.
     21.
     47.
     45.
     16.
     13.
     11.
      4.
      0.
      0.
      0.
      0.

    360.
PERCENT OF
   TIME
   31.94
    6.39
    5.83
    5.00
    7.22
    5.83
   13.06
   12.50
    4.44
    3.61
    3.06
    1.11
    0.0
    0.0
    0.0
    0.0
CUMULATIVE
PERCENT
 31.94
 38.33
 44.17
 49.17
 56.39
 62.22
 75.28
 87.78
 92.22
 95.83
 98.89
100.00
100.00
100.00
100.00
100.00
                                       C - 17

-------
                        CONTINUOUS STORMHATER POLLUTION SIMULATION SYSTEM
                            FEBRUARY,1979
CUMULATIVE FREQUENCY- TOTAL
     PB
CONCENTRATION
 NUMBER OF
OCCURRENCES
0.005 OR LESS
0.005 TO 0.01C
0.010 TO 0.015
0.015 TO 0.020
tf.020 TO 0.025
0.025 TO 0.030
0.030 TO 0.035
0.035 TO C.040
0.040 TO 0.045
0.045 TO 0.05
0.05 TO O.G6
0.06 TO 0.07
0.07 TO 0.08
0.08 TO C.G9
0.09 TO 0.1
0.1 TO 0.2
0.2 TO 0.3
0.3 TO 0.4
0.4 TO 0.5
GREATER THAN C.5
0.
5.
96.
137.
71.
13.
6.
6.
5.
6.
4.
4.
1.
0.
3.
3.
0.
0.
0.
0.
 LEAD   TO   41.00   PILES DOWNSTREAM

PERCENT OF    CUMULATIVE
   TIME       PERCENT

    0.0         0.0
    1.39        1.39
   26.67       26.06
   38.06       66.11
   19.72       85.83
    3.61       89. 44
    1.67       91.11
    1.67       92.78
    1.39       94.17
    1.67       95.83
    1.11       96.94
    1.11       98.06
    0.28       98.33
    0.0        98.33
    0.83       99.17
    0.83      100.00
    0.0       100.00
    0.0       100.00
    0.0       100.00
    0.0       100.00
                       360.
                                       C - 18

-------
                        CONTINUOUS STORMWATER
                            FEBRUARY,1979
CUMULATIVE FREQUENCY- DISSOLVED
     P8
CONCENTRATION
0.005 OR
0.005 TO
0.010 TO
0.015 TO
0.020 TO
0.025 TO
0.030 TO
0.035 TO
0.040 TO
0.045 TO
0.05 TO
0.06 TO
0.07 TO
0.08 TO
0.09 TO
0.1 TO 0
0.2 TO 0
0.3 TO 0
0.4 TO 0
GREATER
 LFSS
 0.010
 0.015
 C.02C
 C.C25
 C.C30
 0.035
 C.C40
 0.045
 0.05
0.06
0.07
0.08
C.09
0.1
.2
.3
.4
.5
THAN 0.5

TOTAL*
 NUMBER OF
OCCURRENCES

      0.
      5.
     96.
    137.
     71.
     13.
      6.
      6.
      5.
      6.

      4.
      1.
      0.
      3.
      3.
      0.
      0.
      0.
      0.

    360.
                           LEAD

                          PERCENT
                             TIME
TO
OF
                                      POLLUTION SIMULATION SYSTEM
41.00   PILES DOWNSTREAM

 CUMULATIVE
 PERCENT
0.0
1.39
26.67
38.06
19.72
3.61
1.67
1.67
1.39
1.67
1.11
1.11
0.28
0.0
0.83
0.83
0.0
0.0
0.0
0.0
0.0
1.39
28.06
66.11
85.83
89.44
91.11
92.78
94.17
95.83
96.94
98.06
98.33
98.33
99.17
100.00
100.00
100.00
100.00
100.00
MAXIMUM 96 HOUR DISSOLVED LEAD =  0.1173 MG/L
MEAN DISSOLVED LEAD =  0.0217 MG/L
                                      C - 19

-------
                        CONTINUOUS STORMHATER POLLUTION SIMULATION SYSTEM
                            FEBRUARY,1919
CUMULATIVE FREQUENCY—SLSPENDED SOLIDS   TO   41.00   MILES DOWNSTREAM
     ss
CONCENTRATION

25 OR LESS
25 TO 50
50 TO 75
75 TO IOC
100 TO 125
125 TO 150
150 TO 175
175 TO 200
200 TO 225
225 TO 250
250 TO 275
275 TO 3CO
300 TO 325
325 TO 350
350 TO 375
375 TO 400
400 TO 425
425 TO 450
450 TO 475
475 TO 500
GREATER THAN 500

        TOTAL=
                    NUMBER OF
                   OCCURRENCES

                       135.
                       181.
                        11.
                         9.
                        24.
                         0.
                         0.
                         0.
                         0.
                         0.
                         0.
                         0.
                         0.
                         0.
                         0.
                         0.
                         0.
                         0.
                         0.
                         0.
                         0.

                       360.
PERCENT OF    CUMULATIVE
   TIME       PERCENT
37.50
50.28
3.06
2.50
6.67
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
37.50
87.78
90.83
93.33
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
ICO. 00
100.00
100.00
100.00
100.00
100.00
   RECEIVING HATER LOADS FOR YEAR  1
NBOD   221S70112. f/YR
                  f/YR
                    1008990464. #/YR
                    567242. »/YR
CBOD   155256784,
SUSPENDED SOLIDS
DISSOLVED LEAD
SEDIMENT LEAD
                        0. «/YR
NOTES NBCDHILT1MATE NITROGENOUS OXYGE* DEMAND (4.57*TKN)

      CBCD=ULTIMATE CARBCNACOUS OXYGEN DEMAND
                                       C  -  20

-------
                            INPUT DATA PROBLEM 2
PHILADELPHIA/PENNSYLVANIA  (PROB 2)
0124 21234567
1020304050607082
 1 2 9101112
 345678
92,178343981.3405405
42.415094339,5217391
0.295881590.406493880.0
0,320573860.485167310.14559
 1 2 3 4101112
 56789
               96.00     99.00
                5.42       4,6
               90.00     96,00
               12.53       1.9
              0.0667
              0.0667
                0.00
     89.00
  50000.00
     78.00
  60000,00
    2.0260
    0.2309
    1.7700
   0.00320
    1.4940
    0.4030
    1.3800
   00.0032
1     40.00
0
090750000,
                0.00
              0.0667
              0.0667
                0.00
                0.00
              1600.00
578,15
1,50
0,16
               252,0 0.96 0.99 0.81 0.99
108900000.0
               302,4 0.96 0,99 0,81 0.99
1025,33
0.00000702
0.00
1.50
2.60
3.30
6.00
10.60
18,20
23.80
27.10
26,00
21.90
16.80
10.40
5.00
10,00
10,00
7,00
30,00
1,00
0,00
1,00
0.70
0.60
0.60
0.80
1,40
3.40
3.60
3,80
2.70
2.60
1.80
1.00
10.00
10,00
6.30
30.00

20,65
10.00
20,00
16.00
16.00
13.00
11.00
14.00
15.00
15.00
22,00
16,00
20,00
17.00
37.00
116.00
7.00
12.17


41.00
1.80
2.40
1 ,90
2.30
2.50
2.80
2.60
2,50
1.80
1.80
2.10
2.10
100,00
10.00
7.00
0.04


6.00
108.00
22.00
45.00
26,00
23.00
28.00
38.00
32.00
10.00
18.00
21.00
32,00







0,79
0,56
0,62
0.44
0.76
1.19
0.63
0.57
0,52
0,45
0.51
0.56







0.015
0,015
0,009
0.011
0.012
0.013
0.013
0.015
0.016
0.012
0.020
0.019




-------
                         CONTINUOUS  STORMKATER POLLUTION SIPUIATIPN SYSTIH
                             FE.F KUARY.1979
IENLKAL SIMUUTJfN CCNTf-OL  DATA-
                    LOCATION: PHILADELPHIA,  PENNSYLVANIA (FRDL 2)
      R l:F YEARS  Tt SIMULATES   1
      TIME INTERVAL IN
        NliKS IK TF MTU
   SEED FDR RANDOM CINERATOR: 123456700
IPTIONS SELECTED  :
10  RAINFALL SIHULATtR
20  RUNOFF BY SCS ECUTICN
20  PCLLUTANT kASHOFF
40  EXCESS INFILTRAT1CK
50  STORAGE TREATMENT
tO  DRY HEATHER FLCK
70  DAILY STREAHFLO^
t2  SUSPENDED SOL IDS,DISSOLVED OXYGEN,  AND  LEAD  RESPONSE
                                      C - 22

-------
                COMINI'LUS STORhWATER POLLUTION Slf'ULATITN  SYSTEM
                         FEBRUARY,1979
KAINFALL SlMULAlfP  1»PUT  DATA
        If- SLASCN NT.  1 :
                         1
                         2
                         9
                        1C
                        11
                        12
 MONTHS IN SIIASCN NP.  2'-
                        6
                        7
                        fc
     TIPt tETKFEN  STLFHS
HE AN tURATICiM  OF  STCKPS
                                    SEASON NO. 1
                                           92.18 HOURS
                                           ^2.^2 HOURS
        INPUT F.AINFALL  LEPTH STATISTICS:
SEASON       ^'EAN             S.P.
1

2
                  0.2959

                  0.3206
                                  0.4065

                                  0.4852
                                                          StASCN  NO . 2
                                                                  81.34  HPURS
                                                                  39 .S2  HOURS
                                             CORR COEFF

                                                 O.C

                                                 0.1456
                                      C -  23

-------
                 CUMIM'LUS STCiF MWATER POLLUTION S1KULATICN  SYSTEK
                         HBRUAKY.1979
J-UNPFF    UhULATT*  If-PLT DATA-


MONTHS  IN  bUM AM  SL/SL^:
                         1
                         2
                         3
                        10
                        11
                        12
MJNTFS  Ih  CKGUNG
                         6
                         7
                         3
                         9

MTlKIHtl NO.   1  DAT/:
     CN1  =     ?,'9.CO   C^2 =    96.00   CN3  =     99.00
    LKA1NACE  ihLA  =   ! 0000. CO ACF;fS
    TIME  L'h CCNCtNTFATKN =       ^>.^2 HOURS
        fc-ASHHF COEFFICJLNT =       A. 60

^ATC^SHEL NO.   2  DATA:
     CM1  =     78. OC   a2 =    90.00   CN3  =     96.00
    LKAINACL  AREA  =   tCOQO.OO ACRES
    TIME  TF CLNCLN1K/7ILN =  .    12.53 HOLRS
        WASHPFF COFFF1CIENT =       1.90
                                       C - 24

-------
                 CHK'T IK'liCUS STORI^WATLR
                         FEBRUARY,1979
         POLLUTION SIMULATILN SYSTEM
RUNOFF a-ALITY  INPUT  Lf.lt--
1KPLT DATA Flfc  KATFRSHEl NO.
   bUf ACC.  RATE  =    2.0260
   TKN ACC.  MTt  =    C .2309
   SS ACC. f«Mh  =     1 .7700
   PF ACC . kATt  =     C.0032
 1
f /AC/DAY
*/AC/DAY
INPUT DATA FtF  KATI
   I Cl ACC. F-/-TF  =
   TK(^ ACC. FATE  =
   C_S ACC. RATE  =
   Pl< ACC . f A If.  =
•Ft  NO.   2
 1 .4940  P/AC/CAY
 C.4C30  */AC/bAY
 1 .3POO
 0.0032
                                            BOD  REMOVAL RATE
                                            TKN  KEMCVAL RATL
                                            SS REKCVAL FATL
                                            PB REMOVAL PATl =
                                            BOD RtHOVAL RATE
                                            TKK REMCVAL RATE
                                            SS  REHDVAL FATE
                                            Pfc  RtHDV^L FATE ^
                                            C.C6t7  FPACT/DAY
                                            O.C667  FRACT/CAY
                                            C'.C     FRACT/DAY
                                            O.f     FR ACT/DAY
                                    O.C667  FRACT/DAY
                                    C.C667  FHACT/LAY
                                    C. C     FPACT/DAY
                                    O.C     FRACT/DAY
                                       C - 25

-------
                        CONTINUOUS STORHKATER POLLUTION SIMULATION  SYSTEM
                            FEBRUARY,1979
tXCESS INFILTRATION  INPUT DATA-
WATERSHED:  i         CODE:  i
AVERAGE PIPE EIAMETER:       40.00 INCHES
TOTAL SYSTEH LENGTH:    1600.00 KILES
CRY fcEATHEfc FLOW:     578.15 CFS
CRY HEATHER FLCfei RATIO:       1.50
INFILTRATION ADJUSTMENT FACTOR:       0.16
WATERSHED:  2         CEDE:  o
AVERACE PIPE &IAPETER:        0.0  INCHES
TOTAL SYSTEM LENGTH:       0.0  MILES
CRY WEATHER FLOW:       0.0  CFS
CRY fcEATHEfc FLOW RATIO:       0.0
INFILTRATION ADJUSTMENT FACTOR:       l.OC
                                     C - 26

-------
                   CONTINUOUS  STORMKATER  POLLUTION SIMULATION SYSTFM
                        FtEMJARY,1979
                    INPUT FOR  STCRAGE/TREATKEM-
hAXIHUH fTDF/JCt VCLUHL
PAXIHUH TREATMENT FATE
                  TREATMENT PLANT
                   BUD
      SUSPENDED SOLIDS
                   TKN
                  LEAD
   9075000C.OC
   252.00 CFS
EFFICIENCIES :
  0.9600
  C.9900
  0.8100
  0.9900
                                                KATERSHEE
                                            FT**3
                  INITIAL CONDITIONS  FOR  STORAGE  1
                VOLUNE  :                0.0   FT**3
              PTD CONC  :                0.0   KC/L
               SS CONC  :                0.0   PG/L
              TKN CONC  :                0.0   PC/L
             HAD CONC  :                C.O   PC/L
                   KATERSHEC
  STCFACE VOLUME
  TRE/TPENT FATE
            TREATMENT
             BOD
Sl'SFENDET SCLIDS
             TKN
            LEAD
                                     10890000C.OO
                                     302.^.0  fFS
                            PLANT EFFICIENCIES  :
                                     C.9600
                                     0.9900
                                     C.8100
                                     0.9900
                   KATERSHEC
               FT** 3
                  INITIAL CONDITIONS FOR  STORAGE
                   kATERSKEf
                VOLUME
              PID CDNC
               SS CONC
              TKN CONC
             LEAD CONC
     0.0
     C.O
     0.0
     0.0
     0.0
                                      FT**3
                                      PC/L
                                      KG/L
                                      hC/L
                                      PG/L
                                C - 27

-------
CONTINUOUS  STOKMK/.TER
    F».r*UARY,I979
                                               POLLl T ION SIPULMICN  SYSTIH
1NPU 7Cf LKY
:. tpruut
CDK
tQCDb
SSDW
TKNDW
PBDk
CDK =
L 	
r.
=
=
=
=


1025
30
30
12
0
0.0

.33 CFS
. 00 'MG/L
.00 MG/L
.17 MG/L
.04 MG/L
PG/L
                                     C - 28

-------
                         CONTINUOUS STOKMMTER POLLl'TICN  SIPUL^TIHN SYSTFM
                              FU'hUARY,1979
INPUT FC^  IAJLY STFt/^'HOK	


f.t'MlLh (T  YL/fC CF S1KC/.HFLCW  HAD


1HL FIRST  TL^  VALUfS A^t  :
         KC9H.  CF5
          £902.  CFS
          ^^T^.  CfS
          910;.  CF:
          9160.  CFS
          Vt]f.  CFS
          £-(•15.  CFS
          7440.  CFS
          77^0.  CFS
                                      C  -  29

-------
CONTIMJPUS S7CRMKA7ER  PHLLl'TIDN  SIMULATION SYSH*
    FU FUAKY.1979
IM rv i 1 U IH. l «..l ^1 1 l I L
At.fMA VALUFS
ri TA VALUE 5
:-t FCIFIET K;
SF /
K2.AI J
risTi
L]
¥ 1 «/ IE P SHE C 1
C 1 U'ATEKSHtt 2
M C.7FF APF LO
XI LAY kTATUP
1 fj f 1 i A fc* ' I ' I 1 T V / L L / V
V r ~ i *" t »v " fc» i. * 1 i IT A r r * "
i;ru
I • fHES C
1 «_ * £ 0
i. • J i
3 '. .CO
4 K .U
f, if .;<
6 <. --1 • I v.-
7 / 7 . i r
fc : f . ( c
9 . 1 .'-('
1C !.'•.{ C
11 io.<.r
1 2 V . f 0
INPUT L'fcTA \ <<[• Lf(it

ALKALINITY (^•t/L)
hAk{,N{ S! (rt/l )
FH
0
C
0
c
1
T
'-<
2
LL 	 	 	
FLOW
CI

T

.70
.(
.(
.i

* ^
.(
,f
0
0
0

0
0
0
'(. .70
c
r
c.
c.
0.
0.
f F
CC


-L •
2.
2.
1.
1.
2.
2 .


SKP
10. CO
10. CC
6.30
SUSFENCED
SOLIDS

to
4C
90
30
50
ec
60
50
to
PC
10
10







1C8
:z
65
26
23
28
38
32
10
IB
21
32



1


.CO
.ro
.00
.CO
.CO
.00
.00
.00
.CO
.CO
.00
.00

USF
37.
16.
7.















CO
00
00
                                  20.649993%
                                     7KN
                                     CCNC

                                      0.79
                                      0.56
                                      C .62
                                      C.44
                                      0.76
                                      1.1 c<
                                      0.63
                                      0.57
                                      0.52
                                      0.45
                                      0.51
Lf AO
0.0150
O.C150
0.0-090
C.C110
0.0120
0.0130
0.0130
0.0150
0.0160
0.0120
0.0200
0.0190
                                            KW7P

                                            100.00

                                            10.CC

                                             7.00
             C - 30

-------
RAINFALL STATISTICS FOR  YEAR  NO.   1


    Tl^TAL RAINFALL SEASON NO.  1  =   22.11  INCHES

    TGTAl RAINFALL SEASON NO.  2  =   18.13  1NCFES

    NO.OF PLRIfOS MTH RAIN SEASON NO.  1  =   62
    NO.OF RAINFALL EVENTS   SEASON NO.  1  =   31

    NC.UF PERIOrS MTH RAIN SEASON NO.  2  =   Cl
    NO.OF RAINFALL EVENTS   SEASON NO.  2  =   30

    PAA1PUM RAINFALL EVENT TOTAL DEPTH  =   t.3f: INCHES
    f&XI^'UM PA If FALL EVENT DURATION  =    166 hCUR S
    '•AXIPUM DEPTH IN ONE 24 HR.PERICD=  6.07 1NCFES
                                C - 31

-------
hUNCFF STATISTICS FOR YEAR NO.   1     kATERSHED NO.    1






    TCTAL PUNCH DCRHANT  SEASON = 21.89  INCHES




    TCTAL RL'NLFF GFOWING  SEASON =  5.00  INCHES




    TOTAL DUPATIfN OF RUNOFF DORMANT  SEASCN =  1728.  HOURS




    TOTAL DURATION OF RUNOFF GROWING  SEASON =  768.  HOURS




    MAXIMUM 24 HOUF RUNOFF RATE, DORMANT  SEASON   = 11760.48  CFS




    MAXIMUM 24 HOLF RUNOFF RATE, GROKING  SEASON   «   1296.79  CFS
       STATISTICS FOR YEAR NO.   1     WATERSHED NO.    2






    TCTAL PL'NCFF DCRMANT  SEASCN = 17.13  INCHES




    H;TAL RUNCFF GFOHING  SEASON =  2.85  INCHES




    TUTAL DURATION OF RUNCFF DORMANT  SEASON - 1440.  HOURS




    TLTAL DURATION OF RUNOFF GROHNG  SEASON =  552.  HOURS




    PAXIMH 24 HCLF RUNOFF RATE, DORMANT  SEASON   - 12390.71  CFS




            24 HOUR RUNOFF RATf, GROWING  SEASON   =   1229.30  CFS
                                C - 32

-------
    RUNOFF CU/LITY  -  STATISTICS FOR  YEAR  NO,
                                         BOD
PAXIfUM CCNCENTRATirtS(PG/L)         528.77
MEAN CONCENTRATIONI:(H;/L)             64.72
TOTAL ANNUAL KASHCFF(LBS)         19714400.
                                               1      WATERSHED NO.   1
                                                    TKN        SS         PB
                                                  6C.26     1343.61        2.43
                                                   7.38      106.31        0.19
                                               2246634.   32382000.      58544.
    RUNOFF QUALITY -  STATISTICS FOR  YEAR  NO.
                                        BOD
                                     182.93
                                     45.07
                                  12237439.
MAXIMUM CCUCFNTRATICNS^G/L)
KAN CONCENTRATICNS(^G/L)
TOTAL ANNUAL WASHOFF(LBS)
1     WATERSHED NO.   2
     TKN        SS         PB
   49.34      703.55        1.63
   12.16      111.38        0.26
3301C25.   30244624.      70133.
EXCESS INFILTRATION FESL'LTS FOR WATERSHED   1
TOTAL DURATICN EXCESS  INFILTRATION     1272  HOURS
TOTAL AMOUfIT CF EXCELS  INFILTRATION       3.95  INCHES
CAXIMIM EXCESS INFILTRATION RATt     1412.76 CFS
   LXCLSS INFILTRATION FLUS RLNCFF CUALITY-STATISTICS
                                         ECO         TCN
                                    526.77        6C.26
                                     67.81        6.71
                                 23692640.    3C42490.
        CL^CENTRATI(?^S(^'G/L)
KEAN CGN'CLNTP/TICNS(^G/L)
TOTAL ANNUAL KASHOFF(LbS)
         FOR     WATERSHED NO.
                SS         PB
             1343.Cl        2.43
              1C4.07        0.17
           3636C24C.      59339.
NUFtER
HJMBLR
ANNUAL
KUMfcEK
                  RLSULTS FOR STORAGE TREATMENT YEAR    1
                                                                WATERSHED 1
       OF HOURS STORAGE IS EMPTY:     4704
       CF HOURS kkTF CPERAT1NG  :     3960
       OF OVrFFLCK HC'URS :             766
       CVEPFLCW VOLUME IN INCHES '.    14.74
       OF OVERFLOW EVENTS :             17
       OF CAYS WITH fVFFFLOW            32
PERCENT
PERCENT
CF
OF
TOTAL
TOTAL
                         54.44
                   Tl^E* 45.83
S/T AND OVERFLOW SUTPARY FOR YEAR NO.  1   WATERSHED NO,

                                        BCD        TKN
MXIMLM CCNCt^TPATlC^S(^G/L)         71.61
KEAN CCNCENTFATICNS(KG/L)            16.47
RESIDUAL ANNUAL WASHCFF(LBS)      5661962.
                                                  P. 55
                                                  2.09
                                               719612.
                SS

              167.8C
               18.82
            6469031.
              PB

               0.46
               0.05
             18222.
                                      C - 33

-------
MJHtER
MJUBER
ANKtAL
MJH8LR
                  RESULTS  FOR  STORAGE  TREATMENT  YEAR
                                                                WATERSHED 2
       CF HOURS  STPRAGE  IS EMPTY:     5616
       OF HOURS  WMF rPERATlf^G   i     3024
       OF OVLF-FLCW  HCLKS  :              36C
       CVIKFLEK  YCLLK  IN  INCHES  •'      8.12
       OF CVFFFLCW  EVEKTS  :              10
       CF DAYS H TH CVLKFLOW             15
PERCENT OF TOTAL T1PE: 65.00
PERCENT CF TOTAL T1>'E: 35.00
S/T AND CVFPFLCW SUW*RY FOR YEAR NO.   1    WATERSHED NO

                                         BOO        TKN

HAXIKUM CE>KCthTR*TICK£(KG/l)         A5.21        1Z.13
PEAN COKCENTMTirNS(PC/L)            10.CA         2.M
RES1LIAL ANNLAL KASHCFF(LBS)      2657197.      636736.
                                                               SS
                                                              19.31
                                                           5111924.
                         PB

                          0.37
                          0.08
                        22393.
EQC =
KBCO=
SS =
PB =
            FLTK WATtR CUALITY S
                                       FOR  YEAR   1
         fc6ClL»56.
         fcf-28',1072.
          35T366.
NOTE: ?L'C = 5 DAY EtC
      NtCT = ULTIHATE MTFOGENOUS OXYGEN DEPAND  (4.57  *  TKN)
                                      C - 34

-------
                        CONTINUOUS  STCRMKATER POLLUTION SIMULATION SYSTFM
                            FEERUARY.1979
CUMULATIVE FFEvUENCY-MlMMUM DISSOLVED OXYGEN   TO      41.00   MILES DCWNSTREAM
     DO MIN
CONCENTRATION
l.C  CF LESS
l.C  TC 2.0
2.C  TC 3.0
3.C  TC 4.C
4.0  TO 5.0
5.C  TO 6.0
6.0  TO 7.0
7.C  TC 8.0
e.o  TC 9.0
9.C  TC 10.0
JO.O TO 11.0
11.0 TO 12.0
12.0 TO 13.0
     1C 1^.0
     TO
13.C
14.0
15.0
GREATER THAN 15.C
        TCTAL=
  NUMtEF OF
  CCCUhRENCES
      119.
      13.
      24.
      29.
      12.
      46.
      58.
      42.
      13.
       4.
       0.
       0.
       0.
       0.
       0.
       0.

      360.
PERCENT OF
   TIME
   33. Ot
    3.61
    6.67
    e.ct
    3.33
   12.78
   16.11
   11.67
    3.61
    1.11
    0.0
    0.0
    0.0
    0.0
    0.0
    0.0
CUMULATIVE
PERCENT
 33. C,6
 36.67
 43.33
 51.39
 54.72
 67. 50
 F3.61
 95.28
 96.89
ICO.00
ICC.00
ICO.CO
ICO.00
ICO.00
ICO.00
ICC.CO
MM MUM 2 CAY DISSOLVED OXYGEN
                                    0.0   MG/L
TUL AVERAGED PEFCEM OF STREAM REACH TO
TO
CONCENTRATION
C.O
LESS
LESS
LESS
LESS
LESS
LESS
     THAN
     THAM
     THAN
     THAN
     THAN
     THAN
  l.C
  2.0
  3.C
  <«.0
  5.0
  fc.O
FEKCENT OF
SUEAf REACH
 7.blt7
U.47T2
23.C944
30.3633
39.1U7
45.6889
54.0778
                                          41.00 MILES  DOKN5TREAM  A 1 OR  fELON  GIVEN
                                                               DO CONCENTRATION.
                                      C - 35

-------
                        CCNTIMJCUS STORMWATER POLLUTION SIMULATION SYSTEM
                            FEBRUARY, 1979
CU*ULM1VL FREtUENCY-PlMMUM DISSOLVED OXYGEN   AT      10.00   HUES DOWNSTREAM
     10 KIN
(.ONCLfTRAT ION
l.C OF LLSS
l.C TO 2.0
i.C TO 3.0
3.0 TO 4.0
4.C TO 5.0
5.C TO 6.0
< .C TO 7.0
7.C TO f^.C
t . C TO 9.0
•j.C TO 10. C
10.0 TU 11.0
11 .0 ic ir.o
12.0 TO 13.0
13. c in 14.0
14.0 in Ib.O
CRtAHR THAN l

        TLTAL=
 KUHtER OF
CCCURENCES
     95.
     26.
     27.
     12.
     26.
     20.

     55.
     26.
     14.
     10.
      6.
      0.
      C.
      0.
      0.

    360.
PERCENT OF
   TIME
   26.39
    7.22
    7.50
    3.33
    7.22
    5.56
   11.94
   15.28
    7.22
    3.89
    2.78
    1.67
    0.0
    0.0
    0.0
    0.0
CUMULATIVE
PERCENT
 26.39
 33.61
 41.11
 44.44
 51.67
 57.22
 69.17
 £4.44
 91.67
 95.56
 98.33
100.00
100.CO
100.00
100.00
ICO.CO
                                    C - 36

-------
                        CONTINUOUS STORMWATER POLLUTION SIMULATION SYSTEM
                            FEBRUARY,1979
CUMULATIVE FRECUfcNCY- TCTAL
     PB
CONCENTRATION

C.005 OR LESS
t.005 TO 0.010
C.CIC TO 0.015
0.015 TO 0.020
C.02C TO 0.025
C.025 TO 0.030
C.030 TO 0.035
C.035 TO 0.040
€.040 TO 0.045
C.045 TO 0.05
C.05 TO O.Ofc
C.C6 TO 0.07
C.07 TO 0.08
0.08 TO 0.09
C.09 TO 0.1
C.I TC 0.2
C.2 TC 0.3
0.3 TE 0.4
C.4 TC 0.5
GREATER THAN 0.5

        TOTAL=
 NUMBER OF
rcCUHRENCEl

      0.
      8.
     94.
    153.
     93.
      6.
      2.
      3.
      0.
      0.
      1.
      0.
      0.
      0.
      0.
      0.
      0.
      0.
      0.
      0.

    360.
                LEAD   TO   41.00   MILES DOWNSTREAM
PERCENT OF
   TIME

    0.0
    2.22
   26.11
   42.50
   25.83
    1.67
    0.56
    0.83
    0.0
    0.0
    0.28
    0.0
    0.0
    0.0
    0.0
    0.0
    0.0
    0.0
    0.0
    0.0
CUMULATIVE
PERCENT

  C.O
  2.22
 28.33
 70.83
 96.67
 98.33
 98.69
 99.72
 99.72
 99.72
100.00
100.00
ICC.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
                                   C - 37

-------
                        CONTINUOUS STORMWATER POLLUTION SIMULATION SYSTEM
                            FEBFUARY.1979
CUMULATIVE FRECUENCY- DISSOLVED
     PC
CONCENTRATION

C.005 OH LI SS
C.C05 TO 0.01C
C.010 TO 0.015
0.015 TO 0.020
C.C2C TO 0.025
C.C25 TO 0.030
C.030 TO 0.035
C.035 TO 0.040
C.C40 TO 0.045
C.C45 TO 0.05
C.05 TO 0.06
C.06 10 0.07
0.07 TO 0.08
C.08 TO 0.09
C.09 TO 0.1
0.1 TO 0.2
C.2 TO 0.3
C.3 TO 0.4
C.4 TO 0.5
GREATER T.HAN 0.5

        TOTAL=
 MJHfcER OF
OCCURRENCES

      0.
      8.
     94.
    153.
     93.
      6.
      2.
      3.
      0.
      0.
      1.
      0.
      0.
      0.
      0.
      0.
      0.
      0.
      0.
      0.

    360.
                LEAD   TO   41.00   MILES DOWNSTREAM
PERCENT OF
   TIME
CUMULATIVE
PERCENT
0.0
2.22
26.11
42.50
25.83
1.67
0.56
0.83
0.0
0.0
0.2b
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
2.22
28.33
70.83
96.67
98.33
96.89
99.72
99.72
99.72
ICO. 00
100.00
ICO. 00
100.00
100.00
ICO. 00
100.00
ICO. 00
100.00
100.00
HAXIHUM 96 HOUR DISSOLVED LEAD =  0.0308 MG/L
KEAN DISSOLVED LEAD =  C.0179 MG/L
                                   C -  38

-------
                        CONTINUOUS STORMWATER POLLUTION SIMULATION SYSTEM
                            FEBRUARY, 1979
CUMULATIVE FRECUENCY—SUSPENDED SOLIDS   TO   41.00   MILES DOWNSTREAM
     SS
CONCENTRATION

25 OR LESS
25 TC 50
50 TO 75
75 TO 100
ICC TC 125
125 TC 150
150 TO 175
175 TO 2CO
200 TO 225
225 TC 250
25C
       275
275 TO 300
300 TC 325
325 TC 350
350 TC 375
375 TC 400
400 TC 425
425 1C 450
450 1C 475
475 TC 500
CREATIR THAN 500

        TCTAL=
 NUMEER OF
OCCURRENCES

    152.
    178.
      0.
     14.
     16.
      0.
      0.
      0.
      0.
      0.
      0.
      0.
      0.
      0.
      0.
      0.
      0.
      0.
      0.
      0.
      0.

    360.
                                  PERCENT OF
                                     TIME
CUMULATIVE
PERCENT
42.22
49.44
0.0
3.89
4.44
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
42.22
91.67
91.67
95.56
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
   RECEIVING KATER LCADS FOR YEAR
fcBCO   199179664. #/YR
C800   127645712. #/YR
SUSPENDED SOLIDS
DISSOLVED LEAD
SEC1KENT LEAD
                     953967360. #/YR
                    478385. #/YR
                        0. #/YR
MOTE: NBOD^ULTIMATE NITROGENOUS OXYGEN DEMAND (4.57*TKN)

      C60D=ULTIMATE CARBONACOUS OXYGEN DEMAND
                                   C - 39

-------
                             TECHNICAL REPORT DATA
                       (Please read Instructions on the reverse before completing)
1. REPORT NO.
  EPA 430/9-79-004
                                                  3. RECIPIENT'S ACCESSION NO.
4. TITLE AND SUBTITLE
                                                  5. REPORT DATE
  1978 Needs  Survey—Continuous  Stormwater
  Pollution Simulation System—
  Users Manual
                                              10 February 1979
                                           6. PERFORMING ORGANIZATION CODE
7. AUTHOR(S)

  Ronald  L.  Wycoff and Michael  J.  Mara
                                           8. PERFORMING ORGANIZATION REPORT NO,

                                              FRD-4
9. PERFORMING ORGANIZATION NAME AND ADDRESS
  CH2M HILL  SOUTHEAST, INC.
   (formerly  Black, Crow and Eidsness,  Inc.)
  7201 N.W.  llth Place
  Gainesville,  FL 32601
                                            10. PROGRAM ELEMENT NO.
                                                2BG647
                                            11. CONTRACT/GRANT NO.
                                              68-01-3993
12. SPONSORING AGENCY NAME AND ADDRESS
  U.S.  Environmental Protection  Agency
  Municipal  Construction Division
  Office  of  Water Program Operations
  Washington,  DC 20460
                                            13. TYPE OF REPORT AND PERIOD COVERED
                                              Final
                                            14. SPONSORING AGENCY CODE
                                              700/02
15. SUPPLEMENTARY NOTES
                  Project Officer:   Philip H. Graham,  see  also
  EPA  430/9-79-003 (FRD-3) 1978  Needs Survey—Cost Methodology for
  "Sftfc
y/~>1
            -n/^  g +- /-«
                       -f- Q y r>-i
16. AS
      ACT
 A simplified continuous rainfall/runoff/receiving water  quality
 response  simulation model  is  presented.  The purpose  of  this
 model  is  to simulate all major  urban pollution sources  in a
 simple yet rational manner.   Application of the model provides
 long-term simulation of the total urban system at moderate cost.
 Processes simulated include rainfall, direct runoff,  watershed
 pollution accumulation and washoff,  sewer system infiltration,
 storage/treatment systems  for wet-weather flow, dry-weather WWTP
 effluent, upstream flow, and  receiving water quality  response to
 the combined effects of all the above pollution sources.   Pollutants
 considered are biochemical oxygen demand (BOD), total kjeldahl
 nitrogen  (TKN), suspended  solids (SS), and lead  (Pb).  Receiving
 water  responses simulated  included suspended solids concentrations,
 minimum dissolved oxygen concentrations, and total and  dissolved
 lead concentrations.  The  simulation provides a planning tool
 which  may be used to evaluate the long-term water quality impacts
 of various water quality management alternatives including control
 of combined sewer overflow and/or urban Stormwater runoff.
17.
                           KEY WORDS AND DOCUMENT ANALYSIS
               DESCRIPTORS
                                b.IDENTIFIERS/OPEN ENDED TERMS  C. COSATI Field/Group
  Simulation
  Models
  Rainfall
  Runoff
  Stormwater
  Combined  Sewers
                 Water Quality
                 Water Pollution
                 Control
                 Construction
                   Grants
Drainage Systems
Storm Runoff
Urban Hydrology
Combined Sewer
Overflow
13B
18. DISTRIBUTION STATEMENT
  Release  to Public
                                       19. SECURITY CLASS (ThisReport)
                                         Unclassified	
                                                       21. NO. OF PAGES
                                                          211
                                20. SECURITY CLASS (Thispage)
                                  Unclassified
                                                             22. PRICE
EPA Form 2220-1 (Rev. 4-77)   PREVIOUS EDITION is OBSOLETE

-------
                                                         INSTRUCTIONS

   1.   REPORT NUMBER
       Insert the EPA report number as it appears on the cover of the publication.

   2.   LEAVE BLANK

   3.   RECIPIENTS ACCESSION NUMBER
       Reserved for use by each report recipient.

   4.   TITLE AND SUBTITLE
       Title should indicate clearly and briefly the subject coverage of the report, and be displayed prominently. Set subtitle, if used, in smaller
       type or otherwise subordinate it to main title. When a report is prepared in more than one volume, repeat the primary title, add volume
       number and include subtitle for the specific title.

   5.   REPORT DATE
       Each report shall carry a date indicating at least month and year. Indicate the basis on which it was selected (e.g., date of issue, date of
       approval, date of preparation, etc.).

   6.   PERFORMING ORGANIZATION CODE
       Leave blank.

   7.   AUTHOR(S)
       Give name(s) in conventional order (John R. Doe, J. Robert Doe, etc.).  List author's affiliation if it differs from the performing organi-
       zation.

   8.   PERFORMING ORGANIZATION REPORT NUMBER
       Insert if performing organization wishes to assign this number.

   9.   PERFORMING ORGANIZATION NAME AND ADDRESS
       Give name, street, city, state, and ZIP code. List no more than two levels ot an organizational hirearchy.

   10.  PROGRAM ELEMENT  NUMBER
       Use the program element number under which the report was prepared. Subordinate numbers may be included in parentheses.

   11.  CONTRACT/GRANT NUMBER
       Insert contract or grant number under which report was prepared.

   12.  SPONSORING AGENCY NAME AND ADDRESS
       Include ZIP code.

   13.  TYPE OF  REPORT AND PERIOD COVERED
       Indicate interim final, etc., and if applicable, dates covered.

   14.  SPONSORING AGENCY CODE
       Insert  appropriate code.

   15.  SUPPLEMENTARY  NOTES
       Enter information not included elsewhere but useful, such as:  Prepared in cooperation with, Translation of, Presented'at conference of,
       To be published in, Supersedes, Supplements, etc.

   16.  ABSTRACT
       Include a brief (200 words or less) factual summary of the most significant information contained in the report. If the report contains a
       significant bibliography or literature survey, mention it here.

   17.  KEY WORDS AND DOCUMENT ANALYSIS
       (a) DESCRIPTORS - Select from the Thesaurus of Engineering and Scientific Terms the proper authorized terms that identify the major
       concept of the research and are sufficiently specific and precise to be used as index entries for cataloging.

       (b) IDENTIFIERS AND OPEN-ENDED TERMS - Use identifiers for project names, code names, equipment designators, etc. Use open-
       ended terms written in descriptor form for those subjects for which no descriptor exists.

       (c) COSATI HELD GROUP - Field and group assignments are to be taken from the 1965 COSATI Subject Category List. Since the ma-
       jority of documents are multidisciplmary in nature, the Primary Field/Group assignment(s) will be specific discipline, area of human
       endeavor, or type of physical object. The apphcation(s) will be cross-referenced with secondary Field/Group assignments that will follow
       the primary postmg(s)

   18.  DISTRIBUTION STATEMENT
       Denote releasability to the public or limitation for reasons other than security for example "Release Unlimited." Cite any availability to
       the public, with address and price.

   19. & 20. SECURITY CLASSIFICATION
       DO NOT submit classified reports to the National Technical Information service.

   21.  NUMBER OF PAGES
       Insert the total number of pages, including this one and unnumbered pages, but exclude distribution list, if any.

   22.  PRICE
       Insert the price set by the National Technical Information Service or the Government Printing Office, if known.
EPA Form 2220-1 (Rev. 4-77) (Reverse)
                                                          a US GOVERNMENT PRINTING OFFICE 1979 -281-147/20

-------