"'^COMPUTER   PROGRAM
      DOCUMENTATION
                                                         a
      for the                                            t

      STREAM _QUALIIY MODEL  QUA L-II       *
J>
yj
      AN INTERMEDIATE TECHNICAL REPORT

      Larry A. Roesner
      John R. Manser
      Donald E. Evenson       ^15* .  ,,-i
                 Headquarters and Chemical Lit
                    EPA West Bidg Room 3340
                       Mailcode 3404T     _^^^^,,             p
                    1301 Constitution Ave NW   , 1Mm —
                      Washington DC 20004,    '^"••*HB»            C
      prepared  for      202-566-0556                          e


      THE ENVIRONMENTAL PROTECTION AGENCY

      SYSTEMS  DEVELOPMENT BRANCH                   e

5     WASHINGTON, D.C.                                 n
>-
                                                         g
                                                         i
      Contract No. 68-01-0742: Iowa And Cedar River Basins Model Project            n

                                                         e
                                                         e

      MAY , 1973                   RsnnQlrrmi y*w;«i            n

                              tomam Co/lection
                   2700 MITCHELL DRIVE  WALNUT CREEK, CALIFORNIA 94598         D


                   Walnut Creek. California • Springfield. Virginia • Austin. Texas               C

-------
                            TABLE  OF CONTENTS
                                SECTION  I
                       BACKGROUND AND  INTRODUCTION
BACKGROUND                                                           1-1
QUAL-I                                                               1-1
QUAL MODIFICATIONS:  QUAL-II                                         1-2
DOCUMENTATION  REPORT                                                 1-3

                              SECTION II
                       THEORETICAL CONSIDERATIONS
INTRODUCTION                                                         II-l
GENERAL MODEL  RELATIONSHIPS                                          11-2
CONSTITUENT REACTIONS  AND  INTERACTIONS                               II-3
SUMMARY OF MATHEMATICAL RELATIONSHIPS                                II-8
REACTION  RATES AND PHYSICAL CONSTANTS                                11-10

                              SECTION III
                           MODEL DESCRIPTION
INTRODUCTION                                                         III-l
PROTOTYPE REPRESENTATION                                             III-l
MODEL LIMITATIONS                                                    II1-2
NUMERICAL PROCEDURES                                                 II1-3
MODEL STRUCTURE AND SUBROUTINES                                      III-4

                              SECTION IV
                         PROGRAM DESCRIPTIONS
MAIN PROGRAM - QUAL2                                                 IV-1
SUBROUTINE ALGAES                                                    IV-4
SUBROUTINE BODS                                                      IV-6
SUBROUTINE COLIS                                                     IV-8
SUBROUTINE CONSVT                                                    IV-10
SUBROUTINE DOS                                                       IV-12

-------
                     TABLE OF CONTENTS (Continued)
                                                                    Page
                         SECTION IV (Continued)
SUBROUTINE FLOAUG                                                   IV-14
SUBROUTINE HEATEX                                                   IV-15
SUBROUTINE HYDRAU                                                   IV-16
SUBROUTINE INDATA                                                   IV-17
SUBROUTINE NH3S                                                     IV-18
SUBROUTINE N02S                                                     IV-20
SUBROUTINE N03S                                                     IV-22
SUBROUTINE P04S                                                     IV-24
SUBROUTINE RADIOS (Not Programmed)                                  IV-26
SUBROUTINE REAERC                                                   IV-27
SUBROUTINE SOVMAT                                                   IV-29
SUBROUTINE TEMPS                                                    IV-30
SUBROUTINE TRIMAT                                                   IV-32
SUBROUTINE WRPT2                                                    IV-34
SUBROUTINE WRPT3                                                    IV-35
DEFINITION OF SYMBOLS                                               IV-36

                               SECTION V
                                QUAL-II
                  DESCRIPTION OF VARIABLES IN COMMON
                               SECTION VI
                     QUAL-II INPUT DATA DESCRIPTION
TITLE DATA CARDS                                                    VI-1
PROGRAM ANALYSIS CONTROL DATA                                       VI-1
NONSPATIALLY VARIABLE A, N, AND P CONSTANTS                         VI-3
REACH IDENTIFICATION AND RIVER MILE DATA                            VI-4
FLOW AUGMENTATION DATA                                              VI-5

-------
                     TABLE OF CONTENTS (Continued)
                                                                    Page
                        SECTION VI (Continued)
COMPUTATIONAL ELEMENTS FLAG FIELD DATA                              VI-5
HYDROLOGIC DATA                                                     VI-6
BOD AND DO REACTION RATE CONSTANTS DATA                             VI-7
ALGAE, NITROGEN AND PHOSPHORUS CONSTANTS                            VI-8
OTHER CONSTANTS                                                     VI-9
INITIAL CONDITIONS DATA                                             VI-9
INITIAL CONDITIONS FOR ALGAE, N, P, COLIFORMS AND
ADDITIONAL NONCONSERVATIVES                                         VI-10
INCREMENTAL RUNOFF DATA                                             VI-11
INCREMENTAL RUNOFF DATA FOR ALGAE, N, P, COLIFORMS
AND ADDITIONAL NONCONSERVATIVES                                     VI-11
STREAM JUNCTION DATA                                                VI-12
HEADWATER SOURCES DATA                                              VI-13
HEADWATER SOURCES DATA FOR ALGAE, N, P, COLIFORMS AND
ADDITIONAL NONCONSERVATIVES                                         VI-14
WASTELOADINGS AND WITHDRAWALS DATA                                  VI-14
WASTELOAD DATA FOR ALGAE, N, P, COLIFORMS, AND
ADDITIONAL NONCONSERVATIVES                                         VI-15
LOCAL CLIMATOLOGICAL DATA                                           VI-16
                              SECTION VII
                            EXAMPLE PROBLEM
EXAMPLE                                                             VII-1
TEST PROBLEM DATA AND RESULTS                                       VII-2

-------
                                SECTION I
                       BACKGROUND AND INTRODUCTION
BACKGROUND                                                  1-1
QUAL-I                                                      1-1
QUAL Modifications:  QUAL-II                                1-2
Documentation Report                                        1-3
                                                                                        g
                                                                                        o

-------
SECTION  I

-------
                                SECTION I
                       BACKGROUND AND INTRODUCTION
BACKGROUND                                                  1-1
QUAL-I                                                      1-1
QUAL Modifications:  QUAL-II                                1-2
Documentation Report                                        1-3

-------
                              SECTION I

                     BACKGROUND AND INTRODUCTION
BACKGROUND


          Beginning on June 13, 1972, the Environmental Protection Agency

(EPA) awarded Water Resources Engineers, Inc. (WRE) a series of four contracts

to modify and apply certain water quality models to four river basins in the

United States.  These four contracts and the project titles are:


          Project Title                        EPA Contract No.

     1.  Chattahoochee-Flint River               68-01-0708
         Basin Mathematical Model
         Project

     2.  Upper Mississippi River                 68-01-0713
         Basin Mathematical Model
         Project

     3.  Iowa and Cedar River                    68-01-0742
         Basins Model Project

     4.  Santee River Basin                      68-01-0739
         Model Project


An element of work common to all four projects is the modification and

application of the mathematical  model QUAL-I to simulate steady-state
water quality levels in selected river reaches in each basin.
QUAL-I
          QUAL-I is a computer program originally designed to simulate the
dynamic behavior of conservative minerals, temperature,  biochemical  oxygen
demand, and dissolved oxygen levels in streams.   The program simulates this
                                    1-1

-------
dynamic behavior by numerical  integration of the one-dimensional  form of the
advection-dispersion transport equation.   The following two reports by
F. D. Masch and Associates and the Texas  Water Development Board  contain
detailed descriptions of both the theory  and structure of the model:

          1.  Simulation of Water Quality in Streams and Canals,
              Theory and Description of the QUAL-I Mathematical
              Modeling System.  Prepared  by Frank D. Masch and
              Associates and the Texas Water Development Board,
              Report 128, The Texas Water Development Board, May  1971.
          2.  Simulation of Water Quality in Streams and Canals,
              Program Documentation and User's Manual.  Prepared
              by the Systems Engineering  Division of the Texas
              Water Development Board.  September 1970.
QUAL MODIFICATIONS:  QUAL-II

          Within the four projects, WRE modified QUAL-I to simulate both
the steady-state and dynamic behavior of the following constituents:

                         Chlorophyll a_
                         Ni trogen
                             Ammonia
                             Nitrite
                             Ni trate
                         Phosphorus
                         Carbonaceous BOD
                         Benthic Oxygen Demand
                         Dissolved Oxygen
                         Col i forms
                         Radioactive Material*
                         Conservative Substances
*The version of the program documented herein does not contain a solution
 subroutine for Radionuclides; however, the  Input-Output routines are set up
 to accommodate the subroutine once it is programmed.  Radionuclines will be
 included  in the program  documented in the Upper Mississippi River Basin Project.

                                   1-2

-------
The temperature simulation capability of the program was not modified to
simulate steady-state temperature directly.  The modified program will, as
before, simulate dynamic changes in temperature.  The modified version of
QUAL-I is referred to in this report as QUAL-II.
DOCUMENTATION REPORT

          The theoretical considerations and program structure, which are
discussed in Sections II and III, respectively, are intended to supplement
Report 128 referenced above.  The diagram documentation and user's manual
which comprises Sections IV through VII, is self contained, i.e., these
sections replace the existing QUAL-I Program Documentation and User's Manual.
To the extent possible, this documentation uses the same symbols and
terminology that were used in the previous reports and program code.  The
reason for making the program documentation and user's manual  self contained
was to avoid the possibility of confusing program users by requiring them to
use two documents to set up and use QUAL-II.

          The following section of this documentation report presents the
theoretical foundation of the modified model.  Section III describes the
overall capabilities, limitations, and structure of QUAL-II.  Subroutine
descriptions, including theory, flowcharts and listings are presented in
Section IV, while Section V defines the program variables.  Section VI
contains users information on input data preparation.  Input data and output
reports for an example problem are presented in Section VII, which concludes
the documentation report.
                                  1-3

-------
                              SECTION II
                       THEORETICAL CONSIDERATIONS                                        w
                                                                     Page                n
                                                                                         5
INTRODUCTION                                                         II-l                -
GENERAL MODEL RELATIONSHIPS                                          11-2
CONSTITUENT REACTIONS AND INTERACTIONS                               11-3
    Chlorophyll a.                                                    H-3
    Nitroqen Cycle                                                   11-4
       Ammonia Nitrogen                                              11-5
       Nitrite Nitrogen                                              II-5
       Nitrate Nitrogen                                              II-5
    Phosphorus Cycle                                                 11-6
    Carbonaceous BOD                                                 11-6
    Benthic Oxygen Demand                                            11-7
    Dissolved Oxygen                                                 II-7
    Coliforms                                                        11-7
    Radionuclides (Not Programmed)                                   11-8
SUMMARY OF MATHEMATICAL RELATIONSHIPS                                11-8
REACTION RATES AND PHYSICAL CONSTANTS                                11-10
    Input Parameters                                                 11-10
    Temperature Dependence                                           11-10

-------
SECTION II

-------
                              SECTION II
                       THEORETICAL CONSIDERATIONS
                                                                     Page

INTRODUCTION                                                         II-l
GENERAL MODEL RELATIONSHIPS                                          II-2
CONSTITUENT REACTIONS AND INTERACTIONS                               II-3
    Chlorophyll a_                                                    II-3
    Nitrogen Cycle                                                   II-4
       Ammonia Nitrogen                                              II-5
       Nitrite Nitrogen                                              II-5
       Nitrate Nitrogen                                              II-5
    Phosphorus Cycle                                                 II-6
    Carbonaceous BOD                                                 II-6
    Benthic Oxygen Demand                                            II-7
    Dissolved Oxygen                                                 II-7
    Coliforms                                                        II-7
    Radionuclides (Not Programmed)                                   II-8
SUMMARY OF MATHEMATICAL RELATIONSHIPS                                II-8
REACTION RATES AND PHYSICAL CONSTANTS                                11-10
    Input Parameters                                                 11-10
    Temperature Dependence                                           11-10

-------
                              SECTION II
                      THEORETICAL CONSIDERATIONS
INTRODUCTION
          Basically, QUAL-II numerically integrates the advection-
dispersion mass transport equation for all  water quality constituents
to be modeled.  This equation includes the  effects of advection,
dispersion, individual  constituent changes, and sources and sinks;
for any constituent, c, this equation can be written as
          (Axdx) ff  =
                        3(AxDi)

                 3x
dx -
dx
4£ +
                                                    ± s
where
c
x
t
Ax
DL
u
s
                 concentration (M/L3)
                 distance (L)
                 time (T)
                 cross-sectional area (L2)
                 dispersion coefficient (L2/T)
                 stream velocity (L/T)
                 source or sink (M/T)
          There are two terms in this equation that deserve special
attention; these are the two derivatives that describe the local gradients
and individual constituent changes.  Under steady-state conditions, the
local derivative becomes equal to zero; in other words
                              3c  -
                              31  -
                                                                  II-2
Changes that occur to individual constituents or particles independent of
advection, dispersion and waste inputs are defined by the term
                                 II-l

-------
                          |  =  individual constituents changes	11-3

These changes include the physical, chemical, and biological reactions
and interactions that occur in the stream.  Examples of these changes are
reaeration, algal respiration and photosynthesis, and coliform die-off.

          The basic differences between QUAL-I in its original form and
the version documented in this report is that QUAL-II can now solve
steady-state problems directly plus it includes all the complex reactions
and interactions of the nonconservative constituents listed in Section I.
In order to differentiate between the original and modified versions of
QUAL, the latter version is referred to in this report as QUAL-II.
GENERAL MODEL RELATIONSHIPS

          QUAL-I in its original form had the capability to simulate
conservative constituents.  Thus, the necessary modifications were directed
toward the development of a model that could simulate the nonconservative
constituents listed in Section I.  Of this list, QUAL-I already had the
capability to simulate carbonaceous BOD and dissolved oxygen as dependent
constituents with first order kinetics.

          To accommodate the other constituents, WRE modified QUAL-I to
include the major interactions of the nutrient cycles, algae production,
benthic oxygen demand, carbonaceous oxygen uptake and their effect on the
behavior of dissolved oxygen.  Figure II-l illustrates the conceptualization
of this model.  It should be noted that the arrows on this figure indicate
the direction of normal system progression in a moderately polluted
environment; the directions may be reversed in some circumstances for some
constituents.  As an example of process reversal, consider that under normal
conditions oxygen will be transferred from the atmosphere into solution and
thus into the oxygen resources of the stream.  Under conditions of oxygen
                                 II-2

-------
       AMMONIA
      (NITRITE
 o
 x
 y
 6
 E
 N
CARBONACEOUS
   BOD
                   CHLOROPHYLL
                     (ALGAE)
FIGURE EH
GENERAL MODEL STRUCTURE
FOR QUAL-n

-------
supersaturation, however, which might occur as a result of algal
photosynthesis, oxygen might actually be driven from solution, opposite
to the indicated direction of the flow path.
CONSTITUENT REACTIONS AND INTERACTIONS

          The following paragraphs define the mathematical relationships
that describe the individual reactions and interactions among the
constituents treated.

CHLOROPHYLL a (PHYTOPLANKTONIC ALGAE)

          Chlorophyll a_ was considered to be directly proportional to
the concentration of phytoplanktonic algal biomass.  For the purposes of
this model algal biomass was converted to chlorophyll a_ by the simple
relationship
                              C  =  a0 A	H-4
where
          C   =  chlorophyll a_ concentration
          A   =  algal biomass concentration
          a0  =  a conversion factor

The differential equation that governs the growth and production of
algae (chlorophyll a_) is formulated according to the following relationship

                        $  -  yA-pA-^A	II-5
where
          A   =  algal biomass
          t   =  time
          y   =  the local  specific growth rate of algae as defined
                 below, which is temperature dependent
          p   =  the local  respiration rate of algae, which is
                 temperature dependent
                                  II-3

-------
          a!  =  the local settling rate for algae
          D   =  average stream depth

Now, the local specific growth rate of algae is known to be coupled to
availability of required nutrients and light.  The standard formulation
for the local specific growth rate in a stream takes the form

                *    N3        P     1  ln    KL + L
          »  =  M iTTK    FTT  ' XDln     +   -^D  ..........
where
          y   =  the maximum specific growth rate
          N3  =  the local concentration of nitrate nitrogen
          P   =  the local concentration of orthophosphate
          L   =  the local intensity of light
          A   =  the light extinction coefficient in the river
  KN, Kp, KL  =  empirical half-saturation constants (temperature dependent)

It should be noted that Equation II-6 couples algal production to the
available nutrient supply, and thus algae and chlorophyll a_ can be expected
to vary in time and space as nutrients are added to the stream.  It should
also be noted that Equation I 1-6 includes light intensity.  Thus, other
factors remaining equal, algal production will be increased during daylight
hours and will cease at night, although respiration will continue at night
as indicated in Equation I I -5.  Finally, the growth and respiration
constants will be temperature dependent and will be formulated, along with
all other temperature dependent systems variables, according to the
procedure explained in a later paragraph of this section.
NITROGEN
          The nitrogen cycle in QUAL-II contains three components as
shown in Figure II-l.  The differential equations governing transformation
of nitrogen from one form to another are given below.
                                 II-4

-------
Ammonia Nitrogen
                   dN,
                        =  B  pA -
where
          N   =  the concentration of ammonia nitrogen as nitrogen
          B   =  rate constant for the biological oxidation of ammonia
           1     nitrogen, temperature dependent
          a   =  the fraction of respired algal biomass which is
                 resolubilized as ammonia nitrogen by bacterial action
          a   =  the benthos source rate for ammonia nitrogen
          Ax  =  average stream cross-sectional area
and other terms are as previously defined.

Nitrite Nitrogen

                    dN

where
2  =  Bl NI - 62 N2	H-8
          N    =   the  concentration  of  nitrite nitrogen  as nitrogen
          &    =   rate  constant  for  the oxidation  of nitrite nitrogen
           2      temperature  dependent
 and  other terms  are as previously defined.

 Nitrate Nitrogen

                    dN.

                                                                             II-9
           Note  the  coupling  that  exists  between  the conversion  of  nitrate
 and  the  production  of algae  to  close  the loop  indicated  in  Figure  II-l.
                                 II-5

-------
PHOSPHORUS CYCLE

          The formulation of the phosphorus cycle is less complex than
the nitrogen cycle because the model considers only the interaction of
phosphorus and algae plus a sink term.  Correspondingly, the differential
equation describing the distribution can be written as

                    ^  =  a2pA - a2yA + a2/Ax	11-10
where
          P   =  the concentration of orthophosphate as phosphorus
          ci2  =  the fraction of algal biomass that is phosphorus
          cr2  =  the benthos source rate for phosphorus
and all other terms are as previously defined.

CARBONACEOUS BOD

          The rate of change of carbonaceous BOD in the stream is
formulated as a first order reaction according to the formula
where
          Lj  =  the concentration of carbonaceous BOD
          Kj  =  the rate of decay of carbonaceous BOD
                 (temperature dependent)
          K3  =  the rate of loss of carbonaceous BOD due
                 to settling

          Note that while the change in BOD is expressed by Equation 11-11,
the oxygen demand exerted as a result of the change is only KjLj.  The BOD
which settles becomes a benthic oxygen demand.
                                 II-6

-------
BENTHIC OXYGEN DEMAND
i.e.
where
          The benthic oxygen demand is considered to be a fixed demand,
                                                                            IM2
          l_2  =  benthic oxygen demand
          K,,  =  constant benthic uptake
DISSOLVED OXYGEN

          The differential equation that describes the rate of change of
oxygen in the model is written in the form
where
K2(0* - 0)
                      A -
                                                                          .  11-13
0   =
0*  =

a   =
 3
a   =
a   =
 6
                 the concentration of dissolved oxygen
                 the saturation concentration of dissolved oxygen
                 at the local temperature and pressure
                 the rate of oxygen production per unit of
                 algae (photosynthesis)
                 the rate of oxygen uptake per unit of algae respired
                 the rate of oxygen uptake per unit of ammonia oxidation
                 the rate of oxygen uptake per unit of nitrite
                 nitrogen oxidation
                 the aeration rate in accordance with the Fickian
                 diffusion analogy
COLIFORMS

          The differential equation that describes the die-off of col i forms
in  the  stream is
                                 II-7

-------
                         HT  '  - KsF ................... IM4
where
          F   =  the concentration of col 1 forms,
          K5  =  col i form die-off rate.

RADIONUCLIDES (NOT PROGRAMMED)

          This portion of the model will be completed in the Upper
Mississippi River Basin Project, and the documentation will be updated
at the time that project is completed.  However, it is tentatively
envisioned that the differential equation to describe the changes in
rad i on uc Tides will be written as
                             "  - KrR - KaR ................ IN15

where
          R   =  concentration of radionuclides,
          Kr  =  radioactive decay rate
          K3  =  radioactive adsorption rate
           a
SUMMARY OF MATHEMATICAL RELATIONSHIPS

          Table II-l summarizes the complete set of equations solved by
QUAL-II with the exception of the temperature relationships.  The equations
that describe the temperature routing as well as the associated relationships
for all the heat budget terms can be found in the report by F. D. Masch and
Associates and the Texas Water Development Board.  The equations presented
in Table II-l include the effects of dispersion, advection, constituent
reactions and interactions, and a source term.  The following chapter of
this documentation describes how QUAL-II is structured to solve these equations.
                                 II-8

-------
I
UD
Conservative mineral  (c)






Algae (A)






Ammonia nitrogen (N,)






Nitrite nitrogen (N2)






Nitrate nitrogen (N3)






Phosphate phosphorus (P)
                                                                  TABLE  II-l

                                      SUMMARY OF  DIFFERENTIAL  EQUATIONS  TO BE SOLVED  BY QUAL-II
                                                                           +    _
                                                                    AX3X     Axdx
              Coliforra (F)
3£  _  	

3t  "     Ax3x
                                                     3(M,  I?)     3(VA>     S.
                                                           3N
                                              3N,
                                                           3N
3t        Ax3x          AX3X



             3N.
3N
                                              iP.
                                              3t
              Biochemical oxygen demand (L)      ~pr
              Dissolved oxygen
                                               3F
                                                                                                  .
                                                                                             - -> A
          Ox
           X
                                                                       3x
                                                                  SF

                                                                 Ox
                                                                  A
              Radioactive material (R)

-------
REACTION RATES AND PHYSICAL CONSTANTS

INPUT PARAMETERS

          The chemical and biological reactions that are simulated by
QUAL-II are represented by a complex set of equations (3, 4) that contain
many system parameters:  some are constants, some are spatially variable,
and some are temperature dependent.  Table II-2 lists these system
parameters and gives the possible range of values, units, types of
variation, and reliability of the ranges for each parameter.  References
(5) and (6) give detailed discussions of the basic sources of data,
ranges and reliabilities of each of these parameters.  Final selection
of the values for many of these system parameters will be made during
model calibration and verification.

TEMPERATURE DEPENDENCE

          All rate constants and other factors (except the saturation
concentration of oxygen) that are known to be temperature dependent are
formulated according to the relationship

                         XT  =  XT  e(T'Ts)	11-16
                          1       s
where
          XT   =  the value of the variable at the local temperature, T
          XT   =  the value of the variable at the standard temperature, Ts
          0    =  an empirical constant for each system variable
                                  11-10

-------
                              REFERENCES


1.  Frank D. Masch and Associates and the Texas Water Development Board,
    Simulation of Water Quality in Streams and Canals, Theory and
    Description of the QUAL-I Mathematical Modeling System, Report 128,
    the Texas Water Development Board, May 1971.

2.  Systems Engineering Division of the Texas Water Development Board,
    Simulation of Water Quality in Streams and Canals, Program Documentation
    and User's Manual, September 1970.

3.  Water Resources Engineers, Inc., Technical Proposal, Upper Mississippi
    River Basin Model Project, submitted to Environmental  Protection Agency,
    May 1972.

4.  Water Resources Engineers, Inc., Progress Report on Contract No.
    68-01-0713, Upper {Mississippi River Basin Model Project, Sponsored
    by the Environmental Protection Agency, submitted to Environmental
    Protection Agency, September 21, 1972.

5.  Kramer, R. H., A Search of the Literature for Data Pertaining to
    Bioenevgetics and Population Dynamics of Freshwater Fishes, Desert
    Biome Aquatic Program, Utah State University, August 1970.

6.  Chen, C. W. and G. T. Orlob, Final Report, Ecologia Simulation for
    Aquatic Environments, Water Resources Engineers,  Inc., prepared for
    the Office of Water Resources Research, U.S. Department of the
    Interior, October 1972.
                                                      .WATER RESOURCES ENGINEERS, INC..

-------
                              SECTION III
                           MODEL DESCRIPTION
INTRODUCTION                                                HI-1
PROTOTYPE REPRESENTATION                                    III-l
MODEL LIMITATIONS                                           II1-2
NUMERICAL PROCEDURES                                        111-3
MODEL STRUCTURE AND SUBROUTINES                             111-4

-------
SECTION  III

-------
                              SECTION III
                           MODEL DESCRIPTION
                                                             Page
INTRODUCTION                                                III-l
PROTOTYPE REPRESENTATION                                    III-l
MODEL LIMITATIONS                                           III-2
NUMERICAL PROCEDURES                                        III-3
MODEL STRUCTURE AND SUBROUTINES                             III-4

-------
                                SECTION III
                            MODEL DESCRIPTION
 INTRODUCTION

          This section of the report describes (1) how the prototype river
 system is approximated in the model; (2) the numerical procedures used to
 integrate the differential equations presented in Section II and applied
 to the prototype representation; (3) the general limitations of the model;
 and  (4) the overall model structure and subroutines.
PROTOTYPE REPRESENTATION

          QUAL-II permits any branching, one-dimensional stream system to
be simulated.  The first step involved in approximating the prototype is to
subdivide the stream system intoapeaches^whlch are stretches of stream that
have  uniform hydraulic characteristics.-,Each reach is then divided into
-computational elements of equal length so that all computational elements
.vn-all  reaches are the same length.  J^hus, all reaches must consist of an
jrfiteger number of computational elements.

          In total, there are seven different types of computational elements;
these are  ,
        <1.  Headwater element
          >
        /'I.  Standard element
        */Z.  Element just upstream from a junction
        •^4.  Junction element
        -^5.  Last element in system
        •^6.  Input element
        S 7.  Withdrawal element
                                 III-l

-------
Headwater elements begin every tributary  as well  as  the main river system,
and as such, they must always  be the first element in  a reach.  A standard
element is one that does not qualify as one of the remaining six element
types.  Since incremental inflow is  permitted in  all element types, the
only input permitted in a standard element is incremental  inflow.  A type
3 element is used to designate an element on  the  mainstem  that  is just
upstream from a junction element {type 4) which is an  element that has a
simulated tributary entering it.  Element type 5  identifies the last
computational element in the river system; there  should be only one element
type 5.  Element types 6 and 7 represent  elements which have ir,.uts (waste
loads and unsimulated tributaries) and water  withdrawals,  respectively.

          River reaches, which are aggregates of  computational  elements,
are the basis of most data input. Hydran^^^ta. reaction rate coefficients.
initial conditions, and incremental 4runoff dat^are  constant for all
computational elements within  a reach.
MODEL LIMITATIONS

          QUAL-II has been developed to be a relatively general  program;
however, certain dimensional limitations have been imposed upon  it  during
program development.  These limitations are as follows:

          Reaches:  a maximum of 75
          Computational elements:  no more than 20 per reach nor
                                   500 in total
          Headwater elements:  a maximum of 15
          Junction elements:  a maximum of 15
          Input and withdrawal elements:  a maximum of 90 in total
                                 III-2

-------
          QUAL-II can be used to simulate any combination  of the following
parameters or groups of parameters:

          1.  Conservative minerals
          2.  Temperature
          3.  BOD
          4.  Chlorophyll a_
          5.  Phosphorous
          6.  Ammonia, nitrite and nitrate
          7.  Dissolved oxygen
          8.  Coliforms, and
          9.  Radioactive material

The only limitation placed on the parameters to be simulated is that
temperature can only be simulated under dynamic conditions.  All other
parameters  can be simulated under either steady-state or dynamic conditions
If either  phosphorus or the nitrogen cycle are not being simulated, the
model presumes they will not limit algal growth.
NUMERICAL PROCEDURES

          The complete set of equations that must be solved have been
presented in Table  II-l.  QUAL-II numerically integrates this set of
differential equations using a wholly implicit numerical scheme.  Report
128, Simulation of  Water Quality in Streams and Canals, prepared by F. D.
Masch  and Associates and the Texas Water Development Board (1) describes the
numerical formulation and method of solution.  The only difference between
the original version of QUAL and the version documented herein is that all
terms  that  describe the local derivative (e.g., reaeration and decay rates)
are now  described implicitly rather than explicitly.
                                  III-3

-------
MODEL STRUCTURE AND SUBROUTINES

          QUAL-II is structured as one main program,  QUAL2,  supported by  20
different subroutines.   Figure III-l  graphically illustrates the functional
relationships between the main program and the 20 subroutines.   The
original version of QUAL, as programmed by William A.  White, was structured
to permit the addition of parameters  easily through addition of subroutines.
This basic concept, which proved to be an extremely valuable one, was
maintained in the extension of the original version to QUAL-II.   Thus,  if
it becomes desirable at some later time to add new parameters or modify
existing parameter relationships, the changes can be  made with  a minimum
of model restructuring.

          The following section of this documentation describes, in  detail,
the main program, QUAL2, and its 20 subroutines.
                                   III-4

-------
    Qg
       a
    U  3
       Aoe
       o
       u.
       z
       oe
    L  ^
    L  a;
               (1)
               (2)  _
               (3)
               (4)
               (5)
               (6)   ^
               (7)
               (8)
               (9)
               (10)  _
(11)
(12)  ^
(13)
               (14)  _
               (15)
(16)
(17)
               (18)
               (19)
               (20)
               (21)
               (22)
               (23)
               (24)
               (25)
               (26)
                          INDATA
                          HYDRAU
                          TRIMAT
                          CONSVT
                          TEMPS
                          BODS
                          ALGAES
           P04S
                          NH3S
           N02S
                          N03S
                          REAERC
                          DOS
                          COL IS
           RADIOS
        (NOT PROGRAMMED)
                               Calling Sequence
                               In ELEMENT A
                       (1) _
              (27)  _
                          WRPT2
              (28)
                          FLOAUG
               (29)
                          WRPT3
                                 HEATEX
                                   (1)
                                            LEGEND
Called I
ELEMENT A
         s
         0
         V
         M
         A
         T
FIGURE m-1
             GENERAL  STRUCTURE  OF  QUAL-H

-------
                              SECTION IV
                         PROGRAM DESCRIPTIONS

                                                                    Page
Main Program - QUAL2                                                IV-1
Subroutine ALGAES                                                   IV-4
Subroutine BODS                                                     IV~6
Subroutine COLIS                                                    IV-8
Subroutine CONSVT                                                   IV-10
Subroutine DOS                                                      IV-12
Subroutine FLOAUG                                                   IV-14
Subroutine HEATEX                                                   IV-15
Subroutine HYDRAU                                                   IV-16
Subroutine INDATA                                                   IV-17                 m
Subroutine NH3S                                                     IV-18                 5
Subroutine N02S                                                     IV-20                 *
Subroutine N03S                                                     IV-22                 <
Subroutine P04S                                                     IV-24
Subroutine RADIOS (Not Programmed)                                  IV-26
Subroutine REAERC                                                   IV-27
Subroutine SOVMAT                                                   IV-29
Subroutine TEMPS                                                    IV-30
Subroutine TRIMAT                                                   IV-32
Subroutine WRPT2                                                    IV-34
Subroutine WRPT3                                                    IV-35
Definition of Symbols                                               IV-36

-------
SECTION IV

-------
                              SECTION IV
                         PROGRAM DESCRIPTIONS

                                                                    Page
Main Program - QUAL2                                                IV-1
Subroutine ALGAES                                                   IV-4
Subroutine BODS                                                     IV-6
Subroutine COLIS                                                    IV-8
Subroutine CONSVT                                                   IV-10
Subroutine DOS                                                      IV-12
Subroutine FLOAUG                                                   IV-14
Subroutine HEATEX                                                   IV-15
Subroutine HYDRAU                                                   IV-16
Subroutine INDATA                                                   IV-17
Subroutine MH3S                                                     IV-18
Subroutine N02S                                                     IV-20
Subroutine N03S                                                     IV-22
Subroutine P04S                                                     IV-24
Subroutine RADIOS (Not Programmed)                                  IV-26
Subroutine REAERC                                                   IV-27
Subroutine SOVMAT                                                   IV-29
Subroutine TEMPS                                                    IV-30
Subroutine TRIMAT                                                   IV-32
Subroutine WRPT2                                                    IV-34
Subroutine WRPT3                                                    IV-35
Definition of Symbols                                               IV-36

-------
                              SECTION IV
                         PROGRAM DESCRIPTIONS
          This chapter describes the main program QUAL2, and its 20
subroutines.  Each program description contains:  (1) a brief written
description of what the program does, including mathematical relationships;
(2) a program flow chart; and (3) a program listing.  Section V contains
definitions of all program variables in COMMON storage.
MAIN PROGRAM QUAL2

          QUAL2 is the main program of QUAL-II; it calls most of the
subroutines, computes some miscellaneous constants, sets up the initial
conditions, performs the convergence checks when a steady-state problem
is being solved, and controls the printing of the output reports.  The
only subroutine not called by the main program is HEATEX, which is
called by Subroutine TEMPS.

          After QUAL2 calls INPUT, which reads in the input data, and
computes some miscellaneous constants, it sets up the initial conditions
for each computational element.  Initial conditions for each reach are
read in and used to define the initial conditions for all computational
elements within a reach.  QUAL2 then calls the subroutines necessary to
simulate the water quality parameters specified on the title cards.

          The input Title Data Cards (see Section VI) prescribe which
water quality parameters QUAL-II will simulate.  Whenever a Title Data
Card indicates a parameter is to be simulated, the program assigns a
positive integer to an internal variable (MODOPT) that indicates which
model options are to be used.  The correspondence between internal model
options and parameters is as follows.
                                IV-1

-------
          Model Option        Parameter(s) to be Simulated
           MODOPT (1)         Conservative Constituents
           MODOPT (2)         Temperature
           MODOPT (3)         Biochemical Oxygen Demand
           MODOPT (4)         Chlorophyll a.
           MODOPT (5)         Phosphorus (as P)
           MODOPT (6)         Ammonia, Nitrite and Nitrate (as N)
           MODOPT (7)         Dissolved Oxygen
           MODOPT (8)         Coliforms
           MODOPT (9)         Radionuclides (not programmed)

Any combination of the above options will work.  However, it should be
noted that if chlorophyll a. is to be simulated when either phosphorus
or the nitrogen cycle or both are not to be simulated, the program
assumes they will not limit algae growth.  Also, when chlorophyll a_
is to be simulated under steady-state conditions, QUAL2 uses an
iterative numerical scheme to converge on a solution.  Basically the
procedure works as follows:
          1.  Calculate an algae growth rate based on the
              initial conditions for the first iteration.
          2.  Compute the resulting phosphorus and nitrate
              concentrations.
          3.  Recompute the growth rate based on the newly
              computed phosphorus and nitrate levels.
          4.  Compare the previous and newly computed growth rates.
          5.  If all growth rates have not changed by at least
              0.05 per day, the problem is considered solved.  If
              the growth rate change in any one computational
              element exceeds 0.05 per day, steps 2 through 5 are
              repeated.
Upon completion of the stream quality computations, QUAL2 selectively
reports the results and execution is terminated.
                               IV-2

-------
          The flow chart for QUAL2 is illustrated in Figure IV-1 and
is followed by the program listing.  All program variables contained in
COMMON are described in Section V.
                                  IV-3

-------
                                              INITIALIZE
                                               TITLES
                                                CALL
                                               1MUM
                                              ESTABLISH
                                              REQUIRED
                                              CONSTANTS
               PROGRAM RETURN FOR FLU
                  AUGMENTATION OPTION
l>
                                              SET INITIAL
                                              CONDITIONS
                                              CALLHYDRAU
                                              CALL TRINAT
                                            UPDATE TINE OR
                                            ITERATION NUMBER
                                    PROGRAH RETURN FOR
                                    OVNMflC SOLUTION OR
                                    STHDV-STATE ITERATIVE
                                    SOLUTION
                                            ROUTE SELECTED
                                           QUALITY PARAMETERS
                                               V
FIGURE    ISM
FLOW   CHART  FOR   MAIN   PROGRAM  QUAL2

-------
FIGURE E-Kcont.)   FLOW CHART  FOR MAIN  PROGRAM  QUAL2

-------
                                        CALL «US
                                        CAUL SOVMAT
                                        CALL N02S
                                        CALL SOVHAT
                                        CALL RUS
                                        CALL SOVMAT
FIGURE  E-1(cont.)   FLOW  CHART FOR  MAIN  PROGRAM QUAL2

-------
FIGURE E-Kcont.)  FLOW  CHART FOR  MAIN PROGRAM QUAL2

-------
                                           CALL WWT2(OIH3
                                           CALL
                                           CALL MRPT2(»03
                                           CALL NRPT2(CONS(l.n)
                                           CALL HRPTZ   ' "<(
                                           CALL WRPT2(
2(coNS(i.n)
2 CONS 1.2)
2(CONS(1.3)5
FIGURE   E-1(cont.)    FLOW  CHART  FOR   MAIN  PROGRAM  QUAL2

-------


CALL URPT2(GROWTH)


COMPUTE
PHOTOSYNTHESIS-
RESPI RATION RATIOS


CALL HRf>T2(Z)


FIGURE  BZ-1 (cont.)  FLOW CHART  FOR MAIN  PROGRAM QUAL2

-------
   PRORRAP" OUAL-2
                        UUAL-? IS  f SFT  OF  INTERRELATED  STREAC
                         QUALITY ROUTING 1PDELS. IT HAS  THE
                         CAPARILITY TO ROUTE TFHP. .HOPYPO.
                         NITPOCiEr  SE"IES.  PHOSPhATFi ALAGEi
                         coi rrnpHSi RAPIO  MUCLIOE, ANR
                         UP TO IHRfE  CONSF'.VATIVE ("INFRALS
                         THROUGH A FlJLLY-MIXFf STPEA1 SYSTEP.
                         THESE FAR»1FTEhS  TAN PE POUTED  ON  AN
                         INniVIPI'AL OASIS  OR SinilLTAriEOLISLY  If
                         SUCH A rnrRTNATION AS THE USER  1ftY
                         DESIRE. nilAl-1  ALSO MAS THE CAPABILITY
                         TO COMPUTE THF  FLOW AUGHFNTATION RFOEH.
                         TP MEFT PRFSFLECTPD mniruii no  LFVELS.
                                    ARE  CO«SInrRFn STFAPY-STATE.
COnTlN TITLE(2n»2fl) tRCHIOITSi'il ,R«THORI75I .RMTEOR(7^) iNHUWAP(lS) <
       TARGOOITf I . IAUGOH(7S.f>) ,MCt LRH( 7S> . IFLAG(75.211 ,
       IClORU(75i?0).COEFOV<7S),EXPOOV(75)iCnFF(JHI7S)tEXPOOH(75).
       r«l/lNN(7SI tCKKTS) iCKJITSI iHJOPT I 75) iCK? ( 7-i) , COCQK? < 7"S I i
       EXPOK2(7*%|lTINIT(7SlinolMTT(7S) iBOINIT I 7"i I iCOTMTI 7St3 11
       QU7SI ,TI175) .DOI(75).BOnl(7S| ,cnriSI(7'n,T) ,JUNCIU(15.5)t
       JUNCllS.SliHWTRIOl1P.!l).HUfLnHllPI.HHTEMP|]5l.hUnOll'i>i
       HHHnDtlS) .HWCOMS(l^.J) .WflSTincJO.Sl.TRFftCTl^ni ,HSFLOW('SO>,
       U'STEMP (901. USOOI 90 ) . WSBOOl 90 I . v&fONSl "0 .3).OATOT(1S).
       AI?OO i.'ii iioni.Ci SOP >iD($> tSitoni.zi son > .wi5oni,G|Soo).
       Fl PulaOOl .PEPIHlSOn) .VELC^OP) .OyOvCLCiOni ,K2(-iOn).Kl<500) ,
       HS^FTI00).VHUI15)tnrPHU(l'i)l . T(50UI.
       oo(.KNHS(5nO),KNn?[Sno).RESPRRCSnn) .COLK500).
       ALFAL(Son).PHOSl500ltCNH3(Spn> .CNO?(5rOI .CNOKSnO).
       COLlR(75).ALGII75).PHOSl(7b).rilHJI(7S).Crio?I(7b) .
       CN03I(7H).COLIIT(7«i)iALGITI7'').PHOSIT(75).CNH3IT(751.
       CN02IT(7S).CM03IT(7S) .WSCOl. I I Q0 I . hSALM 90 ) . USPHOSi 90 I t
       WSMH3I90).USN02(90) .WSN07(yn).HWCr>LI(l13> .HWALRdSI i
       HUPHOS(lS).HUNH3 «
       10DOPTIlP).IPCHNO(7Sni,EXCOFr(75l
COni>OII/SSTATE/ XI500I.ISS
CO1"ON/RAOION/
DinFN«!lPN TITL19(15I.TITL?n(lSI
PH«I-  Kl ,KP,LAT.LL«.LSM.
                                                         .iiSR«PW<90l
• NEU
• NEW
• NEW
• *-3

-------
   PnT/\  T]T|]<)               /itH ALGiUHAr  r,,HHR(lUT.'ll'll  Plt.UHTCS
  «P.tHFI< 'i.lHM A.tHRf   itH    ,CIH     ,mi    ,U|i     .MM    ,l||l
   (1KTA  TIIl.?n               /1H PHOtiiHTO'Sr.MHNTMF.UH'.IS-.
  . T.UUini,  . l»HFUTI,l*HOS  A.1HPF  .tH     ,1M    i=nEl
   IF  ii<:s)  "oii^fli rinn
   HILT  =  1.0/21.0
   D?LT  =  1.0
   ITU!  =  ifcnn.o
   IF  lPTIMF.LF.n.1  PTIHE=THAX
   GO  in 10?
   011.1  =
                                        STEP t-n
                                        IF  THF CORHECT  NO.  OF DATA
                                        NIT IJEEr KCAll IN,  THF PRO&RAK
                                                         CONSTANTS.
                                                                          OOOA460Q
                                 T1AX.NCFI I "51
                                     STEP  5-0
                                     FSTARLISH
                                                                          0006*900
                                                                          00065000

                                                                          00066500
                                                                          ooof.f.600
                                                                          00066700
                                                                          00066800
DF.lT=ri LT«J600.0
                                                                          00067000
                                                                          U001TIOO
                                                                          OB067200
         >=nF.i T/inEi.x*nrLx>
                                     STEP f— n
                                     SFT
CALL HTPRAM
CftLI TPI«iAT
   CKL=ChL«f-0.

   IF  iMinnpriai .GT.D
    IF  (ISS.LE.ni CO  TO 110
    Fil'lfT = 0.0
    IF  isniirT.LT.i.nr-m GO in
                                                 COrTIITIONS.



                                     CONVFHSION Of  CKL TO LAW.LEYS/HH

                                     rnui/ERSION TO  PTII/SO.F-T./HR

                                     THE FOLLOWING  COMPIITFS  THF
                                     AWfRAfiE LIRHT  I'UTrMSITY FOR
                                     STFftOT-ST«IE CO1PUTATIHN
                                                                          00067503
                                                                          OOOK7&00
                                                                          000^7700
                                                                          00067000
                                                                          00070'SOO
                                                                          04)070900

-------
      N!lLX=li
      PLK=FLOAT(WI)LH)
      SOAVE=S'>NrT/ULH
      OH -JO M=ltllDLH
      F»=H
      TOT=SOAVF:*I i.o-ros<6.2*»FM/OLHi>
   •SO FU'irT=FUfJCT+(TOT/ICKL*TOT) )
   51 CONTINUr
      SOMME M=CKL tFUNCT/ 1 1 . -FUNCT )
  tip CONTINUE
      On «1S  Tsl.NRrAOl                                                   00067900
      NCFI R=NCF:LR.I( ii                                                     ooossooo
      no "ll  Jrl.WCFLR                                                   00068100
      in»=icLOKHi i,j)                                                     0006*200
      Tl IORI=TI*IT( II                                                     00068300
      lltH IOP)=nOTNIT< II                                                   00068X00
      B0n< inR)=POI,4ITI II                                                  0006^500
      Cf.,'lS( IOR.1 )=COIfITIl tl)                                             00068600
      CONSI IOR,2)=COIMIT(I,2)                                             00068700
      CO\S(IOKi3)=COIMT(I.3)                                             00068BOO
      PMO^I IOR|=PHOSIT| I |
      CMHT(IPRI=CNH5IT(II
      C'J09( TP^I=CN02IT( I I
      Cri03( IOI')=CN03IT(I)
      COLT 1 IOC )=COLUT(I |
      lF(ronOPTI4).E:Q.O>   GO TO 915
      TC = 0.55-68.0l
      EXPT=EXP(-CXCOEFl I I*DEPTHI IORI I
      TLOG=ALOG( (CKL+SOHNEN)/(CKL+SONNF.N*FXPT) I
      GKnuTH(IORI=GPOHAX*TLOG/IEXCOCF(II*OEPTHIIOR) I
      GKnV'TH(IORI=GROWTH(IOR)*1.0«7**TC
  911 COMTItJUC                                                             00068900
      00 922  NkS=l.MUASTE                                                  00069000
      EFLROO=1.0-THFACT|NUS|                                              00069100
      WSRoniMWSI=EFLPOO*USBODINWS>                                        00069200
  9?2 CONTINUE                                                             00069300
C                                                                          00069100
C                                        STEP  7-0                         00069500
c                                        ireiN conpiiTATroNS AND OPERATE  uooo6960o
C                                        STEADY-STATE  CONDITIONS ARE CEAC00069700
C                                        WHITH IS THE  TIME (TNAXI PEOUIRE00069800
C                                        WATER PARTICLE AT THE UPPERMOST 00069900
C                                        If  THE SYSTEM TO REACH THf END  000070000
C                                        THF STSTEf.                       00070100
C                                                                          00070200
r                                        STEP  7-1                         00070300
C                                        CALL  SUPROUTINFS TO PERFORM HYDR00070100
C                                        BALANCE OM SYSTE1 AND ESTABLI&H 00070500
C                                        COEFFICIENT  MATRIX.              00070600
C                                                                          OC070700
  991 TIMF=TI«E»D2LT                                                      00071000
      TPRIIIT = TPRINT+D?LT                                                   On071100
C                                                                          00071200
C                                        STEP  7-2                         00071300
c                                        HPI'TF SFLfCTEn OUALITY p«BA'«FTEPOo07mon
C                                                                          00071500
C                                        MOnOPTIl)   CONSERVATIVE
C                                        wmOI'TC?)   TECPERATURF

-------
                                          HnDOPT( «)
                                          *ionopT(in
                                                   . i
                                                       unn
                                                       CHLOROPHYLL  A
                                                       PHOSPHOROUS
                                          MOOOPK7I
                                          nonopTir)
                                          MODOPT(°I
                                                        "WTOACTIVE
791
              I.FO.O)

uo 777  ur = i,rjrs
c*u i.  ro'*t^vr
Cnl.t   sOVhAT
NT=HT+1
(.in "-Q"  Irl .NCFLLS
COM«!( 1 i'IC)=ZI T I
                              T0
don
777
70'  IF  ("KTUIPTCM .ro.p)  GO TO 703
».*.»«..Jill F 1.  1975  STFADY STATE  TF"P SOLUTION NOT  OPERARIE
     IF  dss.i5T.oi  r,n TO  701
    C«LI  SOV-UT
    L.(I "ii" !=' .MCELLS
    T( ' l-7( I )
non
     IF  (I OI'L'PTMI.fO.P)  Go T3 70"!
     HI  = 7
     C'M 1  hUDS
     CM I  
-------
  «flf. CONTINUt
      NT  = 11
      CALL unas
      Crtl I  S(W*M
      nn  PI* iri ,'ICFII.S
      C' O'dl =  7(1)
      NT  =
      CALI
      CALI
      10  ».
      C iOM T) = 7(1)
c
  707  IF  l"cr&HT (71 .ttn.O) 6O  TO  708
       NT  r 13
       cm L PrfiCPr
       CALI  liOS                                                               U007H800
       CALI  sovi AT                                                            OQ07490I)
       Lin  0[)3 1 = 1 ...iCFLI S                                                     00075000
       0,-(ll=7(l)                                                             00075100
  (in*  C')'ITIUllF                                                               00075200
  70"  II-  (I P'lOPTcM .EO.PI GO  TO  799
       I'T  = 11
       C'-l I- CfiLIS
       C»ll  SCWHAT
       U'.'  HU7 1=1 .riCFLI S
       C"l IIII =  Z(I)
  T"t COr.TH.Ut:                                                               0007SOOO
      IF  (TPRINT.LT.MTIHEI 60  TO "97                                       0007"»100
      TPHtf r=n.p                                                             00079200
  n97 COriTlruf                                                               0007^500
C                                                                             00079400
C                                           STEP 7-J                          00079500
f                                           IF  STEADY-STATE  C1NDITSOM  HAS N'lfl0079600
r                                           RTACHEO, coNTiMue POUTING.       00079700
C                                                                             on079800
      1FI1SS) Mooft. ogog, 9990
 q-i''n IF  ("rnopTcoi  iooiiionii°902                                                 .NEW
 9"?? Kljt = U                                                                         •*-!
      ITEO = MFK +  1
      WHITF (MJi7779l  ITER
 777«> FOPKAT I1?H ITEPATION   .IS)
      UO  °9«V JJ=l.M«ruCH
      NCELR=Mr! LI'Hi JJI
      DO  IS"* KKsLNCFLR
      E'PT=FXP(-f.XCOEF( JJ)»nrPTM(II I
      TL'ir,= nl OR< irKL*SOMNEN)/(CKL + S
      X6hl'W=B1Pf»Ay«TLP6/(EXCOLF«JJI«DEPTH(II)
      Xrnpn=xC-K"V »1.0"7»»TC
      TT  -
       IF  (K.Ofll'T (III .EC.O) CO  TO  1*20
       K'ir = -1.0/(ALrHA2*ALFAE(I>*TT>
                     )»(CKP+PHPS( T) l*nGPP-XPFOW
       >r  = Mif'Ti ( i )»(rKp+cnos( ri )-xGPiiW«PhoS( I)

-------
              su TMn«xii-n.o»XA»xc>
      III •ii'" = -l!.' -XI/X' +  f.'jiROPT/ARSIXAl
      Pui^i 11 =  Pi'osi t>+nFnos
      It  ir'iosi; i .LT.n.ni  PHOSIII  = n.o
      ll-i'fl z kf.POhaPHOSlI I/ICKP+PHOSM) )
      IF  Ifpl'PPTIfil.rP.OI  GO TO  ""MO
      DC.Pf  r -1 .0/(ALl HA1»ALGAE(I)»TT)

      XI  -  r-KH'THI 1 I + (CKN+CUO3( II l»PGPr'-XBPOW
      xc  =  rrrum i)« (CKM+cwn3( T ) i-XGRiw»rriOji I)
      ROOT  = '•f'f n Af'*Xh-t.fl»XA«XCI
      01 ir'i-ii.* .Xli/v/i +  0.5*ROnT/AnS(XA)
      cpnjii) =  cr»o^(i>  +  OCM03
      IT (Ci l'*< I I .LT.C.IM  CN03IT)  = 0.0
      I'.fnt = TTRC **Ct 031 I )/(CKM+Cri03l I ) )
      COUTH ur
      |if, =  Tl-Hi'Vi -  GROWTH! I I
      IF  (H'b(C'C-) .LT.r.PJ)  GO  TP  R99*
      MilM = t.HP»  +  1
      CI-OWTIII)  =  CPOUTIMl) +  0.7»nG
      fi".TI"l (
      t'l'TTt (Mj.77nn> Nur
      FfUPAl IJPH  bFOWTH  RA1F  NPM CO"VFRGENT IN.IM.9H ELEMENTS)
      ir  i urn  Jooi ,1001.499ft
 1r)»t IFIT1"[ .LT.  TMAX)  GO TO P9*
      IF  (IFM  ciQ9H.9")9»l.l001
 inni ri,.iT  ir ur
      IF  ^OLPPTiai ) 1011 .1011.1008
 inn' Ml=f
t,»*.»....jL'l:l 1.  197T  STF.ADY  STATE TFKP SOLUTION  NOT OPERABLE                     »NEW
      Gn TO 1011                                                                         *NEW
      CM I  H--»T?(T|
       IF  (
       'ii =
       CALI
       C.VTIi.iit
       IF  I -r l-ill'TISI )  1DJI.10T1.1022
       ilP|Ct.M»)
       NT = 1 1
       CALI  VPIM? ICP07I
       NT-12
       Cm  HJPTP lC^:o^l
       CiV-TiruL
       li  I'Vii-n 1 1^1 >  1051.
       'JT:0
       C*LI  ••(•PT5 IHHOSl
  in<51  CO ITli  Uf
       IF i   inti .inn, 1
  ins?  'ir=r.
       C/\LL fRI'l? (1LGAL)
  l.'f 1  Ci» iTIr  uE
       Ir Ih'POPTIf-l I  11-71. 1071. inf.?

-------
1071

107?
     CONTINUE
     IF  i»nr.npTii) )  iu8i.ioei.io72
     M = l
     CO  1P75 WrliHCS
     CALL WRPT?  (CONSIl.tUC
     IF  (MorOPTtqi.EO.OI GO 10 <
                                                                                   »NEU
     CALt UKPT?  IbROWTH)
     DM
     2(
     COUTH I'E
     CALI UK^l
     CONTIruC
                 (Z)
     IF  (IA|inon.ru.QI RO TO 91-*
-------
SUBROUTINE ALGAES*

          Subroutine ALGAES completes the setup of the equations necessary
to calculate algal biomass concentrations in each computational  element.
Specifically, the subroutine completes the definition of the diagonal
term of the coefficient matrix and defines the vector of known terms on
the right hand side of the equations.  In addition, solar radiation is
read at three hour intervals if a dynamic simulation is being performed.

          The additions to the diagonal term represent the individual
constituent changes caused by constituent reactions and interactions,
and mass changes caused by stream withdrawals.  The resulting diagonal
term for each type of computation element is:
            TYPE                      DIAGONAL TERM
     All except type 7           b-j  =  XT - (yi - p -
     7.  Withdrawal              bn-  =  xn- - (y-j - p - ajAt - q0 —

where x^ is defined in Subroutine TRIMAT.

          The growth rate, y^, is computed according to Equation II-6
as
                           N,          n         i       K
                                                    .     L
                                                    in
                                    _ _
                        N3 + KN  _  F+T^     Xffi      KL + Le ~ii

For dynamic simulation, nitrate (N3) and phosphorus (P) values from the
previous time period are used to calculate the growth rate; for steady-
state simulation, values from the previous iteration are used.

          If, under the program options, algal concentrations are being
simulated and either nitrate or phosphorus or both are not being
simulated, the program assumes that the parameter or parameters not
simulated are not limiting.  For example, if both nitrate and phosphorus
are not being simulated the growth rate would be computed as
                                   IV-4

-------
                                          KL
                                     In
          The right hand side term contains all  known inputs, which
include headwater inflows, wastewater discharges, tributary flows and
incremental runoff, and, in the case of dynamic simulation, the
concentration in the previous time step.  The known term for each type
of element for dynamic simulation is:
          TYPE                   RIGHT HAND SIDE
     1.  Headwater         S^  =  A* +
     6.  Waste Input       S1  =  A  + qA     + qwAw

     All Others            S,  =  A* + q'Al £•
                            1      111 V*
For steady-state simulation, the only difference is that the value from
the previous time step, A.J , is set equal to zero.

          The subroutine flow chart is illustrated in Figure IV-2 and
is followed by the program listing.  All program variables contained
in COMMON are defined in Section V.
*AI I  symbols used are defined at the end of this section of the
 Documentation Report.
                                   IV-5

-------
                                              (ENTRY       \
                                          SUBROUTINE ALGAES   1
                     (See 0»U
                     Fora 19)
    INITIALIZE COUNTERS AND
     CONVERSION FACTORS
    READ SOLAR RADIATION IF
     SIMULATION IS DYNAMIC
                                                              DO conputetlont
                                                              from i to b for
                                                              ill co«putitton»l
                                                              dementi
                                        CALCULATE GROWTH RATE,
                                         AND INITIALIZE KNOW
                                          TERN AND DIAGONAL
                                         TERH FOR STEADY-STATE
                                         OR DYNAMIC SIMULATION


TYPE 1
ADD HEADWATER
INPUTS TO KNOWN
TERN. S(I)




TYPES 2, 3, 4. 5
CONTINUE






TYPE 6
ADD MASTEWATER
INPUTS TO KNOWN
TERM. S(I)




TYPE 7
SUBTRACT STREAM
WITHDRAWAL FROM
DIAGONAL TERM. 8(1)


                                              (RETURN       \
                                              TOQUAL      )
FIGURE   E-2
FLOW  CHART  FOR   SUBROUTINE  ALGAES

-------
   SlinwniiTTMF  ALGAFS
                     n > .«Cllin<75,5> .RHIHOR^^) .RHTEOR<75).NHWWAH< 15> •
           TACGOUITS). THIlt,OK(75.|:,) .MCFLRHt 75), IFLAGt 75.20 >.
           iaOHU(75,?0>.COLFnV<75>.E)f°OOV(7S>.COEFOH{75>.EXPOeH(75> i
           CriBNN(7l> .CK1I75) ,r><3|75>.K?1PT(7S>.CK2<7S>,COEOK2<75> .
           r ,T) (75) .001 (TU.ROPT^1-,) .CONSI (75.3). JUNCID< 15.5).
           JUTIlSiMiHUTKIUI I'M 51. HWFLP-WI 15). HWTEHPl ISl .HWOOI 15 I i
           •i,f-0n(15) .HWCONS( 15.31. WAST TO (SO, 51 .TRFACT ( 90 > , WSFLOW( SO > ,
           i.'STEI''.r>(«n).WEDO(yO>.WSHOn(<»0>.WSCOJS(90.3t.OATOT(15).
           /1C5P1 1 ,q(5i" I .C 15C .COLIIT(7-i) • OLGIT ( 75 ) .PHOSITI 75) . CNH3IT (75 ) .
          CNO2I r (75) ,CNO3IT(75) .USCOLII9I)> .USALGI90) .USOHOSI90) t
          US^H3(°0) .WSN02(90).USN03(90) .HWCOLI(15).HUALG(15) .
          HUPHOS ( 1 r. I . HUN'11 1 1 S I « HUNOf. ( IS ) . HWN03 (15). GROWTH ( 500 ) .
          fonop r i in i . IPCHNCX 751 ) .EXCOEFI 751
                           INITIALIZE COUNTERS
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
•NEW
•NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
•NEW
•NEW
• NEW
• NEW
•NEW
• NEW
• NEW
• NEW
•NEW
•NEW
• NEW
   IMISS  • r.T.  o  .nii. ronoPTi?)  .GT.
   IF(TRLCn)  10. 10. IS
in hCAnini.il)  s,oi»Tr
11 FOR"AT(10X,F10.0)
                                      READ SOLAR RADIATION DATA IF REflP

                                          GO TO S>0
?C
        I UE
                           LOOP  THtC'JGH PEACHCS ANII C""P.  ELEMENTS
   Di 100  1 = 1 .
   HCEL>»=NCr I i-IIIII
   C^CELR=NCFL^^
   Atr.u = (lllD/CNCrLIKALGKI)
   On inn J=1.MCFL"

-------
      IGUrlCLORPI I . J)
C
C                              COMPUTE ALbAE GROWTH  RATES
C
      TC =  P.5f>*-*(TIIORI-f.S.O)
      KPSPRP ( IOP l=RrSPRT»l .0<*7«.TC
      flLSIN-  = »LGSrTZ
      LxpT=FxP(-excnEF>2
      1-rtOHIK IOC)  =  HPCWTIH lnKI.CNOStIOKI/(C!\N»CN03( IOP) I
   ',? COMTH'UF
C
r                              INITIALIZE niAROMAl ANn  KNOWN TERNS
C
      Kran=GROWTH< lOfl-RESPHHI IORI-ALSINK
      SdflPliALCAf (IOP)
             .GT.ii s(ioRi=n.n
              =  S(IOP)+ALGIJ*OTOvCL( IOR)
C
C                             MQniFY DIAGONAL  ANn/OR  KNOWN TERMS
r
      IFL=IFL«G(T.J>
      t,n  TO  (ioi. 100. 100, 100, loo. 101, 10"»>,  IFL
      S(IOR)  - SIICR) -  AIIORI*IIUALG(NHU)
      Gn  TO  100
  1P^ NUS=NWS»l
      S(IOR)  = S(IOR) +  USFLOU(NWS)«WSALGINUSI«DTOtfCL( IOR)
      Gfl  TO  100
  ipu rjus=NUS>i
      OlinK)  = FMIOR) -  USFLOWI!UUS)*DTOVCL(IOR)
  inn cniTINuE

-------
SUBROUTINE BODS*

          Subroutine BODS completes the setup of the equations necessary
to calculate BOD levels in each computational element.  Specifically,
the subroutine completes the definition of the diagonal term of the
coefficient matrix and defines the vector of known terms on the right
hand side of the equations.

          The additions to the diagonal term represent the individual
constituent changes caused by constituent reactions and interactions,
and mass changes caused by stream withdrawals.  The resulting diagonal
term for each type of computational element is:
           TYPE                     DIAGONAL TERM
     All except type 7        bj  =  x^ + (Kt + K3)At
     7.  Withdrawal           bj  =  x1 + (Kj + K3)At - q0 77

where x^ is defined in Subroutine TRIMAT.

          The right hand side term contains all known inputs, which
include headwater inflows, wastewater discharges, tributary flows and
incremental runoff, and, in the case of dynamic simulation, the
concentration in the previous time step.  The known term for each type
of element for dynamic simulation is:
          TYPE                  RIGHT HAND SIDE
     1.  Headwater         S,  =  L? + qll! ^- - a,Lh
                            I      1    11 V     I  '*
     6.   Waste Input       Sn-  =  Li  + q^.  77 +

     All Others            Si  =  L*  + qjl!  ^~
VT
*AII  symbols used are defined at the end of this section of the
 Documentation Report.
                                  IV-6

-------
For steady-state simulation, the only difference is that the value from
the previous time step, L*, is set equal  to zero.

          The subroutine flow chart is illustrated in Figure IV-3 and
is followed by the program listing.  All  program variables contained in
COMMON are defined in Section V.
                                  IV-7

-------
                                             (ENTRY      A -
                                         SUBROUTINE nos    I
                                           INITIALIZE
                                           COUNTERS AND
                                         CONVERSION FACTORS
                                                             CO computations
                                                             from > to b For
                                                             all computational
                                                             elements
                                          INITIALIZE KNOW
                                          TERM AND DIAGONAL
                                        TERM FOR STEADY STATE
                                        OR DYNAMIC SIMULATION


TYPE 1
ADD HEADWATER
INPUTS TO KNOWN
TERM. S(I)








TYPES 2. 3. «. 5

CONTINUE









TYPE 6
ADD UASTEUATER
INPUTS TO KNOWN
TERM. 5(1)








TYPE 7
SUBTRACT STREAM
WITHDRAWAL FROM
DIAGONAL TERM. 8(1)


                                            RETURN
                                            TO QUAL
FIGURE  EZ-3
FLOW  CHART  FOR  SUBROUTINE   BODS

-------
      I'OnS
crjiopnri T ITLE 120.20 J.RCHIOI 75.5) .RMTHORI 75) ,RPITEOR< 75>. NHUWARI 15).
       TARGOO(7*).IAU60R(7'i.f.>.NCELRH(75>,IFLAG(75.20) .
       IClQRU(7>i.?0)>COLFOV(75I.EXPnOVI75).COEraHI75).EXPOaHI75).
       rpiANNI7Ii).rKl(75>,CK3l75lnOINITf75>.BOTNITI7S>.COIlgiTf75.3).
       ni(7S).TII7.HUFLOU( IS) ,HUTEHP(15> .HWDOf15) .
                 iHWCONS(1^.3).UASTin(90.51.TRF«CT(90 I.USFLOWI 90).
                   'SOU 190).WSRODIin I.WSCONSI SO•3 ».0ATOT115).
       A (100 I .'((bPO) .C (500) ,0(5) .SI "inn) ,Z( 500) . U( 500 ),G 1500) •
       FlO.(TnO),PEPTH(5fln).VFL(500),OTOVCL(SOOI,K2(500).K1<500).
       IISNETI^nni .OLI500) , VHU(lp),OEPHW(15l.nLHH( 15) , TI500I .
       nocjno) .nurisno) .CONSCJDO,^)«PTIHE,TPRINT,DELX,
       "lHWTRb,NPEflCM,NUASTF.NJUNC,DrLT.DlLT.02LT,DTOOX2.0T2ODX.
       ATMPR,nIHD,CLOUn,SO'"rT.NI.MJ.TRLCC.TOFDAY.NT.NC.TtnF,NCS
I. /SSTATE/X(SPO».1SS
                                                                        »NEU
                                                                        *MCU
                                                                        *NCU
                                                                        *N£W
                                                                        *NEW
                                                                        »NEW
                                                                        *NEW
                                                                        *NEW
                                                                        *NEU
                                                                        *NEW
                                                                        *NEU
                                                                        *NCW
                                                                        *NEU
                                                                        *NEW
                                                                        *NEU
                                                                        *-16
N.IU=(1
,»VS=0
llri
                        INITIALIZE COUNTERS
                        LOOP THROUGH REACMFS  AND COMP. ELEMENTS
Cr.CFLH-MCF.tR
HrOIJ=RIII)/(.MCFLR*ROOII I)
0.1 UiO J=1.NCFLR
                   INITIALIZE DIAGONAL AND  KNOWN TERNS
TC=0.5'56«(T( IOR)-f.«.0)
KI( If)RI=CK! | 1 |*).n«7».TC
K3r(-K3(I|
PrArT=ClLT«(Kl I IOK1+K3)
        T.I ) S(IOP)=0.0
S(TOR)=S(IOH>*HnUIJ*DTOVCI IICR)
IFL=lFLAGt I.JI

                        KOPIFY niAGOMAL  ANn/OP  KNOWN TERMS

GI TO 1 101 ,100, icn, ion, lOf. 10-5. lou).  IFL

N»IV = UM>.<1
      zM I nw |. II ini-) «MVrtO'-(llHW)
                                                                00002300
                                                                00002100

                                                                00002600
                                                                00002900
                                                                00003000
                                                                00003100

                                                                00003600
                                                                00003700
                                                                00003800
                                                                00003900
                                                                00004000
                                                                00004100
                                                                00004200
                                                                00004300
                                                                00004400
                                                                00004500
                                                                00004700
                                                                onnnssoo
                                                                00005400

-------
    GO TO 100                                                            00005600
10* NUSsNUS+1                                                            00006900
    S 
-------
SUBROUTINE COLIS*

          Subroutine COLIS completes the setup of the equations necessary
to calculate coliform levels in each computational element.  Specifically,
the subroutine completes the definition of the diagonal term of the
coefficient matrix and defines the vector of known terms on the right
hand side of the equations.

          The additions to the diagonal term represent the individual
constituent changes caused by constituent reactions and interactions,
and mass changes caused by stream withdrawals.  The resulting diagonal
term for each type of computational element is:
          TYPE                       DIAGONAL TERM
     All except type 7           bi  =  x-j + K5 At
     7.  Withdrawal              I>1  =  xi + KS At - qo £7

where xn- is defined in Subroutine TRIMAT.

          The right hand side term contains all known inputs, which
include headwater inflows, wastewater discharges, tributary flows and
incremental runoff, and, in the case of dynamic simulation, the
concentration in the previous time step.  The known term for each type
of element for dynamic simulation is:
          TYPE                     RIGHT HAND SIDE
     1.  Headwater            Sn-  =  E* +
     6.  Waste Input          S,  =  E  + qE     + q^

     All Others               S1  +  El- + qlEJ
*AII symbols used are defined at the end of this section of the
 Documentation Report.
                                   IV-8

-------
For steady-state simulation, the only difference is that the value from
the previous time step, E*,  is set equal  to zero.

          The subroutine flow chart is illustrated in Figure IV-4 and
is followed by the program listing.  All  program variables contained
in COMMON are defined in Section V.
                                  IV-9

-------
                                        (ENTRY     \
                                    SUBROUTINE CM.IS  j
                                      INITIALIZE
                                      COUNTERS MID
                                    CONVERSION FACTORS
                                                      DO computations
                                                      from l to b for
                                                      ill conputitiorul
                                                      elements


INITIALIZE KNOWN
TERM ADI
TERM FOR S
DIAGONAL
TEADf STATE
OR DYNAMIC SIMULATION


TVPE 1
ADD HEADWATER
INPUTS TO KNOWN
TERM. 5(1)




TYPES 2, 3. 4. 5
CONTINUE






TYPE 8
ADO WASTEUATER
INPUTS TO KNOWN
TERM. S(l)




TYPE 7
SUBTRACT STREAM
WITHDRAWAL FROM
DIAGONAL TERM. 8(1)


                                        (RETURN      \
                                        TO QUAL      I
FIGURE  E-4
FLOW  CHART  FOR  SUBROUTINE COLIS

-------
                 COL is
c
c
      COMWCN TITLE(SO.20 I.RCHIOl75.5).RMTHOR)75).RnTEORt75).NHUUARIIS I.          *NEU
     *       TflPGDOl751.IAUGOR(75.6|.NCELRH(75).IFLflG(75,20).                    *NEU
     *       ICLORO|75.2D|.COf.Ff>VI75>,EXPOOV(75),COEFOHl75>,EXPOCH<75),          *NEU
     •       CKANN(75>iCKl(T5>.CK3l73).KZOPT(75)iCK2(7S),COEQK2|751.             *NEU
     *       rxpnK2(75l.TINITI7?).OOINITIT5).BOINITIT5).COINITI75.3) •           *NEU
     •       01(751. Tf <75).nO«75)«BODI|79).CONSl(75i3).JUNCIO(15i5>>           •NCH
     *       JUMC(IS,.*I.HHTKIO(15.5I.HUFLOW(15>,HUTE«P(15) .HUOOI151.             • NCu
     *       HWROOlfj) .HWCONSf 15.3 (, WAST It)( 90.5).TRFACTl 90), WSFLOW( 90),          *NEU
     *       USTEtiP(90l,WSDO(90),USBOD(<)0)tUSCOIilS(90i3).CATOT|15>i               «NEU
     •       »l5nOI.8(bOni,C(500liD(5)iS(500liZ(500liH|500ltG|500l>              *NEU
     *       FLOU(500).OEPTH(500).VEL(SOO).OTOVCL<500I,KB<300).K1<500).          »NEU
     •       KSMCTISOOI.OLISOO).VHU(1S>.OCPHU(15I>OLHU|I5|.T(500}<               *NEU
     •       00(500).POD(500)iCONS(500.J).PT1HE.TPRINT.DELX,                     *NEU
     •       NHWTRS.NRCBCHiNUASTEiNJUNCiDCt.T,01LT.RCSPRR|SOO).COLI(SOO).                 *NEM
             ftLGaC(500t.PHOS(500).CNH3(500),CNOZ(500).CNOS(5001,                 *NEU
             COLIR(75I.AL6H751,PHOSII75).CMH3I(75),CN02I(75).                   *NEW
             CN03M75I.COLIITf71>).AL6IT(75I.PMOSlT(73I.CNH3IT<75).               *NCU
             CN02ITI7S).CN03ITI75)iW5COLI(90)iUsAL6(90).USPKOSI90*i              *NEU
             MSNH3(90) «WSN02(90) .WSNOK90) .HUCOLI1151 iHWALGI 15) i                 *NEM
             HUPHOS(15».HWNHSI15).HUNOailS),HWN03I15I.6ROHTH(SOO(,               *NEU
             nODOPTIlP>.IRCHNOITSOI.E)(COEFI79)                                   »NEU
C                                                                                .-29
C
      COnnnt
      K5=CK5(I)»1.U»7«*TC

-------
      H(IOM=XCIOR)*REACT
      S(IflH)sCOLIIIOR)
      IF (ISS.6T.OI S(IOR)=0.0
      s(inR»=S(IORI*COLIJ«OTO«CL(IORI
      IFL=IFLAGIIiJ)

C                            MODIFY DIAGONAL  AND/OR KNOUN  TERNS

C     GO TO |101.100.100ilOOflOOil03ilO
-------
SUBROUTINE CONSVT*

          Subroutine CONSVT completes the setup of the equations necessary
to calculate concentrations of a conservative constituent level in each
computational element.  Specifically, the subroutine completes the
definition of the diagonal term of the coefficient matrix and defines
the vector of known terms on the right hand side of the equations.

          The additions to the diagonal term represent the individual
constituent changes caused by constituent reactions and interactions,
and mass changes caused by stream withdrawals.  The resulting diagonal
term for each type of computational element is:
          TYPE                            DIAGONAL TERM
     All except type 7                  b^  =  x,-
     7.  Withdrawal                     bn-  =  XT - qo £•
where x-j is defined in Subroutine TRIMAT.

          The right hand side term contains all known inputs, which
include headwater inflows, wastewater discharges, tributary flows and
incremental runoff, and, in the case of dynamic simulation, the
concentration in the previous time step.  The known term for each type
of element for dynamic simulation is:
          TYPE                     RIGHT HAND SIDE
     1.  Headwater            Si  =  C* + q'.C\ ^ - a^

     6.  Waste Input          Sn-  =  C* + qlc! ^ - q/

     All Others               Sn-  =  C* + qjc! ^~
*AII  symbols used are defined at the end of this section of the
 Documentation Report.
                                 IV-10

-------
For steady-state simulation, the only difference is that the value from
the previous time step, C*, is set equal to zero.

          The subroutine flow chart is illustrated in Figure IV-5 and
is followed by the program listing.  All program variables contained
in COMMON are defined in Section V.
                              IV-11

-------
                                    c
         EKTW      \
     SUBROUTINE CUBIT  I
                                          INITIALIZE
                                         COUNTERS AND
                                       CONVERSION FACTORS
                                           T
                        00 conputallons
                        from j to t> for
                        ill cnvuuticnil
                        alenents
                                         INITIALIZE KNOWN
                                        TEW AND DIAGONAL
                                       TERM FOR STEAD) STATE
                                       OR DYNAMIC SINJLATIIM


TYPE I
ADD HEAWATER
INPUTS TO KNOW
TERM. S(t)








TYPES 2. 3. 4. 5

CONTINUE









TYPS. 6
ADD WASTEUATER
IKPUTS TO KNOWN
TERM. S(I]








TYPE 7
SUDTRAC1 STREAM
WITHDRAWAL FROM
DIAGONAL TERM, B(l)


                                           (RETURN       \
                                           TO DUAL      I
FIGURE  E-5
FLOW  CHART   FOR SUBROUTINE  CONSVT

-------
      SUnootlTINf CONSVT
c
C                              CONSVT PERFORMS A CONSERVATIVE HINERAL
C                              BALANCE FOR E&CH COMPUTATIONAL ELEMENT
C                              IN THE SYSTFM.
C
C
      C0«"0r, TITLF(?0.aO).RCKIDl7S.5).P.nTHOR(75l.RnTEOR(751.NHVIUAR(15>.          *NEU
             TAPGnu(7*).IAUGOR(75.6l,NCELPH|75I.IFLAG(75i20><                    »NEW
             ICLdRD(7'=«             *NEW
             ExPDK2(7* I .TIMT<7*).OnINIT(7Sl . BOINIT ( 75| .COTNIT (75. 3 ) i            *NEU
             Bit 75 1 tTI<75)iOOIf»iltBODI(74liCONSII75i3)iJUNCXD(15<5li            *NEU
             JUMCIl'i,3>.HUTKIO(1'i.5l>HWFLnWMSI.HWTEnP(l'il , MAST IDI 90 . 5 > . TRFACT 1 90 > i USFLOWI 90 ) i          *NEU
             WSTEf.P(,K2< 5001. Kl 1500 ».          (NEW
             HS'^ETISnO I ,nL(500) .V/HU(15).nFPHUI15).DLWW<15l .1(5001.               *NEW
             ROISOD)iPOni500I.CONSI^00.3liPriHEiTPRINT,OELXi                     «NEU
             •JHVTRS. MPEACH. NUASTF • NjUNC .OEtT . D1LT .OZLT .OTOOX2 .OT20DX.            *NEW
             LAT.LSM.l LH.ELEV.DeT.ftE.PE.nATnFT.rRTBLB.UETBLB.OEWPT,              (NEW
             STUPR.WINO.CLOUO.SONFr.NI.NJ.TRLCD.TOFD/ST.NT.NC.TlnE.NCS            *NEW
                           .iss
C                                                                         00002500
c                             INITIALIZE COUNTERS
C                                                                         00002700
      NHU=0                                                               00002BOO
      H'JS-0                                                               00008900
C                                                                         00003000
C                             LOOP THROUGH REACHES AND COHP. ELEMENTS
C                                                                         00003500
      00 100  I=I.NKEACH                                                   00003600
      NCFLR=NCELRHIII                                                     00003700
      CNCFLR=NCELR                                                        00003BOO
      CONClJ=OKI)/CNrELR»CONSI(I,MCI                                    00003900
      DO 10P  J=1,NCELP                                                    0000*000
      ioR=icLORnii.j)                                                     oooomoo
c
C                             INITIALIZE DIABONAL AND KNOWN TERNS
C
      BNSIJ«DTOVrl IIOR)
      IFL=IFLr.r,| I.J)                                                      00004200
C
C                             HOPIFY DIAGONAL AND/OR KNOUN TERNS
C
      FO Id  ( ICll .IJO.lOO.lOO.lOn.lOS.lO1*). IFL
c                                                                         oooomtoo
  in N(.w=tiiiki*i                                                           00001900
      si inri=si IOM-AI ICPKHWCONSCNHU.NC)
      PC TO  1PP                                                           00001100
c                                                                         oooo-s?on

-------
  iin HUS=NUSH                                                           oooosnoo
      S(IOR I=S  4-WSFLOW(NHSI*UScONS< NWS•NCI•OTOVCLI ION I
      GO TO 100                                                           00006700
c                                                                         00006800
  10« MUS=MHS»1                                                           OOOOT300
      B(IOR>=FHIOR)-WSFLOW
-------
SUBROUTINE DOS*

          Subroutine DOS completes the setup of the equations necessary
to calculate dissolved oxygen levels in each computational element.
Specifically, the subroutine completes the definition of the diagonal
term of the coefficient matrix and defines the vector of known terms
on the right hand side of the equations.

          The additions to the diagonal term represent the individual
constituent changes caused by constituent reactions and interactions,
and mass changes caused by stream withdrawals.  The resulting diagonal
term for each type of computational element is:
          TYPE                       DIAGONAL TERM
     All except type 7           b^  =  xj + (K.,^ At
     7.  Withdrawal              bj  =  xi + (K2)1 At - qo —-

where xn- is defined in Subroutine TRIMAT and the reaeration rate
reaeration constant, (K2).., is determined in Subroutine REAERC.

          The right hand side term contains all known inputs, which
include headwater inflows, wastewater discharges, tributary flows and
incremental runoff, and, in the case of dynamic simulation, the concentration
in the previous time step.  The known term for each type of element for
dynamic simulation is:

             *    i i  At              .          ,
     S.j  =  <(>i + q..  — + (a3y- - a,,p) A.At - a (K^j)- At
                       i
         - as(K8N2) At - K,Ax ^ + (K2CS). At - K^-At

and is corrected for headwater conditions or a waste input as follows:
*AII symbols used are defined at the end of this section of the
 Documentation Report.
                                 IV-12

-------
                                              (ENTRY      \
                                            SUBROUTINE DOS   J
                                            INITIALIZE
                                           COUNTERS MID
                                         CONVERSION FACTORS
                                                             HO computations
                                                             true, i to b for
                                                             ill computational
                                                             elements
                                          INITIALIZE KNOWN
                                         TERM AND DIAGONAL
                                       TEW FOR STEADY-STATE
                                       OR DYNAMIC SIMULATION


TYPE 1
COMPUTE S(I) ANDB(I)
AND ADD HEADWATER
INPUTS TO KNOW
TERN, S(I)




TYPES 2. 3. 5
CONTINUE



TYPE 4
ADD TRIBUTARY INFLOW
TO KNOWN TERM, S(I)



TYPE S
ADD WASTEWATER
INPUTS TO KNOWN
TERM. S(I)



TYPE 7
ADD INCREMENTAL INFLOW
TO KNOWN TERM, S(I). AND
SUBTRACT STREAM
WITHDRAWAL FROM DIAGONAL
TERM, B(I)


                                             (RETURN      \
                                             TO QUAL      /
FIGURE   E?-6
FLOW  CHART   FOR  SUBROUTINE  DOS

-------
          TlTLE(20i?Ot.RCHlD(75.S).RHTHOR(75) iRMTEORITSI ,NHWWAR(15) .
          TARr-nO(7''),IAUGOR<7Ii.6) tNrrLRH(7'i).IFLAG(75,20),
          ICLnRD(75i?0>iCOEFnv(7'i).FxPnOV(75l.CxPnQH(7fS),
          CFn[iNI7^).CKl<75).rK3(75)iK20PTI75)iCK2|75liCOEQK2(7'il.
          CXPQK2<7M.TINITI7*1.noINITI75).ROINITf75).COlNIT(75.3) t
          m<7S) , Til 7* > .001(75) , ROOK 751 .CONSI 175.3), JUNCIOllliSI t
          JlinCll>).HWTEHP(15)fHWDO .USROO<«SO>,WSCONS(90.3>,OATOT(15),
          ACiOOl ,dlbOO).C(50'M.O<5).S('iOO>.Z(50n».H(500).G(500) .
          FLOW(;,ml.OEPTH<500).VFL(I'On> .OTOVCL(500),K2(500).K1 (500),
          HSNETI*i)OI.OL(500).VHU(lS) iDHPHUUS) tOLHUf 15) • TI500I •
          nO(50U) ,ROO(500I.CPNS(500,3I.PTIHE,TPRINT,OELX,
          *IHWTRS.Nl>E*eH.NUASTE.NJUNC.OELT.01LT.D2I.T.nTODX2.0T200X.
          L/IT,LSM,LLH.ELEV,OAT.AE.BF.D»YOFT,DRYBLB,HETBLB,DEWPT.
          AThPR,UINOiClOUOfSONrT.NI.NJiTRLCOiTOFDAT(NTiNCiTinE,
          CN03II7-5I.COLIIT(7S).AL6IT(7'i».PHOSIT(75).CNH3IT(75l.
          CN02Ill7S).CM03IT(7S).USCOLI(90)tWSAL6(90I.USPHOSI90l.
          WSM<3I<)0),USN02(90),USN03I90I,HUCOLII1SI.HUALGI15I.
          HUPMOS(lS),HkNH3(l'i)iHUN02|lS|.HUN03(15ltGROWTH|500)<
          nODOPl(l(l|,IRCHNO(750l,CXCOEFI75)
 Cnpr>0!J/SSTATE/X(50n).ISS
 REAL Kl.k7.KU
 REAL Kt'Hj.Ktio?
 DATA LIPCO/4H RIO/
                                                                       00002300
10
.CUNvrRT HfTUEEN ULTIMATE BND 5-DAY  ROD BASED ON AN ASSUMED
.L«n DFCAY RATE OF 0.23/OAV  (RASF  E  I	URN	

 1F( TTTLF(7.b)  .CO. UROO > 60  TP 5(1
 Crnnu = l.o - EXHl -5.0*0.23 )
 Ivr»T = ()
 IVE°T = 1«ERT + 1
 IF! 'IhUTHS .LF. 0 I  GO TO 25
 DO 90 J = 1,  NHUTRS
 Hjimnij) = M.Ror,(ji  / CFBPP
 COMTIUUF
 IF( NWASTF .LE. 0 I  GO TO 35
 llll ^0 J = 1 ,  NUASTE
 WSBOPIJ) = usronij)  / cFgnn
 CONTINUE
 OO tb J = 1,  NRFACH
 n'PT(J) = rtOUTI-') / CFROO

-------
      WEIH = NCI I nil I J)
      Inj un K =  !• "CfLR
      I'IR = iCLPl-ni J.KI
      imoiioni = Honiiom  / rFiinn
   un crMTii»ur
      1F( ItfLlM  .GC. ?  ) KETUKN
      CCMPI. = l.n / CF30D
C                                                                         00002400
C                             INITIALIZE COUNTERS
C                                                                         00002900
      MHU=D                                                               00003000
      NviS=n                                                               00003100
      UliMC = l)                                                             OOOR3?00
      F«n = i.c /  (?6.s * aetno.oi
C                                                                         00003300
C                             LOOP  THROUGH REACHES AND COUP. ELEMENTS
C                                                                         00003800
      00 100 I=1.NKEACH                                                   00003900
      WEI R=KCEIRH(II                                                     00004000
      CNCTLR=MCELR                                                        OOOOW100
      OOIJ=BI(I)/CNCELH*OOI( I)                                            00004200
C     WOTIO=] .0/11 .0-fXP(-5.n»CKl | I) ) )                                    00004300
      01 TOO J=1.NCELP                                                    00004400
      IGR=ICLORP(I.J>                                                     00004500
r.
C                             INITIALIZE DIAGONAL AND KNOWN TERMS
r
      S|inRl=DOIIOR)
      IF (ISS.GT.l) SIIOR)=0.0
      IF (MCL>OPT(4).LT.1I GO  TO  90
      AREACT = 
   00 IF |MPDOPT|6I.LT.1| GO  TO  9?
      SCON) = SIIORI - (A1PHAS«KNH3(IORI*CNH3(IOR) +
     1                   ALPHA6*KN02IIOR)*CN02IIOR))*D1LT
   9? S(lnR) = SlIOR) - CK4(I)*DELX*DTOVCL(IORI*FACT
      TC=«.55f-*(TI IORI-6B.O)                                              00004600
C     Kl | TOR)=K1 (IORI»RATIO                                               00004700
      nnSAT=2t.f 9-0.«»a59«T(IORI+0.0037^t»T( IOR)«»?-0.n0001S28«T(IOR>**3  00004600
      IF (Do9**TC                                               00005800
      REACT=I>1 LT» I KO*COSAT-K1 1 IOR I »ROO( I OR » I
      S(IPH)=Sl IOR)+RFACT*nOIJ«nTOVCLIIOR)-AI IOR)*«UnO(NHW)
      Bl IPH)=» ( TnPI+D1LT*KO
      GO TO inn                                                           00006100
C                                                                         00006200
  10' KO=(0.b«(K?( IOR-1)+K?(IOR) I )»1.0159««TC                            00006700
      Pr«CT=t'lLT» (KO*rOSAT-Kl ( IOR ) *ROni IOR I )
      SI inR)=5:( lORl+REftCT+OOI J»DTO«CL( TOH)
      OP TO He                                                           00007000

-------
                                                                           OP007100
                                                                           nroo7t>ou
                                                                           00007700

      I IHK ,=ci t,.|i i f)r in* iimuti.'^rLot'iN'JS) •wsiniNws) ) «PTOVCLI IORI
      1 I •»•»!=» I i r»l lnllLT'KO
       T'i  IPii                                                              OOOdPOOD
                                                                           OP00810C
       ii- c=i.i""r< i                                                         onooneoo
                                                                           OPOOHTOO
                                                                           00008900
                                     »K?( I OR) 1 ) «1 . 0] >i9«*TC                00008900
      « Ari=i iLiKivn^osAT-Kii inpi »noai inp i »
    >  ( i' i i=«i ji" > + .HLT*KCI
    Ci'  Ti<  inu
                                                                           OP009300
ir^ U'js=i"isn                                                              00009800
    "Tli). '.»(•'?( irih>-i)tK2( TOKI I l»l.ni5''»»TC                             0000^900
    '<» »rr=r 11 i«inO*ncSAT-ni i inn) »non( IOR »
    «,! ioni=<:( inic ArT*nJTJ»nTnwcL( IOP)
    H( IP«i=X< K'K>+rjlLT*KO-KSn nU(NUS)>nTOVCL(IO»)
inn C')»TII IIF                                                              00010200
    IC(  111LM7tlil  . fo.  U1OH ) RFTIlTd
    r,.,  Td  IT                                                                       «NFU
    E ,<)                                                                   00010HOO

-------
          TYPE                  RIGHT HAND SIDE
     1.  Headwater            S..  =  S.. -

     6.  Waste Input          S-  =

For steady-state simulation, the only difference is that the value
from the previous time step, (jij, is set equal to zero.

          The subroutine flow chart is illustrated in Figure IV-6 and
is followed by the program listing.  All program variables contained
in COMMON are defined in Section V.
                                 IV-13

-------
SUBROUTINE FLOAUG

          Subroutine FLOAUG remains unchanged from the original version
of QUAL as documented by the Texas Water Development Board (2).  According
to reference (2):

               After steady-state conditions have been reached,
          FLOAUG checks the calculated dissolved oxygen
          concentration against the pre-speaified target levels
          for dissolved oxygen in each reach.  If the computed
          dissolved oxygen is below the target level, the routine
          then searches all of the upstream headwaters for those
          sources that the user has specified to have dilution
          water.  Dilution water is then added equally from all
          sources and calculations are repeated.   This sequence
          continues until all target levels are satisfied,
          whereupon a summary is written.

The flow chart for FLOAUG shown in Figure IV-7 is taken from reference
(2).  The proaram listing follows the figure.
                                   IV-14

-------
                           C  START  J
                            INITIALIZE
                           AUGMENTATION
                              FLOWS
                        DETERMINE LOCATION AND
                       MAGNITUDE OF MINIMUM D 0
                           FOR EACH REACH
                           rflHIMUM 0 0
                           FOR EACH REACH
                            BEEN CHECKED
                             AGAINST
                              ARGET
    JTES
                                                DIVIDE TOTAL AUGMENTATION^
                                                REQUIRED EQUALLY AMONG
                                               AVAILABLE HEADWATER SOURCES
                                               CHECK TO SEE THAT AN EXCESS
                                                 OF FLOW AUGMENTATION
                                                   HAS NOI BEEN USED
FIGURE  Iff-7
FLOW  CHART  FOR  SUBROUTINE  FLOAUG

-------
      SIPHPO'ITI'JF
r
r
r                             FLOAIIG SEARCHES  THROUGH THE SYSTEM BY
C                             RFACH TO DETERMINF  THE  MINIMUM 00 LEVEL
                              WITHIN EACH REACH.  EACH OF  THESE IINIMUM
                              DO ITVELS  IS CHECKED  AGAINST A SELECTED
                              TARGET LFVEL.  IF FLOW AUGMENTATION IS
                              RfOUIREPt  THIS FLOW IS  DISTRIBUTED
                              EOUALI.Y AMONG  THE HEADWATER SOURCES THAT
                              Apr AVAILABLE  TO A  GIVEN REACH.


      CONMr.il TITLri20.20l.HCHIOl75,5),RMTHOR(75),RHTEOP(75).NHUWAR(15).          «NEW
             TARGnO(75).IAUGOR(7S.6).NCELRH(75).IFLAG(75<20)i                    *NEW
             ICLORCH 7'5.?0> .COEFQVI75) .FXPOOV(75) .COEFQHI 751 .EXPOQHI 75) •          *NEW
             CMANNI75).CKH75) .CK3I75).K20PTI75)iCK2l75)•COEOK2I75).             «NEW
             EXPOK2I7?),TINIT(75).DOINIT(73>.BOINIT(73).COINIT|75.3).           *NEW
             OK7'b) ,TI(7S).DOI(7'i),BOni(7SI ,CONSI(75.3).JUNCIO(15.5).           (NEW
             JUNC(l*i,3).HWTRID|i5<5)iHWFLnW(15).HWTEMPI15) tHWDOUS).             *NEW
             Hk'flOO(15). HUCONS (1 •!. M . WAST 101 9015) i TRFACT190 ) . WSFLOW (90 ) .          *NEW
             VSTF.MP (IP ) . WSDO< 90 ) . USBOOf 90 ) • WSCONS (90.3). QATOT 115) •              *NEW
             A(500>,QC>nol,C(Soni.nt5).S(500).Z(500).W(500).G(SOO).             *NEW
             FLOwCinO).nEPTH(500)iVEL(DT200X.           »NEW
             LAT.LSM.LLM.ELEV.DAT.AE.BE.riAYOFY.ORYRLB.UETBLB.OEWPT.             *NEW
             ATl»PR. WIND, CLOUD. SONET. NI.NJ.TRLCO.TOFDAY. NT. NC.TIME.NCS           *NEW
C                                                                                »-16
r.
      OIMrNSlOri IOR"IM(75).RI>IILF(75).DOMIN(75).IORnERI75).QAUG(15)              *N£W
C                                                                                •*-!
C                                                                        00002900
C                                        STEP 1-0                         00003000
C                                        INITIALIZE  AUMEMTATION FLOWS    00003100
      DP 1 NHW=1,NHWTPS                                                  00003200
      OAUGIMMW1=0.0                                                      00003300
    •=, CONTIMJE                                                           00003400
C                                                                        00003500
C                                                                        00003600
(                                        STEP 2-0                         00003700
c                                        LOOP THROUGH  SYSTEM OF NREACH REOOOOSBOO
C                                        AND  NCELR COMPUTATIONAL ELEHENTS00003900
C                                        REACH  TO  HETERCINE MINIMUM 00 LE00004000
C                                        REACH  AND ITS LOCATION RY RIVER 00004100
r                                                                        00004200
      HO "=0 I=1.NRLACH                                                   00004300
      0(.MINI 11=100.0                                                     00004400
      IFU'HigUAH(I) .rn.U)  GO  TO 50                                        00004500
      NCEIK=NCELRH(I)                                                    00004600
      no ion j=i.NCELR                                                   00004700
      inR^ICLORDlItJ)                                                    00004SOO
      ir inn(to") .GF.ncmiMi)) pn TO 100                                00004900
             )=nnilliu                                                   00005000
                =IOrt                                                      00005100

-------
      X»iiv.=j                                                             0000K200
      rf-ii i (i )=»f'TnoR( n-y«iN»nFLY/5?BO.n                               oooo'isoo
  IP" cii'iTi-iuF                                                           onoo5"»oo
   "n Co"TlHur                                                           00005500
                                                                         00005600
r
r                                        STEP i-n                        oooosaoo
f                                        LOOP THROUGH NPEACH REACHES TO S00005900
f                                        MINIMUM 00 LEVEL IS BELOW TARGET00006000
C                                                                        00004100
      on y> i=i.tiRtACH                                                   00006200
      IF (MOMIm I) .GF.TARGD01 1) I  PO TO 25                               00006300
r                                                                        00006"»00
C                                        STFP 3-1                        00006500
c                                        IF TARGFT LEVEL is NOT MET. conpoooo660o
r                                        AMOUNT OF FLOW AUGMENTATION REOU00006TOO
                                                                         00006800
                                                                         00006900
      IOKr)E.R/NHWUAKU )                                               00008900
c                                                                        00009000
C                                        STEP 3-3                        00009100
C                                        CHECK TO SEE THAT AN EXCESS OF F00009200
T                                        AUGMENTATION HAS NOT BEEN USED. 00009300
c                                                                        00009*00
      IF i3RrOO.LT.OSUM)  GO TO '5                                       00009500
      NMUAR=NhWWARII)                                                    00009600
      DO 175 J=1.MHUAR                                                   00009700
      'jMUrlAUGO<«IiJ)                                                    00009800
      OAlir. (iiH'.'l=i)Ai)n                                                     00009900
  17* CONTINUE                                                           oooioooo
   ?* Cn'ITIIILiC                                                           00010100
      If (MnMIG.EJ.nl  GO TO 300                                        00010200
C                                                                        00010300
C                                        STEP t-n                        OOOlOtOO
c                                        WRITE SUMMARY OF FLOW AUG'MT. REOOOIOSOO
C                                                                        00010600
      UUITC  (NJ.200)                                                     00010700
  ?nn FnnrAT  (1Hl.ioxi39H» * * REACHES WITH OXYGEN DEFICIT • • » i //i 23X« 00010800
     *        "SPKHLACH  HO.     REACH inENTIFICATION       HINrHUM DO.i  00010900
     *        IbH     i
-------
                    TACu                                                   00011200
                                                                          00011300
                    )  j.7« FOf'IftT  (f>X,Ib.l'X.5AM.l6X.F10.1.2(lX.F10.1)                         00012300
  270 COHTT'lliE                                                            00012*00
      no 3Bn  NMW=1.MHWTRS                                                 00012SOO
      lUriOW(flHW)  = MWFLOW(NHW)  + QAUG(NHW)                              00012600
  ^flfl CO'ITIMUE                                                            00012700
      GO TO SI'I                                                           00012BOO
  Son CONTINlir                                                            00012900
C                                                                         00013000
C                                        STEP 5-0                         00013100
c                                        WRITE FINAL SUPMARY OF FLOW      00013200
C                                        AUGMENTATION REQUIREMENTS.       00013300
C                                                                         00013400
      MKITF (Nj,?61|                                                      00013900
  ?f.i FORMAT  uim.isx. »?HTOTAL  FLOW AUGMFNTATION REQUIRED.//,            oooissoo
     • 5x.iniiinrAnviATF.o NO.      MFADWATER IDENTIFICATION      INITIAL  HEOOOISTOO
     •A1UATFH FLOW (CFSl      AUG. REQUIRED (CFSI./I                      00013800
      DO *0*i  «IHH=1,MHWTPS                                                 00013900
      HJFI.PI=nATOT(MHUI                                                   OOOltOOO
      QATOT HW).HWFLOI                                      00014100
      INFLOW INHU)=HUFLOI                                                  00014200
      WHITE (NJ.7.751  NHW.(HWTRID(NHW.J).J=1.5).HWFLOU(NHU).QATOT(NHUI    00014300
  30^ CONTlnuE                                                            00014400
  110 CONTINUE                                                            00014500
      Rf.TURN                                                              00014600
      ENH                                                                 00014TOO

-------
SUBROUTINE HEATEX

          Subroutine HEATEX remains unchanged from the original  version
of QUAL as documented by the Texas Water Developm-nt Board (2).   According
to reference (2):

               fhis routine computes the net amount of heat
          radiation flux being transferred across the air-water
          interface.  It is based on an energy budget which
          considers solar radiation, atmospheric radiation, back
          radiation, conduction,  and evaporation.

Detailed equations for all of the heat budget terms are presented in
Report 128 of the Texas Water Development Board (1).

          The flow chart for Subroutine HEATEX shown in Figure IV-8 is
taken from reference (2).  The program listing follows the figure.
                                 IV-15

-------
                                                c
         START
                                                  COMPUTE
                                                  REQUIRED
                                                  CONSTANTS
                                          COMPUTE ALL TERMS REQUIREOV
                                          FOR EVALUATING THE VARIOUS
                                           FLUXES IN ENERGY BUDGET
                                           CALCULATE POSITION OF
                                              SUN RELATIVE TO
                                             A SELECTED LOCATION
                                           ON THE EARTH'S SURFACE
                                           CALCULATE  STANDARD TIMES
                                             AT WHICH SUN RISES
                                                  AND SETS
                                            CALCULATE VAPOR PRESSURESN
                                            DEW POINT. AND DAMPENING
                                            EFFECT DUE TO CLOUDINESS
                                                 CALCULATE
                                                 HOUR ANGLES
                                            CALCULATE AMOUNT  OF CLEARv
                                            SKV. SOLAR RADIATION. AND
                                                ALTITUDE OF SUN
                                           CALCULATE ABSORPTION AND
                                               SCATTERING DUE TO
                                            ATMOSPHERIC CONDITIONS
                                                 CALCULATE
                                                REFLECTIVITY
                                                 COEFFICIENT
                                              CALCULATE NET SOLAR
                                                RADIATION AFTER
                                            SCATTERING. ABSORPTION.
                                                AND REFLECTION
                                           COMPUTE OTHER HEAT  FLUXES^
                                             AND PERFORM ENERGV
                                           BUDGET FOR EACH ELEMENT
                                               f  RETURN  J
FIGURE  EZ--8
FLOW CHART  FOR  SUBROUTINE  HEATEX

-------
S I U"in| !Hf HE.ATFX
                         HFATEX COMPUTES THE NET AMOUNT  OF  HFAT
                         RADIATION FLUX BEING TRANSFERRED ACROSS
                         IMF AIR-WATER INTFRFACE BASEP ON AN
                         E"FRGY BUDGET tfHIcH CONSIDERS SOLAR
                         RA1IATIOM. ITHOSPHEMIC RADIATION.  BACK
                         HAOIATION, CONDUCTION, AND EVAPORATION.
       TITI.r,NHUWAP(15) ,
       TAPr,DU(7").IAUGOR(75.6l,NCrL'»H<75I.IFLAGI75.aOI.
       ICI OKI) | T>, PO) .COE.FOVI75) .EXPPQV(75) .COEFQH(7S) ,EXPOOH(75) i
       rwfMij(7"),rKl(7'i).rK3l71j).K2nPT|75),CK8(75).COFQK?(75l,
       F>f'3K2(7I'I.TTNIT<7'5|.DnlNITI75).BOINITI75).COIMIM75.3l.
       OTI75) .TK?1;) .001(7^1 ,BOnl(7S) .CONSII75.3I ,JUNCID(15,5) .
       Jljr.rCl
       MSTFMPI90),WSDO(90I,WSROD(90).WSCOMS(90,3).OATOTI15I,
       A (".on >, HI Slit) ,C<50P> .PCS) .5(500) .2(501) ,U<50n) .6(500).
       runjonn) .OEPTHibooi •vFL(5on)«OTOvrL(5oo) .Kacson) .Kiisno).
       llSr|FT(Enn).'}LISOOI.VHU(15)lDEPHyilS).DLHU(15).TI5aOI,
       "OCSUill .Boni^Oni.CPNSCiOn.SI.PTIHE.TPRINT.OELlf,
       •|HWTRS.NPEACH.NWASTE,NJUNC.nELTl01LT,n2LT.DTODX2.DTKODX.
       L9T,Lb1,LLf<,rLEV.n(iT,AF.,PE.nnYOFTf,nRTPLR.UETBLB.DEUPT,
       ATKPR,WIND.CLOUn.SnNCT.NI.NJ.TRLCO.TOFOAY.NT.MC.TIME.NcS
UrAI
Cnr,?=l'I/l».n.O«LAT
                                   STEP 1-0
                                   COMPUTE REQUIRED CONSTANTS
rrwf.=1J>.o/PI
PEl TM =(Ll«-LS"()/l«i.O
SOLrOtl=13P.O
Fl FXP=FXP(-ELF«/253?.OI
IF (TnFI'AY.ML.n.OI  GO TO 77
                                 00002600
                                 00002700
                                 00002800
                                 00002900
                                 00003000
                                 00003100
                                 00003200
                                 00003300
                                 00003400
                                 00003500
                                 00003600
                                 00003700
                                 00003800
                                 00003900
                                 00004000
                                 00004100
STEP 2-0                         00004200
COMPUTE ALL TFRNis REQUIRED FOH  00004300
EVALUATING THE VARIOUS  FLUXES IN00004400
FMFRGY BUDGET                    00004500
                                 00004600
                                 00004700
                                 00004800
STEP ?-1                         00004900
COMPUTE SEASONAL AND  DAILY POSIT00005000
<5HN RELATIVE TO A SELECTED LOCATQ0005100
THE EARTH'S SURFACE.             00005700
                                 00009300
                                 00005400
                                         • NEW
                                         *NEU
                                         »NEU
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • -16

-------
      Orri IN=r()Nu«COSICnNl«(l7a.n-DAYOFYM                               00005500
      Kl'si t'AkTh»2                                                       00005600
            = n.P.101?l-J.l?3iq»SlNtCON1*(OAYOFT-l .0)-0.070l'M            000(15700
             -O.J6b'»<'*SIMt?.n*cr>ril»                                                 00005900
      AC*=TANICI)»l,»l*TAMI)ECLnNI                                          00006000
      IF (ACS.Cll.n.O) GO TO  «                                            00006100
      X=SRRTI l.n-ACS.'CS)                                                00006200
      vzK/AfS                                                            00006100
      ArS = ATAMX)                                                        00006100
      ir (nccLiii.Gr.n.ui ACS=PI-ACS                                      ooooesoo
      Go TO y                                                            00006600
    P At'5=PI/?.n                                                         00006700
    q CONTINUE                                                           00006800
c                                                                        00006900
f                                        STEP  2-2                         00007000
r                                        COMPUTE STANDARD TINES AT WHICH 00007100
C                                        RISES AND SETS.                 00007200
C                                                                        00007300
      STR=l?.n-rONft.ACS*DELTSL                                           00007HOO
      Srs=21.n-STR*?.n*DELTSL                                            00007500
      ST1=0.n                                                            00007600
      STE=STB*02LT                                                       00007700
      GO TO 76                                                           00007600
   77 SrH=STR+02LT                                                       00007900
      STE=ST('*D2LT                                                       00008000
   78 CONTINUE                                                           00008100
C                                                                        00008200
C                                        STEP  2-3                         00008300
C                                        READ  IN LOCAL CLINATALOGICAL OAT00008400
C                                        AT  DESIRED TIME INTERVAL (tllNIMUOOOOBSOO
f                                        INTERVAL  IS THREE HOURS).       00008600
(.                                                                        00008700
      IF (TRLCD.NE.n.O) GO TO «?                                         00008800
      Rfah 12. CLOun.nRYBLBtWETpLB.ATHPRtUIND                           00008900
      WINn=wiND»l. 1S1                                                     00009100
c                                                                         00009200
C                                        STEP 2-«                         00009300
C                                        COMPUTE VAPOR PRESSURES! DEW POI00009«00
T                                        DAMPENING EFFECT OF CLOUDINESS.  00009900
C                                                                         00009600
      VPUR=n.l001»LXP|0.03*WETni R)-0.n837                                00009700
      VrEI-O.Oa0367»ATMPR*lORYBLB-WCTBLP)                          00009800
     »     »(1 .0+i                         onoutoo

-------
   TF=.n-UFLT3L
u\ CONTINUE
   TI\I T=(T
                                     COMPUTE  HOUR  ANGLES             OOOll'iOO
                                                                      00011600
                                                                      0001)700
                                                                      000 11 BOO
                                                                      00011*00
                                                                      00012000
                                                                      00012100
                                                                      00012200
                                                                      00012300
                                                                      D0012100
                                                                      00012500
                                                                      oooia&oo
                                                                      00012700
                                     STEP  Z-f.                        00012BOO
                                     COMPUTE  AHT OF CLEAR SKY. SOLAR D0012900
                                     RADIATION,  AND ALTITUDE OF SUN. 00013000
                                                                      00013100
                                                BI + CnN6*COS-SIM(CON5*TB»>                     00013300
   Ai PMA=«iIN(rilM?l«SintOErLIN) + COSfCON:>l«COS
 e. AL"HA=-PI/2.0
 •i coNTiuur
   IF (ALPHA. LI. 0. 01) 60 TO JS
                                                                       00013100
                                                                       00013SOO
                                                                       00013600
                                                                       00013700
                                                                       00013800
                                                                       00013900
                                                                       0001HOOO
                                                                       0001"»100
                                                                       00011200
                                                                       00011300
                                                                       oooii»oo
                                                                       0001*300
                                                                       0001H600
                                      STEP 2-7                         00011700
                                      COMPUTE ABSORPTION  AND  SCATTERIN00014BOO
                                      DUE TO ATMOSPHERIC  CONDITIONS.   00011900
                                                                       00015000
   PUC=0.006lH*LXPI0.01B9«UEUPTI                                      00015100
   (>aM=ELLXP/««l-l.?53M           00015200
   A1=FXP(-(n.16'i*n.OilOB«PWC)*(n.l29+n.l71«EXP(-O.B80»OAHII«OAM)      00015300
   A?=FXPI-(0.ii6';*0.ni»Ofl»PWCI«

-------
f                                        STEP 2-1                        00017500
C                                        COMPUTE NET SOLAR RADIATION AFTEOC017600
C                                        SCATTERING. ABSORPTION, AND REFL00017700
C                                                                        00017800
      SONFT=SOLAR*flTC»CS«tl.n-NS)                                        00017900
      OP TO 16                                                           oooiaooo
   ** SONFTrn.O                                                          00018100
   *(, CONTIMUE                                                           00018200
      CLC=I .n+o.i7tCLruin**2                                              OOOIBSOO
C                                                                        00018400
C                                        STEP 3-0                        00018500
C                                        COMPUTE OTHER HEAT FLUXES AND PE00018600
f                                        ENERGY  BUDGET FOR EACH COMPUTATI00018700
C                                        ELEMENT.                        00018800
c                                                                        00018900
      HA=n.*2.89E-06*fnRrRLR+l»60.0l**6*CLC*D2LT              00019000
      HO 70 1=1.NPEACH                                                   00019100
      NrELR=MCELKH(I)                                                    00019200
      00 70 J=1,MCELR                                                    00019300
      IOR=ICLnRP(I,j)                                                    00019*00
      VPW=n. 1 noi*EXP(O.P3*T| IOR»-0.0837                                00014500
      HI3=P.<>7*1.73E-09*fT(IOR)-f
-------
SUBROUTINE HYDRAU

          Subroutine HYDRAU remains unchanged from the original version
of QUAL as documented by the Texas Water Development Board (2).  According
to reference (2):

               This routine performs a hydrologic balance for a
          branching stream or canal system based on continuity of
          flow.  It then computes velocities, volumes, and
          dispersion coefficients for every computational element
          in the system.

The flow chart for Subroutine HYDRAU shown in Figure IV-9 is taken from
reference (2).  The program listing follows the figure.
                                   IV-16

-------
FIGURE EZ--9
FLOW CHART FOR SUBROUTINE  HYDRAU

-------
sii ii ni TII r
                        HYOPAU PERFORMS  A  HYOROLORIC  BALANCE ON
                        TMf SYSTEM BASER ON  CONTINUITY.  IT
                        CONPUTFS  THF FLOb, VELOCITY,  VOLUME.
                        OEPTH, AND DISPERSION  COEFFICIENT  FOR
                        EVFRY ELEMENT  IN THE SYSTE1.

C'1»»ON TITLri?0«20l ,KCHIO|75,5>,RMTHOP(75) .RMTEOR ( 75 I .NHUUAR < 15 I t
                I ,IAUGOR(7S.fi).NCELRH(7'j) .IFLA6175.20)i
                .?OI .COtFnV(75).EXPOQV(75) .COEF8H(75) .EXPOQHI75).
       CMANN(7S).rKlf7Ii),rK3l75)iK20PTI75)iCK2l7Ii),COEaK2(75).
       FXPQK2I75),TINITI75>iOOINIT(7?),BOINIT(75).COINITI75.3).
       01(751 ,T1 (75) .001(7-1 ),ROOI< 75) .CONSI (75.3). JUNCIDI 15.51.
       Jljnciis,^) ,HWTRIU(15.5).HWFLOW(15),HWTEHP(15) .HWOOI15).
       MWPOOI15).HWCONS(15i3).UASTini10.5)iTRFACT(90),USFLOU(90).
       WSTFriP(in),uSOO(9U).WSROD(90>.WSCONS(90<3liOATOTllS)<
       Ac-.nm .mbon) ,cison>.n(5).S("500) ,zisnoi.wi500i,G(500).
       FLOWIri
C'lC^I n=IICELP
Qi>=nl( ll/CNCELR
On inn J=I.MCF;LR
lOHzICLORtK I.J)
IhL=IFLA(;( I.J)
                                00002500
STEP 1-0                        00002600
INITIALIZE COUNTERS FOR HEADWATE00002700
WASTE INPUTS OR WITHORAULS. AND OOOOZBOO
JUNCTIONS.                      00002900
                                00003000
                                00003100
                                00003200
                                00003300
                                00003100
STEP 2-0                        00003500
LOOP THROUGH SYSTEM OF NREACH REOOOOSSOO
AND NCCLR COMPUTATIONAL ELCMENTS00003700
REACH.                          00003800
                                00003900
                                00001000
                                00001100
                                00001200
                                00001300
                                00001100
                                00001500
                                00001600
r,[i TO (101.102il02il03.10?.10l,10«),  IFL
                                 00001700
                                 00001BOO
STEP 2-1                         00001900
TOKPUTE HYDRAULICS FOR AN ELEMEN00005000
TYPE 1.                          00005100
                                 00005200
                                 00005300
                                 00005100

-------
                        )«HUFLUUIMHUI**EXPOOV( n                          onoossoo
      I'I >M'l=??.<;«riiflNN(i i«vnmMHW)»oEPHU(NHWi*«o.m3                 00005700
      *FLOU(ICDX/IHUFL(H'INHW)/VHUINHW)+FLOW< IORI/VELI IOP) I       00005900
      Gi< in IP*5                                                           00006000
r                                                                         oooo6ton
C                                        STEP 2-2                         00006200
f                                        COPPUTE HYDRAULICS FOR ELEMENTS 00006300
C                                        3.3. OR S.                       00006400
r                                                                         00006500
  in' Fl 11,1 'OK)=FLOu(IUR-I I+OR                                           00006600
      \/FLI IORI=C nFFQVI II«FLOW( I OR I **FXPOOV( 11                            00006700
      OTOvri < l(iP)=(lT3PUy/(FLOWIinR-ll/VEL(IOR-l)4-FLOW(IOR)/VEL(IOR) )     00006ROO
      RH TO IPS                                                           00006900
t                                                                         00007000
C                                        STEP 2-3                         00007100
C                                        COMPUTE HTRRAULICS FOR AN  ELFMENQ0007200
C                                        TYPE t.                          00007300
C                                                                         00007400
  in* IJIIM(=IJIJMC-»L                                                       00007500
      NS=1                                                                00007600
      'Jl =.IUMC( UllNCiMS)                                                   00007700
      Fl.O'/llx/IFLQW(IOR-l)/VEL(IOR-l)+Fl.OUIIOR)/VEL(IOR)«-     OOOOAOOO
     •             unvcjiD/vrLCJMM                                       oooosioo
      Gn 10 lOb                                                           00006200
r                                                                         00008300
C                                        STEP 2-4                         OOOOB400
C                                        COMPUTE HYDRAULICS FOR CLEMENTS 00008500
T                                        6 OR 7.                          00008600
C                                                                         00008700
  let H:«S=NWS«1                                                           00008800
      FlOlU IOR)=rLOw(IOR-l)+wSFLOW(NUS)+OR                               00008900
      Vri.(iriK)=rOEFOV(II*FLOU(IOR>**EXPOOVIII                            00009000
      nrnvci|IOP|=UT2fD»/(FLOU(IOR-l»/VELIIOR-I|»FLOWlIOR)/VEL
-------
SUBROUTINE INDATA

          Subroutine INDATA reads'and prints all data required by the
model except the cllmatological data which is read in Subroutine
HEATEX and/or ALGAES.  INDATA reads a set of title cards and 11
different types of data that are prepared on 19 different data forms.
Seven of the data forms are optional depending on the parameters to
be simulated.  Chapter V contains additional details concerning data
preparation, descriptions of data forms and an example data set.  If
INDATA detects any data inconsistencies, it prints an error message
and terminates execution.

          Figure IV-10 illustrates the flow chart for INDATA and the
following pages contain the program listing.  All program variables
in COMMON are defined in Section V.
                                  IV-17

-------
            lUMATIHIl ]ST.lRPTl.I«Ur,nn,T1«X,NCELLSl
                         TMIS SUPPOUTINE  RraPs IN ALL DATA
                         RFQUIREP FOR  THE OPERATION OF THE
                         nnnr.L tvcrfi  THF CLIH«TOLOGIC*L
                         OtTA FOR TEMPERATURE  SIMULATION.
r.f -T-'lii TITLf (?n,an).RCHIU(75.SI,RMTMOKfT5>.RMTEOP<7'il .NHUUAR I 15 I i
       TAIi'.Hur 7C l.inUGOMTS.M .MCf LRH(75),IFLAG<75,20> ,
       If! IIIJI 7'5,?0)iCOEF(JVI7'S),EXPPOVI71)),COEFOH(75l ,EXPnQHI75),
                   K) (7S1 .CK^(7'i)if90PT(75) .CK2I75) . COEOK2I75I ,
                '_) ,TINIT(7St,nOIMrT(75) .HOINITI7S) .COINITI 75.31 •
       01 (751 .TK7SI .noil T .HUTRHH1S.5! .HUFLnUll'il.HHTENPdS) .HWDOM51 .
       "wni'DC 151 .1'WCONS<1'5.1) .HAST in (90, 5 1 iTRFACT(90) .WSFLOUI9Q) ,
FLOWI'jPOI
                     .C<50PI.O(5I.S
       SMKK7SI ,hf:H3/bOO).KNO?(500!.RESPRP(5nOI .COLII500).
       TOI IR I 7tCOLIIT(7';).ALGIT(75)iPHOSITI75)iCMH3IT(75l .
       rt.PPITtT^I.CnOSITITS) .WSCOLK90) ,tfSALG<9n),USPHOS{90l.
       l.Sf'HJ 190). W5M09 I .HWN02RAONI|7!i)
                                                        iUSRAON|90)
                y<50fl).ISS
• NEW
• igEU
*NEU
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• MEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• -89

• NEW
• •-1
                                                                             • NEW
Rl ftl  Kl .K?.LHT.LLI*.LSMf JU'TID
OATf f nr.T/uilEMOT/  ,  EKD»/"l'FNnA/  .  YF.S/1H YF"iTAN.UMfVAP.'lHELEV/
                i!i>,niiO PN.UHN co,nn/>ir,  , UHM HA.MHLIGH/
                                    STEP  i-n
                                                                     00003300
                                                                     00003400
                                                                     00005900
                                                                     0000*500

-------
              r                                        INITIALISE CEKTMN PAHAHFTHS   1)000*600
              r                                                                        OOOOJTOO
                    in. inrn ]=i,i-*i\
               innr [,'rt.r.ot I i=n
                          I1                                                            OOOOJBOO
                          I.                                                            00003900
                           =u                                                          oooo«ooo
                    ISS=n
                    LiJ=0.0                                                            00004100
                    Lf=i<.Ii                                                            00001200
                    LSn=p.c                                                            00004300
                    PAYnFY=0.r                                                         00004400
                    AE=n.n                                                             00004500
                    l-F=0.0                                                             00004600
                    ELFwrn.o                                                           00004700
                    [)AT=0.0                                                            00004BOO
                    NEPP(1U=U                                                           00004SOO
                    Tnr=o.n                                                           oooosooo
                    TPPU.T = 0.n                                                         OOOOS100
                    TUFPAY=0.0                                                         00005200
                    T-(LCr=().0                                                          00005300
                    CKL=0.n
                    Ni=s                                                               00005400
                    "J=f                                                               00005500
    I    i      c                                                                        00005900
JT)  f,   f    c                                        STFP 2*0                        00006000
              C                                        READ IN TITLES                  00006100
              C                                                                        00006200
                    DO 3P 1=1. If.
                    FLAP INI. ill (TTTLEiJ=li20>                                   00006400
                    F
-------
 I7?n r'i"TiMiif
f                                        STEP 2-?
T                                        SFT NCS INUNBFR  OF  CONSFRVATIVE
r                                        CONSTITUENTS
C
      Mrs=n
      IFO.pfiOPTM )  ,LT.  1)  60 TP 1730
      f!CS = I
      IF(TlTLt(U,3)  ,FQ.  YES) NCS=2
      lF|TITLFl*t3)  .F(J.  YES) NfS=3
 17jn CtlNTINUF
C                                                                         00008300
C                                        STEP 3-0                         00008400
C                                        RFAD IN ALL DATA REQUIRED FOR OP00008500
C                                        OF THE MODELS.                   00008600
C                                                                         00008700
C                                        STEP 3-1                         00008800
C                                        READ IN DATA TYPE 1  IHOOEL CONTR00008900
C                                                                         00009000
      1'ATA=l
      IF^OPDPTISI  .ST.  0)  IOATA=1
      NC"DS=1S
      DO an i=i.NCnrs
      REAM (Nl.?l)  (nATA(I,K),K=i,l6)                                    00009200
   f\ Fni>"AT  (6«".«1 .FlO.n.lnx.fcftt.Al.Flfl.O                             00009300
      IF ITATAII.I)-ENOA)20i25,?n                                        00009400
   ?n CONTINUE.                                                            00009500
      NERPPR=1                                                            00009600
   ?1 I=I+1                                                               00009700
      HLdn (Ml,?])  |OATA(I.K)iK=l<16)                                    00009800
      IF (nATMI.l)-rl»L)Al?4.;>9,?4                                        00009900
      WRITF  |IIJ,22) H                                                     00010100
   99 FOKMAT  PTI = i                                                           ononaoo
      Gt< TO U.                                                            00011900
    7 lailKPP =  1                                                          00017000
      !•'• T M                                                            00012100

-------
FORM(7)OF(J9)
WATER RESOURCES ENGINEERS,  INC./TEXAS WATER DEVELOPMENT BOARD
               STREAM QUALITY ROUTING MODEL
                          QUAL-II
                       TITLE  DATA
\Simulote ?/
CARD TYPE \Write Yes/
\0r No/
"
T
T
T
T
T
T
T
T
T
T
T
T
T
f
T
E
-
'34.
TLE
TLE
TLE
TLE
TLE
TLE
TLE
TLE
TLE
TLE
TLE
TLE
TLE
TLE
TLE
NOT 1




• '

0
0
0
0
0
0
0
0
0

T
-


1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
LE










-




.v
#











NO
_

-
,
-



-











--
"
-- --








- - -




-

	





-
- — ; 	 '







-



ALPHANUMERIC NAME
J I - 
-------
FORM
)OF(I91
WATER RESOURCES ENGINEERS, INC./TEXAS WATER DEVELOPMENT BOARD
               STREAM QUALITY ROUTING MODEL
                         QUAL-II
              PROGRAM ANALYSIS CONTROL  DATA
*
*
*
*
CARD TYPE
(TYPE 1 DATA)

L
W
N
S
N
N
J
M
L
1
E
E


1 ST
R 1 TE
0 FL
TEAD
UMBE
UM 0
IME
AX 1 M
ATI T
TAND
VAP .
LEV .
NDAT


D

0
Y
R
F
S
u
u
•
ATA
F I NA
W AU
STA
0 F
HEA
TEP
M R0
DE 0
A|RD M
IC0EF
A
0F B
.
1 NPUT
L SUM
GMENT
TE
REACH
DWA'TE
( H0UR
LITE T
F BAS
ER 1 D 1
. , ( AE
AS IN


MARY
AT 1 0N

ES
RS
S)
IME (
1 N ( D
AN ( 0



s
3
HRS) =
EG) =
EG) =
> ;
(FEETJ)
' ' 1 ~
PARAMETER
VALUE





-L *
-- — -


-



«•>
	 	

-










-







.












NUMBElR 0F
NUMBE
LNTH
Tl ME
L0NG 1
DAY 0
EVAP.
DUST

R 0F
C0MP
INC
TUDE




J UNCT
WASTE
ELE
F0R R
0F BA
F YEAR STA
C0EF. , ( BE
ATTENlUAT 1 0






1 0NS
L0AD
MENT
PT2 (
SIN (
RT T 1
)
N C0E





s
S
(Ml ) =
HRS) =
DEC) =
ME
3
F .

PARAMETER
VALUE














i 	 . — : — — — 	 1















FORMAT (6A4, Al, F10.0,  10X, 6A4, Al,  FIO.O)
NOTE 1-   These cards may be deleted if temperature is not simulated.
                                 NON-SPACIALLY VARIABLE  A, N. and P CONSTANTS  (SEE NOTE 2)

0 UPT
0! PR0
N C0N
AL_G M
N, HAL
L,l GHT
ENDAT
1

A
D
T
A
F
A

CARD TYPE
(TYPE 1A DATA)
KE B
. BY
ENT
X SP
SAT
HALF
1 A
Y NH3
ALGA
0F AL
EC GR
URAT 1
S~AT

0X 1 D
E ( MG
GAE (
OWTH
ON CO
CONST

(MG 0
0/MG
MG N/
RATE(
NST.
( LNGL
/MG N
A)
MG A)
1 /DAY
(MG/L
Y/M 1 N

) =
S
S
) =
) =
>-•
PARAMETER
VALUE


_














0 UP
0 UP
P C0
ALGA
P HA
TOT A

TAKE
TAKE
NTENT
E RES
LF SA
L DA 1

BY N0
BY AL
0F A
PI RAT
2 0X1
GAE (
LGAE
1 ON R
TURATJI ON C
LY RAJDIATI


D( MG
MG 0/
( MG P
ATE (
ONST .
ON( LA

0/MG/N)
MG A)
/MG A)
1 /DAY)
(MG/ L)
NGLEYS )



S
3
S
B
e
s

PARAMETER
VALUE








FORMAT (8A4, F?.0, 2X,  8A4, F7.0)                                                                           ,          ,      .
HOTS 2:  These cards (except ENDATAW may be deleted unless ALGAE,  (HH3, N02,  N03), P04, Coliforms or  adionuclides are to be simulated.

-------
FORM I
)OF (19)
MATER RESOURCES ENGINEERS,  INC./TEXAS WATER DEVELOPMENT BOARD
               STREAM QUALITY ROUTING MODEL
                          QUAL-il
    REACH  IDENTIFICATION AND RIVER MILE DATA
CARD TYPE
{ TYPE 2 DATA)
1
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
E
1
? 3 • 1 c
TREAh
TREAM
TREAM
TREAh
TREAM
TREAM
TREAh
TREAh
TREAM
TREAM
TREAh
TREAkf
TREAk/
TREAh
TREAh
T R E A h
TREAh
TREAIV
TREAh
TREAh
TREAh
TREAh
TREAh
TREAH
TRE AA
NDAT/
1 J 3 1
ft * 1C HP IJ n «
REA
REA
REA
REA
1 REA
1 REA
1 REA
1 REA
REA
REA
REA
REA
REA
REA
REA
REA
1 REA
t REA
1 REA
1 REA
II REA
t REA
1 REA
t REA
1 REA
k 2 ~ "
CH
CH
CH
CH
CH
CH
CH
CH
CH
CH
CH
CH
CH
CH
CH
CH
CH
CH
CH
CH
CH
CH
CH
CH
CH

REACH IDENTIFICATION
ORDER
le i 1" 1« *.-
,
,


.
.

.
m
.

.


<




.
.

.
•
.

ALPHANUMERIC NAME
1 •»! i. j "r * 'J.i - - <
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH-
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH«
RCH =
RCH =
RCH =
RCH =




	 	










-




-

















-






















- - -









' -7 - „ - *» i
FR
FR
FR
FR
FR
FR
FR
FR
FR
FR
FR
FR
FR
FR
FR
FR
FR
F'R
FR
FR
FR
FR
FR
FR
FR

0M
0M
0M
0M
0M
0M
0M
0M
0M
0M
0M
0M
0M
0M
0M
0M
0M
0M
0M
0M
0M
0M
0M
0M
0M

RIVER MILE
AT
HEAD OF REACH
. - j - . - < a




























.
t
.
.
.
.
.

.




	 —
<




.
f



1 11 1. — / •» '
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T

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

RIVER MILE
AT
HEAD OF REACH
i "


























i II 1 . i II . . jj . „ . ., _ - . . -1 r » i. -• . 1. . -J •
, -» — 1 c f

.
.
,
.
.
.
.
.
.
.





.
.
m
,
.


m


J - * > ••"
      ia en unmodified QUAL-1 form (See form  B of E)
FORMAT (3A4, 3X, Fi.O,  SA4, 3X, A4, 3X, F10.0, 4X, A2, 4X,  F10.0)

-------
 FORM
©
OF
MATER RESOURCES  ENGINEERS, INC./TEXAS MATER DEVELOPMENT BOARD
                STREAM QUALITY ROUTING MODEL
                          QUAL-II
              FLOW AUGMENTATION DATA

F L 0!W,
FLOW
FL.0W
FL0W
FL0W
FL0W
F L0W
FL0.W
F L 0,W
FL0W
FL0W
FL0W
FL0W
FL0W
FL0W
FL0W
FL0W
F L0W
FL0.W
FL0!W
F L0W
FL0W
FL0W
FLOW
FLOW
ENDAT

A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
CARD TYPE
(TYPE 3 DATA)
U.GMT
UGMiT
UGMT
UGMT
UGMT
UGMT
UG'MT
UG'MT
UGMT
UGMT
UGMT
UGMT
UGMT
UGMT
UGMT
UGMT
UGMT
UGMT
UGMT
UGMT
UGMT
UGMT
UGMT
UGMT
UGMT
3
:s|0!uR
:S'0:U R
,s:0UR
S0UR
S0UR
S0UR
S0UR
S 0 i


























(






.
.


'-
• . .
.
.
.
.


.
.
.



ORDER OF AVAILABLE AUGMENTATION SOURCES
1*1
1 j .
' ' !
• '.


.
,




.
( •

.

.



'

.



2Qd
!
.
. 1







.

•
1




.



.
.
.

314
.

.




: .
.




1

.








.

4lt
.
t
•



.
-
'


.
• , i
i i


.







.
.

5

1










1
'






|





in
.






,
i
.
.
.
1 '
i •
i

.
.
.
:
1





61H
i 1
:
• ;

.

i i ;-
, i i
' i I
i : -



:
1 !
1

.

i !

,

.
.
.

*Thia IB art unmodified QUAL-1 form (See form B of E)
FORMAT (SA4,  SX, FS.O, SX, PS.O,  F10.0, 6FS.O)
These cards (except ENDATA3) may be deleted if floa augmentation IB not used.

-------
FORM
)OF(I9]
WATER RESOURCES ENGINEERS, INC./TEXAS MATER DEVELOPMENT BOARD
               STREAM QUALITY  ROUTING MODEL
                         QUAL-II
    COMPUTATIONAL ELEMENT  FLAG FIELD DATA
CARD TYPE
(TYPE 4 DATA)
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
E
L'AIG
LA.G
LAG
LAG
LAG
LAG
LAG
L'A.G
LAG,
LAG
LAG
LAG
LAG'
LAG'
LAG
LAG
LAG
LAG
LAG
LAG
LAG
LAG
LAG
LAG
LAG
NDAT
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
A
I.ELD
1 ,E'L D
1 E,LD
1 ELD
1 ELD
1 ELD
1 ELD
1 ELD
1 ELD
1 ELD
1 ELD
1 ELD
1 ELD
1 ELD
IELD
1 ELD
1 ELD
1 ELD
1 ELD
1 ELD
1 ELD
1 ELD
1 ELD
1 ELD
1 ELD
4
R'CJH =
RC'H,«
RC'H =
RCH =
RCH =
RCH =
R.C H.=
RCH =
RCH =
RCH =
RCH =
RCH =
R.CH =
RCH =
RCH =
RCH =
RCH =
RCH:
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =

ORDER
OF
REACH
1 i ,
1
I

.

i
' I




1






.
.


.



;





J
1
,

















NumOf
Compi
Elements
•









.




.


.



.

.


!

























;

























COMPUTATIONAL ELEMENT FLAGS
1 2 34 5 6 78 9 10 II 12 13 14 15 16 17 18 19 20
I I
.





. .
.
.


[



t t


.

.

. .


• '
1 ,
•



.
. !




'
• ' !
. , I .
.
.

.
.

.




••' M
, i •
. i
!.i



• . ,
i
,-!



: i
I
i

.



: 1


.


1 | .
. ' ; .
..I •



,

• * * • i •


.
•
• i i •
*

.
.

.
.



.

. i
> i
; i ' .
i '



• 1 1
,.; i.'
LI



i
' i
i i '.
i.! '.,



•
•
i .
.










.,

1 (
; i




1

i i
! ! • !-




! 1


•! i-
1 ! i ' '
1 i ' ' j
.

.
i , .
..,.''.
.•

• i
.


.


1 •
r 1 !



| ' 1 . , ' 1
1 • i . ' .
. ' .i .'

*

t
;-! ,-i •

!•' !-l - -
i
.

.-'.'! i- •
1 1 i
-; !.' .i .
.

• • •
.

*Thia  is on unmodified QUAL-1  form (See form B)
FORMAT (2A4, A2,  SX, PS.O, SX,  F5.0,  10X,  ZOfZ.O)

-------
 FORM
)OF(I9]
WATER RESOURCES ENGINEERS,  INC./TEXAS WATER DEVELOPMENT BOARD
               STREAM QUALITY ROUTING MODEL
                          QUAL-II
                 HYOROLOGIC  DATA
CARD TYPE
(TYPE 5 DATA)
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
r
YiDlR'A
YjDiR A
Y D.R.A
YDRA
YDRA
YDRA
YJDJR A
Y'DiR.A
YDJRA
YDRA
YDRA
YDRA
YDRiA
YD.RA
YDRA
YDRA
YDRA
YDRA
YDlRA
YDlRA
YD!RA
YDRA
YDRA
YDRA
YDRA
NDAT
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
A
L;l!C;s
LillC'S
L I|CS
LICS
L 1 CS
L 1 CS
LUiCS
LillCS
L' iC'S
L CS
L CS
L CS
L C.S
L CS
L CS
L CS
L CS
L CS
L CS
L, CS
L. cs
L CS
L CS
L CS
L CS
5
I'RidH =
:R'ClH =
R'C'H =
RCH =
RCH =
RCH =
R|C'H,=
RJClHi =
RiCiH =
RCH =
RCH =
RCH =
R.CH =
RICH -
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
;RCH =
RCH =
RCH =
RCH =
RCH =

ORDER
OF
REACH
' : ,-i
' : '.•
>.
.

.
i

• i.1
.


1 '.,

.



'
,


.
.




1




,
i ;
I'M


-
•
•
,












• '
, :



( '
, ,
,



1













COEFFICIENT
OF FLOW FOR
VELOCITY
i ,
i •
! , 1



,
I ;
i '



l •
!
1 ;











.' ;

.
.

.
. l
.. ;



.
j
' ' *
1
, ,
.
.



.


.


EXPONENT
OF FLOW FOR
VELOCITY

I
1 '




,




i t 1

I





,






1 '

t
t
.
. 1
.{




i ! . '
, 1
. l
.
f

.

• t


.
.

COEFFICIENT
OF FLOW
FOR DEPTH
i
• i
i •



, '
< i
. l '



: . I !
. ,
, |



,
! i
i *








.

.
t





i
• i
' .' i '
1 m




.. i
,
l




EXPONENT
OF FLOW
FOR DEPTH
, . i

' i i :
i
i



• i
, 1
! l






: i 1
i t



! : i



•











i •
— i—
.
r"

i


i




, !
i.: I


'_ , '





.1











•
1 ; ;
1 • l '
'•i :




f
,

MANNING'S
"n"


i





;




,
,









!







— r~

! I
i
i






.





-r




,

i
i



,,





.



.

i


i

• _ i ,
i
i
i


J-i




.







•

.•
i

i


] m


1 t



•



,
i ;
t

      ia on unmodified QUAL-1  form  (See form C)
FORMAT (2A4, AS, SX, FS.O,  10X,  SF10.0)

-------
FORM
WATER RESOURCES ENGINEERS, INC./TEXAS WATER DEVELOPMENT BOARD
               STREAM QUALITY ROUTING MODEL
                         QUAL-II                    ~
   BOD AND DO REACTION  RATE  CONSTANTS DATA
CARD TYPE
(TYPE 6 DATA)
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
E
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
EACT
NDAT
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
1X6
RC.H*
RC'H =
RC'H =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =

ORDER
OF
REACH

1






t
t




.



§

m





DEOXYGENATION
COEFFICIENT
(I/DAY)



























.



g

.





t
t




t
.




-" ?- -a ?» jc
BOD REMOVAL
DUE TO SETTLING
(I/DAY)

























Jl 3' 33 J-i 3
1 |—
m





.









.

.





- r 39 & v
OPTION FOR
DETERMINATION
OFK2
, i
i





•




,













1 , .
,
i
.

.
,
,



.






.



.

.

REAERATION
COEFFICIENT
(I/DAY)

t
1























.
.










.






.
.





COEFFICIENT
OF FLOW
FOR K2




























•



.











.

.

.





























-, -,
EXPONENT
OF FLOW
FOR K2
t »j ™ 9 '• d*»

_.-- 	 '_. ..i —

•








| 1
'




•
-
.


.


 'This is an unmodified QUAL-1  form  (See form C)
 FORMAT (2A4,  A2, SX, FS.O,  6F10.0)

-------
FORM
©
OF(I91
WATER RESOURCES ENGINEERS,  INC./TEXAS WATER DEVELOPMEfx iOARD
               STREW QUALITY ROUTING MODEL
                          QUAL-II                      ~
  ALGAE.NITROGEN  AND PHOSPHOROUS  CONSTANTS
CARD TYPE
(TYPE 6 A DATA)
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
E

LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
LGAE
NDAT
t
t
t
,
-
t
,
*
,

t
,

i
•-
,
§
-
f
,
-
A
-
N A
N A
N A
N A
N A
N A
N A
N A
N A
N A
N A
N A
N A
N A
N A
N A
N A
N A
N A
N A
N A
N A
N A
N A
N A
6A
ND 'P
ND P
ND P
ND P
ND P
ND P
ND P
ND P
ND P
ND P
ND P
ND P
ND P
ND P
ND P
ND P
ND P
ND P
NO P
ND P
ND P
ND P
ND P
ND P
ND P

C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF

RC
RC

H =
H*
RCH-
RC
H =
RCH*
RC'H =
RC!H'=
RC
H>
RCH =
RCH =
RCH =
RCH =
RCH =
RC
H' =
RCH =
RCH =
RC
H =
RCH =
RCH =
RCH =
RCH =
RCH =
RC
H =
RCH =
RC
H =

ORDER
OF
REACH
t




,


.



.
.



.




	






















—

—
—
CHLOR A TO
ALGAE RATIO
x/G/MG



























.
.


.

.






.






.

.


Algae Settling
Rote
(FT/ Day)
•
•
1









1
•














.



.

.

.


\ . •









.


Ran
NH


























» Coef For
3 Oxidation
I/Day)
1
.

.


.
.
.


.
.

.




.


.







-









-




Rate Coef For
NH2 Oxidation
(I/Day)



























.
.






.
.


.
.



.



.



Benthos Source
Rate For NH3
MG/FT/Day)



















-

-


.
.-



.

.



,



.




.
.



i.i.i .1 ., . • < . • j - « a ., .1 i- ' •> i
Benthos Source
Rate For P04
MG/FT/Day)
i • i
.
i . •

.

•

i : .-'


.
1
: . 1.
• i

.
.
.

.
.
.



\ '• t.
'FORMAT (SA-i, Si, FS.'l,  2X,  JFB.O)
T'^si: aai\h  (except SSDATA6AI ma, oo tieletcd M! ton ALGAS,  (*H3. f '2, NOi),  PQ4,  Conforms or tka Radion'toiides are to :s  siirulalel.

-------
                                              WATER RESOURCES ENGINEERS,  INC./TEXAS WATER DEVELOPMENT BOARD
                                                              STREAM QUALITY ROUTING MODEL
                                                                         QUAL-II
FORM (9JOF(\9)
OTHER CONSTANTS*
CARD TYPE
(TYPE 6B DATA)
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
E

THER
THER
THER
THER
THER
T.HER
TH'E-R
T H'E R
THER
THER
THER
THER
THER
THER
THER
THER
THER
THER
THER
THER
THER
THER
THER
THER
NDAT

























A
C.0IEJF
C0IF1F
C0'E'F
C0EF
C0EF
C0EF
C|0'E F
C,0E!F
C0.E.F
C0EF
C0EF
C0EF
C,0 E.F
C|0,EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
C0EF
68
Fl.lC
F'ljC
F 1 C
F 1 C
F 1 C
F 1 C
F IjC

HE
I'E
1 E
1 E
1 E
1 E
F 1 CJl'iE
Fll'C
F 1 C
F 1 C
F 1 C
FU'C
Fl C
FH C
F 1 C
F 1 C
F 1 C
Fl C
F 1 C
Fl C
F 1 C
Fl C
Fl C
F 1 C

I,E
1 E
1 E
1 E
I'E
I'E
I'E
1 E
1 E
1 E
1 E
1 E
1 E
1 E
1 E
1 E
1 E

NiTJSl ,
N;T.S! •
N'TS
NTS
NTS
NTS
NT'S.
NTS! ;
NT,S>
NTS
NTS
NTS
N.T'S1 !
NT'Si
N'TlS!
NTS
NTS
NTS
NTS
NTS
NTS;
NTS
NTS
NTS
NTS

R'C.H!=
>RCHi =
RCH =
RCH =
RCH =
RCH =
|RCH,=
iRJC H>
,R!CHi=
RCH =
RCH =
RCH =
iR|CH; =
;RIC;H.=
:R:CH:=
RCH =
RCH =
RCH =
RCH =
RC'H =
RCH =
RCH =
RCH =
RCH =
RCH =

ORDER
OF
REACH
t t
i i




•
,
i



1

1







.





i
•









i
i
,












Benthos Source
Rote For BOD
(MG/ Ft/Day)
i
i
1 '




,

•




•
I











i
, ' , i.





*
1 '
.

.
1 t i ;
. ( '.



.




.

'

COL (FORM
DECAY RATE
(I/Day)


i '




> i
, i


. i





i
I :
1





•





•1 u
1
' 1
. ]
.


1
i
.1 !



1
• i



i i





,

.
.

., ,. „



LIGHT
EXTINCTION
"fflff"




,



'
























W
! '
; |
I

.


i



1






•


i
1

•
i , :•






.




.
.
.
.



























RAD 10-
NUCLIDE
DECAY RATE
'."i"."
• > •




1
! i
i : ;



i , .
i •
1






i





i

!.! '




• • '
!.i !


•
! i •
1 ' ,
( t



1

'


.
.











































1



j ,
	
















! • _



—i—





!



1
!
: 1







t
1











! i
1 i
1 '
, i



1 • ! i
, i
1 i

,
;
i i
,
1 ; -
i


i , ( • i
: • • !
•
'




'FORMAT (SA4, SX, F5.0, 2X, 6F8.0)
These cards  (except ESDATA6B) may be deleted unless ALGAE,  (NH3,  N02,  1103),  P04, California or Rodionuclides ore  to be  simulated.

-------
FORM  (10)OF |
MATER RESOURCES ENGINEERS, INC./TEXAS  WATER DEVELOPMENT BOARD
               STREAM QUALITY ROUTING MODEL
                          QUAL-II
               INITIAL CONDITIONS DATA
























-
E
I

N T
N T
N T.
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
NDAT

A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
CARD TYPE
(TYPE 7 DATA)
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L CO
L C0
L C0
L C0
L C0
L C0
7
N'D i IT
NDI T
NDI'T
NDI T
NO 1 T
NO 1 T
NDI T
ND 1 T
NDI T
NDI T
ND 1 T
ND 1 T
ND 1 T
ND 1 T
ND 1 T
ND 1 T
ND 1 T
NDI T
ND 1 T
NDI T
ND 1 T
ND 1 T
ND 1 T
ND 1 T
ND 1 T

0N'S
0'NS
0NS!
0NS
0NS
0NS
0N;S
0N.S
0NS!
0NS
0NS
0NS
0NS
0NS
0NS
0NS
0NS
0NS
0|NS
0NS
0NS
0NS
0NS
0NS
0NS

RCH =
RCH =
RCH*
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =

ORDER
OF
REACH













.





.






TEMPERATURE
(°n

.

























(
.



.


.



1












DO
( MG/L)
1 t
.
.





. ,
.


, .












.1 -2 1,1 4. ,
BOD
(MG/L)
•

.




1
i 1.
'



1












-e «- t' a S3
CONSERVATIVE
MINERAL I
MG/L
• i
i i
1



i
i




1







• .




ii - « a* ss


, 1
.









i




'
.




.
i j7 SJ ^ 0
CONSERVATIVE
MINERAL H
MG/L
i






,






:



.






61 &' eJ 6* tl
• i

'
.
.
.
i .
, 1
1 I.'



i;-!
, l '.!
1 i '
. ••




.



.
.
6e 67 61 t* -0
CONSERVATIVE
MINERAL nr
MG/L


1









I






(





71 ••
1 1 '
1 > , 1.
! ! i.
1 •_


.
1
i '
i
• i i •

'
' .
-i--U---
1 I
1 ! i
': il -


.
* •
• i •
' i
i •



.
3 -1 -\ t 77 79 7» M
*Thia ia on unmodified QUAL-1 form (See form C)
FORMAT (SA4,  SX, FS.O, F10.0, 2FS.O,  3F10.0)

-------
FORM
) OF (191
             WATER RESOURCES ENGINEERS, INC./TEXAS WATER DEVELOPMENT BOARD
                            STREAM QUALITY ROUTING MODEL
                                      QUAL-II
INITIAL  CONDITIONS  FOR  ALGAE.N. P.  COLIFORMS.AND RADIONUCLIDES
CARD TYPE
(TYPC 7A DATA)

























E
1
N; T'
N T
N T
N T
N T
N T
N T'
N1 T
N ,T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
N T
NDAT
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
ft
A
A
L C0
L CO
L ;C0
L CO
L C0
L C0
LI C0
L !C0
L' C0
L C0
L C0
L C0
L C,0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
L C0
7A
N'D|-!2
ND'-'2
ND'-2
ND-2
ND- 2
ND-2
ND-2
ND-2
ND-2
ND-2
ND-2
ND -2
ND-2
ND-,2
N.D-2
ND- 2
ND- 2
ND-2
ND-2
ND-2
ND-2
ND-2
ND-2
ND -2
ND-2





-

















-
—
We H =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
R,CH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH'=
RCH =
RCH =
RCH*
RCH =
RCH =
RCH =
RCH *
RCH =
RCH =
RCH =

ORDER
OF
REACH


-
























.



i
1
1



.


.


.

.
t




CHLOR A
>
-------
FORM
I OF (19)
WATER RESOURCES ENGINEERS,  INC./TEXAS WATER DEVELOPMENT BOARD
               STREAM QUALITY ROUTING MODEL
                          QUAL-II
              INCREMENTAL RUNOFF DATA*
CARD TYPE
(TYPE 8 DATA)
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
E
UN0F
UNOF
UN0F
UN0F
UNOF
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UNOF
UN0F
UNOF
UN0F
NDAT
F
F
F
F
F
F
F
p
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
A
,C0N
ICON
C0'N
C0N
C0N
C0N
C0N
C0!N
Ci0N
C0N
C0N
C0N
C0N
C0N
C0N
C0N
C0N
C0N
C0N
C0N
C0N
C0N
CON
C0N
C0N
8
Dl T, 0
D 1 T 0
Dl T 0
Dl T 0
Dl T 0
D 1 T 0
01 T 0
D 1 T 0
Dl T 0
Dl T 0
D IT 0
D 1 T 0
DIT 0
Dl T 0
DIT 0
DIT 0
DIT 0
DIT 0
DIT 0
DIT 0
DIT 0
DIT 0
DIT 0
DIT 0
DIT 0

NS
NS
NS
NS
NS
NS
NS
NS ;
N;S
NS
NS
NS
NS .
NS
NS
NS
NS
NS
NS
NS
NS
NS
NS
NS
NS

RCH =
RCH =
RCH<=
RCH =
RCH =
RCH =
RCH =
R'CH =
R,CH =
RCH =
RCH =
RCH =
'RCH =
RCH =
RCH =
RCH =
RC H =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =
RCH =

ORDER
OF
REACH


.




.










.







Incre-
mental
(cV°§,
•






.
.





.









.
jl ' JJ 3J
TEMP
CF)













p
.



.

.


.

U I' V J« *
DO
(MG/L)

•





.




• •
[ t i
.



.







BOD
(MG/L)

.





.





J
.
t


.




.
.

CONSERVATIVE
MINERAL I
(MG/L)


•





*



:
i
,











•
•
.









(
,
.

.

.

.





CONSERVATIVE
MINERAL I
(MG/L)


























i

! t
i i




1 i
• i • .
i i
i ••;

.

. : i.
' 1 i


, I


.
.
,
..



.

CONSERVATIVE
MINERAL HI
(MG/L)








1



-













I •
I I
..



.
I t '
I ' • >
' • ' ! ,
.


: i i !.
: ' 1 j.
i , i l i
. ,.!,.'

.
.
1 •'
, .
, !•:


.


'This is an unmodified QUAL-1 foim (See fovn D)
FORMAT (SA4, SX, SPS.O, 3F10.0)

-------
FORM
I OF I
                   MATER RESOURCES ENGINEERS,  INC./TEXAS WATER DEVELOPMENT BOARD
                                  STREAM QUALITY ROUTING MODEL
                                            QUAL-II
INCREMENTAL RUNOFF  DATA FOR ALGAE, N, P, COLIFORMS, AND RADIONUCLIDES*

R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
E

UNI0F
UN0F
UN'OF
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN'0F
UN0F
UN0F
UN0F
UN0F
UN0F
UN0F
NDAT
CARD TYPE
(TYPE 8A DATA)
F
F
j
r
r
r
F
j
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
A
C!0'N
C0N
C'0'N
C0N
C0N
C0N
C0N
C'0'N
C0N
C0N
C0N
C0N
C0.N
C0N
C0N
C0N
C0N
C0N
C0N
C0N
C0N
C0N
C0N
C0N
C0N
8A
D!-'2J
Dl-'2|
0',-'2'
0-2
0-2
0-2
D-2;
Di-2i
D|-|2I
D-2
D-2
D-2
D-2
D'-2.
D!-2
D-2
D-2
D-2
D-2
D-2
D-2
D-2
D-2
D-2
D-2



























R'C H' =
R|C,H|=
R'CH' =
RCH =
RCH =
RCH =
RCH =
R|C:H *
RCH =
RCH =
RCH =
RCH =
RjC H »
RCH'=
RCH =
RCH =
RCH =
RCH =
RCH =
RC H =
RCH =
RCH -
RCH =
RCH =
RCH =

ORDER
OF
REACH



























1 .





; '.
; .
.


1
(

.
.


.


.


.

CHLOR. A
UG/L)



-













-







;
. i











. •













i




.




.
. ,

.
t

.

.





NH3 AS N
(MG/L)
































. ,

.


.
' • i 1
. . 1
,





.
.
t

.

N02 AS N
(MG/L)
• i
i




!
I
•




1
•











.. 1
I
, f
1




• i 1
1 '



•: !
i 1
-. 1





.
.
.
.

.

N03AS N
(MG/L)












,
i












1 '
1 . i
1 i
t


.
• 1
. '
.

.
1
• i
.

.


.




.



























P04 ASN
(MG/L)

• ,





1


















l
J




. i

.


.
.
.
.
.


.

.

.

.

COLIFORMS
(MPN)



























• • * •
•
t


'"

, i
.


•' i!!-
1 ; '• i.
; •



f
.
'

,

.

RADIO-
NUCLIDE
. ' ' .1
1 ' t
,-i

.

1 ;
:
1.

1

i
!
1 • : .!



I >
'
< i .
i

1.

.

'FORMAT  (3A4,  A2, SX, FS.O,  7F8.0)
These cards (except EHDATA8A) may be deleted if none of the parameters shown are to be simulated.

-------
FORM  (l4)OFfl9J
WATER RESOURCES ENGINEERS, INC./TEXAS WATER DEVELOPMENT BOARD
               STREAM QUALITY  ROUTING MODEL
                          QUAL-II        -
               STREAM JUNCTION DATA
CARD TYPE
(TYPE 9 DATA)
STREA
STREA
STREA
STREA
STREA
ENDAT
| I
I ; '
i ! '



i : i
1
1



< i i
i i
! 1
i i



M
M
M
M
M
A


















J,UN
J'UN
J'U'N
JUN
JUN
9
! i ;
i ' i
| { >



i i :
; i
;



< . ,
, »
! ' '



CT!l!»N
ClT!l!0N
CTiliflN
CT 1 0N
CT 1 0N

i ! i
51
I-
•


i 1 :
1 ! '
i •




I '
! ' '
| ,




i
i i '
t



' : : !
i
i : i


i
i i
i ,
!
i i '



i
, 1
I l



ORDER
OF
JUNCTION

.

.
•



! ' i '


i ! i
I .
t i





i ' 1
; i ,
1



i 1 T
I |
1 (
1 1 '
1 •









•




, i
i i
i

!
;



1
;
• • •
: :



. .
i i ,
• '




JUNCTION IDENTIFICATION
JNC =
JNC*
JNC' =
J NC =
JNC =

i : ;
: i . '
1 1 ! .


i
1 | j

,



i •
:
•



,





, i
, i

! i :



•
(




,
,
, •




,






, ! >
1

i
i






i 1

1




'
i





	 1
,
r51-









'
|
1




1







I l
! ! :
1 -



1
!
1







: ,
I
1



i .
, |
1 i












]








*





No Of
Element
Upstream
Of -June.
	 i 	
i I
.

.

I'M
1 i i '
i 1 i 1



1 ' ! ;
i ! '
, '



, ; i i
• ,
: ' i










! |

i
;




!





i :


i




i
! ;
!
<



No Of
Element
Downstrm
O? June.



( .


.









I
1
1 '
1




; |
i ' •




i f '
; '
1 . ;


M
6'
M
69 "0

















I
1










71
72





'























1
1
,





1





•

71
7t
-I
No.0f
Element
On
Tributary

(
.
i


' i •'
.
.





:









•
•
,
1

1 •
; '











i
















I


76
71 78 " 63



*37it8 ia on unmodified QUAL-1 form (See form D)
FOSMAT (3A4, A3, SX, F5.0, SX, SA4,  3(SX, PS. 0)

-------
FORM (I5)OF(
                               WATER RESOURCES ENGINEERS, INC./TEXAS WATER DEVELOPMENT BOARD
                                              STREAM QUALITY ROUTING MODEL
                                                        QUAL-II
                                              HEADWATER  SOURCES  DATA*
CARD TYPE
(TYPE
HEADW
HEADW
HEADW
HEADW
HEADW
ENDAT
A
A
A
A
A
A
10 DATA)
TER
TER
TER
TER
TER
1 0






HEADWATER IDENTIFICATION
ORDER
.
.


.

ALPHANUMERIC NAME
HWD =
HWD =
HWD =
HWD =
HWD =



















HEADWATER
FLOW
(CFS)






§
.
.

.

TEMP
(F)
p

.

.

DO
(MG/L)


.
.


BOD
(MG/U


.
.
.

CONS
MINERAL
I (MG/U
,



.

CONS
MINERAL
IHMG/L)





^TT-
.
.


.
J -. 73
CONS
MINERAL
m(MG/U

.
.
.
-

*This  is an unmodified QUAL-1  form (Sea form D)
FORMAT (2A4, A2,  SX, FS.O, SA4, P10.0, 6FS.O)
FORM
I OF I
HEADWATER SOURCES DATA FOR ALGAE. N, P, COLIFORMS.  AND  RADIONUCLIDES *
CARD TYPE
(TYPE IOA DATA)
H
H
H
H
H
E
1
EADW
EADW
EADW
EADW
EADW
NDAT
1 1 J 3
A
A
A
A
A
A
>
TER-
TER-
TER-
TER-
TER-
1 OA
2
2
2
2
2





HWD =
HWD =
HWD =
HWD =
HWD =

Order
Of Head-
water






.





CHLOR. A
UG/L)












.



.

NH3 AS N
(MG/L)






.



.

N02 AS N
(MG/L)
1






.


.

N03ASN
(MG/L)







.

.
.





-
P04 ASP
(MG/L)






.

.
.
.

COLIFORMS
(MPN)






.
.
.
.


0 11 1 Ic 1 lu 1- -. ' ' i -V 'n J» J J- J ' ' J t. JJ -- -- » -« i,' 1 ^- 33 * * « * *> *- J "6 * £9 t' *' "
RADIO-
NUCLIOE
: ' '

, .

.
!•
-• - s -' i ;i e:
'FORMAT (3A4, AZ,  SX, FS.O, 7F8.0)
These cords  (except SNDATA10A) may be deleted if none of the parameters shorn are to be simulated.

-------
FORM
IOF(I9J
MATER RESOURCES ENGINEERS. INC./TEXAS WATER DEVELOPMENT BOARD
               STREAM QUALITY ROUTING MODEL
                         QUAL-II
       WASTE  LOADINGS AND  WITHDRAWALS DATA*
CARD TYPE
(TYPE II DATA)
1 - 3 1 5
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
WASTE
ENDAT
*
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
A
• 4 9 III
0AD
0.AO
0AD
0AD
0AD
0AD
0AD
0AD
0AD
0AD
0AD
0AD
0AD
0AD
0AD
0AD
0AD
0AD
0AD
0A'D|
0AD
0AD
0AD
0AD
0AD
1 1
WASTELOAD OR WITHDRAWAL IDENTIFICATION
ORDER
II 1 13 1* li

.




.

.



.
.
.

.


.
.

.
.


ALPHANUMERIC NAME
I" IS 19 J 71 - j t j i ii j iJ .
WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL -
WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL*
WSL =
WSL =
WSL =
If • '-I)














































































PERCENT
TREAT-
MENT
V - I » -
m





.


.

.
.
.
.








.
.

WASTELOAD OR
WITHDRAWAL
(CFS)
-1 1> - 41 * «•> *S J« V}

























i -O « i.



.

.

.



.

.
.
.




.




. g t
TEMP
l°F)
31 i >1 ti j
t

.
.
.
.

.
.





.
.




.




i j i* i.
DO
(MG/L)
s » it J it
t


,
.
,

.



.


.





.


.

1 >
BOD
(MG/L)
f- M t
.






.

.




.


.


.





CONS
MINERAL
I (MG/L)
Oi b OS f)


t
.
.




.

.

f
.




t




.

CONS
MINERAL
n (MG/L)
I


























t * j



.
.

t


,


,

,




t
,



.

CONS
MINERAL
ID (MG/L)
7t " • " eO
•.'


4
,
t
m
t
m
,


.
t
, .
.



t


.
.


*This is an unmodified QUAL-1 form.
FOWM21  (2A4, A2,  FS.O, 5A4, FS.O,  F10.0, 6FS.O)

-------
 FORM (18) OF (19J
            WATER RESOURCES ENGINEERS, INC./TEXAS WATER DEVELOPMENT BOARD
                           STREAM QUALITY ROUTING MODEL
                                     QUAL-II
WASTELOAD  DATA FOR ALGAE, N, P. COLIFORMS. AND RADIONUCLIDES*

w
w
w
w
w
w
w
w
w
w
w
w
w
w
w
w
w
w
w
w
w
yv
w
w
w
-

ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
ASTE
NDAT
CARD TYPE
(TYPE IIA DATA)
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L

L
L
L
L
L
L
L
L

A
0AD-
0AD-
0AD-
0AD-
0AD-
0AD-
0AD-
0AD-
0AD-
0AD-
0AD-
0AJD-
0AD-
0AD-
0AD-
0AD-
0AD-
0AD-
0AD-
0AD-
0AD-
0AD-
0AD-
CIAD-
0AD-
1 1 A *
2 <
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2













-







WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL =
WSL*
WSL =
WSL =
WSL =
WSL =
WSL =
WSL °
WSL =
WSL =
WSL =
WSL =
WSL =

Order Of
Waste-
Load



-











-








t






.
.







•
.


•





CHLOR. A
UG/L)




-










-

-

































.





.
.



.






.


.

• —
NH3 AS N
(MG/L)



























.
t



.
.
.







.

.
.



.


N02 AS N
(MG/L)




-






















<




.
. t




.
m
t
.
.
.
.


.
.
.


N03AS N
(MG/L)

























„ aj
1


.




.-
.

^
.




.

.
.
.





























P04 AS N
(MG/L)








i




















t



•











,
.



.

COLIFORMS
(MPN)



.
















t

t



RADIO-
NUCLIDE


, •



, .

. i i .. i



i •
> .;
'

, • i i
1 ••!

.


•
.

.



'FORMAT  (3A4,  A2,  SX, FS.O,  7F8.0)
These coeds (except EtlDATAllA) may be deleted
            if none of the parameter a shown ore  to be simulated.

-------
FORM  (19)OF(191
WATER RESOURCES ENGINEERS, INC./TEXAS WATER DEVELOPMENT BOARD
               STREAM QUALITY ROUTING  MODEL
                          QUAL-II
              LOCAL CLIMATOLOGICAL  DATA
CARD TYPE
(TYPE 12 DATA)
1
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
? j « j
0CAL
0CAL
0CAL
0CAL
0C AL
0CAL
0CAL
0CAL
0CAL
0CAL
0C'A,L
0C.AL
0CAL
0CAL
0CAL
0C AL
0CAL
0C AL
0CAL
0C.AL
0CAL
0CAL
OC AL
0CAL
b
























7 n » 10 II '< 13 U IS Ift 17
CL 1 M
CL IM
CL 1 M
CL IM
CL 1 M
CL 1 M
CL 1 M
CL IM
CL 1 M
CL 1 M
CL LM
C'L 1 M
CL I'M
CL 1 M
CL 1 M
CL 1 M
CL 1 M
CL 1 M
CL 1 M
CL.IM
CL IM
CL 1 M
CL 1 M
CL 1 M
AT'0,L'0
AT0L0
A T.0 L 0
AT0L0
AT0L0
AT0L0
AT.0L0
AT 0 L 0
AT0L0
AT0L0
AT.0L0
A'T 0 L 0
AT'0 L 0
A T 0 L 0
AT0L0
AT0L0
AT0L0
AT0L0
AT.0L0
AT0.L0
AT 0 L 0
AT0L0
AT0L0
AT0L0
GY
GY
GY
GY
GY
GY
GY
GY
GY
GY
GY
G,Y
GY
GY
GY
GY
GY
GY
GY
GY
GY
GY
GY
GY
MONTH, DAY
AND YEAR
15 !« » •! ' M 71 '}
-
-
-
-
-
-
-
.-
-
-
-
-
• -
-
-
-
-
-
-
-
-
-
-
IB 13 70
-
-
-
-
-
-
-
• -
-
-
, -
-
-;
-
-
-
.
-
-
-
-
-
-
-
HOUR
OF
DAY
it * ** 7< TO
300
600
900
1 200
1 500
1 800
2 1 00
2400
300
600
9 010
1 200
1 500
1 800
2 1 00
2400
300
600
900
1 200
1 500
1 800
2 1 00
2400
NET SOLAR
RADIATION
(LANGLEYS/HR)
it p n j a v 3- 3e r> *-
'









'
1
,





'






.




.



, ;
!
• •
.

•








CLOUDINESS
41 I"1 11 M IS 4ft 4- V
i '






'



1
'
















.


.

'
1
1 '







.



DRY BULB
TEMP
(°F)
19 50 11 H » *4 41 **










•

1







,













:
i
ii
(
1





1






.
.


•


.

.











WET BULB
TEMP
(°F)
5  1 ""
























.
.

.
.
.



.
'
i i '•! ;
: i ;•! !





i
i i ,
1 . |



WIND SPEED
KNOTS
•i ' i i. -- i ;» H

i.l •


.
.
1. '
i !
t
•
• ! ! !-i
•! U.i
! 'i-
i
1


.
; ! ' i i-
: i • ]- !
! i 1



*Must be chronologically ordered.       FORMAT  (SOX, F10.0,  SF(B.O))
Net solar radiation is not required if temperate ie simulated.
Only net solar radiation is required for algae simulation.

-------
3
           5.TRFAM
                                 NCH= 9F4CH 6
r\
\
V ;
C   i
                                                                10.0
                                                                  .n
                                                                             TO
                                                                               20.0
                                                                                 .0
            !.*» I'ATA  TYPC  •  (TAHl.FT  LEVFL HP AND Fl OW AUGMENTATION SOURCFS) SSS
                                  o.
                                        AVAII  MOWS TARGET
                                            n.         .0
                                                                   ORDER OF AVAIL SOURCES
                                                                o.   o.   o.   o.   o.   o.
           S«« DATA TYPE  t  {COMPUTATIONAL  PEACH FLAG FIELD! SSS
          CARPI TYPE
          fLAG FIEL"
          FLAS FIELD
          FLAG FIELII
          FL«S FIELP
          FLAK FlfLR
          FL AG FIELD
          ENDATAU
                            (TACK  ELEMENTS/REACH
                       1 .
                       ?.
                       3.
                            0.
                           20.
                           11.
                           1?.
                           IS.
                           If.
                           20.
                            0.
           COMPUTATIONAL FLAGS
I 1.2.2.2.7.2.2.2.2.2.2.2.2.2.2.2.2.2.2.3.
 ?.2.?.2.7.6.2.2.2.7.2.2.2.3.*•****•***•*
 1.?.?.?.7.2.2.2.2.2.2.2.•»»»••»•*»*»«***
 2.2.2.2.'.2.2.2.2.2.2.2.2.2.2.**********
 1.2.?.?.?.2.2.2.2.2.2.2.2.2.2.2.»»**»*«•
 2.2.2.2.?.2.2.2.2.2.2.2.2.2.7.2.2.2.2.5.
 •••I************************************
           $*S DATA TYPE S  (HYDRAULIC  COEFFICIENTS FOR DETERMINING VELOCITY AND DEPTH) SSS

                                              COEFOV    EXPPOV    COEFOH    EXPOOH     CNANN
                                               .120      .100      .350      .600      .039
                                               .170      .400      .350      .600      .035
                                               .360      .400      .300      .600      .000
                                               .360      .400      .300      .600      .000
                                               .360      .400      .250      .600      .035
                                               .4RO      .400      .250      .600      .035
                                               .000      .000      .000      .000      .000

           Itt DATA TYPE 6  (KE.ACTION COEFFICIENTS  FOR  DEOXYGENATION AND REAERATION) SSS
CAMP TYPE
I.YHRAULICS
HYDRAULICS
HYDRAULICS
HYDRAULICS
HYDRAULICS
HYDRAULICS
EMOATA5
REACH
1 .
2.
1.
4.
•i.
6.
n.
CARD TYPE
RFACT COEF
RFACT CoEF
RFOCT CoEF
Rt ArT COEF
Rl ACT COEF
REACT COEF
LNDATA6
PEACH
i.
?.
3.
u.
5.
fi.
P.
Kl
.60
.^0
.f.u
.t~o
.fiO
.60
.no
K3
.00
.00
.00
.00
.00
.no
.00
K20PT
3.
X.
3.
3.
1.
3.
0.
K2
.00
.00
.00
.00
.00
.00
.00
COEOK2
.000
.000
.000
.000
.000
.000
.000
EXPOK2
.000
.000
.000
.000
.000
.000
.000
           lit DATA TYPE 6A  (ALGAf. NITKOGEN,  ANp  PHOSPHOROUS CONSTANTS)  «$S
     CAR" TYPE
     ALr.AEi t> AND P CPFF
     ALGAEt N 'VMH P COEF
              AMD
                                     REACH   ALPHAO    ALGSET   CKNH3
                                                                        CKN02
                                                                                 SNH3
                  P COEF
                  P COEF
                  P CflEF
     ALR«E, N A»n P COFF
     ENDATA6A
ALfidE.  t.
M.GAEi  t> AND
       N AnO
1.
?.
3.
1.
5.
6.
0.
50.0
50.0
50.0
50.0
50-0
50.0
.0
.50
.SU
.50
.50
.SO
.50
.00
.15
.IS
.IS
.15
.15
.15
.00
.00
.00
.00
.00
.00
.00
.00
.0
.0
.0
.0
.0
.0
.0
                                                                                            SP04
                                                                                               0
                                                                                               0
           *«* DATA TYPE 6B IOTHES COEFFICIENTS)  SSS
          CAtin TYPF
          OTWP COEFICIENTS
          OTHFR COEriflENTS
          OTHFP COEFICIEMT1?
          CTHFR COEFiriEflTS
                cnrririCNTS
REACH
1.
2.
3.
4.
b.
CKt
.PO
.no
.OR
.PO
.nn
CKS
.50
.sn
.50
.so
.sn
EXCOEF
.15
.15
.15
.n
.IS
CK6
.00
.00
.00
.00
.00

-------
OTiirp coEFirirwi'-, ».. .no l.SO
luniUAfii u. .00 .no
ttt OATA TVCF 7 (INITIAL COI'UITIONS) J*»
CAHD TYPE RFACH TEMP P.O. POP
1MTIA1 CONDITIONS 1. 65. n .0 .0
INITIAL CONDITIONS ?. 65. n .0 .0
IIJITIAL CON1ITIONS 3. 65.0 .0 .0
IMITIAL COinjiIONS u. 65.0 .0 .0
U'lTIAL COrniTIOMS K. 65.0 .0 .0
11 ITIAL COi.niTTP'iS k. f.5.0 .0 .0
EMIATA7 0. .0 .0 .0
tit DATA TYPE 7I> (INITIAL CONDITIONS FOR CHLOROPHYLL
COLTFOKM ANP RAUIONMCLIOE > SS*
CA'»n 1YPE ('EACH CHLORA NH3 N02
U'ITIAL corn-? I. .n .00 .no
INITIAL COriP-2 2. ,n .00 .00
INITIAL coiy.p-2 3. .0 .00 .00
KIITIAL COM:-? <». ,o .00 .no
INITIAL corjo-2 5. .0 .00 .00
INITIAL coun-2 6. .0 .00 .00
Et.'n«TA7A 0. .0 .00 .TO
Sit HATA TYPF. R (RUNOFF CONDITIONS) S«S
Coon TYPE REACH 0 TEI"P 0.0. BOO

RUNOFF CONTITIONS 2. .0 .0 .0 .0
RUNOFF CONDITIONS 3. .0 .0 .0 .0

RUNOFF CONDITIONS ". .0 .0 .0 .0
RUNOFF COMTITIONS t. .0 .0 .0 .0

.15 .00
.no .00

CH-I CH-II CM-I1I
.0 .n .0
.0 .0 .0
.0 .0 .0
.0 .0 .0
.0 .0 .0
.0 .0 .0
.0 .0 .0
At NITROSENt PHOSPHOROUS!

N03 POU COLI RAON
.00 .00 .0 .00
.00 .00 .0 .00
.on .00 .0 .00
.00 .00 .0 .00
.00 .00 .0 .00
.00 .00 .0 .00
.00 .00 .0 .00

CH-I CH-I I CH-I I I
000
!o !o !o
.0 .0 .0
.0 .0 .0
.0 .0 .0
.0 .0 .0
.n .n .n
lit DATA TYPE 8A ( INCREBLNTAL FLOW CONDITIONS FOR NITROGENi PHOSPHOROUS.
COLIFORH AMC RADIONUCLIDE) Stt
CArfH TT(-C REACH CHLORA NH3 N02
RUNOFF CONII-? 1. .n .00 .00
kUNOFF CUNP-2 2. .0 .00 .00
RUNOFF COC'0-2 3. .0 .00 .00
IUIWOFF fOMP-2 W. .0 .00 .00
RUNOFF CONH-? 5. .n .00 .00
kUunFF LONP-2 6. .0 .00 .00
EMnMABA 0. .0 .00 .00
Sit DATA TYPE <9 (STPEAM JUNCTIONS) *»»
CA»P TYPE JUNCTION ORDER AND IOENT
STHFAM JUNCTION 1. JNC= TRIB-PAINSTE"
ENOATA9 0.
t^T OATA TYPL in IHFAPUATFR SOURCES) «1»
Cf.«ri TYPF. HDUATTK OPDFR ANO IPFNT FLOW
HI 4HUATFR 1. HOW= HKIKS1EK 100.0
li|-A"WATrR 2. HDH= TRIPUTARY 10.0

N03 P0« COLI RAON
.00 .00 .0 .00
.00 .00 .0 .00
.00 .00 .0 .00
.00 .00 .0 .00
.00 .00 .0 .00
.00 .00 .0 .00
.00 .00 .0 .00

UPSTRH JUNCTION TRIB
31. 62. 61.
0. 0. 0.

TEHP 0.0. BOD CP-I CM- 1 1 1
f-5.0 R.« 3.0 27.0 .0
70.0 10.5 2.0 15.0 .0
.0
.n

-------
    ,\
  V
\
           \
           TrX/l'.  -./UFI' !)[ VFLI^KrMT  IIOAI'D/UATF". RFSOURCFS ENGINEERS,  INC.

       » » » PAT« I  1ST FOrt  1POIFIFO OUCI 1 STREAM QUALITY ROUTING  "ODEL  «  •  •

           F« 1 ITI fS) IS*

                                       (MJAL-I PROGRAM TTTLFS
                               FXl'ANPEH VFRSION OF QUAL-I
                     HYHOIHETICAL I1ASIM
                     CONSERVATIVE HINE»AL   I = TDS IN (MG/L X  0.1)
                     CONSERVATIVE MINERAL  II
                     CONSERVATIVE MINERAL in
                     TFnPLPATURE  IN DEGREES FAHRENHEIT
                     nlOCHFMICAl  OXYbEM PEHAMO IN MG/L
                     ALGAL  AS  CHL A IN LIG/L
                     PHOSPHOHUS AS  P IN MG/L
                     RfiONiA AS P IN MG/L
                     NITRITE AS N IN NG/L
                     NITKATE AS N IN HG/L
                     OISSUI VED OXYbEN IN MG/L
                     FECAL  COLIFORM AS 1000/100 "L
                     RADIOMUCLIDE
CARP TYf-F
TITI Fnl
TITLED?
TITI.F.03
1 ITLFOl*
TITI EOS
TlTLEOft
IITLE07
T1TI.F08
TITLEH9
TIUF10
TTTLE11
TITLF1Z
TITI E13
TITLE1<»
TIYLE15
EwnTITLF



YF«-
no
MO
NO
YF?
YFS
YFS
YES
YES
YFS
YFS
YFS
l>,0

                  ««*-PATA YYPE 1 (CONTROL DATA) SSt
 CARn-TYPF.
>LIST DATA INPUT
 WRTTF FINAL SUMMARY
 MO FLOW AUGMENTATION
 STFCPY STATF SIMULATION
 MJrtRTR OF REACHES
 NUM OF llEARWATERS
 TIME STtP (HOURS)
 MAXIMUM ROUTE TIIT
 LATTTUOt OF BAST^
 STANDARD MF"TDIttn
 LVAP. COEF.,|Ari
 LLFV. OF BASIN  (FFFTl
                                    (HRS)=
                                    (DEG)=
                                    (PEG|=
                              .OOOPO
                              .00000
                              .00000
                              .00000
                             6.00000
                             2.00000
                              .00000
                            30.00000
                              .00000
                              .00000
                              .00000
                              .OOPOO
                              .000110
                                                               CARD TYPE
                             NUMBER  OF JUNCTIONS     =
                             NUMBER  OF WASTE LOADS   =
                             LNTH. COUP ELEMENT (MI) =
                             TIME  INC. FOR RPT2 (HRS)=
                             LONGITUDE OF BASIN (OE6)=
                             DAY OF  YEAR START TIME  =
                             EvAP. COEF..IBE)        =
                             OUST  ATTENUATION COEF.  =
                              .00000
                              .00000
                              .00000
                              .00000
                             1.00000
                             2.00000
                             1.00000
                              .00000
                              .00000
                              .00000
                              .00000
                              .00000
                              .00000
                  IffGATA TYPE 1A (ALGAf PKOOUCTIOM  AND  NITROGEN OXIDATION CONSTANTS)»SS
CARD TYPE
0 UPTAKE BY MH3 HXIOIMG  0/MG M)=
o PRO . RY ALGAF  (MK  O/IG  A)   =
N rONTCNT OF ALG/lF  ( MG H/hfi  A)  =
AL1 "AX SPFC GROt'TH MATE(1/OAY)=
N H»LF •iATllCATION TOMS  (C&/L)   =
LIRMT HALF SAT CONST I LMGL Y/MlH) =
                                                      S.^OPO
                                                      I.AOOO
                                                       .08*0
                                                      1.-5000
                                                       .'000
                                                       .0^00
                                                       .0000
                  \\\ DM u TYPE 7 (UrOCH IUFNTIFICATION)  tit
                                                               CARD TYPE
                                    0 UPTAKE RY N02 OXIOIMG 0/MG  N) =
                                    0 UPTAKE BY ALGAE IMG 0/MG  A)  =
                                    P CONTENT OF ALGAE 
-------
          Er .
                            n.
                                                             .0
                                                                   .n
                                                                         .n
                                                                               .0
                                                                                     ,r
                                                                                           .0
                                                                                                 .0
lf(
     (
               DATA
CA«n TYPF
I'F i
          ! MitTAlnA
                                        CPK1ITIOIS FOR CHLORnPMYLL.NITROGEN. PHOSPHOROUS.
                              roi irupr" Aun RAtiiot'iicLinri *«»
            IT-UATf" CHLOHr    f'H3
                1 .    10.0  1 .00
                ?.     5.n   .50
                n.      .0   .00
CCH" TYPF
WASTFLPAM
WA-5TFLOAO
           VII 1AT1
TVPF 11  (IASTF LnAPIt'RS) t*t

 WASFF LOAP ORDER A(,0 mtNT  f"FF
   i.   usi- innuyTPiru LOAD  .00
   ">-.   K!SL= VIIIiOTWAL       .00
   r,.                         .no

     11A (WASTE LOAD OAflACTFRISTICS -
          roi iFonw"; AMP.
               TYPC
                     LOAD nnfirR AND IDFf'T
                  1. KSL= T'IPUSTRIAL LOAD
                  7. WSL= WITHCRAUAL
MO'
.05
.01
.no
FLOiJ
in.o
-nn.o
.0
N01
.30
.10
.on
TEnP 0.0.
po.n 5.0
.n .n
.0 .0
IS - ALGAE. NITROGEN
CHL. A
,nn
.00
MH3
1S.OO
.00
P0"» COL I
20
05
no
BOO cn-i
7*>.0 100.
.0
.0
RAON
1
0
n

0
n
0
.00
.00
.00
CM- 1 1
.0
.0
.0



Cl-III
.0
.0
.0







.PHOSPHOROUS.
N02
.50
.00



'N03
10.00
.00
pot
20.00
.00
C'OLI
600.00
.00
                                                                                                                    RADN
                                                                                                                           .00
                                                                                                                           .00

-------
IP
14
]«
 1<-S  =  <
 bit T'J  1i
 '..'fC.l =  fAIAH.'M
 IIJIIMC  = I AIM 1 , 1(.)
 f-0 1O  1^
 .11 "ii-", =  r •VT.'U 1 ,6)
 fMASTI  =  fATndilO
 c ', ir,  ir.
 ITLT = l)nTA(I.e)
 f'FLX = I'ATBU.IM
 00 TO  lf>
 T"A» = PATAd.ftl
 "TICE  = nATf.fI.16l
 GO in  if.
 HT  =  PATMItfll
 LI 1  =  UA1A(I.16>
 f.n 10  l^
 LSM  =  HA1I\(I,P)
 n.lTOFY =  rATA|I.l*l
 GO TO  IK
 AC = nATAii.ai
 nr = nATA
 r,n TO  16
 CLrv=RATAI I.n)
 nAT=DATA|l.lbl
 KO TO  1ft
                                                                         OD012300
                                                                         00012000
                                                                         00017500
                                                                         00012600
                                                                         O00l?7on
                                                                         00012800
                                                                         00012900
                                                                         00011000
                                                                         00013100
                                                                         00013200
                                                                         00013300
                                                                         00013400
                                                                         00013503
                                                                         00013600
                                                                         00013700
                                                                         00013800
                                                                         00013900
                                                                         00011000
                                                                         00014100
                                                                         00011*200
                                                                         oooiisoo
                                                                         OOOltilOO
                                                                         00014300
                                                                         00014600
                                                                         00014700
                                                                         00014900
    IFIKKFACH-T-S)  610. 610.^20
    kniTCiNj.sisi   (•'RFACH
    FOKMATIJHP.5X. •»»*»«•. 15. 'PEACHES EXCEED THF PROGRAM DIMENSIONS'
   •      • OF  75- I
    NFRRORsl
    lF('ihASIL-7S)  630i630,640
    WRITE'IJf
IF  IlLIST.EQ.O) GO TO 200                                           00015000
WRITF  ("'J.bOll                                                      00015100
FORMAT 11M],?uX.?9HTEXAS  UATFR  DEVELOPMENT BOARD.12H/UATER RESOURCE
'S trC-INFERS. INC..//17X.3MH* • » DATA LIST FOR MODIFIED QUAL1.
r  «H STPEAM ailAI ITY ROUTIf'R  NODEL * » *)
UHITI  ((ij.502)                                                      00015500
        (lHn.lnX.21HJ.tJ  (PROBLEM TITLES) fSS./)                     0001*1600
       IMJ.201)                                                      00015700
fnnrtcr  IIOX.^HCAHP TYPE>2«X<2lHOIIAL-I PROGRAM TITLES)              00015BOO
kl-'ITT  iT>  (t'.i.'snti                                                      00016100
FOKPAT  IlMO,lnx.31Ht$s  DATA  TYPE 1 (CONTROL DATA)  fSS./)          00016200
-•UTr  (ti,i,?o5)                                                      00016300
FOI'nAT  (K-y.^MCAhD TYPEi3FV,SHCARD TYPE)                           00016400
WRITf  (tlj.inj)  ( (PATSl I . J) . J=l .1ft) . t = l.MCRf)S)                      00016500
FONISAT  (^(inX.6A4.Al.f.10.>i) I                                       00016600
COMTI 'liF                                                            00016700

                                    STEP ^-1A
                                         IN OIVTA TYPF  1A (ALGAE PROPUCTTON

-------
c                                         ANO  IJITPOGFN OXIDATION CONSTANTS).

t
      D'l  inri  1 = 1.7
      xi Ar  (ijl.lnnl)  (OATAH.J) ,J=1 ,1ft)
 10M FORMAT  (C/'M.F7.n.?X.HA«.F7.nl
      IF  ii.'M«)
      GO  TO  1006
 1(110 ALPHA3=DATA(I.<9>
      ALPHAl«=OATA(l,lA)
      GO  TO  1006
 1111 Al PliAl=f)ATl\( l .1)
      ALP>'A?=OATni l.K-l
      GO rn  ioor
       RF.SPRT=n'T»U ,1

       GO TO 1CP6

  10 IS CKN=nATA(I.9>
       C>>P=PATA( 1 .111)
       GU TO lOOf
  1011 n"L=nATACT .91
                   .
                    .GT.  0)  CKL=CKL*0.1!>33
       IF IILIST .Ltt. 0) GO  TO
       V^ITC IMJ.1016)
  JOIt r,'K«.AT (!>'0.lnX.6f,H*t*nAT» TYPE 1A IALGAF PRODUCTION ANO NITROGEN

      • OXIHATIOM CP'iSTANTS
       WrIITF ("J.1017I
  1017 F'IH»ftT (inx.9»C«Rn TYPF,3fX,9HCARO TYPE)
             ("IJ. 1010)  (inATA(I.J).J=l.lB).I = l
       CI!«TK UE
                                                                           00016800
                                          STI-P  3-?                         0001*900

-------
C                                        RFA1  IN  DATA  TYPE 2 (REACH TDENT00017000
r                                        RTVER  nitr  AT HE on AND END of Rf.oooiTioo
c                                                                        onniTZoo
      ii = nprACH+1                                                      oooiTsoo
      no *n 1=1.11                                                       OOOIT«OO
      •<;nr miiMi IIIATAI i.ji>j=i .is)                                    00017500
   *i FORMAT (3A"»,Jx.F5.0i5A; CONTINUE                                                           00021100
r                                                                        00021200
C                                        STEP 3'^                         00021300
C                                        RF.AD IN  DATA  TYPE 3 I TARGET  LEVE00021400
C                                        AVAILARLE FLOW AUGMENTATION  SOUR00071500
C                                                                        00021600

-------
     dr in  1 = 1,11
     «fV  IM.fl)  (HftTAI I • J) .Jrl.lt)
     Fnp*i\r  ("ici, jx,r5.n,5x,F5.n.Fio.n.6Fs.n)
     I"7  n.'MM 1 ,1 i-ri»nA)  6o.bS.60
                                                                       OH021700
                                                                       00021HOO
      Jr auri'i  =  1

      *mn  INI.Ml  ClATMI.J)iJ=l<14>
      IF  lOAl ft| I ,1 I-TNOA) 64.fr1,6'(
  fQ  MsJ-II
      WITf  INJ.6PI  M
  (•>  FORMAT  (lHn,3X.16H«»*«« TCO MANY  (.13.IBM)  DATA1 CARDS READ)
      GO  TO M
  r*  IF  II.GE.II)  G" TO 63
 f.6
      MCRHS=1
      Gn  TO
      IlFKHCR=l
      'i=II-l
      UPTTC (WJ.S6) N
      FOrtfnT  (1H0.5X.J5H««»»» TnO TFU  (.M.18H)  OATA3 CARDS
      CONTItJUT
      RP fi7 I = 1.NKEAC>'
      l.tCM=IFIX('jAlft(T. 61*10. + 0. 0001)
      '•I.ICH=IhCMNO( IPCH)
      N IW«K = OATAI 1.7)
      N>-UUA|(IMRCH) = r'HHAR
      T£Rr,On(i>IRCH)=n«TA( 1,8)
      DO ft" J="'.1't
      X = J.C
      lAUr,liniNRCH.KI = HATAII.J)
   f.7
006
      ii- (iLiST.ra.ni on TO nzi,
      UAITC IllJ.SOb)
      FnHl»HT (lHO.lnx.36HI**  DATA  TYPE 3 (TARGET LEVEL DO AND.
                      ilH FLOW AUGMENTATION SOURCES) ***./)
      b-«lTl (NJ.'Ofa)
      F1MMA1 (lPy.9HC»RD TYPE«lBX.ai»HREACH  AVAIL HDWS TARGET.
               5X.22HOROER OF AVAIL  SOURCES)
      W^ITl (NJ.402)  < in«TA
-------
    P'.  Ill  1 = 1 , :i
    R'"»r lf.1.71)
                  fOATM I i J) i Jrl
71

7n

7U


7<»

7?

7s
    ir i
    rjr
   IF iriVTA|I.| |-r'l.(>)  7M.79.7M
   IJ=T-II
   WRITF (NJ.7?)  N
   FOR'AT  111 n.-]XilAMi*»« TOO MANY
   1.0 TO 7^
   IF ii.r.r.ii) eo  rn  73
   r,rpnni  =  i
         (MJi76) ij
   FORMAT < iHo.Sx.ibH««»»« rro Frw
   Cnrirlr.ur
   |JCROS=I
   On 77 I=1.MRLACI<
   IuCH=TFIXIDATAIIiU)»ln.t0.0001)
   NHO=IRCHNO< IRC^l
         = RATA(IiEl
7P
77
?n?
M?7
    CD 76 J=b.2S
    K = j-5
    IFLAG(riRCHiKI=n/>TA( I.J)
    CONTINur
    CONTINUE
    IF (ILIST.FO.O)  GO TO 127
    WHITE (NJtS07l
    F('R»«1 (IHIIilOXi if.HJJ» OAT« TYPE "»  (COMPUTATIONAL REACH.
                     16H FLAG ciri.ni «»«./)
    FPKKAT  (inx.9HCAKO  TYPF.«Xi?nHRFACH ELEMENTS/REACH.
            13X.19HCni>'PUTATlaNAL FLAGS)
    kVITF  (NJ.tOJI  ( (OATAI I ,J) ,J=Ii7S) iT=l=IOW
    10'iTIHUE
                                          <>   =   ft\ FLEMENI WITH A uAsrooo?73on
                                          /   =   AM TLEMEMT WITH A knnono?7'40')
                                                                       1)0077500
                                                                       00027600
                                                                       OP077700
                                         F2.0I                         00077ROO
                                                                       00077900
                                                                       0002HOOO
                                                                       0002A100
                                      (.I?.18tl|  fl»TA»  CARDS REAOI
                                              OATAI  CARDS RCAHI
                                                                        00028300
                                                                        0002S100
                                                                        on02«snn
                                                                        00020600
                                                                        00020700
                                       STEP  3-«i
                                       RFAO  III DATA  TYPE 5 IHYDRAULIC
                                                                        00029900
                                                                        00079000
                                                                        00029100
                                                                        00029700
                                                                        00029300
                                                                        00029100
                                                                        00029500
                                                                        00029600
                                                                       00029800
                                                                       00029900
                                                                       00030000
                                                                       00030100
                                                                       00030200
                                                                       00030300
                                                                       00030100
                                                                       00030500
                                                                       00030600
                                                                       00030700
                                                                       00030600
                                                                       00030900
                                                                       00031000
                                                                       00031100
                                                                       00031200
                                                                       00031300
                                                                       00031100
                                                                       00031500
                                                                       00011600
                                                                       00031700
                                                                       00031600
                                                                       00031900
                                                                       00037000
                                                                       00037100
                                                                       00032200
                                                                       00032300
                                                                       00032100
                                                                      C00032500

-------
MI

»P

«u
                                    rnp COMPUTING VELOCITY AND nrpT"00032&00
                                                                     OOU32700
    CO  1=1 • II                                                        00032800
      (i.l.MI (1f>TM I . J) . J=l ."I                                      00032900
FI-.HPAT  i-2/u,A;>.Kx.F5.ii.loy.''Fin.i)
ir  (u/>TflJ=1 i9)
Ir  |i".HTA( 1 .1 )-Et»OM K4.HS.nu
M=t-IT
ui'Ilt  I'u.a?)  N
FPK'AT  ( I "OiSll. !«"••••• TOO  ("ANY ItTJ.lBIl) 1»TA5  CARPS REAO)
r-n  TH  P5
ir  ii.GE.ii) ro TO m
•Mrci'OK  =  1
•1=11-1
WRITL  (MJ.tfi)  ri
FOWAT  ( U.p.bX,15ll*«««* TOO  FEW (.I^.ISH) nATAS CAKPS READ)
 H7
Sp.«
?rp
upb
t?"
0-3  «7  1=1
1 i'ri'= IF lk( DA |A'«iA?.5X.F&.P,10X.^F10.3)
CiVJiir ur
                                                                         onouooo
                                                                         ono33ioa
                                                                         00033200
                                                                         00033300
                                                                         00033000
                                                                         00033500
                                                                         00033600
                                                                         00033700
                                                                         00033600
                                                                         00033900
                                                                         00031000
                                                                         ooosmoo
                                                                         00031200
                                                                         00031300
                                                                         00031100
                                                                         00031500
                                                                         00031600
                                                                         00031700
                                                                         00031800
    |io qfl  1=1,11
            i.mi  (nATni i.ji ,j=i .101
            (?/Mt.A?.5x,Fb.G<6Fin.O)
    IF ir«I/-EfDM °0,95."n
    CONTIIiUF
    Mr.(D(,.(  -  \
          ini.rii  cr.«Tf.( iiji ijzl.ioi
    it-  in/iif ( i .1 i-rMj«) 91,99.1"
     rl-Il
    •"'ITf  IN.J.1'1  II
    Fni.-AT  |1l'n,3x,lAH»«»«« TPO P/1IMY
    On  T(>  •?<
    I'  I 1 .1 ' . 1 1 )  f 'i in £1
                                                                        00035000
                                                                        00035100
                                                                        00035200
                                                                        00035300
                                                                        00035100
                                                                        00035500
                                                                        00035600
                                                                        00035700
                                                                        00035800
                                                                        00035900
                                                                        00036000
                                                                        00036100
                                                                        00036200
                                                                        00036300
                                                                        00036100
                                                                        00036500
                                                                        00036600
                                       STEP J-f.                         00036700
                                       RFAtl IN DATA TYPE  6  (REACTION C000036800
                                       nroXYGEMATION AMD  REAERATION).  00036900
                                                                        00037000
                                                                        00037100
                                                                        00037200
                                                                        00037300
                                                                        00037100
                                                                        00057500
                                                                        00037600
                                                                        00037700
                                                                        000*7800
                                                                        00037900
                                                                        00038000
                                                                        00038100
                                                                        00038200
                                              DATA6 CARDS READ)
                                                                      00036100

-------
t.ri.»i»- = i
M=l '-'
                isi, ..... TOO FFW ..IVIBH.  n.r.f CARHS REAR,
                 .AC..
               'IMA IT. HI 'Hi. +0.0001)
                                                                        0003^00
                                                                        0003B700
                                                                        o<>03«BOO
                                                                        000?9000
                                                                        °°o3qico
                                                                     00039300
                                                                     00039400
                                                                     00039500
                                                                     000*9600
                                                                     00039700
                                                                     00039flOO
                                                                     00039900
                                                                     oootoooo
                                                                     00010100
                .       PATft TTPF  «  .REACTION COEFFICIENTS.         000.0200
                 3CH FOR DrOXYGENATION AND REAEHATION) SS*t/l

                                REACH     K1,M.2HK3.6X.5HKPOPT.
          5X.23HK2     COESK2    EXPOK?)
 WHITl  (['J.»0bl MpaT»II.JI.J=1.10I.I = liNCRDS)
 PIMM nn«.2.».».aii.FS.«.?Fio.p.Fia.o.Fio.«.«Fio.si
 CONTINUE

                                    RFAP IN DATA TYPE  6A  (ALGAE.  NITROGEN.
                                    AMD PHOSPHOROUS COEF.I


 (JC lino 1 = 1.11
        .111)1 )  
            I I  =  USTBIl.tl
                 =  n«TA|IiT)
    c«aiiiPCHi  =  DdTen.ei
    Cnr.(ll«?IMkrHI  = rATA(I.91
    LXPOK?(^rH)  = PA1AII.1UI
 °T cnwTinur
    IF  HUS1.fO.OI 60 TO 179
,n,
                                                                         000,0500
                ,,.
     IF (UATA(I,l)~EF'UA)  1100, 1105.
     COMTlliUE
1101 1=1+1
     IF iriAT'C'.l I -FTNUAI110il.il 09 1
HO" N=I-1I

110? FOW'AT  (lHn.bX.16H«»»«« TOO MANY  I.I3.19H)  DATA6A fAROS RfADl
     6" TO  IU'1
     IF»I.I-I.MI  on TO 1103
     lF|M«l=n#TAH.Nl
      C". |liMni'C,'>=L,ATA(l.al

-------
                 )=UATMI.IOI
                   ATMI.n )
      SPIIPS(MI!CI'I=UATA( I ,12)
 HOT roMiuur
 IIUP IF(IIIST  .CO.  0)  PO TO 11«9
      UI'ITE(NJ.lllu)
 inn FORi'ATiiHn.iox.ftSHtss  nATA TYPE ft»  IAIGAE.  NlTRncrN. AND PHOSPHOPO
     SU5 CONSTANTS)  IIS./)
      WRTTFllU. 11111
 1111 FORf.-flT(10X,9l
 ID? FnRt'HT(1n>-,5Aq,?»,Ffl.n,Fa.l.lX.2F8.2,lX,FS.2.2Fln.l)
 11H9 CUNTInuC
c
C                                        STEP 3-6B
C                                        READ IN DATA TYPE 6B (OTHER COEF.I
C
      oo izno  1=1.11
      PFAO4,5X,FS.0.2X.6F8. 01
      IF inATA.120M
      N=I-II
      WRITF  (NJ. 12021  N
 12(1? F(1R»AT  (lhO,bX.16H««»«» TOO MANY  (.I3.19H) OATA6B CARDS READ)
      GO  TO  1?03
      IFH.6E.H)  GO TO 1203
      IFIICATA)  122o>12?0<1230
      GO  TO  1?5P
      Us II- 1
      WRITE  (NJ.1206) N
      FORfAl  (lt-ri,5X,15H.»*«* TOO  FEU  |,tl,19H) OATA6B CARDS READ)
 1ZC.3 CONTINUE
      NCR(1S=I
      DO  1807  I=1.NREACH
      lRCtl=lFtX
 1?P7 CONTINUE
 12PP ir(TLIST.Fn.O) FO TO 129S
      bL'RITClMJ.12) J)
 12in FOR«AT(lhOilOX.lllHS«S OATA TYPE  6B I OTHER COFFFICIENTS)  t*$i/)
      WRITE INJ.1211)
 1711 FORMAT! 1UX. 9lirAPn TTPE.18X.6H RF«CH.<(X .JHCKq ,6X , 3HCK5.6X, AHEXCOEF.
       URITI (I J,121kl I IPATAI I.JI .  J=l<10)i Irl.NCRDS)
    1,"  FOR»AT(HiX.'iAtt.?X,F9.01»F«>.2)
 c                                                                          000*1000
 L                                         STEP 3-7                         OOOU1100

-------
c                                        REAO TN DATA TYPE ^ (INITIAL co"ono4i20o
r                                                                        00041300
      ni, n« 1=1,11                                                      00041400
      SFMI (i.r.1111  x.FS.o.Fin.o.2F*>.n,3Fin.oi                            oooiisoo
      ii  n.iAT«)  iin.H5.nn                                    00011700
  lin COMT1MF                                                           OnoiilBOO
      WRBOIisl                                                           00041900
  Itu IrUI                                                              00042000
      PtA" (fl.JHI  (fMTAd.JI .JM.12)                                   000*2100
      IF f'.ATAII.ll-ENriAl  111.119.111                                    00042200
  111 N=I-TI                                                             00042300
      WDITF IMJ.112) N                                                   00042400
  \\? FORMAT I thn.bX.16H*****  TOn  MANY  (.TJ.18H)  OATAT CARDS READ)      00042SOO
      GO TO 111                                                          00042600
  11s IF lI.GL.II) CO TO 113                                             00042700
      NERPOn = 1                                                         00042800
      N=M-1                                                             00042900
      WRITt |NJ.1lfa) V                                                   00043000
  116 FORMAT IIHO.SX.ISH*****  TOO  FEW  I.IS.ISHI DATAT CARDS READ>       00043100
  in CONTINUE                                                           00043200
      MCinssI                                                            00043300
      00 117 Irl.UKEACH                                                  00043400
      IRCH=IFTXinATA(I,6l*ln.+0.0001)
      N1CI'=]RCHNO(IRCH)
      TIMTTitJRCHI =  0/1TAII.7I                                            00043600
      001MTINRCH) = OATAII.8I                                           00043TOO
                   = PATAII.SI                                           00043SOO
                  . 1 1 =HAT« < i . i o i                                          ooo«39oo
      COlNlT(NRCH,2)=nATA(I.lll                                          00044000
      COINITINRCH.3)=DATAII,12>                                          00044100
  117 COKTIHUE                                                           00044200
      IF (iLIST.FO.ni 60 TO 430                                          00044500
      WRITF INJ.-jlO)                                                     00044400
  5 in FOR "AT (1HP.IOK.10HSJS DATA  TYPE  7 (INITIAL CONDITIONS) «Sti/>    00044500
      WRITE |U.J,?li)l                                                     00044600
  210 FORMAT I10X,9HCI\RP TYPE* IPX* 23HREACH    TEflP  0.0. BOD.           00044700
     >         fix,^6HCn-i      cfr-n      en-ill)                         OOOIIBOO
      UKITF (NJ.itn6l I (OATAd, J),J=1.1?) .I=1.NCRDS)                     00044900
  ••Oft FORMAT linx>5A1.SXiF5.n.Fin.l.2F5.1>3F10.1)                       0004SOOO
  130 CONTINJF                                                           OOOUS100
c
C                                        STEP 3-7A
C                                        READ IN DATA TYPE7A (INITIAL CONDITIONS
C                                        FOR CHLOROPHYLL. NITROGEN, PHOSPHOROUS.
C                                        COLIFORH.AND RADlONUCLinE)
C
      00 Un2 1 = 1,11
                     in«TA(I,J),  J=l.l?i
      IF  innrni 1 ,11-r'JDA)  iso2.noj,isnz
 11P2 COMTItuF
                     IPATA(I.J).  0=1,12)
      IF  inftTA(T.l)-ENDA)  1304.1305,1304
 ISO'S N=I-II
      MR1TI  (NJ.13DA)  N
 \',{f- FOR'nr  MHo.b)l.lf.H*«»**  Tno MANY (,I3.?OH) DATA 7A CARDS READ)
      GO  TI)  1JP7

-------
      ir  (i.t.>:. i! i  r.n TO 1307
      1FIIDATM \.S«!1 ,13?l.mO
 1 DATA 7« CARDS  READI
      Cr)MT1hUr
      NCHDSzI
      U.)  1Sn9  1=1. BREACH
                      i."i>*io.+o.onoi)
      Al r,lT(NRCH)=OAT1lI.f,)/ALPHAO(NRCH)
      CNHIlTCNPfHIzOATAI 1.7)
      CvO'IT(NRCH)=nATA( I. 81
      C"03IT(NRCH»=n«TA(I.9l
      Ph,0l)=DATA(I.lDI
      CriLTITINRrn»=D«TAI 1,111
      RAnt4lT(IMRCHI=DATA(Iil2l
 130"? CONT1MJF
 135n Ih (ILIST.EO.O) SP  TO  1320
      WHITE (NJtlMOl
 1310 FOPMATIlHn.lDXilBHStS  DATA TYPE 7A (INITIAL CONDITIONS FOR CHLOROP
     • WHYLL A. NITROGEN.  PHOSPHOROUS . /.?9X . 30HCOLIFORM AND RADIONUCLI
     *DF) its 
      UPITFiNJ. 13121  ((DATAII.J). J=lil2li I=1.NCRDS|
 131? FORMAT(10y.3AI|.A2.aX,F6.0,2X,F6.1,F6.2.3FB.2.F10.1,F6.2|
 1320 CONTIflUE
c                                                                         000*5200
r                                        STEP 3-8                         0004S300
c                                        READ IN DATA  TYPE 8 I INCREnENTALOOOISOOO
r                                        CONDITIONS).                     000»3500
C                                                                         00015600
      nn I2o  1 = 1.11                                                       00°I'"S0
      RFAO  IWl.l?l)  (naTA(I.J).J=l,l3)                                   OOOH3BOO
  1?1 FOH^AT  lr)A'i.5x.1!FS.O,3F10.0l                                       OOOH5900
      IF |C.ATAII.1>-EI"DA> 120>1?S.120                                    000»6000
  1?0 CONTIfHlt                                                            000»6100
  1?u  1=1+1                                                                000*6300
       REAP  (M.l?l)  (PATA(I,JliJ=lil3l                                    000»6»00
       IF  UlATAILD-CCDA) 12i»tl29tl2<»                                     00016SOO
  12"  N=I-IT                                                               00016600
       WRITF  |MJ,12^)  N                                                    00016700
  12?  rnn- AT  IIHO.SX.KIH***** TOO MANY  (.T3.1SH)  DATAS CARDS READ)       00016600
       GO  TO  1?3                                                           00016900
  12K  IF  (I.r,E.II)  r.n TO 123                                              00017000
       NF KDor.  =  i                                                           00017100
       N=IT-1                                                               00017200
       •JRITE  (MJ.l?b)  W                                                    00017300
  Iff,  FOKM/>T  (1H0.5X.15H***** Tno FEW  (.I3.18H)  DATA8 CARDS READ)        00017100
  1?^  CO'lTIIIliF                                                             00017500
       UCRriSsI                                                             00017600
       On  1?7  I=l.NKE»rM                                                   00017700
       I-ICHrIFlX(nATA(I,(il»10.+0.0001 I

-------
      nio.-tn) = n«T»iii7i                                                 000*7900
      II(H.'Cl.) = Llnrtd.A)                                                 OOOUBOOO
      DRTllPCI'l =  OATMIi9l                                                000<»8100
      l-ni-H'ihClt) = PAT/MI. 10)                                              000*8200
      CriNcI(l»llCH,ll=r)ATA|l,ll)                                            000*B300
      miJ<;|IM.l*01> inATAd.JI. J=1.1ZI
 l*nl FOHWAT I 3A1,A2,5X,F5.0. TFB.C)
      IF  (DATA(I.1|-ENDAI 1*00. 1*0?, 1*00
 mn" CONTIMUE
      NFRPORrl
 i*ns 1=1+1
      PCAHIMI ,1UQ1 ) (PATA(I.J). J=1.12)
      IF  (DATAd.l I-ENOA) lt03.110t.lM03
      WHITE  (NJ.1*OS)  H
      FORI>AT  o TO 1*09
  l
-------
     • ?W>< "lirOGLN,PHOSPHOROUS. /. 29X i 30HCOI.IFORK  ANH RA010NUCL IOC )  t»
     • l./l
      WI'ITF (''JiltM)
 1M1T FP.riwAT (lO«,9HCAI»n TTPF. 15X.5HRE*CH. 1X,6HCHLORA,IX, 3HNH3.5X.3HN02.
     • *•* , 5nN03i r-X i 3HP01<4X.4HCOL I .4X .IHlAriN)
      Wi'ITtlNJ.ltlZ) UnATAII.Jl. J=l,12>. I=1.NCROS)
      FORHaT(10X,3A'(,f2,BX,Ff..O,2X,F6.1 ,Ffi.2,3Ffl.2.F10.1.F6.2l
      CONTINUE
C                                                                        000*9600
C                                       STEP 3-9                        00049700
C                                       RFAD IN  DATA TYPE  9 I STREAM JUNC00049BOO
C                                       IDENTIFICATION AND THE  ORDER OF 00049900
C                                       CONNECTING ELEMENTS TAKEN  CLOCKU00050000
C                                       AROUND THE JUNCTION).            00030100
C                                                                        00030200
      II=NJUUC*1                                                         00050SOO
      on i3o 1=1.11                                                      ooosonoo
      KtAn INI.131)  (HATAII,JI.Jzl.131                                   00050500
  131 FnRinAT ISAi»,A3,':iX,F5.0,5)(,'5(m,3(5X.F5.0»)                          00050600
      IF (nATS(T.l)-ENDA)  130.135.130                                    00050TOO
  130 CONTINUE                                                           00050800
      NERROR=1                                                           OOOS0900
  130 1=1*1                                                              00051000
      Hran tmi.isii  IOATAII.j».j=l,isi                                   ooosiioo
      IF                                                   00032500
      00 13H J=6,10                                                      00052600
      K = J-5                                                            00032700
      JUNriniIJUNCiK)=OATA(I,J)                                          00052BOO
  138 CONTINUE                                                           00052900
      JUNr(IJUNC,1)  = OATAII.11I                                         00053000
      JUNC|!JUMr,2>  = RHTAII.12)                                         00053100
      JUMCIIJUNC.3I  = OATAII.13I                                         00053200
  137 CONTINUE                                                           00053300
      IF llLIST.FO.O) GO TO "»32                                          00053*00
      WRITE (NJ.512)                                                     00053500
  SI? FORMAT (lH0.10X.38H*tl DATA TYPE  9  ISTRCAM JUNCTIONS! *$»,/!      00053600
      WRITf HJJ.J12)                                                     00033700
  21? FORMAT <10X.9HCAHO TIPE.l
-------
      II  = NHtTI'S+1                                                      00051BOO
      DO  I'10 1 = 1 .II                                                      00051900
      REAP (M.111) -EM)rt) 110.1"5tlin                                    00055200
  lin  CoNTH'uC                                                            00055300
      NrwBOn=)                                                            00055100
  lit  1=1+1                                                              00055500
      REAP CM.Ill) iniiTA(l,j).j=l.l6)                                   00055600
      IF  inATAii.ii-EMOA) iiiiii15H***** TOO FEU I.I3.19H) OATA10  CARDS  READI       00056600
  11»  CONTINUE                                                            00056700
      NCRRS=I                                                             00056800
      00  117 I=1,NHWTPS                                                  00056900
      NHU = DATAd.1l                                                    00057000
      00  IIP J=f),1                                                       00057100
      K = J-1                                                             00057200
      HUTRin(NHW.K) = DATAII.J)                                          00057300
  IUB  CONTHUE                                                            00037*00
      riuFl mj(NHU) = OATA(I>10)                                           00057500
      HUTEMP(NHW) = DATAII.11I                                           00057600
      HuDOIMHhl = DATA|I,12)                                             00037700
      HunODINMU)  = DATA!I.131                                            00057800
      HHCnNS(IJHW,l)=DATA| Iill)                                           00057900
      HbCnNS(NKW.2l=DATA(Iil5>                                           00038000
      HMCPNS(NHW,3)=OATA(I,16)                                           00058100
      OATnTINHU)=HWFLOU(NHU)                                             00058200
  117  CONTINUE                                                            00038300
      IF  (ILIST.EO.O) GO TO 133                                          00058100
      WRITE (MJi513)                                                     00058500
  513  FORMAT UHOtlOX.IOHtSS DATA TYPE  10  (HEADWATER  SOURCES) *S»./I     00038600
      U'MTF (NJt213)                                                     00038700
  ?H  FORMAT (inx.9HCARD TTPEiinXi23HHDWATER  ORDER  AND  IDCNTi           00058800
     *         hX.HlHFLOU  TEMP  P.O.   ROD CH-I  Cf-II CH-IIII          00058900
      WHITE (NJ,109| ((PATA|I,Jl.J=1.16ltI=liNCRDS)                      00059000
  ln<«  FOR"AT llPX.2A1iA2.5X.F5.n.?X,SA«.F10.1<6F6.1 I                     00059100
  <.?1  CONTINUE                                                           00059200
r
C                                       STEP  3-1OA
C                                       READ  IN DATA  TYPE IDA (HEADWATER
c                                       CHLOROPHYLL.  NITROGEN. PHOSPHORUS
C                                       COLIFORM  AND  RADIONUCLIOE CONDITIONS)
C
      00 15(10  1 = 1.11
      RF.AniM .l^Ol)  (OATA(I.J), J=1.12)
 l*in]  FORMAT I 3A1.A2.5X.F5.0.7F8.0)
      IF  (DATA(I.l)-ENDA) 1500.1502.1500
 ibrn  cr.NTiriiiF
      NFRRORiJ
      I = I«1
      RL»n('II.lc01)  (TiAlAd.J). J=1.12)
      IF  (OATA| T.I )-F"IIA| 1503,1501,1503

-------
      kRITF (NJ.1505) N
 1riO* FoKf«T <1H0.3X.16H*»«*»  TOO MANY  dI3t21H)  DATA IDA CARDS REAO)
      00 TO 1 •>()*•
 ISO? IF (I.GE.TI) no TO 1506
      IF(IUMA) 1520.1520.151(1
 15?P riCRDS=l
      6n TO 15SO
 1530 NFPMORsl
      N=II-I
      WHITE INJ.15071 N
 1507 FORMAT 11M0.5X.15H*****  TOO FEW  I.I3.21H)  DATA 10A CARDS READ)
 1506 CONTlNUF
      NCMnS=I
      DO 15nr. I-l.NHWTKS
      WIW=PATA(I.5>
      tldAI.C
-------
l*iP
     l\.Ci:PS=l
     L.D ibv I=1.NUASTC
     nws = I' ATAd.it I
     nn IbP J=f.,9
     K = J-u
     W>STlr>(Nws:.K)=n«TA|I.Ji
     CONTINUE
     TKFACT(NWS) = QATA(I.IO)
     WSFI OIMNUSI = DA1AII.11)
     ilSTrpip|Nu.«i) = nATAII.l?)
     USIIO(NWS) = DfTA(I.lJ)
     USPODlNh'S) = nATAMilt)
     WSCPNSn, A2,F'j.0.2X.5Ai»,F5. 2. F10.1.6F6. II
1601

16P?

Ufll


1607

1620

16?1

163R

i6un
162?
160"
                                                                   000614UO
                                                                   00061900
                                                                   00062000
                                                                   00062100
                                                                   00062200
                                                                   00062300
                                                                   000621100
                                                                   00062500
                                                                   00062600
                                                                   00062TOO
                                                                   00062BOO
                                                                   00062900
                                                                   00063000
                                                                   ooo63ioo
                                                                   00063200
                                                                   00063300
                                                                   00063100
                                                                   00063500
                                                                   00063600
                                                                   00063700
                                                                   00063BOO
                                                                   00063900
                                                                   0006«000
                                                                   0006*100
                                                                   00061200

                                   STEP  3-11A
                                   READ  IN  DATA TYPE 11A (HASTE INPUT
                                   CHARACTERISTICS AL6AE*  NITROGEN.
                                   PHOROPHOROUS COLIFORBS  AND RAOIONUCLIDE)
DO 1602 1=1.11
REAOINI. ifoii IPATAII.J). j=i.!2)
FOR«AT (3AU.A2.5X.F5.0.7F8.0)
IF (DATA(I.ll-ENDA) 1602. 1621 . 1602
CONTINUE
NERROR=1
1=1+1
HEAtMM. 16011 IPATA(I.J), J=1.12)
IF (t'ATAd.D-FNOA) 1605.1607,1605
M=I-II
WRITE (NJ.I620) N
FORMAT (1H0.5X.16H»»*»» TOO MANY  I.I3.21H)  DATA 11A CARDS READ)
GO TO 160»
IF (I.GF.II) GO TP 1604
IFITPATA) 16iOil6?0.16<»0
NCROS=p
GO TO 1650
NF:RROR=I
fl=M-I
WRITE (NJ.162?) N
FORMAT (1HQ.SX.15H***** TOP FEW  (.I3.21H)  DATA HA CARDS  READ)
CONTINUE
NCPHS=I
DO Ifcnf. I = 1,NWASTF
NUS=OATA(I,S)
WSAlO(NWS)=nAT>II.6)/ALPH«P(l)
WSNn2(NWS)=flAT«(I,B)
WSN03|NbS)=nATA(I,9)
    IS I NWS I =uATA 1 I . 1 0 )

-------
     uscni i TYPE HA  IUASTE  LOAD CHARACTERISTICS -
    • ?PH ai.GAF..MIIl K = l

Ifil? FriR»iATIinir.1au.A2.F6.0.1X.!>A'».5(<«x.Ff..2l.?F12.2>
1ftis CONI piur
16*S URITF  INJ.ir.12)  .J=lt3)
1699 CONTINUE
     URITE  (NJ.2055)
     FORMAT  IIHD
                                                                         00064300
                                                                         0006««00
                                                                         OD061500
                                        STEP <»-0                         0006*600
                                        IF THE CORRECT  NO.  OF DATA CARDS0006«700
                                        NOT BEEN READ IN.  THE PROGRAM uiooo6«aoo
                                        TERMINATE.
     IF  iriFRROR.tU.O)  GO TO 88(1
     WRITE  (NJ,?366I
PUf-6 FORMAT  (1H1.1SX.3MH* « • * • *
                      i3H. * . * • .
                  16X.3UH* E X E C U
                      53HR M I M A T
                  14Xi  1H».31X.SHO F<
                  16X.3UH*
                      33HI N P U T
                  lfeX,3tH» * * a » <
TION   UAS    TE.
ED   BECAUSE *,//,
31X.1H*.//,
  ERRORS    IN   ,
DATA              «.//.
     STUM
     RrTdlitl
     CNO
                                                                         0006*900
                                                                         00065000
                                                                         0006S100
                                                                         00065200
                                                                         00065300
                                                                         00063*00
                                                                         00065500
                                                                         00065600
                                                                         00065700
                                                                         00065600
                                                                         00065900
                                                                         00066000
                                                                         00066100

-------
SUBROUTINE NH3S*

          Subroutine NH3S completes the setup of the  equations  necessary
to calculate ammonia nitrogen concentration levels in each  computational
element.  Specifically, the subroutine completes the  definition of the
diagonal term of the coefficient matrix and defines the  vector  of known
terms on the right hand side of the equations.

          The additions to the diagonal term represent the  individual
constituent changes caused by constituent reactions and  interactions,
and mass changes caused by stream withdrawals.  The resulting diagonal
term for each type of computational element is:
          TYPE                       DIAGONAL TERM
     All except type 7           bi  =  Xi + (K7)i t
     7.  Withdrawal              bi  =  Xi + (K7)i t -  q0  ^p
                                                            i
where Xi is defined in Subroutine TRIMAT.

          The right hand side term contains all known inputs, which
include headwater inflows, wastewater discharges, tributary flows and
incremental runoff, and, in the case of dynamic simulation, the
concentration in the previous time step.  The known term for each
type of element for dynamic simulation is:
          TYPE                        RIGHT HAND SIDE
     1.  Headwater         $i  =  (Nj* + q! (1^)! ^ -  a1(N1)h

                               + a.pA.-At + a_ Ax —
                                  i   i      z    Vi
                                                   i

     6.  Waste Input       $i  =  (N,)* + qj (N^l &• + qw(Nx)w ^

                               + a.pA.-At + o, Ax —
                                  II           Vi
*AII symbols used are defined at the end of this section of the
 Documentation Report.
                                   IV-18

-------
          TYPE                        RIGHT HAND SIDE
                                      *    '      '  At1
     All  Others            S1  =  (N1)i + q<  (N,).  £7 + c^
For steady-state simulation, the only difference is that the value from
the previous time step, (Nx)., is set equal  to zero.

          The subroutine flow chart is illustrated in Figure IV-11
and is followed by the program listing.   All program variables contained
in COMMON are defined in Section V.
                                   IV-19

-------
                                            (ENTRY      ^
                                        SUBROUTINE NH3S    I
                                          INITIALIZE
                                          COUNTERS AND
                                        CONVERSION FACTORS
                                                           00 conpuuiions
                                                           from i to b for
                                                           ill computational
                                                           elements
                                         INITIALIZE KNOWN
                                         TERM AND DIAGONAL
                                       TERM FOR STEADY STATE
                                       OR DYNAMIC SIMULATION


TYPE 1
ADD HEADWATER
INPUTS TO KNOWN
TERM. 5(1)








TYPES 2. 3. 4. i

CONTINUE









TYPE 6
ADO WASTEWATER
INPUTS TO KNOWN
TERM. 5(1)








TYPE 7
SUBTRACT STREAM
WITHDRAWAL FROM
DIAGONAL TERM. B(l)


                                           RETURN
                                           TO QUAL
FIGURE  EZ-11
FLOW  CHART  FOR  SUBROUTINE   NH3S

-------
r
c
             TTTLE(?n.20).RCHID(75.5).RMTHOR(7!>).Rr'TEOi»(75).NHWWAR(15),         »NEW
             Tnnr.Nu(75(.IAUGOK(75,f.) .NCCLRH(75).IFLAG(75.20) .                    *NEw
             ICinPO(7r..?0).COEFOV(7'i).EXPOQV(75).COEF<»H(751.EXPOOH(75>.         (NEW
             CBANHI7S) .CK1I7S) ,CK3(75) ,K20PT ( 751 , CK2( 7SI .COEOK2(75) .            *NEW
             EXPQh?(7'i).TINIT(7«i).OOINIT(75).noINIT(75I.COINIT(75.3).           »NEU
             Q I (75 1 ,TI (75). DDK 7S).RODI( 7-5).CONSH75i3) .JUNCIDl 15.51 1           .NEW
             JUMrilS,'M.HKTRID{15.5>iHWFLaW(15).HWTEMP(15liHWDO(15).            *NEW
             hwno'Ml-i) ,HWCONS.Tt.WSFLOW(90),         «NEW
             WSTC.MP 1 90 ) , usoo (9oi. usnon 1901. USCONS ISO.SI.QATOTIISI.              *NEW
             fl(cnn> .Risoni .cisnn) .0(5) ,scioo),Z(SOO),w(500).Gi500i .             *NEW
             FLtiWCiOO) .rFPTH(500I.VFLCinO),OTOVCL(SOOI.K2(500).Kl(5nOI ,         *NEW
             HSMET ( 500 ) . DL ( 500 1 . UHW ( 1 5 1 . OEPHW I IS ) . OLHU ( 1 5 ) . T 1 500 ) .              *NEW
             HOIb')0).PU(!lbaO)iCONS(SOn.3)iPHOSIT(79).CNH3IT(75)<              *NEW
             O.'0?l r(7?).CN03IT(75),JSCOLI(90).USALG|90),USPHOS|90>,             (NEW
             USNM3(90).WSN02(90)iW5N03(90)tHMCOLI(15)tHUALG(15li                *NEW
             HWPHOS ( 15 ) . HWNH3 ( 1-j ) , HUN02 ( 1 5 1 , HUN03 ( 15 )• GROWTH ( 500 ) i              *NEU
             MOCOP T ( 10 ) . IRCHNO 1750) , EXCOEF ( 75 )                                   *NEW
                                                                                 *-29
           KMH3
C
C                             INITIALIZE COUNTERS
C
      NHU=0
      IIWS=0
      FACT = l.P /  (20.3  •  66100.01
C
C                             LOOP THROUGH REACHES AND CONP. ELEMENTS
C
      00 100 Isl.NKEACH
      NCri_K=NCLLHH(I)
      CNCELR=rlCF.LR
      CNH3I J="I ( I ) /CNCELR»CMH3I ( I )
      00 100 J=1,NCCLR
      IiJPrlCLnPM I. Jl
C
C                             INITIALIZE DIAGONAL AND KNOWN TERMS
C
      IF IPTIOOPTCD.EC.O)  ALGAE(IOR)=0.0
      K.MII^I 10R)=ChllH5( I)»l.OH7««TC

-------
      K'-nrTz.ll I MM • ("•fPkWt tORl »«LG«rnnM»niLT + <;N(m I I»PELX«
             r.rovri. ciii >  > FACT
      *l 1 '"•>=»( Inr. IOlLT«KNh<( i
      Si irn I=CM
       ir  iiss. r,T.o>
      si ini. ]-•,( ron)»
       IfLrll L"G( I. J)
r
r                              hQnlFY OIAbONAL  RMtl/OR KMQW4  TERHS
c
      (-•j  IP  (ioi . lun.ioo. iaOiion.iD3,iot)i  IFL
C
  1 11 ?»• I-' MW»1
      S ( I "h i =S » T1!' ) - A H PR ) «h«HH'1 t HHW >
      Gl  If  100
C
                                         (MWSI*DTOVCLI 10HI
      RO  Til  100
      PI inn 1=11 1 IOP)-W<=)-'LOU(NWSI«DTOVCLIIOR)
  inn C')!"Ttr'liF

-------
SUBROUTINE N02S*

          Subroutine N02S completes the setup of the equations necessary
to calculate nitrite nitrogen levels in each computational  element.
Specifically, the subroutine completes the definition of the diagonal
term of the coefficient matrix and defines the vector of known terms on
the right hand side of the equations.

          The additions to the diagonal term represent the  individual
constituent changes caused by constituent reactions and interactions,
and mass changes caused by stream withdrawals.  The resulting diagonal
term for each type of computational element is:
          TYPE                      DIAGONAL TERM
     All except type 7          b-j  =  XT + (K^ At
     7.  Withdrawal             b1  =  x1 + (KB)1 At - q0 ^7

where x^ is defined in Subroutine TRIMAT.

          The right hand side term contains all known inputs, which
include headwater inflows, wastewater discharges, tributary flows and
incremental runoff, and, in the case of dynamic simulation, the
concentration in the previous time step.  The known term for each type
of element for dynamic simulation is:
          TYPE                         RIEHT HAND SIDE
     1.  Headwater         Sj  =  (N*)i + qj  (Njj & - a,   (Na)h +  (K?Nl)1 At

     6.  Waste Input       Si  =  (<). + qj  (N^ ^- qw  (Ma)w ^ +  (K7H1)1 At

     All Others            Sj  =  (N*)1 + q!  (N^. f^+ (K7N,)1 At
*AII symbols used are defined at the end of this section
 of the Documentation Report.
                                   IV-20

-------
For steady-state simulation, the only difference is that the value from
the previous time step, (H*)-, is set equal  to zero.

          The subroutine flow chart is illustrated in Figure IV-12 and
is followed by the program listing.  All  program variables contained in
COMMON are defined in Section V.
                                   IV-21

-------
                                    (ENTRY     A
                                 SUBROUTINE N02S   I
                                  INITIALIZE
                                  COUNTERS AND
                                CONVERSION FACTORS
                                   f-H
                   DO cooputittons
                   from a to b for
                   all computational
                   elements
                                  INITIALIZE KNOWN
                                 TERM AND DIAGONAL
                                TERN FOR STEADY STATE
                                OR DYNAMIC SIMULATION


TYPE 1
ADD HEADWATER
INPUTS TO KNOWN
TERM. S(I)








TYPES 2. 3. 4. 5

CONTINUE









TYPE 6
ADD WASTEUATER
INPUTS TO KNOWN
TERM. S(I)








TYPE 7
SUBTRACT STREAM
WITHDRAWAL FROM
DIAGONAL TERM, B(I)


                                   RETURN
                                   TO QUAL
FIGURE  EZ-12
FLOW CHART  FOR  SUBROUTINE  N02S

-------
COll'Of TITLC C»).an),KCHln(7*.S).R«lTHOR<7S).RNTEOR(7S).NHWWARd5).
       TBKr|iU(7*I.IAUr,OK(7S.M.NCELRH(7I>).IFLAG<75.20l.
       ICLi)RJ(7S.?n).COFFQ\M7S),FXPn(JV(7'5).roEFOH(75).EXPOQH(75l .
       OA«( l75I.C)>l(75>.rK3l75),K?nPT(75>.CK2<75>tCOEQK2(75).
       I kPnK^(7^l,TINIT(7S)iOOIMIT(7S)iROlNIT(75).COINITI75i3li
       0)(7bl . TI175) .1>OI(7^>.BOOI(75) .CONSK75.3) .JUNCIDdS.S).
       J|iK>C( LK,3),HWTRID(l*.5).HWFLnW(15).HWTEMP(15)iHWnO(15>.
       HUP'lli 1 i) .HkCONSI 11,3) ,WASTin(40i5l iTRFACT(90) .WSFLOWI90) .
                    mO( 901 ,USOOD( 90). WSCONSl 90,3). QftTOTl 15)i
                 -jnu) ,C.SC;00>.2lSOO) ,U(500> ,G(500) .
                 .rrPTH(bon),VFL(500),orOVCL(500),K2(500) ,K1(500) .
       HSI»F T < «.0 0 ) , 01. ( 500 ) , VHU ( 1 ? ) , DFPMU ( IS ) . DLHW ( 1 5 ) < T I 500 ) i
       no ( 5ii J I , f»n ( SO o ) . CON'S 1 500 • 3 1 . PT IME . TPR INT . DELX ,
       NilUTI.o.'JPLACH.NUASTr.NJUMC.DFLT,niLT.r>2LT.nTOOX2,OT20DX,
       LflT,LiM,LLM,rLEV.O((T.flF,PF.,nnYOFr,nRYRLB.UETRt.B.DEWPT,
       ATKPK.UiriD.CI OUn.SONFT.NI.NJ.TRLCD.TOFnAY.NT.NCiTIHEiNCS
                             ) .CKNHK75) .CKN02I75).CKNOS(75).
       CKN.CKP.TKl ,ALPMAO(75| .ALPHA1 , ALPHA2, ALPHAS. ALPHA*.
       ALPHAS. AI.PHA6 i GRO^AXiRCSPRTf AL6SET ( 7S) , SPHOS ( 75 ) .
       SMHJI ?^l .KMH3I50UI ,KNO?(500).RESPRR(S001.COLI(500) .
       ALPAclSqn>.PHnS(5on)tCNHS(SOO) WSN03 (901. HWCOL 1 1 15 > . HUALG ( 15 ) .
       HUPHO j < 15 ) . HWNH31 1^ | , HWN02 ( 15) . HUNOSf 15 ) i GROWTH) 500 ) .
       VOPOP Kin), IHCHNOI 750 ) , EXCoEFI 75 )
• NFW
»NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• NEW
•NEW
• NEW
• NEW
• NEW
• NEW
• NEW
• -29
Cnrt»0li/SSTATC/XISOO).ISS
     Kf02, KI.H3
NHW=0
rjus=u
00 IdO I=1.NREACH
NCFI P=UCELPH(I)
CPICl'LRzNCELR
ci OPIJ=OK i i/cr.TEL
no 100 J=i.t CFLP
inuriri oprd.ji
                        INITIALIZE COUNTERS
                        LOOP THROUGH REACHES AND COUP.  ELEMENTS
                        INITIALIZE DIAGONAL AND KNOWN  TERMS
Tr = ."'.5'i6»(T( 10RI-f.B.O)
K|i09|ICIK)=Chl.P?(I)»l .OU7*«Tr
WEAfT=illLT«hi\.HT( IOR»Cr'H)( IOR)
B( inB)=xiini'i«nlLT»KMO?i ion)

-------
      S( |(>«|=r'J(>
      IF  IISS.GT.O)
      si ini'i=si 7T»)+nr,\rT*CNn2ij»nTovrL( IORI
      IFl zlFl nr,( I,j)
c
r                             HOniFY 01A60NAL  ANP/OR KNOWN TFRNS
r
      en  TO  iJoi ,ioo,iuo,iou.lon.lm,irm).  IFL
c
  1C1 NM>j=rilik-»l
      s(inn > =s11OP)- A(IOR)*HUNO?(NHW)
      oo  TO  inn
c
  10? MWSrNUSH
      S( lfKI=SI ToO-iW^Fl oU(NWS)*WSNn2  (NUSI*DTOVCLIIOR>
      GO  10  100
c
  101 NWSrNWS-tl
      B(TOR)=H(IOR)-UKFI OWI NWS)»DTOVCL(IOR)
  inn CONTINUE
      RFTHHM

-------
SUBROUTINE N03S*

          Subroutine N03S completes the setup of the equations necessary
to calculate nitrate nitrogen levels in each computational element.
Specifically, the subroutine completes the definition of the diagonal
term of the coefficient matrix and defines the vector of known terms
on the right hand side of the equations.

          The additions to the diagonal term represent the individual
constituent changes caused by constituent reactions and interactions,
and mass changes caused by stream withdrawals.  The resulting diagonal
term for each type of computational element is:
          TYPE                         DIAGONAL TERM
     All except type 7               b^  =  x.
     7.  Withdrawal                  b^  =  xi - qQ ^-
where x.. is defined in Subroutine TRIMAT.

          The right hand side term contains all known inputs, wnich
include headwater inflows, wastewater discharges, tributary flows and
incremental runoff, and, in the case of dynamic simulation, the
concentration in the previous time step.  The known term for each type
of element for dynamic simulation is:
     TYPE
1.  Headwater       S^ = (N*). + q^N,). £-- ^(H3)h + (K8N2)i At -

6.  Waste Input     S. = (N*). + q!^). Jf + qw(N3)w^- + (K8N2). At

All Others          Si = (N*). + q^Nj. + (K8N2)1  At - o^y.A^t
*AII  symbols used are defined at the end of this section
 in  the Documentation Report.
                                   IV-22

-------
For steady-state simulation, the only difference is that the value from
                          *
the previous time step, (N3)., is set equal  to zero.

          The subroutine flow chart is illustrated in Figure IV-13 and
is followed by the program listing.  All  program variables contained in
COMMON are defined in Section V.
                                    IV-23

-------
                                           (ENTRY     ^
                                       SUBROUTINE HOJS    I
                                         INITIALIZE
                                        COUNTERS AND
                                      CONVERSION FACTORS


INITIALIZE KNOWN
TERM AM
DIAGONAL
TERM FOR STEADY STATE
OR DYNAMIC SIMULATION
                                                         DO confutations
                                                         from > to b for
                                                         all coTOiitatlonal
                                                         • lenmti
                                          DETERMINE
                                      TYPE OF COMPUTATIONAL
                                          ELEMENT


TYPE 1
ADD HEADWATER
INPUTS TO KNIWN
TERM. S(I)








TYPES 2, 3, 4, 5

CONTINUE









TYPE 6
ADD UASTEWATER
INPUTS TO KNOWN
TERM. S(I)








TYPE 7
SUBTRACT STREAM
WITHDRAWAL FROM
DIAGONAL TERM, B(l)


                                          (RETURN      \
                                          TO QUAL       I
FIGURE   EZ-13
FLOW  CHART  FOR  SUBROUTINE  NO3S

-------
SURKI'ilTINF
T»P'.riUI75).IAUGOR(7!>.6>.NCELRHI75>.IFLAG(75i20)i
IClOI-UI7*.?OI.COEFrWt75l.£XPOUV(75>.COEFOH<7'il.EXPOOHI75).
CMAfjr (7"i) .CM I7«S) .CK3l75).K!>r>Pn75) .CK2I7S) ,COEOK2(75>.
FXPOK,M7?>.T1NITI7'') .OOIMITI75).BOINIT(75) .COINIK7S.3).
UII7M ,TI I7S) .DOK7-S) .RODII7SI .CONSK75.3I.JUNCIO(15.5) .
Jl;tirtl5.3) .HUTRIUI15.5),HUFLOU<15).HWTEHP(15> .HWDOI1P) .
          HHCONSU*. J),UASTin(90.S) ,TRFACT<90(,WSFLOW(90).
          .USDOI90) .WSBODI90) .WSCONSt 90.31 . OATOT 1 15) .
A(*nD),n(>.>OOI.C(50ni.D(5>.SI'inP).Z(500>.UlSOO>.G(500).
FLOWlSOO) .DEPTHI 500). VEL( 500) .DTOVCLI 500). K2 ( 5001, Kl( 500)i
HSNET(50n),nt('inOI.VHW(lS),nEPHU|l'i)tDLHU|lS)tTISOO)i
riOCSOO) .PUP(SOO) iCONSISOO.?! .PTinE.TPRINT.OELX.
MI'WTRS.NPEACH.NWASTE.NJUNC.nELT.OlLT.nZLT.DTOOXZ.DTZODX.
LAT t LsM , LLH . ELEv • DO T . »E . BE , nAYOFY . DRYBLB. UETBLB iDEUPT .
AT"PR.WINU.CLOUn.SnNFT.NI.NJ.TRLCO,TOFOAY,NT.NC.TIHE.NCS
       CKHI75I .CK5I75).CKNH3(75).CKN02«75I .CKN03I75).
CKM , CKP , CKL . ALPHAO 1 75 1 . ALPHA1 . ALPHA2 . ALPHAS • ALPHA^ .
ALPHAS, ALPHA6,GROM«X.RESPRT.AL6SET(75).SPHOS(75).
SNHS(75),KNH3(SOOI.KN02(500I.RESPRR<300I.COLI(500),
ALGAE ( 500 ) ,PHOS 1 500 ) iCNHS 1 500 1 , CNO? 1 500 1 .CN03 1 500 ) •
COl IRI75) .ALGII75) .PHOSI(75I,CNH3I(73).CN02I(75).
CN03K7S) ,COLIIT(7'i).ALGIT(75I.PHOSIT(75).CNHSIT(75t.
CNO?IT(75).CN03IT(75).WSCOLI(90),USALG(90I,WSPHOS(90).
US^lH3(qO).USNO^(90) , WSNOS<90>.HUCOLI113)>HWAL6<1S>>
HUPHOSH5I .HWNH3ll'i).HWN02(T'5).HUN03«15),GROWTHI500),
MOnnPT (10). IRCHNO I 750 I . EXCOEF ( 75 1
                                                                           *NEH
                                                                           «NFW
                                                                           »NEW
                                                                           (NEW
                                                                           »NEW
                                                                           *NEU
                                                                           *NEW
                                                                           *NEW
                                                                           *NEy
                                                                           *NEW
                                                                           *NEW
                                                                           »NEW
                                                                           *NEU
                                                                           »NEU
                                                                           *NEU
                                                                           *NCU
                                                                           *NEU
                                                                           •MEM
                                                                           *NEU
                                                                           *NCW
                                                                           *NEW
                                                                           *NEU
                                                                           »NEW
                                                                           »NEU
                                                                           *NEW
                                                                           »NEU
                                                                           *NEW
                                                                           *NEW
                                                                           *NEW
COMPOM/SSTATE/XISCOIiISS
REAI  KNO?
NHW=0
NWS=0
                       INITIALIZE  COUNTERS
                       LOOP  THROUGH  REACHES AND COUP. ELEMENTS
00 10(1 I=1,NRFACH
NCEI R=NCEI RH(I)
CMCELPsNCCLK
Cil03IJ=C] ( I ) /CNCELR»CN03I < I )
no 100 J=1,NCEL"
IOP=ICLORO|I.JI

                        INITIALIZE  DIAGONAL AND KNOWN TERMS

IF (hOOOPT(
-------
      IF
      Si ipwisSdnp. I*HF flcT»ciMO3u*nTo«ru( TORI
      I(L=IFL»G< l.JI
c
C                             MOniFY DIAGONAL AND/OR KNCWN  TERMS
r
      GO TO  <1 0] ,10(1,1 0(1,100,100,101,104) . IFL
C
  IP] WHW=fJHU*l
      SIIpR)=5lIORI-«(IQRI*HWN03(NHW)
      Gn TO  1DO
c
  mi NWS=WJS+I
      S(IORI= SI I OP 11WSFlOW(NWS I•WSN03 (NWS)*DTOVC L(IOR)
      no rn  ice
c
  101 NJS=NWS»1
      8(lnRI=Fl( IORI-WSFinw(NWS)«DTOVCLiIOR)
  109 CONTINUf
      RETURN
      END

-------
 SUBROUTINE P04S*

          Subroutine P04S completes tne setup of the equations necessary
 to calculate phosphorous levels in each computational element.  Specifically,
 the subroutine completes the definition of the diagonal term of the
 coefficient matrix and defines the vector of known terms on the right hand
 side of the equations.

          The additions to the diagonal term represent the individual
 constituent changes caused by constituent reactions and interactions, and
 mass changes caused by stream withdrawals.  The resulting diagonal term
 for each type of computational element is:
          TYPE                            DIAGONAL TERM
     All except type 7                  b.  =  x..
     7.  Withdrawal                     b.  =  x1 - q. ¥•

 where xi is defined in Subroutine TRIMAT.

          The right hand side term contains all known inputs, which
include headwater inflows, wastewater discharges, tributary flows and
incremental runoff, and, in the case of dynamic simulation, the
concentration in the previous time step.  The known term for eacn type
of element for dynamic simulation is:
     TYPE
1.  Headwater       Si = P* + q'P' £- - a.Ph + a2 (p-u.) a.At + a3Ax £-

6.  Waste Input     S1 = P* + (q'P1  + qwPj 77- + a2 (p-y.)  a.At + 03Ax £f
All  Others          S. = P. + q'P'  Jl + a2 (p-u.) a.At + a3Ax —
                                    i                          vi
*AII  symbols used are defined at the end of +his section
 of the Documentation Report.
                                     IV-24

-------
For steady-state simulation, the only difference is that the value from
                         *
the previous time step, PI,  is set equal  to zero.



          The subroutine flow chart is illustrated in Figure IV-14 and

is followed by the program listing.  All  program variables  contained in

COMMON are defined in Section V.
                                    IV-25

-------
                                              (EIITRY      ^
                                          SUBROUTINE P04S    J
                                            INITIALIZE
                                            COUNTERS AND
                                          CONVERSION FACTORS
                                                              DO confutations
                                                              from t to b for
                                                              all computational
                                                              elcnents
                                           INITIALIZE KNOWN
                                           TERM AND DIAGONAL
                                         TERM FOR STEADY STATE
                                         OR DYNAMIC SIMULATION


TYPE 1
ADD HEADWATER
INPUTS TO KNOWN
TERM. S(I)








TYPES 2. 3. «. 5

CONTI NUT-









TYPE 6
ADD WASTEWATER
INPUTS TO KNOWN
TERM. 5(1)








TYPE 7
SUBTRACT STREAM
WITHDRAWAL FROM
DIAGONAL TERM. 8(1)


                                             (RETURN       \
                                             TO QUA!       I
FIGURE  E.M4
FLOW  CHART   FOR   SUBROUTINE  P04S

-------
      SUPnr.UTINF
c
c
             TITLE(?n.20).RCHID<75.5I.RnTHOIM75).Rl":TEOR<75).NHHW*Rll5l.          *NEW
             TflRGHOf 7-U,IAUGOR(7Si6>iNCEL*H<75>. IFLAGI75i20>.                    «NEU
             lCLORl)(7ISt;>0>tCnEFnv(75)iEXPOQVf75)iCOEFaH(75liDOINlT(75I.BOINlT(751.COINITI75.5l «            »NEw
             131175) iT 1175) .001(75).BOPII75).CONSII 75,3)i JUNC1DI1S.5I •            *NEW
             JUNC(15.3),hUTRIDM5i5l .HUFLOUI 151 iHHTEMPf 151 iHUDOUS11             *NEu
             HWBOO(151.HWCONSHS.3),UflSTIO(90.5l,TRFACT<90l,WSFLOW|90).          .NEW
             USTfMPf SO 11USUO(901•USBOO190).WSCONS19D•31< 8ATOTI\S>•               *NEU
             A(500I.H(bOO)tC(5on)iD<5).S(SOO)iZ<500)iW(5DOI«6(50B)'              *NEW
             FLOU(bOO) iDEPTHISOO) iVEL(SOO) iDTOVCLCiOO)tK2(500) tKKSOO) i          *NEW
             HSNETCia(U,nL(500I.VHW<15l,OEPHMU5I.OLMH15t.T<500)«               *«EU
             DOI500),noO(500».CONS(SOO,3).PTinE,TPRINT,DELX,                     (NEW
             NHWTRSiNRE«CHiNWASTEiNJUNCiOELT.01LTi02LTiOTOOX2tDTZOOXi            *NEW
             LATiLSIiLLn.tLEVtGATiAEtBEiOAYOFT.ORYRLBtUETBLatDCUPTi              *NEU
             ATMPR.yjMDtCLOUP.SONET.NIiNJtiaLCO.TOFOAT.NT.NC«TINE.NCS            *NEW
C                                                                                *NEU
C                                                                                'NEW
      COn»ON/MODIF/ CK               *NEU
             CKN.CKP,CKL.ALPHAO(75),ALPHA!•ALPHA2.ALPHAS,ALPHA*.                 *NEU
             ALPHAS.ALPH46.6RCm«X.RESPRT.AL6SET(75>,SPHOS(75».                   *NEW
             SNH3|75).KNH3(500).KN02(30ai.RESPRR(300),COLIl500».                 »NEW
             ALGAE(SOO).PHOS|SOO)iCNH3|500)iCN02|SOOIALGITl7S)tPHOSTTIT51.HUNM3U5»
      OIIOR)=X(IOR)
      IFIISS.GT.1) S(IORI=0.0
      PSORrF=SPHOStl|«DELX*DTOWCL(10R» • FACT

-------
             r  AU'H/l?. (KrSPRRtJOP ] -GROWTH! 70R) I »C1LT
      !>( inl>)=M I OK )+PHOSIJ»nTOVri < ION I *RE*CT« ALGAE ( I OR ) +PSOPrE
      IFL=IFLAR|[,J|
C
C                             HOPIFY DIAGONAL  ANn/OR KNOWN TERMS
C
      on in  ( 101 ,iuo. too, 100, 100, loi.ioni ,  IFL
C
             =  
-------
SUBROUTINE RADIOS





(Not Programmed)
          IV-26

-------
 SUBROUTINE REAERC*
           Subroutine  REAERC  determines  the  reaeration  coefficient for
 each  computational  element through  the  use  of  any  one  of seven
 different procedures.   However,  the same  procedure must be  used  for
 all computational elements within an individual  reach.   The choice of
 which procedure  to  use  is controlled by input  options  for each reach.
 The seven options,  procedures, and  references  are:
      3.
           OPTION &  PROCEDURE
          Read-in K2 values
    K2 = 5.026
  jO.969
  ,1.673
                             2.31
                   k0.5
                m
       86,400
                                        REFERENCE
                                        None
Churchill  et al (1962)
                                        0'Conner and Dobbins (1958)
     4-
                   0.67
u
D"
                                        Owens et al (1964)
5.   K2 = 10.8(1  + /F)
     6.  K, = 3.3  If     x 2.31
     7.  K, = aQ
                                2.31
                           Thackston and Krenkel (1966)
                                        Langbien and Durum (1967)
                                        None
where
          u
          D
           m
            velocity (feet/sec)
            depth  (feet)
            molecular diffusion  coefficient (2.25 x 10"8 ft2/sec)
*This subroutine is unchanged from the original version of QUAL.
 All  symbols used are defined at the end of this section of
 the Documentation Report.
                                      IV-27

-------
              =   Froude  Number   =   u//Dg
           *  =   shear velocity (ft/sec)
              =   u  n   /1.49  D1'167
          g    =   acceleration  of gravity (32.2  ft/sec2)
          n    =   Manning's roughness  coefficient

          The subroutine flow  chart is  illustrated in  Figure  IV-15  and
is followed  by the program listing.  All program valuables  contained  in
COMMON are defined in Section  V.
                                     IV-28

-------
                                             (ENTER     A
                                         SUBROUTINE REAEHC  J
                                                           DO COMPUTATIONS
                                                           FROH a, TO b
                                                           FOR STREAM REACHES
                                          SET Kj OPTION
                                       FOR ALL COMPUTATIONAL
                                         ELEMENTS IN REACH
                                                           FOR ALL COKPUTAT1CWAL ELEKCKTS
                                                           WITHIN THE STREAM REACH


OPTION 1
SET Kg EQUAL
TO VALUES READ-IN








QPTJOIlS 2-7
CALCULATE Kj


                                           RETURN
                                           TO DUAL
FIGURE   E-15
FLOW  CHART   FOR   SUBROUTINE  REAERC

-------
   ORUI INF
                                TAN  CITHER  REDO IN RFAERATION
                        CnFFFlCIFNTS  (OPTlONl)t  COMPUTE THEM
                        USING  A  SELECTED FOLIATION (OPTION 2.3.
                        4.5. ANP 61•  OR COMPUTE  THEM BASED ON
                        K9=A>Q«*R.  ALL K?'S   ARE TO THE BASE E.
       TITLFI?0.20>,RCHIOl7li.5>.l*MTHOR|75).RMTEORI75I.NHWWARI15).
       ™PGnut75) , IAII&ORI 75.6).Nrri_RH( 75) .1FLAGI 75.20).
       ICl ORUI 7*i.?0 I .rOLFOV<75> iFXPOQVI 751 .COEF8H1 75) .EXPOQHI 751 i
       CMA'ir'(75> .CK1I7-J) ,CKS(75).K?OPT<75) .CK2<75) .COEOK?I 75).
       rxPQH2(7-i),TINlT(75).nnlMIT|75).BOINIT(75).COINIT<75.3).
       '•'I (75 I. TT( 7-5) ,001(751 ,ROr.I<75).CONSI (75.3) .JUNCIDI 15.5).
       .IUNC (IS, Jl.HUTR 10(15.5) .HWFLPWI15) ,HWTEMP( 151.HWOO( 15).
       MWPr>C(15),HWCONS(15.3>,UASTID<90.5).TRFACT(90>.USFLOW(90)t
       WSTCMP (90 ). USOO (90 I . WSROP < 90 I , USCOriS (90 .3) . OATOT ( 15) t
       A(?noI,H(500>,C(500 I,DIM,5(^001.Z(5001.W(5001.6(500).
       FlOU(bOO),DFPTH(50n|,VF.l(500).DTOVCL|500),K2(500).Kl<500).
       HSNFT<«iOn),CL<5nOI.VHW2| lOD=rK?I 1 I
                                00002500
                                00002600
STEP 1-0                        00002700
LOOP THROUGH SYSTEM OF NREACH RC00002BOO
AMD NCELR COMPUTATIONAL ELENENTSoooo290o
REACH.                          00003000
                                OOOOS100
                                00003200
                                00003300
                                00003«00
                                00003500
                                00003600
                                00003700
                                00003800
STEP 1-1                        00003900
SFLECT K2'S FOR ANY OPTION AS DE00001000
BY REACH.                       00001100
                                00000200
                                00004300
KOPT =1  K2 IS READ IN.        00004400
KOPT = ?  CHURCHILL (1962)      00004500
KOPT = 3  fl'CONNER - DOBBINS 11900004600
KnpT = i.  nuENSt EDWARDS. - GIBH00004700
KOPT = 5  THACKSTON - KRENKEL (100004AOO
KOPT = t  LANGRIEN - OUHUK (196700001900
KOPT =7  K2 = A • Q «« P       00005000
                                00005100
                                00005700
                                00005300
                                         • NEW
                                         *NEU
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         *NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • -16

-------
    CO TO inn                                                          OOUO'ilOO
IP? K?<.026vCL(IOR)*CMANN(I)/(l.i>9*OEPTH(IORI**1.167l           00006300
    l-2(TUPI=in.ei«(l.n*SeKT(F I I*SHRVEL*2.31                             00006«00
    r,o TO ino                                                          00006500
inf. K2IIOI. )=S.S«VFLI inR)/OrPTll(IOR)**1.133»2.31
    GO TO 100                                                          00006700
107 K2(!CR)=CPcOK2
-------
SUBROUTINE SOVMAT

          Subroutine SOVMAT remains unchanged from the original  version
of QUAL as documented by the Texas Water Development Board (2).
According to reference (2):
               Subroutine SOVMAT solves a system of simultaneous
          linear equations whose coefficient matrix is of
          tridiagonal form by using a modified Gaussian Elimination
          algorithm.
The solution algorithm is presented, in detail, in Report 128 of the
Texas Water Development Board (1).  The subroutine flow chart shown
in Figure IV-16 is taken from reference (2).  The program listing
follows the Figure.
                                   IV-29

-------


INITIALIZE
COUNTERS


                           ,2-0
                         HAY
                       WAT IONS FOR
                      ALL ELEMENTS BEEN
                        OPERATED
                          ON'
                                                  HAVE
                                               EQUATIONS FOR
                                              All ELEMENTS BEEN
                                               SOLVED BV BACK
                                                SUBSTITUTION
FIGURE Iff-16
FLOW  CHART FOR  SUBROUTINE  SOVMAT

-------
   SlIHiOUTINF SOVKAT
                           SOVMAT SOLVES A SYSTEM OF SIMULTANEOUS
                           LINEAR EQUATIONS WHOSE COEFFICIENT
                           MATRIX IS OF TRIDIAGONAL FORM USING
                           A MODIFIED GAUSSIAN ELIMINATION TYPE OF
                           ALGORITHM.
   COMMON TITLEC20.20).RCHIOI75.S>.RMTHOR<75).PMTEOR<75I.NHWWAR»15I.
          1APr,DO( 7^1 tIAUGORt 75.61 iNCELRHI 751. IFL«G(75.20),
          ICLORUI75•20 11COEFOVI 75).EXPOOVI 75»•COEFQHI751.EXPOOHI75)•
          CMANNI75>.rKl(7SI.CK3<75I.K20PTIT5I.CK2l7S).COEOK2<75).
          EXPOK2(7*I.TINIT<7'!)«DOINITIT5>,BOINITI75I,COINITC75.3).
          01(75). TI(75)«DOl<75»«BODIl75I.CONSII75.3l«JUNC10<15«5li
          JUNC<15.3).HWTRIDI15.5).HWFLOWI15).HWTEHP|15».HWOOC13I,
          HWPoni151.HWCONSIIS.'I.WASTIDI90.5)iTRFACTI90l.WSFLQWI90).
          WS1E-HPl90).WSDO<90l.WSBOD«90I.WSCONS<90.3l,OATOT(15l,
          A( «ifln).B( 500 ).C (500) .0(5) .8(5001.Z»500).W(3001.6(500).
          FLOW<500).DEPTH|500)«VEL(500I.DTOVCL(500).K2(500>,K1(500»,
          hSNET(500».DLI500l,VHW(15) .DEPHWdSI «DLHW(15)  i
          P0(500(.800(500).CONS(500.3).PTIME.TPRINT,DELX,
          NHUTRS.NREACH,NWASTEiNJUNC.OELT.DlLT,D2LT,OTODX2.DT20DX.
          LAT.LSM.LLM.FLEV.OAT.AE.BE.DAYOFY.DRTBLB.UETBLB.OEWPT,
          ATfPR.WIND.CLOUD.SONET.NI.NJ.TRLCD.TOFDAY,NT,NC.TIHE.NCS
    OIMFNSION  IFLGlSOO)
    IJUNC=0
    00  100  I=1.NKEACH
    NCELR=NCELRH(I)
    00  100  J=1,NCELR
    IOR=ICLORP(IiJ)
    IFL=IFLAGII.J)
    IFLG(IOR)=IFL
                                00002500
                                00002600
STEP 1-0                        00002700
INITIALIZE COUNTER FOR STREAM JU00002800
                                00002900
                                00003000
                                00003100
STEP 2-0                        00003200
LOOP THROUGH SYSTEM OF NREACH RE00003300
WITH NCELR COMPUTATIONAL ELCKCNTOOOOBOOO
REACH.                          00003500
                                00003600
                                00003700
                                00003800
                                00003900
                                00001000
                                00004100
                                00001200
                                        *NEW
                                        • NEW
                                        • NEW
                                        • NEW
                                        • NEW
                                        • NEW
                                        • NEW
                                        • NEW
                                        • NEW
                                        • NEW
                                        • NEW
                                        • NEW
                                        • NEW
                                        • NEW
                                        •NEW
                                        • NEW
                                        •-16
    GO TO 1101,102.102,103,10?,102.1021,  IFL
101  W(IOR)=C(IOR)/B(IORI
    G{TnHI=S(IOR)/B(IOR)
    Cfi  TO 100
                                00001300
                                00001100
STEP 2-1                        00001500
OPERATE ON EQUATION FOR AM ELEME00001600
TYPE 1.                         00001700
                                00001BOO
                                00001900
                                00005000
                                00005100
                                00005200
STEP 2-9                        00005300

-------
10? OrNriHsFM IPR|-l\(tOR)»U(IOR-tl
C                                       OPERATE ON EQUATION FOR ELEnFfJTSOOOOSlOO
C                                       2.3,5.6, On 7.                  00005500
                                                                        00005600
                                                                        00005700
                                                                        00005800
      GI rnRi=is< irmi-fl(ioR)*G( inn-i t i/OENnn                             00005900
      GO TO 100                                                         00006000
C                                                                       00006100
C                                       STEP 2-3                        00006200
C                                       OPERATE ON EQUATION FOR AN ELEME00006300
C                                       TYPE -A(lnRI»U( tOR-l>-OUJUNCl«UtNN)
      U(IOR)=CIIORI/nFNOH
      G( InR)=(S( lOKI-A) IOR)*6I IOR-1) I/DENOM                             00007200
  100 COMTIhUE
  109
                                  0.0
    ZIIOKI=GMOR>
    IF (ZIIORI.LT.O.OI ZIIORI
    IOR=IOK-1
    IFL=IFLG|IORI
    GO TO (lOfr,106,107,106.106,106,106). IFL
                                                                      OOOOT300
                                                                      OOOOT^OO
                                      STEP 3-0                        00007500
                                      SOLVE SYSTEM OF NREACN 6T NCELR 00007600
                                      EQUATIONS USING BACK SUBSTITUTIOQ0007700
                                                                      00007BOO
                                                                      00007900
  lOf.
  107
  ion
      Z(IOR)=GIIoR)-W(IORI*ZIIOR+ll
      IF C7(IOR).LT.n.a) 7.(IORI=0.0
      GO TO 106
    NS=1
    DO 9B IJ=liNJUNC
    IF lIOR.EO.JUNCIIJ.NSM IJUNCsIJ
    CONTINUE
    NS=?
    NN=JUNC(IJUNCtNS)
    ZIIOR)=G(IOR)-W
-------
   CALL  kUPT? Ill
01 CONTINUE                                                              00011100
   RrTllRM                                                                 00011200
   CMO                                                                    00011300

-------
SUBROUTINE TEMPS*

          Subroutine TEMPS completes the setup of the equations
necessary to calculate temperatures in each computational element.
Specifically, the subroutine completes the definition of the diagonal
term of the coefficient matrix and defines the vector of known terms
on the right hand side of the equations.

          The additions to the diagonal term represent the individual
constituent changes caused by constituent reactions and interactions,
and mass changes caused by stream withdrawals.  The resulting diagonal
term for each type of computational element is:
          TYPE                           DIAGONAL TERM
     All except type 7                 b.  =  x^
     7.  Withdrawal                    ^

where x.. is defined in Subroutine TRIMAT.

          The right hand side term contains all known inputs, which
include headwater inflows, wastewater discharges, tributary flows and
incremental runoff, and the concentration in the previous time step.
The known term for each type of element for dynamic simulation is:
          TYPE
     1.  Headwater         S,  =  T* * ^- * q! 1\ ± - q.Th
     6.  Waste Input       S.  =  T* +  l. + q\ TJ ft + qwTw ^
     All Others
                                   i    K-    ^i
                                       01
*AII  symbols used are defined at the end of this section
 of  the Documentation Report.
                                     IV-30

-------
Steady-state temperature distributions cannot be simulated with the model

          The subroutine flow chart is illustrated in Figure IV-17 and
is followed by the program listing.  All  program variables contained in
COMMON are defined in Section V.
                                     IV-31

-------
                                       (ENTRY     A
                                    SUBROUTINE TEMPS   I


INITIALIZE
COUNTERS AND
CONVERSION FACTORS


CALL HEATEX


                                                     DO computations
                                                     from a to b for
                                                     •11 computational
                                                     elements
                                    INITIALIZE KNOW
                                   TERN AND DIAGONAL
                                    TERM FOR DYNAMIC
                                     SIMULATION


TYPE I
ADD INCREMENTAL INFLOW
AND HEADWATER INPUTS
TO MOWN TERM.
S(D



TYPES 2, 3. 5
ADD INCREMENTAL
INFLOW TO KNOWN
TERM, S(I)



TYPE 4
ADD INCREMENTAL
INFLOW TO KNOWN
TERM. S(I)



TYPE 6
ADD INCREMENTAL INFLOW
AND WASTEWATER INPUTS
TO KNOWN TERM.
S(D



TYPE 7
ADD INCREMENTAL INFLOW
TO KNOWN TERM, S(I). AND
SUBTRACT STREAM
WITHDRAWAL FROM
DIAGONAL TERM, B(I)


                                       (RETURN      )
                                       TO OUAL    J
FIGURE  EZ-17      FLOW  CHART  FOR  ENTRY SUBROUTINE  TEMPS

-------
      MlfHOUTIMF TCWPS
C

             TlTLEI?0,2ni.RCHlD(7",5),RMTHORl75I.RBTEOR(751,NHWHAR(15>.          «NEW
             T/>HROO(75),IAUGORI71,6).NCELRHI75I.IFLAGI75.20>.                    *NEU

             ri"IANN|7S)!cKll75> •fKS(7S) .K20PT(75I ,CK2{75I .COEOK2O5I .             »NEu
             ExPOK?|75l,TINIT|7S>,noiHIT(75I.BOINIT|75l.COINIT|75i3)<            «NEW
             OII75),TI(75I.DOH75).BOMI75l,CONSII75.3l,JUNCIOI15.5|,            *NEU
             JUKCI15.3|,HkTRIDI15,5l,HUFLOWI151,HHTEHPI15I.HUOOI15l,             »NEW
             HWPODUSI,HUCONSI15,3I.WASTin(90.SI.TRFACT(9al,WSFLOWI90).          *NEW
             WSTEHPI.  IFL                          00004600
c                                                                        00004700
   101 NHU=NHW+1                                                          OOOOS200
      A[iEPTH=0.?»CUEP»W(NHW)*DF.PTH(lORl)                                OflOOSSOO
      RF/>rT=l,SMrTJlDR)/(RHOCP*SPEPTH)                                    OOOOStOO
      S[lPK» = TlinKI+RFArT*TPTJ*PTnv;CL(IOR)-AIIORl*HgTEf1P(NHu)           00005500
      G«I  TO  inn                                                          oooo560o
r                                                                        00005700

-------
  In? A( El'TI.=O.S. (Ur"TM(IPP-l I »PFPTHIIOK1)                               00006200
      Ml (ICTrl'trrTI 10H|/(MI-nCP*ArEPTl'l                                     00006300
      SIinR1=1( IHR) 4UrACT + TPIJ«nm«rL( TORI                               00006400
      M>  in  n.p                                                            000065CO
r                                                                          00006600
  \P1 l,JS=Ml'b*l                                                            00007100
      A'll  PTl-=n.r*IOFP1hl IOR-l)+nEPTM( TOM )                               00007200
      "F.ACTzHSurT ( inH l/(RHOCP»«nEPTH)                                     00007300
      S( lni')=T 11 OP I t"*(nEPTH( IOR-l|+nEPTM(NNI+2.0»OEPTH( IOR) I                00008400
      RlnrT=HSMF1(lPR)/(RMOCP«AnEPTH)                                     00008500
      Si mn>=T( TORItDFACT + TPIJtriTnvCU IORI                               00008600
      GO  TO  100                                                            00008700
r                                                                          00008800
  IP'S NUS=NWS*1                                                            00009300
      flnFPTH=U.S«lOFPTH(IOP-ll*nEPTH(IOR)l                               00009400
      HFACTiHSrFTIIOM)/                                     00009500
      S(IPRl=l(IOH)+HFACT+ITPIJI»nTOVCLIIOR)
      It I I Ok I =p I I OR I - riSFLOU (NWS) • DTOVCL IIOR )
  ipn CriNTIMir                                                             00009700
      RETimf                                                              00009800
      Efll)                                                                  00009900

-------
 SUBROUTINE  TRIMAT
          Subroutine TRIMAT computes all coefficients  for  the  implicit,
 finite difference advection-dispersion equation for each computational
 element except for the diagonal  term.  In the case of  the  diagonal
 term, bj , TRIMAT computes  that portion of term that is  fixed and
 independent of the constituent to be simulated.  This  fixed portion of
 the diagonal term is designated  as x..

          In general, the  basic  equation that TRIMAT sets  up for a
 computational element, i,  is:
                             bizi + cizi+l  =  Si
where
          bi  =  xj +  (constituent dependent terms)
       a.j ,c^  =  off -diagonal terms
          S..  =  known term
          z   =  variable

In the case of a computational element that contains a junction and the
upstream element in the tributary stream is n, the basic equation becomes

                    Vi-1 +bizi + cizi+l +dizn  '  si
Table IV-1 contains the equations for each term in each type of
computational element.

          The subroutine flow chart is illustrated in Figure IV-18
followed by the program listing.  All program variables in COMMON are
defined in Section V.
                                     IV-32

-------
                                                      TABLE IV-1

                                             SUBROUTINE TRIMAT EQUATIONS

                                      FOR VARIOUS TYPES OF COMPUTATIONAL ELEMENTS
I
OJ
co
Reach Type
1.
2.

3.


4.
5.
6.
Headwater
Regular

Upstream
from
junction
Junction
(with n)
End of
Reach
Input
a
n AT n AT
~Uh Ax2" " \ ^j"
-D. . ^..n , £
UJ-1 AX7^ 4j-l Vi

same as 2


same as 2
•(DJ-1+DJ) fxT-Qi-l 71
J1 J AX J'»T
J
same as 2
X
(i.o + (DO + DJ) jgr+Qj £1)
J
(1.0 + (D._-, + Q.) &L.+ Q. A!)
j
same as 2


(1.0 + D.^ + 2D. + Dn) ^5-+ Q. £L
same as 2
same as 2
c d
-D. T-2- none
same as 1 none

same as 2 none


same as 2 -Dn ^ - Q —
n AXZ n v-
J
-0- none
same as 2 none
   7. Withdrawal  same as 2
same as 2
same as 2
                                                                                                           none

-------
                                              (ENTRY       ^
                                          SUBROUTINE TR1MAT  J
                                             INITIALIZE
                                             COUNTERS
                                                              DO COMPUTATIONS
                                                              FROM a TO b FOR
                                                              ALL COMPUTATIONAL
                                                              ELEMENTS	
                                        INITIALIZE FIXED COMPONENT
                                        OF DIAGONAL TERM. x(I),
                                         FOR STEADY STATE OR
                                         DYNAMIC SIMULATION


TYPE 1
HEADWATER ELEMENT
COMPUTE COEFFICIENTS
A(D. X(I). C(I)








TYPES 2. 3. 6 OR 7
OTHER ELEMENTS
COMPUTE COEFFICIENTS
A(I). X(I). C(I)








TYPE 4
JUNCTION ELEMENT
COMPUTE COEFFICIENTS
A(I), X(I). C(I). D(I)








TYPE 5
FINAL ELEMENT
COMPUTE COEFFICIENTS
A(I). X(I)


                                       c
          RETURN
          TO QUAL
FIGURE   E-18
FLOW  CHART  FOR   SUBROUTINE  TRIM AT

-------
          H IMF TKIWAT
                            TRIMAT COMPUTES  THE  COEFFICIENT  MATRIX
                            FOR THE IMPLICIT-FINITE-DIFFERENCE  FORM
                            OF THE ONE-niMENSIONAL  IADVECTION t
                            DISPERSION) TRANSPORT EQUATION.
           TJTin?0.;>(».RCHin(75.'i>.RfmiOR(75),RWTEOR<75).NHWWAP(15),
           TAMC.nO|7£>),T«UGnR(7!>.6I.MCCLRH(75).IFLAG(75i20>i
           lCLORl>(7';.?n>.cnEFnV(75>.FxPnOV<75).COEFQH<75),ExPOOH|75).
           rpi/\MN(7'S) ,CKl<75>.rK3(75>,K?OPT(75>.CK2<7P).COEOK2I75),
           EXPr)K;:(7b) ,TIMT(7M .OOINIT(75> .BOINITI75I ,COINIT<75.3(.
           01(75) .TI< 75).001 (751 .RODI^M.CONSI (75.3) .JUNCIOI 15.5).
           JUNC(15.M.HWTRinil5.S).HWFLOW(l'i>.HUTEHP(lSliHUOO(15).
           "WFOOI15) .HuCONSIl'i.S) .WASTTO(90.5).TRFACT(90I.WSFLOWI90).
           t>STF*P(<)0)iWSnni90).USBOD(90>iWSCOMSl90.3).QATOT|15li
           acinoi ,R(5nr» ,C(Snn) .0(5) .scioO).Z(Sno),w(500),G(500).
           FLrv(bnO>.nEPTh|50l)).VEL<500I.OTOVCLl500I.K2l500liKll500)i
           HSfTTCiOni.nLISOO) ,VHU(15).DEPHW(15».OLHW(15).T(500).
           nO(^OQI,ROn(500I.CntaS(500,3I.PTIME.TPRINT,OELX.
           MHVTRS,NREACH,NUASTC(NJUNC.DELT,DlLT.02LT,DTODX2.0T20DXt
           L«T,LSM,LLM.eLrv.O»TtAE.PF.DAYOFr,ORYRLB.WETBLBtDEUPT,
           ATM-'R, WIND.CLOUD. SONET,NI.NJ.TRLCD.TOFDAY,NT.NC.TIHE.NCS
    COMMOI /SST/iTE/XlhOO). ISS
    NHUrO
    NUS=0
    IJUMC=0
    00 100 I=1.NKFACH
    NCFlR=NCtl RHII)
    UO 100 J=1 .NCrLR
    IOP=IrLORfl( I.J)
    XI10RI = 1.0
    IF iiss.r-T.oi xnoR)
                                         • NEW
                                         • NEW
                                         .NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • NEW
                                         • -16
                                00002400
STEP 1-0                        00002500
INITIALIZE COUNTERS FOR HEADUATE00002&00
WASTE LOADS OR WITHDRAWLS. AND 500002700
JUNCTIONS.                      00002800
                                00002900
                                00003000
                                00003100
                                00003200
                                00003300
STEP 2-0                        00003400
LOOP THROUGH SYSTEM OF NREACH RE00003500
WITH NCFLR COMPUTATIONAL ELEMENT00003600
REACH.                          00003700
                                00003SOO
                                00003900
                                00004000
                                00004100
                                00004200
                           o.n
    GO TO (101 .1(1?.10?.103,104.10?.102). IFL
                                      STEP 2-1
                                      COMPUTE COEFFICIENTS  B
                                      ELEMENT OF  TYPE  i.
in'  Mit>=riMw+i
                                00004300
                                00004400
                                00004500
                                00004600
                       AND C FOMOP004700
                                00001BOO
                                00004900
                                00005000

-------
      Airr.i >--,nci \?»rLHw(NHki)-iuFLOU(Niiu)«nTovcL< ion)                   oooosioo
      Y( !fi(| = » i mi i MiTory?.(nLHu(Hnv)+ni i lo1)) )-fFLOU( inoj.nTC'VCUIORi
      n ini l = -l TM|l-l=-010n*?<(ILIinp.l)-FLOWIIOR-tl*DTOVCL(IORI                   00006000
      «( ir"i = M I ""I* )lonx2*mLI IOR-1 ItHLlIOBI )«FLOU( IOR)*OTOVCL( I OR I
      Clir.i )z-nTnn«?>r~Lr                                                           00006100
(                                                                          00006<400
C                                          STFP  2-1                         00006500
T                                          COMPUTE COEFFICIENTS =-OTonx?*PL(NNi-Fi nu«oTrwcL( IORI                       00007200
            l=-ni'iL,x?>nL(IOR-l)-FLOU(IOR.ll*nTOVCLIIORI                   00007300
     •       r'invCL( IOH)                                                  00007500
      Cilni i = -l'Tn|ix?«PL( IPRl                                              00007600
      M< TO 101)                                                           00007700
r                                                                         00007800
C                                        STEP 2-4                         00007900
r                                        COMPUTE COEFFICIENTS A ANP B FOKOOOOAOOO
C                                        ELEMENT OF  TYPF  5.               00008100
r                                                                         00008200
L                                                                         00008300
  10M AilPK)=-iiinnx?«(m I IOH-l)+r;L( IORI l-FLOd( IOR-1 I *DTOVCLI IOR I         000081)00
      XI IPN) = X| inf) + nT|jnX2«(DLI TOR-1 )«ni.(IOR» I+FLOUI IOR I *DTOVCt-l IOR )
  ipr CPNTIfliF                                                            00008600
      RfTUCr                                                              00008700
      E-n                                                                 00008800

-------
SUBROUTINE WRPT2

          Subroutine WRPT2 is basically the same program as  documented
by the Texas Water Development Board (2).   Minor changes to  report
headings and formats are the only differences from the original  version
of the program.  QUAL-II uses WRPT2 to print intermediate summaries of
simulation results.  For dynamic simulations, the intermediate reports
occur at preselected time intervals; while for steady-state  simulations,
the reports are printed at a preselected iteration interval.   WRPT2
writes the concentration of the quality constituents simulated for each
reach and all computational elements within the reach.  For  steady-state
simulations the WRPT2 also reports the number of computational elements
that do not satisfy the convergent criteria.  The following  page
illustrates an example output report from WRPT2 for a steady-state
simulation.

          Figure IV-19 illustrates the subroutine flow chart, and the
following pages contain the program listing.  Variables in COMMON
are defined in Section V.
                                    IV-34

-------
            wni"  r<"J\/r>r.r'iT  IN  07 ELE"CNTS
               ?
C.UOWTH PATF WO'I  CONVF'-P' "T  It   "2 ELEMENTS
       O''      i
       P/ITC MOM  ronvrnr.! NT  IN   o ELEMENTS

RCH/CL 1
l fl.io
? 7. PI
3 10. 3b
1 °.lfc
5 7.02
<- 7.3fl

?
*.21
t'.ft"
in.?l
°. 3i
7J04
7.10
III'.
3
C.1"
7. Of
10. n«
q ?o
7)06
7.1?
~ni vrn OXYRLN Ii1 HG/I
u '.
1.07 o.Ol
7.«« 7.pq
9.97 9.H7
T.26 9. ?1
7J09 7M1
7. IS 7.M7
f.
7.9f
7.36
9.7P
9.21
7.13
7.19
7
7. "2
7.11
9.69
9.19
7.16
7.51
nlun'FMCAL oxyfiE" OEfANn in
RCH/CL 1
1 2.C7
2 1.19
3 l."&
1 1.55
5 3.91
6 3.?1
2
'.7'-
1.14
1.92
1 .52
1.B6
1.1P
i
i.r-*
l!o9
1.89
1.1 =

3J15
•• 5
?.5? 2.41
i.os i.ni
1.85 l.m
1.16 1.11
T.76 1.72
1.12 3.10
6
?.31
7J1?
1.78
1.11
3.67
1.07
7
2.21
7lll
1.74
1.18
3.63
3.04
K
7.H8
6.89
9.6?
9.17
7.18
7. 51
i NG/L
8
2.11
6.82
1.71
1.35
3.58
3.01
q
7.85
6.69
9.16
9.15
7.20
7.55

9
?.o?
6J51
1.68
1."
3.54
».9H
10
7.83
6. Si
9.50
9.11
7.23
7.57

IP
1.93
6.26
1.65
1.30
3.50
2.96
11
7.81
P. 36
9.44
9.13
7.25
7.59

11
1.85
6.00
1.61
1.28
.1.45
?.93
12
7.80
6.22
9.40
9.11
7.27
7.61

12
1.77
5.76
1.58
1.25
3.41
2.90
/|!»M(II\I1A AS N IN <7
!7P
.1°
.1*
1.10

1 5
.9h .95
.77 .76
.19 .19
.16 .16
1.10 1.39
1.37 1.11
''ITR1TF AS N IN
RfH/fL 1
1 .0».
2 .11
1 .PI
4 ."3
5 .16
6 .17
2
.06
.11
.01
.03
.16

1
.07
.11
.n?
.0?
.17
.in
1 5
.07 .r,c
.11 .11
.na .r?
.01 .in
.47 .17
.1* .in
MlTKATE AS N IN
BCH/CL 1
1 .10
? .14
3 .10
4 .11
s 1.01
f 1.09
2
.11
.45
.10
.11
1.05
1.10
i
.11
.15
.10
.11
1.05
1.10
1 5
.1? .3?
.16 .17
.in .10
.11 .11
1.0-- I.OS
1.10 1.10
PHOSPI.OF.liS AS P
RCH/CL 1
2
1
U 5
6
.9n
2.03
.49
.46
1.3q
1.33
Mfi/L
6
.OP
.16
.0?
.04
.17

"6 XL
6
.31
1.35
.10
.11
l.Of.
l.ll
in t'R
6
7
.93
2.01
.48
.46
1.19
1.33

7
.09
.17
.02
.04
.17
.18

7
.14
1.36
.10
.12
1.06
1.11
/L
7
8
.92
1.99
.48
.45
i.3e
1.32

8
.09
.18
.0?
.04
.17
.18

8
.34
1.07
.10
.12
1.06
1.11

8
9
.91
1.97
.48
.45
1.38
1.3?

9
.09
.18
.01
.04
.17
.18

9
.31
1.08
.11
.12
1.07
1.11

q
10
.90
1.95
.18
.45
1.37
1.32

10
.10
.19
.03
.04
.17
.18

10
..16
1.40
.11
.1?
1.07
1.12

in
11
.89
1.93
.47
.45
1.37
1.31

11
.10
.20
.03
.04
.17
.18

11
.36

ill
.12
1.07
1.12

11
12
.88
1.91
.47
.44
1.36
1.31

12
.10
.20
.03
.04
.17
.18

12
.37
1.42
.11
.12
1.08
1.12

12
ITERATION 3
13 1" IS
7.79 7.78 7.7B
6.10 6.00

9.11 9.10 9.09
7.29 7.31 7.33
7.63 7.65 7.69
ITERATION 3
13 14 15
1.70 1.62 1.55
5.52 5.29

1.23 1.20 1.18
3.37 3.33 3.29
2.88 2.85 2.83
ITERATION 3
IS 14 15
.87 .86 .85
1.89 1.87

.44 .44 .44
1.36 1.36 1.35
1.31 1.30 1.30
ITERATION 3
13 14 15
.10 .10 .11
.21 .21

.04 .04 .04
.17 .17 .47
.18 .18 .18
ITERATION 3
13 14 15
.38 .3* .39
1.44 1.45

.1? .13 .13
l.OP 1.08 1.09
1.13 1.13 1.11
ITERATION 3
11 1" 15

16
7.78



7.35
7.71

16
1.49



3.25
2.79

16
.84



1.35
1.30

16
.11



.17
.18

16
.40



1.09
1.1.1

16
                                                                                                           17     18     19    20

                                                                                                         7.78   7.79   7.80  7.81





                                                                                                         7.81   7.86   7.92  7.97



                                                                                                           17     18     19    20

                                                                                                         1.42   1.36   1.30  1.29





                                                                                                         2.76   2.73   2.69  2.66



                                                                                                           17     18     19    20

                                                                                                          .83    .82    .81   .80





                                                                                                         1.29   1.29   1.29  1.28



                                                                                                           17     18     19    20

                                                                                                          .11    .11    .11   .11





                                                                                                          .18    .18    .18   .18



                                                                                                           17     18     19    20

                                                                                                          .41    .41    .42   .43





                                                                                                         1.14   1.14   1.14  1.15



                                                                                                           17     18     19    20

-------
                                                 Loop through
                                                 program from >
                                                 to b for all
                                                 stream reaches
                                    WRITE
                                  INTERMEDIATE
                                  OUTPUT REPORT
                                    (RETURN     1
                                    TO QUAL    I
FIGURE  12-19
FLOW  CHART  FOR  SUBROUTINE WRPT2

-------
         : inr
                           URPT?  WRITES  AN INTERMEDIATE SUMMARY
                           OF  THE  SFLECTEO QliALITY CONSTITUENTS.
                           THFSE  CONSTITUENTS ARE WRITTFN BY REACH
                           AMD BY  ELEMFNT.  THIS SUMMARY CAN BE
                           GIVFN  AT  0  TIME INTERVAL OF DELT OR
                           S"I»E MULTIPLE OF OELT.
     ncoi. TIT|.F-(?ll.20)iPCHlO(7!>.m.RMTHOR(7IS>.RMTEORI75).NHWWAR(15).
          TAKODOI 75 ) ,I^UROR( 75.61 .NCELRH(7S I .IFLOGI 75.20 ),
          ICI.nRO(7Sf?OI.COEFCv(7'SI.ExPOOVI75)iCOEFQHI75).EXPOOH(75l.
          r*aNN(75>.CKl (75>.r«3<75) .K?OPT<75I.CK2(7SI ,COEOK?<75) ,
          EXPOK2I 7C).TINIT< 7-5) .HOINITI 75>.BOINIT<75).COJNIT< 75.3) .
          RI ( 75) ,TI( 751.001 1 7t)),RODI<7S),CONSI (75.3). JUNCIOIIS.SI.
          JUNCI 15.JI.HWTRID(lS.5).HUFLOWa5),HWTEMP(15) .HWDOdSI.
          MWBOO(IS) ,HUCONS(f.3) .WAST 101 90 .•> I .TRFACTI90) .WSFLOUI90I i
          WSTEMP(90).WSDOI90>.WSRODf90).USCONS(90.3)iOATOTI15)<
          A(5PO)0(5l.K1ISOO).
          HSNET ( " on I . OL ( 500 I . VHfc ( 15 1 . OEPHW IIS). OLHW 1 1 5 ) . T 1 500 1 <
          rO|
          HWPHOS ( 1 * ) i HUMH3 1 1* ) . MUN02 (151. HUN03 ( 1 5 ) . GROWTH ( 500 ) .
          MODOPT(in),iHCHNO(7IiO).EXCOEFI75)
                  CKf,(75) .RAONIT ( 75 )
                                          I I 7SI ,HWRADN( IS ) ,USRAON(90 )
   ^P^••()^/•!ST/ITE/XISOO).ISS
                  .Cr»MC(bOO)
   ir
   ITIT=IHE
   uimr ("J.1D (TITLE(NT.J).J-6.?OI.ITIME
1« FOR1M (lHfl.l9X.l'iAt.l4X.9MlTE:RATION. HI
   60 TO 51!
?0 CONTINUE
in
         I'j.sni  (TlTir (NT.J) .Jrf,.?n>.TIMD/iY
• n F.1R>"V1 MMu.ltX.lfiAU.lv.F'S.P.SH  DAY^./I
                                      STFP 1-n
                                                                              • NEW
                                                                              • NEW
                                                                              • NEW
                                                                              • NEW
                                                                              • NEW
                                                                              • NEW
                                                                              • NEW
                                                                              • NEW
                                                                              • NEW
                                                                              •NEW
                                                                              • NEW
                                                                              •NEW
                                                                              • NEW
                                                                              • NEW
                                                                              • NEW
                                                                      00002700
                                                                      00002600
                                                                      00002900
                                                                      00001000

-------
      ii.'ITI  (i J.'-U
                                3^4^67
                    11    i?    17    14    IS    16    17    18    11

     *    sn'/t                                                     00003400

c                                    LOOP THROUGH SYSTEM OF NREACH RE00003SOO
r                                    RY NCELK COMPUTATIONAL ELEMENTS 00003600
                                     HEACH.                        00003700
'-                                                                 00003800

     -, ion i = l.r,,
-------
SUBROUTINE WRPT3

          Subroutine WRPT3 prints for each reach the final  results of
the simulation.  The output report contains three basic parts; these are:

          1.  Values of hydraulic parameters
          2.  Water quality results
          3.  Average values of reach coefficients

The following page contains an example of the output report produced by
Subroutine WRPT3.  Figure IV-20 illustrates the subroutine  flow chart
and the following pages contain the program listing.  Variables in COMMON
are defined in Section V.
                                     IV-35

-------
                                                    FINAL   REPORT

                                                 REACH NO.  i.o   BCH= RFACH i
                                                 HIVFR WILES   90.0  TO   TO.O
1 .  HYP HAUL 1C  PARArETFP  VALUES
                             HEAD OF PF»CH       END OF RFACH     HAKIHUH     MINIMUM     AVERAGE

        FLOW (CFsi        =    inn.ooo             loo.non       ino.ooo     100.000     100.000
        VELoflTY (FpS)    =       .7-57                .757         • .757        .757        .757
        DEPTH IFT1        =      *.517               5.517         5.517       5.517       5.517


9.  MATER  QUALITY  PARAMETER  VALUES    •     •     «     •     •    «


   FLFH  i     2     3     t     i     6     7     e     9    10    11    12    13    11    is    16    i7    IB    i9    20

  no  «.30  «.21  B.lt  8.07  6.01  7.96  7.92  7.88  7.8?  7.83  7.81  7.80  7.79  7.T6  7.7B  7.78  7.78  7.79  7.«fl  7.81
 POO  2.«7  2.75  2.63  2.52  2.11  2.31  2.P1  2.11  2.02  1.93  1.85  1.77  1.70  1.62  l.SS  1.19  1.12  1.36  1.30  1.25
 NH3   .99   .96   ."7   ."»6   .95   .•»!   .93   .92   .91   .90   .89   .88   .87   .66   .85   .81   .83   .62   .81   .60
 N02   .06   .06   .07   .07   .dfl   .06   .09   .0«   .09   .10   .10   .10   .10   .10   .11   .11   .11   .11   .11   .11
 N03   .30   .31   .11   .32   .32   .31   .11   .31   .35   .36   .36   .57   .36   .36   .39   .10   .11   .11   .12   .15
 P01   .20   .20   ,?0   ,?n   .20   .20   .20   .20   .20   .20   .20   .20   .20   .20   .20   .20   .20   .20   .20   .20
flLGY in.12 in.as 10.16 in.SI 10.6S 10.79 10.93 11.OB 11.23 11.56 11.51 11.70 11.86 12.03 12.21 12.36 12.57 12.75 12.95 13.11
fOLI   ,t5   .10   .16   .33   .29   .26   .21   .21   .19   .17   .16   .11   .13   .11   .10   .09   .06   .07   .07   .06
fowl 27.00 !>7.00 Z7.no ?7.00 27.00 ?7.00 27.00 ?7.00 ?7.00 27.00 27.00 2T.OO 27.00 27.00 27.00 27.00 27.00 27.00 27.00 27.00

• NOTE:  UMTS ARE HC/L. EXCEPT FOR  ALGAE AS CHL A IN U6/L
                                AND  FECAL COLIFORN AS 1000/100 HL

                                AND  CONSERVATIVE MINERAL   I = TOS IN |«G/L X 0.1)
    AVERAfiF  VALUE"'  OF  REACH  COEFFICIENTS     •     *     •    •



      DECAY RATES ll/OAT)         SETTLING RATES (I/DAY)   BENTHOS SOURCE RATES (H6/FT/OAT)   RCAERATION RATE   CKLOR A/ALGAE
                                                                                                ll/OAYI         RATIO IUG/HGI

         KIROH =    . f.0                BOO   =    .00                BoO =  .00                 K2 =    .663    RATIO =  50.00
         Mu*  =    .15                ALGAE =    .50                NH3 =  .00
         HMD?  =   i.no                                              POI =  .00
         hCOLI =   1.50
         KRHN  =    .00

-------
                                               (SUBROUTINE     ^

                                           .     ""     J
                                                                  LOOP THROUGH PROGRAM
                                                                  FROM i TO b FOR ALL
                                                                  STREAM REACHES AND PRINT REPORT
                                           INITIALIZE TERNS AND
                                           FIND MID.. MAX., AND
                                             AVERAGE HYDRAULIC
                                               CONDITIONS
                                                 WRITE
                                            HYDRAULICS SUMMARY
                                                REPORT
                                                 WRITE
                                           FINAL RESULTS OF WATER
                                            QUALITY SIMULATION
                                                 WRITE
                                            AVERAGE VALUES OF
                                            REACH COEFFICIENTS
                                                (RETURN     A
                                                TO QUAL       )
FIGURE   12-20
FLOW  CHART   FOR   SUBROUTINE  WRPT3

-------
SIIHPDUTIT'F LliPTJ
                         WRPT3  GIVFS  A  FINAL SUflHtRY (RFACH PT
                         RFACHI  CF1ER STEADY-STATE CONDITIONS
                         HAVE qEEN REACHED.  IT SUMMARIZES THE
                         COIiniTlONS AT  THE BEGINNING ANP END OF
                         EACH REACH AS  WELL  AS THr MAXIMUM.
                          PINIM.UM. AND  AVERAGE CONDITIONS WITHIN
                         THE REACH.
C()H"f>N 1ITLF(?0.aO).RCHlDfT!s.'i|,l»MTHOR(75).RMTEOR(75) .MHWUARIlSIt
       TARGnO(7M.IAUGORI75<6).NCELRH(75>.IFLAGI75t20>.
       ICLnri)(7--.20I.COEFOV<75>.E>POOVI75>.COEFOH<75I.EXPOaH<75>.
       CnA|uN<75).CKll7*>).rK^I75).l-2nPT(75>iCK2l75>tCOCeK2<75).
       ETXPOK^(7C ).TINIT(75I.DOINrTI75).BOINIT(75l.COINIT(75.5l.
       PI (75 1 ,TII7S),DOII75).BOnl»7S».CONSI(75.3),JUNCIOI15.5).
       JliMC.HWTRIDll5.5>iHWFLOHd5>.HWTEHPtl5).HUOO(15) .
       HUPODI Ti) ,HWCONS(15.S),UASTin(.DEPHWI15l«DLHW(15I.TlSOOI.
       PdlSOO) .POOIEOO)iCnNS(50n.J).PTlME.TPRINT,nELX.
       NHWTKS.NRCACH.NWASTE.NJUNC.DELT.D1LT.D2LT,DTODX2.DT20DX.
       LAT.LSM.LLM.ELFV.OAT.AE.BE.DAYOFY.DRYBLa.UETBLB.DEWPT.
             WIND. CLOUD. SONET. NI.MJ.TRLCO.TOFDftY, NT. NC. TIME. NCS
              CK»(75I.CKS(75I ,CKNH3(75I .CKN02(7S) ,CKN03(7SJ.
       CKf 1 1 CKp , CKL i ALPHAO ( 75 ) . ALPH Al . ALPHA2 1 ALPHAS. ALPHA* •
       ALPHAS. ALPHAS. GROMAX.RESPRT.ALGSETtTSIiSPKOSITS I •
       SNH3(7S1 ,KMH3(SnOI .KN02l5nn(.RESPRR(500t.COLII500l.
       Al KAPCiOO) .PHOSI500I .CNHSCiOn) ,CNO?1500I .CN03I5DO) .
       COI IR ( 75 1 < A| GI < 75 1 . PHOSI I 75 ) i CNH3I ( 75 1 • CN021 1 751 .
       CM>MI75).COLIlTI7'i).ALGm7S).PHOSITI75»,CNH3IT»75>.
       Crjr2IT(7'il.CN03lT(75I.UScnLI(90),WSALG(90|,WSPHOSI90),
       WSNH3 1 Pn I . MSN02 (901 . HSN03 1 90 I • HUCOLI 1 15 1 • HWALS< IS) i
       Mk PHOS ( 1 5 I . Ht'NH3 ( 1 •> ) . HUNP2 (151, HUN03 ( 15 ). GROWTH ( 500 ).
                  , IPCHMO ( 7SC ) , EXCOEF 1 75 1
               CK6|7S),RAPNlT(75).r>ATAM31

     •              llHVFLO.1HClTV.ltH (FP.UHS)   ,1H  = ,
     •              1MUFPT.1HH  (F.tHT)   .tH    ,1H  = /
      DATA TATA/1411 M03.4HTE1P.MH  BOD.4HAI GY ,1H P04.4H NHJ,<*H
     1 iiirULI.'oi RAOi«M N02,U|iCnrjl.<»HCON?.UHCON3/
r
r                                        srrp i-o
                                                         00.
                                                                   00003100
                                                                   OOOOIZOfl
                                                                   00003000

-------
'                                                                         OOOOitUO
I                                        LOOP THROUGH  SYSTEM ONE RFACH
r                                        AT A TIME
r
      PC  10  M = l ,750
    JO I'.'CM'TilKK)  = TARSI  IRCHNO(KK) |
r
r                                                                         oooo«7oo
      DO  inn  I=),MKFACH                                                  00004600
      DO  *n  KK=i,75n
      IF  < iRCHr,nfIN=l.nf>06                                                     00005300
      «VEK?=0.0
      NCFLR=NCELRH(I|
      IS=!CI.Or)rj(I.l)
      IE=IS-l*NCFLR
      AVC=MCELR                                                           00007200
      00  »50  J=J.NCFLR
      IOR=ICLORn(IiJ)                                                     00008100
C                                                                         00008200
C                                       STEP 1-2
c                                        FIND MAXIMUM, MINIMUM,  AND  AVERAOOOOBIOO
C                                        CONDITIONS WITHIN EACH  REACH.    00008500
C                                                                         00008600
      IF  IFLOW(IOR).LT.FLOMAX)  GO TO 1                                   00008700
      FLOMAX=FLOUIIOKI                                                    OOOOBBOO
    1 IF  IFLOW( rORI.GT.FLOPIN)  RO TO 2                                   00008900
      F|.OMIN=FLOU(IOR)                                                    00009000
    ? Fl-OAVFiFLOnVE+FLOUdORl/AVE                                        00009100
      AVC»?=AVr
  ?-sn CO.MTlf.UE
      Vri«1AX=r:0<-FQiMII»FLOI'1AX*«F)(POgvlI)                                  00012000
      VFI.niN=COFFi)V(I)*FLOMIN**FXPOOViN»*rxPooH( n                                  00012400
      CIFPft«E=COFFnH{ I I •FLOAVE«*FVPOOHI I )                                  00012500
                                                                          00012600
                                         STEP 1-3                         00008300
                                         WRITE HYDRAULICS SUMMARY
                                                                          00012900
      WI-ITE cu.irui

-------
    1 FQKV.,1  (  //,«^n t.  HYDRAULIC  PARAMETER  V A L U
     •CS      *      <     •     *     *      *     • /)
  M? FORKAI  f U.n,HX.*HPARAnETFR.9X.l.lHHFAO  OF  REACHi7Xi
     •         1?HENP PF REACH, 5Xi7HMAXIMU>1.5X>7HniNinUPi5X<7HAVERAGE. SI
  TH.1 FONfAT  I   9k,lu«r'EIJ,ll>J=lf'il.FLOW(IS>iFLOWfIE>>F'LOHAX,
     •                FLOrtlN, FLO/WE                                       00014000
      WHITE  (MJi^O.3)  
      PIJI=UOni IOR1
  Ifc1 CnNTII'UE
      WKITt CIJO58I PATAI  3>.(P(K),K=1,NCELR)
      en TO ?oo
  IK'S CONTINUE
      IF (MPOOPTf bl.Lt.O)  GO TO 200
      IO>4=ICLOHni
  1ft«i C3i«7THUE
      U'02(iORi
  l«7 CONTl'JUF

-------
    -I'.MTI   ("Ji|-6 COMIItMlF
    UHITL  (NJ.156) OATAI 2 ) . I P( Kl ,K=1 iNCELH )
    nn TO  200
190 CONTIr'llF
    IF (i«OPOPT(  ll.LE.O) GO TO  200
    H1->
    0(J 192 rhC = l>N'>S
    NT=MT+1
    DO 191 J=l. MCFLP
    InH-ICLOKPI I..J)
    l'IJ)=CC1rIS( lOK.W(JL)
1<-1 CONTIMUE
    KK = 10«N''C
    WITF  (NJ.1SHI fATA(KK)t(P(K)iK=liNrELR)
19' CONTII llF
    GO TO  ?00
in-", CONTINUE
     IP  iMoni'T( -ji.ic.o)  co TO ?no

-------
              J=1.NCELR
                i'1 i ,j>
                RAiiinMMCLirE   NOT PROGRAMED THIS OATE  15 FCB
  Iff- Lir\ii innl
      VRITF  InlJilSd)  PATA(  9)i(l>IK).K=l.NCELR)
  ?nn CONTIHJF
      IF  IWPHIN.LT.I)  GO  TO 150
      W-UTLIHJ.?10>  (TITLC(8.J).J=6,20)                                          .NEW
  ?]0 F1H-AT  M7HJ.  NOTE:   UNITS ARE HG/L. EXCEPT FOR ilSAH)                     ••-!
      WRJTr(NJ,?15)  (TITLEimiJ)i J=6t?OI                                         »NEW
      ir  (»innni'T(ii.LF.O) GO TO z?o
      no  fit,  KK=i.r,cs
      UilITE  (Nji?lS)  (TITLEIKKK.J)24)
      F1I1MAT  (i3X,4HANO
C                                                                        00003800
c
C                                        STEP 3-0
C
c                                        WRITE AVERAGE VALUES OF REACH
C                                        COEFFICIENTS
C                                                                        00007500
r                                        STEP s-i
c
C                                        LOOP THROUGH ALL COMPUTATIONAL
r                                        ELEMENTS IN THE REACH
C                                                                        OOOOT900
      WRITE (NJ.107)
  107 FORMAT I///.9KH 3.  AVERAGE   VALUES  OF  REACH  C
     •0 EFFICIENTS      *      *      *    •///>
      WHITE (NJ.102I
  10? FORMAT (3?H       DECAY RATES  ll/OAYI            ,3X>
     • ??HSI-TTLING RATES  II/DAYI.SX.SSHBENTHOS SOURCE RATES ING/FT/DAY).
     • jx.t-iHRrnFRnTiOM RATE.BX.ISHCHLOR  A/ALGAEI
      WHITE (NJ.lOi)
  lt>1 FORMAT (<"tXilOH   ( 1/OAY ) ,9Xi 13HRATTO  IU6/HGI/I
      UftTr ir'J.lflit) CK1 II)irK3(I)iCK«|I).CK2(I)iALPHAO(I)iCKNH3lIli
     1 ALGSr T ( I ) . SNH5 1 1 ) . CKN02 ( 1 1 • SPHOS ( 1 1 i CK5 1 1 ) • CK6 1 1 1
  lot F?P«lAT (9X.PH K1BOO =iF7.' 1 16Xt 7HBOP    =iF7.2t 16X.SHBOD =.F5.2i
     • 17X.MI-IK2 r,F>i.3ii>X<7HRATIn =.F7.2i/.
     •        9x.flH KNH3  =.F7.?.16X.7HALGAE =,F7. 2 , 16X. SHNH3 =iF5.2i/.
     •        9X.BH KHOZ  =.F7.2i«6y.SHDOi| =.F5.2i/.
     »        9V. BH KCOLI =,F7.2./.9X.HH  KRDN  =,F7.2)
  inn CONTINUF                                                           00016200
      rtTTURM                                                             00005300
      E if

-------
                            DEFINITION  OF  SYMBOLS
          The following tabulation  defines  the  symbols  used  in the
right hand side of the equations  shown  in each  subroutine description,
except TRIMAT, which is self-explanatory.

       SYMBOL                                  DEFINITION

          a                      Coefficient in  convection-diffusion
                                 equation  due  to upstream stream segment
          A                      Algal  biomass
          ai                     Fraction  of respired  algal biomass
                                 resolubilized as  ammonia nitrogen by
                                 bacterial  action
          a                      Fraction  of algal  biomass  that is
           2
                                  phosphorus
          a3                      Rate of oxygen  production  per  unit of
                                  algae (photosynthesis)
          a                       Rate of oxygen  uptake per  unit of algae
           11                      respired
          as                      Rate of oxygen  uptake per  unit of ammonia
                                  oxidation
          a                       Rate of oxygen  uptake per  unit of nitrite
                                  nitrogen oxidation
          C                       Concentration of a  conservative material
          C                       Difference  between  oxygen  concentration
           5                      and oxygen  saturation concentration
          D                       Average stream  depth
          D                       Average stream  depth
          Dm                      Molecular diffusion coefficient
                                 Concentration of oxygen
          E                       Concentration of coliform
          F                       Froude number
          g                       Acceleration of gravity
                                  IV-36

-------
SYMBOL                                DEFINITION

   X                      Light extinction  coefficient
   h                      Net heat flux
   K.                      Emperical  half-saturation constant,  light
   KN                     Emperical  half-saturation constant,  nitrogen
   Kp                     Emperical  half-saturation constant,  phosphorus
   Kj                     Rate of decay of  carbonaceous  BOD
   K2                     Aeration rate in  accordance with the Fickian
                          diffusion  analogy
   K3                     Rate of loss  of carbonaceous BOD
                          due to settling
   K4                     Constant benthic  uptake  of oxygen
   KS                     Rate of coliform  die-off
   K7                     Rate constant for the biological oxidation
                          of ammonia nitrogen
   K8                     Rate constant for the oxidation of nitrite
                          nitrogen
   L                      Intensity of light (ALGAES)
   L                      Concentration of  carbonaceous  BOD  (BODS)
   y                      Algal specific growth rate
   0                      Maximum specific  algal growth  rate
   n                      Manning's  roughness  coefficient
   Nx                     Concentration of  ammonia nitrogen
   N                      Concentration of  nitrite nitrogen
   N3                     Concentration of  nitrate nitrogen
   P                      Concentration of  orthophosphate
   p                      Algal respiration rate
   q                      Stream flow
   a                      Algal settling rate
   a2                     Benthos source rate  for  ammonia
   a                      Benthos source rate  for  phosphorus
    3
   t                      Time
   T                      Temperature
                          IV-37

-------
SYMBOL
   h (subscript)
   i (subscript)
   o (subscript)
   w (subscript)
   * (superscript)
   1 (superscript)
               DEFINITION

Velocity
Shear velocity
Volume
Length
Specific heat times density
Headwater
Element
Taken out of system
Waste load
Previous time step value
Upstream element
                           IV-38

-------
             SECTION V
              QUAL-II
DESCRIPTION OF VARIABLES IN COMMON
                                                                        a
                                                                        5

-------
SECTION V

-------
             SECTION V
              QUAL-II
DESCRIPTION OF VARIABLES IN COMMON

-------
                               SECTION V

                                QUAL-II

                  DESCRIPTION OF VARIABLES IN COMMON
Variable Name

A(IOR)



AE

ALGAE(IOR)
ALGI(I)


ALGIT(I)


ALGSET(I)


ALPHAO(I)


ALPHA1


ALPHA2


ALPHAS


ALPHA4


ALPHAS


ALPHAS


ATMPR
          Definition

= Vector below diagonal in
  tridiagonal coefficient matrix
  for computational element IOR

= Evaporation coefficient

= Concentration of algae in
  computational element IOR

= Incremental inflow concentration
  of chlorophyll a^ into reach J

= Initial concentration of
  chlorophyll a_ in reach I

= Local settling rate for algae
  in reach I

= Ratio of chlorophyll a to
  algae biomass in reacfi I

= Fraction of algae biomass
  which is N

= Fraction of algae biomass
  which is P

= 02 production per unit of algae
     growth

= 02 uptake per unit of algae
     respired

= 02 uptake per unit of NH3
     oxidation

= 02 uptake per unit of N02
     oxidation

= Local barometric pressure
Units
ft/hour-in. Hg

mg/1


M9/1


M9/1


ft/day


ug Chl-a_
  mg A
mg N
m  A
mg
mg P
mg A

mg g
mq A
mg

mg g
mg A

mg g
mg A

mg g
mg A

in. Hg
                                   V-l

-------
 Variable  Name
           Definition
 Units
 B(IOR)

 BE
 BOD(IOR)

 BODI(I)

 BOINIT(I)
 C(IOR)
CK2(I)

CK3(I)

CK4(I)

CK5(I)

CK6(I)

CKN

CKNH3(I)

CKN02(I)

CKL
 =  Diagonal  vector in tridiagonal
   coefficient matrix for
   computational  element IOR
 =  Evaporation coefficient
 =  Ultimate  BOD in computational
   element  IOR
 =  Ultimate  BOD of incremental
   inflow in reach I
 =  Initial ultimate BOD  in reach  I
 =  Vector above diagonal  in
   tridiagonal  coefficient matrix
   for computational  element IOR
 =  BOD decay rate  coefficient
   (base  e)  for reach  I
 =  Reaeration  coefficient  (base e)
   for reach I
 =  Rate of settling or scouring
   of BOD (base e) in reach  I
 =  Benthos source  rate for BOD
   in reach  I
 =  Coliform  die-off rate in
   reach  I
 =  Radionuclide decay rate
   in reach  I
 =  Nitrogen  half-saturation
   constant  for algae growth
 =  Rate constant for biological
  oxidation of NH3^N02 in reach I
=  Rate constant for biological
  oxidation of N02-»-N03 in reach I
= Light half-saturation constant
  for algae growth
 ft/hour-in.  Hg-MPH
 mg/1

 mg/1

 mg/1
 I/day
 I/day
 I/day

   mg
 day-foot
 I/day
 I/day
mg/1

I/day

I/day

Langleys/day
                                  V-2

-------
Variable Name

CKP


CLOUD



CMANN(I)


CNH3(IOR)


CNH3I(I)


CNH3IT(I)


CN02(IOR)


CNOZI(I)


CN02IT(I)


CN03(IOR)


CN03I(I)


CN03IT(I)


COEFQH(I)



COEFQV(I)



COEQK2(I)
        Definition                  Units

Phosphorus half-saturation          mg/1
constant for algae growth

Fraction of sky covered
(cloudiness express as
decimal)

Manning's channel roughness
coefficient for reach I

Concentration of NHg in             mg/1
computational element IOR

Incremental inflow concentration    mg/1
of NH3 in reach I

Initial concentration of NH3        mg/1
in reach I

Concentration of N02 in             mg/1
computational element IOR

Incremental inflow concentration    mg/1
of N02 in reach I

Initial concentration of N02        mg/1
in reach I

Concentration of N03 in             mg/1
computational element IOR

Incremental inflow concentration    mg/1
of N03 in reach I

Initial concentration of N03        mg/1
in reach I

Coefficient of flow for depth-
discharge relationship in
reach I

Coefficient of flow for velocity-
discharge relationship in
reach I

Coefficient of flow for
reaeration-discharge
relationship in reach I
                                  V-3

-------
Variable Name

COINIT(I,NC)


COLI(IOR)


COLIR(I)


COLIIT(I)


CONS(IOR.NC)



CONSI(I.NC)



D(IJUNC)




DAT

DAYOFY



DELT
DELX


DEPHW(NHW)

DEPTH(IOR)


DEWPT

DL(IOR)
          Definition

= Initial conservative mineral
  concentration in reach I

= Concentration of coliform in
  computational element IOR

= Incremental inflow concentration
  of coliform in reach I

= Initial concentration of
  coliform in reach I

= Concentration of conservative
  minerals in computational
  element IOR

= Concentration of conservative
  minerals in incremental inflow
  in reach I

= Vector of coefficients not in the
  tridiagonal portion of the
  coefficient matrix for junction
  IJUNC

= Dust attenuation coefficient

= Day of the year on which temper-
  ature routing begins (from
  January 1)

= Time interval of integration
  (time step over which the
  solution to the routing equation
  is advanced)

= Space interval of integration
  (length of computational element)

= Depth of headwater source NHW

= Depth in computational element
  IOR

= Dew point temperature

= Dispersion coefficient in
  computational element IOR
Units

mg/1


 1000
100 ml

 1000
100 ml

 1000
100 ml

mg/1



mg/1
days
seconds
miles


feet

feet


degrees Fanr.

ft2/sec
                                  V-4

-------
Variable Name
DLHW(NHW)

DO(IOR)

DOI(I)

DOINIT(I)

DRYBLB
DTODX2
DT20DX
DTOVCL(IOR)

DILI
D2LT
ELEV
EXCOEF
EXPOQH(I)

EXPOQV(I)

EXPQK2(I)

FLOW(IOR)

GROMAX

GROWTH(IOR)
          Definition
= Dispersion coefficient at
  headwater source NHW
= Dissolved oxygen concentration
  in computational element IOR
= Dissolved oxygen concentration
  in incremental inflow in reach I
= Initial dissolved oxygen
  concentration in reach I
= Dry bulb temperature
= DELT/DELX2
= (2.0 x DELT)/DELX
= DT20DX/(FLOW(IOR)/VEL(IOR) +
  FLOW(IOR-1)/VEL(IOR-1))
= Time interval of integration
= Time interval of integration
= Mean elevation of river basin
= Light extinction coefficient
= Exponent of flow for depth-
  discharge relationship in reach I
= Exponent of flow for velocity-
  discharge relationship in reach I
= Exponent of flow for reaeration
  discharge relationship in reach I
= Discharge in computational
  element IOR
= Maximum specific growth rate
  of algae
= Algae growth rate in
  computational element IOR
Units
ft2/sec

mg/1

mg/1

mg/1
degrees Fahr.
sec/ft2
sec/ft
sec/ft3

days
hours
ft
I/ft
CFS
I/day

I/day
                                  V-5

-------
Variable Name

HSNET(IOR)
HWRADN(NHW)


HWTEMP(NHW)


HWTRID(NHW,15)


lAUGOR(I.NHW)


ICLORD(I.J)
          Definition                  Units
                                            r
  Net heat exchanged through air-     BTU/ff
  water interface in computational
  element IOR
HWALG(NHW)
HWBOD(NHW)
HWCOLI(NHW)
HWCONS(NHW.NC)
HWDO(NHW)
HWFLOW(NHW)
HWNH3(NHW)
HWN02(NHW)
HWNOS(NHW)
HWPHOS(NHW)
= Concentration of chlorophyll A
in headwater source NHW
= Ultimate BOD of headwater source
NHW
= Concentration of col i form in
headwater source NHW
= Concentration of conservative
minerals at headwater source NHW
= Dissolved oxygen concentration
at headwater source NHW
= Discharge at headwater source NHW
= Concentration of NHo in
headwater source NHW
= Concentration of NO? in
headwater source NHW
= Concentration of N03 in
headwater source NHW
= Concentration of P04 in
yg/l
mg/1
1000
100 ml
mg/1
mg/1
CFS
mg/1
mg/1
mg/1
mg/1
  headwater source NHW

= Concentration of radionuclide
  in headwater source NHW

= Temperature in headwater
  source NHW

= Alphanumeric name of headwater
  source NHW

= Order of headwater sources
  available for flow augmentation

= Order of computation
degrees Fahr.
                                  V-6

-------
Variable Name

IFLAG(I.J)

IRCHNO(250)

ISS

JUNC(IJUNC,3)


JUNCID(IJUNC,15)


Kl(IOR)



KZ(IOR)


K20PT(I)


KNHS(IOR)



KN02(IOR)



LAT

LLM

LSM


MODOPT(IO)


NC


NCELRH(I)


NCS
        Definition                  Uni ts

Computational flag field

Number of inserted reach            —

Program internal variable

Order of computational elements
clockwise around junction IJUNC

Alphanumeric name of stream         —
junction IJUNC

BOD decay rate (base e)             I/day
coefficient in computational
element IOR

Reaeration coefficient (base e)     I/day
in computational element IOR

Option for determining reaeration   —
coefficient in reach I

Internal variable, temperature      —
corrected CKNH3 in computational
element IOR

Internal variable, temperature      —
corrected CKNOg in computational
element IOR

Mean latitude of river basin        degrees

Local meridian of river basin       degrees

Standard meridian of time zone      degrees
in which river basin is located

Model option, program internal
variable

Counter for the conservative        —
mineral being routed

Number of computational elements
in reach I (maximum = 20)

Number of conservative minerals     —
being routed (maximum = 3}
                                  V-7

-------
Variable Name
Definition
Units
NHWTRS
NHWWAR(I)
NI
NJ
NJUNC
NREACH
NT
NWASTE
PHOS(IOR)
PHOSI(I)
PHOSIT(I)
PTIME
QATOT(NHW)
QKD
RADNI(I)
RADNIT(I)
RCHID(I,15)
RESPRR(IOR)
= Number of headwaters in stream
system (maximum = 15)
= Number of headwater sources
available for flow augmentation
= Input tape
= Output tape
= Number of stream junctions in
system (maximum = 15}
= Number of reaches in system
(maximum = 75)
= Counter for printing titles
= Number of waste discharges or
withdrawals (maximum = 90)
= Concentration of P04 in
computational element IOR
= Incremental inflow concentration
of P04 in reach I
= Initial concentration of P04
in reach I
= Time interval for writing
intermediate summary
= Total flow augmentation from
each headwater source used
= Incremental inflow in reach I
= Incremental inflow concentration
of radionuclides in reach I
= Initial concentration of
radionuclides in reach I
= Alphanumeric name of reach I
= Algae respiration rate in
—
—
—
—
—
—
—
—
mg/1
mg/1
mg/1
hours
CFS
CFS
—
—
—
I/day
                      computation  element  IOR
                                  V-8

-------
Variable Name

RESPRT

RMTEOR(I)

RMTHOR(I)

S(IOR)



SNH3(I)


SONET



SPHOS(I)


TARGDO(I)



T(IOR)


TKD


TIME



TINIT(I)


TITLE(I.J)

TOFDAY

TPRINT


TRFACT(NWS)
          Definition

= Algae respiration rate

= River mile at end of reach I

= River mile at head of reach I

= Vector of the known heat or
  material balance obtained in
  computational element IOR

= Benthos source rate for NH3
  in reach I

= Average light intensity in basin
  Benthos source rate for PO^
  in reach I

  Minimum allowable target level
  for dissolved oxygen
  concentration in reach I

  Temperature in computational
  element IOR

  Temperature of incremental
  inflow in reach I

  Length of time over which a
  quality constituent has been
  routed

  Temperature of incremental
  inflow in reach I

  Alphanumeric program titles

  Hour of day

  Time counter to determine wnen
  to write intermediate summary

  Treatment plant efficiency
  (decimal fraction) for waste
  discharge NWS
Units

I/day

miles

miles

degrees Fahr.
or mg/1


  mg N
day-foot

Langleys/day (for
dynamic run use
Langleys/hour)

  mg P
day-foot

mg/1



degrees Fahr.


degrees Fahr.


hours



degrees Fahr.




hours

hours
                                   V-9

-------
Variable Name

TRLCD



VEL(IOR)


VHW(NHW)

WASTID(NWS,90)



WETBLB

WIND

WSALG(NWS)



WSBOD(NWS)


WSCOLI(NWS)



WSCONS(NWS,NC)



WSDO(NWS)


WSFLOW(NWS)


WSNH3(NWS)



WSN02(NWS)


WSN03(NWS)
          Definition                  Units

= Time counter to determine when      hours
  to reach Local Climatological
  Data

= Velocity in computational           FPS
  element IOR

= Velocity at headwater source NHW    FPS

= Alphanumeric name of treatment
  plant, withdrawal, or point
  source NWS
  Wet bulb temperature

  Wind velocity

  Input concentration of
  chlorophyll  a^ for waste load
  or point source NWS

  Ultimate BOD of waste loading
  or point source NWS

  Input concentration of fecal
  coliform for waste load or
  point source NWS
  Concentration of conservative       mg/1
  mineral  in waste load or
  point source NWS

  Concentration of dissolved oxygen   mg/1
  in waste load or point source NWD

  Discharge of waste load, with-      CFS
  drawal  or point source NWS

  Input concentration of NH3          mg/1
  for waste load or point
  source  NWS

  Input concentration of NC"2 for      mg/1
  waste load or point source NWS

  Input concentration of N03 for      mg/1
  waste load or point source NWS
degrees Fahr.

KNOTS

yg/i



mg/1


 1000
                                  V-10

-------
Variable Name

WSPHOS(NWS)


WSRADN(NWS)



WSTEMP(NWS)


X(IOR)


Z(IOR)
        Definition

Input concentration of PCty for
waste load or point source NWS

Input concentration of
radionuclide for waste load
or point source NWS

Temperature of waste load or
point source NWS

Program internal variable for
computational element IOR

Temporary storage vector for
computational element IOR
Units

mg/1
degrees Fahr.
                                  V-ll

-------
                               SECTION VI
                     QUAL-II INPUT DATA DESCRIPTION

TITLE DATA CARDS                                             VI-1
PROGRAM ANALYSIS CONTROL DATA                                VI-1
NONSPATIALLY VARIABLE A, N, AND P CONSTANTS                  VI-3
REACH IDENTIFICATION AND RIVER MILE DATA                     VI-4
FLOW AUGMENTATION DATA                                       VI-5
COMPUTATIONAL ELEMENTS FLAG FIELD DATA                       VI-5
HYDROLOGIC DATA                                              VI-6
BOD AND DO REACTION RATE CONSTANTS DATA                      VI-7
ALGAE, NITROGEN AND PHOSPHORUS CONSTANTS                     VI-8
OTHER CONSTANTS                                              VI-9
INITIAL CONDITIONS DATA                                      VI-9
INITIAL CONDITIONS FOR ALGAE, N, P, COLIFORMS AND            VI-10
ADDITIONAL NONCONSERVATIVES
INCREMENTAL RUNOFF DATA                                      VI-11
INCREMENTAL RUNOFF DATA FOR ALGAE, N, P, COLIFORMS           VI-11
AND ADDITONAL NONCONSERVATIVES
STREAM JUNCTION DATA                                         VI-12
HEADWATER SOURCES DATA                                       VI-13
HEADWATER SOURCES DATA FOR ALGAE, N, P, COLIFORMS AND        VI-14
ADDITIONAL NONCONSERVATIVES
WASTELOADINGS AND WITHDRAWALS DATA                           VI-14
WASTELOAD DATA FOR ALGAE, N, P, COLIFORMS, AND               VI-15
ADDITIONAL NONCONSERVATIVES
LOCAL CLIMATOLOGICAL DATA                                    VI-16

-------
SECTION VI

-------
                               SECTION VI
                     QUAL-II INPUT DATA DESCRIPTION

TITLE DATA CARDS                                             VI-1
PROGRAM ANALYSIS CONTROL DATA                                VI-1
NONSPATIALLY VARIABLE A, N, AND P CONSTANTS                  VI-3
REACH IDENTIFICATION AND RIVER MILE DATA                     VI-4
FLOW AUGMENTATION DATA                                       VI-5
COMPUTATIONAL ELEMENTS FLAG FIELD DATA                       VI-5
HYDROLOGIC DATA                                              VI-6
BOD AND DO REACTION RATE CONSTANTS DATA                      VI-7
ALGAE,. NITROGEN AND PHOSPHORUS CONSTANTS                     VI-8
OTHER CONSTANTS                                              VI-9
INITIAL CONDITIONS DATA                                      VI-9
INITIAL CONDITIONS FOR ALGAE, N, P, COLIFORMS AND            VI-10
ADDITIONAL NONCONSERVATIVES
INCREMENTAL RUNOFF DATA                                      VI-11
INCREMENTAL RUNOFF DATA FOR ALGAE, N, P, COLIFORMS           VI-11
AND ADDITONAL NONCONSERVATIVES
STREAM JUNCTION DATA                                         VI-12
HEADWATER SOURCES DATA                                       VI-13
HEADWATER SOURCES DATA FOR ALGAE, N, P, COLIFORMS AND        VI-14
ADDITIONAL NONCONSERVATIVES
WASTELOADINGS AND WITHDRAWALS DATA                           VI-14
WASTELOAD DATA FOR ALGAE, N, P, COLIFORMS, AND               VI-15
ADDITIONAL NONCONSERVATIVES
LOCAL CLIMATOLOGICAL DATA                                    VI-16

-------
                              SECTION VI
                    QUAL-II INPUT DATA DESCRIPTION
          All the input data required by the program are in card form.
The card data and input formats are itemized on the input forms  (1
through 19).  The following paragraphs give details of the data  required,
with suggested parameter limits and explanations of program requirements.
TITLE DATA CARDS  (Form 1 of 19)

          All sixteen cards are required in the order shown.   The first
two cards are title cards, and columns 37 to 80 of card 2 can be used to
describe the basin, i.e. name, date, season.  Title cards 3 through 15
require either a YES or a NO in columns 10-12, right adjusted.  NHg, N02,
and N03 must be simulated as a group.  Card 16 must read ENDTITLE.

          NOTE:  QUAL-II simulates ULTIMATE BOD in the general case;
however, if the user wishes to use 5-day BOD for input and output, the
program will make the conversions to ultimate BOD internally.  To use
the 5-day BOD 1-0 option, write "5-DAYbBI0CHEMICALi0XYGEN&DEMAND&INiMG/L"
on the TITLED? card beginning in column 22.
PROGRAM ANALYSIS CONTROL DATA (Form 2 of 19)

          The first four cards control input-output printing.  If any
characters other than those shown are 'inserted in the first four columns
of these cards>t requested action will not occur.
                                  VI-1

-------
          LIST - Card 1,  list the  input  data
          WRIT - Card 2,  write the final  summary
          FLOW - Card 3,  use flow  augmentation, on  Form 2 shown
                 in the documentation  there will  be no flow
                 aupentation.
          STEA - Card 4,  on Form 2 shown this  is  a  steady-state
                 simulation.  If it is not to  be  a  steady-state,
                 write dynamic simulation and  it  is automatically
                 a dynamic simulation.

The next four cards describe the system. There are two data  fields  per
card, columns 26-35 and 71-80.

          The first card (card five),  contains the  number of  reaches into
which the stream is broken down and the  number of stream junctions
(confluences) within the stream system.

          Card 6 has the number of headwater sources  and the  number  of inputs
or withdrawals within the stream system. These inputs can be small  streams,
wasteloads, etc.  Withdrawals can  be municipal water  supplies, canals, etc.
(NOTE:  Withdrawals must have a minus  sign in  type  11  data and must  have
IFLAG=7 in type 4 data).

          Card 7 contains the time step  interval  in hours and the length
of the computational element in miles.  For steady  state computations
leave the time step interval blank.

          The maximum route time for dynamic simulations is on card  8,
and it represents the approximate  time in hours  required for  a particle
of water to travel from the most upstream point in  the system to the most
downstream point.  In steady-state solutions enter  the maximum number of
iterations required for convergence.  30 iterations should be sufficient
                                   VI-2

-------
in most cases.   Also on card 8 is the time increment  in  hours  for  summary
reports.  For the steady-state solutions,  leave  this  blank.

          The next four cards (cards  9-12) are  required  only if  temperature
is being simulated.   The data fields  are also columns 26-35 and  71-80.  The
basin latitude  and longitude are entered on card 9  and represent mean values
in degrees for  the basin.   On card 10 enter the  standard meridian  in degrees,
and the day of  the year the simulation is  to begin.   The evaporation
coefficients are entered on card 11.   On data card  12, enter the mean basin
elevation in feet above MSL, and the  dust  attenuation coefficient  for
solar radiation.

          The last card must read ENDATA1.
NONSPATIALLY VARIABLE A, N, AND P CONSTANTS (FORM 2  OF 19)

          Six input data cards are required if algae,  NH^,  NO^,  NO.,,  PO.,
coliforms or radionuclides are to be simulated.   Otherwise  they  may be
deleted.  The data fields are columns 33-39 and 74-80.  Card  1 inputs
data on oxygen uptake per unit of ammonia oxidation, 4.0 mg 0/mg N, and
oxygen uptake per unit of nitrite oxidation,  1.14 mg 0/mg N.

          The next three cards concern algae.   Card  2  contains data on
oxygen production per unit of algae growth, usually  1.6 mg  0/mg  A, with
a range of 1.4 to 1.8.  It also contains  data  on oxygen update per unit
of algae, usually 2.0 mg 0/mg A respired, with a range of 1.6 to 2.3.
The third card concerns the nitrogen content and phosphorus content of
algae in mg per mg of algae.  The fraction of algae  biomass which is  N
is about 0.08 to 0.09, and the fraction of algae biomass which is P is
about 0.012 to 0.015.  Card 4 inputs the maximum specific growth rate of
                                 VI-3

-------
algae, which has a range of 1.0 to 3.0 per day,  and the respiration  rate
of algae, which has a range of 0.05 to 0.5 per day.  The respiration value
of 0.05 is for pure streams, while 0.2 is used where the NO^ and PO^
concentrations are greater than twice the half saturation constants.

          The nitrogen and phosphorus half saturation constants  are
entered on card 5 in mg/1.  The range of the values for nitrogen is
from 0.2 to 0.4 and the P value is 0.04.

          Card 6 inputs solar radiation information.  The light  half
saturation constant, in Langleys/minute,  is 0.03.   The total  daily
radiation is in Langleys.

          This group of cards must e.id with ENDATA1A, even if no data
are entered.
REACH IDENTIFICATION AND RIVER MILE DATA (FORM 3 OF 19)

          The cards of this group identify the stream reach system by name
and river mile by listing the stream reaches from the most upstream  point
in the system to the most downstream point.  When a junction is  reached,
the order is continued from the upstream point of the tributary.   There
is one card per reach.  The following information is on  each card.

          Reach order or number                      Columns 16-20
          Reach identification or name               Columns 26-40
          River mile at head of reach                Columns 51-60
          River mile at end of reach                 Columns 71-80

This group of cards must end with ENDATA2.
                                   VI-4

-------
FLOW AUGMENTATION DATA (FORM 4 OF 19)

          These cards except ENDATA 3  are required only if flow augmentation
is to be used.   The cards in this group contain data  associated with
determining flow augmentation requirements and available sources of flow
augmentation.   There must be as many cards in this group as in  the  reach
identification  group.  The following information is on  each card.

          Reach order or number                    Columns 26-30
          Augmentation Sources (the number         Columns 36-40
            of headwater sources which are
            available for flow augmentation)
          Target Level (minimum allowable          Columns 41-50
            dissolved oxygen concentration
            (mg/1) in this reach)
          Order of Sources (order of available     Columns 51-80
            headwaters, starting at most
            upstream point)

This card group must end with ENDATA3.
COMPUTATIONAL ELEMENTS FLAG FIELD DATA (FORM 5 OF 19)

          This group of cards identifies each type of computational  element
in each reach.  These data allow the proper form of routing equations to be
used by the program.  There are seven element types allowed; they are
listed below.
                                   VI-5

-------
          IFLAG       Type
            1         Headwater source element
            2         Standard element, incremental  inflow only
            3         Element on mainstream immediately upstream of
                      a junction
            4         Junction element
            5         Most downstream element
            6         Input element
            7         Withdrawal element

Each card in this group (one for each reach), contains  the following
information.
          Reach order or number
          Number of elements in the reach
          Element type (these are numbers
            of a set, identifying each
            element by type)

This card group must end with ENDATA4.
Columns 16-20
Columns 26-30
Columns 41-80
HYDROL06IC DATA (FORM 6 OF 19)
          The cards in this group contain variables  for determining  the
hydraulic conditions in the system.   Flow characteristics  are  determined
for each reach by the program.   Velocity is  calculated as   V = aQ  and
                        a
depth is found by D = aQ.   Each card represents  one reach, containing
the values of a, b, a, and  @,  as described below.
          Reach order or number
          a, coefficient for velocity
Columns 16-20
Columns 31-40
                                  VI-6

-------
          b, exponent for velocity               Columns 41-50
          a, coefficient for depth               Columns 51-60
          6, exponent for depth                  Columns 61-70
          Mannings "n" for reach                 Columns 71-80

The last card for this group must end with ENDATA5.
BOD AND DO REACTION RATE CONSTANTS DATA (FORM 7 OF 19)

          This group of cards includes reach information on the BOD rate
coefficient and settling rate, as well as the method of computing the
reaeration coefficient.  Seven options for reaeration coefficient
calculation are available.  These are listed below.

          K20PT     Method
            1       Read in values of K2
            2       Churchill (1962)
            3       O'Conner and Dobbins (1958)
            4       Owens and Gibbs (1964)
            5       Thackston and Krenkel (1966)
            6       Langien and Durum (1967)
            7       Use equation K2 = aQ

One card is necessary for each reach, and contains the following information.

          Reach order or number                  Columns 16-20
          BOD rate coefficient, per day          Columns 21-30
          BOD removal  rate by settling, per day  Columns 31-40
          Option for K2 (1 to 7, as above)       Columns 41-50
          K2 (option 1 only) reaeration          Columns 51-60
             coefficient
                                   VI-7

-------
          a, coefficient for K2 (option
             7 only)
          b, exponent for K2 (option 7
             only)

This group of cards must end with ENDATA6.
Columns 61-70

Columns 71-80
ALGAE, NITROGEN AND PHOSPHORUS CONSTANTS (FORM 8 OF 19)

          This group of cards is required if algae, NH3> N02» N03>  PO^,
coliforms or radionuclides are to be simulated.   Otherwise, they may be
deleted.  Each card of this group, one for each reach, contains the
following information.
          Reach order or number
          Chlorophyll a_ to algae ratio,
            (yg chl a/mg/Algae
             range of 50 to 100)
          Algae settling rate, feet/day
            (range of 0.5 to 6.0)
          Rate coefficient for ammonia
            oxidation, per day (range of
            0.1 to 0.5, about equal  to
            BOD rate coefficient)
          Rate coefficient for nitrite
            oxidation, per day (range of
            0.5 to 2.0, about five times
            BOD rate coefficient)
          Benthos source rate for ammonia
            (mg/foot/day)
Columns 26-30
Columns 33-40
Columns 41-48

Columns 49-56
Columns 57-64
Columns 65-72
                                   VI-8

-------
          Benthos source rate for                    Columns 73-80
            phosphorus (mg/foot/day)

This card group must end with ENDATA6A, even if no data are entered.
OTHER CONSTANTS (FORM 9 OF 19)

          This group of cards is required if algae, NH3,  N02»  N03,  PO
coliform or radionuclides are to be simulated.   Otherwise they may  be
deleted.  Each card of the group, one for each  reach, contains the
following information.

          Reach order or number                      Columns 26-30
          Benthos source rate for BOD                Columns 33-40
             (mg/foot/day)
          Coliform decay rate, per day               Columns 41-48
          Light extinction coefficient, per foot     Columns 49-56
          Radionuclide decay rate, per day           Columns 57-64

This group of cards must end with ENDATA6B, even if no data  are
entered.
INITIAL CONDITIONS DATA (FORM 10 OF 19)

          This card group, one card per reach, establishes  the initial
conditions of the system, with respect to temperature,  dissolved oxygen
concentrations, BOD concentrations, and conservative minerals.  Only
temperature is required for steady-state simulations.  The  information
is contained as follows.
                                  VI-9

-------
          Reach order or number                       Columns  26-30
          Temperature in degrees  F                    Columns  31-40
          Dissolved Oxygen,  mg/1                       Columns  41-45
          BOD, mg/1                                   Columns  46-50
          Conservative mineral  I, mg/1                 Columns  51-60
          Conservative mineral  II, mg/1                Columns  61-70
          Conservative mineral  III, mg/1               Columns  71-80

This group of cards must end with ENDATA7.
INITIAL CONDITIONS FOR ALGAE, N, P, COLIFORMS, AND RADIONUCLIDES
(FORM 11 OF 19)

          This group of cards, one per reach, is required only if algae,
NH-, N02> N03, PO., coliforms, or radionuclides are to be simulated.
Otherwise they may be deleted.  The following information is on each  card.

          Reach order or number                       Columns 20-24
          Chlorophyl a_, micrograms/1                  Columns 25-32
          Amnonia as N, mg/1                          Columns 33-40
          Nitrite as N, mg/1                          Columns 41-48
          Nitrate as N, mg/1                          Columns 49-56
          Phosphate as N, mg/1                        Columns 57-64
          Coliforms (MPN)                             Columns 65-72
          Radionuclides                               Columns 73-80

This group of cards must end with ENDATA7A, even if no data are entered.
                                   VI-10

-------
INCREMENTAL RUNOFF DATA (FORM 12 OF 19)

          This group of cards, one per reach,  accounts  for the  additional
flows into the system not represented by inflows  or headwaters.   The  flow
rate, temperature of the flow and DO, BOD,  and conservative mineral concen-
tration of the flow is taken into account.   Each  card contains  the  following
information.

          Reach order or number                     Columns 26-30
          Incremental flow, cfs                     Columns 31-35
          Temperature of flow, degrees F            Columns 36-40
          Dissolved oxygen concentration, mg/1      Columns 41-45
          BOD concentration, mg/1                   Columns 46-50
          Conservative Mineral I, mg/1              Columns 51-60
          Conservative Mineral II, mg/1              Columns 61-70
          Conservative Mineral III, mg/1            Columns 71-80

This group of cards must end with ENDATA8.
INCREMENTAL RUNOFF DATA FOR ALGAE, N, P, COLIFORMS, RADIONUCLIDES
(FORM 13 OF 19)
          This group of cards, one per reach, is required only if algae,
NH-, NOp, NO,, P04, coliforms, or radionuclides are to be simulated.
Otherwise they may be deleted.  The following information is on each  card.
          Reach order or number
          Chlorophyll a. concentration,
            nricrogram/1
          Armenia as N, mg/1
          Nitrite as N, mg/1
          Nitrate as N, mg/1
          Phosphate as P, mg/1
Columns 20-24
Columns 25-32

Columns 33-40
Columns 41-48
Columns 49-56
Columns 57-64
                                    VI-11

-------
          Coliforms as MNP                         Columns 65-72
          RadionucTides                            Columns 73-80

This group of cards must end  with  ENDATA8A, even  if no data are entered.


STREAM JUNCTION DATA (FORM 14 OF 19)

          This group of cards is required  if there are junctions on
confluences in the stream system being  simulated.  Otherwise they may be
deleted.   The junctions are ordered starting with the most upstream junction.
There is  one card per junction,  and the following information is on each card.

          Junction order or number                 Columns 21-25
          Junction name or identification           Columns 35-50
          Order number of the last element         Columns 56-60
            in the mainstream reach
            immediately upstream of the
            junction (See example  below.
            In the example, for  Junction 1,
            the order number  of  the last
            mainstream element immediately
            upstream of the junction is
            number 17.   For Junction 2  it
            is number 43.   The Junction 1
            mainstream element order number
            immediately downstream of the
            junction is 29.   For Junction  2
            it is  number 52.  The  Junction 1
            element order number of the last
            element of the tributary is number
            28.   For Junction  2  it is  number
            51.)
                                    VI-12

-------
                             Most Upstream
                                Point
                          Computational
                          Element Number'
1
2
3
4
5
6
7
6
9
10
II
12
13
14
15
16
17
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
52
93
54
55
56
57
58
59
60
61
62
63
/"
65
66
67
1
2
5
6
8
9



                                               Reach
                                               Number
FIGURE  33-1
STREAM  NETWORK  FOR  EXAMPLE  PROBLEM

-------
                                                    Columns 66-70
Order number of the first element
  in the mainstream reach
  immediately downstream from
  the junction
Order number of the last element
  in the last reach of the
  tributary entering the junction
This group of cards must end with ENDATA9, even if no data are entered.
                                                    Columns 76-80
HEADWATER SOURCES DATA (FORM 15 OF 19)

          This group of cards, one per headwater, defines the flow,
temperature, dissolved o>
-------
HEADWATER SOURCES DATA FOR ALGAE, N, P, COLIFORMS AND RADIONUCLIDES
(FORM 16 OF 19)

          This group of cards, one per headwater is  required only  if
algae, NH3> N02> NO.,, PO., coliforms, and radionuclides  are  to  be  simulated.
Otherwise they may be deleted.  The following information  is on each  card.

          Headwater order or number                 Columns  20-24
          Chlorophyll a_ concentration,              Columns  25-32
            micrograms/1
          Ammonia as N, mg/1                        Columns  33-40
          Nitrite as N, mg/1                        Columns  41-48
          Nitrate as N, mg/1                        Columns  49-56
          Phosphate as P, mg/1                      Columns  57-64
          Coliforms, MPN                            Columns  65-72
          Radionuclides                             Columns  73-80

This group of cards must end with ENDATA10A, even if no  data are to be
entered.
WASTELOADINGS AND WITHDRAWALS DATA (FORM 17 OF 19)

          This group of cards, one per inflow or withdrawal,  describes
the percent of treatment (for wastewater treatment),  inflow or withdrawal,
temperature, and dissolved oxygen, BOD, and conservative mineral  concentrations,
They must be ordered starting at the most upstream point.   The following
information is on each card.
                                  VI-14

-------
          Waste!oad order number
          Wasteload Identification or name
          Percent treatment (use only if
            influent BOD values are used)
          Wasteload inflow or withdrawal
            in cfs (a withdrawal must
            have a (-) sign).
          Temperature, degrees F
          Dissolved oxygen concentration,  mg/1
          BOD concentration, mg/1
          Conservative Mineral I, mg/1
          Conservative Mineral II, mg/1
          Conservative Mineral III, mg/1
                                                    Columns  11-15
                                                    Columns  20-35
                                                    Columns  36-40

                                                    Columns  41-50
                                                    Columns  51-55
                                                    Columns  56-60
                                                    Columns  61-65
                                                    Columns  66-70
                                                    Columns  71-75
                                                    Columns  76-80
This group of cards must end with ENDATA11.
WASTELOAD DATA FOR ALGAE, N, P, COLI FORMS, AND RADIONUCLIDES (FORM
18 OF 19)
          This group of cards, one per wasteload,  is required only if
                 N03, PO,, coliforms, and radionuclides are to be simulated.
Otherwise they may be deleted.   The following information is on each  card.
algae, NH3> N02,
          Wasteload order or number
          Chlorophyll a_ concentration,
            microgram/1
          Ammonia concentration, mg/1
          Nitrite concentration, mg/1
          Nitrate concentration, mg/1
          Phosphate concentration, mg/1
                                                    Columns  20-24
                                                    Columns  25-32

                                                    Columns  33-40
                                                    Columns  41-48
                                                    Columns  49-56
                                                    Columns  57-64
                                    VI-15

-------
          Coliform, MPN                             Columns 65-72
          Radionuclides                             Columns 73-80

This group of cards must end with ENDATA11A, even if no data are to be
entered.
LOCAL CLIMATOLOGICAL DATA (FORM 19 OF 19)

          The following cards are required only if dynamic temperature
and/or dynamic algae is being simulated.  Otherwise they may be deleted.
Each card represents readings at three hour intervals, chronologically
ordered.  There must be a sufficient number of cards to cover the time
period specified for the simulation.  The following information is on  each
card.

          Month                                     Columns 18-19
          Day                                       Columns 21-22
          Year (last two digits)                    Columns 24-25
          Net Solar Radiation1, Langleys            Columns 31-40
            per hour
          Cloudiness2, fraction in tenths           Columns 41-48
            of cloud cover
          Dry Bulb Temperature2, degrees F          Columns 49-56
          Wet Bulb Temperature2, degrees F          Columns 57-64
          Barometric pressure2, inches Hg           Columns 65-72
          Wind speed2, knots                        Columns 73-80

There is no end card for this group.
Required only if dynamic algae is simulated and temperature  is  not.
2Required if temperature is dynamically simulated.
                                     VI-16

-------
                              SECTION VII
                            EXAMPLE PROBLEM

                                                            Page
EXAMPLE                                                     VII-1
TEST PROBLEM DATA AND RESULTS                               VI1-2
                                                                                           o

-------
SECTION VII

-------
                              SECTION VII
                            EXAMPLE PROBLEM

                                                            Page
EXAMPLE                                                     VII-1
TEST PROBLEM DATA AND RESULTS                               VI1-2

-------
                               SECTION VII
                             EXAMPLE PROBLEM
          The example problem was for a branched system of 6  reaches,
97 elements, 2 headwaters,  1  junction, 1  point source waste load,  and
1 withdrawal.  The water temperature was  65.0°F., and the total  daily
radiation was 400 Langleys.  The input information is shown on  the following
pages.

          The problem was set to compute the steady state concentrations
of TD.S, BOD, chlorophyll A, phosphorus, ammonia, nitrite, nitrate, dissolved
oxygen and fecal coliform.   There was no incremental  runoff or  flow
augmentation.  Reaeration was computed by the #3 option, the  equation  by
O'Conner and Dobbins.  The computed values can be seen in the final report
on each reach, shown on the following pages.

          The DO saturation at 65°F. is 9.48 mg/1.

          The interim report shown on the following pages indicates that
almost all of reach 3 is supersaturated.   The point source waste load
effects can be seen in reach 2, element 6, the input point for  all water
quality constituents.  DO levels and chlorophyll a_ levels go  down, other
constituent concentrations increase.
                                   VII-1

-------
COMPUTER DATA SHEETS
     AND REPORT
     VII-2

-------
                                                   o-
                            RM 9OO
                                                        RM 700
                                                       -RM 650
                                                       — RM 96 0
                                                        RM 400
                                                       >RM Z60
                                                      — RM 200
                            O
                            o
The atovt oaun contains the following fnimes



      Z  Headwaters (mommum allowable • 15 )



      I  Junction (maximum allowable • IS)



      6  Reaches (maximum allowable * 751



      I  Ware discharge

                  (maximum allowable *90)

      I  Withdrawal



      97 computational elements I max allowable* 500)
                            I-
FIGURE
                SCHEMATIC  DIAGRAM OF  A

                HYPOTHETICAL  STREAM  SYSTEM

-------
r,»owTn PAIF
TTERATIPI.
r.nnwTH PATF
RT"«TH "ATE
MOM cONv"i-r,r-iT i^
?
MO'J CONVFPf-t'iT It
riON fOtlVEnr-FNT IN
°7 ELE'EMTS
'.2 CLEHENTS
0 CLEMENTS
Fiissnivrn nxyfiiN ii1 MG/I
BCM/CL 1
1 8.1U
2 7. PI
3 10. 3b
1 °.lt
5 7.02
(• 7.38
?
*.21
7!h4
10 .91
oJ32
7.0«
7.40
3
(•.14
7.Pf
10. OH
Ofya
7J06
7.4?
u
«.07 o
7.HX 7
9.97 9
T.26 9
7.09 7
7.15 7
r,
.01
."9
.H7
.?3
.11
.17
f.
7.9E
7.36
9.7P
9.21
7.13
7.149
7
7.02
7.11
9.69
9.19
7.16
7.51
nlori'FMCAi. oxrGE" OECANn
RCH/ri_ 1
1 2.67
2 1.19
3 1.96
4 1.-55
5 3.91
6 3.21
2
9.71.
1.11
1.92
1 .52
.1.86
1.18
.1
?.A1
l!o9
1.89
1.19
3. PI
3.15
V
2.5? 2
1 .05 1
1 .85 1
] (i|* i
1^76 1
3J12 3
APHONIA AS
QCH/fL 1
1 .°9
2 .79
3 .50
H .47
5 1.11
6 1 . 31
>
.9fl
.79
.50
.17
1 .11
1.31
3
.97
.7P
.19

l|lO

t
.96
|77
.19
.16
l.»0 1
1.3? 1
r'lTRITF ftS
RfH/fL 1
1 .Oh
2 .11
1 .PI
t ."3
5 .16
6 .17
2
.06
.11
.01
.03
.16
.1»
1
07
11
«2
ns
17
18
«
.07
.11
.09
.03


IIITRATE AS
BCH/CL 1
1 .30
? .44
3 .10
1 .11
b l.Oit
f 1.09
?
.11
!l5
.in
.11
1.0-i
i .10
1
M
i"1!
.10
.11
l.OP
1.10
U
.1?
|l6
.10
.11
1 . O1- 1
1.10 1
PHOSPl.OMiS
RCH/CL 1
2
T
u
5
.11
.01
.ni
.11
.72
.10
N IN
5
.95
.76
.19
.16
!l9
."
M IN
5
.nr
.11
.P?
.at


H IN
•i
.39.
."7
.10
.11
.05
.10
AS P
5
6
?.31
7.12
1.78
1.11
1.67
1.07
*F/L
6
.9n
2.03
.19
.16

U33
HR/L
6
.OP
.16
.02
.04

.18
H6/L
6
.31
l!35
.10
.11
1.06
1.11
7
3.21
7.11
1.71
1.18
3.63
3.01

7
.93
2.01
.18
.16
1.39
1.33

7
.09
.17
.02
.0*

.16

7
.11
l!36
.10
.12
1.06
1.11
8
7.H8
6,89
9.6?
9.17
7.18
7. SI
IM MG/L
8
2.11
6.82
1.71
1.35
3.58
3.01

8
.92
1.99
.18
.15
1.36
1.32

8
.09
.18
.09
. OU

.18

a
.31
1.07
.10
.12
1.06
1.11
o
7. as
6.69
9.56
9.15
7.20
7. "55

9
9.09
6.51
1.68
1.11

9^98

9
.91
1.97
.18
.15
1.38
1.3?

9
.09
.18
.01
.01

.18

9
.3S
1.08
.11
.12
1.07
1.11
10
7.83
6.51
9.50
9.1M
7.23
7.57

10
1.93
6.26
1.65
1.30
3.50
2.96

10
.90
1.9S
.18
.15
1.37
1.32

10
.10
.19
.03
.04

.18

10
.16
1.10
.11
.19
1.07
1.12
11
7.81
6.36
9.11
9.13
7.25
7.59

11
1.85
6.00
1.61
1.28
1.15
2.93

11
.89
1.93
.17
.15
1.37
1.31

11
.10
.20
.03
.04

.18

11
.36
l.°l
.11
.12
1.07
1.12
12
7.80
6.22
9.10
9.11
7.27
7.61

12
1.77
5.76
1.38
1.25
3.11
2.90

12
.88
1.91
.17
.91
1.36
1.31

12
.10
.20
.03
.01

.18

12
.37
1.12
.11
.12
1.08
1.12
in r-K/L
6
7
8
9
10
11
12
ITERATION 3
13 11 15
7.79 7.78 7.78
6.10 6.00

9.11 9.10 9.09
7.29 7.31 7.33
7.63 7.65 7.68
ITERATION 1
13 11 IS
1.70 1.62 1.55
5.52 5.29

1.23 1.20 1.18
3.37 3.33 3.29
2.68 2.85 2.83
ITERATION 3
13 11 15
.87 .86 .85
1.89 1.87

.11 .11 .11
1.36 1.36 1.35
1.31 1.30 1.30
ITERATION 3
13 11 IS
.10 .10 .11
.21 .21

.01 .01 .04

.18 .in .16
ITERATION 3
13 H IS
.38 .38 .39
1.11 1.15

.12 .13 .13
l.OP 1.08 1.09
1.13 1.13 1.1.1
ITERATION 3
13 14 15

16
7.78



7.35
7.74

16
1.19



3.25
2.79

16
.84



1.35
1.30

16
.11




.18

16
.10



1.09
1.13

16
  17    18    19    20




7.78  7.79  7.80  7.81










7.81  7.86  7.9Z  7.97






  17    18    19    20




1.12  1.36  1.30  1.25










2.76  2.73  2.69  2.66






  17    18    19    20




 .83   .82   .81   .80










1.29  1.29  1.29  1.28






  17    18    19    20




 .11   .11   .11   .11










 .18   .18   .18   .18






  17    18    19    20




 .11   .11   .12   .13










1.11  1.11  1.11  1.15






  17    IB    19    20

-------
.?'.   .20
                        .'0    .an   ,?o
t
1
f
5
6


.5*li ,?0
.P* .Oc
.05 .05
1.19 1.19
I." '.19

^L 1 ?
. ""' .S"1 .'f
.05 .or. .(i*.
.01 .01 .m
i." 1.1° 1.1°
1 I11 1 **'( 1 ^9
si r-nr AS OIL A
115
?.00 J.flO
.OS .05
.05 .05
1.4° 1.19

1M UG/L
f. 7
?.on
.05
.05
1.39


8
?.0fl
.05
.0"5
1.39


Q
2.00
.05
.05
1.3°


10
?.oo
.05
.05
1.31


11
2.00
.05
.05
1.39


12
?.on

.05
1.39


13
2.00

.0'- .05
1.39 1.39

ITERATION 3
11 15



1.39


16
                                               .'"   .20   .211   .20   ,?0   .20   .?C   .20   .20   .20   .20   .20
                                                                                              1.39  1.39  1.39  1.39
                                                                                                      18
                                                                                                            19
                                                                                                                  20
                                                                           12.03 12.?1  12. SB 12.57 12.75 12.95 13.11
FFCAL rOLIFORM
"CM/CL 1
1 .15
2 .05
3 .01
1 .01
5 11.09
6 P.fK
2
.10
.05
.01
.01
13.67
8.18
5
.-16
.01
.01
.00
1.1. ?6
R.?9
1
.3.1
.01
.01
.00
12.B6
tt.10
5
.21
!o&
.01
.no
12.17
7.92
AS 1000/100
(i
.2S
19)39
.01
.on
12.10
7.71
C1NSEIJVATIVE MINERAL
RCH/CL i
2
*
1
5
6
7
.71
IlisB
.01
.00
11.73
T.56
I =
7
"L
8
.21
10.23
.01
.00
11.38
7.3"
TOS IN
a

9 10
.19 .17
36.31 32.78 29.
.01 .01
.00 .00
11.01 10.71 10.
7.?2 7.06 6.
tl-lG/L X 0.1)
9 10

11
16
56
01
00
39
90

11

12
.1*
26.70
.01
.00
10.07
6.711

12

13
.13
21.10

.00
9.77
6.59

13
ITERATION
H
.11
21.75

.00
9.18 9.
6.11 6.
ITERATION
H
3
15
10


00
19
32
3
15

16
.09



8.92
6.13

16
                                                                                                17
                                                                                                      ia
                                                                                               .08   .07
                                                                                                            19


                                                                                                           .07
                                                                                                                  28
                                          20

                                         .06
                                                                                              5.95  5.77  5.60  5.43
                                                                                                17
                                                                                                      18
                                                                                                            19
                                                                                                                  20
             ALGAE GROWTH RATES IN PER O«Y ARE
              415678
                                                      10
                                                            11
                                                                  12
   ITERATION
13    H    1
                                                                                          16
1 ,'3
2 .27
3 .10
1 .10
5 .11
6 .11
.23
.27
.10
.10
.11
.11
.9.1 .23 .ai
.?7 .27 .?B
.10 .10 .10
.10 .10 .10
."1 .11 .11
.11 .11 .11
.21
.1?
.10
.10
.11
.11
.21
.12
.10
.10
.11
.11
PI-OTOSYNTHESIS-PESPIRA8ION
RCH/CL 1
1 1.98
? 2.11
' .82

5 S!E?
6 3.55
2
'.no
'.13
.83
.87
1.S2
'.56
315
?.pl 2.03 2.Q1
? . SI ? . 36 2 . .18
.'* .63 ."3
,«B .8* .89
3.i? 1.52 3.53
1.56 1.56 3.56
6
2.b6
3.63
.6
-------
                                                    F  i  n
                                                                REPORT
                                                 RCflCH NO.   1.0    RCH= REACH  1
                                                 RTVtR MILES  90.0   TO    70.0
1 . HYPKHULIC
PARAMETER
FLOU (CFS)
DEPTH (FT)

ELE"H i
no n.30
POO
NH3
N02
NOi
POt
ALGY
rtiLI
2.S7
.99
.06
.30
?0
inli2
."5

8. 21
2.75
.98
.06
.31
.20
10.25
.40

3
8. It
2.63
.07
.07
.M
.90
10. ^B
.^6
P It K
s
HEAD OF RFUCH ENO OF REACH
inn. ooo 100. POD
.757 .757
S.547 5.547

a. 07
2.52
.qj
.07
.32
.?fl
in. si
.33
8.01
2.41
.95
.OR
.32
.20
30.6-5
.29
7.96
2,31
.94
.08
.35
.20
10.79
.26

7.92
2.?1
.93
.09
. 14
.20
10.93
.24
7.88
2.11
.92
.09
.34
.20
11. 0«
.21
U W t,
7. as
2.02
.91
.09
.35
.20
11.23
.19
ia •
10
7.83
1.93
.90
.10
• 36
.20
11.38
.17
ino.ooo
• .757
5.547

7.81
1.85
.89
.10
.36
.20
11.5*
.16
* 9
1C
7.60
1.7T
.88
.10
.37
.20
11.70
.1*
MINIMUM
100.000
.757
5.547

7.79
1.70
.87
.10
.38
.80
11.86
.is

7.78
1.62
.86
.10
.38
.20
12.03
.11
AVERAGE
100.000
.757
5.517
. ft
1 7
7.78
1.55
.85
.11
.39
.20
12.21
.10
. A
1 D
7.78
1.49
.84
.11
.40
.20
12.38
.09
                                                                                                        17

                                                                                                      7.78
                                                                                                              IB
                                                                                                                    19
                                                                                                                          20
                                                                                                            7.79
                                                                                                       .42  1.36
                                                                                                       .83   .82
                                                                                                       .11   .11
                                                                                                       .41   .41
                                                                                                       .20   .20
                                                                                                       .57 12.75 12
                                                                                                       .08   .07
                                                                                                       .00 27.00 27
                                              .80  7.81
                                              .30  1.29
                                              .81   .80
                                              .11   .11
                                              .42   .43
                                              .20   .20
                                              .95 13.14
                                              .07   .06
                                              .00 27.00
« NOTE:  UMTS ARE
                         EXCEPT FOR  ALGAE  AS CHL  A IN UG/L
                                AND  FECAL  COLIFORH AS 1000/100 KL

                                AND  CONSERVATIVE  MINERAL   I  = TOS IN  IM6/L  X  0.1)
1.  AVERAGE  V S I. M E S  OF  REACH  CO
                                                                  NTS
      DEC*I RATES (t/OAYI
                    .60
         KNM*  =    .is
         KM)?  =   1.1)0
         KCOL1 =   1.50
         KRDN  =    .00
                                  SETTLING RATES
BOD   =    .00
IL6AE =    .50
                                                           BENTHOS SOURCE  RATES i«6/FT/o»r)
BOD =  .00
NH3 =  .00
P04 =  .00
                                                                  RATE
                                                         (I/DAY)

                                                         K2 =    .863
                                           CHLOR A/ALBAE
                                           RATIO 4UG/HG>
                                                                                                                RATIO
                                                                                                                         90.00

-------
                                                    FINAL   REPORT

                                                 REACH NO.  2.0   RCH= REACH 2
                                                 RIVER MILES   70.0  TO   56. 0
1. HTnnBULIC **
PH'AHFTEB
FLPu (CFS)
HEAD OF REACH END OF REACH riftXIPUK
= 100.000 110.000 110.000
VELOCITY CFPSI =
p. u A
ELF*
DO 7.
BOD 1.
UH3
N02
N03
P04
DEPTH
T E R
1
Hi 7
19 1
79
11
44
20
ALGT 13.31 13
COL I
CQN1 27.
• NOTE:

05
00 97
(FT)
2
.84 7.
.14 1.
.79
.11
.»S .
.20
.54 13.
.05
.00 27.

3
• 6 7
09 1
79
11
111
?0
75 13
nt
no 27
UNITS ARE fG/L.




4
.88 7
.05 1
.77
.11
.46
.20
.97 14
.01
.00 27
EXCEPT

.757 .787
5.547 5.874
5 6 7 8 9 10
.09 7.36 7.11 6.89 6.69 6.51
.01 7.42 7.11 6.82 6.55 6.26
.76 2.03 2.01 1.99 1.97 1.95
.11 .16 .17 .18 .18 .19
.47 1.35 1.36 1.37 1.38 1.40
.20 2.00 2.00 8.00 2.00 2,00
.19 13.22 13.57 13.93 14.29 14.67 15
.06 49.39 44.38 40.23 36.31 32.78 29
.00 33. fit 33.64 S3. 64 31.64 33.64 33
FOR ALGAE AS CHL A IN UG/L
ANO FECAL COLIFORN AS 1000/100 NL
.787
5.874
11
.36
.00
.93
.20
.41
.00
.OS
.58
.64


12
6.22
5.76
1.91
.20
1.42
2,00
15.45
26.70
33.64


niNinun
100.000
AVERAGE
106.429
.757
5.547
13
6.10
5.52
1.89
.21

2loO
15.86
24.10
33.64



6
S
1

1
2
16
21
33


14
.00
.29
.87
.21
.43
.00
.28
.75
.63


.776
5.758
15











                                AND  CONSERVATIVE MINERAL   I s TDS IN IHG/L X 0.1)
                                                                                                  16
                                                                                                              18
                                                                                                                    19
                                                                                                                          20
3.  AVERAGE   VALUES  OF  REACH  COEFFICIENTS
      OFCAV RATES n/PAT)
                                  SETTLING RATES (I/DAT)    BENTHOS SOURCE RATES (H6/FT/OAt»    REAERATION RATE   CHLOR A/ALGAE
                                                                                                (1/OAYI         RATIO IUG/HGI
           ,(,t
KNHi  =    .15
Hum  =   1 .00
KCnLI =   I.JO
KRnN  =    .00
HOD   =    .OO
ALGAE =    .50
BOD =  .00
NH3 =  .00
P(M» s  .00
                                                                                                K2 =
                                                                                                        .827    RATIO =  50.00

-------
                                                    FINAL   REPORT    *


                                                 REACH MO.  3.0   RCH= REACH 3 TRIB
                                                       PIILES   ?7.0  Tn   1S.O
1. H Y

ELEM
00 10
ROD I
NH3
N02
N03
POD
ALGY 5
COLI
D H A U L 1 C
PARAMETER
FLOu ICFS)
VELOCITY IFPSI
DEPTH (FT)
1
.35
.96
.SO
.01
.10
.05
.00
.01
2
10.21
1.92
.50
.91
.in
.05
S.01
.01
3
10.08
l.«9
.«9
.02
.10
.05
"•.01
.nJ
PAH
=

1
9.9T
1.85
.""
.0?
.10
.0*
1.G?
.01
AHFFFP WAL
HEAD OF RTUCH
50.000
1.721
3.
5
9.H7
l.M
."9
.02
.10
.05
5.02
.01
137
6
9.78
1.78
.19
.02
.10
.05
5.02
.01

7
9.69
1.71
.16
.02
.10
.05
5. OS
.01
END OF REACH
50.000
1.721
V.
A
a
9.62
1.71
.tt>
.02
.10
.05
5.03
.01
3.137
LI 1 F
U L
9
9.56
1.6A
.«
.03
.11
.05
5.0<»
.01

10
9.50
1.65
.49
.03
.11
.05
5.0(1
.01
HAXIWJM NXNimj* AVERAGE
50.000 50.000 50.000
1.721 1.721 1.721
3.137 3.137 3.137
11
9..ij  =    .15                ALGAE =    .so                NHJ =  .00
         KNCi?  =   1.00                                              POU =  .00
         KCHLI =   i.so
                    .00

-------

1 . H Y


?• U A
FLFH
no t.
"00 1.
NHJ
N02
Nn3 .
PO* .
AL&Y i.
roLl
POM is.
* *
nhAULIf PAR
PARAMFTE.P
FLOu CCFSl =
VELOCITY (FPSI =
OEPTH IFT) =
1ER QUALITY

36 <».32 1.7f. «.7f
55 1.52 1.11 1.16
17 .17 .af, ,HK
03 .03 .01 .01
11 .11 .'1 .11
01 .Ob .05 .01
Ob 5.06 S.flf. 5.07
01 .01 .no .on
no iS.oo n.on 51.00

A t1 E T E R V
HFAO OF PEACH
50.000
1.721
3.137
PAH A N E T

= .23 «).21 9.
1.13 1.11 1.
.16 .16
.01 .01
.11 .11
.05 .05
5.HB 1.08 5.
.00 .00
Ib.OO 15.00 15.

a


p

19
38
16
01
12
05
09
00
00
REACH
RIVER
Lll F C
U L a
END OF
so.
1.
no. i.
MILES
REACH
000
721
3.117
Rif n 1 HFC
v n L u t- o
R ""
".17 9
1.35 1
.11
.01
.1?
.OS
5.09 5
.00
11.00 15
•»
.15 9.
.31 1.
.IS
.01
.18
.01
.10 S.
.00
.00 15.
0 RCH= QEACH
15.0
HA
50
1
3

10
11 9.
30 1.
15
01
18
05
10 5.
00
on is.
TO
XI nu"
.000
.7?!
.137

11
13 9
28 1
15
01
12
05
11 5
00
00 IS





12
.11
.25
.11
.01
.1?
.05
.12
.00
.00
1 TRIB
.0
50.000
1.781
1.137

13
9.11 9.
1.23 1.
.11
.01
.18
.05
5.12 5.
.00
15.00 15.






11
10
20

01
13
05
13
00
00


AVERAGE
bO.OOO
1.721
1.137

15 16 17
9.09
1.16
.11
.01
.13
.05
5.11
.00
15.00
• NOTE:  UNITS ARE MR/Lt FXCEP1  FOR  ALGAE AS CHL A IN UG/L
                                At.o  FECAL COLIFORM AS 1000/100 «L

                                ANU  CONSERVATIVE 1INERAL   I = TOS IN (HG/L X 0.11
1.   A V C P A G F  VAlllFS  OF  REACH  COEFFICIENTS
                                                                                                               IB
                                                                                                                           20
      DECAY RATES II/DAY)
         R1MOD =    .60
         KNH3  =    .15
         KNO'  =   1.00
         KCOLI =   1.5H
         KKDN  =    .00
                                  SETTLING- RATE* II/DAYI   BENTHOS SOURCE RATES ««G/FT/OAYI   REAERATION RATE   CHLOR  A/ALGAE
                                                                                                (I/DAT)         RATIO  IUG/HGI
ROD   =
ALGAE =
.00
.50
BOD =  .00
NH3 =  .00
P01 =  .00
K2 =   3.061
                RATIO s   SO.00

-------
                                                     FINAL    REPORT
                                                  PEACH  NO.   5.0   RCH= REACH 5
                                                  PIVER  MILES   S6.o   TO   »o.o
    hYPR^UI. Ir  PARAHFTER   VALUES
           PARAMFTFK

        FLOU ICFSI
        VELOCITY  IFP«)
        PEPTH (FT I
HE/>P Or PEACI'

  160.nan
    ?.741
    •i.25?
                                         FND  OF  RFACH

                                           160.000
                                             2.71(1
                                             5.?53
 HAXI1UK

160.000
  2.7m
  5.253
160.000
  2.741
  5.253
                                                                                           AVERAGE
            160.000
                                                                                            5.25.1
>. w
ELF
DO
ROD
NH3
N02
NOJ
•» 1
7.02
1.91
1.41

l.Ol
2
7.04
3.86
1.41

l.OS
i
T.r.i
S!M
l.on

l.OS
4
7. 01
1.76
1.40

l.OS
5
7.11
3.72
1.39

1.05
f
7.11
1.67
1.39

1.06
7
7.16
3.63
1.39

1.06
V A
8
7. IB
1.5R
1.38

1.06
9 10 11
7.?0 7.23 7.25
3. "54 3.50 3.45
1.1B 1.37 1.37

1.07 1.07 1.07
12
7.27
3.41
1.36

i.oe
13
7.29
3.37
1.36

1.08
14
7.31
3.33
1.36

l.on
15
7.33
3.?9
1.35

1.09
16
7.35
3.25
1.35

1.09
                                                                                                         17
                                                                                                                18
                                                                                                                      19
 P0»  1.39  1.39  l.»«  1.39  1.39  1.39  1.39   1.39   1.19   1.39   1.39   1.39  1.39  1.39  1.39  1.39
«LCr 12.96 il.OS H.15 13.24 13.33 13.41 13.-53 11.62 13.72  13.82  13.92  14.02 14.12 14.22 14.32 14.42
TOLI 14.09 11.67 13.?6 12.86 12.47 12.10 11.73 11.3ft 11.04  10.71  10.39  10.07  9.77  9.48  9.19  8.92
CON1 ?7.7« »7.7« 87.7« 27.7* 27.7« 27.7R 27.78 ?7.78 J.-.7"  27.78  27.78  27.78 27.78 27.7« 27.78 27.78
* N01F:  UNITS APE MG/L.
                                AND
                                     ALGAF AS CHL A  IN UG/L
                                     FECAL COLIFORK  AS 1000/100  ML
                                AMD  COPJSERYATIVE MINERAL    I =  TOS  IN  |HG/L  X  0.11
i.  AVE«»GE;  VALIJTS  OF  PEACH  co
                                                                 E  N  T  S
            PATES 11/HAYI
Kinon =    ,f,a
".MUl  r    .15
KNn'  =   1 .""O
HrnLI =   1.50
      =    .00
                                  SFTTLINP RATES  U/D«Y)   BENTHOS  SOURCE  RATES
                                       pon   =
                                       ALGAE =
                                                  .00
                                        BOO =  .00
                                        NH* =  .00
                                        PO« =  .on
                             REAERATION RATE    CHLOR A/ALGAE
                               (1/OAY)          RATIO IU6/HGI

                               K2 =   1.782     RATIO =  50.00

-------
                                                    FINAL
                                                                    P 0 R  T
                                                 REACH NO.  6.0   RCH= REACH  b
                                                 RIVER PILES   »o.o  TO    zo.o
                                          VALUCS
           P«PAl"IETET

        fLCJ ICFS)
        VELOCITY IFP1)
        REPTH IFTI
                             HEAP. OF REAC*

                               1*0.000
                                 3.65S
                                 5.253
                                    FNP OF REACH

                                       an.ooo
                                        2.770
                                        3.06A
 MAXIHUH

160.000
  3.655
  5.2S3
MINIHU"

no.noo
 ?.770
 3.466
 AVERAGr


136.000
  T.125
  4.765
    U A 1 E
               QUALITY  PAKAMETER  VALUES
   ELFH  1
  DO
 POO
        18
        71
            1
            1
           11.
                                                              10
                                                                    11
                                                                           12
                                                                                 13
                                                                                             15
                                                                                                   16
                                                                                                         17
                                                                                                               18
                                                                                                                     19
                                                                                                                           20
. MO
.18
.31
.18
.10
.39
 H02   .17
 M03  t.09
 POK  1.39
ALGY m.Sl
TOLI  ".68
CON1 ;>7.7S -J7.78
7.US>
1.15
1 .31*
!ip
l.'O
l.*9
7.4S
3.1?
1 .31
".IR
1.10
t.39
7.«7
3.10
1.33
.18
1.10
1.39
7.49
1.07
1.33
.in
1.11
1.39
7.51
3.0«
1.33
.18
1. 11
1.39
7.53
3.01
1.32
.1R
1.11
1.39
7,'3'i
2.9R
1. 12
.IB
1.11
1.39
7.57
2.96

.16
1.12
1.39
7.59
2.93
1.31
.16
1.12
1.39
7.61
2.90
1.31
.16
1.12
1.39
7.63
2.66
1.31
.16
1.13
1.39
7.65
2.65
1.30
.18
1.13
1.39
7.66
2.83
1.30
.16
1.13
1.39
7.74
2.79
1.30
.IB
1.13
1.39
7.81
2.76
1.29
.16
1.14
1.39
7.66
2.73
1.29
.16
1.14
1.39
7
2
1

1
1
                                                                                           ,90 16.02 16
                                                                                           ,95  5.77  5
                                                   .92  7.97
                                                   .69  2.66
                                                   .29  1.26
                                                   .16   .16
                                                   .14  1.15
                                                   .39  1.39
                                                   .15 16.26
                                                   .60  5.43
                             27.71 ?7.7H ?7.7B ?7.7H ?7.7fl 27.7B ?7.78 27.78  27.76  27.78  27.76 27.78 27.76 27.78 27.76 27.76
* NOTE :
         UNITS ARE HG/L, FXCEPT FOR
                                AND
                                     ALGAE AS CHL A IN U6/L
                                     FECAL COLIFORH AS 1000/100 ML
                                AND  CONSERVATIVE MINERAL   I = TDS IN  (MG/L  X  0.11
3.  AVCRAGE  VALIIT5  OF  REACH  COEFFICIENTS
      OCCAV PATt
-------
                                  TABLE  II-2
                        INPUT  PARAMETERS  FOR QUAL-II
IHPVT
HUMS
IH fit'.
»,
«,
'»
a,
°.
»s
"•
"MX
P
8,
8,
o,
°.
"•
K,
",
",
*>
K,
<•

-------