&EPA
         United
         Agency
             sa) Protection
             u,d Development
            Environmental Research
            ^aooraxory
            Athens GA 30613
EPA-60Q/3-84-Q66
June 1984
     rologicai Simulation
Program—FORTRAN
(HSPF):
         Users Manual for
         Release 8.0

-------
                                             EPA-600/3-84-066
                                             June 1984
   HYDROLOGICAL SIMULATION PROGRAM—FORTRAN
     (HSPF): USERS MANUAL FOR RELEASE 8.0

                      by

              Robert C. Johanson
           University of the Pacific
          Stockton, California  95204

                John C. Imhoff
              John L. Kittle, Jr.
            Anthony S. Donigian, Jr.
             Anderson-Nichols & Co.
         Palo Alto, California  94303
            Contract No. 68-01-6207
                Project Officer

              Thomas 0. Barnwell
Technology Development and Applications Branch
       Environmental Research Laboratory
            Athens, Georgia  30613
       ENVIRONMENTAL RESEARCH LABORATORY
       OFFICE OF RESEARCH AND DEVELOPMENT
      U.S. ENVIRONMENTAL PROTECTION AGENCY
            ATHENS, GEORGIA  30613
                             U.S. Environs V i  Protection Agency.
                             Region  V, Library
                             230 South  Dearborn  G,  --^
                             Chicago, Illinois  60604

-------
                                 DISCLAIMER

      The information in this document has been funded wholly or in part by
the United States Environmental Protection Agency under Contract No. 68-01-
6207 to Linsley, Kraeger Associates, Ltd., and Anderson-Nichols and Co.  It
has been subject to the Agency's peer and administrative review, and it has
been approved for publication as^ an EPA document")  Mention of trade names or
commercial products does not constitute endorsement or recommendation for use
by the U.S. Environmental Protection Agency.
     Environ p.-o,.: :   . t . (";n /
                              ~ ^1J
                                      ii                             RELEASE 8.0

-------
                                  FOREWORD

      As environmental controls become more costly to implement and the penal-
ties of judgment  errors become more severe, environmental quality management
requires more efficient analytical tools based on greater knowledge of the
environmental phenomena to be managed.  As part of this Laboratory's research
on the occurrence, movement, transformation, impact, and control of environ-
mental contaminants, the Technology Development and Applications Branch
develops management or engineering tools to help pollution control officials
achieve water quality goals through watershed management.

      The development and application of mathematical models to simulate the
movement of pollutants through a watershed and thus to anticipate environmental
problems has been the subject of intensive EPA research for several years. The
most recent advance in this modeling approach is the Hydrological Simulation
Program—FORTRAN (HSPF), which used digital computers to simulate hydrology
and water quality in natural and man-made water systems.  HSPF is designed for
easy application to most watersheds using existing meteorologic and hydrologic
data.  Although data requirements are extensive and running costs are signifi-
cant, HSPF is thought to be the most accurate and appropriate management tool
presently available for the continuous simulation of hydrology and water quali-
ty in watersheds.

                                       William T. Donaldson
                                       Acting Director
                                       Environmental Research Laboratory
                                       Athens, Georgia
                                   ill                            RELEASE 8.0

-------
                                  ABSTRACT

      The Hydrological Simulation Program—FORTRAN (HSPF)  is a set of computer
codes that can simulate the hydrologic, and associated water quality, processes
on pervious and impervious land surfaces and in streams and well mixed im-
poundments.  The manual discusses the modular structure of the system, the
principles of structured programming technology, and the use of these princi-
ples in the construction of the HSPF software.  In addition to a pictorial
representation of how each of the 500 subprograms fits into the system, the
manual presents a detailed discussion of the algorithms used to simulate
various water quality and quantity processes.  Data useful to those who need
to install, maintain, or alter the system or who wish to examine its structure
in greater detail also are presented.  The manual is an update of Users Manual
for Hydrological Simulation Program—FORTRAN (HSPF). EPA-600/9-80-015.

      This report was submitted impartial fulfillment of Contract No. 68-01-
6207 by Linsley, Kraeger Associates, Ltd., and Anderson-Nichols and Co. under
the sponsorship of the U.S. Environmental Protection Agency.  This report
covers a period from September 1980 to September 1983, and work was completed
as of September 1983.
                                      iv                            RELEASE 8*0

-------
                                    CONTENTS
Foreword	ill
Abstract	iv

Part

 A   Introduction	    1
 B   General Principles	    8
 C   Standards and Conventions 	   23
 0   Visual Table of Contents	45
 E   Functional Description	131
 F   Format for the Users Control Input	357

Appendices

 I   Glossary of Terms	727
 II  Sample Runs	739
 HI Program NEWTSS	742
 IV  Guide to the Programmers Supplement  	  752
 V   Time Series Concepts and the TSS	756
                                                                      RELEASE 8.0

-------
                               ACKNOWLEDGMENT

      The original version of this document, Users Manual for the Hydrological
Simulation Program—FORTRAN (HSPF).  EPA-600/9-80-015, was prepared by Robert C.
Johanson, John C. Imhoff, and Harley H. Davis, Jr., under EPA grant and contract
to Hydrocomp Incorporated, Mountain View, California.  Extensive revisions,
modifications, and corrections to the original report and computer code were
performed by Anderson-Nichols and Co. in subsequent, unpublished releases.
This document (Release 8.0), which incorporates all of the earlier work, was
prepared by Linsley, Kraeger Associates, Ltd., and Anderson-Nichols and Co.
while performing the continuing HSPF maintenance and user support activities
under EPA contract.

      Additional HSPF-related reports include Application Guide for Hydrological
Simulation Program—FORTRAN (in press), HSPF Parameter Adjustments to Evaluate
the Effects of Best Management Practices (EPA-600/3-83-066), Preliminary Appli-
cation of HSPF to the Iowa River Basin to Model Water Quality and the Effects
of Agricultural Best Management Practices^ (EPA-600/3-83-068), Executive Sum-
mary for the Hydrological Simulation Program—FORTRAN (EPA-600/3-82-046),
Maintenance and Testing of the Hydrological Simulation Program—FORTRAN (EPA-
600/3-82-059) and Evaluation of Remote Sensing Datafor Input into Hydrological
Simulation Program—FORTRAN (HSPF) (JiPA-600/3-81-037) .
                                     vi                            RELEASE 8.0

-------
                                                                    Introduction
                            PART A     INTRODUCTION

                                    CONTENTS

1.0  Purpose and Scope of the HSPF Software	   2
2.0  Requirements for HSPF	   4
3.0  Purpose and Organization of this Document 	   5
4.0  Definition of Terms 	   6
5.0  Notice of User Responsibility	   6
6.0  Acknowledgments 	   6
                                                                     RELEASE  8.0

-------
                                                                    Introduction

1.0  PURPOSE AND SCOPE OF THE HSPF SOFTWARE

The use  of models  which simulate  continuously the  quantity/quality processes
occurring in the hydrological cycle is  increasing rapidly.   Recently there  has
been a proliferation in the variety of models and in the range of processes  they
simulate.   This has been  a mixed blessing to a user.   To  get the benefits of
simulation,  he has  to select a model  from a bewildering array  and then spend
much effort  amassing and  manipulating the  huge quantities  of data  which  the
model  requires.   If  he wishes  to couple  two  or more  subprocess models   to
simulate a  complete process,  he  often encounters further  difficulties.    The
underlying assumptions and/or structures of the  subprocess models may make  them
somewhat incompatible.   More frequently,  the  data structures are so different
that coupling requires extensive data conversion work.

One reason for these problems is that the boom in modeling work has not  included
enough work on  the development of good  model structures.   That is,    very  few
software  packages  for  water  resource modeling  are  built  on  a  systematic
framework in which a variety of process modules can fit.

With HSPF we have attempted to overcome these problems as far as possible.  HSPF
consists of a set of modules arranged in a hierarchical structure,  which permit
the  continuous simulation  of a  comprehensive  range of  hydrologic and  water
quality processes.  Our experience with sophisticated models indicates that much
of the  human effort  is associated  with data  management.   This  fact,  often
overlooked by model builders,  means that  a successful comprehensive model must
include a sound data management component.    Otherwise,  the user may become so
entangled in data  manipulation that his progress on the  simulation work itself
is drastically retarded.   Consequently,  the HSPF  software is planned  around a
time  series management  system  operating on  direct  access principles.     The
simulation  modules draw  input from  a Time  Series  Store and  are capable   of
writing output  to it.   Because these  transfers require very  few instructions
from the user, the problems referred to above are minimized.

The system is designed so that the various simulation and utility modules can be
invoked conveniently,  either  individually or in tandem.   A  top down  approach
emphazing structured design has been followed.  First, the overall framework  and
the Time Series Management System were designed.  Then, work progressed  down  the
structure from the highest, most general level to the lowest, most detailed  one.
Every level was planned before the  code was written.   Uniform data structures,
logic figures,  and programming conventions were used throughout.   Modules  were
separated according to  function so that,  as much as  possible,  they contained
only those activities which are unique to them.   Structured design has  made  the
system relatively easy to extend,  so that  users can add their own modules  with
relatively little disruption of the existing code.
                                                                      RELEASE 8.0

-------
                                                                    Introduction

Now,  a note  on the initial contents  of the system.   Presently,   it includes
modules which  can handle almost  all the functions  which are available   in  the
following existing models:

     (1)  HSP (LIBRARY, UTILITY, LANDS, CHANNEL, QUALITY)
     (2)  ARM
     (3)  NFS
     (4)  SERATRA

The HSPF software  is not merely a translation  of the above models,   but a  new
system with a framework designed to  accomodate a variety of simulation modules;
the modules described above are the initial contents.  Many extensions have been
made to  the above  models in  the course  of restructuring  them into  the HSPF
system.

It is hoped that  HSPF will become a valuable tool  for water resource planners.
Because it is  more comprehensive than most existing systems,   it should  permit
more effective planning.  More specifically, the package can benefit the user in
the following ways:

     (1)  The time-series-oriented direct access data  system and its associated
          modules can serve as a convenient means of inputting, organizing,   and
          updating the large files needed for continuous simulation.

     (2)  The unified user  oriented structure of the model  makes it relatively
          simple to operate.  The user can select those modules and options that
          he wishes to execute in one run,   and the system will ensure that  the
          correct  sets of  code  are invoked  and  that  internal and  external
          transfers of  data are handled.   This  is achieved with a  minimum of
          manual  intervention.   Input  of  control  information is  simplified
          because a consistent system is used for this data for all the modules.

     (3)  Because the  system has been  carefully planned using  modern top-down
          programming techniques,  it  is relatively easy to  modify and extend.
          The use of uniform programming  standards and conventions has assisted
          in this respect.

     (4)  Since the  code is written almost  entirely in ANSI  standard Fortran,
          implementation on a wide variety of machines is possible.
                                                                     RELEASE 8.0

-------
                                                                    Introduction

2.0  REQUIREMENTS FOR HSPF

In  awarding the  grant for  development of  HSPF,   the EPA  set the  following
requirements:

     (1)  It must  manage and perform deterministic  simulation of a  variety of
          aquatic  processes which  occur  on and  under  land  surfaces and  in
          channels and reservoirs.

     (2)  It  must  readily  accommodate   alternate  or  additional  simulation
          modules.

     (3)  It must permit easy operation of  several modules in series,  and thus
          be  capable  of  feeding  output  from  any  operation  to  subsequent
          operations.

     (4)  It must be in ANSI Fortran with minor specified extensions.


With the concurrence of the EPA, we expanded on these requirements:

     (1)  It must have a totally new design.  Existing modules should not merely
          be translated, but should be fitted into a new framework.

     (2)  It must be designed from the top down,  using some of the new improved
          programming  techniques,  such  as  Structured  Design and  Structured
          Programming.

     (3)  Duplication  of blocks  of  code which  perform  similar or  identical
          functions should be avoided.

     (4)  The user's  control input must  have a  logically  consistent structure
          throughout the package.

     (5)  Uniform  standards  and  practices must  be  followed  throughout  the
          design, development and documentation of the system.

     (6)  It  must have  a conveniently  operated disk-based  Time Series  Store
          built on the principle of direct access.

     (7)  The design  must be geared to  implementation on larger models  of the
          current generation  of "minicomputers."   It must  be compatible  with
          Operating  Systems which  share machine  core space  using either  the
          virtual memory approach or a conventional overlay technique.
                                                                      RELEASE  8.0

-------
                                                                     Introduction

3.0  PURPOSE AND ORGANIZATION OF THIS DOCUMENT
This report contains all the documentation of  the HSPF system.    It  is  designed
to:

     (1)  introduce new users to the principles and concepts  on  which the
          system is founded

     (2)  describe the technical foundations of the algorithms in  the
          various application (simulation) modules

     (3)  describe the input which the user supplies  to run the  system

To meet  these needs and,   at the same  time,  to  produce a document  which is
reasonably easy to use, we have divided this report into  several distinct  parts,
each with its own organization and table of contents.

Part A (this one) contains introductory material.

Part B outlines the general principles on which the HSPF  system  is  based.    This
includes a discussion  of the "world view" which our   simulation modules embody.
A firm grasp of  this material is necessary before the  detailed material  can be
properly understood.

Part C explains the  standards and conventions which  we employed  to  develop the
HSPF  software.   It  discusses  the advantages  of   Structured  Programming  and
describes how we implemented this technique in standard Fortran.

Part D  is a  visual table  of contents.    It displays   pictorially  the  entire
hierarchy of subprograms, starting with the MAIN program  and  proceeding  down the
"tree"  to the most detailed level of the system.  It gives the  name,  number and
a brief description of each of the 500 subprograms.

Part E  documents the function of each  part of the software.    The organization
of  this part  follows the  layout of  the software   itself.   The  relationship
between,  and the functions of,  the various modules  are  described,   starting at
the highest most general  level and proceeding down to the  lowest  most  detailed
level following  the numbering  system in  the visual  table  of  contents.    The
algorithms used  to simulate the quantity  and quality processes which  occur in
the real world are described in this-part.

Part F describes the User's Control Input;   that is,  the information which the
user must provide in order to run HSPF.

Material which might obscure the structure of  this document  if  it  were  included
in the body of  the report appears in Appendices.   These  include  a  glossary of
terms and sample runs.
                                                                      RELEASE 8.0

-------
                                                                    Introduction

4.0  DEFINITION OF TERMS

In this document,  terms which have a  special meaning in HSPF,  are enclosed  in
quotes the first time they occur.    Usually an explanation follows immediately.
A glossary of terms will be found in Appendix I.


5.0  NOTICE OF USER RESPONSIBILITY

This product has been carefully developed.    Although the work included  testing
of  the software,   the ultimate  responsibility for  its use  and for  ensuring
correctness of the results obtained, rests with the user.

The EPA and  the developers of this software  make no warranty of  any kind with
regard to this software and associated documentation, including, but not  limited
to,  the  implied warranties  of merchantability  and fitness  for a  particular
purpose.  They shall not be liable for errors or for incidental or consequential
damages in connection with the furnishing, performance or use of this material.

While we intend to correct any errors which users report,  we are not obliged  to
do so.    We reserve the  right to make  a reasonable  charge for work  which  is
performed for a specific user at his request.


6.0  ACKNOWLEDGMENTS

This work  was sponsored  by the Environmental  Reasearch Laboratory  in  Athens,
Georgia.  David Duttweiler was the laboratory director and Robert Swank the head
of the  Technology Development  and Applications  Branch,  which  supervised the
project.

Mr. Jim Falco was the Project Officer initially on the HSPF development work;  he
was succeeded by Mr.  Tom Barnwell who  continues as the Project Officer  for all
HSPF application, maintenance, and user support activities within EPA.

The initial  HSPF and user manual  development work was performed  by Hydrocomp,
Inc.;   members of  the entire  project team  are acknowledged  in the  original
(Release 5.0) version of the user manual  (EPA Publication No.  EPA-600/9-80-015)
published in April 1980.   Subsequent revisions  and extensions to the HSPF code
and user manual were performed by  Anderson-Nichols in their application  of HSPF
in Iowa.   Preparation of  this document was  performed by  Anderson-Nichols and
Linsley,  Kraeger Associates,  Ltd.  under the HSPF maintenance and user  support
work. The primary participants in the work noted above, and their contributions,
are discussed below.

Robert Johanson  was Project  Manager for Hydrocomp  on the  initial development
work,   and provided  consulting  assistance  to Anderson-Nichols  and  Linsley,
Kraeger  Associates on  the subsequent  application and  maintenance work.   For
Hydrocomp,  he  was responsible  for project  coordination,  development   of the
standards and practices and  much of the  application modules and  wrote the SNOW
and PWATER sections  of the PERLND module,   and the HYDR section  of the RCHRES
module.  He  was also  responsible for  the Run  Interpreter.  As  consultant  to
Anderson-Nichols, Dr.  Johanson assisted  in the design and developed much of the
pseudo code for the new SEDTRN and GQUAL  sections.

                                       6                             RELEASE 8.0

-------
                                                                     Introduction

John Imhoff worked on the RCHRES module both during the initial development  work
for Hydrocomp and during subsequent modifications  and development  of  the  SEDTRN
and GQUAL  sections for  Anderson-Nichols.   He analyzed  the HSP   QUALITY code,
performed the detailed  design of the new  RCHRES module and wrote   the  code and
documentation for  it.   He  also coordinated the  production of  the  functional
descriptions (Part E) of all the application modules.  For Anderson-Nichols,  Mr.
Imhoff directed the task of developing  the SEDTRN and GQUAL modules,  including
much of the pseudo code,  the FORTRAN translation,  and module testing.  He  also
wrote the additions  and modifications to the functional  descriptions for these
modules.

Harley Davis designed  and coded most sections  of the PERLND module   and  all of
the IMPLND module for Hydrocomp during  the initial development effort.  He  also
wrote the functional descriptions of those modules.

Delbert Franz  was Principal Investigator for  Hydrocomp on the  initial project
and participated in  the overall design of  the system.  He also  supervised the
work on the TSMS,  produced most of the code for the TSPUT group of  subprograms,
and wrote the  associated documentation.   He is  currently providing  consulting
assistance  to Anderson-Nichols  and Linsley,   Kraeger Associates   on the  HSPF
maintenance and user support work.

Jack Kittle,  for  Hydrocomp,  assisted in assembling the code  into the program
file,  and also set up the system for arranging data in the numerous versions of
the COMMON block. For Anderson-Nichols, Mr.  Kittle directed the compilation and
assembling of new and modified subroutines for Releases 7.0 and 8.0  of HSPF.   He
also developed and documented the  MUTSIN (Multiple Timeseries Sequential  Input)
module, for interface with other models,  and the lethality analysis code  of the
DURANL module.   Additionally, he directed the removal of all half-word  integers
in the HSPF code.   He is  currently responsible for corrections,   updates,   and
preparation of new HSPF releases as part of the HSPF maintenance work.

Tony Donigian  participated in the initial  design of the PERLND  algorithms and
reviewed the  functional descriptions  (Part E)  for  technical accuracy   in the
initial  project   by  Hydrocomp.   For   Anderson-Nichols,   he    is  Principal
Investigator/Project  Manager  on the  HSPF  Application  Project in   Iowa  that
included the HSPF modifications discussed above.   He participated  in  the  design
of the GQUAL  and SEDTRN modules and provided overall  guidance and  supervision.
Mr.  Donigian  is currently  Project Manager  for Anderson-Nichols   on the  HSPF
maintenance work.

Brian Bicknell performed the text processing for the entire user manual  (Release
7.0 version) , including corrections, updates, and modifications. He assisted in
the pseudo  code development  and FORTRAN  translation of  the GQUAL  and  SEDTRN
modules,  participated in assembling and compiling new and modified  subroutines,
and  performed detailed  testing and  associated  code corrections   for  the   new
modules.

Dan Meier performed the  updates to the code and documentation  for Release  8.0.
He  also developed  a  set of  comprehensive  test runs  for  Release  8.0,    and
significantly improved the OSV section of the programmer's supplement.
                                                                     RELEASE  8.0

-------
                                                              General Principles
                          PART B    GENERAL PRINCIPLES
                                    CONTENTS
1.0  View of the Real World	    9
     1.1   General Concepts  	    9
     1.2  Nodes, Zones, and Elements  	 ..    9
     1.3  Processing Units and Networks 	 .....   11

2.0  Software Structure 	   14
     2.1   Concept of an "Operation"	   14
     2.2  Time Series Storage	   16
     2.3  Times Series Management for an Operation  	   17
     2.4  HSPF Software Hierarchy	   17

3.0  Structure of a Job	   20
     3.1   Elements of a Job	   20
     3.2  Groups of Operations  	 ......   20
                                    FIGURES
Number                                                                 Page

1-1   Nodes, zones and elements	   10
1-2  Directed and non-directed graphs	   12
1-3  Single- and multi-element processing units 	 .   13
2-1   Logical structure of the internal scratch pad  	   15
2-2  Activities involved in an operation	   18
2-3  Overview of HSPF software	   19
3-1   Schematic of data flow and storage in a single run .......   21
3-2  Extract from typical User's Control Input, showing how
       grouping of operations is specified  	   22
                                                                     RELEASE 8.0

-------
                                                              General  Principles

                          1.0  VIEW OF THE REAL WORLD
1.1  General Concepts

To design a comprehensive simulation system, one must have a consistent  means  of
representing the prototype; in our case, the real world.  We view  it as  a  set  of
constituents  which move  through a  fixed  environment and  interact  with  each
other.   Water is one constituent;  others are sediment,  chemicals,   etc.   The
motions and interactions are called processes.
1.2  Nodes, Zones, and Elements

The prototype is a continuum of constituents and processes.   Simulation  of  such
a system  on a digital computer  requires representation in a  discrete fashion.
In  general,  we  do this  by subdividing  the prototype  into "elements" which
consist of "nodes" and "zones."

A node corresponds  to a point in  space.   Therefore,  a particular   value  of  a
spatially variable function can be associated with it, for exanlple, channel  flow
rate and/or flow cross sectional area.   A  zone corresponds to a finite  portion
of the real world.    It is usually associated with the  integral of a spatially
variable quantity,   for example,  storage  in a  channel reach.   The zone the
smallest unit into which we subdivide the world.  The relationship between zonal
and nodal values is similar to that  between the definite integral of  a function
and its values at the limits of integration.

An element is a collection of nodes and/or zones.   Figure 1-1 illustrates these
concepts.   We simulate the response of the land phase of the hydrological cycle
using elements called "segments."  A segment is a portion of the land  assumed to
have areally uniform properties.   A segment of land with a  pervious  surface is
called a "Pervious Land-segment" (PLS). Constituents in a PLS are represented as
resident in a  set of zones (Fig.  1-1a).    A PLS has no nodes.    As a  further
example, consider our formulation of channel routing.   We model a channel reach
as a one  dimensional element consisting of  a single zone situated  between two
nodes (Fig.  1-1b).   We simulate the flow rate and depth at the nodes; the  zone
is associated with storage.

The conventions of  the finite element technique  also fall within the scope of
these concepts.   Figure 1-1c shows a two dimensional finite element used in the
simulation of an estuary.   Three nodes  define the boundaries of the  triangular
element.   A  fourth node,  situated inside,   may be viewed as  subdividing the
element into three zones. This L*st type of element is not presently used in any
HSPF module,  but is included in this discussion to show the generality provided
by HSPF.  The system can accommodate a wide variety of simulation modules.
                                                                     RELEASE  8.0

-------
                   •now xone
                   turfooe
                         rone
                      Tone
opat.

ncde
 n
hcde.
                                                                           nodes
                                                      Cb)
                                                          M
                                                          2;
                                                          M
50


P


V
CO
M


00
•

o
 I—I
                                            z
                                            n
                                            M
                                            *tf
                                            f
                                            M
                                            in

-------
                                                              General  Principles

There are  no fixed  rules governing  the grouping  of zones  and  nodes   to  form
elements.    The model  builder  must decide  what  grouping  is reasonable   and
meaningful,  based on his view of the real world processes being simulated.    In
the foregoing material we presented some elements used in HSP and  other  systems.
In general,  it is convenient to define elements  so that a large  portion of  the
real  world  can  be  represented by  a  collection  of  conceptually  identical
elements.   In  this way,   a single  parameter structure  can be  defined which
applies to every element in the group.  Thus, each element is a variation on  the
basic theme.  It is then meaningful to speak of an "element type."  For  example,
elements  of type  "PLS"  all  embody the  same  arrangement  of nodes  and   are
represented by sets of parameters with identical structure.   Variations between
segments are represented  only by variations in the values  of parameters.    The
same applies to any other element, such as a Reach, layered lake or  a  triangular
finite element.

As illustrated  in the  above discussion,  nodes  are often  used  to  define  the
boundaries of zones and elements.   A zone,  characterized by storage,   receives
inflows and  disperses outflows;  these  are called  "fluxes." Note  that  if  the
nodal values of a field variable are known,  it is often possible  to compute  the
zonal values (storages).  The reverse process does not work.
1.3  Processing Units and Networks
To  simulate a  prototype  we must  handle the  processes  occurring within   the
elements and  the transfer  of information and  constituents between   them.   The
simulation  of  large  prototypes  is made  convenient  by  designing   a   single
"application module" for a given type of element or element group,  and applying
it repetitively to all similar members in the system.   For example,   we  may  use
the RCHRES  module to  simulate all  the reaches  in a  watershed using  storage
routing.   This  approach is  most efficient computationally  if one   element or
group of elements, called a "processing unit" (PU), is simulated for an extended
period of time before  switching to the next one.   To permit   this,   we  must be
able to define a  processing sequence such that all information  required by  any
PU comes  from sources external  to the system  or from PU's  already  simulated.
This can only  happen if the PU's and  their connecting fluxes  form  one  or more
networks  which  are  "directed  graphs."  In a  directed  graph  there  are   no
bidirectional  paths  and  no  cycles.   Figure  1-2  shows  some  directed   and
nondirected graphs.

The requirement  that PU's form directed  graphs provides the rule  for grouping
elements into  PU's.   Any  elements interacting  with each  other via loops or
bidirectional fluxes must be  grouped into a single PU because  none of them  can
be simulated apart from the others.

Thus,   we  can have  both single element  and multielement PU's.    A  PLS is an
example of the former  and a channel network simulated using  the full equations
of flow exemplifies the latter (Fig. 1-3).  A multielement PU is also  known as a
"feedback region."  The collection of PU's which are simulated in a given run is
called a "network."
                                       11                            RELEASE  8.0

-------
(a)
                              Pi erected
                                             Cb)
                                              unit"
                                   where

                                   Flux (.arrow
M
r4
w
w

00

b
          i-1-2.
CO                          Cd)

     Nor\-4cr
-------
                   PLS
                                                                                PU
. 1-3
                                                                        tMif-
00
o
                                                                     B
                                                                     CO

-------
                                                              General Principles

The  processes which  occur within  a PU  are represented  mathematically in  an
"application model."  The corresponding computer  code is called an "application
module" or "simulation module."

2.0  SOFTWARE STRUCTURE
2.1  Concept of an "Operation"

A great variety of activities are performed by HSPF;  for example,  input a  time
series to the Time Series Store,  find the cross correlation coefficient for two
time series, or simulate the processes in a land segment.   They all  incorporate
two or more of the following functions:   get  a set of time series,  operate on
the set  of input  time series  to produce  other time  series,  and  output the
resulting  time series.    This  applies both  to  application modules   (already
discussed)   and to  "utility modules,"  which perform  operations ancillary or
incidental to simulation.    Thus,  a simulation run  may be viewed as  a set of
"operations"  performed  in  sequence.    All   operations  have  the   following
structure:

                                 SUPERVISE
                                 OPERATIONS
                             (subroutine OSUPER)
                GET TIME          OPERATE          PUT TIME
                 SERIES           (utility          SERIES
            (subroutine group        or         (subroutine group
                  TSGET)        application          TSPUT)
                                  module)
The OPERATE function  is the central activity  in the operation.    This   work is
done by  an "operating  module"  (OM)   and its   subordinate  subprograms.     They
operate for a specified  time on a given set of  input time   series  and produce a
specified  set  of  output  time  series,   under   control   of   the  "operations
supervisor"  (OSUPER).   All  of  the pieces  of time   series   involved  in  this
internal operation  have the  same interval and  duration.   They  are therefore
viewed as written on an "internal scratch pad" (INPAD),   resident in  the  core of
the machine (Fig. 2-1).  The operating module receives  the scratch  pad with some
rows filled  with input and,   after its work is done,   returns  control   to the
supervisor with another  set of rows filled with output.     The operating module
may overwrite  an input  row with its  own output.   The  computing  module being
executed, together with the options being invoked,   will  determine  the number of
rows required in the INPAD.   For example,  simulation  of the hydraulic  behavior
of a stream requires relatively few time series  (eg.  inflow, depth and  outflow)
but the inclusion of water quality simulation  adds many  more time  series to the
list.   Now,  the total quantity of machine  space  available for  storage  of time
series is also  fixed  (specified in a  COMMON block)  by  the options in  effect;
this is the size ("area") of the INPAD.  Since both the size (N*M)  and number of
rows (M) in the INPAD are known, the "width"  (no.   of intervals,N)  can be found.
The  corresponding  physical time  is  called  the   "internal scratch pad  span
(INSPAN)."

                                       14                             RELEASE 8.0

-------
                                         General Principles
Row
Number
1
2
3
4
5
M
Time Interval Numbers
123456 	 N
























































  NOTE: there  is  one time series per row.
Figure 2~\   Logical  structure  of the internal scratch
            pad.
                        15
RELEASE 8.0

-------
                                                              General Principles

The "get time  series" function prepares the  input time series.   This  work  is
done by a subroutine group called TSGET.  It obtains the correct piece of  a  time
series from the appropriate file,  aggregates or disaggregates it to the correct
time interval, multiplies the values by a user specified constant (if required),
and places the data in the required row of the internal scratch pad.  Subroutine
group  TSPUT performs  the  reverse set  of operations.    TSGET  and TSPUT  are
sometimes bypassed if  a required time series  is already in the  INPAD when the
operation is started, or if the output is being passed to the next operation via
the internal scratch pad.

Modules TSGET and TSPUT are part of the "time series management system"  (TSMS).


2.2  Time Series Storage
The time series used  and produced by an operation can reside  in  three  types  of
storage.

(1)  The Time Series Store (TSS)

     This is the principal library for  medium-long term storage of  time series.
     As far  as the  machine operating system  is concerned,   it  consists   of a
     single large direct access file on a disc.  HSPF subdivides this  space  into
     many datasets containing time series.  Each is logically self-contained but
     may be physically scattered through the store.   A directory  keeps  track  of
     datasets and their attributes.   Before time series are written to  the  Time
     Series Store,   the store  must be initialized  and its  directory  created.
     This is done by executing the separate program NEWTSS,  which is  documented
     in Appendix III.

(2)  Sequential Files

     These are files with a constant logical record length which are resident  on
     or routed to punched cards,  a magnetic   tape,  a sequential  disk file  or a
     line printer.    Time series  received from agencies  such as  the  National
     Weather Service are typically on sequential files (cards or tape).

(3)  Internal Scratch Pad (INPAD)

     If two or more operations performed in  sequence use the same internal  time
     step,  time series  may be passed between them via  the INPAD.    Successive
     operations  may simply  pick  up the  data written  by  the previous ones,
     without any external (disc) transfer taking place.   This is  typically  done
     when time  series representing  the flow  of  water  (and  constituents)  are
     routed from one stream reach to the one next downstream.
                                        16                             RELEASE 8.0

-------
                                                              General  Principles

2.3  Time Series Management For An Operation


Any operation  involves a  subset of the  activities shown  in Fig.    2-2.    The
operating  module expects  a certain  set of  time  series in  the  INPAD.     The
operations supervisor,  acting under user control,  ensures that  the appropriate
input  time series  are loaded  from whichever  source has  been  selected,    and
informs the  computing module of the  rows in the  INPAD where it will  find its
input.  Similar arrangements hold for output of time series.


2.4  HSPF Software Hierarchy
The hierarchy of functions in HSPF is shown in Fig. 2-3.  Some explanatory notes
follow.

The "Run Interpreter" is the group of subprograms which reads and  interprets the
"Users Control Input."   It sets up internal information  instructing  the  system
regarding the  sequence of operations to  be performed.   It stores  the initial
conditions and the parameters for each operation in the appropriate  file on disc
and creates an instruction file which will ensure that time series are correctly
passed between operations, where necessary.

The "TSS management" modules are those used  to create,  modify,   or remove data
sets in the time series store.

The "Operations Supervisor"  is a subroutine which acts  on information provided
by the  Run Interpreter,   invoking the  appropriate  "application"  or "utility"
modules.   It  provides them with  the correct  values for parameters   and state
variables by reading the files created by the Run Interpreter.

Operating modules are  either "application modules" or  "utility modules."  They
perform the operations which make up a run.    Each time one of those  modules is
called,  an operation is performed for a period corresponding to the span  of the
internal  scratch pad  (INSPAN).   The  Operations Supervisor  ensures that  the
correct module is invoked.

"Service subprograms"  perform tasks such  as reading  from and writing to time
series storage areas,  adding T minutes to a  given date and time,   to get a new
date and time, etc.

The "Time Series Management System" (TSMS) consists of all the modules which are
only concerned with manipulation of time series  or the files used to  store time
series.  It includes the TSS management functions, and TSGET and TSPUT.
                                       17                             RELEASE 8.0

-------
                                 GENERAL PRINCIPLES
    TIME SCRIES
Acnvi-rte.s IMVOLVEIP ^ AN OFERATION
                 18
                                        RELEASE 8.0

-------
                    Run
                                         MAIN program
                                                                    Service
             -res



TSGET


i
_



module
app
lloi-tt
art or

1
1
1
	 — £>per<3i-Hrv^ J
	 modo le j
TSPUT
1
^6 utility module* _J
                    T55 Time
00
•

o
of  Hf>PF
                                                                                         S
                                                                                         2
                                                                                         O
                                                                                         H

-------
                                                              General Principles

3.0  STRUCTURE OF A JOB


3.1  Elements of a Job

A "JOB"  is the work performed  by HSPF in response  to a complete set   of  Users
Control Input.    It consists of  one or more  "RUNs" and/or  "Time   Series  Store
Management" activities.   A  RUN is a set  of operations which can   be  performed
serially, and which all cover the same period of time (span). The operations  are
performed in a sequence specified in the  Users Control Input.   To  avoid having
to  store large  quantities of  intermediate data  on disc,   operations may   be
collected in a group in which they share a common INPAD (INGRP).


3.2  Groups Of Operations

In most runs, time series have to be passed between operations.  As  described in
Section 2.2,   each operation can communicate  with three different  time series
storage areas:   the TSS, the INPAD, and sequential files.    This is illustrated
in Fig. 3-1.

Potentially,  any  time series  required by or  output by  any operation can be
stored in the  TSS or a sequential  file.   The user simply   specifies  the  exact
origin or destination for  the time series,  and the HSPF  system moves the data
between that device and the appropriate row of the INPAD.   This system can also
be used to transfer data between operations.   However, it does require that  all
transferred data be written to the TSS or  a sequential file.   This may be very
cumbersome and/or inefficient and  it is better to transfer data  via the INPAD,
where possible.

To transfer data via the INPAD,  operations must share the same pad. This  means
that all  time series placed in  the pad have  the same time  interval   and  span.
This requirement provides a logical basis for grouping operations; those sharing
a common INPAD are called an INGRP  (Fig. 3-1).   The user specifies  the presence
of groups  in his "Users  Control Input  (UCI)." A  typical sequence  of   input is
shown in Fig. 3-2.

The user also indicates (directly or indirectly) in his control input the source
and disposition of all time series required by or output by an operation.   If he
indicates that a time series must be passed to another operation then the system
assumes that the transfer will be made via the scratch pad.   If they are not in
the same INGRP there is an error.   Without a common INPAD, the data must go  via
the TSS.  The structure of the Users Control Input is documented in  Part F.
                                        20                             RELEASE 8.0

-------
    OPN1
*
I	I
   OPN4
   1NP-AD
   OPN5
            	J
            INGRP2.I
   own
   OPN14
3-1
                                     GENERAL PRINCIPLES
TSS     T\me series 5twe
Ot>N    Operation
IN6RP   In^rnal scratch pod
        group
        In^rnal ^crafeh pad
           FOR A SINC^-E- KON
                    21
                  RELEASE 8.Q

-------
                                                               General  Principles

The sequence of events in a run is as follows  (refer  to Fig.3-1).

(a)  Operation 1 is performed until its output rows in the  INPAD are filllled.

(b)  Data are transferred from those rows to other time series storage areas,  as
     required.  If  any of these  data are not  required by other   operations  in
     INGRP1,  their  INPAD rows are available  for reuse by other   operations  in
     INGRP1.

(c)  Steps (a) and (b) are repeated for each operation in INGRP1,

(d)  Steps (a), (b),  and (c) are repeated,  if necessary,   until the run  span  is
     complete.

(e)  The INPAD is reconfigured  and work on operations 5 through   11 proceeds  as
     in steps (a-d) above. The step repeats until all INGRP's  have  been handled.
     The run is now complete.

Note that  reconfiguration of a  scratch pad implies  that  its contents  will  be
overwritten.
      OPN SEQUENCE
          INGRP                  INDELT = 00:30
            COPY     1
            PERLND   1
          END INGRP
            PERLND   2           INDELT = 00:30
            PERLND   3           INDELT - 00:20
          INGRP                  INDELT = 00:30
            COPY     2
            RCHRES   1
            RCHRES   3
            RCHRES   5
            RCHRES  20
            RCHRES  22
            RCHRES  23
            RCHRES   7
            RCHRES   8
            RCHRES  50
            RCHRES 100
            RCHRES 200
          END INGRP
          INGRP                  INDELT = 00:10
            DURANL   1
            PLTGEN   1
          END INGRP
      END OPN SEQUENCE
            Fig. 3-2  Extract  from  typical  Users  Control Input,
              showing how grouping  of  operations  is  specified
                                        22                             RELEASE 8.0

-------
                                                         Standards & Conventions
                       PART C   STANDARDS AND CONVENTIONS

                                    CONTENTS
1.  Structured Programming Technology 	 . 	    24
    1.1   Introduction	    24
    1.2  Structure Charts .... 	 .............    25
    1.3  HIPO Diagrams	    2?
    1.4  Pseudo Code	    27

2.  Terminology . 	 ............    29

3.  Fortran Language  .........................    30
    3.1   Use of ANSI Fortran	    30
    3.2  Allowable Extensions to ANSI Fortran ..... 	    30

4.  Fortran Conventions ......*....,............    31
    4.1   The Need for Conventions	    31
    4.2  Conventions used to Implement the Standard Structure Figures  .    31
    4.3  Other Conventions  ........... 	    34

5.  Conventions Used in Functional Description  	    42

6.  Method of Documenting Data Structures	    42
    6.1   Structure of Data in Core	    42
    6.2  Structure of Data on Disc Files	    42

7.  Method of Handling Diagnostic Messages  ..............    43

8.  References	    44
                                       23                            RELEASE  8.0

-------
                                                         Standards & Conventions

1.0  STRUCTURED PROGRAMMING TECHNOLOGY


1.1  Introduction

Developing,  modifying,  or even trying to understand,  a large computer program
can be a  very frustrating activity,  as  many people who have  been involved in
those kinds of work can testify.  Typical problems encountered are:

     (1)  It  is hard  to  see the  relationship between  various  parts of  the
          program.  The underlying design, if there was any, has become obscured
          as the program evolved to its current state.

     (2)  The logic of the program is very contorted.   The flow chart resembles
          a bowl of spaghetti.

     (3)  "Bugs" are difficult to locate.

     (4)  A  seemingly  trivial alteration  to  the  program  sets off  a  chain
          reaction.  The resulting problems take a long time to solve.

Why do these  things happen?   Must long programs necessarily  suffer from these
ills?

There is no quick answer which covers all aspects of the problem.  However,  many
of these troubles are directly attributable to program structure, or the lack of
it.   Typically,   when the program was  designed,  an unsuitable  structure was
chosen or no thought was given to the matter.   The reason for this situation is
not hard to find.   Most engineers are  not taught how to design programs;   they
are only taught how to write program code.   There is a great difference between
these two activities.    It is like the  difference between writing a  novel and
supplying short answers to a series of questions.

The  importance of  structure emerged  as computer  scientists investigated  the
reasons for these  problems.   As this work  went on,  a set  of new disciplines
evolved,   which  emphasized  structure in  the  design,   implementation,   and
documentation of software.   Collectively,  they  are referred to as "Structured
Programming Technology."  The individual techniques are:

     (1)  Structured Design
     (2)  Top Down Programming
     (3)  Structured Programming
     (4)  Hierarchy plus Input, Process, Output  (HIPO) Diagrams
     (5)  use of a Development Support Library

It  has  been  found that  the  use  of  these  methods,  either  singly  or in
combination,  leads to  computer programs and documentation which  are easier to
understand than those produced using conventional methods.   Also,  the software
has a unified underlying structure and it is easier to maintain.
                                        24                             RELEASE 8.0

-------
                                                         Standards  &  Conventions

Because  of  its obvious  suitability,   we  made  extensive  use  of   Structured
Programming Technology on this project.   To familiarize us with  the  techniques,
we acquired the "Textbook and Workbook on Structured Programming,"  and "HIPO - a
Design Aid  and Documentation  Technique" (IBM  1974).    These  books   contain an
independent study  program which gives  the reader  a  thorough  grounding  in the
underlying principles and practical application  of the techniques.   Because the
Textbook, Workbook, and HIPO Manual are comprehensive  and  readable, we used them
as reference works and kept as close as possible to the concepts  and  terminology
which they contain.  This should become apparent on reading further through this
document.   Through the remainder of this manual, those documents will simply be
referred to as the "Textbook," "Workbook," and  "HIPO Manual," respectively.
1.2  Structure Charts

A structure chart (SC)  is a diagram  which shows the functions  performed  by the
various modules in a program and their hierarchy.  The use of  SC's  in  Structured
Program Design,   including the methods used  to compile  them,   is   described in
Section 6  of the  Textbook.  We suggest  that the  reader review   that  material
before proceeding.

The  HIPO method  of  documentation  involves the  use  of   a  "visual  table  of
contents"  (see  HIPO Manual),   which  is  very  similar  to  an SC.    In  our
documentation system, we combine these two functions in a single diagram,   which
we still call an  SC,  e.g.  SC 4.0.   The visual table of   contents for HSPF is
given in Part D of this document.

To compile structure charts,   we use a combination of the   methods given  in the
Textbook and in the HIPO Manual, together with some ideas and  conventions  of our
own:

     (1)  Typically, the SC for a large program extends over several pages.   We
          use the  term SC either  to describe the entire  chart or to  refer to
          that part of it shown on a single page.

     (2)  Each box in an SC can be viewed in two distinct ways:

          (a)  as representing a single subprogram (the  one which  calls all the
               subprograms which perform subordinate functions)

          (b)  as representing the entire group of subprograms mentioned in (a)

          In our documentation system we use  this dual meaning  to  an  advantage.
          Details are given later.
                                       25                            RELEASE  8.0

-------
                                                         Standards & Conventions

     (3)  Each box  contains a description  of the action  which it and  all its
          subordinate  boxes  collectively  represent.    It  follows  that  the
          description given in any box must be implied in the descriptions given
          in all boxes in the chain connecting it to the MAIN program box,  e.g.
          the description for box 4.1.1 in SC 4.1  is implied in (or is part of)
          the descriptions for boxes 4.1,  4.0,  and 1.0.   Because it describes
          the action performed by one or more subprograms,  a description starts
          with the imperative form of a  verb,  e.g.  compute,  find,  get (HIPO
          Manual, p. 63).  In an SC, the description appears in lower case.

     (4)  The numbering system is as described in the HIPO Manual.   Numbers are
          placed inside the  boxes,  near the lower right hand  corner.  We have
          introduced one extension to the  numbering system because the function
          "perform an operation"  refers to any of the operating  modules in the
          system,   which  are  all  conceptually similar  and  of  equal  rank.
          Therefore, we assign them all the number 4.2 and distinguish them only
          by  a subscript.    For example,   4.2(3)  refers  to the  Reach/Mixed
          Reservoir Application Module, and 4.2(3),1 refers to Section 1 of that
          module (Hydraulics).

     (5)  There is a name  next to each box,  outside the  top left hand corner.
          It identifies  the Fortran subprogram  represented by the  box.   Note
          that this  name applies  to a  single box,   not an  entire subprogram
          group.  It is written in upper case.

     (6)  An SC bears the number of the highest level box which it depicts, e.g.
          SC 4.0 shows subprogram 4.0 and its subordinates.

     (7)  Where an SC  continues across more than  one page we. place  "flags"  at
          points where  the chart has been  broken.   They are labeled  with the
          chart number on which the information is continued.  For example , see
          the stubs at the bottom of SC 1.0 in Part D.

The entire set of SCs for the HSPF system appear together in the Visual Table  of
Contents (Part D).  It consists of the full set of Structure Charts, arranged  in
numerical order.  Its purpose is to enable a user to:

     (1)  see how the following material  (the  functional description in Part  E)
          is arranged

     (2)  get an overview of the entire system

     (3)  locate a given subprogram in the system

     (4)  see a subprogram in its surroundings,  so its  relationship to  the rest
          of the system can be better understood

     (5)  design an overlay structure,  if HSPF is being installed on a  computer
          which requires it.
                                        26                             RELEASE 8.0

-------
                                                         Standards & Conventions

1 .3  HIPO Diagrams

A  HIPO  diagram depicts  graphically  the  function  of  a subprogram  and  its
subordinate subprograms.   A HIPO Diagram  bears the same  number as the  SC box
which  it illustrates.   Thus,  for  example,   HIPO diagram  4.0 describes  the
functions performed by the entire subprogram group 4 from the perspective of the
head subroutine (OSUPER).

Although some HIPO  diagrams were prepared when  HSPF was designed,  we  did not
find them very useful, so they are not included in this document.   As we become
more  familiar  with Structured  Program  Design,   we  might develop  a  better
appreciation of their value.


1.4  Pseudo Code

Pseudo code  is an English-like  noncompilable language which  describes program
logic.   It is  discussed in Section 4  of the Textbook.   Its  chief advantage,
compared to Fortran  code,  is that it  encourages the writing of  programs with
good  structure which  are  easily read  and understood.   It  does not  contain
statement numbers or  GO TO statements.   We developed our  own version,  almost
identical to that used in the Textbook.    The entire HSPF system was written in
pseudo code (Johanson, et al.  1979)  before being translated into Fortran.   We
observed the following conventions:

     (1)  Only valid structure  figures are used.   These  include the SEQUENCE,
          IFTHENELSE, WHILEDO, DOUNTIL, and CASE figures.

     (2)  Successive levels of indentation are displaced  from each other by two
          columns.

     (3)  Fortran  identifiers and  subprogram names  are in  upper case,   e.g.
          RCHTAB.

     (4)  Other identifiers are in lower case with initial capital letter,  e.g.
          Time-parms.   This applies both to names  of groups of variables  (e.g.
          Date-time)  and  to names of any  individual variables which  have not
          been reduced to a Fortran identifier, e.g. Land-segment.

     (5)  Keywords are in upper case, e.g. DOUNTIL, BEGIN, IF, THEN.

     (6)  Other text is in lower case (no initial capitals).

     (7)  "CALL" means a subprogram is called.

     (8)  "INCLUDE" means a named segment of code will be physically inserted.

     (9)  In a  DOUNTIL it is  assumed that the initial  value of the  index (if
          used)  is 1 and that it is  incremented by 1,  unless other values are
          previously assigned and/or specified.
                                       27                            RELEASE 8.0

-------
                                                     Standards & Conventions

(10)   Character  string  constants  are enclosed  in  single  quotes,   e.g.
      'TSSM'.

(11)   Two-valued flags have the value ON and OFF or 0 and 1.

(12)   Comments are enclosed in brackets.

(13)   Where we refer to  all the elements of a vector or  array we often use
      the PL/1-like notation involving *.  For example,

      (a)  we  use
           OM(*) = FACT*OS(*)

           instead of
           DOUNTIL N = NOFLO
            OM(N) = FACT*OS(N)
           ENDDO

      (b)  we  use
           BEGIN SETTPT (RCHTAB(*),	)

           instead of
           BEGIN SETTPT(RCHTAB,	)

           to  denote the entire vector RCHTAB

(14)   Argument  lists are  enclosed in  parentheses,   with input  arguments
      first,  input/output arguments next and output arguments last.   These
      groups are separated by 'bb' or placed on separate lines as is done in
      our Fortran.

(15)   We often use a cross reference to save time and trouble, e.g.

          INCLUDE COMMON/SCRTCH/ version HYDR2
          CALL AUXIL (argument list as in AUXIL)

(16)   We use the following symbols for logical operators:

          =, not=, >, <, >=, <=

(17)   We follow our  Fortran coding conventions,  where  applicable  (Section
      4).

(18)   Every  program unit  has  a comment  immediately  following the  BEGIN
      statement, outlining its purpose  (as in Fortran).

(19)   We kept program units short, as the Textbook recommends.  We made free
      use of  "CALL" to achieve this.
                                   28                            RELEASE 8.0

-------
                                                         Standards & Conventions

    (20)  Individual  statements in  pseudo code  may  correspond to  individual
          Fortran statements or to groups of Fortran statements, for example:

          (a)  TABPT = TABPT - 1                         (single Ftn stmt)
          (b)  Warn that extrapolation will take place   (group of Ftn stmts)

          We  attempted  to  make  our pseudo  code  sufficienty  detailed   that
          inplementation in Fortran was simple.  This helped eliminate errors  in
          the translation process.
2.0  TERMINOLOGY
Successful software development  requires both clear thinking  and communication
of ideas.  If a member of a programming team is to function effectively, he must
have a  clear picture of  the problems  he is to  solve and he  must be  able  to
express  his  solutions  precisely.    When  team  members  interact  they  must
understand  each other  clearly.    And the  final  product  and its  associated
documentation must be  consistent and unambiguous.   This implies  that a common
set of technical terms and definitions should be used throughout the project.

Unfortunately,  in the  software field there is considerable  confusion over the
use of terms.   The  principal reason is that computer science  is still a young
discipline.   New terms are constantly appearing.  The development of Structured
Programming  Technology has  spawned  a whole  set of  jargon.    There is  also
confusion over the meaning of terms which have  been in use for some time,  e.g.
"module" and  "segment."  Many have poorly  defined meanings and,  as  a result,
mean  different things  to different  people.   Obviously  we need  to take  the
trouble to define our terms.

To minimize this kind of problem we  developed a glossary of terms pertaining  to
HSPF.  It is located in Appendix I.
                                       29                            RELEASE 8.0

-------
                                                         Standards & Conventions
3.0  FORTRAN LANGUAGE
3.1  Use of ANSI Fortran

There are  many different  "dialects" of  the Fortran  language.   Almost  every
machine and operating system has its own  variation on the basic theme.   One  of
the goals  for this  project was to  produce software  which would  be portable.
That is,  it should be capable of running on a wide variety of machines.   To  do
this we had to employ a common subset of the many dialects.

The  American National  Standards  Institute has  prepared  a specification  for
Fortran.  Most manufacturers now implement all of its provisions, plus their own
extensions.  We used ANSI Fortran together with a few specified extensions.
3.2  Allowable Extensions to ANSI Fortran

We decided to extend  beyond ANSI Fortran because,  when applied   to our  type  of
work,  it  does have some  deficiencies which  prohibit certain actions   or,   at
least,  make them awkward.   For an extension to  be approved it had to meet two
criteria:

      (1)  There had to be a compelling reason for its use in this  project.

      (2)  It had to be a feature incorporated in the Fortran languages of
          all the following series of machines:
          (a)  IBM 360 and 370
          (b)  UNIVAC 1100
          (c)  HP3000
          (d)  PDP11
          We figured that if these four systems all implemented a  feature,
          the chances were good that it was widely available.

The following extensions have been adopted:

      (1)  Direct access input/output

      (2)  In output formats, literals can be enclosed in single quotes e.g.  'ABC1
          instead of 3HABC

Adaptation of the code to a system which does not include extension  (1) would  be
very  costly.
                                        30
RELEASE 8.0

-------
                                                         Standards  & Conventions
4.0  FORTRAN CONVENTIONS
4.1  The Need for Conventions

In addition to defining a Fortran dialect for this software, we adopted  a set of
conventions  for its  use.    This was  done  because  conventions promote  good
programming style and, thus,  help to produce consistent code.    Usually,   there
are many ways of programming the solution to a given problem.  Although  they may
all use the same Fortran dialect and produce the same results, one method may be
vastly superior  to another  because it has  a clearer  or better structure and
implementation.   While good computer programming cannot  be reduced  to  a set of
rules,  the use of appropriate conventions  can greatly assist in producing code
which has a readily observable and logical structure.

Serious communication  problems can arise when  several people work on   the same
set of software.  We wanted to produce consistent software,  so it was necessary
to  adopt  conventions.  However,   this  did  involve  a trade-off.     Too  few
conventions would have resulted in code   which lacked cohesion;  too many would
have caused programmers to  feel stifled and restricted.   We tried   to  strike a
reasonable balance.
4.2  Conventions Used to Implement the Standard Structure Figures

The  Fortran language  does not  easily  lend itself  to structured  programming
because:

     (1)   It is not block structured.

     (2)   It has an IF statement which allows conditional execution  of  only
          a single statement on the true condition.

     (3)   It has a DO statement which allows for index condition testing
          only.

Therefore,  to write structured programs using  Fortran,  it is necessary to use
programming conventions.    In this section  the conventions for   simulating the
following standard structure figures will be outlined:

     (1)   IFTHENELSE

     (2)   WHILEDO (called by some DOWHILE)

     (3)   DOUNTIL

     (4)   CASE

Because of the lack of block structure,  it is necessary to use statement labels
in the  simulation of the standard figures.   These labels are given  as  lowercase
letters in the examples below.
                                       31
                                                                     RELEASE  8.0

-------
                                                         Standards & Conventions

4.2.1  IFTHENELSE

The IFTHENELSE figure tests a. single predicate "p" to determine which of  the  two
function bxocks  (of code)   F1 or F2  will be  performed.   The  convention  for
implementing the IFTHENELSE is:

        IF (NOT.p) GO TO a
          Code for F1
          GO TO b
     a  CONTINUE
          Code for F2
     b  CONTINUE

If the ELSE is not used, the figure reduces to the following:

        IF (NOT.p) GO TO a
          Code for F1
     a  CONTINUE

Statements within the clauses are indented two columns.  The CONTINUE statements
terminate each clause and are coded in line  with the IF,   The following may be
used if the code for F1 is a single statement:

        IF (p) Code for F1


4.2.2  WHILEDO

We call this figure WHILEDO and not DOWHILE   (as in  the  IBM Manual)  because  the
name reminds one  that the test is made  before the  block  is   "done."   The block
will not be executed at all if the condition is initially  false.

The WHILEDO is coded as follows:

     C  WHILEDO (optional additional explanatory comment)
     a  IF (.NOT.(p)) GO TO b
          Code for F
          GO TO a
     b  CONTINUE

The negation  of the  predicate "p" is  used  for clarity.     In actual   fact  the
condition is generally given without the NOT.   Statements within  the figure  are
indented two columns.  The CONTINUE clause terminates the  figure and is coded in
line with the IF.
                                        32                             RELEASE 8.0

-------
                                                         Standards & Conventions

4.2.3  DOUNTIL

The DOUNTIL figure provides essentially the same loop capability as the WHILEDO,
differing from it in two respects:

     (a)  The test of the predicate p is reversed.  The WHILEDO terminates
          when p is false; the DOUNTIL terminates when p is true.

     (b)  p is tested after each execution of F so that F is always executed
          at least once.

This figure can be implemented in two ways:

Method 1
     C  DOUNTIL (optional explanatory comment)
     a  CONTINUE
          Code for F
        IF (.NOT.(p)) GO TO a

     Statements within the figure are indented two columns.
     This method is used if an index variable is not
     needed or if the predicate p is complex.

Method 2
     The standard Fortran DO is really a DOUNTIL based on an index.  This
     form has a cleaner appearance and will probably execute faster.   It
     should probably be used even if the index is only a counter.

        DO a (index specification)
          Code for F
     a  CONTINUE

     Statements within the figure are indented two columns with respect to
     the DO and CONTINUE.  Note that, in terms of ANSI Fortran, the value of
     the index is undefined after completion of the loop.
                                       33                            RELEASE 8.0

-------
                                                         Standards & Conventions

4.2.4  CASE

The CASE  form is  used to  select one  of a  set of  functions  to  be performed
depending on the value of a variable aa  with m possible values.   The figure  is
implemented as:

     C  CASENTRY I
     k  GO TO(a, b, ..., n), I
     a  CONTINUE
          Code for case 1
          GO TO t
     b  CONTINUE
          Code for case 2
          GO TO t
     n  CONTINUE
          Code for case n
     t  CONTINUE
If it is possible for I to acquire  an invalid value,   the  following  code  can be
added to check for that condition:

        IF (I.GE.1.AND.I.LB.m) GO TO k
     C  Invalid value of I
        code to handle invalid value goes here

Statements within each case are indented  two columns.   The CONTINUE statements
separate each case and are coded in line with the  computed  GO  TO.
4.3  Other Conventions


4.3.1  Layout of program units

The Fortran language  makes certain stipulations  as  to  the   order  of statements.
We expanded on this, to improve the readability,  clarity, and  consistency of our
program units.  The order of things is:

     (1)  A comment card containing the number of the program  unit.

     (2)  The subprogram header line,  including  the  list of  dummy  arguments.

     (3)  A comment  of 1-10 lines  which describes   the general purpose  of the
          program unit.

     (4)  Type statements for the dummy arguments, if this  is  a subprogram.
                                        34                             RELEASE 8.0

-------
                                                         Standards & Conventions

     (5)  Any  COMMON  statements  and their  associated  type  and  EQUIVALENCE
          statements.  The COMMON blocks are all named and occur in alphabetical
          order.
          e.g.  COMMON/IO/INP,OUT,ERRMESS
                INTEGER INP,OUT
                REAL ERRMESS
                COMMON/PARMS/A1,ALTER,COAT
                INTEGER COAT
                REAL A1,ALTER

     (6)  Local variable declarations and any associated EQUIVALENCE statements.

     (7)  DATA statements, for local arrays and variables

     (8)  Statement function definitions

     (9)  FORMAT statements,   ordered by  statement number.    Numbers of  READ
          formats start  at 1000 and increase  by 10;  numbers of  WRITE formats
          start at 2000 and increase by 10.

    (10)  The executable code.   This consists of the standard structure figures
          and  code  segments  implemented  in  Fortran  using  the  conventions
          described earlier.


4.3.2  Control structure of a program unit

Code segments may be composed of any  of the Fortran statements.   However,  the
use of  GOTO,  IF,  and  DO statements is  restricted to the  standard structure
figures.   Control  flow enters  a code  segment at  the top  and leaves  at the
bottom.  No other entry points or exit points are permitted.


4.3.3  Type statements

The types and dimensions of all variables and  arrays used in a program unit are
declared;   none are  typed  by  default.   This  is  done  using the  following
statements, in the order given:

     LOGICAL

     INTEGER

     REAL

     DOUBLE PRECISION
                                       35                            RELEASE 8.0

-------
                                                         Standards & Conventions

Hollerith (character)   data are stored as  REAL or INTEGER variables  with four
characters  per storage  location.   Note  that this  is designed  to fit  those
machines  on which  REAL and  INTEGER variables  occupy four  bytes per  storage
location. It is, to some extent, a machine dependent aspect of the software.

The  DIMENSION  and  IMPLICIT  statements   are  prohibited,   and  dimensioning
information is never put  in a COMMON statement.   The identifiers  in each type
statement  are arranged  in alphabetical  order,   except those  which apply   to
variables in COMMON, which are arranged in their physical sequence.
4.3.4  DATA statements

The DATA statement is used to assign initial  values to a set of variables.    If
it is used to initialize local variables  in a subprogram,  the compiler ensures
that this  is done at  the start of  the run,  not  each time the  subprogram  is
called. This operation effectively makes the variable "permanent."  In a "stack"
machine,  such as  the HP3000,  this means  that the affected data  items occupy
space in the data segment throughout the execution of the program, not just when
the subprogram is executing.  To minimize the  loss of working space in the data
segment, we avoided the DATA statement as far as possible.


4.3.5  EQUIVALENCE statements

Equivalence statements are used where it  is necessary to do something esoteric,
such as  overlaying sets of data  which are not  required by the program  at the
same time, or the assignment of a single name to a group of variables,  which  is
done  often in  our  data  structures (Johanson,   et  al.   1979).   The  Chief
Programmers regulated this type of work.
4.3.6  Identifiers

An identifier is the  name of an array,  variable,  or  subprogram.   One  of  the
principles of Structured Programming is  that  "intelligent" identifiers be used.
That is,  the characters in the identifier should convey to the reader something
about the data which they represent.  In a large program there are many entities
which have to be named,  preferably in such a  way that the relationships between
them are indicated.   For example, in a reach  we might have water, sediment size
1, sediment size 2, nitrate, DO, etc.  Furthermore, we might need to distinguish
between the inflowing,  stored,  and outflowing quantities of these constituents
or we  might need identifiers which  indicate  the accumulated outflows  of these
constituents over the current day,  month,  and year.   Choosing identifiers  for
hundreds  of entities,   such that  the names  are  descriptive and  fit into  a
systematic framework, is not a simple task.    Therefore, the assignment of these
identifiers did not  proceed on an ad hoc  basis,  but a system  was devised  for
naming  the  variables  in  each  major module.   The  variables  used  by each
application module are listed in the  Programmer's Supplement  (Johanson,   et  al.
1979).
                                        36                             RELEASE 8.0

-------
                                                         Standards & Conventions

4.3.7  Labeling of Statements

We label only those statements which need them.  This improves  the efficiency  of
the object code.  Executable statements are labeled in ascending order,  starting
with 10  and increasing by  10,  to allow  later insertion of   additional  labels
without upsetting the order.  Format statements are collected at the head  of the
program unit.   "Read" formats come first  starting at label 1000 and  increasing
by 10.   "Write" formats come next, starting at 2000 and increasing by  10.

Statement labels start in column 1 and are justified on the left.


4.3.8  Layout of executable statements

The executable parts of a program unit consist of the standard  structure figures
arranged in a hierarchy which expresses the logic of the program.   The  level  in
the hierarchy of any piece of code is reflected in its level of indentation from
the left margin. Long, complicated statements are avoided.


4.3.9  Continuation of a statement to more than one line

Because of the  large number of continuation lines permitted  by most  compilers,
the continuation indicator  is used to indicate  the order of these  lines.    We
number  them 1,   2,  3,   etc.   For  declaration,  CALL  or subprogram  header
statements,  the final character  on a continued line is a  comma,  to eliminate
doubt  should  the  following  line be  missing.    Similarly,   for   assignment
statements, the last character on a continued line is an operator.   Never is  an
identifier or constant broken at a line boundary.   The text on a continued line
commences at the same level of indentation  as the previous line (apart  from the
character in column 6, of course).


4.3.10  Mixed mode arithmetic

ANSI Fortran does  not permit mixed mode arithmetic.   We  endeavored  to observe
this requirement and use the "intrinsic" functions (see ANSI Manual)   to convert
data to a  uniform type where necessary.   Mixed mode  assignment statements are
permissible (see ANSI Manual).
                                       37                            RELEASE  8.0

-------
                                                         Standards & Conventions

4.3.11  Range and precision of numbers

In Fortran there  are two types of  numbers;  INTEGER and REAL.    Because  these
numbers are represented in  any machine by a finite number of  bits,   there is  a
limit to the range of values which can be represented.   With real numbers  there
is also a limit  to the precision with which numbers can  be represented.    If  a
situation is  encountered where a REAL  variable cannot represent a  number with
sufficient precision,  the DOUBLE PRECISION option can be used.   The  ANSI  makes
no stipulations  as to  the range and  precision of  variables used  in  Fortran;
these factors  vary from  one type  of machine  to another.     We designed  our
program  so that  range  and  precision capabilities  of  all  of the  following
computer systems are met:

     IBM 360 and 370

     UNIVAC 1100

     PDF 11

     HP3000/II

Appropriate specifications are:
Type Range Precision
From To (decimal places.)
DOUBLE PRECISION 10**-30 10**30
REAL 10**-30 10**30
INTEGER -2*10**9 2*10**9
16.5
6.5
exact
Note:  In the case of DOUBLE PRECISION and REAL variables,  negative  and
       positive ranges are the same.  Only the positive range  is  indicated
       above.
4.3.12  Use of comments

Comments are used to:

      (1)  Describe the purpose of a program unit  (1-10  lines  long).

      (2)  Separate and describe the function  of logical blocks  of  code (code
          segments).

      (3)  Clarify logic, where necessary,  and to  illuminate subtle points.
                                        38                             RELEASE 8.0

-------
                                                         Standards  & Conventions

They are not used to provide a running commentary on  the code  or  to explain  what
is already obvious;  e.g.  C   ASSIGN I TO Z.   A well structured program should
not need a host of comments.

Comments  appear immediately  above the  code to  which they   apply.   They  were
written at the same time as the  executable code;  these are usually better  than
comments which are inserted afterwards.

Although good comments  do nothing for the  computer,  care was taken   over  them
because they  do help  the person who  has to  read the code   at  a  later stage.
Composing a  good comment also  helps the programmer  to review the function of
that piece of code and, hence, to produce better code.

The text of a comment  is indented to the same column as that  of the  code which
surrounds it, so that it does not impair the visual picture of program structure
conveyed by indentation.

Examples:
     (1)  c  *************************
          C
          C  WARNING]  This may not
          C  work on XXXX installation
          C
          C  *************************

     (2)     A = TEMP*A
          C  ACCA will be used in the 'Totals' Block
             ACCA = ACCA + A
4.3.13  Transfer of data between program units

In Fortran, data can be transferred between program units  in  two ways:   by using
argument lists  or COMMON  blocks.   Argument lists  are used   whenever  feasible
because they specify exactly those items of  data passed between the  calling and
the called program units.   COMMON blocks, however,  tend  to  grow  as  software is
developed because they usually serve  several program units.    Typically,   there
are  more data  items in  these  blocks than  any  given pair   of  program   units
requires.   Thus,  it is difficult to tell  exactly which  items are being  passed
between a pair  of program units.   The development and  maintenance  of  programs
becomes more difficult if COMMON blocks are used where argument lists would have
sufficed.

A further advantage of  argument lists is that they permit arrays in the  called
subprogram  to have  variable dimensions.    Implementation of  this  feature  is
discussed in the following section.
                                       39                            RELEASE  8.0

-------
                                                         Standards & Conventions

4.3.14  Argument lists

In ANSI  Fortran,  an  item in  a list  of actual  arguments can  be any  of the
following:

     (1)  a Hollerith constant

     (2)  a variable name

     (3)  an array element name

     (4)  an array name

     (5)  any other expression

     (6)  the name of an external procedure

There is  little need  to use  types (5)  and  (6)  and  they are  avoided where
possible.

Arguments can serve either or both of two functions:  to transfer information to
the called subprogram  (input mode)  or to retrieve information  from it  (output
mode).   Although Fortran does not require that arguments be separated according
to their function,  we believe it is helpful to do so.   We arrange arguments in
the following order:

        (input,bbinput/output,bboutput)
            or
        (input,bb
         input/output,bb
         output)


bb indicates two consecutive blanks.

Examples:
       CALL JUNK (JIN1,JIN2,bbFLAG1,FLAG2,bbJOUT1)
                   input      input/output output

       CALL WORKER  (bbbbbbbbVALUE)
                            output


       CALL LONG(INP1,INP2,etc          (input)
     2           MODI,MOD2,etc          (input/output)
     3           OUT1,OUT2,etc)         (output)
                                       40                             RELEASE 8.0

-------
                                                         Standards  & Conventions

An argument  list can be  used to vary  the dimensions  of arrays in   the  called
subprogram.   In ANSI Fortran this is done by including the name of the  affected
array,  together  with scalar variables which  indicate its dimensions,    in  the
argument list.

Example:
       SUBROUTINE DOIT (A,MAXI,MAXJ)
       INTEGER MAXI,MAXJ
       REAL A(MAXI,MAXJ)
       etc.

We make use  of this feature when we  have reason to believe  that   an  array will
have its dimensions changed  as the model is applied to  different  watersheds or
as it is implemented on different computer installations.   In  this way  only  the
highest subprogram in which the array occurs will need to be  recompiled  when  the
program  is  reconfigured.   This  construction  is  also  sometimes used   in  a
subprogram which is called by several other program units.  Thus, the  dimensions
of dummy arrays in the subprogram automatically agree with the  dimensions  of  the
real arrays in the calling program units.
4.3.15  COMMON blocks

Only labeled COMMON is used.   The COMMON  statement contains a  list  of  variable
and array names.   It does not contain dimension information; this  is put  in the
associated type statement.

Each COMMON block  is immediately followed by statements which   declare  the  type
and dimensions  of all  the variables  in the  block.   The  layout of  the  type
statements is described in Section 4.3.3.

Example:
       COMMON/ABAG/HEAVY,LIGHT,LIGHTR,K1
       INTEGER K1
       REAL LIGHT(20),LIGHTR(10,2)
       DOUBLE PRECISION HEAVY(10)

Because COMMON blocks usually serve several  program units and because we  wanted
to control their use carefully,  the layout  of data in COMMON was  supervised by
the Chief Programmer.
4.3.16  General comments on programming style

Good programmers write code  for the benefit of other people,    not  just for the
computer.   They avoid the use of "clever" constructs which,   although efficient
in execution, are obscure.

In general,   if we were  faced with a  conflict between machine  efficiency and
clarity of the code, our chosen solution favored the latter goal.
                                       41                            RELEASE 8.0

-------
                                                         Standards & Conventions

5.0  CONVENTIONS USED IN FUNCTIONAL DESCRIPTION


The primary purpose of the Functional Description (Part E) is:

     (1)   to describe the functions performed by the various subprograms in more
          detail than can be achieved in the Structure Charts

     (2)   to  explain the  technical  algorithms and  equations  which the  code
          implements•

Subprograms are described in numerical order in the text.   This system provides
a logical progression for the descriptions.   General comments regarding a group
of subprograms can be made when the "top" subprogram is described, while details
specific to an individual subordinate subprogram can be deferred until that part
is described.   For example, a general description of the PERLND module  (Section
4.2(1)) is followed by more detailed descriptions of its twelve sections,  ATEMP
(Section 4.2(1).1) through TRACER (Section 4.2(1).12).
6.0  METHOD OF DOCUMENTING DATA STRUCTURES
6.1  Structure of Data in Core

The way in which we arrange the variables used in our programs  is  important.   We
structure  them,  as  far  as possible,   using  techniques   like   those used   in
Structured Program  Design.   We try to  group data items that  logically belong
together.

Most of  the variables  in an Operating  Module  are  contained  in   the  Operation
Status Vector  (OSV).   The OSVs  for the application  modules  are shown  in  the
Programmer's Supplement (Johanson, et al. 1979).   The format used to document a
data structure is similar to that used to declare a. "structure" in PL/1.   We do
this because the  technique is logical and  convenient,   not  because  of language
considerations.
6.2  Structure of Data on Disk Files

The HSPF system makes use of several  different  classes  of  disk-based data files:

     (1)  The Time Series Store  (TSS)  is  described  in Section 2.0,  Part E and in
          Appendix V.

     (2)  The instruction   files  (OSUPFL,   TSGETF,   TSPUTF)   and the  OSVFL are
          documented in  the Programmer's  Supplement.
                                        42                            RELEASE 8.0

-------
                                                         Standards & Conventions

     (3)  The information file (INFOFL), error message file  (ERRFL)  and warning
          message file (WARNFL)  are self documenting.    One need only list  the
          file and read it to understand its contents.
7.0  METHOD OF HANDLING DIAGNOSTIC MESSAGES
HSPF makes use of two kinds of diagnostic message;  error messages and warnings.
These messages are all stored on two files;  ERRFL and WARNFL.   This system  has
at least two advantages:

     (1)  Because the  messages are not  embedded in  the Fortran,   they  do  not
          normally occupy  any core  storage.   This reduces  the length  of  the
          object code.

     (2)  The  files are  self  documenting.   They  contain  not  only all   the
          messages,  but other explanatory material.   A user need only obtain  a
          line printer listing  of the files to  get an up-to-date copy  of this
          documentation.

Each message  has been  given a "maximum  count".   If the  count for  a message
reaches this value, HSPF informs the user of the fact.  Then:

     (1)  If it is an error message, HSPF quits.

     (2)  If it is a warning,  HSPF continues but suppresses any future printing
          of this message.

In addition to the above features, the Run Interpreter has been designed to:

     (1)  Stop if 20 errors of any kind have been detected.  This gives the user
          a  fair number  of messages  to work  on,  but  avoids producing  huge
          quantities of error messages,  many of which may be spurious  (say,  if
          the code could not recover from early error conditions).

     (2)  Stop at the  end of its work if  any errors have been  detected by  it.
          Thus,  HSPF will not enter any costly time loop if the Run Interpreter
          has found any errors in the User's Control Input.
                                       43                            RELEASE  8.0

-------
                                                         Standards & Conventions

8.0  REFERENCES
International Business Machines Inc.  1974.    Structured Programming Textbook &
Workbook — Independent Study Program.

International  Business  Machines  Inc.   1974.    HIPO   -  A  Design  Aid  and
Documentation Technique, Report GC20-1851-1. 130 pp.

American National Standards  Institute.  1966.  USA Standard  Fortran,  Standard
X3.9-1966. 36 pp.

Johanson, R»C., J.C. Imhoff and H.H. Davis, Jr.  1979.   Programmer's Supplement
for the Hydrological Simulation Program - Fortran.  This material is on magnetic
tape.  See Appendix IV.
                                       44                            RELEASE 8.0

-------
                                                        Visual Table of Contents
                                     PART D

                            VISUAL TABLE OF CONTENTS
General Comments 	   48
                                    FIGURES

Structure                                                                 Page
chart no.

1.0            Upper levels of HSPF system	49
1.2            Service subprograms available to the entire HSPF system  .   50
2.0            Subroutine group TSSMGR 	   51
2.001          Service subprograms for subroutine group TSSMGR 	   52
3.0            The Run Interpreter	53
3.01           Service subprograms for the Run Interpreter	54
3.2            Subroutine group SEQBLK of the Run Interpreter	55
3.4            Subroutine group OPNBLK of the Run Interpreter	56
3.4.1          Service subprograms for processing input for
                 operating modules 	   57
3.4(1)         Processing of input for the PERLND module  	   58
3.4(1).10      Processing of input for the PEST section of the
                 PERLND module 	   59
3.4(1).11      Processing of input for the NITR section of the
                 PERLND module 	   60
3.4(1). 12      Processing of input for the PHOS section of the
                 PERLND module 	   61
3.4(2)         Processing of input for the IMPLND module  	   62
3.4(3)         Processing of input for the RCHRES module  	   63
3.4(3).2       Processing of input for the HYDR section of the
                 RCHRES module 	   64
3.5            Processing of User's Control Input which deals
                 with time series	65
3.5.01         Service subprograms for the TIMBER subroutine group  ...   66
3.5.2          Processing entries in the EXT SOURCES Block	67
3.5.2.2        Subroutine group EXTTS  	   68
3.5.2.3        Check and expand a reference to an Operation time  series.   69
                                       45                            RELEASE  8.0

-------
                                                        Visual Table of Contents

3.5.3          Processing entries in the NETWORK block 	  70
3.5.4          Processing entries in the EXT TARGETS Block .......  71
3.5.6          Subprograms involved in allocation & deallocation
                 of INPAD rows	  72
3.5.8          Subroutine group TINSTR 	  73
3.5.8.01        Service routines for subroutine group TINSTR. ......  74
3.5.8.2.3      Subroutine group PINIT	  75
4.0            Operations group of modules 	  76
4.01           Service subprograms for the Operations Supervisor ....  77
4.1            TSGET	78
4.1.01         Service routines for TSGET and TSPUT	79
4.1.1          The GETTSS section of the TSGET module	80
4.1.2          The GETSEQ section of the TSGET module	  81
4.2(1)         Pervious land-segment application module	  82
4.2(1).2       The SNOW section of modules PERLND and IMPLND	83
4.2(1).3       The PWATER section of the PERLND application module ...  84
4.2(1).4       The SEDMNT section of the PERLND application module ...  85
4.2(1).7       The PQUAL section of the PERLND application module. ...  86
4.2(1 ).8       The MSTLAY section of the PERLND application module ...  87
4.2(1).9       The PEST section of the PERLND application module ....  88
4.2(1). 10      The NITR section of the PERLND application module ....  89
4.2(1). 11      The PHOS section of the PERLND application module ....  90
4.2(1).12      The TRACER section of the PERLND application module ...  91
4.2(1). 13      Subroutine group PPTOT	92
4.2(1).14      Subroutine group PBAROT 	  93
4.2(1).15      Subroutine group PPRINT 	  94
4.2(1).15.1    Subroutine group PERACC 	  95
4.2(1).15.2    Subroutine group PERPRT 	  96
4.2(1).15.3    Subroutine group PERRST 	  97
4.2(2)         Impervious land-segment application module. .......  98
4.2(2).3       The IWATER section of the IMPLND application module ...  99
4.2(2).4       The SOLIDS section of the IMPLND application module ...  100
4.2(2).6       The IQUAL section of the IMPLND application module. ...  101
4. 2(2). 7       Subroutine group IPTOT	102
4.2(2).8       Subroutine group IBAROT 	  103
4.2(2).9       Subroutine group IPRINT 	  104
4.2(2).9.1     Subroutine group IMPACC 	  105
4.2(2).9.2     Subroutine group IMPPRT 	  106
4.2(2).9.3     Subroutine group IMPRST 	 ....  107
4.2(3)         Reach/mixed reservoir application module	108
4.2(3).1        The HYDR section of the RCHRES application module ....  109
4.2(3).4       The HTRCH section of the RCHRES application module. . .  .  110
4.2(3).5       The SEDTRN section of the RCHRES application module . .  .  111
4.2(3).6       The GQUAL section of the RCHRES application module. . .  .  112
4.2(3).7       The RQUAL section of the RCHRES application module. . .  .  113
4.2(3).7.1     OXRX subroutine group. DO, BOD simulation	114
4.2(3).7.2     NUTRX subroutine group. Primary inorganic
                 N and P simulation	115
4.2(3).7.3     Simulate plankton populations and associated reactions.  .  116
4.2(3). 7.3.3   Simulate phytoplankton	117
4.2(3).7.3.5   Simulate benthic algae	118
                                       46                            RELEASE  8.0

-------
                                                        Visual Table of Contents

4.2(3).7.4     Simulate pH and carbon species	i~*
4.2(3).8       Subroutine group RPTOT	120
4.2(3).9       Subroutine group RBAROT 	 121
4.2(3).10      The RPRINT section of the RCHRES application module ... 122
4.2(3).10.1     Subroutine group RCHACC 	 123
4.2(3).10.2     Subroutine group RCHPRT 	 124
4.2(3).10.3     Subroutine group RCHRST 	 125
4.2(13)        The Display utility module	126
4.2(14)        The Duration Analysis utility module	127
4.3            TSPUT	128
4.3.1           The PUTTSS section of module TSPUT	129
4.3.1.3        Subroutine group FILTSS 	 130
                                       47                            RELEASE 8.0

-------
                                                        Visual Table of Contents

GENERAL COMMENTS
The  entire  set  of  structure  charts for  the  HSPF  system  appears   on   the
immediately  following  pages,  forming  a  visual  table  of contents   for   the
software.  For a discussion of the conventions followed in compiling  the  charts,
refer to Section 1.2 of Part C "Standards and Conventions."

Note that the  following material gives a  complete picture of  the  system.    It
starts at the highest, most general, level and proceeds down to the lowest,  most
detailed,   levels.   A  user  need not  assimilate it  all  before using HSPF.
Initially,  one may not  wish to proceed more than two or  three  levels  down the
structure tree.   Later,  having become more  familiar with the system,   one may
wish to explore it in more detail.

In general, a subprogram calls only those subprograms situated  immediately below
it.   However,   "service subprograms"  are an exception  to this  rule.   These
routines perform elementary tasks, usually for more than one calling  subprogram.
Therefore, they are arranged in groups; each group is situated  immediately above
the subprogram which  its members can serve.   For example,   the subprograms in
Structure chart 1.2 can be called by any subprogram in HSPF;  those in Structure
chart 3.01  can be called  by any subprogram  in the Run  Interpreter (Structure
chart  3.0).   This  arrangement makes  the  structure charts   more compact   and
readable and will  assist programmers who need to design  overlay structures for
the code, or partition it in some other way.
                                        48                             RELEASE 8.0

-------
                                             VISUAL TABLE OF CONTENTS
U6RROR
MAIN
  preproce«va
  user's control
  input"
       I.I
  provide a
  system for
  operating on
  time series
        1.0
TSSM6R
IMTBRP
  manaqe
 lime Series
OSUP&R.
  interpret
  run insts. in
  User*
  Control
  Input
       3.0
  supervise
  and perform
  operation*
                                                     4.0
      Z.O
      3.0
      4.0
     Structure chart 1.0 Upper levels  oi HSPF
                              49
                                   RELEASE 8.0

-------
Ln

O
C/3
w
c»

o


1
QfcYWU.
linearly
interpolate
a value for
M% day
it i

WA.RN
produce a
warning
metcaqe
It fc

;xtWE
•\o external
•format
12 15



ACCVtC

accutn the
element* »'
one vector
to another
>ti

FMDKWD


locate a
given
keyword in
library

RftOFF



TRNVBC

perform a
linear
transform
on the
element* of
a vector

MYMOM


find the no
of day* in o
qlwen year
and month
1 2 10

WM*F
read rss>
record
into
11 ife

write


i*TSS
li JLO

*ind -the no
of day*
in a qivcr%
rr»r\-rh
1 2. Zi
-t ' .«<& JL^M
t"tir\Q TntC
4iff toc'tvtf
times
                                                                                                                                                                                     >
                                                                                                                                                                                     CD
                                                                                                                                                                                     8
                                                                                                                                                                                     M
Structure chart It Service subprograms owaitabie  tethe entire HSPF *y»tem

-------
ye
P
w
oo
O
COMPCT




•MOW*
compacts
thttime
s«rie*


store

«




SHOT**
output* time
space



atioo
I*




SHOML.
Information
about
the
tkne series
store
M





outputs
datatet
labels




*»
                                                                      Structure chart 20  Subroutine qtoup TSSMQR.

-------




ECHO



echo** tt*
user input
it-ream

1 001


tUMOMD



reads key-
word* from
the
information
file

toot


CMKTTK


service
routines



check* the
validity of a
user Input
itrina,

IOOJ


tooi





PUT



writes an
array of a
given lenqth
foTSS ^

Z.OO4-


cum NT



checks the
validity of a
user input
number

z.oo«5


»er
reads an
array of a
given lenqth
from T55
too*

11 1 D9L

prints a
dataset label
fothe line
printer
e.oo7



<

tWTSW

output space
information
about the
T9S
2006
raocMtc.

classifies a
chunk of
free space
accord inq to
Its «ize

t.OOfl.l

SCTUP

sets up a
library of key
words for
ADq UPDATE
t SCRATCH
commands
2.009





RDMXT

reads the
next keyword
from the
us«r Input1
stream
t.o\O
PNDBKID

finds ttie test
keyword at
a qiven level
in ihe ueer
input stream

10(0.1
<
•N0CHK.

finds the first
fitted chunk
of free
space on the
T3S
2 on




po
M
r1


S2
en
w


00
•

o
Structure chart 2.001 Service subprogram* for Subroutine

                   group T55MGR

-------
                                                                    INTBRP	

                                                                      Interpret a
                                                                      RUN Data Set
                                                                      in the UCI
                                                                                3.0
                 6LOBLK.
                                   SIQALK
Ln
U)
procen the
GLOBAL
Stock
                            3.1
proce«4 the
OPN SEQ
Block
                           3-Z
                                                                               Service      I
                                                                               Subprogram*
                                                                                                '	T	
                                                                                                      3.01
                                                                       OPMM.K.
locate tables
in the
F TABLES
Block.


         33
proce««
input for
each
operating
module
                                              3.4
                                         3.2
                                                           3.4
                                                                                          TIMSeft.
                                                                                                            090P
proce«»
blocks which
deal with
time series
                                                                                                              write ^he
                                                                                                            PSPCCL
process

J*?c'ldl
Acti on
ms+rs.
                                                           3.5
                                                                                                     3.7
                                                              Structure chart 3.0 The Run Interpreter
                                                                                                                         H
                                                                                                                         w
                                                                                                                         G

                                                                                                                         f

                                                                                                                         H
                                                                                                                                            M
en
M

oo

O
                                                                                                                                           n
                                                                                                                                           O
                                                                                                                         a

-------
rRMINS


f i/»d the
offset of a
date /time
•from the
start of the
year
3.01.1

STPATE


check validity
of a startln9
date/tthne
and convert
•to internal
*>rrnat SOLZ

CNDATE
service
sub-pnoas
for INtERP
group
3.01


check validity
of an ending
date/time
and convart
to internal
format 30, 5




TOPTNO


check
multiple.
taract
rarer* nee
3.Ol.t

LOCBLK


locate the
block6 of
text in a
given range
of text
5-01.5

OPNNO
find OPNHO
of a givan
opn_/'d in
the OPNTAB
10IA
                             Structure chart 3.01 Service subproqram-s for the Run Interpreter
P
to
w
CXI
•

o

-------
                                                                    SEQBLK
ot
Ln
JO
PJ
en
w
00

o





a new
operation

NKWING
I
1
I




*Z.\


MEWlWft



a n«w
INGROUP

if.2


process the
OPN
SEQUENCE
Block


NOWBXe,
3.E



eNOlNQ 6WDBX6
a new
Ey GROUP

Newels 1
I 1 |
1

3.E/2.






Structure chart* '






5.E. Subroutine qroup

3.f.S
end of end of
IN6ROUP EY.GROUP
S.E.4 3.2.5
EMD6X.G 1
1 1
1 |
I 1
1 1
1
i

i
u «-?j i
	 - •" «y
f
i
SEQBLK of the Run Interpreter g
IS

-------
                                                   OPN61K

                                                    process
                                                    for eoch
                                                    operating
                                                    module
                                                           r~-
                                                              service
                                               	^jt  subprograms


                                                                  T""
'I
  i
                                                     process input
                                                     fcrall
                                                     operation*  of
                                                     the same type
                                                     CHH

                                                           S.4CN)
                                                                                     §.4-. I


process
general
Input
?.4-(N).l



process
input "for
section 1
5.4 (NVZ








process
input "for
section K-l
3.4CN\K
en
M
CO
*

O
This substructure is duplicated for each operating module (utility or application
module ) in the system.

The numbering system shown is that "for the Nth operating module.


     Structure chart 3.4 Subroutine qroup OPNBLK. of the RUN Interpreter
                                                                                                                en
                                                                                                                a
                                                                                                               I
                    CO

-------
             ITAfcLE
                      data
               from p liable
               containing
               irrteqer
               values

                     3.4.U
               find the record
               (in a table)
               containing
               infa for a
               specified
               operation
                     M-.I.U
                                       service
                                       subprogram 5
                                       for processing
                                       input to
                                       operating
                                       module*
                                               3.4.1
process data
from a table
containing
real values
                                     I
        data
contained
in an
PtaWe
                              9.4.1.3
                                     I	|
Structure chart 3.4.1  Service subproqrams for processirvcj input for operating modules.
                                                       H
                                                       OT
                                                       §

                                                       I
                                                       f
                                                       O
                                                                                             O
                                                                                             O

-------
oo
CO
•
o






PP6&W |
process the
general
input
3.4(0,1

PPWT
-------
                                                       PPCST	

                                                         process
                                                         input for
                                                         Section
                                                         PEST
                                                             3.4-CO.IO
                  SOLDAT
PIR5TP
                    get data
                    on soil
                    properties
                       3.4-CO-KM
•SVALP
  parrm reqd
  for bt order
  kinetics
     3.4C0.10.2.
H
w
CO
M
00
•
o
  process
  parms
  •forstnqle
  vaiued
  ads/des
                                       process a
                                      -table of
                                       order parms
                                         3.4CO.IO.Z.I
                     process a
                     fable of 5inqle-
                     valued
                      5TORQE
     parme reqd
     for non-
     sinqle valued
     ad^/des
process
ini-Hal
                     process a
                     •table of
                     POO-6V
                                                                            parm6
                                                »0.4,
Structure chart 3.4-CO.iO
                        of ttie
of input for
     module
                               PE^T
                                          I
                                                          5
                  8
                  z
                  H
                  M

-------






•50LDAT 1 PLNTP»A
r n
1 1
1 |
1 1
I 1
1 |
i ' j






process
input
for
Section
N1TR

34 CO. 11



process
plant uptake
parms


3.4CO.H.I

PtWSTP
r
1





i_ 34






5VAUP 1 -5TO** J
n r ~i r
II II
i I i
i i i
II II

CO-**
1 1 1
|_ 3-W.I0.3 J [_ 14-0
                                                                                                  ^.—r ^- /•»*'- —  i
                                                                                                                   H
                                                                                                                   U)
                                                                                                                   c
                                 -Struciure chart 3.401 U  Pt-oce^5in9 of input ^r-the KllTR
                                                         5ection o^ module
M


00
•

O
w
E



8

-------
                                                       PPHOS
                   r~'


process
in^ut for
section
PW05
3.4- CO. II

PU4TH4 BR5TP
-L 	 j j 	 L 	 j j 	 1
If It
11 1 1
1 i 11
11 it
11 11
*0)-«M J ' 3.4(0.11.1 J ' 9.4(



L 	 , ^-l..-.^ £°™*L —
1 1 II
1 1 II
1 i 11
11 11
11 1 1
II I 1
                                                                              ~l
6tniciurechart3.4-CO.lt
                                                             of input -for 1he PH06 -sechon of
                                                                                                                H
                                                                                                                cn
                                                                                                                a
Vt
M
00

o
                                                                                                                8

-------
                                                      PIMPUN
t-o
PIWATR





Section
IWWTER
3.4(Z).4

PI8EM


qenerol input
3.4GJJ

PSOLID
Section
SOLIDS


(Z).S
i
i

process
input to the
IMPLND
module
3.4(2)



WkTEMP PSNONN
Section | I Section
KTEMP i 5KIOW
1
1 1
3.4(0.z| | 3.4(0.3

PtWTGS

PIQUAL
Section
IWTQAS
3.4(Z).6
Sect^on
IQUKL


IMPR5T |

r i
accumulators
1 I
|_ 4.2(Z').9.3j
w
en
w
oo
*
o
                               Structun? chart 3.4(2)  Processin9 of input for the IMPLND module
I
R
9
3

-------
PRCHRi
M
t-1

M


OT

M


00


O






PROEM |
process
general inpwt
3.4(3} I













PHYDR





Section
HYDR

















process input
to the
RCMRES
module
3.4 «")





i
1 PAOCAL- | PCONS 1 PHTRCH | PSED I


3.4(3X2.
1







).t\
/





P0XRX















Section
ADC

'&.! r
.f^Wl*
3.40>.3
P&QUAL




Section
COHS
3.4(3).4
Section Section
HTRCH SEDTRN
3.4 (5). 5 3.4(5). 6



Section
G-OUAL




1
Section
OXP

DC
3.4C55>.0.I


3.4(317






PRQUAL 1 RCHRST |

Sections
ChtRX thru
PHCARB

3.4(5).S
I i
set flux
accumulator*
I to zero
1
i 	 _ 'i
i .
PNUTIW. | PPIW4K. | PPWCWt. [



Section
NUTRX
3.AW.8Z
Section Section
PLANK PHCARB
M(»M J4BXBA
Structure chart 3.4(3). Processing of input for the RCHRES module
                                                              to
                                                              c
                                                             s
                                                             o
                                                             o
                                                             o
                                                             §
                                                             i-3
                                                             w

-------




DISCH




process
input
for
Section
HYDR
i
i

FWOROW
compute
initial

discharge
rates

(«.?.!
r





A. *f f






AUWt I
~i r
i




1
1
                                                                                *T.fc*li •*/- 1* a?  I
Structure chart 3.4C3).£
                                                     Proce5«inq of input for the HYDR section

                                                     of the RCHRES  module
H


I
en
M
QO

o
                                                                                                          8
                                                                             w

-------
CHK.T4*
eeriNT \ sR«t*
look at the
T59

descriptor

3.5.1.1




initialize
TS6ET/PUT
iivslr, files
3.5.1.1




proc«
EXT
SOUP
Bloc

                                                                 r
                                                                                                                         !	1
                                                                                                                         |  service     |
                                                                                                                         i  subprogram* j
                                                                                                                         I
                                                                  I
                                                                                                                         i        * ">. W1
                                                                                                                         I	T	
                                                                                                                               3.5.01
                                                                   5.5.1
                                                                §,5.t
>
                                                                Struch»re chart 1$  Processing of Usw1* Control Input which deals with time 3«rie»
r1
w
tw
PI
co
o
                                                                                                               i-i


                                                                                                               I
                                                                                                               O


                                                                                                               8

                                                                                                               M

                                                                                                               01

-------
                                                       s«rvtce
                                                       subprograms
                                                             3.5.OI
                                           WKDMPl
                                            dump time
                                            info from
                                            WORKFL


                                                3.5.O i.l
WKOMPZ
 dump
 primitive
 TSGET/TSPUT
 instructions
 from WORKFL

     3.5.0 \ft
                                                                                                           M
                                                                                                           cn
                                                                                                           a
                            Structure chart 3.5.OI Service subprograms for -frhe T1MSER subroutine qroup.
I
w
>
cn
                                          HI
                                          g
                                          M
                                          O
                                          3
                                          H
                                          R)
00
•
O

-------
                                              SRC&LK

                                               process EXT
                                               SOURCES
                                               Block
                         EXTTS
                  OPNTS
a-
check and
expand refs.
to ext time
series
                   P/kiRS
check and
expand a
ret, to an
opn time
series
                                                     3.5.2-3
                   CHAIN
match source
and target
time series
                                              3.5.2 A-
chain entries
in OPN
SEQUENCE
order


      3S.Z.5
P
                              Structure chart 3.5.2 Processinq entries in the EXT SOURCES Block
oo
•
o

-------
                                           VISUAL TABLE OF CONTENTS
                             check/
                             expand
                             references
                             •to external
                             •Hme
           T4SDS
sea DS
             check/
             expond
             references
             toTSS
             dotaset
  check/
  expand
  references
  to a
  sequential
  file
DSCUK.
check
validiiv of
dataset
reference
3.5.2. Z.I. I
t

•ROM6KA
process a
member
3.S.2.2.K2
 BUFF  I

  read a
  record -from
  T5S
I
I	'__.	I

     Structure chart" 35.Z.Z Subroutine group EY.TT5
                             68
              RELEASE 8.0

-------
                                                  VISUAL TABLE OF CONTENTS
                              OPMTS
                               chkla*pond
                               a ref to an
                               Opn. time
                               series


                                     3.5.Z.3
                              MBMT5
                               proc»9* a
                               Single
                               member
                                        on
                                valve
                                   3.5.Z.3.U
Structure dwrt $5.2.3  Check and expand a reference 1o an Operation time series
                                    69
RELEASE 8.0

-------
r1
w
>
00
00
*

o
                                            NBT8UK


process
NETWORK
Block
353
i

0PNTS 1 PAIRS 1 CM/WIN 1
1 ! j ! j
! I I 11
1 It 1 i
1 11 II
i i I i I
| 	 _*!fij 1 	 J*?±J 1 	 _!
                                                                                           •~l
                                        chart 3S.S  Proce««inq entries in the NETWORK &lock
H
to

g

s
s

-------


tJCTTS I
1
1
1 *£2.2
process EXT
TWRGETS
Block
as*
I
OW4TS J
j_ — __ __ „,_, MM.
1
1
!
1
] 35-23


W-4RS
r
i
I
I
i
1 55f.4
l_ ^_ 	 	 	 	 ^__
CHA.IN
r i
' 1
i ,
' i
' 1
1 3S.2.6 |
i_
                                   5h-oc-hjre chart 35.4 Processing errtrics in^e EYT TARGETS Block
H
cn


P



I
F
W
to
w


oo
*

o
                                                                                                                 8

-------
                                                         ALLOC
                                  TARGET
                                     process
                                     entries/
                                     considering
                                     opn a« a
                                     target

                                         S.S.6.1
                                                           allocate
                                                           1NPAD
                                                           rows
                                  proce««
                                  entrjes,
                                  con^idcrinq
                                  opn 05 a
                                  source

                                       3.5.6.Z
                                                              i group.
                                                       RECB-5C
row* which
have been
so f laqqed


     3.5.6.3
ROW
—
allocate
first
available
row
3.5.6.1.1


T51N5
—
generate a
primitive
TSGET/TSPUT
instruction
3.5.6.1. Z


CHA*4QB
—
change
subseq.
references
to a «ource
or tarqet
MAl.S
                                                                        group A
                                                                                                                I
                                                                                      8
oo
•
o
Structure chart 3.S.6 Subprograms involved in allocation $ deallocation of INPAD rows

-------
                         FlRlNT
                           find
                                3.0-&M
                                                                   T1NSTR
                                                                    -Pinol
6iMrr  r
                                                               V
CO
P3
00

o
                                              fird
                                                                r'
                                                                                              service
                                                                                           -\
                                                                                                         1
                                                                                            L__T__
                                                                                 FINSTR
                                                                                               3.5-8.01
FNIT
      3.^-6.2.3
TINOITTI
                                                                I	A^!^i-L.
                                                                                                                         H
                                                                                                                         VI
                                                                                                                         a
                                        8

                                        w

-------
Get a
word -Prom
the TSS
data set
      3.5.0.01
                               Service
                               routines
                             PVAL
                                                     PUT one
                                                     or
                                                     mor*,
                                                     values
                                                     into TSS
                                                                                  VR0FP
                           Cernpute.
                           offset
                           •from
                           start of
                           *fsar
                                                                                          3.5-&.03
                                                                                 H
                                                                                 cn
                                                                                 c
        Structure Chart 3.5.0.o\
Service
Sub
                                                                     arx>up
                                                      "TlNSTR
                                                                                o
                                                                                13

                                                                                8
oo

o
                                                                                CO

-------
                                                           valve*
B-FRH
                             ADJTSfr
                     VOoj-
                 fa/.
                 year's
                  5-5.3Z-. 3. 1
                               •for
                                           r
MEWYf?

  «ei- initial
ADJUB
                of
OTNTL__


                                         i
                                       !_J
                              -Find
                              op
                              fncnd
                                           AIUNC
                                             APP


                                             S.&&.23-Z.2.
                                                       <
                                                       H
                                                       W
                                                       G

                                                       f

                                                       HI
PI
f-C
W
w
O9

o
                                                        »S.0.Z.3
                     5*t?up PIN IT
                                                                                                                w

                                                                                                                o
                                        o
                                        i
                                        n
                                        w
                                        z

-------
                                                            OSUPER
                                                              supervise f
                                                              pecfcrrr* oper-
                                                                       4-0
TSGET
                                1
50
«
r1
Cfl
w
oo
o
                     reqd.
                      -Kmfi
                 series    4.1
                                                                   i  service     i
                                                                  ^  Subprograms j

                                                                   L	*£'_J
                                              perform an
                                                      n
                                                      4J(N)
                I


Operating
McxMe, «adrl



Module, 5 Ctt2
4.2 (NY f






Opera*
Modob,
4
                                                                                            4.2(N).k

                                this substructure is duplicated -for
                                appliccrKon module) in -the
                                The nurnbrrinq
                                                    operating module
or
                                           is^*^at ^>r We M*h  operating module
                                                  3troctore chart- 4.O (Dpera-hwvs qroup of modules
ABLE OF CONTE
S

-------
                                                 VISUAL TABLE OF CONTENTS
                            service
                            sobproqroms
frALCHK

perform a
material
balance
check
4.0\


ADDTIM

increment
the date
and time
4O2


SPECL

perforrr\
Special
Actions

4.03
Structure chart 4.0\ Service subproqranvs for the Operations 5upervi5or
                                   77
RELEASE  8.0

-------
                                                    VISUAL TABLE OF  CONTENTS
6ETTSS   I
 IBS
    -4.1.1
>
                                                                 1
                                                         I
                                    78
                                                      RELEASE 8.0

-------
                             VISUAL TABLE OF CONTENTS
 .  «  A

1M1
           o

           z
            t
           V3
           u.
f
                   10
                   O
-\$*
p

?
              *'• ,1  O
              iJiHi  =
              i'j" _. -i—  ~
               5!
               ) i
                         b
                           81 «  I
                               *
              ~-°».
              2-r $5 *
              Si!!!
        i
«-
  ^ ul
?25
^^v-
                                        h

                                       0

                                       8
                    79
                                    RELEASE 8.0

-------
                                        VISUAL TABLE OF CONTENTS
                    T5S
        vr*rt>
         -UM
                  FILLWs
4.I.IZ
i	r
                                    |	±'JJJ
                         The
                          80
                         RELEASE 8.0

-------
                                                             GETSEfil
                                                                     +irne
                                                               sea.
                                                                    4.U
                                                                            aervtee
                                                                                       check
                                                               IN PAP
CO
                 HRCRP
                       4.I.1J
                                          4.LZJ.Z
                                                       read
f


to


O3

O
4.U-I.4
                                                                         MO/AL.
                                                                              4.L1.I4.I
                                                         The
                                                                                            FIFCRP
                               FtVCRP
                                                                                             read
                                                                                             \Ay4rocomp
                                                                                             15
4.I.2.US
                                red A

                                5
4.I.2.U
                                                                                                                         M
                                                                                                                         W
                                                                                                                         a
                                                                                                                         tr1
                                                                                                                         M
                                                                                                                         o
                                                                                                                         o
                                                                                                                         M

-------
                   Pirfarfn
                   computation!
                   on a t»$mtnt
                   of pwviooC
                   land

                         4.1(0
ao
NJ
tr1

I
w
                                     ATEMP
                                                   SHOVW
                                      Correct air
for elevation
diHertnce


     41CO.I
Simulate the
accamulatian
and melting
of  WCMM and
1C*
                            SEOMNT
5imul*'tie
water T
for
land
                                                                        44C01
                                           Produce and
                                           rtrnexe
                                                                                       41ti).4
                                                                      41(111
                                                                                       I
                                           PWTSAS
                                                                                                 temperature*
                                                 4.t f 0.1
                                                                                                                            PQUXL
                                                                                                               animate
        temperature
        aod d««oliM f *
        Okncentrationt

             4.1(0.*
                      
                                                   P8ABOT
                                           pomt-
                                      valuei output
                                      in INPW?
                                          4.1 (O.B
                                                                  PPR1NT
                                                     valued  output
                                                     m
                                                          4.2 (i). 14
               pfintci
               output
                                               >
                                                                                     en
                                                                                     a
                                                                      I
                                                                                                                                         8
          Structure  Chart   4.2(1)  Structure  chart  for the  Pervious  Land-Segment Application
                                           Module  of  HSPF.

-------
CX3
LO
w


w

CO

o
Simulate
and melting
of snow
at\d ice
4.2(i). 1









MeTEOtl


EFFPRC
fetitnate
mifteroloqical
conditions




\
42(i).2.l



tWkRMUP





OMW-
Determine
effect of
precipitation
on the pack
4.2(0-2



WELTER
\Narm 1iie
pack if
possible

n.


Can pad"
4.1(0-2



LIQUID
Melt the paok
using anv
remaining
tlW"t~
4/2(fy2.$



5UCW6M

3


^




W-XAW*
evaporation
from the
pack
4.Z6Y2-4
V/APPR
Calculate
vapor p0?5o


re
4.2(0-2.4.)

\c\m
Handle liquid
wrtcc inifkf
4.2(0.2.4




ecdtffv]€(9
meH-*(3in


axx,eR
B1"
4cs
SLi
fW
4.2(i)2.^



6MEIT
5imuWt tht
otcurence of
pack i»
4.2 (i) -2- 10





Smulate
loss of heat
-from -me
pock
4.2(1)2 Jb



ND^K
Melt the pad
using heat
•from the
§roun4




t?e%t state
variable
v snow-
pcsck disap-
pears
                                                3-h-odure chart 4.1 (i).z  The 5^40^ Action of
                                                        moduler P021MD  and
                                                                                                               W
                                                                                                               o
                                                                                                               *l

                                                                                                               8
M
2!
•-3

-------
CO
pa
f


pa
oo
o
                KEPT
                 Simulate
                    4.20Y3.I
                &WI5N
                 Dwide
3UWMT
 Distribute-
 4
 wsto
 -for
                                   run of i
UIIHP \/2-
 Compute
 inflow t>
 upper zone
                                                        PVMSTER
                                             \NTRNW
                                                          Simulate v^ater
                                                          for ptrvioos \and
                                                          segment
                                              Simulate
                   4:2 [I U 3
U10ME
 Simulate
 upper zone
 Whaviior
L10NE
 Simulate Itie
 lo^w&r zone
 behavior
Simulate
ground-
\Moter
behavior
Simu late
evapo+T4n5-
f ira-hon (6T)
                                                                                                              4.20)3,7.
                                             PROOTE.
                                               bettrmine
                                               surface
                                               runoH
                                                4.20)3.2.14
                                           Structure Chart 4.2C\V3   The- PWKTER section O4 the
                                                                  application module
                                                                                       8

-------
GO
Ln
                                                   r
                            EDMMT
                             FVsdutc
                             ami
Detach  toil
                                            method 1
                                              by


                                              1
             Strurturt dwi 4.1 (ft.4 tht S£WAUT
                                 application
                                                                                 ATTKCH
Simulate
it-Q^fldhmtiT
of d«iiched
                                                                               erf
                      I
                      i
CO
w
00
b

-------
                      QUM.SD
00
by
                         With
                         sediment
                                                     Simukite
                                                     comtttutots
                                                     vj*ir\9
                                                          -wdiment
                                                      and verier yield
                                                           A.KO.T
Accumulate,
and rftntNt W
a oomton-t unit
rat? and  fry
        flow

     4.1(0.1.2
                              OUMIP
Simulate  by
concentration
 in \nterflow
Simulate
co
in
                                     Strut-hire  diart 4.2(0.1   The  *a\)kl
                                                           appiiarHort module
                                                                              I
w

CO
*
o
                                                                              1
                                                                              w

-------
                              VISUAL TABLE OF CONTENTS
         tute
         t solute
         a% fraction* of
         stored material

               4.1 (Oft
                       SUBLAV
   for
  layers
subsoil layer*
  chart 4.2 CO.ft  The MSTLAtf section

-------
                                                          simulate
                                                          pertitide
                                                          behavior in

            eet time fteries
            require* by
            Mctlone
calculate -tilt
friction of
ttefturface
lever that to
eroding

     4-ldWt
                                                         I
     mow* -Hi*
     chemical  on/
     wliii
                                    TO»MOV T
mow*
                   reaction* on
move
in*lh
•urfaot lovtrf
                                                                                                            4-.tO).9.fr
                                                                            MOM*V
oo
00
                                       order
                                       WcwcHc*
                                                         rntR
en
W
oo
*
o
                                         1
                                              aoeorb/deeorb
                                              Ufttnatfie non-
                                              •inaTe v«iue
                                              Freondlkh
                                              method
                                             rrm*
                                                          iterate -for
                                                          adMitad I
                                                          •okitten value
                                                          on rteundlich
                                                          i»othtrm
                                        1
                                                                        i
                                                                                              degrade
                                                                                              chemical
                                                                                         J
Structure chart 4. 1C 0.9
     e PERLND
                                      The PEST section
                                           module

-------
                                                           MtTH
 00
 VO


AMOCT 1
r- " -,

4,t(l).«U
_ ._ ,,j



fOR**C I
r J~ n
I «** PEST
. wcHon
1
i
i
1
1 4w fEST   i   ^
                                                                                                 , -section      |   g
                                                                                                               I   S
JS
w
tr4
W
M

CD

o
                                               &rructu«5 chart- 4.2 (I). 10  The NITR
                                                    
-------
            wctiort
ffiiVJ
PI
oo

o
                                                    PHOt	

                                                    •imulof*
                                                    photphonia
                                                    behavior in
                                                    detail
                                                         4.KO.U
                1_
,vyfi. J.

 McHon
                                                         _L
•TOPMoy L
                                                                             pwoaxn
                                         '  ••chon
                                                        l    I

                 reaction* on
                 photphoruft
                 form*
                                                                                 4 .1(0. II. J
                                                                               1
                                                                       4,1 <«).«.*.I !
                     9truciur» chart 4.20).II  Th» PHOS g»ction
                         of th* PCRLND application module
                                                                                  1
_«IMAOV_ I ^
 Mction
                                         ^?^?J
                                                                                      |     ^r«(fc *P**T»^*I
                                                                                           IT:
                                                                                           PEST
                                                                                                     £

-------
                                   VISUAL TABLE OF CONTENTS
              TRMWR
              •tmutate
              of 0 tracer
   ••ction
                         SU»MOV_  _

                        I see PEST
                        i	
Structure dwt 42(1X12 The TRACER «ectkm
    of-the PERLK1D opplicotion module
                    91
                                                RELEASE 8.0

-------
N3
                        Section
                         4-.2Cft.H4
                                                           PPTOT
                                                              place pom*~
                                                              valued time
                                                              series in
   "Sec-tion
   5I40W
     4.2(0.1?.!
                                                      PWWPT
4.201.%^
4-.2CO.BA
                                                                                            PSTEVAP
                                                  Section
4.2(0
                       Section
                       PQUM.
M5TUPT
   -secHon
            HlTKFT
                                     WVTR.
                                                                                        PH05PT
                                PH05
                                                                                             4-.2CO.B.U
                                              <
                                              H
                                              W
                                              G
                                                                                    g
                                                                                    S
CO
w
oo
•
o
    5Jrudure chart 4-.2C0.6  5ubrtxrtine qroup PPTOT
                                                                                                                          8

-------
 UJ
                                                                  plac« bar-
                                                                  valued! time
                                                                         in
                                                        PVYATP6
4--2C0.14.1
                                                           Section
                                                             4.^0X142.
                                   -jec-tton
                         4* CO- »4
                                                                          NlTRPB
                                                                             •section
                                                     4.2(0.14.8
                                                                     'Section
                                                                                                                               H
                                                                                                                               W
                                                                                                                               G
                                                                                                                               £
w
00
o
chart 4
                             5ubrou-Hne qnoop
                                                                                                                               8

-------
                                          VISUAL TABLE OF CONTENTS
PERACC
accumulate
fluy.es for
printout
  4..KO.I5.I
                   PPRINT
                   perform
                   materials
                   balances fc
                   produce
                   printout

                       4.2 (I >. 1
PBRPRF
perform mat.
balances i
write to
pHntier
$ state
variables
  Structure chart 4.1(0.15"  Subroutine qroup PPRlNT
                          94
                                                      RELEASE 8.0

-------
                                                             PERACC

                                                             accumulate
                                                             fluxes for
                                                             printout
                                                    fWAACC
                                  accumulate
                                  ftuxetfor
                                  •fiction
                                  SNOW
                                      4.2(0- W.I.I
                           •OfcCC
         accumulate
         flu*e» for
         •action
         PWAJER
         accumulate
         fluxes for
         section
         3EDMNT
         accumulate
         ••ctlon
         PWT8A.5
                         PQACC
PSTACC
                          fluxes for
                          ••ctlon
                          PQUAL
accumu\at»
f\uxe* 1or
•oction
PEST
                  PHOACC
accumulate
fluxes for
section
NITR
                  TRACC
accumulate
Huxe» for
c«ction
PHOS
accumulate
fluxes for
TRACER.
                                                                                                      4a.cn.ii.iJ
                                            Structure chart 4.Z(O.I5.\  Subroutine 9toup PER>CC
Cfl
M
00

o

-------
                                                                  PERPtrr

                                                                  perform
                                                                  materials
                                                                  balances t
                                                                  write to
                                                                  printer





AtRPRT

for module
section
ATEMP
4.ZCO-

PQPRT

i«.i


tor module
section
PQUAL






SNOPRT

•for module
section
SNOW
4.t(U

If.Z.2

MSTPfcT

for module
section
MSTLAV






PWAPRT

for module
section
PWATER
4..ZCO.

I5-.Z.S

I»BSPRT |
lor module
section
PEST






SEOPRT |
for module
section
SEDMNT
4.zcn.«.z.4

NITPRT I
•for module
section
WTR





PSTPKT |
for module
section
PSTEMP
4ACIXWW

PHOPRT |
for module
section
WOS





P^WTPK^ 1
for module
section
PWT<^S
4.t(l>.l».2.*

TRAPRT I
for module
section
TRACER
                                                                                                                             §
                                                Structure chart 4.ZCD.I9.2 Subroutine qroup PERPKT
Cft
w
00

o
f
M
O


8

w

w

-------
                                                            flux

                                                       variable*
                            *NOR*T
          PWAMT
                            rt»«t for
                            ••ctlon
                            SNOW
         •OUST
                                  for
                            ••ctlon
                            SEDMNT
                                                                   4.1(1 ).!*.».
                           section
                   ••ctlon
                   PGtUAL
      for
 •cction
 PEST
                                        4.1 £!).!
     for
••ctlon
NITR
re»«t for
•eetion
PHOS
                                         4.
      lor
Mctlon
TWCER
                                                                                                           e
Structure etart 4.1CD.15.3 Subroutine
en
w
03
b
                                                                               PiURST

-------
Perform
computations
on 4 segment
land
4.1 C2}



ATEMP SNOW IWCTER
i- - - - 1 i ~ i
11 !
(see module 1 1 ( *ee module |
PERLKID1 || llSRlNt)) |
li i
(I |

SOL\&5 INWTGAS
water budget
for Impervious
land s*9ment

\
4.1 (11.1)

Accumulate
and vemovfr

\
«^>
•tenneeratures
and dixolved
ga« cones
4.1 (1\*

oo
 p
 en
 w

 do

 o

QUAL
IPTOT
Simulate ^ali'N
coostituftnts
uting cimple
relatiofKhiPs uxii
wUds and /or
wafer v/ield
4.1 (lV&


4.2 1

2>.^>
IH.AROT
Waai point-
\ialued output
in INPA.D


A2.

a).7\

IPRIHT
Wace
bar-valued
Output
tn \WP£sD


4.Z

.CZ)6


Produce
printed
output
>

4.2,

»>>

structure chari 4,1 (tt   Imp&rvious land-t^metit
module
                                                                                                                     M
                                                                                                                     to
                                                                                                                     a
                                                                                                                     N3


                                                                                                                     I
                                                                                                                     M

                                                                                                                     O
                                                                                                                     §

-------
                                            VISUAL TABLE OF CONTENTS
                      WATER
RtTN
  Simulate
  mottture
  retention
      4.KIY3.I
                       Simulate
                       water budget
                       •for impervious
                       land *e$ment


                             4.1 Cl\5
1WXJTC
 Determine
 hosw much
 of -Hie
 ture
  runs off
fcvaporatc
from
nrtention
storage
                           chart  4.1fX\3
                     of the IVAVLKO ar^ication module
                              99
                                                        RELEASE 8.0

-------
                                               VISUAL  TABLE  OF  CONTENTS
                        Accumulate
                        and
                        solids
                             4.1 flY
              artwofi-H\ie subroutines
     off
       i
method I
     .2 (x\ 4.1
      of I
solids
 method 2.
    4.1^.4.1
                       ACCUfA
        solids
       den
of runoff


    4,2 (1Y4.3
                chart 4,lflV4  The  -SDLIOS section  of
             IW\&LWD  application module
                                100
                                                            RELEASE 8.0

-------
                                            VISUAL TABLE OF  CONTENTS
                       IQU&l
                        \washoff of
                        quality
                        cotvrt-Wuenta
                               h>otcr
\MASHSD
WASUOF
                                                Accumulatt ^
                                               twwxe by a
                                               oaffittnt  ooii
                                               rate and W
                                               o^rlaod -flow
              fracture chart 4.lfzYt  The tQUM
                    of -the \MPU4T>  a^liartion module
                              101
            RELEASE 8.0

-------
                   VISUAL TABLE OF CONTENTS
IPTOT

>
.

MRTPT

r n
Section
ATfcMP
	 '_ 	 __" 	
SOUD IP

•Section
50UIDS


place point-
valued
time series in
IKJPAD
4.2C2V-7

SMOWJPT
Sect
5NC
-.l2-
,w&*^


n
w

•Section
4-2 (2) .7. 3



IVVATIP
•5ec-Hon
IvMACTP^.
A-.z-CZ^-T^

1QAL.IP
IQUAL
5tnic-iure chart 4-.
                     qroup
    102
                                               RELEASE 8.0

-------
                              VISUAL TABLE OF CONTENTS



*toie>


FOLIOS
4-.2(2>8.2

1
place bar-
valued time
series In
WPAD
T". »&£}*&

SN^VN/P^^


r
lection
•SNONN
4.10V 14-. 2

Vi&>?>\&-


5ecVion
IWT6A5
4-.2 U>B. 3

1
I
WATIB
-Jec-Hon

QAUIB
\QQAL
chart 4.Z(^y8 -Subroutine qroop
              103
                                           RELEASE 8.0

-------
                                      VISUAL TABLE OF CONTENTS
                   IPHIHT
                   perform
                   materials
                   balances f
                   produce
                   printout
1MPACC
                        _L
                  IMPPRT
accumulate
f limes -for
prlntout
                                   IMPRST
                p«Horm mat
                balance* 4
                writt to
                                     reset flu-*
                                     t state
                                     variable*
Structure chart
                            Subroutine qroup I PRINT
                        104
                                                 RELEASE 8.0

-------
                                                         tMPACC
 o
 U1

tMC*CC 1 tVMMkCC
I ' ~ '" "" "™ — |
*ubroutint
qroup
PPWNT)
| 4.ZCIVIC.I.I I


accumulate
flu*.«* for
tWKTER
«cn.
q.,.2


accumulate
f \u>«6 tor
printout
1



accumulate
fluids Ibr
section
SOUDS
4.tC2>.
1...3



lW
-------
                 IMPPRT

                 perform
                 materiol*
                 balance* $
AIRPRT ] *NOW*T_| WrfWKT
| for module | | for module |
faction *«ctiort
| ATEMP j j SNOW |
1 II 1
i II I
[ 4-.Knt "5.1.1 J |__4.z.^,
2.4


IV*I»RT

for module
section
IWTQA5
+.zcao.«.
Z.5


IQPKT

for module
section
iQUAvU
4.X(2>.1
2.6
                                                                     CO
                                                                     G
Structure chart *ZCZ).'*.l  Subroutine qroup IMPPRT
w

M

M

oo

O
                                                                                                          i
                                                                                                          w
                                                                     n
                                                                     o
                                                                     M


                                                                     M

-------
                                                       1MPRST

                                                        re*et flux
                                                        and 5tate
                                                        variables
                                                            4.2C219.3
SNORST J_ IW/kRST
1 Section i
| SNOW |
1 1
1 1
[_4.zam3.i J

Section
IWATER



>.*t



SLDRST
Section
SOLIDS




4.2 (2). 9. 3.3



W8RST

Section
1WTGA6>

4. 2(2').$

L3.4-



i«R«T
Section
IQUAL




4.2(2-). 9.3.5
                                                                                                             CO
                                    Structure chart 4.£(2).9.3 Subroutine group IMPRST
po
p
en
00
•
o

-------
Perform
computations
for a reach or
ml*ed reservoir
4.7(3)
SINK



Calculate
quantity of
material settling
out of control
volume ^ . ,
ml
>
5





HVDR
ADCA.LC
Simulate
hydraulic
behavior
41(3). 1



COUS
Prepare to
Simulate
cidvection of
entrained
constituents
4.1(1). L


4.1 C3\ I \

&QUfiL




HTRCW
5imulaie
behavior of
con?,?rvQtNe
4.2 m.*
^OVECT

Simulate advection
of Constituent
totally entwined
in water


RCLUAL £PTOT
Simulate
behavior of
a generalized
quality
constituent
j





4.2(3^

6
)


Simulate
behavior of
amstvhientc
involved in
biochemical
tram-fermations
A.I CSX 7


5iD>TRN
Simula ta heat
exchange; and
water Hmp.

4.1
Simulate
behavior of
Inorganic
sediment
4.1 (D.T

ftV4 \

RBkROT
Put current
Value? of point
valued time
•series in
4.2. ftVB

4.2 (Vi.l \
4£-(3)
4.2 C^

0.5" \

ft O& 1 k 1 *f"
1^1 p*» i M 1
r\it current
values of
bar-valued •ttme
series in
INP^D
4.1 (?19

6 )>

Produce
prinled
ouffut
4.1(^.10

^>

4.2(3). 10 \
03

o
                                                                                                                   <
                                                                                                                   H
                                                                                                                   W
                                                                                                                   a
                                                                                                                   > ^
                                                                                                                   s
                                                                                                                   &

                                                                                                                   3

                                                                                                                   8
                                       Slrudure chart 4,1 ft) Reach/mixed  reservoir
                                                        application module.

-------
                                                        HYDR

                                                         Simulate
                                                         hydraulic
                                                         behavior
                                                                4.2 Is). 1
ROUTE
                                              NOROUT
                           Calculate
                           outflow using
                           hydraulic
                           routing
               DEMAND
                                                Calculate
                                                outflows wiff»ut
                                                uiirtg rajaraui
                                                routing
                                                   **.2j3).i.2.
                               AUXIL
                                                                                        SHEAR
                                            Compute values
                                            of auxiluru
                                            state
                                                      Compute bed
                                                      shear stred*
                                                      and shear
                                                      velocity
                                                          42 (3). I.*
                                   SOLVE
                 Find outflow
                 demands corns.
                 io a specified
                 row in
Solve routing
eqns. used in
case  I

   
-------
                                    VISUAL TABLE OF CONTENTS
          HTKCH
           Simulate
           teat e*cH«tvje
           and Mjater
           temp


                 4-.lto.4-
ABWECT
r
Sr_J_.
RATSMF
I	
                             air
                     temp for
                     elevation
                     difference
                         4.1 W.4-. I
 ^fracture chart 41(31.4  The WTRCH section
    of thft RCWfcE1* application module
                     110
                                                RELEASE 8.0

-------
                                                     Simulate
                                                     behavior
                                                     of inonjonk
                                                     sediment
                               COHEW
                               Simulate
                               Sediment

                                 4.1(3). 5.1
                    r
^§ElJ
                    ADVECT
                    I	
                                      I
1 8DEXCH
1
|
1

I
Simulate


Exchange
With led

**.2(3}.JL1.

(
              SANPLO
            Simulate
            Sand
T0FFAL
 Use
 Toffileti
 Method
COLBY
 Use
 Colbo
 Method
                          Sfructure Owrt f.2(3).3   The  5EDTRN Section of the  RCHRE5
                                                  Application Module
en
W
CD

o

-------
                                                           GQUAL








OX RE A 1 AOVECT
r i
See |
OXRX

I i








DDECAY
' I






Simulate
Decoy of
Dissolved
Material
%2fr),*.I



Simulate a
Gr«n«ral
Constituent

ADVQAL












AOECAV
Simulate
Advectibn
of Material
On Sediment
*.2(3).&2




Simulate
Decay of
Adsorbed
Material
%2(3).42




AOSDE5



I




Simulate





Adsorption
end Desorpfion

H.Z&.W

t
                      Structure Chart  %2(3).6  The  &QUAL Section of the  RCHRES Application
                                                             Modale
                                                                                                     H
                                                                                                     w
en
W
oo

o
8

w

-------
                             RdUAL
                               Simulate
                               behavior  of
                               involved  in
                               biochemical
                                   4.2 CVI.T
OXRX
                                           NUTR*
 Simulate
 primary  DO,
 EOD balance*
PLANK
                                            Determine
                                             balances

                                                4.2 ftUl
SimyW*
Behavior of
plankton  popltK.
and at socki-redi
nactioac

    4.2
                     Simulate  pH
                     and carbon
                     species
                                                               4.1WU4
P3
r>
w
en
w
co
o
                4frnic+uri ch«rt 4.1 W.I  The IfiUM.
                  of ite  tCHtK
                                                                                H
                                                                                I
                                                                                8

-------
                                                  OXR*




ADVECT
r
i
I
j
1
1
1
L




Simulate
primary DO,
BOD balances
4-.1 W.I

SINK. I OKRtN
I r i



i
i i
JL _ J
.1










OX.REA
Simulate
benthal
demand
bervtM
ot BOD

ott^ga
and
«

release

rtn.i.i








Calculate
o-jcy^*^
reaeration
coefficient

80t»BC





4.2(*VU.1






Calculate
f^5t) dcca^



4.lfi\Tl.l
P
w
&
M
00
                                                    cViart  4.1 t^.T I  OKRK
                                                group. DO, BOD simUta-tioo
                                                                                                            Cn
                                                                                                            a
i
f
M
O
«d
8
w
tn

-------
                                                        determine
                                                        primary
                                                        inorganic.
                                                        nitrogen ana
                                                        priosphorooc
                                                        balance?
                                                             4.1(1X1.1
1 BCJ4TH



.J
Simulate


btr>trtal release
of consfrluents
4-.1KV1.'





MITRIP
Simulate


Nitrification
process

4.1 C&. i.l.l




DEHVT
Simulate


denitrif (cation
process
4.1 W.I. 2

%
1



[>6CBAL
Perform
material*
balance •for
•Hit fK-lntmit-f




-from organic to
inorganic matarial
4.1(5X1.2.4-
                                                        chart 4.l(5Vl.2  WUTKK subtoiH-'ine
                                                   Primary inorganic Kl and P simula-Hon
                                                                                                               I
                                                                                                               S
en
w
Oo
o
                                                                                                               8
                                                                                                               tn

-------
PUfMMlS
simulate
plankton
populations
and associated
reactions
i


ADVPLK
ADViCT
advect"
plankton
4.2C3X73.I
1


SINK
UTRCH
i "
i
3.1 j 4.2(1X5.1.1
1
1


calculate
liqht-rvlatftd
information
for alqal
simulation


                                          |  4.2(37.3.1  j
                                          i	j
to
M

00

b

PHYRX

simulate
phytoplankton

4.ZOW


S.3\

j" 4.2C«.7
L. 	
ZORX

simulate
phvtoplankton
4.2(3X7.3.4

u
2.4J
	 i


	 i
BALRV.

simulate
benthlc
olqae

4.2 ( 3/.7 1


">

H
cn
P
|
W
Structure chart 4.2(3).7.3 Simulate plankton populations and
                         associated  reactions

-------
M
CD
*
O
                                                            4.1«). 7,3,1
                    AL680
                     Calculate wit
                     gcDuftYt and
                     respiration
                     mtes for
                     alaae
                    computed grwMh
                    rate deimndk
                                                                        r
Calculate,
ftoytopl
death
        natriak
balance -foe Vdns-
"fowariort "w o
-------
                                algae
                                       berrthic
                                       4-.2
00
              	LZ:
               6r
-------
                                       VISUAL TABLE OF CONTENTS
                    PHCABB

ADVECT |_
1 1
1 1
' 4.2(5)3.1 J
1 I
1 I
I 1

BENTH
tr^lf
i

1 4.2(5X12.1
1
1
1
i 	 	 . . »

i
*4CMC
Calculate
PH
4.2(1)7.41
Structure chart 4.£(S).7.4 Simulate pH and carbon sp«ci«s
                       119
                                                   RELEASE 8.0

-------
                                    RPTOT
                                       place point
                                       valued
                                             in
                                       1NPAD
                                    COKSRP
                                                       5C.DRP
    HXOR.
                                        Section
                                        HTRCH
                  Section
                  5EDTRN
6-QRP
OXRP
   •5ec-Hori
   G-QUAL
                     ^fiction
              PHRP
                                        PlAMK
                 %1-iion
                                                                                                                <
                                                                                                                H
                                                                                                                W
                                                                                                                CJ
                                                                                          g
                                                                                          t-<
                                                                                          td
                                                                                          i
w
CA
W
00
o
                               hart*
                      .8 5ubtou4ine
W?TOT
ENTS

-------
                                                       ptaoe bar-
                                                       valued iime
                                                       Aeries in
                    WXDR
                                                        Section
                                                                                         SEDRB
                                                       -5GDTRN
                 G-QRB
s
                   -Section
               WOTR&
Action
OXRV-
Section
MUTRV-
                FUKRB>
w
a
                                                                                                             I
                                                                                                             tr1
                                                                                                             M
CO
M
                                              chart- 4.2

-------
                                    VISUAL TABLE OF CONTENTS
                   RPRINT
                   produce
                   printed
                   output
                        4.1O1.IO
RCWkCC  |
                        I
accumulate
f Ivwea for
printout
RCHPRT  |
                   perform
                   maVerials
                   balances
                   write to
                   printer
                                      RCHRST
                   reset flu*
                   **tat*
                   variables
                          .l0.t\
   Structure chart4.Z(3).lO The RPRINT section
          of the RCHRES application module
                       122
                                                   RELEASE 8.0

-------
                                                           RCHfrCC
N5
U)
                                                           iluxe* for
                                                           printout
                                                               4.tf!).l«M



WOACC

for module
section
HYDR
4.1W.IO.U







OXA.CC
CONfr.CC |
for module
section
CONS
4.1W.IO.I.1


for subroutine
group
OXRX
4.KW. IO.1. 6






NUTACC
HTAUTC |
for module
section
HTRCH
4,««.IO.IA


for subroutine
group
*t»>.io.w






S60ACC

for module
section
3EOTRN
4-tc«.,o...4-

PLKACC |
for subroutine
qroup
4.1OXIO.I.0






PHACC
GraACC
for module
section
&QUAL
4,tW.,0...«
1
for subroutine
group
PHCflRB
4.t.(5).lO,I.O



                                                                                                                       ca
                                                                                                                       I
                                                                                                                       Hi

                                                                                                                       w
                                                                                                                       8
in
w
oo
o
Structure chart4.t(3).lO.\ Subroutine qroup RCHIkCC

-------
                     WYPPRT
                    •for module
                    see^iort
                    HVDR
                                                          RCHPRT	

                                                          perform
                                                          material*
                                                          ba\an<»5 and/or
                                                          Wftito
                                                          printer

                                                             4,tw.io.t
                   HTPKT
                   SRO?RT
•far module
section
CONS
                                          4.ZW.|O.f.-Z.
•for module
section
KTRCH
for module
section
SEDTRN
                                         4-.2CW.IO.Z.4
                   &Q.PR7
for module
section
&DUAL
                                                NUTPRT
                              for subroutine
                              qroup
                              OXRX
                                 •*:2(»>. 10,2,6
             subroutine
         group
         NUTRX
             4.ZC?),!O.Z.7
         •for 5ubroirHne
         
-------
t-0
                                                       RCHRST
                                                       reset i lu*
                                                       and state
                                                       variables



HY&RST |
for module
section
HYOfc
4.1 W. I0*|







OXRST
CONRST |
for module
CONS
4.*m,0.3.2


•for subroutine
group
OXRX
«H*u>.3.f






NUTRST
HTRST

for module
section
HTRCH
4. 2 (9). |0.3. 3


for subroutine
NUTRX
4 2 C3). 10.3.7






SEDRST I
for module
section
SEDTRN
4.tc»ia^

PLKRST |
for subroutine
qroup
PL/XMIC
4.1(5). IO.3.6






PWR5T
&OR5T 1
for module
section
GQUAL
4.2(3).I0.3.T
1
for subroutine
group
PHCflRfc
4.t(»..a».9



                                                                                                                in
                                                                                                                a
                                                                                                                i
                                                                                                                s
t-1
^
00
o
                                    Structure choi-t4:2(3).|03 Subroutine qroup RCHRST
                                                                                                                §
                                                                                                                i-3
                                                                                                                M
                                                                                                                to

-------
                                      VISUAL TABLE OP CONTENTS
     DISPLY
      Display a
      time  series
             4.7.63)
           to a larger
TRANS
 Transform
       to
 interval
5HDISP
 Produce
 Short -
                      4.2.Q3V2
                         (service.
Produce.
    4.
                              . 5
  Structure cKcirt  4.2(13)   The Display utility
                        126
                              RELEASE 8.0

-------
                           VISUAL TABLE OF CONTENTS
           DURANL
           PerfonrA
           diurat'in
OURDMP
 Update
 acrumuleftbr
    4.264V
DURPUT
 Final
 processing
                     DUROUT
                       Set of
                       "babies
Structure chart 4.2(14) TU  Duration AnaK/sis  u
                    dul
                                       moue
             127
               RELEASE 8.0

-------
              VISUAL TABLE OF CONTENTS
 -Cfle
    4/?>  T-SPUT
128
RELEASE  8.0

-------
                                              PUTT5S
                                               T55
                                                         4.* 101
                                                                  KPUT
PTVAL.
                            buffer
                                                     IPRAME
                                             -f.3.1.3
                        -I
                         I
                                                                  I	•—1
en
w
oe
•

o
              I	.

-------
                                        VISUAL TABLE OF CONTENTS
H
•5
!
  ff*
            *p!   <
            D.
ftS
XVEXP



                   rJ


                   *
                                       I""
                                      31
                                      PL-.
                               51
                      I
                      M
                                   K)
                                                          5
                                                          e
                                          e
                                                          -V


                                                          i
                                                          VI
                           130
                                  RELEASE 8.0

-------
                                                          Functional Description

                         PART E  FUNCTIONAL DESCRIPTION


                                    CONTENTS
General Comments  	   135

Descriptions:

1.0  MAIN Program	135

2.0  Manage the Time Series Store (Module TSSMGR)  	   135

3.0  Interpret a RUN Data Set in the User's Control Input
     (Module INTERP)  	   136

4.0  Supervise and Perform Operations (Module OSUPER) ........   138
     4.03 Perform Special Actions (Subroutine SPECL)	139
     4.1  Get Required Input Time Series (Module TSGET)  	   140
     4.2  Perform an Operation	140
          4.2(1)  Simulate a Pervious Land Segment
                  (Module PERLND) 	   143
                  4.2(1).1  Correct Air Temperature for  Elevation
                            Difference (Section ATEMP)  	   143
                  4.2(1).2  Simulate Accumulation and Melting of
                            Snow and Ice (Section SNOW)	144
                  4.2(1).3  Simulate Water Budget for a  Pervious
                            Land Segment (Section PWATER) 	   158
                  4.2(1).4  Simulate Production and Removal of
                            Sediment	177
                  4.2(1).5  Estimate Soil Temperatures
                            (Section PSTEMP)  	   183
                  4.2(1).6  Estimate Water Temperature and Dissolved
                            Gas Concentrations (Section  PWTGAS) ...   184
                  4.2(1).7  Simulate Quality Constituents Using
                            Simple Relationships with Sediment and
                            Water -Yield (Section PQUAL)	185
                  4.2(1).8  Estimate Moisture Content of Soil Layers
                            and Fractional Fluxes (Section MSTLAY)  .   193
                  4.2(1).9  Simulate Pesticide Behavior  in Detail
                            (Section PEST)  	   196
                  4.2(1).10 Simulate Nitrogen Behavior in Detail
                            (Section NITR)  	   203
                  4.2(1 ).11 Simulate Phosphorous Behavior in Detail
                            (Section PHOS)  	   204
                  4.2(1).12 Simulate Movement of a Tracer
                            (Section TRACER)  	   206
                                      131                            RELEASE 8.0

-------
                                                         Functional Description

         4.2(2)  Simulate an Impervious Land Segment
                 (Module IMPLND) 	  209
                 4.2(2).3  Simulate the Water Budget for an Imper-
                           vious Land Segment (Section IWATER) . . .  209
                 4.2(2).4  Simulate Accumulation and Removal of
                           Solids (Section SOLIDS) 	  212
                 4.2(2).5  Estimate Water Temperature and Dissolved
                           Gas Concentrations (Section IWTGAS) ...  216
                 4.2(2).6  Simulate Washoff of Quality Constituents
                           Using Simple Relationships with Solids
                           and Water Yield (Section IQUAL) 	  217
         4.2(3)  Simulate a Free-flowing Reach or Mixed Reservoir
                 (Module RCHRES) 	  221
                 4.2(3).1  Simulate Hydraulic Behavior
                           (Section HYDR)  	  224
                 4.2(3).2  Prepare to Simulate Advection of Fully
                           Entrained Constituents (Section ADCALC) .  242
                 4.2(3).3  Simulate Conservative Constituents
                           (Section CONS)  	  244
                 4.2(3).4  Simulate Heat Exchange and Water
                           Temperature  (Section HTRCH) .......  248
                 4.2(3).5  Simulate Behavior of Inorganic Sediment
                           (Section SEDTRN)	253
                 4.2(3).6  Simulate the Behavior of a Generalized
                           Quality Constituent  (Section GQUAL)  .  . .  269
                 4.2(3).7  Simulate Constituents Involved in
                           Biochemical  Transformations
                           (Section RQUAL) 	  290
                           4.2(3).7.1   Simulate Primary DO and BOD
                              Balances  (Subroutine Group OXRX)  .  . .  292
                           4.2(3).7.2   Simulate Primary Inorganic
                              Nitrogen  and Phosphorous Balances
                               (Subroutine Group NUTRX) 	  300
                           4.2(3).7.3   Simulate Plankton Populations
                              and Associated Reactions
                               (Subroutine Group PLANK) 	  307
                           4.2(3).7.4   Simulate pH, Carbon Dioxide,
                              Total Inorganic Carbon, and Alkalinity
                               (Subroutine Group PHCARB)   	  330
          4.2(11) Copy Time Series  (Utility Module COPY)   	  336
          4.2(12) Prepare Time Series  for Display on a Plotter
                  (Module PLTGEN) 	  336
          4.2(13) Display Time Series  in a Convenient Tabular
                 Format (Utility Module DISPLY)	338
          4.2(14) Perform Duration  Analysis on a Time Series
                  (Utility Module DURANL)  	  343
          4.2(15) Generate a  Time Series from One  or Two Other
                 Time Series (Utility Module GENER)	351
          4.2(16) Multiple Sequential  Input of Time  Series  from
                 a HSPF Stand-Alone Plotter  File  (Utility
                 Module MUTSIN)	352
     4.3  Module TSPUT	353

References	353

                                      132                            RELEASE 8.0

-------
                                                          Functional Description

                                    FIGURES

Number                                                                 Page

3.0-1        Functions and data transfers involved in the operations
             portion of HSPF	137
4.2(1).2-1   Snow accumulation and melt processes 	  145
4.2(1).2-2   Flow diagram of water movement, storages and phase
             changes modeled in the SNOW section of the PERLND and
             IMPLND Application Modules 	  147
4.2(1).3-1   Hydrologic cycle 	  159
4.2(1).3-2   Flow diagram of water movement and storages modeled in
             the PWATER section of the PERLND Application Module. . .  161
4.2(1).3-3   Determination of infiltration and interflow inflow . . .  165
4.2(1).3-4   Fraction of the potential direct runoff retained by the
             upper zone (FRAG) as a function of the upper zone soil
             moisture ratio (U2RAT) 	  168
4.2(1).3-5   Fraction of infiltration plus percolation entering
             lower zone storage	173
4.2(1).3-6   Potential and actual evapotranspiration from the lower
             zone	176
4.2(1 ).4-1   Erosion processes	178
4.2(1).4-2   Flow diagram for SEDMNT section of PERLND Application
             Module	179
4.2(1).7-1   Flow diagram for PQUAL section of PERLND Application
             Module	187
4.2(1).8-1   Flow diagram of the transport of moisture and solutes,
             as estimated in the MSTLAY section of the PERLND
             Application Module	194
4.2(1).9-1   Flow diagram showing modeled movement of chemicals in
             solution	198
4.2(1).9-2   Freundlich isotherm calculations 	  201
4.2(1). 10-1  Flow diagram for nitrogen reactions	205
4.2(1). 11-1  Flow diagram for phosphorus reactions	207
4.2(2)-1     Impervious land segment processes	210
4.2(2).3-1   Hydrologic processes 	  211
4.2(2).4-1   Flow diagram of the SOLIDS section of the IMPLND
             Application Module 	  214
4.2(2).6-1   Flow diagram for IQUAL section of IMPLND Application
             Module	218
4.2(3)-1     Flow of materials through a RCHRES	222
4.2(3). 1-1   Flow diagram for the HYDR Section of the RCHRES
             Application Module	225
4.2(3).1-2   Graphical representation of the equations used  to compute
             outflow rates and volume 	  228
4.2(3). 1-3   Typical RCHRES configurations and the method us«d to
             represent geometric and hydraulic properties 	  229
4.2(3).1-4   Graphical representation of the work performed by
             subroutine ROUTE 	  232
4.2(3).1-5   Graphical representation of the work performed oy
             subroutine NOROUT	237
4.2(3).1-6   Illustration of quantities involved in calculation of
             depth	239


                                      133                             RFLEASE 8.0

-------
                                                          Functional Description

4.2(3).2-1    Determination of weighting factors for advection
             calculations 	  244
4.2(3).3-1    Flow diagram for conservative constituents in the CONS
             section of the RCHRES Application Module 	  244
4.2(3).4-1    Flow diagram for HTRCH section of the RCHRES Application
             Module	249
4.2(3).5-1    Flow diagram of inorganic sediment fractions in the
             SEDTRN section of the RCHRES Application Module	255
4.2(3).5-2   Toffaleti's Velocity, Concentration, and Sediment
             Discharge Relations	262
4.2(3).5-3   Factors in Toffaleti Relations 	  264
4.2(3).5-4   Colby's Relationship for Discharge of Sands in Terms
             of Mean Velocity for Six Median Sizes of Bed Sands,
             Four Depths of Flow, and Water Temperature of 60 F  .  .  .  266
4.2(3).5-5   Colby's Correction Factors for Effect of Water
             Temperature, Concentration of Fine Sediment, and
             Sediment Size to be Applied to Uncorrected
             Discharge of Sand Given by Figure 4.2(3).5-4 	  267
4.2(3).6-1    Flow diagram for generalized quality constituent in the
             GQUAL section of the RCHRES Application Module 	  270
4.2(3).6-2   Simplified flow diagram for important fluxes and
             storages of sediment and associated qual used in
             subroutine ADVQAL	284
4.2(3).7.1-1 Flow diagram for dissolved oxygen in the OXRX subroutine
             group of the RCHRES Application Module	293
4.2(3).7.1-2 Flow diagram for biochemical oxygen demand in the OXRX
             subroutine group of the RCHRES Application Module.  ...  293
4.2(3).7.2-1 Flow diagram for inorganic nitrogen in the NUTRX
             subroutine group of the RCHRES Application Module.  ...  301
4.2(3).7.2-2 Flow diagram for ortho-phosphate in the NUTRX group of
             the RCHRES Application Module	302
4.2(3).7.3-1 Flow diagram for phytoplankton in the PLANK section of
             the RCHRES Application Module	308
4.2(3).7.3-2 Flow diagram for dead refractory organics in the PLANK
             section of the RCHRES Application Module  	  308
4.2(3).7.3-3 Flow diagram for zooplankton in the PLANK section of  the
             RCHRES Application Module	309
4.2(3).7.3-4 Flow diagram for benthic algae in the PLANK section of
             the RCHRES Application Module	309
4.2(3).7.3-5 Relationship of parameters for special advection of
             plankton	311
4.2(3).7.3-6 Zooplankton assimilation efficiency	323
4.2(3).7.4-1 Flow diagram of inorganic carbon in the PHCARB group
             of  the RCHRES Application Module  	  331
4.2(13)-1    Sample Short-Span Display  (First Type)  	  340
4.2(13)-2    Sample Short-Span Display  (Second Type)	341
4.2(13)-3    Sample Long-Span  (Annual) Display	342
4.2(14)-1    Definition of Terms  Used  in Duration Analysis Module  .  .  344
4.2(14)-2    Sample Duration Analysis Printout	346
4.2(14)-3    Sample Lethal Concentration  (LC) Function for
             Global Exceedance Calculation	350
                                       134                            RELEASE 8.0

-------
                                                          Functional Description

GENERAL COMMENTS

For a discussion on  how this part of the documentation  is organized,   refer  to
Section 5 in Part C "Standards and Conventions".

The subprograms are discussed in numerical order, following the numbering  system
used on  the structure charts (Part  D).   When studying the  descriptions which
follow, you will find it helpful to refer to the appropriate  structure  chart and
to the pseudo code in the Programmer's Supplement (Johanson,  et al.  1979).


1.0  MAIN Program
The MAIN program stands at the head  of the structure  (Structure Chart  1.0)   and
calls,  directly  or indirectly,   all the  other modules  in  the   system.    The
functions performed are:

(1)  Preprocess the Users Control Input (UCI).   Subroutine USRRDR  transfers  the
     UCI to  a direct access file,   appends a value   at the end of  each  record
     which points  to the  next non-comment  record,   and  recognizes input   set
     headings and delimiters: RUN, END RUN, TSSM, END  TSSM.

(2)  Call TSSMGR if a TSSM input set has been found.

(3)  If a RUN input set has been found, call INTERP to interpret it  and then
     call OSUPER to supervise execution of it.
2.0  Manage the Time Series Store (Module TSSMGR)
General Description of Module TSSMGR

This  module maintains  a  user's Time  Series Store   (TSS)   and performs   some
housekeeping chores associated with the datasets in it.   From  the point  of  view
of the computer's operating system,  the TSS is a single file  (which may  be  very
large).   However, the HSPF software can store many distinct time series  in  this
file.   This permits a user easily to keep track of the various  time series  with
which he is dealing.   Furthermore; he need only refer to a single disc file for
all his time series input and output needs,   no matter how many time  series are
involved.  This simplifies communication with the computer system.

Time series are arranged within the TSS in one or more "datasets".  The contents
of each dataset and its physical location in the TSS are recorded in a directory
located at the start  of the TSS.   The primary function of  module TSSMGR is to
maintain this directory,   from input supplied by  the user.   He can  add a new
dataset label to the directory,  update certain  parts of the label (such as the
SECURITY option),  scratch a dataset label  (and,  thus,  the dataset  contents),
extend the space allocated to a dataset,  or  show the contents  of one or all of
the labels in the directory.   The commands  used to achieve this are  documented
in Part F, Section 2.
                                      135                            RELEASE  8.0

-------
                                                                   Module TSSMGR

The  design  of  the TSS  is  based  on  our  experience with  HSPX   and  HSPII.
Extensions to the HSPX time series management system include:

(1)  The storage of data in compressed form.    Disk space  is  saved by  improving
     the method of encoding values which occur  in a sequence,   such  as a string
     of zeros.

(2)  A TSS may contain 9999 datasets.

Further details of the organization of a TSS are given  in Appendix V.

Once the label for  a dataset has been created and space reserved  for  it in  the
TSS,  time  series data  can be  stored in  the dataset.     This is   done by   an
operating module   (Section 4.0);   either a  utility module  (eg.  COPY)    or an
application module (eg. PERLND).
3.0  Interpret a RUN Data Set in the User's  Control  Input  (Module INTERP)
General Description of Module  INTERP

This module,  known  as the Run  Interpreter,    translates  a RUN data  set in the
User's Control  Input (documented  in  Section  4  of  Part F)    into many elementary
instructions,   for later use by  other parts of  the system,   when the time series
are operated on.  To do this,  the  Run Interpreter  performs  such tasks as:

(1)  Check and  augment the data  supplied by the user.

(2)  Decide which time series  will be required  and produced by each
     operation, based on the user's data and  built-in  tables which
     contain information on the  various  operations.

(3)  Allocate INPAD rows to the  various  time  series.

(4)  Read the control data, parameters,  and  initial conditions supplied
     for each opertion, convert  them  to  internal units, and supply
     default values where required.

The  output of  the Run  Interpreter  is   stored in  disk-based files  containing
instructions to be  read by the  Operations Supervisor,  TSGET  and TSPUT (Figure
3.0-1). The instruction files  are:
                                       136                            RELEASE 8.0

-------
                                                   Module TSSMGR
lr\*Vvc4"tor\
flaw of
                        137
                                                      RELEASE 8.0

-------
                                                                 Run Interpreter

(1)   The Operations  Supervisor Instruction File  (OSUPFL).  This  file contains
     instructions which the Operations Supervisor reads to manage the operations
     in a run.   This includes information on:

     (a)  the configuration of the scratch pads (time intervals and
          widths)

     (b)  the configuration of the EXGROUPs and INGROUPs (number of
          EXGROUPs, number INGROUPs in each EXGROUP, operations in each
          INGROUP, etc.) (EXGROUPs have not yet been implemented)

(2)   The Operation  Status Vector  File (OSVPL).   The operations  in a  run are
     interrupted every time  an INPAD span is completed (Part  B,  Section 3.2).
     To save  machine core space,   the system is  designed so that  the various
     operations  all use  the  same  area of  core.     This  requires that  upon
     interruption,  all information necessary to  restart an operation be stored
     in a  disk file.   The data,   called the "Operation Status  Vector" (OSV),
     reside in  a string of  contiguous locations in  core and have  a structure
     specified in the Programmer's Supplement (Johanson, et al. 1979).  The disc
     file OSVFL contains an exact copy of the OSV for each operation. It is used
     to  restore  the   OSV  in  core  when  the  operation   is  resumed  after
     interruption.

(3)   The Input Time Series Instruction File (TSGETF)  and the Output Time Series
     Instruction File (TSPUTF).   These files contain instructions  which govern
     the  transfer  of  pieces  of  time series  into  and  out  of  the  INPAD,
     respectively. Each instruction enables module TSGET to retrieve a specified
     piece  of time  series  from  one of  the  source  volumes (Figure  3.0-1),
     transform it to the interval and form required for the INPAD, and insert it
     in the desired row of the INPAD.   In  the case of TSPUTF,  the sequence is
     the reverse of that just described.

     Each operation has its  own set of instructions in TSGETF  and TSPUTF which
     are read whenever modules  TSGET and TSPUT are called upon  to service that
     operation (every INSPAN).

(4)   The Special  Action Instruction  File (SPACFL).  Each  record of  this file
     contains a single  special action instruction,  which  specifies the action
     required to be taken in a given operation at a specific time,  e.g.  report
     operation state, modify a state variable.

The structures of these files are documented in the Programmer's Supplement.
4.0  Supervise and Perform Operations (module OSUPER)


Function of Operations Group

The Operations group of. modules handles all the manipulations of  time  series  and
thus, performs most of the work in a run.  Subroutine OSUPER controls  the  group.
It performs some of the tasks itself,   but it invokes subordinate modules to do
other tasks.

                                      138                            RELEASE  8.0

-------
                                                                 Operations Group

General Description of Subroutine OSUPER

The primary tasks of subroutine OSUPER are  to ensure  that  the  various  operations
in the  run are  called in  the correct  sequence and   that  the   associated time
series and OSVs are  input and/or output at the  required   junctures  (see Part B,
Section 3.2).   OSUPER uses a nest of DO-loops   to control the sequencing.   The
instruction  file  OSUPFL  specifies  the   ranges  of   the  loops and  supplies
information ("keys")  which enable OSUPER,  TSGET  and  TSPUT to  correctly access
the other instruction files.  OSUPER reads  an instruction  from disc  each time an
operation starts a new INSPAN.  Using this  information, it then:

(1)  calls TSGET, to supply the required input time series (using
     TSGKST, TSGKND)

(2)  reads the OSV from disc  (using keys OSVKST, OSVKND)

(3)  calls the operating module (OMCODE indicates which one  is to be called)

When the INSPAN is over, OSUPER:

(1)  writes the OSV to disc (using keys OSVKST,  OSVKND)

(2)  calls TSPUT, to output time series (using keys TSPKST,  TSPKND)



4.03 Perform Special Actions  (Subroutine SPECL)


HSPF permits the user to perform certain "Special Actions" during the
course of a run. A special action instruction specifies the  following:

1.  The operation on which the action is to be performed  (eg.  PERLND 10)

2.  The date/time at which the action is to be taken.

3.  The variable name and element (if the variable is an array)  or the type
    and location within COMMON block SCRTCH of the data item to  be updated.

4.  The action to be performed. Two choices are  available:

   a)  Reset the variable to a specified value

   b)  Increment the variable by a specified value


The special action facility is used to accommodate things  such as:
                                      139                            RELEASE  8.0

-------
                                                                Operations Group

1.  Human intervention  in a watershed.   Events such as  plowing,  cultivation,
    fertilizer and pesticide application,  and  harvesting are simulated in this
    way.

2.  Changes to parameters.  For example, a user may wish to alter the value of a
    parameter for which 12 monthly values cannot be supplied.  He can do this by
    specifying a special action for that variable.  He could reset the parameter
    to its original value by specifying another special action, to be taken at a
    later time.

At present, Special Actions can be performed on variables in the PERLND, IMPLND,
RCHRES, and PLTGEN modules. The input is documented in Section 4.10 of Part F.
4.1  Get Required Input Time Series (module TSGET)


The task of this module is to insert in the INPAD all input time series required
by an operation.   OSUPER calls it (once)  each time an operation is to commence
an INSPAN,  passing to it the keys of the first and last records in TSGETF  which
must be read and acted upon.   Each instruction  causes a row of the INPAD  to  be
filled.  TSGET can draw  its input time series from any  of the following source
"volumes":  TSS, sequential file and INPAD (Figure 3.0-1).

TSGET will,  if necessary,  automatically transform the time interval  and "kind"
(Appendix V)  of the time series,  as it  is brought from the source location  to
the INPAD   (target).   TSGET  can also  perform a  linear transformation  on the
values in a time  series;  for example,  if the source  contains temperatures  in
degrees C and the INPAD needs them in degrees F.
4.2  Perform an Operation


Function of an Operating Module

An operating module  (OM)  is at the   center  of  every  operation (Part B,   Section
2.1).   When  the Operations  Supervisor  calls  an   OM the   time  series  which it
requires are already  in  the INPAD.    The task  of  the OM is  to  operate  on these
input time series.  The results of this work are:

(1)  updated state variables.    The  OM constantly updates  any  state variables.
     These are located in  the OSV.    Thus,   when  the OM  returns control to the
     Operations Supervisor,  which copies the OSV  to  disc,  the  latest values of
     all state variables are automatically preserved.

(2)  printed output.   The OM accumulates values,   formats them  and routes these
     data to the  line printer.
                                       140                            RELEASE 8.0

-------
                                                                Operations Group

(3)  output time series.   The OM places these in the INPAD but is not concerned
     with their ultimate disposition; this is handled by module TSPUT.

Note that  all time  series simultaneously  present in  an INPAD  have the   same
constant time interval.  This implies that, internally, all time series  involved
in an operation have  the same time interval.  Externally,  the  time series may
have differing time intervals.   Part of the function of modules TSGET and TSPUT
is to  convert time  series from external  to internal  time intervals   and  vice
versa.
Sub-divisions in an Operating Module

An operating  module may be  divided into  several distinct  "sections,"   each  of
which may be  selectively activated in a  given run,  under  the  user's  control,
e.g.  the Pervious Land-segment module   (PERLND)  contains twelve sections,  the
first being air temperature correction,  the last tracer  (conservative  substance)
simulation (Structure Chart 4.2(1)).  The operating procedure is as  follows:   in
each time interval of the INSPAN,  the operating module  calls each of  its active
sections in the  order in which they are  built into the code   (the  sequence can
not be  altered by the  user).  When the INSPAN  has been covered  the operating
module returns control to  OSUPER which determines the next  action   to be taken.
This procedure  implies that  an operating  module must  be  arranged   so that   a
section is  called after  any others  from which  it requires  information.  For
example,  in  the Pervious  Land-segment module  (Structure  Chart  4.2(1)),  the
sediment calculation section may use data computed by the snow and water balance
sections but not  by Sections 5 through  10.   This kind of  information flow  is
called an inter-section data transfer (ISDT).
Partitioning of an Operation

A user  may activate one group  of module sections  in an initial run  and other
groups in subsequent runs.  Thus, he may "partition" an operation.  For example,
he may wish to calibrate the hydraulic response of a set of river reaches before
moving on to simulate the behavior of  constituents contained in the water.    If
this type  of work  involves ISDT's  between the  sections handled  in different
runs, it follows that:

(1)  The time series involved in the ISDT's must be stored between
     runs, probably in the TSS.

(2)  In the second run the system will expect the user to specify
     external sources for all these time series.
                                      141                            RELEASE 8.0

-------
                                                                Operations Group

Some users will be  confused by the rules for partitioning  operations,  but our
experience indicates this will be outweighed by the flexibility which it brings.
Numbering of Operating Modules

In principle,  there  is no limit to  the number of operating  modules which  the
system can accommodate.  Ultimately, we expect a large number of modules  ranging
from  very  simple utility  modules  (eg.   COPY)   to very  complex  simulation
algorithms (eg.  PERLND).  Although the size  and complexity of the modules vary
greatly,  they all are,  logically,  of equal  rank (Figure 2-3,  Part B).    The
adopted numbering system reflects this.  Every operating module is identified by
the number 4.2 (Structure Chart 4.0)  and  is distinguished from the others only
by a subscript.  For example, the Pervious Land-segment Module is 4.2(1)  and  the
Reach/Mixed Reservoir Module 4.2(3).
Inserting Additional Operating Modules

A user may insert additional modules.  To do this he must:

(1)  Write or adapt his operating module.  This includes restructuring
     the data into an OSV which conforms with the requirements of  the
     HSPF system. (This task may be time consuming).

(2)  Add a section of code to the Run Interpreter to interpret the UCI
     for the new module.

(3)  Add data to the information file (INFOFL) and, if necessary,  to the
     warning and error message files.

(4)  Make minor changes to subroutines OPNBLK and OSUPER.
Types of Operating Modules

There  are two  types of  operating  modules;  utility  modules  and   application
modules.  Utility modules perform any operations involving  time  series  which are
essentially auxiliary to  application operations,  e.g.   input   time  series data
from cards to the TSS using COPY,  multiply two time  series  together  to obtain a
third one,  plot  several time series on   the same graph.    The   utility modules
perform many of the  functions which were  previously  part of HSP LIBRARY or HSP
UTILITY. They are given numbers starting with 4.2(11).  Application  (simulation)
modules represent processes,   or groups of processes,  which occur   in the real
world.   They have been allocated numbers  4.2(1)  through 4.2(10) although,  at
present, only three application modules are written.
                                       142                             RELEASE 8.0

-------
                                                                   Module  PERLND

4.2(1)  Simulate a Pervious Land Segment  (Module PERLND)
A land segment is a subdivision of the simulated watershed.   The boundaries  are
established according to the user's needs,  but generally,  a segment  is  defined
as  an area  with similar  hydrologic characteristics.    For modeling purposes
water,  sediment,   and water  quality constituents   leaving the  watershed move
laterally to a  downslope segment or to  a reach/reservoir.   A segment   of land
which  has the  capacity to  allow enough  infiltration to  influence  the water
budget is considered pervious.  In HSPF, PERLND is the module that  simulates  the
water quality and quantity processes which occur on a pervious land segment.

The  primary module  sections  in PERLND  simulate  snow  accumulation and  melt
(Section SNOW),  the  water budget (section PWATER),  sediment  produced  by land
surface erosion  (section SEDMNT),   and water  quality constituents   by  various
methods (section PQUAL and the agri-chemical sections).   Other sections  perform
the auxiliary functions of correcting air temperature (section ATEMP)  for use in
snowmelt and soil temperature calculations, producing soil  temperatures  (section
PSTEMP)  for estimating the outflow  temperatures and influencing reaction rates
in  the agri-chemical  sections,   and  determining outflow temperatures which
influence the solubility of oxygen and  carbon dioxide.   Structure Chart 4.2(1)
shows these sections and their relationships to each other  and to PPTOT,  PBAROT,
and PPRINT. The last three sections manipulate the data produced.   Section PPTOT
places state varables (point values)  and PBAROT places flux variables which  are
actually averages over the interval (bar values) into the INPAD. PPRINT produces
the printable results in the quantity and frequency that the use specifies.   The
sections in the structure chart are executed from left to right.
4.2(1).1  Correct Air Temperature for Elevation Difference  (Section ATEMP  of
          Modules PERLND and IMPLND)
Purpose

The purpose  of ATEMP is  to modify the input  air temperature  to  represent  the
mean air temperature over the land segment.  This module section is part  of both
PERLND or IMPLND.    Air temperature correction is needed when  the elevation of
the  land  segment  is  significantly  different   than  the  elevation   at   the
temperature gage.  If no correction for elevation is needed, this module  section
can be skipped.
Method

The lapse  rate for air temperature  is dependent upon precipitation  during  the
time interval.   If precipitation occurs,  a wet  lapse rate of 0.0035 degrees F
per foot difference in elevation is assumed.   Otherwise, a dry lapse rate, that
varies with the  time of day,  is used.    A table of 24 hourly  dry lapse rates
varying between 0.0035 to 0.005 is built  into the system.   A different,  user-
defined lapse  rate may be  implemented by  modifying the HSPF  Information File
(INFOFL).  The corrected air temperature is:

                                      143                            RELEASE  8.0

-------
                                                            Module Section ATEMP

     AIRTMP a GATMP - LAPS*ELDAT                                      (1)

where:
     AIRTMP = corrected air temperature in degrees F
     GATMP  = air temperature at gage in degrees F
     LAPS   = lapse rate in degrees F/ft
     ELDAT  = elevation difference between the land segment and  the
              gage in ft
4.2(1).2  Simulate Accumulation and Melting of Snow and  Ice
          (section SNOW of modules PERLND and IMPLND)
Purpose

SNOW deals with the runoff derived from the fall, accumulation and melt  of  snow.
This is a  necessary part of any  complete hydrologic package since   much of  the
runoff,  especially in the northern half of  the United States,   is  derived from
snow conditions.
Approach

Figure 4.2(1).2-1  illustrates the processes  involved in  snow  accumulation and
melt on a land segment.   The algorithms used are based on the work  by the Corps
of  Engineers  (1956),  Anderson  and  Crawford   (1964),   and  Anderson  (1968).
Empirical relationships are employed when physical ones are not  well known.   The
snow algorithms use meteorologic data to determine whether precipitation is  rain
or snow,  to simulate an energy balance  for the  snowpack,   and  to determine the
effect of the heat fluxes on the snowpack.

Five  meteorologic time  series  are  required by  SNOW  for  each land  segment
simulated. They are:

     precipitation
     air temperature
     solar radiation
     dewpoint
     wind velocity

A value from  each of these time  series is input to  SNOW at  the start  of each
simulation interval.   However,  some of the meteorological time series are only
used intermittently   for calculating rates,  such as  in the calculation  of the
potential rate of evaporation from the snowpack.

Air temperature is used to determine when   snow  is falling. Once snow begins to
accumulate on the ground,  the snowpack  accumulation  and  melt calculations take
place.   Five sources  of heat which influence   the  melting of the   snowpack are
simulated:
                                       144                             RELEASE 8.0

-------
                                                           CLOUD
                                                           COVER
                              LONG WAVE
                              RADIATION
                                                          RAIN/SNOW
                                                          DETERMINATION
           AIR
         TEMPERATURE
      DEWPOINT
     TEMPERATURE
SNOWPACK
SURFACE
                                                                                           CONDENSATION
                                                                                                            CONyECriVE
                                                                                                            HEAT EXCHANGE
                                                   SNOWPACK
                                                    COMPAC
                                                                                                              LIQUID STORAGE
                                                                                                              IN SNOWPACK
                                                               LAND SURFACE
                                                                                                                      WIND
                                             GROUNDMELT
                                    AREAL EXTENT
                                    OF SNOW COVER
                                               Figure  4.2(1).2-1  Snow acx^umulation  and melt processes
CO
PI
CO

o
                                                            (D
                                                            O
                                                            ft
                                                            H-

                                                            §

-------
                                                             Module Section  SNOW

     1. net radiation heat (RADHT), both longwave and shortwave
     2. convection of sensible heat from the air (CONVHT)
     3. latent heat transfer by condensation of moist air on the
        snowpack (CONDHT)
     4. heat from rain, sensible heat from rain falling
        (RNSHT) and latent heat from rain freezing on the snowpack
     5. conduction of heat from the underlying ground to the snowpack
        (GMELTR)

Other  heat  exchange  processes  such  as  latent  heat  from  evaporation   are
considered less significant and are not simulated.

The  energy  calculations for  RADHT,   CONVHT,   and  CONDHT are  performed  by
subroutine HEXCHR while  GMELTR is calculated in subroutine  GMELT.  Latent  heat
from rain freezing is considered in subroutine WARMUP.  RNSHT is computed  in the
parent  subroutine SNOW.    For uniformity  and accounting,   energy values   are
calculated in terms  of the water equivalent  which they could melt.     It takes
202.4 calories per square cm on the surface to melt one inch water equivalent of
snow at 32 degrees F.  All the sources of heat including RNSHT are considered to
be positive  (incoming to the  pack)  or zero,  except  RADHT which can  also be
negative (leaving the pack).

Net incoming heat from the atmosphere (the  sum of RADHT,  CONVHT,  CONDHT,   and
RNSHT) is used to warm the snowpack.   The snowpack can be further warmed  by the
latent heat released upon rain freezing.  Any excess heat above that required to
warm the snowpack to 32 degrees F is used to melt the pack.   Likewise,  net  loss
of  heat is  used  to  cool the  snowpack  producing  a negative  heat   storage.
Futhermore,  incoming  heat from the ground  melts the snowpack from  the  bottom
independent of the atmospheric heat sources except  that the rate depends  on the
temperature of the snowpack.

Figure  4.2(1).2.2 gives  a schematic  view  of the  moisture related  processes
modeled in section SNOW.  Precipitation may fall as rain or snow on the  snowpack
or the  ground.   Evaporation only  occurs from the  frozen portion of   the  pack
(PACKF).   The frozen portion of the pack is composed of snow and ice.   The ice
portion of PACKF is considered to be in the lower part of the snowpack,  so it is
the first to melt when heat is conducted from the ground.   Similarly,   the  snow
portion of PACKF is the first to  melt when atmospheric heat increases.    Melted
PACKF and rain  falling on the snowpack  produce the water portion  of the total
snowpack which may overflow the capacity of the pack.   The water yield  and  rain
on the  bare ground becomes  input to module  section PWATER or  IWATER.   These
moisture related processes as well as  the heat exchange processes are discussed
later in more detail.

Heat transfer from incoming  rain  (RNSHT)  to the snowpack is  calculated  in the
parent  subroutine SNOW   (Section  4.2(1).2).   The following  physically  based
equation is used:

     RNSHT =  (AIRTMP - 32.0)*RAINF/144.0                              (2)
                                       146                             RELEASE 8.0

-------
                                                     Module Section SNOW
/SNOWE\
(evaporation >
Ifrom PACKF/
                         SNOWF
                         •nowfall
                           on
                         WKKF
                     total snowpack.
                                        /^PRAIN
                                        /  rainfal I
                                        \  enterinq
                                        \PfcCKW
       atmocfhtnt
       heatnMlt
                             GMEITR
                              around
                             htotm«\t
                             from pack
             P&CKW
              liquid
              water
 FREEZE
freezing
k* W
   to
 PACK.I
 around
heat melt
from pack
    PACKF frozen portion   |
                             rainfall
                            on ground
WYIELD
 water
 yield
 from
PACKW
  Rqure 4.ZCD.2-2 Flow diaqram of water movement, aAoraqee and pha^e chanqee
          in the SKIOW section of the PERLK1D and IMPLKIP Application Modules
                                                            RELEASE 8.0
                                 147
                                RELEASE 8.0

-------
                                                             Module Section SNOW

where:
     AIRTMP = temperature of the air in degrees F
     RAINF  = rainfall in inches
     144.0  = factor to convert to equivalent depth of melt
     32.0   = freezing point in degrees F

Other characteristics of the snowpack are also determined in the main subroutine
SNOW.   The fraction of the land segment covered by the snowpack is estimated by
merely dividing the depth of the snowpack by  a cover index (COVINX)  which is  a
function of  the parameter COVIND  and the history of  the pack as  explained in
subroutine EFFPRC.  The temperature of the snowpack is estimated by:

     PAKTMP = 32.0 - NEGHTS/(0.00695*PACKF)                           (3)

where:
     PAKTMP = mean temperature of the snowpack in degrees F
     NEGHTS = negative heat storage in inches of water equivalent
     PACKF  = frozen contents of the snowpack in inches of water equivalent
    0.00695 = physically based conversion factor


4.2(1).2.1 Estimate Meteorological Conditions (subroutine METEOR)
Purpose

Subroutine METEOR estimates the effects  of certain meteorological conditions  on
specific snow-related processes by the use of empirical equations. It determines
whether precipitation is falling as snow or  rain.  The form of precipitation  is
critical  to the  reliable simulation  of runoff  and snowmelt.    When  snow  is
falling,  the density  is calculated in order  to estimate the depth  of the new
snowpack.   The fraction of the sky which is  clear is also estimated for use  in
the radiation algorithms,   and the gage dewpoint  is corrected if it  is warmer
than air temperature.
Method

The  following  expression  is  used  to  calculate  hourly   the   effective   air
temperature below which snowfall occurs:

     SNOTMP = TSNOW +  (AIRTMP - DEWTMP)*(0.12 + 0.008*AIRTMP)         (4)

where:
     SNOTMP = air temperature below which snowfall occurs  in  degrees  F
     TSNOW  = parameter in degrees F
     AIRTMP = air temperature in degrees F
     DEWTMP = dewpoint in degrees F

SNOTMP is allowed to vary in this calculation  by a  maximum of  one degree F  from
TSNOW.  When AIRTMP is equal to or greater  than SNOTMP,  precipitation is  assumed
to be rain.
                                       148                             RELEASE 8.0

-------
                                                             Module  Section  SNOW

When snowfall occurs,  its density is estimated as a function of air temperature
according to:

     RDNSN = RDCSN + (AIRTMP/100.0)**2                                (5)

where:
     RDNSN = density of new snowfall  (at zero degrees F or  greater)
             relative to liquid water
     RDCSN = parameter designating density of new snow at an air temperature
             of zero degrees F and lower, relative to liquid water

RDNSN is used  in subroutine EFFPRC to  calculate the new depth  of  the  snowpack
resulting from the addition of the snow.   This and all other snow density terms
are in water equivalent (inches) per depth of the snowpack  (inches).

The fraction of the sky which is clear  (SKYCLR) is needed for the calculation of
the longwave back radiation to the snowpack  from the clouds  (done in subroutine
HEXCHR).   SKYCLR is set to the minimum value of 0.15 when  precipitation  occurs.
Otherwise, it is increased each simulation time interval as follows:

     SKYCLR = SKYCLR + (0.0004*DELT)                                  (6)

where:
     DELT = simulation time interval in min

SKYCLR increases until either it reaches unity  or precipitation causes  it to be
reset.

A gage dewpoint higher than air temperature  is not physically possible  and  will
give erroneous results in the  calculation of snowpack evaporation.    Therefore,
dewpoint  is set  equal  to  the air  temperature  when  this situation   occurs.
Otherwise, the gage dewpoint is used.
4.2(1).2.2  Determine the Effect of Precipitation on  the Pack  (subroutine
            EFFPRC)
Purpose

The purpose of this subroutine is to. add the falling snow  to  the  pack,  determine
the amount of rain falling on the snowpack,  and adjust the snowpack  dullness  to
take into account new snow.
Method

The amount of precipitation falling as snow  or rain is determined  in  subroutine
METEOR.   Subroutine  EFFPRC accounts for the  influence that  snowfall  and  rain
have on the land segment. The subroutine begins by increasing  the snowpack depth
by the amount of snow falling on the pack divided by its density.
                                      149                            RELEASE  8.0

-------
                                                             Module Section SNOW

The fraction of the land segment which is a covered by the snowpack (SNOCOV)   is
determined by  re-evaluating the  index to  areal coverage   (COVINX).  When   the
frozen  contents  of the  pack  (PACKF)   exceeds  the  value of  the  parameter
describing the maximum PACKF required to  insure complete areal coverage by snow
cover (COVIND), then COVINX is set equal to COVIND.  Otherwise,  COVINX is equal
to the  largest previous  value of PACKF.    SNOCOV is  PACKF/COVINX if  PACKF <
COVINX.   The  amount of  rain falling on  the snowpack is  that fraction  of  the
precipitation which falls as rain multiplied by the SNOCOV.  Rain falling on  the
snowpack will  either freeze,   adding to  the frozen  portion of  the pack   and
produce heat used to warm the pack (see subroutine WARMUP),  or it will increase
the liquid  water content of  the pack (see  subroutine LIQUID).   Any  rain  not
falling on the pack is assumed to land on bare ground.

When snowfall  occurs,  the  index to the  dullness of  the  snowpack   (DULL)   is
decreased by one thousand times the snowfall for that interval.  However, if  one
thousand times the snowfall  is greater than the previous value  for DULL,  then
DULL is set  to zero to account for  a new layer of  perfectly reflectable snow.
Otherwise, when snowfall does not occur, DULL is increased by one index unit  per
hour up to a maximum of 800.   Since DULL is an empirical term used as an index,
it has no physical units.   DULL is used to determine the albedo of the snowpack
which in turn is used in the shortwave energy calculations in subroutine HEXCHR.
4.2(1).2.3 Compact the Pack (subroutine COMPAC)
Purpose

The addition of new  snow will reduce the density as well  as  increase  the  depth
of the snowpack as in subroutine EFFPRC.  The pack will  tend to  compact with age
until a  maximum density  is reached.  The  purpose of   subroutine COMPAC   is to
determine the rate  of compaction and calculate  the actual change in   the  depth
d ue to c ompac ti on.
Method

When the  relative density  is less  than 55  percent  compaction   is  assumed  to
occur. The rate of compaction is computed according  to the  empirical  expression:

     COMPCT = 1.0 -  (0.00002*DELT60*PDEPTH*(0.55  - RDENPF))           (7)

where:
     COMPCT = unit rate of compaction of the  snowpack  per  interval
     DELT60 = number of hours in an interval
     PDEPTH = depth  of the snowpack in  inches of  total snowpack
     RDENPF = density of  the pack  relative  to liquid water

The new value for PDEPTH  is COMPCT times PDEPTH.    PDEPTH is  used to calculate
the relative  density of  the snowpack  which affects   the  liquid  water  holding
capacity as determined in subroutine LIQUID.
                                       150                             RELEASE 8.0

-------
                                                             Module  Section SNOW

4.2(1).2.4  Simulate Evaporation from the Pack  (subroutine SNOWEV)


Purpose

The SNOWEV subroutine estimates evaporation from  the snowpack  (sublimation).


Method

Evaporation from the snowpack will occur only when  the vapor pressure  of  the air
is less than that of the snow surface, that is, only when the  air vapor pressure
is  less than  6.108 mbar  which is  the maximum  vapor pressure  that the   thin
surface film of air over the snowpack can attain. When this condition  is  met the
evaporation is computed by the empirical relationship:

     SNOWEP = SNOEVP*0.0002*WINMOV*(SATVAP - VAP)*SNOCOV              (8)

where:
     SNOWEP = potential rate of evaporation from  the frozen part of  the
              snowpack in inches of water equivalent/interval
     SNOEVP « parameter used to adjust the calculation to field conditions
     WINMOV = wind movement in miles/interval
     SATVAP = saturated vapor pressure of the air at the current air
              temperature in mbar
     VAP    = vapor pressure of the air at the  current air temp, in  mbar
     SNOCOV = fraction of the land segment covered  by the snowpack

The  potential (SNOWEP)   will be  fulfilled  if  there  is sufficient  snowpack.
Otherwise, only the remaining pack will evaporate.  For either case, evaporation
occurs only from the frozen content of the snowpack (PACKF).
4.2(1).2.5 Estimate Heat Exchange Rates  (except ground melt and  rain  heat)
           (subroutine HEXCHR)
Purpose

The  purpose of  this  subroutine is  to  estimate the  heat  exchange  from   the
atmosphere due to condensation, convection,  and radiation.   All heat  exchanges
are calculated in terms of equivalent depth of melted or frozen water.
Method of Determining Heat Supplied by Condensation

Transfer of  latent heat of  condensation can be  important when warm   moist  air
masses travel  over the  snowpack.  Condensation  occurs when   the air   is  moist
enough to condense on the snowpack.  That is, when the vapor pressure of the  air
is greater  than 6.108  mbar.   This physical  process is  the  opposite  of snow
evaporation;    the heat  produced  by it  is  calculated  by another   empirical
relationship:
                                      151                            RELEASE  8.0

-------
                                                             Module Section SNOW

     CONDHT = 8.59*(VAP - 6. 1 08 ) *CCFACT*0. 00026*WINMOV                (9)

where:
     CONDHT = condensation heat flux to the snowpack in inches of water
              equivalent/interval
     VAP    = vapor pressure of the air at the current air temp, in mbar
     CCFACT = parameter used to correct melt values to field conditions
     WINMOV = wind movement in miles/interval

CONDHT can only be positive or zero, that is, incoming to the pack.


Method of Determining Heat Supplied by Convection

Heat supplied by turbulent exchange with the  atmosphere can occur only when air
temperatures are greater than freezing. This convection of heat is calculated by
the empirical expression:

     CONVHT = (AIRTMP - 32.0)*(1.0 - 0.3*MELEV/10000.0)*              (10)
              CCFACT*0.00026*WINMOV

where:
     COKVHT = convective heat flux to the snowpack in inches of water
              equivalent/interval
     AIRTMP = air temperature in degrees F
     MELEV  = mean elevation of the land segment above sea level in ft

In the simulation,   CONVHT also can only  be positive or zero,   that is,  only
incoming.


Method of Determining Heat Supplied by Radiation

Heat supplied by radiation is determined by:

     RADHT = (SHORT + LONG)/203.2                                     (11)

where:
     RADHT = radiation heat flux to the snowpack in inches of
             water equivalent/interval
     SHORT = net solar or shortwave radiation in langleys/interval
     LONG  = net terrestrial or longwave radiation in langleys/interval

The constant  203.2 is the  number of langleys required  to produce one   inch  of
melt from snow at 32 degrees F.  RADHT can be either positive or negative,   that
is, incoming or outgoing.

SHORT and  LONG are calculated  as follows.   Solar radiation,  a  required time
series,  is modified  by the albedo and   the effect of shading.    The albedo  or
reflectivity of  the snowpack  is a function  of the dullness   of the pack (see
subroutine EFFPRC for a  discussion of DULL)  and the season.   The equation  for
calculating albedo  (ALBEDO) for the 6 summer months is:
                                       152                             RELEASE 8.0

-------
                                                             Module  Section  SNOW

     ALBEDO = 0.80 - 0.10*(DULL/24.0)**0.5                            (12)

The corresponding equation for the winter months is:

     ALBEDO - 0.85 - 0.07*(DULL/24.0)**0.5                            (13)

ALBEDO is allowed a minimum value of 0.45  for summer and  0.60  for winter.    The
hemispheric location of  the land segment is taken into  account  for determining
summer and winter in using the above equation.   This is done through the use of
the latitude parameter which is positive for the northern  hemisphere.

Once the albedo of  the pack is found then solar  radiation  (SHORT)   is  modified
according to the equation:

     SHORT = SOLRAD*(1.0 - ALBEDO)*(1.0 - SHADE)                      (14)

where:
     SOLRAD = solar radiation in langleys/interval
     SHADE  = parameter indicating the fraction of the land  segment  which
              is shaded

Unlike shortwave radiation which is  more commonly measured,  longwave radiation
(LONG)  is estimated from theoretical consideration of the  emitting properties of
the snowpack and its environment.  The following equations are  based on  Stefan's
law of  black body radiation  and are linear  approximations of curves   in Plate
5-3,  Figure 6 in Snow Hydrology (Corps  of Engineers 1956).    They  vary only by
the constants  which depend  on air  temperature.   For  air temperatures  above
freezing:

     LONG = SHADE*0.26*RELTMP + (1.0 - SHADE)*(0.2*RELTMP  -  6.6)      (15)

And for air temperatures at freezing and below:

     LONG = SHADE*0.20*RELTMP + (1.0 - SHADE)*(0.17*RELTMP - 6.6)     (16)

where:
     RELTMP = air temperature minus 32 in degrees F
        6.6 = average back radiation lost from the snowpack  in  open
              areas in langleys/hr

Since the  constants in  these equations  were originally  based  on   hourly  time
steps,  both calculated values are multiplied by DELT60,  the number  of hours  per
interval, so that they correspond to the simulation interval.   In addition,  LONG
is multiplied  by the  fraction of clear  sky (SKYCLR)  when  it  is   negative to
account for back radiation from clouds.
                                      153                            RELEASE 8.0

-------
                                                             Module Section SNOW

4.2(1).2.6 Simulate Loss of Heat from Pack (subroutine COOLER)


Purpose

The purpose of this code is to cool  the snowpack whenever it is warmer than  the
ambient air and thus loses heat.   This is accomplished by accumulating negative
heat storage  which increases  the capacity  of the  pack to  later absorb  heat
without melting as simulated in subroutine WARMUP.
Method

In every interval where there is heat loss to the atmosphere and the  temperature
of the snowpack is greater than the  air temperature,  the negative heat  storage
will increase;   that  is,  the pack will  cool.   However,  there is  a  maximum
negative heat storage.   The maximum negative heat storage that can exist at  any
time  is found  by  assuming  a linear  temperature  distribution  from the   air
temperature which is considered to be above the pack to 32 degrees at  the bottom
of the  snowpack.   This maximum negative  heat storage is calculated  hourly as
follows:

     MNEGHS = 0.00695*(PACKF/2.0)*(-RELTMP)                           (17)

where:
     MNEGHS = maximum negative heat storage, inches of water equivalent
     PACKF  = water equivalent of the frozen contents of the snowpack,
              inches
     RELTMP - air temperature above freezing in degrees F

The accummulation  of the negative  heat storage  is calculated hourly from  the
following empirical relationship:

     NEGHT = 0.0007*(PAKTMP - AIRTMP)*DELT60                          (18)

where:
     NEGHT  = potential rate of cooling of the snowpack in inches of  water
              equivalent per interval
     PAKTMP = mean temperature of the snowpack in degrees F
     AIRTMP = air temperature in degrees F
     DELT60 = number of hours per interval

NEGHT is added  to the negative heat storage  (NEGHTS)  every interval  except when
limited by MNEGHS. NEGHTS is used in the parent subroutine SNOW to calculate  the
temperature of  the snowpack and  in subroutine  WARMUP to determine   the extent
that the pack must be warmed to reach 32 degrees F.


4.2(1).2.7  Warm the Snowpack if Possible  (subroutine WARMUP)
Purpose

This subroutine warms  the snowpack  to  as  much  as  32  degrees  F when possible.

                                       154                            RELEASE 8.0

-------
                                                             Module Section  SNOW

Method

When there  is negative heat  storage in the pack   (see subroutine COOLER   for a
discussion  of NEGHTS),   and  there is  net incoming  energy   as calculated  in
previous subroutines,  then NEGHTS will decrease  resulting in  a warmer  snowpack
and possible melt.

The calculations in this subroutine are merely accounting.  They decrease  NEGHTS
to a minimum of zero by subtracting the net incoming heat.  If  any negative  heat
storage remains,  then the latent heat released  by the freezing of any  incoming
rain is added  to the pack.   Since NEGHTS  and all other heat  variables  are  in
units of inches of melt,  the inches of rain falling on the pack and  freezing  is
subtracted from NEGHTS without any conversion.


4.2(1).2.8 Melt the Pack Using Any Remaining Heat (subroutine MELTER)

Purpose

MELTER simulates  the actual  melting of  the pack  with whatever  incoming  heat
remains.   Any heat which was not used to heat the snowpack in  subroutine  WARMUP
can now be used to melt the snowpack.

Method

This subroutine is also merely an  accounting subroutine.  The  net incoming  heat
has already been calculated in terms of water equivalents of melt.    Hence,  any
remaining incoming heat is used directly to  melt the  snowpa ck either partially
or entirely depending on the size of the snowpack.


4.2(1).2.9 Handle Liquid Water in the Pack (subroutine LIQUID)

Purpose

Subroutine LIQUID first determines the liquid  storage capacity of the snowpack.
It  then determines  how much  liquid water  is  available to   fill the  storage
capacity.   Any liquid water above the capacity  wil 1 leave the snowpack  unless
it freezes (see subroutine ICING).

Method

The liquid  water holding  capacity of  the snowpack   can be  at the  maximum  as
specified by the parameter MWATER, at zero, or somewhere in between depending  on
the density of the  pack:   the less dense the snowpack  the greater  the holding
capacity.  The following relationships define the capacity:

for RDENPF > 0.91,

     PACKWC =0.0                                                     (19)

for 0.6 < RDENPF < 0.91,

     PACKWC = MWATER*(3.0 - 3.33*RDENPF)                              (20)

                                      155                             RELEASE 8.0

-------
for RDENPF < 0.61,

     PACKWC - MWATER
where:
                                                             Module  Section  SNOW
(21)
     PACKWC - liquid water holding capacity of  the snowpack  in
              in./in.
     MWATER = parameter specifing the maximum liquid water content  of
              the snowpack in in./in.
     RDENPF = density of the snowpack relative  to liquid water

MWATER is a function of the mass of ice layers, the size, the shape, and spacing
of  snow crystals  and  the degree  of channelization   and   honeycombing of  the
snowpack.

Once PACKWC is calculated,  it is compared  to  the available liquid water in the
pack PWSUPY.  PWSUPY is calculated by summing any storage remaining at the start
of the interval,   any melt,  and any rain  that fell on the pack   which did not
freeze.   If  PWSUPY is  more than PACKWC,   then water is   yielded to  the land
surface from the snowpack.
4.2(1).2.10 Simulate Occurrence of Ice in  the Pack  (subroutine  ICING)
Purpose

The purpose of  subroutine ICING is to  simulate  the possible  freezing  of water
which would otherwise leave the snowpack.  This freezing  in  turn  produces ice or
frozen ground at the bottom of the snowpack.   In  this  subroutine,  the  ice can be
considered to  be at the bottom  of the pack  or   frozen in the ground   below the
snow portion  of the pack  thus extending  the total  pack into the  soil.   This
subroutine may  only be  applicable in  certain areas;    therefore,  it  is user
optional.
Method

The freezing of the  water yield of  the  snowpack  depends  on  the capacity of the
environment to freeze  it.  Every day at  approximately 6 a.m.   the  capacity is
reassessed.   A new value is estimated in  terms of  inches of melt by multiplying
the Fahrenheit degrees of the air temperature  below 32.0  by 0.01.   This estimate
is compared with  the freezing capacity  if  any which remains from  the previous
24-hr period.  If it  is greater,  then  the  new estimated  capacity replaces the
old,  else the old value remains as  the  potential.    Any  water yield that occurs
freezes and is  added to the ice portion  of the  snowpack until  the capacity is
met.  Any subsequent water yield is  released from the snowpack.
                                       156
RELEASE 8.0

-------
                                                             Module Section  SNOW

4.2(1).2.11 Melt the Pack Using Heat from the Ground  (subroutine GMELT)


Purpose

The purpose  of the  GMELT subroutine  is to  simulate the  melt caused   by  heat
conducted from the surface underlying the  snowpack.  This ground heat melts the
pack  only  from  below.   Therefore,  melt  from  this  process  is  considered
independent  of  other  previously  calculated heat   influences  except   for  an
indirect effect  via the  temperature of  the snowpack.   Unlike the  other  melt
processes,  ground heat melts the ice portion of the  snowpack first since ice  is
considered to be located at the lower depths of the pack.
Method

The potential rate of ground melt is calculated hourly as a function of  snowpack
temperature (PAKTMP)  and  a lumped parameter  (MGMELT).   MGMELT  is the maximum
rate of melt in  water equivalent caused by heat from the ground  at a PAKTMP  of
32 degrees F.  MGMELT would depend upon the thermal conductivity of the  soil and
the normal depth of  soil freezing.  The potential ground melt  is reduced  below
MGMELT by  3 percent  for each degree  that PAKTMP  is below 32  degrees F  to a
minimum of 19 percent of MGMELT at 5 degrees   F or lower.  As long as a  snowpack
is present, ground melt occurs at this potential rate.
4.2(1).2.12 Reset State Variables When Snowpack Disappears  (subroutine
            NOPACK)
Purpose

This code resets  the state variables (for example,  SNOCOV)   when  the  snowpack
completely disappears.
Me thod

The frozen contents  of the snowpack required  for complete areal cover   of  snow
(COVINX)  is set to a tenth of  the maximum value (COVIND).  All other variables
are either set to zero or the "undefined" value of -1.0E30.
                                      157                            RELEASE 8.0

-------
                                                           Module Section PWATER

4.2(1).3  Simulate Water Budget for a Pervious Land Segment  (Section PWATER
          of Module PERLND)
Purpose

PWATER is used  to calculate the components  of the water budget,   primarily to
predict the total runoff  from a pervious area.  PWATER is  the key component of
module PERLND;  subsequent major sections of PERLND (eg.  SEDMNT)  depend on the
outputs of this section.


Background

The hydrologic  processes that are modeled  by PWATER are illustrated  in Figure
4.2(1).3-1. The algorithms used to simulate these land related processes are the
product of over 15 yr of research and  testing.   They are based on the original
research for the  LANDS subprogram of the Stanford Watershed  Model IV (Crawford
and Linsley  1966).  LANDS has  been incorporated into  many models and  used to
successfully simulate  the hydrologic  responses of  widely varying  watersheds.
The equations used in module section PWATER  are nearly identical to the ones in
the current version of LANDS in the PTR Model  (Crawford and Donigian 1973),  HSP
(Hydrocomp 1976),  and the ARM and NPS  Models (Donigian and Crawford 1976 a,b).
However,  some changes have been made to LANDS to make the algorithms internally
more amenable to a range of calculation time steps.  Also, many of the parameter
names have been changed to make them more descriptive,  and some can be input on
a monthly basis to allow for seasonal variations.
Data Requirements and Manipulation

The number of time  series required by module section PWATER  depends  on whether
snow accumulation and melt are considered.

When such conditions are not  considered,  only potential evapotranspiration  and
precipitation are required.

However,   when snow  conditions are  considered,   air  temperature,    rainfall,
snowcover,  water  yield,  and ice  content of  the snowpack are   also required.
Also,  the  evaporation data are  adjusted when   snow is considered.    The  input
evaporation values are reduced  to account for the fraction of  the  land segment
covered by  the snowpack   (determined from  the generated  time series for snow
cover),  with an allowance for the fraction of area covered by coniferous  forest
which, it is assumed, can  transpire through any snow cover.  Furthermore,  PET is
reduced to  zero when  air temperature is  below  the  parameter PETMIN.    If  air
temperature is below PETMAX but above PETMIN,  PET will  be reduced to  50%  of  the
input value,  unless the   first adjustment already reduced it to   less than this
amount.

The estimated potential evapotranspiration  (PET)  is used to calculate actual ET
in subroutine group EVAPT.
                                       158                             RELEASE 8.0

-------
I

I
CO
*

o
\\\n
•  .t.tinl
             " '''
        • ' S". ; .- *•." ."I*. • . . •
           Groundwater table
                                     !
                                     H
                                     in
                                     »
                                     n
                                     rt
                                     H-

                                     s


-------
                                                           Module Section PWATER

Approach

Figure 4.2(1).3-2 represents the fluxes and storages simulated in module section
PWATER.  The time series SUPY representing moisture supplied to the land segment
includes rain,  and when snow conditions  are considered,   rain plus water from
the snowpack.  SUPY is then available for interception.  Interception storage  is
water retained  by any  storage above  the overland  flow plane.    For pervious
areas,   interception  storage is  mostly  on  vegetation.   Any  overflow  from
interception storage is added to the  optionally supplied time series of surface
external lateral inflow  to produce the total inflow into  the surface detention
storage.

Inflow to the surface detention storage is  added to existing storage to make  up
the  water available  for  infiltration and  runoff.    Moisture which  directly
infiltrates moves to the lower zone  and groundwater storages.   Other water may
go to the upper zone storage,  may be routed as runoff from surface detention  or
interflow storage,  or may stay on the  overland flow plane,  from which it runs
off or infiltrates at a later time.

The   processes  of   infiltration  and   overland  flow   interact  and   occur
simultaneously in nature.   Surface conditions such as heavy turf on mild slopes
restrict the velocity of  overland flow and reduce the total  quantity of runoff
by  allowing  more time  for  infiltration.    Increased  soil moisture  due   to
prolonged infiltration will in time reduce  the infiltration rate producing more
overland flow.  Surface detention will modify flow.  For example, high intensity
rainfall is attenuated by storage and the  maximum outflow rate is reduced.  The
water  in  the  surface  detention may  also  later  infiltrate  reoccurring   as
interflow, or it can be contained in upper zone storage.

Water  infiltrating through  the surface  and  percolating from  the upper  zone
storage to the lower zone storage may  flow to active groundwater storage or may
be  lost  by deep  percolation.    Active  groundwater eventually  reappears   as
baseflow, but deep percolation is considered lost from the simulated system.

Lateral external inflows  to interflow and active groundwater  storages are also
possible in section PWATER.   One may wish to use this option if an upslope land
segment is significantly different to merit  separating it from a downslope land
segment and no channel exists between them.  This capability was not included  in
the previous models.

Not only are flows important in the simulation  of the water budget,  but so are
storages.   As stated,   soil storage affects infiltration.    The water holding
capacity of the two soil storages, upper zone and lower zone,  in module section
PERLND is defined in terms of nominal capacities.  Nominal, rather than absolute
capacities, serve the purpose of smoothing any abrupt change that would occur  if
an absolute capacity is reached.   Such capacities permit a smooth transition  in
hydrologic performance as the water content fluctuates.
                                       160                             RELEASE  8.0

-------
'/TAET\
{'total actual I
V"   /
                                                  Module Section PWATER
 ceptloo
 evapo-
 ration
                  /pteelp or rain
                  <   »urfoc«
                       Inflow
               SUPS
              •urfoc*
               •torooe
               a
                                  \a\*ra\
                                 interfk**
                                   input
                                 interflow
                                   input
   Flqura 4.ZC0.3-2. Flow diaaram of water movement and »toraqe«
modeled in the PWATER section of the PERLND Application Module.
                                                          RELEASE 8.0
                                161
                                                            RELEASE 8.0

-------
                               Module Section PWATER
  i'
6
   /   INFIL
   Vinfiltration
w
  I
6
     XlPERC  ,
     infiltration*1
                    UZI
                   upper
                    zone
                   inflow
                             UZS
                          upper zone
                            stance
                    lower
                    zone
                   inflow
                    AOW)
                    active
                   o/ound
                    water
                    inflow
                   lateral
                   ground
                   water
                   jnflow
                              lower zone
                                storage
                                AOWS
                                active
                             around water
                                storage
                                         AGWO
                                         ground
                                          water
                                         outflow
Fiqure
                   (Continued^
                 162
                                       RELEASE 8.0

-------
                                                           Module Section  PWATER

Storages  also  affect  evapotranspiration loss.     Evapotranspiration  can   be
simulated from  interception storage,   upper and  lower zone   storages,   active
groundwater storage, and directly from baseflow.

Storages and flows  can also be instrumental in the  transformation and movement
of chemicals  simulated in  the agri-chemical  module sections.    Soil moisture
levels affect  the adsorption and  transformations of pesticides  and  nutrients.
Soil moisture contents may vary greatly over a land segment.    Therefore,  a more
detailed representation  of the moisture  contents and  fluxes  may be  needed  to
simulate the transport  and reaction of agricultural  chemicals.   Following  the
ARM Model, HSPF permits a segment to be further divided into conceptual "blocks"
which represent the  areal variations of the watershed in  more detail.  Further
explanation of these conceptual areal blocks or  zones is given in the ARM Model
report (Donigian and Crawford 1976a).   ARM uses five blocks but HSPF  allows  the
user to specify from one to five.

The following subroutine descriptions will explain in more detail the  algorithms
of the PWATER module  section.   Further detail can be found  in the pseudo code
and the reports cited above.
4.2(1).3.1  Simulate Interception  (subroutine ICEPT)
Purpose

The purpose of this code is to  simulate the interception of moisture by  vegetal
or other ground  cover.   Moisture is supplied by precipitation,   or under  snow
conditions,  it  is supplied by  the rain not falling  on the snowpack  plus  the
water yielded by the snowpack.
Method

The user may supply the interception capacity  on a monthly basis  to account  for
seasonal variations,  or may supply one value designating a fixed  capacity.   The
interception  capacity parameter  can  be used  to  designate  any retention   of
moisture which does not infiltrate or reach the overland flow plane.   Typically
for pervious  areas this capacity represents  storage on grass  blades,   leaves,
branches, trunks, and stems of vegetation.

Moisture exceeding the interception capacity overflows  the storage and is ready
for either  infiltration or  runoff as  determined by  subroutine  group   SURFAC.
Water held  in interception storage is  removed by evaporation;    the  amount is
determined in subroutine EVICEP.
                                      163                            RELEASE  8.0

-------
                                                           Module Section PWATER
4.2(1).3.2  Distribute the Water Available for Infiltration and Runoff
            (subroutine SURFAC)
Purpose

Subroutine SURFAC determines what happens to the  moisture on the surface of  the
land.   It may infiltrate,   go to the upper zone storage  or interflow  storage,
remain in surface detention storage, or run off.
Method

The  algorithms  which  simulate  infiltration  represent  both  the  continuous
variation of infiltration rate with time as  a function of soil moisture and  the
areal  variation  of  infiltration  over   the  land  segment.    The   equations
representing the  dependence of infiltration on  soil moisture are based   on  the
work of Philip (1957) and are derived in detail in the previously cited reports.

The  infiltration  capacity,   the  maximum  rate  at  which  soil  will   accept
infiltration,  is a  function of both the fixed and  variable characteristics of
the watershed.   Fixed  characteristics include primarily soil  permeability  and
land slopes,   while variables  are soil  surface conditions  and soil  moisture
content.    Fixed and  variable  characteristics vary  spatially  over  the land
segment.  A  linear probability density  function is  used to account   for areal
variation.    Figure  4.2(1).3-3 represents  the  infiltration/interflow/surface
runoff distribution function of section PWATER. Careful attention to this  figure
and Figure 4.2(1).3-2 will facilitate understanding of subroutine SURFAC and  the
subordinate subroutines DISPOS, DIVISN, UZINF, and PROUTE.

The infiltration distribution represented by Figure 4.2(1).3-3 is focused  around
the two lines which separate the moisture  available to the land surface  (MSUPY)
into what infiltrates and what goes to interflow. A number of the variables that
are  used  to determine  the  location  of lines  I  and  II are  calculated   in
subroutine SURFAC.  They are calculated by the following relationships:

     IBAR = (INFILT/(LZS/LZSN)**INFEXP)*INFFAC                        (1)

     IMAX = INFILD*IBAR                                               (2)

     IMIN = IBAR -  (IMAX - IBAR)                                      (3)

     RATIO = INTFW*(2.0**(LZS/LZSN))                                  (4)

where:
     IBAR   - mean infiltration capacity over the land segment in
              in./interval
     INFILT = infiltration parameter in in./interval
                                       164                             RELEASE 8.0

-------
                                          Module Section  PWATER
                  block number
  fit* II (interflow+
  intiHration capacity)
    'lint 1 (infiltration capacity)
                       50
                    % of Area
   MM**
                                                         IMA.X
         a,
         I
         I
too
 pc*w»tta| surface
 detention/runoff
 interflow inflow
                    >•  pot«ntial direct runoff
Fiqure 4.2(I).S-S  Ottermination of infiltration
                 and interflow inflow
                      165
                                                   RELEASE 8.0

-------
                                                           Module Section PWATER

     LZS    = lower zone storage in inches
     LZSN   = parameter for lower zone nominal storage in inches
     INFEXP = exponent parameter greater than one
     INFFAC = factor to account for frozen ground effects, if applicable
     IMAX   = maximum infiltration capacity in in./interval
     INFILD »= parameter giving the ratio of maximum to mean infiltration
              capacity over the land segment
     IMIN   = minimum infiltration capacity in in./interval
     RATIO  = ratio of the ordinates of line II to line I
     INTFW  = interflow inflow parameter

The  factor that  reduces infiltration  (and  also upper  zone percolation)    to
account for the freezing of the ground surface  (INFFAC)  is 1.0 if icing is  not
simulated.   When icing occurs,  the factor is 1.0 minus the water equivalent of
ice in of the snowpack to a minimum of 0.1.

The parameter  INTFW can  be input on  a monthly basis  to allow  for variations
throughout the year.

When the land segment is separated into conceptual areal blocks as designated by
the vertical subdivisions  diagrammed in Figure 4.2(1).3-3,   corresponding  IMAX
and IMIN values must be determined for each block:

     IMNB = IMIN +  (BLK - 1)*(IMAX - IMIN)/NBLKS                      (5)

     IMXB = IMNB +  (IMAX - IMIN)/NBLKS                                (6)

where:
     IMNB  = minimum infiltration capacity for block BLK in in./interval
     BLK   = block number
     NBLKS = total number of blocks being simulated
     IMXB  = maximum infiltration capacity for block BLK in in./interval
4.2(1)3.2.1  Dispose of Moisture Supply
             (subroutine DISPOS)
Purpose

Subroutine DISPOS  determines what  happens to  the  moisture  supply   (MSUPY)   on
either an individual block of the land segment   (if NBLKS  is  greater  than 1)   or
on the entire land segment (if NBLKS is equal to 1).
Method

This subroutine calls subordinate routines DIVISN,  UZINF,  and  PROUTE.   DIVISN is
called to  determine how much of  MSUPY  falls above  and below line  I   in Figure
4.2(1).3-3. The quantity under this  line is  considered  to  be infiltrated.
                                       166                             RELEASE 8.0

-------
                                                           Module  Section PWATER

The amount over the line but under the MSUPY line  (the entire  shaded portion)  is
the  potential  direct  runoff   (PDRO),  which   is   the   combined   increment  to
interflow,  and upper  zone storage plus the  quantities  which will stay  on the
surface and run off.   PDRO is subdivided by line II.   The  ordinates of line  II
are found by multiplying the ordinates of line I by  RATIO (see subroutine SURFAC
for definition).  The  quantity underneath both  line  II  and the MSUPY  line but
above line  I is called  potential interflow  inflow.   This consists  of actual
interflow plus an increment to upper zone storage.   Any amount above line II but
below the  MSUPY (potential  surface detention/runoff)  is   that portion  of the
moisture supply which  stays on the surface  and is  available  for   overland flow
routing,  plus a further increment to upper  zone storage.   The fractions of the
potential  interflow inflow  and potential  surface  detention/runoff which are
combined to compose the upper zone inflow are determined  in  subroutine UZINF.
4.2(1 ).3.2.1.2  Compute Inflow to Upper Zone  (subroutines UZINF1  and  UZINF2)
Purpose

The purpose of this  code is to compute the inflow to  the   upper  zone  when there
is some potential direct runoff (PDRO).  PDRO, which is determined  in  subroutine
DISPOS,  will  either enter the  upper zone storage  or be  available   for  either
interflow or overland  flow.   This subroutine determines what  amount,  if any,
will go to the upper zone storage.
Method

The fraction of  the potential direct runoff  which is  inflow  to   the  upper zone
storage  is a  function of  the ratio   (UZRAT)  of  the  storage   to  the   nominal
capacity.  Figure 4.2(1).3-4 diagrams this relationship.    The equations  used to
define this curve follow:

     FRAC = 1 - (UZRAT/2)*(1/(4 - UZRAT))**(3 - UZRAT)                (7)

for UZRAT less than or equal to two.  For UZRAT greater  than two,

     FRAC = (0.5/(UZRAT-1))**(2*UZRAT-3)                              (8)

where:
     FRAC  = fraction of PDRO retained by the upper zone  storage
     UZRAT = UZS/UZSN


Since UZS  and FRAC are  dynamically affected by  the inflow process  it  becomes
desirable  when  using particularly  large  time  steps   to integrate  over  the
interval to  find the  inflow to the  upper zone.   This   is done  in  subroutine
UZINF1.  The solution is simplified by assuming  that inflow to and  outflow from
the  upper  zone is  handled  separately.   Considering  inflow,    the  following
differential equation results:
                                      167                            RELEASE 8.0

-------
                                                           Module Section PWATER

     d(UZS)/dt = (d(UZRAT)/dt)*UZSN = PDRO*FRAC                       (9)

Thus

     d(UZRAT)/FRAC = (PDRO/UZSN)*dt                                  (10)

Now taking the definite integral of both sides of the equation:
    INTGRL
= (PDRO/UZSN)(t2-
(11)
where:
      t1 = time at start of interval
      t2 = time at end of interval

The integral on the left side  must be evaluated numerically.  Subroutine  UZINF1
uses tabulated corresponding  values of INTGRL and UZRAT  to  evaluate  it.    This
relationship,  plus Equations 9 and 11,  enable  one to find the change  in UZRAT
over the interval and, hence, the quantity of inflow.

Subroutine UZINF2, which is an alternative to UZINF1, uses the same  algorithm as
HSP, ARM and NFS.   That is, Equations 7 and 8 are used directly to  estimate the
fraction of PDRO  retained by the upper zone.    Only the value of   UZRAT  at the
start of  the simulation interval  is used;  thus,   no  account is taken  of the
possible steady reduction in inflow to the upper zone within a single  time step,
due to its being filled  (Figure 4.2(1).3-4).
I.UU
.60
u .60
u. .40
.10
OA










^S





N^
\




V

v




v^
                               LO            2.0
                                    UZRAT
                           J.O
          Figure  4.2(1)*3-4   Fraction of  the potential direct runoff
            retained  by  the  upper  zone (FRAG) as a function of the
                   upper  zone  soil  moisture ratio (UZRAT)
                                       168
                                      RELEASE 8.0

-------
                                                           Module Section PWA.TER

4.2(1).3.2.1.3  Determine Surface Runoff (subroutine PROUTE)


Purpose

The purpose  of subroutine  PROUTE is  to determine  how much  potential surface
detention runs off in one simulation interval.


Method of Routing

Overland flow is treated as a turbulent flow process.  It is simulated using  the
Chezy-Manning equation and  an empirical expression which  relates outflow depth
to detention storage.   A more detailed  explanation and derivation can be found
in the reports cited in the initial background discussion.  The rate of overland
flow discharge is determined by the equations:

for SURSM < SURSE

    SURO = DELT60*SRC*(SURSM*(1.0 + 0.6(SURSM/SURSE)**3)**1.67      (12)

for SURSM >= SURSE

    SURO = DELT60*SRC*(SURSM*1.6)**1.67

where:
    SURO   = surface outflow in in./interval
    DELT60 = DELT/60.0 (hr/interval)
    SRC    = routing variable, described below
    SURSM  = mean surface detention storage over the time interval in
             inches
    SURSE  = equilibrium surface detention storage (inches) for current
             supply rate

DELT60 makes the equations applicable to a range of time steps (DELT). The first
equation represents the case where the overland flow rate is increasing, and  the
second  case where  the surface  is  at equilibrium  or receding.    Equilibrium
surface detention storage is calculated by:

     SURSE = DEC*SSUPR**0.6                                         (13)

where:
     DEC   = calculated routing variable, described below
     SSUPR = rate of moisture supply to the overland flow surface

There are two optional  ways of determining SSUPR and SURSM.    One option -  the
same  method used  in the  prior models  HSP,ARM and  NFS -  estimates SSUPR  by
subtracting the surface  storage at the start  of the interval (SURS)   from  the
potential surface detention  (PSUR)  which was determined  in subroutine DISPOS.
The units of SSUPR are inches per interval.    SURSM is estimated as the mean of
SURS and PSUR.  The other option estimates  SSUPR by the same method except that
the result is divided by DELT60 to obtain a value with units of inches per hour.
                                      169                            RELEASE 8.0

-------
                                                           Module Section PWATER

SURSM is set equal to SURS.   This option has not been used in prior models, but
is dimensionally consistent for any time step.

The variables DEC and SRC are calculated  daily in subroutine SURFAC,  but  their
equations will be given here since they pertain to routing.  They are:

     DEC = 0.00982*(NSUR*LSUR/SQRT(SLSUR))**0.6                      (14)

     SRC = 1020.0*(SQRT(SLSUR)/(NSUR*LSUR))                          (15)

where:
     NSUR  = Manning's n for the overland flow plane
     LSUR  = length of the overland flow plane in ft
     SLSUR — slope of the overland flow plane in ft/ft

NSUR can be input on a monthly basis to allow for variations in roughness of the
overland flow plane throughout the year.
4.2(1).3.3  Simulate Interflow (subroutine INTFLW)
Purpose

Interflow can have an important influence on storm hydrographs particularly when
vertical  percolation is  retarded by  a  shallow,  less  permeable  soil   layer.
Additions  to the  interflow  component are  retained in  storage  or  routed  as
outflow from  the land segment.   Inflows  to the interflow component   may occur
from the surface  or from upslope external  lateral flows.  The purpose  of this
subroutine is to determine the amount of interflow and to update the storage.


Method of Determining Interflow

The calculation of  interflow outflow assumes a  linear  relationship to storage.
Thus outflow  is a  function of  a recession  parameter,  inflow,    and storage.
Moisture that  remains will occupy  interflow storage.   Interflow  discharge  is
calculated by:

     IFWO =  (IFWK1*INFLO) + (IFWK2*IFWS)                             (16)

where:
     IFWO  = interflow outflow in in./interval
     INFLO = inflow into interflow storage in in./interval
     IFWS  = interflow storage at the start of the interval in inches

IFWK.1 and IFWK2 are variables determined by:

     IFWK1 = 1.0 -  (IFWK2/KIFW)                                      (17)

     IFWK2 = 1.0 -  EXP(-KIFW)                                        (18)
                                       170                            RELEASE 8.0

-------
                                                           Module  Section PWATER

and

     KIFW = -ALOG(IRC)*DELT60/24.0                                   (19)

where:
     IRC    = interflow recession parameter, per day
     DELT60 = number of hr/interval
     24.0   = number of hours per day
     EXP    = Fortran exponential function
     ALOG   = Fortran natural logarithm function

When a pervious land segment is divided into more  than one block,  the  algorithms
are applied separately to each block.   IRC is  the ratio of  the present  rate of
interflow outflow to the value 24 hours earlier, if there was no inflow.  IRC can
be  input  on a  monthly  basis  to  allow  for variations  in soil  properties
throughout the year.
4.2(1).3.4  Simulate Upper Zone Behavior  (subroutine  UZONE)
Purpose

This subroutine and  the subsidiary subroutine UZONES are used   to  calculate the
water percolating from  the upper zone.   Water not percolated   remains  in  upper
zone storage available for evapotranspiration in subroutine ETUZON.
Method of Determining Percolation

The upper  zone inflow  calculated in DISPOS  is  first added   to  the   upper  zone
storage at  the start of  the interval to obtain  the total water  available for
percolation from the upper zone.

Percolation only occurs when UZRAT minus LZRAT  is greater than 0.01.   When  this
happens,  percolation from the upper zone storage is calculated by  the empirical
expression:

     PERC = 0.1*INFILT*INFFAC*UZSN*(UZRAT - LZRAT)**3                (20)

where:
     PERC   = percolation from the upper zone in  in./interval
     INFILT = infiltration parameter in in./interval
     INFFAC = factor to account for frozen ground, if any,
     UZSN   = parameter for upper zone nominal storage in inches
     UZRAT  = ratio of upper zone storage to UZSN
     LZRAT  = ratio of lower zone storage to lower zone
              nominal storage (LZSN)

The upper  zone nominal capacity can  be input on  a monthly basis  to   allow for
variations throughout the  year.  The monthly values are  interpolated to  obtain
daily values.  When a pervious land segment is divided into more  than  one  block,
the algorithm is applied separately to each block.

                                      171                            RELEASE 8.0

-------
                                                           Module Section  PWATER

4.2(1).3.5  Simulate Lower Zone Behavior  (subroutine LZONE)


Purpose

This  subroutine determines  the quantity  of infiltrated  and  percolated   water
which enters the  lower zone.  The infiltrated moisture  supply   is  determined in
subroutine DISPOS.    The percolated moisture  from the  upper  zone is  found in
subroutine UZONE.


Method

The fraction of  the direct infiltration plus percolation  that   enters the lower
^one storage (LZS)  is  based on the lower zone  storage  ratio  of LZS/LZSN where
LZSN is the  lower zone nominal capacity.  The inflowing  fraction  is  determined
empirically by:

     LZFRAC =  1.0 - LZRAT*(1.0/(1.0 + INDX))**INDX                   (21)

when LZRAT is  less than 1.0, and by

     LZFRAC =  (1.0/O.O + INDX) )**INDX                               (22)

when LZRAT is  greater than 1.0.  INDX is defined by:

     INDX = 1.5*ABS(LZRAT - 1.0) + 1.0                               (23)

where:
     LZPRAC -  fraction of infiltration plus  percolation  entering LZS
     LZRAT  =  LZS/LZSN
     ABS    =  function for determining absolute  value

These  relationships are  plotted in  Figure 4.2(1).3-5.  The   fraction of  the
moisture  supply remaining  after  the surface,   upper  zone,   and lower  zone
components are subtracted is added to the groundwater  storages.
4.2(1).3.6   Simulate Groundwater  Behavior  (subroutine GWATER)
Purpose

The  purpose   of  this   subroutine  is   to  determine  the amount  of the  inflow to
groundwater  that is   lost  to  deep or   inactive groundwater and to  determine the
amount of  active groundwater  outflow.    These two fluxes will in turn affect the
active groundwater storage.

Method of  Determining Groundwater Fluxes

The  quantity of   direct infiltration  plus percolation from the  upper zone which
does not go  to  the lower zone (determined in subroutine LZONE) will be inflow to
either inactive  or active  groundwater.  The distribution to active and inactive

                                       172                            RELEASE 8.0

-------
                                                           Module Section PWATER
        Figure 4.2(1).3-5  Fraction of infiltration plus percolation
                           entering lower zone storage
groundwater is user designated by parameter DEEPFR.   DEEPFR is that fraction of
the  groundwater inflow  which  goes to  inactive  groundwater.   The  remaining
portion of the percolating water and all  external lateral inflow if any make up
the total inflow to the active groundwater storage.

The outflow from active groundwater storage is based on a simplified model.   It
assumes that the discharge  of an aquifer is proportional to  the product of the
cross-sectional  area  and  the  energy  gradient  of  the  flow.   Further,   a
representative cross-sectional  area of  flow is  assumed to  be related  to the
groundwater storage level at the start of the interval.   The energy gradient is
estimated as  a basic  gradient plus a  variable gradient  that depends  on past
active groundwater accretion.
Thus, the groundwater outflow is estimated by:

     AGWO = KGW*(1.0 + KVARY*GWVS)*AGWS
                                                        (24)
where:
     AGWO
     KGW
     KVARY

     GWVS
     AGWS
active groundwater outflow in in./interval
groundwater outflow recession parameter, per interval
parameter which can make active groundwater storage to outflow
relation nonlinear in per inches
index to groundwater slope in inches
active groundwater storage at the start of the interval in inches
GWVS is increased each interval by the  inflow to active groundwater but is also
decreased  by 3  percent once  a day.    It is  a measure  of antecedent  active
groundwater inflow.  KVARY is introduced to allow variable groundwater recession
rates. When KVARY is nonzero, a semilog plot of discharge vs. time is nonlinear.
This  parameter adds  flexibility  in groundwater  outflow  simulation which  is
useful in simulating many watersheds.
                                      173
                                                        RELEASE 8.0

-------
                                                           Module Section PWATER

The parameter KGW is calculated by the Run Interpreter using the relationship:

     KGW = 1.0 - (AGWRC)**(DELT60/24.0)                              (25)

where:
     AGWRC  = daily recession constant of groundwater flow,
              if KVARY or GWVS =0.0
              That is, the ratio of current groundwater discharge
              to groundwater discharge 24-hr earlier
     DELT60 = hr/interval
4.2(1).3.7  Simulate Evapotranspiration
            (subroutine EVAPT)
Purpose

The purpose of EVAPT and its  subordinate subroutines is to simulate evaporation
and  evapotranspiration fluxes  from all  zones  of the  pervious land  segment.
Since in most hydrologic regimes the volume  of water that leaves a watershed as
evapotranspiration exceeds the total volume of streamflow,  this is an important
aspect of the water budget.
Method of Determining Actual Evapotranspiration

There are  two separate issues  involved in estimating  evapotranspiration  (ET).
First, potential ET must be estimated.  ET potential or demand is supplied  as  an
input times series, typically using U.S. Weather Bureau Class A pan records plus
an adjustment  factor.  The data  are further adjusted  for cover in   the parent
subroutine PWATER.   Second, actual ET must be calculated, usually as  a  function
of moisture storages and the potential.  The actual ET is estimated by trying  to
meet the demand from five sources in the  order described below.  The  sum of the
ET from these five sources is the  total actual evapotranspiration from  the land
segment.
Subroutine ETBASE

The first source from which ET can be taken is  the active groundwater  outflow or
baseflow.   This simulates effects such as  ET  from riparian  vegetation  in  which
groundwater is withdrawn as  it enters the stream.  The user   may  specify by the
parameter BASETP the fraction,  if any,  of   the potential  ET that can be sought
from the baseflow.   That portion can only be fulfilled if  outflow exists.    Any
remaining potential not met  by actual baseflow evaporation will try   next  to be
satisfied in subroutine EVICEP.
                                       174                             RELEASE  8.0

-------
                                                           Module  Section  PWATER

Subroutine EVICEP

Remaining  potential ET  then exerts  its demand  on the  water  in  interception
storage.   Unlike baseflow, there is no parameter regulating  the rate  of ET from
interception storage.  The demand will draw upon all of the interception storage
unless the demand is less than the storage.  When the demand  is  greater  than the
storage, the remaining demand will try to be satisfied in subroutine ETUZON.


Subroutine ETUZON

There are no special ET parameters for the upper zone, but rather  ET is based on
the  moisture  in   storage  in  relation  to  its   nominal   capacity.    Actual
evapotranspiration  will occur  from the  upper  zone storage at  the  remaining
potential  demand if  the  ratio of  UZS/UZSN,  upper  zone   storage to  nominal
capacity,  is greater than 2.0.   Otherwise the remaining potential  ET demand on
the upper  zone storage  is reduced;   the adjusted  value depends  on UZS/UZSN.
Subroutine ETAGW will attempt to satisfy any remaining demand.


Subroutine ETAGW

Like ET  from baseflow,   actual evapotranspiration  from active  groundwater is
regulated by a parameter.  The parameter AGWETP is the fraction  of the remaining
potential ET  that can  be sought  from the  active groundwater  storage.    That
portion of the ET  demand can be met only if there  is enough active groundwater
storage to satisfy it.  Any remaining potential will try to be met in  subroutine
ETLZON.


Subroutine ETLZON

The lower zone is the last storage  from which ET is drawn.    Evapotranspiration
from the lower zone is more involved than that from the other storages.  ET from
the  lower  zone  depends upon  vegetation  transpiration.     Evapotranspiration
opportunity will vary with the vegetation type, the depth of  rooting,  density of
the vegetation  cover,  and the  stage of plant  growth along with  the moisture
characteristics of the  soil zone.   These influences on the   ET opportunity are
lumped into the LZETP  parameter.   Unlike the other ET parameters  LZETP  can be
input  on  a  monthly  basis  to account  for  temporal  changes  in  the   above
characteristics.

If  the LZETP  parameter is  at its  maximum  value of  one,   representing  near
complete areal coverage of deep rooted vegetation, then the potential  ET for the
lower zone is equal to the demand that remains.   However,  this is  normally not
the case.  Usually vegetation type and/or rooting depths will vary over the land
segment.   To simulate  this,   a linear  probability  density  function for  ET
opportunity is assumed  (Figure 4.2(1).3-6).   This approach  is  similar to that
used to handle areal variations in infiltration/percolation capacity.
                                      175                            RELEASE  8.0

-------
                                                                Module Section PWATER

     The variable RPARM, the index to maximum ET opportunity, is estimated by:

          RPARM = (0.25/(1.0 - LZETP))*(LZS/LZSN)*DELT60/24.0             (26)

     where:
          RPARM  =* maximum ET opportunity in in./interval
          LZETP  = lower zone ET parameter
          LZS    =* current lower zone storage in inches
          LZSN   « lower zone nominal storage parameter in inches
          DELT60 « hr/interval
S. c
.
O  O f
                                            Eva potranspiration
                                                     I
                                                                           2
                                                                           *•
                                                                                §
                                        fO
                                top
                Perceni of Kroa with
                Opportunity Equal 1o or ess 1hoi% ihe Indicated Value
              Figure 4.2(1).3-6
Potential and actual evapotranspiration
from the lower zone
     The quantity of  water lost by ET  from the lower zone  storage,  when remaining
     potential ET (REMPET)  is less than RPARM,   is given by the cross-hatched area of
     Figure 4.2(1).3-6.   When REMPET is more than RPARM the lower zone ET is equal to
     the entire area under  the triangle, RPARM/2.

     ET from the lower zone storage is further  reduced when LZETP is less than 0.5 by
     multiplying by LZETP*2.0.   This is designed to  account for the fraction of the
     land segment devoid of any vegetation that can draw from the lower zone.
                                           176
                                         RELEASE 8,O

-------
                                                           Module Section SEDMNT
4.2(1).4  Simulate Production and Removal of Sediment
          (Section SEDMNT of Module PERLND)
Purpose

Module section  SEDMNT simulates the production  and removal of sediment   from a
pervious land segment.   Sediment can be considered to be inorganic, organic, or
both; the definition is up to the user.

Sediment from the  land surface is one  of the most common  pollutants of  waters
from urban, agricultural, and forested lands.   It can muddy waters,  cover  fish
eggs, and limit the capacity of reservoirs.   Nutritious and toxic chemicals can
be carried by it.
Approach

The equations used to  produce and remove sediment are based on  the ARM and NPS
Models  (Donigian and  Crawford  1976 a,b).   The  algorithms representing  land
surface erosion in these models were derived  from a sediment model developed by
Moshe Negev  (Negev 1967)  and  influenced by  Meyer and Wischmeier  (1969)  and
Onstad and Foster  (1975).  The supporting management practice  factor which has
been added  to the  soil detachment by  rainfall equation was  based on  the "P"
factor in the Universal Soil Loss Equation (Wischmeier and Smith 1965).   It was
introduced in order to better evaluate agricultural conservation practices.  The
equation which represents the scouring of the matrix soil, which is not included
in ARM or NPS, was derived from Negev's method for simulating gully erosion.

Figure 4.2(1).4-1 shows the detachment, attachment,  and removal involved in the
erosion  processes  on  the  pervious land  surface,   while  Figure  4.2(1).4-2
schematically  represents  the  fluxes  and  storages  used  to  simulate   these
processes.   Two of the sediment fluxes,  SLSED and NSVI,  are added directly to
the detached  sediment storage  variable DETS  in the  parent subroutine  SEDMNT
while  the  other  fluxes  are  computed  in  subordinate  subroutines.     SLSED
represents external lateral input  from an upslope land segment.   It  is a time
series  which  the user  may  optionally  specify.   NVSI  is a  parameter  that
represents any  net external additions or  removals of sediment caused  by  human
activities or wind.

Removal of  sediment by water  is simulated as  washoff of detached  sediment in
storage (WSSD)  and scour of matrix soil (SCRSD).   The washoff process involves
two parts:   the  detachment/attachment of sediment from/to the  soil matrix and
the transport of this sediment.  Detachment (DET) occurs by rainfall. Attachment
occurs only on  days without rainfall;  the  rate of attachment is  specified by
parameter AFFIX.    Transport of  detached sediment is  by overland  flow.   The
scouring of the matrix soil includes both pick up and transport by overland flow
combined into one process.
                                      177                            RELEASE 8.0

-------
O3
§
ir"
w
oo

o
                                                                                                                  ATMOSPHERIC
                                                                                                                  FALLOUT
                                                                  DETACHED
                                                                  SEDIMENT;
                                                                  STORAGE
                       -' N Sis, X ^^ ,- VJT "» f\ —fX.
                       h7v^^;^>3>H:l9:^iv
                       ^^.rr-trP^rr"^^'^^
                                      Figure  4.2(1).4-1  Erc^ican  processes
c
M
rt

cn
»
o
rt
                                                                                                                              w
                                                                                                                              W
                                                                                                                              O

-------
                                              Module Section SEDMNT
 5LSED
 lateral
Input of
sediment
 to sur-
  face
          NVSI
      net vertical
        sediment
          input
  OET5
detached
sediment
 storage
 /AFRX\
  sediment  )
 \ottachrnent/
                     aetochtd
                    sediment
        S
       / detachment
       \  ofMilbv
        \roirrfoll
                                                  total
                                                removal
                                                of sort*
                                                Mdtmtnt
                                                from sur-
                                                 face bv
O
            •otl matrix
           (aeeumed to
               hove
            unlimited
             •fanaqe)
                     'SCR5D"
                     9courpf
                     matr'ni
                     soil by
                     water
      FU)ore4.I(l).4-Z.  Flow diaqram for SEDMKT section
              of  PERLND Application  Module.
                             179
                                          RELEASE 8.0

-------
                                                           Module Section SEDMNT

Module  section  SEDMNT has  two  options  for  simulating washoff  of  detached
sediment and scour of soil. One uses subroutine SOSED1 which is identical to  the
method used in the ARM and the NFS Models.  However, some equations used in this
method are dimensionally nonhomogeneous,  and it has only been used with 15-  and
5-min intervals.   The results  obtained are  probably highly  dependent on   the
simulation  time  step.   The  other  option  uses  subroutine SOSED2  which   is
dimensionally homogeneous  and is,  theoretically,   less dependent on  the time
step.  However, it has not been tested.
4.2(1).4.1 Detach Soil By Rainfall
           (subroutine DETACH)

Purpose

The purpose of DETACH is to simulate the splash detachment of the soil matrix by
falling rain.
Method of Detaching Soil by Rainfall

Kinetic energy from rain  falling on the soil detaches particles  which  are  then
available to  be transported  by overland  flow.   The  equation that  simulates
detachment is:

    DET    = DELT60*(1.0 - CR)*SMPF*KRER*(RAIN/DELT60)**JRER          (1)

where:
    DET    = sediment detached from the soil matrix by rainfall in
             tons/acre per interval
    DELT60 = number of hr/interval
    CR     = fraction of the land covered by snow and other cover
    SMPF   = supporting management practice factor
    KRER   = detachment coefficient dependent on soil properties
    RAIN   = rainfall in in./interval
    JRER   = detachment exponent dependent on soil properties

The variable CR is  the sum of the fraction of  the area   covered by  the  snowpack
(SNOCOV),  if any,  and  the fraction that is covered by   anything else  but  snow
(COVER).  SNOCOV is computed  by section SNOW.   COVER is  a  parameter which for
pervious areas will typically be the fraction   of the area covered by vegetation
and mulch.  It can be input on a monthly basis.
4.2(1).4.2 Remove by Surface Flow Using Method  1
            (subroutine SOSED1)

Purpose

Subroutines  SOSED1  and  SOSED2 perform the   same  task but by  different methods.
They  simulate  the washoff  of the detached   sediment and the scouring of the soil
matrix.

                                       180                             RELEASE 8.0

-------
                                                           Module Section SEDMNT

Method

When simulating the washoff of detached sediment,  the transport capacity of  the
overland  flow is  estimated and  compared to  the amount  of detached   sediment
available. The transport capacity is calculated by the equation:

     STCAP = DELT60*KSER*((SURS + SURO)/DELT60)**JSER                 (2)

where:
     STCAP  = capacity for removing detached sediment in
              tons/acre per interval
     DELT60 = hr/interval
     KSER   = coefficient for transport of detached sediment
     SURS   - surface water storage in inches
     SURO   = surface outflow of water in in./interval
     JSER   = exponent for transport of detached sediment

When STCAP is greater than the amount  of detached sediment in storage,  washoff
is calculated by:

     WSSD = DETS*SURO/(SURS + SURO)                                   (3)

If  the storage  is  sufficient to  fulfill the  transport  capacity,  then   the
following relationship is used:

     WSSD = STCAP*SURO/(SURS + SURO)                                  (4)

where:
     WSSD = washoff of detached sediment in tons/acre per interval
     DETS = detached sediment storage in tons/acre

WSSD is then subtracted from DETS.

Transport and  detachment of soil  particles from  the soil matrix  is simulated
with the following equation:

     SCRSD = SURO/(SURS + SURO)*DELT60*KGER*((SURS + SURO)/DELT6O)**JGER  (5)

where:
     SCRSD = scour of matrix soil in tons/acre per interval
     KGER  = coefficient for scour 'of the matrix soil
     JGER  = exponent for scour of the matrix soil

The sum of the two fluxes,  WSSD and SCRSD, represents the total sediment outflow
from the land segment.

The same algorithms are used for the  simulation whether or not areal blocks  are
used.    When  blocks are  used,  block specific  values for  WSSD and  SCRSD  are
calculated from the  surface water fluxes and storages which  correspond to each
block.

Subroutine  SOSED1  differs  from  SOSED2 in  that  it  uses  the  dimensionally
nonhomogeneous term (SURS  + SURO)/DELT60 in the above  equations,   while SOSED2
uses the homogeneous term SURO/DELT60.

                                      181                            RELEASE  8.0

-------
                                                           Module Section SEDMNT
                                                            They only  differ in
4.2(1).4.3  Remove by Surface Flow Using Method 2
            (subroutine SOSED2)
Purpose

The purpose  of this  subroutine is  the same  as SOSED1.
method.

Method of Determining Removal

This  method  of determining  sediment  removal  has  not been  tested.   Unlike
subroutine  SOSED1,    it  makes  use   of  the  dimensionally  homogeneous   term
SURO/DELT60 instead of (SURO+SURSJ/DELT60.

The capacity of  the overland flow to transport detached  sediment is determined
in this subroutine by:
     STCAP = DELT60*KSER*(SURO/DELT60)**JSER
                                                                      (6)
When STCAP is  more than the amount  of detached sediment in  storage,   the  flow
washes off all of the detached sediment storage (DETS),  However,  when  STCAP  is
less than the amount of detached sediment in storage, the situation is transport
limiting, so WSSD is equal to STCAP.

Direct detachment and transport of the soil matrix by scouring  (eg. gullying)  is
simulated with the equation:
     SCRSD = DELT60*KGER*(SURO/DELT60)**JGER
                                                                      (7)
Definitions  of  the  above  terms  can be  found  in  subroutine  SOSED2.    The
coefficents and exponents  will have different values than  in subroutine SOSED1
because they modify different variables.
4.2(1).4.4 Simulate Re-attachment of Detached Sediment
           (subroutine ATTACH)
Purpose

Subroutine ATTACH simulates the re-attachment of detached  sediment  (DETS)  on the
surface  (soil compaction).

Method

Attachment to the soil  matrix is simulated by merely  reducing   DETS.   Since the
soil matrix is  considered to be unlimited,   no addition  to  the soil matrix is
necessary when this occurs.    DETS is diminished at the start   of  each day that
follows  a day with  no precipitation by multiplying it by   (1.0  - AFFIX),   where
AFFIX is a parameter.    This represents a first order rate  of  reduction  of the
detached soil storage.
                                       182
                                                                      RELEASE 8.0

-------
                                                           Module Section PSTEMP

4.2(1).5  Estimate Soil Temperatures (Section PSTEMP of Module PERLND)


Purpose

PSTEMP simulates soil temperatures for the surface, upper, and lower/groundwater
layers of a land segment for use  in module section PWTGAS and the agri-chemical
sections.   Good estimates  of soil temperatures are  particularly important  for
simulating first order transformations in the agri-chemical sections.
Method

The  two  methods  used  for  estimating soil  temperatures  are  based   on   the
regression equation approach in the ARM Model  (Donigian,  et al.  1977)   and  the
smoothing factor approach used in HSP  QUALITY (Hydrocomp 1977)   to  simulate  the
temperatures of subsurface flows.

Simulation of  soil temperatures  is done  by layers  which correspond   to those
specified in the  agri-chemical sections.   The surface layer is  the portion of
the land segment that affects overland flow water quality characteristics.    The
subsurface layers are upper,  lower,  and groundwater.   The upper layer  affects
interflow  quality characteristics  while  the lower  is  a  transition zone   to
groundwater.   The temperature  of  the  groundwater layer  affects  groundwater
quality  transformations   and  outflow   characteristics.    Lower   layer   and
groundwater temperatures are considered approximately  equal;  a  single value is
estimated for both layers.

Surface  layer  soil temperatures  are  estimated  by the  following regression
equation:

     SLTMP = ASLT -1- BSLT*AIRTC                                (1 )

where:
     SLTMP = surface layer temperature in degrees C
     ASLT  = Y-intercept
     BSLT  = slope
     AIRTC = air temperature in degrees C

Temperatures of the other layers are simulated by one of two methods.  If TSOPFG
is  set  equal to  one  in  the User's  Control  Input,   the upper  layer  soil
temperature  is  estimated  by  a  regression equation  as  a  function   of   air
temperature (similar to equation above),   and the lower layer/groundwater layer
temperature is specified by a parameter which can vary monthly.   This method is
similar to that  used in the ARM Model  except that ARM relates   the upper layer
temperature to the computed soil surface  temperature instead of  directly to  air
temperature.

If TSOPFG  is set  equal to  zero,  both the  upper layer  and the   lower layer/
groundwater layer temperatures  are computed by using a mean  departure from  air
temperature  plus a  smoothing factor.   The same  basic equation  is used  with
separate state variables and parameters for each layer:

     TMP = TMPS + SMO*(AIRTCS + TDIF - TMPS)                  (2)

                                      183                            RELEASE  8.0

-------
                                                           Module Section PSTEMP

where:
     TMP    = layer temperature at the end of the current interval in
              degrees C
     SMO    = smoothing factor (parameter)
     AIRTCS = air temperature at the start of the current interval/  Deg  C
     TDIF   = parameter which specifies the difference between  the mean  air
              temperature and the mean temperature of the soil  layer,  Deg C
     TMPS   = layer temperature at the start of the current  interval in
              degrees C

The values of the  parameters for any of the layer  computations can be  linearly
interpolated from monthly input values to obtain daily variations throughout the
year.  If this variation is not desired/ the user may supply yearly  values.
4.2(1).6  Estimate Water Temperature and Dissolved Gas Concentrations
          (Section PWTGAS of Module PERLND)
Purpose

PWTGAS estimates  the water temperature  and concentrations of   dissolved oxygen
and carbon  dioxide in  surface,  interflow,   and  groundwater   outflows  from  a
pervious land segment.


Method

The  temperature of  each outflow  is  considered to  be   the same   as the  soil
temperature of  the layer  from which  the flow  originates,  except  that water
temperature can  not be less than  freezing.   Soil temperatures must  either be
computed in module section PSTEMP or supplied  directly as an input time  series.
The  temperature of  the surface  outflow is   equal  to the  surface layer  soil
temperature,  the temperature of interflow to  the  upper  layer  soil temperature,
and the temperature of the active groundwater  outflow equals the lower layer and
groundwater layer soil temperature.

The dissolved oxygen and carbon dioxide  concentrations of the  overland flow are
assumed to  be at  saturation and are  calculated as  direct functions  of water
temperature.   PWTGAS uses the following  empirical nonlinear equation to relate
dissolved  oxygen at  saturation  to water  temperature   (Committee on  Sanitary
Engineering Research 1960):

     SODOX =  (14.652 + SOTMP*(-0.41022 +
             SOTMP*(0.007991 - 0.000077774*SOTMP)))*ELEVGC        (1)
                                       184                             RELEASE 8.0

-------
                                                           Module Section PWTGAS

where:
     SODOX  = concentration of dissolved oxygen in surface outflow in mg/1
     SOTMP  = surface outflow temperature in degrees C
     ELEVGC = correction factor for elevation above sea level
              (ELEVGC is calculated by the Run Interpreter dependent upon
              mean elevation of the segment)

The  empirical  equation  for  dissolved carbon  dioxide  concentration  of   the
overland flow (Harnard and Davis 1943) is:

     SOCO2 = (10**(2385.73/ABSTMP - 14.0184 + 0.0152642*ABSTMP))
                        *0.000316*ELEVGC*12000.0                  (2)

where:
     SOC02  = concentration of dissolved carbon dioxide in
              surface outflow in mg C/l
     ABSTMP = absolute temperature of surface outflow in degrees K

The concentrations of  dissolved oxygen and carbon dioxide in   the interflow  and
the active groundwater flow cannot be assumed  to be at saturation.   Values  for
these concentrations are provided by the user.   He may specify a constant value
or 12 monthly values for the concentration of each of the gases in interflow  and
groundwater.   If monthly  values are provided,  daily variation  in values will
automatically be obtained by linear interpolation between the monthly values.
4,2(1).7  Simulate Quality Constituents Using Simple Relationships with
          Sediment and Water Yield (Section PQUAL of Module PERLND)
Purpose

The PQUAL module  section simulates water quality constituents  or pollutants in
the outflows from a pervious land  segment using simple relationships with water
and/or sediment yield.  Any constituent can be simulated by this module section.
The user supplies the  name,  units and parameter values appropriate  to each of
the constituents that he wishes to simulate.   However, more detailed methods of
simulating sediment, heat, dissolved oxygen, dissolved carbon dioxide, nitrogen,
phosphorus, soluble tracers,  and pesticide removal from a pervious land segment
are available, in other module sections.
Approach

The basic  algorithms used to simulate  quality constituents are a  synthesis of
those used  in the  NFS Model  (Donigian and  Crawford 1976b)   and HSP  QUALITY
(Hydrocomp 1977). However, some options and combinations are unique to HSPF.
                                      185                            RELEASE 8.0

-------
                                                            Module Section PQUAL

Figure 4.2(1).7-1  shows schematically  the fluxes  and storages  represented in
module section  PQUAL.   The occurrence of  a water quality constituent  in both
surface and subsurface outflow can be simulated.   The behavior of a constituent
in surface outflow is  considered more complex and dynamic than  the behavior in
subsurface  flow.   A  constituent on  the surface  can be  affected greatly  by
adhesion  to the  soil  and by  temperature,  light,   wind,   and direct  human
influences.   Section  PQUAL is able to  represent these processes in  a general
fashion.   It allows  quantities in the surface  outflow to be simulated  by two
methods.   One approach  is  to simulate  the  constituent  by association  with
sediment removal.  The other approach is to simulate it using basic accumulation
and depletion rates  together with depletion by washoff;   that is,  constituent
outflow from the surface is a function of  the water flow and the constituent in
storage.   A combination of the two methods  may be used in which the individual
outfluxes are added to obtain the total surface outflow.   These approaches will
be  discussed further  in  the descriptions  of  the corresponding  subroutines.
Concentrations of quality constituents in the  subsurface flows of interflow and
active groundwater are supplied by the user.   The concentration may be linearly
interpolated to obtain daily values from input monthly values.

The user has the useful option of simulating the constituents by any combination
of  these  surface  and  subsurface outflow  pathways.   The  outflux  from  the
combination of the  pathways simulated will be  the total outflow from  the land
segment.   In addition,  the  user is able to select the  units to be associated
with the  fluxes.  These  options give the  user considerable  flexibility.  For
example,   he may  wish  to simulate  coliforms in  units  of organisms/acre  by
association with sediment in the surface runoff and using a concentration in the
groundwater which varies seasonally.  Or he may want to simulate total dissolved
salts in pounds per acre by direct association with overland flow and a constant
concentration in interflow and groundwater flow.

PQUAL allows the user to simulate up to 10 quality constituents at a time.  Each
of the 10 constituents  may be defined as one or a  combination of the following
types:  QUALSD, QUALOF, QUALIF, and/or QUALGW. If a constituent is considered to
be associated with sediment, it is called a QUALSD.  The corresponding terms for
constituents associated with overland flow, interflow,  and groundwater flow are
QUALOF, QUALIF, and QUALGW, respectively. However, no more than seven of any one
of the constituent types (QUALSD, QUALOF, QUALIF, or QUALGW) may be simulated in
one operation.   The program uses a set of  flag pointers to keep track of  these
associations.  For example, QSDFP(3) = 0 means that the third constituent is not
associated with sediment, whereas QSDFP(6)  = 4 means that the sixth constituent
is the fourth  sediment associated constituent  (QUALSD).    Similar flag pointer
arrays are used  to indicate whether or  not a quality constituent  is a QUALOF,
QUALIF, or QUALGW.
                                       186                             RELEASE 8.0

-------
                                 /removal
                                 [by cleaning,
                                 Uecay 4 wind/1
oo
•vj
w
t-1
w
M

00
K
g
M
03
O
accumulation
                                                                                   QUAL. means  auali-t-y
                                                           5CRQ5
                                                          QUM
                                                          associated with
                                                          detached
                                                          sediment
                                                                     PDQUAU
                                                                                           -tot-al
                                                                                          oytflou
                                                                                          of
                                                                                         (associated!
                                         •sediment
                                                          (OQOAL
                                                      outflow
                                                     of QUAL
                                                       with
                                                                                      SOQS
                                                                                              AOQu^Lroutflow
                                                                                                       active
                                                                                                       ground
                                                                                                        water
                                                                                                                      of QUAL
                                                                                                                                           I
                                                                                                                                           81
                                                                                         O
                                                                                         ft
                                                                                         H-
                                                                                         O
                                             Bqure 4,2 (I).7-1 Flow/ dtaqram for PQUAL section of PERLND /^plication

-------
                                                            Module Section PQUAL
4.2(1).7.1  Remove by Association with Sediment
            (subroutine QUALSD)
Purpose

QUALSD  simulates the  removal of  a quality  constituent from  a pervious  land
surface by  association with the sediment  removal determined in  module section
SEDMNT.
Method
This approach assumes  that the particular quality constituent  removed from the
land surface is in proportion to the sediment removal. The relation is specified
with user-input  "potency factors."   Potency factors  indicate the  constituent
strength relative  to the sediment removed  from the surface.    Various quality
constituents such as iron,  lead,  and  strongly adsorbed toxicants are actually
attached  to the  sediment  being removed  from the  land  surface.  Some  other
pollutants such as ammonia, organics, pathogens,  and BOD may not be extensively
adsorbed, but can be considered highly correlated to sediment yield.

For  each  quality constituent  associated  with  sediment,  the  user  supplies
separate potency  factors for association with  washed off and  scoured sediment
(WSSD and SCRSD).   Typically,  the washoff  potency factor would be larger than
the scour potency factor  because washed off sediment is usually  finer than the
scoured material and  thus has a higher adsorption  capacity.   Organic nitrogen
would be  a common example  of such a  constituent.   The  user is also  able  to
supply monthly potency factors for  constituents that vary somewhat consistently
during the year.  For instance, constituents that are associated with spring and
fall fertilization may require such monthly input values.
Removal of the
simulated by:
sediment associated constituent by detached  sediment washoff is
     WASHQS = WSSD*POTFW
                                                   (1)
where:
     WASHQS = flux of quality constituent associated with
              detached sediment washoff in quantity/acre per interval
     WSSD   = washoff of detached sediment in tons/acre per interval
     POTFW  = washoff potency factor in quantity/ton
Removal of constituents by scouring of the soil matrix is similar:

     SCRQS = SCRSD*POTFS

where:
     SCRQS = flux of quality constituent associated with scouring
             of the matrix soil in quantity/acre per interval
                                                   (2)
                                       188
                                                     RELEASE 8.0

-------
                                                            Module Section PQUAL

     SCRSD = scour of matrix soil in tons/acre per interval
     POTPS = scour potency factor in quantity/ton

WASHQS and SCRQS are combined to give  the total sediment associated  flux of  the
constituent from the land segment, SOQS.

The unit "quantity" refers to mass units   (pounds or tons in  the English system)
or some other quantity, such as number of organisms for coliforms.    The unit is
user specified.
4.2(1).7.2  Accumulate and Remove by a Constant Unit Rate and by Overland  Flow
            (subroutine QUALOF)
Purpose

QUALOF simulates the accumulation of a  quality constituent on the pervious  land
surface and its removal by a constant unit rate and by overland flow.
Method

This subroutine  differs from  the others in  module section  PQUAL  in   that  the
storage  of the  quality constituent  on the  land surface  is simulated.     The
constituent can be accumulated and removed by processes which are independent of
storm events such as cleaning, decay, and wind erosion and deposition,  or  it  can
be washed  off by overland  flow.  The accumulation  and removal rates   can have
monthly values to account for seasonal fluctuations.  A pollution indicator such
as  fecal  coliform  from  range  land is  an  example  of  a  constituent with
accumulation and removal rates which may need to vary throughout the year.    The
concentration  of the  coliform in  the surface  runoff may  fluctuate  with   the
seasonal grazing density, and the weather.

When  there is  surface  outflow and  some quality  constituent  is  in   storage,
washoff is simulated using the commonly used relationship:

     SOQO = SQO*(1.0 - EXP(-SURO*WSFAC))                            (3)

where:
     SOQO  = washoff of the quality constituent from the land
             surface in quantity/acre per interval
     SQO   = storage of available quality constituent on the surface
             in quantity/acre
     SURO  = surface outflow of water in in./interval
     WSFAC = susceptibility of the quality constituent to washoff
             in units of 1/in.
     EXP   = Fortran exponential function
                                      189                            RELEASE 8.0

-------
                                                            Module Section PQUAL

The storage is updated once a day  to account for accumulation and removal which
occurs independent of runoff by the equation:

     SQO = ACQOP + SQOSM1.0 - REMQOP)                             (4)

where:
     ACQOP  = accumulation rate of the constituent,
              quantity/acre per day
     SQOS   = SQO at the start of the interval
     REMQOP = unit removal rate of the stored constituent, per day

The Run Interpreter computes REMQOP and WSFAC for this subroutine according  to:

     REMQOP = ACQOP/SQOLIM                                         (5)

where:
     SQOLIM = asymptotic limit for SQO as time approaches infinity
              (quantity/acre), if no washoff occurs
and

     WSFAC = 2.30/WSQOP                                            (6)

where:
     WSQOP = rate of surface runoff which results in a 90 percent
              washoff in one hour, in./hr

Since the unit removal rate of the stored constituent (REMQOP)  is computed  from
two other parameters, it does not have to be supplied by the user.

4.2(1).7.3  Simulate by Association with Interflow Outflow
            (subroutine QUALIF)

Purpose

QUALIF  is  designed  to  permit  the user   to  simulate  the  occurrence  of   a
constituent in interflow.

Method

The user specifies a concentration for each  constituent which is a  QUALIF.    An
option  permits him  to  supply   12 monthly  values,   to  account for   seasonal
fluctuations.  In this case, the  system interpolates a new value each day.

4.2(1).7.4  Simulate by Association with Active Goundwater Outflow
            (subroutine QUALGW)

Purpose

QUALGW  is  designed  to  permit  the user   to  simulate  the  occurrence  of   a
constituent in ground water outflow.

Method

The method is identical to that for QUALIF.

                                      190                            RELEASE 8.0

-------
                                                       Intro to Ag Chem Sections

Introduction to the Agri-chemical Sections


The introduction of agricultural chemicals into streams, lakes,  and groundwater
from agricultural land may be detrimental.   For example, persistent fat  soluble
pesticides,  such as DDT,  have been known to concentrate in the fatty tissue  of
animals  causing toxic  effects.  Nitrogen  and phosphorus  are essential  plant
nutrients  which  when introduced  into  certain  surface waters  will  increase
productivity.    This may  or may  not  be desirable  depending upon  management
objectives.  Significant productivity results in algal blooms, but some increase
in productivity will  increase fish production.  Drinking  water containing high
nitrate concentrations may cause methomoglobinemia in small children.

Pesticide,  nitrogen,   and phosphorus compounds  are important  to agricultural
production, but prediction of their removal from the field is necessary for wise
management of both land and water resources.    HSPF can be used to predict such
outflows.  The agri-chemical  sections of the PERLND module of  HSPF simulate  in
detail nutrient and pesticide processes,  both biological and chemical,   and the
movement of any nonreactive tracer in a  land segment.  These chemicals can also
be simulated in module section PQUAL but in a simplified manner. The dynamic and
continuous processes that  affect the storages and outflow of  pesticides and  of
nutrients from fertilized fields should be  simulated in detail to fully  analyze
agricultural runoff.  If  the situation does not require  full representation  of
these processes,  or if data are not  available,  the PQUAL subroutines could  be
used.

The  basic algorithms  in the  agri-chemical  sections of  HSPF were  originally
developed for use on agricultural lands, but can be used on other pervious  areas
where pesticides and plant nutrients occur, for example, orchards, nursery  land,
parks,  golf  courses,  and  forests.  All pervious  land contains  nitrogen and
phosphorus in  the soil;   it is  possible to  use this  module to  simulate the
behavior of agricultural chemicals in any such area.
Comparison of HSPF and ARM

The methods used  to simulate pesticide processes in  the agri-chemical sections
were developed  orginally for  the Pesticide Transport  and Runoff   (PTR)  Model
(Crawford  and  Donigian 1973),   then  expanded  to  include nutrients  in   the
Agricultural Runoff  Management (ARM)  Model  (Donigian and Crawford  1976)   and
tested and modified in ARM Version II (Donigian, et al. 1977).   In HSPF the  ARM
Version II algorithms  were recreated with some additional  options.    (For more
detail on the basic methods, refer to the above reports.)

The differences  between HSPF  and ARM  Model Version  II should,   however,  be
discussed.    The biggest  difference  is the  availability  of  new options  to
simulate soil nutrient and pesticide adsorption and desorption. Ammonium and
                                      191                            RELEASE 8.0

-------
                                                       Intro to Ag Chem Sections

phosphate adsorption/desorption in HSPF can  be accomplished by using Freundlich
isotherms as well as  by first order kinetics.   Pesticides can  be adsorbed and
desorbed by the two  Freundlich methods used in the ARM Model  or by first order
kinetics.   In addition,  the pesticide parameter  values are now input for each
separate soil layer instead  of inputting one parameter set for  all the layers.
HSPF also allows the user to simulate more than one pesticide in a run. (The ARM
Model only simulates one per run.)  In addition to the percolation factors which
can still be used  to retard any solute leaching from the  upper layer and lower
layer, a multiplication factor has been introduced that can reduce leaching from
the  surface layer.    Also,  in  HSPF,   nitrogen and  phosphorus chemical  and
biochemical transformations  can each  be simulated at  different time  steps  to
save computer time.  Plant uptake of ammonium is another new option in HSPF.

The  topsoil layers  can still  be divided  into  areal blocks   (see the  PWATER
section).  They have been used in the  ARM Model to represent areal variation  in
chemical  concentrations over  the  land surface.   They  divide the  hydrologic
responses and chemical storages in the  surface and upper layers into conceptual
areal zones based  on hydrologic variations.   HSPF  allows the user to  use the
model with from  one to five blocks  (Section 4.2(1).3);  whereas the  ARM Model
uses a  fixed five block  setup.   The capability to  vary the number  of blocks
allows experimentation.  In  some situations a land  segment may not need  to  be
subdivided  into more  than  one block,   resulting  in  substantial savings   in
computer costs.
Units

The fluxes  and storages of  chemicals modeled in  these module  sections   are  in
mass per area units.  The user must supply his input in appropriate units;  kg/ha
if he is using the Metric system, and Ib/ac for the English system.   Internally,
most of the code  does not differentiate between the unit  systems.    Fluxes are
determined  by either  proportionality  constants,   fractions of  chemicals   in
storage,   or  unitless  concentrations.   First order  kinetics  makes   use   of
proportionality  constants  for  determining reaction  fluxes.    Chemicals are
transported  based   on  the   fractions  of   that  in    storage.     Freundlich
adsorption/desorption is based on ppm concentrations.
Module Sections

There are five agri-chemical module sections.    They are  shown  in  the  structure
chart of PERLND  (No. 4.2(1)).   Module section MSTLAY manipulates water storages
and fluxes calculated in module section PWATER.  This section  must  be run  before
the  following sections  can  be run,   since  it  supplies   them with  data   for
simulating the storage and movement of  solutes.   Module  section PEST  simulates
pesticide behavior while NITR and PHOS  simulate the plant nutrients of nitrogen
and phosphorus.   Simulation of a nonreactive solute  (tracer)  is accomplished in
module section TRACER.
                                       192                             RELEASE 8.0

-------
                                                           Module Section MSTLAY
4.2(1).8  Estimate Moisture Content of Soil Layers and Fractional Fluxes
          (Section MSTLAY of Module PERLND)
Purpose

This module section estimates  the storages of moisture in the   four  soil  layers
with which the agricultural chemical sections deal  (Figure 4.2(1).8-1);  and  the
fluxes  of moisture  between  the storages.    MSTLAY  is  required because   the
moisture  storages and  fluxes  computed by  module section  PWATER   can not   be
directly used to simulate solute transport  through the soil.    For example,   in
PWATER,  some moisture which infiltrates can reach  the ground water  in a  single
time step (Figure 4.2(1).3-2).   While this phenomenon does not  have  any serious
effect  in simulating  the  hydrologic  response of  a  land  segment,  it does
seriously affect the simulation of solute transport.

Thus, MSTLAY takes the fluxes and storages computed in PWATER and adapts them to
fit the storage/flow path picture in  Figure 4.2(1).8-1.   The revised storages,
in inches of water,  are also expressed in mass/area units (that is,  Ib/acre or
kg/ha) for use in the adsorption/desorption calculations.
Method

Figure 4.2(1).8-1 schematically  diagrams the moisture storages  and  fluxes  used
in subroutine MSTLAY.    Note that the fluxes  are represented in  terms   of  both
quantity (eg.  IFWI,  in inches/interval)  and as a fraction of  the contributing
storage (eg. FII, as a fraction of UMST/interval)

The reader should also refer to Figure  4.2(1).3-2 in module section  PWATER  when
studying this diagram and the following discussion.

For the  agri-chemical sections the moisture  storages (the variables in Figure
4.2(1).8-1  ending in MST) are calculated by the general equation:

     MST = WSTOR + WFLUX                                            (1 )

The variable  WSTOR is the related  storage calculated in module   section PWATER
(Figure  4.2(1).3-2).   For  example,  in  the  calculation of   the lower layer
moisture storage (LMST),  WSTOR is the  lower zone storage  (LZS).   The variable
WFLUX generally corresponds to the flux of moisture through the  soil  layer.   For
the computation of LMST,   WFLUX is the sum of water  percolating  from the lower
zone to  the inactive (IGWI)   and active  groundwater (AGWI)  as  determined in
section PWATER.   Note  that these equations are  dimensionally  non-homogeneous,
because storages  (inches)  and  fluxes (inches/interval)   are  added together.
Thus, the results given are likely to be highly dependent on the simulation  time
step.   The ARM Model, from which the equations come,  uses a step of 5 minutes.
Extreme  caution  should be  exercised  if  the agricultural  chemical  sections
(including MSTLAY)  are run with any other  time step.   For more  details on the
calculation of the layer moisture storages, the reader should consult the pseudo
code.
                                      193                            RELEASE  8.0

-------
                                               Module Section MSTLAY
surface
                    5MST
                   surface
                    layer
                   storaqe

            percplatinq }
             moisture /
 upper
 layer
                                                    SURO
                                                   surface
                                                   outflow
                         UM5T
                      upper layer
                        principal
                         storaqe
                     \
            percolattnq  )
             moisture y
                                       IFWI
                                      inotcturt
                                transitory
                                storaqe
        13MST
     uaper lay*''
      trflrw\torv
      (interflow)
        «toraqe
                      IFWO
                     interflow
                     outflow
 lower
 layer
 IQWI
moisture
                         LMST
                         lower
                          layer
                         storaqe
s
o
  layer
contains the identifier
for the solute ilux««
which are expressed
aft fraction of contri-
buting ctoraqes
                           S  AGWI  \
                         /moi*tune p«rcolatinq
                         \ to active qround-
                           \  water /       \~
                                     J       I
                                  \.
                         AMST
                         active
                       qroundwater
                         storaqe
 Rqore 4.t (0.8-1
        active
        qround-
        watet-
        fluxes
               diagram of +he -trtmspoH- of pnois+ore \
           o-, estimated in+he  MSTLAY sec-fion office.
           Appl icof ior\  Module .
                              194
                                                              RELEASE 8.0

-------
                                                           Module  Section MSTLAY

The upper layer has been subdivided into two storages, principal and  transitory.
The transitory (interflow) storage is used to  transport  chemicals  from the upper
layer to interflow outflow.   The chemicals in  it do not undergo  any reactions.
However, reactions do occur in the principal storage.

The fluxes shown in Figure 4.2(1).8-1 are the  same as those  in  Figure 4.2(1).3-2
with the exceptions of  SDOWN and UDOWN.   SDOWN encompasses all   the water that
moves downward  from the surface  layer storage.  It  is the combination  of the
water infiltrating from the surface detention  storage directly  to  the lower zone
(INFIL),   the inflow  to the  upper zone  (UZI),   and  the   water flowing  into
interflow storage (IFWI).  UDOWN is all  the water percolating  through the upper
layer.   It  is INFIL plus  the percolation from the  upper  zone storage  to the
lower zone storage (PERC).

Each fractional  solute flux  is the  appropriate moisture   flux divided  by the
contributing storage.  For example, the fraction of chemical in solution that  is
transported  overland from  the  surface layer  storage  (FSO)   is the   surface
moisture outflow (SURO) divided by the surface layer moisture storage (SMST).

The above estimates  are based on the  assumption that the concentration  of the
solute being  transported is  the same as  that in  storage.    They  also assume
uniform flow through the layers and continuous mixing of the solutes.   However,
these assumptions may need to be revised  or implemented differently  for some  of
the transport.  Past testing has shown that  the above method leads to excessive
leaching of  solutes (Donigian,   et al.   1977).   Factors   that  retard  solute
leaching were added in the ARM Model Version II to remedy this  problem.   For the
surface  layer,  the  percolation factor  (SLMPF)  affects   the solute  fraction
percolating (FSP) by the relationship:

     FSP = SLMPF*SDOWN/SMST                                          (2)

The  variables SDOWN  and  SMST  are defined   in Figure 4.2(1).8-1.  FSP  will
typically be between 0 and 1.

For the upper  or lower layer percolating  fraction (FUP,  FLOP,   or   FLP),  the
retardation factor only has an influence when   the ratio of  the respective zonal
storage to the nominal storage times the factor (ZS/(ZSN*LPF))  is  less than one.
The relationship under this condition is:

     F = (ZS/(ZSN*LPF))*(PFLUX/MST)                                  (3)

where:
     F     = layer solute percolating fraction
     ZS    = zonal moisture storage, either UZS or LZS
     ZSN   = zonal nominal moisture storage, either UZSN or  LZSN
     LPF   = factor which retards solute leaching for the layer,
             either ULPF or LLPF
     PFLUX = percolation flux,  either UDOWN, IGWI, or AGWI
     MST   = layer moisture storage, either UMST or LMST
                                      195                            RELEASE  8.0

-------
                                                             Module Section PEST
4.2(1).9  Simulate Pesticide Behavior in Detail
          (Section PEST of Module PERLND)
Purpose

Because of the complexity of pesticide behavior  on the land,  simulation of  the
processes frequently requires considerable detail.   Pesticide applications vary
in amount  and time  during the  year.   Various  pesticides adsorb  and degrade
differently.   Some,   like paraquat,   attach themselves  strongly to  the soil
thereby appearing in  low concentrations in water but in  high concentrations on
soil particles.   Others,  like atrazine,  undergo complex interactions with  the
soil and  are found  in higher concentrations  in the runoff  water than  on  the
eroded sediment.

Section  PEST  models   pesticide  behavior  by  simulating   the  processes  of
degradation and adsorption as well as  transport.   The pesticides are simulated
in the soil and runoff in three forms:   dissolved, adsorbed,  and crystallized.
These phases in the soil affect the forms and amounts in the runoff.
Method

Pesticides are  simulated by  using the  time series  generated by   other  PERLND
module  sections  to transport  and  influence  the adsorption  and  degradation
processes.  Pesticides move with water flow or by association with the  sediment.
They also  may be adsorbed  to the soil  in varing degree  as a function   of  the
chemical characteristics of  the toxicant and the exchange capacity  of the  soil
layer.    Pesticide degradation  occurs to  varying degrees  depending  upon   the
susceptability of the compound to volatilization  and breakdown by light,  heat,
microorganisms and chemical  processes.  The subroutines in  module  section  PEST
consider these transport and reaction processes.

All the subroutines described in this module section except NONSV and DEGRAS  are
accessed  by other  agri-chemical  module sections  because  many  of the  basic
transport and  reaction processes are  similar.   The subroutines  are  described
here because they are physically located  in this subroutine group.   Subroutine
AGRGET is first to be called.   This  subroutine has no computing function;    it
obtains any required time series from the INPAD that is not already  available.

Subroutine SDFRAC  determines the fraction  of the  surface layer soil  that has
eroded.  The amount eroded is the total sediment removed by scour and washoff as
determined in module section SEDMNT.  The mass of soil in  the surface layer  is a
parameter value which does not vary even when material is  removed.   The chemical
which is associated with the sediment is  assumed to be removed from the  surface
layer  storage in  the same  proportion that  the layer  has eroded.   Chemical
removal is simulated  in subroutine SEDMOV.   A sediment   associated chemical is
one that  may be attached  to the eroding  soil or one  which may move  with the
soil.   With pesticides the adsorbed form will be attached to the soil  particle,
while the  crystalline form will  move with the  soil particle being eroded but
will not be attached to it.
                                       196                             RELEASE 8.0

-------
                                                             Module  Section  PEST

Both forms are taken from their  respective surface  layer  storages in  proportion
to the fraction of the surface soil layer removed by overland  flow.

Subroutines TOPMOV and  SUBMOV perform a function similar  to   SEDMOV except  they
move the solutes.  Chemicals in solution move to and from  the  storages according
to the fractions calculated in  section MSTLAY.  Figure  4.2(1).9-1 schematically
illustrates the fluxes  and storages used in these   subroutines.   The fractions
(variables beginning with the  letter "F")  of the storages are   used  to compute
the solute fluxes.    The equations used to compute  the  solute  transport fluxes
from the  fractions and storages  are given  in the  figure.     Subroutine TOPMOV
performs the calculations of the fluxes and the resulting  changes in storage for
the topsoil  layers (surface  and upper),   while SUBMOV  performs them  for the
subsurface layers (lower and active groundwater).

Biological and  chemical reactions  are performed on the  pesticides  (and other
chemicals) in each layer storage. Chemicals in the upper layer principal storage
undergo reactions while those in the transitory (interflow) storage  do not.   The
upper layer transitory storage is a temporary  storage of  chemicals  on their way
to interflow outflow.   Subroutine PSTRXN is called  to perform  reactions on the
pesticide in each layer.
4.2(1).9.5 Perform Reactions on Pesticides (subroutine PSTRXN)

Purpose

This code  simulates the  degradation and  adsorbtion/desorption of   pesticides.
This subroutine is called for each of the four soil layers and  each  pesticide.

Method of Reacting Pesticides

The user  has the option  of adsorbing/desorbing the  pesticide by one   of  three
methods.  The first method is by first order kinetics.  This method  assumes that
the pesticide adsorbs and desorbs at a rate based on the amount in soil  solution
and on  the amount  on the soil  particle.   It makes  use of   a proportionality
constant and is independent of the concentration.    The second method is by use
of the  single value Freundlich  isotherm.   This method  makes use  of   a single
adsorption/desorption curve for determining the concentration on the soil and in
solution.   The  third method is  by use of multiple  curves based on a varying
Freundlich K  value.   Further  details of  these methods  can  be  found in  the
discussion  of the  individual subroutines  that follows  and in  the ARM   Model
reports (Donigian and Crawford 1976; Donigian, et al. 1977).

Degradation is performed  once a day by  subroutine DEGRAS for  each   of  the four
layers that  contain pesticide.    The amount degraded  is determined simply by
multiplying a decay rate parameter specified for  each soil layer by each of the
three forms (adsorbed, solution, and crystalline) of pesticide  in storage.    The
degraded  amounts are  then subtracted  from their  respective  storages.     This
method of simulating degradation lumps complex processes in a simple parameter.
                                      197                            RELEASE  8.0

-------
                                                     Module Section PEST

                                                 SOCKA-SSCM*F50
      USCM* FUP
>P*SI

SSCM
dissolved
chemical in
surface
storaqe
?CKA
/percolatiorX
'to upper Uy»r\
principal /
v storaae /
'UPC
\

USCM
dissolved chent
in upper layer
principal
storaqe
:M
chemical
in
surface
outflow
\y
UCM=USCM*Fll 15CM1
transfer
from prin-
cipalto
tromJtwy I6CM
\s1oraqey dissolved chem.
X / in upper layer
T^ . . . . •. trnnsitorv
( interflow)


frFIOMOCM
chemical
in
interflow

                   rcobtionX
                   to lower  V
                    layer    )\
                   SToraqe /
t
                         L5CM
                       dissolved
                      chemical in
                      lower layer
8
|
I
U5GM-* FLDP-LOPCM
                           LPCM*L5CM*FLP

                            percolation
                            to active
                             qround-
                             water
                             storooe
   ASCM
  in active
qroundwoter
   s'toracje.
chemica
in active
ground-
 water
outflow
                 /peroolationtt
                   divjeqrt
                    wat«t*
        Ficjure 4.Z.O Yq-l  Flow diaqram showing modeled movement
                         of chemicals in solution
                                  198
                                                   RELEASE 8.0

-------
                                                             Module Section PEST
4.2(1).9.5.1  Adsorb/Desorb Using First Order Kinetics
              (subroutine FIRORD)
Purpose

The purpose  of this subroutine  is to  calculate the adsorption  and desorption
reaction fluxes of  chemicals using temperature dependent  first order kinetics.
These fluxes  are calculated  every simulation interval  when the  subroutine  is
called by section PEST,  but they are determined only at the designated chemical
reaction frequency when called by sections NITR and PHOS.
Method

The calculation  of adsorption  and desorption  reaction fluxes  by first  order
kinetics for soil layer temperatures less than 35 degrees C takes the form:

      DBS = CMAD*KDS*THKDS**(TMP-35.0)                                    (1)

      ADS = CMSU*KAD*THKAD**(TMP-35.0)                                    (2)

where:
     DBS   = current desorption flux of chemical in mass/area per interval
     CMAD  = storage of adsorbed chemical in mass/area
     KDS   = first order desorption rate parameter, per interval
     THKDS = temperature correction parameter for desorption
     TMP   = soil layer temperature in degrees C
     ADS   = current adsorption flux of chemical in mass/area per interval
     CMSU  = storage of chemical in solution in mass/area
     KAD   = first order adsorption rate parameter, per interval
     THKAD = temperature correction parameter for adsorption
     THKDS and THKAD are typically about 1.06

All of the variables except the temperature coefficients may vary with the layer
of the soil being simulated.  The soil temperatures are time series which may be
input (eg.   using field  data)  or  simulated in  module section  PSTEMP.   The
temperature correction of the reaction rate  parameter is based on the Arrhenius
equation. At temperatures of 35 degrees C or above no correction is made.   When
the  temperature is  at 0  degrees C  or below  or the  soil layer  is dry,   no
adsorption and desorption occurs.

The storage of the solution chemical is updated every simulation interval in the
calling subroutine, that is, in PSTRXN, NITRXN,  or PHORXN,  by adding DBS minus
ADS.  Likewise,  the storage  of the adsorbed chemical is updated  there also by
adding ADS minus DBS.   An adjustment is made in the calling subroutine,  if any
of the fluxes would cause a storage to go negative.  When this happens a warning
message is produced  and  fluxes are adjusted so that no  storage goes negative.
This usually occurs when large time steps  are used in conjuction with large KAD
and KDS values.
                                      199                            RELEASE 8.0

-------
                                                             Module Section PEST
4.2(1).9.5.2  Adsorb/Desorb Using the Single Value Freundlich Method
              (subroutine SV)
Purpose

Subroutine SV  calculates the  adsorption and desorption  and the  resulting  new
storages of a chemical using the single value Freundlich method.
Method

The  Freundlich  isotherm   methods,   unlike  first  order   kinetics,    assume
instantaneous equilibrium.   That is,  no matter how much chemical is  added  to  a
particular phase,  equilibrium is assumed to be established between  the  solution
and adsorbed  phase of the  chemical.   These methods  also assume that   for any
given  amount of  chemical in  the soil,   the equilibrium  distribution of   the
chemical between the soil solution and on the soil particle can be found from an
isotherm.  Figure 4.2(1).9-2 illustrates such an isotherm.

Three phases of the chemical are actually possible;  crystalline, adsorbed,   and
solution.  The crystalline form is assumed to  occur only when the soil  layer is
dry,  or when there is more chemical in  the layer than  the combined capacity to
adsorb  and hold  in solution.   When  the soil  is  dry,  all  the  chemical is
considered to be crystalline salt. When there is more total chemical in  the  soil
layer than the the soil adsoption sites can contain and  more  than that saturated
in  solution,  then  the  chemical content  which  exceeds  these capacities is
considered to be  crystalline salt.   Module section  PEST considers crystalline
phase storage,  but in module sections NITR  and PHOS this is not so.    Instead,
any crystalline phosphate or  ammonium predicted by an isotherm is   added to the
adsorbed phase storage.

The  adsorbed  and solution  phases  of  the  chemical   are determined  in  this
subroutine by the standard  Freundlich equation as plotted by curve  1 in Figure
4.2(1).9-2.   When the amount of chemical is  less than  the capacity of  the  soil
particle lattice to permanently bind the chemical  (XFIX),  then all  the  material
is consider fixed.  All the fixed chemical is contained  in the adsorbed  phase of
the layer storage.  Otherwise,   the Freundlich equation for  curve 1  is used to
determine  the partitioning  of  the chemical  into  the adsorbed and  solution
phases:

     X = KF1*C**(1/N1) + XFIX                                            (3)

where:
     X    = chemical adsorbed on soil, in ppm of soil
     KF1  = single value Freundlich K coefficient
     C    = equilibrium chemical concentration in  solution,
            in ppm of solution
     N1   = single value Freundlich exponent
     XFIX = chemical which is permanently fixed, in ppm  of soil

The above equation is solved in subroutine ITER by an iteration technique.   The
parameters used in the computation can differ for  each layer  of the  soil.


                                      200                            RELEASE 8.0

-------
                                              Module  Section PEST
      X, ppm
                                                   CM AY
                                   C,ppm
Flqwr* 4-.l(l).q-Z  FVeundlicn Isotherm Calculation* X
                 chtmicol adsorbed on ttw soil and  C i5
                 chemical in «oluilon.
                            201
RELEASE 8.0

-------
                                                             Module Section PEST
4.2(1).9.5.3  Adsorb/Desorb Using the Non-single Value Preundlich Method
              (subroutine NONSV)
Purpose

The purpose  of this subroutine is  to calculate the adsorption/desorption  of a
chemical by the nonsingle value Preundlich method.   The single value Freundlich
method  was found  to inadequately  represent  the division  of some  pesticides
between the soil particle and solution phases,   so this method was developed as
an option in  the ARM Model (Donigian  and Crawford 1976).   This  subroutine is
only available for use by the PEST module section.
Method

The approach  in this code  uses the same  algorithms and solution  technique  as
subroutine SV for determining curve 1 in Figure 4.2(1).9-2.  However, curve  1  is
used solely for adsorption. That is, only when the concentration of the adsorbed
chemical is increasing.  When desorption occurs a new curve  (curve 2) is  used:

      X = KF2*C**(1/N2) + XFIX                                           (4)

      KF2 = (KF1/XDIF)**(N1/N2) * XDIF                                   (5)

where:
     KF2  - nonsingle value Freundlich coefficient
     N2   = nonsingle value Freundlich exponent parameter
     XDIF = XJCT - XFIX
     XJCT = the adsorbed concentration where curve 1 joins curve 2
            (ie. where desorption started)
            as shown in Figure 4.2(1).9-2, in ppm of soil

The other variables are as defined for subroutine SV.

Once  curve 2  is used,   both desorption  and  adsorption follow  it until   the
adsorbed concentration is less  than or equal to XFIX or  until it reaches XJCT.
Then,   adsorption will  again take  place  following curve  1 until  desorption
reoccurs, following a newly calculated curve 2.   The solution of the Freundlich
equations for curves 1 and 2 utilizes the same iteration technique introduced in
subroutine SV (subroutine ITER).
                                       202                             RELEASE 8.0

-------
                                                             Module Section NITR
4.2(1).10  Simulate Nitrogen Behavior in Detail
           (section NITR of module PERLND)
Purpose

NITR, like section PEST, simulates the behavior of chemicals in the soil profile
of  a land  segment.   Section NITR  handles the  nitrogen  species of  nitrate,
ammonia, and organic nitrogen.   This involves simulating nitrogen transport  and
soil reactions.   Nitrogen,  like phosphorus,  may be a limiting nutrient  in  the
eutrophication process in lakes and streams. Nitrates in high concentrations  may
also pose a health hazard to infants.
Method of Simulating Nitrogen

Nitrogen species  are transported  by the  same methods  used for  the pesticide
forms.  The subroutines that are called to transport nitrogen are  located  in  and
described with the PEST module section.   Organic nitrogen and adsorbed ammonium
are  removed  from  the  surface layer  storage  by  association   with  sediment
(subroutines SDFRAC  and SEDMOV).   Nitrate and  ammonium in the soil  water  are
transported using the simulation subroutines TOPMOV and SUBMOV.

Nitrogen reactions are  simulated separately for each of the  soil layers.    The
method is discussed below.
4.2(1).10.1 Perform Reactions on Nitrogen Forms  (subroutine NITRXN)
Purpose

The  purpose of  NITRXN  is to  simulate  soil  nitrogen transformations.    This
includes plant uptake of nitrate and  ammonium,  denitrification or reduction  of
nitrate-nitrite, immobilization of nitrate-nitrite and ammonium,  mineralization
of organic nitrogen, and the adsorption/desorption of ammonium.


Method of Nitrogen Transformations

Nitrogen reactions can be divided between those  that are chemical in nature and
those  that  are a  combination  of  chemical  and biological  reactions.    The
adsorption and desorption of ammomium is a  chemical process.   The user has the
option of simulating ammonium adsorption and  desorption by first order kinetics
with subroutine FIRORD or by the  Freundlich isotherm method with subroutine SV.
These subroutines are described in the PEST module section.

The user has  the option of specifying  how often the adsorption  and desorption
rates are calculated,  when adsorption/desorption is simulated by the Freundlich
method,   the  solution  and  adsorbed   storages  of  ammonium  are  determined
instantaneously at the specified frequency of reaction.  However, when the  first
order method is used, the temperature corrected reaction
                                      203                            RELEASE  8.0

-------
                                                             Module Section NITR

fluxes (Figure 4.2(1).10-1) are recomputed intermittently,  but the storages are
updated every simulation interval.

The   other   reactions  are   a   combination   of  biological   and   chemical
transformations.    They are  accomplished by  first order  kinetics only.   The
optimum first  order kinetic rate parameter  is corrected for  soil temperatures
below 35 degrees C by the generalized equation:

     KK = K*TH**(TMP-35.0)                                                (1)

where:
     KK  = temperature corrected first order transformation rate
           in units of per simulation interval
     K   ~ optimum first order reaction rate parameter
     TH  = temperature coefficient for reaction rate correction
           (typically about 1.06)
     TMP = soil layer temperature in degrees C

When temperatures are greater than 35 degrees C, the rate is considered optimum,
that is, KK is set equal to K. When the temperature of the soil layer is  below  4
degrees C or the layer is dry, no biochemical transformations occur.

Identifiers with a  leading "K" (eg.  KDNI)   are the optimum rates;   those for
corrected rates have both a leading and trailing "K" (eg. KDNIK).

The corrected reaction rate parameters are determined every biochemical reaction
interval  and  multiplied  by  the  respective   storages  as  shown  in   Figure
4.2(1).10-1 to obtain  the reaction fluxes.   Plant uptake can  vary monthly and
can be  distributed between nitrate  and ammonium  by the parameters  N03UTF and
NH4UTF.  These parameters are intended to designate the fraction of plant uptake
from each species of N; the sum of N03UTF and NH4UTF should be 1.0.

The first order  reaction rate fluxes that  are shown in Figure  4.2(1).10-1 are
coupled, that is, added to and subtracted from the storages simultaneously.  The
coupling of the fluxes  is efficient in use of computer time  but has a tendency
to produce unrealistic negative storages when large reaction intervals and large
reaction rates are used jointly.  A method has been introduced which will modify
the reaction fluxes  so that they do  not produce negative storages.   A  warning
message is issued when this modification occurs.
4.2(1).11  Simulate Phosphorous Behavior in Detail
           (Section PHOS of Module PERLND)
Purpose

Module section  PHOS  simulates   the behavior   of phosphorus   in  a   pervious land
segment.     This     involves    modeling    the    transport,     plant   uptake,
adsorption/desorption,  immobilization,  and  mineralization of the  various forms
of phosphorus. Because  phosphorus is   readily tied  to  soil and  sediment,   it is
                                       204                             RELEASE 8.0

-------
                                                   Module Section NITR
                      to
                  atmosphere
M03*KDWK* DEMI
            denitri fi-
            cation
                            PLTN
                            plant
                          nitrogen
                                N03UTF* M03* *CPLNK« UTN1
              AMSU*KNIK»NITRF
                                    NO3
                                   nitrate
                                    (plus
                                   nitrite)
   immobiH-
                       I nitrification
 \  nitrate
            AMSU*KIMAMK« IMMAM
                      immobi
                      lizotlon
                        of
                      ammonium
          OR6N
         orqonic
         nitroq*n
                      mmerol
                        of
                      orqanic
                      mtroqen
                  plant
                uptake of
                  nttrate
        /"plant \
       / uptake of  1
       \ ammonium  /
  AMSU
ammonium
    in
 solution
ammonium
                    « AM AD* KDSAMK
                           or
                        sinqle value
                        Freundlfch
                        method
                        (instantaneous)
                                               ammonium
              AMAD
            ammonium
             adsorbed
                                                A05AM* AMSU* KADAMK
                                                            or
                                                       5inqle value
                                                       Freundlich
                                                       method
                                                       (instantaneous^
        Fiqur« 4.2(0.10-1 Flow diaqram for nitroqen  reactions
                                  205
                         RELEASE 8.0

-------
                                                             Module Section PHOS

usually scarce in streams and lakes.  In fact,  in many cases it is the limiting
nutrient  in the  eutrophication  process.   Because  of  its scarcity  accurate
simulation is particularly important.

Method of Simulating Phosphorus

The method used to  transport and react phosphorus is the same  as that used  for
nitrogen in module section NITR.   The  subroutines used to transport phosphorus
are described in module section PEST.  Organic phosphorus and adsorbed phosphate
are removed  on or  with sediment  by calling  subroutine SEDMOV.   Phosphate in
solution is transported in the moving water using subroutines TOPMOV and SUBMOV.
Phosphorus reaction is simulated in the soil by subroutine PHORXN.

In subroutine PHORXN,  phosphate is adsorbed  and desorbed by either first order
kinetics  or by  the  Freundlich method.   The mechanics  of  these methods   are
described  in  module  section  PEST.    As  with  the  simulation  of  ammonium
adsorption/desorption, the frequency of this chemical reaction for phosphate  can
also  be specified.    Unlike ammonium,   typically phosphate  includes a  large
portion which is not attached to the soil particle but is combined with cations.
This is because phosphate is much less soluble with the ions found in soils than
ammonium.

Other  reactions   performed  by   subroutine  PHORXN   include  mineralization,
immobilization,  and  plant uptake.   These  are accomplished  using temperature
dependent first order kinetics; the same method used for the nitrogen reactions.
The general  description of  this process  is in  module section  NITR.   Figure
4.2(1).11-1 shows  the parameters and equations  used to calculate  the reaction
fluxes for phosphorus.  Reactions are simulated for each of the four soil layers
using separate parameter sets for each layer.  As with nitrogen, the biochemical
phosphate reaction fluxes of mineralization,   immobilization,  and plant uptake
can  be determined  at  an  interval less  frequent  than  the basic  simulation
interval.
4.2(1). 12 Simulate Movement of a Tracer  (Section TRACER of Module PERLND)

Purpose

The purpose of this  code is to simulate the movement  of any nonreactive  tracer
(conservative)  in a  pervious land segment.  Chloride,  bromide,    and  dyes  are
commonly used tracers  which can be simulated by section  TRACER.    Also,   total
dissolved salts could possibly be modeled by this section.  Typically, this code
is applied  to chloride to calibrate  solute movement  through the   soil  profile.
This involves  adjustment of  the percolation  retardation factors   (see section
MSTLAY)  until  good agreement  with observed  chloride concentrations   has been
obtained.   Once these factors have been  calibrated,  they are used to  simulate
the transport of other solutes, such as nitrate.
                                        206                          RELEASE 8.0

-------
                                                     Module Section PHOS
                                    PtTP
                                   plant
                                 phocphoru*
    IMW!P4>P45U*K.IMPK.  /  plant
                         I uptake of
   ORGP
  organic
phosphorus
  P4A.D
phosphott
 adsorbed
                                        AD5P4= P45U* KADPK
                                                   or
                                                i¥*undKcri method
                                                (instfnfaneous)
       Rqure 4.i(l).ll-| Flow diagram for phosphoniA reactions
                                  207
  RELEASE 8.0

-------
Method of Simulating Tracer Transport

Tracer simulation uses the agri-chemical solute transport subroutines TOPMOV and
SUBMOV which are described in section PEST.  No reactions are modeled.
                                      208                         RELEASE 8.0

-------
                                                                   Module  IMPLND

4.2(2)  Simulate an Impervious Land Segment  (Module IMPLND)
In an impervious land segment, little or no infiltration occurs.    However,  land
surface  processes  do occur  as  illustrated  in  Figure 4.2(2)-1.     Snow   may
accumulate and melt,  and water may be  stored or may evaporate.    Various water
quality constituents accumulate and are  removed.   Water,  solids,  and  various
pollutants flow from the segments by moving  laterally to a downslope  segment or
to a reach/reservoir.

Module IMPLND  simulates these  processes.   The  sections of   IMPLND  and their
functions are given in Structure Chart 4.2(2)  (Part D).  They  are  executed  from
left to right.   Many  of them are similar to the  corresponding sections in the
PERLND module.   In fact,  since sections  SNOW and ATEMP perform functions  that
can be  applied to  pervious or impervious  segments,  they  are shared  by  both
modules.  IWATER is analogous to PWATER in module PERLND; SOLIDS is analogous to
SEDMNT;   IWTGAS is  analogous  to PWTGAS;   and IQUAL  is  analogous  to  PQUAL.
However,  the  IMPLND sections  are simpler since  they contain no infiltration
function and  consequently no  subsurface flows.    IPTOT,  IBAROT,    and IPRINT
service the IMPLND module similarly to the corresponding code in PERLND.
4.2(2).3  Simulate the Water Budget for an Impervious Land Segment
          (Section IWATER of Module IMPLND)
Purpose

Section IWATER simulates the retention,  routing,  and evaporation of water  from
an impervious land segment.
Method

Section IWATER  is similar  to section  PWATER of  the PERLND  module.   However,
IWATER  is  simpler  because  there  is  no  infiltration  and  consequently   no
subsurface processes.   IWATER  -is composed of the parent  subroutine plus  three
subordinate subroutines:  RETN, IROUTE, and EVRETN.  RETN is analogous  to ICEPT,
IROUTE is  analogous to  PROUTE,  and EVRETN  is analogous  to EVICEP   in module
section  PWATER.   The  time series  requirements are  the same  as for section
PWATER.

Figure 4.2(2).3-1 schematically represents the  fluxes and storages simulated  in
module section IWATER.  Moisture (SUPY)  is supplied by precipitation,   or  under
snow conditions, it is supplied by the rain not falling on the snowpack plus the
water  yielded by  the snowpack.    This  moisture is  available for  retention;
subroutine RETN performs the retention functions. Lateral surface inflow (SURLI)
may also  be retained  if the user  so specifies by  setting the  flag  parameter
RTLIFG=1. Otherwise, retention inflow (RETI) equal SUPY.
                                      209                            RELEASE  8.0

-------
                                                    Module  Section  IMPLND
Precipitation
                                                             Plunoff, Solids, Water
                                                             Quality Constituents
       Figure  4.2(2)-l   Inpervious  land segment processes
                                210
RELEASE 8.0

-------
                                            Module Section IMPLND
SURLi
lateral
                       RE-TI
                       retention
                               RETS
                               impervipos
                               reterrtion
                               surface
                               de+emrtion
                 -I  Hydro logica
                            211
RELEASE 8.0

-------
                                                           Module Section IWATER

Moisture exceeding the retention capacity overflows the storage and is available
for runoff.

The retention capacity, defined by the parameter RETSC, can be used to designate
any retention of moisture which does not  reach the overland flow plane.   RETSC
may be used to represent roof top catchments, asphalt wetting, urban vegetation,
improper drainage,  or any other containment of  water that will never flow  from
the land segment.  The user may supply the retention capacity on a monthly basis
to account for seasonal variations,  or may supply one value designating a fixed
capacity.

Water held in retention storage is  removed by evaporation (IMPEV).   The amount
evaporated is  determined in  subroutine EVRETN.    Potential evaporation  is an
input time series.

Retention outflow  (RETO)  is  combined with  any lateral  inflow when  RTLIFG=0
producing the total inflow to the  detention storage (SURI).  Water remaining in
the detention storage  plus any inflow is considered the  moisture supply.   The
moisture supply is routed from the land surface in subroutine IROUTE.
4.2(2).3.2  Determine How Much of the Moisture Supply Runs Off
            (subroutine IROUTE)
Purpose

The purpose of subroutine IROUTE is to determine how much of the moisture  supply
runs off the impervious surface in one simulation interval.
Method of Routing

A method  similar to  that used  in module  PERLND  (Section   4.2(1).3.2.1.3)   is
employed to route overland flow.
4.2(2).4  Simulate Accumulation and Removal of Solids  (Section SOLIDS  of
          Module IMPLND)
Purpose

Module section SOLIDS simulates  the accumulation  and  removal  of  solids by runoff
and other means  from the impervious  land   segment.    The  solids outflow  may be
used  in  section   IQUAL  to   simulate  quality   constituents   associated  with
particulates.
                                       212                             RELEASE 8.0

-------
                                                           Module Section  SOLIDS

Method

The equations used in this section are based on those in  the NFS Model  (Donigian
and Crawford 1976b).   Figure 4.2(2).4-1  schmatically represents the fluxes  and
storages simulated by section SOLIDS.   Lateral input of  solids by water flow is
a user  designated option which  is unique to HSPF.    Washoff of solids   may be
simulated by one of two ways.   One subroutine  is similar to the method used in
the NFS Model. However, this method is dimensionally nonhomogeneous.  That is,  a
flux and a storage  are added making the answer more  interval dependent.   This
technique has  only been used with  15-min intervals.   The other  subroutine is
dimensionally  homogenous,  since  only a  flux term  is  used  in the   solution.
However, this method has not been tested.

The accumulation and removal of solids which occurs independently of runoff (eg.
by atmospheric fallout, street cleaning) is handled in subroutine ACCUM.
4.2(2).4.1 Washoff Solids Using Method 1
           (subroutine SOSLD1)
Purpose

Subroutines SOSLD1  and SOSLD2 perform the  same task but by  different  methods.
They simulate the washoff of solids from an impervious land segment.


Method

When simulating the  washoff of solids,  the transport capacity  of the  overland
flow is estimated and compared to the amount of solids available.  The transport
capacity is calculated by the equation:

     STCAP = DELT60*KEIM*((SURS + SURO)/DELT60)**JEIM                 (1)

where:
     STCAP  = capacity for removing solids in
              tons/acre per interval
     DELT60 = hours per interval
     KEIM   = coefficient for transport of solids
     SURS   = surface water storage in inches
     SURO   = surface outflow of water in in./interval
     JEIM   = exponent for transport of solids
When  STCAP is  greater  than  the amount  of  solids  in storage,   washoff  is
calculated by:

     SOSLD = SLDS*SURO/(SURS + SURO)                                 (2)

If  the storage  is  sufficient to  fulfill the  transport  capacity,  then  the
following relationship is used:
                                      213                            RELEASE 8.0

-------
                                            Module Section SOLIDS
           'removal   \
                   .  /
5LSLD
     of
                     solids

                     storage
        figure 4.zc^).'
-------
                                                           Module Section SOLIDS

     SOSLD = STCAP*SURO/(SURS + SURO)                                 (3)

where:
     SOSLD = washoff of solids in tons/acre per interval
     SLDS  = solids storage in tons/acre

SOSLD is then subtracted from SLDS.

Subroutine  SOSLD1  differs  from  SOSLD2 in  that  it  uses   the  dimensionally
nonhomogeneous term (SURS  + SURO)/DELT60 in the above  equations,  while SOSLD2
uses the homogeneous term SURO/DELT60.
4.2(2).4.2  Washoff Solids Using Method 2
            (subroutine SOSLD2)
Purpose

The purpose  of this  subroutine is  the same  as SOSLD1.   They only  differ  in
method.
Method of Determining Removal

This  method  of determining  sediment  removal  has  not been   tested.    Unlike
subroutine  SOSLD1,   it  makes  use   of  the  dimensionally  homogeneous   term
SURO/DELT60 instead of (SURO+SURS)/DELT60 in the following equation.

     STCAP = DELT60*KEIM*(SURO/DELT60)**JEIM                          (4)

When STCAP is more than the amount of solids in storage, the flow washes off  all
of the solids storage  (SLDS).  However,  when STCAP is less  than  the amount of
solids in storage,  the  situation is transport limiting,  so SOSLD   is equal to
STCAP.
4.2(2).4.3  Accumulate and Remove Solids Independently of Runoff
            (subroutine ACCUM)
Purpose

Subroutine ACCUM simulates the accumulation  and removal of solids independently
of runoff; for example, atmospheric fallout and street cleaning.
Method

The storage  is updated once  a day,  on those  days when precipitation  did not
occur during the previous day, using the equation:


                                      215                            RELEASE 8.0

-------
                                                           Module Section SOLIDS

     SLDS = ACCSDP + SLDSS*(1.0 - REMSDP)                             (5)

where:
     ACCSDP = accumulation rate of the solids storage,
              tons/acre per day
     SLDS   = solids in storage at end of day in tons/acre
     SLDSS  = solids in storage at start of day in tons/acre
     REMSDP = unit removal rate of solids in storage
              (i.e. fraction removed per day)

ACCSDP  and REMSDP  may be  input on  a monthly  basis to  account for  seasonal
variations.

Note that,  if  no runoff occurs,  equation  5 will cause the  solids storage  to
asymptotically approach a limiting value.   The limit, found by setting SLDS and
SLDSS to the same value (SLDSL), is:

     SLDSL = ACCSDP/REMSDP                                            (6)
4.2(2).5  Estimate Water Temperature and Dissolved Gas Concentrations
          (Section IWTGAS of Module IMPLND)

Purpose

IWTGAS estimates  the water temperature  and concentrations of  dissolved  oxygen
and carbon dioxide in the outflow from the impervious land segment.

Method

Outflow temperature is estimated by the following regression equation:

     SOTMP = AWTF + BWTF*AIRTC                                        (1 )

where:
     SOTMP = impervious surface runoff temperature in degrees C
     AWTF  = Y-intercept
     BWTF  = slope
     AIRTC = air temperature in degrees C

The parameters  AWTF and BWTF  may be input on  a monthly basis.   When  snowmelt
contributes to the outflow, SOTMP is set equal  to 0.5.

The dissolved oxygen and carbon dioxide  concentrations  of the overland  flow are
assumed to  be at  saturation and are  calculated as  direct functions  of water
temperature.   IWTGAS uses the following  empirical nonlinear equation to  relate
dissolved  oxygen at  saturation  to water  temperature   (Committee  on  Sanitary
Engineering Research 1960):

     SODOX «  (14.652 + SOTMP*(-0.41022 +
             SOTMP*(0.007991 - 0.000077774*SOTMP)))*ELEVGC            (2)

where:

                                      216                             RELEASE 8.0

-------
                                                           Module Section IWTGAS

     SODOX  = concentration of dissolved oxygen in surface outflow in mg/1
     SOTMP  = surface outflow temperature in degrees C
     ELEVGC = correction factor for elevation above sea level
              (ELEVGC is calculated by the Run Interpreter dependent
              upon mean elevation of the segment)

The  empirical  equation  for  dissolved carbon  dioxide  concentration  of   the
overland flow (Harnard and Davis 1943) is:

     SOC02 = (10**(2385.73/ABSTMP - 14.0184 + 0.0152642*ABSTMP))
                       *0.000316*ELEVGC*12000.0                      (3)

where:
     SOCO2  = concentration of dissolved carbon dioxide in
              surface outflow in mg C/l
     ABSTMP = absolute temperature of surface outflow in degrees K
4.2(2).6  Simulate Washoff of Quality Constituents Using Simple Relationships
          with Solids and Water Yield (Section IQUAL of Module IMPLND)
Purpose

The IQUAL module  section simulates water quality constituents  or pollutants in
the outflows  from an  impervious land segment  using simple  relationships with
water yield  and/or solids.   Any  constituent can  be simulated by  this module
section.   The user supplies the name, units and parameter values appropriate to
each of the constituents  that he wishes to simulate.   Note  that more detailed
methods of  simulating solids,  heat,   dissolved oxygen,  and  dissolved carbon
dioxide removal from the impervious land segment are available in other sections
of IMPLND.
Approach

The basic  algorithms used to simulate  quality constituents are a  synthesis of
those used  in the  NFS Model  (Donigian and  Crawford 1976b)   and HSP  QUALITY
(Hydrocomp 1977). However, some options and combinations are unique to HSPF.

Figure 4.2(2).6-1  shows schematically  the fluxes  and storages  represented in
module section  IQUAL.  A quality constituent  may be simulated by  two methods.
One approach is to simulate the  constituent by association with solids removal.
The other approach is  to simulate it by using basic  accumulation and depletion
rates together with depletion by washoff;  that is, constituent outflow from the
surface is  a function  of the water  flow and the  constituent in  storage.   A
combination of the two methods may be used in which the individual outfluxes are
added to obtain the total surface  outflow.   These approaches will be discussed
further in the descriptions of the corresponding subroutines.
                                      217                            RELEASE 8.0

-------
                                             Module Section  IQUAL
      A
I removal
>y cleaning,
decay, wind,
             (acc
accumulation
           V
        SQO
   storage of QUAL
   on surface for
   direct washoff
     by  overland
        flow
     storage of
      QUAL
     associated
    with  solids
             direct
           washoff of
           QUAL by
           overland
             flow
                          washoff
                         of QUAL
                         associated
                           with
                                                         SOQUAL
                                                          total
                                                        washoff
                                                        outflow of
                                                         QUAL.
Figure  4.2(2).6-1  Flow  diagram tor  IQUAL  section  of  IMPLND
                 Application  Module
                             218
                                                        RELEASE 8.0

-------
                                                            Module Section  IQUAL

IQUAL allows the user to simulate up to 10 quality constituents at a time.   If a
constituent is considered to be associated with  solids,  it is called a QUALSD.
The-corresponding term  for constituents associated directly  with overland  flow
is QUALOF.   Each of the 10 constituents may  be defined as either a QUALSD  or a
QUALOF or both.  However, no more than seven of any one of the constituent  types
(QUALSD or QUALOF) may be simulated in one operation.  The program uses a set of
flag pointers  to keep track of  these associations.   For  example,  QSDFP(3)=0
means  that  the third  constituent  is  not  associated with  solids,   whereas
QSDFP(6)=4 means  that the  sixth constituent  is the  fourth solids  associated
constituent (QUALSD).   Similar flag pointer arrays are used to indicate whether
or not a quality constituent is a QUALOF.

4.2(2).6.1 Remove by Association with Solids
           (subroutine WASHSD)

Purpose

WASHSD simulates the  removal of a quality constituent from  the impervious  land
surface by  association with  the solids  removal determined  in module  section
SOLIDS.

Method

This approach assumes  that the particular quality constituent  removed from the
land surface is in proportion to the  solids removal.  The relation is specified
by  user-input "potency  factors."   Potency  factors indicate  the  constituent
strength relative  to the  solids removal  from the  surface.  For  each quality
constituent associated with solids,  the user supplies separate potency factors.
The user is  also able to supply  monthly potency factors for  constituents  that
vary somewhat consistently throughout the year.

Removal of the solids associated constituent by solids washoff is simulated  by:

     SOQS = SOSLD*POTFW                                              (1)

where:
     SOQS  = flux of quality constituent associated with
             solids washoff in quantity/acre per interval
     SOSLD = washoff of detached solids in tons/acre per interval
     POTFW = washoff potency factor in quantity/ton

The unit "quantity" refers to mass units  (pounds or tons in the English system)
or some other  quantity,  such as number  of organisms for coliforms.   The  user
specifies the units of "quantity".

4.2(2).6.2  Accumulate and Remove by a Constant Unit Rate and by Overland Flow
            (subroutine WASHOP)

Purpose

WASHOF simulates  the accumulation  of a quality  constituent on  the impervious
land surface and its removal by a constant unit rate and by overland flow.
                                      219                            RELEASE 8.0

-------
                                                            Module Section  IQUAL

Method

This  subroutine differs  from  subroutine WASHSD  in that  the  storage of  the
quality constituent is simulated.  The stored constituent can be accumulated  and
removed by processes  which are independent of storm events,   such as cleaning,
decay,  and  wind deposition,   and it  is washed  off by  overland flow.     The
accumulation and removal  rates can have monthly values to  account for seasonal
fluctuations.

When there is  surface outflow and some  quality constituent is in  storage then
washoff is simulated using the commonly used relationship:

     SOQO = SQO*(1.0 - EXP(-SURO*WSFAC))                              (2)

where:
     SOQO  = washoff of the quality constituent from the land
             surface in quantity/acre per interval
     SQO   = storage of the quality constituent on the surface
             in quantity/acre
     SURO  = surface outflow of water in in./interval
     WSFAC * susceptibility of the quality constituent to washoff
             in units of 1/i.nch
     EXP   = Fortran exponential function

The storage is updated once a day  to account for accumulation and removal  which
occurs independent of runoff by the equation:

     SQO - ACQOP + SQOSM1.0 - REMQOP)                                (3)

where:
     ACQOP  = accumulation rate of the constituent,
              quantity/acre per day
     SQOS   = SQO at the start of the interval
     REMQOP = unit removal rate of the stored constituent,
              per day

The Run Interpreter computes REMQOP and WSFAC for this subroutine according to:

     REMQOP = ACQOP/SQOLIM                                            (4)

where:
     SQOLIM = asymptotic limit for SQO as time approaches
              infinity, (quantity/acre), if no washoff occurs

and

     WSFAC = 2.30/WSQOP                                               (5)

where:
     WSQOP = rate of surface runoff which results in a 90 percent
             washoff in one hour, in./hr

Since  the unit removal rate  (REMQOP)  is computed from two  other parameters,   it
is not supplied directly by  the user.

                                      220                             RELEASE  8.0

-------
                                                                   Module RCHRES
4.2(3)  Simulate a Free-flowing Reach or Mixed Reservoir
        (Module RCHRES)
This module  simulates the processes  which occur in a  single reach of  open or
closed channel or  a completely mixed lake.   For convenience  such a processing
unit is referred to as a RCHRES throughout this documentation.   In keeping with
the assumption of complete mixing, the RCHRES consists of a single zone  situated
between two nodes, which are the extremities of the RCHRES.

Flow through a RCHRES is assumed to be unidirectional. The inflow and outflow of
materials through a RCHRES are illustrated in Figure 4.2(3)-1.   Water and other
constituents which arrive from other RCHRES's and local sources enter the RCHRES
through a single  gate (INFLO).   Outflows may  leave the RCHRES through one of
several gates (OFLO).   A  RCHRES can have up to 5  OFLO gates.   Precipitation,
evaporation,  and other  fluxes also influence the processes which  occur in the
RCHRES but do not pass through the gates.

The  ten  major subdivisions  of  the  RCHRES  module  and their  functions  are
presented in Structure  Chart 4.2(3).   RPTOT,  RBAROT,  and  RPRINT perform the
storage and printout of  results from the other module sections  of RCHRES  (HYDR
through RQUAL).    Within a  module section,   simulation of  physical processes
(longitudinal advection,  sinking,  benthal release)  is always performed before
simulation of biochemical processes.

The user specifies which module sections are active.   If any "quality"  sections
(CONS through RQUAL) are active, section ADCALC must also be active; it  computes
certain quantities  needed to  simulate advection  of the  quality constituents.
Besides fulfilling  this requirement,  the  user must  ensure that all   the time
series required by the active sections  are available,  either as supplied  input
time series or  as data computed by  another module section.   For  example,  if
RQUAL is active, the water temperature must be supplied, either as an input time
series or by activating section HTRCH which will compute it.
                                      221                             RELEASE 8.0

-------
                                                                                   gate OFLO 1

                                                                                   OVOL-water
                   point discharges
 /
       gate IN FLO


water-IVOL
   itlvfe
   efc.
/ conservative- ICOM
                                                       5horuqe within the RCHRES
                                                             \water-VOL
                                                                etc.
                        tributary inflows
                                                                                   OCOM- conservative
                                                                                   	etc.
                                                  9ate OFLO
qate ROFLO
collect flows
ttiru all OFLO
gates
M
tr-1
M

00

O
     Fiqure 4-.Z C5)-l Flow of materiah Ihrovxjh a RCMRES
                                                                                  
-------
                                                                   Module RCHRES
4.2(3).01   Simulate Sinking of Suspended Material
           (subroutine SINK)
Purpose

SINK calculates the quantity of material settling out of a RCHRES and determines
the resultant change in concentration of the material within the RCHRES.
Method

The  portion  of material  settling  out  of  a  RCHRES during  an  interval  is
calculated by the equation:

     SNKOUT = CONCMKSET/AVDEPE)                                         (1)

where:
     SNKOUT = fraction of material which settles out (reduction of
              concentration/interval)
     CONG   - concentration of material before deposition
     KSET   = sinking rate in ft/interval (dependent upon RCHRES
              characteristics and type of material)
     AVDEPE = average depth of water expressed in feet

In any interval in  which KSET is greater than AVDEPE,   all  the material in the
RCHRES sinks out of the water.

The mass of material sinking out of the RCHRES is calculated as:

     SNKMAT = SNKOUT*VOL                                                 (2)

where:
     SNKMAT = mass of material that settles out during the interval
              expressed as mass.ft3/l.interval or mass.m3/l.interval
     VOL    = volume of water in RCHRES in ft3 or m3
                                      223                            RELEASE 8.0

-------
                                                             Module Section HYDR

4.2(3).1  Simulate Hydraulic Behavior (Section HYDR of Module RCHRES)


Purpose

The purpose of this  code is to simulate the hydraulic  processes occurring in a
reach or a mixed  reservoir (RCHRES).   The final goal of the  process may be to
route floods, study reservoir behavior, or analyze constituents dissolved in the
water.


Schematic View of Fluxes and Storage

Figure  4.2(3).1-1 shows the principal state variable  (stored volume)  and fluxes
with which this part of HSPF deals.

All  water entering  the  RCHRES from  surface  and   subsurface sources  arrives
through "gate" INFLO; this quantity is called IVOL.   The  user indicates  the  time
series  which enter this gate in the EXT  SOURCES or NETWORK Blocks  of his User's
Control Input (UCI).   If no time series  are specified,  the system  assumes  the
RCHRES  has zero inflow.

The volume of water  which leaves the RCHRES during a simulation  time  interval,
through gate OFLO(N), is called OVOL(N). The total outflow is ROVOL.

The input of water from precipitation falling  directly on the water  surface  and
the loss of water  by evaporation from the surface can  also be considered.   The
user activates these options  by supplying the time series PREC  and/or POTEV in
his User's  Control Input  (external sources  block).   These time  series  are  in
units of depth/interval.    The code multiplies  these quantities   by  the current
surface area of  the  RCHRES to obtain volumes of input/output.     If  either  time
series  is absent  from the  UCI it is  assumed  that  the option is  inactive and the
corresponding flux is zero.

The basic equation is that of continuity:

    VOL - VOLS =  IVOL + PRSUPY - VOLEV - ROVOL                           (1 )

where:
    VOL = volume at  the end of  the  interval
    VOLS = volume at  the start of  the  interval

This  can be  written as:

    VOL = VOLT - ROVOL                                                   (2)

where:
    VOLT =  IVOL  + PRSUPY - VOLEV + VOLS

The principal   task of  this  subroutine  is to  estimate ROVOL and,   hence,   the
volume  at  the  end of  the  interval  (VOL).
                                       224                            RELEASE 8.0

-------
                                    PRSUPY
                                   precipttatton
                                    xi RttUT-
                                    surface
                              IVOL
                             'inflow
                                                   t
                                                       VOLEV
                                                      evaporation,
                                               VDL
                                         volume of water
                                           In PCHRES
                                                                         outflow
                                                                        •thru CHcit-
                                                                         NEY.1TB
                                                                                  ROVOL
                                                                                  totul
                                                                                  outflow
en
M

00

O
        B
w

00
•
O
PiQure4.ZC$).M  WONN diaqram
 6ecHon of 1he RCHRES
                                                                  Module
en
(5
O
ft
H-
O

-------
                                                             Module Section HYDR

Calculation of Outflows and VOL

If water is available,   it is assumed that the total volume  of water leaving  a
RCHRES in an interval is:

    ROVOL = (KS*ROS + COKS*ROD)*DELTS                                    (3)

where:
 KS    = weighting factor (0 <=* KS <= 0.99)
 COKS  = 1.0 - KS (complement of KS)
 ROS   = total rate of outflow from the RCHRES at the start of the interval
 ROD   = total rate of demanded outflow for the end of the interval
 DELTS = simulation interval in seconds

That is,  the mean rate of outflow is assumed to be a weighted mean of the rates
at the  start and  end of the  interval.   The weighting  factor KS   is  supplied
either by the user or by default.  Care should be exercised in selecting a value
because,  as KS increases from 0.0 to 1.0,  there is an increasing risk  that  the
computation of outflow rates will become  unstable.   Theoretically,  a  value of
0.5 gives the most accurate results,   provided oscillations do not occur.    The
default value of 0.0 has zero risk, but gives less accurate results.   Users  are
advised to  be very careful if  a nonzero value is  used;  it seems that one is
never justified in selecting a value greater than 0.5.

Combination of Equations 2 and 3 yields:

    VOL « VOLT - (KS*ROS + COKS*ROD)*DELTS                               (4)

There are two unknown  values in this equation:  VOL and  ROD.   Thus,   a second
relation is  required to solve  the problem.  To  provide this function,  it is
assumed that outflow demands for the individual exits are of  the form:

    OD(1) = f1(VOL,t)
    OD(2) - f2(VOL,t)
     •
     •
    OD(NEXITS) = fNEXITS(VOL,t)                                          (5)

That  is,  the outflow demand for each exit  is  a  function of  volume or  time  or a
combination.  This topic is discussed in  greater  detail in  Section 4.2(3).1.1.2.

It follows that the total outflow demand  is of similar  form:

    ROD = funct(VOL,t)                                                   (6)

At a  given time in the simulation,  t is known and the above functions reduce to:

    OD(N) = fN(VOL)                                                      (7)
    ROD   = funct(VOL)                                                   (8)

Equation  8  provides  the   second   relation   required   to   solve   the  problem.
Equations 4, 7, and 8 are  shown  in  Figure 4.2(3).1-2.   The  point of intersection
of Equations 4  and 8 gives  the  values   RO,   VOL,  and  hence  O(1),   O(2),  etc.
where:

                                       226                            RELEASE 8.0

-------
                                                             Module Section HYDR

  RO   = total rate of outflow from the RCHRES at the end of the interval
  O(N) = rate of outflow through exit N at the end of the interval

In HSPF,  it  is assumed that each outflow  demand can be represented  by one or
both of the following types of components:

    Component = function(VOL).  This is most useful in simulating RCHRES's
    where there is no control over the flow or where gate settings are only
    a function of water level.

    Component — function(time).  This is most useful for handling demands
    for municipal, industrial, or agricultural use.  The function may be
    cyclic (for example, annual cycle) or general (for example, annual cycle
    superimposed on an increasing trend). The user must supply the component
    in the form of an input time series.

If a  user indicates  that both  types of  component are  present in  an outflow
demand, then he must also specify how they are to be combined to get the demand.
HSPF allows the following options:

     1.  OD(N) = Min [fN(VOL),gN(t)J.  This is useful in cases such as the
         following:

         Suppose a water user has an optimum demand which may be expressed
         as a function of time (g(t)); however, his pump has a limited
         capacity to deliver water.  This capacity is a function of the
         water level in the RCHRES from which the pump is drawing the water.
         Thus, it can be expressed as a function of the volume in the RCHRES
         (f(VOL)).  Then, his actual demand for water will be the minimum of
         the two functions.  Note that g(t) is an input time series (OUTDGT).
         See the Time Series Catalog (Section 4.7).

     2.  OD(N) = Max [fN(VOL),gN(t)]

     3.  OD(N) = fN(VOL) + gN(t)

If one  or more  outflow demands  have an  f(VOL)  component   (Fig.4.2(3),1-2a),
subroutine ROUTE is called to solve the  routing equations.   In this case,   the
evaluation of the outflow demands and the solution of the equations can  be quite
complicated.

If there  is no f(VOL)   component in any demand,   the process is  much simpler
(Figure 4.2(3).1-2b).  Subroutine NOROUT is called in this case.


Representing the Geometry and Hydraulic Properties of a RCHRES

HSPF makes no assumptions regarding the shape of a RCHRES.   It does not require
that the cross section be trapezoidal or even that the shape be prismoidal. This
is one reason why both free flowing reaches and reservoirs can be handled by  the
same application  module.   Both of the  shapes shown in Figure  4.2(3).1-3a  are
acceptable.  However, HSPF does assume that:
                                      227                            RELEASE  8.0

-------
                      00(0 I  oo to  /   ooW
N5
N5
oo
               •3


              1
                                                    Bq.4
                        outflow and outflow demand
 I
1
                                                                                                             eq.e
            outflow and outflow demand
to
M
tr1
Fiure 4.2 (5\ l-Z.    ra
          ««ed -^o
                                                                                         of
       cafcs and wolome
                                                                                                                        c
                                                                                                                        H
                                                                                                                        (D
(D
O
ft
!-••
O
3
Oo
•

O

-------
PI


I
PI

oo

O
eel
^
i
i
2
>
4
i *§<%<*
t I I 1 f
-S i a > 5^ 5i
o 00/00
/.* » • »t *
*M» /< fo «a /*
^ '- «"> 'l »^
*
1

f
10
'0
20
7
!
$
a
o
«
JO
reach an4 mixed
                                     (b) fwctton taWe wstd te
                                        and hsjdrqullc  properttts

     4.1(^.1-3  "fy?ical RCttCCS amfi(y«trtions, and the rodhod
wed to re^ccent geometric and "   "    "
                                                                                           a (5CHR!
                                                                                                     c
                                                                                                     I-1
                                                                                                     (8

                                                                                                     W
                                                                                                     rs
H-


§

-------
                                                             Module Section HYDR

     1.  There is a fixed relation between depth (at the deepest point in
         the RCHRES), surface area, and volume.

     2.  For any outflow demand with an f(VOL) component, the functional
         relation is constant in time (with the exception discussed in
         Section 4.2(3).2.1.1).

These assumptions rule out cases where the  flow reverses direction or where one
RCHRES influences another upstream of it in a time-dependent way.  No account is
taken of momentum.   The routing technique falls  in the class known as "storage
routing" or "kinematic wave" methods.

The user specifies the  properties of a RCHRES in a  table called RCHTAB  (Figure
4.2(3).1-3b).   It has columns for the depth, surface area,  volume,  and volume
dependent  functions (fN(VOL)).    Each  row contains  values  appropriate  to  a
specified water surface  elevation.   The system obtains  intermediate values by
interpolation.   Thus,  the number of rows in  RCHTAB depends on the size of the
cross section and the desired resolution.   The  table is included in the User's
Control Input,  in the function tables   (FTABLES)  block.   A subsidiary,   stand
alone  program can  be used  to generate  this  table for  RCHRES's with  simple
properties (for prismoidal channels with uniform flow, use Manning's equation).
Auxiliary Variables

Besides calculating outflow rates and the volume  in a RCHRES,  HSPF can  compute
the values of some auxiliary state variables:

     1.  If AUX1FG=1, DEP, STAGE, SAREA, AVDEP, TWID, and HRAD are  computed
         where: DEP is the depth at the deepest point; STAGE  is the water
         stage at a related point; SAREA is  the surface area  of water  in  the
         RCHRES; AVDEP is the average depth  (volume/surface area);  TWID is
         the top width (surface area/length); HRAD  is the hydraulic radius.

         This is done by subroutine AUXIL.

     2.  If AUX2FG=1 , AVSECT and AWEL are computed where: AVSECT is  the
         average cross section  (volume/length); AWEL is  the  average
         velocity  (discharge/AVSECT).

     3.  If AUX3FG=1, USTAR and TAU are computed  where: USTAR is  the
         bed shear velocity; TAU is the bed  shear stress.

Note that  these are  point-valued  time  series;  that  is,   they  apply  at  the
boundaries (start  or end) of simulation time intervals.

The user specifies whether AUX1FG,  AUX2FG,   and AUX3FG  are ON or  OFF.    If he is
simulating certain constituents, one  or more of  these flags might be  required to
be ON.   For example, simulation of oxygen  (subroutine  group  OXRX)  requires that
both  AUX1FG and   AUX2FG be  ON.  AUX3FG  must be  ON if  inorganic sediment  is
simulated  (subroutine group SEDTRN).
                                       230                            RELEASE 8.0

-------
                                                             Module Section HYDR
4.2(3).1.1   Calculate Outflows Using Hydraulic Routing
            (subroutine ROUTE)
Purpose

ROUTE computes the rates and volumes of outflow from a RCHRES and the new volume
in cases where at least one outflow demand has an f(VOL) component.
Method

The problem is to solve simultaneously Equations 4 and 8.  The cases which arise
are shown graphically on Figure 4.2(3).1-4.    Equations 7 and 8 are represented
by a series of straight line segments.   The breakpoints in  the lines correspond
to a row of entries in RCHTAB. A segment of Equation 8 can be represented by  the
equation:

    (VOL - V1)/(ROD - ROD1) = (V2 - V1)/(ROD2 - ROD1)                    (9)

where V1,V2 are volumes specified in adjacent rows of RCHTAB,  for  the  lower  and
upper extremities of the straight-line segment, respectively.  ROD1,ROD2 are  the
corresponding total outflow demands.

The first step is to find the intercept of Equation 4 on the volume axis:

    VOLINT = VOLT - KS*ROS*DELTS                                         (10)

If VOLINT is less than zero, the equations cannot be solved  (case 3).    Equation
4 will give a negative value for VOL,   even if ROD is zero.   Physically,  this
means  that we  started  the  interval with  too  little  water to  satisfy   the
projected outflow demand, even if the outflow rate at the end of the interval is
zero.  Accordingly, the code sets:

    VOL   =0.0
    RO    =0.0
    0(*)  = 0.0
    ROVOL = VOLT

If VOLINT is greater than or equal to zero,   the outflow rate at the end of  the
interval will be nonzero (case 1 or 2). To determine the case:

     1.  The intercept of Equation 4 on the Volume axis is found:

         OINT = VOLINT/(DELTS*COKS)                                      (11)

     2.  The maximum outflow demand for which the volume is  still zero
         (RODZ) is found.
                                      231                             RELEASE 8.0

-------
                                                   Module Section HYDR
4


3

1
                                                    ^o
                                and outflow demands
             £_,__)   ore aoordinaies of points
                         no. in RCHTAB ywhich
                   data for -Ibis
             Flqure 4.1R).M-. Graphical ««?e9ent
-------
                                                             Module Section HYDR

If OINT is greater  than RODZ,  Equations 4 and 8 can be  solved (case 1).   The
solution involves  searching for the  segment of  Equation 8 which  contains the
point of intersection of  the graphs,  and finding the coordinates  of the point
(RO,VOL).  This is done by subroutine SOLVE.

If OINT is less than or equal to RODZ,  Equations 4 and 8 cannot be solved (case
2).   Physically this means  that the RCHRES will instantaneously go  dry at the
end  of the  interval  with total  outflow  rate  at that  time  equal to  OINT.
Accordingly,  the  code assigns a  zero value to  the RCHRES volume,   and total
outflow is  equal to the intercept  of Equation 4  on the volume axis  in Figure
4.2(3).1-4.  As many of the individual demands (O(*))  as possible are satisfied
in full  by the  available water.    The remaining  water is  used to  partially
satisfy the demand of next highest priority, and any others are not satisfied at
all.
4.2(3).1.1.2  Find the Outflow Demands which Correspond to a Specified
              Row in RCHTAB
              (subroutine DEMAND)
Purpose

DEMAND finds the individual and total outflow  demands which apply at  the  end  of
the present interval for a specified level  (row) in RCHTAB.
General Method

The  approach is  to  determine the  outflow  demand for  each  active  exit  and
accumulate them to find the total demand.
Evaluating the Demand for Exit N

The  outflow demand  for an  individual  exit consists  of   one  or   both  of   two
components.  Their presence or absence is indicated by  two  flags:

     Component          Flag
     fN(VOL)            ODFVFG(N)
     gN(t)              ODGTFG(N)


Finding the fN(VOL) Component

If ODFVFG(N) is zero, there is no fN(VOL) component.

If ODFVFG(N) is greater than zero, there is a fN(VOL)   component.    The value of
the flag is the column number in RCHTAB  containing the value  to be  used  to  find
the component:
                                      233                             RELEASE 8.0

-------
                                                             Module Section HYDR

    col  « ODFVFG(N)
    ODFV * fN(VOL) = (column value)*CONVF                                 (12)

where CONVF is a  conversion factor which can vary throughout  the year.   It is
supplied by the user in the RCHRES Block of the User's Control Input.  It can be
used to  incorporate effects  into the  simulation of,   for example,   seasonal
variation in channel roughness.

If ODFVFG(N) is less than zero,  there is an fN(VOL)  component but the function
fN is time  varying.   In this case  the determination of the  component  is less
direct.   The absolute value of ODFVFG(N), say I,  gives the element number of  a
vector COLINDO which contains a user supplied time series.   The values  in this
time series  indicate which pair  of columns in  RCHTAB are used  to interpolate
fN(VOL).   For example, if COLIND(l) = 4.6 for a given time step, then the value
is interpolated between those in columns 4 and 5:

ODFV = fN(VOL) =  [0.6*(columns value) + 0.4*(column4  value)]*CONVF      (13)

If the user has selected this option,   he must supply the time series COLIND(I)
in the EXT SOURCES Block of his UCI.

This method of outflow demand specification is useful where a set of rule curves
(f(VOL))  are specified for  releases from a reservoir,  and it  is necessary to
move from one curve to another (gradually or suddenly) as time progresses in  the
simulation.
Finding the gN(VOL) Component

If ODGTFG(N) is zero,   there is no gN(VOL)   component.   If  ODGTFG(N)   is greater
than zero,  there is a  gN(t)  component.    The  value  of  this  flag is  the element
number of vector OUTDGTt) which contains  the required time  series:

    FG2  = ODGTFG(N)
    ODGT = gN(t) = OUTDGT(FG2)                                           (14)

Combining the  fN(VOL) and gN(t) Components

If an  outflow demand has   both of the  components described  above,    the system
expects the user to indicate which of   the  following  options  to use  in combining
them :

    1.  OD(N)  = Min  [fN(VOL),gN(t)]
    2.  OD(N)  = Max  [fN(VOL),gN(t)]
    3.  OD(N)  - fN(VOL) + gN(t)                                          (15)
                                       234                            RELEASE 8.0

-------
                                                             Module Section  HYDR
4.2(3).1.1.3  Solve Routing Equations used in Case 1.
              (subroutine SOLVE)
Purpose

SOLVE  finds the  point where  Equations 4  and 8  intersect  (case   1  in   Figure
4.2(3).1-4).
General Approach

The general idea is to select a segment of Equation  8 and determine  the  point of
intersection with Equation 4.   If this point lies outside  the  selected  segment,
the code will select  the adjacent segment (in the direction  in  which the point
of intersection lies)  and repeat the  process.   This continues  until the point
lies within the segment under consideration.  To minimize searching,  the segment
in  which the  point of  intersection  was last  located  is  used to start  the
process.
Solving the Simultaneous Linear Equations

Equations 4 and 9 can be written as:

    A1*VOL+ B1*ROD = C1                                                  (16)
    A2*VOL+ B2*ROD = C2                                                  (17)

These equations can be solved by evaluating  the  determinants:
    DET
           A1 B1
           A2 B2
DETV =
        C1 B1
        C2 B2
DETO = |       |                      (18)
        A2 C2
In the code of this subroutine:
    FACTA1 = A1 =  1.0/(COKS*DELTS)                                       (19)
    FACTA2 = A2 =  ROD1 - ROD2                                            (20)
    FACTB1 = B1 =  1.0                                                    (21)
    FACTB2 = B2 =  V2 - V1                                                (22)
    FACTC1 - C1 =  OINT                                                   (23)
    FACTC2 = C2 =  (V2*ROD1) -  (V1*ROD2)                                  (24)

By substituting  Equations  19   through  24   in  Equation  18 the  determinants  are
evaluated as:

    DET =  FACTA1*FACTB2 -  FACTA2                                        (25)
    DETV = OINT*FACTB2 - FACTC2                                         (26)
    DETO = FACTA1*FACTC2 -  FACTA2*OINT                                   (27)

The coordinates of the point of intersection are:

    VOL = DETV/DET                                                      (28)
    RO  = DETO/DET                                                      (29)

                                      235                             RELEASE 8.0

-------
                                                             Module Section HYDR
4.2(3).1.2  Calculate Outflows Without Using Hydraulic Routing
            (subroutine NOROUT)
Purpose

NOROUT is used to compute the rates and volumes of outflow from a RCHRES and  the
new volume in cases where no outflow  demand has an f(VOL)  component;  that  is,
where all outflow demands are functions of time only.


Method

Equations 4 and 8 are illustrated for this situation in Figure 4.2(3).1-5.    The
solution procedure  is similar to that  used in subroutine ROUTE,    except  that:
because no outflow demands depend on volume,  no table look-up and  interpolation
is required to evaluate them, and the simultaneous solution of Equations 4  and 8
is easier.

The intercept  of Equation  4 on the  volume axis is  found,  as  before,   using
Equation 10.   If VOLINT is less than 0.0,  there is no solution  (case 3).    The
code takes similar action to that taken by subroutine ROUTE for this case.

If VOLINT is greater than or equal to 0.0, the solution is either case 1 or case
2,  as  before.   In  either case,  the   first step is  to evaluate  the outflow
demands:

    FG    = ODGTFG(N)
    OD(N) = OUTDGT(FG)                                                   (30)
    ROD   = OD(1) + ... OD(NEXITS)                                       (31)

The intercept of Equation  4 on the volume axis  (OINT)    is found using Equation
11. If OINT is greater than ROD, Equations 4 and 8 can be solved  (case 1):

    RO   = ROD
    0(*) = OD(*)                                                         (32)

   And from Equations 4 and  10,

    VOL = VOLINT - COKS*RO*DELTS                                         (33)

If OINT is less than or equal to ROD,   Equations  4  and 8 cannot  be solved (case
2).  The physical meaning and the action  taken by  the code are  identical to that
described for subroutine ROUTE.
                                       236                            RELEASE 8.0

-------
                                                    Module Section HYDR
   (O.VOLINf)
s
  C04VOUHf)
                                                            0
                      outflows  and outflow demands
            (-,-} ate coordinates of polrvte

                  te row no. (a RCHTAfc \whfch oorrtains
                  data fbr ihis
                          t-5  6raphtca\
              1he \Nork performed ty subnou-tine NOROUT
                                237
RELEASE 8.0

-------
                                                             Module Section HYDR

4.2(3).1.3  Compute Values of Auxiliary State Variables (subroutine AUXIL)
Purpose

AUXIL is used to compute the depth,   stage,  surface area,  average depth,  top
width, and hydraulic radius given the volume of water in a RCHRES.


Method of Computing Depth

The  basic problem  is to  interpolate a  depth  value between  those given  for
discrete values  of volume  in RCHTAB.    This raises  the question  of how  the
interpolation should be performed;  for example, linear or quadratic.   Whatever
method  is used,   it should  be consistent  with the  fact that  volume  is  the
integral of surface area with respect to depth.

Most RCHRES's are  long and relatively narrow (Figure  4.2(3).1-6).   To  perform
interpolation,   it is  assumed that  surface  area varies  linearly with depth
between neighboring levels (rows) in RCHTAB:

    SAREA = SA1 + (SA2 - SA1)*RDEP                                       (34)

where SAREA is the surface area at depth DEP;  SA1, SA2 are the tabulated values
of surface area immediately  above and below SAREA;  RDEP is  the relative depth
(DEP-DEP1)/(DEP2-DEP1); DEP1, DEP2 are the  tabulated values of depth immediately
above and below DEP.

By integrating the above equation with respect   to depth and equating the result
to volume:

     (A*RDEP**2) + (B*RDEP) + C = 0.0                                     (35)

where:
    A = SA2 - SA1
    B = 2.0*SA1
    C = -(VOL - VOL1)/(VOL2 - VOL1)*(B + A)

Equation 35 provides  a means of interpolating depth,   given volume.   There  is a
quadratic relation between RDEP  and VOL.   The  equation can be   solved for  RDEP
analytically but, in  HSPF,  Newton's method of  successive  approximations is  used
because it is probably faster in execution:

     1.  Calculation starts with an estimate of  RDEP: RDEP1 = 0.5
     2.  The function  FRDEP *=  (A*RDEP1**2)  + (B*RDEP1)  + C  is evaluated
     3.  The derivative DFRDEP * 2.0*A*RDEP1 + B is evaluated
     4.  A new value RDEP2 = RDEP1  - FRDEP/DFRDEP is  calculated
     5.  Steps  2-4 are repeated with RDEP1  = RDEP2 until  the change  in  RDEP
        is small
                                       238                            RELEASE 8.0

-------
ISJ

OJ

VO
to
W
oo
•
o
                                                                  , you  appty crt
                                                                lllutiwhon
                                                    In ca\culation
                                                                                                     miqht be Ihc
                                                                                              water \«Htl at this point;
                                                                                              nela-Kve -tosotw
                                                                   , VOLZ opptyot
                                                                   depth
to
A
O
rf


I

-------
                                                             Module Section HYDR

The depth is found using:

    DEP = DEP1 + RDEP2*(DEP2 - DEP1)                                     (36)


Computation of Other State Variables

STAGE is the name for any quantity which differs from DEP by a constant:

    STAGE = DEP + STCOR                                                  (37)

where:
    STCOR = the difference, supplied by the user

Surface area is computed using a formula based on Equation 34:

    SAREA = SA1 + A*RDEP2                                                (38)

Average depth is computed as:

    AVDEP = VOL/SAREA                                                    (39)

The mean top width is found using:

    TWID - SAREA/LEN                                                     (40)

where:
    LEN «= length of the RCHRES, supplied by the user

The hydraulic radius is calculated as a  function of average water  depth (AVDEP)
and mean top width (TWID):

    HRAD «  (AVDEP*TWID)/(2.*AVDEP  + TWID)                                (41)
                                       240                            RELEASE 8.0

-------
                                                             Module Section HYDR

4.2(3).1.4  Calculate Bed Shear Stress and Shear Velocity
            (subroutine SHEAR)

Purpose

SHEAR is used to compute the bed shear velocity  and shear stress,  based on the
mean particle size  of bed sediment and  the hydraulic properties of  the RCHRES
(i.e., average water depth, average velocity, hydraulic radius, and slope).

The method of calculating shear velocity and shear stress depends on whether the
RCHRES is a lake or a river.   If the RCHRES is a lake (LKFG=1),  shear velocity
is computed using formula 8.49 from "Hydraulics of Sediment Transport", by W. H.
Graf:

     USTAR = AWEL/U7.66 + (ALOG10 (AVDEP/(96.5*DB50) ) )*2.3/AKAPPA)    (42)

where:
     USTAR  = shear velocity in ft/s or m/s
     AWEL  - average flow velocity in ft/s or m/s
     AVDEP  = average water depth in ft or m
     DB5O   = median diameter of bed material in ft or m
     AKAPPA = Karman constant (AKAPPA =» .4)

The shear stress (TAU) on a lake bed is calculated as:

     TAU = GAM*(USTAR**2)/GRAV                                          (43)

where:
     TAU  » bed shear stress expressed in Ib/ft2 or kg/m2
     GAM  ~ unit weight, or density, of water (62.4 Ib/ft3 or  1000 kg/m3)
     GRAV *s acceleration due to gravity (32.2 ft/sec2 or 9.81  m/sec2)

If the  RCHRES being simulated  is a stream or  river,  both shear  velocity and
shear stress are  determined as functions of  the slope and hydraulic   radius of
the reach:

     USTAR = SQRT(GRAV*SLOPE*HRAD)                                      (44)

where:
     SLOPE = slope of the RCHRES (no units)
     HRAD  = hydraulic radius in ft or m

and

     TAU = SLOPE*GAM*HRAD                                               (45)

where:
     TAU   = stream bed shear stress in Ib/ft2 or kg/m2
                                      241                            RELEASE  8.0

-------
                                                           Module Section ADCALC
4.2(3).2  Prepare to Simulate Advection of Fully Entrained Constituents
          (Section ADCALC of Module RCHRES)
Purpose

ADCALC  calculates  values  for  variables   which  are  necessary  to  simulate
longitudinal advection of dissolved or entrained constituents.   These variables
are  all  dependent  upon  the  volume and  outflow  values  calculated  in   the
hydraulics section (HYDR).
Approach

The outflow of  an entrained constituent is  a weighted mean of  two quantities:
one is an estimate based on conditions at the start of the time step,  the other
reflects conditions at the end of the step.  The weighting factors are called  JS
and  COJS  (complement of  JS)   respectively.    The  values of  the  weighting
coefficients depend on  (1)  the relative volume  of stored water in  the RCHRES
compared to the volume leaving in a single  time step and  (2)  the uniformity  of
the velocity across a cross section of the RCHRES.   In order to represent these
factors, two variables are defined:  RAT and CRRAT.   RAT  is the ratio of RCHRES
volume at the start  of the interval to the outflow volume  based on the outflow
rate at the start of the interval:

     RAT = VOLS/(ROS*DELTS)                                               (1)

where:
     VOLS  = volume of water at the start of interval in ft3 or m3
     ROS   = outflow rate at start of interval in ft3/s or m3/s
     DELTS = number of seconds in interval

The parameter CRRAT is defined as the ratio of maximum velocity to mean  velocity
in the RCHRES  cross section under typical flow conditions.    CRRAT must always
have a value of 1.0 or greater.  A value of 1.0 corresponds to a totally uniform
velocity  (plug flow) across the RCHRES.


Determination of JS and COJS

If the  value of  RAT is greater  than that  of CRRAT,  it is assumed   that all
outflow over a given  time interval was contained in the RCHRES  at  the  start of
the interval,  and the mean rate of outflow of material is wholly dependent  upon
the rate  of outflow at  the start of the interval  (JS - 1.0).    If  the  value of
RAT is  less than CRRAT,   it  is assumed that part  of  the water in   the outflow
entered the  RCHRES as  inflow during  the same   interval;  in   this  case,    the
concentration of inflowing material will affect  the outflow concentration in the
same interval, and JS will have a value  less  than 1.0.  The relationship of  RAT,
CRRAT,  and JS is illustrated  in Figure 4.2(3).2-1.  COJS is (1.0  -  JS).
                                       242                            RELEASE 8.0

-------
                                                           Module Section ADCALC

Another  way  to interpret  the  relationship  of  these  variables is  that  no
inflowing material is present in the outflow in the same interval if the outflow
volume is less than (VOLS/CRRAT).


Calculation of Components of Outflow Volume

Components of outflow  volume based on conditions  at the start of  the interval
(SROVOL) and the end of the interval (EROVOL) are calculated as:

     SROVOL = JS*ROS*DELTS                                               (2)
     EROVOL = COJS*RO*DELTS

where:
     SROVOL = outflow volume component based on start of interval,
              in ft3/interval or m3/interval
     EROVOL = outflow volume component based on end of interval,
              in ft3/interval or m3/interval
     ROS    = outflow rate at start of interval, in ft3/s or m3/s
     RO     = outflow rate at end of interval, in ft3/s or m3/s
     DELTS  a number of seconds in interval

Likewise, if there is more than one exit gate for the RCHRES,  the corresponding
outflow components for each  unit,  based on conditions at the  start and end of
each interval, are calculated as:

     SOVOL(N) = JS*OS(N)*DELTS                                            (3)
     EOVOL(N) - COJS*O(N)*DELTS

where:
     SOVOL(N) «s outflow volume component based on start of interval for
                exit gate N, in ft3/interval or m3/interval
     EOVOL(N) = outflow volume component based on end of interval for
                exit gate N, in ft3/interval or m3/interval
     OS(N)    = outflow rate at start of interval for exit gate N,
                in ft3/s or m3/s
     O(N)     = outflow rate at end of interval for exit gate N,
                in ft3/s or m3/s
     DELTS    = number of seconds in interval

It should be noted ti\at SROVOL, EROVOL,  SOVOL(N),  and EOVOL(N)  are not actual
outflows  from the  RCHRES,   but instead  are components  of  outflow based  on
conditions at the  start or end of  the interval.   These variables  are used in
subroutine ADVECT to estimate the advection of constituents.
                                       243                             RELEASE 8.0

-------
                                                         Module Section CONS
4.2(3).3  Simulate Conservative Constituents
         (Section CONS of Module RCHRES)
Purpose

CONS simulates constituents which,  for all practical  purposes, do not decay with
time  or  leave  the RCHRES  by any  mechanism other  than advection.    Examples
include:
     total dissolved solids
     chlorides
     pesticides and herbicides which decay very slowly

Figure  4.2(3).3-1 illustrates  the fluxes  of conservative  material which  are
modeled in section CONS.
             I.O
         t
        JS
            0.0
                                        CRRAT
                                 RAT
 Figure 4.2(3).2-1   Determination of weighting  factors for advection
                      calculations.
                                          OCOM (N)
                                                              ROCON







H.VIN
/^ ^****\
inflow
to
RCHRES
v /
\y













VOL* CON
storage








outflow
from
RCHRES
through
^ exit J
\ N /
XX









•"^^•^







^ 	
^ ^"^"1
sum of
outflow
from
RCHRES,
\ 7
\y






_ __ — ^.


Figure 4.2(3).3-1  Flow  diagram  for conservative constituents in the
                     CONS  section  of the RCHRES Application Module.
                                    244
RELEASE  8.0

-------
                                                             Module Section CONS

Method

Subroutine CONS performs  only three functions.   First,  a value  for inflow  of
material (ICON) is obtained and converted to internal units.   Next,  CONS calls
subroutine ADVECT  to perform  longitudinal advection of  this material   and the
material already contained in the RCHRES.  Finally,  CONS calculates  the  mass  of
material remaining in the RCHRES after advection; this value, RCON, is necessary
for the mass balance checks on conservatives and is calculated as:

     RCON = CON*VOL                                                       (1 )

where:
     RCON « mass of material in RCHRES after advection
     CON  = concentration of conservative after advection
     VOL  = volume of water in RCHRES at end of interval in ft3 or n\3


Additional Requirements

HSPF allows a  maximum of ten conservative constituents.   The  user  selects the
units for each constituent;  thus,  different conservative constituents may have
different units. However, in order to provide this flexibility, additional input
is required.  For each constituent the following information must be  provided  in
the User's Control Input:

     1. CONID: the name of tne constituent (up to 20 characters long)

     2. QTYID: this string (up to 8 characters) contains the units used to
               describe the quantity of constituent entering or leaving the
               RCHRES, or the total quantity of material stored in it.
               Examples of possible units for QTYID are  'kg1 for kilograms
               or 'Ibs' for pounds

     3. CONCID: the concentration units for each conservative  (up to  8
                characters long); exrmples are "mg/l1 or  'Ibs/ft3'

     4. CONV: conversion factor from QTYID/VOL to desired concentration
              units: CONG - CONV*(QTY/VOL) (in English system, VOL is
              expressed in ft3) (in metric system, VOL is expressed in m3)
              For example, if:
                  CONCID is mg/l
                  QTYTD  is kg
                  VOL    is in m3
              then CONV = 1000.0
                                                                      RELEASE 8.0

-------
                                                             Module Section CONS
4.2(3).3.1  Simulate Advection of Constituent Totally Entrained in Water
           (subroutine ADVECT)
Purpose

ADVECT computes the concentration of material in  a RCHRES and the quantities of
material that leave the RCHRES due to longitudinal advection through active exit
gates.  ADVECT is a generalized subroutine, and is called by each module section
which simulates constituents which undergo normal longitudinal advection.


Assumptions

Two assumptions are made in the solution technique for normal advection:

     1. Each constituent advected by calling subroutine ADVECT is uniformly
        dispersed throughout the waters of the RCHRES.

     2. Each constituent is completely entrained by the flow; that is, the
        material moves at the same horizontal velocity as the water.


Method

The equation of continuity may be written as:

     IMAT - ROMAT = (CONC*VOL) - (CONCS*VOLS)                             (2)

where:
     IMAT           = inflow of material over the interval
     ROMAT          — total outflow of material over  the interval
     CONCS and CONC = concentrations at the start and end of the interval
     VOLS and VOL   = volume of water stored in the RCHRES at the start and
                      end of the interval  (m3 or ft3)

The other basic equation states that the total outflow of material over the  time
interval is a  weighted mean of two  estimates;  one  based on  conditions at the
start of the interval, the other on ending conditions:

     ROMAT = ((JS*ROS*CONCS) + (COJS*RO*CONC))*DELTS                      (3)

where:
     JS         = weighting factor and COJS = 1.0 - JS
     ROS and RO = rates of outflow at the  start and end of the interval
                   (m3/s or ft3/s)
     DELTS      - interval, in seconds

Using Equations (2) in Section 4.2(3).2 (Subroutine ADCALC), Equation  (3) can be
written:
                                       246                             RELEASE 8.0

-------
                                                             Module Section CONS

     ROMAT = (SROVOL*CONCS) + (EROVOL*CONC)                               (4)

where SROVOL and EROVOL are as defined earlier.

By combining Equations (2) and (4) we can solve for CONG:

     CONG = (IMAT + GONGS*(VOLS - SROVOL))/(VOL + EROVOL)                 (5)

The  total  amount  of  material  leaving the  RCHRES  during  the  interval  is
calculated from equation (4).

If there is more  than one active exit from the RCHRES,   the amount of material
leaving through each exit gate is calculated as:

     OMAT = SOVOL*CONCS + EOVOL*CONC                                      (6)

where:
     OMAT  — amount of material leaving RCHRES through individual exit, gate
     SOVOL = outflow volume component for individual exit gate based on start
             of interval
     EOVOL = outflow volume component for individual exit gate based on end
             of interval

(SOVOL and EOVOL are defined in Section 4.2(3).2)

If the RCHRES goes dry during the interval,  the concentration at the end of the
interval is undefined.  The total amount of material leaving the RCHRES is:

     ROMAT - IMAT + (CONCS*VOLS)                                          (7)

If there is more  than one active exit from the RCHRES,   the amount of material
leaving through  each exit  gate from  a RCHRES  which has  gone dry  during the
interval is calculated as:

     OMAT = (SOVOL/SROVOL)*ROMAT                                          (8)

The units in the foregoing equations are:
     VOLS,VOL        m3 or ft3 (call these volunits)
     SROVOL/etc      volunits/interval
     CONCS,CONC      user defined (call these concunits)
     IMAT,ROMAT,etc  concunits*volunits/interval
                                      247                             RELEASE 8.0

-------
                                                            Module Section HTRCH
4.2(3).4  Simulate Heat Exchange and Water Temperature
          (Section HTRCH of Module RCHRES)
Purpose

The purpose of this code is to  simulate the processes which determine the water
temperature in a reach or mixed reservoir.  Water temperature is one of the most
fundamental indices  used to  determine the  nature of  an aquatic  environment.
Most  processes of  functional  importance to  an  environment  are affected  by
temperature.   For  example,  the  saturation level  of dissolved  oxygen varies
inversely with  temperature.   The decay of  reduced organic matter,   and hence
oxygen demand caused by the decay, increases with increasing temperature.   Some
form  of  temperature dependence  is  present  in  nearly all  processes.    The
prevalence  of  individual  phytoplankton  and   zooplankton  species  is  often
temperature dependent.

Required Time Series

Five time series of meteorological data are required to simulate the temperature
balance within a RCHRES. These are:

     1. solar radiation in langleys/interval
     2. cloud cover expressed as tenths
     3. air temperature in degrees C
     4. dewpoint temperature in degrees C
     5. wind speed in meters/interval

Note that solar radiation data are usually available as daily totals.   The user
must convert these data to,  say,  hourly or two hourly values before  using them
in HSPF.   If  the standard HSPF disaggregation  rule were used,   a  daily value
would be divided into equal increments for each interval of  the day;   this would
not  account  for the  rising  and  setting of  the  sun]    A similar kind   of
preprocessing needs to be done if daily max/min air temperatures are used.


Schematic View of Fluxes and Storages

Figure 4.2(3).4-1 illustrates the fluxes  involved in this module section.  There
are no  significant internal sources  or  sinks  of temperature within  a  RCHRES.
Changes in heat  content are due only  to transport processes across   the RCHRES
boundaries.   Module section HTRCH considers two major processes:   heat  transfer
by advection, and heat transfer across the air-water interface. The processes  of
diffusion and dispersion are not considered in HSPF.

Heat  transfer by  advection is   simulated by  treating water   temperature as   a
thermal concentration.   This enables the use  of subroutine ADVECT,   a  standard
subroutine  which   calculates  advective transport  of    constituents   totally
entrained in  the moving water.
                                       248                            RELEASE 8.0

-------
                                                              OH
/ goin ^v
[ from solar \
I radiation /

inflow
to
reach/res


i
r 1
/ coin \
\prtcipi*rtlon/
Q»
f >.
[to lOTXJWOV* \
I radiation /
r \
t
• \
/flux due \
/ to condudion)
N^conv^tiony
ae
/ X
/lof*.4-l  Flow diogrom t»r HTRCH Section

                                             of the RCHRES  Application Module
w




M


00


O
I
a


§

s



I

-------
                                                            Module Section HTRCH

Heat is  transported across the air-water  interface by a number  of mechanisms,
and each must be evaluated individually.  The net transport across the air-water
interface is the sum of the  individual effects.   Mechanisms which can increase
the heat content of the water are  absorption of solar radiation,  absorption of
longwave radiation,  and conduction-convection.    Mechanisms which decrease the
heat content  are emission of  longwave radiation,   conduction-convection,  and
evaporation.


Shortwave Solar Radiation

The shortwave  radiation absorbed by a  RCHRES is approximated by  the following
equation:

     QSR = 0.97*CFSAEX*SOLRAD*10.0                                        (1)

where:
     QSR    = shortwave radiation in kcal/m2.interval
     0.97   = fraction of incident radiation which is assumed absorbed
              (3 percent is assumed reflected)
     CFSAEX = ratio of radiation incident to water surface to radiation
              incident to gage where data were collected.  This  factor also
              accounts for shading of the water body, eg. by trees
     SOLRAD = solar radiation in langleys/interval
     10.0   = conversion factor from langleys to kcal/m2


Longwave Radiation

All terrestial surfaces,   as well as the atmosphere,   emit longwave radiation.
The rate  at which each  source emits longwave  radiation is dependent  upon its
temperature.   The  longwave radiation exchange  between the atmosphere   and the
RCHRES is estimated using the formula:

   QB = SIGMA*((TWKELV**4) - KATRAD*(10**-6)*CLDFAC*(TAKELV**6))*DELT60   (2)

where:
     QB     = net  transport of longwave radiation in kcal/m2.interval
     SIGMA  = Stephan-Boltzman constant multiplied by 0.97 to account
              for  emissivity of water
     TWKELV = water temperature in degrees Kelvin
     KATRAD *= atmospheric longwave radiation coefficient'with a  typical
              value of 9.0
     CLDFAC = 1.0  + (.0017*C**2)
     TAKELV = air  temperature in degrees Kelvin corrected for elevation
              difference
     C      = cloud cover, expressed as tenths  (range 0  through  10)
     DELT60 = DELT(mins) divided by 60
                                       250                             RELEASE 8.0

-------
                                                            Module Section HTRCH

Both atmospheric radiation to  the water body and back radiation  from the water
body to  the atmosphere are  considered in this  equation.   QB is  positive for
transport of energy from the water body to the atmosphere.


Conduction-Convection

Conductive-convective transport  of heat  is caused  by temperature  differences
between the air and  water.   Heat is transported from the  warmer medium to the
cooler medium;  heat can therefore enter or  leave a water body,  depending upon
its  temperature  relative to  air  temperature.   HSPF  assumes that  the  heat
transport is proportional  to the temperature difference between  the two media.
The equation used is:

     QH = CFPRES*(KCOND*10**-4)*WIND*(TW - AIRTMP)                        (3)

where:
     QH     = conduct!ve-convective heat transport in kcal/m2.interval
     CFPRES = pressure correction factor dependent on elevation
     KCOND  = conductive-convective heat transport coefficient
              (typically in the range of 1 to 20)
     WIND   = windspeed in m/interval
     TW     = water temperature in degrees C
     AIRTMP = air temperature in degrees C

QH is positive for heat transfer from the water to the air.
Evaporative Heat Loss

Evaporative heat transport occurs when water  evaporates  from  the  water  surface.
The amount of heat lost depends on the latent heat of  vaporization for water and
on  the  quantity of  water  evaporated.    For  purposes of   water  temperature
simulation,  HSPF uses  the following equation to calculate the  amount  of water
evaporated:

     EVAP = (KEVAP*10**-9)*WIND*(VPRESW - VPRESA)                         (4)

where:
     EVAP   = quantity of water evaporated  in m/interval
     KEVAP  = evaporation coefficient with  a typical value of  1  to 5
     WIND   = wind movement 2 m above the water  surface in m/interval
     VPRESW = saturation vapor pressure at  the water surface in  mbar
     VPRESA = vapor pressure of air above water  surface in mbar

The heat removed by evaporation is then calculated:

     QE = HFACT*EVAP                                                      (5)
                                       251                             RELEASE 8.0

-------
                                                            Module Section HTRCH

where:
     QE    = heat loss due to evaporation in kcal/m2.interval
     HFACT = heat loss conversion factor (latent heat of vaporization
             multiplied by density of water)


Heat Content of Precipitation

In module  section HYDR  an option  exists to  include the  input of  water from
precipitation  falling  directly on  the  water  surface.    If this  option  is
activated,  it is  necessary to assign a  temperature to the water  added to the
RCHRES in this manner.  HSPF assumes that precipitation has the same temperature
as the water surface on which it falls.
Net heat exchange

The net heat exchange at the water surface is represented as:

     QT = QSR - QB - QH - QE + QP                                         (6)

where:
     QT  = net heat exchange at water surface in Kcal/m2.interval
     QSR = net heat transport from incident shortwave radiation
     QB  = net heat transport from longwave radiation
     QH  = heat transport from conduction-convection
     QE  = heat transport from evaporation
     QP  = heat content of precipitation


Calculation of Water Temperature

Of the five heat transport mechanisms across the air-water interface,   three  are
significant and dependent upon water temperature.    In order  to obtain a stable
solution for water temperature, these three terms  (QB, QH, QE) are  evaluated  for
the temperature at both  the start and end of the  interval,    and the  average of
the two  values is taken (trapezoidal  approximation).   For this   purpose,   the
unknown  ending  temperature  is  approximated by  performing  a  Taylor  series
expansion about the starting temperature,   and ignoring nonlinear  terms.  This
formulation leads to the following equation  for the change in water temperature
over the interval:

     DELTTW = CVQT*QT/(1.0 + SPD*CVQT)                                    (7)

where:
     DELTTW = change in water temperature in degrees C
     CVQT   = conversion factor to convert  total heat exchange expressed in
              kcal/m2.interval to degrees C/interval  (volume dependent)
     QT     = net heat exchange in kcal/m2.interval  (with  terms  evaluated at
              starting temperature)
     SPD    = sum of partial derivatives of QB, QH, and QE with  respect to
              water temperature
                                       252                            RELEASE 8.0

-------
                                                            Module Section HTRCH

The heat exchange calculations do not give realistic results when the water body
becomes excessively shallow.   Consequently, heat transport across the air-water
interface is not  considered if the average  depth of water in  the RCHRES falls
below 2 in.
4.2(3).4.1 Correct Air Temperature for Elevation Difference
           (subroutine RATEMP)
Purpose

The  purpose of  this  code is  to  correct air  temperature  for any  elevation
difference between the RCHRES and the temperature gage.
Approach

The  lapse  rate   for  air  temperature  is  dependent  upon   whether   or   not
precipitation occurs during the time interval.   If precipitation does occur,   a
wet lapse rate of 1.94E-3 degrees C/ft is assumed.  Otherwise,  a dry lapse  rate
which is a function of time of day is used. A table of 24 hourly dry lapse rates
is built into the HSPF system.  The corrected air temperature is:

     AIRTMP = GATMP - LAPS*ELDAT                                          (8)

where:
     AIRTMP = corrected air temperature in degrees C
     GATMP  - air temperature at gage
     LAPS   = lapse rate in degrees C/ft
     ELDAT  =* elevation difference between mean RCHRES elevation and
              gage elevation in feet (ELDAT is positive  if  mean RCHRES
              elevation is greater than gage elevation)
 4.2(3).5  Simulate Behavior of  Inorganic Sediment
          (Section SEDTRN of Module  RCHRES)

 Purpose

 The purpose of  this code is to  simulate the  transport,  deposition,   and scour of
 inorganic sediment in  free-flowing reaches   and  mixed  reservoirs.    The modeling
 of  sediment in  channels may be  needed  for analysis  of  such problems as:

    1.  Structural instability  of bridge piers or water
        intakes caused by scouring.

    2.  Reduction of reservoir  capacity and  clogging of
        irrigation canals and navigable waterways due  to
        deposition.


                                       253                             RELEASE 8.0

-------
                                                           Module Section SEDTRN
    3.  Reduction of light available to aquatic organisms
        caused by suspended sediment.

    4.  Transport of adsorbed pollutants such as fertilizers,
        herbicides,  and pesticides.
Schematic View of Fluxes and Storages

Figure 4.2(3).5-1  shows the  principal state  variables and  fluxes with  which
module section SEDTRN deals.

Both the  migration characteristics  and the  adsorptive capacities  of sediment
vary significantly with particle size.  Consequently, HSPF divides the inorganic
sediment load into three components (sand,  silt,  and clay),  each with its own
properties.   Parametric information  required for cohesive sediments  (silt and
clay) include:

    1.  particle diameter - D
    2.  particle settling velocity in still water - W
    3.  particle density - RHO
    4.  critical shear stress for deposition - TAUCD
    5.  critical shear stress for scour - TAUCS
    6.  erodibility coefficient - M

Parameter values  required for noncohesive,  or  sand,  particles depend  on the
method  used  to  compute  sandload (alternate  methods  are  described  in  the
functional  description of  subroutines SANDLD,   TOFFAL,  and  COLBY).  If  the
Toffaleti  method is  used,   values must  be defined  for  median bed  sediment
diameter (DB5O) and particle settling velocity (W).  The Colby method requires  a
value  for  DB5O,   and  the  "input power  function"  method  requires  both   a
coefficient (KSAND) for the power function and an exponent (EXPSND).

As Figure 4.2(3).5-1  indicates,  the same materials fluxes are  modeled for all
three fractions  of sediment.    Only the methodology  used to  determine fluxes
between suspended storage and bed storage differ.

HSPF assumes  that scour or deposition of  inorganic  sediment does not affect the
hydraulic properties  of the channel.   Furthermore,   it is assumed  that  sand,
silt, and clay deposit in different areas of the RCHRES bed;  consequently,  the
deposition or scour of each material is not linked to the other fractions  (i.e.,
"armoring" is  not modeled).    Longitudinal movement  of bed  sediments is  not
modeled.

The details of the transport,  deposition,  and  scour techniques are outlined  in
the  functional descriptions of the lower  level  subroutines of the  SEDTRN module
section.   Following  these  calculations,  the depth of sediment in the RCHRES bed
is determined in order to warn the  user  whenever the deposited sediment exceeds
a prespecified   level.   First,    the volume   occupied by  each fraction   of bed
sediment is calculated:

     VOLSED(J) = RSED(J+3)/RHO(J)*1.OE06                                 (1)
                                       254                            RELEASE 8.0

-------


xstu i.j;
inflow
to
RCHRES
\7

V


RSED (T)
suspended
storage
^
\
\

outflow
•from
RCHRES
through


IPtMM
-/deposition
\. or scour
>^ i
4-
f
RSED (3>s)
bed
storage


ROSED (J;
Sum of
outflow*
from

J= 1 -for sand
J»2 for s/lt
J-3 for clay
                                                                                         a
                                                                                         in
                                                                                         n
                                                                                         o
                                                                                         ft
                                                                                         H-
                                                                                         O
CO



CO
•

o
               Fiqure H.2C3).5-|    Floiv  diaqram of  inorganic  sediment fractions  fn the
                J                 5EDTRN1 Section  of the  RCHRE5 Application Module.

-------
                                                           Module Section SEDTRN

where:
     VOLSED(J) = volume occupied by bed sediment of fraction J in m3 or ft3
     RSED(J+3) = bed storage of sediment fraction J in mg.m3/l or mg.ft3/l
     RHO(J)    = particle density of fraction J in gm/cm3

The volumes of the three fractions of bed sediment are summed, and the total bed
volume is adjusted  to account for the fraction  of the volume which  is void of
sediment (i.e., the porosity):

     VOLSEDA = VOLSED/U.O - FOR)                                        (2)

where:
     VOLSEDA = volume of bed adjusted to account for volume occupied
               by materials other than sediment
     VOLSED  = volume of sediment contained in the bed (sand + silt + clay)
     FOR     = porosity of bed sediment, ratio of volume void of
               sediment to total volume of bed

Finally,   the  depth of bed  sediment is calculated for  use as an  indicator of
excessive deposition:

     BEDDEP = VOLSEDA/(LEN*BEDWID)                                       (3)

where:
     BEDDEP  = depth of bed in m or ft
     VOLSEDA = volume of bed in m3 or ft3
     LEN     = length of RCHRES in m or ft
     BEDWID  = effective width of bed for calculation of bed  thickness
               (an input parameter expressed  in m or ft)

If  the calculated  value for BEDDEP exceeds   a user specified value,    a warning
message is printed to alert the user to potential modeling problems.

It  should  be noted  that   the PERLND module of  HSPF simulates  removel   of total
inorganic  sediment  due  to  washoff  from the  land  surface   and  erosion  from
gullies.   The model user must divide  total  sediment into  the  three  components
(sand, silt,  and clay)  so that  this material can be routed  through  the channel
system in  the RCHRES module.


4.2(3).5.1  Simulate Cohesive Sediments
             (subroutine COHESV)

Purpose

COHESV  simulates   the deposition,   scour,    and  transport processes  of cohesive
sediments  (silt and  clay).

Method

The modeling  effort  consists  of  two steps.    First,   subroutine ADVECT is called
to  perform advective transport (see section  4.2(3).3.1).   Then subroutine BDEXCH
is  called,  and deposition or scour is   calculated based on the bed shear stress
and the  Krone and Partheniades  equations,  (see  section  4.2(3).5.1.1).

                                       256                            RELEASE 8.0

-------
                                                           Module Section SEDTRN
4. 2(3). 5. 1.1
              Simulate Exchange with Bed
              (subroutine BDEXCH)
Purpose

BDEXCH simulates the  deposition and scour of cohesive  sediment fractions  (silt
and clay) .

Approach

Exchange of cohesive sediments  with the bed is dependent upon  the shear stress
exerted upon the bed surface.   The shear stress within the RCHRES is calculated
in subroutine SHEAR  (4. 2(3). 1.4)  of the HYDR section.    Whenever shear stress
(TAU)  in the  RCHRES is less than  the user-supplied critical  shear  stress  for
deposition  (TAUCD), deposition occurs; whenever shear stress  is greater  than  the
user-supplied critical shear stress for scour  (TAUCS),  scouring of cohesive  bed
sediments occurs.    Rate of  deposition for a  particular fraction  of  cohesive
sediment  is based  on  a  simplification of  Krone's   (1962)   equation to  the
following form:

     D = W*CONC*(1.0 - TAU/TAUCD)                                        (4)

where :
     D      = rate at which sediment fraction settles out of  suspension
              (units of mass/len2.ivl)
     W      ~ settling velocity for cohesive sediment fraction (len/ivl)
     CONC   =* concentration of suspended sediment  fraction  (mass/len3)
     TAU    * shear  stress  (Ib/ft2 or kg/in2)
     TAUCD  ~ critical shear  stress for deposition (Ib/ft2  or kg/m2)

The  rate  of change of  suspended  sediment  fraction concentration  in   the RCHRES
due  to deposition can be expressed as:
      d(CONC)/dt = -(D/AVDEPM)                                            (5)

 whe re :
      AVDEPM = average  depth of watar in RCHRES in meters

 By substituting  the expression  for deposition  rate (D)    from Equation  4 the
 following  equation is  obtained:
      d(CONC)/dt = -(W*CONC/AVDEPM)*(1  - TAU/TAUCD)
                                                                         (6)
 By integrating and rearranging this equation a  solution may be obtained for the
 concentration  of suspended  sediment  lost to  deposition  during a  simulation
 interval ( DEPCONC ) :
      DEPCONC = CONC* (1.0 - EXP (( -W/ AVDEPM) *( 1 .0 - TAQ/TAUCD))
                                                                         (7)
                                       257
                                                                      RELEASE 8.0

-------
                                                           Module Section SEDTRN

where:
     CONG    = concentration of suspended sediment fraction at start
               of interval (mg/1)
     W       ~ settling velocity for sediment fraction (m/ivl)
     AVDEPM  = average depth of water in RCHRES in meters (calculated in HYDR)
     TAU     = shear stress (Ib/ft2 or kg/m2)
     TAUCD   = critical shear stress for deposition (Ib/ft2 or kg/m2)

The user is  required to  supply values  for settling velocity  (W)   and critical
shear stress for deposition (TAUCD) for each fraction of cohesive sediment  (silt
or clay) which is modeled.

Following the calculation of DEPCONC,  the storage of sediment in suspension  and
in the bed is updated:

     SUSP - SUSP -  (DEPCONC*VOL)                                         (8)
     BED  = BED +  (DEPCONC*VOL)                                          (9)

where:
     SUSP = suspended  storage  of  sediment  fraction  (mg.ft3/l  or  mg.m3/l)
     BED  = storage of  sediment  fraction in  bed (mg.ft3/l  or  mg.m3/l)
     VOL  = volume  of  water  in RCHRES  (ft3 or  m3)

The  rate  of  resuspension,    or  scour,   of  cohesive  sediments  from the  bed is
derived  from  a  modified form of  Partheniades'  (1962)  equation:

      S  = M* (TAU/TAUCS  -1.0)                                            (10)

 where:
      S      = rate at which a sediment fraction is scoured from the
              bed (units of mass/len2.ivl)
      M     = erodibility coefficient for the sediment fraction (kg/m2.ivl)
      TAUCS = critical shear stress for scour (Ibs/ft2 or kg/m2)

 The rate  of change of suspended  sediment fraction concentration in  the  RCHRES
 due to scour can be expressed as:

      d(CONC)/dt =  S/AVDEPM                                              (11)

 By substituting the expression for scour rate  (S) from Equation 10 the following
 equation is obtained:

      d(CONC)/dt =  (M/AVDEPM)*(TAU/TAUCS - 1.0)                          (12)

 By integrating and rearranging  this equation a solution may  be obtained  for the
 concentration  of  suspended   sediment  added  to  suspension   by  scour  during  a
 simulation interval (SCRCONC):

      SCRCONC = M/AVDEPM*1000*(TAU/TAUCS - 1.0)                         (13)

 where:
      M       =  erodibility coefficient in  kg/m2.ivl
      AVDEPM  M  average depth of  water  in meters
       1000    =  conversion from kg/in3  to  mg/1

                                        258                            RELEASE 8.0

-------
                                                           Module Section SEDTRN

The user is required  to supply values for the erodibility  coefficient (M)  and
critical shear stress for scour (TAUCS)   for each fraction of cohesive sediment
(silt or clay) which is modeled.

Following the calculation of SCRCONC,  the storage of sediment in suspension and
in the bed is updated:

     BED  = BED - (SCRCONC*VOL)                                         (14)
     SUSP = SUSP + (SCRCONC*VOL)                                        (15)

If the amount of scour calculated is  greater than available storage in the bed,
the bed scour is set  equal to  the bed storage and the bed  storage is  set equal
to zero.   Since the  value specified for TAUCS should be  greater than that  for
TAUCD,  only  one process  (deposition or  scour)  occurs during  each simulation
interval.
4.2(3).5.2  Simulate Behavior of  Sand/Gravel
            (subrouti ne SANDLD)

Purpose

SANDLD simulates   the  deposition,   scour,   and   transport processes of  the sand
fraction  of inorganic  sediment.

Method

Erosion and  deposition of  sand,   or  noncohesive sediment,   is affected  by the
amount of sediment the flow is  capable of  carrying.   If the  amount of sand being
transported is  less than   the  flow can carry  for the  hydrodynamic conditions of
the  RCHRES,  sand  will be  scoured from the bed.   This  occurs until the actual
sand transport  rate becomes equal to the  carrying capacity  of the flow or until
the  available bed   sand is  all  scoured.   Conversely,   deposition  occurs if the
sand transport  rate exceeds the flow's capacity to carry sand.

Subroutine SANDLD   allows the  user  to calculate  sand transport capacity  for a
RCHRES by any one  of three  methods.   Depending on the value of SANDFG specified
in  the User's Control  Input, either the Toffaleti equation (SANDFG=1), the Colby
method  (SANDFG=2),  or an input power  function of velocity  (SANDFG^S)  is used.
If  sand  transport   capacity is  calculated  using the Toffaleti  or Colby methods,
the  potential sand load concentration is determined by the following conversion:

      PSAND =  (GSI*TWIDE*10.5)/ROM                                      (16)

where:
      PSAND = potential sandload expressed  in  mg/1
      GSI   =  sand  transport capacity in tons/day.ft width
              (calculated  in COLBY or TOFFAL)
      TWIDE = width of RCHRES in ft
      10.5 = conversion  factor
      ROM  =  total rate  of outflow of water from the RCHRES  in m3/sec

 If  carrying  capacity is  expressed as an input power function of velocity, PSAND

                                       259                            RELEASE 8.0

-------
                                                           Module Section SEDTRN

is calculated directly as:

     PSAND = KSAND*AWELE**EXPSND                                      (17)

where:
     KSAND  = coefficient in the sandload suspension equation (input parameter)
     EXPSND = exponent in sandload suspension equation (input parameter)
     AWELE = average velocity in ft/sec

The potential outflow of sand during the interval is:

     PROSND = (SANDS*SROVOL) + (PSAND*EROVOL)                          (18)

where:
     PROSND = potential sand outflow
     SANDS  = concentration of sand at  start of interval  (mg/1)
     SROVOL and EROVOL are as defined in Section 4.2(3).2

The potential scour from,  or deposition to,  the bed  storage  is  found using the
continuity equation:

      PSCOUR =  (VOL*PSAND) -  (VOLS*SANDS) +  PROSND -  ISAND               (19)

where:
      PSCOUR = potential  scour  (+)  or deposition  (-)
      VOL    = volume  of  water  in RCHRES at  the end of  the  interval (ft3  or m3)
      VOLS  = volume  of  water  in RCHRES at  the start of  interval (ft3 or m3)
      ISAND  =  total  inflow  of  sand into RCHRES during  interval

The  terms in  Equations   18  and 19 have  the  units   of concentration (mg/1)*volume
 (ft3  or m3)/interval.   The potential  scour is   compared to the amount  of sand
material  on  the bottom  surface available  for resuspension.   If scour demand is
 less  than available  bottom  sands,  the  demand is  satisfied in full,  and the bed
 storage is  adjusted  accordingly.  The  new suspended  concentration is PSAND.   If
 the  potential  scour   cannot be satisfied by  bed  storage,   all of  the available
 bedsand is   suspended,   and bed storage  is exhausted.     The concentration  of
 suspended sandload is calculated as:

      SAND = (ISAND + SCOUR + SANDS*(VOLS - SROVOL))/(VOL +              (20)
             EROVOL)

 where:
      SAND  - concentration of  sand at end of interval
      SCOUR = sand scoured from, or deposited to,  the bottom
      SANDS = concentration of sand at start of interval

 The total amount of sand leaving the RCHRES during the interval  is:

      ROSAND = SROVOL*SANDS + EROVOL*SAND                                (21 )

 If a   RCHRES goes dry during  an interval,  or if  tnere  is no outflow   from the
 RCHRES,  all the sand in suspension at  the beginning of  the interval is  assumed
 to settle out, and the bed storage is  correspondingly increased.


                                        260                             RELEASE 8.0

-------
                                                           Module Section SEDTRN

4.2(3).5.2.1    Calculate Sand Transport Capacity by Using Toffaleti's Method
               (subroutine TOFFAL)

Purpose

TOFFAL uses Toffaleti's method  to calculate the capacity of the  RCHRES flow to
transport sand.

Method

In Toffaleti's methodology the actual stream for  which the sand discharge  is to
be calculated is assumed  to be equivalent to & two-dimensional  stream of  width
equal to that of  the real stream and of depth equal to  the hydraulic radius of
the real stream (FHRAD).

For the purposes of calculation, the depth, FHRAD, of  the hypothetical stream is
divided into four zones shown in Figure 4.2(3).5-2.  These are:  (1)  the bed zone
of relative thickness Y/FHRAD = 2*FDIAM/FHRAD; (2) the lower zone extending from
Y/FHRAD * 2*FDIAM/FHRAD to Y/FHRAD = 1/11.24;  (3) the  middle zone extending from
Y/FHRAD ~ 1/11.24  to Y/FHRAD = 1/2.5;   and  (4)  the  upper  zone extending from
Y/FHRAD - 1/2.5 to  the surface.    (FDIAM is  the median  bed sediment diameter.)
The velocity profile is represented by the power relation:

     U =  (1 + CNV)*V*(Y/FHRAD)**CNV                                     (22)

where:
     U    = flow velocity at distance Y above  the bed  in ft/sec
     V    ~ mean stream velocity in ft/sec
     CNV  = exponent derived empirically as a  function of water
            temperature  (0.1198 +  0.00048*TMPR)
     TMPR - water temperature in degrees F

The concentration distribution of  sand is given  by  a  power  relation for  each of
the three upper zones;  i.e., by Eqs. 23-25  in Figure 4.2(3).5-2.    The  exponent,
ZI, in Eqs. 23-25 is given by:

     ZI =  (VSET*V)/(CZ*FHRAD*SLOPE)                                     (26)

where:
     VSET = settling velocity for sand in  ft/s
     SLOPE = slope  of RCHRES  in ft/ft
     CZ    = empirical  factor derived  as  a  function  of water
             temperature  (260.67  - 0.667*TMPR)

Expressions for  the   sand  transport capacity  of  the  lower   (GSL),   middle  (GSM),
and upper   (GSU)  zones   are  obtained  by substituting  U  from  Eq.  22  and the
appropriate value for   sand  particle concentration  (CD   for each  zone into the
following equation  and  integrating between  the vertical  limits of the zone:

      GSI  =  INT [LLI  to  ULI]  (CI*Udy)                                    (27)

where:
      GSI  =  sand  transport capacity for  zone I
      INT =  integral  of  function  in (  )  over limits  in  [  ]

                                       261                             RELEASE 8.0

-------
W
t-4
en
w
oo

o
                             1,0
                    Ck
                    t
                    ce
                    x
                    u.
^

1
S
25
                             .24
                                                                 Concentration
                                                          .     .     Sediment discharge
                                                 ralationa  feg. No.)     ftumbolJ ?£a. AJal
                                U* (i+CNV)»V*(Y/FHRAOH
                                      »*-CNV
                  if-
                         Upper
                         Zone
Mfddle
 Zone
                                Lower
                                 Zone
                                                                            (23)
                                                                       Cl= CM»(Y/FHRAD>»#{-ZI)

                                                                               (24)
                                                                             = CLl*(Y/FHRAD)*»
                                                                             (-O.T56tZI)
                                                                                   (33)
                                                                                                    GSU (30)
                                                                       GSM (29)
                                                                    SSL (28) and (31)
                                                                       GSB (33)
                                                - Bed Zone
                                    Conc*ntratibn,
                                            CI
           f.2(3).5-2    Toffaicfi'5 Velocity, Cw»c«ntratibn, and Se4im«rff
                         Oi'scharge  Relations (from A5C£
                                                                             I
                                                                             rt
                                                                             p-
                                                                             0
                                                                                                                                  CO
                                                                                                                                  8

-------
                                                           Module Section SEDTRN

     ULI = depth Y at upper limit of zone I
     LLI = depth Y at lower limit of zone I
     CI  = concentration of sand in zone I

The resulting equations for sand transport capacity in the three zones are:

     GSL - CMI*(((HRAD/11.24)**(1.0 + CNV - 0.758*ZI) -                (28)
           (2*FDIAM)**(1.0 + CNV - 0.756*ZI))/(1.0 + CNV - 0.756*ZI))

     GSM = CMI*(((HRAD/11.24)**(0.244*ZI)*((HRAD/2.5)**(1.0 + CNV - ZI) -
           (HRAD/11.24)**(1.0 + CNV - ZI)))/(1.O + CNV - ZI))          (29)

     GSU = CMI*(((HRAD/11.24)**(0.244*ZI)*(HRAD/2.5)**(0.5*ZI)*        (30)
           (HRAD**(1.0 + CNV - 1.5*ZI) - (HRAD/2.5)**(1.0 + CNV - 1.5*ZI)))/
           (1.0 + CNV - 1.5*ZI))

in which
     CMI = 43.2*CLI*(1.0 + CNV)*V*HRAD**(0.758*ZI - CNV)               (31)

A value for CLI, the concentration of sand in the lower zone, can be obtained by
setting the  expression for  GSL in  Eq.  28  equal to  the following  empirical
expression and solving for CLI:

     GSL = 0.6/((TT*AC*K4/V**2)**(1.67)*DIAM/0.00058)**(1 .67))        (32)

where:
     GSL   - sand transport capacity
     TT    = empirical factor derived as a function of water
             temperature (1.10*(0.051 + 0.00009*TMPR))
     AC    = empirical factor derived as a function of the kinematic
             viscosity of water  (VIS) and shear velocity based on
             shear stress due to sand grain roughness (USTAR)
     K4    = empirical factor derived as a function of AC, slope
             of the RCHRES (SLOPE), and particle diameter for which
             65% by weight of sediment is finer  (D65).
     V     = mean stream velocity in ft/sec
     FDIAM = median bed sediment diameter in ft

Values for factors AC and K4 are given in Figure 4.2(3).5-3.   The dimensions of
AC  are  such  that GSL  is  expressed  in  tons  per  day per   foot   of   width.
Consequently,  when CLI  is evaluated and substituted back into  Eqs.  28-30  the
resulting units of sand transport capacity for  all three zones  are  tons  per  day
per foot width.

Prior to calculation of sand transport capacity  for the  zones, Eq.   25 is solved
to be  sure that the  value for  concentration  at  Y=2*FDIAM does not   exceed  100
Ibs/ft3.  If it does,   the concentration at this  depth  is set equal  to  100 Ibs/
ft3 and an  adjusted value of CLI is  calculated and  used in  Eqs.   28-30.    The
transport capacity of the  final  zone, the bed  zone  (Figure 4.2(3).5-2),   is also
determined using the adjusted value of CLI and the  following equation:

     GSB = CMI*(2*FDIAM)**(1.0 + CNV - 0.758*ZI)                        (33)
                                       263                             RELEASE 8.0

-------
                                                          Modul* Section  SEDTKN
>
»


•
•
o
(E

n
3
•
O
3.0
2.0
 1.0


0.8



0.6




0.4



0.3





0.2
O.I
  20
                 30    40
            1
60    80   100
                                         AC
200      300  400     600
                                                                                       IOOO
1-3
1.0
0.8
0.6
0.4
0.3
02
/





/\






\





v
\





\
\





\
\
\
                                                                   figure  f.2/3Y5-3
                                                                     Factors in bffalefi
                                                                     Relations • a) factor
                                                                     AC in Cq.32 ;
                                                                     b) Correct i op faclpr
                                                                      kY in Bo 32 <
                                                                     A5CE
                  0.2      0.3    0.4     0.6   0.8  1.0
                            AC#(IO » »5) » SLOPE « D65
                                                                        2.0
                                    264
                                                                               RELEASE  8.0

-------
                                                           Module Section SEDTRN

The  total sand  transport capacity  (GSI)  for  the RCHRES  is the  sum of  the
transport capacities for the four zones:

     GSI = GSB + GSL + GSM + GSU                                       (34)
4.2(3).5.2.2   Calculate Sand Transport Capacity by Using Colby's Method
               (subroutine COLBY)

Purpose

COLBY calculates  the capacity  of the  RCHRES to  transport sand  based on  the
median bed  sediment diameter (DB50),   average stream velocity  (V),  hydraulic
radius (HRAD),  fine  sediment load concentration (FSL),   and water temperature
(TEMPR).

Method

The  solution  technique   used  in  this  subroutine  is   based  on  empirical
relationships developed  from Figures  4.2(3).5-4 and  4.2(3).5-5.   In  general
terms, the solution consists of three operations:

    1.  Obtain one value for sediment transport capacity from a matrix of  values
        by interpolation.    The dimensions  of the  matrix  (G)   are 4x8x6  and
        correspond to ranges of hydraulic radius, velocity, and mean diameter  of
        bed sediment,  respectively.   Since Colby's  curves were developed  on a
        log-log scale,   it is  necessary to  perform a  series of  three  linear
        interpolations of  logarithmic values to  derive the value  for sediment
        transport appropriate for the hydraulic parameters in the RCHRES.    This
        value  (GTUC)   is  not  corrected for  the  effects  of  fine  sediment
        concentration or water temperature.

    2.  Correct sand transport  capacity value to account  for water temperature
        in  RCHRES.   A  multiplier  is  obtained from  a  matrix  of values  by
        interpolation.   The dimensions of the matrix  (T) are 7x4 and correspond
        to ranges of water temperature  and hydraulic radius,  respectively.   A
        linear interpolation  of logarithmic values  is performed to  derive the
        appropriate  temperature correction  factor.    Generally speaking  sand
        transport capacity,  measured in tons per  day per foot of stream  width,
        decreases with increasing stream width  (see Figure 4.2(3).5-5).

    3.  Correct sand transport capacity value to  account for fine sediment  load
        in  RCHRES.   A  multiplier  is  obtained from  a  matrix  of values  by
        interpolation.   The dimensions of the matrix  (F) are 5x9 and correspond
        to  ranges of  fine sediment  load concentration  and hydraulic  radius,
        respectively.   Again,  a linear interpolation  of logarithmic values  is
        performed to derive the appropriate  correction factor.   Sand transport
        capacity  increases  with   increasing  fine   sediment  load   and  with
        increasing  stream width  (Figure  4.2(3).5-5).    It should  be   noted,
        however,  that  the correction  factor is not   large for  typical  stream
        conditions.    For example,   the  multiplier   corresponding  to  a  fine
        sediment load of 10,000 ppm  (with hydraulic radius of 1 foot) is  1.17.


                                      265                            RELEASE 8.0

-------
                                                          Module  Section  SEDTRN
10.000
                          Based on available data

                             Extrapolated
           i
         r\
        I  7.
                                                                    DEPTH   /   /
                                                                     100ft  /  /
                                                                    	/	/
   0.1
                                                                          7  /
                                                                               --/
   ///
                              MEAN VELOCITY, IN FEET PER SECOND
 Figure 4.2(3).5-4   Colby's  Relationship for Discharge of Sands  in  Terms of
        Mean Velocity  for  Six Median Sizes of Bed Sands, Four Depths  of  Flow,
        and Water Temperature of  60 deg. F (from Colby, 1964).
                                       266
RELEASE 8.0

-------
                                                            Module Section SEDTRN
  100
                                      10
                          DEPTH, IN FEET
         J_11_L_LU.U
 o i                i
MEDIAN DIAMETER OF BED MATERIAL.
      IN MILLIMETERS
Figure 4.2(3).5-5  Colby's Correction Factors  for Effect of Water Temperature,
       Concentration of Fine  Sediment, and Sediment Size to be  Applied to
       Uncorrected Discharge  of  Sand Given by  Figure 4.2(3).5-4 (from Colby,
       1964).
                                        267
      RELEASE 8.0

-------
                                                           Module Section SEDTRN

The following additional  comments are important to understanding  and using the
COLBY subroutine in HSPF:

    1.  Fine sediment load is defined as the sum of suspended silt and clay.

    2.  If the  value for median bed  sediment diameter,  hydraulic  radius,  or
        average velocity  for the RCHRES for  a given simulation  interval falls
        outside the range of values considered in Colby's graphs, a solution for
        sand transport capacity cannot be obtained by the Colby method.  In this
        case, an error message is printed which specifies which parameter is out
        of range,   and subroutine  TOFFAL is automatically  called to  obtain a
        solution using the Toffaleti method.

        Acceptable ranges of parameter values for COLBY are:
          (a)  median bed sediment diameter  0.1-0.8 mm
          (b)  hydraulic radius              0.1-100 ft
          (c)  average velocity              1.0-10.0 ft/s

    3.  Both  the Colby  and  Toffaleti formulations  equate  depth  of flow  to
        hydraulic  radius.    This  approximation  is   best  for  wide  rivers.
        Subroutines COLBY  and TOFFAL were  obtained and modified  from Battelle
        Northwest Laboratories' SERATRA model (Onishi and Wise,  1979).   In this
        model, the depth of flow values in Figures 4.2(3).5-4 and 4.2(3).5-5 are
        equated to hydraulic  radius values,  and the HSPF version  of COLBY has
        done the  same.   To  the best  of our  knowledge the  accuracy of  this
        approximation for narrow streams has not been documented.
                                       268                            RELEASE 8.0

-------
                                                            Module Section GQUAL

4.2(3).6   Simulate the Behavior of a Generalized Quality Constituent
           (Module Section GQUAL)

Purpose

The purpose of this code is to enable the model user to simulate the behavior of
a generalized constituent.   The constituent which  is modeled may be present in
the RCHRES only in a dissolved state, or it may also be sediment-associated.  If
the generalized quality  constituent,  which will be called  a "qual" throughout
this discussion,   is not associated with  sediment,  module section  GQUAL only
considers the following processes:

     1.  Advection of dissolved material

     2.  Decay processes.  One or more of the following can be modeled:
         a.  hydrolysis
         b.  oxidation by free radical oxygen
         c.  photolysis
         d.  volatilization
         e.  biodegradation
         f.  generalized first-order decay

     3.  Production of one generalized quality constituent  as a result of decay
         of another generalized  quality constituent by any of  the listed decay
         processes except volatilization.   This capability is included to allow
         for situations in which the decay products of a chemical are of  primary
         interest to the user.

The following  additional processes  are considered  if the  generalized  quality
constituent being modeled is sediment-associated:
     4.  Advection of adsorbed suspended material

     5.  Deposition and scour of adsorbed material

     6.  Decay of suspended and bed material

     7.  Adsorption/desorption between dissolved and
         sediment-associated phase.


Schematic View of Fluxes and Storage

Figure 4.2(3).6-1 illustrates the fluxes and  storages modeled  in  section  GQUAL.
Note  that the  arrows  indicating fluxes   from each  of   the sediment   fraction
storages are  not all  labeled.   For instance,   although deposition   and scour
transfer materials  between the suspended storage   and bed storage of   all three
sediment fractions (sand, silt, clay),  only  the flux arrow  for deposition/scour
of clay is  labeled.   Deposition/scour flux  arrows for  sand and  silt   are left
unlabeled  so  that the  flow  diagram  does  not   become  overly  cluttered  and
incomprehensible.  The same convention is used for  the other fluxes contained in
the flow diagram  (i.e.,  an unlabeled flux  arrow  indicates that  a flux  of the
same nature as a parallel labeled flux occurs).

                                      269                            RELEASE 8.0

-------
                                                   Module Section GQUAL
RODQAL
 outflow

 solution
                                constituent on »««p-  sediment SQAL
             6-1
Flow diagram for generalized quality
constit-ufiTfr ih th*  GQUAL seltion of
RCHRE5 Application module.
                                 270
                                      RELEASE 8.0

-------
                                                            Module Section GQUAL

Approach

The first portion of  GQUAL evaluates the nature of the data  which will be used
for the GQUAL simulation.    Since it is anticipated that some  users of section
GQUAL will be using this section independently  of many of the other sections of
the  RCHRES application  module,   a variety  of data  types  are allowed.    In
particular,  most data required for simulation of individual decay processes can
be supplied  in the form  of a single constant,   12 monthly constants,   a time
series value from the INPAD,  or in cases  where the data value is calculated in
another active section of  RCHRES,  the last computed value may  be used.   Data
types which may be obtained from any one of these sources include:

     1.  water temperature
     2.  pH (for hydrolysis)
     3.  free radical oxygen (for oxidation)
     4.  total suspended sediment (for photolysis)
     5.  phytoplankton (for photolysis)
     6.  cloud cover (for photolysis)
     7.  wind (for volatilization on lakes)

GQUAL  utilizes six  subroutines  to perform  the  simulation  of a  generalized
quality constituent.  These six subroutines and their functions are:

     1.  OXREA:  compute oxygen reaeration rate (used in
                 simulation of qual volatilization)
     2.  ADVECT: simulate advection of dissolved material
     3.  DDECAY: simulate decay of dissolved material
     4.  ADVQAL: advect sediment-associated material
                 (deposition and scour are also considered)
     5.  ADECAY: simulate decay of qual adsorbed to suspended
                 and bed sediment
     6.  ADSDES: simulate exchange of materials due to
                 adsorption and desorption

Details on  the methods  used by  these subroutines  are provided  in  functional
descriptions  4.2(3)3.1,   4.2(3).7.1.2,   and  4.2(3).6.1   through  4.2(3).6.4,
respectively.   GQUAL  is also responsible for  the calculation of  increases in
qual material resulting  from decay of a  "parent" chemical.   The HSPF   code is
designed so that  a user may specify  that a "daughter" chemical  is produced by
any or all of  the six decay processes  (except volatilization)   which degrade  a
"parent" qual (except volatilization).  However, certain restrictions  are placed
on the  daughter/parent relationship.    Simulation of  up to  three generalized
quality constituents is allowed.   Qual #2 may  be produced  by decay of  qual #1.
Qual #3 may be produced by decay of qual #1 and/or qual #2.  Other relationships
are not allowed.  The user should sequence his quality constituents accordingly.
The  amount of  "daughter"  qual produced  by  decay  of a   "parent"   qual  by   a
particular decay process is calculated as:

     PDQAL(I) = DDQAL(K,J)*C(I,J,K)                                      (1)

where:
     PDQAL(I)   = amount of daughter qual I produced by decay of
                  parent qual J through process K expressed  in
                  (concu/l)*(ft3/ivl) or  (concu/l)*(m3/ivl)

                                      271                            RELEASE 8.0

-------
                                                            Module Section GQUAL

     DDQAL(K,J) = amount of parent material decayed by process K
                  expressed in same units as PDQAL(I)
     C(I,J,K)   = amount of qual I produced per unit of qual J
                  degraded by process K in units of concu I/concu J

After the  amount of  decay resulting from  all active  decay processes  and the
amount  of  input of  qual  produced  by  decay  of parent  qual(s)   have  been
calculated, the new dissolved concentration of a qual is computed as:
     DQAL(I) = DQAL(I) + (PDQAL(I) - DDQAL(7,I))/VOL
                                                       (2)
where:
     DQAL(I)
     PDQAL(I)
     DDQAL(7,I)
     VOL
concentration of dissolved qual I
amount of qual I produced by decay of parent qual(s)
total amount of qual I degraded by the decay processes
volume of water in the RCHRES
Additional Requirements

HSPF allows a maximum of 3 general  quality constituents.   The user  selects  the
units for  each constituent;  thus,   different constituents may  have  different
units.   For example,  the user may simulate fecal and total coliforms  expressed
in organisms  per ml and  a pesticide expressed in  milligrams per  liter   in  the
same simulation*    In order to provide  this flexibility,  additional  input is
required.   For each  constituent the following information must  be  provided in
the User's Control Input:

     1. GQID:   the name of the constituent (up to 20 characters  long)

     2. QTYID:  this string (up to 8 characters)  contains  the units used  to
                describe the quantity of constituent entering or  leaving  the
                the RCHRES, and the total quantity of material stored in  it.
                Examples of possible units for QTYID are  'Morg' for millions
                of organisms or  'Ibs1 for pounds

     3-  CONCID: the concentration units for each  decay constituent  (up to 4
                characters long); examples are  '#' or  'mg1.  It is implied
                that these units are "per 1".

     4.  CONV:  conversion factor from QTYID/VOL  to desired concentration
                units: CONG = CONV*(QTY/VOL)  (in  English  system,  VOL  is
                expressed in ft3; in metric system, VOL  is expressed  in m3)
                For example, if:
                    CONCID is mg/1,
                    QTYID is kg, and
                    VOL is m3,
                then CONV *  1000.
                                       272
                                                    RELEASE 8.0

-------
                                                            Module Section GQUAL

4.2(3).6.1    Simulate Decay of Dissolved Material
             (subroutine DDECAY)

Purpose

DDECAY simulates the degradation of generalized quality constituents by chemical
and/or biological means.  Six processes are considered:

    1.  hydrolysis
    2.  oxidation by free radical oxygen
    3.  photolysis
    4.  volatilization
    5.  biodegradation
    6.  generalized first-order decay

Discussion

The primary reference used in the development of this subroutine was the SERATRA
User's Manual (Onishi and Wise, 1979).   As was the case with the SERATRA model,
HSPF includes detailed  degradation methods only for the dissolved  state of  the
quality constituent  (qual);  decay of  qual material  in the adsorbed  state is
handled  by   a  lumped   first-order  decay   function  in   subroutine  ADECAY
(4.2(3).6.3).   Formulations of  the degradation processes are  based on studies
conducted by Smith et al.   (1977,  1979),  Zepp and Cline (1977),  Falco et  al.
(1976), and Mill et al.   (1980).   Users who are familiar with the formulations
utilized in SERATRA should  note that modifications have been made  in DDECAY to
the algorithms which represent photolysis and volatilization.  These changes  are
outlined in the following description of methods.  An additional modification to
SERATRA  which should  be noted  is that  all degradation  processes modeled   in
DDECAY contain a temperature correction factor.

Methods

Hydrolysis

Hydrolysis is defined as any reaction that takes place in water, without the  aid
of light or microorganisms,   in which a compound is transformed  to a different
compound as a result of a reaction with water.   The rate of change of dissolved
qual concentration  due to hydrolysis  is sensitive to  changes in pH  and  water
temperature.  In HSPF,  the equation presented by Smith et al.  (1977) is modified
to include a temperature correction factor and rewritten as:

     KHYD =  (KA*10.0**(-PHVAL)  + KB*10.0**(PHVAL - 14.0) + KN)*          (3)
            THHYD**TW20

where:
     KHYD  = hydrolysis rate constant for qual adjusted for pH
             and water  temperature conditions of RCHRES
     KA    = hydrolysis rate coefficient for qual in acidic solution  (pH5)
     KB    = hydrolysis rate coefficient for qual in basic solution  (pH9)
     KN    = hydrolysis rate coefficient for qual in neutral  solution  (pH7)
     PHVAL = pH of water in RCHRES
     THHYD = temperature correction parameter for hydrolysis
     TW20  = TW  (water  temperature in degrees C) - 20.0

                                      273                            RELEASE  8.0

-------
                                                            Module Section GQUAL

The  hydrolysis rate  coefficients (KA,   KB,  KN)   for a  particular qual  are
determined  by  standard laboratory  tests  (ASTM,   1980).   Depending  on  the
availability of data  and the needs of  the model user,  pH  information for the
hydrolysis equation  can be supplied  as (1)   one constant value,   (2)  twelve
monthly values,  or (3)  a time series.   The time series can either be an input
time series or the results of pH simulation if section RQUAL is active and pH is
simulated.

Oxidation by Free Radical Oxygen

Two general  types of  oxidation reactions can  be distinguished  for evaluating
chemical oxidation processes in an aquatic environment (Mill et al., 1980):

    1.  Reaction of an  excited state of a  molecule with oxygen,  in  which the
        excited state is produced by direct  photolysis or by interaction with a
        photosensitizer; this process is termed photooxidation.

    2.  Reaction of the ground state of  the chemical with oxidants in solution,
        in which the oxidants are formed  by reactions of dissolved or suspended
        natural  materials in  solution;   these  reactions are   termed  thermal
        oxidation,  autoxidation,   or simply oxidation.   The  ultimate driving
        force  for oxidant  formation  may,   however,  often  be  photochemical
        reactions of the natural materials.

In HSPF,  photooxidation is considered as one of  the photo-initiated degradation
processes  collectively labelled  as photolysis.    Consequently,  only  thermal
oxidation is considered in the following formulation.   The rate  of oxidation of
dissolved qual is  expressed as a function of free  radical oxygen concentration
(ROC) and water temperature:

     KROX = KOX*ROC*(THOX**TW20)                                         (4)

where:
     KROX = oxidation  rate constant for qual adjusted  for  free
            radical oxygen concentration and water  temperature
     KOX  = base oxidation rate coefficient  for qual
     ROC  = free radical oxygen concentration expressed as moles/1  (M)
     THOX = temperature correction parameter for  oxidation
     TW20 = TW (water  temperature in degrees C) - 20.0

The oxidation  rate  coefficient  (KOX)   for  a qual is   determined  from  laboratory
tests.   Mill  et al.   (1980) cites  two groups of  oxidants  which  are  likely to be
important in natural waters:   alkylperoxy  radicals  and singlet molecular oxygen.
The overall free  radical oxygen concentration can  be  specified  by  the user as  a
constant value, twelve monthly values,  or  a  time  series.

Photolysis

Photochemical  transformation of   chemicals can  occur  when energy in  the form of
light  is  absorbed by   a molecule,  placing  it in  an  excited state  from which
reaction  can   occur.    Direct  photolysis  of  chemicals occurs when   the chemical
molecule  itself  absorbs  light  and undergoes  reaction  from its  excited state.
Indirect  photolysis occurs when  another  chemical species,  called  a sensitizer,
absorbs light   and the  sensitizer  transfers  energy  from  its excited  state to

                                       274                            RELEASE 8.0

-------
                                                            Module Section GQUAL

another chemical,   which then  undergoes reaction.    There are  many types  of
photochemical   reactions,    including  oxidation,    reduction,    hydrolysis,
substitution, and rearrangement.  In practice it is possible to measure the rate
constant for photochemical reaction or a  reaction quantum yield without knowing
the types of reactions which are occurring (Mill et al., 1980).  The formulation
of photolysis developed for HSPF is intended to measure the net degradation of a
generalized quality constituent which results from photochemical reactions.

The  basic equation  for  rate  of loss  of  a qual  in  dilute  solution in  an
environmental water  body due  to absorbance  of light  of wavelength  lambda is
given by:

     KPHOL = ((PHI*INLITL)/DEP)*FSLAM*FQLAM                             (5)

where:
     KPHOL  = rate of loss of qual due to photolysis from absorption
              of light of wavelength lambda
     PHI    = reaction quantum yield for photolysis of qual expressed
              in moles/einstein
     INLITL = incident light intensity of wavelength lambda in
              einsteins/cm2.day
     DEP    = depth of water
     FSLAM  = fraction of light absorbed by the system
     FQLAM  == fraction of absorbed light that is absorbed by qual

The solution  technique outlined by Mill  and implemented in HSPF  uses seasonal
day-averaged, 24-hour light intensity values (LLAM)  for 18 wavelength intervals
from 300 nm to 800 nm.    In order to use these values,  the relationship between
the light intensity variable (INLITL) in Eq. 5 and the tabulated values for LLAM
must be defined.  The relationship derived by Mill for relatively clear water or
shallow depths can be written as:

     INLITL « LLAM/2.3*BETA                                              (6)

where:
     BETA = LLIT/DEP
     LLIT = path length of light through water
     DEP  = depth of water

Further,  the effects of  cloud cover on light intensity are introduced by  adding
factor CLDLAM:

     INLITL = (LLAM/2.3*BETA)*CLDLAM                                     (7)

where:
     CLDLAM = fraction of total light intensity of wavelength
              lambda which is not absorbed or scattered by clouds

CLDLAM is calculated as:

     CLDLAM « (10.0 - CC*KCLDL)/10.0                                     (8)

where:
     CC    = cloud cover  in tenths

                                      275                            RELEASE  8.0

-------
                                                            Module Section GQUAL

     KCLDL = efficiency of cloud cover in intercepting light
             of wavelength lambda,  a user supplied parameter
             (default value 0.0)

By substitution of Eq. 7 into Eq. 5 the general equation for the photolysis rate
of a qual due to absorbance of light of wavelength lambda can be expressed as:

     KPHOL = ((PHI*LLAM*CLDLAM)/2.3*BETA*DEP)*FSLAM*FQLAM               (9)

The general  mathematical expression for the  fraction of light absorbed  by the
water system (FSLAM) is:

     FSLAM = 1.0 - 10**(-KLAM*LLIT)                                     (10)

The exponential  coefficient,  KLAM,   in this equation  has two  components for
laboratory conditions:

     KLAM = ALPHL + EPSLAM*C                                            (11)

where:
     ALPHL  = base absorbance term for light of wavelength lambda
              for the system expressed as /cm
     EPSLAM = absorbance term for light of wavelength lambda
              absorbed by qual expressed as I/mole.cm
     C      = concentration of qual expressed as moles/1

For environmental systems, the effects of light absorbance by suspended sediment
and phytoplankton are introduced to the formulation, and KLAM is expanded  to:

     KLAM = ALPHL + EPSLAM*C + GAMLAM*SED + DELLAM*PHYTO                (12)

where:
     GAMLAM = absorbance term for light absorbed by  suspended
              sediment in 1/mg.cm
     SED    = total suspended sediment in mg/1
     DELLAM = absorbance term for light absorbed by  suspended
              phytoplankton in  1/mg.cm
     PHYTO  = phytoplankton concentration in mg/1

Because  the concentration  of qual   is assumed  small,   the   fraction of   total
absorbance of   light  in  the  water  system which  results  from  absorbance   by the
qual is assumed negligible, and  the term  (EPSLAM*C)  is  dropped  from Eq.  12.   By
substituting the modified value  of KLAM into  Eq.  9 ,    setting LLIT = BETA*DEP
(from Eq.  6),  and  assuming that BETA =1.2  (Mill, 1980),   the  final form  of the
expression for  FSLAM  is  obtained:

     FSLAM = 1.0 -  10**(-1,2*KLAM*DEP)                                  (13)

The remaining  term  of the general equation  for photolysis (Eq.   9)  which must be
evaluated is FQLAM,  the  fraction of total absorbed light  that  is absorbed  by the
qual. This term is  evaluated  as:

     FQLAM = (EPSLAM*C)/KLAM                                            (14)


                                       276                             RELEASE 8.0

-------
                                                            Module Section GQUAL

Eq. 9 can be rewritten as:

     PHOFXL = ((PHI*LLAM*CLDLAM)/2.3*BETA*DEP)*                         (15)
              (1.0 - 10**(-1.2*KLAM*DEP))*(EPSLAM*C/KLAM)

To obtain the rate of loss of qual due to photolysis from absorption of light of
all wavelength intervals, Eq. 15 must be summed over LLAM:

     KPHO = (PHI/(2.76*DEP))*(SUM [1 to 18] ((LLAM*                     (16)
            CLDLAM*EPSLAM/KLAM)*(1.0 - EXP(-2.76*KLAM*DEP))

The equation for the degradation rate due  to photolysis used in HSPF is further
complicated by  correction factors  for surface  shading and  water temperature.
The final rearranged and expanded formulation is:

     KPHO = (CF*DELT60/24.)*PHI*(SUM [1 to 18]  ((LLAM*                  (17)
            CLDLAM/2.76*KLAM*DEP)*(1.0 - EXP(-2.76*KLAM*
            DEP))*EPSLAM))*THPHO**TW20

where:
     SUM       = summation of function in  ( ) over limits in  [  ]
     CF        = factor accounting  for surface  shading
     DELT60/24 = conversion from day to ivl
     THPHO     = temperature correction parameter for photolysis
     TW20      = TW  (water temperature in degrees C) - 20.0

For simulation intervals of less than 24  hours,  photolysis  is assumed to occur
only between 6:00 AM and 6:00 PM during approximate daylight  hours.  In order  to
obtain a solution which is reasonably consistent  with the input seasonal,   day-
averaged,  24-hour light intensity  values,  the daily light intensity is assumed
to  be  uniformly distributed  over the   12 hours  from  6:00  AM  to   6:00  PM.
Consequently,  calculated photolysis rates are  doubled during daylight  hours and
set equal to zero for non-daylight  hours.   It  should be noted  that five look-up
tables for solar  intensity values  (LLAM)  are  incorporated   into HSPF.   Tables
4.2(3).6-1 through 4.2(3).6-5 show  the values for seasonal day-averaged, 24  hour
light intensity at 1O, 20, 30, 40,  and 50 degrees latitude.   The Run Interpreter
checks the input latitude  for the  study area and selects  the  appropriate table
from which to extract values.   Additional input required to  simulate photolysis
in subroutine DDECAY include:

    1.  Molar absorption coefficients for each  of the 18 wavelengths
    2.  Reaction quantum  yield for  qual  (PHI)
    3.  Temperature correction parameter for photolysis  (THPHO)
    4.  18 values for base absorbance term for  water system  (ALPHL)
    5.  18 values for absorbance term for  light absorbed by
        suspended sediment  (GAMLAM)
    6.  18 values for absorbance term for  light absorbed by
        phytoplankton (DELLAM)
    7.  Cloud cover values.  Either a time series or 12 monthly
        values may be supplied.
    8.  Total suspended sediment values.   Either a time  series
        or 12 monthly values may be supplied.
    9.  Phytoplankton values.  Either a  time series or  12
        monthly values may  be supplied.

                                      277                            RELEASE 8.0

-------
Table 4.2(3).6-1  Solar Intensity Values for Latitude 10 N
Wavelength,    Solar Intensity, milli-einsteins/cm2.day
Nanometers    Spring      Summer        Fall       Winter
300
303.75
308.75
313.75
318.75
323.1
346
370
400
430
460
490
536.25
587.5
637.5
687.5
756
800
1 .02E-2
1.78E-2
2.85E-2
3.27E-2
4.18E-2
3.70E-2
3.39E-1
4.33E-1
8.40E-1
1.16
1.47
1.50
2.74
2.90
2.90
2.80
2.70
3.00
4.66E-4
3.16E-3
9.37E-3
1.90E-2
2.91E-2
2.65E-2
3.29E-1
4.38E-1
8.37E-1
1.17
1.47
1 .50
2.69
2.79
2.80
2.80
2.70
2.50
4.19E-4
2.87E-3
8.51E-3
1.73E-3
2.66E-2
2.91E-2
2.99E-1
3.85E-1
7.64E-1
1.07
1.36
1.37
2.46
2.52
2.60
2.60
2.50
2.30
3.20E-4
2.39E-3
7.26E-3
1.51E-2
2.38E-2
2.36E-2
2.92E-1
3.44E-1
6.96E-1
9.80E-1
1.23
1.27
2.26
2.35
2.43
2.30
2.40
2.10
Table 4.2(3).6-2  Solar Intensity Values for Latitude 20 N
Wavelength,    Solar Intensity, milli-einsteins/cm2.day
Nanometers    Spring      Summer        Fall       Winter
300
303.75
308.75
313.75
318.75
323.1
340
370
406
430
460
490
536.25
587.5
637.5
687.5
750
800
3.51E-4
2.51E-3
8.09E-3
1 .81E-2
2.82E-2
2.83E-2
3.29E-1
4.24E-1
8.41E-1
1.17
1.47
1.50
2.68
2.80
2.80
2.80
2.76
2.50
4.44E-4
3.15E-3
9.61E-3
1.97E-2
3.02E-2
3.03E-2
3.47E-1
4.47E-1
8.83E-1
1.23
1.55
1.58
2.81
2.96
2.90
3.00
2.80
2.70
2.74E-4
2.20E-3
6.89E-3
1 .48E-2
2.33E-2
2.33E-2
2.68E-1
3.45E-1
6.96E-1
9.80E-1
1.24
1 .26
2.30
2.35
2.42
2.40
2.20
2.26
1.47E-4
1.47E-3
5.34E-3
1 . 1 5E-2
1.88E-2
1 .88E-2
2.21E-1
2.86E-1
5.97E-1
8.40E-1
1.06
1 .09
1.95
2.03
2.07
2.10
2.36
1.60
                               278                             RELEASE 8.0

-------
Table 4.2(33.6-3  Solar Intensity Values for Latitude 30 N
Wavelength,
Nanometers
 Solar Intensity, milli-einsteins/cm2.day
Spring      Summer        Fall       Winter
300
303.75
308.73
313.75
318.75
323.1
340
370
400
430
460
490
536.25
587.5
637,5
687.5
750
800
2.30E-4
2.13E-3
7.26E-3
1 .65E-2
2.64E-2
2.69E-2
3.20E-1
4.14E-1
8.27E-1
1.15
1.45
1.48
2.64
2.74
2.76
2.80
2.70
2.50
3.65E-4
2.32E-3
9.02E-3
1.92E-2
3.02E-2
3.04E-2
3.74E-1
4.37E-1
9.07E-1
1.34
1.59
1.62
2.89
3.03
3.00
3,00
2.90
2.80
1 . 35E-4
1.44E-3
4.84E-3
1 . 1 6E-2
1 .89E-2
2.30E-2
2.23E-1
2.84E-1
6.23E-1
8.50E-1
1 .09
1 .11
2.00
2.07
2.09
2.10
2.10
1.90
4.10E-5
6.50E-4
2.76E-3
7.55E-3
1 .31E-2
1.34E-2
1.70E-1
2.19E-1
4.75E-1
6.69E-1
8.50E-1
8.80E-1
1.57
1.63
1.67
1.73
1.63
1.60
Table 4.2(3).6-4  Solar Intensity Values for Latitude 40 N
Wavelength,
Nanometers
 Solar Intensity, milli-einsteins/cn»2.day
Spring      Summer        Pall       Winter
300
303.75
308.75
313.75
318.75
323.1
340
370
400
430
460
490
536.25
587.5
637.5
687.5
750
800
1.09E-4
1.37E-3
2.96E-3
7.99E-3
1 .38E-2
1 .42E-2
1 .78E-1
2.30E-1
5.26E-1
6.76E-1
8.90E-1
9.23E-1
1 .69
1.73
1 .78
1.50
1.70
1.60
2.49E-4
2.32E-3
7.93E-3
1.81E-2
2.91E-2
2.97E-2
3.54E-1
4.58E-1
9.71E-1
1.28
1.43
1.63
2.92
3.05
3.00
3.10
2.90
2.90
1 .09E-4
1 .37E-3
5.35E-3
1 . 38E-2
2.319E-2
2.39E-2
1.08E-1
3.84E-1
7.91E-1
1 .11
1.39
1.42
2.52
2.62
2.60
4.70
2.60
2.50
5.38E-6
1.56E-4
1.02E-3
3.79E-3
7.53E-3
8.10E-3
7.52E-2
1 .47E-1
3.38E-1
4.80E-1
6.10E-1
6.20E-1
1.12
1 .16
1.19
1.39
1.20
1 .16
                              279
                                                             RELEASE 8.0

-------
Table 4.2(3).6-5  Solar Intensity Values for Latitude 50 N
Wavelength,    Solar Intensity, milli-einsteins/cm2.day
Nanometers    Spring      Summer        Fall       Winter
300
303.75
308.75
313.75
318.75
323.1
340
370
400
430
460
470
536.25
587.5
637.5
687.5
750
800
3.71E-5
7.10E-4
3.55E-3
7.30E-3
1.84E-3
1.96E-2
2.66E-1
3.48E-1
7.24E-1
1.02
1.29
1.32
2.34
2.40
2.44
2.50
2.50
2.30
7.88E-6
1.75E-3
6.53E-3
1.63E-2
2.67E-2
2.77E-2
3.43E-1
4.44E-1
9.04E-1
1.26
1.60
1.63
2.90
3.04
3.00
3.10
2.90
2.90
1.52E-4
2.25E-4
1.29E-3
4.39E-3
8.64E-3
9.20E-3
1 .24E-1
1 .66E-1
3.65E-1
5.17E-1
6.60E-1
6.80E-1
1.22
1.25
1.31
1.34
1.31
1 .24
4.00E-7
1.57E-5
1 . 78E-4
1.20E-3
2.93E-3
3.68E-3
6.29E-2
8.21E-2
1.96E-1
2.75E-1
3.51E-1
3.55E-1
6.30E-1
6.40E-1
6.90E-1
7.10E-1
7.10E-1
6.90E-1
                               280                             RELEASE 8.0

-------
                                                            Module Section GQUAL

Volatilization

Volatilization  of a  chemical that  is dissolved  in  water is  defined as  the
transport of the chemical from the  water to the atmosphere.   The concentration
of the chemical in water decreases even  though a transformation does not occur.
Thus, volatilization is not a degradation process in the strict sense, since the
chemical which  leaves a  water body  by volatilization  is not  biologically or
chemically degraded.  Current evidence suggests that volatilization is likely to
be the major aquatic fate of low  molecular weight,  nonpolar compounds that are
not rapidly  biodegraded or  chemically transformed.    Volatilization rates  of
higher  molecular  weight  compounds  can  also  be  significant  under  certain
conditions (Smith, 1979).

In HSPF,   the volatilization rate  of a qual is  tied to the  oxygen reaeration
coefficient:

     KVOL = KOREA*CFGAS                                                (18)

where:
     KVOL  = rate of loss of qual from water due to volatilization
     KOREA = oxygen reaeration coefficient calculated by subroutine
             OXREA (4.2(3).7.1.2)
     CFGAS = ratio of volatilization rate of qual to oxygen reaeration
             rate, an input parameter.

The  value for  input parameter  CFGAS can  be determined  as the  ratio of  the
molecular diameter of oxygen to the molecular diameter of the qual.

Biodegradation

Biodegradation is  one of  the most  important processes  for transformation  of
chemical compounds  when they  enter into  natural environments.    Many organic
chemicals  are   used  by   living  cells   for  carbon   and  energy   sources.
Microorganisms metabolize a  wide variety of organic  compounds,  including many
man-made chemicals (Chou, 1980).  The rate of biodegradation of a dissolved qual
is expressed as  a function of the  concentration of biomass which  degrades the
qual (BIO) and water temperature:

     KBIO - KBMASS*BIO*(THBIO**TW20)                                   (19)

where:
     KBIO   = biodegradation rate constant for qual adjusted for
              biomass concentration and water temperature
     BIOCON = base biodegradation rate coefficient for qual
     BIO    = concentration of biomass that is involved in qual
              degradation
     THBIO  = temperature correction parameter for biodegradation
     TW20   = TW  (water temperature in degrees C) - 20.0
                                      281                            RELEASE 8.0

-------
                                                            Module Section GQUAL

Biomass data may be supplied by a constant,  12 monthly values, or a time series.
HSPF allows for  the fact that a  different population of microorganisms  can be
involved in the biodegradation of each different generalized quality constituent
by  requiring  the user  to  specify  a unique  set  of  biomass data  for  each
constituent which is simulated.

Generalized First-order Decay

Generalized first-order decay of the dissolved state  of a qual may be simulated
in addition to,  or instead of,   the individual decay processes outlined above.
The equation used to calculate rate of decay is:

     KGEN = KGEND*THGEN**TW20                                          (20)

where:
     KGEN  = generalized first-order decay rate for a qual
             corrected for temperature
     KGEND = base first-order decay rate for a qual
     THGEN » temperature correction parameter for first-order decay

After decay rates for all of the processes which are active for a qual have been
calculated, they are summed to determine a total decay rate.   At this point  the
total loss of qual material resulting from decay is evaluated:

     DDQALT = DQAL*(1.0 - EXP(-KTOTD))*VOL                              (21)

where:
     DDQALT = loss of qual due to all forms of degradation,
              expressed in  (concu/l)*(ft3/ivl) or  (concu/l)*(m3/ivl)
     DQAL   = concentration of dissolved qual in concu/1
     KTOTD  — total decay rate of qual per interval
     VOL    = volume of water in the RCHRES

Finally,    to determine  the  amount of  material  degraded   by each   individual
process, a  linear proration is performed based on  the  total decay of  material:

     DDQAL(I) =  
-------
                                                            Module Section GQUAL

4.2(3).6.2  Simulate Advection of Material on Sediment
            (subroutine ADVQAL)

Purpose

ADVQAL  simulates the  advective processes  for the  quality constituent   (qual)
attached to one  sediment size fraction.   Processes handled  in this subroutine
include:

    1.  Inflow to the RCHRES of qual attached to suspended sediment.

    2.  Migration of qual from suspension in the water to the bed as a result  of
        deposition of the sediment to which the qual is adsorbed.

    3.  Migration of qual from the bed into  suspension in the water as a  result
        of scour of the bed sediments to which the qual is adsorbed.

    4.  Outflow from the RCHRES of qual attached to suspended sediment.

Method

The movement  of adsorbed  qual is completely  dictated by  the movement   of the
sediment to which it is attached.   All fluxes of adsorbed qual are expressed  as
the product of the flux of a sediment  fraction (sand,  silt,  or clay)  and the
concentration of qual  associated with that fraction (expressed in  concu  per  mg
of sediment).   Likewise, storages of adsorbed qual are expressed as the product
of the  sediment  fraction storage and the associated concentration  of qual.    A
simplified flow diagram  of sediment and associated qual fluxes  and storages  is
provided in Figure 4.2(3).6-2  to facilitate the following discussion.  Note  that
ADVQAL  is designed to operate  on one sediment fraction and one qual each time  it
is called by subroutine GQUAL.

If the  sediment simulation in  module section  SEDTRN indicates that scour  of bed
storage  of a  sediment fraction  occurs,  the  following actions  are taken   in
ADVQAL:

    1.  Bed storage of adsorbed qual is updated.

    2.  Flux of  qual from bed to suspension (DSQAL)  is  set equal to  the bed
        storage of the qual   (RBQAL)  if the entire bed storage  of the sediment
        fraction is scoured.

    3.  If only part of the bed storage of the sediment fraction is scoured, the
        flux of qual from bed  to suspension is calculated as:

     DSQAL = BQAL*DEPSCR                                                (23)
                                      283                             RELEASE  8.0

-------
                                           Module Section GQUAL
       SEDIMENT
                                         QVAL
ISEO
 RSE.D
(storage)
ROSED
                        SUSPENSION
        PSCR
         BSED
        frtorag*)
(SGML
                              |	
                     BEP
   R5QAL
 ladsorbad
 stora^)

 (adsorbed
conc«ntr«tio)f
RQ5QAL
                                                     VSQAL
                                                     (H'-t-)
                             RBQAL
                           (adsorbed
                            storage)
                                             /
                                             (adsor
                                             conctntrtfibn)
      Figure 12(3). 6-2    Simplified  flov digram for
         important "fluxes and storages of  sediment  and
         associated qua!  used  in subroutine ADVQAL.
                             284
                                             RELEASE 8.0

-------
                                                            Module Section GQUAL

where:
     DSQAL  = amount of qual scoured from bed and added to
              suspension expressed in (concu/1)*(ft3/
              ivl) or (concu/1)*(m3/ivl)
     BQAL   = concentration of qual on bed sediment fraction
              under consideration in concu/mg sediment
     DEPSCR = amount of sediment fraction which is scoured from
              the bed expressed in mg.ft3/1.ivl or mg.m3/l.ivl

    4.   Concentration of adsorbed qual in suspension is
         updated to account for scour:

     SQAL = (ISQAL + RSQALS - DSQAL)/(RSED + ROSED)                     (24)

where:
     SQAL   = concentration of adsorbed qual in suspension
              expressed as concu/mg suspended sediment fraction
     ISQAL  = inflow of qual to the RCHRES as a result
              of inflowing sediment fraction, expressed
              as (concu/1 )*(ft3/ivl) or (concu/1 )Mm3/ivl)
     RSQALS = storage of qual on suspended sediment fraction
              expressed in (concu/l)*ft3 or  (concu/l)*m3
     RSED   = amount of sediment fraction in suspension
              at end of interval expressed in mg.ft3/l or mg.m3/l
     ROSED  = amount of sediment fraction contained in
              outflow from the RCHRES during the interval
              expressed in mg.ft3/l.ivl or mg.m3/l.ivl

    5.   Amount of qual leaving the RCHRES as outflow is determined as:

     ROSQAL = ROSED*SQAL                                                (25)

If the sediment simulation in module section SEDTRN indicates that deposition  of
suspended sediment occurs, ADVQAL performs the following operations:

    1.   Concentration of qual on total suspended sediment
        fraction (inflow + suspended storage) for the
        RCHRES is calculated:

     SQAL = {ISQAL + RSQALS)/(RSED + DEPSCR + ROSED)                    (26)

    2.   Amount of qual leaving the RCHRES due to outflow
        of sediment fraction is determined:

     ROSQAL = ROSED*SQAL                                                (27)

    3.   Amount of qual leaving suspension due to deposition
        of the sediment to which it is adsorbed is found by:

     DSQAL = DEPSCR*SQAL                                                (28)
                                      285                             RELEASE 8.0

-------
                                                            Module Section GQUAL

    4.   The concentration of qual on sediment in suspension
        is set equal to zero if the suspended storage of
        sediment is zero.

    5.   The concentration of qual on bed sediment is set
        equal to zero if the storage of bed sediment at the
        end of the interval is zero.

    6.   If there is bed sediment at the end of the interval,
        the bed storage of qual associated with the sediment
        fraction is calculated as:

     RBQAL = DSQAL + RBQALS                                            (29)

    7.   The concentration of qual on bed sediment is
        determined:

     BQAL = RBQAL/BSED                                                 (30)

where:
     BSED = storage of sediment fraction (sand, silt,
            or clay) in the bed, expressed as mg.ft3/l or mg.m3/l

The  final operation  which ADVQAL  performs is  the computation  of outflow  of
adsorbed qual through  individual gates (when more than one  exit is specified).
The algorithm is:

     OSQAL (I) - ROSQAL*OSED(I)/ROSED                                  (31)

where:
     OSQAL(I) = outflow of adsorbed qual through gate I
     ROSQAL   = total outflow of adsorbed qual from RCHRES
     OSED(I)  = outflow of sediment fraction through gate I


4.2(3).6.3   Simulate Decay of Adsorbed Material
             (subroutine ADECAY)

Purpose

ADECAY  is  a  generalized  subroutine which  calculates  the  amount  of  decay
experienced by a  generalized quality constituent  (qual)    adsorbed to inorganic
sediment.  This subroutine is called twice  (once for decay  on suspended  sediment
and once   for decay on bed  sediment)  for  each generalized quality constituent
which is sediment-associated.     (The user  specifies that  a qual  is sediment-
associated by  setting QALFG(7)=1   for the  qual in  the User's  Control Input.)
HSPF assumes that the  decay rate of a particular  adsorbed  qual  is the  same  for
all fractions of  sediment  (sand,   silt,  and  clay),   but  may be  different  for
suspended  sediment  than  it is for bed sediment.
                                       286                             RELEASE  8.0

-------
                                                            Module Section GQUAL

Method

Necessary information which must be supplied to the subroutine includes:

     1.  ADDCPMd) - decay rate for qual on sediment being
                     considered (suspended or bed)

     2.  ADDCPM(2) - temperature correction coefficient for decay

     3.  RSED(1-3) - the storage of each sediment fraction
                     expressed in mg.ft3/l or mg.m3/l (for
                     either suspended or bed sediment)

     4.  SQAL(1-3) - the concentration of qual associated with
                     the 3 fractions of sediment expressed
                     in concu/mg

First, the temperature-adjusted decay rate is calculated:

     DK = ADDCPMd )*ADDCPM(2)**TW20                                     (32)

where:
     TW20 = TW (water temperature) - 20.0 in degrees C.

Next,  the fraction of adsorbed qual which decays during the simulation interval
(FACT) is calculated using the general form for first-order decay:

     FACT = 1.0 - EXP(-DK)                                              (33)

The  concentration of  qual  decayed from  each  sediment  fraction  (DCONC)   is
determined,  and  the concentration  of qual  associated with  each  fraction  is
updated:

     DCONC   = SQAL(I)*FACT                                             (34)

     SQAL(I) = SQAL(I) - DCONC                                          (35)

Finally, the mass of qual decayed from each sediment fraction is calculated:

     SQDEC(I) = DCONC*RSED(I)                                           (36)

where:
     SQDEC(I) = amount of gual decayed from sediment fraction
                I expressed in (concu/l)*(ft3/ivl) or
                (concu/1)*(m3/ivl)
     DCONC    = concentration of qual decayed from sediment
                fraction expressed in concu/mg
     RSED(I)  = storage of sediment fraction I expressed in
                mg.ft3/l or mg.m3/l
                                      287                            RELEASE  8.0

-------
                                                            Module Section GQUAL

4.2(3).6.4  Simulate Adsorption/Desorption of a Generalized Quality Constituent
            (subroutine ADSDES)

Purpose

ADSDES  simulates  the exchange  of  a  generalized quality  constituent  (qual)
between the  dissolved state and  adsorbed state.   Kinetic  equilibrium between
dissolved state and six adsorption sites is modeled:  suspended sand, silt,  and
clay, and bed sand, silt, and clay.

Method

The basic  equation (Onishi  and Wise,  1979)   for the  transfer of  a chemical
between the dissolved state and an adsorbed state on sediment type J is:

     -d(RSEDJ*SQALJ)/dt + RSEDJ*KJT*(KDJ*DQALJ - SQALJ) = 0             (37)

where:
     RSEDJ = total quantity of sediment type J in the RCHRES
             expressed in mg.ft3/l or mg.m3/l
     SQALJ - concentration of qual on sediment type J expressed
             in concu/mg
     DQALJ - concentration of dissolved qual in concu/1
     KDJ   = distribution coefficient between dissolved state
             and sediment type J expressed in liters/mg
             (equilibrium adsorbed concentration/dissolved concentration)
     KJT   = temperature corrected transfer rate between dissolved
             state and sediment type J

Thus, adsorption of a qual by sediment or desorption from sediment is assumed  to
occur toward an equilibrium condition with  transfer rate KJT if  the particulate
qual concentration differs from its equilibrium value.   Equation 37 is actually
6 equations (one for each sediment type J) with 7 unknowns (DQAL  and 6  values  of
SQALJ).  The necessary seventh equation is that of  conservation of material.

The  following  relation gives the  total quantity of  qual in the  RCHRES,  both
before and after exchange due to adsorption/desorption:

     SUM  [1 to 6]{(RSEDJ*SQALJ) + VOL*DQAL) = TOT                       (38)

where:
     VOL - volume  of water in the RCHRES

To solve numerically, Eq. 37 is expressed in finite difference  form:

     -RSEDJ*(SQALJ - SQALJO) + RSEDJ*KJT*KDJ*DQAL*DELT                  (39)
     - RSEDJ*KJT*SQALJ*DELT = 0

where:
     SQALJ  = concentration of qual on  sediment  type J  at  end of
              simulation interval  (subsequent  to adsorption/desorption)
     SQALJO - concentration of qual on  sediment  type J  at  start of
              simulation interval
     DELT   = simulation time  step

                                      288                             RELEASE  8.0

-------
                                                            Module Section GQUAL

The product  of the transfer  rate for sediment type  J and the  simulation  time
step is calculated (AKJ = KJT*DELT), and the resulting value is substituted  into
Equations 38  and 39.    Two forms of  Eq.  38 are  written.  Eq.   40 expresses
conservation of material at the beginning of the simulation interval and Eq.   41
expresses conservation of material at the end of the interval:

     - SUM [1 to 6] ((RSEDJ*SQALJO) - VOL*DQALO) = -TOT                (40)

     - SUM [1 to 6] ((RSEDJ*SQALJ)  - VOL*DQAL ) = -TOT                (41)

Eq. 39 is rewritten as:

     RSEDJ((1.0 + AKJ)/(AKJ*KDJ))*SQALJ - RSEDJ*DQAL =                 (42)
     (RSEDJ*SQALJO)/(AKJ*KDJ)

Equations 41 and 42 can be written in  matrix form and solved for unknowns SQALJ
and DQAL  using standard procedures  such as  Gaussian elimination or  the Grout
reduction.  The solutions are:

     DQAL  = (TOT - SUM [1 to 6]  ((RSEDJ*CJ/AJJ)/                      (43)
             (VOL + SUM [1 to 6]  (RSEDJ/AJJ)

     SQALJ = (CJ/AJJ) + (DQ/AJJ)                       •                (44)

where:
     DQAL  = concentration of dissolved qual after adsorption/desorption
     SQALJ = concentration of qual on sediment type J after
             adsorption/desorption
     AJJ   = (1 + AKJ)/(AKJ*KDJ)
     CJ    = (SQALJO/AKJ*KDJ)

By combining Eqs.  40 and 43,  TOT can  be eliminated,  and a final solution for
DQAL can be obtained:

     DQAL =  (VOL*DQALO + SUM  [1 to 6] ((SQALJO - CJ/AJJ)*RSEDJ)        (45)
            /(VOL + SUM [1 to 6]  (RSEDJ/AJJ)

In  subroutine ADSDES,   the  following variables  are  used  to facilitate   the
evaluation of Eqs. 44 and 45:

     AINVJ  = 1.0/AJJ = (AKJ*KDJ)/(1.0 + AKJ)                          (46)

     CAINVJ = (J/AJJ  = (SQALJO/(1.0 + AKJ))                           (47)
                                      289                             RELEASE 8.0

-------
                                                            Module Section RQUAL
4.2(3).7  Simulate Constituents Involved in Biochemical Transformations
          (Section RQUAL of Module RCHRES)
RQUAL is  the parent  subroutine to  the four  subroutine groups  which simulate
constituents involved  in biochemical  transformations.   Within  module section
RQUAL the following constituents may be simulated:

     dissolved oxygen
     biochemical oxygen demand
     ammonia
     nitrite
     nitrate
     or thophosphorus
     phytoplankton
     benthic algae
     zooplankton
     dead refractory organic nitrogen
     dead refractory organic phosphorus
     dead refractory organic carbon
     total inorganic carbon
     pH
     carbon dioxide

Four additional quantities are estimated  from simulation of these constituents.
These quantities are  total organic nitrogen,  total  organic phosphorus,   total
organic carbon,   and potential biochemical  oxygen demand.   The  definition  of
these quantities is determined by  their method of calculation:

     TORN   = ORN + CVBN*(ZOO + PHYTO + BOD/CVBO)                  (1)
     TORP   = ORP + CVBP*(ZOO + PHYTO + BOD/CVBO)                  (2)
     TORC   = ORC + CVBC*(ZOO + PHYTO + BOD/CVBO)                  (3)
     POTBOD = BOD + CVNRBO*(ZOO +  PHYTO)                           (4)

where:
     TORN   = total organic nitrogen in mg N/l
     TORP   = total organic phosphorus in mg P/l
     TORC   = total organic carbon in mg C/l
     POTBOD = potential BOD in mg  O/l
     ORN    = dead refractory organic nitrogen in mg N/l
     ORP    = dead refractory organic phosphorus  in mg  P/l
     ORC    = dead refractory organic carbon in mg C/l
     BOD    = biochemical oxygen demand from dead nonrefractory organic
              materials in mg O/l
     CVBN   = conversion from mg biomass to mg nitrogen
     CVBP   = conversion from mg biomass to mg phosphorus
     CVBC   = conversion from mg biomass to mg carbon
     CVNRBO = conversion from mg biomass to mg biochemical  oxygen  demand
               (with allowance for  non-refractory  fraction)
     CVBO   = conversion from mg biomass to mg oxygen
     ZOO    = zooplankton in mg biomass/1
     PHYTO  = phytoplankton in mg  biomass/1


                                       290                             RELEASE 8.0

-------
                                                            Module Section RQUAL

Subroutine RQUAL performs two tasks.   First,   RQUAL is responsible for calling
the four subroutine groups which simulate the constituents listed above.   These
four groups and their functions are:

     1. OXRX:    simulate primary dissolved oxygen and biochemical oxygen
                 demand balances
     2. NUTRX:   determine inorganic nitrogen and phosphorus balances
     3. PLANK:   simulate plankton populations and associated reactions
     4. PHCARB:  simulate pH and inorganic carbon species

The four groups are listed in their order  of execution,  and the execution of  a
group is  dependent upon  the execution  of the  groups listed  above it.     For
example,  subroutine group PHCARB cannot be  activated unless OXRX,  NUTRX,   and
PLANK are active.   On  the other hand,  the reactions in  OXRX can be performed
without the reactions contained in the other three subroutine groups.
The other function of
used  jointly by  the
evaluated:
RQUAL is to determine the values  for variables which are
four subroutine  groups.    The  following variables  are
     1. AWELE:  the average velocity of water in the RCHRES in  ft/s
     2. AVDEPE:  the average depth of water in the RCHRES in ft
     3. DEPCOR:  conversion factor from square meters to liters
                 (used for changing areal quantities from the benthai
                  surface to equivalent volumetric values based  on  the
                  depth of water in the RCHRES)
     4. SCRFAC:  scouring factor to be used for calculation of benthal
                 release rates of inorganic nitrogen, orthophosphorus,
                 carbon dioxide, and biochemical oxygen demand

SCRFAC has one of  two values depending on the average velocity  of the  water in
the RCHRES.    AWELE is compared  to the value  of parameter SCRVEL,    the  user
specified velocity at and above which scouring  occurs.   If AWELE is less  than
the value of parameter SCRVEL, then SCRFAC is set equal to 1.0,  and  there is no
increase of benthal release  rates due to scouring.   If AWELE  is greater  than
SCRVEL,  SCRFAC  is set  equal to  the value  of parameter  SCRMUL,   which  is a
constant multiplication factor applied directly to  the release  rates to account
for scouring by rapidly moving water.
                                       291
                                               RELEASE 8.0

-------
                                                           Subroutine Group OXRX
4.2(3).7.1   Simulate Primary DO and BOD Balances
            (Subroutine Group OXRX of Module RCHRES)
Purpose

The purpose of  this code is to  simulate the primary processes  which determine
the dissolved  oxygen concentration in a  reach or mixed  reservoir.   Dissolved
oxygen concentration is  generally viewed as an  indicator of the  overall well-
being  of  streams  or  lakes and  their  associated  ecological  systems.    In
relatively unpolluted  waters,  sources and sinks  of oxygen are  in approximate
balance, and the concentration remains close to saturation.   By contrast,  in a
stream receiving untreated waste waters, the natural balance is upset,  bacteria
predominate,  and a significant depression of dissolved oxygen results (O'Connor
1970).

Schematic View of Fluxes and Storages

Figures 4.2(3).7.1-1 and 4.2(3).7.1-2 illustrate the fluxes and storages modeled
in this subroutine group.  In order to account for temporal variations in oxygen
balance, state variables for both dissolved oxygen and biochemical oxygen demand
must be maintained.   The state variable  DOX represents the oxygen dissolved in
water  and immediately  available  to satisfy  the  oxygen  requirements of  the
system.  The BOD state variable represents the total quantity of oxygen required
to satisfy  the first-stage   (carbonaceous)  biochemical  oxygen demand  of dead
nonrefractory organic materials entrained in the water.

Subroutine OXRX considers the following processes in determining oxygen balance:

      1. longitudinal advection of DOX and BOD
      2. sinking of BOD material
      3. benthal oxygen demand
      4. benthal release of BOD material
      5. reaeration
      6. oxygen depletion due  to decay of BOD materials

Additional sources and sinks  of DOX and BOD are simulated  in other  sections of
the RCHRES module.   If module section NUTRX (Section 4.2(3).7.2) is  active, the
effects of nitrification on dissolved oxygen  and denitrification on  BOD balance
can be considered.   If module section PLANK (Section 4.2(3).7.3) is  active, the
dissolved  oxygen balance  can be  adjusted  to account  for photosynthetic  and
respiratory activity  by phytoplankton and/or  benthic algae and  respiration by
zooplankton.   Adjustments  to the BOD state  variable in  section   PLANK include
increments  due to  death of  plankton  and nonrefractory   organic  excretion  by
zooplankton.
                                       292                            RELEASE 8.0

-------
                                                  Subroutine Group OXRX
      IDOX
     inflow
       1o
    RCHRES
                   VOL*DOX
          benthal  \
          oxvqen    }
          demand  /
          BENOD
                                    ODOXCN)
                   outflow
                    from
                   RCHRES
                   through
                     exit
                      N
                                                      ROD ox
                sum of
                outflows
                 from
                RCHRES
          / reaeration
           KOREA #C«ATDO-DOX,>
          Figure 4;Z(*).7.l-l  FloM>< diagram for dissolved
   in the OXRX subroutine group erf the RCHRES Application Module
  I BOO
 inflovN
   to
RCHRES
'c

-------
                                                           Subroutine Group OXRX

Subroutine  OXRX  uses  five  subroutines   to  simulate  dissolved  oxygen  and
biochemical oxygen  demand.   Advection of  DOX and  BOD is performed  by ADVECT
(subroutine  4.2(3).3.1).   Sinking  of  BOD material  is  carried  out by  SINK
(subroutine 4.2(3).01).    OXBEN calculates  benthal oxygen  demand and  benthal
release of  BOD materials.  The oxygen  reaeration coefficient is  determined by
utilizing OXREA, and BOD decay calculations are performed in BODDEC.

Since subroutine OXREA may also be called  by module section GQUAL to obtain the
oxygen reaeration coefficient  (KOREA)  for calculation of  volatilization rates
for  generalized   quality  constituents,   the   change  in   dissolved  oxygen
concentration  in water  due to  reaeration is  calculated in  OXRX rather  than
OXREA. The equation for reaeration is:

     DOX = DOX + KOREA*(SATDO - DOX)                                     (1)

where:
     DOX   - dissolved oxygen concentration in mg/1
     KOREA - reaeration coefficient calculated in OXREA
     SATDO = saturated concentration of dissolved oxygen in mg/1

The  saturation  concentration of  dissolved  oxygen  is computed  at  prevalent
atmospheric conditions by the equation:

     SATDO =  (14.652 + TW*(-.41022 + TW*(.007991 -  .7777E-4*TW)))*       (2)
             CFPRES

where:
     SATDO  - saturated cone of dissolved oxygen in mg/1
     TW     = water temperature in degrees C
     CFPRES = ratio of site pressure to sea level pressure
               (CFPRES  is  calculated by the Run Interpreter dependent upon
              mean elevation of RCHRES)
                                       294                            RELEASE 8.0

-------
                                                           Subroutine Group OXRX
4.2(3).7.1.1   Simulate Benthal Oxygen Demand and Benthal Release of BOD
              (subroutine OXBEN)
Purpose

OXBEN  accounts for  two possible  demands exerted  on available  oxygen by  the
benthos.  These two demands are categorized as benthal oxygen demand and benthai
release of BOD materials.   Benthal oxygen  demand results from materials in the
bottom muds which require oxygen for  stabilization.   This process results in a
direct loss of oxygen  from the RCHRES.   The second demand  on oxygen caused by
the release  and suspension  of BOD materials  is a less  direct form  of oxygen
demand.  This process increases the pool of BOD present in the RCHRES and exerts
a demand on the  dissolved oxygen concentration at a rate  determined by the BOD
decomposition kinetics.


Benthal Oxygen Demand

The user approximates the oxygen demand of the bottom muds at 20 degrees Celsius
by assigning a value to BENOD for  each RCHRES.   The effects of temperature and
dissolved oxygen concentration on realized benthal  demand are determined by the
following equation:

     BENOX = BENOD*(TCBEN**TW20)*(1.0 - Exp(-1.22*DOX))                   (3)

where:
     BENOX = amount of oxygen demand exerted by the benthal muds in
             mg/m2 per interval
     BENOD = reach dependent benthal oxygen demand at 20 degrees C in
             mg/m2 per interval
     TCBEN - temperature correction factor for benthal oxygen demand
     TW20  = TW(water temperature in degrees C) - 20.0
     DOX   = dissolved oxygen concentration in mg/1

The first portion  of the above equation   (BENOD*.05*TW)  proportionally adjusts
the demand at 20  degrees Celsius to a demand at any  temperature;  that is,  if
water temperature  is 10 degrees  Celsius,  the demand is  half the value  at 20
degrees.   The second portion of the  equation indicates that low concentrations
of dissolved oxygen suppress realized oxygen demand.  For example, 91 percent of
BENOD may be realized at a dissolved oxygen concentration of 2 mg/1,  70 percent
at 1 mg/1, and none if the waters are anoxic.

After   the value  of  BENOX has  been calculated,   the  dissolved oxygen  state
variable is updated:

     DOX = DOX - BENOX*DEPCOR                                             (4)

where:
     DEPCOR = factor which converts from mg/m2 to mg/1, based on the average
              depth of water in the RCHRES during the simulation interval
              (DEPCOR is calculated in subroutine RQUAL 4.2(3).7)
                                       295                             RELEASE 8.0

-------
                                                           Subroutine Group OXRX
Benthal Release of BOD
Bottom releases of BOD are a function of scouring potential and dissolved oxygen
concentration.  The equation used to calculate BOD release is:
     RELBOD = (BRBODd) + BRBOD( 2 ) *Exp(-2.82*DOX) ) *SCRFAC
                                                                         (5)
where:
     RELBOD
     BRBOD(1)
                BOD released by bottom muds in mg/m2 per interval
                base release rate of BOD materials (aerobic conditions)
                in mg/m2 per interval
     BRBOD(2) = increment to bottom release rate due to decreasing
                dissolved oxygen concentration
     DOX      = dissolved oxygen concentration in mg/1
     SCRFAC   = scouring factor dependent on average velocity of water
                (SCRFAC is calculated in subroutine RQUAL 4.2(3).7)

The  above equation  accounts for  the fact  that benthal  releases are  minimal
during conditions  of low  velocity and  ample dissolved  oxygen.   Under  these
conditions a thin layer of hardened, oxidized material typically retards further
release  of materials  from  the benthos.    However,   anaerobic conditions  or
increased velocity of  overlying water disrupts this layer and  release rates of
BOD and other materials are increased.   Solution of Equation 3 indicates that 6
percent  of the  incremental  release rate  (BRBOD(2))  occurs  when  1 mg/1  of
dissolved oxygen is present, 75 percent occurs when 0.1 mg/1 is present, and the
entire increment occurs under anoxic conditions.
4.2(3).7.1.2  Calculate Oxygen Reaeration Coefficient (subroutine OXREA)
Purpose

Various methods have been used to calculate atmospheric reaeration coefficients,
and experience has  shown that the most  effective method of calculation   in any
given  situation depends  upon the  prevalent hydraulic  characteristics of  the
system (Covar 1976).   Based upon user instructions, subroutine OXREA calculates
oxygen reaeration by using one of four built-in solution techniques.
Approach

The general equation for reaeration is:

     DOX = DOXS + KOREA*(SATDO - DOXS)                                    (6)

where:
     DOX   = dissolved oxygen concentration after  reaeration  in  mg/1
     KOREA = reaeration  coefficient  (greater  than  zero  and  less  than  one)
                                       296
                                                                      RELEASE 8.0

-------
                                                           Subroutine Group OXRX
     SATDO = oxygen saturation level for given water temperature in mg/1
     DOXS  = dissolved oxygen concentration at start of interval in mg/1
Lake Reaeration

In a  lake or reservoir,   calculation of  reaeration is dependent  upon surface
area,  volume,   and windspeed.   The windspeed  factor is determined  using the
following empirical relationship:

     WINDF = WINDSP*(-.46 + .136*WINDSP)                                 (7)

where:
     WINDF  = windspeed factor in lake reaeration calculation
     WINDSP = windspeed expressed in m/sec

For low windspeeds,  less  than 6.0 m/s,  WINDF is set  to 2.0.   The reaeration
coefficient for lakes is calculated as:

     KOREA =  (.032808*WINDF*CFOREA/AVDEPE)*DELT60                        (8)

where:
     CFOREA = correction factor to reaeration coefficient  for lakes;  for  lakes
              with poor  circulation characteristics,  CFOREA  may be  less than
              1.0,  and  lakes with exceptional circulation  characteristics may
              justify a value greater than 1.0 for CFOREA
     AVDEPE = average depth of water in RCHRES during interval in ft
     DELT60 = conversion from hourly time interval to simulation interval
Stream Reaeration

One of three approaches to calculating stream reaeration may be used:

     1. Energy dissipation method  (Tsivoglou-Wallace  1972).  Oxygen
        reaeration is calculated based upon energy dissipation principles:

           KOREA = REAKT*(DELTHE/FLOTIM)*(TCGINV**(TW - 20.))*DELTS       (9)

        where:
           REAKT  = escape coefficient with a typical value between
                    .054/ft and .110/ft.
           DELTHE - drop in energy line along length  of RCHRES in  ft
           FLOTIM = time of flow through RCHRES in seconds
           TCGINV = temperature correction coefficient for gas invasion  rate
                    with a default value of 1.047
           DELTS  = conversion factor from units of per second to  units  of
                    per interval

        DELTHE, the drop in elevation over the length of the RCHRES,  is  supplied
        by the user.   REAKT, the  escape coefficient, referred to  in  Tsivoglou's
        work, is also supplied by  the user.   The value for FLOTIM is calculated
        by dividing  the length of the RCHRES by  the average velocity   for  the
        simulation interval.   Tsivoglou's method of  calculation is activated by

                                      297                             RELEASE  8.0

-------
                                                      Subroutine Group OXRX

   setting the reaeration method flag (REAMFG) equal to 1.

2. Covar's method of determining reaeration (Covar 1976).  Reaeration
   is calculated as a power function of hydraulic depth and velocity.
   The generalized equation used is:

      KOREA = REAK*(AWELE**EXPREV)*(AVDEPE**EXPRED)               (10)
              *(TCGINV**(TW - 20.))*DELT60

   where:
      KOREA  = reaeration coefficient in units of per interval
      REAK   = empirical constant for reaeration equation,
               expressed in units of per hour
      AWELE = average velocity of water in ft/s
      EXPREV = exponent to velocity function
      AVDEPE = average water depth in ft
      EXPRED = exponent to depth function
      TCGINV - temperature correction coefficient for reaeration
               defaulted to 1.047
      DELT60 = conversion factor from units of per hour to units of
               per interval

   Depending on current depth and velocity, one of three  sets of values for
   REAK, EXPREV, and EXPRED is used.   Each set corresponds to an empirical
   formula which  has proven  accurate for  a particular  set of  hydraulic
   conditions.    The   three  formulas  and  their   associated  hydraulic
   conditions and coefficients are:

      1. Owen's formula (1964).  This formula is used for depths of
         less than 2 ft.  For this  formula, REAK = .906,  EXPREV = 0.67,
         and EXPRED = -1.85.

      2. Churchill's formula (1962).  This formula is used for high
         velocity situations in depths of greater than 2  ft.  For this
         formula, REAK = .484, EXPREV =  .969, and EXPRED  = -1.673.

      3. O'Connor-Dobbins formula  (1958).  This formula is used for
         lower velocity situations  in depths  of greater than 2 ft. The
         coefficient values are: REAK =  .538, EXPREV =0.5, and EXPRED
         = -1.5.

   This method of calculation of reaeration is activated  by setting  the
   reaeration method flag  (REAMFG)  equal to 2.

3. The   user may  select  his own   power function  of  hydraulic depth  and
   velocity for  use under all conditions  of depth and velocity.    In  this
   case, he supplies values for REAK, EXPREV,  and EXPRED.   This option  is
   selected by  setting  the reaeration method  flag  (REAMFG) to 3.
                                  298                             RELEASE 8.0

-------
                                                           Subroutine Group OXRX

        Reaeration  may  be  modeled  as  a   constant  process  for  any  given
        temperature.  In this case, the user must supply a value for REAK, and a
        value of zero  for both EXPREV and EXPRED.   Note  that subroutine OXREA
        requires input values for REAK, EXPREV, and EXPRED only if REAMFG is 3.
4.2(3).7.1.3  Calculate BOD Decay (subroutine BODDEC)
Purpose

Subroutine BODDEC  adjusts the  dissolved oxygen concentration  of the  water to
account for  the oxygen consumed  by microorganisms  as they break  down complex
materials  to simpler  and  more stable  products.    Only  carbonaceous BOD  is
considered in this subroutine.  The BOD decay process is assumed to follow first
order kinetics and is represented by:

     BODOX = (KBOD20*(TCBOD**(TW - 20.))*BOD                             (11)

where:
     BODOX  = quantity of oxygen required to satisfy BOD decay
              in mg/1 per interval
     KBOD20 = BOD decay rate at 20 degrees C per interval
     TCBOD  = temperature correction coefficient, defaulted to 1.075
     TW     = water temperature in degrees C
     BOD    = BOD concentration expressed in mg/1

If there  is not  sufficient dissolved  oxygen available  to satisfy  the entire
demand exerted by BOD decay,  the fraction  which can be satisfied is subtracted
from the BOD state variable, and the DOX variable is set to zero.   The quantity
of unsatisfied BOD decay for the interval is retained.   If the algorithms which
simulate denitrification in subroutine group  NUTRX are active,  oxygen produced
through the denitrification process may be used  to satisfy the remainder of  the
oxygen deficit caused by BOD decay.   Any BOD which is still unsatisfied remains
part of the BOD available for decay in future time steps.
                                      299                            RELEASE  8.0

-------
                                                          Subroutine Group NUTRX
4.2(3).7.2  Simulate Primary Inorganic Nitrogen and Phosphorus Balances
            (Subroutine Group NUTRX of Module RCHRES)
Purpose

This  code  simulates the  primary  processes  which  determine the  balance  of
inorganic nitrogen and  phosphorus in natural waters.   When  modeling the water
quality of an aquatic system,  consideration  of both nitrogen and phosphorus is
essential.   Nitrogen, in its various forms, can deplete dissolved oxygen levels
in receiving waters,  stimulate aquatic growth,  exhibit toxicity toward aquatic
life, or present a public health hazard (EPA 1975).   Phosphorus is vital in the
operation of energy transfer systems in biota,   and in many cases is the growth
limiting factor for algal communities.   Consequently,  it is necessary to model
phosphorus in any study concerned with eutrophication processes.
Schematic View of Fluxes and Storages

Figures 4.2(3).7.2-1 and 4.2(3).7.2-2 illustrate the fluxes and storages of  four
constituents which are introduced into the  RCHRES modeling system in  subroutine
group  NUTRX.   In  addition to  these  constituents,  the  state variables   for
dissolved oxygen and BOD are also updated.   If subroutine group NUTRX is  active
(NUTFG =  1),  nitrate will automatically  be simulated;  the user  must specify
whether or not nitrite,  ammonia,  and/or orthophosphorus are to be simulated in
addition to nitrate by assigning appropriate values to NO2FG,  NH3FG,   and PO4FG
in the User's Control Input.  If all four constituents are simulated,  subroutine
NUTRX considers the following processes:

     1. longitudinal advection of NO3, NO2, NH3, and PO4
     2. benthal release of inorganic nitrogen and PO4  (if BENRFG = 1)
     3. ammonia vaporization (if AMVFG - 1)
     4. nitrification
     5. denitrification (if DENFG = 1)
     6. ammonification due to degradation of BOD materials

Additional sources and sinks  of NO3,  NH3,  and PO4 are  simulated in the PLANK
section (4.2(3).7.3)  of  this module.   If section PLANK is  active,   the state
variables for these  three constituents can be adjusted  to  account for nutrient
uptake by phytoplankton and/or benthic algae,  and for respiration and inorganic
excretion by zooplankton.

Subroutine NUTRX  utilizes five subroutines  to simulate inorganic  nitrogen and
phosphorus.   Advection  of NO3,   NO2,  NH3,   and PO4  is performed   by  ADVECT
(4.2(3).3.1).   BENTH determines the amount of inorganic nitrogen and  phosphorus
which is released to the overlying  waters from the benthos.   The nitrification
and  denitrification processes are simulated  by NITRIF and DENIT,  respectively.
Finally,  the  production of  inorganic nitrogen  and  phosphorus  resulting  from
degradation  of BOD materials is simulated by DECBAL.
                                       300                            RELEASE 8.0

-------
                                                  Subroutine Group NOTRX
  1MN1
 inflow
   to
RCHRES
  mot.
 inflow/
  to
RCHRCS
  INO1
 inflow
  to
RCWRES
            JUMML0*
  ammonia
(voporiiotion••.
                                        W.
                             duttoBOO
                               decoy
                                            OMHS(N)
 outflow
  from
RCHRES
 Ihrouqh
                                                 NOMH*
 mm of
outflow*
  from
RCHRE5
           nitrification \
            MOtHtT
                     VOL*NOe
           nitrification
                                   outflow
                                    WOI'I*
                                   RCHRES
                                                KONOt
              •unt of
             outflows
               ff'OIYl
             RCHRES
                             N09DC
                  Idenitrification
ONO9(M)

 outflow
  ftom
RCHRES
throooh
                                                HOMOS
 sum of
outflows
 from
HCHRES
  benthal
lf release
 (ifNHSitnot
« »     M A * •.
                               OCCNIT
         -fluxes shown in
         parentheses C}
         Qra considered
         only "if 4-be.
         related
         G^UQrk+\4-y is
         simula-ted
                   .t-V Ro*i diagram for inorqanic nltro
-------
                                               Subroutine Group NUTRX
  \POA
 inflow
  to
RCHRES
u
                                  OPO4CN*)
outflow
  from
RCHRES
                                 sum of
                                outflows
                                 from
                                RCHRES
                                                  shown in
                                                   ses C )

                                           Qrs cans ide red
                                           Ot^ly i-f
                                           related
                                           simula+ed
          4.Z (3).7.Z-2  Flow diaqram for ortho-phosphate in ihc
               qroup of -the RCHRES  Application Module.
                             302
                                     RELEASE 8.0

-------
                                                          Subroutine Group NUTRX

Ammonia Vaporization

The  amount of  ammonia lost  from the  RCHRES  due to  ammonia vaporization  is
calculated by the following empirical relationship:

     AMVLOS = 0.048*Exp(0.13*(TW - 20.})*NH3*DELT60                      (1)

where:
     AMVLOS = amount of ammonia vaporized expressed as mg NH3-N/interval
     TW     = water temperature in degrees C
     NH3    = concentration of ammonia (mg/1)
     DELT60 = conversion from units of per hour to units of per interval

Simulation of ammonia vaporization is activated by setting AMVFG equal to one in
the User's Control Input.
4.2(3).7.2.1  Simulate Benthal Release of Constituents
              (subroutine BENTH)
Purpose

This subroutine  checks to see whether  present water conditions are   aerobic  or
anaerobic, calculates benthal release for a constituent based on this  check, and
updates the concentration of the constituent.
Approach

The equation used to calculate release is:

     RELEAS = BRCON(I)*SCRFAC*DEPCOR                                      (2)

where:
     RELEAS   = amount of constituent released expressed  in  mg/1
                per interval
     BRCON(I) = benthal release rate for constituent  expressed  as
                mg/m2 per interval
     SCRFAC   = scouring factor, dependent on average velocity  of  the  water
                (SCRFAC is calculated in subroutine RQUAL (4.2(3).7»
     DEPCOR   = conversion factor from mg/m2 to  mg/1
                (DEPCOR is calculated in subroutine RQUAL)

The  dissolved  oxygen  concentration  below   which   anaerobic conditions  are
considered to  exist is determined by  the input parameter ANAER.    Two release
rates are required for each of the constituents:   one for aerobic  conditions  and
one for anaerobic conditions.   Typically, the aerobic release  rate is less than
the anaerobic rate,  because a layer of  oxidized materials  forms  on the benthal
surface during  aerobic periods,   and this  layer retards   the release  rate of
additional benthal materials.  BRCON(1) is the aerobic release  rate and BRCON(2)
is the anaerobic rate.   The choice of which release  rate is used, is  determined
by comparing the current value of DOX to ANAER.

                                      303                            RELEASE  8.0

-------
                                                          Subroutine Group NUTRX

If ammonia  is simulated,   the  inorganic nitrogen  release from the  benthos is
assumed to be in the form of ammonia,  and the NH3 state variable is updated.  If
ammonia is not simulated,  benthal release of inorganic nitrogen is assumed to be
in  the  form  of  nitrate,   and  the  NO3  state  variable  is  updated.    If
orthophosphate is simulated,  an additional call is made to BENTH to account for
release of PO4.

Simulation of benthal release processes is activated by assigning a value of one
to BENRFG in the User's Control Input.
4.2(3).7.2.2  Simulate Nitrification (subroutine NITRIF)
Purpose

NITRIF  simulates the  oxidation  of ammonium  and  nitrite by  chemoautotrophic
bacteria.   This oxidation  provides energy for bacteria much the  same way that
sunlight provides energy for photosynthetic algae.   The Nitrosomonas genera are
responsible  for conversion  of ammonium  to nitrite,   and Nitrobacter  perform
oxidation of nitrite to nitrate.  (It should be noted that no differentiation is
made between ammonia and ammonium in HSPF.)   Oxidation of inorganic nitrogen is
dependent upon a suitable supply of dissolved oxygen; subroutine NITRIF does not
simulate nitrification if the DO concentration is less than 2 mg/1.
Method

The rate  of nitrification  is represented by  a first  order equation  in which
nitrification  is directly  proportional to  the quantity  of reactant  present,
either ammonia or nitrite.  The equation used to calculate the amount of NH3/NH4
oxidized to NO2 is:

     NH3NIT = KNH320*(TCNIT**(TW - 20.))*NH3                              (3)

where:
     NH3NIT = amount of NH3 oxidation expressed in mg NH3-N/1 per interval
     KNH320 = NH3 oxidation rate coefficient at 20 degrees C expressed
              in units of per interval
     TCNIT  = temperature correction coefficient, defaulted to 1.2
     TW     = water temperature in degrees C
     NH3    = ammonia concentration in NH3-N/1

Similarly, if nitrite is simulated, the amount of nitrite oxidized  to nitrate  is
determined by the equation:

     NO2NIT = KNO220*(TCNIT**(TW - 20.))*NO2                              (4)

where:
     N02NIT = amount of NO2 oxidation expressed in mg N02-N/1 per interval
                                       304                             RELEASE 8.0

-------
                                                          Subroutine Group NUTRX

     KNO;.0 = NO2 oxidation rate coefficient at 20 degrees C expressed
              in units of per interval
     NO2    = nitrite concentration in mg NO2-N/1

The amount of  oxygen used during nitrification  is 3.43 mg oxygen  per mg NH3-N
oxidized to NO2-N,  and 1.14 mg oxygen per  mg NO2-N oxidized to NO3-N.   In the
RCHRES module, these figures are adjusted to 3.22 mg and 1.11 mg,  respectively,
to account for the  effects of carbon dioxide fixation by  bacteria (Wezerak and
Gannon 1968).  Thus, the oxygen demand due to nitrification is evaluated as:

     DODEMD = 3.22*NH3NIT + 1.11*NO2NIT                                  (5)

where:
     DODEMD = loss of dissolved oxygen from the RCHRES due to nitrification,
              expressed as mg O/l per interval

If the value of DODEMD is greater  than available dissolved oxygen,  the amounts
of oxidation from NH3 to NO2 and from NO2 to NO3 are proportionally reduced,  so
that  state variable  DOX maintains  a nonnegative  value.   If  nitrite is  not
simulated,  the  calculated amount of  oxidized ammonia  is assumed to  be fully
oxidized to nitrate.
4.2(3).7.2.3  Simulate Denitrification (subroutine DENIT)
Purpose

DENIT simulates the reduction of nitrate  by facultative anaerobic bacteria  such
as Pseudomonas,   Micrococcus,  and  Bacillus.  These bacteria  can use  NO3 for
respiration in  the same manner  that oxygen  is used under  aerobic conditions.
Facultative organisms use oxygen until the environment becomes nearly or totally
anaerobic,  and then switch over to NO3  as their oxygen source.   In most cases
the end product of denitrification is nitrogen gas, but in special cases the end
product may be ammonia.   If denitrification is simulated  (DENFG =1),  the  user
must specify the end product of denitrification  by assigning a value of zero or
one to  DENRFG in  the User's Control  Input.   A zero  value indicates  the end
product is nitrogen gas, and a value of one indicates ammonia.


Approach

Denitrification .does  not occur in  the RCHRES  module unless the  potential BOD
decay calculated  in subroutine  group OXRX  was not  fully  satisfied.   In  such
cases,  the  amount of nitrate  which must be  reduced to  satisfy  the remaining
oxygen deficit is calculated as:

     PNO3DE = -DEFOX*.218818                                              (6)

where:
     PNO3DE  = nitrate requirement expressed as mg NO3-N/1 per interval
                                       305                             RELEASE 8.0

-------
                                                          Subroutine Group NUTRX

     -DEFOX  = amount of unsatisfied BOD decay for interval expressed
               as mg O/l
     .218818 = stoichiometric equivalence factor between nitrate and
               oxygen (production of 1  mg of oxygen results from
               reduction of .218818 mg of nitrate-nitrogen)

The  actual amount  of denitrification  for the  interval is  calculated by  the
following equation:

     NO3DE = PNO3DE*DEBAC                                                (7)

where:
     DEBAC = unitless factor which represents the relative abundance of
             denitrifying bacteria

The factor DEBAC is a fraction between  zero and one.   The factor is diminished
by .004 per  hour to account for  death of bacteria.   During  anaerobic periods
DEBAC is increased by .019 per hour to represent growth of bacteria.   The model
assumes no growth of denitrifying bacteria during aerobic periods.

If denitrification of  97 percent or less  of the available nitrate  can provide
sufficient oxygen to  compensate for the remaining oxygen  deficit,  then -DEFOX
will be satisfied by denitrification.
4.2(3).7.2.4  Perform Materials Balance for Transformation from Organic  to
              Inorganic Material  (subroutine DECBAL)
Purpose

DECBAL adjusts  the inorganic  nitrogen and  orthophosphorus state  variables  to
account for decomposition of organic materials.


Method

In subroutine NUTRX the  total BOD decay for the  time   interval  is  determined  by
summing   the  decay  satisfied  by  dissolved   oxygen   and  that   satisfied  by
denitrification.   At  the  same   time  the  corresponding  amounts   of   inorganic
nitrogen  and orthophosphorus produced by the decay  are  determined as:

     DECNIT = BODOX*CVON                                                  (8)
     DECPO4 = BODOX*CVOP                                                  (9)

where:
     BODOX = total BOD decay expressed as mg O/l  per  interval
     CVON = stoichiometric conversion factor  from  mg oxygen to
             mg nitrogen
                                       306                            RELEASE 8.0

-------
                                                          Subroutine Group PLANK

     CVOP  = stoichiometric conversion factor from mg oxygen to
             mg phosphorus

The values for DECNIT and DECPO4 are passed to subroutine DECBAL.  If ammonia is
simulated,  the  value of DECNIT  is added to the  NH3 state variable;   if not,
DECNIT is added to the NO3 state variable.  If orthophosphorus is simulated, the
value of DECPO4 is added to the PO4 state variable.
4.2(3).7.3  Simulate Plankton Populations and Associated Reactions
            (Subroutine Group PLANK of Module RCHRES)
Purpose

PLANK simulates phytoplankton, zooplankton, and/or benthic algae.


Schematic View of Fluxes and Storages

Figures 4.2(3).7.3-1 through 4.2(3).7.3-4 illustrate  the fluxes and  storages  of
six  constituents  which are  introduced  into  the  RCHRES modeling   system   in
subroutine PLANK.   In addition to these  constituents,  the  state variables for
dissolved  oxygen,    biochemical  oxygen   demand,   nitrate,    ammonia,   and
orthophosphorus are also updated.   If subroutine group PLANK is active  (PLKFG =
1),   dead refractory  organics  will automatically  be  simulated.    The   state
variables for  these organics are ORN  (dead refractory organic  nitrogen),  ORP
(dead refractory organic phosphorus),  and ORC  (dead refractory organic  carbon).
The user must specify whether or not phytoplankton, zooplankton,  and/or benthic
algae are simulated by assigning appropriate values to PHYFG,  ZOOFG,  and  BALFG
in the  User's Control  Input.   The  state variable  PHYTO represents  the free
floating photosynthetic  algae,  ZOO  represents the  zooplankton which  feed  on
PHYTO,   and BENAL  is the  state variable  for  algae attached  to the  benthal
surface.

Subroutine group PLANK is  the largest and most complex of  the code  segments  in
the RCHRES module.   PLANK uses twelve  subroutines to perform simulation of the
three types of plankton.   Longitudinal advection  of PHYTO and ZOO is performed
by ADVPLK,  a special advection routine for  plankton.   ORN,  ORP,   and ORC are
advected by ADVECT.   The sinking of PHYTO,  ORN,  ORP,  and  ORC is performed  by
SINK.   The  user controls the sinking  rate of these constituents  by assigning
values to parameters PHYSET and REFSET in  the User's Control Input.   PHYSET  is
the rate  of phytaplankton settling,   and REFSET is  the settling rate  for all
three of the  dead refractory organic constituents.   Advection  and  sinking are
performed  every interval  of  the simulation  period.    The remainder of the
processes modeled in PLANK are only performed when the average depth  of  water  in
the RCHRES is at least 2 in.   Experience  has  shown that the algorithms used  to
represent these processes are not accurate for excessively shallow waters.   If 2
in.  or  more of water  is present in  the RCHRES,   PLANK performs a series  of
operations which are necessary to determine the availability  of light to support
algal growth.   First the light intensity at the RCHRES surface is calculated  by
the following equation:

                                      307                             RELEASE 8.0

-------
 IPWYTO
 inflow
  to
RCHBES
net qrowtn\
 (qroxwth-   >
respiration) /
                       VOL>PHYTO
                         storage
              •SNKPHY
    Subroutine Group PUUK

OPHVT(M1

                •OPWYT
       M
  from

RCHRCS
                « •
                 from

                RCHRES
                                           \
                              V pncdoiion /
Fiqune 4.Z(3).13-l Flow dioqratn ^bir phyloplankton in ihc PV-A^WK. 5Cction
                oi toe RCHRE5 A,pp\ic of OftW.OftP, and ORC throuqh 1he
                                 308
                                               RELEASE 8.0

-------
                                               Subroutine Group PLANK
woo
             ZO«K
                    voi_* zoo
                      «toraq«
                               tOTH
                              death
                                             outflow
                                              from
                                             RCHRES
                                             -throuh
                                                            HOZOO
 sum of
outflow*
                                                            RCHOES
Figure 4.t(*).7V-3 Row diagram -for tooplonkton in Ihft PLANK
                 of the RCHRES Application  Module
            wt<|Rmth
                             ( OTH6A.L * CVF»7/ OBPCOR
                   (S/OL/AVDEPE)
                    *BeNAl_
                      storoqe
                Row diaqrom for b^^hfc alqae in ih* PlIkNK. section
                of 1he RCHRE5 Application Module
                               309
                                                         RELEASE 8.0

-------
                                                          Subroutine Group PLANK

     INLIT = 0.97*CFSAEX*SOLRAD/DELT                                     (1)

where:
     INLIT  = light intensity immediately below water surface, as
              langleys/min
     0.97   = correction factor for surface reflection (assumed 3 percent)
     CFSAEX = input parameter which specifies the ratio of radiation
              at water surface to gage radiation values.  This factor also
              accounts for shading of the water body, eg. by trees
     SOLRAD = solar radiation in langleys/interval
     DELT   = conversion from units of per interval to per minute

After light intensity at the water surface has been calculated, PLANK determines
the factors which diminish the intensity of light as it passes downward from the
surface.   In addition  to the natural extinction due to  passage through water,
extinction may  result from interference caused  by total suspended  sediment or
phytoplankton.   If SDLTPG is assigned a value of one, the contribution of  total
suspended sediment to light extinction is calculated as:

     EXTSED = LITSED*SSEDT                                                (2)

where:
     EXTSED = increment to base extinction coefficient due to total
              suspended sediment in units of /ft
     LITSED = multiplication factor to total suspended sediment cone.
              (supplied in User's Control Input)
     SSEDT  = total suspended sediment (sand + silt + clay) in mg/1

The contribution of suspended phytoplankton to light extinction is determined by
the empirical relationship:

     EXTCLA = .00452*PHYCLA                                               (3)

where:
     EXTCLA = increment to base extinction coefficient due to phytoplankton,
              in units of per foot
     .00452 = multiplication factor to phytoplankton chlorophyll a
              concentration
     PHYCLA = phytoplankton concentration as micromoles  chlorophyll  a/1

After values for INLIT,  EXTSED,  and  EXTCLA have been  calculated,   PLANK calls
subroutine LITRCH to  determine the light correction factor to  algal  growth  and
the amount of   light available to phytoplankton  and  benthic   algae.    Once these
calculations have been  completed,  PLANK checks a series of   flags  to determine
which types of  plankton  are to be simulated.    If PHYFG is   assigned  a  value of
one,  simulation  of phytoplankton is performed  by  a group of   six  subroutines.
Zooplankton are simulated  by a group of  three  subroutines if  ZOOPG  is given a
value of one.   Zooplankton simulation can be performed only if  the  phytoplankton
section is active.   Finally,  a value of  one  for BALFG activates  benthic algae
simulation by a group of five subroutines.   The organization of  the subroutines
in the  PLANK group  is clarified  by referring  to  structure  charts 4.2(3).7.3
through 4.2(3).7.3.5 in Part D of  this document.
                                       310                             RELEASE 8.0

-------
                                                          Subroutine Group PLANK
4.2(3).7.3.1 Advect Plankton  (subroutine ADVPLK)
Purpose

ADVPLK performs  the advection  of phytoplankton  and zooplankton.    The normal
advection method (subroutine ADVECT) used in the RCHRES module assumes that each
constituent concentration is uniform throughout the RCHRES.   This assumption is
not  valid  for plankton.    Both  phytoplankton  and zooplankton  locate  their
breeding  grounds  near the  channel  boundaries.    Since  the water  near  the
boundaries moves downstream much more slowly  than the mean water velocity,  the
plankton populations have a much longer residence  time in the RCHR1S than would
be indicated by  the mean flow time.    The geographical extent of  the plankton
breeding grounds is inversely  related to the flow rate.   At  low flows,  large
areas of  slow moving  waters which are  suitable for  breeding exist  along the
channel boundaries.   As flow rates increase,  more  and more of these areas are
subject to  flushing.   The  special advection routine  is critical  to plankton
simulation,  because  the only source of  plankton is within the  reach network.
Thus an  upstream RCHRES  with no  plankton inflows  can maintain  a significant
plankton population  only if  the growth rate  of plankton  exceeds the  rate at
which plankton are  advected out of the RCHRES.   Since  biological growth rates
are  typically much  slower  than "normal"  advection  rates,  few  free-flowing
RCHRES"s could  maintain a plankton  population without  the use of  the special
advection routine.
Method

Figure  4.2(3).7.3-5 illustrates  the  relationships  used to  perform  plankton
advection.
              MXSTAY
        smv
                  SCED
                                   OREP

                                 OFL.OC -ft. a/sec.)

Figure 4.2(3).7.3-5  Relationship of parameters for special advection of
                     plankton
                                      311
                                                                     RELEASE 8,0

-------
                                                          Subroutine Group PLANK

ADVPLK assumes that a certain concentration of plankton (STAY) is not subject to
advection,  but any excess of organisms will  be advected in the normal way.   A
small population (SEED) of plankton are never subject to advection,  even during
the periods of  greatest flow.   The maximum concentration of  plankton which is
not subject  to advection  (MXSTAY)  occurs during  low flow  conditions.   Each
simulation interval  ADVPLK calculates  STAY based  on the  values of  these two
parameters and OREF.   OREF is the outflow rate at which STAY has a value midway
between SEED and MXSTAY.   First,  the average  flow rate through the RCHRES for
the interval is calculated:

     OFLO = (SROVOL + EROVOL)/DELTS                                       (4)

where:
     OFLO   = average flow rate  (ft3/s or m3/s)
     DELTS  = number of seconds per interval
     SROVOL and EROVOL are as defined in Section 4.2(3).2

The  concentration of  plankton  which  are not  subject  to  advection is  then
determined:

     STAY = (MXSTAY - SEED)*(2.0**(-OFLO/OREF)) + SEED                    (5)

where:
     STAY   = plankton concentration not advected in mg/1
     MXSTAY = maximum concentration not subject to advection
     SEED   = concentration of plankton never  subject to advection
     OREF   = outflow rate at which STAY has a value midway between
              SEED and MXSTAY (ft3/s or m3/s)

The amount of  plankton not subject to  advection is converted to  units  of mass
(MSTAY)  by  multipling STAY by  the volume in  the RCHRES  at the start  of the
interval  (VOLS). The concentration of plankton which are advected  is:

     PLNKAD = PLANK - STAY                                                (6)

ADVPLK calls subroutine ADVECT (4.2(3).3.1) to perform  longitudinal advection of
the quantity PLNKAD.  The  updated  value of PLNKAD is then added  to the amount of
plankton  which did  not undergo   advection  to determine  the concentration  of
plankton in the RCHRES at  the end  of the interval:

     PLANK = PLNKAD + MSTAY/VOL                                           (7)

where:
     PLANK  = concentration of plankton at end of interval
     PLNKAD = concentration of advected plankton which  remain in RCHRES
     MSTAY  = mass  of plankton not advected
     VOL    = volume in RCHRES at  end of interval

If  the concentration of  plankton  in  the RCHRES at  the  start  of the  interval  is
less  than  the value assigned  to  SEED,  advection of plankton  is  not performed  in
the RCHRES, and the value  of  PLANK at  the end  of the interval is calculated as:
                                       312                             RELEASE 8.0

-------
                                                          Subroutine Group PLANK

     PLANK = (MSTAY + IPLANK)/VOL                                        (8)

where:
     IPLANK = mass of plankton which enters RCHRES during interval
4.2(3).7.3.2 Calculate Light-related Information Needed for Algal Simulation
             (subroutine LITRCH)
Purpose

Subroutine LITRCH determines the light correction factor to algal growth and the
amount of light available to phytoplankton and benthic algae.
Method

The  overall light  extinction factor  for the  interval is  obtained by  adding
EXTSED and EXTCLA to the base extinction coefficient  (EXTB).   The value of EXTB
is assumed constant for  a particular RCHRES and must be  assigned in the User's
Control Input.    The resulting sum (EXTCO)   is used to calculate  the euphotic
depth,  which  is the distance below  the surface of  the water body at  which  1
percent of the light incident on the surface is still available:

     EUDEP = 4.60517/EXTCO                                                (9)

where:
     EUDEP = euphotic depth in ft
     EXTCO = total light extinction coefficient in units of per foot

HSPF assumes that growth of algae occurs only in the  euphotic zone  (that is,  the
water above euphotic depth).   When EUDEP has been calculated, it is possible to
assign a value to CFLIT,  the light correction factor to algal growth.   A value
of 1.0  is assigned to  CFLIT if the calculated  euphotic zone includes  all  the
water of the RCHRES.   CFLIT = EUDEP/AVDEPE,  if the  euphotic depth is less than
the average depth  of water (AVDEPE).   CFLIT  is used in subroutine  ALGRO,  to
adjust the computed rate of algal growth.

Finally,  the  amount of light available  to phytoplankton and benthic  algae is
calculated.   The  equation used to calculate  the amount of light  available to
phytoplankton assumes that all phytoplankton are at mid-depth in the RCHRES:

     PHYLIT = INLIT*Exp(-EXTCO*(.5*AVDEPE))                              (10)

where:
     PHYLIT = light available to phytoplankton in langleys/min
     INLIT  = light available at water surface in langleys/min
     EXTCO  = light extinction coefficient in /ft
     AVDEPE = average depth of water in the RCHRES in ft
                                       313                            RELEASE  8.0

-------
                                                          Subroutine Group PLANK

The equation used  to calculate the amount  of light available to  benthic algae
assumes that all benthic algae are at AVDEPE below the surface of the RCHRES:

     BALLIT = INLIT*Exp(-EXTCO*AVDEPE)                                   (11)
4.2(3).7.3.3 Simulate Phytoplankton (subroutine PHYRX)
Purpose

PHYRX simulates the algae which float in the waters of a RCHRES.   Because  these
organisms use  energy from  light to  produce organic  matter,  they  are called
primary producers  and are  considered the  first trophic  level in   the aquatic
ecosystem.   The biological activity of the ecosystem is dependent upon the rate
of primary production by these photosynthetic organisms.   The activities of the
phytoplankton are  in turn affected by  the physical environment.     Through the
process of  photosynthesis,  phytoplankton  consume carbon  dioxide and  release
oxygen back into the water.  At the same time, algal respiration consumes oxygen
and  releases  carbon  dioxide.    Phytoplankton  reduce  the  concentration  of
nutrients in the water by consuming phosphates, nitrate,  and ammonia.   Through
assimilation these nutrients are transformed  into organic materials  which  serve
as a food source for members of higher trophic levels.  A portion of  the organic
matter which is not used for food decomposes, which again affects the oxygen and
nutrient concentrations in  the water.   Where the  phytoplankton population has
grown excessively,   much of  the available oxygen  supply of  the water  may be
depleted by  decomposition of dead algae  and respiration.   In  this situation,
phytoplankton place a serious stress upon the system.
Approach

To  describe    quantitatively   the    the   dynamic    behavior  of   phytoplankton
populations,   a  number  of  assumptions  must  be  made.    PHYRX treats  the entire
phytoplankton  population as if  it were  one species,  and the mean behavior of the
population  is   described   through   a  series    of  generalized   mathematical
formulations.     While such an approach obscures  the  behavior of  individual
species,  the  overall  effect of the  phytoplankton population on  the quality of
the water can  be  modeled with reasonable  accuracy.

The HSPF system assumes  that biomass  of  all types (phytoplankton,  zooplankton,
benthic algae, dead organic materials)   has a  consistent chemical composition.
The    user     specifies    the    biomass    composition    by   indicating    the
carbon:nitrogen:phosphorus  ratio and  the  percent-by-weight carbon.  This is done
by assigning values to  the  following  parameters:

      1. CVBPC: number of moles of  carbon per mole of phosphorus in biomass
                 (default =  106)
                                       314                            RELEASE 8.0

-------
                                                          Subroutine Group PLANK

     2. CVBPN:   number of moles of nitrogen per mole of phosphorus in
                biomass (default = 16)
     3. BPCNTC:  percentage of biomass weight which is carbon
                (default = 49)

The algorithms used in PHYRX and  its subroutines require that the phytoplankton
population be expressed in units of  micromoles of phosphorus per liter.   PHYRX
converts the value for state variable PHYTO in milligrams biomass per liter into
micromoles phosphorus  per liter and  assigns this  value to the  internal state
variable STC (standing crop).

PHYRX uses  five subroutines  to simulate  phytoplankton.   ALGRO  computes unit
growth and respiration  rates and determines the growth limiting  factor for the
phytoplankton.   If the  amount of growth exceeds the amount  of respiration for
the interval, GROCHK adjusts growth to account for nutrient limitations.  PHYDTH
calculates the amount of death occurring  during the interval.   State variables
ORN, ORP, ORC,  and BOD are updated by ORGBAL to account for materials resulting
from phytoplankton death.   Finally, NUTRUP adjusts the values for PO4, NO3, and
NH3 to account for uptake of nutrients  by phytoplankton.   In addition to these
updates, the dissolved oxygen state variable is adjusted in PHYRX to account for
the net effect of phytoplankton photosynthesis and respiration:

     DOX = DOX + (CVPB*CVBO*GROPHY)                                     (12)

where:
     CVPB   = conversion factor from micromoles phosphorus to mg
              biomass
     CVBO   = conversion factor from mg biomass to mg
              oxygen
     GROPHY = net growth of phytoplankton as micromoles
              phosphorus/1 per interval

After all the operations in PHYRX and  its subroutines have been performed,  the
value of STC  is converted back into  units of milligrams biomass  per liter and
becomes the updated value of PHYTO.
4.2(3).7.3.3.1 Calculate Unit Growth and Respiration Rates  for  Algae
               (subroutine ALGRO)
Purpose

ALGRO calculates' the unit growth rate of algae based on  light,  temperature,   and
nutrients.   Each time step ALGRO determines the rate  limiting  factor  for  growth
and  passes a  label which  identifies the  limiting factor   to the  subroutines
responsible for printed output.  The labels and their  meanings  are as  follows:

     •LIT'   Growth is light limited.
     'NON1   Insufficient nutrients are available  to support  growth.
                                       315                             RELEASE 8.0

-------
                                                          Subroutine Group PLANK

     'TEM1   Water temperature does not allow algal growth.
     'NIT'   Growth is limited by availability of inorganic nitrogen.
     'P041   Growth is limited by availability of orthophosphorus.
     'NONE1  There is no limiting factor to cause less than maximal growth.
     'WAT1   Insufficient water is available to support growth.

ALGRO is also  responsible for calculating the unit respiration  rate for algae.
This subroutine  is used  in the  simulation of  both phytoplankton  and benthic
algae.


Approach

ALGRO performs a series of initial checks to determine whether or not conditions
are suitable for  growth during the interval.    If the light intensity  for  the
interval is  less than .001 langleys/min,   insufficient light is  available  for
growth, and growth is not calculated.   Likewise, if the concentration of either
inorganic nitrogen or orthophoshorus is less  than .001 mg/1,  no growth occurs.
If these  checks indicate that conditions  are suitable for growth,   ALGRO next
determines the effects of water temperature on the growth potential.


Temperature Control

The user specifies the temperature preferences  of the algae by assigning values
to three parameters:  TALGRL, TALGRM,  and TALGRH.   If the water temperature is
less than  the value assigned  to TALGRL or greater  than  the value  assigned to
TALGRH, no growth occurs.   For water temperatures between TALGRL and TALGRH,   a
correction factor to maximum growth rate  (MALGR) is calculated.  This correction
factor increases in value linearly from 0.0  at TALGRL to  1.0 at TALGRM.   Thus,
TALGRM specifies the minimum temperature at which  growth  can occur  at a maximum
rate.   ALGRO assumes that there is no temperature retardation of maximum growth
rate for   temperatures between  TALGRM and  TALGRH.   The  temperature corrected
maximum growth rate is:

     MALGRT = MALGR*TCMALG                                               (13)

where:
     MALGRT = temperature corrected maximum algal growth rate  in
              units of per interval
     MALGR  = maximum unit growth rate for algae
     TCMALG - temperature correction to growth
               (TCMALG has a value between 0.0 and  1.0)

Once the  temperature  correction to potential growth  rate  has  been  made,   ALGRO
uses Monod growth kinetics with respect to orthophosphorus,  inorganic nitrogen,
and  light intensity  to determine the actual growth rate.   The  procedure  taken in
ALGRO  is  to consider each possible limiting factor separately  to  determine  which
one  causes the smallest  algal  growth rate during each simulation  interval.
                                       316                            RELEASE 8.0

-------
                                                          Subroutine Group PLANK

This  method does  not preclude  that  interactions between  factors affect  the
actual growth rate; in cases where it has been established that there is such an
interaction,  as in the uptake of phosphate,   the phenomena are included in the
model.   If none of the factors considered  is limiting,  growth will be maximal
and temperature dependent.


Phosphorus Limited Growth

Algae are  dependent upon  uptake of  orthophosphorus to  provide the  continual
supply of phosphorus necessary for ordinary cellular metabolism and reproductive
processes.  In phosphorus limited situations, the resultant growth rate has been
shown to be dependent  not only on the concentration of  phosphate ions,  but on
nitrate concentration as well (DiToro,  et  al.  1970).   The phosphorus limited
growth rate is determined by:

     CROP = MALGRT*PO4*NO3/((P04 + CMMP)*(NO3 + CMMNP))                  (14)

where:
     CROP   = unit growth rate based on phosphorus limitation expressed
              in units of per interval
     MALGRT = temperature corrected maximum algal growth rate
     PO4    = orthophosphorus concentration in mg P/l
     NO3    = nitrate concentration in mg N/l
     CMMP   = orthophosphorus Michaelis-Menten constant for phosphorus
              limited growth in mg P/l
              (CMMP is defaulted to .015 mg P/l)
     CMMNP  = nitrate Michaelis-Menten constant for phosphorus limited
              growth in mg N/l
              (CMMNP is defaulted to .0284 mg N/l)
Nitrogen Limited Growth

Nitrogen is essential to algae for assimilation of proteins and enzymes.   In  the
form of  nitrate,  nitrogen  serves as  the essential  hydrogen acceptor   in  the
metabolic  pathways which  enable  organisms to  grow.    ALGRO  allows for   two
different sources of  inorganic nitrogen.   If ammonia is being  simulated and a
value of one is  assigned to the nitrogen source flag  (NSFG),  both ammonia  and
nitrate  are  used  by  the  algae   to  satisfy  their  nitrogen  requirements.
Otherwise, only nitrate is considered in the kinetics formulations.  High  ratios
of ammonia to nitrate have been found to retard algal growth.  If a value  of  one
is  assigned  to the  ammonia  retardation  flag  (AMRFG),  this  phenomenon  is
simulated according to the equation:

     MALGN - MALGRT - 0.757*NH3 + 0.051*NO3                              (15)

where:
     MALGN  = maximum unit growth rate corrected for ammonia retardation
              in units of per interval
     MALGRT = temperature corrected maximum unit growth  rate
                                      317                            RELEASE  8.0

-------
                                                          Subroutine Group PLANK

Nitrogen limitation on growth is calculated by the equation:

     GRON = MALGN*MMN/(MMN + CMMN)                                      (16)

where:
     GRON  = unit growth rate based on nitrogen limitation in
             units of per interval
     MALGN = maximum unit growth rate (MALGN has the same value
             as MALGRT if AMRFG is set to zero)
     MMN   = total pool of inorganic nitrogen considered available
             for growth
     CMMN  = Michaelis-Menten constant for nitrogen limited growth in
             mg N/l (CMMN is defaulted to .045 mg N/l)


Light Limited Growth

The equation used  to determine the limitation  on growth rate imposed  by light
intensity was derived by  Dugdale and Macisaac (1971)  based on  uptake rates of
inorganic nitrogen under varying light intensities:

     GROL = MALGRT*LIGHT/(CMMLT + LIGHT)                                (17)

where:
     GROL   = unit growth rate based on light limitation in units
              of per interval
     MALGRT = temperature corrected maximum unit growth rate in units
              of per interval
     LIGHT  = light intensity available to algae in RCHRES in
              langleys/min
     CMMLT  = Michaelis-Menten constant for light limited growth in
              langleys/min  (CMMLT is defaulted to .033 langleys/min)


Algal Respiration

Algal respiration is  dependent upon water temperature and is  calculated by  the
equation:

     RES = ALR20*(TW/20.)                                                (18)

where:
     RES   = unit algal respiration rate  in units of per interval
     ALR20 = unit respiration rate at 20  degrees C
     TW    = water temperature in degrees C
                                       318                             RELEASE 8.0

-------
                                                          Subroutine Group PLANK

4.2(3).7.3.3.2  Check Nutrients Required for Computed Growth
                (subroutine GROCHK)


GROCHK  assures that  a  minimum concentration  of .001  mg/1  of each  nutrient
remains in  the RCHRES waters  after growth occurs.    If this condition  is not
satisfied,  the computed growth rate  is adjusted accordingly.   Orthophosphorus
and inorganic nitrogen are always considered  as nutrients.   If pH is simulated
(PHFG «=  1),  the  user may specify  that carbon  dioxide concentration  also be
considered as a limiting nutrient by setting the value of DECFG equal to zero.
4.2(3).7.3.3.3  Calculate Phytoplankton Death
                (subroutine PHYDTH)
Purpose

PHYDTH calculates algal death each interval by using one of two unit death rates
specified in the User's Control Input.   ALDL, the low unit death rate,  is used
when environmental  conditions encourage sustained  life.   In  situations where
nutrients are scarce  or the phytoplankton population  becomes excessive,  ALDH,
the high algal death rate, is used.
Method

The high algal death rate,  which has a default value of .01/hr,  is used if any
one of three conditions exists:

     1. the concentration of PO4 is less than the value of parameter
        PALDH
     2. the concentration of inorganic nitrogen is less than the value
        of parameter NALDH
     3. the concentration of phytoplankton is greater than the value of
        parameter CLALDH

Regardless of whether these tests indicate that ALDH or ALDL should be used,  an
additional increment to death occurs if  anaerobic conditions prevail during the
interval.  The increment to death rate due to anaerobic conditions is determined
by the value of parameter OXALD.  The amount of phytoplankton death which occurs
during the interval is calculated as:

     DTHPHY - ALD*STC                                                    (19)

where:
     DTHPHY = amount of phytoplankton death as micromoles P/l.interval
     ALD    = unit algal death rate determined by environmental conditions
              in units of per interval
     STC    = concentration of phytoplankton as micromoles P/l
                                      319                            RELEASE  8.0

-------
                                                          Subroutine Group PLANK
4.2(3).7.3.3.4 Perform Materials Balance for Transformation from Living
               to Dead Organic Material (subroutine ORGBAL)
Purpose

ORGBAL increments  the concentrations of dead  organics to account  for plankton
death.    Plankton death  may either  be  algal death,   zooplankton death,   or
phytoplankton ingested  by zooplankton  but not assimilated.    In each  case in
which ORGBAL is called, the increments to ORP, ORN, ORC,  and BOD are calculated
in the  subroutine which  makes the call  and passed on  to ORGBAL.    ORGBAL is
merely a service program which performs the additions to these state variables.
4.2(3).7.3.3.5  Perform Materials Balance for Transformation from Inorganic
                to Organic Materials (subroutine NUTRUP)
Purpose

NUTRUP adjusts  the concentrations  of inorganic  chemicals to  account  for  net
growth of algae.  Net growth may be either positive or negative depending on the
relative magnitude  of growth  and respiration.  The  state variables  which are
updated by NUTRUP include P04, N03, NH3, and C02.
Method

The adjustments to PO4 and CO2 are  straightforward.   The P04  state variable  is
always updated;  the C02 state variable is only updated if pH is simulated  (PHFG
= 1)   and carbon  dioxide is  considered as  a limiting  nutrient  (DECFG   =0).
Adjustment  of the  inorganic nitrogen  state  variables is  more complex.     If
ammonia is not  specified as a source  of inorganic nitrogen for  growth  (NSPG «=
0),  only  the NO3  state variable is  updated to account  for  net  growth.    If
ammonia is considered a  nutrient  (NSFG =1),  negative net  growth is  accounted
for by  adding the total flux  of  nitrogen to  the NH3 state variable.     If net
growth is positive,  a portion of  the  nitrogen flux  is subtracted  from both the
NO3 and  NH3 state  variables.   The  relative proportions  of  NO3  and NH3 are
governed by  the value of  parameter ALNPR,  which  is the fraction of nitrogen
requirements for growth which are  preferably satisfied by nitrate.
 4.2(3).7.3.4 Simulate  Zooplankton  (subroutine  ZORX)
 Purpose

 ZORX  simulates  the  growth and  death of  zooplankton,  and the resultant changes in
 the biochemical balance   of  the  RCHRES.    Zooplankton play an  important role in
 determining  the water  quality  of rivers and  lakes.
                                       320                            RELEASE 8.0

-------
                                                          Subroutine Group PLANK

By feeding  on the algal,   bacterial,  and detrital  mass,  they are  a natural
regulator in the aquatic environment.  At the same time zooplankton are a source
of food  material for higher trophic  levels such as fish.    Through excretion,
zooplankton provide nutrients for phytoplankton growth,   HSPF is only concerned
with  those  zooplankton  which  feed on  phytoplankton,   although  in  reality
zooplankton may be herbivores, omnivores, or carnivores.


Schematic View of Fluxes and Storages

Figure 4.2(33.7.3-3 illustrates the fluxes and storage of zooplankton modeled in
ZORX.   In addition  to zooplankton,  the state variables  for dissolved oxygen,
biochemical oxygen demand,  ammonia,   nitrate,  orthophosphate,  and refractory
organics are also updated.  Subroutine ZORX considers the following processes;

     1. filtering and ingestion of phytoplankton by zooplankton
     2. assimilation of ingested materials to form new zooplankton biomass
     3. zooplankton respiration
     4. inorganic and organic zooplankton excretion
     5. zooplankton death


Filtering and Ingestion

The amount of phytoplankton ingested per  milligram zooplankton  is calculated by
the equation:

     ZOEAT * ZFIL20*(TCZFIL**(TW - 20.))*PHYTO                           (20)

where:
     ZOEAT  = unit ingestion rate in mg phyto/mg zoo per interval
     ZFIL20 = zooplankton filtering rate at 20 degrees C as
              liters filtered/ing zoo per interval
     TCZFIL = temperature correction coefficient for filtering
     TW     = water temperature in degrees C
     PHYTO  = phytoplankton concentration in mg phyto/1

The   filtering  rate  is  dependent upon  water  temperature  and  phytoplankton
concentration.  Rates for most biological activities double for  every  10 degrees
Celsius increase in temperature.  The filtering rate meets this  criterion  if the
default value of 1.17 is used for the temperature correction coefficient TCZFIL.

When the  phytoplankton biomass  is below  a critical  concentration,   the  unit
filtering rate  will be  maximal and  constant.   As   the phytoplankton  biomass
increases above the  critical concentration,  the limiting rate  is dependent on
ingestive and digestive capabilities,  and not  on the concentration of  the  food
source.   Under these  conditions,  the filtering rate  decreases proportionally
such  that the  algal biomass  ingested remains  constant  at the  value of   the
parameter   MZOEAT,   which   is   defaulted   to  0.055   mg    phytoplankton/mg
zooplankton/hr.    The code  simulates this  by  reducing  ZOEAT   to MZOEAT,    if
equation 20 gives a value greater than MZOEAT.
                                       321                             RELEASE 8.0

-------
                                                          Subroutine Group PLANK

HSPF  assumes that  the  filtering activities  of  zooplankton  are 100  percent
efficient; that is, the zooplankton ingest all of the food which is contained in
the water which they filter.   The total amount of phytoplankton ingested by the
zooplankton is calculated as:

     ZEAT = ZOEAT*ZOO                                                   (21)

where:
     ZEAT  = ingested phytoplankton in mg biomass/1 per interval
     ZOEAT = unit ingestion rate
     ZOO   = zooplankton concentration in mg biomass/1

ZORX  checks  that the  calculated  amount  of  ingestion  does not  reduce  the
phytoplankton population to less than 0.0025 micromoles of phosphorus per liter;
if  it  does,  the  ingestion  rate  is  adjusted  to maintain  a  phytoplankton
concentration at this level.
Assimilation

Assimilation is the process by which ingested phytoplankton are converted  to new
zooplankton mass.  The process of assimilation is never 100 percent efficient in
biological systems.    Unassimilated food is  excreted as organic  and inorganic
waste products.   Zooplankton assimilation efficiency  is dependent upon quality
and concentration of food.  High quality food is assimilated at high efficiency,
whereas  low  quality  food  is  mostly  excreted  as  waste  resulting  in  low
assimilation  efficiency.    The  relationship between  food  concentration  and
assimilation efficiency is more complex.  If the concentration of available food
and the filtering  rate of an organism  are such that the  organism ingests more
food  than can  be  readily  used for  growth  and  metabolism,   the  organism's
assimilation efficiency  decreases.   The  model represents  the  effect  of food
quality and concentration on assimilation as shown in Figure 4.2(3).7.3-6.

The quality of the  zooplankton food is assigned in the  User's Control Input by
the parameter ZFOOD.  Three qualities of food are allowed.  From  these, one type
must  be  chosen  to  represent  the   overall  food  source  available  to  the
zooplankton:

               1 = high quality food
     ZFOOD =   2 = medium quality
               3 = low quality

Depending on the  value assigned to ZFOOD,  the assimilation  efficiency ZEFF is
calculated by one of the following equations:

     IF ZFOOD =  1 THEN ZEFF = -.06*PHYTO +1.03                          (22)
        IF ZEFF  > 0.99 THEN ZEFF =0.99

     IF ZFOOD =  2 THEN ZEFF = -,03*PHYTO + 0.47
        IF ZEFF  <  .20 THEN ZEFF =0.20
                                       322                             RELEASE 8.0

-------
                                                          Subroutine Group PLANK

     IF ZFOOD = 3 THEN ZEFF = -.013*PHYTO +0.17
        IF ZEFF < .03 THEN ZEFF =0.03

These equations  are extrapolations from  research on Daphnia  (Schindler 1968).
The corrections to ZEFF  set reasonable upper or lower limits  on efficiency for
assimilating each type of food.   The mass of ingested phytoplankton assimilated
by zooplankton is calculated as:
     ZOGR = ZEFF*ZEAT
                                                                   (23)
where:
     ZOGR
     ZEFF
     ZEAT
       zooplankton growth as mg biomass/1 per interval
       assimilation efficiency (dimensionless)
       ingested phytoplankton in mg biomass/1 per interval
Respiration

Respiration is  the biochemical  process by which  organic molecules  are broken
down,  resulting  in a  release of energy  which is  essential for  cellular and
organismal activities.   The oxidized molecules  may either be carbohydrates and
fats stored within the organism or food passing through the organism's digestive
system.    In either  case,  the  end result  of  respiration is  a decrease  in
zooplankton mass and a subsequent release of inorganic nutrients.   The equation
governing zooplankton respiration is:
ZRES = ZRES20*(TCZRES**(TW - 20.))*ZOO
              I.O

        c
        •
        'G
             OUJ
                                                                        (24)
                                             Subroutine Group PLANK
                                                    ZFOOD-I
                  0.0
                     0
                        Food Concentration, mg/l
            Figure 4.2(3).7.3-6 Zooplankton assimilation efficiency
                                      323
                                                                     RELEASE 8.0

-------
                                                          Subroutine Group PLANK

where:
     ZRES   = zooplankton biomass respired mg zoo/1 per interval
     ZRES20 = respiration rate at 20 degrees C, defaulted to .0015/hr
     TCZRES = temperature correction factor for respiration, defaulted to
              1.07
     ZOO    = zooplankton in mg biomass/1
Excretion Products

Excretion is  the ingested  food which  is not  assimilated by  the zooplankton.
These waste products contain both  refractory and nonrefractory materials.   The
amount of refractory organic excretion is calculated as:

     ZREFEX = REFR*ZEXMAS                                               (25)

where:
     ZREFEX = refractory organic material excreted by zooplankton
              mg refractory biomass/1 per interval
     ZEXMAS = total mass of zooplankton excretion
              (ZEXMAS is the difference between ZEAT and ZOGR)
     REFR   = fraction of biomass which is refractory
              (REFR is the complement of parameter NONREF)

The nonrefractory portion of the excretion is  released to the water in the form
of inorganic nutrients and undegraded BOD materials.   The relative abundance of
the  materials is  dependent upon  the unit  ingestion rate  of the  zooplankton
(ZOEAT).   At  higher ingestion rates,  a  larger fraction of  the nonrefractory
excretion is not decomposed and is released as BOD materials.   In the model the
parameter ZEXDEL is the fraction of nonrefractory excretion which is immediately
decomposed  and released  to  the water  as inorganic  nutrients  when the  unit
ingestion rate of  the zooplankton is maximal.    If the unit ingestion   rate is
less than  maximal,  the model assumes  that all the nonrefractory  excretion is
released to the  water as inorganic nutrients.   Thus,  the  amount of excretion
released as inorganic materials is:

     ZINGEX = ZEXDEC*(ZEXMAS - ZREFEX)                                   (26)

where:
     ZINGEX = amount of biomass decomposed to inorganic excretion
              as mg biomass/1 per interval
     ZEXDEC = fraction of nonrefractory inorganic excretion
              (ZEXDEC = 1 for ZOEAT <= MZOEAT and ZEXDEC = ZEXDEL for
              ZOEAT > MZOEAT. Value of ZOEAT is  that given by equation
              20; that is, prior to adjustment.)

The  remaining portion of  the excretion is considered to be BOD materials, and  is
calculated as:

      ZNRFEX = ZEXMAS - ZREFEX -  ZINGEX                                   (27)
                                       324                            RELEASE 8.0

-------
                                                          Subroutine Group PLANK

where:
     ZNRFEX = amount of biomass released as nonrefractory organic excretion
              as mg biomass/1 per interval
Death

Zooplankton  death   is  the  termination   of  all   ingestion,   assimilation,
respiration, and excretion activities.  After death, zooplankton contribute both
refractory and nonrefractory materials to the system.  Under aerobic conditions,
the mass  rate of  zooplankton death  is determined  by multiplying  the natural
zooplankton death rate,   ZD,  by the zooplankton  concentration.   If anaerobic
conditions exist,  an increase in zoopankton death rate is modeled by adding the
value of the anaerobic death rate parameter, OXZD, to ZD.   The default value of
ZD is 0.0001/hr and that of OXZD is .03/hr.
Materials Balance for Related Constituents

Research  has shown  that 1.10  mg  of oxygen  are  consumed for  every gram  of
zooplankton mass which  is respired (Richman 1958).   The DOX  state variable is
reduced accordingly  in ZORX.   If there  is not sufficient oxygen  available to
satisfy  respiration  requirements,  the  deficit  is  added  to the   BOD   state
variable, and DOX is set equal to zero.

ZORX makes use of subroutine DECBAL (4.2(3).7.2.4) to update the state variables
NH3,  NO3,   and PO4 to account  for additions from zooplankton  respiration and
inorganic excretion.  The amount of inorganic constituents produced by these two
processes is calculated by the following equations:

     ZNIT =  (ZINGEX + ZRES)*CVBN                                         (28)
     ZPO4 =  (ZINGEX + ZRES)*CVBP
     ZCO2 =  (ZINGEX + ZRES)*CVBC

where:
     ZNIT   = increment to NH3 or NO3 state variable in
              mg N/l per interval
     ZPO4   = increment to PO4 state variable in
              mg P/l per interval
     ZCO2   = increment to CO2 state variable in
              mg C/l per interval
     ZINGEX = amount of biomass decomposed to inorganic  excretion expressed
              as mg biomass/1 per interval
     ZRES   = amount of biomass respired by zooplankton  as
              mg bipmass/1 per interval
     CVBN   = conversion factor from biomass to equivalent nitrogen
     CVBP   = conversion factor from biomass to equivalent phosphorus
     CVBC   = conversion factor from biomass to equivalent carbon

If  ammonia is  simulated,  the inorganic nitrogen  released  is added  to   the NH3
variable;  otherwise,  it is  added to the NO3 variable.   The   value  of  ZCO2  is
calculated for use in subroutine group PHCARB if pH simulation is performed.
                                       325                             RELEASE 8.0

-------
                                                          Subroutine Group PLANK

Finally,  ZORX  calls subroutine  ORGBAL (4.2(3).7.3.3.4)   to update  the state
variables for ORN, ORP,  ORC,  and BOD to account for additions from zooplankton
death and  organic excretion.   The amount  of organic constituents  produced by
these processes are calculated as:

     ZORN = ((REFR*ZDTH) + ZREFEX)*CVBN                                  (29)
     ZORP = ((REFR*ZDTH) + ZREFEX)*CVBP
     ZORC = ((REFR*ZDTH) + ZREFEX)*CVBC
     ZBOD = (ZDTH*CVNRBO) +  (ZNRFEX*CVBO)

where:
     ZORN   = increment to ORN state variable in mg N/l per interval
     ZQRP   = increment to ORP state variable in mg P/l per interval
     ZORC   = increment to ORC state variable in mg C/l per interval
     ZBOD   = increment to BOD state variable in mg O/l per interval
     REFR   = refractory fraction of biomass
     ZDTH   = zooplankton death as mg biomass/1 per interval
     ZREFEX = refractory organic excretion as
              mg biomass/1 per interval
     ZNRFEX = nonrefractory  organic excretion as
              mg biomass/1 per interval
     CVBO   = conversion from biomass to equivalent oxygen
     CVNRBO = conversion from nonrefractory biomass to equivalent oxygen,
              times NONREF
4.2(3).7.3.5 Simulate Benthic Algae  (subroutine  BALRX)
 Purpose

 BALRX  simulates  those algae   in  the RCHRES  which  are  attached  to rocks or other
 stable structures.    In  free flowing  streams,    large  diurnal  fluctuations of
 oxygen can   be attributed  to benthic   algae.   During  the sunlight  hours,  if
 sufficient  nutrients exist  to support photosynthesis,  oxygen is produced in such
 large  quantities that supersaturation often occurs.   However,  at night,  when
 photosynthesis cannot occur,  the benthic  algae can exert a significant demand on
 the  oxygen  supply of the  RCHRES  due to  respiratory requirements.   Benthic algae
 influence the  nutrient balance  of  the  RCHRES by their  extraction  of nutrients
 for  growth.
 Approach

 The growth  and death of benthic  algae are modeled  in much the same  manner as
 their free floating relatives,   the phytoplankton.    In fact,  four of the five
 subroutines which  are used for  phytoplankton simulation  are also used  in the
 benthic algae simulation.   These subroutines  are ALGRO,  GROCHK,  ORGBAL,  and
 NUTRUP.^   There are  two major  differences in  modeling the two types  of algae.
 First, since the benthic algae  are attached to materials in the RCHRES, they are
 not subject to  longitudinal advection.   Second,  the manner in  which death of
 benthic algae  is modeled  is sufficiently  different from  the method  used for
 phytoplankton that a special subroutine, BALDTH, is used.   Within BALRX benthic

                                       326                            RELEASE 8.0

-------
                                                          Subroutine Group PLANK

algae are in units of micromoles phosphorus  per liter so that the benthic algae
simulation can take advantage of the same  subroutines used by PHYRX.   In order
to obtain these units, the following conversion is performed:

     BAL » BENAL*DEPCOR/CVPB                                            (30)

where:
     BAL    = benthic algae as micromoles phosphorus/1
     BENAL  = benthic algae as mg biomass/m2
     CVPB   = conversion factor from micromoles phosphorus to
              mg biomass
     DEPCOR = conversion from square meters to liters based on average
              depth of water in RCHRES during the interval
              (DEPCOR is calculated in RQUAL)
Net Growth

Unit growth and respiration rates for benthic algae are calculated by subroutine
ALGRO.   The  user has  the option  of multiplying  either of  these rates  by a
constant factor if there is evidence that  the benthic algae population does not
exhibit the same  growth and respiration rates as  the phytoplankton population.
Thus, net growth rate is calculated as:

     GROBAL = (GRO*CFBALG - RES*CPBALR)*BAL                             (31)

where:
     GROBAL = net growth rate of benthic algae as micromoles
              phosphorus/1 per interval
     GRO    = unit growth rate as calculated in subroutine ALGRO
     CFBALG = ratio of benthic algae to phytoplankton growth rates
              under identical growth conditions (default - 1.0)
     RES    = unit respiration rate as calculated in subroutine ALGRO
     CFBALR = ratio of benthic algae to phytoplankton respiration rates
              (default =1.0)
     BAL    = benthic algae concentration as micromoles phosphorus/1

After GROBAL  has been calculated,  subroutine  GROCHK is called to  assure that
calculated growth  does not  reduce any  nutrient to  a concentration  less than
0.001 mg/1.  If it does, GROBAL is adjusted to satisfy this requirement.
                                      327                            RELEASE 8.0

-------
                                                          Subroutine Group PLANK
Death of Benthic Algae
Subroutine BALDTH calculates  the amount of benthic algae death  and passes this
information back to BALRX (variable DTHBAL).    BALRX updates the state variable
BAL to account  for net growth and death.    The value of BAL is  not allowed to
fall below .0001 micromoles of phosphorus per square meter.
Materials Balance for Related Constituents
The DOX state variable is updated to account for the net effect of benthic algae
photosynthesis and respiration according to the following equation:

     DOX = DOX + (CVPB*CVBO*GROBAL)                                      (32)

where:
     DOX    = concentration of dissolved oxygen in mg/1
     CVPB   = conversion factor from micromoles phosphorus to mg biomass
     CVBO   = conversion factor from mg biomass to mg oxygen
     GROBAL = net growth of benthic algae as micromoles phosphorus/1
              per interval
The additions to ORN, ORP,
calculated as:
ORC,  and BOD resulting from benthic algae death are
     BALORN = REFR*DTHBAL*CVBPN*.014                                     (33)
     BALORP = REFR*DTHBAL*.032
     BALORC = REFR*DTHBAL*CVBPC*.012
     BALBOD = CVNRBO*CVPB*DTHBAL

where:
     BALORN = increment to ORN state variable in mg N/l per  interval
     BALORP = increment to ORP state variable in mg P/l per  interval
     BALORC = increment to ORC state variable in mg C/l per  interval
     BALBOD = increment to BOD state variable in mg O/l per  interval
     REPR   = refractory  fraction of biomass
     DTHBAL = benthic algae death as micromoles P/l per interval
     CVNRBO = conversion  from mg biomass  to equivalent mg
              oxygen demand (allowing  for refractory  fraction)
     CVPB   = conversion  from micromoles  phosphorus to mg  biomass
     CVBPN  = conversion  from micromoles  phosphorus to micromoles  nitrogen
     CVBPC  = conversion  from micromoles  phosphorus to micromoles  carbon

When BALORN, BALORP, BALORC,  and BALBOD  have been evaluated,   subroutine ORGBAL
is  called to  perform the actual increments to  the appropriate state variables.
Finally,  subroutine NUTRUP is called  to  update the inorganic  state variables to
account for net growth.
                                       328
                                          RELEASE 8.0

-------
                                                          Subroutine Group PLANK

External Units

The output  values for  benthic algae  are in  units of  milligrams biomass  per
square meter and micrograms chlorophyll a per square meter.



4.2(3).7.3.5.1 Calculate Benthic Algae Death (subroutine BALDTH)


Purpose

BALDTH calculates algal death each interval by using one of two unit death rates
specified in the User's Control Input.   ALDL, the low unit death rate,  is used
when environr-'-^al  conditions encourage  sustained life;   in situations  where
nutrients are scarce  or the benthic algae population  becomes excessive,  ALDH,
the high algal death rate, is used.
Method

The high algal death rate,  which has a default value of  ,01/hr,  is  used  if  any
one of three conditions exists:

     1 * the concentration of PO4 is less than the value of parameter
        PALDH
     2. the concentration of inorganic nitrogen is less than the value
        of parameter NALDH
     3. the areal density of benthic algae is greater than the value  of
        parameter MBAL

Regardless of  whether these tests  indicate that  ALDH or ALDL  (default  equals
0.001/hr)  should be used,  an additional increment to death occurs if anaerobic
conditions are prevalent during the interval.    The increment to death  rate  due
to anaerobic conditions is determined by the value of parameter OXALD.   When  the
benthic  algae population  grows  to  a size  greater  than  that which  may   be
supported on the bottom surface,  algae begin  to break away from the bottom,   a
phenomenon known as sloughing.   Whenever  the population calculated  exceeds  the
maximum  allowable bottom  density (MBAL),   the sloughing  process removes   the
excess  algae.   The  amount  of benthic  algae death  which  occurs  during   the
interval is calculated as:

     DTHBAL = (ALD*BAL) + SLOP                                           (34)

where:
     DTHBAL = amount of benthic algae death as micromoles p/1 per interval
     ALD    - unit algal death rate determined by environmental conditions
              in units of per interval
     BAL    = concentration of benthic algaa as micromoles P/1
     SLOP   = amount of benthic algae sloughed as
              micromoles P/1 per interval
                                      329                             RELEASE 8.0

-------
                                                         Subroutine Group PHCARB

4.2(3).7.4  Simulate pH, Carbon Dioxide, Total Inorganic Carbon,
            and Alkalinity (Subroutine Group PHCARB of Module RCHRES)


Purpose

PHCARB calculates the pH of the water within a RCHRES.   The primary value of pH
is as  an indicator of  the chemical environment  of the system.    Under normal
circumstances, pH is near neutral,  that is,  near seven.   Most life sustaining
processes are impaired at extremes of pH.
Method

Figure  4.2(3).7.4-1  illustrates  the  fluxes   and  storages  of  constituents
introduced  in  this  section.    Determination of  pH  requires  simulation  of
alkalinity, carbon dioxide,  and total inorganic carbon.   Within PHCARB,  state
variables for alkalinity (ALK), carbon dioxide (CO2), and total inorganic carbon
(TIC)  are  expressed as molar concentrations  to correspond to  the equilibrium
expressions necessary  to determine  pH.   The conversion  from mg/1  to moles/1
takes place after longitudinal advection has been considered.   Externally, ALK,
CO2, and TIC are expressed in mg/1.
Alkalinity

Alkalinity is defined as the amount of acid  required to attain a pH value equal
to that of a total inorganic carbon molar  solution of H2CO3.   This pH  value  is
near 4.5,  which is approximately the lowest pH value tolerated by most  forms  of
aquatic life.   Alkalinity  is interpreted as the acid  neutralizing capacity  of
natural waters.

Alkalinity is simulated as a conservative  constituent,  in module section CONS.
Parameter ALKCON,   in the  User's Control  Input for  PHCARB,  specifies  which
conservative  substance  is alkalinity.    For  example,   if  ALKCON =   3   then
subroutine  PHCARB  will   assume  that  alkalinity  is    the  3rd  conservative
constituent.
Carbon Dioxide and Total  Inorganic Carbon

HSPF assumes  that changes in  the TIC  concentration  occur  only as  changes in CO2
concentration.  Thus,  the sources of TIC are:

     1. carbon dioxide invasion  (input) from  the  atmosphere
     2. zooplankton  respiration
     3. carbon dioxide released  by BOD decay
     4. net growth of  algae  (if  negative)
     5. benthal release of carbon dioxide  (if BENRFG = 1)
                                       330                            RELEASE 8.0

-------
                                          Subroutine Group PHCARB
                    oeccot
                     BOO
                    decoy
         ZCO2
      roool«nkton
    carbon
    dioxide
    invasion
   icot
 inflow
1   to
[RCHRESJ
 \      /
  ITIC
 inflow
   to
 RCHRES
            net
           arowiii
          of alqae
                                   MMCOf.
                     coe
                      -t-
                   H2C03
                        "1
HC03
H-
                                      OCOtCM1)
             TIC
                 I  from
                 IRCMRESI
                 AOCOZ.


                [ sum of ,
                outflows
                I  front  I
                                  \
                                      OTICCN')
outflow
  from
RCHRES
ttwouqh
                                                       Rortc
sum of
outflows
  from
 Fiqure 4.Z(3).7r4-i  Flow di«qrom of inorqanic carbon inihe PHCARB
                       of 1he RCURES Aoplicotion Module
                            331
                                  RELEASE 8.0

-------
                                                         Subroutine Group PHCARB

The sinks of TIC are:

     1. carbon dioxide release to the atmosphere
     2. net growth of algae (if positive)

All of these  quantities except carbon dioxide invasion are  calculated in other
subroutines and passed into PHCARB.


Carbon Dioxide Invasion

In order to calculate carbon dioxide  invasion,  the saturation concentration of
CO2 must be determined.   First, Henry's constant for CO2,  defined as the molar
concentration of  atmospheric C02 divided  by the  partial pressure of  CO2,  is
calculated by the equation:

     S = 10.**(2385.73/TWKELV - 14.0184 + .0152642*TWKELV)                (1)

where:
     S      = Henrys's constant for CO2
     TWKELV = absolute temperature of water in degrees Kelvin

Using Henry's constant, saturation concentration of CO2 is calculated as:

     SATC02 = 3.16E-04*CFPRES*S                                           (2)

where:
     SATCO2 = saturation concentration of CO2 in moles C02-C/1
     CFPRES = correction to atmospheric pressure resulting from elevation
              difference (CFPRES is calculated in the Run Interpreter)
     S      = Henry's constant for CO2

The carbon dioxide invasion is then calculated by the following equation:

     ATCO2 = KCINV*(SATCO2 - CO2)                                         (3)

where:
     ATCO2  = carbon dioxide invasion expressed as moles CO2-C/1
              per interval
     KCINV  = carbon dioxide invasion coefficient (per interval)
     SATCO2 = saturation concentration of CO2 in moles CO2-C/1
     CO2    = concentration of CO2 after longitudinal advection in moles
              CO2-C/1

A  positive value for  ATCO2 indicates addition of CO2 to  the water;   a negative
value  indicates a  release of CO2  from   water  to the atmosphere.    The value of
KCINV  is dependent  upon the value calculated  for KOREA,   the oxygen  reaeration
coefficient,  in subroutine group OXRX:
                                       332                             RELEASE 8.0

-------
                                                         Subroutine Group PHCARB

     KCINV = CFCINV*KOREA                                                (4)

where:
     KCINV  = carbon dioxide invasion coefficient (units are 1/interval)
     CFCINV = parameter specifying ratio of C02 invasion rate to O2
              reaeration rate
     KOREA  - oxygen reaeration coefficient (units are 1/interval)


Net Carbon Dioxide Flux

The net carbon dioxide flux is determined by the following equation:

     DELTCD - ATC02 + (ZC02 - ALGC02 + DECC02 + BENCO2)/12000.           (5)

where:
     DELTCD = net C02 flux in moles CO2-C/1 per interval
     ATCO2  = C02 invasion in moles CO2-C/1 per interval
     ZC02   = CO2 released by zooplankton excretion and respiration
              in mg CO2-C/1 per interval
     ALGCO2 = C02 flux due to net growth of algae in mg C02-C/1 per interval
     DECCO2 = CO2 released by BOD decay in mg CO2-C/1 per interval
     BENCO2 = benthal release of CO2 in mg C02-C/1 per interval
      12000. - conversion from mg CO2-C/1 to moles C02-C/1

If DECFG,  the flag  which decouples CO2 from algal simulation,   has  a  value  of
one,  ALGCO2 has a  value of zero in this equation.    Benthal release rates for
both aerobic  and anaerobic conditions  must be  included in  the  User's Control
Input if benthal release of C02 is  simulated.   Since HSPF assumes that changes
in total inorganic carbon concentration only occur as changes in carbon  dioxide,
the update to the TIC state variable for each simulation interval is:

     TIC - TIC + DELTCD                                                   (6)

where:
     TIC == total inorganic carbon in moles C/l


The Carbon System

The value of pH is controlled by the carbon system.   There are three  species  of
importance to the system:   [H2CO3*], [HCO3], and  [C03].    [H2CO3*] is  defined  as
the sum  of  [H2CO3]   and  [CO2];   for modeling  purposes  [H2CO3]  is  negligible
relative  to [CO2],    The  carbon  system can  be  described  by the  following
equations:

      [H]*[HCO3]/[H2C03*] = K1EQU                                          (7)
      [H]*[CO3]/[HC03] = K2EQU
      lH]*[OH] = KWEQU
      [H2C03*] + [HC03] +  [CO3] = TIC
      [HC03] + 2*[CO3] +  [OH] - [H] = ALK
                                       333                            RELEASE  8.0

-------
                                                         Subroutine Group PHCARB
where:
     [H]
     [OH]
     [C03]
     [HC03]
     [H2C03*]
     K1EQU
     K2EQU
     KWEQU
               hydrogen  ion concentration  in moles/1
               hydroxide ion concentration in moles/1
               carbonate ion concentration in moles/1
               bicarbonate ion concentration in moles/1
               carbonic  acid/carbon dioxide concentration  in  moles/1
               first dissociation  constant for carbonic  acid
               second dissociation constant for carbonic acid
               ionization product  of  water
The five unknown values ([H2CO3*], [HCO3], [CO3], [H],  [OH])  can be determined
when K1EQU, K2EQU, KWEQU, TIC, and ALK are known.   K1EQU, K2EQU,  and KWEQU are
all functions of water temperature and are evaluated by the following equations:
     K1EQU = 10.**(-3404.71/TWKELV + 14.8435 - ,032786*TWKELV)
     K2EQU = 10.**(-2902.39/TWKELV + 6.4980 - ,02379*TWKELV)
     KWEQU = 10.**(-4470.99/TWKELV + 6.0875 - .01706*TWKELV)
                                                                         (8)
where:
     TWKELV
              absolute temperature of water in degrees Kelvin
Calculation of pH and CO2

Once values have been determined for K1EQU,   K2EQU,  KWEQU,  TIC,   and  ALK,   an
equilibrium equation can be developed for hydrogen ion concentration ([H]).   The
five equations representing the carbon system (Equation   7)   can  be  reduced  to a
fourth order polynomial expression:
                                                                          (9)
     [H]**4 + COEFF1*([H]**3) + COEFF2*([H]**2) + COEFF3*[H] + COEFF4

where:
     COEFF1 = ALK + K1 EQU
     COEFF2 = -KWEQU + ALK*K1EQU + K1EQU*K2EQU - TIC*K1EQU
     COEFF3 = -2.*K1EQU*K2EQU*TIC - K1EQU*KWEQU + ALK*K1EQU*K2EQU
     COEFF4 = -K1EQU*K2EQU*KWEQU
     [H]    = hydrogen ion concentration in moles/1

The solution of this equation is performed  by subroutine PHCALC.   Based on  the
hydrogen ion  concentration calculated in PHCALC,   the concentration of  CO2 is
recalculated as:
      CO2 = TIC/(1.  + K1EQU/HPLUS + K1EQU*K2EQU/(HPLUS**2))

 where:
      C02   = carbon dioxide concentration in moles C/l
      TIC   = total  inorganic carbon concentration in moles  C/l
                                                                         (10)
                                       334
                                                                      RELEASE 8.0

-------
                                                         Subroutine Group PHCARB

     K1EQU « first dissociation constant of carbonic acid
     K2EQU « second dissociation constant of carbonic acid
     HPLUS = hydrogen ion concentration in moles H/l

Finally,  the units  of TIC,  CO2,  and ALK  are converted back to  mg/1 for use
outside of PHCARB.
4.2(3).7.4.1 Calcuate pH (subroutine PHCALC)


PHCALC  uses the  Newton-Raphson method  to  solve the  fourth order  polynomial
expression for the hydrogen ion concentration (Equation 9).   The user specifies
the maximum  number of iterations  performed by  assigning a value  to parameter
PHCNT.    PHCALC continues  the iteration  process  until the  solutions for  pH
concentration of two consecutive iterations differ by  no more than one tenth of
a pH  unit.   If  the solution technique  does not  converge within  the maximum
allowable number of iterations, PHCALC passes this information back to PHCARB by
assigning a  value of  zero to CONVFG.    An error message  is printed  and then
PHCALC is  called again,  to repeat  the unsuccessful iteration  process.   This
time, the "debug flag" (PHDBFG)  is set ON so that,  for each iteration,  PHCALC
will print information which will help the  user or programmer to track down the
source of the problem.
                                      335                            RELEASE  8.0

-------
                                                                     Module COPY

4.2(11)  Copy Time Series (Utility Module COPY)
This utility  module is  used to  copy one  or more  time series  from a  source
specified in the EXT SOURCES or NETWORK Block of the User's Control Input (UCI),
to a target specified in the NETWORK or EXT TARGETS Block (Part F, Section 4.6).

To operate the COPY module,  the user must specify the time interval used in the
internal scratch  pad (INDELT)  and the  number of point-valued  and mean-valued
time series to be copied (NPT and NMN in Part F,  Section 4.4(11).1).   Up to 20
point-valued  and/or 20  mean-valued  time  series may  be  copied  in a  single
operation.

Module TSGET transfers the time series from  the source(s),  which may be either
external (eg.  TSS Dataset or sequential file) or the output(s) from one or more
preceding operations, to the INPAD.  TSS Datasets with time steps other than the
internal scratch pad time interval (INDELT)  will be automatically aggregated or
disaggregated.   Data from sequential files must be at the INDELT interval.   It
also automatically alters  the "kind" of time series,  if  appropriate,  and can
multiply each value by a user-specified factor.

Module TSPUT then transfers the time series  from the INPAD to the target which,
again, can be either external or internal.  The work performed is a mirror image
of  that done  by TSGET;   time  series can  be aggregated/disaggregated  and/or
transformed in the same way.

Module COPY is typically used to transfer time series, such as precipitation and
potential evapotranspiration data, from a sequential file  (eg. card images) to  a
dataset in the Time Series Store (TSS).  Thereafter, when  these data are used as
inputs to simulation operations, they are read directly  from the TSS.

COPY can also be  used to change the "kind" and/or interval of  one or more time
series.   For example,  a TSS dataset containing hourly  precipitation data could
be input to COPY and the output stored  in another TSS dataset with a daily time
step.  The data would automatically be aggregated.
 4.2(12)  Prepare Time Series  for Display  on  a  Plotter   (Utility Module PLTGEN)
This utility module prepares one or  more  time  series  for simultaneous display on
a plotter.  As with the COPY module  (Section 4.2(11)),  the user must specify the
input(s)   (sources),   using entries  in  the  EXT  SOURCES or NETWORK Blocks in his
control input   (UCI),   The internal time-step  and the number of  point- and/or
mean-valued time  series to be  displayed must also be  specified.
                                       336                            RELEASE 8.0

-------
                                                                   Module PLTGEN
TSGET transfers the time  series from the source(s)  to the  INPAD (as in COPY).
PLTGEN then outputs these  data to a plot file (PLOTFL).    This is a sequential
file;   the first  25 records  contain general  information,  such  as the  plot
heading,  number  of curves  to be plotted,   scaling information,   etc.   Each
subsequent record contains:
Cols
     Contents
 1  4     Identifier (first 4 characters of title)
 7 22     Date/time
27 36     Value for curve 1, for this date/time
37 46     Value for curve 2, for this date/time
etc       (repeats until data for all curves are supplied)

The time resolution of the PLOTFL is the INDELT of the run,
of the INDELT which  is also evenly divisible into one day,
year.
                                                        an integer multiple
                                                         one month,  or one
A  PLOTFL may  contain only  records greater  than a  certain threshhold  value,
THRESH, or during a certain span of time specified in the Special Actions Block.
The contents of  a sample PLOTFL are  listed below.
only the first five values have been included:
                                                To keep  the listing short,
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
Plot
HSPF FILE FOR DRIVING SEPARATE PLOT PROGRAM
Time interval:   30 mins          Last month in printout year:  9
No. of curves plotted:  Point-valued:  2   Mean-valued:  0   Total:
Label flag:  0          PIVL:    1          IDELT:   30
              Plot of reservoir flowrates
              Flow (ft3/sec)
Plot title:
Y-axis label
Scale info:
             Ymin:
             Ymax:
             Time:
.OOOOOE+00
1000.0
48.000
                                intervals/inch
Data for each curve (Point-valued first, then mean-valued):
Label
Inflow
Outflow
                        LINTYP
                             0
                             0
              INTEQ
                  0
                  0
COLCOD
     1
     1
TRAN
SUM
SUM
TRANCOD
      1
      1
Time series (pt-valued, then mean-valued);

Date/time                      Values
 1974  5 31 24  0
 1974  6  1  0 30
 1974  6110
 1974  6  1  1 30
 1974  6120
                     .OOOOOE+00
                     .82838
                     1.5071
                     2.0631
                     2.5186
              1.0000
              1.0000
              1.0000
              1.0000
              1.0000
                                      337
                                                                     RELEASE  8.0

-------
                                                                   Module PLTGEN

A  plot file  is intended  to  be read  by  a stand-alone  plot program,   which
translates  its contents  into  information used  to  drive  a plotting  device.
Alternative uses of a PLOTFL are:

1.  To display one or more time series in printed form.  For example: To examine
    the contents of  a dataset in the TSS,   run it through PLTGEN  and list the
    contents of PLOTFL on a line printer or terminal.

2.  To feed time  series to some other stand-alone program.    For example,  one
    could specify the  contents of PLOTFL as  input to a program  which performs
    statistical analysis or computes cross correlations between time series.

4.2(13) Display Time Series in a Convenient Tabular Format (Utility Module
            DISPLY)
The purpose of  this module is to permit  any time series to be  displayed  (at  a
variety of time intervals)  in a convenient format.  Sample outputs  are  shown in
Figures 4.2(13)-1 thru -3. Salient features of this module are:

1.  Any time series  (input or computed) can be displayed. The user specifies the
    time series in the EXT SOURCES or NETWORK Block, as with any other module.

2.  As with any other module, the data are first placed in the INPAD,  by module
    TSGET.  At  this point  they are  at the  time interval  specified for   this
    operation in  the OPN  SEQUENCE Block  (INDELT).  This  might have   involved
    aggregation or disaggregation , if the data were brought in from the TSS. In
    general, INDELT  can be any of the 19 HSPF supported time steps,  ranging from
    1 minute to 1 day.

3.  The user can elect to  display the data in a "long-span  table"  or a "short-
    span table".  The term "span" refers to the period covered by each table.   A
    short-span table  (Figures  4.2(13)-1 and -2)  covers  a day or a month at  a
    time and a long-span table (Figure 4.2(13)-3) covers a year.

4.  The user  selects the  time-step  for   the individual  items in   a short-span
    display  (the  display interval)   by specifying  it as a multiple  (PIVL)  of
    INDELT.  For  example,  the  data in   Figure 4.2(13)-1  are displayed  at an
    interval of 5 minutes. This could have been achieved with:

                          INDELT              PIVL

                           5 min                1
                           1 min                5

    If  the display   interval is less  than  an  hour,   an hours  worth   of  data are
    displayed on one printed "row"  (Figure 4.2(13)-1).  The number of items in  a
    row depends on  their interval  (eg.  60 for  one  minute,   12 for  5 minutes,   2
    for  30  mins.).   A  "row"  may actually   occupy up   to  5   physical  lines  of
    printout because a maximum of  12  items is placed  on a  line.
                                       338                            RELEASE 8.0

-------
                                                                   Module DISPLY

    If the display interval is >= hour,  a  day's worth of data are displayed on
    one "row" (Figure 4.2(13)-2). Again, the number of items in a row depends on
    the display interval.  In this case the  entire table spans a month;  in the
    former case it only spans a day.

5.  A  long-span table  always  covers a  year;  the  display  interval for  the
    individual items  in the table  is a day   (Figure 4.2(13)-3).  The  user can
    select the month which terminates the display (December, in the example)  so
    that the data can be presented on a calendar year,  water year or some other
    basis.

6.  For the purpose of aggregating the data from the interval time step (INDELT)
    to the display interval, day-value, month-value, or year-value,  one of five
    "transformation codes" can be specified:

           Code                 Meaning

           SUM           Sum of the data
           AVER          Average of the data
           MAX           Take the roa.x of the values at
                         the smaller time step
           MIN           Take the minimum
           LAST          Take the last of the  values
                         belonging to the shorter
                         time step

        SUM is appropriate for displaying data like precip; AVER is useful for
        displaying data such as temperatures.

7.  The  module incorporates  a  feature designed  to  permit  reduction of  the
    quantity of printout produced when doing   short-span displays.  If  the "row-
    value" ("hour-sum" in Figure 4.2(13)-1;    "day-average" in Figure 4.3(13)-2)
    is less than or equal to a "threshold value",  printout of the entire row is
    suppressed.  The default threshold is 0.0.  Thus, in Figure 4.2(13)-1;  data
    for dry hours are not printed.

8.  The user can also specify:

    a.  The number of fractional digits to use in a display.

    b.  A title for the display.

    c.  A linear transformation,  to  be performed on the data when  they are at
        the  INDELT  time interval  (i.e.   before  module DISPLY  performs  any
        aggregation). By default, no transformation is performed.
                                      339                             RELEASE 8.0

-------
u>
4^
O
                                                   TSS 2 Precip. (in/100)
                                                   Summary for DAY    197V 9/ 2
                                                   Data interval:     5 mins

              HOUR       SUM                        Interval Number.
                                     1       234      56      7      8       9      10      11      12
3
ft
5
6
7
8
9
10
1 1
12
13
14
15
16
17
18
19
20
21
22
2.0
3.0
5.0
6.0
3.0
3.0
3.0
3.0
3.0
4.0
3.0
2.0
4.0
7.0
3.0
6.0
5.0
3.0
1 .0
1.0
.0
.0
.0
1 .0
1.0
.0
.0
.0
.0
1 .0
.0
.0
.0
.0
1 .0
1 .0
1 .0
.0
.0
.0
.0
.0
.0
1 .0
.0
.0
.0
.0
.0
1 .0
1 .0
.0
.0
.0
.0
.0
1.0
.0
.0
.0
.0
t.o
.0
2.0
.0
1 .0
1 .0
.0
1 .0
.0
.0
.0
1 .0
1.0
.0
.0
1 .0
.0
.0
.0
.0
.0
.0
1 .0
.0
.0
.0
.0
.0
.0
.0
1.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
1.0
1 .0
.0
.0
.0
1 .0
.0
1.0
.0
.0
1 .0
1.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
1.0
1 .0
.0
.0
.0
.0
1 .0
.0
.0
1.0
1 .0
1 .0
1 .0
1.0
.0
1 .0
.0
1.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
1.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
1.0
.0
1 .0
.0
.0
.0
1 .0
1 .0
.0
1 .0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
1.0
.0
.0
.0
.0
.0
1.0
.0
1 .0
.0
.0
1 .0
.0
1 .0
1 .0
.0
.0
.0
1 .0
.0
.0
.0
1.0
1 .0
.0
.0
.0
.0
.0
1 .0
1 .0
.0
.0
.0
.0
2.0
.0
.0
.0
1 .0
.0
1.0
.0
,0
1.0
1 .0
1.0
1 .0
1.0
.0
.0
.0
.0
1 .0
.0
2.0
.0
1.0
.0
.0
1 .0
.0
.0
.0
.0
.0
.0
.0
1.0
.0
1.0
.0
.0
             DAY    SUM :  7.00000E+01

s
f<
W                                  Figure 4.2(13)-1  Sample short-span display (first type)
en
oo
o
                                                                                                                        n>
                                                                                                                        G
                                                                                                                        H

-------
                                                  TSS  3  Temperature (Deg F)
                                                  Summary  for  MONTH  1974/ 8/
                                                  Data interval:    120  mins
             DAY
AVER
Interval  Number.
  3      4      5
                                                                                                    10
                                                                                     1 1
c/>
PI
00
o
1
2
3
$
5
6
7
8
9
0
1
2
3
4
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
MONTH AVER:
63
68
68
64
64
66
66
70
68
69
72
70
70
65
67
70
66
66
70
73
74
73
73
66
64
72
73
60
62
66
67
6.
.8
.8
.6
.0
.9
.7
.6
.3
.7
.6
.8
.8
.3
.5
. 1
. 1
.8
.2
.3
.8
.7
.3
.4
.2
.0
.9
.8
.3
.7
.9
.0
54059E+01
54.5
61.0
65.5
54.5
58.5
57.5
55.5
64.0
62.5
60.5
68.5
62.5
65.5
57.5
56.5
62.5
63.5
55.5
59.5
64.5
65.5
65.0
67.5
60.5
51 .5
60.5
67.5
55.0
53.5
59.0
62.0

53.5
60.0
65.0
53.5
57.0
56.0
53.5
63.0
61.0
59.0
68.0
61.0
64.0
55.5
55.5
61.0
62.0
54.0
58.0
63.0
64.5
63.5
66.0
58.5
49.5
59.0
66.0
53.0
52.0
58.0
61.0

52.5
59.0
64.0
52.5
56.0
55.0
52.5
62.0
60.0
58.0
67.0
60.0
63.0
54.5
54.5
60.0
61.0
53.0
57.0
62.0
63.5
62.5
65.0
57.5
48.5
58.0
65.0
51 .5
51 .0
57.0
60.0

53
60
64
53
57
56
53
63
61
59
67
61
64
55
55
61
61
54
58
63
64
63
66
58
50
59
66
52
52
58
61

.0
.0
.5
.5
.0
.5
.5
.0
.0
.0
.5
.0
.0
.5
.5
. 0
.5
.5
.5
.5
.5
.0
.0
.0
.0
.5
.0
.0
.0
.0
.0

59.
65.
68.
60.
62.
63.
61 .
68.
66.
65.
71 .
67.
69.
62.
62.
67.
65.
61.
65.
70.
71 .
69.
71 .
64.
58.
67.
72.
57.
58.
63.
66.

5
0
5
0
0
5
0
0
0
0
5
0
0
0
5
0
5
5
5
0
0
5
5
0
0
5
5
0
5
5
0

68.0
72.5
73.5
69.0
69.5
73.5
71.5
75.0
73.5
74.0
77.5
76.0
76.0
71 .0
72.5
75.0
71 .5
72.5
76.5
80.0
81.0
78.0
79.5
73.0
70.0
79.5
81 .0
64.5
67 .0
71 .5
73.0

74.5
77.5
77.0
75.5
74.5
80.0
79.0
79.5
78.5
79.5
81 .0
81 .5
80.5
77.5
79.0
80.5
75.0
79.0
83.0
86.0
87.0
84.5
84.5
78.5
78.0
87.0
87.5
69.5
73.5
76.5
77.5

76
79
78
77
76
82
81
81
80
81
82
83
82
79
81
82
76
81
85
88
89
86
86
80
80
89
89
71
75
78
79

.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0
.0

74.5
77.5
76.0
75.0
74.0
79.5
79.5
79.0
78.0
79.5
80.0
81 .5
80.0
77.0
79.0
80.0
74.0
79.0
83.0
86.0
87.0
84.0
84.0
77.0
78.0
87.0
85.5
69.5
73.5
76.5
76.5

71.0
75.0
70.5
71.0
70.0
73.5
75.5
75.0
73.5
77.0
75.5
77.5
74.0
72.0
75.0
76.0
69.5
74.5
78.5
81 .0
81 .5
80.0
78.0
71.0
73.5
82.5
78.5
65.5
70.0
73.0
70.5

66.0
71.0
63.5
65.5
64.5
65.0
70.5
69.5
67.5
73.0
69.5
71 .5
66.0
65.0
69.5
70.5
63.5
67.5
72.5
74.0
74.0
74.5
70.0
62.0
67.5
75.5
67.5
59.5
65.0
68.0
62.0

62.
67.
57.
60.
59.
53,
66 .
64.
63.
70.
65.
67.
60.
59.
64.
6'j.
58.
62.
67.
68.
68.
69.
63.
54.
63.
70.
59.
55.
61 .
64.
55.

5
5
0
5
5
5
0
5
0
0
0
0
0
0
5
5
0
0
0
0
0
5
0
5
0
G
0
0
0
0
5





























g:
CL
c
M
(D
DISPLY
                                        Figure 4.2(13)-2  Sample  short-span  display (second type)

-------
so
M
f
M
>
Crt
w

00


o
Day
JAN
              TSS 3 Temperature (Deg F)

   Annual  data display:  Summary for period ending 1974/12

FEB     MAR     APR     MAY     JUN     JUL     AUG     SEP
                 OCT
AVER        25.1    21.6    35.3    48.3



AVER of monthly values  4.68582E+01
                                          53.4
                                       64.6
                                       71.1
68.4
58.3
49.0
                           Figure  4.2(13)-3  Sample  long-span  (annual)  display
                 NOV
38.9
                  DEC
1
2
3
4
5
6
7
8
9
10
1 1
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
13.6
9. 1
16.0
15.8
13.8
16.6
13.9
5.0
15.4
15.8
15.2
11.0
12.6
25.7
29.3
30.5
30.8
27.5
31.0
35.0
39.6
33.8
32.0
32.3
37.0
40.5
41 .5
35.2
30.0
37.6
35.7
21 .0
15.8
14.4
12. 1
6.6
13.0
8.0
6.9
14.7
16.2
17.4
31.8
31.7
17.7
13.9
23. 1
24.4
26.7
33.4
31.9
36.0
34. 1
20.9
13.0
16.1
24.7
36.5
43.9



39.8
42.2
54.7
52.2
42.5
48.3
47.8
42.4
40.6
40.1
34.4
34.3
25.2
29.8
36.2
35.5
35.5
33.8
33.2
28.7
31 . 1
30.2
27.6
12.3
20.3
33.2
30.9
31 .4
30. 1
34.6
35.6
38.9
49.5
53.5
51.0
39.9
36.9
40.5
32.8
30.7
42.3
50.8
56.2
58.4
55.3
40.7
41 .7
43. 1
47.3
37.8
47.5
59.5
58.3
42. 1
39.9
43.8
54. 1
65.0
68.2
64.4
60. 1

49.6
51 .2
50.0
45.8
45.0
38.3
39.4
44.5
40.9
47.5
50.8
50 .5
43.3
57.3
58.2
52.8
60.0
55.8
57.7
57.8
67. 1
71.0
61.3
56.2
52.8
51 .9
50.4
55.7
65.2
65. 1
63.6
58.9
59.9
61 .2
69.6
71.0
72.2
72.4
73.0
75.7
71 .2
54.9
57. 1
60.6
68.4
64.5
58.8
52.3
60.4
66.5
71.1
72.3
64.4
55.0
57.0
60.4
64.3
63.5
64.3
66.5
70. 1

70.3
76.0
79.8
75.8
63.2
67.3
72.2
77.6
79.0
75.6
63.6
64.6
75.3
80.9
75.8
66.7
70.2
77.0
73.5
66.9
62.9
67.9
63.8
67.8
69.8
73.8
73.7
70. 1
72.2
65.8
64.5
63.8
68.8
68.6
64.0
64.9
66.7
66.6
70.3
68.7
69.6
72.8
70.8
70.3
65.5
67. 1
70. 1
66.8
66.2
70.3
73.8
74.7
73.3
73.4
66.2
64.0
72.9
73.8
60.2
62.7
66.9
67.0
57.9
54.9
51 .7
51 .8
53.5
56. 1
58.6
66.0
68.2
69.8
73.5
72.7
66. 1
52.4
57.0
53.8
61.4
59.0
62.7
64.7
52.8
46. 1
43.6
50.9
55.3
58.7
63.8
64.5
57. 1
45.2

40.4
33.4
39.7
52.0
60.8
60.3
48.5
45. 1
49. 1
51 .3
57.2
58.2
45.2
53.5
44.0
45.5
48. 1
38.2
31 .2
30.2
36.3
51 .6
54.7
49.8
51.6
46.3
50.4
56-5
58.4
64.3
66.4
63.5
55.7
54.2
42.0
36.4
37.5
39.7
43.4
44.3
46.4
54. 1
40.4
33.6
27.2
26.6
31 .2
41 .5
45.3
44.3
41 .3
35.3
36. C
45. 1
44.0
27.4
21 .7
26.5
28. C
29.2
25.7

2S.7
29. 8
27.5
20.7
?2.5
24.6
31.0
28.7
21 .3
25.5
29.4
34.0
33.6
32.3
32.8
32.2
29.0
21 .2
22.7
24.8
24.8
25.4
33.4
32.3
?6 .0
24.4
28.3
31 .0
33.5
32.6
30.5
28.2
                                                                                                           a
                                                                                               D
                                                                                               H
                                                                                               CO
                                                                                               ffl

                                                                                               5

-------
                                                                   Module DURANL

4.2(14) Perform Duration Analysis on a Time Series (Utility Module DURANL)
This module  examines the  behavior of a  time series,   computing a  variety of
statistics relating to its excursions above and below certain specified "levels"
(Figure 4.2(14)-1). Sample printout is shown in Figure 4.2(14)-2.   The quantity
of printout  produced can  be regulated  by the  user with  a "print-level-flag"
(PRFG), which has a valid range of values from 1 through 6.

The basic principles are:

1.  The module works on  the time series after it has been  placed in the  INPAD.
    The data are,  thus,   at the internal time step of  the operation  (INDELT).
    This module operates  on a mean-valued input time series.   Therefore,   if  a
    point-valued time series is routed to it, TSGET will,  by default,  generate
    mean values for each time step, and these will be analyzed.

2.  When the value of the time series rises above the user specified "level",   a
    positive  excursion commences.   When it  next  falls below  the level   this
    excursion ends. A negative excursion is defined in the reverse way.   (Figure
    4.2(14)-1).

3.  If the time series has a value less  than -10.0**10 this is considered  to be
    an "undefined event"  (eg.  concentration of a constituent when  there  is no
    water). In this case the value is in a special category - it is in  neither  a
    positive nor a negative excursion.

4.  The above  is true if  the specified "duration" is  one time step.    In this
    case,  the results  produced include a conventional  frequency analysis (eg.
    flow  duration)  of  the data.   However,  the  user  may specify   up  to 10
    durations;  each is given as a multiple (N) of the basic time step  (INDELT),
    Then, for an excursion or undefined event to be considered, it has  to  endure
    for at least N (consecutive) intervals; else it is ignored.

5.  The user may  specify an "analysis season".   This is a period  (the  same in
    each year) for which the data will be analyzed (eg. Oct 1 thru May  10).  Data
    falling outside the analysis season will not be considered.
                                      343                             RELEASE 8.0

-------
                                                                   Module DURANL
 Value
(of time
series or
"level")
   V  +10
      -10
      -20
                                           Time
.	.  <====Time Series
                    3+   '--.
             __ i
                                        3-
                  2+
       '—.2-   2+
                       1 +
                                i __ i
                                                                   i ___
                                   •	•   3+
                              3rd
                                                      level
2-
2+
                                                                       2nd level
                                          1 +
                                                                        1st  level
               Legend: 2+ excursion above second level  (duration >=1)
                       2- excursion below second level  (duration >=1)
                       etc.
       Figure 4.2(14)-1 Definition of  terms used  in duration  analysis  module
                                       344
                                                RELEASE  8.0

-------
                                                                   Module DURANL

The analyses performed, and printout produced (Figure 4.2(14)-2), are:

1.  Introductory information - Title, start and end date/time, analysis season.

2.  The next 7 sets of tables are all  similar in format;  each contains data on
    positive  and  negative  excursions,   for each  level  and  duration,   and
    information on "undefined event" conditions which  persisted for each of the
    specified durations.  The value of PRFG  required to generate each of these,
    and the table heading and the data displayed in it are:

   a)  PRFG>0. "Fraction of time spent in excursions at each level with duration
       >= the specified  durations.   Fraction is relative to  total time span."
       These are the fractions of total considered  time that each of the above-
       defined conditions existed.

   b)  PRFG>1. "Fraction of time spent in excursions at each level with duration
       >= the specified  durations.   Fraction is relative to the  time spent in
       excursions at  each level."   In the  "Positive Excursions"  table,  this
       gives,  for  each specified level,  the  total time that an  excursion of
       duration  N existed,   divided by  the total  time that  an excursion  of
       duration 1 existed.    A similar definition holds for the  numbers in the
       "Negative Excursions" table.

   c)  PRFG>2.  "Time  spent in excursions  at each  level with duration  >== the
       specified durations."  The tables give the total number of time steps for
       which the various conditions occurred.

   d)  PRFG>3.   "Number  of excursions  at  each  level  with duration  >=  the
       specified durations".   These  give the total number of  events that were
       found  (no.  of  positive  and negative  excursions  for  each level  and
       duration, and no. of "undefined occurences" of each duration).

   e)  PRFG>4.  "Average  duration of  excursions at each  level given  that the
       duration >= the specified durations".   These values answer the question:
       "given that a specified excursion or  'undefined condition1 occurred, what
       was  the mean number of time steps for which it persisted?"

   f)  PRFG>5. "Standard deviation of duration of excursions at each level given
       that the duration >= the specified  durations."  These tables are similar
       to those  discussed in (e)  above,   except that the  standard deviation,
       instead of the mean, is considered.

   g)  PRFG>6. "Fraction of excursions with duration N with respect to the total
       number of excursions (duration 1) for each level".  These tables give the
       number of excursions at each duration divided by the number of excursions
       at duration 1 for each level.

3.  Summary information:

    Total no. of time intervals analyzed, total no.  of time intervals for which
    values  were "undefined",  total number of days analyzed,  sample  size,  max,
    min, mean, standard deviation.
                                       345                             RELEASE 8.0

-------
                                                                   Module DURANL
Duration analysis operation no.     1
Analysis of Subb. 4 Outflow (cfs)
Start date: 1972/12/31 24: 0  End date: 1974/12/31 24: 0
Analysis season starts:  2/28 24: 0  Ends:  11/30 24: 0
PERCENT OF TIME TABLES (WITH RESPECT TO THE TOTAL SPAN OF TIME)
POSITIVE EXCURSIONS
LEVELS
  .OOOOE+00  1.000
  10.00      .7308
  20.00      .5128
  50.00      .1790
  500.0
                      DURATIONS
                     1
                  12
           1.000
           .7259
           .5062
           .1674
       24
1.000
.7235
.5034
.1633
.2273E-02  .OOOOE+00  .OOOOE+00
NEGATIVE EXCURSIONS
                      DURATIONS
                      1
                  12
       24
LEVELS
.OOOOE+00
10.00
20.00
50.00
500.0

.OOOOE+00
.2692
.4872
.8210
.9977

.OOOOE+00
.2655
.4813
.8121
.9977

.OOOOE+00
.2645
.4762
.8030
.9977
UNDEFINED EVENTS  (NO  WATER)
                       DURATIONS
                      1          12
              .OOOOE+00   .OOOOE+00
                             24
                      .OOOOE+00
       Figure  4.2(14)-2   Sample Duration Analysis Printout
                   [Continued on next 2 pages]
                                       346
                                                     RELEASE 8.0

-------
                                                                    Module DURANL
PERCENT OF TIME TABLES (WITH RESPECT TO THE TIME  SPENT  IN  EXCURSIONS)
POSITIVE EXCURSIONS
                      DURATIONS
                     1         12
24
LEVELS
.OOOOE+00
10.00
20.00
50.00
500.0

1.000
1.000
1.000
1.000
1.000

1.000
.9933
.9871
.9353
.OOOOE+00

1.000
.9899
.9817
.9124
.OOOOE+00
NEGATIVE EXCURSIONS


LEVELS
.OOOOE+00
10.00
20.00
50.00
500.0

1

.OOOOE+00
1.000
1.000
1.000
1.000
DURATIONS
12

.OOOOE+00
.9862
.9879
.9892
1.000

24

.OOOOE+00
.9828
.9775
.9780
1.000
UNDEFINED EVENTS (NO WATER)




1
.OOOOE+00
DURATIONS
12
.OOOOE+00

24
.OOOOE+00
TIME SPENT IN EXCURSIONS
POSITIVE EXCURSIONS
                      DURATIONS
                      1          12
24
LEVELS
.OOOOE+00
10.00
20.00
50.00
500.0

.1320E+05 .1320E+05
9647. 9582.
6769. 6682.
2363. 2210.
30.00 .OOOOE+00

.1320E+05
9550.
6645.
2156.
.OOOOE+00
NEGATIVE EXCURSIONS


LEVELS
.OOOOE+00
10.00
20.00
50.00
500.0
DURATIONS
1 12

.OOOOE+00 .OOOOE+00
3553. 3504.
6431. 6353.
.1084E+05 .1072E+05
.1317E+05 .1317E+05

24

.OOOOE+00
3492.
6286.
.1060E+05
.1317E+05
UNDEFINED EVENTS (NO WATER)



DURATIONS
1 12
.OOOOE+00 .OOOOE+00

24
.OOOOE+00
                                       347
                                                                      RELEASE 8.0

-------
                                                                    Module DURANL
STANDARD DEVIATION OF TIME SPENT IN EXCURSIONS
POSITIVE EXCURSIONS
                      DURATIONS
                     1         12
LEVELS
  .OOOOE+00
  10.00
  20.00
  50.00
  500.0
.OOOOE+00
922.9
321.6
71.65
.7423
.OOOOE+00
2032.
581.1
132.1
       24

.OOOOE+00
2181.
602.0
128.7
.OOOOE+00  .OOOOE+00
NEGATIVE EXCURSIONS
LEVELS
  .OOOOE+00
  10.00
  20.00
  50.00
  500.0
                      DURATIONS
                      1
.OOOOE+00
107.2
127.0
167.6
1202.
       12

.OOOOE+00
113.8
140.0
188.1
1202.
       24

.OOOOE+00
113.3
141.4
191.6
1202.
UNDEFINED EVENTS  (NO WATER)
                       DURATIONS
                      1          12
              .OOOOE+00   .OOOOE+00
                              24
                       .OOOOE+00
     SUMMARY
     TOTAL  LENGTH OF  DEFINED EVENTS:
     TOTAL  LENGTH OF  UNDEFINED EVENTS:
     TOTAL  LENGTH OF  ANALYSIS:   550.  DAYS
     SAMPLE SIZE:    13200
     SAMPLE MAXIMUM:   .1307E+05
     SAMPLE MINIMUM:   2.290
     SAMPLE MEAN:  37.80
     SAMPLE STANDARD  DEVIATION:  164.0
                           13200.  INTERVALS
                                  0.  INTERVALS
                                       348
                                                         RELEASE 8.0

-------
                                                                   Module DURANL
4.  Lethality analysis:
The  function of  this  section of  the  DURANL  module is  to  assess the  risk
associated with any contaminant concentration time  series generated by the HSPF
application  modules.    The  methodology  links   frequency  data  on  instream
contaminant levels to toxicity information resulting from both acute and chronic
laboratory bioasays.    The methodology  is based on  the Frequency  Analysis of
Concentration  (FRANCO)   program  developed  by  Battelle,   Pacific  Northwest
Laboratories as  part of  their Chemical  Migration and  Risk Assessment  (CRMA)
Methodology.

Laboratory toxicity  experiments provide  the main basis  for developing  a risk
analysis for fish  or other aquatic organisms.   A common  method of summarizing
the results of these  experiments is to use a lethal  concentration where 50% of
the fish die (LC50).  Usually information for LC50 concentrations at 24, 48, and
96 hours  can be  derived from laboratory  experiments in the  form of  pairs of
lethal  concentration and  duration  values.   By  connecting  these pairs  with
straight line segments and extending the function in a reasonable manner at each
end,   a  function is  defined  such  that  an  event defined  by  a  particular
concentration level with a particular duration can be classified as exceeding or
not exceeding the function, i.e., exceeding an LC50 value.   (Figure 4.2(14)-3).
An event exceeds the  LC function when the concentration defining  the event and
the duration of the event results in the  pair falling above and to the right of
the combined LC50, or global exceedance, curve.

If LCNUM is greater than zero a global exceedance summary table is printed which
gives the fraction of time that a global exceedance curve is exceeded.   Up to  5
LC curves  can be analyzed  at one time.    It should  be noted that  the global
exceedance summary eliminates double counting by reporting only those exceedance
events with the lowest concentrations that occur in different contaminant peaks.
(FRANCO documentation should be consulted for more detailed discussion).

If LCOUT=1  and LCNUM=0,  a  lethal event summary  is printed to  supplement the
global exceedance information.   The table gives  a summary of all lethal events
including ending time,  lethal curve number,  number of intervals in event,  and
concentration level.   Printout is to unit PUNIT,  which should be unique to the
duration analysis;  otherwise, the output from the lethal event summary will mix
with the printout from application modules.
                                      349                             RELEASE  8.0

-------
                                                        Module DURANL
           .010
                  24 48    96           192

                            DURAT (hours)
                                 288
FIGURE  4.2(14)-3
SAMPLE LETHAL  CONCENTRATION  (LC)  FUNCTION
FOR GLOBAL EXCEEDANCE CALCULATION.  CURVE IS
BASED  ON PAIRS OF LETHAL CONCENTRATION  (LCONC)
AND DURATION  (DURAT)  VALUES  SPECIFIED IN
DURANL USERS CONTROL INPUT.
                                  350
                                       RELEASE 8.0

-------
                                                                    Module GENER

4.2(15)  Generate a Time Series from One or Two Other Time Series (Utility
         Module GENER)

This module is  designed to perform any one of  several possible transformations
on input tiae  series.  The transformation is specified by  supplying an "option
code" (OPCODE).  If A and B are the input time series and C is the computed time
series,  then  the transformations performed for  each possible value  of OPCODE
are:
      OPCODE
        Action
        1
        2
        3
        6
        7
        8
        9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
C= Abs value (A)
C= Scjuare root (A)
C= Truncation (A)
   eg. If A=4.2, C=4.0
          A=-3.5, C=-3.0
C= Ceiling (A). The "ceiling" is
   the integer >= given value.
   eg. If A=3.5, C=4.0
          A=-2.0, C=-2.0
C= Floor (A). The "floor" is the
   integer <= given value.
   eg. If A=3.0, O3.0
          A=-2.7, O-3.0
C= loge (A)
C= Iog10 (A)
C= K(1)+K(2)*A+K(3)*A**2 (up to 7
   The user supplies the no. of
   terms and the values of the
   coefficients (K).
C= K**A
C= A**K
C= A+K
C= Sin (A)
C= Cos (A)
C= Tan (A)
C= Sum (A)
C= A+B
C= A-B
C= A*B
C= A/B
C= MAX (A,B)
C= MIN (A,B)
C= A**B
terms)
Note that  if OPCODE  is <=15»  only  one input  time   series  is   involved (unary
operators)   but  the other  types  of  operations  involve two   inputs   (binary
operators). As with the other operating modules,  the  input time  series are first
placed in the INPAD by module TSGET (This may  involve a  change of time step and/
or  "kind").  So,  by the time module GENER  works on  them,  they are mean valued
time series with a time step equal to INDELT.
                                       351
                                                RELEASE  8.0

-------
                                                                   Module MUTSIN

4.2(16)  Multiple Sequential Input of Time Series from a HSPF
         Stand Alone Plotter File (Utility Module MUTSIN)

This utility module reads a sequential  external file previously written on tape
or disk.    This file has  the same format as  the PLOTFL produced  with utility
module PLTGEN (Section 4.2(12)).   The user specifies the number of point and/or
mean-valued time  series to  be read  and the  number of  lines to  skip at  the
beginning of the sequential external file.

The missing data flag,  MISSFG,  is used to specify how MUTSIN reacts to missing
data.   A MISSFG value of 0 indicates that MUTSIN is to report an error and quit
if any data is missing.  Therefore, the internal time-step (DELT) must equal the
time-step of the  sequential external file,  the  starting time of the  run must
correspond with the first entry read from  the sequential external file,  and no
entries may be missing.    A MISSFG value of 1 indicates that  MUTSIN is to fill
missing sequential file entries  with 0.0.   A MISSFG value of  2 indicates that
MUTSIN is to fill missing entries with  -1.0E30.   A MISSFG value of 3 indicates
that MUTSIN  is to  fill missing  values with  the value  of the  next available
entry.

Note that the date and time appearing in each  record of the file must be in the
same format  as that  used by the  PLTGEN module to  write a  PLOTFL.    (Section
4.2(12)).   That is,  the full year/month/day/hour/minute string must be present
and a time, e.g., midnight is coded as 74 01 02 24 00, not 75 01 03 00 00.

The EXT TARGETS and/or NETWORK blocks are used to specify where TSPUT places the
time series data read in from the sequential external file.

MUTSIN has four potential uses:

(1)  It may  be used to  form a simple  interface with other  continuous models.
     The other  model can output its  results in the  form of HSPF PLOTFL   (or  a
     format conversion program  can be used),  and  MUTSIN can be used   to  input
     this data to HSPF.   Conversely,  data can  be output from HSPF,  using the
     PLTGEN module, for input to the other model.

(2)  MUTSIN may be used  to transfer data in an HSPF TSS to another TSS.   This
     transfer requires  the use  of PLTGEN  to output  from the   source  TSS  and
     MUTSIN to input to the target TSS.

(3)  By writing the data on a tape  one can tranfer data between  different  types
     of computer hardware  (e.g., IBM to HP and w.)

(4)  MUTSIN may  also be used   to  input point  valued data  or  data with  a time
     interval not  included  in  the standard HSPF  sequential   input  formats  (Part
     F, Section 4.9).
                                       352                            RELEASE 8.0

-------
                                                                    Module TSPUT

4.3  Module TSPUT
Module TSPUT is complementary to, and may be viewed as a mirror image of, module
TSGET (Section 4.1).   TSGET obtains time series from a TSS,  sequential file or
the INPAD and places its output in the INPAD.   Conversely, TSPUT obtains a time
series from the INPAD and places its output in the TSS or back in the INPAD.  It
has similar capabilities to TSGET, to alter the time step,  "kind" or to perform
a linear transformation on the time series with which it deals.

Compared to TSGET, module TSPUT contains one major complicating factor.   When a
time series is to be written to a  TSS dataset,  the action taken depends on how
any pre-existing data are to be treated.   The three possible access modes, ADD,
INST and REPL, are discussed in Part F, Section 4.6.
REFERENCES
American Society for Testing and Materials.   1980.  Annual Book of
     ASTM Standards: Part 31, Water.  Philadelphia, Pennsylvania.

Anderson, E.A. 1968.  Development and Testing of Snow Pack Energy Balance
     Equations.  Water Resour. Res. 4(1):19-37.

Anderson, E.A., and N.H. Crawford.  1964.  The Synthesis of Continuous
     Snowmelt Runoff Hydrographs on a Digital Computer.  Department of Civil
     Engineering, Stanford University.  Stanford, California.  Technical
     Report No. 36.  103 p.

Chou, T.-W.   1980.  Aquatic Biodegradation, Chapter 6 in Mill etal.,  1980.

Churchill, M.A., H.L. Elmore, and R.A. Buckingham.  1962.  The Prediction
     of Stream Reaeration Rates.  Amer. Soc. Civil Engineers Journ.
     88(SA4), p. 1-46.

 Colby,  B.R.  1964.   Discharge of  Sands and  Mean Velocity Relationships in
      Sand-Bed Streams.   Geological  Survey, U.S.  Department of Interior,
      Washington, D.C.   Professional Paper  462-A.

Committee on  Sanitary Engineering Research.   1960.  Solubility of
     Atmospheric Oxygen  in Water.  Twenty-ninth  Progress Report.  Amer.
     Soc. Civil Engr., J. San. Engr. Div.  86(SA4):41.

Covar, A.P.   1976.  Selecting the Proper Reaeration Coefficient for Use in
     Water Quality Models.  Proc. Conf. on Environmental Modeling, and
     Simulation, Cincinnati. EPA 600/9-76-016. 861p.

Crawford, N.H., and A.S. Donigian, Jr.  1973.  Pesticide Transport and
     Runoff Model for Agricultural Lands.  Office of Research and
     Development, U.S. Environmental Protection  Agency, Washington D.C.  EPA
     660/2-74-013.  211p.


                                     353                         RELEASE 8.0

-------
                                                                      References
Di Toro, D.M., D.T. O'Connor, and R.V. Thomann.  1970.  A Dynamic Model of
     Phytoplankton Populations in Natural Waters.  Environmental
     Engineering and Science Program.  Manhattan College, New York.

Donigian, A.S., Jr., and N.H. Crawford.  1976a.  Modeling Pesticides and
     Nutrients on Agricultural Lands.  Environmental Research Laboratory,
     Athens, Georgia.  EPA 600/2-7-76-043.  317 p.

Donigian, A.S., Jr., and N.H. Crawford.  1976b.  Modeling Nonpoint Pollution
     From the Land Surface.  Environmental Research Laboratory, Athens,
     Georgia.  EPA 600/3-76-083.  280p.

Donigian, A.S, Jr., D.C. Beyerlein, H.H. Davis, Jr., and N.H. Crawford.
     1977.  Agricultural Runoff Management (ARM) Model Version II:
     Refinement and Testing.  Environmental Research Laboratory, Athens,
     Georgia.  EPA 600/3-77-098.  294p.

Dugdale, R.C., and J.J. Macisaac. 1971.  A Computational Model for the
     Uptake of Nitrate in the Peru Upwelling.  Prepublication Copy.

Falco, J.W., K.T. Sampson, and R.F. Carsel. 1976.  Physical Modeling of
     Pesticide Degradation.  Proceedings of Symposium on Model Ecosystem
     Approach to Biodegradation Studies. Society for Industrial
     Microbiology, pp. 193-202.

Harnard, H.S. and R. Davis.   1943.  The lonization Constant of Carbonic
     Acid in Water and the Solubiltiy of CO2 in Water and Aqueous  Salt
     Solution from 0 to 50 C.  J. Am. Chem. Soc. 65:2030.

Hydrocomp,  Inc.   1977.  Hydrocomp Water Quality Operations Manual.
     Palo Alto, California.

Hydrocomp,  Inc.   1976.  Hydrocomp Simulation Programming:  Operations
     Manual.  Palo Alto, California,  2nd ed.

Johanson, R,C., J.C. Imhoff  and H.H.  Davis, Jr.  1979.  Programmer's
     Supplement for  the Hydrological  Simulation Program  - Fortran  (HSPF).
     This material  is on magnetic tape. See Appendix  IV.

Krone,  R.B.   1962.   Flume  Studies of  the Transport of Sediment  in
     Estuarial Shoaling Processes.   Hydraulic  Engineering Laboratory
     and Sanitary Engineering Research  Laboratory, University of
     California,   Berkeley,  California.

Mabey,  W.R.,  T. Mill, and  D.G.  Hendry.   1980.  Photolysis in Water,
     Chapter  3 in Mill  et  al.,  1980.

Meyer,  L.D.,  and  W.H. Wischmeier.   1969.   Mathematical Simulation  of  the
     Process  of  Soil Erosion by Water.  Trans. Am.  Soc.  Agric.  Eng.
      12(6}:754-758,762.
                                       354                            KELEASE 8.0

-------
                                                                      References
Mill, T.,  W.R. Mabey, D.C. Bomberger, T.-W. Chou, D.G. Hendry, and
     J.H.  Smith.  1980.  Laboratory Protocols for Evaluating the Fate
     of Organic Chemicals in Air and Water.  SRI International, Menlo Park,
     California.  Environmental Research Laboratory, Athens,Georgia.

Mill, T.,  W.R. Mabey, and D.G. Hendry. 1980.  Hydrolysis in Water,
     Chapter 2 in Mill et al., 1980.

Mill, T.,  W.R. Mabey, and D.G. Hendry.  1980.  Oxidation in Water,
     Chapter 4 in Mill et al., 1980.

Negev, M.   1967.  A Sediment Model on a Digital Computer.  Department of
     Civil Engineering, Stanford University.  Stanford, California.
     Technical Report No. 76.  109p.

O'Connor,  D.J., and D.M. Di Toro.  1970.  Photosynthesis and Oxygen
     Balance in Streams.  Amer. Soc. Civil Engr., J. San. Engr. Div.
     96(SA2):7240.

O'Connor,  D.J., and W.E. Dobbins.  1958.  Mechanism of Reaeration in
     Natural Streams.  Amer. Soc. Civil Engineers Trans., Vol.  123,
     p. 641-684.

Onishi, Y. and S.E. Wise.   1979.  Mathematical Model, SERATRA,  for
     Sediment-Contaminant Transport in Rivers and its Application
     to Pesticide Transport in Four Mile and Wolf Creeks in Iowa.
     Battelle, Pacific Northwest Laboratories, Richland, Washington.

Onstad, C.A., and G.R. Foster.  1975.  Erosion Modeling on a Watershed.
     Trans.  Am. Soc. Agric. Eng.  18(2):288-292.

Owens, M., R.W. Edwards, and J.W. Gibbs.   1964.  Some Reaearation Studies
     in Streams.  Int. Journ. Air and Water Pollution.  Vol. 8, p. 469-486.

Partheniades, E.  1962.  A  Study of Erosion and Deposition of Cohesive
     Soils in Salt Water.   Ph.D. Thesis, University of California,
     Berkeley, California.

Philip, J.R.  1956.  The Theory of Infiltration:  The Infiltration Equation
     and  Its Solution.  Soil Science 83: 345-375.

Richman,  S.   1958.  The Transformation of Energy by Daphnia pulex.
     Ecolog. Monogr.  Vol.  28, p. 273-291.

Schindler, D.W.  1968.  Feeding, Assimilation and Respiration Rates of
     Daphnia magna Under Various Environmental Conditions and their
     Relation to Production Estimates.  Journal of Animal Ecology.
     Vol. 37, p. 369-385.
                                       355                             RELEASE 8.0

-------
                                                                      References
Smith,J.H., and D.C. Bomberger.   1980.  Volatilization from Water,
     Chapter 7 in Mill et al., 1980.

Smith, J.H., W.R. Mabey, N.  Bohonos,  B.R. Holt, S.S. Lee, T.-W. Chou,
     D.C. Bomberger, and T.  Mill. 1977.  Environmental Pathways of
     Selected Chemicals in Freshwater Systems, Part I: Background
     and Experimental Procedures.  Environmental Research Laboratory,
     Athens, Georgia.  EPA 600/7-77-113.

Thomann, R.V.  1972.  Systems Analysis and Water Quality Management.
     McGraw-Hill, Inc., New York.  286p.

Tsivoglou, E.G., and J.R. Wallace.  1972.  Characterization of Stream
     Reaeration Capacity.  U.S.  Environmental Protection Agency,
     Rept. R3-72-012.

U.S. Army Corps of Engineers.  1956.   Snow Hydrology, Summary Report of the
     Snow Investigations.  North Pacific Division. Portland Oregon.  437 p.

U.S. Environmental Protection Agency.   1975.  Process Design Manual for
     Nitrogen Control.  Office of Technology Transfer, Washington D.C.

Vanomi, V.A., Editor.   1975.  Sedimentation Engineering.  Prepared by
     the ASCE Task Committee for the Preparation of the Manual on
     Sedimentation of the Sedimentation Committee of the Hydraulics
     Division,  New York.

Wezerak, C.G., and J.J. Gannon.   1968.  Evaluation of Nitrification in
     Streams.  Amer. Soc. Civil Engr., J. San. Engr. Div.  94(SA5):6159.

Wischmeier, W.H., and D.D. Smith. 1965.  Predicting Rainfall Erosion Losses
     from Cropland East of the Rocky Mountains.  Department of
     Agriculture.  Agricultural Handbook No. 282.  47 p.

Zepp, R.G. and D.M. Cline.   1977.  Rates of Direct Photolysis  in  Aquatic
     Environments.  Envir. Sci. Technol.  11:359-366.
                                       356                            RELEASE 8.0

-------
                                                            User's  Control  Input

                                   PART  F
                    FORMAT FOR THE USER'S  CONTROL INPUT
                                  CONTENTS
1.0  General Information and Conventions 	   359
     1.1   The Users Control Input	359
     1.2   General Comments on Method of Documentation  	   359

2.0  Format of a TSSMGR Input Set	360
     2.1   Summary	360
     2.2   TSSM Block	361
     2.3   ADD Block	362
     2.4   UPDATE Block	365
     2.5   SCRATCH Block	366
     2.6   EXTEND Block	367
     2.7   SHOWSPACE, SHOWDSL, and SHOWTSS Blocks 	   368

3.0  Sample TSSMGR Input Set	369

4.0  Format of a RUN Input Set	370
     4.1   Summary	370
     4.2   GLOBAL Block	371
     4.3   OPN SEQUENCE Block	373
          4.3.1 Optimization of Operation Sequencing 	   375
     4.4   <0peration-type> Block	377
          4.4(1)  PERLND Block 	   379
                  4.4(1).1  General input  	   380
                  4.4(1).2  Section ATEMP input  	   385
                  4.4(1).3  Section SNOW input	387
                  4.4(1).4  Section PWATER input 	   395
                  4.4(1).5  Section SEDMNT input 	   411
                  4.4(1).6  Section PSTEMP input	419
                  4.4(1).7  Section PWTGAS input 	   430
                  4.4(1).8  Section PQUAL input  	   439
                  4.4(1).9  Section MSTLAY input 	   451
                  4.4(1).10 Section PEST input 	   460
                  4.4(1).11 Section NITR input 	   473
                  4.4(1).12 Section PHOS input 	   485
                  4.4(1).13 Section TRACER input 	   495
          4.4(2)  IMPLND Block 	   499
                  4.4(2).1  General input  	   499
                  4.4(2).2  Section ATEMP input  	   504
                  4.4(2).3  Section SNOW input 	   504
                  4.4(2).4  Section IWATER input 	 . .   504
                  4.4(2).5  Section SOLIDS input 	   512
                  4.4(2).6  Section IWTGAS input 	   518
                  4.4(2).7  Section IQUAL input  	   524
                                      357                            RELEASE 8.0

-------
                                                            User's  Control  Input

         4.4(3)  RCHRES Block  	   529
                 4.4(3).1  General input   	   529
                 4.4(3).2  Section HYDR input  	   534
                 4.4(3).3  Section ADCALC  input  	   541
                 4.4(3).4  Section CONS input  	   543
                 4.4(3).5  Section HTRCH input  	   547
                 4.4(3).6  Section SEDTRN  input  	   550
                 4.4(3).7  Section GQUAL input  	   559
                 4.4(3).8  Input  for  RQUAL sections  	   593
                           4.4(3).8.1  Section OXRX  input 	   596
                           4.4(3).8.2 Section NUTRX input  	   607
                           4.4(3).8.3 Section PLANK input	613
                           4.4(3).8.4 Section PHCARB input	625
         4.4(11) COPY  Block	629
         4.4(12) PLTGEN Block  	   631
         4.4(13) DISPLY Block  	   637
         4.4(14) DURANL Block  	   642
         4.4(15) GENER Block	650
         4.4(16) MUTSIN Block  	   656
     4.5  FTABLES Block	658
     4.6  Time  Series Linkages	661
     4.7  Time  Series Catalog	673
         4.7.1   Connection  of Surface and Instream Modules 	   674
         4.7(1)  Catalog  for PERLND Module  	   675
         4.7(2)  Catalog  for IMPLND Module  	   692
         4.7(3)  Catalog  for RCHRES Module  	   698
         4.7(11) Catalog  for COPY Module	714
         4.7(12) Catalog  for PLTGEN Module  	   716
         4.7(13) Catalog  for the  DISPLY  Module	717
         4.7(14) Catalog  for the  DURANL  Module	718
         4.7(15) Catalog  for the  GENER Module  	   719
         4.7(16) Catalog  for the  MUTSIN  Module	720
     4.8  FORMATS  Block	721
     4.9  Sequential  File  Formats	722
     4.10 SPEC-ACTIONS  Block  	   724

5.0  Sample RUN Input Sets	726
                                  FIGURES

Number                                                                 Page

4.7(1)-1   Groups of time series associated with the PERLND module  .  .  676
4.7(2)-1   Groups of time series associated with the IMPLND module  .  .  693
4.7(3)-1   Groups of time series associated with the RCHRES module  .  .  699
4.7(11)-1  Groups of time series associated with the COPY module  ...  715
4.7(12)-1  Groups of time series associated with the PLTGEN module  .  .  715
4.7(16)-1  Groups of time series associated with the MUTSIN module  .  .  715
                                      358                            RELEASE 8.0

-------
                                                            User's Control  Input

1.0  GENERAL INFORMATION AND CONVENTIONS


1.1  The User's Control Input

The User's Control Input (UCI) consists of a number of text lines, 80  characters
wide in card images.   A general feature of  the UCI is that the card  images  are
collected into groups.  Groups may contain subordinate groups;  that  is,  they  may
be nested.   In every case, a group commences with a heading (such as, RUN)   and
ends with a delimiter (such as, END RUN).

The HSPF  system will ignore any  line in the  UCI which  contains three   or more
consecutive asterisks (***),  just as a  Fortran compiler bypasses comments in a
source program. Blank lines are also ignored. This feature can  be used to insert
headings and comments which make the text  more intelligible to the  reader,   but
are not required by the HSPF system itself.

The body  of the User's Control  Input consists of  one or more major  groups of
text, called input sets:

     
     
An input set is either  a TSSMGR input set or a  RUN  input   set.    A TSSMGR input
set consists of one or more commands  which direct the  time series store manager
module to create,  modify,  or destroy labels of individual datasets in the TSS.
A RUN input set contains all the input needed to perform a  single RUN.   A RUN is
a set of operations with a common START date-time and END date-time.
 1.2  General Comments on Method of Documentation

The documentation  of each portion  of the UCI  is  divided into  three sections:
 "layout", "details", and "explanation".

The "layout" section shows how the input  is arranged.    Text always appearing in
the same form (e.g. TSSM) is shown in upper case.   Text  which varies from job to
 job is shown  by Lower case symbols  enclosed in angle brackets  ().  Lines
containing illustrative text,  not actually required  by the system,  have three
consecutive asterisks,  just as they might have in  the UCI.    Optional material,
or that which is not always required,   is enclosed in brackets [].   The column
numbers printed at the  head of each layout show the  exact  starting location of
each keyword and symbol.

The  "details" section  describes  the input  values  required  for each  symbol
appearing in the layout.  The Fortran identifiers used to store the value(s)  are
given, followed by the format.   The field(s)  specified in  this format start in
the column containing the < which immediately precedes the symbol in the layout.
                                       359                             RELEASE 8.0

-------
                                                                  TSSM Input Set

For example, < ds> in a TSSM input set starts in column 26 and ends in column 26
+ 5 - 1 = column 30.  Where relevant, the Details section also indicates default
values and minimum and maximum values for each item in the UCI.

The  "explanation" section  contains any  necessary  explanatory material  which
could not fit into the details section.
2.0  FORMAT OF A TSSMGR DATA SET
2.1  Summary

A  TSSMGR Input  Set  starts with  a TSSM  heading  and ends  with  an END  TSSM
delimiter.    The  input  set  contains one  or  more  commands  and  associated
parameters/  which  may appear  in any sequence.    A single  exception applies:
DATASET  NO=,  if  required,  must  appear as  the first  parameter following   a
command.   All parameter values (numbers or strings) must be right-justified and
end in column 30, except the LOCATION string.

Note that a separate  program,  NEWTSS,  must be run to  create and initialize  a
Time Series Store (TSS) before it may be used by the HSPF system.   (This stand-
alone program is documented in Appendix III.)
                                       360                             RELEASE 8.0

-------
                                                                  TSSM  Input  Set

2.2  TSSM Block

The TSSM block is used to indicate the start and end of a TSSM  input  set.
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

TSSM               TSSFL=< ts>

    *** see following sections for definitions of TSSM commands  and  associated
        parameters.
  
   []
    *** continue until all parameters are defined

 []
  *** commands may be continued as needed to perform all  functions desired,

END TSSM

*******
Example
*******

TSSM               TSSFL=    15
  SHOWDSL
    DATASET N0=            100
  SHOWSPACE
END TSSM
Details

Symbol       Keyword       Fortran     Format    Default      Min       Max
                           name(s)

< ts>        TSSPL=        TSSPL       15        15           15        23
Explanation

The TSSFL is  the FORTRAN unit number  for   the  TSS.    It is  determined when the
user is completing the TSFLD worksheet(see  Appendix  III).    If the default value
is used, then 'TSSFL=' may also be omitted.
                                       361                             RELEASE 8.0

-------
                                                                   TSSM Input Set

2.3  ADD Block

The ADD block is used to create a label  for  a  new dataset on the TSS.
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
  ADD
    DATASET NO=
      SPACE=
      TIMESTEP=
      MEMBER NAME=
      [STATION=
      [SECURITY=
      [UNITS=
      [COMPRESSION
      [OBS TIME=
      [FILLER CODE=
      [GAP CODE=
      [YEAROR=
      [BASEYR=
      [LOCATION=
      [KIND=
      [FORMAT=

*******
Example
*******
      
     
    
    
   ]
  ]
   ]
  < compr>]
     ]
  ]
        gc]
     ]
    ]
     ]
              -location-
  ADD
    DATASET  NO=
       SPACE=
       MEMBER NAME=
       TIMESTEP=
       UNITS=
       COMPRESSION
       STATION=
       FILLER CODE=
       YEAROR=
       LOCATION=
       KIND=
        39
       100
    PRECIP
       360
    METRIC
     COMPR
    US3112
      ZERO
       YES
PALO ALTO, CALIFORNIA
      MEAN
                                       362
                                                  RELEASE 8.0

-------
                                                                  TSSM Input  Set
Details
Symbol




< statn>
< secure >
< units >
< compr>


gc
< y>

< location 2
< kind >

Keyword
DATASET NO=
SPACE=
MEMBER NAME=
TIMESTEP=
STATION=
SECURITY=
UNITS=
COMPRESSION=
OBS TIME=
FILLER CODE=
GAP CODE=
YEAROR=
BASEYR=
> LOCATION=
KIND=
FORMAT=
Fortran
name (s)
DSDSNO
SPACE
MEMNAM
DSDELT
STA
SECURE
UNITS
COMPR
OBSTIM
CFILL
GAPCOD
YEAROR
BASEYR
LOCATN
MKIND
FMT
Format
14
15
A6
16
A8
AS
A8
A8
15
A8
A2
A4
15
A40
A8
15
Default
none
none
none
none
[blank]
WRITE
METRIC
UNCOMP
24
UNDEF
UU
YES
1900
[blank]
MEAN
0
Valid Values
Min: 1, Max: 9999
Min: 1, Max: 99999
Any 6 char, string
Min: 1, Max: 1440
Any 8 char, string
WRITE, READ
METRIC, ENGLISH
UNCOMP, COMPR
Min s 1, Max: 48
UNDEF, ZERO
UU,UC,CU,CC
YES, NO
Min: 1, Max: 10000
Any 40 char, string
MEAN, POINT
Min: 0, Max: 10
Explanation

Each input item must be right justified within  its  field.   For  example,
OBSTIM is input with 15 format;  a value of  12  is input  as  "    12".

DATASET NO is a unique identifying number  for a dataset.
SPACE is the space reserved for a dataset  in TSS records.   See  Appendix  III
  for formula.
MEMBER NAME is the name of the member, e.g.  PRECIP,EVAPOR.
TIMESTEP is the time step in minutes for a dataset.
STATION is the station identifier for a dataset.
SECURITY is the read/write security for a  dataset.
UNITS is the system of units used for the  data  stored  in the  TSS.
COMPRESSION is the compression indicator.
OBS TIME is the observation hour for daily data.
FILLER CODE is the padding value used to fill in missing data.
GAP CODE is the compression indicator for  filled values  preceding  and following
  period of valid input within the year.   See explanation below.
YEAROR: YES means a file is in yearly chronological order,-  otherwise, NO.
BASEYR is the first year for which data can  be  stored.
LOCATION is the location description.
KIND is the kind of data in this member, either point  or mean.
FORMAT is the number of decimal digits desired  in the  output  format.
                                       363
                                                                      RELEASE 8.0

-------
                                                                  TSSM Input Set

The parameter GAP was included to permit  some compression of space,  even where
data are stored in uncompressed form.  If the first letter of GAP is C, and data
which start part-way through a calendar year  are fed into the TSS dataset,  the
period prior to  the start of data  will be compressed.  Note  that this  implies
that data for the compressed period cannot subsequently be read in.

Similarly, if the second letter of GAP is C, and data which end part-way  through
a calendar year are  fed into the TSS dataset,  the period after  the end of the
data will  be compressed.  (Note that  this period could subsequently  be filled
with data, using the ADD or REPL access mode, provided space is available in the
dataset).

To illustrate the  above,  consider the following example:   Suppose  we  need  to
store uncompressed  data with  a timestep of  1 minute for  one month   (say July
1974).  According to  the formula in Appendix  III,  a full calendar  year would
require 1041  records.   But,  if  GAP=CC were used  to compress  the  months Jan
through June and August through December, the space required is only 88 records.
                                       364                            RELEASE 8.0

-------
                                                                   TSSM Input Set
2.4  UPDATE Block
The UPDATE block is used to update selected fields  in the  label  of a  dataset
already present in the TSS.
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
  UPDATE
      *** the following group is repeated for each  dataset
    DATASET N0=
     [STATION3
     [SECURITY=
     [UNITS=
     (OBS TIME=
     [YEAROR=
     [BASEYR=
     [LOCATION=
    
 ]
]
 ]
   ]
   ]
            •location-
*******
Example
*******
  UPDATE
    DATASET N0=
      UNITS=
      OBS TIME=
      39
 ENGLISH
      12
Details
Symbol

< statn>

< units>

< y>

< location >

Keyword
DATASET NO=
STATION=
SECURITY=
UNITS=
OBS TIME=
YEAROR=
BASEYR=
LOCATION**

Fortran
name ( s )
DSDSNO
STA
SECURE
UK ITS
OBSTIM
YEAROR
BASEYR
LOCATN

Format
14
A8
A8
AS
15
A4
15
A40

Default
none
[blank]
WRITE
METRIC
24
YES
1900
[blank]

Valid Values
Mins 1, Max: 9999
Any 8 char, string
WRITE, READ
METRIC, ENGLISH
Mins 1, Max: 48
YES, NO
Min: 1, Max: 10000
Any 40 char, string
Explanation - See Explanation  for  ADD Block  (Section 2.3)
                                       365
                                                RELEASE 8.0

-------
                                                                  TSSM Input Set

2.5  SCRATCH Block

The SCRATCH  block is used  to delete a  dataset label (and,   effectively,  the
dataset contents.
         12345678
123456789012345678901 2345678901 2345678901 234567890123456789012345678901234567890

Layout
******

  SCRATCH
      *** the following line is repeated for each dataset:
    DATASET NO=           

*******
Example
*******

  SCRATCH
    DATASET NO=             39
Details
Symbol       Keyword       Fortran     Format    Default      Min       Max
                           name(s)

         DATASET NO=   DSDSNO      14        none         1          9999
 Explanation

 DATASET  NO is  a  unique  identifying  number  for  a dataset.
                                       366                            RELEASE 8.0

-------
                                                                  TSSM  Input Set
2.6  EXTEND Block
The EXTEND block is used to allocate more space to a dataset or remove
space from a dataset.
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  EXTEND
      *** the following group is repeated for each dataset:
    DATASET NO=           
      SPACE=             

*******
Example
*******
  EXTEND
    DATASET NO=
      SPACE=
 39
120
Details
Symbol


Keyword
DATASET NO=
SPACE=
Fortran
name { s )
DSDSNO
SPACE
Format
14
15
Default
none
none
Min
1
1
Max
9999
99999
Explanation

DATASET NO is a unique identifying number  for  a  dataset.
SPACE is the space reserved for a dataset  in records.   See  Appendix III
      for formula.
                                       367
                                                                      RELEASE 8.0

-------
                                                                  TSSM Input Set

2.7  SHOWSPACE, SHOWDSL, AND SHOWTSS Blocks

The SHOWSPACE block is used to show the free space in the TSS, the SHOWDSL block
is used to  display the contents of the label  of one or all of  the datasets in
the TSS, and the SHOWTSS block is used to display the current state of the TSS.
         12345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
******

  SHOWSPACE
  SHOWDSL
   [DATASET NO=           ]
  SHOWTSS

*******
Example
*******

  SHOWSPACE
  SHOWDSL
    DATASET NO=             39
  SHOWTSS
Details
Symbol       Keyword        Fortran      Format    Default     Min       Max
                            name(s)

         DATASET NO=    DSDSNO       14        none        1          9999
 Explanation

 DATASET  NO is  a  unique  identifying number for a dataset.   If this keyword
 is  not present,  all  datasets  are  shown.
                                       368                            RELEASE 8.0

-------
                                                                   TSSM Input Set

3.0  SAMPLE TSSMGR INPUT SET



A sample input stream which creates the  label  for  a  dataset.

TSSM

  ADD
    DATASET NO=             39
      MEMBER NAME=      PRECIP
      SPACE=               100
      UNITS=           ENGLISH
      COMPRESSION=       COMPR
      STATION=          US3112
      FILLER CODE=        ZERO
      TIMESTEP=            360
      LOCATION=   PALO ALTO, CALIFORNIA

END TSSM


Note:  The steps required to create a TSS are  explained in Appendix III.
                                      369                             RELEASE 8.0

-------
                                                                   RUN Input  Set

4.0  FORMAT OF A RUN INPUT SET


4.1  Summary

A RUN input  set starts with a RUN  heading and ends with an  END RUN delimiter.
The body  of the text  consists of several  groups/  called "blocks,"  which  may
appear in any sequence:

     RUN

     GLOBAL Block

          Contains  information  of  a  global nature.    It  applies  to  every
          operation in the RUN.

     OPN SEQUENCE Block

          Specifies the operations to be performed  in the RUN/   in  the  sequence
          they will be executed.  It indicates any  grouping (INGROUPs).

      Block

          Deals  with  data  "domestic"  to  all  the  operations  of  the  same
          ,  for example,  parameters  and inital conditions  for
          all  Pervious Land-segments  in  a RUN.    It   is   not concerned  with
          relationships between operations,  or with external sources or targets
          for  time  series.   There  is one      Block  for  each
           involved in the RUN.

     [FTABLES Block]

          A collection of function tables  (FTABLES).     A function table is used
          to document,  in  discrete numerical form,  a   functional  relationship
          between two or more  variables.

     [EXT SOURCES Block]

          Specifies time series which are  input   to the  operations from  external
          sources  (TSS or sequential files).

     [NETWORK Block]

          Specifies any time series which  are  passed between  operations.

     [EXT TARGETS Block]

          Specifies  those  time  series  which  are output  from  operations  to
          external destinations  (TSS).
                                       370                            RELEASE 8.0

-------
                                                                   RUN  Input  Set

    [FORMATS Block]

          Contains any user-supplied formats which may  be required  to  read time
          series on external sequential files.

    [SPEC-ACTIONS Block]

          Specifies operation,  variable location,  type or name,  date/time  and
          action code in order to change a variables value during a  run.

     END RUN
Usually,  a  RUN input  set will not  include all of  the above   blocks.    Their
presence will be dictated by the operations performed in the  RUN  and  the  options
which are selected.
4.2  GLOBAL Block
This block must always be present in a RUN input set.
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

GLOBAL
  <	run-info	
  START   <	s-date-time	>  END<	e-date-time	>
  RUN INTERP OUTPUT LEVEL
  RESUME  RUN  TSSFL 
END GLOBAL
Example
*******

GLOBAL
  Simulation of the most complex network ever attempted  by  mankind
  START       1970/01/01 00:00  END     1977/12/31  12:00
  RUN INTERP OUTPUT LEVEL    7
  RESUME     0 RUN      1
END GLOBAL
                                      371                             RELEASE 8.0

-------
                                                                    GLOBAL Block
Details
Symbol















Fortran
name ( s )
RUNINF(20)
SYR,
SMO,
SDA,
SHR,
SMI
EYR,
EMO,
EDA,
EHR,
EMI
OUTLEV
RESMFG
RUNFG
TSSFL
Format
A78
18,
1X,I2,
1X,I2,
1X,I2,
1X,I2
18,
1X,I2,
1X,I2,
1X,I2,
IX, 12
15
15
15
15
Def
none
none
1
1
0
0
none
12
varies
#24
0
0
0
0
15
Min
none
1
1
1
0
0
1
1
1
0
0
0
0
0
15
Max
none
32767
12
varies
23
59
32767
12
varies
24 #only if EMI is 0
59
10
1
1
22
Explanation

RUNINF stores the users comments regarding the RUN.

Users conventionally label the same point in  time  differently,  depending whether
they are  looking forwards or backwards  towards it.    For  example,  if  we  say that
a RUN starts on 1978/05 we mean that it commences  at  the  start  of  May 1978.   On
the other hand, if we  say it ends on 1978/05  we mean  it terminates at the end of
May 1978.   Thus, HSPF has two separate conventions for the  external  labeling of
time. When supplying values for a date/time field  a user  may omit  any element in
the field except the year,  which must  be supplied (as a  4 digit figure).   HSPF
will substitute  the defaults given  above for any blank or zero   values.   The
completed  starting and  ending  date/time fields   are  translated into   another
format,   which  is the  only  one  used  to  label intervals  and  time  points
internally.   It has   a resolution of 1  minute.    Thus,  time  is   recorded as a
year/month/day/hour/minute set,  to completely specify either a time  interval or
a point.   The date/time used by the  internal clock  uses the "contained within"
principle.  For example,  the first minute in an hour is  numbered  1  (not 0)  and
the last  is numbered 60  (not 59).   The same applies to  the numbering of hours.
Thus, the time conventionally labeled 11:15 is in  the 12th hour of the day so is
labeled 12:15 internally;  the last minute  of 1978 is  labeled  1978/12/31 24:60.
This convention is extended  to the labeling  of points  by  labeling a point with
the  minute which  immediately  precedes it.   Thus,    midnight New Year's  eve
1978/1979 is  1978/12/31  24:60,  not 1979/01/01  00:00.    This gives a system for
uniquely  labeling each point internally.
                                       372
RELEASE 8.0

-------
                                                                    GLOBAL Block

OUTLEV is a  flag which governs the  quantity of informative output  produced by
the Run Interpreter.   A value 0 results  in minimal output;  10 in the maximum.
It does not affect error or warning messages.

If RESMFG is 1, the system will operate in "resume" mode;   that is,  it will use
the  same input  as were  supplied  in a  previous  RUN input  set except  where
overriding information  is supplied in  this input  set.    (This feature  is not
supported in the current release of HSPF).

If RUNFG is 1,  the system will both interpret and execute  the RUN.  If it is 0,
only interpretation will be done.  This feature is useful if one wishes to debug
an input stream during the day time, but defer execution to a night block.

TSSFL is the Fortran unit number of the  Time Series Store.   It defaults to 15.
Note that some Fortran compilers (eg IBM 370) require a DEFINE FILE statement in
which the file (TSS) length is specified,  in records.   For this purpose,  HSPF
has several DEFINE FILE statements,  each of  which refers  to a TSS of different
length.   Select the  length of your TSS  (see Appendix III,  Section  2.3)  and
supply a value for TSSFL which refers to the appropriate DEFINE FILE statement.
4.3 OPN SEQUENCE Block
         12345678
1234567890123456789012345678901 2345678901234567890123456789012345678901234567890
*******
Layout
******
OPN SEQUENCE
   [INGRP
      <-opn-id-
INDELT ]
      <-opn-id—
    [END INGRP  ]
      <-opn-id—
      <-opn-id
    [INGRP
      <-opn-id
INDELT 
INDELT 
INDELT ]
    [END INGRP
END OPN SEQUENCE
                                       373
                                              RELEASE 8.0

-------
                                                              OPN SEQUENCE Block
*******
Example
*******
OPN SEQUENCE
    INGRP              INDELT 02:00
      PERLND      20
      PERLND      21
      PERLND      22
    END INGRP
      RCHRES       1   INDELT 12:00
END OPN SEQUENCE
Details
   Symbol          Fortran     Format                Comment
                   Name(s)
          HRMIN(2)       I2,1X,I2  Time  interval  (hour:min)  used  in the
                                        INPAD e.g.  00:05

<-opn-id->     OPTYP,OPTNO    A6,5X,I3  Type  and  no. of  this  operation.
                                        e.g.    RCHRES      100
Explanation

This block   specifies  the  various  operations  to  be  performed  in the  RUN and,
optionally,   their grouping  into  INGROUPs.   The operations will be performed in
the sequence specified in  the block,   apart from repetition implied by grouping.
A maximum of 75  operations can  be specified in one run.

Every  <-opn-id-> consists  of OPTYP and  OPTNO.  The OPTYP field  must contain an
identifier of up to  6 characters which  corresponds to an  "operating module id"
in  the  HSPF system.    The OPTNO  field  contains an integer  which distinguishes
operations of the same type  from  one  another.   Every   must be unique.

The time intervals of the scratch  pads used  in  the RUN are specified  in this
block.  These appear  on  the INGROUP  lines, except where the user has not placed
an  operation in  an  INGROUP.   In that case  is   specified alongside <-opn-
                                       374                            RELEASE 8.0

-------
                                                              OPN SEQUENCE Block
4.3.1  Optimization of Operation Sequencing
The  sequence of  operations  within the  Operations  Sequence  block should  be
optimized  to  make most  efficient  use  of  the internal  scratch  pad(INPAD).
Optimal use of the INPAD is accomplished  by reducing the maximum number of time
series(rows)  on  the INPAD.    This increases the  length of  each row  and  the
INSPAN, which reduces swapping between operations.

A time series occupies a row on the INPAD from the moment it is either read from
an external source or is created by an  operation until the moment it is used by
the last operation  requiring it.   HSPF automatically optimizes  the reading of
data from external sources and writing of data to external targets.

Optimal sequencing of operations requires that  an operation be executed as soon
as all  input timeseries produced by  other operations have been  created.    For
example/  a  DISPLY operation  which displays  outflow from  a PERLND  operation
should immediately follow the PERLND operation.  A RCHRES operation representing
a section of stream should immediately follow any RCHRES operations representing
reaches upstream and any PERLND operations which contribute local inflow.

For  example,  a  watershed is  represented by  4 PERLND  operations,  5   RCHRES
operations,  2 PLTGEN operations,  4 DISPLY operations,  and 1 DURANL operation.
These are defined as follows:

     PERLND 1 - rain gage 1, land use of pasture
     PERLND 2 - rain gage 1, land use of corn
     PERLND 3 - rain gage 2, land use of pasture
     PERLND 4 - rain gage 2, land use of corn
     RCHRES 1 - local inflow from PERLND 1 and 2
     RCHRES 2 - upstream inflow from RCHRES 1,
                local inflow from PERLND 1 and 2
     RCHRES 3 - local inflow from PERLND 3 and 4
     RCHRES 4 - upstream inflow from RCHRES 2 and 3,
                local inflow from PERLND 3 and 4
     RCHRES 5 - upstream inflow from RCHRES 4,
                local inflow from PERLND 3 and 4
     DISPLY 1 - outflow from RCHRES 5
     DISPLY 2 - outflow from RCHRES 3
     DISPLY 3 - unit flow from PERLND 2
     DISPLY 4 - unit flow from PERLND 4
     PLTGEN 1 - outflow from RCHRES 5,
                measured flow at bottom of RCHRES 5
     PLTGEN 2 - outflow from RCHRES 1,
                area weighted sum of unit flow from PERLND 1 and 2
     DURANL 1 - outflow from RCHRES 5
                                      375
                                                                     RELEASE  8.0

-------
                                                              OPN SEQUENCE Block

The optimum order for these operations is:

     PERLND 1
     PERLND 2
     DISPLY 3
     RCHRES 1
     PLTGEN 2
     RCHRES 2
     PERLND 3
     PERLND 4
     DISPLY 4
     RCHRES 3
     DISPLY 2
     RCHRES 4
     RCHRES 5
     DISPLY 1
     DURANL 1
     PLTGEN 1
                                       376                            RELEASE 8.0

-------
                                                            Operation-type Block

4.4   Block
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******


  General input
  Section 1 input
  Section 2 input   |   Only supplied if the operating module is sectioned
                       and the section is active

  Section N input
END 
Details
   Symbol          Fortran     Format                Comment
                   Name(s)
             OPTYP       A6        Type of operation covered in this
                                         block, e.g. RCHRES, PERLND
Explanation

This type of block deals with data which are "domestic" to all operations  of  the
same ,  e.g.  the parmameters and initial conditions for all  the
Pervious  Land- segments  in a  RUN.   It  is not  concerned with  relationships
between operations or with external sources or targets for time  series.

This type of block provides for "general"  input and for input which is specific
to individual "sections" of the OM.   The latter only apply to modules which  are
sectioned.  The general input contains all of the information which simple (non-
sectioned) modules require; for sectioned modules it contains input which  is  not
specific to any one section.

The general organization of the <0peration-type> blocks is as follows:
                                      377                             RELEASE 8.0

-------
                                                            Operation-type Block

The user supplies his input in a  set of tables (eg.  ACTIVITY,  Sect 4.4(1).1.1
below).  Each table has a name (eg. ACTIVITY), called the "Table-type".  A table
starts with the  heading   and ends with  the delimiter  END .  The body of the table consists of:
<	values-
where   is  the range  of operation-type  numbers to  which the   
apply.  If the second field in  is blank, the range is assumed to consist
of a single operation.   Thus, in the example in Sect 4.4(1).1.1, Pervious  Land-
segments  (PLSs) 1 through 7 have the same set of active sections,  while segment
9 has a different set.

Thus,  a  table lists the values given to a specified set of variables (occupying
only 1 line) for all the operations of a given type. The input was designed this
way to minimize the quantity of data supplied when many operations have  the same
values for certain sets of input.

HSPF will only look  for a given Table-type if the  options already  specified by
the user  require data contained within it.   Thus, Table-type MON-INTERCEP  (Sect
4.4(1).4.5)  is relevant only if VCSFG in Table-type PWAT-PARM1  (4.4(1).4.1)  is
set to 1  for one or more PLSs.  The system has been designed to  ignore  redundant
information.  Thus,  if VCSFG is 0 and Table-type MON-INTERCEP is  supplied,  the
table will be ignored.

On the other hand, if an expected value is not supplied, the system  will attempt
to use a  default value. This  situation can arise in one of  three ways:

1.  The entire table may be missing from the UCI.

2.  The table may be present  but not  contain an entry  (line)  for the  operation
    in question.   The example  in Sect 4.4(1).1.1 has  no entry  for PLS No.  8.
    Thus,  all values in its  active sections  vector will acquire  the default of
    0.

3.  A field may be   left blank or given the value  zero.   In  the example in Sect
    4.4(1).4.2  , KVARY will acquire the default  value 0.0,  for PLSs  1  through 7.

When appropriate,  the HSPF system will also  check  that a  value supplied by the
user  falls  within an allowable  range.   If it  does  not,   an error message is
generated.

Note  that a table  contains either integers  or  real  values,  but not both.    For
example,  Table-type  ACTIVITY  (Sect  4.4(1).1.1)  contains only integer flags,  but
Table-type PWAT-PARM2   (4.4(1).4.2)   contains   only  real   numbers.   For  tables
containing  real-valued data,   the documentation  gives  separate defaults,  minima
and maxima  for  the  English   and Metric unit   systems.    The user   specifies the
system  in which  he is working, in Table-type GEN-INFO  (eg.  Sect  4.4(1).1.3).
                                       378                            RELEASE 8.0

-------
                                                                    PERLND Block

4.4(1) PERLND Block

         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

PERLND
  General input
 [section ATEMP input]
 [section SNOW input]
 [section PWATER input]
 [section SEDMNT input]
 [section PSTEMP input]
 [section PWTGAS input]
 [section PQUAL input]
 [section MSTLAY input]
 [section PEST input]
 [section NITR input]
 [section PHOS input]
 [section TRACER input]
END PERLND
Explanation

This block  contains the  data which are  "domestic" to  all the  Pervious Land-
segments in the RUN.   The "General input"  is always relevant:   other input is
only required if the module section concerned is active.
                                      379                            RELEASE 8.0

-------
                                                         PERLND — General Input

4.4(1).1  PERLND BLOCK — General input
         12345678
1234567890123456789012345678901 2345678901 23456789012345678901 2345678901234567890
*******
Layout
******

  Table-type ACTIVITY
 [Table-type PRINT-INFO]
  Table-type GEN-INFO
Explanation

The  exact format  of each  of the  tables mentioned  above  is   detailed  in  the
documentation which follows.

Tables enclosed  in brackets  []   above are  not always required;    for example,
because all the values can be defaulted.
                                       380                            RELEASE 8.0

-------
                                                         PERLND — General Input

4.4(1).1.1  Table-type ACTIVITY — Active Sections Vector
         1         2345678
1234567890123456789012345678901 2345678901234567890123456789012345678901234567890
*******
Layout
******

  ACTIVITY
  <-range><	'a-s-vector-
  (repeats until all operations of this type are covered)

  END ACTIVITY
*******
Example
*******

  ACTIVITY
                   Active Sections                               ***
    # -  # ATMP SNOW PWAT  SED  PST  PWG PQAL MSTL PEST NITR PHOS  TRAC***
    17111
    9         0001
  END ACTIVITY
Details
Symbol         Fortran        Format  Def     Min     Max
               name(s)

   ASVECO2)      1215    0       0       1
Explanation

The PERLND  module is divided  into  12 sections.    The values  supplied   in  this
table specify which sections  are active and which  are not,   for  each operation
involving the PERLND module. A value of 0 means  "inactive" and  1 means "active".
Any meaningful subset of sections may be active.
                                       381                             RELEASE 8.0

-------
                                                         PERLND — General Input

4.4(1).1.2  Table-type PRINT-INFO — Printout information
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  PRINT-INFO
  <-range><	print-flags	>

  (repeats until all operations of this type are covered)

  END PRINT-INFO
*******
Example
*******

  PRINT-INFO
     ********************* Print-flags *************************  PIVL   PYR
    # -  # ATMP SNOW PWAT  SED  PST  PWG PQAL MSTL PEST NITR PHOS  TRAC  *********
    17246                                  432    10    12
  END PRINT-INFO
Details
Symbol




Fortran
name ( s )
PFLAGO2)
PIVL
PYREND

Format
1215
15
15

Def
4
1
9

Min
2
1
1

Max
6
1440
12
                                       382                            RELEASE 8.0

-------
                                                         PERLND — General Input

Explanation

HSPP permits the  user to vary the  printout level (maximum frequency)   for the
various active sections of an operation.   The meaning of each permissible value
for PFLAG() is:

 2 means every PIVL intervals
 3 means every day
 4 means every month
 5 means every year
 6 means never

In the example above, output from Pervious Land-segments 1 thru 7 will
occur as follows:

Section   Max frequency

ATEMP     10 intervals
SNOW      month
PWATER    never
SEDMNT     |
thru       I month  (defaulted)
PEST       |
NITR      month
PHOS      day
TRACER    10 intervals

A value need only  be supplied for PIVL if one or more   sections have a printout
level of 2.   For those sections, printout will occur every PIVL intervals  (that
is,  every PDELT=PIVL*DELT  mins5.  PIVL must be  chosen such  that there  are an
integer no. of PDELT periods in a day.

HSPF will automatically provide printed output at all standard intervals greater
than the specified minimum interval.   In the above example,  output  for section
PHOS will be printed at the end of each day, month and year.

PYREND  is  the calendar  month  which  will  terminate  the year  for  printout
purposes.   Thus,   the annual summary can  reflect the  situation over  the past
water year or the past calendar year, etc.
                                      383                             RELEASE 8.0

-------
                                                         PERLND — General Input

4.4(1).1.3  Table-type GEN-INFO — Other general information
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  GEN-INFO
  <-range><	PLS-id	XblkX—unit-syst—><-printu->

  (repeats until all operations of this type are covered)

  END GEN-INFO

*******
Example
*******
  GEN-INFO
    
    # -  #
 Name
    1      Yosemite Valley
    2      Kings river
  END GEN-INFO
NBLKS   Unit-systems   Printer***
      User  t-series Engl Metr***
             in  out          ***
                        1
              1
23
Details
Symbol




Fortran
name ( s )
LSID(5)
NBLKS
UUNITS,IUNITS,

Format
5A4
15
315

Def
none
1
1

Min
none
1
1

Max
none
5
2
 
               OUNITS
PUNIT(2)
215
 99
                                       384
                                                      RELEASE 8.0

-------
                                                         PERLND — General  Input

Explanation

Any string of up to 20 characters may be supplied as the identifier  for  a PLS.

NBLKS is the no.   of "blocks" into which the surface  and near-surface  zones of
the PLS  will be  subdivided for  simulation purposes.   It affects   the PWATER,
SEDMNT,   and agricultural  chemical sections  of  the PERLND  module.   See the
functional description of those sections for further details.

The values supplied for  indicate the system of units  for data in the
UCI,  input  time series and output  time series respectively:  1  means English
units, 2 means Metric units.

The  values supplied  for   indicate  the  destinations   of  printout  in
English and Metric units respectively.   A value 0 means no printout is  required
in that system.   A non-zero value means printout is required  in  that system and
and the value is the Fortran unit no. of the file to which the printout  is  to be
written.  Note that printout  for each Pervious Land Segment can  be obtained in
either the English or Metric systems,  or  both (irrespective  of  the system used
to supply the inputs).
4.4(1).2  PERLND BLOCK — Section ATEMP input
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

 [Table-type ATEMP-DAT]
Explanation

The exact format of  the table mentioned above  is detailed   in  the  documentation
which follows.

Tables enclosed  in brackets  []   above are  not always  required;    for example,
because all the values can be defaulted.
                                       385                             RELEASE 8.0

-------
                                                   PERLND — Section ATEMP  input

4.4(1).2.1  Table-type ATEMP-DAT — Elevation difference between gage &  PLS
         12345678
12345678901234567890123456789012345678901 23456789012345678901 2345678901 234567890
*******
Layout
******

  ATEMP-DAT
  <-range >
  (repeats until all operations of this  type are  covered)

  END ATEMP-DAT
*******
Example
*******
  ATEMP-DAT
       El-diff
    # -  #     (ft)
    1    7     150.
  END ATEMP-DAT
***
***
Details
Symbol



Fortran
name ( s )
ELDAT
AIRTMP

Format Def
F10.0 0.0
0.0
F10.0 60
15

Min
none
none
-60
-50

Max
none
none
140
60

Units
ft
m
Deg F
Deg C

Unit
system
Engl
Metric
Engl
Metric
 Explanation

 ELDAT is  the difference  in elevation between the temp gage and  the PLS;  it is
 used  to estimate  the temp over the PLS  by application of a lapse  rate.  It is
 positive  if the PLS is higher than the gage, and vice versa.

 AIRTMP is the air temperature over the PLS at the start of the RUN.
                                       386
                                               RELEASE 8.0

-------
                                                    PERLND — Section SNOW input

4.4(1).3  PERLND BLOCK — Section SNOW input
         1          2345678
12345678901234567890123456789012345678901 23456789012345678901 2345678901 234567890
*******
Layout
******
 [Table-type ICE-FLAG]
  Table-type SNOW-PARM1
 [Table-type SNOW-PARM2]
 [Table-type SNOW-INIT1]
 [Table-type SNOW-INIT2]
Explanation

The  exact format  of each  of the  tables mentioned  above is  detailed  in   the
documentation which follows.

Tables enclosed  in brackets []   above are  not always  required;    for example,
because all the values can be defaulted.
                                      387                             RELEASE 8.0

-------
                                                    PERLND — Section SNOW  input

4.4(1).3.1  Table-type ICE-FLAG — governs simulation of ice formation
         1          2345678
123456789012345678901 2345678901 2345678901 2345678901 2345678901 2345678901234567890
*******
Layout
******

  ICE-FLAG
  <-range>
  (repeats until all operations of this type are covered)

  END ICE-FLAG

*******
Example
*******

  ICE-FLAG
     Ice-   ***
    # -  # flag   ***
    1    7    1
  END ICE-FLAG
Details
Symbol         Fortran        Format   Def      Min     Max
               name(s)

          ICEFG          15       0        0       1
Explanation

A value  0 means  ice  formation  in  the  snow pack will not be simulated; 1  means it
will.
                                       388                            RELEASE 8.0

-------
                                                    PERLND — Section SNOW input

4.4(1).3.2  Table-type SNOW-PARM1 — First group of SNOW parameters
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890


Layout
******


  SNOW-PARM1
  <-range><	snowparml-	—	>


  (repeats until all operations of this  type are covered)


  END SNOW-PARM1

*******
Example
*******


  SNOW-PARM1
 Latitude
# - #
1 7 39.5
END SNOW-PARM1
************************
Details
Symbol






Fortran
name ( s )
LAT,
MELEV,
SHADE,
SNOWCF,
COVIND
Mean- SHADE
elev
3900. 0.3
********************

Format Def
5F10.0 40.0
0.0
0.0
0.0
none
none
none
SNOWCF
1.2
**********

Min
-90.0
0.0
0.0
0.0
1.0
0.01
0.25
COVIND***
***
10
******************

Max Units
90.0 degrees
30000.0 ft
10000.0 m
1,0 none
100.0 none
none in
none mm
***********

Unit
system
Both
Engl
Metric
Both
Both
Engl
Metric
                                       389
                                                                      RELEASE 8.0

-------
                                                    PERLND — Section SNOW  input

Explanation

LAT is the  latitude of the PLS.    It is positive for  the northern hemisphere,
negative for the southern hemisphere.

MELEV is the mean elevation of the PLS.

SHADE is the fraction  of the PLS which is shaded from  solar radiation  by,   for
example, trees.

SNOWCF is  the factor by  which recorded precip data  will be multiplied  if the
simulation indicates it is snowfall,  to account for poor catch efficiency under
snow conditions.

COVIND is the maximum  pack (water equivalent)  at which the  entire PLS will be
covered with snow (see functional description of SNOW section).


4.4(1).3.3  Table-type SNOW-PARM2 — Second group of SNOW parms



         12345678
1234567890123456789012345678901 2345678901 23456789012345678901 2345678901 234567890
*******
Layout
******

  SNOW-PARM2
  <-range><	snowparm2-
   (repeats until  all operations  of  this  type  are covered)

   END  SNOW-PARM2
 *******
 Example
 *******

   SNOW-PARM2
                                                                  ***
     #  -   #      RDCSN     TSNOW    SNOEVP    CCFACT    MWATER    MGMELT***
     1     7        0.2       33.
   END  SNOW-PARM2
                                       390                            RELEASE 8.0

-------
                                                    PERLND — Section SNOW input
Details
Symbol Fortran
name(s)
 RDCSN
TSNOW
SNOEVP
CCFACT
MWATER
MGMELT

Format
F10.0
F10.0
F10.0
F10.0
F10.0
F10.0

Def
0.15
32.0
0.0
0.1
1 .0
0.03
0.01
0.25

Min
0.01
30.0
-1 .0
0.0
0.0
0.0
0.0
0.0

Max
1 .0
40.0
5.0
1 .0
2.0
1 .0
1 .0
25.

Units
none
degF
degC
none
none
none
in/day
mm/day

Unit
system
Both
Engl
Metric
Both
Both
Both
Engl
Metric
Explanation

RDCSN is the density of cold, new snow relative to water.  This value applies to
snow falling at air temps <= OdegF.   At higher temperatures the density of snow
is adjusted.

TSNOW  is the  air  temp  below which  precip  will  be snow,   under  saturated
conditions.    Under  non-saturated  conditions   the  temperature  is  adjusted
slightly.

SNOEVP is a parameter which adapts  the snow evaporation (sublimation)  equation
to field conditions.

CCFACT  is  a  parameter  which adapts  the  snow  condensation/convection  melt
equation to field conditions.

MWATER is the max water content of the snow pack, in depth water per depth water
equiv.

MGMELT is the max rate of snowmelt by  ground heat,  in depth of water equiv per
day.   This is the value which applies  when the pack temperature is at freezing
point.
                                      391
                                                                     RELEASE  8.0

-------
                                                    PERLND — Section SNOW input

4.4(1).3.4  Table-type SNOW-INIT1 — First group of initial values
         1          2345678
12345678901234567890123456789012345678901 234567890123456789012345678901234567890
*******

Layout
******
  SNOW-INIT1
  <-range><-
            	snowinitl	


(repeats until all operations of this type are covered)


END SNOW-INIT1
*******

Example
*******
  SNOW-INIT1
    
                                                                     ***
# - # pack-snow Pack-ice Pack-watr RDENPF
1 7 2.1 .02 .40
END SNOW-INIT1
****************************************************
Details
Symbol Fortran Format Def
name ( s )
 Pack-snow F10.0 0.0
0.0
Pack-ice F10.0 0.0
0.0
Pack-watr F10.0 0.0
0.0
RDENPF F10.0 0.2
DULL F10.0 400.
PAKTMP F10.0 32.
0.0

Min

0.0
0.0
0.0
0.0
0.0
0.0
.01
0.0
none
none
DULL
********

Max

none
none
none
none
none
none
1.0
800.
32.
0.0
PAKTMP***
********************

Units

in
mm
in
mm
in
mm
none
none
degF
degC

Unit
system
Engl
Metric
Engl
Metric
Engl
Metric
Both
Both
Engl
Metric
                                       392
                                                                    RELEASE 8.0

-------
                                                    PERLND  —  Section  SNOW input

Explanation

Pack-snow is the quantity of snow in the pack  (water equiv).

Pack-ice is the quantity of ice in the pack  (water equiv)

Pack-watr is the quantity of liquid water in the pack.

RDENPF is the density of the frozen contents (snow+ice) of  the pack, relative to
wa te r.

DULL is  an index to  the dullness of  the pack  surface,   from which   albedo is
estimated.

PAKTMP is the mean temperature of the frozen contents  of  the pack.
4.4(1).3.5  Table-type SNOW-INIT2 — Second group  of  initial  values
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  SNOW-INIT2
  <-range ><	snowinit2	>
  (repeats until all operations of  this  type  are  covered)

  END SNOW-INIT2

*******
Example
*******

  SNOW-INIT2
                                   ***
    # -  #    COVINX    XLNMLT    SKYCLR***
    1    7                          0.50
  END SNOW-INIT2
                                       393                             RELEASE 8.0

-------
                                                    PERLND — Section SNOW input
Details
Symbol




Fortran
name ( s )
COVINX
XLNMLT
SKYCLR

Format Def
F10.0 0.01
0.25
F10.0 0.0
0.0
F10.0 1.0

Min
0.01
0.25
0.0
0.0
.15

Max
none
none
none
none
1 .0

Units
in
mm
in
mm
none

Unit
system
Engl
Metric
Engl
Metric
Both
Explanation

COVINX is  the current  pack (water  equiv)  required  to obtain  complete areal
coverage of  the PLS.   If the  pack is less  than this amount,  areal  cover  is
prorated (PACKF/COVINX).

XLNMLT is the  current remaining possible increment  to ice storage in  the pack
(see functional description).   This value is  only relevant if ice formation  is
being simulated (ICEFG= 1).

SKYCLR is the fraction of sky which is assumed to be clear at  the present time.

In the above example  COVINX and XLNMLT will be assigned  default values because
the user has left the fields blank.
                                       394
RELEASE 8.0

-------
                                                  PERLND — Section  PWATER  input
4.4(1).4  PERLND BLOCK — Section PWATER input
*******************************************:
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
 [Table-type PWAT-PARM1  ]
  Table-type PWAT-PARM2
 [Table-type PWAT-PARM3  ]
  Table-type PWAT-PARM4
 [Table-type MON-INTERCEP]
 [Table-type MON-UZSN    ]
 [Table-type MON-MANNING ]
 [Table-type MON-INTERFLW]
 [Table-type MON-IRC     ]
 [Table-type MON-LZETPARM]
 [Table-type PWAT-STATE1 ]
 [Table-type PWAT-BLKSTAT]
only reqd if the relevant quantity
varies through the year
Explanation

The  exact format  of each  of the   tables mentioned   above  is   detailed in  the
documentation which follows.
Tables enclosed  in brackets  []   above are   not  always  required/-
because all the values can be defaulted.
                                      for example,
                                       395
                                                                      RELEASE 8.0

-------
                                                  PERLND — Section PWATER input

4.4(1).4.1   Table-type PWAT-PARM1 — First group of PWATER parms  (flags)
         12345678
1234567890123456789012345678901 2345678901234567890123456789012345678901234567890

Layout
******

  PWAT-PARM1
  <-range><	pwatparm!	>

  (repeats until all operations of this  type are covered)

  END PWAT-PARM1

*******
Example
*******
  PWAT-PARM1
                       Flags
    # -  # CSNO RTOP UZFG  VCS  VUZ  VNN VIFW VIRC   VLB
    1711
  END PWAT-PARM1
***
***
Details
Symbol











Fortran
name ( s )
CSNOFG,
RTOPFG ,
UZFG,
VCSFG,
VUZFG,
VNNFG,
VIFWFG,
VIRCFG,
VLEFG

Format

15
15
15
15
15
15
15
15
15

Def

0
0
0
0
0
0
0
0
0

Min

0
0
0
0
0
0
0
0
0

Max

1
1
1
1
1
1
1
1
1
                                       396
         RELEASE  8.0

-------
                                                  PERLND — Section PWATER input

Explanation

If CSNOFG is 1,   section PWATER assumes that snow accumulation and melt is being
considered.  It will, therefore, expect that the time series produced by section
SNOW are available,  either internally (produced  in this RUN)  or from external
sources (produced in a previous RUN).   If CSNOFG is 0,  no such time series are
expected.  See the functional description for further information.

If RTOPFG is 1 ,   routing of overland flow is  done in exactly the same way as in
HSPX, ARM and NPS. A value of 0 results in a new algorithm being used.

If UZFG is 1,  inflow to the upper zone  is computed in the same way as in HSPX,
ARM and  NPS.   A value of  zero results in the  use of a new  algorithm,  which
should be less sensitive to changes in DELT.

The flags beginning with "V" indicate whether  or not certain parameters will be
assumed to vary through the year: 1 means they do vary, 0 means they do not. The
quantities concerned are:

    VCSFG    interception storage capacity
    VUZFG    upper zone nominal storage
    VNNFG    Manning's n for the overland flow plane
    VIFWFG   interflow inflow parameter
    VIRCFG   interflow recession const
    VLEFG    lower zone E-T parameter

If any of these flags are on, monthly values for the parameter concerned must be
supplied  (see Table-types MON-  , documented later).
                                      397                             RELEASE 8.0

-------
                                                  PERLND — Section PWATER input


4.4(1).4.2  Table-type PWAT-PARM2 — Second group of PWATER parms
         1          2345678
1234567890123456789012345678901 2345678901234567890123456789012345678901234567890
*******

Layout
******


  PWAT-PARM2
  <-range><	pwatparm2-
  (repeats until all operations of this type are  covered)


  END PWAT-PARM2
*******

Example
*******


  PWAT-PARM2
     ***
    # -  # ***FOREST      LZSN     INFILT       LSUR     SLSUR     KVARY     AGWRC
    1    7       0.2       8.0       0.7        400.      .001                  .98

  END PWAT-PARM2
                                       398                            RELEASE 8.0

-------
                                                  PERLND — Section PWATER input
Details
Symbol Fortran
name ( s )
 FOREST
LZSN
INFILT
LSUR
SLSUR
KVARY
AGWRC

Format
F10.0
F10.0
F10.0
F10.0
F10.0
F10.0
F10.0

Def
0.0
none
none
none
none
none
none
none
0.0
0.0
none

Min
0.0
.01
.25
0.0001
0.0025
1.0
0.3
.000001
0.0
0.0
0.001

Max
1 .0
100.
2500.
100.
2500.
none
none
10.
none
none
1.0

Units
none
in
mm
in/hr
mm/hr
ft
m
none
1/in
1 /mm
1/day

Unit
system
Both
Engl
Metric
Engl
Metric
Engl
Metric
Both
Engl
Metric
Both
Explanation

FOREST is the fraction of the PLS which is covered by forest which will continue
to transpire  in winter.  Input only if CSNOFG - 1.

LZSN is the lower zone nominal storage.

INFILT is an index to the infiltration capacity of the soil.

LSUR is the length of the assumed overland flow plane, and SLSUR is the slope.

KVARY is a  parameter which affects the behavior of  groundwater recession flow,
enabling it to be non exponential in its decay with time.

AGWRC is the basic  groundwater recession rate if KVARY is zero  and there is no
inflow to groundwater (rate of flow today/ rate yesterday).

In the above example, KVARY will be assigned the default value of 0.0  .
                                      399
                                                                     RELEASE  8.0

-------
                                                  PERLND — Section PWATER  input

4.4(1).4.3  Table-type PWAT-PARM3 — Third group of PWATER parms
         12345678
12345678901 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901234567890
*******
Layout
******
  PWAT-PARM3
  <-range><--
          -pwatparm3-
  (repeats until all operations of this type are  covered)

  END PWAT-PARM3
*******
Example
*******
  PWAT-PARM3
    ***
    # -  #*** PETMAX
    1    7
    9             39
  END PWAT-PARM3
PETMIN    INFEXP    INFILD    DEEPER

    33       3.0       1.5
BASETP
AGWETP
Details
Symbol Fortran
name ( s )
 PETMAX
PETMIN
INFEXP
INFILD
DEEPFR
BASETP
AGWETP

Format
F10.0
F10.0
F10.0
F10.0
F10.0
F10.0
F10.0

Def
40.
4.5
35.
1 .7
2.0
2.0
0.0
0.0
0.0

Min
none
none
none
none
0.0
1.0
0.0
0.0
0.0

Max
none
none
none
none
10.0
2.0
1.0
1.0
1.0

Units
degF
degC
degF
degC
none
none
none
none
none

Unit
system
Engl
Metric
Engl
Metric
Both
Both
Both
Both
Both
                                       400
                                              RELEASE 8.0

-------
                                                  PERLND — Section PWATER input

Explanation

PETMAX is  the air temp  below which E-T will  arbitrarily be reduced  below  the
value obtained from the input time series, and PETMIN is the temp below which E-
T will be zero regardless of the value  in the input time series.   These values
are only used if snow is being considered (CSNOFG= 1).

INFEXP is the  exponent in the infiltration  equation,  and INFILD is  the ratio
between the max and mean infiltration capacities over the PLS.

DEEPFR is  the fraction of groundwater  inflow which will enter  deep  (inactive)
groundwater and, thus, be lost from the system as it is defined in HSPF.

BASETP is the  fraction of remaining potential  E-T which can be  satisfied from
baseflow (groundwater outflow), if enough is available.

AGWETP is the  fraction of remaining potential  E-T which can be  satisfied from
active groundwater storage if enough is available.

In the above example,  all parameters will be suppplied default values for Land-
segments 1  through  7,  while DEEPFR thru  AGWETP will be supplied  defaults  for
Land-segment 9.


4.4(1).4.4  Table-type PWAT-PARM4 — Fourth group of PWATER parms
         1         2345678
1234567890123456789012345678901 2345678901 234567890123456789012345678901234567890
*******
Layout
******

  PWAT-PARM4
  <-range ><	pwatparm4-
  (repeats until all operations of this type are covered)

  END PWAT-PARM4
*******
Example
*******

  PWAT-PARM4
    
    # -  #     CEPSC      UZSN      NSUR      INTFW        IRC      LZET-
    1    7       0.1       1.3       0.1         3.        0.5        0
  END PWAT-PARM4
                                                                     ************
                                      401                             RELEASE 8.0

-------
                                                  PERLND — Section PWATER input
Details
Symbol Fortran Format
name ( s )
 CEPSC F10.0
UZSN F10.0
NSUR F10.0
INTFW F 1 0 . 0
IRC F10.0
LZETP F10.0

Def
0.0
0.0
none
none
0.1
none
none
0.0

Mi
0.
0.
0.
0.
0.
1.
1.
0.

n
0
0
01
25
001
OE-30
OE-30
0

Max
10.0
250.
10.0
250.
1.0
none
1.0
1.0

Units Unit
system
in Engl
mm Metric
in Engl
mm Metric
Both
none Both
1/day Both
none Both
Explanation

Values need only be supplied for those  parameters which do not vary through  the
year.   If they do vary (as specified in Table-type PWAT-PARM1),  monthly values
are supplied in the tables documented immediately below this one.

CEPSC is the interception storage capacity.

UZSN is the upper zone nominal storage.

NSUR is Manning's n for the assumed overland flow plane.

INTFW is the interflow inflow parameter

IRC is the interflow recession parm.   Under  zero inflow,  this  is the  ratio of
interflow outflow rate today/ rate yesterday

LZETP is the lower zone E-T parm.   It is an index to  the  density of deep-rooted
vegetation.
                                       402
RELEASE 8.0

-------
                                                  PERLND — Section PWATER input


4.4(1),4.5  Table-type MON-INTERCEP — Monthly interception storage capacity
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******

Layout
******
  MON-INTERCEP
  <-rangeX	
            	.—mon-icep	•	


(repeats until all operations of this type are covered)

END MON-INTERCEP
*******

Example
*******


  MON-INTERCEP
      Interception storage capacity at start of each month      ***
    # -  #  JAN  FEB  MAR  APR  MAY  JON  JUL  AUG  SEP  OCT  NOV  DEC***
    1    7  .02  .03  .03  .04  .05  .08  .12  .15  .12  .05  .03  .01
  END MON-INTERCEP
Details
Symbol


Fortran
name ( s }
CEPSCM(12)

Format Def
12F5.0 0.0
0.0

Min
0.0
0.0

Max
10.
250.

Units
in
nun

Unit
system
Engl
Metric
Explanation

Only required if VCSFG in Table-type PWAT-PARM1 is  1.
                                      403
                                                                    RELEASE  8.0

-------
                                                  PERLND — Section PWATER input

4.4(1).4.6  Table-type MON-UZSN — Monthly upper zone storage
         12345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901234567890
*******
Layout
******

  MON-UZSN
  <-range><	mon-uzsn-
  (repeats until all operations of this type are covered)

  END MON-UZSN
*******
Example
*******

  MON-UZSN
      Upper zone storage at start of each month                   ***
    # -  #  JAN  FEE  MAR  \PR  MAY  JUN  JUL  AUG   SEP  OCT   NOV  DEC ***
    1    7  .30  .35  .30  .45  .56  .57  .45  .67   .64   .54   .56  .40
  END MON-UZSN
Details
Symbol


Fortran
name ( s )
UZSNM(12)

Format Def
1 2F5 . 0 none
none

Min
.01
.25

Max
10.
250.

Units
in
mm

Unit
system
Engl
Metric
Explanation

This  table is  only  required  if VUZFG in  Table-type PWAT-PARM1  is 1.
                                       404                            RELEASE 8.0

-------
                                                  PERLND — Section PWATER input

4.4(1).4.7  Table-type MON-MANNING — Monthly Manning's n values
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
******4
Layout
******
  MON-MANNING
  <-range><—
            	mon-Manning	

(repeats until all operations of this type are covered)

END MON-MANNING
*******
Example
*******
  MON-MANNING
      Manning's n at start of each month                          ***
    # -  #  JAN  FEE  MAR  APR  MAY  JUN  JUL  AUG  SEP  OCT  NOV  DEC  ***
    1    7  .23  .34  .34  .35  .28  .35  .37  .35  .28  .29  .30  .30
  END MON-MANNING
Details

Symbol
             Fortran
             name(s)
Format  Def
Min     Max   Units   Unit
                      system
  NSURM(12)
                            12F5.0  .10     .001    1.0   complex Both
Explanation

This table is only required if VNNFG in Table-type PWAT-PARM1 is  1.
                                      405
                                                                      RELEASE 8.0

-------
                                                  PERLND — Section PWATER input

4.4(1).4.8  Table-type MON-INTERFLW — monthly interflow inflow parameters
         12345678
123456789012345678901 2345678901 2345678901 234567890123456789012345678901234567890
*******
Layout
******

  MON-INTERFLW
  <-range><	mon-interf Iw-
  (repeats until all operations of this type are covered)

  END MON-INTERFLW
*******
Example
*******

  MON-INTERFLW
      Interflow inflow parameter  for  start  of  each  month          ***
    # -  #  JAN  FEB  MAR  APR  MAY  JUN  JUL  AUG   SEP   OCT  NOV  DEC  ***
    1    7  2.0  3.3  3.6  3.8  4.2  5.6  5.6  7.6   7.5   5.6  4.6  3.4
  END MON-INTERFLW
Details
Symbol


Fortran
name ( s )
INTFWM(12)

Format Def Min Max Units Unit
system
12F5.0 none 0.0 none none Both
 Explanation

 This  table is  only required  if  VIFWFG in Table-type PWAT-PARM1  is 1.
                                       406                            RELEASE 8.0

-------
                                                  PERLND — Section PWATER input

4.4(1).4.9  Table-type MON-IRC — Monthly interflow recession constants
         1          2345678
12345678901234567890123456789012345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
******
  MON-IRC
  <-range><
            	mon-irc	

(repeats until all operations of this type are covered)

END MON-IRC
*******
Example
*******
  MON-IRC
      Interflow recession constant at start of each month       ***
    # -  #  JAN  FEB  MAR  APR  MAY  JON  JOL  AUG  SEP  OCT  NOV  DEC***
    1    7  .35  .40  .40  .40  .40  .43  .45  .45  .50  .45  .45  .40
  END MON-IRC
Details
Symbol


Fortran
name ( s )
IRCM(12)

Format Def Min Max Units Unit
system
12F5.0 none 1 .OE-30 1.0 /day Both
Explanation

This table is only required if VIRCFG in Table-type PWAT-PARM1 is  1.
                                      407
                                                                      RELEASE  8.0

-------
                                                  PERLND — Section PWATER input


4.4(1).4.10  Table-type MON-LZETPARM — Monthly lower zone E-T parameter
         12345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901 234567890
*******

Layout
******
  MON-LZETPARM
  <-range><	
            	mon-lzetparm	


(repeats until all operations of this type are covered)


END MON-LZETPARM
*******
Example
*******


  MON-LZETPARM
      Lower zone evapotransp   parm at start  of  each month       ***
    # -  #  JAN  FEB  MAR  APR  MAY  JUN  JUL  AUG   SEP  OCT  NOV  DEC***
    1    7  .30  .30  .35  .35  .40  .40  .45   .45   .45  .45  .42  .38
  END MON-LZETPARM
Details
Symbol


Fortran
name ( s )
LZETPM(12)

Format Def Min Max Units Unit
system
12F5.0 0.0 0.0 1.0 none Both
 Explanation

 This  table is  only required  if  VLEFG in Table-type PWAT-PARM1  is 1.
                                       408
                                                                    RELEASE 8.0

-------
                                                  PERLND — Section PWATER  input

4.4(1).4.11   Table-type PWAT-STATE1 — PWATER state variables
         12345678
123456789012345678901 2345678901 2345678901 234567890123456789012345678901234567890
*******
Layout
******
  PWAT-STATE1
  <-range><—
            	pwat-statel	


(repeats until all operations of this type are covered)

END PWAT-STATE1
*******
Example
*******
  PWAT-STATE1
      PWATER state variables***
# - #***
1 7
CEPS
0.05
SURS UZS
0.10 0.25
IFWS
0.01
LZS
8.2
AGWS
2.0
GWVS
.025
END PWAT-STATE1
Details
Symbol








Fortran
name ( s )
CEPS
SURS
UZS
IFWS
LZS
AGWS
GWVS

Format Def
7F10.0 0.0
0.0
0.0
0.0
.001
.025
0.0
0.0
.001
.025
0.0
0.0
0.0
0.0

Min
0.0
0.0
0.0
0.0
.001
.025
0.0
0.0
.001
.025
0.0
0.0
0.0
0.0

Max
100
2500
100
2500
100
2500
100
2500
100
2500
100
2500
100
2500

Units
inches
mm
inches
mm
inches
mm
inches
mm
inches
mm
inches
mm
inches
mm

Unit
system
Engl
Metric
Engl
Metric
Engl
Metric
Engl
Metric
Engl
Metric
Engl
Metric
Engl
Metric
                                      409
                                                                      RELEASE 8.0

-------
                                                  PERLND — Section PWATER input

Explanation

This table is used to specify the initial water storages.

CEPS is the interception storage.
SURS is the surface (overland flow) storage.
UZS is the upper zone storage.
IFWS is the interflow storage.
LZS is the lower zone storage.
AGWS is the active groundwater storage.
GWVS is the  index to groundwater slope;   it is a measure  of antecedent active
groundwater inflow.

If NBLKS > 1, values in SURS,  UZS,  and IFWS fields are not  processed,  because
these  quantities  are computed  by  averaging  values in   several  PWAT-BLKSTAT
tables.


4.4(1).4.12  Table-type PWAT-BLKSTAT — Block-specific storages
         12345678
1234567890123456789012345678901234567890123456789012345678901 2345678901234567890
*******
Layout
******

  PWAT-BLKSTAT
  <-range><	pwat-blkstat	>
   (repeats until all operations  of  this  type  are covered)

   END PWAT-BLKSTAT

 *******
 Example
 *******

   PWAT-BLKSTAT
        Storages in  Block 2***
     # -   #      SURSB       UZSB     IFWSB***
     1     7       0.02       0.22      0.01
   END PWAT-BLKSTAT
                                       410                            RELEASE 8.0

-------
                                                  PERLND  —  Section  PWATER input
Details
Symbol Fortran Format Def
name ( s )
 SURSB 3F10.0 0.0
0.0
UZSB 0.0
0.0
IFWSB 0.0
0.0

Min

0.0
0.0
0.001
0.025
0.0
0.0

Max

100
2500
100
2500
100
2500

Units

inches
mm
inches
mm
inches
mm

Unit
system
Engl
Metric
Engl
Metric
Engl
Metric
Explanation

If a PLS  is subdivided into blocks   (NBLKS  >  1),   certain   initial storages are
specified individually for each of the blocks.    This  table  is repeated for each
block.

SURSB is the surface storage.
UZSB is the upper zone storage.
IFWSB is the interflow storage.

4.4(1).5  PERLND BLOCK — Section SEDMNT  input
         1          2345678
1234567890123456789012345678901 234567890123456789012345678901 2345678901234567890
*******
Layout
******
 [Table-
  Table-
  Table-
 [Table-
 (Table-
 [Table-
type SED-
type SED-
type SED-
type MON-
type MON-
type SED-
•PARM1 ]
•PARM2
•PARM3
•COVER]
•NVSI]
•STOR]
Tables in brackets  [1 are
not always required.
Explanation

The  exact format  of each   of  the
documentation which follows.
                            tables mentioned   above  is   detailed in  the
                                       411
                                                                      RELEASE 8.0

-------
                                                  PERLND — Section SEDMNT input

1.4(1).5.1   Table-type SED-PARM1  — First group of SEDMNT parms
         12345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901234567890
*******
Layout
******

  SED-PARM1
  <-range><—sed-parml—>
  (repeats until all operations of this type are covered)

  END SED-PARM1
*******
Example
*******
  SED-PARM1
    ***
    # -  #  CRV VSIV SDOP***
    17010
  END SED-PARM1
Details
Symbol





Fortran
name ( s )
CRVFG
VSIVFG
SDOPFG

Format Def

315 0
0
0

Min

0
0
0

Max

1
1
1
Explanation

If CRVFG  is  1,   erosion-related  cover  may vary throughout the year.   Values are
supplied  in  Table-type  MON-COVER.

If VSIVFG is 1,   the  rate  of  net vertical sediment input may vary throughout the
year.   Values are supplied in Table-type MON-NVSI.

If SDOPFG is 1,  removal of sediment from the land surface will be simulated with
the  algorithm used in  the ARM and NPS models.   If it is  0,  the new algorithm
will be used.
                                       412
RELEASE 8.0

-------
                                                  P1RLND — Section SEDMNT input

4.4(1),S.2  Table-type SED-PARM2 — Second group of SEDMNT parms
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
Layout
******
SED-PARM2

(repeats until all operations of this type are covered)
END SED-PARM2
*******
Example
*******
SED-PARM2
***
# - # SMPF KRER JRER AFFIX COVER
1 7 0.9 0,08 1.90 0.01 0.5
END SED-PARM2
*************************************************************
Details
Symbol Fortran Format Def Min Max
name ( s )
 SMPF 6F10.0 1.0 0.001 1.0
KRER 0.0 0.0 none
JRER none none none
AFFIX 0.0 0.0 1.0
COVER 0.0 0.0 1.0
NVSI 0.0 none none

0.0 none none












NVSI***
-0.100

*******************

Units Unit
system
none Both
complex Both
complex Both
/day Both
none Both
Ib Engl
/ac.day
kg Metric
/ha. day
                                      413
RELEASE 8.0

-------
                                                  PERLND — Section SEDMNT input

Explanation

SMPF is a "supporting  management practice factor."  It is used  to simulate the
reduction in erosion achieved by use of erosion control practices.

KRER is the coefficient in the soil detachment equation.
JRER is the exponent in the soil detachment equation.
AFFIX is the fraction by which detached sediment storage decreases each day,  as
a result of soil compaction.
COVER is the fraction of land surface which is shielded from erosion by rainfall
(not considering snow cover, which can be handled by simulation).
NVSI is the rate at which sediment  enters detached storage from the atmosphere.
A negative value can be supplied (e.g., to simulate removal by human activity or
wind).

If monthly values  for COVER and NVSI  are being supplied,  values  supplied for
these variables in this table are not relevant.
                                       414                            RELEASE 8.0

-------
                                                  PERLND — Section SEDMNT input

4.4(1).5.3  Table-type SED-PARM3 — Third group of SEDMNT parms
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  SED-PARM3
  <-range><	sed-parm3	>

  (repeats until all operations of this type are covered)

  END SED-PARM3

*******
Example
*******
  SED-PARM3
    ***
    f -  #      KSER
    1    7      0.08
  END SED-PARM3
JSER
 1.7
KGER
0.06
JGER***
 1 .4
Details
Symbol






Fortran
name ( s }
KSER
JSER
KGER
JGER

Format Def

4F10.0 0.0
none
0.0
none

Min

0.0
none
0.0
none

Max

none
none
none
none

Units

complex
complex
complex
complex

Unit
system
Both
Both
Both
Both
Explanation

KSER and JSER are the coefficient and  exponent in  the detached  sediment washoff
equation.
KGER and JGER are the coefficient and exponent in the matrix  soil  scour  equation
(simulates gully erosion, etc.).
                                      415
                                                                     RELEASE  8.0

-------
                                                  PERLND — Section SEDMNT input

4.4(1).5.4  Table-type MON-COVER — Monthly erosion related cover values
         1          2345678
12345678901 2345678901 2345678901 2345678901 234567890123456789012345678901234567890
*******
Layout
******
  MON-COVER
  <-range><-
            	mon-cover	

(repeats until all operations of this type are covered)

END MON-COVER
*******
Example
*******

  MON-COVER
      Monthly values for erosion related cover ***
    # -  #  JAN  FEB  MAR  APR  MAY  JUN  JUL  AUG  SEP  OCT  NOV  DEC***
    1    7  0.0  .12  .12  .24  .24  .56  .67  .56  .34  .34  .23  .12
  END MON-COVER
Details

Symbol
               Fortran
               name ( s )
                            Format  Def     Min     Max     Units   Unit
                                                                    system
    COVERM(12)     12F5.0  0.0     0.0      1.0      none     Both



Explanation

This table is only required if CRVFG  in Table-type  SED-PARM1  is  1.
                                       416
                                                                    RELEASE 8.0

-------
                                                  PERLND — Section SEDMNT input

4.4(1).5,5  Table-type MON-NVSI — Monthly net vertical sediment input
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  MON-NVSI
  <-range><	mon-nvsi	—	>

  (repeats until all operations of this type are covered)

  END MON-NVSI

*******
Example
*******

  MON-NSVI
      Monthly net vertical sediment input***
    # -  #  JAN  FEE  MAR  APR  MAY  JUN  JUL  AUG  SEP  OCT  NOV  DEC***
    1    7 -.01 -.02 -.03 -.04 -.05 -.03 -.02 -.01  0.0  .01  .03  .01
  END MON-NVSI
Details
Symbol






Fortran
name ( s 5
NVSIMU2)




Format Def Min Max Units

12F5.0 0,0 none none lb/
ac.day
0,0 none none kg/
ha . day

Unit
system
Engl

Metric

Explanation

This table is only required if VSIVFG in Table-type SED-PARM1  is  1.
                                      417
                                                                      RELEASE 8.0

-------
                                                  PERLND — Section SEDMNT input

4.4(1).5.6  Table-type SED-STOR — Detached sediment storage
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  SED-STOR
  <-range><	sed-stor	>

  (repeats until all operations of this type are covered)

  END SED-STOR

*******
Example
*******
  SED-STOR
      Detached sediment storage  (tons/acre)
    # -  #    Blockl    Block2    Block3    Block4
    1    7       0.2       1.5       4.0       9.0
  END SED-STOR
***
***
Details
Symbol Fortran
name ( s )
< sed-stor > DETSB(5)



Format Def Min Max Units

5F10.0 0.0 0.0 none tons/ac
0.0 0.0 none tonnes
/ha

Unit
system
Engl
Metric

Explanation

DETSB is the  initial  storage of detached   sediment.    The system expects a value
for each block of  the PLS  (i.e., NBLKS  values),  starting with Block no.  1.
                                       418
                      E 8.0

-------
                                                  PERLND — Section PSTEMP  input
4.4(1).6  PERLND BLOCK — Section PSTEMP input
         12345678
12345678901234567890123456789012345678901 2345678901 23456789012345678901234567890
*******
Layout
 [Table-type PSTEMP-PARM1]
  Table-type PSTEMP-PARM2
 [Table-type MON-ASLT]
 [Table-type MON-BSLT]
 [Table-type MON-ULTP1]
 [Table-type MON-ULTP2]
 [Table-type MON-LGTP1]
 [Table-type MON-LGTP2]
 [Table-type PSTEMP-TEMPS]
    Tables in brackets []
    not always requried
are
Explanation

The  exact format  of each  of the
documentation which follows.
tables mentioned  above is  detailed in  the
                                       419
                                                                      RELEASE 8.0

-------
                                                  PERLND — Section PSTEMP  input

4.4(1).6.1   Table-type PSTEMP-PARM1 — Flags for section PSTEMP
         12345678
1234567890123456789012345678901 2345678901 234567890123456789012345678901 234567890
*******
Layout
******

  PSTEMP-PARM1
  <-range><	pstemp-parm!	>
  (repeats until all operations of this type are covered)

  END PSTEMP-PARM1
*******
Example
*******
  PSTEMP-PARM1
      Flags for section PSTEMP***
    # -  # SLTV ULTV LGTV TSOP***
    1    70001
  END PSTEMP-PARM1
Details
Symbol






Fortran
name ( s )
SLTVFG
ULTVFG
LGTVFG
TSOPFG

Format Def

415 0
0
0
0

Min

0
0
0
0

Max

1
1
1
1
                                       420
RELEASE 8.0

-------
                                                  PERLND — Section PSTEMP input

Explanation

If SLTVFG  is 1,   parameters for  estimating surface layer temperature  can  vary
throughout the year.  Thus, Table-types MON-ASLT and MON-BSLT will be expected.

ULTVFG serves the same purpose for upper layer temperature calculations.  Table-
types MON-ULTP1  and MON-ULTP2  will be expected of ULTVFG is  1.   LGTVFG serves
the same  purpose for the lower  layer and active groundwater   layer temperature
calculations.  Table-types MON-LGTP1 and MON-LGTP2 will be expected if LGTVFG  is
1 .

TSOPFG governs the methods used to estimate subsurface soil temperatures.  If  it
is 0,  they are computed using a  mean departure from air temperature,  together
with  smoothing factors.    If TSOPFG  is 1,   upper layer  soil  temperature  is
estimated by  regression on  air temperature   (like surface  temperature).   The
lower layer/groundwater  layer temperature is  supplied  directly  by the  user  (a
different value may be specified for each month).



4.4(1).6.2  Table-type PSTEMP-PARM2 — Second  group of PSTEMP parms



         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
Layout
******
  PSTEMP-PARM2
  <-range><	pstemp-parm2-
   (repeats until all operations of this type are  covered)

   END PSTEMP-PARM2
*******
Example
*******

  PSTEMP-PARM2
    ***
    # -  #      ASLT      BSLT     ULTP1      ULTP2      LGTP1      LGTP2***
    1    7       24.         .5       24.         .5        40.        0.0
  END PSTEMP-PARM2
                                       421                             RELEASE 8.0

-------
                                                  PERLND — Section PSTEMP  input
Details
Symbol Fortran Format Def
name ( s )
 ASLT 6F10.0 32.
0.
BSLT 1 . 0
1 .0

Min
0.0
-18.
0.001
0.001

Max
100.
38.
2.0
2.0

Units Unit
system
deg F Engl
deg C Metric
deg F/F Engl
deg C/C Metric
Definition of remaining quantities depends on soil temp option  flag
(TSOPFG in Table-type PSTEMP-PARM1)
TSOPFG=0:
TSOPFG=1
ULTP1

ULTP2


LGTP1

LGTP2




ULTP1


ULTP2


LGTP1


LGTP2
                                      none
                                      none
                                      none
                                      none
                                      none
                                      none
                                              none
none
none
                                              none
none
none
none

none
none

none

none
none
none

F deg
C deg

none

F deg
C deg
Both

Engl
Metric

Both

Engl
Metric
none
none
none
none
none
none
none
none
none
none
none
none
none
none
none
none
none
none
Deg F
Deg C
Deg F/F
Deg C/C
Deg F
Deg C
Engl
Metric
Engl
Metric
Engl
Metric
                                       not  used
Explanation

ASLT is the  surface  layer  temperature,   when the  air temperature is 32 degrees F
(0 degrees C).    It  is  the intercept  of  the  surface layer temperature regression
equation.     BSLT is the   slope  of   the  surface  layer temperature  regression
equation.

If TSOPFG =  0 then:
ULTP1  is the smoothing  factor  in  upper  layer temperature calculation.   ULTP2 is
the mean  difference between upper  layer  soil temperature and  air temperature.
LGTP1  and   LGTP2 are   the smoothing    factor  and  mean  departure  from  air
temperature,  for  calculating lower  layer/groundwater soil temperature.
                                       422
                                                       RELEASE 8.0

-------
                                                  PERLND — Section PSTEMP input

If TSOPFG = 1  then:
ULTP1  and ULTP2 are the intercept and  slope in the upper layer soil temperature
regression equation (like ASLT  and BSLT for the surface layer).    LGTP1 is  the
lower layer/groundwater layer soil temperature.  LGTP2 is not used.

If monthly values are being supplied for  any of these quantities  (in Table-type
MON-XXX), the value appearing in this table is not relevant.
4.4(1).6.3  Table- type MON-ASLT — Monthly values for ASLT
         1         2345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901 234567890

Layout
******

  MON-ASLT
  <-range><	mon-aslt	>

  (repeats until all operations of  this  type  are  covered)

  END MON-ASLT

*******
Example
*******

  MON-ASLT
      Value of ASLT at start  of  each  month  (deg F)***
    # -  #  JAN  FEE  MAR  APR  MAY JUN JUL  AUG  SEP   OCT  NOV  DEC***
    1    7  37.  38.  39.  40.  41.  42. 43.  44.  45.   44.  41.  40.
  END MON-ASLT
Details
Symbol


Fortran
name ( s )
ASLTM(12)

Format Def
12F5.0 32.
0.

Min Max
0. 100.
-18. 38.

Units
deg F
deg C

Unit
system
Engl
Metric
Explanation

This  table is only required  if  SLTVFG  in  Table-type  PSTEMP-PARM1  is 1.
                                       423
                                                                      RELEASE 8.0

-------
                                                  PERLND — Section PSTEMP input

4.4(1).6.4  Table-type MON-BSLT — Monthly values for BSLT
         12345678
1234567890123456789012345678901 2345678901 2345678901 23456789012345678901 234567890
*******
Layout
******
  MON-BSLT
  <-range><
              	mon-bslt	

  (repeats until all operations of this type are covered)

  END MON-BSLT

*******
Example
*******
  MON-BSLT
      Value of BSLT at start of each month  (deg  F/F)***
    # -  #  JAN  FEE  MAR  APR  MAY  JUN  JUL  AUG   SEP   OCT   NOV  DEC***
    1    7   .3   .3    .3   .4    .4   .5   .5   .5    .4    .4    .4   .3
  END MON-BSLT
Details
Symbol


Fortran
name ( s )
BSLTM(12)

Format Def
12F5.0 1.0
1.0

Min
0.001
0.001

Max
2.0
2.0

Units Unit
system
deg F/F Engl
deg C/C Metric
Explanation

This table is only required  if  SLTVFG in Table-type PSTEMP-PARM1  is 1.
                                       424
                                                                      RELEASE 8.0

-------
                                                  PERLND — Section PSTEMP  input

4.4{1).6.5  Table-type MON-ULTP1 Monthly values for ULTP1
         12345678
12345678901234567890123456789012345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
******

  MON-ULTP1
  <-range><	mon-ultp1-
  (repeats until all operations of this type are covered)

  END MON-ULTP1
*******
Example
*******
  MON-ULTP1
      Value of ULTP1 at start of each month  (TSOPFG=1)           ***
    # ~  #  JAN  FEB  MAR  APR  MAY  JUN  JUL  AUG   SEP  OCT   NOV  DEC***
    1    7  37.  38.  39.  40.  42.  44.  47.  44.   42.  39.   39.  39.
  END MON-ULTP1
Details
Symbol


Fortran
name { s )
ULTP1M{12)

Format Def Min Max
12F5.0 see notes for Table-type PSTEMP-PARM2
Explanation

This table is only required if ULTVPG in Table-type  PSTEMP-PARM1  is 1.
                                      425                             RELEASE 8.0

-------
                                                  PERLND — Section PSTEMP  input

4.4(1).6.6  Table-type MON-ULTP2 — Monthly values for ULTP2
         12345678
1 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
******
  MON-ULTP2
  <-range><
            	mon-ultp2	

(repeats until all operations of this type are covered)

END MON-ULTP2
*******
Example
*******

  MON-ULTP2
      Value of ULTP2 at  start of each  month (TSOPFG=1)           ***
    # -  #  JAN  FEE  MAR  APR MAY  JUN  JUL   AUG  SEP   OCT   NOV  DEC***
    1    7    .3   .3    .4    .5   .5    .5    .6    .6   .5    .4    .4   .3
  END MON-ULTP2
Details
Symbol


Fortran
name ( s )
ULTP2M(12)

Format Def Min Max
12F5.0 see notes for Table-type PSTEMP-PARM2
Explanation

This  table is  only required  if ULTVFG in Table-type PSTEMP-PARM1 is 1.
                                     426
                                                                      RELEASE 8.0

-------
                                                  PERLND — Section  PSTEMP input

4.4(1).6.7  Table-type MON-LGTP1 — Mdnthly values for LGTP1
         12345678
123456789012345678901234567890123456789012345678901 2345678901 2345678901234567890
*******
Layout
******

  MON-LGTP1
  <-range><	mon-lgtp1-
  (repeats until all operations of this type  are  covered)

  END MON-LGTP1
*******
Example
*******

  MON-LGTP1
      Value of LGTP1 at  start  of  each  month (TSQPFG=1)           ***
    # -  #  JAN  FEE  MAR  APR MAY  JUN  JUL   AUG  SEP  OCT   NOV  DEC***
    1    7  35.  38.  41.  43.  51.  45.  46.   45.  39.  37.   35.  35.
  END MON-LGTP1
Details
Symbol


Fortran
name { s )
LGTP1M(12)

Format Def Min Max
12F5.0 see notes for Table-type PSTEMP-PARM2
Explanation

This table is only required  if LGTVFG in Table-type PSTEMP-PARM1  is 1.
                                       427                             RELEASE 8.0

-------
                                                  PERLND — Section PSTEMP input

4.4(1).6.8  Table-type MON-LGTP2 — Monthly values for LGTP2
         1          2345678
1234567890123456789012345678901 2345678901 234567890123456789012345678901234567890
*******
Layout
******
  MON-LGTP2
  <-range><
            	mon-lgtp2	

(repeats until all operations of this type are covered)

END MON-LGTP2
*******
Example
*******

  MON-LGTP2
      Value for LGTP2 at start of each month  (F deg)  (TSOPFG=0) ***
    # -  #  JAN  FEB  MAR  APR  MAY  JUN  JUL  AUG  SEP  OCT  NOV  DEC***
    1    7  2.0  2.0  2.0  2.0  1.0  1.0  1.0  0.0  0.0  0.0  1.0  2.0
  END MON-LGTP2
Details
Symbol


Fortran
name ( s )
LGTP2MO2)

Format Def Min Max
12F5.0 none none none
none none none

Units
F deg
C deg

Unit
system
Engl
Metric
 Explanation

 This  table is only required if LGTVFG  in Table-type  PSTEMP-PARM1  is  1  and TSOPFG
 is  0.
                                       428
                                                                    RELEASE 8.0

-------
                                                  PERLND — Section PSTEMP input

4.4(15.6.9  Table-type PSTEMP-TEMPS — Initial temperatures
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  PSTEMP-TEMPS
  <-range><	ps temp-temps	>

  (repeats until all operations of this type are covered)

  END PSTEMP-TEMPS

*******
Example
*******
  PSTEMP-TEMPS
      Initial temperatures***
    f -  #     AIRTC     SLTMP     DLTMP
    1    7       48.       48,       48.
  HMD PSTEMP-TEMPS
LGTMP***
  48.
Details
Symbol

< ps temp- temps >








Fortran
name ( s )
AIRTC

SLTMP

OLTMP

LSTMP


Format Def

4F10.0 60.
16.
60.
16.
60.
16.
60.
16.

Min

-20.
-29.
-20.
-29.
-20.
-29.
-20.
-29.

Max

120.
49.
120.
49.
120.
49.
120.
49.

Units

deg F
deg C
deg F
deg C
deg F
deg C
deg F
deg C

Unit
system
Engl
Metric
Engl
Metric
Engl
Metric
Engl
Metric
Explanation

These are  the initial  temperatures:
  AIRTC -  air temperature
  SLTMP -  surface  layer  soil  temperature
  ULTMP -  upper  layer  soil  temperature
  LGTMP -  lower  layer/groundwater  layer soil  temperature
                                       429
                        RELEASE 8.0

-------
                                                  PERLND — Section PWTGAS  input
4.4(1).7  PERLND BLOCK — Section PWTGAS input
         12345678
12345678901234567890123456789012345678901 234567890123456789012345678901234567890
Layout
******

 [Table-type PWT-PARM1]
 [Table-type PWT-PARM2]
 [Table-type MON-IFWDOX]
 [Table-type MON-IFWCO2]
 [Table-type MON-GRNDDOX]
 [Table-type MON-GRNDCO2]
 [Table-type PWT-TEMPS]
 [Table-type PWT-GASES]
Tables in brackets
always required
[]  are not
Explanation

The  exact format  of each  of  the   tables mentioned   above is  detailed in  the
documentation which follows.
                                       430
                             RELEASE 8.0

-------
                                                  PERLND — Section PWTGAS  input

4.4(1).7.1  Table-type PWT-PARM1 — Flags for section PWTGAS
         1          2345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
******

  PWT-PARM1
  <-range><	pwt-parm1 •
  (repeats until all operations of this type are  covered)

  END PWT-PARM1

*******
Example
*******

  PWT-PARM1
      Flags for section PWTGAS***
    # -  #  IDV  ICV  GDV  GVC***
    170010
  END PWT-PARM1
Details
Symbol





Fortran
name ( s )
IDVFG
ICVFG
GDVFG
GCVFG
Format Def

415 0
0
0
0
Min

0
0
0
0
Max

1
1
1
1
Explanation

These  flags each  indicate  whether   or  not  a  parameter  is allowed  to  vary
throughout the year and,  thus, whether or not the corresponding table of monthly
values will be expected:
FLAG    PARAMETER

IDVFG   Interflow DO  concentration
ICVFG   Interflow CO2 concentration
TABLE-TYPE FOR MONTHLY VALUES

MON-IFWDOX
MON-IFWCO2
GDVFG   Groundwater DO concentration    MON-GRNDDOX
GCVFG   Groundwater CO2  concentration   MON-GRNDCO2
                                       431
                                                                      RELEASE 8.0

-------
                                                  PEKLND — Section PWTGAS input

4.4(1).7.2  Table-type PWT-PARM2 — Second group of PWTGAS parms
         12345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
******
  PWT-PARM2
  <-range><-
-pwt-parm2-
  (rep€;ats until all operations of this type are covered)

  END PWT-PARM2
*******

Example
****** it
PWT-PARM2
    Second group of PWTGAS parms***
  # -  #      ELEV     IDOXP     IC02P
  1    7     1281.       8.2      0.2
END PWT-PARM2
                                             ADOXP
                                               8.2
                            AC02P***
                             0.3
Details
Svmbol




Fortran
name ( s )
ELEV


Format Def

5F10.0 0.0
0.0

Min

-1000.
-300.

Max

30000.
9100.

Units

ft
m

Unit
system
Engl
Metric
IDOXP
IC02P
ADOXP
ACO2P
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
20.
1 .0
20.
1 .0
mg/1
mg C/l
mg/1
mg C/l
Both
Both
Both
Both
 Explanation

 ELEV  is  the  elevation  of  the  PLS  above  sea level (used to adjust saturation
 concentrations  of  dissolved gasses  in surface outflow).

 IDOXP is the concentration of dissolved oxygen in interflow outflow.
 ICO2P is the concentration of dissolved CO2 in interflow outflow.
 ADOXP is the concentration of dissolved oxygen in active groundwater outflow.
 ACO2P is the concentration of dissolved CO2 in active groundwater outflow.
                                       432
                                           RELEASE 8.0

-------
                                                  PERLND — Section PWTGAS input

4.4(1).7.3  Table-type MON-IFWDOX — Monthly interflow DO concentration
         12345678
1 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 234567890

Layout
  MON-IFWDOX
  <-range>< ---------------- mon-ifwdox -------------------------------- >

  (repeats until all operations of this type are covered)

  END MON-IFWDOX

*******
Example
*******

  MON-IFWDOX
      Value at start of each month for interflow DO concentration***
    # -  #  JAN  FEE  MAR  APR  MAY  JUN  JUL  AUG  SEP  OCT  NOV  DEC***
    1    7  4.5  4.7  5.7  6.5  7.6  7.6  7.4  6.3  4.3  5.3  4.3  3.5
  END MON-IFWDOX
Details
Symbol


Fortran
name ( s )
IDOXPM(12)

Format Def Min Max Units
12F5.0 0.0 0.0 20.0 mg/1

Unit
system
Both
Explanation

This table is only required if IDVFG in Table-type PWT-PARM1 is  1.
                                      433
                                                                     RELEASE  8.0

-------
                                                  PERLND — Section PWTGAS input

4.4(1).7.4  Table-type MON-IFWCO2 — Monthly interflow CO2 concentration
         1          2345678
1 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 234567890

Layout
******

  MON-IFWCO2
  <-range>< --------------- mon-ifwco2
  (repeats until all operations of this type are covered)

  END MON-IFWCO2
*******
Example
*******

  MON-IFWCO2
      Value at start of each month for interflow CO2 concentration***
    # -  #  JAN  FEB  MAR  APR  MAY  JUN  JUL  AUG  SEP  OCT  NOV  DEC***
    1    7  .123 .171 .142 .145 .157  .178 .122  .123  .143  .145  .176  .145
  END MON-IFWCO2
Details
Symbol


Fortran
name ( s )
ICO2PM(12)

Format Def Min Max Units Unit
system
12F5.0 0.0 0.0 1.0 mg C/l Both
Explanation

This  table is only required if  ICVFG  in  Table-type PWT-PARM1  is 1
                                       434                            RELEASE 8.0

-------
                                                  PERLND — Section PWTGAS input

4.4(1).7.5  Table-type MON-GRNDDOX — Monthly groundwater DO concentration
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  MON-GRNDDOX
  <-range><	mon-grnddox-
  (repeats until all operations of this type are covered)

  END MON-GRNDDOX
*******
Example
*******

  MON-GRNDDOX
      Value at start of each month for groundwater  DO  concentration***
    # -  #  JAN  FEB  MAR  APR  MAY  JUN  JUL  AUG   SEP   OCT  NOV  DEC***
    1    7  4.5  4.7  4.9  4.9  4.9  4.9  5.0  5.6   5.7   5.8  5.4  5.1
  END MON-GRNDDOX
Details
Symbol


Fortran
name ( s )
ADOXPMO2)

Format Def Min Max Units Unit
system
12F5.0 0.0 0.0 20.0 mg/1 Both
Explanation

This table is only required if GDVFG  in Table-type  PWT-PARM1  is 1.
                                       435                             xELEASE 8.0

-------
                                                  PERLND — Section PWTGAS input

4.4(1).7.6  Table-type MON-GRNDCO2 — Monthly groundwater CO2 concentration
         1          2345678
1234567890123456789012345678901 2345678901234567890123456789012345678901234567890
*******
Layout
******
  MON-GRNDCO2
  <-range><—
            	mon-grndco2	

(repeats until all operations of this type are covered)

END MON-GRNDCO2
*******
Example
*******

  MON-GRNDC02
      Value at start of each month for groundwater CO2 concentration***
    # -  #  JAN  FEE  MAR  APR  MAY  JUN  JUL  AUG  SEP  OCT  NOV  DEC***
    1    7  .23  .22  .22  .23  .24  .25  .24  .23  .22  .22  .22  .22
  END MON-GRNDCO2
Details

Symbol
             Fortran
             name(s)
Format  Def     Min     Max     Units   Unit
                                        system
  AC02PM(12)     12F5.0  0.0     0.0      1.0     mg C/l   Both



Explanation

This table is only required if GCVFG in Table-type PWT-PARM1  is  1.
                                       436
                                                                    RELEASE 8.0

-------
                                                  PERLND — Section PWTGAS input

4.4(1).7.7  Table-type PWT-TEMPS — Initial water temperatures
         1          2345678
12345678901234567890123456789012345678901 234567890123456789012345678901234567890
*******
Layout
******

  PWT-TEMPS
  <-range><	pwt-temps-
  (repeats until all operations of this type are covered)

  END PWT-TEMPS
*******
Example
*******
  PWT-TEMPS
        Initial water temperatures***
    # -  #     SOTMP     IOTMP     AOTMP***
    1    7       47.       47.       53.
  END PWT-TEMPS
Details
Symbol




Fortran
name ( s )
SOTMP
IOTMP
AOTMP

Format Def
3F10.0 60.
16.
60.
16.
60.
16.

Min
32.
0.
32.
0.
32.
0.

Max
100.
38.
100.
38.
100.
38.

Units
deg F
deg C
deg F
deg C
deg F
deg C

Unit
system
Engl
Metric
Engl
Metric
Engl
Metric
Explanation

These are the initial water temperatures:
  SOTMP is surface outflow temperature.
  IOTMP is interflow outflow  temperature.
  AOTMP is active groundwater outflow  temperature.
                                       437
                                                                      RELEASE 8.0

-------
                                                  PERLND — Section PWTGAS input

4.4(1).7.8  Table-type PWT-GASES — Initial DO and CO2 concentrations
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
  PWT-GASES
  <-range><
            	pwt-gases	

(repeats until all operations of this type are covered)

END PWT-GASES
*******
Example
*******
  PWT-GASES
    
    # -  #     SODOX
    1    7       8.9
  END PWT-GASES
                    Initial DO and CO2 concentrations***
                       SOCO2     IODOX     IOCO2     AODOX     AOCO2***
                        .122       7.8      .132       3.5      .132
Details
Symbol








Fortran
name ( s )
SODOX
SOCO2
IODOX
IOCO2
AODOX
AOCO2

Format Def

6F10.0 0.0
0.0
0.0
0.0
0.0
0.0

Min

0.0
0.0
0.0
0.0
0.0
0.0

Max

20.
1 .0
20.
1.0
20.
1 .0

Units

mg/1
mg C/l
mg/1
mg C/l
mg/1
mg C/l

Unit
system
Both
Both
Both
Both
Both
Both
 Explanation

 These  are  the  initial  concentrations  of  dissolved  gas:
   SODOX  is DO  concentration  in  surface outflow.
   SOCO2  is CO2 concentration in surface  outflow.
   IODOX  is DO  concentration  in  interflow outflow.
   IOCO2  is CO2 concentration in interflow outflow.
   AODOX  is DO  concentration  in  active groundwater  outflow.
   AOCO2  is CO2 concentration in active groundwater outflow.
                                       438
                                                                    RELEASE 8.0

-------
                                                   PERLND — Section PQUAL input
4.4(1).8  PERLND BLOCK — Section PQUAL input
         1          2345678
123456789012345678901 2345678901 2345678901234567890123456789012345678901234567890
*******
Layout
******
 [Table-type NQUALS]

  Table-type QUAL-PROPS
 [Table-type QUAL-INPUT]
 [Table-type MON-POTFW]
 [Table-type MON-POTFS]
 [Table-type MON-ACCUM]
 [Table-type MON-SQOLIM]
 [Table-type MON-IFLW-CONC]
 [Table-type MON-GRND-CONC]
repeat for each
quality constituent
Explanation

The  exact format  of each  of the  tables mentioned  above  is  detailed  in   the
documentation which follows.

Tables enclosed in brackets []  are not always required;for  example,  because  all
the values can be defaulted.
                                      439
                                                                      RELEASE  8.0

-------
                                                   PERLND — Section PQUAL input

4.4(1).8.1   Table-type NQUALS — Total number of quality constituents simulated
         1          2345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
******

  NQUALS
  <-rangexnql>
  (repeats until all operations of this type are covered)

  END NQUALS
*******
Example
*******
  NQUALS
         ***
    # -  #NQUAL***
    1    7    8
  END NQUALS
Details
Symbol


Fortran
name ( s )
NQUAL

Format Def Min Max
15 1 1 10
Explanation

The   total  number  of  quality constitutents   simulated   in   Section  PQUAL  is
indicated in  this table.   The set of   tables  below is  repeated for each quality
constitutent   (but any  tables  not applicable  to  a given   constituent may  be
omitted).
                                       440                            RELEASE 8.0

-------
                                                   PERLND — Section PQUAL  input
4.4(1).8.2  Table-type QUAL-PROPS — Identifiers and Flags
                                     for a quality constituent
         12345678
1234567890123456789012345678901 2345678901 2345678901 23456789012345678901234567890
*******

Layout
******
  QUAL-PROPS
  <-rangex-qualid	
                          <	flags	>


  (repeats until all operations of this type are covered)


  END QUAL-PROPS

*******

Example
*******


  QUAL-PROPS
      Identifiers and Flags***
    # _  #*** qualid      QTID  QSD VPFW VPFS  QSO  VQO QIFW VIQC QAGW VAQC
    1    7       BOD        kg    0    0    0    1    1    1    0     1    1
  END QUAL-PROPS
Details
Symbol













Fortran
name ( s )
QUALID
QTYID
QSDFG
VPFWFG
VPFSFG
QSOFG
VQOFG
QIFWFG
VIQCFG
QAGWFG
VAQCFG

Format Def

3A4 none
A4 none
915 0
0
0
0
0
0
0
0
0

Min

none
none
0
0
0
0
0
0
0
0
0

Max

none
none
1
1
1
1
1
1
1
1
1
                                      441
                                                                      RELEASE 8.0

-------
                                                   PERLND — Section PQUAL input

Explanation

QUALID  is  a string  of  up  to  10  characters which  identifies  the  quality
constituent.  QTYID is a string of up to 4 characters which identifies the units
associated with this constituent (e.g., kg,  # (for coliforms)).   These are the
units refered to as "qty" in subsequent tables (eg.  Table-type QUAL-INPUT).

If QSDFG is 1 then:
  1.  This constituent is a QUALSD (sediment associated).
  2.  If VPFWFG is 1,  the washoff potency  factor may vary throughout the year.
      Table-type MON-POTFW is expected.
  3.  If VPFSFG is  1,  the scour potency  factor may vary throughout  the year.
      Table-type MON-POTFS is expected.

If QSOFG is 1 then:
  1.  This constituent is a QUALOF (directly associated with overland flow).
  2.  If VQOFG is  1 then rate of accumulation and the limiting storage of QUALOF
      may vary throughout  the year.   Table-types MON-ACCUM  and MON-SQOLIM are
      expected.

If QIFWFG is 1 then:
  1.  This constituent is a QUALIF (interflow associated).
  2.  If VIQCFG is 1 then concentration of this constituent in interflow outflow
      may vary throughout the year.  Table-type MON-IFLW-CONC is expected.

If QAGWFG is 1 then:
  1.  This constituent is a QUALGVJ (groundwater associated).
  2.  If  VAQCFG is  1  the concentration  of  this  constituent in  groundwater
      outflow  may  vary  throughout the   year.    Table-type  MON-GRND-CONC   is
      expected.
                                       442                            RELEASE 8.0

-------
                                                   PERLND — Section PQUAL input

4.4(1).8.3  Table-type QUAL-INPUT — Storage on surface and nonseasonal parms
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******

Layout
******


  QUAL-INPUT
  <-range><	qual-input-
  (repeats until all operations of this type are covered)


  END QUAL-INPUT
*******
Example
*******


  QUAL-INPUT
      Storage on surface and nonseasonal parameters***
    # -  #     SQO   POTFW   POTFS   ACQOP  SQOLIM   WSQOP     IOQC     AOQC***
    1    7    1.21    17.2     1.1    0.02     2.0     1.70     15.2     17.1
  END QUAL-INPUT
                                      443                             RELEASE 8.0

-------
                                                   PERLND — Section PQUAL input
Details
Symbol Fortran
name ( s )
 SQO

POTFW


POTFS


ACQOP



SQOLIM

WSQOP

IOQC

AOQC


Format Def
8F8.0 0.0
0.0
0.0
0.0

0.0
0.0

0.0

0.0

.000001
.000002
1 .64
41.7
0.0
0.0
0.0
0.0

Min
0.0
0.0
0.0
0.0

0.0
0.0

0.0

0.0

.000001
.000002
0.01
0.25
0.0
0.0
0.0
0.0

Max
none
none
none
none

none
none

none

none

none
none
none
none
none
none
none
none

Units Unit
system
qty/ac Engl
qty/ha Metric
qty/ton Engl
qty Metric
/tonne
qty/ton Engl
qty Metric
/tonne
qty Engl
/ac.day
qty Metric
/ha. day
qty/ac Engl
qty/ha Metric
in/hr Engl
mm/hr Metric
qty/ft3 Engl
qty/1 Metric
qty/ft3 Engl
qty/1 Metric
Explanation

The following variables are applicable only if the constituent is a QUALSD:
  1.   POTFW, the washoff potency factor.
  2.   POTFS, the scour potency factor.

A potency  factor is  the ratio  of constituent  yield to  sediment (washoff  or
scour) outflow.

The following variables are applicable only if the constituent is a QUALOF:
  1.   SQO, the initial storage of QUALOF on the surface of the PLS.
  2.   ACQOP, the rate of accumulation of QUALOF.
  3.   SQOLIM, the maximum storage of QUALOF.
  4.   WSQOP,  the rate of surface runoff which  will remove 90 percent of  stored
      QUALOF per hour.

IOQC is  the concentration of the  constituent in interflow  outflow  (meaningful
only if  this is a  QUALIF).   AOQC is the  concentration of the  constituent in
active groundwater outflow (meaningful only if this is a QUALGW).

If monthly values are being supplied for  any of these quantities,  the  value in
this table is not relevant;  instead,the system expects and uses values  supplied
in Table-type MON-XXX.
                                      444
RELEASE 8.0

-------
                                                   PERLND — Section PQUAL input

4.4(1).8.4  Table-type MON-POTPW — Monthly washoff potency factor
         1          2345678
1234567890123456789012345678901 2345678901234567890123456789012345678901234567890
*******
Layout
******
  MON-POTFW
  <-range><
            	mon-potfw	

(repeats until all operations of this type are covered)

END MON-POTFW
*******
Example
*******

  MON-POTFW
      Value at start of each month for washoff potency factor  (lb/ton)***
    # -  #  JAN  PEB  MAR  APR  MAY  JUN  JUL  AOG  SEP  OCT  NOV  DEC***
    1    7  1.2  2.4  3.6  5.8 10.2 20.2 25.2 30.8 40.2 10.1  2.5  1.7
  END MON-POTPW
Details
Symbol


Fortran
name ( s )
POTFWM(12)

Format Def
12F5.0 0.0
0.0

Min
0.0
0.0

Max Uni ts
none qty/ton
none qty
/tonne

Unit
system
Engl
Metric
Explanation

This table is only required if VPFWFG in Table-type DUAL-PROPS is  1.
                                    445
                                                                     RELEASE 8.0

-------
                                                   PERLND — Section PQUAL input

4.4(1).8.5  Table-type MON-POTFS — Monthly scour potency factor
         12345678
123456789012345678901 2345678901 2345678901 2345678901 23456789012345678901234567890
*******
Layout
******
  MON-POTFS
  <-range><
            	mon-potfs	

(repeats until all operations of this type are covered)

END MON-POTFS
*******
Example
*******

  MON-POTFS
      Value at start of each month for  scour potency  factor  (lb/ton)***
    # -  #  JAN  FEE  MAR  APR  MAY  JUN  JUL AUG   SEP  OCT   NOV   DEC***
    1    7  0.9  0.9  0.9  0.8  0.8  1.1  1.1  1.3   1.3  1.0   0.9   0.9
  END MON-POTFS
Details
Symbol


Fortran
name ( s )
POTFSM(12)

Format Def Min Max Units
12F5.0 0.0 0.0 none qty/ton
0.0 0.0 none qty
/tonne

Unit
system
Engl
Metric
 Explanation

 This  table is  only required  if  VPFSFG  in  Table-type QUAL-PROPS is 1.
                                       446
                                                                    RELEASE 8.0

-------
                                                   PERLND — Section PQUAL input

4.4(1).8,6  Table-type MON-AGCUM — Monthly accumulation rates of QUALOF
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
  MON-ACCUM
  <-range><
            	aon-accum	•	

(repeats until all operations of this type are covered)

END MON-ACCUM
*******
Example
*******

  MON-ACCUM
      Value at start of month for accum rate of QUALOF  (Ib/ac.day)***
    # -  #  JAN  FEE  MAR  APR  MAY  JUN  JUL  AUG  SEP  OCT  NOV  DEC***
    1    7  0.0  0.0 0.01 0.02 0.02 0.04 0.05 0.04 0.02  0.01  0.0  0.0
  END MON-ACCUM
Details
Symbol






Fortran
name ( s )
ACQOPM{ 1 2 )




Format Def Min Max Units

12F5.0 0.0 0.0 none qty
/ac.day
0.0 0.0 none qty
/ha. day

Unit
system
Engl

Metric

Explanation

This table is only required if VQOFG in Table-type  QUAL-PROPS  is  1.
                                       447
                                                                      RELEASE 8.0

-------
                                                   PERLND — Section PQUAL input

4.4(1).8.7  Table-type MON-SQOLIM — Monthly limiting storage of QUALOF
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
  MON-SQOLIM
  <-range><—
-mon-sqolim-
  (repeats until all operations of this type are covered)

  END MON-SQOLIM
*******

Example
*******


  MON-SQOLIM
      Value at start of month for limiting storage of  QUALOF  (lb/acre)***
    # -  #  JAN  FEE  MAR  APR  MAY  JUN  JUL  AUG  SEP  OCT NOV   DEC***
    1    7   10   12   14   18   20   25   30   26   20    13   10     7
  END MON-SQOLIM
Details
Symbol


Fortran
name ( s )
SQOLIM(12)

Format Def Min
12F5.0 none 0.01
none 0.02

Max Units
none qty/ac
none qty/ha

Unit
system
Engl
Metric
Explanation

This  table is only  required  if  VQOFG  in  Table-type  QUAL-PROPS is 1.
                                       448
                                           RELEASE 8.0

-------
                                                   PERLND — Section PQUAL input

4.4(1).8.8  Table-type MON-IFLW-CONC — Monthly cone of QUAL in interflow
         12345678
123456789012345678901 2345678901 23456789012345678901 23456789012345678901234567890
*******
Layout
******
  MON-IFLW-CONC
  <-range><	
            	mon-ifIw-conc	

(repeats until all operations of this type are covered)

END MON-IFLW-CONC
*******
Example
*******

  MON-IFLW-CONC
      Cone of QUAL in interflow outflow for each month  (Ib/ft3)***
    # -  t  JAN  FEE  MAR  APR  MAY  JUN  JUL  AUG  SEP  OCT  NOV  DEC***
    1    7.0012.0010.0005  0.0  0.0.0002 .005 .002  .001.0016.0014.0012
  END MON-IFLW-CONC
Details
Symbol
Fortran
name ( s )
IOQCM( 1 2 )
Format Def
12P5.0 0.0
0.0
Min
0.0
0.0
Max Units Unit
system
none qty/ft3 Engl
none qty/1 Metric
Explanation

This table is only required if VIQCFG in Table-type OJJAL-PRQPS  is  1.
                                      449
                                                                     RELEASE 8.0

-------
                                                   PERLND — Section PQUAL input

4.4(1).8.9  Table-type MON-GRND-CONC — Monthly cone of QUAL in groundwater
         12345678
1234567890123456789012345678901 2345678901 2345678901 23456789012345678901234567890
*******
Layout
******
  MON-GRND-CONC
  <-range><	
            	mon-grnd-conc	

(repeats until all operations of this type are covered)

END MON-GRND-CONC
*******
Example
*******

  MON-GRND-CONC
      Value at start of month for cone of QUAL in groundwater  (Ib/ft3)**
    # -  #  JAN  FEE  MAR  APR  MAY  JUN  JUL  AUG  SEP  OCT  NOV  DEC***
    1    7.0013.0014.0012.0012.0012.001 .001 .001 .0011.0012.0012.0013
  END MON-GRND-CONC
Details
Symbol
Fortran
name ( s )
AOQCM( 1 2 )
Format Def
12F5.0 0.0
0.0
Min
0.0
0.0
Max Units Unit
system
none qty/ft3 Engl
none qty/1 Metric
Explanation

This  table is  only  required  if  VAQCFG  in  Table-type  QUAL-PROPS is 1.
                                       450
                                                                    RELEASE 8.0

-------
                                                  PERLND — Section MSTLAY input
4.4(1).9  PERLND BLOCK — Section MSTLAY input
Layout;

  Table-type VUZFG
  Table-type UZSN-LZSN
  Table-type MON-UZSN if VUZFG= 1

  Table-type MST-PARM

  Table-type MST-TOPSTOR
  Table-type MST-TOPFLX

  Table-type MST-SUBSTOR
  Table-type MST-SUBFLX
if Section
PWATER is
inactive
repeat for
each block
Explanation:

The exact format  of each of the  tables mentioned above,  except  MON-UZSN,   is
detailed in the documentation which follows.    MON-UZSN is documented under  the
input for Section PWATER (4.4(1)»4).

The comments given alongside the table names above indicate:
  1.  Under which circumstances a table is expected
  2.  Sequencing information.   Note that "repeat for each block" means  that  the
      bracketed set  of tables is  repeated for each  areal source block  in  the
      pervious land-segment  (PLS).    The first set is  for block  1,  second  for
      block 2,  etc.   The number of blocks (NBLKS)  was specified in Table-type
      GEN-INFO (Sect. 4.4(1).1.3).

Note that if  all the fields in a  table have default values,   the   table  can be
omitted from the User's Control Input.  Then, the defaults will be adopted.
Table-types MST-TOPSTOR through MST-SUBFLX should usually not  be  supplied,
the documentation of those tables for further details.
                                     See
                                       451
                            RELEASE  8.0

-------
                                                  PERLND — Section MSTLAY input

4.4(1).9.1   Table-type VUZFG — Variable upper zone flag
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  VUZFG
  <-range>
  (repeats until all operations of this type are covered)

  END VUZFG
*******
Example
*******
  VUZFG
    VUZFG***
    # -  #     ***
    1    7    1
  END VUZFG
Details

Symbol
Fortran
name(s)
Format  Def     Min     Max

               VUZFG
               15
Explanation

VUZFG is a  flag which indicates whether  or not  the  upper   zone  nominal storage
varies  throughout   the year or not.    A value  of  zero  means  it  does  not vary,
value 1 means it does.    If it does  vary, the system  will expect  a table of type
MON-UZSN in the User's Control Input.

Note that Table VUZFG is  only required  if  Section PWATER is inactive.    If that
section is active VUZFG would have already  been provided in the input for PWATER
(Table-type PWAT-PARM1 ).
                                       452
                                                       RELEASE 8.0

-------
                                                  PERLND — Section MSTLAY input
4.4(1).9.2  Table-type UZSN-LZSN — Values of UZSN, LZSN and initial
                                    surface storages
         1         2345678
1234567890123456789012345678901 2345678901234567890123456789012345678901234567890
*******
Layout
******
  UZSN-LZSN
  <-rangex-uzsn-><-lzsn-><-surs-><
                                    	,—sursb	

(repeats until all operations of this type are covered)

END UZSN-LZSN
*******
Example
*******
  UZSN-LZSN
        UZSN
    # -  #      in
    1    7     1.0
  END UZSN-LZSN
LZSN    SURS
  in      in
 6.0     .02
                                      SURSB     ***
                                  Blockl  Block2***
                                     .01     .03
Details
Symbol










Fortran
name ( s )
UZSN

LZSN

SURS

SURSB(*)


Format

F8.0

F8.0

F8.0

F8.0


Def

none
none
none
none
.001
.025
.001
.025

Min

0.01
0.25
0.01
0.25
.001
.025
.001
.025

Max

10.0
250.
100.
2500,
100.
2500.
100.
2500.

Units

in
mm
in
mm
in
mm
in
mm

Unit
system
Engl
Metric
Engl
Metric
Engl
Metric
Engl
Metric
                                       453
                                                                    RELEASE  8.0

-------
                                                  PERLND — Section MSTLAY input

Explanation

This table is only required if Section  PWATER is inactive,  else the data would
have already been supplied in the input for Section PWATER.

UZSN is the nominal upper zone storage.    The value supplied here is irrelevant
if VUZFG has been set to 1; in that case monthly values for UZSN are supplied in
Table-type MON-UZSN.

LZSN is the nominal lower zone storage.

SURS is the initial surface detention storage.  If the PLS consists of more  than
one areal source "block",  this value should be the mean of the values given for
each block.

SURSB(*) are the initial surface detention storages on each block of the PLS.   A
value should be supplied for each block,  except if there is only one block,  in
which case no value need be supplied.
                                       454                            RELEASE 8.0

-------
                                                  PERLND — Section MSTLAY input

4.4(1).9.3  Table-type MST-PARM — Factors used to adjust solute leaching
                                   rates
         12345678
1234567890123456789012345678901 2345678901 234567890123456789012345678901234567890

Layout
******

  MST-PARM
  <-range><	leach-parms	>

  (repeats until all operations of this type are covered)

  END MST-PARM

*******
Example
*******
  MST-PARM
         SLMPF      ULPF
    # -  #
    1    7       0.5       2.0
  END MST-PARM
2.0
Details
Symbol

< leach-pa rms>



Fortran
name ( s )
SLMPF
ULPF
LLPF

Format Def

3F10.0 1.0
1.0
1.0

Min

.001
1.0
1 .0

Max

1 .0
10.0
10.0

Units

none
none
none

Unit
system
Both
Both
Both
Explanation

These are the   factors used  to adjust  solute  percolation  rates.    SLMPF affects
percolation  from  the  surface  layer  storage  to the  upper layer principal storage.
ULPF affects  percolation  from the   upper layer principal storage to  the lower
layer storage.    LLPF affects percolation  from the lower layer  storage  to the
active and inactive groundwater.
                                       455
                                RELEASE 8.0

-------
                                                  PERLND — Section MSTLAY  input

4.4(1).9.4  Table-type MST-TOPSTOR — Initial moisture storage in each
                                      topsoil layer
         12345678
1234567890123456789012345678901 2345678901234567890123456789012345678901234567890

Layout
******

  MST-TOPSTOR
  <-range ><	tops tor	>

  (repeats until all operations of this  type are covered)

  END MST-TOPSTOR

*******
Example
*******

  MST-TOPSTOR
          Topsoil storages  (lb/ac)***
    # -  #     SMSTM     UMSTM     IMSTM***
    1    7    100000    400000    300000
  END MST-TOPSTOR
Details
Symbol








Fortran
name ( s )
SMSTM

UMSTM

IMSTM


Format Def

3F10.0 0.0
0.0
0.0
0.0
0.0
0.0

Min

0.0
0.0
0.0
0.0
0.0
0.0

Max

none
none
none
none
none
none

Units

lb/ac
kg/ha
lb/ac
kg/ha
lb/ac
kg/ha

Unit
system
Engl
Metric
Engl
Metric
Engl
Metric
Explanation

This  table is  used  to  specify the  initial moisture content in the surface, upper
principal and  upper transitory (interflow)    storages respectively.   The entire
table  should be  repeated  for  each  block of the PLS; block! first, etc.

Note  that the  values given  in this table  only affect the water storages for the
start of the   first interval  in the run;   there is no carry-over  of the values
beyond the starting instant.    Therefore,  in most runs,  this table need not be
supplied; the  default  zero  values  will not cause any problems.
                                       456
RELEASE 8.0

-------
                                                  PERLND — Section MSTL&Y input

4.4(1).9.5  Table-type MST-TOPFLX — Initial fractional fluxes in topsoil
                                     layers
         1         2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  MST-TOPFLX
  <-range><	top-flux	•	>

  (repeats until all operations of this  type are covered)

  END MST-TOPFLX
*******
Example
*******

  MST-TOPPLX
       Fractional fluxes in topsoil layers  (/ivl)      ***
    # -  #       FSO       FSP       FIX        FUP        FIO***
    1    7       .07       .03
  END MST-TOPFLX
Details
Symbol

Fortran
name ( s )

Format Def Min Max Units Unit
system
     FSO,FSP,FII,    5F10.0   0.0      0.0      1.0      /ivl    Both
               FUP,FIO
Explanation

These  are the  initial values  of  the   fractional  fluxes   of soluble  chemicals
through  the topsoil  layers  of a PLS.    If  the  PLS  is   subdivided into more than
one block, a separate  table should  be supplied  for  each block;  block! first,  etc

Note that the  values  supplied in this  table  apply at the instant  that the  run
starts.  The program computes new   values each  time step and there  is no carry-
over of  values from  one time step to the next.   Therefore, in most runs, you  can
omit this table; the default zero values will not cause any problems.
                                       457                             RELEASE 8.0

-------
                                                  PERLND — Section MSTLAY input

4.4(1).9.6  Table-type MST-SUBSTOR — Initial moisture storage in subsurface
                                      layers
         12345678
1234567890123456789012345678901 2345678901234567890123456789012345678901234567890
*******
Layout
******

  MST-SUBSTOR
  <-range><	subs tor	>
  (repeats until all operations of this type are covered)

  END MST-SUBSTOR

*******
Example
*******

  MST-SUBSTOR
    Subsoil moisture  (kg/ha)***
    # -  #     LMSTM     AMSTM    ***
    1    7    800000    1000000
  END MST-SUBSTOR
Details
Symbol         Fortran        Format  Def      Min      Max     Units   Unit
               name(s)                                                 system

      LMSTM,AMSTM    2F10.0  0.0      0.0      none    Ib/ac   Engl
                                      0.0      0.0      none    kg/ha   Metric
 Explanation

 These   are   the   initial   moisture   storages  in  the  lower  layer  and  active
 groundwater  layers  respectively.

 Usually,    this  table   should be   omitted and  the default  values taken.    The
 comments  made  on this  subject in   the explanation for Table-type MST-TOPSTOR are
 also applicable  here.
                                       458                            RELEASE 8.0

-------
                                                  PERLND — Section MSTLAY input
4.4(1).9.7  Table-type MST-SUBFLX — Initial fractional fluxes
                                     in subsurface layers
         12345678
1234567890123456789012345678901 234567890123456789012345678901 2345678901234567890
*******
Layout
******


  MST-SUBFLX
  <-range><	subflux	>
  (repeats until all operations of this type are covered)

  END MST-SUBFLX

*******
Example
*******


  MST-SUBFLK
    Subsurface fractional fluxes  (/ivl) ***
    # -  #       FLP      FLOP       FAO      ***
    1    7       0.1      0.05
  END MST-SUBFLX
Details
Symbol


Fortran Format Def
name ( s )
FLP, FLOP, FAO 3F10.0 0.0

Min Max Units
0.0 1.0 /ivl

Unit
system
Both
Explanation

These are the initial  fractional  fluxes  of  soluble  chemicals through the subsoil
layers.

Usually,   this  table   should be   omitted and   the  default  values taken.    The
comments  on this   subject   in  the  explanation  for  Table-type MST-TOPFLX  are
applicable here.
                                       459                            RELEASE 8.0

-------
                                                    PERLND — Section PEST input
4.4(1). 10  PEELND BLOCK — Section PEST input
Layout:

  Table-type PEST-FLAGS
  Table-type SOIL-DATA

  Table-type PEST-ID

  Table-type PEST-THETA
  Table-type PEST-FIRSTPM
  Table-type PEST-FIRSTPM
  Table-type PEST-FIRSTPM
  Table-type PEST-FIRSTPM
  Table-type PEST-CMAX
  Table-type PEST-SVALPM
  Table-type PEST-SVALPM
  Table-type PEST-SVALPM
  Table-type PEST-SVALPM
  Table-type PEST-CMAX
  Table-type PEST-NONSVPM
  Table-type PEST-NONSVPM
  Table-type PEST-NONSVPM
  Table-type PEST NONSVPM

  Table-type PEST-DEGRAD
for surface layer
for upper layer
for lower layer
for groundwater layer
for surface layer
for upper layer
for lower layer
for groundwater layer
for surface layer
for upper layer
for lower layer
for groundwater layer
if
ADOPFG
if
ADOPFG
«2
if
ADOPFG
=3
  Table-type PEST-STOR1  for  surface  layer  storage
  Table-type PEST-STOR1  for  upper  layer  princ.  storage
  Table-type PEST-STOR2  for  upper  layer  trans,  storage

  Table-type PEST-STOR1  for  lower  layer  storage
  Table-type PEST-STOR1  for  groundwater  layer  storage
                             repeat  for
                             each block
                                        repeat  for
                                        each
                                        pesticide
                                       460
                                          RELEASE 8.0

-------
                                                    PERLND — Section PEST input

Explanation:

The  exact format  of each  of the  tables mentioned  above is  detailed in   the
documentation which follows.

The comments given alongside the table names above indicate:
  1.  Under which circumstances a table is expected
  2.  Sequencing information.   Note that "repeat for each block" means that  the
      bracketed set  of tables is  repeated for each  areal source block  in  the
      pervious land-segment (PLS).    The first set is for block  1,  second  for
      block 2,  etc.   The number of blocks (NBLKS)  was specified in Table-type
      GEN-INFO (Sect. 4.4(1).1.3).

Note that if  all the fields in a  table have default values,   the   table can be
omitted from the User's Control Input.  Then, the defaults will be adopted.

ADOPFG  is the  adsorption/desorption  option flag.    It  is   described in   the
documentation for Table-type PEST-FLAGS (Sect. 4.4(1).10.1) below.


4.4(1).10.1  Table-type PEST-FLAGS — Flags for pesticide simulation
         12345678
12345678901234567890123456789012345678901 234567890123456789012345678901234567890
*******
Layout
******

  PEST-FLAGS
  <-rangexnps><	itmax	><	adopt	>
   (repeats until all operations of this  type are covered)

   END PEST-FLAGS

*******
Example
*******

   PEST-FLAGS
     NPSTJMax iterations[Adsorp option ***
    # -  #      JFstl Pst2 Pst3JPst1 Pst2 Pst3***
    1    7    2   20   20          13
   END PEST-FLAGS
                                       461                             RELEASE 8.0

-------
                                                    PEKLND — Section PEST input
Details
Symbol





Fortran
name ( s )
NPST
ITMXPS ( * )
ADOPFG(*)

Format

15
315
315

Def

1
30
2

Min

1
1
1

Max

3
100
3
Explanation

NPST is the number of pesticides being simulated in the operation.

ITMXPS is the maximum number of iterations that  will be made in trying  to  solve
for  adsorbed  and dissolved  equilibrium  using  the Freundlich  isotherm.    A
separate value may be supplied for each  pesticide being handled (up to  3).    If
the Freundlich method is not being used, these values have no effect.

ADOPFG(*)   are flags  which  indicate which  method will  be  used to   simulate
adsorption/desorption, for each pesticide (maximum of 3):

  1 means use first-order kinetics
  2 means use single-value Freundlich method
  3 means use non-single value Freundlich method
                                       462                             RELEASE 8.0

-------
                                                    PERLND — Section PEST input

4.4(1).10.2  Table-type SOIL-DATA — Soil layer depths and bulk densities
         1          2345678
123456789012345678901234567890123456789012345678901 2345678901 2345678901 234567890
*******
Layout
******
  SOIL-DATA
  <-range><-
 -depths-
           .><	bulkdens-
  {repeats until all operations of this type are covered)

  END SOIL-DATA
*******
Example
*******
  SOIL-DATA
    
    # -  t Surface
    1    7     .12
  END SOIL-DATA
 Depths (ins)
Upper
  6.0
Lower Groundw
 40.0
80.
    Bulk density (Ib/ft3)
Surface   Upper   Lower Groundw
    80.                    120.
Details
Symbol



Fortran
name ( s }
none
none

Format
4F8.0
4F8.0

Def
none
none
103
1.65

Min
.001
.0025
50
0.80

Max
1000
2500
150
2.40

Units
in
cm
Ib/ft3
gm/cc

Unit
system
Engl
Metric
Engl
Metric
Explanation

The first four values are the depths  (thicknesses)  of  the  surface,  upper,   lower
and groundwater  layers respectively;   the  second   group of  four  values  are the
corresponding bulk densities of  the soil  in those  layers.

The depth and bulk  density are  mutiplied together  by  the  program  to obtain the
mass of  soil in  each layer.    This   is  used  to   compute  the  concentrations of
adsorbed chemicals.
                                       463
                                                                      RELEASE 8.0

-------
                                                    PERLND — Section PEST  input
4.4(1).10.3  Table-type PEST-ID — Name of pesticide
         1          2345678
12345678901234567890123456789012345678901 23456789012345678901 2345678901 234567890

Layout
******


  PEST-ID
  <-range><	pestid	>


  (repeats until all operations of this  type are covered)

  END PEST-ID

*******
Example
*******
  PEST-ID
    

    # -  #
    1    7
  END PEST-ID
Pesticide***
         ***
 Atrazine
Details
Symbol


Fortran
name ( s )
PESTID(*)

Format Def Min Max
5A4 none none none
Explanation

This   table  specifies   the   name  of  the  pesticide  to which  the  data in  the
following  tables  apply.
                                       464
                                                 RELEASE 8.0

-------
                                                    PERLND — Section PEST input

4.4(15.10.4  Table-type PEST-THETA — Pesticide first-order reaction
                                      temperature correction parameters
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  PEST-THETA
  <-range ><	theta	•	>
  (repeats until all operations of this type are covered)

  END PEST-THETA

*******
Example
*******

  PEST-THETA
       Temperature parms***
    # -  #    THDSPS    THADPS***
    17                1.07
  END PEST-THETA
Details
Symbol


Fortran Format Def
name( s)
THDSPS, THADPS 2F10.0 1.05

Min Max Units Unit
system
1.00 2.00 none Both
Explanation

These  parameters  are  used  to  adjust  the  desorption  and   adsorption   rate
parameters (respectively), using a modified Arrhenius equation:

       Rate at T=  (Rate at 35degO*  (theta}** (T-35)

This  table is  only  required if  first  order kinetics   are   used  to   simulate
adsorption/desorption (ADOPFG=1 in Table-type PEST-FLAGS).
                                      465                             RELEASE 8.0

-------
                                                    PERLND — Section PEST input

4.4(1).10.5  Table-type PEST-FIRSTPM — Pesticide first-order parameters
         12345678
1234567890123456789012345678901234567890123456789012345678901 2345678901234567890
*******
Layout
******

  PEST-FIRSTPM
  <-range><	firstparm	>
  (repeats until all operations of this type are covered)

  END PEST-FIRSTPM

*******
Example
*******

  PEST-FIRSTPM
    First-order parms  (/day)***
    # -  #     KDSPS     KADPS    ***
    1    7       .07        .04
  END PEST-FIRSTPM
Details
Symbol


Fortran Format Def
name ( s )
KDSPS, KADPS 2F10.0 0.0

Min Max Units
0.0 none /day

Unit
system
Both
Explanation

KDSPS  and  KADPS  are  the  desorption  and  adsorption rates at 35degC.

This   table   is  only  required   if   ADOPFG=1   (first-order kinetics)   for  this
pesticide.
                                       466                            RELEASE 8.0

-------
                                                    PERLND — Section PEST input

4.4(1).10.6  Table-type PEST-CMAX — Maximum solubility of pesticide
         12345678
12345678901234567890123456789012345678901 2345678901 23456789012345678901234567890
*******
Layout
******

  PEST-CMAX
  <-range><—cmax—>
  (repeats until all operations of this type are covered)

  END PEST-CMAX
*******
Example
*******

  PEST-CMAX
          CMAX***
    # -  #     (ppm)***
    1    7      25.0
  END PEST-CMAX
Details
Symbol


Fortran
name ( s )
CMAX

Format Def Min Max Units Unit
system
F10.0 0.0 0.0 none ppm Both
Explanation

CMAX is the maximum solubility of the pesticide  in water,

This table  is only required  if ADOPFG= 2 or  3  for  this   pesticide  (Freundlich
method of simulating adsorption/desorption).
                                      467                             RELEASE 8.0

-------
                                                    PERLND — Section PEST input

4.4(1).10.7  Table-type PEST-SVALPM — Pesticide parameters for single value
                                       Freundlich method
         1          2345678
123456789012345678901 2345678901 2345678901 234567890123456789012345678901234567890

Layout
******

  PEST-SVALPM
  <-range><	svalpm	>

  (repeats until all operations of this  type are covered)

  END PEST-SVALPM

*******
Example
*******
  PEST-SVALPM
          XFIX
    # -  #      (ppm)
    1    7       20.
  END PEST-SVALPM
 K1

4.0
 N1***
   ***
1 .5
Details
Symbol





Fortran
name ( s )
XFIX
K1
N1

Format Def

3F10.0 0.0
0.0
none

Min

0.0
0.0
1 .0

Max

none
none
none

Units Unit
system
ppm Both
Both
Both
 Explanation

 XFIX   is   the   maximum  concentration  (on the  soil)   of  pesticide  which  is
 permanently  fixed to the soil.  K1  and N1  are the coeff.  and exponent parameters
 for the Freundlich adsorption/desorption  equation:

   X=  K1*C**(1/N1) + XFIX

 This  table is  only used if ADOPFG= 2 for  this pesticide (single value Freundlich
 method).    Then,   the system expects it to appear four times for this pesticide;
 first,  for the surface layer,  second for  the upper layer, etc.
                                       468
                                           RELEASE 8.0

-------
                                                    PERLND — Section PEST input

4.4(1).10.8  Table-type PEST-NONSVPM — Pesticide parameters for Non-single
                                        Value Preundlich method
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  PEST-NONSVPM
  <-range><	nonsvpm	•	>

  (repeats until all operations of this type are covered)

  END PEST-NONSVPM

*******
Example
*******
  PEST-NONSVPM
          XFIX
    # -  #     (ppm)
    1    7       15.
  END PEST-NONSVPM
 K1

5,0
 N1

1 .5
 N2***
   ***
1 .7
Details
Symbol






Fortran
name { s )
XFIX
K1
N1
N2

Format Def

4F10.0 0.0
0.0
none
none

Min

0.0
0.0
1.0
1 .0

Max

none
none
none
none

Units Unit
system
ppm Both
Both
Both
Both
Explanation

XFIX  is  the  maximum  concentration   (on  the   soil)    of   pesticide   which  is
permanently fixed  in the  soil.   K1 and   N1 are   the  coefficient  and exponent
parameters for   the Freundlich curve used   for  adsorption.    N2  is  the exponent
parameter for the auxiliary  ("desorption")  curve.
This   table is  only used
Freundlich Method).
if ADOPFG=  3  for this  pesticide  (Non-single  Value
                                       469
                                                                      RELEASE 8.0

-------
                                                    PERLND — Section PEST input

4.4(1).10.9  Table-type PEST-DEGRAD — Pesticide degradation rates
         12345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901 234567890

Layout
******

  PEST-DEGRAD
  Orange ><	degrad	>

  (repeats until all operations of this  type are covered)

  END PEST-DEGRAD

*******
Example
*******

  PEST-DEGRAD
        Pesticide degradation rates  (/day)   ***
    # -  #   Surface     Upper     Lower  Groundw***
    1    7       .05        .02        .01
  END PEST-DEGRAD
Details
Symbol

Fortran
name ( s )

Format Def Min Max Units Unit
system

SDGCON , UDGCON , 4F10.0
LDGCON,ADGCON
0.0
0.0
1.0
                        /day
                                                                       Both
 Explanation

 These  are  the  degradation  rates  of  the   pesticide in the surface,   upper,  lower
 and  groundwater   layers   respectively.     These  rates  are  not  adjusted  for
 temperature.
470
                                                                      RELEASE 8.0

-------
                                                    PERLND — Section PEST input

4.4(1).10,10  Table-type PEST-STOR1 — Initial pesticide storage in surface,
                                       upper, lower or groundwater layer
         1          2345678
1234567890123456789012345678901 2345678901 234567890123456789012345678901234567890
*******
Layout
******

  PEST-STOR1
  <-range><-cryst—><	ads—X—soln—>
  (repeats until all operations of this type are covered)

  END PEST-STOR1
*******
Example
*******
  PEST-STOR1
    Initial pesticide in surface layer  (Ib/ac)***
    # -  #     Cryst       Ads      Soln             ***
    1    7      10.0      25.0      50.0
  END PEST-STOR1
Details

Symbol
Fortran
name(s)
Format  Def
Min
Max
Units
Unit
system
,, PSCY,PSAD,
         PSSU
               3F10.0
        0.0
        0.0
0.0
0.0
                                       none
                                       none
        Ib/ac
        kg/ha
        Engl
        Metric
Explanation

 is the pesticide in crystalline  form,    is  the pesticide in adsorbed
form and  is the pesticide in  solution.

The values given in this table apply to  one  of the  following four soil storages:
surface, upper principal,  lower or groundwater.    In the  case of the surface and
upper principal storages these  values may apply to  the entire  layer {if NBLKS=
1) or to a single block in the layer {if NBLKS>  1).
                                       471
                                                       RELEASE  8.0

-------
                                                    PERLND — Section PEST input
4.4(1).10.11   Table-type PEST-STOR2 — Initial pesticide stored in upper layer
                                       transitory (interflow) storage
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
Layout
******
  PEST-STOR2
  <-range><—ips	>

  (repeats until all operations of this type are covered)

  END PEST-STOR2

*******
Example
*******

  PEST-STOR2
     Interflow       ***
    # -  #   storage(kg/ha)***
    1    7      20.0
  END PEST-STOR2
Details
Symbol


Fortran
name ( s )
IPS

Format Def
P10.0 0.0
0.0

Min
0.0
0.0

Max Uni ts
none Ib/ac
none kg/ha

Unit
system
Engl
Metric
Explanation

IPS  is   the  initial   storage   of   pesticide   in  the   upper  layer  transitory
(interflow) storage.   Since  only dissolved  pesticide  is  modeled in that storage,
only one  value  is  needed  (no crystalline  or adsorbed  material).

This value may  apply  to the  entire  layer  (if  NBLKS=  1)   or to a single block in
the layer (if NBLKS>  1).
                                       472                            RELEASE 8.0

-------
                                                    PERLND — Section NITR input
4.4(1).11  PERLND BLOCK — Section NITR input
Layout;

  Table-type SOIL-DATA
  Table-type NIT-FLAGS
  Table-type NIT-UPTAKE
if section PEST is inactive
  Table-type MON-NITUPT for surface layer
  Table-type MON-NITUPT for upper layer
  Table-type MON-NITUPT for lower layer
  Table-type MON-NITUPT for groundwater layer

  Table-type NIT-PSTGEN
  Table-type NIT-PSTPM  for surface layer
  Table-type NIT-PSTPM  for upper layer
  Table-type NIT-FSTPM  for lower layer
  Table-type NIT-FSTPM  for groundwater layer

  Table-type NIT-CMAX
  Table-type NIT-SVALPM for surface layer
  Table-type NIT-SVALPM for upper layer
  Table-type NIT-SVALPM for lower layer
  Table-type NIT-SVALPM for groundwater layer
                        if VNUTFG= 0
                        if VNUTFG= 1
                        if
                        FORAFG*
                        1
  (single value
   Freundlich
   method)
  Table-type NIT-STOR1
  Table-type NIT-STOR1
  Table-type NIT-STOR2

  Table-type NIT-STOR1
  Table-type NIT-STOR1

Explanation:
for surface layer storage
for upper layer princ. storage
for upper layer trans, storage

for lower layer storage
for groundwater layer storage
repeat for
each block
The exact  format of  each of  the  tables mentioned  above,    except SOIL-DATA,   is
detailed in  the documentation which  follows.    SOIL-DATA  is documented under  the
input for  Section PEST  (4.4(1).10).

The comments given alongside  the  table names  above indicate:
   1.  Under which circumstances a table is  expected
   2.  Sequencing information.   Note that "repeat  for  each block" means that  the
      bracketed set  of  tables  is repeated for each   areal source block  in  the
      pervious land-segment  (PLS).    The first set is for block  1,   second  for
      block  2,  etc.    The number of blocks (NBLKS) was  specified in Table-type
      GEN-INFO (Sect. 4.4(1).1.3.

Note that  if  all the fields  in a table have default  values,   the  table can be
omitted from the User's  Control Input.  Then,  the  defaults will be adopted.

VNUTFG  and  FORAFG  are the  nitrogen  plant  uptake  flag  and  the  ammonium
adsorption/desorption method  flag respectively. They  are described under Table-
type NIT-PLAGS (Sect. 4.4(1).11.1) below.
                                       473
                                              RELEASE 8.0

-------
                                                    PERLND — Section NITR input

I.4(1).11.1   Table-type NIT-FLAGS — Flags for nitrogen simulation
         12345678
1234567890123456789012345678901 2345678901 234567890123456789012345678901234567890

Layout
******

  NIT-FLAGS
  <-range><	nitf lags	>

  (repeats until all operations of this  type are covered)

  END NIT-FLAGS

*******
Example
*******
                                   ***
NIT-FLAGS
   Nitrogen flags
  # -  # VNUT FORA ITMX BNUM CNUM***
  171             10   10
END NIT-FLAGS
Details
Symbol






Fortran
name ( s )
VNUTFG
FORAFG
ITMAXA
BNUMN
CNUMN
Format Def

515 0
0
30
none
none
Min

0
0
1
1
1
Max

1
1
100
1000
1000
Explanation

If VNUTFG= 1  the  first-order  plant uptake parameters for nitrogen are allowed to
vary  throughout the  year  and  four  tables  of type MON-NITUPT are expected in the
User's  Control Input.   The first  appearance is  for the surface layer,  2nd for
upper layer,   3rd  for  the lower layer  and 4th for the  groundwater layer.   If
VNUTFG=0  the   uptake rates do  not vary through  the year  and a value  for each
layer is  specified in a single table (Table-type NIT-UPTAKE).
                                       474
                                                                    RELEASE 8.0

-------
                                                    PERLND — Section NITR input

FORAFG  indicates  which  method  is  to be  used  to  simulate  adsorption  and
desorption of ammonium:
  0     first-order kinetics
  1     single-value Freundlich method

ITMAXA is the maximum number of iterations that will be attempted in solving the
Freundlich equation; applicable only if FORAFG= 1.

BNUMN is  the number  of time steps  that will  elapse between  recalculation of
biochemical reaction fluxes.   For example, if BNUMN= 10 and the simulation time
step is  5 min then  these fluxes will be  recalculated every 50  minutes.   All
reactions except adsorption/desorption  fall into this category.    CNUMN is the
corresponding number for the chemical (adsorption/desorption) reactions.
                                      475                            RELEASE 8.0

-------
                                                    PERLND — Section NITR input

4.4(1).11.2  Table-type NIT-UPTAKE — Nitrogen plant uptake rate parameters
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  NIT-UPTAKE
  <-range><	uptake	>

  (repeats until all operations of this type are covered)

  END NIT-UPTAKE

*******
Example
*******

  NIT-UPTAKE
    Nitrogen plant uptake rates  (/day)       ***
    # -  #   Surface     Upper     Lower   Groundw***
    1    2      0.01      0.02      0.01
  END NIT-UPTAKE
Details
Symbol

Fortran
name ( s )

Format Def Min Max Units Unit
system

SKPLN,UKPLN,
LKPLN,AKPLN
4F10.0  0.0
0.0
                        none
/day
Both
Explanation

SKPLN,   UKPLN,    LKPLN  and   AKPLN  are   the plant  nitrogen uptake  reaction rate
parameters   for   the  surface,   upper,   lower   and  active  groundwater  layers
respectively.
                                       476
                                                       RELEASE 8.0

-------
                                                    PERLND — Section NITR input

4.4(1).11.3  Table-type MON-NITUPT — Monthly plant uptake parameters for
             nitrogen, for the surface, upper, lower or groundwater  layer
         12345678
12345678901234567890123456789012345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
******

  MON-NITUPT
  <-range><	mon-uptake-
  {repeats until all operations of this type are covered)

  END MON-NITUPT
*******
Example
*******

  MON-NITUPT
      Plant uptake parms for nitrogen in upper  layer  (/day)      ***
    # -  #  JAN  FEB  MAR  APR  MAY  JUN  JUL  AUG  SEP   OCT   NOV   DEC***
    1    4                 .01  .03  .05  .05  .03   .01
  END MON-NITUPT
Details
Symbol         Fortran        Format  Def     Min      Max     Units   Unit
               name{s)                                                 system

   KPLNM(*)       12F5.0  0.0     0.0      none     /day    Both
Explanation

This table is required  if  the plant  uptake  parameters  vary  throughout the year
(VNUTFG=  1 in Table-type NIT-FLAGS).    The   entire  table is supplied four times?
first for the surface   layer,  second for the  upper layer,    third for the lower
layer and fourth  for the active  groundwater  layer.    If omitted,   default values
will be supplied.   For  example,  if  the third and fourth occurrences of the table
are omitted, the  parameters for  the lower and  groundwater layers  will default to
zero.
                                       477                             RELEASE 8.0

-------
                                                    PERLND — Section NITR input

4.4(1).11.4  Table-type NIT-FSTGEN — Nitrogen first-order general parameters
         12345678
12345678901234567890123456789012345678901 234567890123456789012345678901234567890

Layout
******

  NIT-FSTGEN
  <-range><	temp-parms	>

  (repeats until all operations of this type are covered)

  END NIT-FSTGEN

*******
Example
*******

  NIT-FSTGEN
     Upt-facts<	Temp-parms  (theta)	>***
    # -  #  NO3  NH4  PLN KDSA KADA KIMN   RAM KDNI KNI KIMA***
    1    7    .5    .5 1.07 1.08
  END NIT-FSTGEN
Details
Symbol












Fortran
name ( s )
NO3UTF
NH4UTF
THPLN
THKDSA
THKADA
THKIMN
THKAM
THKDNI
THKNI
THKIMA

Format Def

2F5.0 1.0
0.0
8F5.0 1.07
1 .05
1 .05
1.07
1 .07
1.07
1.05
1 .07

Min

0.001
0.0
1.0
1 .0
1 .0
1.0
1.0
1.0
1 .0
1.0

Max

1.0
1.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0

Units

none
none
none
none
none
none
none
none
none
none

Unit
system
Both
Both
Both
Both
Both
Both
Both
Both
Both
Both
                                       478
RELEASE 8.0

-------
                                                     PERLND — Section NITR input
Explanation
These general parameters   apply to nitrogen reactions in all  the layers;
this table only appears once  (or not at all,  if defaults are used).
                                                                          thus,
NO3UTF  and  NH4UTF are   parameters   intended  to  designate which   fraction  of
nitrogen uptake comes  from  nitrate and ammonium, respectively.  Their  sum should
be 1 .0
The  remaining fields
various reactions:
                     specify  the  temperature   coefficients  (theta)  for  the
  THPLN     Plant uptake
  THKDSA    Ammonium desorption  (only relevant if FORAFG=
  THKADA    Ammonium adsorption  (  "      "     "      "
  THKIMN    Nitrate immobilization
  THKAM     Organic N  ammonification
  THKDNI    NO3 denitrification
  THKNI     Nitrification
  THKIMA    Ammonium immobilization
                                                          0)
                                                           )
4.4(1).11.5   Table-type  NIT-FSTPM — Nitrogen first-order  reaction parameters
              for  the  surface,  upper, lower or active groundwater  layer
          12345678
123456789012345678901234567890123456789012345678901 2345678901 2345678901234567890
*******
Layout
******
  NIT-FSTPM
  <-range><
            -m *~^*m~ ———•••»»••*.••••. ™™™*»»^.i»jj g tjpci zrins "-*™*™ «•»••• «"•"•"*•-••••"•""••—•"•""•——.

(repeats until all operations  of this type are covered)

END NIT-FSTPM
*******
Example
*******
  NIT-FSTPM
    ***  Nitrogen first-order parameters for  lower  layer (/day)
    # -   #***   KDSAM     KADAM     KIMNI       KAM      KDNI        KNI
    1     7        .05       .03                 .02                 .05
  END NIT-FSTPM
                                                                           KIMAM
                                       479
                                                                       RELEASE 8.0

-------
                                                    PERLND — Section NITR  input

Details

Symbol         Fortran        Format  Def     Min     Max     Units   Unit
               name(s)                                                system

     KDSAM,KADAM,   7F10.0  0.0     0.0     none    /day    Both
               KIMNI,KAM,KDNI,
               KNI,KIMAM
Explanation

These are the first-order reaction rate parameters  for a  layer  of  soil:
  KDSAM   Ammonium desorption   (irrelevant if FORAFG= 1)
  KADAM   Ammonium adsorption   (    "      "        "    )
  KIMNI   Nitrate immobilization
  KAM     Organic N ammonification
  KDNI    Denitrification
  KNI     Nitrification
  KIMAM   Ammonium immobilization

HSPF expects this table  to appear four times in  the User's  Control Input;   first
for the surface  layer,   second  for the  upper layer,  third for the lower  layer,
fourth for  the  active groundwater  layer.   If  one or more occurrences  of the
table are missing,   all reaction parameters for the affected  layer(s)  will be
defaulted to zero.
                                       480                            RELEASE 8.0

-------
                                                    PERLND — Section NITR input

4.4(1).11.6  Table-type NIT-CMAX — Maximum solubility of ammonium
         12345678
123456789012345678901234567890123456789012345678901 2345678901 2345678901 234567890
*******
Layout
******

  NIT-CMAX
  <-range><—cmax—>
  (repeats until all operations of this type are covered)

  END NIT-CMAX

*******
Example
*******

  NIT-CMAX
          CMAX***
    # -  #     (ppm)***
    1    5      15.0
  END NIT-CMAX
Details
Symbol


Fortran
name ( s )
CMAX

Format Def Min Max Units Unit
system
F10.0 0.0 0.0 none ppm Both
Explanation

CMAX is the maximum  solubility of ammonium in water.   This  table only appears
once  and is  only required  if FORAFG=  1 (that  is,  adsorption/desorption  is
simulated using single-value Freundlich method).
                                      481                            RELEASE  8.0

-------
                                                    PERLND — Section NITR input
4.4(1).11.7  Table-type NIT-SVALPM — Nitrogen single value Freundlich
                                      adsorption/desorption parameters
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  NIT-SVALPM
  <-range><	svalpm	>
                         *
  (repeats until all operations of this  type are covered)

  END NIT-SVALPM

*******
Example
*******
  NIT-SVALPM
          XFIX
    # -  #      (ppm)
    1    3      10.0
  END NIT-SVALPM
 K1

5.0
 N1***
   ***
1 .2
Details
Symbol


Fortran
name ( s )
XFIX
K1
N1

Format Def
3F10.0 0.0
0.0
none

Min
0.0
0.0
1.0

Max
none
none
none

Units Unit
system
ppm Both
Both
Both
 Explanation

 This  table is  only required  if  FORAFG=1;   that is,   adsorption and desorption of
 ammonium  is  simulated  using  the single  value Freundlich method.

 This  table is  exactly  analogous to Table-type PEST-SVALPM.
                                       482
                                          RELEASE 8.0

-------
                                                    PERLND — Section NITR  input

4. 4(1). 11. 8  Table-type NIT-STOR1 — Initial storage of nitrogen in  the  surface,
             upper, lower or groundwater layer

            ***********************************
         12345678
1 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 234567890

Layout
******

  NIT-STOR1
  <-range>< ------------------ nit-stor1
  (repeats until all operations of this type are covered)

  END NIT-STOR1
*******
Example
*******

  NIT-STOR1
    lnitial storage of N in upper layer  (Blockl)  (lb/ac)***
    # -  #      ORGN      AMAD      AMSU       NO3       PLTN   ***
    1    4                          100.       500.        50.
  END NIT-STOR1
Details
Symbol


Fortran Format
name ( s )
ORGN, AMAD, AMSU, 5F10.0
NO 3, PLTN

Def
0.0
0.0

Min
0.0
0.0

Max Uni ts
none lb/ac
none kg/ha

Unit
system
Engl
Metric
Explanation

This table is  similar in organization  to Table-type   PEST-STOR1.    It specifies
the initial storage of N in one of  the   four  major  soil  storages  and the plant N
derived  from that  layer.    In   the  case   of  the  surface   and upper  principal
storages the table values  refer  to a single  block,   if  the  PLS  is divided into
more than one block.  The values  in the table are:
  ORGN   Organic N
  AMAD   Adsorbed ammonium
  AMSU   Solution ammonium
  NO3    Nitrate
  PLTN   N stored in plants,  derived  from this layer  (and block,  where
                                                       applicable)
                                       483                             RELEASE 8.0

-------
                                                    PERLND — Section NITR input

4.4(1).11.9  Table-type NIT-STOR2 — Initial storage of nitrogen in upper
                                     layer transitory (interflow) storage

                                    lr************************************,
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  NIT-STOR2
  <-range><	nit-stor2	
  (repeats until all operations of this type are covered)

  END NIT-STOR2

*******
Example
*******

  NIT-STOR2
      Initial N in interflow storage   (Block  3)  (lb/ac)***
    # -  #     IAMSU      IN03                                ***
    1    2
  END NIT-STOR2
Details
Symbol         Fortran        Format  Def     Min     Max      Units    Unit
               name(s)                                                 system

IAMSU, INO3
2F10.0 0.0
0.0
0.0
0.0
none
none
lb/ac
kg/ha
Engl
Metric
Explanation

This   table  is   similar  to   Table-type   PEST-STOR2.    It  specifies the  initial
storage   of  ammonium   and   nitrate  in   the   upper   layer transitory  (interflow)
storage,  either  for the  whole  PLS  (NBLKS=1)  or  for  one block of it (NBLKS> 1).
                                       484                            RELEASE 8.0

-------
                                                    PERLND — Section PHOS input
4.4(1).12  PERLND BLOCK — Section PHOS input
Layout:

  Table-type SOIL-DATA  if sections PEST and NITR are inactive
  Table-type PHOS-FLAGS
  Table-type PHOS-UPTAKE 	 if VPUTFG= 0
  Table-type MON-PHOSUPT for surface layer
  Table-type MON-PHOSUPT for upper layer
  Table-type MON-PHOSUPT for lower layer
  Table-type MON-PHOSUPT for groundwater layer
  Table-type PHOS-FSTGEN
  Table-type PHOS-FSTPM  for surface layer
  Table-type PHOS-FSTPM
  Table-type PHOS-FSTPM
  Table-type PHOS-FSTPM
for upper layer
for lower layer
for groundwater layer
  Table-type PHOS-CMAX
  Table-type PHOS-SVALPM for surface layer
  Table-type PHOS-SVALPM for upper layer
  Table-type PHOS-SVALPM for lower layer
  Table-type PHOS-SVALPM for groundwater layer
                        if VPUTFG= 1
                        if
                        FORPFG*
                        1
  (single value
   Freundlich
   method)
  Table-type PHOS-STOR1
  Table-type PHOS-STOR1
  Table-type PHOS-STOR2

  Table-type PHOS-STOR1
  Table-type PHOS-STOR1

Explanation:
for surface layer storage
for upper layer princ. storage
for upper layer trans, storage

for lower layer storage
for groundwater layer storage
repeat for
each block
The exact format of  each of the tables mentioned above,    except  SOIL-DATA,   is
detailed in the documentation which follows.   SOIL-DATA  is documented  under  the
input for Section PEST  (4.4(1).10).

The comments given alongside the table names above indicate;
  1.  Under which circumstances a table is expected
  2.  Sequencing information.   Note that "repeat for each  block"  means that  the
      bracketed set  of tables  is  repeated for each  areal source block  in  the
      pervious land-segment (PLS).    The first set is  for  block   1,  second  for
      block 2,  etc.   The number of blocks (NBLKS)  was  specified in Table-type
      GEN-INFO (Sect. 4.4(1).1.3).

Note that if  all the fields in a  table have default values,   the  table  can be
omitted from the User's Control Input.  Then, the defaults  will be adopted.

VPUTFG  and FORPFG  are  the  phosphorus plant  uptake  flag   and  the   phosphate
adsorption/desorptxon method flag respectively.  They are described under  Table-
type PHOS-FLAGS (Sect. 4.4(1).12.1) below.
                                       485
                                                                      RELEASE 8.0

-------
                                                    PERLND — Section PHOS input

4.4(1).12.1   Table-type PHOS-FLAGS — Flags governing simulation of phosphorus
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901 234567890

Layout
******

  PHOS-FLAGS
  Orange ><	phosf lags	>

  (repeats until all operations of this type are covered)

  END PHOS-FLAGS

*******
Example
*******

  PHOS-FLAGS
     VPUT FORP ITMX BNUM CNUM ***
    # -  #
    141             10  10
  END PHOS-FLAGS
Details
Symbol

< phosf lags>





Fortran
name ( s )
VPUTFG
FORPFG
ITMAXP
BNUMP
CNUMP

Format Def

515 0
0
30
none
none

Min

0
0
1
1
1

Max

1
1
100
1000
1000
 Explanation

 This  table is  exactly analogous  to Table-type NIT-FLAGS.
                                       486
RELEASE 8.0

-------
                                                    PERLND — Section PHOS input

4.4(1).12.2  Table-type PHOS-UPTAKE — Phosphorus plant uptake parameters
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  PHOS-UPTAKE
  <-range><	phos-uptake	•>

  (repeats until all operations of this type are covered)

  END PHOS-UPTAKE

*******
Example
*******

  PHOS-UPTAKE
     Phosphorus plant uptake parms (/day)    ***
    # -  #     SKPLP     UKPLP     LKPLP     AKPLP***
    1           .005       .03       .05        .01
  END PHOS-UPTAKE
Details
Symbol

Fortran
name ( s )

Format Def Min Max Units Unit
system
  SKPLP,UKPLP,
               LKPLP,AKPLP
4F10.0  0.0
0.0
                        none
/day
Both
Explanation

This table is exactly analogous to Table-type NIT-UPTAKE,
                                      487
                                                                      RELEASE  8.0

-------
                                                    PERLND — Section PHOS input

4.4(1).12.3  Table-type MON-PHOSUPT — Monthly plant uptake parameters for
             phosphorus, for the surface, upper, lower or groundwater layer
         12345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
******
  MON-PHOSUPT
  <-range><—
            	mon-phosupt	

(repeats until all operations of this type are covered)

END MON-PHOSUPT
*******
Example
*******

  MON-PHOSUPT
     Monthly phosphorus uptake parameters  for  surface  layer  (/day)***
    # -  #  JAN  FEE  MAR  APR  MAY  JUN  JUL  AUG   SEP  OCT NOV   DEC
    1    2                 .01  .03  .07  .07  .04   .01
  END MON-PHOSUPT
Details

Symbol
             Fortran
             name(s)
Format  Def     Min     Max     Units   Unit
                                        system
  KPLPM(*)
                            12F5.0  0.0     0.0     none     /day     Both
Explanation

This table is exactly analogous  to  Table-type  MON-NITUPT.
                                       488
                                                                    RELEASE 8.0

-------
                                                    PERLND — Section PHOS input

4.4(1).12,4  Table-type PHOS-FSTGEN — Temperature correction parameters
             for phosphorus reactions
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  PHOS-FSTGEN
  <-range><	•—*	theta	•	•	>

  (repeats until all operations of this type are covered)

  END PHOS-FSTGEN

*******
Example
*******
  PHOS-FSTGIN
     Temperature corection parameters  (theta)
    t -  I     THPLP    THKDSP    THKADP     THKIMP
    1                     1.07
  END PHOS-FSTGEN
     ***
THKMP***
 1 .05
Details
Symbol







Fortran
name ( s )
THPLP
THKDSP
THKADP
THKIMP
THKMP

Format Def

5F10.0 1.07
1.05
1.05
1 .07
1.07

Min

1.0
1 .0
1 .0
1.0
1.0

Max

2.0
2.0
2.0
2.0
2.0

Units

none
none
none
none
none

Unit
system
Both
Both
Both
Both
Both
Explanation

This table  is analogous  to Table-type  NIT-FSTGEN,   except  for  the   first two
values in that  table.   The temperature correction parameters  supplied in this
table (and the reactions they affect) are:
  THPLP    Plant uptake
  THKDSP   Phosphate desorption  (only relevant  if  FORPFG=0  in Table PHOS-FLAGS)
  THKADP   Phosphate adsorption  (  "        "     "      "      "    "        "     )
  THKIMP   Phosphate immobilization
  THKMP    Organic P mineralization
                                       489
              RELEASE 8.0

-------
                                                    PERLND — Section PHOS input

4.4(1).12.5  Table-type PHOS-FSTPM — Phosphorus first-order reaction parameters
         1          2345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
******

  PHOS-FSTPM
  <-range ><	phos-f stpm	>
  (repeats until all operations of this type are covered)

  END PHOS-FSTPM

*******
Example
*******

  PHOS-FSTPM
     Phosphorus first-order parameters for surface  layer  (/day)  ***
    # -  #      KDSP      KADP      KIMP       KMP                     ***
    1    5                                     .04
  END PHOS-FSTPM
Details
Symbol

Fortran
name ( s )

Format Def Min Max Units Unit
system
   KDSP,KADP,      4F10.0   0.0      0.0      none     /day    Both
               KIMP,KMP
 Explanation

 This  table is  analogous  to  Table-type   NIT-FSTPM.    The reaction rate parameters
 supplied  in  this  table are:
   KDSP    Phosphate  desorption  (only used  if  FORPFG=0 in Table-type PHOS-FLAGS)
   KADP    Phosphate  adsorption  (  '	      "      "        "         "     )
   KIMP    Phosphate  immobilization
   KMP    Organic  P  mineralization
                                       490                            RELEASE 8.0

-------
                                                    PERLND — Section PHOS input

4.4(13,12.6 Table-type PHOS-CMAX — Maximum solubility of phosphate
         1          2345678
12345678901234567890123456789012345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
******

  PHOS-CMAX
  <-range><—cmax—>
  (repeats until all operations of this type are covered)

  END PHOS-CMAX

*******
Example
*******

  PHOS-CMAX
          CMAX***
    # -  #      (pprn)***
    1    2       5.0
  END PHOS-CMAX
Details
Symbol


Fortran
name ( s )
CMAX

Format Def Min Max Units Unit
system
F10.0 0.0 0.0 none ppm Both
Explanation

This table is exactly analogous  to Table-type NIT-CMAX.
                                       491                             RELEASE 8.0

-------
                                                    PERLND — Section PHOS input

4.4(1).12.7  Table-type PHOS-SVALPM — Phosphorus single value Freundlich
                                       adsorption/desorption parameters
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  PHOS-SVALPM
  <-range><	svalpm	>

  (repeats until all operations of this type are covered)

  END PHOS-SVALPM

*******
Example
*******

  PHOS-SVALPM
     Parameters for Freundlich method  (lower layer)  ***
    # -  #      XFIX        K1        N1                   ***
    1            30.       5.0       1.5
  END PHOS-SVALPM
Details
Symbol


Fortran
name ( s )
XFIX
K1
N1

Format Def
3F10.0 0.0
0.0
none

Min
0.0
0.0
1 .0

Max
none
none
none

Units Unit
system
ppm Both
Both
Both
 Explanation

 This  table is  exactly  analogous  to  Table-type NIT-SVALPM.
 FORPFG=  1 in Table-type PHOS-FLAGS.
It is  only used if
                                       492
        RELEASE 8.0

-------
                                                    PERLND — Section PHOS input

4.4(t).12,8  Table-type PHOS-STOR1 — Initial phosphorus storage in the surface,
                                      upper, lower or groundwater layer
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901 234567890

Layout
******

  PHOS-STOR1
  <-range><	phos-storl	>

  (repeats until all operations of this type are covered)

  END PHOS-STOR1

*******
Example
*******

  PHOS-STGR1
    lnitial phosphorus in upper layer, block2  (Ib/ac)  ***
    # -  #      ORGP      P4AD      P4SU      PLTP           ***
    1    3       50.     2000.      200.
  END PHOS-STOR1
Details
Symbol


Fortran
name ( s )
ORGP, P4 AD,
P4SU,PLTP

Format Def
4F10.0 0.0
0.0

Min
0.0
0.0

Max Uni ts
none Ib/ac
none kg/ha

Unit
system
Engl
Metric
Explanation

This table is analogous to Table-type NIT-STOR1.
                                       493
                                                                      RELEASE 8.0

-------
                                                    PERLND — Section PHOS input
4.4(1).12.9  Table-type PHOS-STOR2 — Initial storage of phosphate in
             upper layer transitory (interflow) storage
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  PHOS-STOR2
  <-range><—phos—>
  (repeats until all operations of this type are covered)

  END PHOS-STOR2

*******
Example
*******

  PHOS-STOR2
    Phosphate in interflow  in block 3 (kg/ha)  ***
    # -  #     IP4SU                                  ***
    1    6      100.
  END PHOS-STOR2
Details
Symbol


Fortran
name ( s )
IP4SU

Format Def
F10.0 0.0
0.0

Min
0.0
0.0

Max Units
none Ib/ac
none kg/ha

Unit
system
Engl
Metric
 Explanation

 This  table is  analogous  to  Table-type  NIT-STOR2.
                                       494                            RELEASE 8.0

-------
                                                  PERLND — Section TRACER input

4.4(1).13  PERLND BLOCK — Section TRACER input
Layout;

  Table-type TRAC-ID

  Table-type TRAC-TOPSTOR  |  repeat for each block

  Table-type TRAC-SUBSTOR


Explanation;

The  exact format  of each  of the  tables mentioned  above is  detailed in  the
documentation which follows.

Note that if  all the fields in a  table have default values,  the  table can be
omitted from the User's Control Input.  Then, the defaults will be adopted.
                                      495                             RELEASE  8.0

-------
                                                  PERLND — Section TRACER input

4.4(1).13.1   Table-type TRAC-ID — Name of conservative (tracer) substance
         12345678
123456789012345678901234567890123456789012345678901 2345678901 2345678901 234567890

Layout
******

  TRAC-ID
  <-range><	trac-id	>

  (repeats until all operations of this type are covered)

  END TRAC-ID

*******
Example
*******
  TRAC-ID
    Name of tracer
    # -  #
    1   10 Chloride
  END TRAC-ID
***
***
Details
Symbol


Fortran
name ( s )
TRACID(*)

Format Def Min Max
5A4 none none none
Explanation

Any 20 character string can be  supplied  as  the  name  of  the  tracer substance.
                                       496
                                        RELEASE 8.0

-------
                                                  PERLND — Section TRACER input

4.4(1).13.2  Table-type TRAC-TOPSTOR — Initial quantity of tracer in topsoil
                                        storages
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  TRAC-TOPSTOR
  <-range><	trac-tops tor	>

  (repeats until all operations of this  type are covered)

  END TRAC-TOPSTOR

*******
Example
*******
  TRAC-TOPSTOR
    Initial storage of chloride in topsoil  (block 4)  (kg/ha)  ***
    # -  #     STRSU     UTRSU     ITRSU
    1                     200.
  END TRAC-TOPSTOR
***
Details
Symbol


Fortran
name ( s )
STRSU , UTRSU ,
ITRSU

Format Def
3F10.0 0.0
0.0

Min
0.0
0.0

Max Uni ts
none Ib/ac
none kg/ha

Unit
system
Engl
Metric
Explanation

This  table specifies  the  initial  storage   of   tracer   (conservative)   in  the
surface,   upper  principal and  upper   transitory   storages.     If the   PLS  is
subdivided into more than one block,  it  is repeated for  each block.
                                       497
  RELEASE 8.0

-------
                                                  PERLND — Section TRACER input

4.4(1).13.3  Table-type TRAC-SUBSTOR — Initial quantity of tracer
                                        in lower and groundwater storages
         12345678
1234567890123456789012345678901 2345678901234567890123456789012345678901234567890
*******
Layout
******

  TRAC-SUBSTOR
  <-range><	trac-substor	>
  (repeats until all operations of this type are covered)

  END TRAC-SUBSTOR

*******
Example
*******

  TRAC-SUBSTOR
    Initial storage of chloride in subsoil layers  (Ib/ac) ***
    # -  #     LTRSU     ATRSU                                  ***
    1           300.      500.
  END TRAC-SUBSTOR
Details
Symbol


Fortran
name ( s )
LTRSU, ATRSU

Format Def
2F10.0 0.0
0.0

Min
0.0
0.0

Max Units
none Ib/ac
none kg/ha

Unit
system
Engl
Metric
Explanation

This  table specifies   the  initial  storage  of  conservative   (tracer)   material in
the lower and active groundwater layers.
                                       498                            RELEASE 8.0

-------
                                                                    IMPLND Block

4.4(2) IMPLND Block
         12345678
123456789012345678901234567890123456789012345678901 23456789012345678901234567890
*******
Layout
******

IMPLND
  General input
 [section ATEMP input]
 [section SNOW input]
 [section IWATER input]
 [section SOLIDS input]
 [section IWTGAS input]
 [section IQUAL input]
END IMPLND
Explanation

This block contains  the data which are  "domestic" to all the  Impervious Land-
segments in the RUN.   The "General input"  is always relevant:   other  input  is
only required if the module section concerned is active.
4.4(2).1  IMPLND BLOCK — General input
         12345678
12345678901 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901234567890
*******
Layout
******
  Table-type ACTIVITY
 [Table-type PRINT-INFO]
  Table-type GEN-INFO
Explanation

The  exact format  of each  of the  tables mentioned  above  is   detailed  in  the
documentation which follows.

Tables enclosed  in brackets  {]   above are   not  always  required;    for example,
because all the values can be defaulted.
                                       499                             RELEASE 8.0

-------
                                                         IMPLND — General Input

4.4(2).1.1  Table-type ACTIVITY — Active Sections Vector
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  ACTIVITY
  <-range><	a-s-vector	>
  (repeats until all operations of this type are covered)

  END ACTIVITY

*******
Example
*******

  ACTIVITY
                   Active Sections  ***
    # -  # ATMP SNOW IWAT  SLD  IWG IQAL  ***
    17111
    9         0001
  END ACTIVITY
Details
Symbol         Fortran        Format  Def     Min     Max
               name(s)

   ASVEC(6)       615     0       0       1
Explanation

The IMPLND module is divided into  6  sections.   The  values  supplied  in this table
specify  which sections  are  active and which  are   not,    for  each  operation
involving the IMPLND module. A value of  0 means "inactive"  and 1  means "active".
Any meaningful subset  of sections  may be active.
                                       500                            RELEASE 8.0

-------
                                                         IMPLND — General  Input

4.4(2).1.2  Table-type PRINT-INFO — Printout information
         12345678
12345678901 2345678901 2345678901 2345678901 234567890123456789012345678901234567890
*******
Layout
******

  PRINT-INFO
  <-range><	print-f lags	>
  (repeats until all operations of this type are covered)

  END PRINT-INFO

*******
Example
*******
        \

  PRINT-INFO
     ******** Print-flags ******** PIVL  PYR
    # -  # ATMP SNOW IWAT  SLD  IWG IQAL *********
    17246                  10   12
  END PRINT-INFO
Details
Symbol




Fortran
name ( s )
PFLAG(6)
PIVL
PYREND

Format
615
15
15

Def
4
1
9

Min
2
1
1

Max
6
1440
12
                                      501                             RELEASE 8.0

-------
                                                         IMPLND — General Input

Explanation

HSPF permits the  user to vary the  printout level (maximum frequency)   for the
various active sections of an operation.   The meaning of each permissible value
for PFLAG() is:

 2 means every PIVL intervals
 3 means every day
 4 means every month
 5 means every year
 6 means never

In the example above, output from Impervious Land-segments 1 thru 7 will
occur as follows:

Section   Max frequency

ATEMP     10 intervals
SNOW      month
IWATER    never
SOLIDS
thru
IQUAL
month  (defaulted)
A value need only  be supplied for PIVL if one or more  sections have a printout
level of 2.   For those sections, printout will occur every PIVL intervals  (that
is,  every PDELT=PIVL*DELT  mins).  PIVL must be  chosen such that there  are an
integer no. of PDELT periods in a day.

HSPF will automatically provide printed output at all standard intervals  greater
than the specified minimum interval.   In the above example,  output for  section
ATEMP will be printed at the end of each 10 intervals, day, month and year.

PYREND  is  the calendar  month  which  will  terminate  the year  for  printout
purposes.   Thus,   the annual summary can  reflect the situation over  the  past
water year or the past calendar year, etc.
                                       502                             RELEASE 8.0

-------
                                                         IMPLND — General Input

4.4(2). 1.3  Table-type GEN-INFO — Other general information
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******

Layout
******


  GEN-INFO
  <-range><	ILS-id	><—unit-syst—><-printu->
  (repeats until all operations of this type are covered)


  END GEN-INFO
*******

Example
*******
  GEN-INFO
    
    # -  #
Name
    1      Chicago loop
    2      Astrodome
  END GEN-INFO
  Unit-systems   Printer***
User  t-series Engl Metr***
       in  out          ***
                  1
        1
23
Details
Symbol




Fortran Format Def
name ( s )
LSID(5) 5A4 none
UUNITS,IUNITS, 315 1
OUNITS
PUNIT(2) 215 0

Min Max
none none
1 2
0 99
                                      503
                                                                      RELEASE  8.0

-------
                                                         IMPLND — General  Input

Explanation

Any string of up to 20 characters may be supplied as the identifier for an  ILS.

The values supplied for  indicate the system of units for data in  the
UCI,  input  time series and output  time series respectively:  1  means English
units, 2 means Metric units.

The  values supplied  for   indicate  the  destinations  of printout   in
English and Metric units respectively.   A value 0 means no printout is required
in that system.   A non-zero value means printout is required in that  system  and
and the value is the Fortran unit no. of the file to which the printout is  to be
written.  Note that printout for each Impervious Land Segment can be obtained in
either the English or Metric systems,  or  both  (irrespective of the system used
to supply the inputs).


4.4(2).2  IMPLND BLOCK — SECTION ATEMP INPUT

This  section,  ATEMP,  is common to the PERLND and IMPLND  modules.  See Section
4.4(1).2 for documentation.


4.4(2).3  IMPLND BLOCK — SECTION SNOW INPUT

This  section,  SNOW,  is common to the  PERLND and IMPLND modules.   See Section
4.4(1).3 for documentation.


4.4(2).4  IMPLND BLOCK — Section IWATER input
          12345678
 12345678901234567890123456789012345678901234567890123456789012345678901234567890
 *******
 Layout
 ******
  [Table-type  IWAT-PARM1  ]
  Table-type  IWAT-PARM2
  [Table-type  IWAT-PARM3  ]
  [Table-type  MON-RETN    ]
  [Table-type  MON-MANNING]

  [Table-type  IWAT-STATE1]
only reqd if the relevant quantity
varies through the year
 Explanation

 The   exact format  of each  of the  tables mentioned  above is  detailed in  the
 documentation which follows.
 Tables enclosed  in brackets []    above are  not always required;
 because all the values can be defaulted.

                                       504
                                      for  example,
                                       RELEASE  8.0

-------
                                                  IMPLND — Section  IWATER  input

4.4(2).4.1  Table-type IWAT-PARM1 — First group of IWATER parms  (flags)



         12345678
123456789012345678901234567890123456789012345678901 2345678901 2345678901 234567890

Layout
******

  IWAT-FARM 1
  <-range><	iwatparml	>

  (repeats until all operations of this  type are covered)

  END IWAT-PARM1

*******
Example
*******

  IWAT-PARM1
               Flags            ***
    # -  # CSNO RTOP  VRS  VNN RTLI   ***
    1711
  END IWAT-PARM1
Details
Symbol         Fortran         Format  Def     Min     Max
               name(s)

    CSNOFG,RTOPFG,  515     0       0       1
               VRSFG,VNNFG,
               RTLIFG
                                      505                             RELEASE 8.0

-------
It CSNOFG is.  I,   section 1WATEK assumes that snow accumulation arid melt,  is  being
considered.   It will,  therefore, expect that the  time series produced by section
SNOW are available,   either internally (produced   in this RUN)  or from  external
sources  (produced in  a previous RUN).   If CSNOFG is 0,   no such time series  are
expected.  See  the functional description for  further information.

If rt'COPFG is  i,   routing of overland flow is   done in exactly the same way  as in
NFS. A value  or 0 results in a new algorithm being used.

The flags beginning with "V" indicate whether   or riot certain parameters will be
assumed  to vary through the year: 1 means they do vary,  0 means they do  not.  The
quantities concerned  are:

    vRSf'u     xot.eii i i.i'jji sLOi. <-iijrt cajj.ii n i.y
    VwMf'G     Manning '.-i n for the ovfcrldaa do; plane
if c-i t.iiei' ol  thbtje  riays ai e on, monthly  valuei  Jrui  me paramt to,: C(..n(.erned must.
be supplied  (see  Table-types MON-  , docuiuented  Jatei).

i i t.'iijib'G  13  "i,    -jriv i^Lc.jil  surface inflow   to rnt  lls will  Le  aubjeci  tc.
retention storage,-  if it is 0, it  will not.
                                        506                             RELEASE 8.0

-------
                                                  IMPLND — Section IWATER input


4.4(2).4.2  Table-type IWAT-PARM2 — Second group of IWATER parms




         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890


Layout
******


  IWAT-PARM2
  <-range><	iwatparm2	>


  (repeats until all operations of this type are covered)


  END IWAT-PARM2

*******

Example
*******
  IWAT-PARM2
    
***
# - # LSUR
1 7 400.
END IWAT-PARM2
************************
Details
Symbol





Fortran
name ( s )
LSUR
SLSUR
NSUR
RETSC
SLSUR NSUR RETSC ***
.001
t************************************

Format Def Min Max
F10.0 none 1.0 none
none 0.3 none
F10.0 none .000001 10.
F10.0 0.1 0.001 1.0
F10.0 0.0 0.0 10.0
0.0 0.0 250.
********************

Units Unit
system
ft Engl
m Metric
none Both
Both
in Engl
mm Metric
Explanation

LSUR is the length of the assumed overland  flow  plane,  and  SLSUR is the slope.

NSUR is Manning's n for the overland  flow plane.

RETSC is the retention  (interception) storage  capacity  of  the surface.
                                       507
                                                                      RELEASE 8.0

-------
                                                  IMPLND — Section IWATER input

4.4(2).4.3  Table-type IWAT-PARM3 — Third group of IWATER parms
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  IWAT-PARM3
  <-range><	iwatparm3-
  (repeats until all operations of this type are covered)

  END IWAT-PARM3

*******
Example
*******
  IWAT-PARM3
    ***
    # _  #*** pETMAX    PETMIN
    1    7
    9             39        33
  END IWAT-PARM3
Details
Symbol


Fortran
name ( s )
PETMAX
PETMIN
Format Def
F10.0 40.
4.5
F10.0 35.
1 .7
Min
none
none
none
none
Max
none
none
none
none
Units
degF
degC
degF
degC
Unit
system
Engl
Metric
Engl
Metric
 Explanation

 PETMAX is   the  air temp  below which E-T will  arbitrarily be reduced  below the
 value  obtained  from the input time series,  and PETMIN is the temp below which E-
 T will be  zero  regardless of the value  in  the input time series.   These values
 are  only used if snow is being considered (CSNOFG= 1).

 In the above example, both parameters will  be suppplied default values for Land-
 segments 1  through 7, but the user has over-ridden the defaults for Land-segment
 9.
                                       508
RELEASE 8.0

-------
                                                  IMPLND — Section IWATER  input

4.4(2).4.4  Table-type MON-RETN — Monthly retention storage capacity
         1          2345678
12345678901 2345678901 2345678901 2345678901 2345678901 23456789012345678901234567890
*******
Layout
******
  MON-RETN
  orangex
            	mon-retn	

(repeats until all operations of this type are covered)

END MON-RETN
*******
Example
*******
  MON-RETN
      Retention storage capacity at start of each month          ***
    # -  #  JAN  FEE  MAR  APR  MAY  JUN  JUL  AUG  SEP  OCT   NOV   DEC***
    1    7  .02  .03  .03  .04  .05  .08  .12  .15  .12   .05   .03   .01

  END MON-RETN
Details
Symbol


Fortran
name( s)
RETSCM(12)

Format Def
12F5.0 0.0
0.0

Min
0.0
0.0

Max
10.
250.

Units Unit
system
in Engl
mm Metric
Explanation

Only required if VRSFG in Table-type IWAT-PARM1  is  1.
                                       509
                                                                      RELEASE 8.0

-------
                                                  IMPLND — Section IWATER input

4.4(2).4.5  Table-type MON-MANNING — Monthly Manning's n values
         1          2345678
1 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901234567890
*******
Layout
******

  MON-MANNING
  <-range><	mon-Manning-
  (repeats until all operations of this type are covered)

  END MON-MANNING
*******
Example
*******

  MON-MANNING
      Manning's n at start of each month                          ***
    # -  #  JAN  FEE  MAR  APR  MAY  JUN  JUL  AUG   SEP   OCT   NOV  DEC  ***
    1    7  .23  .34  .34  .35  .28  .35  .37   .35   .28   .29   .30  .30
  END MON-MANNING
Details
Symbol         Fortran         Format  Def      Min      Max    Units     Unit
               name(s)                                                system

  NSURM(12)       12F5.0   .10      .001     1.0    complex  Both
 Explanation

 This  table is  only required  if  VNNFG in  Table-type IWAT-PARM1  is 1
                                       510                            RELEASE 8.0

-------
                                                  IMPLND — Section IWATER  input

4.4(2).4.6   Table-type IWAT-STATE1 — IWATER state variables
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  IWAT-STATE1
  <-range><	iwat-state!	>
  (repeats until all operations of this type are covered)

  END IWAT-STATE1
*******
Example
*******
  IWAT-STATE1
       IWATER state variables***
    # -  #***   RETS      SURS
    1    7      0.05      0.10
  END IWAT-STATE1
Details
Symbol






Fortran
name ( s )
RETS

SURS


Format Def

2F10.0 .001
.025
.001
.025

Min

.001
.025
.001
.025

Max

100
2500
100
2500

Units

inches
mm
inches
mm

Unit
system
Engl
Metric
Engl
Metric
Explana tion

This table is used to specify the  initial water  storages.

RETS is  the retention storage.
SURS is  the surface  (overland flow)  storage.
                                       511
                                                                      RELEASE 8.0

-------
                                                  IMPLND — Section SOLIDS  input
4.4(2).5  IMPLND BLOCK — Section SOLIDS input
         1          2345678
123456789012345678901 23456789012345678901 234567890123456789012345678901234567890
*******
Layout
******
 [Table-type SLD-PARM1]
  Table-type SLD-PARM2
 [Table-type MON-SACCUM]
 [Table-type MON-REMOV]
 [Table-type SLD-STOR ]
Tables in brackets Ue are
not always required.
Explanation

The  exact format  of each  of the
documentation which follows.
 tables mentioned  above is  detailed in   the
                                       512
                                   RELEASE 8.0

-------
                                                  IMPLND — Section SOLIDS input

l.4(2)»5.1   Table-type SLD-PARM1 — First group of SOLIDS parms
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  SLD-PARM1
  <-range><—sld-parm!—>
  (repeats until all operations of this type are covered)

  END SLD-PARM1
*******
Example
*******
  SLD-PARM1
                   ***
    # -  # VASD VRSD SDOP***
    17010
  END SLD-PARM1
Details

Symbol
Fortran
name(s)
Format  Def
Min
Max



VASDFG
VRSDFG
SDOPFG
315 0
0
0
0
0
0
1
1
1
Explanation

If VASDFG is 1,   the accumulation  rate  of  solids  is   allowed to vary throughout
the year  and  Table-type  MON-SACCUM  is  expected.     If  the  flag is  zero,   the
accumulation   rate  is   constant   (specified   in   Table-type   SLD-PARM2).The
corresponding  flag for the unit removal  rate  is  VRSDFG.

If SDOPFG is 1, removal of sediment from the  land  surface will be simulated  with
the algorithm  used in the NPS model.  If  it  is 0, the  new algorithm will be used.
                                       513
                                                                      RELEASE 8.0

-------
                                                  IMPLND — Section SOLIDS input

4.4(2).5.2  Table-type SLD-PARM2 — Second group of SOLIDS parms
         12345678
1234567890123456789012345678901 2345678901 234567890123456789012345678901234567890

Layout
******

  SLD-PARM2
  <-range><	sld-parm2	>

  (repeats until all operations of this  type are covered)

  END SLD-PARM2

*******
Example
*******
  SLD-PARM2
    ***
    # -  #
    1    7
  END SLD-PARM2
KEIM
0.08
JEIM
1.90
ACCSDP
  0.01
REMSDP***
   0.5
Details
Symbol









Fortran
name ( s )
KEIM
JEIM
ACCSDP



REMSDP

Format Def

4F10.0 0.0
none
0.0

0.0

0.0

Min

0.0
none
0.0

0.0

0.0

Max

none
none
none

none

1 .0

Units

complex
complex
tons
/ac.day
tonnes
/ha. day
/day

Unit
system
Both
Both
Engl

Metric

Both
 Explanation

 KEIM  is  the  coefficient in  the  solids  washoff equation.
 JEIM  is  the  exponent in the solids  washoff equation.
 ACCSDP is  the  rate  at which solids  are placed on the  land surface.
 REMSDP is  the  fraction of solids  storage  which is removed each day;
 is  no runoff,  for example,  because  of  street sweeping.
                                                       when there
 If   monthly  values  for  the  accumulation  and  unit  removal rates  are  being
 supplied,  values  supplied for these variables in this table are not relevant.
                                       514
                                                      RELEASE 8.0

-------
                                                  IMPLND — Section SOLIDS input

4.4(2).5.3  Table-type MON-SACCUM — Monthly solids accumulation rates
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
  MON-SACCUM
  •orangex-
            	mon-accum-'	

(repeats until all operations of this type are covered)

END MON-SACCUM
*******
Example
*******

  MON-SACCUM
      Monthly values for solids accumulation  (tonnes/ha.day)     ***
    # -  #  JAN  FEB  MAR  APR  MAY  JUN  JUL  AUG  SEP  OCT  NOV  DEC***
    1    7  0.0  .12  .12  .24  .24  .56  .67  .56  .34  .34  .23  .12
  END MON-SACCUM
Details
Symbol






Fortran
name ( s )
ACCSDM(12)




Format Def Min MaK Units

12F5.0 0.0 0.0 none tons/
ac.day
0.0 0.0 none tonnes/
ha. day

Unit
system
Engl

Metr

Explanation

This table is only required if VASDFG  in Table-type  SLD-PARM1  is  1.
                                       515
                                                                      RELEASE 8.0

-------
                                                  IMPLND — Section SOLIDS input

4.4(2).5.4  Table-type MON-REMOV — Monthly solids unit removal rates
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  MON-REMOV
  <-range><	mon-remov-
  (repeats until all operations of this type are covered)

  END MON-REMOV
*******
Example
*******

  MON-REMOV
      Monthly solids unit removal rate                           ***
    # -  #  JAN  FEE  MAR  APR  MAY  JUN  JUL  AUG  SEP  OCT  NOV   DEC***
    1    7  .05  .05  .07  .15  .15  .20  .20  .20  .20  .10  .05   .05
  END MON-REMOV
Details
Symbol


Fortran
name ( s )
REMSDM(12)

Format Def Min Max Units
12F5.0 0.0 0.0 1.0 /day

Unit
system
Both
Explanation

This  table is only required  if VRSDFG in Table-type SLD-PARM1  is 1.
                                       516                            RELEASE 8.0

-------
                                                  IMPLND — Section SOLIDS input
4.4(2).5.5  Table-type SLD-STOR — Solids storage
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  SLD-STOR
  <-range>
  (repeats until all operations of this type are covered)

  END SLD-STOR

*******
Example
*******

  SLD-STOR
      Solids storage (tons/acre) ***
    # -  #                             ***
    1    7       0.2
  END SLD-STOR
Details
Symbol



Fortran
name ( s }
SLDS


Format Def
F10.0 0.0
0.0


Min Max Units
0.0 none tons/ac
0.0 none tonnes
/ha

Unit
system
Engl
Metric

Explanation

SLDS is the initial storage of solids,
                                       517
                                                                      RELEASE 8.0

-------
                                                  IMPLND — Section IWTGAS input
4.4(2).6  IMPLND BLOCK ~ Section IWTGAS input
         1          2345678
1234567890123456789012345678901 2345678901 2345678901 23456789012345678901 234567890
Layout
******

 [Table-type IWT-PARM1]
 [Table-type IWT-PARM2]
 [Table-type MON-AWTF]
 [Table-type MON-BWTF]
 [Table-type IWT-INIT]
     Tables in brackets
     always required
[J  are not
Explanation

The  exact format  of each  of the
documentation which follows.
tables mentioned  above is  detailed in   the
                                       518
                                  RELEASE 8.0

-------
                                                  IMPLND — Section IWTGAS input

4.4(2).6.1   Table-type IWT-PARM1 — Flags for section IWTGAS
         1          2         3         4.5         6         7         8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  IWT-PARM1
  <-rangexiwtparml >
  (repeats until all operations of this type are covered)

  END IWT-PARM1

*******
Example
*******

  IWT-PARM1
      Flags for section IWTGAS***
    # -  # WTFV CSNO                ***
    1700
  END IWT-PARM1
Details
Symbol


Fortran
name ( s )
WTFVFG
CSNOFG

Format Def
215 0
0

Win
0
0

Max
1
1
Explanation

WTFVFG  indicates whether  or not  the water  temperature  regression   parameters
(AWTF and BWTF)  are allowed to vary throughout the year and,   thus,   whether  or
not Table-types MON-AWTF and MON-BWTF are expected.

If CSNOFG=1, the effects of snow accumulation and melt are being  considered;   if
it is  zero,  they are  not.  If section  IWATER is  active the value   of CSNOFG
supplied here  is ignored because  it was first supplied   in the  input  for that
section.
                                      519
                                                                      RELEASE 8.0

-------
                                                  IMPLND — Section IWTGAS input

4.4(2).6.2  Table-type IWT-PARM2 — Second group of IWTGAS parms
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  IWT-PARM2
  <-range><	iwt-parm2	>

  (repeats until all operations of this type are covered)

  END IWT-PARM2

*******
Example
*******

  IWT-PARM2
      Second group of IWTGAS parms***
    # -  #      ELEV      AWTP      BWTF***
    1    7     1281.      40.0       0.8
  END IWT-PARM2
Details
Symbol








Fortran
name ( s )
ELEV

AWTF

BWTF


Format Def

3F10.0 0.0
0.0
32.
0.0
1.0
1.0

Min

-1000.
-300.
0.0
-18.
0.001
0.001

Max

30000.
9100.
100.
38.
2.0
2.0

Units

ft
m
DegF
DegC
DegF/F
DegC/C

Unit
system
Engl
Metric
Engl
Metr
Engl
Metr
 Explanation

 ELEV  is   the  elevation  of  the  ILS   above sea level  (used to
 concentrations  of  dissolved gases  in surface outflow).
adjust saturation
 AWTF  is  the  surface  water  temperature,   when  the air teperature is 32 degrees F
 (0  degrees C).   It is  the  intercept  of the surface water temperature regression
 equation.    BWTF  is the  slope  of  the  surface water  temperature  regression
 equation.
                                       520
      RELEASE 8.0

-------
                                                  IMPLND — Section IWTGAS input

4.4(2).6.3  Table-type MON-AWTF — Monthly values.for AWTF
         12345678
12345678901 2345678901 2345678901 2345678901 2345678901 23456789012345678901234567890
*******
Layout
******
  MON-AWTF
  <-range><
            	mon-awtf	

(repeats until all operations of this type are covered)

END MON-AWTF
*******
Example
*******

  MON-AWTF
      Value of AWTF at start of each month  (deg F)               ***
    # -  #  JAN  FEB  MAR  APR  MAY  JUN  JUL  AUG  SEP  OCT  NOV  DEC***
    1    7  37.  38.  39.  40.  41.  42.  43.  44.  45.  44.  41.  40.
  END MON-AWTF
Details
Symbol


Fortran
name ( s )
AWTFM(12)

Format Def
12F5.0 32.
0.

Min
0.
-18.

Max
100.
38.

Units
deg F
deg C

Unit
system
Engl
Metric
Explanation

This table is only required if WTFVFG in Table-type IWT-PARM1  is  1.
                                      521
                                                                      RELEASE 8.0

-------
                                                  IMPLND — Section IWTGAS input

4.4(2).6.4  Table-type MON-BWTF — Monthly values for BWTF
         12345678
12345678901234567890123456789012345678901 234567890123456789012345678901234567890

Layout
******

  MON-BWTF
  <_range><	mon-bwtf	>

  (repeats until all operations of this type are covered)

  END MON-BWTF

*******
Example
*******
  MON-BWTF
      Value of BWTF at start of each month  (deg F/F)             ***
    # -  #  JAN  FEE  MAR  APR  MAY  JUN  JUL  AUG   SEP   OCT  NOV  DEC***
    1    7    .3   .3    .3   .4    .4   .5   .5    .5    .4    .4   .4   .3
  END MON-BWTF
Details
Symbol


Fortran
name ( s )
BWTFM(12)

Format Def
12F5.0 1.0
1 .0

Min
0.001
0.001

Max
2.0
2.0

Units Unit
system
deg F/F Engl
deg C/C Metric
 Explanation

 This  table is  only required  if  WTFVFG in Table-type IWT-PARM1  is 1.
                                       522
RELEASE 8.0

-------
                                                  IMPLND — Section IWTGAS input

4.4(25.6.5  Table-type IWT-INIT — Initial conditions for section IWTGAS
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  IWT-INIT
  <-range><	iwt-init	>

  (repeats until all operations of this type are covered)

  END IWT-INIT

*******
Example
*******
  IWT-INIT
         SOTMP
    # -  #      DegC
    1    7       16.
  END IWT-INIT
SODOX
 mg/1
 SQCO2***
mg C/l***
********************************************************************************
Details
Symbol


Fortran
name ( s )
SOTMP

Format Def
3F10.0 60.0
16.0

Min
32.
.01

Max
100.
38.0

Units
Deg F
Deg C

Unit
system
Engl
Metric
SODOX
SOCO2
0.0
0.0
0.0
0.0
20.0
1.0
mg/1
mg C/l
Both
Both
Explanation

These are the initial values for the temperature,  DO content and CO2 content of
the surface runoff. The values given in this table do not affect anything in the
simulation beyond the start of the first interval of the run. Therefore, in most
runs, this table should be omitted.
                                      523
                                                                     RELEASE  8.0

-------
                                                   IMPLND — Section IQUAL input

4.4(2).7  IMPLND BLOCK — Section IQUAL input
         1          2345678
12345678901234567890123456789012345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
******

 [Table-type NQUALS]

  Table-type QUAL-PROPS
 [Table-type QUAL-INPUT]
 [Table-type MON-POTFW]            repeat for each
 [Table-type MON-ACCUM]            quality constituent
 [Table-type MON-SQOLIM]
Explanation

The  exact format  of each  of the  tables mentioned  above  is   detailed  in  the
documentation which follows or in the documentation for  the  PERLND  module.

Tables enclosed in brackets []  are not always required;for  example,  because all
the values can be defaulted.
4.4(2).7.1   Table-type NQUALS  — Total  number  of  quality constituents simulated


This  table  is  identical   to  the corresponding  table  for  the   PERLND module.   See
Section  4.4(1).8.1  for documentation.
                                       524                            RELEASE 8.0

-------
                                                   IMPLND — Section  IQUAL  input
4.4(2).7.2  Table-type QUAL-PROPS — Identifiers and Flags
            for a quality constituent
         12345678
12345678901234567890123456789012345678901 2345678901 2345678901 2345678901234567890

Layout
******

  QUAL-PROPS
  <-rangex-qualid	>    <	flags	>

  (repeats until all operations of this  type are covered)

  END QUAL-PROPS

*******
Example
*******
  QUAL-PROPS
        Identifiers and Flags
    # -  #    QUALID      QTID  QSD VPFW  QSO
    1    7       BOD        kg    0    0     1
  END QUAL-PROPS
                                   ***
                                VQO***
                                  1
Details

Symbol
Fortran
name(s)
Format  Def
        Min
        Max



QUALID
QTYID
QSDFG
VPFWFG
QSOFG
VQOFG
3A4
A4
415
none
none
0
0
0
0
none
none
0
0
0
0
none
none
1
1
1
1
                                       525
                                                       RELEASE 8.0

-------
                                                   IMPLND — Section IQUAL input

Explanation

QUALID  is  a string  of  up  to  10  characters which  identifies  the  quality
constituent.  QTYID is a string of up to 4 characters which identifies the units
associated with this constituent (e.g., kg,  # (for coliforms)).   These are the
units referred to as "qty" in subsequent tables (eg. Tabletype QUAL-INPUT).

If QSDFG is 1 then:
  1.  This constituent is a QUALSD (sediment associated).
  2.  If VPFWFG is 1,  the washoff potency  factor may vary throughout the year.
      Table-type MON-POTFW is expected.

If QSOFG is 1 then:
  1.  This constituent is a QUALOF (directly associated with overland flow).
  2.  If VQOFG is 1 then rate of accumulation and the limiting storage of QUALOF
      may vary throughout  the year.   Table-types MON-ACCUM  and MON-SQOLIM are
      expected.
4.4(2).7.3  Table-type QUAL-INPUT — Storage on surface and nonseasonal parms
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  QUAL-INPUT
  <-range ><	qual-input	>
   (repeats until all operations of this type are covered)

   END QUAL-INPUT

*******
Example
*******

   QUAL-INPUT
       Storage on  surface and nonseasonal  parameters***
     # -   tt      SQO   POTFW    ACQOP   SQOLIM  WSQOP       ***
     1     7     1.21     .172    0.02      2.0    1.70
   END QUAL-INPUT
                                       526                            RELEASE 8.0

-------
                                                   IMPLND — Section IQUAL input
Details
Symbol Fortran Format Def
name ( s )
 SQO 5F8.0 0.0
0.0
POTFW 0.0
0.0

ACQOP 0.0

0.0

SQOLIM .000001
. 000002
WSQOP 1.64
41.7

Min
0.0
0.0
0.0
0.0

0.0

0.0

.000001
.000002
0.01
0.25

Max
none
none
none
none

none

none

none
none
none
none

Units Unit
system
qty/ac Engl
qty/ha Metric
qty/ton Engl
qty Metric
/tonne
qty Engl
/ac.day
qty Metric
/ha. day
qty/ac Engl
qty/ha Metric
in/hr Engl
mm/hr Metric
Explanation

The following variable is applicable only if the constituent is a QUALSD:
  1.  POTFW, the washoff potency factor.

A potency factor is the ratio of constituent yield to sediment outflow.

The following variables are applicable only if the constituent is a QUALOF:
  1.  SQO, the initial storage of QUALOF on the surface of the ILS.
  2.  ACQOP, the rate of accumulation of QUALOF.
  3.  SQOLIM, the maximum storage of QUALOF.
  4.  WSQOP,  the rate of surface runoff which  will remove 90 percent of  stored
      QUALOF per hour.

If monthly values are being supplied for  any of these quantities,  the  value  in
this table is not relevant;  instead,the system expects and uses values  supplied
in Table-type MON-XXX.
                                      527
RELEASE 8.0

-------
                                                   IMPLND — Section IQUAL input

4.4(2).7.4  Table-type MON-POTFW — Monthly washoff potency factor
This table is identical to the corresponing table in for the PERLND module.  See
Section 4.4(1).8.4 for documentation.
4.4(2).7.5  Table-type MON-ACCUM — Monthly accumulation rates of QUALOF


This table is identical  to the corresponding table for the  PERLND module.   See
Section 4.4(1).8.6 for documentation.
4.4(2).7.6  Table-type MON-SQOLIM — Monthly  limiting  storage  of  QUALOF
This table is identical  to the corresponding  table  for  the   PERLND  module.   See
Section 4.4(1).8.7 for documentation.
                                       528                            RELEASE 8.0

-------
                                                                    RCHRES Block

4.4(3) RCHRES Block
         1          2345678
123456789012345678901 2345678901 2345678901 2345678901 23456789012345678901234567890
*******
Layout
******

RCHRES
  General input
 [section HYDR input]
 [section ADCALC input]
 [section CONS input]
 [section HTRCH input]
 [section SEDTRN input]
 [section GQUAL input]
 [input for RQUAL sections]
 [section OXRX input]
 [section NUTRX input]
 [section PLANK input]
 [section PHCARB input]
END RCHRES
Explanation

This block contains the data which are  "domestic"  to all RCHRES  processing units
in the  RUN.   The  "General input" is  always relevant:     other  input  is only
required if the module section concerned is active.


4.4(3).1  RCHRES BLOCK — General input
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  Table-type ACTIVITY
 [Table-type PRINT-INFO]
  Table-type GEN-INFO
Explanation

The^ exact format  of each  of  the   tables mentioned   above is  detailed in  the
documentation which follows.    Tables enclosed  in   brackets [],   above,   are not
always required; for example, because all values can  be  defaulted.

                                      529                             RELEASE 8.0

-------
                                                         RCHRES — General input

4.4(3).1.1  Table-type ACTIVITY — Active Sections Vector
         12345678
1234567890123456789012345678901 2345678901 234567890123456789012345678901234567890

Layout
******

  ACTIVITY
  <-range><	a-s-vector	>

  (repeats until all operations of this  type are covered)

  END ACTIVITY
*******
Example
*******

  ACTIVITY
    RCHRES  Active sections***
    # -  # HYFG ADFG CNFG HTFG SDFG GQFG OXFG NUFG PKFG PHFG***
    171111111000
  END ACTIVITY
Details
Symbol         Fortran        Format  Def     Min      Max
               name(s)

   HYDRFG,ADFG    1015    0       0        1
               CONSFG,HTFG,
               SEDFG,GQALFG
               OXFG,NUTFG,
               PLKFG,PHFG
 Explanation

 The  RCHRES  module   is divided into ten  sections.   The values supplied  in this
 table  specify which sections  are active and which are not,   for each operation
 involving  the RCHRES  module.     A value  of  0 means  "inactive"  and 1  means
 "active".   Any meaningful subset of sections may be active,  with the following
 provisos: 1.  Section ADCALC must be active if any "quality" sections (CONS thru
 PHCARB)   are active.  2.    If any section in the RQUAL  group (Section OXRX thru
 PHCARB)  is  active,  all preceding RQUAL sections must also be active.
                                       530                            RELEASE 8.0

-------
                                                         RCHRES — General input
4.4(3).1.2  Table-type PRINT-INFO — Printout information
         12345678
12345678901234567890123456789012345678901 234567890123456789012345678901234567890

Layout
******

  PRINT-INFO
  <-range><	print-flags	>

  (repeats until all operations of this type are covered)

  END PRINT-INFO

*******
Example
*******

  PRINT-INFO
    RCHRES  Printout level flags***
    # -  # HYDR ADCA CONS HEAT  SED  GQL OXRX NUTR PLNK PHCB PIVL  PYR***
    1722255233              10    12
  END PRINT-INFO
Details
Symbol




Fortran
name ( s )
PFLAG(IO)
PIVL
PYREND

Format
1015
15
15

Def
4
1
9

Min
2
1
1

Max
6
1440
12
                                      531
RELEASE 8.0

-------
                                                         RCHRES — General input

Explanation


HSPF permits the  user to vary the  printout level (maximum frequency)   for the
various active sections of an operation.   The meaning of each permissible value
for PFLAG( ) is:

 2 means every PIVL intervals
 3 means every day
 4 means every month
 5 means every year
 6 means never

In the example above, output from RCHRESs 1 through 7 will occur as follows:

Section  Max frequency

HYDR     10 intervals
ADCALC   10 intervals
CONS     10 intervals
HTRCH    year
SEDTRN   year
GQUAL    10 intervals
OXRX     day
NUTRX    day
PLANK    month  (defaulted)
PHCARB   month  (defaulted)

A value need only  be supplied for PIVL if one or more   sections have  a  printout
level of 2.   For  those  sections, printout will occur every PIVL intervals  (that
is,  every PDELT=PIVL*DELT mins).    PIVL must be chosen such  that  there are  an
integer no. of  PDELT periods in a day.

HSPF will automatically  provide printed output at all standard intervals greater
than the specified minimum interval.    In  the above example,   output  for section
NUTRX will be printed at the end of each day, month, and year.

PYREND  is  the calendar month  which  will  terminate  the year   for  printout
purposes.   Thus,    the  annual summary  can reflect the  situation over  the past
water year or the  past calendar year, etc.
                                       532                            RELEASE 8.0

-------
                                                         RCHRES — General input

4.4(3).1.3  Table-type GEN-INFO — Other general information
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  GEN-INFO
  <-range><	rchid	XnexX—unit-syst—><-printu-Xlak>

  (repeats until all operations of this type are covered)

  END GEN-INFO

*******
Example
*******
  GEN-INFO
    RCHRES
    # -  #
                                                               ***
               Name        Nexits   Unit Systems   Printer
                                  user t-series  Engl Metr LKFG***
                                         in  out               ***
  4     East River-mile 4       211        23         0
END GEN-INFO
Details
Symbol






Fortran
name ( s )
RCHID(5)
NEXITS
UUNITS
IUNITS
OUNITS
PUNIT(2)
LKFG

Format
5A4
15
15
15
15
215
15

Def
none
1
1
1
1
0
0

Min
none
1
1
1
1
0
0

Max
none
5
2
2
2
99
1
                                      533
                                                                    RELEASE 8.0

-------
                                                         RCHRES — General input

Explanation
Any string  of up  to 20  characters may  be supplied  as the  identifier for  a
RCHRES.  NEXITS is the no.  of exits from the RCHRES.   A maximum of 5 exits may
be handled.

The values supplied for  indicate the system of units for data in the
UCI, input time series, and output time series,  respectively.   1 means English
units, 2 means metric units.

The  values supplied  for   indicate  the destinations  of printout   in
English and  metric units,  respectively.    A value of  0 means no  printout  is
required in that system.    A non-zero value means printout is  required in that
system and  is the  Fortran unit no.   of the  file to which  printout is  to  be
wri tten.

 indicates whether the RCHRES is a  lake  (1)  or a stream/river  (0).   This
affects the method  of calculating bed shear   stress  (in Section HYDR)   and the
reaeration coefficient (Section OXRX).
4.4(3).2  RCHRES BLOCK — Section HYDR input
         12345678
 12345678901234567890123456789012345678901234567890123456789012345678901234567890
 *******
 Layout
 ******

  Table-type HYDR-PARM1
  Table-type HYDR-PARM2
 [Table-type MON-CONVF]
 [Table-type HYDR-INIT]
 Explanation
 The   exact format  of  each  of the  tables mentioned  above is  detailed in  the
 documentation which follows.

 Tables enclosed in brackets [],  above,  are not always required.
                                       534                            RELEASE 8.0

-------
                                                    RCHRES — Section HYDR  input

4.4(3).2.1   Table-type HYDR-PARM1 — Flags for HYDR section
         12345678
12345678901234567890123456789012345678901 2345678901 2345678901 2345678901 234567890
Layout
******
HYDR-PARM1
<-range> <

T>0><2>«>

< 	 odfvfg 	 > < 	 odgtfg 	 >

< 	 funct 	 >
(repeats until all operations of this type are covered)
END HYDR-PARM1
*******
Example
*******




HYDR- FARM 1
RCHRES Flags for HYDR section***
# - # VC A1 A2 A3 ODFVFG for each *** ODGTFG for each
FG FG FG FG possible exit *** possible exit
1 70111 00001 11111
END HYDR- FARM 1
***************************************************************
Details
Symbol

<1>
<2>
<3>




Fortran
name ( s )
VCONFG
AUX1FG
AUX2FG
AUX3FG
ODFVFG ( 5 )
ODGTFG(5)
FUNCT(5)

Format Def Min Max
13 0 0 1
13 0 0 1
13 0 0 1
13 0 0 1
513 0-58
513 005
513 1 1 3


FUNCT for each
possible exit
33333
it*****************







                                       535
RELEASE 8.0

-------
                                                    RCHRES — Section HYDR input

Explanation


A  value of  1   for VCONFG  means  that F(VOL)   outflow  demand components  are
multiplied by a factor which is allowed to vary through the year.  These monthly
adjustment factors are input in Table-type MON-CONVF in this section.

A value of 1 for AUX1FG means subroutine  AUXIL will be called to compute depth,
stage,   surface area,   average depth,   and  topwidth,  and  values for  these
parameters will be reported in the printout.   These are used in the calculation
of precipitation and  evaporation fluxes,  and simulation of  most water quality
sections.    A  value of  0  supresses  the  calculation  and printout  of   this
information.

A value of 1 for AUX2FG means  average velocity and average cross sectional  area
will be  calculated,  and values  for these parameters  will be reported  in the
printout.   These are used in the simulation of oxygen.   A value of 0  supresses
the calculation and printout of this information.   If AUX2FG is 1,  AUX1FG  must
also be 1.

A value of  1 for AUX3FG means the  shear velocity and bed shear  stress will  be
calculated.   These are  used  in the  calculation of  deposition  and  scour  of
sediment (inorganic and organic).  AUX3FG may only  be turned ON  (=1)   if AUX1FG
and AUX2FG are also =1.

The value specified   for ODFVFG determines  the F(VOL)  component  of  the outflow
demand.   A  value of 0  means that the  outflow demand  does not have   a volume
dependent component.    A value greater  than 0  indicates the  column   number in
RCHTAB which contains the F(VOL)  component.   If the value  specified  for ODFVFG
is less  than 0,  the  absolute value indicates the  element of  array   COLIND( )
which defines a pair  of columns in RCHTAB   which are used  to evaluate  the F(VOL)
component.    Further explanation  of  this  latter  option   is   provided in   the
functional description of the HYDR section  in Part E.   A  value  of ODFVFG can be
specified for each exit from a RCHRES.

The value   specified  for ODGTFG  determines  the  G(T)   component of   the outflow
demand.   A  value of 0 means  that  the  outflow demand   does  not   have such  a
component.   A value  greater  than 0  indicates   the element  number of  the  array
OUTDGT(  ) which contains the G(T) component.  A value of ODGTFG can  be specified
for each exit  from a  RCHRES.

FUNCT  determines  the function  used   to combine   the components  of an  outflow
demand.  The possible values and  their meanings are:

  1 means use the  smaller of  F(VOL) and G(T)
  2 means use the  larger of  F(VOL) and G(T)
  3 means use the  sum of F(VOL) and G(T)
                                       536                            RELEASE 8.0

-------
                                                    RCHRES — Section HYDR  input


4.4(3).2.2  Table-type HYDR-PARM2 — Parameters for HYDR section
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******

Layout
******
  HYDR-PARM2
  <-range><-
            	hydr-parm2	

(repeats until all operations of this type are covered)

END HYDR-PARM2
*******
Example
*******
  HYDR-PARM2
    RCHRES  ***
# - # FTABNO
1 17
END HYDR-PARM2
*************************
Details
Symbol Fortran
name ( s )
 FTABNO
LEN

DELTH

STCOR

KS
DB50

LEN DELTH
2.7 120.
k*******************

Format Def

6F10.0 none
none
none
0.0
0.0
0.0
0.0
0.0
.01
.25
STCOR
3.2
*********

Min

1
0.01
0.016
0.0
0.0
none
none
0.0
.0001
.0025
KS*** DB50
.5 0
****************

Max Units

999 none
none miles
none km
none ft
none m
none ft
none m
. 99 none
100. in
2500. mm
.2
************

Unit
system
Both
Engl
Metric
Engl
Metric
Engl
Metric
Both
Engl
Metric
                                       537
                                                                    RELEASE 8.0

-------
                                                    RCHRES — Section HYDR input

Explanation
FTABNO is  the user's number  for the F-Table  which contains the  geometric and
hydraulic properties  of the RCHRES.   The  F-Table is situated in  the F-TABLES
block.

LEN is the length of the RCHRES.

DELTH  is the  drop  in water  elevation  from the  upstream  to the  downstream
extremities of the RCHRES.  (It is used if section OXRX is active and reaeration
is being computed using the Tsivoglou-Wallace equation;  or if section SEDTRN  is
active  and sandload  transport  capacity is  being  computed  using either  the
Toffaleti or Colby method.)

STCOR is the correction to the RCHRES depth to calculate stage.    (Depth  + STCOR
= Stage)

KS is  the weighting factor  for hydraulic routing.    Choice of a  realistic  KS
value is discussed in the functional description of the HYDR section in Part E.

DB50 is the median diameter of the bed sediment  (assumed constant  throughout
the run). This value is used to  :
1. Calculate the bed shear stress if the RCHRES is a lake.
2. Calculate the rate of  sand transport if the Colby or Toffaleti  methods
   are used.
In the HSPF  code,  it is in no  way connected with the value   for sand particle
diameter supplied in Table-type  SAND-pM (for  Section SEDTRN).
                                       538                            RELEASE 8.0

-------
                                                    RCHRES — Section HYDR input

4.4(3).2.3  Table-type MON-CONVF — Monthly F(VOL) adjustment factors
         12345678
12345678901234567890123456789012345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
******

  MON-CONVF
  <-range><	mon-convf-
  (repeats until all operations of this type are covered)

  END MON-CONVF
*******
Example
*******
  MON-CONVF
    RCHRES  Monthly F(VOL) adjustment factors***
    # -  #  JAN  FEB  MAR  APR  MAY  JUN  JUL  AUG  SEP  OCT  NOV  DEC***
    1    7  .97  .89  .89  .91  .93  .93  .94  .95  .95  .98  .98  .97
  END MON-CONVF
Details

Symbol         Fortran        Format  Def     Min     Max
               name(s)

    CONVFM(12)     12F5.0  0.0     0.0     none
                                       539                             RELEASE 8.0

-------
                                                    RCHRES — Section HYDR input

4.4(3).2.4  Table-type HYDR-INIT — Initial conditions for HYDR section
         1          2345678
1234567890123456789012345678901 2345678901234567890123456789012345678901234567890
*******
Layout
******
  HYDR-INIT
  <-range><—vol	>
-colind-
     -outdgt-
  (repeats until all operations of this type are covered)

  END HYDR-INIT
*******
Example
*******
  HYDR-INIT
    RCHRES  Initial conditions for HYDR section***
    # _  #***    VOL     Initial  value  of COLIND
          ***  ac-ft     for each  possible   exit
    5          3245.       4.2  4.5  4.5  4.5  4.2
  END HYDR-INIT
                       initial  value  of OUTDGT
                       for each  possible   exit
2.1  1.2
                                    .5  1.2  1.8
Details
Symbol




Fortran
name ( s )
VOL
COLIND(5)
OUTDGT(5)

Format Def
F10.0 0.0
0.0
5F5.0 4.0
5F5.0 0.0
0.0

Min
0.0
0.0
4.0
0.0
0.0

Max
none
none
8.0
none
none

Units
acre-ft
Mm3
none
ft3/s
m3/s

Unit
system
Engl
Metric
Both
Engl
Metric
                                       540
                                      RELEASE 8.0

-------
                                                    RCHRES — Section HYDR input

Explanation


VOL is the initial volume of water in the RCHRES.

The value  of COLIND(  )  for  an exit  indicates the  pair of  columns used  to
evaluate the initial  value of the F(VOL)   component of outflow demand  for the
exit.

The array OUTDGT( )  specifies the G(T)  component of the initial outflow demand
for each exit from the RCHRES.

A non-zero value of COLIND(I)  is only meaningful if the outflow from exit I has
an  f(VOL)  component.   Similarly,  a  non-zero  value for  OUTDGT(I)  is  only
meaningful if the outflow from exit I has a g(t) component.
4.4(3).3  RCHRES BLOCK — Section ADCALC input
         12345678
12345678901234567890123456789012345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
******

 [Table-type ADCALC-DATA]
Explanation

The exact  format of  this input is  detailed below.   Table ADCALC-DATA  is  not
always required because its contents can be defaulted.
                                      541                             RELEASE 8.0

-------
                                                  RCHRES — Section ADCALC  input

4.4(3).3.1   Table-type ADCALC-DATA — Data for section ADCALC
         1          2345678
123456789012345678901234567890123456789012345678901 23456789012345678901234567890
*******
Layout
******

  ADCALC-DATA
  <-range ><	adcalc-data	>
  (repeats until all operations of this type are covered)

  END ADCALC-DATA
*******
Example
*******
  ADCALC-DATA
    RCHRES  Data for section ADCALC***
    # -  #     CRRAT       VOL***
    5            1.7      324.
  END ADCALC-DATA
Details
Symbol



Fortran
name ( s )
CRRAT
VOL

Format Def
2F10.0 1.5
0.0
0.0

Min
1 .0
0.0
0.0

Max Units
none none
none acre-ft
none Mm3

Unit
system
Both
Engl
Metric
Explanation
CRRAT  is   the  ratio   of  maximum  velocity  to mean velocity  in the  RCHRES cross
section under  typical flow conditions.
 VOL  is  the  volume  of  water in the RCHRES at the start of the simulation.
 of this value  is not  necessary if section HYDR is active.
      Input
                                       542
RELEASE 8.0

-------
                                                    RCHRES — Section CONS input

4.4(3).4  RCHRES BLOCK — Section CONS input
         12345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901 234567890

Layout
******

 [Table-type NCONS]

  Table-type CONS-DATA     |    repeat for each conservative constituent
Explanation

The exact formats of  these tables are detailed below.  Table-type  NCONS is not
required  if  only one  conservative  constituent  is being  simulated  (default
value).
                                      543                            RELEASE 8.0

-------
                                                    RCHRES — Section CONS input

4.4(3).4.1   Table-type NCONS — Number of conservative constituents simulated
         1          2345678
1234567890123456789012345678901 2345678901 2345678901 23456789012345678901234567890
*******
Layout
******

  NCONS
  <-range>
  (repeats until all operations of this type are covered)

  END NCONS

*******
Example
*******

  NCONS
    RCHRES     ***
    # -  #NCONS***
    1    7    4
  END NCONS

 *******

Details

Symbol         Fortran        Format  Def     Min     Max
               name(s)

          NCONS          15      1       1       10



4.4(3).4.2  Table-type CONS-DATA — Information  about one  conservative  substance
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******
  CONS-DATA
  <-range><	conid	><	con—>   <—conv—>   

  (repeats until  all operations  of  this  type  are  covered)
  . •	
  END CONS-DATA


                                       544                            RELEASE 8.0

-------
                                                    RCHRES —  Section  CONS input
*******

Example
*******
  CONS-DATA
    RCHRES  Data for conservative constituent No. 3***
# - # Substance-id Cone
1 7 Total Diss Solids 251.3
END CONS-DATA
********************************************
Details
Symbol






Fortran Format Def
name ( s )
CONID(5) 5A4 none
CON F 1 0 . 0 0.0
CONCID 2A4 none
CONV F 1 0 . 0 none
QTYID 2A4 none
ID CONV
mg/1 1000.
*****************

Min Max
none none
0.0 none
none none
1.0E-30 none
none none
QTYID ***
kg
*******************

Units Unit
system
none Both
concid Both
none Both
see below
none Both
                                      545
                                                                     RELEASE 8.0

-------
                                                 RCHRES — Section HTRCH input
Explanation
Any  string  of  up to  20  characters  may  be  supplied  as the  name  of  the
conservative constituent (CONID).

CON is the initial concentration of the conservative.

CONCID is a string of up to 8 characters which specifies the concentration units
for the conservative  constituent.   If the constituent  provides the alkalinity
time series for section PHCARB, CONCID must be mg/1 as CaCO3.

CONV is the conversion factor from  QTYID/VOL to the desired concentration units
(CONCID):   CONG = CONV*(QTY/VOL).   If UUNITS is  1, VOL is in ft3;  if  it is  2,
VOL is in m3. For example, if:
                              ' CONCID is mg/1
                               QTYID is kg
                               VOL is in m3,

                               then CONV=1000.

QTYID is a string  of up to 8 characters which specifies the  units  in which the
total flow of constituent  into,  or out of,  the  RCHRES  will be expressed,  eg
"kg".
                                     546                             RELEASE 8.0

-------
                                                   RCHRES — Section HTRCH input

4.4(3).5  RCHRES BLOCK — Section HTRCH input
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

 [Table-type HEAT-PARM]
 [Table-type HEAT-INIT]
Explanation

The exact format  of each of the  tables above is detailed  in the documentation
which follows.  Tables in brackets []  need not always be supplied; for example,
because all of the inputs have default values.
4.4(3).5.1  Table-type HEAT-PARM — Parameters for section HTRCH
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  HEAT-PARM
  <-range><—elev—><—eldat-><—cf sx—><—ktrd—><—kcnd—><—keyp—>

  (repeats until all operations of this type are covered)

  END HEAT-PARM
*******
Example
*******
  HEAT-PARM
    RCHRES      ELEV     ELDAT    CFSAEX    KATRAD     KCOND     KEVAP ***
    # -  #        ft        ft                                          ***
    1    7     2000.     1500.         .5       6.5        11.         4.
  END HEAT-PARM
                                      547                            RELEASE  8.0

-------
                                                   RCHRES — Section HTRCH input
Details
Symbol







Fortran
name ( s )
ELEV
ELDAT
CFSAEX
KATRAD
KCOND
KEVAP

Format
F10.0
F10.0
F10.0
F10.0
F10.0
F10.0

Def
0.0
0.0
0.0
0.0
1 .0
9.37
6.12
2.24

Min
0.0
0.0
none
none
0.001
1.00
1 .00
1.00

Max
30000.
10000.
none
none
2.0
20.
20.
10.

Units
ft
m
ft
m
none
none
none
none

Unit
system
Engl
Metric
Engl
Metric
Both
Both
Both
Both
Explanation

ELEV is the mean RCHRES elevation.
ELDAT is the difference in elevation between  the RCHRES and the air temperature
gage (positive if RCHRES is higher than the gage).
CFSAEX is  the correction factor  for solar  radiation (it includes  fraction of
RCHRES surface exposed to radiation).
KATRAD is the longwave radiation coefficient
KCOND is the conduction-convection heat transport  coefficient.
KEVAP is the evaporation coefficient.
                                       548
                                                                      RELEASE 8.0

-------
                                                   RCHRES — Section HTRCH input

4.4(3).5.2  Table-type HEAT-INIT — Initial conditions
         12345678
1 2345678901 2345678901 2345678901 2345678901 234567890123456789012345678901234567890
*******
Layout
******

  HEAT-INIT
  orangex	init-temp	>
  (repeats until all operations of this type are covered)

  END HEAT-INIT
*******
Example
*******
  HEAT-INIT
    RCHRES
    # -  #
    1    7
  END HEAT-INIT
  TW
degF
 62.
AIRTMP ***
  degF ***
   70.
Details
Symbol






Fortran
name ( s )
TW

AIRTMP


Format Def

F10.0 60.
15.5
F10.0 60.
15.5

Min

32.
0.0
-90.
-70.0

Max

200.
95.
150.
65.

Units

degF
degC
degF
degC

Unit
system
Engl
Metric
Engl
Metric
Explanation

TW is  the water  temperature and AIRTMP  indicates  the   air  temperature   at the
RCHRES.
                                       549
                                                      RELEASE 8.0

-------
                                                  RCHRES — Section SEDTRN input
4.4(3).6  RCHRES-BLOCK —  Section SEDTRN input
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
Layout
       ******
 [Table-type SANDFG]
  Table-type SED-GENPARM
  Table-type SED-HYDPARM
  Table-type SAND-PM
  Table-type SILT-CLAY-PM
 [Table-type SSED-INIT]
 [Table-type BED-INIT]
—  only if  Section HYDR is inactive

 — repeat  twice,  1st for silt,  2nd for clay
Explanation

The exact format  of each of the  tables above is detailed  in the documentation
which follows.  Tables in brackets []  need not always be supplied; for example,
because all of the inputs have default values.
                                       550
                                           RELEASE  8.0

-------
                                                  RCHRES — Section SEDTRN input

4.4(3).6.1   Table-type SANDFG — Sandload method flag
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  SANDFG
  <-range>
  (repeats until all operations of this type are covered)

  END SANDFG

*******
Example
*******

  SANDFG
    RCHRES      ***
    # -  # SDFG ***
    2         2
  END SANDFG
Details
Symbol


Fortran
name ( s )
SANDFG

Format Def Min Max
15 3 1 3
Explanation

SANDFG indicates the method that will be used for sandload  simulation:
       1 means Toffaleti method
       2 means Colby method
       3 means the "old" HSPF input power function method.
                                       551                             RELEASE 8.0

-------
                                                  RCHRES — Section SEDTRN input

4.4(3).6.2  Table-type SED-GENPARM — General sediment related parameters
         1          2345678
1234567890123456789012345678901 2345678901 2345678901 23456789012345678901234567890

Layout
******

  SED-GENPARM
  <-range ><	gen-parm	>

  (repeats until all operations of this type are covered)

  END SED-GENPARM

*******
Example
*******
  SED-GENPARM
    RCHRES    BEDWID    BEDWRN
    # -  #       (m)       (m)
    3   10       30.        2.
  END SED-GENPARM
FOR***
   ***
0.4
Details
Symbol







Fortran
name ( s )
BEDWID

BEDWRN

FOR

Format

F10.0

F10.0

F10.0

Def

none
none
100.
30.5
0.5

Min

1 .0
0.3
.001
.0003
0.1

Max

none
none
none
none
0.9

Uni ts

ft
m
ft
m


Unit
system
Engl
Metric
Engl
Metric
Both
Explanation

BEDWID is  the width  of   the   cross-section  over   which  HSPF  will assume  bed
       sediment is deposited regardless  of  stage,  top-width,  etc.   It is used to
       estimate the depth  of bed  sediment (BEDDEP).

BEDWRN is  the bed depth which,  if exceeded  (eg,  through deposition) will cause a
       warning message to  be printed.

FOR  is the   porosity  of  the bed   (volume voids/total  volume).  It  is used  to
     estimate bed depth.
                                       552
                                 RELEASE 8.0

-------
                                                  RCHRES — Section SEDTRN input

4.4(3).6.3  Table-type SED-H^DPARM — Parameters normally read in Section HYDR
         12345678
12345678901234567890123456789012345678901 2345678901 2345678901 2345678901 234567890

Layout
******

  SED-HYDPARM
  <-range><	sed-hydparm	>

  (repeats until all operations of this type are covered)

  END SED-HYDPARM

*******
Example
*******
  SED-HYDPARM
    RCHRES       LEN     DELTH
    # -  #      (km)       (m)
    2            5.0       4.0
    5           20.0       5.0
  END SED-HYDPARM
DB50***
(mm)***
 0.5
 0.3
Details
Symbol
< sed-hydparm>



Fortran
name ( s )
LEN
DELTH
DB50

Format
F10.0
F10.0
F10.0

Def
none
none
0.0
0.0
.01
.25

Min
0.01
0.016
0.0
0.0
.0001
.0025

Max
none
none
none
none
100.
2500.

Units
miles
km
ft
m
in
mm

Unit
system
Engl
Metric
Engl
Metric
Engl
Metric
Explanation

This table is only  required and read if Section  HYDR   is  not  active.    Normally
these parameters are supplied in Table-type HYDR-PARM2  where they are  defined.
                                      553
                                 RELEASE 8.0

-------
                                                  RCHRES — Section SEDTRN input

4.4(3).6.4  Table-type SAND-PM — Parameters related to sand
         12345678
1234567890123456789012345678901234567890123456789012345678901 2345678901234567890

Layout
******

  SAND-PM
  <-range><	sand-parms	>

  (repeats until all operations of this type are covered)

  END SAND-PM

*******
Example
*******
  SAND-PM
    RCHRES         D
    # -  #      (in)
    3            .01
  END SAND-PM
       W ***
(in/sec) ***
     1.2
Details
Symbol







Fortran
name ( s )
D

W

RHO
KSAND
EXPSND
Format
F10.0

F10.0

F10.0
F10.0
F10.0
Def
none
none
none
none
2.65
0.0
0.0
Min
.001
.025
.02
.5
1 .0
0.0
0.0
Max
100.
2500.
500.
12500.
4.0
none
none
Units Unit
system
in Engl
mm Metric
in/sec Engl
mm/ sec Metric
gm/cm3 Both
complex Both
complex Both
 Explanation

 D  is  the  effective   diameter  of  the  transported   sand  particles,   and W  is  the
   corresponding  fall velocity in still  water.    Note  that the transport formulae
   do  not  actually use D  (they use DB50,   supplied in  Table-type HYDR-PARM2).   D
   is  included  here  for  consistency   with the  input  data supplied  for cohesive
   sediment.

 RHO is  the density  of the  sand particles.

 KSAND and EXPSND need only be supplied if  the  "old"  HSPF sandload  input power
      function formula is   used (i.e.,   SANDFG=3).  They  are respectively,  the
      coefficient and exponent in that  formula.
                                       554
                                                RELEASE 8.0

-------
                                                  RCHRES — Section SEDTRN input

4.4(3).6.5  Table-type SILT-CLAY-PM — Parameters for silt or clay
         12345678
1 2345678901 2345678901 2345678901 2345678901234567890123456789012345678901234567890
*******
Layout
******
  SILT-CLAY-PM
  <-range><	
            	silt-clay-pm	


(repeats until all operations of this type are covered]

END SILT-CLAY-PM
*******
Example
*******
  SILT-CLAY-PM
    RCHRES
    # -  #
    6
    9
  END SILT-CLAY-PM
D
(mm)
.03
.04
W
(mm/ sec)
.80
1.5
RHO
(gm/cm3)
2.7
2.6
TAUCD
(kg/m2)
2.0
2.0
                                                     TAUCS         M  ***
                                                   (kg/m2) (kg/m2.d)  ***
                                                       2.5       0.1
                                                       3.0       .08
Details
Symbol Fortran
name ( s )
 D

W

RHO
TAUCD

TAUCS

M


Format

F10.0

F10.0

F10.0
F10.0

F10.0

F10.0


Def

0.0
0.0
0.0
0.0
2.65
1.0E10
1 .OE10
1 .OE10
1.0E10
0.0
0.0

Min

0.0
0.0
0.0
0.0
2.0
1 .OE-10
1.0E-10
1 .OE-10
1 .OE-10
0.0
0.0

Max

.003
.07
.2
5.0
4.0
none
none
none
none
none
none

Units

in
mm
in/sec
mm/sec
gm/cm3
Ib/ft2
kg/m2
Ib/ft2
kg/m2
Ib/ft2
kg/m2.

Unit
system
Engl
Metric
Engl
Metric
Both
Engl
Metric
Engl
Metric
.dEngl
d Metric
                                       555
                                                                      RELEASE 8.0

-------
                                                  RCHRES — Section SEDTRN  input

Explanation

This table must be supplied twice; first for silt, then for clay.

D is the  effective diameter of  the particles and  W is the  corresponding fall
  velocity in still water.

RHO is the density of the particles.

TAUCD is the critical bed shear stress for deposition.  Above this stress,  there
      will be  no deposition;   as the stress  drops below  this value   to  zero,
      deposition  will gradually  increase  to the  value  implied  by  the   fall
      velocity in still water.

TAUCS is the critical bed shear stress for scour.  Below this value,  there will
      be no scour; above it, scour will steadily increase.

In general TAUCD should be less than or equal to TAUCS.

M is the credibility coefficient of the sediment.

Note that the default values for W,  TAUCD,  TAUCS,  and M have been  set so that
silt and clay will behave the same way as "washload" previously behaved in  HSPF.
That is,  material will settle at the rate implied by W  (defaulted to zero)  and
there will be no scour; the material will behave like a conservative  substance.
                                       556                            RELEASE 8.0

-------
                                                  RCHRES — Section SEDTRN input

4.4(3).6.6  Table-type SSEO-INIT — Initial concentrations of suspended
            sediment
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  SSED-INIT
  <-range><	ssed-init	—	>

  (repeats until all operations of this type are covered)

  END SSED-INIT

*******
Example
*******

  SSED-INIT
    RCHEES     Suspended sed cones (mg/1) ***
    # -  #      Sand      Silt      Clay  ***
    1    5      100.       50.       20.
  END SSED-INIT
Details
Symbol


Fortran
name ( s )
SSED(3)

Format Def Min Max Units Unit
system
3F10.0 0.0 0.0 none mg/1 Both
Explanation

The three  values supplied  are the initial  concentrations  (in   suspension)   of
sand, silt, and clay, respectively.
                                       557
RELEASE 8.0

-------
                                                  RCHRES — Section SEDTRN input

4.4(3).6.7  Table-type BED-INIT — Initial fractions of bed sediment
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  BED-INIT
  <-rangex-bed-dep>
  (repeats until all operations of this type are covered)

  END BED-INIT

*******
Example
*******

  BED-INIT
    RCHRES    BEDDEP  Initial bed composition       ***
    # -  #       (m)      Sand      Silt      Clay  ***
    3            1.5       0.6       0.2        0.2
  END BED-INIT
Details
Symbol







Fortran
name ( s )
BEDDEP

temporary
array


Format

F10.0

F10.0
F10.0
F10.0

Def

0.0
0.0
1 .0
0.0
0.0

Min

0.0
0.0
.0001
0.0
0.0

Max

none
none
1 .0
.9999
.9999

Units

ft
m
none
none
none

Unit
system
Engl
Metric
Both
Both
Both
Explanation

BEDDEP  is  the  initial  total  depth  (thickness)  of  the bed.

The  three  values  supplied  under  ,   ,   and  are the
initial fractions (by  weight)  of sand,  silt,   and clay in  the bed material.  The
default values are  arranged   to  simulate   an  all-sand bed.   The  sum of  the
fractions  must be 1.00.
                                       558
RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7  RCHRES-BLOCK —  Section GQUAL input
         1          2345678
123456789012345678901234567890123456789012345678901 23456789012345678901 234567890

Layout
******

 [Table-type GQ-GENDATA]

  next 15 tables — repeat for each qual
    Table-type GQ-QALDATA
   [Table-type GQ-QALFG]
   [Table-type GQ-FLG2]
    Table-type GQ-HYDPM  — only if qual undergoes hydrolysis (QALFG(1,I)=1)
    Table-type GQ-ROXPM  — only if qual undergoes oxidation (QALFG(2,I)=1)
   [Table-type GQ-PHOTPM]  — only if qual undergoes photolysis (QALFG(3,I)=1)
    Table-type GQ-CFGAS  — only if qual undergoes volatilization (QALFG(4,I)=1)

  next 2 tables — only if qual undergoes biodegradation (QALFG(5,I)=1)
      Table-type GQ-BIOPM
      Table-type MON-BIO  — only if biomass is input monthly (GQPM2(7,I)=3)
    Table-type GQ-GENDECAY  — only if qual has "general" decay (QALFG(6,I)=1)

  next 5 tables — only if qual is sediment associated  (QALFG(7,I)=1)
      [Table-type GQ-SEDDECAY]
      Table-type GQ-KD
      Table-type GQ-ADRATE
      [Table-type GQ-ADTHETA]
      [Table-type GQ-SEDCONC]

   [Table-type GQ-VALUES]

  next 3 tables — only if the data are  to be read as monthly values
                   ("Source" flag in Table-type GQ-GENDATA is ON)
   [Table-type MON-WATEMP]
   [Table-type MON-PHVAL]  — only if there is hydrolysis (any QALFG(1)=1)
   [Table-type MON-ROXYGEN]  — only if  there is oxidation (any QALFG(2)=1)

  next 8 tables — only if there is photolysis (any QALFG(3) = 1)
    Table-type GQ-ALPHA
   [Table-type GQ-GAMMA]
   [Table-type GQ-DELTA]
   [Table-type GQ-CLDFACT]

  next 3 tables — only if the data are  to be read as monthly values
                   ("Source" flag in Table-type GQ-GENDATA is ON)
      [Table-type MON-CLOUD]
      [Table-type MON-SEDCONC]
      [Table-type MON-PHYTO]
   [Table-type SURF-EXPOSED]  — only if Section HTRCH  is inactive
                               (see Section PLANK  for documentation)

                                      559                            RELEASE  8.0

-------
                                                   RCHRES — Section GQUAL input

  next 7 tables — only if there is volatilization (any QALFG(4)  = 1)
   [Table-type OX-FLAGS]
   [Table-type ELEV]
   [Table-type OX-CFOREA]
   [Table-type OX-TSIVOGLOU]
    Table-type OX-LEN-DELTH
   [Table-type OX-TCGINV]
    Table-type OX-REAPARM
 [Table-type GQ-DAUGHTER]  —  repeat for each decay process that produces
                             "daughter" quals from "parents"
Explanation

A qual is a generalized quality constituent simulated using this module section.

The exact  format of  each of the  tables above,   except those  "borrowed" from
Sections OXRX and PLANK, is detailed in the documentation which follows.  Tables
in brackets []  need  not always be supplied;  for example,   because all of the
inputs have default values.
                                       560                             RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.1   Table-type GQ-GENDATA — General input for Section GQUAL
         12345678
1234567890123456789012345678901234567890123456789012345678901 2345678901234567890

Layout
******

  GQ-GENDATA
  <-range><	source-fgs	>

  (repeats until all operations of this type are covered)

  END GQ-GENDATA

*******
Example
*******

  GQ-GENDATA
    RCHRES NGQL TPFG PHFG ROFG CDFG SDFG PYFG  LAT***
    # -  #                                         ***
    1    73221    223   48
  END GQ-GENDATA
Details
Symbol










Fortran
name ( s )
NGQUAL
TEMPFG
PHFLAG
ROXFG
CLDFG
SDFG
PHYTFG
LAT

Format

15
15
15
15
15
15
15
15

Def

1
2
2
2
2
2
2
0

Min

1
1
1
1
1
1
1
-54

Max

3
3
3
3
3
3
3
54

Units

none
none
none
none
none
none
none
degrees

Unit
system
Both
Both
Both
Both
Both
Both
Both
Both
                                       561
RELEASE 8.0

-------
                                                   RCHRES ~ Section GQUAL input

Explanation

NGQUAL - number of generalized constituents (quals) being simulated.
TEMPFG - source of water temperature data.  1  means a time series - either input
         or computed;  2  means a single user-supplied value;  3  means 12 user-
         supplied values (one for each month).
PHFLAG - source of pH  data.  Input only if any  QALFG(1)=1.  Source designation
         scheme same as for TEMPFG.
ROXFG - source of free radical oxygen data. Input only if any QALFG(2)=*1. Source
        designation scheme same as for TEMPFG.
CLDFG - source  of cloud  cover data.   Input  only if  any QALFG(3)=1.   Source
        designation scheme same as for TEMPFG.
SDFG - source  of  total  sediment  concentration   data.   Input  only  if  any
       QALFG(3)=1.  Source designation scheme same as for TEMPFG.
PHYTFG - source of  phytoplankton data.  Input  only if any  QALFG(3)=1.  Source
         designation scheme same as for TEMPFG.
LAT - latitude  of the  RCHRES.  Input  only  if any  QALFG(3)=1.  Positive  for
      northern hemisphere.
                                       562                            RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.2  Table-type GQ-QALDATA — Data for a generalized quality constituent
                                     (qual)
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  GQ-QALDATA
  <-range><	9<—dqal—>      <—conv—>  

  (repeats until all operations of this type are covered)

  END GQ-QALDATA
*******
Example
*******

  GQ-QALDATA
    RCHRES  ***           GQID      DQAL    CONCID      CONV     QTYID
    ft -  #  ***
    1    7           Coliforms       2.0         #      .001          #
  END GQ-QALDATA
Details
Symbol







Fortran
name ( s )
GQID
DQAL
CONCID
CONV
QTYID

Format

5A4
F10.0
A4
F10.0
2A4

Def

none
0.0
none
none
none

Min

none
0.0
none
1.0E-30
none

Max

none
none
none
none
none

Units

none
concid
none
see bel
none

Unit
system
Both
Both
Both
ow
Both
Explanation

GQID - Name of dissolved constituent  (qual).
DQAL - Initial concentration of qual.
CONCID - Concentration units (implied that it  is  "per  liter")  eg."mg"(/l).
CONV - Factor to convert from Qty/Vol to concentration units:
       Conc= CONV* Qty/Vol   (in English system,  Vol is  in  ft3)
       (in Metric system, Vol is in m3).
QTYID - Name of "Qty" unit for qual.
                                       563                             RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.3  Table-type GQ-QALFG — First set of flags for a qual
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  GQ-QALFG
  <-range><	degrad-fgs	>

  (repeats until all operations of this type are covered)

  END GQ-QALFG

*******
Example
*******

  GQ-QALFG
    RCHRES HDRL OXID PHOT VOLT BIOD  GEN SDAS***
    # -  #                                   ***
    171100101
  END GQ-QALFG
Details
Symbol








Explanation
Fortran
name ( s )
QALFG(1 )
QALFG(2)
QALFG(3)
QALFG(4)
QALFG(5)
QALFG(6)
QALFG ( 7 )

Format

15
15
15
15
15
15
15

Def

0
0
0
0
0
0
0

Min

0
0
0
0
0
0
0

Max

1
1
1
1
1
1
1

Units

none
none
none
none
none
none
none

Unit
system
Both
Both
Both
Both
Both
Both
Both

 QALFGd)  -  indicates  whether  hydrolysis  is  considered for dissolved qual.
 QALFG(2)  -  indicates  whether  oxidation by free  radical oxygen is considered for
            dissolved  qual.
 QALFG(3)  -  indicates  whether  photolysis  is  considered for dissolved qual.
 QALFG(4)  -  indicates  whether  volatilization is  considered for dissolved qual.
 QALFG(5)  -  indicates  whether  biodegradation is  considered for dissolved qual.
 QALFG(6)  -  indicates  whether  general first  order decay is considered for
            dissolved  qual.
 QALFG(7)  -  indicates  whether  or not qual is associated with sediment. If so,
            adsorption/desorption of qual is considered.
                                       564
RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL  input

4.4(3).7.4  Table-type GQ-FLG2 — Second set of flags for a qual
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  GQ-FLG2
  <-range><	daughter proc™	>

  (repeats until all operations of this type are covered)

  END GQ-FLG2

*******
Example
*******

  GQ-FLG2
    RCHRES HDRL OXID PHOT VOLT BIOD  GEN SBMS***
    # -  #                                   ***
    170010102
  END GQ-FLG2
Details
Symbol



Fortran
name ( s )
proc>GQPM2 ( 1 )
GQPM2(2)
GQPM2 ( 3 )
GOPM2 ( 4 }
GQPM2C5)
GQPM2 ( 6 )
GQPM2(7J

Format

15
15
15
15
15
15
15

Def

0
0
0
0
0
0
2

Min

0
0
0
0
0
0
1

Max

1
1
1
1
1
1
3

Units

none
none
none
none
none
none
none

Unit
system
Both
Both
Both
Both
Both
Both
Both
Explanation

GQPM2(1) through GQPM2(6)   indicate whether  or  not  this   qual  is   a "daughter"
         product  through  each  of  the    six  decay processes  (1-hydrolysis,
         2-oxidation, 3-photolysis, 4-reserved  for  future  use, 5-biodegradation,
         6-general first order decay).
GQPM2{7) indicates  the  source  of  biomass  data  for  qual.    Input  only  if
         QALFG(5)=1.  (1-time series 2-single value  3-twelve monthly values)
                                       565
RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.5  Table-type GQ-HYDPM — Hydrolysis parameters
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  GQ-HYDPM
  <-range><	hydrol-parms	>

  (repeats until all operations of this type are covered)

  END GQ-HYDPM

*******
Example
*******
  GQ-HYDPM
    RCHRES        KA        KB        KN
    # -  #
    1    7     5000.       50.     .00004
  END GQ-HYDPM
THHYD***
     ***
 1.03
Details
Symbol






Fortran
name ( s )
KA
KB
KN
THHYD

Form

F10.
F10.
F10.
F10.

at

0
0
0
0

Def

none
none
none
1.0

M

1
1
1
1

in

•OE-30
.OE-30
.OE-30
.0

Max

none
none
none
2.0

Units

/M-sec
/M-sec
/sec
none

Unit
system
Both
Both
Both
Both
Explanation

KA -  second order acid  rate  constant  for  hydrolysis
KB -  second order base  rate  constant  for  hydrolysis
KN -  first order rate constant  of  neutral reaction with water
THHYD -  temperature  correction  coefficient for hydrolysis
                                       566
                         RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3)!7.6  Table-type GQ-ROXPM — Parameters for free radical oxidation
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  GQ-ROXPM
  <-range > <	rox-pm	>
  (repeats until all operations of this type are covered)

  END GQ-ROXPM

*******
Example
*******
  GQ-ROXPM
    RCHRES       KOX
    # -  #
    1    7   .000014
  END GQ-ROXPM
THOX***
    ***
1.01
Details
Symbol


Fortran
name ( s )
KOX
THOX

For;
F10
F10

mat
.0
.0

Def
none
1.0

M
1
1

in
.OE-30
.0

Max
none
2.0

Units
/M.sec
none

Unit
system
Both
Both
Explanation

KOX - second order rate constant for oxidation by  free radical  oxygen
THOX - temperature correction coefficient for oxidation by  free radical
       oxygen
                                       567
                                           RELEASE 8.0

-------
                                                   RCHRES — Section  GQUAL input

4.4(3).7.7  Table-type GQ-PHOTPM — Parameters for photolysis
         12345678
1234567890123456789012345678901 23456789012345678901 23456789012345678901234567890
*******
Layout
******
  GQ-PHOTPM
  <-range><-
  <-range><-
  <-range><-
	first-7	
	second-7	
-last-4	><—phi	><-theta—>
  (repeats until all operations of this type are covered)

  END GQ-PHOTPM
*******
Example
*******
GQ-PHOTPM
#
#
#
1
1
1
END
- #***
- #***
- #***
7
7
7
GQ-PHOTPM
                  K1
                  K8
                 K15
                  .5
                  .5
                  .5
   K2
   K9
  K16
   .5
   .5
   .5
 K3
K10
K17
 .5
 .5
 .5
 K4
K11
K18
 .5
 .5
 .5
 K5
K12
PHI
 .5
 .5
.47
   K6
  K13
THETA
   .5
   .5
 1.02
 K7
K14

 .5
 .5
Details
Symbol







Fortran
name ( s )
PHOTPM(1-7)
PHOTPM(8-14)
PHOTPM(15-18)
PHOTPM(19)
PHOTPM(20)

Format

F10.0
F10.0
F10.0
F10.0
F10.0

Def

0.0
0.0
0.0
1 .0
1.0

Min

0.0
0.0
0.0
.0001
1.0

Max

none
none
none
10.0
2.0

Units

1/M.cm
1/M.cm
1/M.cm
M/E
none

Unit
system
Both
Both
Both
Both
Both
                                       568
                                             RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

Explanation

PHOTPMd) through PHOTPM(18)  are molar absorption  coefficients for qual for 18
          wavelength ranges of light (see  functional description for subroutine
          DDECAY in Part E).
PHOTPMd9) is the quantum yield for the qual in air-saturated pure water.
PHOTPM(20) is the temperature correction coefficient for photolysis.

When an entry has to be continued onto more than 1 line:

1.  No blank  or "comment"  lines may  be put  between any  of the  lines for  a
    continued entry. Put all comments ahead of the entry. (See above example).
2.  The   specification must  be repeated  for each  line onto  which the
    entry is continued.
                                      569                            RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.8  Table-type GQ-CFGAS — Ratio of volatilization to oxygen reaeration
            rate
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  GQ-CFGAS
  <-range><—cfgas->
  (repeats until all operations of this type are covered)

  END GQ-CFGAS

*******
Example
*******

  GQ-CFGAS
    RCHRES     CFGAS***
    # -  #          ***
    1    7       .70
  END GQ-CFGAS
Details
Symbol         Fortran        Format  Def     Min     Max     Units    Unit
               name(s)                                                 system

        CFGAS          F10.0   none    1.0E-30 none    none     Both
Explanation

CFGAS - ratio of volatilization rate .to  oxygen  reaeration rate
                                       570                             RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.9  Table-type GQ-BIOPM — Biodegradation parameters
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  GQ-BIOPM
  <-range><	bioparm	>

  (repeats until all operations of this type are covered)

  END GQ-BIOPM

*******
Example
*******
  GQ-BIOPM
    RCHRES
    # -  #
    1    7
  END GQ-BIOPM
BIOCON
   .31
THBIO

 1.07
BIO***
   ***
.04
Details
Symbol

Fortran
name ( s )
BIOCON
THBIO
BIO
Format
F10
F10
F10
.0
.0
.0
Def
none
1.07
none
Min
1
1
0
.OE-30
.0
.00001
Max
none
2.0
none
Units
Unit
system
1/mg/dayBoth
none Both
mg/1 Both
Explanation

BIOCON - second order rate constant for biomass concentration causing
         biodegradation of qual
THBIO - temperature correction coefficient for biodegradation of qual
BIO - concentration of biomass causing biodegradation of qual
                                      571
                                                       RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.10  Table-type MON-BIO — Monthly values of biomass
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
  MON-BIO
  <-range><
            	12-values	

(repeats until all operations of this type are covered)

END MON-BIO
*******
Example
*******
  MON-BIO
    RCHRES  BM1  BM2  BM3  BM4  BM5  BM6  BM7  BM8  BM9 BM10 BM11 BM12***
    # -  #                                                             ***
    1    7  .03 .035  .03  .02  .02  .03  .03  .035  .040 .060 .050 .035
  END MON-BIO
Details
Symbol
<1 2-values >

Fortran
name ( s )
BIOM(1-12)

Format Def Min Max Units
F5.0 none 0.00001 none mg/1

Unit
system
Both
Explanation

BIOM(1) through BIOM(12) are monthly concentrations  of biomass  causing
        biodegradation of qual. This table must be included  in  the  UCI only if
        GQPM2(7) is assigned a value of  3 in Table-type  GQ-FLG2 (4.4(3).7.4).
                                       572
                                                                    RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.11   Table-type GQ-GENDECAY — Parameters for "general" decay
         12345678
1 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
  GQ-GENDECAY
  <-range>< ---- decay-pms-
  (repeats until all operations of this type are covered)

  END GQ-GENDECAY

*******
Example
*******

  GQ-GENDECAY
    RCHRES    FSTDEC     THFST***
    # -  #                    ***
    1    7       0.2      1.05
  END GQ-GENDECAY
Details
Symbol


Fortran
name ( s )
FSTDEC
THFST

Format
F10.0
F10.0

Def
none
1 .07

Min
.00001
1 .0

Max
none
2.0

Units
/day
none

Unit
system
Both
Both
Explanation

FSTDEC - first order decay rate for qual
THFST - temperature correction coefficient for first order decay of qual
                                      573
RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.12  Table-type GQ-SEDDECAY — Parameters for decay of contaminant
             adsorbed to sediment
         1          2345678
12345678901234567890123456789012345678901 2345678901 23456789012345678901234567890

Layout
******

  GQ-SEDDECAY
  <-range><	ads-decay	>

  (repeats until all operations of this type are covered)

  END GQ-SEDDECAY

*******
Example
*******

  GQ-SEDDECAY
    RCHRES     KSLJSP    THSUSP      KBED     THBED***
    # -  #                                         ***
    1    7        .01      1.06      .005       1.03
  END GQ-SEDDECAY
Details
Symbol






Fortran
name ( s )
ADDCPMd )
ADDCPM(2)
ADDCPM ( 3 )
ADDCPM ( 4 )

Format

F10.0
F10.0
F10.0
F10.0

Def

0.0
1.07
0.0
1.07

Min

0.0
1.0
0.0
1.0

Max

none
2.0
none
2.0

Units

/day
none
/day
none

Unit
system
Both
Both
Both
Both
 Explanation

 ADDCPMd)  -  decay rate  for  qual  adsorbed to suspended sediment
 ADDCPM(2)  -  temperature correction coefficient for decay of qual on
             suspended sediment
 ADDCPM(3)  -  decay rate  for  qual  adsorbed to bed sediment
 ADDCPM(4)  -  temperature correction coefficient for decay of qual on
             bed sediment
                                       574
RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.13  Table-type GQ-KD — Partition coefficients
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
  GQ-KD
  <-range><
            	k-part	

(repeats until all operations of this type are covered)

END GQ-KD
*******
Example
*******
  GQ-KD
    RCHRES
    # -  #
    1    7
  END GQ-KD
             ADPM1

               1.0
ADPM2

 5000
ADPM3

15000
ADPM4

   .3
ADPM5

 1000
ADPM6***
     ***
 4000
Details

Symbol
             Fortran
             name(s)
     Format  Def
           Min
                   Max
                 Units
               Unit
               system






ADPM(1,1 )
ADPM(2,1 )
ADPM(3,1 )
ADPM(4,1 )
ADPM(5,1 )
ADPM(6,1 )
F10.0
F10.0
F10.0
F10.0
F10.0
F10.0
none
none
none
none
none
none
1 .OE-10
1 .OE-10
1 .OE-10
1 .OE-10
1 .OE-10
1 .OE-10
none
none
none
none
none
none
1/mg
1/mg
1/mg
1/mg
1/mg
1/mg
Both
Both
Both
Both
Both
Both
Explanation

ADPM(1,1) through ADPM(6,1) - distribution coefficients for qual with  :
          1-suspended sand, 2-suspended silt, 3-suspended clay, 4-bed  sand,
          5-bed silt, 6-bed clay.
                                      575
                                                                   RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.14  Table-type GQ-ADRATE — Adsorption/desorption rate parameters
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
  GQ-ADRATE
  <-range><
              	k-adsdes	>

  (repeats until all operations of this type are covered)

  END GQ-ADRATE

*******
Example
*******

  GQ-ADRATE
    RCHRES     ADPM1     ADPM2     ADPM3     ADPM4     ADPM5     ADPM6***
    # -  #                                                            ***
    1    7      400.      400.      400.     .0028     .0028     .0028
  END GQ-ADRATE
Details
Symbol








Fortran
name ( s )
ADPM(1 ,2)
ADPM(2,2)
ADPM(3,2)
ADPM(4,2)
ADPM(5,2)
ADPM(6,2)

Format

F10.0
F10.0
F10.0
F10.0
F10.0
F10.0

Def

none
none
none
none
none
none

Min

.00001
.00001
.00001
.00001
.00001
.00001

Max

none
none
none
none
none
none

Units

/day
/day
/day
/day
/day
/day

Unit
system
Both
Both
Both
Both
Both
Both
 Explanation

 ADPM(1,2)  through  ADPM(6,2)  -  transfer  rate between adsorbed and desorbed
           states for  qual  with:  1-suspended sand,  2-suspended silt, 3-suspended
           clay, 4-bed sand,  5-bed silt,  6-bed clay.
                                       576
                                                                      RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input
4.4(3).7.15  Table-type GQ-ADTHETA— Adsorption/desorption temperature
             correction parameters
         12345678
123456789012345678901234567890123456789012345678901 2345678901 2345678901 234567890
*******
Layout
  GQ-ADTHETA
  <-range><-
            	thet-adsdes	

(repeats until all operations of this type are covered)

END GQ-ADTHETA
*******
Example
*******

  GQ-ADTHETA
    RCHRES     ADPM1     ADPM2     ADPM3     ADPM4     ADPM5     ADPM6***
    # -  #                                                             ***
    1    7      1.07      1.07      1.07      1.04       1.04       1.04
  END GQ-ADTHETA
Details
Symbol

Fortran
name ( s )

Format Def Min Max Units Unit
system
 ADPM(1,3)
ADPM(2,3)
ADPM(3,3)
ADPM(4,3)
ADPM (5,3)
ADPM(6,3)
F10.0
F10.0
F10.0
F10.0
F10.0
F10.0
1 .07
1 .07
1 .07
1.07
1 .07
1 .07
1 .0
1 .0
1.0
1.0
1 .0
1 .0
2.0
2.0
2.0
2.0
2.0
2.0
none
none
none
none
none
none
Both
Both
Both
Both
Both
Both
Explanation

ADPM(1,3) through ADPM(6,3) - temperature correction coefficients  for
          adsorption/desorption on: 1-suspended sand,  2-suspended  silt,
          3-suspended clay, 4-bed sand, 5-bed silt, 6-bed clay.
                                      577
                                                                   RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.16  Table-type GQ-SEDCONC — Initial concentrations on sediment
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  GQ-SEDCONC
  <-range><	sedconc-
  (repeats until all operations of this type are covered)

  END GQ-SEDCONC
*******
Example
*******

  GQ-SEDCONC
    RCHRES     SQAL1     SQAL2     SQAL3     SQAL4     SQAL5     SQAL6***
    ft -  ft                                                             ***
    1    7       1.3       8.4       8.9        1.9       8.4        9.2
  END GQ-SEDCONC
Details
Symbol

Fortran
name ( s )
SQAL(1-6)
Format Def Min Max Units
Unit
system
F10.0 0.0 0.0 none concu/mgBoth
 Explanation

 SQAL(1)  through  SQAL(6)  -  initial  concentration  of  qual  on:  1-suspended
         sand,  2-suspended  silt,  3-suspended  clay, 4-bed  sand,  5-bed silt,
         6-bed  clay.
                                       578                            RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.17  Table-type GQ-VALUES — Initial values for inputs which are
             constant
         12345678
1234567890123456789012345678901 2345678901234567890123456789012345678901234567890

Layout
******

  GQ-VALUES
  <-range><—twat—><-phval—><	roc—><	eld—><—sdcnc-><—phy	>

  (repeats until all operations of this  type are covered)

  END GQ-VALUES
*******
Example
*******
  GQ-VALUES
    RCHRES      TWAT     PHVAL
    # -  #
    1    7       22.        7.
  END GQ-VALUES
ROC

.07
CLD

 1 .
SDCNC

  11 .
 PHY***
    ***
.007
Details
Symbol









Fortran
name ( s )
TWAT

PHVAL
ROC
CLD
SDCNC
PHY

Format

F10.0

F10.0
F10.0
F10.0
F10.0
F10.0

Def

60.0
15.5
7.0
0.0
0.0
0.0
0.0

Min

32.0
0.0
1.0
0.0
0.0
0.0
0.0

Max

212.0
100.0
14.0
none
10.0
none
none

Units

deg F
deg C
none
mole/1
tenths
mg/1
mg/1

Unit
system
Engl
Metric
Both
Both
Both
Both
Both
                                      579
                                RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

Explanation

In  Table-type  GQ-GENDATA  (4.4(3).7.1)   values  for  data  source  flags  are
specified.  If any  of the flags are assigned  a value of 2,   a single constant
value for that data type must be provided in this table. For example, if ROXFG=2
a value for free radical oxygen concentration (ROC)  must be supplied in columns
31-40 of this table.

TWAT - water temperature
PHVAL - pH
ROC - free radical oxygen concentration
CLD - cloud cover
SDCNC - total suspended sediment concentration
PHY - phytoplankton concentration  (as biomass)
                                       580                             RELEASE 8.0

-------
                                                   RCHRES — Section  GQUAL input

4.4(3).7.18  Table-type MON-WATEMP — Monthly values of water  temperature
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
  MON-WATEMP
  <-range><-
            	12-values	

(repeats until all operations of this type are covered)

END MON-WATEMP
*******
Example
*******

  MON-WATEMP
    RCHRES   T1   T2
    # -  #
    1    7   34   37
  END MON-WATEMP
                                         T7   T8   T9  T10  T11   T12***
                                                                     ***
T3   T4   T5   T6

39   42   55   59   64   62   58   54   46
                                                                   38
Details
Symbol
<12-values>

Fortran
name ( s )
TEMPM(1-12)

Format Def
F5.0 60.0
15.5

Min
32.0
0.0

Max
212.0
100.0

Units
degF
degC

Unit
system
Engl
Metric
Explanation

In  Table-type  GQ-GENDATA   (4.4(3).7.1)    values   for  data  source  flags  are
specified.  If TEMPFG  is assigned a value  of   3  ,   12 monthly  values for water
temperature must be supplied in  this table.
                                       581
                                                                    RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.19  Table-type MON-PHVAL — Monthly values of pH
         1          2345678
1234567890123456789012345678901 2345678901234567890123456789012345678901234567890

Layout
******

  MON-PHVAL
  <-range><	12-values	>

  (repeats until all operations of this type are covered)

  END MON-PHVAL
*******
Example
*******

  MON-PHVAL
    RCHRES  PH1  PH2  PH3  PH4  PH5  PH6  PH7  PH8  PH9 PH10 PHI 1  PH12***
    # -  #                                                             ***
    1    7  6.8  6.8  6.4  6.1  5.9  5.6  5.6  5.9  6.1   6.4   6.8   6.8
  END MON-PHVAL
Details
Symbol
<1 2-values>

Fortran Format Def
name ( s )
PHVALM(1-12) F5.0 7.0

Min Max Units Unit
system
1.0 14.0 none Both
Explanation

In  Table-type  GQ-GENDATA   (4.4(3).7.1)    values   for   data  source  flags  are
specified.   If PHFLAG is assigned a value  of  3,  12  monthly values for pH must be
supplied in  this  table.
                                       582                            RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL  input

4.4(3).7.20  Table-type MON-ROXYGEN — Monthly values of free radical oxygen
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  MON-ROXYGEN
  <-range><	1 2-values	>

  (repeats until all operations of this type are covered)

  END MON-ROXYGEN

*******
Example
*******

  MON-ROXYGEN
    RCHRES  0X1  0X2  OX3  OX4  0X5  OX6  0X7  OX8  0X9 0X10 0X11 OX12***
    # -  #                                                            ***
    1    7  .09  .09  .10  .11  .12  .12  .12  .12  .12   .10   .09   .09
  END MON-ROXYGEN
Details
Symbol
<12-values>

Fortran
name ( s )
ROCM(1-12)

Format Def Min Max Units
F5.0 0.0 0.0 none mole/1

Unit
system
Both
Explanation

In  Table-type  GQ-GENDATA   (4.4(3).7.1)   values  for  data   source   flags   are
specified. If ROXFG is assigned a value of 3, 12 monthly values  for free  radical
oxygen concentration must be supplied in this table.
                                      583
RELEASE 8.0

-------
                                                    RCHRES  —  Section GQUAL input

4.4(3).7.21  Table-type GQ-ALPHA — Values of base  absorbance coefficient
         12345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901 234567890

Layout
******

  GQ-ALPHA
  <-range><	first-7	>
  <-range><	second-7	>
  <-range><	last-4	>

  (repeats until all operations of  this  type are covered)

  END GQ-ALPHA
*******
Example
*******

  GQ-ALPHA
    RCHRES***
    # -  #***     K1        K2         K3         K4        K5        K6        K7
    # -  #***     K8        K9        K10        K11        K12       K1 3       K14
    # -  #***    K15        K16        K17        K18
    1    7       .008       .009       .010       .011       .011      .011      .012
    1    7       .013       .015       .016       .017      .018      .019      .020
    1    7       .021       .022       .024       .024
  END GQ-ALPHA
Details
Symbol




Fortran
name ( s )
ALPH(1-7)
ALPH(8-14)
ALPH(15-18)

Format
F10.0
F10.0
F10.0

Def
none
none
none

Min
.00001
.00001
.00001

Max
none
none
none

Units
/cm
/cm
/cm

Unit
system
Both
Both
Both
                                       584                             RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

Explanation

ALPH(1) through ALPH(18) are base absorption coefficients  for 18 wavelengths of
        light passing through clear water.

This table is necessary only when a qual undergoes photolysis; i.e., when
any QALFG(3)=1 in Table-type GQ-QALFG.

When an entry has to be continued onto more than 1 line:

1.  No blank  or "comment"  lines may  be put  between any  of the  lines for  a
    continued entry. Put all comments ahead of the entry. (See above example).
2.  The   specification must  be repeated  for each  line onto  which the
    entry is continued.
                                      585                            RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.22  Table-type GQ-GAMMA — Values of sediment absorbance coefficient
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
  GQ-GAMMA
  <-range><
  <-range><
  <-range><
                                    -first-7—
                                    -second-7-
              	last-4	>

  (repeats until all operations of this type are covered)

  END GQ-GAMMA

*******
Example
*******
GQ-GAMMA
RCHRES***
# - #***
# - #***
# - #***
1 4
1 4
1 4


K1
K8
K15
.001
.001
.002


K2
K9
K16
.001
.002
.002
                                      K3
                                     K10
                                     K17
                                     .001
                                     .002
                                     .002
                                                K4
                                               K11
                                               K18
                                              .001
                                              .002
                                              .002
  K5
 K12

.001
.002
  K6
 K13

.001
.002
  K7
 K14

.001
.002
  END GQ-GAMMA
Details
Symbol

Fortran
name ( s )

Format Def Min Max Units Unit
system
      GAMM(1-7)      F10.0    0.0      0.0      none     1/mg.cm Both
     GAMM(8-14)     F10.0    0.0      0.0      none     1/mg.cm Both
       GAMM(15-18)    F10.0    0.0      0.0      none     1/mg.cm Both

Explanation

GAMM(1) through  GAMM(18)  are   increments  to   the   base  absorbance  coefficient
        (Table-type GQ-ALPHA) for  light passing through sediment-laden water.

This  is table necessary  only when  a   qual undergoes photolysis;   i.e.,  when any
QALFG(3)=1 in Table-type GQ-QALFG.

See rules for continuing an  entry onto more than  1 line   in Explanation for GQ-
ALPHA.
                                       586
                                                                      RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input
4.4(3).7.23  Table-type GQ-DELTA — Values of phytoplankton absorbance
             coefficient
         12345678
123456789012345678901 2345678901 2345678901234567890123456789012345678901234567890
*******
Layout
******
  GQ-DELTA
  <-range><
  <-range><
  <-range><
                                    •first-7—
                                    -second-7-
              	last-4	>

  (repeats until all operations of this type are covered)

  END GQ-DELTA

*******
Example
*******
  GQ-DELTA
    RCHRES***
    # -  #***     K1        K2        K3         K4         K5         K6        K7
    # -  #***     K8        K9       K10       K11        K12        K13       K14
    # -  #***    K15       K16       K17       K18
    1    4     .0007      .0007      .0007      .0007      .0007      .0007     .0007
    1    4     .0007      .0007      .0007      .0007      .0007      .0007     .0007
    1    4     .0007      .0007      .0007      .0007
  END GQ-DELTA
Details
Symbol


< second- 7 >

Fortran
name(
DEL(1
S)
-7)
DEL(8-14)
DEL(1
5-18)
Format

F10
F10
F10

.0
.0
.0
Def

0
0
0

.0
.0
.0
Min

0
0
0

.0
.0
.0
Max Units

none 1/mg
none 1/mg
none 1/mg

.cm
.cm
.cm
Unit
system
Both
Both
Both
Explanation

DEL(1) through DEL(18) are increments  to  the base  absorption coefficient (Table-
       type GQ-ALPHA) for light passing through plankton-laden water.

This table is necessary only when a  qual undergoes  photolysis;   i.e.,   when any
QALFG(3)=1 in Table-type GQ-QALFG.

See rules  for continuing  an entry  onto more  than 1   line in  Explanation for
Table-type GQ-ALPHA.
                                       587
                                                                      RELEASE 8.0

-------
                                                   RCHRES -- Section  GQUAL  input

4.4(3).7.24  Table-type GQ-CLDFACT — Light extinction efficiency of  cloud  cover
         12345678
1234567890123456789012345678901 2345678901 2345678901 23456789012345678901234567890
*******
Layout
******
  GQ-CLDFACT
  <-range><—
  <-range><—
  <-range><—
                   -first-7	>
                   -second-7	>
       -last-4-
  (repeats until all operations of this type are covered)

  END GQ-CLDFACT
*******
Example
*******
  GQ-CLDFACT
    RCHRES***
    # -  #***
    # -  #***
    # -  #***
         4
         4
         4
 F1
 F8
F15
.10
.17
.21
 F2
 F9
F16
.10
.17
.21
 F3
F10
F17
.10
.17
.21
 F4
F11
F18
.15
.17
.21
 F5
F12

.15
.18
 F6
F13

.15
.19
 F7
F14

.15
.20
  END GQ-CLDFACT
Details
Symbol




Fortran
name ( s )
KCLD(1-7)
KCLD(8-14)
KCLD(15-18)

Format
F10.0
F10.0'
F10.0

Def
0.0
0.0
0.0

Win
0.0
0.0
0.0

Max
1 .0
1 .0
1 .0

Units
none
none
none

Unit
system
Both
Both
Both
 Explanation

 KCLD(1)  through  KCLD(18)    are  values  of light  extinction efficiency  of cloud
         cover  for  each of 18 wavelengths.

 This  table  is  necessary only when a  qual undergoes photolysis;  i.e.,  when any
 QALFG(3)=1  in  Table-type GQ-QALFG.

 See rules  for continuing  an entry  onto more  than 1  line in  Explanation for
 Table-'type  GQ-ALPHA.
                                       588
                                                     RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.25  Table-type MON-CLOUD — Monthly values of cloud cover
         1          2345678
1234567890123456789012345678901 2345678901234567890123456789012345678901234567890
*******
Layout
******
  MON-CLOUD
  <-range><-
•1 2-values	>
  (repeats until all operations of this type are covered)

  END MON-CLOUD
*******
Example
*******

  MON-CLOUD
    RCHRES   C1   C2   C3   C4   C5   C6   C7   C8   C9  C10  C11  C12***
    # -  #                                                             ***
    17334321110112
  END MON-CLOUD
Details
Symbol
<12-values>

Fortran
name ( s )
CLDM(1-12)

Format Def Min Max Units Unit
system
F5.0 0.0 0.0 10.0 tenths Both
Explanation

CLDM(1) through CLDM(12)  are monthly values of  average  cloud  cover.   This table
        must be  included in the  UCI only  if CLDFG=3 in   Table-type GQ-GENDATA
        (4.4(3).7.1).
                                      589
                                     RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.26  Table-type MON-SEDCONC — Monthly values of sediment concentration
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
  MON-SEDCONC
  <-range><—
            	12-values	

(repeats until all operations of this type are covered)

END MON-SEDCONC
*******
Example
*******

  MON-SEDCONC
    RCHRES  SC1  SC2  SC3  SC4  SC5  SC6  SC7  SC8  SC9 SC10 SC11  SC12***
    # -  #                                                             ***
    1    7   2.   4.  10. 120.  75.  10.   8.    8.    6.    6.    4.    4.
  END MON-SEDCONC
Details
Symbol
<1 2-values>

Fortran Format Def
name ( s )
SDCNCM(1-12) F5.0 0.0

Min Max Units
0.0 none mg/1

Unit
system
Both
Explanation

SDCNCM(I)  through    SDCNCM(12)     are    monthly   average   suspended   sediment
           concentration  values.   This  table  must be  included in the UCI only if
           SDFG=3 in  Table-type GQ-GENDATA (4.4(3).7.1).
                                       590
                                                                    RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL  input
4.4(3).7.27  Table-type MON-PHYTO — Monthly values of phytoplankton
             concentration
         12345678
1 2345678901 2345678901 2345678901 2345678901234567890123456789012345678901234567890
*******
Layout
******

  MON-PHYTO
  <-range><	12-values-
  (repeats until all operations of this type are covered)

  END MON-PHYTO
*******
Example
*******

  MON-PHYTO
    RCHRES   P1   P2   P3   P4   P5   P6   P7    P8    P9   P10   P11   P12***
    # -  #                                                             ***
    1    7  .01  .03   .03   .03   .04   .11   .33   .47   .31   .17   .15   .06
  END MON-PHYTO
Details
Symbol
<1 2-values>

Fortran
name ( s )
PHYM(1-12)

Format Def Min Max Units
F5.0 0.0 0.0 none mg/1

Unit
system
Both
Explanation

PHYM(1) through  PHYM(12)  are  monthly  values   of  phytoplankton  concentration.
        This table must  be included  in  the   UCI only if PHYTFG=3  in Table-type
        GQ-GENDATA (4.4(3).7.1).
                                       591                             RELEASE 8.0

-------
                                                   RCHRES — Section GQUAL input

4.4(3).7.28  Table-type GQ-DAUGHTER — Relationship between "parent" and
             "daughter" compounds
         12345678
1234567890123456789012345678901 2345678901 234567890123456789012345678901234567890
*******
Layout
******

  GQ-DAUGHTER
  <-range><—zero—><2-from-1><3-from-1>
  <-range><—zero—><—zero—><3-from-2>
  <-range><—zero—><—zero—><—zero—>
  (repeats until all operations of this type are covered)
  END GQ-DAUGHTER
*******
Example
*******
GQ-DAUGHTER
RCHRES
# -
# -
# -
1
1
1
#
#
#
7
7
7
                ZERO
                ZERO
                ZERO
                 0.0
                 0.0
                 0.0
 2F1
ZERO
ZERO
 .36
 0.0
 0.0
    ***
 3F1***
 3F2***
ZERO***
 .02
1.24
 0.0
  END GQ-DAUGHTER
Details
Symbol


<2-from-1>
<3-from-1>
<3-from-2>

Fortran
name ( s )
0.0
C(2,1)
C(3,1)
C(3,2)

Format


F10.0
F10.0
F10.0

Def


0.0
0.0
0.0

Min


0.0
0.0
0.0

Max Uni ts


none none
none none
none none

Unit
system

Both
Both
Both
 Explanation

 This   table-type   specifies    the   relationship  between  parent   and  daughter
 compounds. For  example,  variable C(2,1)  indicates the amount of qual #2 which is
 produced by  decay of qual  #1  through  one of  the decay processes.  The table must
 be  repeated   in sequence for  each   decay process that produces  "daughter" quals
 from   decay   of  "parent"  quals.   The   proper  sequence  is  :    1-hydrolysis,
 2-oxidation  by  free radical oxygen,  3-photolysis,  4-(reserved for future use),
 5-biodegradation, 6-general first  order  decay.
                                       592
                                            RELEASE 8.0

-------
                                                   RCHRES — Section RQUAL input
4.4(3).8  RCHRES-BLOCK — Input for RQUAL sections
         12345678
1234567890123456789012345678901234567890123456789012345678901 2345678901234567890
*******
Layout
******

 [Table-type BENTH-FLAG]
 [Table-type SCOUR-PARMS]
  Section OXRX input
 [Section NUTRX input]   if NUTRX is active
 [Section PLANK input]  if PLANK is active
 [Section PHCARB input] if PHCARB is active
Explanation

The exact format  of each of the  tables above is detailed  in the documentation
which follows.  Tables in brackets  []  need not always be supplied; for example,
because all of the inputs have default values.
                                      593
RELEASE 8.0

-------
                                                   RCHRES — Section RQUAL input

4.4(3).8.01  Table-type BENTH-FLAG — Benthic release flag
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
******<
Layout
******

  BENTH-FLAG
  <-range>
  (repeats until all operations of this type are covered)

  END BENTH-FLAG

*******
Example
*******
  BENTH-FLAG
    RCHRES BENF***
    # -  #     ***
    1    7
  END BENTH-FLAG
Details
Symbol


Fortran
name ( s )
BENRFG

Format Def Min Max Units Unit
system
15 0 0 1 none Both
Explanation

If BENRFG  is  1, benthal  influences  are  considered.
                                       594                            RELEASE 8.0

-------
                                                   RCHRES — Section RQUAL input

4.4(3).8.02  Table-type SCOUR-PARMS — Benthal scour parameters
         12345678
123456789012345678901234567890123456789012345678901 2345678901 2345678901 234567890
*******
Layout
******

  SCOUR-PARMS
  <-range><	scour-parms	>
  (repeats until all operations of this type are covered)

  END SCOUR-PARMS
*******
Example
*******
  SCOUR-PARMS
    RCHRES    SCRVEL    SCRMUL***
    # -  #    ft/sec          ***
    1    7       15.        3.
  END SCOUR-PARMS
Details
Symbol
< scour-parms >

Fortran
name ( s )
SCRVEL
SCRMUL

Format
F10.0
F10.0

Def
10.
3.05
2.0

Min
.01
.01
1.0

Max
none
none
none

Units
ft/sec
m/sec

Unit
system
Engl
Metric
Both
Explanation

SCRVEL - The velocity above which effects of scouring on benthal
         release rates is considered.
SCRMUL - Multiplier to increase benthal releases during scouring.
                                      595
RELEASE 8.0

-------
                                                    RCHRES — Section OXRX input
4.4(3).8.1   RCHRES-BLOCK — Section OXRX input
         12345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901 234567890
******4
Layout
******
+[Table-type OX-FLAGS]
  Table-type OX-GENPARM
+[Table-type ELEV]
  [Table-type OX-BENPARM]
+[Table-type OX-CFOREA]
if section HTRCH is not active
if BENRFG=1 (Table-type BENTH-FLAG)
if LKFG=1 (Table-type GEN-INFO)
+[Table-type OX-TSIVOGLOU]
+ Table-type OX-LEN-DELTH  if section HYDR inactive
                        — if
                            REAMFG=1
                            (Tsivoglou)
+[Table-type OX-TCGINV]
+ Table-type OX-REAPARM

  [Table-type OX-INIT]
if REAMFG=2 (Owen/Churchill,etc.)
if REAMFG=3
if
LKFG=0
Note:  If any  of the  tables marked "+"  above was supplied  in  your   input for
       Section GQUAL, it must not be repeated here  (These are the tables  used to
       calculate  the  oxygen  reaeration   coefficient  which,    under  certain
       conditions, is also needed in Section GQUAL).

Explanation

The conditions under which data from the various  tables are needed are  indicated
above.  REAMFG is  the reaeration method flag,  defined  in Section 4.4(3).8.1.1
below.

The exact format  of each of the  tables above is detailed  in  the documentation
which follows.  Tables in brackets  []  need not always be supplied;  for example,
because all of the inputs have default values.
                                       596
                                           RELEASE 8.0

-------
                                                    RCHRES — Section OXRX input

4.4(3).8.1.1  Table-type OX-FLAGS — Oxygen flags
         12345678
12345678901 2345678901 2345678901 2345678901234567890123456789012345678901234567890
*******
Layout
******

  OX-FLAGS
  <-rangexoxf>
  (repeats until all operations of this type are covered)

  END OX-FLAGS

*******
Example
*******

  OX-FLAGS
    RCHRES REAM ***
    # -  #      ***
    1    7    2
  END OX-FLAGS
Details
Symbol         Fortran        Format  Def      Min      Max     Units    Unit
               name(s)                                                 system

          REAMFG         15      2        1        3        none     Both
Explanation

REAMFG indicates  the method  used  to calculate  reaeration  coefficient for free-
flowing streams.
     1 Means Tsivoglou method is used
     2 Means Owens,  Churchill,  or O'Connor-Dobbins   method is  used depending on
      velocity and depth of water
     3 Means coefficient  is calculated   as  a  power   function of  velocity and/or
      depth;  user  inputs exponents  for velocity   and  depth  and  an  empirical
      constant (REAR)
                                       597                             RELEASE 8.0

-------
                                                    RCHRES — Section OXRX input

4*4(3).8.1.2  Table-type OX-GENPARM — General oxygen parms
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  OX-GENPARM
  OrangeX	ox-genparm	>

  (repeats until all operations of this type are covered)

  END OX-GENPARM

*******
Example
*******

  OX-GENPARM
    RCHRES    KBOD20     TCBOD    KODSET    SUPSAT***
    # -  #       /hr               ft/hr          ***
    1    7       0.1      1.06       8.0        1.2
  END OX-GENPARM
Details
Symbol







Fortran
name ( a )
KBOD20
TCBOD
KODSET

SUPSAT

Format

F10.0
F10.0
F10.0

F10.0

Def

none
1.075
0.0
0.0
1.15

Min

1.0E-30
1.0
0.0
0.0
1.0

Max

none
2.0
none
none
2.0

Units

/hr
none
ft/hr
m/hr
none

Unit
system
Both
Both
Engl
Metric
Both
Explanation

KBOD20 - Unit BOD decay rate @ 20 degrees C
TCBOD - Temperature correction coefficient for  BOD decay
KODSET - Rate of BOD  settling
SUPSAT - Allowable dissolved oxygen  supersaturation (expressed as
         a multiple of DO  saturation concentration)
                                       598
RELEASE 8.0

-------
                                                    RCHRES — Section OXRX  input

4.4(3).8.1.3  Table-type ELEV — RCHRES elevation above sea level
         12345678
1234567890123456789012345678901234567890123456789012345678901 2345678901 234567890
*******
Layout
******

  ELEV
  <-range><—elev—>
  (repeats until all operations of this type are covered)

  END ELEV
*******
Example
*******
  ELEV
    RCHRES
    # -  tt
    1    7
  END ELEV
 ELEV***
   ft***
2100.
Details
Symbol


Fortran
name ( s )
ELEV

Format Def
F10.0 0.0
0.0

Min
0.0
0.0

Max
30000
10000

Units
ft
m

Unit
system
Engl
Metric
                                       599
                                                      RELEASE  8.0

-------
                                                    RCHRES — Section OXRX input

4.4(3).8.1.4  Table-type OX-BENPARM — Oxygen benthic parameters
         12345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901 234567890

Layout
******

  OX-BENPARM
  <-range><	ox-benparm	>

  (repeats until all operations of this type are covered)

  END OX-BENPARM

*******
Example
*******
  OX-BENPARM
    RCHRES     BENOD
    # -  #  mg/m2.hr
    17       1.0
  END OX-BENPARM
TCBEN  BRBOD(1)  BRBOD(2)* * *
       mg/m2.hr  mg/m2.hr***
Details
Symbol





Fortran
name ( s )
BENOD
TCBEN
BRBOD ( 1 )
BRBOD(2)

Format
F10.0
F10.0
F10.0
F10.0

Def
0.0
1.074
72.
100.

Min
0.0
1.0
.0001
.0001

Max
none
2.0
none
none

Units
mg/m2.hr
none
mg/m2 . hr
mg/m2 . hr

Unit
system
Both
Both
Both
Both
 Explanation

 BENOD  -  Benthal  oxygen  demand  at  20  degrees  C  (with unlimited DO concentration)
         (demand  is,  thus,  proportional  to the water temperature)
 TCBEN  -  Temperature  correction coefficient for benthal oxygen demand
 BRBOD(1)  - Benthal release of  BOD at high oxygen concentration.
 BRBOp(2)  - Increment to benthal release of BOD under anaerobic conditions
                                       600
                                             RELEASE 8.0

-------
                                                    RCHRES — Section OXRX input

4.4(3).8.1.5  Table-type OX-CFOREA — Lake reaeration correction coefficient
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  OX-CFOREA
  <-rangex-cforea->
  (repeats until all operations of this type are covered)

  END OX-CFOREA

*******
Example
*******

  OX-CFOREA
    RCHRES    CFOREA***
    # -  #          ***
    1    7       0.8
  END OX-CFOREA
Details
Symbol


Fortran
name ( s )
CFOREA

Format Def Min Max
F10.0 1.0 .001 10.
Explanation

CFOREA is a correction factor in the lake reaeration equation,
to account for good or poor circulation characteristics.
                                      601                            RELEASE 8.0

-------
                                                    RCHRES — Section OXRX input

4.4(3).8.1.6  Table-type OX-TSIVOGLOU — Farms for Tsivoglou calculation
                                                            i********************
         1          2345678
123456789012345678901 23456789012345678901 2345678901 23456789012345678901234567890
*******
Layout
******

  OX-TSIVOGLOU
  <-range><	ox-tsivoglou	>
  (repeats until all operations of this type are covered)

  END OX-TSIVOGLOU
*******
Example
*******
  OX-TSIVOGLOU
    RCHRES     REAKT
    # -  #       /ft
    1    7       .07
  END OX-TSIVOGLOU
TCGINV***
      ***
   1.1
Details
Symbol


Fortran
name ( s )
REAKT
TCGINV

Format
F10.0
F10.0

Def
0.08
1.047

Min
0.001
1 .0

Max
1 .0
2.0

Units
/ft
none

Unit
system
Both
Both
Explanation

REAKT is  the empirical   constant  in Tsivoglou1s  equation for   reaeration (escape
      coefficient).
TCGINV  is  the  temperature  correction  coefficient for  surface  gas invasion.
                                       602
                                              RELEASE 8.0

-------
                                                    RCHRES — Section OXRX  input

4.4(3).8.1.7  Table-type OX-LEN-DELTH — Length of reach and fall
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  OX-LEN-DELTH
  OrangeX	ox-len-delth	>
  (repeats until all operations of this type are covered)

  END OX-LEN-DELTH
*******
Example
*******
  OX-LEN-DELTH
    RCHRES       LEN     DELTH***
    # -  #     miles        ft***
    1    7       10.      200.
  END OX-LEN-DELTH
Details
Symbol






Fortran
name ( s )
LEN

DELTH


Format Def

F 1 0 . 0 none
none
F10.0 none
none

Min

.01
.01
0.00001
0.00001

Max

none
none
none
none

Units

miles
km
ft
m

Unit
system
Engl
Metric
Engl
Metric
Explanation

LEN is the length of the RCHRES and DELTH is the  (energy) drop over  its  length.
                                      603
RELEASE 8.0

-------
                                                    RCHRES — Section OXRX input

4.4(3).8.1.8  Table-type OX-TCGINV — Owen/Churchill/O'Connor-Dobbins data
              (temperature correction coefficient)

              [************************************i
         12345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
******

  OX-TCGINV
  <-rangex-tcginv->
  (repeats until all operations of this type are covered)

  END OX-TCGINV

*******
Example
*******

  OX-TCGINV
    RCHRES    TCGINV***
    » -  I          ***
    1    7      1.07
  END OX-TCGINV
Details
Symbol


Fortran
name ( s )
TCGINV

Format Def Min Max
F10.0 1.047 1.0 2.0
Explanation

TCGINV is  the  temperature correction  coefficient for  surface gas invasion,
                                       604                            RELEASE 8.0

-------
                                                    RCHRES — Section OXRX input

4.4(3).8.1.9  Table-type OX-REAPARM — Farms for user-supplied reaeration
              formula
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  OX-REAPARM
  <-range><	ox-reaparm	>

  (repeats until all operations of this type are covered)

  END OX-REAPARM

*******
Example
*******

  OX-REAPARM
    RCHRES    TCGINV      REAR    EXPRED    EXPREV***
    # -  t                 /hr                    ***
    1    7      1.08       1.0      -2.0        0.7
  END OX-REAPARM
Details
Symbol






Fortran
name ( s )
TCGINV
REAK
EXPRED
EXPREV

Format

F10.0
F10.0
F10.0
F10.0

Def

1.047
none
0.0
0.0

Min

1.0
1.0E-30
none
0.0

Max

2.0
none
0.0
none

Units

none
/hr
none
none

Unit
system
Both
Both
Both
Both
Explanation

TCGINV - See section 4.4(3).8.1.6
REAK - Empirical constant- for  equation used to calculate  reaeration
        coefficient
EXPRED - Exponent to depth used in calculation of reaeration  coefficient
EXPREV - Exponent to velocity  used in calculation of  reaeration  coefficient
                                      605
RELEASE 8.0

-------
                                                    RCHRES — Section OXRX input

4.4(3).8.1.10  Table-type OX-INIT — Initial concentrations
         12345678
1234567890123456789012345678901 2345678901 234567890123456789012345678901234567890

Layout
******

  OX-INIT
  <-range><	ox-init	>

  (repeats until all operations of this  type are covered)

  END OX-INIT

*******
Example
*******

  OX-INIT
    RCHRES       DOX       BOD     SATDO***
    # -  #      mg/1      mg/1      mg/1***
    1    7       26.      17.2       43.
  END OX-INIT
Details
Symbol


Fortran
name ( s )
DOX
BOD
SATDO

Format
F10.0
F10.0
F10.0

Def
0.0
0.0
10.0

Min
0.0
0.0
0.1

Max
20.0
none
20.0

Units
mg/1
mg/1
mg/1

Unit
system
Both
Both
Both
 Explanation

 DOX  -  Dissolved  oxygen
 BOD  -  Biochemical  oxygen demand
 SATDO  - Dissolved  oxygen saturation concentration
                                       606
RELEASE 8.0

-------
                                                   RCHRES — Section NUTRX input

4.4(3).8.2  RCHRES-BLOCK — Section NUTRX input
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

 [Table-type NUT-FLAGS]
 [Table-type CONV-VAL1]
 [Table-type NUT-BENPARM]  if BENRFG=1 (Table-type BENTH-FLAG)
  Table-type NUT-NITRIP    if NH3FG=1 (Table-type NUT-FLAGS)
 [Table-type NUT-INIT]
Explanation

The exact format  of each of the  tables above is detailed  in the documentation
which follows.  Tables in brackets  []  need not always be supplied; for example,
because all of the inputs have default values.

BENRFG  indicates whether  or  not  benthal  influences  are considered.     NH3FG
indicates whether or not ammonia is simulated.
                                      607                            RELEASE  8.0

-------
                                                   RCHRES — Section NUTRX input

4.4(3).8.2.1   Table-type NUT-FLAGS — Nutrient flags
         12345678
1234567890123456789012345678901 2345678901 234567890123456789012345678901234567890
*******
Layout
******

  NUT-FLAGS
  <-range><	nut-flags	>
  (repeats until all operations of this type are covered)

  END NUT-FLAGS

*******
Example
*******

  NUT-FLAGS
    RCHRES  NH3  NO2  PO4  AMV  DEN DENR***
    # -  #                              ***
    171         1
  END NUT-FLAGS
Details
Symbol         Fortran        Format  Def     Min     Max
               name(s)

    NH3FG,NO2FG,   615     0       0       1
               PO4FG,AMVFG,
               DENFG.DENRFG
Explanation

NH3FG -  If on,  ammonia  is  simulated
NO2FG -  If on,  nitrite  is  simulated
PO4FG -  If on,  ortho-phosphorus  is simulated
AMVFG -  If on,  ammonia  vaporization  is  enabled
DENFG -  If on,  denitrification is enabled
DENRFG - If  on,  denitrification  end  product is ammonia;
          otherwise  end  product is nitrogen gas
                                       608                            RELEASE 8.0

-------
                                                   RCHRES ~ Section NUTRX input

4.4(3).8.2.2  Table-type CONV-VAL1 — Conversion factors
         12345678
1 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 234567890

Layout
******

  CONV-VAL1
  <-range>< ------------ conv-va!1 ----------------- >

  (repeats until all operations of this type are covered)

  END CONV-VAL1

*******
Example
*******
CONV-VAL1
  RCHRES
  # -  #
  1    7
END CONV-VAL1
 CVBO     CVBPC     CVBPN
mg/mg  mols/mol  mols/mol
4.0
67.
                      33.
                                            BPCNTC***
                                                  ***
                                                77.
Details
Symbol






Fortran
name ( s )
CVBO
CVBPC
CVBPN
BPCNTC

Format

F10.0
F10.0
F10.0
F10.0

Def

1.98
106.
16.
49.

Min

1.0
50.
10.
10.

Max

5.0
200.
50.
100.

Units Unit
system
mg/mg Both
mols/mol Both
mols/mol Both
none Both
Explanation

CVBO - Conversion from milligrams biomass  to milligrams  oxygen
CVBPC - Conversion from biomass expressed  as phosphorus  to  carbon
        equivalency
CVBPN - Conversion from biomass expressed  as phosphorus  to  nitrogen
        equivalency
BPCNTC - Percentage, by weight, of biomass which  is  carbon
                                      609
                                                       RELEASE 8.0

-------
                                                   RCHRES — Section NUTRX input

4.4(3).8.2.3  Table-type NUT-BENPARM — Nutrient benthic parms
         12345678
1 2345678901 2345678901 2345678901 2345678901 2345678901 23456789012345678901234567890
*******
Layout
******
  NUT-BENPARM
  <-range><	
-nut-benparm-
  (repeats until all operations of this type are covered)

  END NUT-BENPARM
*******
Example
*******
  NUT-BENPARM
    RCHRES  BRNIT(1)  BRNIT(2)  BRPO4(1)  BRP04(2)     ANAER***
    # -  #  mg/m2.hr  mg/m2.hr  mg/m2.hr  mg/m2.hr      mg/1***
    1    7       10.       20.       1.0        4.0      .001
  END NUT-BENPARM
Details
Symbol







Fortran
name ( s )
BRNIT (1 )
BRNIT(2)
BRPO4 ( 1 )
BRP04 ( 2 )
ANAER

Format Def

5F10.0 11.
33.
1.1
2.2
.0005

Min

.0001
.0001
.0001
.0001
.0001

Max

none
none
none
none
1.0

Uni ts

mg/m2.hr
mg/m2.hr
mg/m2.hr
mg/m2.hr
mg/1

Unit
system
Both
Both
Both
Both
Both
 Explanation

 BRNIT  -  Benthal  release  of  inorganic  nitrogen.  (1)  indicates aerobic
         rate  and (2)  indicates  anaerobic  rate.
 BRPO4  -  Benthal  release  of  ortho-phosphate.  Subscripts same as BRNIT.
 ANAER  -  Concentration of dissolved  oxygen below which anaerobic
         conditions  exist
                                       610
                                             RELEASE 8.0

-------
                                                   RCHRES — Section NUTRX input

4.4(3).8.2.4  Table-type NUT-NITRIF — Nitrification parms
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  NUT-NITRIF
  <-range><	nut-nitrif	>

  (repeats until all operations of this type are covered)

  END NUT-NITRIF

*******
Example
*******

  NUT-NITRIF
    RCHRES    KNH320    KNO220     TCNIT***
    # -  #       /hr       /hr          ***
    1    7       .05       .05        1.1
  END NUT-NITRIF
Details
Symbol


Fortran
name ( s )
KNH320
KN0220
TCNIT

Format Def
3F10.0 none
none
1 .07

Min
0.001
0.001
1.0

Max
none
none
2.0

Units
/hr
/hr
Explanation

KNH320  and  KNO220  are  the  unit oxidation  rates   of   ammonia   and  nitrite,
respectively, at 20 degrees C.
                                      611
RELEASE 8.0

-------
                                                   RCHRES — Section NUTRX input

4.4(3).8.2.5  Table-type NUT-INIT — Nutrient initial conditions
         12345678
12345678901 2345678901 2345678901 2345678901 2345678901 23456789012345678901234567890

Layout
******

  NUT-INIT
  <-range><	nut-init	>

  (repeats until all operations of this type are covered)

  END NUT-INIT

*******
Example
*******

  NUT-INIT
    RCHRES       NO3       NH3       NO2       P04     DEBAC***
    # -  #      mg/1      mg/1      mg/1      mg/1           ***
    1    7        7.       13.       41.       22.         .6
  END NUT-INIT
Details
Symbol







Fortran
name ( s )
NO 3
NH3
NO 2
P04
DEBAC

Format

F10.0
F10.0
F10.0
F10.0
F10.0

Def

0.0
0.0
0.0
0.0
0.0

Min

0.0
0.0
0.0
0.0
0.0

Max

none
none
none
none
1 .0

Units

mg/1
mg/1
mg/1
mg/1
none

Unit
system
Both
Both
Both
Both
Both
 Explanation

 NO3  -  Nitrate  (as  nitrogen)
 NH3  -  Ammonia  (as  nitrogen)
 N02  -  Nitrite  (as  nitrogen)
 PO4  -  Ortho-phosphorus  (as phosphorus)
 DEBAC  - Dentrifying  bacteria
                                       612
RELEASE 8.0

-------
                                                   RCHRES — Section PLANK input

4.4(3).8.3  RCHRES-BLOCK -- Section PLANK input
         12345678
1 2345678901 2345678901 2345678901 2345678901 234567890123456789012345678901234567890
*******
Layout
******

  Table-type PLNK-FLAGS
  Table-type SURF-EXPOSED     if section HTRCH inactive
  Table-type PLNK-PARM1
 [Table-type PLNK-PARM2]
 [Table-type PLNK-PARM3]
  Table-type PHYTO-PARM

  Table-type ZOO-PARM1
 [Table-type ZOO-PARM2]
if
ZOOFG=1
if
PHYFG=1
 [Table-type BENAL-PARM]  if BALFG=1
 [Table-type PLNK-INIT]
Explanation

The exact format  of each of the  tables above is detailed   in  the documentation
which follows.  Tables in brackets  []  need not always be supplied;  for  example,
because all of the inputs have default values.

PHYFG,  ZOOFG and  BALFG are flags  which indicate whether   or not phytoplankton,
zooplankton and benthic  algae are  being simulated.   They   are documented  under
Table-type PLNK-FLAGS below.


4.4(3).8.3.1  Table-type PLNK-FLAGS — Plankton flags
          1         2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
  PLNK-FLAGS
  <-range><	pink-flags	>
   (repeats until all operations of  this  type  are  covered)

   END PLNK-FLAGS

                                       613                             RELEASE 8.0

-------
                                                   RCHRES — Section PLANK input
*******
Example
*******
  PLNK-FLAGS
    RCHRES PHYF ZOOF BALF SDLT AMRF DECF NSFG ZFOO***
    # -  #                                        ***
    1711                        3
  END PLNK-FLAGS
Details
Symbol         Fortran        Format  Def     Min     Max
               name(s)

   PHYFG,ZOOFG,   715     0       0       1
               BALFG,SDLTFG,
               AMRFG,DECFG,
               NSFG

               ZFOOD          15      2       1       3
Explanation

The following, except for ZFOOD, are the conditions when  the  flag
is on:
PHYFG - Phytoplankton is simulated
ZOOFG - Zooplankton are simulated
BALFG - Benthic algae are simulated
SDLTFG - Influence of sediment washload on  light  extinction is
         simulated
AMRFG - Ammonia retardation of nitrogen limited growth  is enabled
DECFG - Linkage between carbon dioxide and  phytoplankton  growth
        is decoupled
NSFG - Ammonia is included as part of available nitrogen  supply
       in nitrogen limited growth calculations
ZFOOD - The quality of zooplankton food
                                       614                            RELEASE 8.0

-------
                                                   RCHRES — Section PLANK input

4.4(3).8.3.2  Table-type SURF-EXPOSED — Correction factor for solar radiation
                                         data
         1          2345678
1234567890123456789012345678901 2345678901234567890123456789012345678901234567890
*******
Layout
******

  SURF-EXPOSED
  <-range>
  (repeats until all operations of this type are covered)

  END SURF-EXPOSED

*******
Example
*******

  SURF-EXPOSED
    RCHRES    CFSAEX***
    # -  #          ***
    1    7        .5
  END SURF-EXPOSED
Details
Symbol


Fortran
name ( s )
CFSAEX

Format Def Min Max Units Unit
system
F10.0 1.0 0.0 1.0 none Both
Explanation

This factor is used to adjust the input  solar  radiation  to  make  it applicable to
the RCHRES;   for example,  to  account  for  shading  of   the surface by  trees or
buildings.
                                       615                             RELEASE 8.0

-------
                                                   RCHRES — Section PLANK input

4.4(3).8.3.3  Table-type PLNK-PARM1  — General plankton parms, group 1
         12345678
1234567890123456789012345678901 2345678901 2345678901 23456789012345678901234567890
*******
Layout
******
  PLNK-PARM1
  <-range><-
            	plnk-parml	

(repeats until all operations of this type are covered)

END PLNK-PARM1
*******
Example
*******
  PLNK-PARM1
    RCHRES    RATCLP
    # -  #
    1    7        .5
  END PLNK-PARM1
                      NONREF
                          .3
LITSED
ALNPR

   .4
EXTB
 /ft
 0.1
MALGR***
  /hr***
Details
Symbol









Fortran
name ( s )
RATCLP
NONREF
LITSED
ALNPR
EXTB

MALGR

Format

F10.0
F10.0
F10.0
F10.0
F10.0

F10.0

Def

.6
.5
0.0
1.0
none
none
.3

Min

.01
.01
0.0
.01
.001
.001
.001

Max

none
1.0
none
1.0
none
none
none

Units

none
none
1/mg.ft
none
/ft
/m
/hr

Unit
system
Both
Both
Both
Both
Engl
Metric
Both
Explanation

RATCLP  - Ratio of  chlorophyll  "A" content  of  biomass  to  phosphorus content
NONREF  - Nonrefractory  fraction of algae and  zooplankton biomass
LITSED  - Multiplication factor to total sediment concentration to
         determine sediment contribution to light extinction
ALNPR - Fraction of nitrogen requirements  for phytoplankton growth
        satisfied  by nitrate
EXTB -  Base  extinction  coefficient for light
MALGR - Maximal unit algal growth rate
                                       616
                                                                    RELEASE 8.0

-------
                                                   RCHRES — Section PLANK input

4.4(3)rB.3.4  Table-type PLNK-PARM2 — General plankton parms, group 2
         12345678
123456789012345678901234567890123456789012345678901 23456789012345678901234567890
*******
Layout
******
  PLNK-PARM2
  <-range><-
            	.	plnk-parn2	•	

(repeats until all operations of this type are covered)

END PLNK-PARM2
*******
Example
*******

  PLNK-PARM2
    RCHRES *** CMMLT
    # _  # ***ly/min
    1    7       .01
  END PLNK-PARM2
CMMN
mg/1
 .05
CMMNP
.04
         CMMP
TALGRH
  degF
  85.0
TALGRL
  degF
  44.0
                                                                        TALGRM
                                                                          degF
                                                                          71.0
Details
Symbol












Fortran
name ( s )
CMMLT
CMMN
CMMNP
CMMP
TALGRH

TALGRL

TALGRM


Format

F10.0
F10.0
F10.0
F10.0
F10.0

F10.0

F10.0


Def

.033
.045
.0284
.0150
95.
35.
43.
6.1
77.
25.

Min

1.0E-6
1.0E-6
1.0E-6
1.0E-6
50.
10.
32.
0.0
32.
0.0

Max

none
none
none
none
212.
100.
212.
100.
212.
100.

Units

ly/min
mg/1
mg/1
mg/1
degF
degC
degF
degC
degF
degC

Unit
system
Both
Both
Both
Both
Engl
Metric
Engl
Metric
Engl
Metric
                                       617
                                                                   RELEASE  8.0

-------
                                                   RCHRES — Section PLANK input

Explanation

CMMLT - Michaelis-Menten constant for light limited growth
CMMN - Nitrate Michaelis-Menten constant for nitrogen limited growth
CMMNP - Nitrate Michaelis-Menten constant for phosphorus limited growth
CMMP - Phosphate Michaelis-Menten constant for phosphorus limited growth
TALGRH - Temperature above which algal growth ceases
TALGRL - Temperature below which algal growth ceases
TALGRM - Temperature below which algal growth is retarded
4.4(3).8.3.5  Table-type PLNK-PARM3 — General plankton parms, group 3
         1         2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  PLNK-PARM3
  <-range><	plnk-parm3-
   (repeats until all operations of this type are covered)

   END PLNK-PARM3
*******
Example
*******

  PLNK-PARM3
    RCHRES     ALR20      ALDH      ALDL     OXALD      NALDH      PALDH***
    # -  #       /hr       /hr       /hr       /hr       mg/1       mg/1***
    1    7                 .02                  .04
  END PLNK-PARM3
                                       618                            RELEASE 8.0

-------
                                                   RCHRES — Section PLANK input
Details
Symbol








Fortran
name ( s )
ALR20
ALDH
ALDL
OXALD
NALDH
PALDH

Format

F10.0
F10.0
F10.0
F10.0
F10.0
F10.0

Def

.004
.01
.001
.03
0.0
0.0

Min

1.0E-6
1.0E-6
1.0E-6
1 .OE-6
0.0
0.0

Max

none
none
none
none
none
none

Units

/hr
/hr
/hr
/hr
mg/1
mg/1

Unit
system
Both
Both
Both
Both
Both
Both
Explanation

ALR20 - Algal unit respiration rate at 20 degrees C
ALDH - High algal unit death rate
ALDL - Low algal unit death rate
OXALD - Increment to phytoplankton  unit death rate due to  anaerobic conditions
NALDH - Inorganic nitrogen concentration below which high algal
        death rate occurs (as nitrogen)
PALDH - Inorganic phosphorus concentration below which high algal
        death rate occurs (as phosphorus)
4.4(3).8.3.6  Table-type PHYTO-PARM — Phytoplankton parms
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
  PHYTO-PARM
  <-range X—
            	phyto-parm	

(repeats until all operations of this type are covered)

END PHYTO-PARM
*******
Example
*******
  PHYTO-PARM
    RCHRES
    t -  t
    1    7
              SEED
              mg/1
               2.0
MXSTAY
  mg/1
   15.
 OREF
ft3/s
  8.0
CLALDH
  ug/1
PHYSET
 ft/hr
REFSET***
 ft/hr***
  END PHYTO-PARM
                                      619
                                                                   RELEASE 8.0

-------
                                                   RCHRES  —  Section  PLANK input
Details
Symbol











Fortran
name ( s )
SEED
MXSTAY
OREF

CLALDH
PHYSET

REFSET


Format

F10.0
F10.0
F10.0

F10.0
F10.0

F10.0


Def

0.0
0.0
0.0001
0.0001
50.0
0.0
0.0
0.0
0.0

Min

0.0
0.0
0.0001
0.0001
.01
0.0
0.0
0.0
0.0

Max

none
none
none
none
none
none
none
none
none

Units

mg/1
mg/1
ft3/s
m3/s
ug/1
ft/hr
m/hr
ft/hr
m/hr

Unit
system
Both
Both
Engl
Metric
Both
Engl
Metric
Engl
Metric
Explanation

SEED - Minimum concentration of plankton not subject to advection (i.e.
       at high flow).
MXSTAY - Concentration of plankton not subject to advection at
         very low flow
OREF - Outflow at which concentration of plankton not subject
       to advection is midway between SEED and MXSTAY
CLALDH - Chlorophyll "A" concentration above which high algal
         death rate occurs
PHYSET - Rate of phytoplankton settling
REFSET - Rate of settling for dead refractory organics
                                      620
RELEASE 8.0

-------
                                                   RCHRES — Section PLANK input

4.4(3).8.3.7  Table-type ZOO-PARM1 — First group of zooplankton parms
         1          2345678
1 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 234567890

Layout
******
ZOO-PARM1
<-range><
                            — zoo-parm1

  (repeats until all operations of this type are covered)

  END ZOO-PARM1
*******
Example
*******
  ZOO-PARM1
    RCHRES    MZOEAT    ZFIL20
    # -  #  mg/l.hr 1/mgzoo.hr
    1    7       .098       0.2
  END ZOO-PARM1
                                ZRES20
                                   /hr
 ZD
/hr
OXZD***
 /hr***
Details
Symbol








Fortran
name ( s )
MZOEAT

ZFIL20
ZRES20
ZD
OXZD

Format

F10.0

F10.0
F10.0
F10.0
F10.0

Def

.055

none
.0015
.0001
.03

Min

.001

0.001
1 .OE-6
1 .OE-6
1 .OE-6

Max

none

none
none
none
none

Units

mg phyto/
mg zoo.hr
1/mgzoo.hr
/hr
/hr
/hr

Unit
system
Both

Both
Both
Both
Both
Explanation

MZOEAT  - Maximum  zooplankton unit  ingestion  rate
ZFIL20  - Zooplankton  filtering  rate  at  20  degrees C
ZRES20  - Zooplankton  unit  respiration rate at 20  degrees  C
ZD - Natural  zooplankton unit death  rate
OXZD -  Increment  to unit zooplankton death rate due to anaerobic conditions
                                       621
                                                                    RELEASE 8.0

-------
                                                   RCHRES — Section PLANK input

4.4(35.8.3.8  Table-type ZOO-PARM2 — Second group of zooplankton parms
         12345678
1234567890123456789012345678901 2345678901 234567890123456789012345678901234567890

Layout
******
                                             i

  ZOO-PARM2
  <-range><	zoo-parm2	>

  (repeats until all operations of this type are covered)

  END ZOO-PARM2

*******
Example
*******
  ZOO-PARM2
    RCHRES    TCZFIL    TCZRES    ZEXDEL
    # -  #
    1    7       1.2       1.1       0.8
  END ZOO-PARM2
ZOMASS***
mg/org***
Details
Symbol






Fortran
name ( s )
TCZFIL
TCZRES
ZEXDEL
ZOMASS

Format

F10.0
F10.0
F10.0
F10.0

Def

1.17
1 .07
0.7
.0003

Min

1.0
1.0
.001
1 .OE-6

Max

2.0
2.0
1.0
1.0

Units

none
none
none
mg/org

Unit
system
Both
Both
Both
Both
 Explanation

 TCZFIL and TCZRES are  the  temperature   correction coefficients for filtering and
       respiration,  respectively.
 ZEXDEL is  the   fraction    of   nonrefractory  zooplankton  excretion   which  is
       immediately  decomposed  when  ingestion rate > MZOEAT.
 ZOMASS is  the average  weight of a zooplankton organism.
                                       622
                          RELEASE 8.0

-------
                                                   RCHRES — Section PLANK  input

4.4(3).8.3.9  Table-type BENAL-PARM — Benthic algae parms
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

  BENAL-PARM
  <-range><	benal-parm	>

  (repeats until all operations of this type are covered)

  END BENAL-PARM

*******
Example
*******

  BENAL-PARM
    RCHRES      MBAL    CFBALR    CFBALG***
    # -  #     mg/m2                    ***
    1    7      520.        .56        .80
  END BENAL-PARM
Details
Symbol


Fortran
name ( s )
MBAL
CFBALR
CFBALG

Format
F10.0
F10.0
F10.0

Def
600.
1.0
1.0

Min
.01
.01
.01

Max
none
1.0
1.0

Units
mg/m2
none
none

Unit
system
Both
Both
Both
Explanation

MBAL is the maximum benthic algae density  (as  biomass).
CFBALR and CFBALG  are the ratios of benthic algal   to phytoplankton respiration
and growth rates, respectively.
                                       623
RELEASE 8.0

-------
                                                   RCHRES — Section PLANK  input

4.4(3).8.3.10  Table-type PLNK-INIT — Initial plankton conditions
         1          2345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901234567890
*******
Layout
******
  PLNK-INIT
  <-range><-
            	plank-init	

(repeats until all operations of this type are covered)

END PLNK-INIT
*******
Example
*******
PLNK-INIT
  RCHRES     PHYTO
  # -  #      mg/1
  1    7     .0001
END PLNK-INIT
ZOO
.05
BENAL
mg/m2
 .002
 ORN
mg/1
 .01
                                                       ORP
                                                      mg/1
                                                       .02
                                                                    ORC***
                                                                   mg/1***
                                                                    .01
Details
Symbol Fortran
name ( s )
 PHYTO
ZOO
BENAL
ORN
ORP
ORC

Form

F10.
F10.
F10.
F10.
F10.
F10.

at

0
0
0
0
0
0

Def

.96E-6
.03
1 .OE-8
0.0
0.0
0.0

Mi

1.
1 .
1 .
0.
0.
0.

n

OE-10
OE-6
OE-10
0
0
0

Max

none
none
none
none
none
none

Units

mg/1
org/1
mg/m2
mg/1
mg/1
mg/1

Unit
system
Both
Both
Both
Both
Both
Both
 Explanation

 PHYTO -  Phytoplankton,  as  biomass
 ZOO  - Zooplankton
 BENAL -  Benthic algae,  as  biomass
 ORN  - Dead refractory organic nitrogen
 ORP  - Dead refractory organic phosphorus
 ORC  - Dead refractory organic carbon
                                       624
                                                                    RELEASE 8.0

-------
                                                  RCHRES — Section PHCARB input

4.4(3).8.4  RCHRES-BLOCK — Section PHCARB input
         12345678
12345678901234567890123456789012345678901 2345678901 2345678901 2345678901234567890
*******
Layout
******

 [Table-type PH-PARM1]
 [Table-type PH-PARM2]
 [Table-type PH-INIT ]
Explanation

The exact format  of each of the  tables above is detailed  in the documentation
which follows.  Tables in brackets []  need not always be supplied; for example,
because all of the inputs have default values.
                                      625                            RELEASE 8.0

-------
                                                  RCHRES — Section PHCARB  input
4.4(3).8.4.1   Table-type PH-PARM1 — Flags for pH simulation
         12345678
12345678901 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901234567890
*******
Layout
******


  PH-PARM1
  <-rangexph-parm1
  (repeats until all operations of this type are covered)

  END PH-PARM1
*******
Example
*******
  PH-PARM1
    RCHRES PHCN ALKC***
    # -  #          ***
    1    7   30    9
  END PH-PARM1
Details
Symbol


Fortran
name ( s )
PHCNT
ALKCON

Format
15
15

Def
25
1

Min
1
1

Max
100
10
Explanation

PHCNT - Maximum number of  iterations  to  pH solution
ALKCON - Number of  the conservative substance  which is alkalinity
                                       626
RELEASE 8.0

-------
                                                  RCHRES — Section PHCARB  input

4.4(3).8.4.2  Table-type PH-PARM2 — Parameters for pH simulation
         12345678
12345678901234567890123456789012345678901 2345678901 2345678901 2345678901 234567890

Layout
******

  PH-PARM2
  <-range><	ph-parm2	>

  (repeats until all operations of this  type are covered)

  END PH-PARM2

*******
Example
*******

  PH-PARM2
    RCHRES    CFCINV  BRC02(1)  BRCO2(2)* * *
    # -  #            mg/m2.hr  mg/m2.hr***
    1    7      .901      72.0      65.1
  END PH-PARM2
Details
Symbol


Fortran
name ( s )
CFCINV
BRC02 ( 1 )
BRCO2 ( 2 )

Format
F10.0
F10.0
F10.0

Def
.913
62.
62.

Min
.001
.01
.01

Max
1.0
none
none

Units
none
mg/m2.hr
mg/m2 . hr

Unit
system
Both
Both
Both
Explanation

CFCINV - Ratio of carbon dioxide invasion rate  to oxygen  reaeration  rate
BRCO2 - Benthal release of CO2  (as carbon) for  (1) aerobic  and  (2) anaerobic
        conditions
                                      627
RELEASE 8.0

-------
                                                  RCHRES — Section PHCARB input

4.4(3).8.4.3  Table-type PH-INIT — Initial conditions for pH simulation
         12345678
1234567890123456789012345678901 2345678901234567890123456789012345678901234567890

Layout
******

  PH-INIT
  <-range><	ph-init	>

  (repeats until all operations of this  type are covered)

  END PH-INIT

*******
Example
*******
  PH-INIT
    RCHRES       TIC       CO2
    # -  #      mg/1      mg/1
    1    7       2.0       .03
  END PH-INIT
 PH***
   ***
8.0
Details
Symbol


Fortran
name ( s )
TIC
C02
PH

Format
F10.0
F10.0
F10.0

Def
0.0
0.0
7.0

Min
0.0
0.0
1.0

Max
none
none
15.0

Units
mg/1
mg/1
none

Unit
system
Both
Both
Both
Explanation

TIC  -  Total  inorganic  carbon
CO2  -  Carbon dioxide  (as  carbon)
PH - pH
                                       628
                                 RELEASE 8.0

-------
                                                                      COPY Block

4.4(11) COPY Block
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******


COPY
  Table-type TIMESERIES
END COPY
Explanation

The COPY  module is  used to  copy one  or more   time series   from one   location
(source)  to another   (target).  See Section 4.2(11)   in Part E  for  a  detailed
description of its function.
                                       629                             RELEASE  8.0

-------
                                                                      COPY Block

4.4(11).1  Table-type TIMESERIES — Number of time series to be copied
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

  TIMESERIES
  <-range>
  (repeats until all operations of this type are covered)

  END TIMESERIES

*******
Example
*******

  TIMESERIES
  Copy-opn ***
    # -  #  NPT  NMN***
    1    7    4
  END TIMESERIES
Details
Symbol



Fortran
name ( s )
NPT
NMN

Format
15
15

Def
0
0

Min
0
0

Max
20
20
Explanation

NPT is the number of point-valued  time  series to be copied.

NMN is the number of mean-valued time  series to be copied.
                                       630                            RELEASE 8.0

-------
                                                                    PLTGEN  Block

4.4(12) PLTGEN Block
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******
PLTGEN
  Table-type PLOTINFO
  Table-type GEN-LABELS
  Table-type SCALING
  Table-type CURV-DATA  (repeats for each curve to be plotted)
END PLTGEN
Explanation

The PLTGEN module prepares one or more time series  for display on  a  plotter.   It
writes the  time series,  and  associated title  and  scaling  information,    to a
"plot-file" which  must be input  to a  stand-alone program that   translates  the
data into commands that  drive the plotter.  See Section  4.2(12)   of  Part E  for
further details.
4.4(12).1  Table-type PLOTINFO — General plot information
         12345678
1234567890123456789012345678901 2345678901234567890123456789012345678901234567890
*******
Layout
******
  PLOTINFO
  <-range>
  (repeats until all operations of this  type are  covered)
  END PLOTINFO
*******
Example
*******

  PLOTINFO
  Plot-opn  ***
    # -  # FILE  NPT  NMN LABL  PYR PIVL  ***
    1    3              2
  END PLOTINFO
                                      631                             RELEASE 8.0

-------
                                                                    PLTGEN Block
Details
Symbol







Fortran
name ( s )
PLOTFL
NPT
NMN
LABLFG
PYREND
PIVL

Format
15
15
15
15
15
15

Def
30
0
0
0
9
1

Min
30
0
0
W.1
1
-2

Max
99
10
10
1
12
1440
Explanation

PLOTFL is the Fortran unit number of the plot file  (output of this operation).

NPT is the number of point-valued time series to be plotted.

NMN is the number of mean-valued time series to be plotted.

LABLFG indicates how the plot will be labeled:

     -1 means no labels (useful if you only want to observe the curves,   and  not
     have to wait for plotter to add labels).

     0 means standard labeling;  that is, one set of X and Y axes and  associated
     labels will be drawn for entire plot.

     1 means separate X and Y axes and  labels will be drawn for each  "frame" of
     the plot (eg. each water year).
     Useful if a long plot is to be  reproduced on  several successive  pages of a
     report.

PYREND is the calendar month which terminates a plot frame  (eg. a water  year).

PIVL is the number of basic time intervals  (DELT minutes  each)  to be  aggregated
to get to the interval of the data written  to the PLOTFL.  A PIVL of -1  causes a
monthly PLOTFL  to be  written.   A  PIVL of -2  causes an  annual PLOTFL  to be
written.
                                       632                            RELEASE 8.0

-------
                                                                     PLTGEN  Block
4.4(12).2  Table-type GEN-LABELS — General plot labels
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
  GEN-LABELS
  <-range><-
            	title	>           <-

(repeats until all operations of this type are covered)

END GEN-LABELS
-ylabl-
*******
Example
*******
  GEN-LABELS
  Plot-opn ***
    # -  #  General title
    1    3  Reservoir inflow and outflow rates
  END GEN-LABELS
                                                           Y-axis  label  ***
                                                           Flow (ft3/sec)
Details
Symbol

<ylabl>

Fortran
name ( s )
TITLE
VLABL

Format Def Min Max
1 OA4 none none none
5A4 none none none
Explanation

TITLE is the general plot title.

YLABL is the label to be placed on  the Y-axis.
                                      633
                                                                      RELEASE 8.0
</pre><hr><pre>
-------
                                                                    PLTGEN  Block
4.4(12).3  Table-type SCALING  — Scaling information
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
Layout
******
SCALING
<-range>< — ymin — >< — ymax — >< — ivlin-x-thresh->
(repeats until all operations of this type are covered)
END SCALING
*******
Example
*******
SCALING
Plot-opn ***
# - # YMIN YMAX IVLIN ***
1 3 500. 48.
END SCALING
************************************************************
Details
Symbol Fortran Format Def Min Max
name ( s )
<ymin> YMIN F10.0 0.0 none none
<ymax> YMAX F10.0 none none none
<ivlin> IVLIN F10.0 none 0.01 none
<thresh> THRESH F10.0 -1 .OE30 none none













rft***£***************

Units Unit
system
See Note Both
See Note Both
ivl/in Both
See Note Both
Note:  Units  are defined  by the  user,  in field YLABL of Table-type GEN-LABELS

Explanation YMIN is  the minimum  ordinate (Y axis)  value.

YMAX  is  the maximum  ordinate value.
IVLIN is the  horizontal   (time)   scale;   that is,   number of  intervals (in plot
file) per inch on  graph.
THRESH is the  write threshhold  value.   If  the value for any  curve is greater
than  the threshhold, a full record is written to the PLOTFL.
                                       634
RELEASE 8.0
</pre><hr><pre>
-------
                                                                    PLTGEN  Block
4.4(12).4  Table-type CURV-DATA — Data for each curve on plot

Repeats for each curve on the plot
         12345678
12345678901234567890123456789012345678901 2345678901 2345678901 2345678901 234567890
Layout
******
CURV-DATA


(repeats until all operations of this type
END CURV-DATA
*******
Example
*******
CURV-DATA
Plot-opn Curve label Line Intg Col
# - # type eqv code
1 3 Inflow 10 1 1
END CURV-DATA
*********************************************
Details
Symbol Fortran Format Def
name ( s )
<label> LABEL 4A4 none
<lin> LINTYP 15 0
<int> INTEQ 15 0
<col> COLCOD 15 0
<tr> TRAN A4 SUM



^1-r'i
V V-i S
are covered)





Tran ***
code ***
AVER
*************

Min Max

none none
none none
0 13
0 10
none none
                                      635
RELEASE 8.0
</pre><hr><pre>
-------
                                                                    PLTGEN Block

Explanation

LABEL is the label (descriptor) for this particular curve.

LINTYP describes the type of line to be drawn for this curve. It also determines
the frequency of plotted symbols:

     A zero value means points are connected  by straight lines;  no symbols are
     drawn at individual data points.

     A  positive  value means  points  are  connected  by straight  lines;   the
     magnitude determines the frequency of plotted  symbols  (eg.  4 means plot a
     symbol at every 4th point obtained from the plot file).

     A negative  value means no connecting  lines are drawn.    Only  symbols are
     plotted; the absolute value determines the frequency (as above).

INTEQ is the  "integer equivalent" of the  symbols to be plotted  for this curve
(ie.  indicates which symbol  to use).   It is only meaningful  if LINTYP is not
zero.  Value of 2 might mean a triangle, etc.

COLCOD is the color code for this curve.   The meaning depends  on how the stand-
alone plot program is set up; eg. 1 might mean red pen, 2 blue  pen, etc.

TRAN is the "transformation code" used to aggregate data from the basic  interval
(internal time step) to the PLOTFL interval.  Valid values  are:  SUM, AVER,  MAX,
MIN, and LAST.
Note:    These  data are  designed with   the  requirements   of  a  Calcomp plotting
system  in mind, but are also useful on  some  other  plotting systems.    The stand-
alone program, which  reads  the plot file and drives  the plotter,   must translate
these data  into plotter commands.
                                       636                            RELEASE 8.0
</pre><hr><pre>
-------
                                                                    DISPLY Block

4.4(13) DISPLY Block
         1          2345678
12345678901 2345678901 2345678901 2345678901 234567890123456789012345678901234567890
*******
Layout
******

DISPLY
  Table-type DISPLY-INF01
 [Table-type DISPLY-INF02]
END DISPLY
Explanation

The DISPLY module  summarizes a time series  and presents  the results   in neatly
formatted tables.   Data can be displayed  at any HSPF-supported  interval.   See
Section 4.2(13) of Part E for further information.
                                      637                             RELEASE 8.0
</pre><hr><pre>
-------
                                                                    DISPLY Block

4.4(13).1   Table-type DISPLY-INFO1 — Contains most of the information necessary
           to generate data displays.
         12345678
123456789012345678901 2345678901 2345678901 23456789012345678901 2345678901234567890
*******
Layout
******
  DISPLY-INFO1
  <-range><	
            	title	>   <tr><piv>    d<filxpyr>

(repeats until all operations of this type are covered)

END DISPLY-INFO1
                            d<filxynd>
*******
Example
*******
                        -Title-
DISPLY-INF01
  #thru#***<	
        ***
        ***
  1     Daily precip in TSS #20 (in)
  2     Simulated soil temp (Deg C)
END DISPLY-INF01
     <-short-span->
     <	disply	>  <annual summary ->
TRAN PIVL DIG1 FIL1  PYR DIG2 FIL2 YRND
                       1    2   20    6
AVER    4    1   21    1    1   22    6
Details
Symbol
<title>
<tr>
<piv>
d
<fil>
<pyr>
d
<fil>
<ynd>

Fortran
name ( a )
TITLE(*)
TRAN
PIVL
DIGIT1
FILE1
PYRFG
DIGIT2
FILE2
PYREND

Format
7A4
A4
15
A1
15
15
A1
15
15

Def
none
SUM
0
0
6
0
0
6
9

Min
none
none
0
0
6
0
0
6
1

Max
none
none
1440
7
99
1
7
99
12
                                       638
                                                                    RELEASE 8.0
</pre><hr><pre>
-------
                                                                    DISPLY Block

Explanation

TITLE is the title that will be printed at the top of each page of the display.

TRAN  is the  "transformation  code",  used  to aggregate  data  from the  basic
interval (internal time step)  to the various display intervals (for both short-
and long-span displays). Valid values are: SUM, AVER, MAX, MIN, LAST.

PIVL is the no. of basic time intervals (DELT mins each) to be aggregated to get
to the interval  of the data printed in  a shortspan display  (eg.   In the above
example,  if DELT  were 15 mins for DISPLY  operation #2,  then the  data in the
short-span summary tables would be displayed at  an interval  of 1 hour (PIVL=4).
If PIVL=0, a short-span display is not produced.

DIGIT1 and DIGIT2 are the no.  of decimal digits to be used to print data in the
short-span and long-span displays, respectively.  Note that it is up to  the user
to ensure  that this value falls  in the valid  range 0-7.  HSPF does  not check
this.

FILE1 and FILE2 are the Fortran unit nos.   of the files to which shortand long-
span displays will be routed.

PYRFG indicates  whether or  not a  long-span display  (annual summary   of daily
values) is required. Value 1 means it is, 0 means it is not.

PYREND is the calendar month which will appear at the right-hand extremity of  an
annual summary.   This enables  the user to  decide whether   the data  should  be
displayed on a calendar year or some other (eg. water year) basis.
                                      639                             RELEASE 8.0
</pre><hr><pre>
-------
4.4(13).2  Table-type DISPLY-INF02 -
           module DISPLY.
                                DISPLY Block

- Additional optional information for
         12345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901234567890
*******
Layout
******
  DISPLY-INF02
  <-range><—mult—><	add—><-thresh!><-thresh2>
  (repeats until all operations of this type are covered)

  END DISPLY-INF02
*******
Example
*******
  DISPLY-INFO2
    tthrut Convert DegC to F    Display negative data ***
                Mult       Add    THRSH1              ***
    25       1.8      32.0     -999.
  END DISPLY-INFO2
Details
Symbol
<mult>
<add>
<thresh1 >
<thresh2>

Fortran
name ( s )
A
B
THRESH 1
THRESH2

Forma t
F10.0
F10.0
F10.0
F10.0

Def
1.0
0.0
0.0
0.0

Min Max Units Unit
system
none none none Both
none none none Both
none none none Both
none none none Both
                                       640
                                  RELEASE 8.0
</pre><hr><pre>
-------
                                                                    DISPLY Block

Explanation

This table is usually not supplied.

A and B are  parameters used to convert the data from  internal units to display
units:
        Display value= A*(internal value)+B

The conversion  is done  before any aggregation  of data  to coarser  time steps
(than DELT)  is performed.  Note that the default values of A and B result in no
change.

THRSH1   and THRSH2  are  "threshold values"  for  the  short-span and   long-span
displays,  respectively (THRSH2  is not presently used).  THRSH1 can  be used to
reduce the quantity of printout produced  in a short-span display;  it  functions
as  follows:  When  the individual  values in  a row  of the  display have  been
aggregated to get the "row value"  (hour- or day-value,  depending on the display
interval),  if the row-value is greater than THRSH1 the row is printed,  else it
is omitted.  Thus, for example, the default of 0.0 will ensure that rows of data
containing all zeros are omitted.
                                      641                            RELEASE  8.0
</pre><hr><pre>
-------
                                                                    DURANL Block

4.4(14)  DURANL Block

         1          2345678
1234567890123456789012345678901234567890123456789012345678901 2345678901 234567890
*******
Layout
******
DURANL
  Table-type GEN-DURDATA
 [Table-type SEASON]
 [Table-type DURATIONS]
 [Table-type LEVELS]
 [Table-type LCONC]
END DURANL
Explanation

The DURANL module performs duration and excursion analysis on a time  series.  For
example,  it analyzes the frequency with which  N consecutive values  in  the  time
series exceed a specified set of values,  called "levels".   N is  the "duration"
of the  excursion;  up  to 10  durations may  be used  in one  duration  analysis
operation.  The user may specify that only those data falling within  a specified
time in  each year  (analysis season)   be processed.   For  further   details see
Section 4.2(14) of Part E.
                                       642                            RELEASE 8.0
</pre><hr><pre>
-------
                                                                    DURANL Block

4.4(14).1   Table-type GEN-DURDATA — General information for duration analysis
         12345678
123456789012345678901 2345678901 23456789012345678901 23456789012345678901234567890

Layout
******

  GEN-DURDATA
  <-range><	title	><-ndx-nlx-pr><-pu>

  (repeats until all operations of this type are covered)

  END GEN-DURDATA

*******
Example
*******
  GEN-DURDATA
    #thru#<***	title—
           ***
    1     Simulated DO in Reach 40
  END GEN-DURDATA
->  NDUR  NLEV PRFG   P- LCNU LCOU
                  UNIT
           52         20
Details
Symbol
<title>
<nd>
<nl>
<pr>
<pu>
<lcn>
<lco>

Fortran
name ( s )
TITLE(*)
NDUR
NLEV
PRFG
PUNIT
LCNUM
LCOUT

Format
10A4
15
15
15
15
15
15

Def
none
1
1
1
6
0
0

Min
none
1
1
1
1
0
0

Max
none
10
20
7
99
5
1
                                      643
                     RELEASE 8.0
</pre><hr><pre>
-------
                                                                    DURANL Block

Explanation

TITLE is  the title  which the user  gives to  the duration  analysis operation;
usually, something which identifies the time series being analyzed.

NDUR is the no. of durations for which the time series will be analyzed.

NLEV is the no. of "levels" which will be used in analyzing the time series.

PRFG is a flag which governs the  quantity of information printed out.  A  value
of 1 results in minimal (basic) output.  Increasing the value  (up to the maximum
of 7) results in increased detail of output.

PUNIT is the  Fortran unit no.  to  which the (printed)  output  of the duration
analysis operation will be routed.  Each duration analysis operation must have  a
unique Fortran unit no.

LCNUM indicates  the number  of lethal concentration  curves to  be used  in  the
analysis. A zero means no LC analysis is to be performed.

LCOUT  is  a flag  which  governs  the  printout  of  intermediate   lethal  event
information (1-on).
4.4(14).2  Table-type SEASON — The  analysis  season
          1          2345678
 123456789012345678901234567890123456789012345678901 2345678901 2345678901234567890
 *******
 Layout
 ******
   SEASON
   <-range>         <	start—>         <	end	>
   (repeats  until  all  operations  of this type are covered)

   END SEASON
 *******
 Example
 *******

   SEASON
           ***      Start               End
     #thru#***      mo da hr mn         mo da hr mn
     1   10         02                  02
   END SEASON
                                       644                            RELEASE 8.0
</pre><hr><pre>
-------
                                                                    DURANL  Block

Details

Symbol         Fortran        Format  Def     Min     Max
               name(s)

<start>        SESONS(2-5)    4(1X,I2)  see below

<end>          SESONE(2-5)    4(1X,I2)  see below
Explanation

This table is used if one wishes to specify an  "analysis  season";   that is,  that
only  data  falling  between  the  specified  starting  and   ending   month/day/
hour/minute (in each year) should be considered.
Note:
     The defaults,  minima,  maxima and other values  for  specifying  the  starting
     and ending date/times are the same as  those given in  the discussion  of the
     GLOBAL Block  (Section 4.2).   Basically,   if  any fields   in the   starting
     date/time are blank they default to the earliest meaningful value;  for the
     ending date/time  they default to the  latest possible values.   Thus,   the
     analysis season in the example above includes the entire month  of February.
     Although  it is  not  meaningful to  provide  for a   "year" in the  fields
     documented above  (since the analysis  season  applies  to every  year  in the
     run), the four spaces preceding both the <start> and <end>  fields should be
     left blank because the system does,  in fact,  read  the year and expects it
     to be blank or zero.
     The defaults  imply that,  if this  table  is omitted,   the   analysis  season
     extends from January through December.
                                      645                             RELEASE 8.0
</pre><hr><pre>
-------
                                                                    DURANL Block

4.4(14).3  Table-type DURATIONS — Durations to be used in the analysis
         12345678
12345678901234567890123456789012345678901 234567890123456789012345678901234567890

Layout
******

  DURATIONS
  <-range><-d1 ><	others	>

  (repeats until all operations of this type are covered)

  END DURATIONS

*******
Example
*******

  DURATIONS
    #thru#***<	Durations	>
           *** 1    2    3    4    5
    1    2    1   10   15   20   40
    3         1   20   21   22
  END DURATIONS

  *******


Details

Symbol         Fortran         Format  Def      Min      Max
               name(s)


<d1>           DURATd)        15      1        1        1

<others>       DURAT(2-10)     915     2        2        none
                                       646
RELEASE 8.0
</pre><hr><pre>
-------
                                                                     DURANL Block

Explanation

DURAT(*)  is an array which contains  the  NDUR different durations for which  the
time series will be analyzed  (ND01  was  specified in Table-type GEN-DURDATA).  The
durations are expressed in multiples  of the  internal time step specified in  the
OPN SEQUENCE Block  (Section 4.3).   Thus,  if DELT=  5 min and the duration is 3,
the time series will  be analyzed with  a "window" of  15 minutes.   The analysis
algorithm requires  that the   first  duration be 1 time step,   but the others  can
have any value.
4.4(14).4  Table-type LEVELS   —  Levels to be used in the analysis
         12345678
1 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 234567890


Layout
******


  LEVELS
  <-range>< — • — - ---------------------- first 7 ------------------------- • ---- • ----- >
  <-range>< --- - ---------- — ----- — ---- -second 7 ----- — — ------------------ • -------- >
   <*BY*jm<"t£kV4'«i<»*««<**w«iiiA««i»*i*iiB«-«wi*«i««*iw^*>»<ii* *l A Q ^ fi ____ mimmm -mrnimmm --- _ J_ , --- n •• • ______ um» • "S
   ""iCIIiyd^N                            JLCIO W \i mm^^mmmm^^-mf^-im-wm, _ •_ — — ——^^WWUBW^B^
  (repeats until all  operations  of this type are covered)

  END LEVELS
*******
Example
*******

  LEVELS
    #thru#***       1234567
    #thru#***       8          9        10
    1            -30.       -10.        0.       10.       20.       40.        80.
    1            100.       200.     1000.
    #thruf***       1234
    2            -20.         0.       20.       50.
  END LEVELS
                                       647                             RELEASE 8.0
</pre><hr><pre>
-------
                                                                    DURANL Block
Details
Symbol
<first7>
<second7>

Fortran
name ( s )
LEVEL(2-15)
LEVEL( 16-21 )

Format
14F5.0
14F5.0

Def
0.0
0.0

Min Max
none none
none none
Explanation

LEVEL(2thru21) contains the 20 possible "levels" for which the input time series
will be analyzed.  (LEVEL(1) and LEVEL(22)  are reserved for system use and  this
does not affect the user since he can only specify LEVEL(2thru21)).   The actual
no.  of levels (KLEV)  was specified by  the user in Table-type  GEN-DURDATA.   If
NLEV is greater than 7 the entry for  a given operation must be  continued to the
next line; up to 3 lines may be required to cover all the levels.  In the example
above,  operation 1 has  10 levels  and thus requires 2  lines,  but operation 2
only requires 1 line because it has only 4 levels.
When an entry has to be continued onto more than 1 line:

1.  No blank  or "comment"  lines may  be put  between any  of  the   lines  for  a
    continued entry.  Put all comments ahead of  the entry.   (See operation 1  in
    above example).
2.  The <range>  specification must  be repeated   for each  line onto  which the
    entry is continued.

Note that the  levels must be specified  in ascending order.  The   system  checks
that this requirement is not violated.
                                       648
RELEASE 8.0
</pre><hr><pre>
-------
                                                                    DURANL  Block

4.4(14).5  Table-type LCONC — Lethal concentrations to be used in  the  analysis
           Repeats for each lethal concentration curve-LCNUM times
         12345678
12345678901234567890123456789012345678901 234567890123456789012345678901234567890
*******
Layout
******
  LCONC
  <-range><
  <-range><
                                       -first-7-
            	last-3	>

(repeats until all operations of this type are covered)

END LCONC
*******
Example
*******
LCONC
# -
# -
1
1


#***
#***
2
2


LC1
LC8
1 .
20.


LC2
LC9
3.
30.


LC3 LC4
LC10
6. 8.
60.


LC5 LC6 LC7

15. 5. 8.

  END LCONC
Details
Symbol
<first-7>
<last-3>

Fortran Format Def
name ( s )
LCONC(1-7,I) 7F10.0 0.0
LCONC(8-10,I) 3F10.0 0.0

Min Max
none none
none none
Explanation

LCONC(*)  is an array which contains  the   NDUR  different lethal levels which are
used in a lethal  concentration analysis.   If no  lethal  analysis  is being done,
this table may be omitted.
                                       649
                                                                    RELEASE 8.0
</pre><hr><pre>
-------
                                                                     GENER Block

4.4(15)  GENER Block
         1          2345678
1234567890123456789012345678901234567890123456789012345678901 2345678901 234567890
*******
Layout
******

GENER
  Table-type OPCODE
 [Table-type NTERMS]
  Table-type COEFFS
only required if
  OPCODE=8
 [Table-type PARM]       only required if OPCODE = 9,10, or  11

END GENER
Explanation


The GENER  module generates  a time series   from  one  or   two input  time series.
Usually,   only Table-type  OPCODE is  required.   However,    if OPCODE=8  (power
series), you need to supply the no.  of  terms  in  the  power  series and the values
of the coefficients. If OPCODE = 9,10, or 11 then Table-type PARM is required to
input the constant required in the operation.
                                       650                            RELEASE 8.0
</pre><hr><pre>
-------
                                                                     GENER Block

4.4(15).1  Table-type OPCODE — Operation code for time series generation
         12345678
12345678901234567890123456789012345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
******

  OPCODE
  <-range><opn>
  (repeats until all operations of this type are covered)

  END OPCODE

*******
Example
*******

  OPCODE
    #thru#  OP- ***
           CODE ***
    1    3    8
    5        20
  END OPCODE
Details
Symbol         Fortran        Format  Def     Min     Max
               name(s)

<opn>          OPCODE         15      none    1       22
                                      651                            RELEASE 8.0
</pre><hr><pre>
-------
                                                                     GENER Block

Explanation

OPCODE is the operation code.  If A and B are the input time series and C is the
generated time  series,  the  functions performed   for the  allowable range  of
values of OPCODE are:


      OPCODE               Definition

         1                  C= Abs(A)
         2                  C= Sqrt(A)
         3                  C= Trunc(A)
         4                  C= Ceil(A)
         5                  C= Floor(A)
         6                  C= loge(A)
         7                  C= log10(A)
         8                  C= K(1)+K(2)*A+K(3)*A**2+(up to 7 terms)
         9                  C= K**A
        10                  C= A**K
        11                  C= A+K
        12                  C= Sin(A)
        13                  C- Cos(A)
        14                  C- Tan(A)
        15                  C- Sum(A)
        16                  C= A+B
        17                  C= A-B
        18                  C= A*B
        19                  C= A/B
        20                  C= Max  (A,B)
        21                  C- Min  (A,B)
        22                  C- A**B
 If 1<=OPCODE<=15,  only one input  time series  is required;   else  two inputs  are
 required.  Note   that  the operation  is performed on  the   data  when they  are in
 internal form  (timestep=DELT,etc).   For further details,  see  Section 4.2(15)   of
 Part  E.
                                       652                            RELEASE 8.0
</pre><hr><pre>
-------
                                                                     GENER Block

4.4(15).2  Table-type NTERMS — No. of terms in power series
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
  NTERMS
  <-rangex-nt>
  (repeats until all operations of this type are covered)

  END NTERMS

*******
Example
*******

  NTERMS
    #thru#NTERMS ***
    1    2    4
  END NTERMS
Details
Symbol         Fortran        Format  Def     Min     Max
               name(s)

<nt>           NTERMS         15      2       1       7
Explanation

This table is only relevant if OPCODE=8.   NTERMS   is  the  total  no.   of terms in
the power series:

                     C= K(1)+K(2)*A+K(3)*A**2   etc.

The default value of 2 was chosen because  this  option  will probably  be  used most
often  (to perform a linear transformation).
                                      653                             RELEASE 8.0
</pre><hr><pre>
-------
                                                                     GENER Block

4.4(15).3  Table-type COEFFS — Coefficients in generating power function
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******
  COEFFS
  <-range><
            	coeffs	

(repeats until all operations of this type are covered)

END COEFFS
*******
Example
*******
  COEFFS
    #thru# ***
    1    7
  END COEFFS
                K1
              -2.0
 K2
1.5
 K3
0.2
Details
Symbol
<coef fs>

Fortran
name ( s )
K(*)

Format Def Min Max
7F10.0 0.0 none none
 Explanation

 This  table is  only relevant if  OPCODE=8.   K(1  thru NTERMS)  are the coefficients
 in  the  power function:

             C= K(1)+K(2)*A+K(3)*A**2+ etc.
                                       654
                                                                    RELEASE 8.0
</pre><hr><pre>
-------
                                                                     GENER Block
4.4(15).4  Table-type FARM — Constant for GENER operation
         1          2345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******


  FARM
  <-range><—con	>
  (repeats until all operations of this type are covered)

  END FARM

*******
Example
*******


  FARM
#-#*** K
1 7 2.5
END FARM
**************************
Details
Symbol Fortran
name ( s )
<con> K
********************************
Format Def Min Max
F10.0 1.0 none none
Explanation

This table is only relevant if OPCODE is 9,10,or 11.

K is the constant required in the operation.
                                      655
RELEASE 8.0
</pre><hr><pre>
-------
                                                                    MUTSIN Block

4.4(16) MUTSIN Block
         1          2345678
1 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
MUTSIN
  Table -type MUTSINFO

END MUTSIN
Explanation

The MUTSIN module is used to copy one  or more  time  series  from  a  HSPF-PLOTFL or
its equivalent  to one or  more targets.  The   targets may   be files  in  the TSS
specified in  the EXT-TARGETS  Block or  input  time   series in   other operations
specified in the NETWORK  Block.  See Section 4.2(16)  in Part   E  for a detailed
description of MUTSIN1s function.
                                       656                            RELEASE 8.0
</pre><hr><pre>
-------
                                                                    MUTSIN  Block

4.4(16).1   Table-type MUTSINFO — Information about time series  to be  copied
         12345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901 234567890
*******
Layout
******

  MUTSINFO
  <-range><mfl><nptxnmn><nli><mis>
  (repeats until all operations of this type are covered)

  END MUTSINFO
*******
Example
*******
  MUTSINFO
    # -  #  MFL  NPT  NMN  NLI MSFG ***
    1        30    1    1   25    0
  END MUTSINFO
Details
Symbol
<mfl>
<npt>
<nmn>
<nli>
<mis>

Fortran
name ( s )
MUTFL
NPT
NMN
NLINES
MISSFG

Format
15
15
15
15
15

Def
30
0
0
25
0

Min
30
0
0
1
0

Max
99
10
10
none
3
Explanation

MUTFL is the Fortran unit number of  the  file  being  input.
NPT is the number of Point-valued  time series to  be input.
NMN is the number of Mean-valued time series  to be  input.
NLINES is the number of lines to skip at the  beginning  of MUTFL.
MISSFG is the missing data action  flag.
       0 - stop on missing data;   1  - fill missing  data with 0.0;
      ' 2 - fill missing data with  -1.0E30;   3 - fill with next value
                                       657
RELEASE 8.0
</pre><hr><pre>
-------
                                                                   FTABLES Block
4.5  FTABLES Block
         1          2345678
12345678901234567890123456789012345678901 2345678901 2345678901 2345678901 234567890

Layout
******

FTABLES
  FTABLE    <t>
<	ftab-parms	>
<	 row-of-values 	>

line above repeats until function has been described through desired range

  END FTABLE<t>

  FTABLE    <t>
<	ftab-parms	>
<	 row-of-values 	>

line above repeats until function has been described through desired range

  END FTABLE<t>

  Any number of FTABLES may appear in the block

END FTABLES
********


Details


   Symbol      FORTRAN     Format                 Comment
               Name(s)

 <t>            NUMBR          13         Users  identifying no.  for this FTABLE.

 <ftab-parms>   Fparms(4)       415        Up  to  4  control parameters may be
                                         supplied for an Ftable,  e.g.  no.  of
                                         rows,  no. of cols.,  etc.  Exact details
                                         will depend on the
                                         FTABLE concerned.
 <row-of-values>  VAL(*)
variable  Each column is dedicated to one of the
          variables in the function. Each row
          contains a full set of corresponding
          values of these variables, e.g. depth,
          surface area,volume,outflow for a RCHRES
                                       658
                                       RELEASE 8.0
</pre><hr><pre>
-------
                                                                   FTABLES  Block

Explanation

An FTABLE  is used  to specify,   in discrete  form,  a  functional  relationship
between two or more variables.  For example, in the RCHRES module, it  is  assumed
that there is  a fixed relationship between depth,  surface  area,   volume,   and
f(VOL)  discharge  component.   An FTABLE is  used to document   this nonanalytic
function in numerical form.    Each column of the FTABLE is  dedicated to one of
the above  variables,  and each  row contains  corresponding values  of  the set.
That is, each row contains the surface area,  volume,  and discharge for  a  given
depth.  The number of rows in the FTABLE will depend on the range of depth  to be
covered and the desired resolution of the function.


4.5(3)  FTABLES for the RCHRES Application Module

4.5(3).1  FTABLE for HYDR section

The geometric and hydraulic properties of a  RCHRES are summarised in  a function
table   (FTABLE).    Every  RCHRES  must be  associated  with  one  FTABLE;    the
association  is  done  in  Table-type  HYDR-PARM2   (Section  4.4(3).2.2  above).
Usually,   every RCHRES  will have  its own  FTABLE;  however,   if  RCHRESs  are
identical they can share the same FTABLE.

         r********************************
         12345678
1234567890123456789012345678901 2345678901 2345678901 2345678901 2345678901234567890

Layout
******

  FTABLE    <t>
<-nrx-nc>
<-depth—><—area—><-volume-><	f (VOL) -values	>

The above row repeats until values have been supplied to cover  the entire
cross section at the desired resolution

  END FTABLE<t>

*******
Example
*******

  FTABLE    103
 rows cols                                         ***
    3    5
     depth      area    volume  outflowl  outflow2 ***
      (ft)   (acres) (acre-ft)  ( ft3/s)   ( ft3/s) ***
        0.0       0.0       0.0       0.0        0.0
        5.0      10.0      25.0      20.5      10.2
      20.0     120.0    1000.0     995.0     200.1
  END FTABLE103
                                       659                             RELEASE 8.0
</pre><hr><pre>
-------
                                              FTABLES for RCHRES — HYDR section
Details
Symbol
<t>
<nr>
<nc>
<depth>
<area>
<volume>
<f (VOL)-
values>
FORTRAN
Name ( s )
see Sect. 4.5
NROWS
NCOLS
Depth
Surface area
Volume
f (VMNCOLS-3)
Format

15
15
F10.0
F10.0
F10.0
(NCOLS-3)
F10.0


No. of
No. of
Units:
Units:
There
volume
Units:
Comment

rows used to document function
columns in FTABLE
ft or m
acres or ha
must be a-t least one entry with
=0.0 Units: acre. ft or Mm3
ft3/s or m3/s
Explanation

This  FTABLE  lists  depth,  surface  area  and,  optionally,   one or more other values
(typically discharge  rates)   as functions  of  volume.    HSPF interpolates between
the specified  values   to  obtain the  geometric and  hydraulic characteristics for
intermediate values of volume.

The FTABLE must  satisfy the  following  conditions:

1.   (NCOLS*NROWS)  must not exceed 100

2.  NCOLS must be  between 3  and 8

3.  There must be  at  least one row in  the  FTABLE

4.  No negative  values

5.  The depth  and  volume  fields may not contain values which decrease as the row
    no. increases

In  the example given  above,  we have a  reach with two outflows, both of which are
functions of volume.   Thus,  there are  5 columns in the FTABLE.

The  values  for this   type of FTABLE can either be supplied  directly by the user
or  be  generated by a  subsidiary program from  more basic information  (eg.  by
backwater analysis or Manning's equation for assumed uniform flow).
                                       660
RELEASE 8.0
</pre><hr><pre>
-------
                                                            Time series linkages
4.6  TIME SERIES LINKAGES
4.6.1  General Discussion

In  the EXTERNAL  SOURCES,  NETWORK,   and  EXTERNAL TARGETS  blocks,  the  user
specifies those time series  which are to be passed between  pairs of operations
in the same INGRP or between individual operations and external sources /targets
(  TSS Datasets  or sequential files).   The  blocks are arranged in  the form  of
tables, each containing one or more entries (rows).   Each entry contains source
information,  a multiplication  factor,  a transformation function,   and target
information.

The entries in these blocks may be in any order.

When time series associated with datasets in  the TSS are referred to,  the user
supplies the  dataset number and  a member  name.   The member  information must
agree with data supplied when the dataset was created (Section 2.0).

The user specifies time series which are input to, or output from,   an operating
module by supplying a group name «sgrp>, <tgrp>) and  a member name plus one  or
two subscripts (<smem><m#>, <tmem><m#». The member info must be compatible with
data given in  the Time Series Catalog  for the applicable operating  module and
group  (Section 4.7).

The user may route the same source to several targets by making several separate
entries in a block,  each referring to the same source,  or by making use of the
"range" feature provided in the <tvol>< range> field.  (This latter  feature does
not apply to entries in the EXT TARGETS Block).   In either case the implication
is that  data from the source  will be used  repetitively and each time  will  be
multiplied by the specified  factor and added to whatever else  has  already been
routed to the specified target.  Conversely,  several sources may be routed to a
single target  (except in the  EXT TARGETS  Block).   This happens   when several
entries specify different sources but the same target.  Here, the implication  is
that the  data obtained  from the  several sources  must be  accumulated (added)
before being used  by the target.   The  maximum number of entries   in all three
blocks must not exceed 960-
                                      661
                                                                      RELEASE 8.0
</pre><hr><pre>
-------
                                                            Time series linkages

4.6.2  EXTERNAL SOURCES Block

In this block the  user specifies those time series which are  to be supplied to
operations in a RUN from sources external to it (from TSS Datasets or sequential
files).
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

EXT SOURCES
<svol><s#> <exsm>   <ss><sgX-mfact—><tr> <tvol>< range> <tgrp> <tmem><m#>
              or
           <sfmt>f#

Above line repeats until all external sources have been specified

END EXT SOURCES
*******
Example
*******

EXT SOURCES
<-Volume-> <Member> SsysSgap<—Mult—>Tran  <-Target vols>  <-Grp>  <-Member->   ***
<Name>   # <Name> # tern strg<-factor->strg  <Name>   #    #         <Name>  # #   ***
TSS      5 INFLO    ENGL                    RCHRES   1      EXTNL  IVOL
SEQ      3 HYDDAY   ENGL           1.0      RCHRES   1      EXTNL  ICON
END EXT SOURCES
                                       662                            RELEASE 8.0
</pre><hr><pre>
-------
Details
                                                            Time series linkages
Symbol
FORTRAN
Name(s)
Format
      Comment
<svol>
SVOL
A6
<s#>
<exsm>
<sfmt>
SVOLNO 14
SMEMN A6
SFCLAS A6
f#
<ss>
<sg>
<mfact>



<tr>



<tvol>

< range>



<tgrp>

<tmem>

<m#>
SFNO
SSYST
SGAPST
TRAN
TVOL
12
                       A4
                       A4
MFACTR    F10.0
A4
A6
TOPFST, 2(1X,I2)
TOPLST
TGRPN     A6

TMEMN     A6

TMEMSB(2) 212
External source volume. Valid values are TSS
(Time Series Store) and SEQ (sequential file)

Dataset No.(TVOL=TSS); Fortran unit no. (TVOL=SEQ)

Dataset member name (used if TVOL=TSS).

SFCLAS is a string indicating the class of format
used in the sequential file.

SFNO identifies an object-time format  supplied in
the FORMATS Block.  Default: use standard format.

Unit system of data in the source if SVOL=SEQ.
Valid values are ENGL and METR.

String indicating how missing "cards"  in the
sequential file will be regarded. (Used only if
SVOL=SEQ.) Valid values are ZERO (assign value 0)
and UNDF (assign undefined value).

The factor by which data from the source will be
multiplied before being added to the target.
Default (blank field)= 1.0

String indicating which transformation function to
use in transferring time series from source to
target. Defaults: see Section 4.6.5.

TVOL is the Opn-type of the target.

TOPFST & TOPLST specify the range of operations
which are targets (eg. PERLND  1  5).  If
TOPLST field is blank the target is a  single opn.

Group to which the target time series  belong(s).

Target member name.  Default: all members.

Target member name subscripts.
Default: all member name subscripts.
                                      663
                                                         RELEASE 8.0
</pre><hr><pre>
-------
                                                            Time series linkages

Explanation

If an entry specifies the source volume as SEQ,  the user is referring to  a  time
series coming from a sequential file.  He therefore must supply the Fortran  unit
no. and format information for the file.

If an entry specifies  the source volume as TSS the user is  referring to  a  time
series or  a group,   as discussed  earlier.   The  same applies  to  the   target
information.

When data are read from a sequential file the user supplies:

1.  A "format  class code".    It fixes  the nature  and sequence  of data  in a
    typical record (eg. day and hr, followed by 12 hourly values).

2.  The number  of an object-time format,   situated in the FORMATS   Block.    It
    fixes the exact  format of the data in  a record.   A default  format  can be
    selected by supplying the number 0, or leaving the field blank.

The format  classes and  associated default formats  presently  supported   in the
HSPF system are documented in Sect. 4.9.

Note:  All character  strings must be left-justified in their   fields except TSS
dataset member-names (<exsm»  which must be justified in the same way that  they
were when the dataset label was created (Section 2).
                                       664                            RELEASE 8.0
</pre><hr><pre>
-------
                                                            Time series  linkages
4.6.3  NETWORK Block
In this block the user specifies those  time series which will be passed between
operations via the internal scratch pad (INPAD).   If there are no  such linkages
the block is omitted.
         1         2345678
12345678901 2345678901 2345678901 2345678901 234567890123456789012345678901234567890

Layout
******

NETWORK
<svolxo#> <sgrp> <smem><m#x-mfact—><tr> <tvol>< range>  <tgrp>  <tmemXm#>

Above line repeats until all network entries have been made

END NETWORK
*******
Example
*******

NETWORK
<-Volume-> <-Grp> <-Member-><—Mult—>Tran  <-Target  vols>  <-Grp>  <-Member->  ***
                  <Name> # #<-factor->strg  <Name>    #    #         <Name> # #  ***
                                   0.5      RCHRES    2      EXTNL  IVOL
<Name>
RCHRES
#
1 HYDR
ROVOL
RCHRES   2 HYDR   ROVOL
RCHRES
         4 HYDR   ROVOL
                                  RCHRES
                                  RCHRES
                                        EXTNL  IVOL
                                        EXTNL  IVOL
END NETWORK
                                       665
                                                                      RELEASE 8.0
</pre><hr><pre>
-------
Details
                                                            Time series linkages
Symbol
FORTRAN
Name(s 3
Format
      Comment
<svol>

<o#>


<sgrp>

<smmem>
<mfact>



<tr>



<tvol>

< range >



<tgrp>

<tmem>

<m#>
SVOL      A6

SVOLNO    14


SGRPN     A6

SMEMN     A6

SMEMSB(2) 212


MFACTR    F10.0
TRAN
TVOL
A4
A6
TOPFST, 2(1X,I2)
TOPLST
TGRPN     A6

TMEMN     A6

TMEMSB(2) 212
SVOL is the Operation-type of the source opn.

SVOLNO is the source Operation-type No.
(eg, PERLND   5)

Group to which the source time series belong(s).

Source member name. Default: all members.

Source member name subscripts. Blank fields
mean all subscripts are implied.

The factor by which data from the source will be
multiplied before being added to the target.
Default (blank field)= 1.0

String indicating which transformation function  to
use in transferring time series from source  to
target. Defaults: see Section 4.6.5.

TVOL is the Opn-type of the  target.

TOPFST & TOPLST specify the  range of operations
which are targets (eg. PERLND   1  5).  If
TOPLST field is blank the target is a single opn.

Group to which the target time  series belong(s).

Target member name.  Default: all members.

Target member name subscripts.
Default: all member name subscripts.
 Explanation

 The  example above shows how this block is  used to specify the connectivity of a
 set  of  reaches  of stream channel (RCHRES 1   flows to RCHRES 2,  RCHRES  2 and 4
 flow to RCHRES 5).   It can also be used to specify the flow of time series data
 from utility operations  to simulation operations and vice  versa.   The network
 can  be  extremely  complex,  or non-existent (eg.   if the RUN involves  only one
 operation).

 Because the  time series are  transferred via the  INPAD each source  and target
 pair must be in the same INGRP.
                                       666
                                                         RELEASE 8.0
</pre><hr><pre>
-------
                                                            Time series linkages

4.6.4  EXTERNAL TARGETS Block

In this block the user specifies those time series which will be output from  the
operations in a RUM, to datasets in the TSS.  If there are no such transfers  the
block is omitted.
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

EXT TARGETS
<svolXo#> <sgrp> <smera><m#X-mfact—><tr> <tvolxt#> <extm>    <ts>       <am>

Above line repeats until all external targets have been specified

END EXT TARGETS
*******
Example
*******

EXT TARGETS
<-Volume-> <-Grp> <-Member-><—Mult—>Tran <-Volume-> <Member> Tsys Tgap Amd  ***
<Name>   #        <Name> # #<-factor->strg <Name>   # <Name>    tern strg strg***
RCHRES   5 HYDR   OVOL   2        100.     TSS      11 OUTFLO   ENGL      ADD
END EXT TARGETS
                                      667                             RELEASE  8.0
</pre><hr><pre>
-------
Details
                                                            Time series linkages
Symbol
FORTRAN
Name(s)
Format
      Comment
<svol>

<o#>


<sgrp>

<smem>

<m#>


<mfact>



<tr>



<tvol>


<t#>

<extm>

<ts>


<am>
SVOL      A6

SVOLNO    14


SGRPN     A6

SMEMN     A6

SMEMSB(2) 212


MFACTR    F10 . 0
TRAN




TVOL


TVOLNO

TMEMN

TSYST


AMDST
A4



A6


14

A6

A4


A4
SVOL is the Operation-type of the source opn.

SVOLNO is the source Operation-type No.
Operation-type No. (eg. PERLND   5)

Group to which the source time series belong(s).

Source member name. Default: all members.

Source member name subscripts. Blank fields
mean all subscripts are implied.

The factor by which data from the source will be
multiplied before being added to the target.
Default (blank field)= 1.0

String indicating which transformation function to
use in transferring time series from source  to
target. Defaults: see Section 4.6.5.

External target volume. Valid value is TSS
(Time Series Store).

Dataset Number.

Dataset member name.

Unit system of data to be written to target.
Valid values are: ENGL and METR.

String indicating how the target dataset  is  to be
accessed.  Valid values are:
ADD / INST, and REPL.  See below for explanation.
                                       668
                                                         RELEASE 8.0
</pre><hr><pre>
-------
                                                            Time series  linkages

Explanation

This block is similar to the EXT  SOURCES Block but serves the opposite  purpose.
Thus,  the entries have similar formats (but are reversed).   In addition,   each
entry in  the EXT  TARGETS Block has  the <am> field,   which indicates   how the
target dataset will be accessed.  The valid values and the meaning of each  are:

ADD   This  option  preserves pre-existing  data  (in  the TSS  dataset)    which
      precedes the starting  time of the RUN.   Pre-existing  data subsequent to
      that time, including any which goes beyond the ending time of  the  RUN,   is
      destroyed.   The year  order option (YEAROR),  specified  when the dataset
      label was created or updated, must be YES.

INST  This option is  used to write data  to the dataset for  calendar years for
      which no data pre-exists.   No pre-existing data are changed or destroyed,
      and YEAROR need not be YES.

REPL  This option  preserves pre-existing  data both before  and after   the time
      span  of the  RUN.   Data  in the  dataset  must be  in uncompressed   form
      (COMPRESSION UNCOMP).  Because this option is designed for replacement of
      data,  some data must pre-exist for every calendar year of the replacement
      period (RUN span).

Option ADD or INST must be used when time series data are first placed in a data
set.    ADD  will result  in  data  for  every  calendar year  being physically
positioned (in the TSS dataset)  in chronological order;  INST will  not.    Note,
however,  that within each calendar year data are always stored in chronological
order.   REPL must be  used if the data are to  be selectively changed,   without
affecting data outside the period of change.
                                      669                             RELEASE 8.0
</pre><hr><pre>
-------
                                                            Time series linkages
4.6.5  Time Series Transform Functions
Whenever  time   series  are   transferred  from   a  source   to  a   target   a
"transformation" takes place.   The user can specify the transformation  function
in field <tr>;  if it is blank the  default function is supplied.   The  range  of
permissible functions is:

relation
SDELT=
TDELT

SDELT>
TDELT

SDELT<
TDELT


Type
Point
Mean
Point
Point
Mean
Point
Point
Mean
Point


to
to
to
to
to
to
to
to
to

Type
Point
Mean
Mean
Point
Mean
Mean
Point
Mean
Mean

Default
SAME
SAME
AVER
INTP
DIV
AVER
LAST
SUM
AVER

Other allowable
none
none
none
none
SAME
none
none
AVER, MAX, MIN
SUM, MAX, MIN
Key:  SDELT Time interval of source time  series
      TDELT Time interval of target time  series

Note:

1.  See below for an explanation  of the  transform keywords.

2.  Keywords less than 4 characters long  must  be  left-justified in
    the field.

3.  For further info, see Appendix V and  Time  Series Catalog
    (Section 4.7 of this part).
The  time   series  transform   functions   given  above  are completed  before  the
multiplication   factor  given   in   the EXTERNAL  SOURCES,    EXTERNAL TARGETS  and
NETWORK blocks  are applied. These  transform functions are defined as follows:

AVER  Compute the  integral of the  source time series over each target time step,
      divide by the  target time step and assign  the value to the  time step in
      the  target time series. See  Appendix V for definition of the integral of a
      time series.

DIV   Divide each   mean value  of  the   source time  series by  the ratio  of the
      source time  step  to the target time step and assign the results to each of
      the  target time steps contained in the source time step.
                                       670
RELEASE 8.0
</pre><hr><pre>
-------
                                                             Time  series  linkages

INTP  Interpolate  linearly between  adjacent point  values  in  the  source   time
      series and assign the interpolated values to each  time point in  the target
      time series*

LAST  Take the  value at  the last time  point of the  source time   series  which
      belongs to the time step of the target time series and assign  the  value to
      the time step of the target time  series.  See Appendix V for  a  definition
      of the meaning of "belonging"•

MAX   Find the maximum value of the source  time series  for  all points belonging
      to the  target time step  (point-value time  series)   or  find  the maximum
      value of the  source time series for  all time steps contained  within the
      target time step (mean-value time series). Assign  the  maximum  value to the
      time step of the target time series.  The definition of "belonging"  (given
      in Appendix V)  was motivated by the desire to make MAX and MIN  unique for
      point-value time series.

MIN   Find the minimum value of the source  time series  for  all points belonging
      to the  target time step  (point-value time  series)   or  find  the minimum
      value of the  source time series for  all time steps contained  within the
      target time series  (mean-value time series).   Assign  the minimum  value to
      the time step of the target time series.

SAME  Take the value at  each time step or time point  of the source time series
      and assign  the value  to the corresponding  time  point   (point-value time
      series), the corresponding time step (mean-value time  series),  or all the
      contained time steps (mean-value time series  with time step less  than the
      source time step) of the target time series.

SUM   For point-value source time series:  Compute the sum of the values for all
      points in the source time series belonging  to the target series time step
      plus the  value of  the source  time series  at  the initial point of the
      target time step and assign  the sum to the target time   step.  For  mean-
      value source time series: Compute the sum of the values for all  time  steps
      in the source time series contained within the target  series time  step and
      assign the sum to the target time step.
                                       671                             RELEASE 8.0
</pre><hr><pre>
-------
                                                            Time series  linkages

4.6.6  Warnings

1.  in this  block it is  not permissible to route  several sources  to   the  same
    external target.   If you want to combine  several  time series and write the
    result to  an external  target,  first  use a  utility operation  (COPY)  to
    combine the data and then use this block to route the result to  the  external
    target.

2.  It is catastrophic to refer to the same  TSS dataset in both the EXT SOURCES
    and EXT TARGETS  Blocks.  That is,  you must  not try to  both  read  from and
    write to the same dataset in one run.

3.  If the above warnings  are not heeded,  you may cause  irreparable damage to
    your TSS.
                                       672                            RELEASE 8.0
</pre><hr><pre>
-------
                                                             Time series catalog

4.7  Time Series Catalog


This section documents all the time series which are required by,  and which can
be output by, all the operating modules in the HSPF system.

The  time series  are  arranged  in groups.    Thus,   to  specify an  operation
associated time series in the EXT SOURCES,   NETWORK or EXT TARGETS Blocks,  the
user  supplies  a group  name  followed,   optionally,   by  a member  name  and
subscripts.

The  time  series  documented  in  this section  can  be   separated  into  three
categories:

1.  Input only.   Some time  series can only be input to   their operating  module
    (eg. member PREC of group EXTNL in module PERLND).

2.  Input or output.   Some  time series can either be input  to their operating
    module or output from it, depending on the options in  effect.   For  example,
    if snow aceurn and melt on a  Pervious Land-segment (PLS)  is being simulated
    in a given RUN,  time series WYIELD in  group  SNOW can be output to  the Time
    Series Store (TSS).  Then, if section SNOW is  inactive but section PWATER  is
    active in a subsequent RUN,  the same time series WYIELD may be specified  as
    an input to the PERLND module.   This feature  makes it possible to calibrate
    an application module  in an incremental manner.   First,   the outputs from
    section  1 are calibrated to the field data;  then the  outputs from section 2
    are  calibrated using  outputs from  section   1 as  inputs,  etc.    Sections
    calibrated  in earlier  runs need not be  re-run if the needed  outputs from
    them have been stored.

3.  Output only.    Some time series  can be computed  by  and output  from their
    operating module,  but  never serve as inputs  to it  (eg.  member  ALBEDO  of
    group SNOW in module PERLND).

To run an operating module,  the user must ensure  that all the input time  series
which it requires are made available to it.   He does this by making appropriate
entries in the EXT  SOURCES or NETWORK blocks.   To ascertain  which time  series
are required,   he should consult  the Time  Series Catalog for  the appropriate
module.   For example, suppose sediment production and washoff/ scour from a PLS
are being simulated using snowmelt and water budget results from a previous RUN.
That is,  section SEDMNT is active but sections ATEMP,  SNOW and PWATER  are not.
Then, Table  4.7(1).5 shows:

   1.  member PREC of group  EXTNL is a required input time series  (member SLSED
      is  optional)

   2.  members RAINF and  SNOCOV of group SNOW are  reqd  inputs,  because section
      SNOW is inactive
                                       673                             RELEASE 8.0
</pre><hr><pre>
-------
                                                             Time series catalog

  3.  members SURO  and SURS of group  PWATER are reqd inputs,   because section
      PWATER is inactive (SUROB and SURSB may also be reqd)

The user can obtain  further details on the above time  series by consulting the
table for the appropriate group (eg. Table 4.7(1).1 for group EXTNL).

Table 4.7(1).5 shows which time series are computed in the SEDMNT section of the
PERLND module and may therefore be output (members DETS through SOSDB).

Thus,  in  the EXT  SOURCES and/or  NETWORK blocks,   entries must   appear which
specify members PREC,  RAINF,  etc  (groups EXTNL,  SNOW,  PWATER)  as targets  to
which source time series are routed.   Also,   in the NETWORK and/or EXT TARGETS
blocks,  entries may  appear which specify one  or more of members   DETS through
SOSDB (of  group SEDMNT)   as source  time series,   which are  routed to  other
operations or to the TSS.

The  tables  which  follow  are otherwise  self  explanatory,   except  for  the
abbreviation "ivld" which  appears frequently in the "Units"  fields.   It means
"interval of  the data"  (to distinguish  it from  the internal,   or simulation
interval).   Thus, if a TSS dataset containing 1-hour precip data is input to  an
operation with a DELT of two hours, ivld is 1 hour.


4.7.1 Connection of Surface and Instream Application Modules

In  HSPF,  the  operational connection  between  the land  surface and  instream
simulation modules is  accomplished through the NETWORK Block.    Time series  of
runoff,  sediment,   and pollutant  loadings generated on  the  land  surface are
passed  to the  receiving  stream for  subsequent  transport and  transformation
instream.  This connection  of the  IMPLND and/or PERLND modules  with the  RCHRES
module requires explicit  definition of corresponding time series  in the  linked
modules.    A one-to-one  correspondence  exists   between several  land  segment
outflow time  series and  corresponding stream  reach inflow  time series   (e.g.
runoff,   sediment,  dissolved  oxygen,  etc.);    however in  order  to  maintain
flexibility,   some  of  the  time  series are  more  general,   and no   unique
correspondence exists.   Also, in some cases, a process or material  simulated  in
the stream will have no corresponding land surface quantity.    For example,  the
inflow of plankton to a stream occurs only  from upstream reaches and not  from a
land  segment.
                                       674                            RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for PERLND module
4.7(1)  Catalog for PERLND module
The time  series groups  associated with  this application  module are  shown in
Figure 4.7(1)-1.

The  members contained  within each  group are  documented in  the tables  which
follow.

4.7(1).1  Group EXTNL
<	Member	>  K      Units
        Max subscr  i    (external)
Name      values    n
          1    2    d  Engl      Metr
Description/comment
Time series always external (input only) to module PERLND:
GATMP
PREC
DTMPG
WINMOV
SOLRAD
CLOUD
PETINP
SURLI
IFWLI
AGWLI
SLSED

1
1
1
1
1
1
1
1
1
1
1

1
1
1
1
1
1
1
1
1
1
1

Deg F
- in/ivld
Deg F
mi/ivld
- Ly/ivld
tenths
- in/ivld
in/ivld
in/ivld
in/ivld
tons/
ac.ivld
Deg C
mm/ivld
Deg C
km/ivld
Ly/ivld
tenths
mm/ivld
mm/ivld
mm/ivld
mm/ivld
tonnes/
ha.ivld
Measured air temp
Measured precipitation
Measured dewpoint temp
Measured wind movement
Measured solar radiation
Cloud cover (range: 0 - 10)
Input potential E-T
Surface lateral inflow
Interflow lateral inflow
Active groundwater lateral inflow
Lateral input of sediment

4.7(1).2  Group ATEMP
<	Member	>  K      Units
        Max subscr  i     (external)
Name      values    n
          1    2    d  Engl      Metr
Description/comment
Time series computed by module section ATEMP:

AIRTMP     1     1    -  Deg F     Deg C
Estimated surface air temp over the
Land-segment
Input time series reqd to compute the above:

Group EXTNL                                 always  required

GATMP
PREC
                                       675
                      RELEASE 8.0
</pre><hr><pre>
-------
    JJ
    -a
    I
    o

    i
    a.
<:
        <:
<:
                                        Catalog for PERLND Module
                      EV.TNU
<	>
                       ATEMP
       >
                      PWA.TEE
                       PQUAL
                        PE6T
                        PUOS
                                                  KITR
    KBY:
—  qroup containing time series which ore alwovs input
-^  qroup containinq time series which are always c
->  qroup containinq time series which con be input or output
Rqure4-.7CO-l Groups of time 6eries associated
              the PERLND module
                           676
                                               RELEASE 8.0
</pre><hr><pre>
-------
4.7(1).3  Group SNOW
                                                       Catalog for PERLND module
<	Member	>  K      Units
        Max subscr  i    (external)
Name      values    n
          1    2    d  Engl      Metr
                        Description/comment
Time series computed by
module section SNOW:
PACK
PACKF
SNOCOV
*
*
in
in
PACKW
PACKI
PDEPTH
RDENPF
1
1
1
1
1
1
1
1
*
*
*
*
in
in
in
none
                       none
mm
mm

mm
mm
mm
none

none
ALBEDO 1
PAKTMP 1
SNOWF 1
SNOWE 1
1
1
1
1
* none
* Deg F
- in/ivld
- in/ivld
none
Deg C
mm/ivld
mm/ivld
WYIELD 1
MELT 1
RAINF 1
1
1
1
                       in/ivld

                       in/ivld

                       in/ivld
             mm/ivld

             mm/ivld

             mm/ivld
Total contents of pack(water equiv)
Frozen contents of pack, ie. snow+
ice (water equiv)
Liquid water in pack
Ice in pack (water equiv)
Pack depth
Relative density of frozen contents
of pack (PACKF/PDEPTH)
Fraction of Land-segment covered by
pack
Albedo of the pack
Mean temp of the pack
Snowfall, water equivalent
Evap from PACKF (sublimation)/
water equivalent
Water yielded by the pack (released
to the land-surface)
Quantity of melt from PACKF (water
equivalent)
Rainfall
Input time series reqd to
compute the above:

Group EXTNL
                        always required
PREC
DTMPG
WINMOV
SOLRAD
Group ATEMP

AIRTMP
                        only reqd if section ATEMP inactive
                                       677
                                                                      RELEASE 8.0
</pre><hr><pre>
-------
4.7(1).4  Group PWATER
                                                       Catalog for PERLND module
<	Member	>  K      Units
        Max subscr  i    (external)
Name      values    n
          1    2    d  Engl      Metr
                    Description/comment
Time series computed by
module section PWATER:

Land-segment-wide values:
PERS
CEPS
SURS
UZS
IFWS
LZS
AGWS
RPARM
SURO
IFWO
AGWO
PERO
IGWI
PET
CEPE
UZET
LZET
AGWET
BASET
TAET
IFWI
UZI
INFIL
PERC
LZI
AGWI
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
in
in
in
in
in
* in
* in
- in/ivld
- in/ivld
- in/ivld
- in/ivld
- in/ivld
- in/ivld
in/ivld
- in/ivld
- in/ivld
- in/ivld
- in/ivld
- in/ivld
- in/ivld
- in/ivld
in/ivld
- in/ivld
- in/ivld
- in/ivld
in/ivld
mm
mm
mm
mm
mm
mm
mm
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
 SURI
in/ivld   mm/ivld
Total water stored in the PLS
Interception storage
Surface (overland flow) storage
Upper zone storage
Interflow storage
Lower zone storage
Active groundwater storage
Current value of max lower zone
E-T opportunity
Surface outflow
Interflow outflow
Active groundwater outflow
Total outflow from PLS
Inflow to inactive (deep) ground-
water
Potential E-T, adjusted for snow
cover and air temp
Evap from interception storage
E-T from upper zone
E-T from lower zone
E-T from active groundwater storage
E-T taken from active groundwater
outflow (baseflow)
Total simulated E-T
Interflow inflow  (excluding any
lateral inflow)
Upper zone inflow
Infiltration to the soil
Percolation from  upper to lower
zone
Lower zone inflow
Active groundwater inflow  (excl
any lateral inflow)
Surface inflow  (including any
lateral inflow)
                                       678
                                              RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for PERLND module
Block-specific values:
SURSB
UZSB
IFWSB
SUROB
IFWOB
UZETB
IFWIB
UZIB
INFILB
PERCB
NBLKS
NBLKS
NBLKS
NBLKS
NBLKS
NBLKS
NBLKS
NBLKS
NBLKS
NBLKS
1
1
1
1
1
1
1
1
1
1
*
*
*
-
-
-
—
_
-
-
in
in
in
in/ivld
in/ivld
in/ivld
in/ivld
in/ivld
in/ivld
in/ivld
mm
mm
mm
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
mm/ivld
                                            Surface storage
                                            Upper zone storage
                                            Interflow storage
                                            Surface outflow
                                            Interflow outflow
                                            Upper zone E-T
                                            Interflow inflow (excl any lateral
                                            inflow)
                                            Upper zone inflow
                                            Infiltration
                                            Percolation from upper to lower
                                            zone
Input time series reqd to
compute the above:

Group EXTNL

SURLI
IFWLI
AGWLI
PETINP
PREC
Group ATEMP

AIRTMP


Group SNOW

RAINF
SNOCOV
WYIELD
PACKI
optional
optional
optional

reqd if snow not considered
(CSNOFG= 0)
only reqd if section ATEMP inactive
and CSNOFG= 1

only reqd if section SNOW inactive
and snow is considered (CSNOFG=  1)
only reqd if ICEFG= 1
                                      679
                         RELEASE 8.0
</pre><hr><pre>
-------
4.7(1).5  Group SEDMNT
                                                       Catalog for PERLND module
< 	 Member 	 > K
Max subscr i
Name values n
1 2 d
Units
(external)
Engl Metr
Description/comment
Time series computed by
module section SEDMNT :



Land-segment-wide values:
DETS 1 1 *
STCAP 1 1 *

WSSD 1 1

SCRSD 1 1

SOSED 1 1

DET 1 1

Block-specific values:
DETSB NBLKS 1 *
STCAPB NBLKS 1 *

WSSDB NBLKS 1

SCRSDB NBLKS 1

SOSDB NBLKS 1

tons/ac
tons/
ac.ivld
tons/
ac.ivld
tons/
ac.ivld
tons/
ac.ivld
tons/
ac.ivld

tons/ac
tons/
ac . ivld
tons/
ac.ivld
tons/
ac.ivld
tons/
ac.ivld
tonnes/ha
tonnes/
ha . ivld
tonnes/
ha . ivld
tonnes/
ha . ivld
tonnes/
ha . ivld
tonnes/
ha . ivld

tonnes/ha
tonnes/
ha . ivld
tonnes/
ha . ivld
tonnes/
ha. ivld
tonnes/
ha. ivld
Storage of detached sediment
Sediment transport capacity
by surface runoff
Washoff of detached sediment

Scour of matrix (attached) soil

Total removal of soil and sediment

Quantity of sediment detached from
soil matrix by rainfall impact

Storage of detached sediment
Sediment transport capacity
by surface runoff
Washoff of detached sediment

Scour of matrix (attached) soil

Total removal of soil and sediment
from block
Input time series reqd to
compute the above:

Group EXTNL

PREC
SLSED

Group SNOW

RAINF
SNOCOV
always required
optional

only reqd if section SNOW inactive
and snow considered (CSNOFG= 1)
 Group  PWATER
 SURO
 SURS
 SUROB
 SURSB
only reqd if sect PWATER inactive
only reqd if NBLKS> 1
only reqd if NBLKS> 1
                                       680
                         RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for PERLND module
4 .7(1).6  Group PSTEMP
< 	 Member 	 > K Units
Max subscr i (external)
Name values n
1 2 d Engl Metr

De scr ipt ion/comment


Time series computed by
module section PSTEMP:
AIRTC
SLTMP
ULTMP
LGTMP
   Deg F
-  Deg F
   Deg F
-  Deg F
Input time series required to
compute the above:

Group ATEMP

AIRTMP
          Deg C      Air temp on the PLS
          Deg C      Surface layer soil temp
          Deg C      Upper layer soil temp
          Deg C      Lower and groundwater layer
                     soil temp
                        only reqd if section ATEMP inactive
4.7 ( 1) . 7  Group PWTGAS
< 	 Member 	 > K Units
Max subscr i (external)
Name values n
1 2 d Engl Metr

Description/comment


Time series computed by
module section PWTGAS:
SOTMP
IOTMP
AOTMP
SODOX
SOCO2
IODOX
IOCO2
AODOX
*  Deg F
*  Deg F
*  Deg F
*
*
*
*
*
mg/1
mg/1
mg/1
mg/1
mg/1
Deg C      Temp of surface outflow
Deg C      Temp of interflow outflow
Deg C      Temp of active groundwater outflow
mg/1       DO cone in surface outflow
mg/1       CO2 cone in surface outflow
mg/1       DO cone in interflow outflow
mg/1       CO2 cone in interflow outflow
mg/1       DO cone in active groundwater
           outflow
                                      681
                                                                      RELEASE 8.0
</pre><hr><pre>
-------
                Catalog for PERLND module
AOCO2 1 1 *

SOHT 1 1

IOHT 1 1

AOHT 11-

POHT 1 1

SODOXM 1 1

SOCO2M 1 1

IODOXM 11-

IOC02M 1 1

AODOXM 1 1

AOCO2M 11-

PODOXM 1 1

POCO2M 1 1

Input time series reqd
compute the above :
Group SNOW

WYIELD
Group PWATER
SURO
IF WO
AGWO
Group PST1MP
SLTMP
ULTMP
LGTMP
mg/1

BTU/
ac.ivld
BTU/
ac « ivld
BTU/
ac . ivld
BTU/
ac . ivld
lb/
ac . ivld
lb/
ac . ivld
lb/
ac.ivld
lb/
ac . ivld
lb/
ac . ivld
lb/
ac . ivld
lb/
ac.ivld
lb/
ac . ivld
to












mg/1

kcal/
ha. ivld
kcal/
ha . ivld
kcal/
ha. ivld
kcal/
ha. ivld
kg/
ha. ivld
kg/
ha . ivld
kg/
ha. ivld
kg/
ha. ivld
kg/
ha. ivld
kg/
ha. ivld
kg/
ha. ivld
kg/
ha . ivld













C02 cone in active groundwater
outflow
Heat energy in surface outflow
(relative to freezing point)
Heat energy in interflow outflow

Heat energy in active groundwater
outflow
Heat energy in total outflow from
PLS
Flux of DO in surface outflow

Flux of CO2 in surface outflow

Flux of DO in interflow outflow

Flux of C02 in interflow outflow

Flux of DO in active groundwater
outflow
Flux of C02 in active groundwater
outflow
DO in total outflow from PLS

CO2 in total outflow from PLS



only reqd if section SNOW inactive
and snow considered (CSNOFG™ 1)

only reqd if sect PWATER inactive



only reqd if sect PSTEMP inactive



682
RELEASE 8.0
</pre><hr><pre>
-------
4.7(1).8  Group PQUAL
                                                       Catalog for PERLND module
< 	 Member 	 > K
Max subscr i
Name values n
1 2 d
Units
(external)
Engl Metr
Description/comment
Time series computed by
module
SQO
WASHQS

SCRQS

SOQS

SOQO

SOQUAL

IOQUAL

AOQUAL

POQUAL

SOQOC
SOQC

POQC

section
NQOF
NQSD

NQSD

NQSD

NQOF

NQ

NQIF

NQGW

NQ

NQOF
NQ

NQ

PQUAL:
1 *
1

1

1

1

1

1

1

1

1
1

1


qty/ac
qty/
ac.ivld
qty/
ac.ivld
qty/
ac. ivld
qty/
ac.ivld
qty/
ac.ivld
qty/
ac.ivld
qty/
ac.ivld
qty/
ac.ivld
qty/ft3
qty/ft3

qty/ft3


qty/ha
qty/
ha. ivld
qty/
ha. ivld
qty/
ha. ivld
qty/
ha. ivld
qty/
ha. ivld
qty/
ha. ivld
qty/
ha . ivld
qty/
ha. ivld
qty/1
qty/i

qty/i


Storage of QUALOF on the surface
Removal of QUALSD by assoc with
detached sed washoff
Removal of QUALSD by assoc with
scour of matrix soil
Total flux of QUALSD from surface

Washoff of QUALOF from surface

Total outflow of QUAL from the
surface
Outflow of QUAL in interflow
(QUALIF)
Outflow of QUAL in active ground-
water outflow (QUALGW)
Total flux of QUAL from the PLS

Cone of QUALOF in surface outflow
Cone of QUAL ( QUALSD+QUALOF ) in
surface outflow
Cone of QUAL (total) in total
outflow from PLS
Input time series reqd to
compute the above:

Group PWATER
SURO
IFWO

AGWO

PERO
Group SEDMNT
WSSD
SCRSD •
only reqd if sect PWATER inactive
only reqd if one or more QUALs are
QUALOFs, or if SOQC is reqd for one
or more QUALs
only reqd if one or more QUALs
are QUALIFs
only reqd if one or more QUALs
are QUALGWs
only reqd if POQC is reqd for one
or more QUALs

only reqd if sect SEDMNT inactive
and one or more QUALs are QUALSDs
                                      683
                         RELEASE 8.0
</pre><hr><pre>
-------
4.7(1).9  Group MSTLAY
                                                       Catalog for PERLND module
<	Member	>  K      Units
        Max subscr  i    (external)
Name      values    n
          1    2    d  Engl      Metr
                                  Description/comment
Time series computed by
module section MSTLAY:
MST
FRAC
MSTB
     1    *  lb/ac     kg/ha
8    1
/ivl
/ivl
3  NBLKS  *  lb/ac     kg/ha
FRACB     5  NBLKS  *  lb/ac     kg/ha
Input time series reqd to
compute the above:

Group PWATER:

SURI,LZS,IGWI,AGWI,AGWS,AGWO

SURS,SURO,INFIL,IFWI,UZI,UZS,PERC,
IFWS,IFWO

SURSB,SUROB,INFILB,IFWIB,UZIB,UZSB,
PERCB,IFWSB,IFWOB
Water in surface, upper princ, upper
auxil, lower and groundwater
storages (segment-wide values)
Fractional fluxes thru soil:
FSO,FSP,FII,FUP,FIO,FLP,FLOP,FAO
(segment-wide values)
Water in surface, upper princ, and
upper auxil storages (block-
specific values)
Fractional fluxes thru topsoil
layers: FSOB,FSPB,FIIB,FUPB,FIOB
(block-specific values)
                                  only reqd if sect PWATER inactive
                                  only reqd if NBLKS=1
                                  only reqd if NBLKS>1
                                       684
                                                            RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for PEKLND module
4.7( 1).10 Group PEST
< 	 Member 	 > K Units
Max subscr i (external)
Name values n
1 2 d Engl Metr

Description/comment


Time series computed by
module section PEST:
SPS
UPS
IPS
LPS
APS
TPS
  3   NPST   *   Ib/ac
     NPST
  NPST 1
             NPST
     NPST
*  Ib/ac
   Ib/ac
               Ib/ac
   Ib/ac
                                 kg/ha      Amount of pesticide in
                                            surface storage
                                 kg/ha      Amount of pesticide in upper
                                            principal storage
                                 kg/ha      Amount of pesticide in upper auxil
                                            (interflow) storage
                                 kg/ha      Amount of pesticide in lower
                                            layer storage
                                 kg/ha      Amount of pesticide in active
                                            groundwater layer storage
                                 kg/ha      Total amount of pesticide in the
                                            soil
Note: SPS,UPS,LPS,APS and TPS give the storage of each pesticide by species.
The first subscript indicates the species; crystalline, adsorbed or solution,
The second indicates the pesticide.
For example, UPS(2,3) is the quantity of adsorbed pesticide in the upper
layer principal storage, for the 3rd pesticide.
The second subscript for IPS has a max value of one because only solution
pesticide is modelled in the upper layer auxil (interflow) layer.
  3  NPST   *  Ib/ac
TOTPST  NPST   1

SDPS      2 NPST


TSPSS     5 NPST
            *  Ib/ac
             kg/ha
SSPSS
SDEGPS
UDEGPS
  3 NPST
NPST
NPST
LDEGPS  NPST
ADEGPS  NPST
TDEGPS  NPST
SOSDPS  NPST
                                            Total amount of pesticide in the
                                            soil (sum of all species).
                    - Ib/ac.ivld kg/ha.ivld Outflow of sediment-associated
                                            pesticide (SDPSY and SDPSA for each
                                            pesticide)
                          "          "      Fluxes of solution pesticide for
                                            the topsoil layers: SOPSS,SPPSS,
                                            UPPSS,IIPSS,IOPSS
                    -     "          "      Fluxes of solution pesticide for
                                            the subsoil layers: LPPSS,LDPPSS,
                                            AOPSS
                    -     "          "      Amount of degradation in surf, layer
                    -     "          "      Amount of degradation in upper layer
                          "          "      Amount of degradation in lower layer
                          "          "      Amount of degr. in groundw. layer
                          "          "      Total amount of degradation in soil
                    -     "          "      Total outflow of sediment-associated
                                            pesticide (SDPSY + SDPSA)
                                       685
                                                             RELEASE 8.0
</pre><hr><pre>
-------
POPST   NPST  1

TOPST   NPST  1
           Catalog for PERLND module

Total outflow of solution pesticide
from the PLS
Total outflow of pesticide from
the PLS
Note:  The subscript with max value NPST selects the particular pesticide.
       For example/ POPST(2/1) is the outflow from the PLS of the second
       pesticide (in solution).
Input time series reqd to
compute the above:

Group SEDMNT
SOSED
SOSDB

Group PSTEMP
SLTMP
ULTMP
LGTMP

Group MSTLAY
If NBLKS=1:
MST
FRAC
If NBLKS>1:
MST(4&5)
FRAC(6 thru 8)
MSTB
FRACB
only reqd if section SEDMNT inactive
required if NBLKS=1
required if NBLKS>1

only reqd if section PSTEMP inactive
and ADOPFG = 1
only reqd if section MSTLAY inactive
                                       686
                          RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for PERLND module
4.7(1).11  Group NITR
< 	
Name
Member 	 > K Units
Max subscr i (external)
values n
1 2 d Engl Metr
Description/comment
Time series computed by
module section NITR:
SN
UN
LN
AN
TN
5
5
5
5
5
*  Ib/ac
*
*
*
*
kg/ha      N in surface layer storage
  "        N in upper layer princ storage
  "        N in lower layer storage
  11        N in groundwater layer storage
  "        Total N in soil, by species
In the above, the first subscript selects the species of N:
1 means organic N,  2 means adsorbed ammonium,  3 means solution ammonium,
4 means nitrate,    5 means plant N derived from this layer
IN
     1
*  Ib/ac
kg/ha
                                            N in upper layer auxil (interflow)
                                            storage
In the above, the first subscript selects the species of N:
1 means solution ammonium,  2 means nitrate
(only soluble species are modelled in  this storage)

TOTNIT    1    1    *  Ib/ac     kg/ha      Total N stored in the PLS (all
                                            species)

SEDN      2    1    - Ib/ac.ivld kg/ha.ivld Outflows of sediment-associated N

In the above, the first subscript selects the flux:
1 means organic N removal,  2 means adsorbed ammonium removal

SOSEDN    1    1    - Ib/ac.ivld kg/ha.ivld Total outflow of sediment-associated
                                            N (orgN + ads ammon)

TSAMS     5    1      Ib/ac.ivld kg/ha.ivld Fluxes of soln ammon in the topsoil
TSN03     51-"          "        Fluxes of nitrate in the topsoil
In the above, the first subscript selects the flux:
1 means outflow with surface water outflow
2 means percolation from surface to upper layer principal storage
3 means percolation from upper layer principal storage to lower layer storage
4 means flow from upper layer principal to upper layer auxil (interflow) storage
5 means outflow from PLS with water from upper layer auxil (interflow) storage
                                      687
                                                            RELEASE  8.0
</pre><hr><pre>
-------
                                                       Catalog for PEKLND module

SSAMS     3    1    - Ib/ac.ivld kg/ha.ivld Fluxes of soln ammon in the subsoil
SSNO3     31-"          "        Fluxes of nitrate in the subsoil
In the above, the first subscript selects the flux:
1 means percolation from the lower layer to the active groundwater storage
2 means deep percolation, from the lower layer to inactive groundwater
3 means outflow from the PLS with water from the active groundwater storage

PONO3     1    1    - Ib/ac.ivld kg/ha.ivld Total outflow of NO3 from the PLS
PONH4     11-"          "        Total outflow of NH4 from the PLS
PONITR    11-"          "        Total outflow of N (NO3+NH4+ORGN)
                                            from the PLS.
TDENIF    11-"          "        Total denitrification in the PLS


Input time series reqd to
compute the above:

Same as for section PEST.  An input time series need only be supplied if section
PEST and the section which computes it (SEDMNT, PSTEMP or MSTLAY) are inactive.
                                       688                            RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for PERLND module
4.7(1).12  Group PHOS
< 	 Member 	 > K Units
Max subscr i (external)
Fame values n
1 2 d Engl Metr

Description/comment


Time series computed by
module section PHOS:
SP
UP
LP
AP
TP
4
4
4
4
4
     *   Ib/ac
     *
     *
kg/ha      P in surface layer storage
  "        P in upper layer princ storage
  11        P in lower layer storage
  11        P in groundwater layer storage
  "        Total P in soil, by species
In the above, the first subscript selects the species of P:
1 means organic P,  2 means adsorbed phosphate,  3 means solution phosphate,
4 means plant P derived from this layer

IP         1     1    *  Ib/ac     kg/ha      P in upper  layer  auxil  (interflow)
                                            storage  (solution phosphate)
(only soluble species are modelled in  this storage)
TOTPHO
SEDP
                                  Total P stored in the PLS  (all
                                  species)
1     *  Ib/ac     kg/ha


1     - Ib/ac.ivld kg/ha.ivld Outflows of sediment-associated P
In the above, the first subscript selects the  flux:
1 means organic P removal,  2 means adsorbed phosphate  removal

SOSEDP     1     1    - Ib/ac.ivld kg/ha.ivld Total outflow of  sediment-associated
                                            P  (orgP  + ads phosphate)

TSP4S      5     1      Ib/ac.ivld kg/ha.ivld Fluxes of soln phosphate  in the
                                            topsoil.

In the above, the first subscript selects the  flux:
1 means outflow with surface water outflow
2 means percolation from surface to upper layer  principal storage
3 means percolation from upper  layer  principal storage  to lower layer storage
4 means flow  from upper layer principal  to upper layer  auxil  (interflow) storage
5 means outflow from PLS with water from upper layer auxil (interflow)  storage
 SSP4S
      1    - Ib/ac.ivld kg/ha.ivld Fluxes of soln phosphate  in  the
                                  subsoil.
                                       689
                                                            RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for PERLND module

In the above, the first subscript selects the flux:
1 means percolation from the lower layer to the active groundwater storage
2 means deep percolation, from the lower layer to inactive groundwater
3 means outflow from the PLS with water from the active groundwater storage

POPHOS    11-"          "        Total outflow of P from the PLS.
Input time series reqd to
compute the above:

Same as for section PEST. An input time series need only be supplied if  sections
PEST and  NITR and  the module  section which  computes it  (SEDMNT,  PSTEMP   or
MSTLAY) are inactive.
                                       690                            RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for PEKLND module
4.7(1).13  Group TRACER
< 	 Member 	 > K Units
Max subscr i (external)
Name values n
1 2 d Engl Metr

Description/comment


Time series computed by
module section TRACER:
STRSU
UTRSU
ITRSU
LTRSU
ATRSU
1
1
1
1
1
1
1
1
1
1
*
*
*
*
*
TRSU
             Ib/ac      kg/ha      Tracer in surface layer storage
               "          "         Tracer in upper layer princ storage
               "          "         Tracer in upper layer auxil storage
               "          "         Tracer in lower layer storage
               "          "         Tracer in groundwater layer storage

               "          "         Total tracer stored in the PLS
TSTRS
     1
     - Ib/ac.ivld kg/ha.ivld Fluxes of tracer in topsoil
In the above, the first subscript indicates the flux:
1 means outflow with surface water outflow
2 means percolation from surface to upper layer principal storage
3 means percolation from upper layer principal to lower layer storage
4 means flow from upper principal to upper auxil (interflow) storage
5 means outflow from the PLS from upper layer transitory (interflow) storage
SSTRS
     1
     - Ib/ac.ivld kg/ha.ivld Fluxes of tracer in subsoil
In the above, the first subscript indicates the flux:
1 means percolation from lower layer to active groundwater storage
2 means deep percolation, from lower layer to inactive groundwater
3 means outflow from the PLS from the active groundwater storage
POTRS
1
1
- Ib/ac.ivld kg/ha.ivld Total outflow of tracer from the PLS
Input time series reqd to
compute the above:

Group MSTLAY
If NBLKS=1:
MST
FRAC
If NBLKS>1:
MST(4&5)
FRAC(6 thru 8)
MSTB
FRACB
                                  only reqd if MSTLAY, PEST, NITR
                                  and PHOS are all inactive; else
                                  these time series will already
                                  have been supplied
                                      691
                                                           RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for IMPLND module
4.7(2)  Catalog for IMPLND module
The time series groups associated with this application module are shown
in Figure 4.7(2)-1.

The members contained within each group are documented in the tables which
follow.
4.7(2).1  Group EXTNL
< 	 Member 	 > K Units
Max subscr i (external)
Name values n
1 2 d Engl Metr
Description/comment
Time series always external
(input only) to module IMPLND:
GATMP
PREC
DTMPG
WINMOV
SOLRAD
CLOUD
PETINP
SURLI
SLSLD

1
1
1
1
1
1
1
1
1

1
1
1
1
1
1
1
1
1

Deg F
- in/ivld
Deg F
- mi/ivld
- Ly/ivld
tenths
in/ivld
- in/ivld
tons/
ac.ivld
Deg C
mm/ivld
Deg C
km/ivld
Ly/ivld
tenths
mm/ivld
mm/ivld
tonnes/
ha.ivld
Measured air temp
Measured precipitation
Measured dewpoint temp
Measured wind movement
Measured solar radiation
Cloud cover (range: 0 - 10)
Input potential E-T
Surface lateral inflow
Lateral input of solids

 4 . 7(2) . 2   Group  ATEMP
 Identical  to  group ATEMP  in module PERLND.  See Section 4.7(1).2
 for  documentation.
 4. 7(2).3  Group SNOW
 Identical to group SNOW in module PERLND. See Section 4.7(1 ).3
 for documentation.
                                       692
RELEASE 8.0
</pre><hr><pre>
-------
                                          Catalog for IMPLND Module
-o
0
E
o
z
a
                   IWATER.
5NOVW
                   IWT6A5
                                               IQUAL
   qroup containing time series which ore always input
   qroup containinq time series which are always output-
   qroup contoininq time series which can be input or output
Rqure 4.7C2)-I  Groups of time 5eries  associated with
               the IKAPLND module
                             693
        RELEASE  8.0
</pre><hr><pre>
-------
4.7(2).4  Group IWATER
                                                       Catalog for IMPLND module
<	Member	>  K      Units
        Max subscr  i    (external)
Name      values    n
          1    2    d  Engl      Metr
Description/comment
Time series computed by
module section IWATER:
IMPS
RETS
SURS
SURO
PET
IMPEV
SURI
1
1
1
1
1
1
1
1
1
1
1
1
1
1
*
*
*
-
-
_
-
in
in
in
in/ivld
in/ivld
in/ivld
in/ivld
mm
mm
mm
mm/ivld
mm/ivld
mm/ivld
mm/ivld
                                            Total water stored in the ILS
                                            Retention storage
                                            Surface (overland flow) storage
                                            Surface outflow
                                            Potential E-T, adjusted for snow
                                            cover and air temp
                                            Total simulated E-T
                                            Surface inflow (including any
                                            lateral inflow if RTLIFG=1)
Input time series reqd to
compute the above:
Group EXTNL
SURLI
PETINP
PREC

Group ATEMP
AIRTMP
optional

reqd if snow not considered
(CSNOFG= 0)

only reqd  if section ATEMP inactive
and CSNOFG= 1
Group  SNOW

RAINF
SNOCOV
WYIELD
only  reqd  if  section  SNOW inactive
and snow is considered  (CSNOFG= 1)
                                       694
                          RELEASE 8.0
</pre><hr><pre>
-------
4.7(2}.5  Group SOLIDS
                                                       Catalog for IMPLND module
< 	 Member 	 > K Units
Max subscr i (external)
Name values n
1 2 d Engl Metr
Descr ipt ion/comment
Time series computed by
module section SOLIDS:
SLDS
SOSLD
*  tons/ac
   tons/
   ae.ivld
tonnes/ha
tonnes/
ha.ivld
Storage of solids on surface
Washoff of solids from surface
Input time series reqd to
compute the above:

Group EXTOL
PREC
SLSLD

Group IWATER
SURO
SURS
                        always required

                        optional

                        only reqd if sect IWATER inactive
                                      695
                                                 RELEASE 8.0
</pre><hr><pre>
-------
4.7(2).6  Group IWTGAS
                                                       Catalog for IMPLND module
<	Member	>  K      Units
        Max subscr  i    (external)
Name      values    n
          1    2    d  Engl      Metr
Description/comment
Time series computed by
module section IWTGAS:
SOTMP
SODOX
SOC02
SOHT

SODOXM

SOC02M

1
1
1
1

1

1

1
1
1
1

1

1

* Deg F
* mg/1
* mg/1
- BTU/
ac.ivld
- lb/
ac.ivld
- lb/
ac . ivld
Deg C
mg/1
mg/1
kcal/
ha. ivld
kg/
ha. ivld
kg/
ha. ivld
                                            Temp of surface outflow
                                            DO cone in surface outflow
                                            CO2 cone in surface outflow
                                            Heat energy in surface outflow
                                            (relative to freezing point)
                                            Flux of DO in surface outflow

                                            Flux of CO2 in surface outflow
Input time series reqd to
compute the above:

Group ATEMP
AIRTMP

Group SNOW

WYIELD

Group IWATER
SURO
only reqd if section ATEMP inactive
only reqd if  section SNOW  inactive
and snow considered (CSNOFG=  1)
only reqd if  sect  IWATER inactive
                                       696
                          RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for IMPLND module
4.7(2).7  Group IQUAL
< 	 Member 	 > K Units
Max subscr i (external)
Name values n
1 2 d Engl Metr

Description/comment


Time series computed by
module section IQUAL:
SQO
SOQS

SOQO

SOQUAL

SOQOC
SOQC
NQOF
NQSD

NQOF

NQ

NQOF
NQ
1
1

1

1

1
1
* qty/ac
- qty/
ac.ivld
- qty/
ac.ivld
- qty/
ac.ivld
- qty/ft3
- qty/ft3
qty/ha
qty/
ha.ivld
qty/
ha.ivld
qty/
ha.ivld
qty/1
qty/l
                                            Storage of QUALOF on the surface
                                            Total flux of QUALSD from surface

                                            Washoff of QUALOF from surface

                                            Total outflow of QUAL from the
                                            surface
                                            Cone of QUALOF in surface outflow
                                            Cone Of QUAL (QUALSD+QUALOF) in
                                            surface outflow
Input time series reqd to
compute the above:

Group IWATER
SURO
Group SOLIDS
SOSLD
only reqd if sect IWATER inactive
only reqd if one or more QUALs are
QUALOFs, or if SOQC is reqd for one
or more QUALs

only reqd if sect SOLIDS inactive
and one or more QUALs are QUALSDs
                                      697
                         RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for RCHRES module
4.7(3)  Catalog for RCHRES module
The time series groups associated with this application module are shown
in Figure 4.7(3)-1.

The members contained within each group are documented in the tables which
follow.
4.7(3).1  Group EXTNL
<	Member	>  K      Units
        Max subscr  i    (external)
Name      values    n
          1    2    d  Engl      Metr
                        Description/comment
Time series external to
module RCHRES  (input only):
PREC       1     1

POTEV      1     1

COLIND  NEXITS  1
   in/ivld   mm/ivld

   in/ivld   mm/ivld

-  none      none
Precip on surface of the RCHRES
(requires AUX1FG = 1)
Potential evap from the surface
(requires AUX1FG = 1)
Time series indicating which
(pair of) columns in RCHTAB are
used to evaluate f(VOL) component
of outflow demand
OUTDGT
IVOL
ICON
SOLRAD
CLOUD
DEWTMP
GATMP
WIND

PHVAL
ROC
BIO
NEXITS
1
NCONS
1
1
1
1
1

1
1
NGQUAL
1
1
1
1
1
1
1
1

1
1
1
- ft3/S
- ac.ft/
ivld
- qty/ivld
- Ly/ivld
tenths
DegF
DegF
miles/
ivld
-
moles/
1
mg(bio)/
1
m3/s
Mm3/
ivld
qty/ivld
Ly/ivld
tenths
DegC
DegC
km/
ivld

moles/
1
mg ( bio ) /
1
g(t) component of outflow demand
Inflow to the RCHRES
Inflow of conservative constits.
Solar radiation
Cloud cover ( range 0 thru 1 0 )
Dewpoint
Air temp at met. station
Wind movement

pH (used in Section GQUAL)
Free radical oxygen cone .
(used in Section GQUAL)
Biomass active in biodegradation
(used in Section GQUAL)
                                       698
                                                  RELEASE 8.0
</pre><hr><pre>
-------
RCHRES module
                       EJCTNU
                                           Catalog for RCHRES Module
                       H^fOR
                       HTRCH
                                                   CONS
                      G0UAL.
                       MUTRDt
                       PHCAR&
                                                   PtAMK.
                      OFLOW
                                                  INFLOW
                                                  ROFLOW
     group containing time series which are always input
     group corrtaming time- series which are alwa\* output
     group containing time series which can be input or output
Hqure 4:7(5)-! Groups of time serie* associated wito
              RCHRES module
                             699
RELEASE 8.0
</pre><hr><pre>
-------
4.7(3).2  Group HYDR
                                                       Catalog for RCHRES module
< 	 Member 	 > K Units
Max subscr i (external)
Name values n
1 2 d Engl Metr
Description/comment
Time series computed by
module section
VOL 1
AUX1FG must be
to be computed:
DEP 1
STAGE 1
AVDEP 1
TWID 1
HRAD 1
SAREA 1
AUX2FG must be
to be computed:
AWEL 1
AVSECT 1

USTAR 1
TAU 1
RO 1
0 NEXITS

PRSUPY 1

VOLEV 1

ROVOL 1

OVOL NEXITS

HYDR:
1
1

1
1
1
1
1
1
1

1
1

1
1
1
1

1

1

1

1

* ac.ft
Mm3
Volume of water in the RCHRES
for next 5 members

* ft
* ft
* ft
* ft
* ft
* ac

m
m
m
m
m
ha

Depth at specified location
Stage (DEP+STCOR)
Average depth (volume/surface area)
Mean topwidth (surface area/length)
Hydraulic radius
Surface area
for next 2 members

* ft/s
* ft2

* ft/s
* Ib/ft2
* ft3/s
* ft3/s

- ac . ft/
ivld
- ac.ft/
ivld
- ac.ft/
ivld
- ac.ft/
ivld

m/s
m2

m/s
kg/m2
m3/s
m3/s

Mm3/
ivld
Mm3/
ivld
Mm3/
ivld
Mm3/
ivld

Average velocity (RO/VOL)
Cross-sectional area averaged over
length of RCHRES (VOL/length)
Shear velocity
Bed shear stress
Total rate of outflow from RCHRES
Rates of outflow through individual
exits
Volume of water contributed by
precip on surface
Volume of water lost by evap

Total volume of outflow from RCHRES

Volume of outflow through
individual exits
 Input time  series reqd  to
 compute  the above:

 Group INFLOW
 IVOL
optional
 Group  EXTNL
 PREC
 POTEV
 COLIND

 OUTDGT
optional
optional
reqd only if ODFVFG is negative for
one or more outflow demands
reqd only if ODGTFG is >0 for one
or more outflow demands
                                       700
                         RELEASE 8.0
</pre><hr><pre>
-------
4.7(3) .3  Group ADCALC
                                                       Catalog for RCHRES module
<	Member	>  K      Units
        Max subscr  i    (external)
Name      values    n
          1    2    d  Engl      Metr
                                     Description/comment
Time series computed by
module section ADCALC:

None of the computed time series are outputtable; they are passed internally to
any active "quality" sections of the RCHRES module

Input time series reqd to
compute the above:
Group HYDR

VOL
O
                                     only reqd if section HYDR inactive
4.7(3).4  Group CONS
<	Member	>  K      Units
        Max subscr  i     (external)
Name      values    n
          1    2    d  Engl      Metr
                                     Description/comment
Time series computed by
module section CONS:
CON
NCONS
               1
*  concid
concid
ROCON  NCONS   1    -  qty/ivld  qty/ivld
OCON  NEXITS NCONS  -  qty/ivld  qty/ivld


Input time series reqd to
compute the above:

Group EXTNL (or INFLOW)

ICON
Concentration of conservative
constits
Total outflow of conservatives
Outflow of conservatives through
individual exits
                                     optional
                                      701
                                                                      RELEASE  8.0
</pre><hr><pre>
-------
                                                       Catalog for RCHRES module
4.7(3).5  Group HTRCH
< 	 Member 	 > K Units
Max subscr i (external)
Name values n
1 2 d Engl Metr

Description/comment


Time series computed by
module section HTRCH:
TW
AIRTMP
HTEXCH
ROHEAT
1
1
1
1
1
1
1
1
*
*
_
-
DegF
DegF
BTU/ivld
n
DegC
DegC
kcal/ivld
n
CHEAT  NEXITS  1
Input time series reqd to
compute the above:

Group INFLOW
I HEAT
Group EXTNL
SOLRAD
PREC
CLOUD
DEWTMP
GATMP
WIND
Simulated water temperature
Air temperature, adjusted for elev
diff between gage and RCHRES
Net heat exchanged with atmosphere
Total outflow of thermal energy
through active exits
Outflow of thermal energy through
individual exits
optional
optional
always required

optional
Group HYDR
AVDEP
only reqd if section HYDR inactive
                                       702
                          RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for RCHRES module
4.7(3).6  Group SEDTRN
< 	 Member 	 > K Units
Max subscr i (external)
Name values n
1 2 d Engl Metr

Description/comment


Time series computed by
module section SEDTRN
SSED
RSED
BEDDEP
DEPSCR
4
10
1
4
1
1
1
1
*
*
*
-
mg/1
ton
ft
ton/ivld
ROSED
OSED
NEXITS 4
mg/1       Suspended sediment cones.
tonne      Sediment storages
m          Bed depth (thickness)
tonne/ivld Deposition (positive) or
           scour (negative)
    "      Total outflows of sediment
           from the RCHRES
    11      Outflows of sediment through
           individual exits
Note: In the above, the subscript with maximum value =4 selects the sediment
fraction - 1 for sand, 2 for silt, 3 for clay, and 4 for the sum of sand silt
and clay. The subscript with maximum value =10 selects the following:
1 suspended sand, 2 suspended silt, 3 suspended clay, 4 bed sand, 5 bed silt
6 bed clay, 7 total sand, 8 total silt, 9 total clay, and 10 total of 7,8,9.

Input time series required to
compute the above:
Group INFLOW

ISED(*)


Group HYDR
                                    inflows of sand, silt, and clay
                                    to the RCHRES; optional

                                    only reqd if Section HYDR is
                                    inactive
TAU
AVDEP
AWEL
RO
HRAD
TWID

Group HTRCH

TW
                                    only reqd if SANDFG
                                i   = 1 or 2
                                    only reqd if Section HTRCH is
                                    inactive and SANDFG =  1 or 2
                                      703
                                                              RELEASE  8.0
</pre><hr><pre>
-------
4.7(3).7  Group GQUAL
                                                       Catalog for RCHRES module
<	Member	>  K      Units
        Max subscr  i    (external)
Name      values    n
          1    2    d  Engl      Metr
Description/comment
Time series computed by
module section GQUAL:

DQAL   NGQUAL  1    *  concu/1   concu/1
SQAL      6  NGQUAL *  concu/mg  concu/mg
RDQAL  NGQUAL  1    *  qty       qty

RSQAL    12  NGQUAL *  qty       qty
RRQAL  NGQUAL   1    *  qty       qty
PDQAL  NGQUAL   1    -  qty/ivld  qty/ivld

DDQAL    7   NGQUAL -      "         "
 RODQAL NGQUAL   1

 DSQAL    4  NGQUAL  -


 ROSQAL   4  NGQUAL  -




 SQDEC    7  NGQUAL



 ADQAL    7  NGQUAL  -
Dissolved concentration of qual.
Concentration of qual on sediment.
First subscript selects:
1 susp sand  2 susp silt
3 susp clay  4 bed sand
5 bed silt  6 bed clay
Total storage of qual in dissolved
form
Storage of sediment-associated qual.
First subscript selects:
1 susp sand  2 susp silt
3 susp clay  4 susp total
5 bed sand  6 bed silt
7 bed clay  8 bed total
9 total on sand  10 total on silt
11 total on clay  12 grand total
Total storage of qual in the RCHRES
Input to this qual in this RCHRES,
from decay of parent quals
Decay of dissolved qual. First
subscript selects decay path:
1 hydrolysis  2 oxidation
3 photolysis  4 volatilization
5 biodegradation  6 general  (other)
7 total of 1-6  .
Total outflow of dissolved qual
from the RCHRES
Deposition/scour of qual. First
subscript selects carrier:
 1 sand  2 silt  3 clay  4 total
Total outflow of sediment-associated
qual from RCHRES.
First subscript selects carrier:
 1 sand  2 silt  3 clay  4 total
Decay of sediment-associated qual
on:  1 susp sand  2 susp silt
 3 susp clay  4 bed sand
 5 bed silt   6 bed clay  7 total
Adsorption/desorption between
 dissolved state and  :
 1 susp sand  2  susp  silt
                                       704
                          RELEASE 8.0
</pre><hr><pre>
-------
ODQAL  NEXITS  NGQUAL-     "

OSQAL  NEXITS  NGQ3  -     "
Input time series reqd to
compute the above:

Group INFLOW
IDQAL
ISQAL(*)

Group EXTNL
PHVAL

ROC

BIO(I)

CLOUD

WIND
Group HYDR
AVDEP
AWEL
Group HTRCH
TW

Group PLANK

PHYTO


Group SEDTRN

SSED(4)
           Catalog for RCHRES module

3 susp clay  4 bed sand
5 bed silt  6 bed clay  7 total
Outflow of dissolved qual
through individual exits.
Outflows of sediment-associated
qual through individual exits.
Second subscript selects:
1 sand, first qual
2 silt,
3 clay,   "     "     (NGQ3=
4 sand, second  "      NGQUAL*3)
etc.
optional
optional
if there is hydrolysis, PHFLAG=1,
and Section PHCARB is inactive
if there is free radical oxidation,
and ROXFG=1
if qual no. I undergoes
biodegradation and GQPM2(7,I)=1
if there is photolysis, and
CLDFG=1
if there is volatilization and water
body is a lake (LKFG=1)

only reqd if Section HYDR inactive
See below
if there is volatilization and
water body is a free-flowing
stream (LKFG=0)

only reqd if Section HTRCH inactive
if TEMPFG=1

only reqd if Section PLANK is
inactive or PHYFG=0
if there is photolysis and
PHYTFG=1

only reqd if Section SEDTRN is
inactive
if there is photolysis and SDFG=1
Note: AVDEP is required if Section HYDR is  inactive  and:
           1. There is photolysis
      or   2. There is volatilization and
               a. The water body is a  lake
           or  b. The water body is a  free-flowing stream and REAMFO1
                                       705
                          RELEASE 8.0
</pre><hr><pre>
-------
4.7 ( 3).8.1  Group OXRX
                                                       Catalog for RCHKES module
<	Member	>  K      Units
        Max subscr  i    (external)
Name      values    n
          1    2    d  Engl      Metr
                             Description/comment
Time series computed by
module section OXRX:
DOX
BOD
SATDO

OXCF1
     *  mg/1
     *  mg/1
          mg/1
          mg/1
mg/1      mg/1
1     -  Ib/ivld   kg/ivld
DO concentration
BOD concentration
Saturation DO concentration

Total outflows of DO (OXCF1(1,1))
and BOD (OXCF1(2,1)) from the RCHRES
OXCF2  NEXITS  2    -    "         "        Outflows of DO and BOD through
                                            individual exits
In the above, the first subscript selects the exit.  The second selects the
constituent: 1 means DO, 2 means BOD.
Input time series reqd to
compute the above:

Group INFLOW
IDOX
IBOD

Group EXTNL
WIND

Group HYDR
AVDEP
AWEL

Group HTRCH
TW
                             optional
                             optional
                             only needed if LKFG=1 (lake)

                             only reqd if section HYDR inactive



                             only reqd if section HTRCH inactive
                                       706
                                                      RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for RCHRES module
4.7(3).8.2  Group NUTRX
< 	 Member 	 > K Units
Max subscr i (external)
Name values n
1 2 d Engl Metr

Description/comment


Time series computed by
module section NUTRX:

NUST      5    1    *  see below            Nutrient state variables
In the above, the first subscript selects the state variable:
1 for NO3, 2 for NH3, 3 for N02, 4 for PO4, 5 for denitrifying bacteria.
The units of NO3 through P04 are mg/1, denit bacteria is unitless
NUCF1
1
from
                       Ib/ivld   kg/ivld    Total outflows of nutrients
                                            the RCHRES
In the above, the first subscript selects the nutrient:
1 means NO3, 2 means NH3, 3 means NO2, 4 means PO4

NUCF2   NEXITS 4    -  Ib/ivld   kg/ivld    Outflows of nutrients through
                                            individual exits
In the above, the first subscript selects the exit, the second selects the
nutrient - same code as in NUCF1
Input time series reqd to
compute the above:

Group INFLOW
IN03
INH3
INO2
IPO4

Group HTRCH
TW
                             optional
                             optional
                             optional
                             optional

                             only reqd if section HTRCH inactive
NOTE:  Ammonia,   nitrite and ortho-phosphate may,   or may not,   be  simulated,
depending on  the values  the user  assigns to  NH3FG,  NO2FG  and PO4FG.    If  a
constituent is not simulated,  those time series associated with it in this  list
should be ignored.
                                      707
                                                      RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for RCHRES module
4.7(3).8.3  Group PLANK
< 	 Member 	 > K Units
Max subscr i (external)
Name values n
1 2 d Engl Metr

Description/comment


Time series computed by
module section PLANK:

PKST3     7    1    *  mg/1      mg/1       A group of state variables
In the above, the first subscript selects the state variable:
                                  (ORN)
                                  (OKP)
                                  (ORC)
1 for dead refractory organic N
2 for dead refractory organic P
3 for dead refractory organic C
4 for total organic N  (TORN)
5 for total organic P  (TORP)
6 for total organic C  (TORC)
7 for potential BOD  (POTBOD)

PHYTO     1    1    *  mg/1      mg/1       Phytoplankton concentration
ZOO       1    1    * organism/1 organism/1 Zooplankton population
BENAL     1    1    *  mg/m2     mg/m2      Benthic algae
PHYCLA    1    1    *  ug/1      ug/1       Phytoplankton as chlorophyll a
BALCLA    It*  ug/m2     ug/m2      Benthic algae as chlorophyll a

PKCF1     5    1    -  Ib/ivld   kg/ivld    Total outflows from the RCHRES
In the above, the first subscript selects the constituent:
1 for phytoplankton, 2 for zooplankton, 3 for ORN, 4 for ORP, 5 for ORC

PKCF2  NEXITS  5    -  Ib/ivld   kg/ivld    Outflows through individual exits
In the above, the first subscript selects the exit, the second selects the
constituent — same code as for PKCF1.
 Input time  series reqd  to
 compute  the above:

 Group EXTNL
 SOLRAD
                                            required
 Group  INFLOW
 IPHYTO
 I ZOO
 IORN
 IORP
 IORC

 Group  HTRCH
 TW

 Group  SEDTRN
 SSED(2)
 SSED(3)
                                            optional
                                            optional
                                            optional
                                            optional
                                            optional

                                            only  reqd  if  section HTRCH inactive
                                             only  reqd if  section SEDTRN inactive
                                       708
                                                                      RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for RCHRES module

NOTE:   Phytoplankton,   zooplankton and  benthic algae  may,  or  may not,   be
simulated,  depending on the values the user assigns to PHYFG,  ZOOFG and BALFG.
If a constituent is not simulated,  those time series associated with it in this
list should be ignored.
4.7(3) . 8.4  Group PHCARB
<	Member	>  K      Units
        Max subscr  i    (external)
Name      values    n
          1    2    d  Engl      Metr
Description/comment
Time series computed by
module section PHCARB:

PHST      3    1    *  see below            State variables
In the above, the first subscript selects the state variable:
1 for total inorganic carbon (TIC) — units mg/1
2 for carbon dioxide (CO2) — units mg/1
3 for pH

PHCF1     2    1    -  Ib/ivld  kg/ivld     Total outflows of TIC and CO2
In the above, the first subscript selects the constituent:
1 for TIC, 2 for CO2

PHCF2  NEXITS  2    -  Ib/ivld  kg/ivld     Outflows of TIC and CO2 through
                                            individual exits
In the above, the first subscript selects the exit and the second the
constituent — same code as for PHCF1
Input time series reqd to
compute the above:

Group INFLOW
ITIC
ICO2

Group CONS
CON(ALKCON)
Group HTRCH
TW
optional
optional

only reqd if section CONS inactive
concentration units must be mg/1
as CaCO3

only reqd if section HTRCH inactive
                                      709
                                                                      RELEASE  8.0
</pre><hr><pre>
-------
                                                       Catalog for RCHRES Module
4.7(3).9  Groups INFLOW, ROFLOW and OFLOW
The  members in  these groups  represent the  total inflow,   total outflow  and
outflow through individual  RCHRES exits of every  simulated constituent.  These
groups were included in  the catalog to make it easier for  users to specify the
linkages  representing time  series  passed from  one  RCHRES  to another.   For
example, assume the RCHRES's in a run have sections HYDR, HTRCH and OXRX active,
and the NETWORK Block contains:
NETWORK
<-Volume-> <-Grp> <-Member-><—Mult—>Tran <-Target vols> <-Grp> <-Member->
<Name>   #        <Name> # #<-factor->strg <Name>   #   #        <Name> # #
RCHRES
RCHRES
                                                                    ***
                                                                    ***
1 ROFLOW
2 OFLOW
RCHRES
RCHRES
2
3
INFLOW
INFLOW
These entries mean that the entire outflow from  RCHRES  1 goes to RCHRES  2,   and
that the  outflow through exit  2 of RCHRES  2 goes  to  RCHRES 3.    Because  the
"member name" fields  have been left blank,  HSPF will   automatically expand  the
above entries,  generating an entry for each member which is active  in  this run.
In this case, there will be 4 generated entries because  4 constituents  are being
simulated (water, heat,  DO and BOD).  The second set of generated entries would
be:
NETWORK
<-Volume-> <-Grp> <-Member-><—Mult—>Tran <-Target vols>  <-Grp>  <-Member->
<Name>   #        <Name> # #<-factor->strg <Name>   #   #         <Name>  #  #
                                                                     ***
                                                                     ***
RCHRES   2 OFLOW  OVOL    21      1.0
RCHRES   2 OFLOW  OHEAT   21      1.0
RCHRES   2 OFLOW  OXCF2   21      1.0
RCHRES   2 OFLOW  OXCF2   22      1.0
                                  RCHRES   3     INFLOW IVOL    1  1
                                  RCHRES   3     INFLOW IHEAT   1  1
                                  RCHRES   3     INFLOW OXIF    1  1
                                  RCHRES   3     INFLOW OXIF    2  1
 Thus,  the  user  can  specify  the  linkage between  two RCHRES's  with a single entry,
 instead  of having to  supply an  entry  for  every  constituent passed between them.
                                       710
                                                             RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for RCHRES Module
4.7(3).9.1  GROUP INFLOW
The members  in this group  represent the inflows to  a RCHRES.  Note  that each
member listed below is  "available" for use only if the  module section to which
it belongs is active.
< 	 Member 	 > K Units
Max subscr i ( external ) Module
Name values n section
1 2 d Engl Metr
IVOL

ICON

I HEAT

ISED

IDQAL

ISQAL

1 1 - ac.ft/
ivld
NCONS 1 - qty/
ivld
1 1 - BTU/
ivld
3 1 - ton/
ivld
NGQUAL 1 - qty/
ivld
3 NGQUAL - qty/
ivld
Mm3/ HYDR
ivld
qty/ CONS
ivld
kcal/ HTRCH
ivld
tonne/ SEDTRN
ivld
qty/ GQUAL
ivld
qty/ GQUAL
ivld
Constituent
Water



Conservatives


Heat (relative to
freezing)

Sand , silt, and clay


Dissolved general
quality constituents
General quality
constituent associated
with : 1 Sand
2 Silt
3 Clay
OXIF

NUIF



PKIF




PHIF

2 1 - lb/
ivld
4 1 - lb/
ivld


5 1 - lb/
ivld



2 1 - lb/
ivld
kg/ OXRX
ivld
kg/ NUTRX
ivld


kg/ PLANK
ivld



kg/ PHCARB
ivld
1. DO
2. BOD
1. N03
2. NH3
3. N02
4. P04
1. Phyto
2. Zoo
3. ORN
4. ORP
5. ORC
1. TIC
2. C02




Selected
using the
first
subscript





i





                                       711
RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for RCHRES Module
4.7(3).9.2  Group ROFLOW
The members in this group represent the total outflow from a RCHRES. Note that a
member is "available" for use only if the  module section to which it belongs is
active.
<	Member	>  K      Units
        Max subscr  i    (external)
          values    n
          1    2    d  Engl      Metr
                Module
                section
Constituent
ROVOL     1    1

ROCON   NCONS  1

ROHEAT    1    1

ROSED     3    1

RODQAL  NGQUAL 1

ROSQAL    3  NGQUAL

OXCF1     2    1

NUCF1     4    1

PKCF1     5    1

PHCF1     2    1
See data for
corresponding
member in grp
   INFLOW
Water

Conservatives

Heat

Sand, silt, and clay

Dissolved general qual.

Sediment-associated qual.

DO, BOD

N03, NH3, N02, PO4

Phyto, Zoo, ORN, ORP,  ORC

TIC, CO2
                                       712
                                            RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for RCHRES Module
4.7(3).9.2  Group OFLOW
The members in this group represent the outflows through the individual exits of
a RCHRES.  Note that a member is available for use only if the module  section to
which it belongs is active.

For each member,   the RCHRES exit is selected  by the value given   to the  first
subscript.
< 	
Name
OVOL
OCON
CHEAT
OSED
ODQAL

OSQAL

OXCF2
NUCF2
PKCF2
PHCF2
Member 	 > K Units
Max subscr i (external) Module Constituent
values n section
1 2 d Engl Metr
NEXITS
NEXITS
NEXITS
NEXITS
NEXITS

NEXITS

NEXITS
NEXITS
NEXITS
NEXITS
1
NCONS
1
3
NGQUAL See data for
corresponding
NGQ3* member in grp
INFLOW
2
4
5
2
Water
Conservatives
Heat
Sand, silt, and clay
Dissolved general qual.

Sediment-associated qual.

DO, BOD
NO3, NH3, NO2, PO4
Phyto, Zoo, ORN, ORP, ORC
TIC, CO2
* NGQ3 = NGQUAL*3. See documentation for Group GQUAL for  further
                   explanation of this  subscript.
                                       713
RELEASE 8.0
</pre><hr><pre>
-------
                                                         Catalog for COPY module
4.7(11)  Catalog for COPY module
The time series groups associated with this application module are shown
in Figure 4.7(11)-1.

The members contained within each group are documented in the tables which
follow.
4.7{11).1  Group INPUT
<	Member	>  K      Units
        Max subscr  i    (external)         Description/comment
Name      values    n
          1    2    d  Engl      Metr

Time series input to
module COPY:

POINT    NPT   1    *     anything          Point-valued input time  series
MEAN     NMN   1    -     anything          Mean-valued input time series



4.7(11).2  Group OUTPUT



<	Member	>  K      Units
        Max subscr  i    (external)         Description/comment
Name      values    n
           1    2    d  Engl      Metr
Time  series output by
module  COPY:
 POINT
 MEAN
NPT
NMN
anything
anything
Point-valued output time series
Mean-valued output time series
 Input  time  series  reqd to
 produce  the above:

 Group  INPUT

 POINT
 MEAN
                                   reqd if NPT> 0
                                   reqd if NMN> 0
                                       714
                                                            RELEASE 8.0
</pre><hr><pre>
-------
                                       Catalog for PLTGEN module
          >• -f
          Q. a
          0 "2
          u o
                               INPUT
                              OUTPUT
KEY-
group containing  timt series which are  always input
group containing  timt series which  are always output
group containing time series which can be  input or output
 Figure 4.7(11)-
Groups of  time  series associated
with the COPY module
         3 •
         O 3
         -
         OL  £
                              INPUT
   Figure 4.7(I2)~I Groups of time  series associated
                    with  the  PLTGEN module
          I- -a
          z> o
          5 e
            OUTPUT
  Figure 4.7(l€^-l Groups of time series associated
                  with the  MUTSIN  module
                          715
                                                  RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for PLTGEN module
4.7(12)  Catalog for PLTGEN module
There is only one  time series group associated with this  module;  group  INPUT,
which  contains all  point-valued  and/or mean-valued  members  that  are  to  be
plotted.   This module does not have an output group because all its output goes
to the "plot file", which is documented in Section 4.4(12) of Part E.
4.7(12).1  Group INPUT
<	Member	>  K      Units
        Max subscr  i    (external)
Name      values    n
          1    2    d  Engl      Metr
                                   Description/comment
Time series input to
module PLTGEN:
POINT
MEAN
NPT
NMN
anything
anything
Point-valued input time series
Mean-valued input time series
                                       716
                                                             RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for DISPLY module
4.7(13)  Catalog for DISPLY module
There is only one time series group (INPUT) with one member  (TIMSER)  associated
with this module since the module displays only one time series at a time.  This
module does not have an output group because all its output  goes to the  "display
file" (printed).
4.7(13).1  Group INPUT
<	Member	>  K      Units
        Max subscr  i    (external)
Name      values    n
          1    2    d  Engl      Metr
                                  Description/comment
Time series input to
module DISPLY:
TIMSER
1
1
anything
A mean-valued input time series
                                      717
                                                                      RELEASE  8.0
</pre><hr><pre>
-------
                                                       Catalog for DURANL module
4.7(14)  Catalog for DURANL module
There is only one time series group (INPUT) with one member  (TIMSER)  associated
with this module since the module analyzes only one time series at a time.  This
module does  not have an  output group because all  its output is  printed.  The
format is documented in Section 4.2(14) of Part E.
4.7(14).1  Group INPUT
<	Member	>  K      Units
        Max subscr  i    (external)
Name      values    n
          1    2    d  Engl      Metr
                                  Description/comment
Time series input to
module DURANL:
TIMSER
1
1
anything
A mean-valued input time series
                                       718
                                                            RELEASE  8.0
</pre><hr><pre>
-------
                                                        Catalog for GENER module
4.7(15)  Catalog for GENER module
This module has both input and output groups, like module COPY
(Figure 4.7(11)-1).

The members contained within each group are documented in the tables which
follow.
4.7(15).1  Group INPUT
<	Member	>  K      Units
        Max subscr  i    (external)         Description/comment
Name      values    n
          1    2    d  Engl      Metr

Time series input to
module GENER:

ONE       1    1          anything          First input time series
TWO       1    1          anything          Second input time series



4.7(15).2  Group OUTPUT


<	Member	>  K      Units
        Max subscr  i    (external)         Description/comment
Name      values    n
          1    2    d  Engl      Metr
MV^MW MBWMWWW«*MM«MMI««WH>*WMB.HMMBM««l*B^MWM«»^«W«.M<IV»lM«MM«W«MM«AWIIWaV~V«AWll
Time series output by
module GENER:
TIMSER
1
anything
Output time series (mean-valued)
Input time series reqd to
produce the above:

Group INPUT

ONE

TWO
                             always required

                             Only required if generation option
                             needs two inputs.
                                      719
                                                                      RELEASE 8.0
</pre><hr><pre>
-------
                                                       Catalog for MUTSIN module
4.7(16)  Catalog for MUTSIN module
The time series groups associated with this application module are shown in
Figure 4.7(16)-1.

The members contained within each group are documented in the tables which
follow.
4.7(16).1  Group OUTPUT
<	Member	>  K      Units
        Max subscr  i     (external)
Name      values    n
          1    2    d  Engl      Metr
                                   Description/comment
Time series output by
module MUTSIN
POINT
MEAN
NPT
NMN
anything
anything
Point-valued output time series
Mean-valued output time series
                                       720
                                                             RELEASE 8.0
</pre><hr><pre>
-------
                                                                   FORMATS Block
4.8  FORMATS Block
Layout
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
FORMATS
***
<ft><	obj-fmt	

*** line immed above repeats until all formats have been covered
END FORMATS
Details
Symbol
FORTRAN Format
Name ( s )
Comment
<ft>
<obj-fmt>
FMTCOD        14        Identifying no. which corresponds to
                        format no. in EXT SOURCES or TARGETS
                        Blocks.

FORM(19)      19A4      Standard FORTRAN object-time format.
Explanation

This block is only required if a user  wishes to override the default  format  for
reading or recording data on a sequential file  (see Section 4.9).
                                      721
                                                                      RELEASE  8.0
</pre><hr><pre>
-------
                                                         Sequential File Formats

4.9  Sequential File Formats
The following formats,  for  transfer of data to or from  sequential files,   are
presently supported in the HSPF system:
4.9.1  Format class HYDFIV

It is used for the input of 5-minute data. The sequence of information  is:
1.  Alpha-numeric station number or identifier (this field is not
    read)
2.  Last two digits of calendar year
3.  Month
4.  Day
5.  Card number 1 is for midnight to 3 am.
                2 is for 3 am to 6 am.
                3 is for 6 am to 9 am.
                4 is for 9 am to noon.
                5 is for noon to 3 pm.
                6 is for 3 pm to 6 pm.
                7 is for 6 pm to 9 pm.
                8 is for 9 pm to midnight.
6.  36 fields for 5-minute data.

The default format is:  (1X,312,11,36F2.0)
4.9.2  Format class HYDFIF

It  is used  for  the input  of  15-minute  data.  The sequence of
information is:

1.  Alpha-numeric station number  or identifier (this field is
    not  read).
2.  Last two digits of  the calendar year
3.  Month
4.  Day
5.  Card number (same as  for HYDFIV above)
6.  12 fields for 15-minute  data

The default format is:  (1X,3I2,I1,12F6.0)
                                       722                            RELEASE 8.0
</pre><hr><pre>
-------
                                                         Sequential  File  Formats

4.9.3  Format class HYDHR

It is used for input of hourly observations.  The sequence of  information is:

1.  Alpha-numeric station no. or identifier.
    (This field is not read)
2.  Last two digits of calendar year
3.  Month
4.  Day
5.  Card no: 1 is for a.m. hours                                     >
             2 is for p.m. hours
6.  Twelve fields for hourly data

The default format is:
(10X,I2,1X,I2,1X,I2,1X,I1,12F5.0)


4.9.4  Format class HYODAY

It is used for input of daily observations.  The sequence of  information  is:

1.  Alpha-numeric station no. or identifier.
    (This field is not read)
2.  Last two digits of calendar year
3.  Month
4.  Card no: 1 is for days  1-10
             2 is for days  11-20
             3 is for days  21-
5.  Ten fields, for the daily data  (11 fields for card  no. 3)

The default format is:
(7X,2I2,I1,11F6.0)


4.9.5  Format class HYDSMN

It is used for input of semi-monthly observations.   The sequence  of
information is:

1.  Alpha-numeric station no. or identifier.
    (This field is not read)
2.  Last two digits of calendar year
3.  Card no: 1 for January  through  June
             2 for July through December
4.  Twelve semi-monthly fields

The default format is:
(7X,I2,I1,12F5.0)

Semi-monthly value is distributed to daily  values with  transformation
function of SAME.
                                       723                             RELEASE 8.0
</pre><hr><pre>
-------
                                                          Sequential File Format
4.9.6  Format class HYDMON
It is used for input of monthly observations.  The sequence of
information is:

1.  Alpha-numeric station no. or identifier.
    (This field is not read)
2.  Last two digits of calendar year
3.  Twelve monthly fields

The default format is:
(6X,I2,12F6.0)

Monthly value is distributed to daily values with transformation  function
of SAME.

Note that the user  can override the above default formats  with  his  own format,
supplied in  the FORMATS BLOCK.   He can not,   however,  alter the   sequence of
information within each record.
4.10  SPEC-ACTIONS Block

                         r***********************<
          12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Layout
******

SPEC-ACTIONS
   <oper><fX-l>      <yr><m><dXh><n><tc>   <vari>< 1X2X3XaX-value—>
                                                 or
                                           	<ad>	

   (repeats  until  all  special  actions  have  been  specified)

END  SPEC-ACTIONS
 *******
 Example
 *******
 SPEC-ACTIONS
   ***********
   Operations
   Type     # to#
Date and time  Type-
                code
Addr   Action-   Quantity***
          code           ***
   Increment surface  storage of pesticide to represent field applic.    ***
   PERLND  1         1990/01/01 03      3  SPS     2  1     2     0.625
   PERLND  1         1990/01/01 03      3      2514         2      80.0
 END SPEC-ACTIONS
                                       724
                                                  RELEASE  8.0
</pre><hr><pre>
-------
                                                           Special Actions Block
Details

Symbol
               Fortran
               name ( s )
                              Format  Comment
<oper>
<yr>
<tc>

<vari>
<value>
               OPTYP


               TOPFST

               TOPLST


               DATIMd)
               NSUB(2)
               NSUB(3)
               ACTCOD
               RVAL or
               IVAL
A6


13

14


14
DATIM(2)
DATIM(3)
DATIM(4)
DATIM ( 5 )
TYPCOD
VNAME
NSUB( 1 )
1x,I2
1x,I2
1x,I2
1x,I2
14
A6
13
                              13
                              13
                              14
F10.0
110
operation type - valid values are
PERLND, IMPLND, RCHRES, or PLTGEN

first operation to act upon

last operation to act upon,
0 means use first operation only

year (see starting date field in
GLOBAL block for more information)

month

day

hour

minute

2-INTEGER, 3-REAL, 4-DOUBLE PRECISION

variable to act upon, left-justified

first subscript for VNAME,
0 if none exists

second subscript for VNAME,
0 if none exists

third subscript for VNAME,
0 if none exists

action code: 1- reset variable,
             2- increment variable

see notes below
Notes

The <value> field contains quantitative data for the action to be  taken.   If  the
variable or array  element to be acted  on is an integer   (TYPCOD=2)   <value> is
read as an integer (IVAL);  If it is REAL  (TYPCOD=3 or  4),  <value>  is read as a
real  number  (RVAL).   Note that  the  value must  be   given  in  the  units used
internally for the quantity concerned,  because  no conversion is  performed when
it is read in. You can find the internal units by  looking  up  the quantity  in  the
Operations  Status  Vector  (for  the   module  concerned),   contained in  the
                                      725
                                                                      RELEASE 8.0
</pre><hr><pre>
-------
                                                           Special Actions Block

Programmer's Supplement. For example:

1.  Pesticide storage (module  PERLND)  has units of Ib/ac   (English)  and kg/ha
    (Metric); the same units are used internally and externally.

2.  Sediment storage (module  PERLND)  has internal units of  tons/acre  (in both
    English and Metric systems) but the external units (English and Metric)   are
    tons/acre and tonnes/ha respectively.


For a discussion of the purpose of this Block, see Section 4.03 of Part  E.
5.0  SAMPLE RUN DATA SET

Sample RUN data sets appear in Appendix II.
                                       726                            RELEASE 8.0
</pre><hr><pre>
-------
                                                                        Glossary

                        APPENDIX I     GLOSSARY OP TERMS
1.0  NATURE OF THE GLOSSARY
The glossary  which follows is  not exhaustive.    Its function is  to introduce
terms which may be new and to  assign definite meanings to ambiguous terms.    It
is not a. dictionary.    The goal is not to provide  formally correct definitions
but to supply explanations adequate for practical purposes.  Thus in some cases,
the definition of a term is followed by a further explanatory note.

The definitions  given in the ANSI  Fortran Manual (ANSI  1966)   take precedence
over those given below or elsewhere when they are used in a Fortran context.
2.0  GLOSSARY
The  list  that follows  is  arranged  alphabetically.    Any word  enclosed   in
parentheses ( ) may optionally be omitted from a term in everyday use,  provided
that the context ensures that its use is implied.

ACTUAL ARGUMENT
The name  of an item (or  set)  of data which  is being passed to   (or  retrieved
from) a subprogram via an argument list.  It can be:
  (1) a variable name
  (2) an array or array element name
  (3) any other expression
  (4) the name of an external procedure
  (5) a Hollerith constant

APPLICATION MODULE
A module which simulates processes which occur in the real world.

BLOCK DATA
A special subprogram used  to initialize variables named in a  common block.    A
BLOCK DATA subprogram is not used in HSPF.

BUFFER
A portion  of machine memory  space used for the  temporary storage of  input or
output-bound data.

CODE
A general name  for a set of  statements or instructions,  for   example,   pseudo
code, Fortran code, machine code.

(CODE) SEGMENT  (as used in program design)
See "program segment."
                                      727                             RELEASE 8.0
</pre><hr><pre>
-------
                                                                        Glossary

COMPUTATIONAL ELEMENT
See "element."

CONCEPTUAL DATA STREAM
A  stream of  related data  that are  independent of  any physical  input-output
device.

COPY
A utility  module used  to copy time  series data.   COPY  is typically  used  to
transfer data from a sequential file to the time series store (TSS).

DATA SEGMENT  (especially in HP3000 documents)
The machine  memory space required  for data  storage when executing  a program.
(On some systems this is not distinct from the space required by code.)

(TIME SERIES) DATASET
A dataset in the time series store, containing one or more time series.

DIRECT ACCESS FILE
A disk file whose records are read from or written to a specific location  within
the file.   Any record  in the file may be accessed at  any  time.   Contrast with
sequential file.

DIRECTED GRAPH
A group of processing units arranged with unidirectional paths between  them.  No
bidirectional paths or cycles are allowed.

DIRECTORY
The first dataset in the time series store.   It  contains information  pointing to
other datasets.

DISPLY
A utility module used to print time series data  and summaries of the  data.

DUMMY ARGUMENT
The local name  (in a subprogram)  for an  actual argument  which  is passed to the
subprogram.

DURANL
A utility module  used to examine the  behavior  of a  time   series,   computing a
variety  of   statistics related  to  its'  excursions  above and  below  certain
specified levels.

ELEMENT as used in Fortran
An  item in an array, for example, A(I,J).

ELEMENT   as  used in  simulation
A  collection of nodes and/or  zones,  e.g.  segment no.  1,  reach no.  20.

ELEMENT TYPE
A  name which describes  elements  having  a  common  set  of attributes,  for example,
Pervious  Land-segment,  Reach/Mixed  Reservoir.
                                       728                            RELEASE 8.0
</pre><hr><pre>
-------
                                                                        Glossary

ERRFL
A  formatted  self documenting  file  which  contains  the  text of  HSPF  error
messages.

EXECUTABLE PROGRAM
A self contained  computing procedure.   It consists  of a main program  and its
required subprograms.

(EXTERNAL) PROCEDURE
A Fortran subprogram or a procedure written  in another language and called from
a Fortran program.

FEEDBACK ELEMENT
An element  which is situated in  a loop in a  network or which is  connected  to
another element by one or more bi-directional flux linkages.

FEEDBACK REGION
A group of connected feedback  elements.   Information and constituent transfers
across the  boundaries of a feedback  region are uni-directional,   but internal
fluxes can be bidirectional.

FLOWCHART
A schematic two-dimensional representation of the  logic in a program or program
unit.  The level of detail in a flowchart depends on its purpose.

FLUX
The rate of transfer of fluid, particles or energy across a given surface.

FUNCTION  (as used in Fortran language)
See ANSI  Fortran Manual A  transformation which  receives input and  returns  an
output value in  a prdictable manner.   It  is defined outside the  program unit
whinh calls it.

FUNCTION  as used in program design, not in Fortran language
A  transformation which  receives  input and  returns  output  in a  predictable
manner*   Most functions  within a program can  be classified into one  of three
types:   input,   process,  or  output.    Usually,   there  is a  hierarchy   of
functions—high level functions contain subordinate functions.

GENER
A utility module  used to perform any  one of several transformations  on one  or
more input time series.

HIPO DIAGRAM
A HIPO (hierarchy plus input, process,  output)  diagram depicts graphically the
function of a subprogram and its' subordinate subprograms.

HSPF
see Hydrological Simulation Program Fortran

Hydrological Simulation Program Fortran (HSPF)
A set of  computer codes that can  simulate the hydrologic and  associated water
quality  processes  on   the  land  surface  and  in  streams   and  well  mixed
impoundments.

                                      729                            RELEASE 8.0
</pre><hr><pre>
-------
                                                                        Glossary

IDENTIFIER
An identifying name or number in a program unit, for example,  the name assigned
to a  subprogram,  data item  or COMMON block,   or the  number used to   label  a
statement or to refer to an I-O unit.

IMPLND
An application module  which simulates the water quantity  and quality processes
which occur on an impervious land segment.

INFOFL
A  formatted self  documenting  file which  contains material  used  by the  run
interpreter in processing the user's control input.

INGRP
A group of HSPF operations which share the same internal scratch  pad  (INPAD).

INPAD
see INTERNAL SCRATCH PAD

INPAD AREA
The space available  in core for the storage   of time  series data  in  the INPAD.
It is the difference between the area of  the common block  SCRTCH  and  the  longest
OSV in the INGRP.

INPAD WIDTH
The number of time intervals which  are present in  the  INPAD  during a  run.   This
is the INPAD area divided by the maximum  number of rows  of the  time series data.
HSPF uses fewer disk input/output operations with  longer INPAD  widths.

INPUT TIME SERIES
Time series which are  read  in a. given simulation  run.

INSPAN
see INTERNAL SCRATCH PAD SPAN

INTER SECTION DATA TRANSFER (ISDT)
The movement of  information from one section  to another  within  a module.

INTERNAL  SCRATCH PAD  (INPAD)
The space  in core where time  series data is  accessed by modules.   It functions
as a large buffer for  this  data.

INTERNAL  SCRATCH PAD  SPAN  (INSPAN)
The real  world  time which  corresponds to  the  INPAD width.

IVL
See SIMULATION  INTERVAL

JOB
The work  performed  by  HSPF in  response to the instructions  found in a  complete
set of  User's Control Input.

KIND
A descriptor which  implies either point or mean with regard to a time series.

                                       730                            RELEASE 8.0
</pre><hr><pre>
-------
                                                                        Glossary

MAIN PROGRAM (UNIT)
See ANSI Fortran Manual.   In FORTRAN, a program unit not containing a FUNCTION,
SUBROUTINE  or BLOCK  DATA  statement and  containing  at  least one  executable
statement.  A main program is required for program execution.

MEAN VALUED DATA
Data which represents the  behavior of a time series over  time intervals rather
than at specific points in time.

MIXED RESERVOIR
A water body which is assumed to be completely mixed.

MODEL
A set of algorithms, set in a logical structure, which represents a process.    A
model is implemented using modules of code.

MODULE
A set of program units which performs a clearly defined function.

MODULE SECTION
A part of an Application Module which can be executed independently of the  other
parts, eg. SEDMNT in module PERLND.

MUTSIN
A utility  module used  to read a  sequential external file  which has  the same
format as the file produced by the  PLTGEN module.  MUTSIN makes the time series
data on the external file available for use by other modules.

NETWORK
A group  of connected processing  units.   Information and/or  constituents flow
between  processing  units  through uni-directional  linkages.    That  is,   no
processing unit may pass output which  indirectly influences itself (no feedback
loops).   These constraints make it possible  to operate on each processing unit
separately, considering them in an "upstream" to "downstream" order.

NODE
A  point in  space where  the  value of  a  spatially variable  function can  be
determined.

OM
see OPERATING MODULE

OPERATING MODULE (OM)
A set of  HSPF program units which perform  a series of process  functions  for a
specified time on a  given set of input time series and  produce a specified set
of output time series.

OPERATION
In HSPF:   execution of code which transforms a  set of input time series into a
set of output time series,  for example,  execution of a application module or a
utility module.  See "simulation operation," "utility operation."
                                      731                             RELEASE 8.0
</pre><hr><pre>
-------
                                                                        Glossary

OPERATIONS STATUS VECTOR (OSV)
The  data  structure  for  an  operating module.    The  OSV  contains  all  the
information (parameters,  state variables)  needed to  describe the status of an
operation and to restart it after an interruption.

OPERATIONS SUPERVISOR (OSUPER)
The HSPF  program units  which  oversee the  execution of operating  modules and
related time series movement.

OSUPER
see OPERATIONS SUPERVISOR

OSUPFL
This direct  accsee file  contains instructions  which the  Operation Supervisor
reads to  manage the  operations in a  run.   This  includes  infromation  of the
configuration of  the SCRATCH  PADS,  EXGROUPs and  INGROUPs,  and  locations of
detailed information about each operation.

OSV
see OPERATION STATUS VECTOR

OSVFL
This direct access file contains the  operation status vector for each  operation
in a run.  It is used to pass details of  each operation  from  the run interpreter
to the operations supervisor  and to restore the OSV in  core when the  operation
is resumed  after interruption  by the  operations supervisor to process  other
operations in the  INGROUP.

OUTPUT TIME SERIES
Time series which are generated during a  simulation run.  They do not have  to be
stored in the time series store.

PARAMETER
A variable used in  a function which determines the transformation  of  the  input
to the function to the output of the function.

PARTITION  (an operation)
The execution of  different  sections of an application module  in  seperate  runs.
Time series  involved in  inter section   data  transfers  must be   stored between
runs.

PERLND
An application  module which simulates the  water  quantity  an  quality  processes
which occur on a pervious land segment.

PERVIOUS LAND SEGMENT  (PLS)
A  segment  of land with  a pervious  surface.

PHYSICAL PROCESS
A  process  occuring  in  the  real world.
                                       732                            RELEASE 8.0
</pre><hr><pre>
-------
                                                                        Glossary

PLS
see PERVIOUS LAND SEGMENT

PLTGEN
A utility module  used to write a  sequential external file containing  up to  10
time series and related commands for a stand alone plotting program.

POINT VALUED DATA
Data which represents the  behavior of a time series at  specific points in time
rather than over time intervals.

PROCEDURE
See "external procedure."

PROCESS
In the real world:   A continuing activity, for example/  percolation,  chemical
reaction.  See "physical process."

PROCESSING UNIT (PU)
An element or group of related elements which is simulated for a period of time.
Input  comes from  external sources  or  Processing Units  which have  completed
simulating for the given period of time.   Output goes to other processing units
of external targets.

PROGRAM
A complete set of code,  consisting of one  or more program units,  the first  of
which is the "main" program unit.

PROGRAM DESIGN
The  design  of  a  set  of algorithms  and  data  structures  which  meets  the
specifications for a software system.

(PROGRAM) SEGMENT
A portion of  a program which performs  a single,  well defined  function.   All
parts of the function are contained within it.   Note that, since a function may
contain lower level functions, a segment may also contain subordinate segments.

PROGRAM UNIT
A main program or a subprogram.

PROTOTYPE
(A portion of) the real world.

PSEUDO CODE
An English-like representation of the logic in a program unit  (see Textbook).

PU
see PROCESSING UNIT

RCHRES
An application module  which simulates the water quantity  and quality processes
which occur in a reach of open or closed channel or a completely mixed lake.
                                       733                             RELEASE 8.0
</pre><hr><pre>
-------
                                                                        Glossary

REACH
A free-flowing portion of a stream, simulated in HSPF using storage routing.

RUN
A set of  operations which are performed  serially and cover the  same period of
time.

RUN INTERPRETER
The HSPF module which reads and interprets the User's Control Input.  It sets up
internal information on the OSVPFL instructing the system regarding the sequence
of operations to  be performed,  stores parameters and state  variables for each
operation on the OSVFL,  writes instructions on the TSGETF and TSPUTF related to
the movement of time series data and performs other minor functions.

SECTION
see MODULE SECTION

SEGMENT
A portion of the land assured to have areally uniform properties.

SEQUENTIAL FILE
A file  whose records are  organized on the  basis of their  successive physical
positions,  such as on  magnetic tape or cards.   A record  may be accessed only
after the previous record has been accessed.

SERVICE SUBPROGRAM
A program unit which  performs a general function required by  a  number of other
program units.

SIMPLE ELEMENT
An element which is not a feedback element.

SIMULATION
Imitation of the behavior of a prototype, using a model.  We implement the model
on a computer using an application module.

SIMULATION INTERVAL
The  internal time step used in an operation.

SIMULATION MODULE
See  APPLICATION MODULE

SIMULATION  (OPERATION)
Simulation of a specified prototype  for a specified period.

SOFTWARE
A  logically  complete  set of code  and user documentation.   This term is  generally
reserved  for code which  is designed  to be used by others  and which conforms  to a
standard  language, with minor  specified extensions.

SPACFL
This direct   access  file   contains   special  action   instructions.     These
instructions specify  a change  to  a variable on OSV at a specific time.


                                       734                             RELEASE 8.0
</pre><hr><pre>
-------
                                                                        Glossary

STATE VARIABLE
A  variable containing  the  current  value of  a  storage  or other  measurable
quantity.  It may change through time.

STRUCTURE CHART
A  diagram which  documents the  result  of structured   (program)  design.     It
indicates the  program units,  their  relationships  (including  hierarchy)  and,
optionally, the data passed between them.

STRUCTURED PROGRAM  or SUBPROGRAM
A  (sub)program   constructed  according   to  the   principles  of   structured
programming.

STRUCTURED (PROGRAM) DESIGN
A set of program  design techniques and guidelines that  are  used to specify  the
functions  in a  program  ,   the data  processed  by  each function,   and   the
relationships among the functions.

STRUCTURED (PROGRAM) SEGMENT
A  program  segment  constructed  according  to  the  principles  of  structured
programming.

STRUCTURED PROGRAMMING TECHNOLOGY
A  set  of  related  disciplines  which   emphasize  structure  in  the   design,
implementation, and documentation of software.

STRUCTURED SOURCE CODE
Source code written in structured form.  This includes the use of:
  (1) indentation appropriate to the logical level of the code
  (2) "intelligent" identifiers
  (3) narrative commentary, to assist the reader in  understanding the
                code.

STRUCTURE FIGURE
One of the five basic logical constructions  which make  up a structured program.
They are commonly called:
     SEQUENCE
     IFTHENELSE
     WHILEDO
     DOUNTIL
     CASE
(see Textbook)

SUBPROGRAM
The Pseudo or Fortran code used to implement a single box in a Structure  chart.

SUBPROGRAM (GROUP)
The pseudo or Fortran code used to implement  a box  in a Structure Chart  and  all
its subordinate functions.   The group is usually referred to by the name of  the
top-most box.

SUBPROGRAM (UNIT)
There are three types:  subroutine, function, and block  data


                                      735                            RELEASE  8.0
</pre><hr><pre>
-------
                                                                        Glossary

SUBROUTINE
See ANSI Fortran Manual

SYSTEM DESIGN
The process in  which program specifications,  such as  program requirements and
record descriptions, are defined.

SYSTEM DOCUMENTATION
A comprehensive  set of documents  which enable a user  to understand and  use a
software product.  It should include:
  (1) a discussion of the underlying principles
  (2) a discussion of the mathematical relations which the code implements
  (3) documentation of the structure of the code
  (4) a listing of the code
  (5) documentation of data and file structures, including the input required to
      run the program.

TIME SERIES
A series of chronologically ordered  values  giving a discrete representation of
the variation in time of a given entity.

(TIME SERIES) DATASET
A dataset in the time series store, containing one or more time series.

TIME SERIES MANAGEMENT SYSTEM (TSMS)
The modules of HSPF which are concerned  with manipulation of time  series or the
files used to store time series.   It  includes the TSS management  functions and
TSGET and TSPUT.

TIME SERIES STORE  (TSS)
The single direct  access file used for medium/long term storage of  time  series.
TIME SERIES STORE MANAGEMENT  (TSSM)
The HSPF module which  maintains  a User's Time  Series  Store   (TSS)   and performs
some housekeeping chores associated with the  data  sets in it.

TOP DOWN STRUCTURED  PROGRAM   or SUBPROGRAM
A  structured  (sub)program with:
   (1)  code logically segmented and implemented  in  a  hierarchical manner, so that
       new code is only dependent  on that which  already exists.
   (2)  control of execution between code  segments  restricted to transfer between
       adjacent  levels   in   the   hierarchy   (except    for   calls    to  service
       subprograms).

TREE STRUCTURE
A  diagram used  to  display   pictorially  the entire  hierarchy of   subprograms,
starting with the main  program and preceding to the most detailed level of the
program.

TSPUT
The HSPF module which moves  time  series data  from  the  INPAD  to a TSS.
                                       736                            RELEASE 8.0
</pre><hr><pre>
-------
                                                                        Glossary

TSPUTF
This  direct  access file  contains  instructions  which direct  nodule  TSPUT"s
movement of time series data.

TSMS
see TIME SERIES MANAGEMENT SYSTEM

TSGET
THe HSPF module  which moves time series data  from a TSS or  sequential file to
the INPAD.

TSGETF
This  direct  access file  contains  instructions  which direct  module  TSGET's
movement of time series data.

TSS
see TIME SERIES STORE

TSSM
see TIME SERIES STORE MANAGEMENT

TSSMGR
see TIME SERIES STORE MANAGEMENT

UCI
see USER'S CONTROL INPUT

USER'S CONTROL INPUT
The file in  which the user  specifies the  operations to be performed  in  a run,
the parameters and initial   conditions for each one,  and the  time  series to be
passed between them.  HSPF reads this from a card  image sequential file.    It  is
also used to instruct the TSSMGR section of HSPF.

UTILITY MODULE
A module which  performs operations on time  series which are peripheral   to the
simulation of physical  processes,  for example,   data  input,   plot generation,
statistical analysis.

UTILITY OPERATION
Execution of a utility module.

VOLUME
A source (TSS,  sequential file or INPAD)   or target  (TSS)  for the time  series
data.

WARNFL
A  formatted self  documenting  file which  contains the  text   of HSPF warning
messages.

WORLD VIEW
A representation  of the  real world which  includes simplifying assumptions  of
physical processes.
                                       737                             RELEASE 8.0
</pre><hr><pre>
-------
                                                                        Glossary

ZONE
A finite portion of the real world.   It is usually associated with the integral
of a spatially variable quantity.
3.0  HIERARCHY OF TERMS DESCRIBING SOURCE CODE
When discussing a program we often need to  refer to a specific part or  class  of
parts.   In a structured program there is a natural hierarchial arrangement,   so
the various classes  of parts can be  readily identified and named.    Using the
terms defined above/ the arrangement is:

     PROGRAM
       PROGRAM UNIT (MAIN PROGRAM, SUBPROGRAM)
         CODE SEGMENT, STRUCTURE FIGURE
           CODE STATEMENT

The progression above is toward increasing levels of detail.   Note that a "code
segment" and a "structure  figure" are at the same level  because  it is  possible
for either type to contain the other.
4.0  REFERENCES

International Business Machines Inc.   1974.     Structured Programming Textbook &
Workbook —  Independent  Study Program.

American National  Standards  Institute.   1966.   USA Standard  Fortran,  Standard
X3.9-1966. 36 pp.
                                       738                            RELEASE 8.0
</pre><hr><pre>
-------
                                                                     Sample Runs

                           APPENDIX II   SAMPLE RUNS
1.0  SUMMARY OF RELEASE 8.0 TEST RUNS
The distribution tape  for HSPF supplied by EPA  contains a set of   14 test  runs
which exercise all the major portions of  the HSPF code.   Both input and output
is included on the tape.  A matrix of HSPF sections and the various  test runs  is
shown in Figure 1.  Any test run which tests a section of the HSPF code that the
user anticipates using should be executed.  Output must be checked carefully for
any discrepencies.    The test run may  then be used  as a basis  for the user's
input.

The test run input JCL must be modified  for the requirements of  the users  site.
Installation notes are sent along with the HSPF distribution tape which describe
the JCL for various machines.

Listings of HSPF input sequences and other  details about the mechanics of  using
HSPF are found in  the 'Guide to the Application of  the Hydrological Simulation
Program -  Fortran (HPSF)'  which is  available from  the EPA  Center for   Water
Quality Modeling in Athens, Ga.
                                      739                             RELEASE 8.0
</pre><hr><pre>
-------
                                                                      Sample Runs
BLOCK SECTION
NEWTSS
TSSM
GLOBAL
PERLND -
IMPLND  -
RCHRES  -
                           FIGURE  1 - TEST  RUN  MATRIX
1





X
               TEST RUN





2   3   4   5   6   7   8   9   10   11   12   13  14

;NCE
ATEMP
SNOW
PWATER
SEDMNT
PSTEMP
PWTGAS
PQUAL
MSTLAY
PEST
NITR
PHOS
TRACER
ATEMP
SNOW
IWATER
SOLIDS
IWTGAS
IO.UAL
HYDR
CONS
HTRCH
SEDTRN
GQUAL
RQUAL
OXRX
NUTRX
XXXXXXXX XXX
XXXXXXXX XXX
X
X XX XX
X XX XXX
X X
X X
X
X
X X
X
X
X
X
X
X
X
X
X
X
X X
X
X
X
X
X
X
X
                                        740
                                                                       RELEASE 8.0
</pre><hr><pre>
-------
                                                                      Sample Runs
                       FIGURE  1 - TEST  RUN  MATRIX (cont)
BLOCK SECTION
UTILITY -
COPY
PLTGEN
DISPLY
DURANL
GENER
MUTSIN
4

X
                              TEST  RUN

                           5678
X
    X
    X
X   X
                                                      X
                    10   11   12   13   14
                                 X
                                 X
                                 X
                                 X   X

                                 X
PTABLBS
EXT SOURCES
NETWORK
EXT TARGETS
                       X    X    X    X       XX
                                    X   X   X   X
                   XXX
                                 X
                                 X
                                 X   X
                                 X   X
SPEC-ACTIONS
EXTERNAL - FTABLE
           AIR TEMP
           RADIATION
                       X
                       X
                                       741
                                                            RELEASE 8.0
</pre><hr><pre>
-------
                                                                  Program NEWTSS
                          APPENDIX III  PROGRAM NEWTSS
1.0  GENERAL DISCUSSION

NEWTSS is  a stand-alone  program which creates  or copies  a Time  Series  Store
(TSS).   It must  be run before a user  can perform any HSPF  runs which require
data to be stored in, or retrieved from, the TSS.  When opening a TSS the OPNTSS
function is used.   The user specifies the  size of the TSS,  and optionally  the
maximum dataset number and TSS FORTRAN unit number.

NEWTSS can  also be used to  copy the contents of  one TSS to another  using  the
COPY function.    This option is used  if the existing  TSS is too large  or  too
small;  the user creates a new TSS of  the desired size and copies everything to
it.
2.0 USER'S CONTROL INPUT FOR PROGRAM NEWTSS
The conventions  used in this  part of the documentation  are  the  same   as  those
used to document the User's Control Input for the HSPF program itself  (Part F).
                                       742
RELEASE 8.0
</pre><hr><pre>
-------
                                                                  Program NEWTSS
2.1  OPNTSS Block

This block must be present when creating a new TSSFL.
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
*******
Layout
******

OPNTSS
  TSS FILE LENGTH= <len>
  [MAX. DSNO=       < nd>]
  [TSS FILE NO=     <fno>]

*******
Example
*******

OPNTSS
  TSS FILE LENGTH=   240
  MAX. DSNO=         170
  TSS FILE NO=        25
Details
Symbol
<len>
< nd>
<fno>

Fortran
name ( s )
FILESZ
TOTDS
TSSUN

Format
15
15
15

Def
none
170
23

Min
48
85
23

Max
90000
9999
30
Explanation

FILESZ is the length of the TSS in  512 word records.

TOTDS  is the  maximum dataset  number to   be   used in  the TSS.     This may  be
increased by the NEWTSS program to  optimize directory space usage.

TSSUN is the FORTRAN unit number of the  TSS.    Compiler restrictions may require
this to correspond to the FILESZ.   See Section 3.2.
                                       743
RELEASE 8.0
</pre><hr><pre>
-------
                                                                  Program NEWTSS
2.2  COPY Block
This block must  be present when copying from  an existing TSSFL to  a new TSSFL
which has been created but contains no data or labels.
         12345678
12345678901234567890123456789012345678901234567890123456789012345678901234567890
Layout
******
COPY
[FROM FILE N0=f1]
[TO FILE N0= f2]
*******
Example
*******
COPY
FROM FILE N0=15
TO FILE N0= 25
Details
Symbol Fortran
name ( s )
f1 OTSSUN
f2 NTSSUN









Format Def Min Max
12 15 15 22
12 23 23 30
 Explanation

 OTSSUN  is  the  FORTRAN  unit  number  for  the  existing  TSSFL.

 NTSSUN  is  the  FORTRAN  unit  number  for  the  new empty TSSFL.
                                       744
RELEASE 8.0
</pre><hr><pre>
-------
                                                                  Program NEWTSS

3.0  Additional information related to NEWTSS.



3.1  Determination of input required for OPNTSS block.


An estimate of the amount of data to be stored in the TSS is required to provide
the input for the  OPNTSS block of the NEWTSS program.   At  the beginning of an
application this  estimate may  be difficult  to make  due to  uncertainty about
exactly what data is both available and needed.  However, if the TSS file length
is discovered to be too small after it has been set up and filled with data,  it
is a simple  process to open a larger TSS  file and to copy the  contents of the
current TSS  into it.    A low estimate  for the maximum  dataset number  may be
corrected in a similar fashion.

The first  step in  determining the  input for the  OPNTSS block  is to  make an
inventory of available time series data (including time step,  period of record,
source  of data,   and  data format).    The  Time  Series Data  Inventory(TSDI)
worksheet which  follows this section  may be used  to assist  in  detailing this
information.   Detailed  instructions for  the use of  the worksheet  follow it.
Copies of the worksheet  should be made in order to save  the  original for later
uses.   If a large amount of data is available,  then a worksheet should be used
for each data type.

After the  inventory of available  time series data  is complete,   the  TSS File
Length Determination(TSFLD)  worksheet is used to  assist in computing the input
values required for the OPNTSS block of  NEWTSS - TSS file length,  maximum data
set number,  and FORTRAN  unit number for the TSS.   This  worksheet follows the
TSDI worksheet.  Detailed instructions for the use of this worksheet follow it.
                                      745                             RELEASE 8.0
</pre><hr><pre>
-------
                                          TIME SERIES  DATA INVENTORY(TSDI)  WORKSHEET
                APPLICATION
-j
£>
cn
en
w

oo
•
o
                   TYPE

                   (a)
LOCATION

  (b)
TIME

STEP

(c)
PERIOD

 (d)
SOURCE

 (e)
FORMAT

 (f)
COMMENTS

  (g)
                                                                                                                       H
                                                                                                                       O
                                                                                                                       «
                                                                                                                       H

                                                                                                                       §
                                                                                        CO
                                                                                        CO
</pre><hr><pre>
-------
                                                                  Program NKWTSS

                   TIME SERIES DATA INVENTORY(TSDI) WORKSHEET

                                  INSTRUCTIONS
This worksheet is used to assist the user in completing an inventory of the time
series data available for a particular area.   Each row on the TSDI worksheet is
used for an entry describing an available time series.  All known time series of
types required by HSPF for the area being studied should be described.

The columns contain the following:

(a)  TYPE - A classification of the data according to HSPF conventions.  Typical
     TYPES are  PREC(precipitation),  PETINP(potential  evapotranspiration),  or
     GATNP(air temperature).

(b)  LOCATION - The place where the data was collected.

(c)  TIME STEP -  The interval at which  the data was collected.    Typical time
     steps are DAILY, HOURLY, or FIVE MINUTE.

(d)  PERIOD  - The  time during  which the  data was  collected.   For  example,
     •6/1948-10/1978' means data starts in June 1948 and ends in October 1978.

(e)  SOURCE - The organization which stores and distributes the data.

(f)  FORMAT - The form the data is available in.  Typical formats are CD486(NOAA
     daily observations) or CD488(NOAA hourly observations).

(g)  COMMENTS - Any other useful information which is known about the data.
                                      747                            RELEASE 8.0
</pre><hr><pre>
-------
                               TSS FILE LENGTH DETERMINATION  (TSFLD)  WORKSHEET
s
f
w
>
tn
W

oo

o
I$ll
(a)








(b)








(c)








COMPRESS
(d)








COMPRESS
FRACTION
(e)








TQTAL/
DATASET
(f)
|b*(c-d)*
e+1] **








SUM TOTAL (j)
NUMBER
DATASETS
(9)








(k)
TOTAL
SPACE
(h)
lf*g J









            (m)  DIRECTORY SPACE [j*0.0117+1] =1       |  (n) MAX DATA SET NUMBER [m*85]  =1





            (p)  ESTIMATED TSS FILE LENGTHfk+m]= I
(q)  TSS FILE LENGTH =
(r)  TSSUN for NEWTSS =
(s)  TSSFL for HSPF =
                                                                                                              H

                                                                                                              0
                                                                                                   §
               **  round up to next integer
</pre><hr><pre>
-------
                                                                  Program NEWTSS

                 TSS FILE LENGTH DETERMINATON(TSFLD) WORKSHEET

                                  INSTRUCTIONS
This worksheet  is used to  determine the input  values required for  the OPNTSS
block of NEWTSS.   Each  row on the worksheet is used for  an entry describing a
set of time series which share similar characteristics.   A letter identifier is
associated with  each column or  block entry.    The identifiers are  defined as
follows:

(a)  TIME STEP - The interval of the time series in minutes.

(b)  TIME STEP  FACTOR - The  number of HSPF TSS  records required to   store one
     year of data.   The table below gives  time step factors for the time  steps
     acceptable to HSPF.
     Space Requirements of Uncompressed Data, in 512-word Records
     TIME STEP  TIME STEP FACTOR  TIME STEP  TIME STEP FACTOR
      (mins)       Records/yr       (mins)       Records/yr
1
2
3
4
5
6
10
12
15

1040
520
347
260
208
174
104
86.8
69.4

20
30
60
120
180
240
360
480
720
1440
52.0
34.7
17.4
8.7
5.8
4.4
3.0
2.2
1.5
0.75
 (c)  NUMBER OF  CALENDAR YEARS  - Count  partial  years   as  full   years for  this
     entry.

 (d)  START AND  END DATA  COMPRESS  -   If data   is not   present at  the beginning
     and/or end of the  period of the  data  for  part  of  a calendar  year and this
     data will not be added later,  then use this  column to  indicate the fraction
     of a calendar year which is not present.   For example,  if the  period of the
     data is 6/1948-10/1978 then the fraction is  0.583  [(5+2)/12].

 (e)  COMPRESS FRACTION  - If the data  contains many zeros   (like precipitation)
     then data compression may be used to reduce  the space  required to store the
     data.   The approximate fraction  of non zero values in the  data times 1.5
     should  be entered  in this  column (never  more   than 1.0   -  this  implies

                                       749                             RELEASE 8.0
</pre><hr><pre>
-------
                                                                  Program NEWTSS

     compression should not be used).  Use a value of 1.0 for uncompressed data.

(f)   TOTAL/DATASET  -  The  space  required  to   store  a  dataset  with  these
     characteristics.  This is computed as follows:

                    f = b * (c-d) * e + 1

     where the  letters are  the column  identifiers described  above.   If  the
     result is not an integer, be sure to round up to the next larger integer.

(g)   NUMBER  OF   DATASETS  -  A   count  of   the  dataset s  which   share  the
     characteristics given on the row.

(h)   TOTAL SPACE - The product of columns f  and g.   This is the space required
     to store all the datasets identified on this row.

(j)   Enter in this box the sum of the values in column g on each row.   This sum
     is the total number of datasets which have been identified.

(k)   Enter here the sum of the values in column h on each row.   This sum is the
     total space required by the datasets which have been identified.

(m)   The entry for this box is computed as follows:

                    m = (j * 0.0117) + 1

     where j is the entry in box j.  If the result is not an integer, be sure  to
     round up  to the  next integer.   This  result is  the amount  of directory
     space(in  TSS records)   required to  store  the datasets  which have  been
     identified plus a safety factor of 1 record (85 data sets)>

(n)   Enter here the  product of the entry in  box m and 85.   The  result is the
     maximum dataset  number which  will be  used in  the TSS.    This entry   is
     required  as parameter  TOTDS in  the OPNTSS  block of  the NEWTSS  program
     unless the value is the default of 170.

(p)   The entry for  this box is the sum of  the entries in boxs k  and m.   This
     result is  the estimated TSS  file length in  TSS records  for  the datasets
     which have been identified.

(q)   The entry in box p may require adjustment for two reasons.  First, a safety
     factor  to allow  for  unforeseen requirements  may  be  needed.   This   is
     generaIlly an increase in length of  at least  10%.   Second,  some computer
     systems(e.g.  IBM)  require that  the length of the TSS be  included in  the
     HSPF source code.   A FORTRAN unit number  is assigned for each  of a series
     of  TSS file  lengths  in the  NEWTSS  and HSPF  programs.    One of   these
     predefined lengths must be used unless the  source code for the  programs  is
     changed.  These predefined values are as  follows:
                                       750                            RELEASE 8.0
</pre><hr><pre>
-------
                                                                  Program NEWTSS
     Length          TSSFL or OTSSUN    TSSUN or NTSSUN
     (records)        FORTRAN unit no.   Fortran unit no.
48
96
240
960
4800
22500
45000
90000
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     If required, the first predefined TSS length greater than the estimated TSS
     file length should  be chosen for this  entry.   This entry is  required as
     input for the OPNTSS block of the NEWTSS program.

(r)  Enter here  the TSS unit  number required by  the NEWTSS program.    If the
     computer system requires  a predefined TSS file length then  enter the unit
     number  from  the  table  above which  corresponds  to  the  given  length,
     otherwise enter '23'.  This entry is required as input for the OPNTSS block
     of the NEWTSS program if it is not '23'.

(s)  Enter here  the TSS  unit number  required by  the HSPF  program.   If  the
     computer system requires  a predefined TSS file length then  enter the unit
     number  from  the  table  above which  corresponds  to  the  given  length,
     otherwise enter '15'.  This entry is required as input for the HSPF program
     whenever this TSS is used if the value is not '15'.
3.2  Determination of input required for the COPY block.


Input for  the COPY  block requires  the FORTRAN  unit numbers  of the  existing
TSSFL(OTSSUN) and the newly created empty TSSFL(NTSSUN).   These default to  '15'
and '23' respectively.    If the computer system requires a  unique FORTRAN  unit
number - TSS  file length combination then  these values may be  determined  from
the table in section q of the TSFLD worksheet instructions.
                                      751                            RELEASE 8.0
</pre><hr><pre>
-------
                                                         Programmer's Supplement
                                  APPENDIX IV
                      GUIDE TO THE PROGRAMMER'S SUPPLEMENT
1.0 ABOUT THE PROGRAMMER'S SUPPLEMENT
The Programmer's Supplement is a companion to  the user's manual for HSPF.   The
user's manual describes the foundations of  HSPF,  the algorithms used,  and the
input needed  to operate  it;  the  Programmer's Supplement  contains additional
information  which will  be  useful  to someone  who  wishes  to understand  its
structure in detail.  The Programmer's Supplement consists of:

1.  Lists showing all the subprograms in HSPF.

2.  The FORTRAN code of  HSPF.   HSPF was written in pseudo  code and translated
    into FORTRAN.

3.  Documentation of  the principal  data structures.   This part  describes the
    layout of  the variables  and arrays and  the data  which they  represent  or
    store.  HSPF makes use  of a single large common block to  store data  in the
    machine's  memory.   The  various  modules  in  HSPF  each  have  their  own
    configuration for data in common.  When a module is inactive, its version  of
    the common block is stored on a disc file,  ready to be copied back  when the
    module is re-activated.
4.  Documentation of the file structures.
    the various disc files used by HSPF.
This part shows the layout of data on
The Programmer's  Supplement is not  a printed  document,  but  consists   of  text
stored in  datasets recorded on  a magnetic tape.   The intention  is   to  include
these datasets on the tape supplied to any  user who requests a copy  of  the  HSPF
software.   Then he  can  easily obtain  a reference  copy   of  the Programmer's
Supplement by dumping these datasets to a hard-copy device such as a  terminal or
line printer. To obtain a highly legible copy, he  should  use a  device capable of
printing both upper and lower case letters,   because the text  has been  recorded
in upper/lower case.
                                       752
                           RELEASE 8.0
</pre><hr><pre>
-------
                                                         Programmer's Supplement
2.0  LIST OF SUBPROGRAMS
Two  datasets  in  the  Programmer's  Supplement  contain  a  list  of  all   the
subprograms in HSPF.  The first dataset has them sorted by subprogram number; it
is useful if you need to scan through  the subprograms in a logical order.    The
numbering  system in  HSPF  is  based on  the  hierarchical  arrangement of   the
subprograms. The system is discussed in Part C of this document, and illustrated
in the Visual Table of Contents (Part D).  The second dataset has them  listed in
alphabetical order (by subprogram name);  it is useful if you need to locate, or
find the number for, a subprogram when you know its name.

These datasets have  been included in the Programmer's  Supplement because there
are over 500 subprograms  in HSPF;  locating one of them without  the help of an
index could be quite a problem.
3.0  FORTRAN CODE
HSPF was written in  pseudo code and then translated into   Fortran.    Anyone  who
wishes to  read the Fortran code  may do so  by dumping  the Fortran   source code
datasets to a hard-copy  device such as a line printer,    or by  reading listings
produced by his Fortran compiler.

Following the tenets  of Structured Program Design  (Part C)    the  subprograms in
HSPF are  arranged in  hierarchical order  and are  numbered accordingly.     The
arrangement is depicted  in the Visual Table  of Contents  (Part  D).    The  pseudo
code follows the same organization; subprograms are arranged in  numerical  order,
which means that they follow a logical, rather than an alphabetical,  pattern. We
start at the  highest level of the  system (MAIN program)   and  proceed down  the
various branches of the tree to the more detailed levels,  covering the system in
a top-down, left-to-right sequence.
                                       753
                                                                      RELEASE 8.0
</pre><hr><pre>
-------
                                                         Programmer * s Supplement

4.0  STRUCTURE OF DATA IN CORE
HSPF makes use of a single, large COMMON block (called SCRTCH)  to store data in
the machine's memory. The various modules in HSPF each have their own version of
this block,  so that the arrangement of data  in SCRTCH can be tailored to their
individual needs. For example, the application modules PERLND, IMPLND and RCHRES
all use the  first part of SCRTCH  to store their respective  parameters,  state
variables and computed fluxes, while the latter part is used to hold time series
(input and computed).  On the other hand, the Run Interpreter does not deal with
time series, so uses the latter part of SCRTCH to store the various tables which
it uses to process the User's Control Input.

There are,  thus,  many different versions of COMMON block SCRTCH in HSPF,  each
with its own arrangement of variables and arrays.

HSPF has  been designed so  that,  when a module  such as PERLND  is temporarily
interrupted to permit some other module to perform its work,  the data in SCRTCH
is copied to disc  so that it can be copied back  when PERLND resumes execution.
Meanwhile, the other module (say RCHRES) user SCRTCH to store its data, and also
copies the contents to disc when it is interrupted and PERLND resumes operation.

In  the HSPF  data  structures  we have  made  liberal  use of  the  EQUIVALENCE
statement to overlay data.  For example, a pair of state variables in the PERLND
module, INFFAC and PETADJ,  are equivalenced to an array PWST3(2).   In the HSPF
code,   the former  names are  used when  the  individual variables  need to  be
referenced and  the latter "group  name" is used  when both variables  are being
dealt with together.

The data structures  used in HSPF are documented in  the Programmer's Supplement
in a set of datasets with names commencing with DATSTR. These datasets describe:

  1.  The arrangement of variables and arrays, including group names
      (implemented in Fortran using the EQUIVALENCE statement).

  2.  The type  (eg. REAL, INT, DPR) of each variable.

  3.  The function of each variable (a short description of what  it  represents).

  4.  The  "kind"  of each variable which represents a time  series  (point-
      valued or mean-valued)

  5.  The  internal and  external  units, in  the English  and  Metric  systems,
      where applicable.
                                       754                            RELEASE 8.0
</pre><hr><pre>
-------
                                                         Programmer's Supplement

5.0 STRUCTURE OF DATA FILES


The HSPF system makes use of several different classes of disc-based files:

  1.  The Time Series Store (TSS), which is documented in Section 2,  Part E and
      in Appendix V.

  2.  Files containing the User's  Control Input: USRFL is a sequential cardimage
      file on which the  user submits his input.  UCIFL is  a direct access file
      onto which HSPF transfers the User's  Control Input.  Each record contains
      data from the corresponding record  in USRFL,  plus "chaining" information
      which points to the next non-comment line  in the input.  This is the file
      on  which HSPF  operates when  it sorts  and analyses  the User's  Control
      Input.

  3.  A "plot-file".  The PLTGEN module uses this  file to store its output - up
      to 10 time series  which are to be simultaneously displayed  by a plotter.
      This file is documented in Section 4.2(12), Part E.

  4.  The information  file (INFOFL),  error  message file (ERRFL)   and warning
      message file (WARNFL).   These files are self-documenting.   One need only
      list the file and read it to understand its contents.  Users will probably
      not need  to read the  INFOFL.  It supplies  information to the  HSPF code
      which enables it to process  the User's Control Input; the same information
      is contained in Part F of this manual, in more readable form.

  5.  Instruction files.   The Operations Supervisor Instruction  File (OSUPFL),
      TSGET Instruction  File (TSGETF),   TSPUT Instruction  File (TSPUTF)   and
      Special Action Instruction File (SPAFL) contain instructions, generated by
      the  Run Interpreter,   which  govern the  execution  of  HSPF.  They  are
      documented in the Programmer's Supplement.

  6.  Operation Status  Vector File (OSVFL).  This  file stores the  contents of
      COMMON block SCRTCH  so that a module  can resume execution with  the same
      values for  parameters and state  variables as  it had when  execution was
      interrupted (see Section 4.0 above).  It is documented in the Programmer's
      Supplement.

  7.  Working file (WORKFL). The Run Interpreter uses this as a scratch file, to
      store potentially  large tables of  information generated  while analyzing
      and sorting the User's Control Input. It is documented in the Programmer's
      Supplement.
                                      755                             RELEASE 8.0
</pre><hr><pre>
-------
                                                               Time Series Store

APPENDIX V  TIME SERIES CONCEPTS AND THE TSS
1.0  Time Series Concepts

A time series  is a sequence of values  ordered in time.   The  interval  of  time
between successive values is  called the time step or the  time increment or the
time interval of the  time series.   The time step for a time  series  is  often  a
constant value but may also be  variable.   The implementation in HSPF restricts
the variability in a manner discussed below.   The values in the time  series may
represent the behavior  of a process at a  point in time or an  average over the
time step of the time series.   A time series whose values represent behavior at
points  in  time  is  called  a point-valued  time  series  and  is  represented
symbolically by "*".  Linear interpolation is used to define intermediate values
in a point-valued time series.  A time  series whose values represent  average or
aggregated behavior  over the time step  are called mean-valued time   series and
are represented  symbolically as "-".   The  meaning of "average" and   "mean" is
taken in  a wide sense  and includes any value  assumed to be  representative of
behavior of the time series over the time step,  rather than at a specific point
in time.

The following figure shows the difference between  the point and mean  value  time
series in graphic form. It is important to note that only one value is needed to
represent the  behavior of  a mean-valued  time series  for one  time  step.   We
visualize the value as being assigned to a time step in this case.  On the other
hand,  two values  are needed to represent  the behavior of a  point-valued  time
series over the same interval.  We visualize the values as being assigned to the
time points  in this case.  Each  time point at which  a value of the   series is
given in a  point-valued time series is  viewed as "belonging" to  the time  step
which it ends. Time points belonging to all time steps contained within a larger
time step are viewed as belonging to the larger time step also. For example, all
time points in a point-valued time series  except the first time point belong to
the time interval spanning the time series  duration.  The first, time  point  of  a
point-valued time  series is viewed  as belonging  to the time  step  immediately
preceding the first  time step of the  time series.  This precise  definition of
belongingness  for  a time  point  is  needed  to  avoid confusion  in defining
operations on the time series.

A number  of operations  on time series,   discussed in Section  4.6  of  Part F,
preserve the integral of  the time series between any two  time points which end
time steps in the time series.  The integral may be visualized as the  area under
the broken line  graph formed by connecting adjacent values   in the point-valued
time series  or the area under  the histogram  representing the  mean-valued time
series.  The trapezoidal rule applied to the point-valued time  series  yields the
exact value of the integral whereas the  simple rectangular rule yields the exact
value for the mean-valued time series.
                                       756                            RELEASE 8.0
</pre><hr><pre>
-------
                            Point-valued time series
                               2345

                               Time point numbers
                                                             Time Series Store
                             Mean-valued time series
Time point # —> 0123456
Time step #  —>     123456
      Figure 1. Comparison between point- and mean-valued time series
                                    757
RELEASE 8.0
</pre><hr><pre>
-------
                                                               Time Series Store

Time is given as year/month/day/hour/minute to  completely specify either a time
interval or a time  point.   The date/time given by the  internal clock uses  the
"contained within" principle  for all levels of the date/time.    That is,  each
smaller interval  is contained within  the next  larger interval.   This  is  the
conventional  usage  for   year/month/day  but  is  not   conventional  for   the
hour/minute.   For example,  the date string 1977/01/02 labels the second day of
the first month of the 1977th year.    On the other hand,  in conventional usage
the time string  10:15 refers to the end  of the 15th minute  after (not within)
the 10th hour of the day.   This change in meaning is eliminated in the internal
date/time clock for HSPF.   In the internal system, time string 10/15 labels  the
15th minute of (ie.   within)  the 10th hour of the day.    A comparable time to
10:15 in the conventional sense would be 11/15;  that is, the 15th minute of  the
11th hour of the day.

In summary, the internal clock convention labels time intervals at all levels of
date/time whereas  conventional usage labels  time intervals  for year/month/day
but  labels time  points  for  hour/minute.   In  HSPF,   time  points are  then
referenced uniquely by the minute which ends at the time point in question.

The time steps in a time series are labelled with the minute which ends the time
step.   Thus,  the values in a mean-valued  time series are treated logically as
having occurred at the end time point of the time step.   Note that for purposes
of the internal clock  and for description of internal concepts  each time point
has one  and only one label.   This means that we  refer to the instant  in time
forming the boundary between two days using  the label associated with the first
day even though our interest is centered on the second day.   This convention is
called the ending time convention.

A  starting  time  convention  is used  externally  for  some  purposes  because
traditional usage  requires both  conventions depending  on the  context of   the
statement about time.    Users are more comfortable using  the traditional clock
and both  a starting  time and an  ending time  convention.   The  starting time
convention is used  when the start of some  time span is in mind  and the  ending
time convention is used when the end of some time span is in mind.

The time span associated with a time series must be defined.   Logically,  a time
series is of  infinite length.   Realistically,  every time series  has a  finite
length and may  be broken into short  segments for convenience in  recording  the
values on some medium such as the printed page, a magnetic tape,  a data  card or
a magnetic disk.   These  shorter segments are made neccesary by various  software
and hardware constraints.  Therefore, a time span is associated with  each  medium
used to record or store the  time series.
                                       758                            RELEASE 8.0
</pre><hr><pre>
-------
                                                               Time Series  Store

A further  practical complication is created  by the variety  of representations
used for time series.    The user's most likely mental image is  a line drawn  in
some coordinate system  on the printed page.   This method  of representing time
series is most convenient for the user but  a series of discrete numbers  is most
convenient for the digital computer.   The time series of indefinite  length must
be subdivided into shorter  time spans to fit the card images  or the records  on
the tape  or disk.   In some  cases data for  the time series may  be incomplete
(some values not present) or, in some cases/ many of the values are zero  so that
not all values for  the time series are stored on the medium.    In such  cases a
date/time indicator is given on the record.   As an example, think of the format
used  for data  cards  punched by  the National  Weather  Records Center.    The
date/time information on each record of the medium permits the reconstruction  of
the complete time  series (except for the  missing values)  even though   not all
values are recorded on the medium.   However, conventions must be established  so
that missing records on a given recording medium are properly interpretted.  For
example,   are the  missing  data merely  zeros  or did  they  occur  because  of
instrument malfunction?   if the data are missing, a "filler" should  be inserted
when the data are placed on the TSS so that it can be changed at a later  time  or
so that such missing periods can be properly  handled by other parts  of the HSPF
system. The filler value is called an "undefined" value in the TSS system.

The time  step for  a time series  can vary  in multiples of  a basic time step
established for the time series.   The basic  time step for the time  series must
be truly a constant  value.   For example,  a time series  at a monthly interval
does not have a constant time step.   Therefore, the basic time step  assigned  to
such  a time  series  is  daily because  a  day is  of  constant  length  and  is
commensurable with  all months.    The values  for each  month are  stored  in   a
compressed form  so that each day's  value need not  be present on the  TSS.   As
discussed later the daily time step is the longest basic time step available for
storing information on the TSS.
                                      759                             RELEASE 8.0
</pre><hr><pre>
-------
                                                               Time Series Store

2.0  Introduction to the TSS

The Time Series Store (TSS)  is a large random access file which represents  time
series in  a convenient  manner for  storage and  retrieval,  using  subroutines
provided by  the HSPF system.    The following  objectives were followed  in the
design of the TSS and its associated subroutines:

     1. Enable uniform storage and retrieval of time series
     2. Provide for suppression of redundant information
     3. Provide flexibility in access methods
     4. Allow grouping time series into related sets for easier reference
     5. Provide for useful transformations of time series so that time
        series with disparate characteristics can be used by an application
        module in HSPF


2.1  TSS Structure

Logically,  the TSS  should be viewed as  a large two dimensional  array of  REAL
values (in the sense of FORTRAN)  in which each row is a record.   These rows or
TSS records are numbered consecutively with the first record given the  number 1.
For our purposes a record is a collection  of related items or data treated  as a
unit.   A set of related records may form  a file or a dataset.   Records can be
related in various ways so that a  record may be associated with several groups.
For example, each row of the array taken to represent the TSS is a record in the
file defined for the TSS.   However, the TSS is itself subdivided into  groups of
TSS  records related  by  criteria other  than  for the  TSS  as whole.    These
subgroups will be referred to as datasets.  The three types of datasets are: TSS
Descriptor, TSS Directory and Time Series dataset.
                                       760                            RELEASE 8.0
</pre><hr><pre>
-------
                                                               Time Series  Store

2.1.1  TSS Descriptor

The TSS  Descriptor contains  information to define  the characteristics  of  the
TSS.   Certain of these characteristics will vary from one TSS to another and it
is therefore necessary that the TSS be self descriptive.   The TSS Descriptor is
contained within one TSS record and is the first record of the TSS.   The length
of the  TSS descriptor gives  the minimum length for  any TSS record.    Table 1
gives a description of the contents of the TSS Descriptor.


2.1.2  TSS Directory

The TSS directory describes itself and the time series datasets  in the  TSS.   The
directory contains a record  for itself and for each time  series dataset in  the
TSS.  Each  TSS directory record  contains descriptive information  necessary to
manipulate datasets in the TSS. Table 2 gives a description  of the contents of a
record in the TSS directory.

The number of TSS  records to allocate to the directory is set   by the  user when
the file  for the TSS  is first created.    This first  estimate may  need   to be
changed as the TSS is used.  Thus, for the purposes of dataset manipulation,  the
TSS directory is not distinguished from a time series dataset.


2.1.3  Time Series Dataset

The  time series  dataset  is the  heart of  the  TSS and  the   purpose for  its
creation.   The  form of  the time series  and the  various  concepts  needed  for
describing the time series  and the data structures must be  defined  first.    We
can then describe the structure of a time series dataset in  a concise manner.

Each dataset has  a label describing the  contents of the dataset  and  providing
information needed for accessing the time series stored therein.  Table 3  gives
a description of the label structure.   The length  of the label is given in  the
TSS Descriptor.
                                      761                             RELEASE 8.0
</pre><hr><pre>
-------
                                                               Time Series Store

2.2  Addressing in the Dataset

The REAL  words in the  dataset are logically treated  as if they  were numbered
sequentially from unity starting with the first  word of the first TSS record of
the dataset.   The label  of the dataset always begins at the  first word of the
dataset.   The keys area of the label contains  the address of the REAL word for
the beginning of each calendar year stored  in the dataset.   The calendar years
need not be stored in chronological order but the data within each calendar year
is stored  in chronological sequence.   Access  to time series  information then
takes place in two steps: the direct step to the TSS record containing the first
word of the calendar  year in question and the search to  find the time interval
within the year.   This approach has been used to simplify the keying scheme and
also to  take advantage  of the characteristics  of use  of the  TSS.   Normally
simulation and modeling with  time series involves starting at a  given time and
then proceeding  sequentially to an ending  time.   Thus direct  addressing with
fine resolution is not needed.   The search takes place within one calendar year
and then only at the start of the run.   Creation of the data in the dataset may
require more  frequent searching  but should  not negate  the advantages  of the
current keying system.


2.3   Time Series Structure

The time series data in a dataset  are stored in variable length blocks,  called
calendar year blocks (CYB),  for each calendar year.   The data contained within
each CYB is  stored in variable length  blocks called time series  blocks  (TSB).
Each TSB consists of a  block control word (BCW)  or a BCW and  two or more time
frames.   A time frame contains the values for all member/components of the time
series for a time point.  A time frame therefore represents a section across all
components of the time series.  The block control word has several functions and
therefore several meanings.  Its functions are as follows:
                                       762                            RELEASE 8.0
</pre><hr><pre>
-------
                                                               Time Series  Store

     1. Describe the TSB and the number of time frames in the TSB.
     2. Describe the address of the next chronological year of data.
     3. Indicate the end of chronological data.

The  meanings for  the  BCW are  all derived  from  the BCW  alone  and  are  not
dependent on the  position of the BCW.   Each  CYB in the dataset  starts with a
REAL word giving the year of the block but this word is not a block control word
because its interpretation is dependent on its position in the dataset.

The first  function of  the BCW treats  the word  as logically   representing two
integers.   The first integer, the Block Type Indicator (BTI), defines the  block
type:  uncompressed,  zero  compressed,  and undefined compressed.    The second
integer, the number of values (NOV), gives the number of time frames  in  the TSB.
The  last two  functions of  the BCW  treat the  word as  representing a single
integer.    Function 2  is signalled  by a  negative value  in the  BCW  and  the
absolute value gives the address of the next  years data.   A zero value for the
block control word implies the third function given above.

A TSB  always represents a span  of time and  must contain values to  define the
variation of both point  and mean value time series over  that time span.    This
requires an  additional time  point for  point value  time series  to store  the
initial value for the time span of the TSB.   No such point is required  for mean
value time series.   However,   space for this initial point is  allocated  for a
TSB,  unless the TSB consists of a BCW  only,  because point and mean value time
series can  be mixed  in a  dataset.   Thus,  the  first frame   in a  TSB always
contains the  initial values  for the point  value time  series  in  the  dataset.
Values in the initial frame are undefined for mean value time series. The  point
values stored  in the  initial frame of  a TSB  are then the  same as the  point
values  in  the  final  frame  of the  predeeding  TSB.    The   requirement  for
representing a span of time is motivated by  the desire to have  a TSB meaningful
in all cases without requiring information stored in another TSB.


2.4  Addressing Conventions

The structure  of the  time series  in the  dataset requires  several addresses.
These are:

     1. The address of the calendar year block.

     2. The address of a TSB (same as the address of its BCW).

     3. The address of a time frame.

     4. The address of a particular component in the time frame.

The first three addresses  will be given as the virtual origin   of the entity in
question.   Each entity (CYB,TSB,frame) consists of one or more  elements (words)
and these words are logically numbered like the elements of a vector
                                      763                             RELEASE 8.0
</pre><hr><pre>
-------
                                                               Time Series  Store

starting (as  in Fortran)   at unity.   The  virtual origin of  a vector  is  the
address of its  zeroth element whether that  element exists or not.    A virtual
origin  as  an address  then  leads  to the  convention  that  the offset   to  a
particular element  must always be  added to the  virtual origin to   compute  the
address of the element.  The last address in the list above is then given as  the
offset of the component from the address (virtual origin) of the time frame.

The method of storing the data into calendar year blocks, then into sequentially
organized TSB's,  and then into sequentially organized time frames requires that
a calender  year be fully  represented unless it is  the last calander year  (in
physical sequence) entered into the dataset.   This last year entered, however,
must be completed  by the system or by  the user before any  other calendar year
can be,entered  into the dataset.   The  system will complete the  calendar year
with user selected filler values.
2.5  Nature of Compression

There are two forms  for the data in a TSB:   uncompressed and  compressed.    The
uncompressed form maintains  space for all values   in the time  span   of  the time
series.   This  form takes  the most  space and  is necessary   for making  major
changes to  the data already  on the TSS.   Changes can always be  made because
there  is  space for  all  values.    The  compressed form   suppresses   repeated
zero/undefined values  to conserve  space.   The TSB's  for  the  compressed form
consist of the BCW only.

A dataset can only contain the following combinations of TSB's:

     1. Uncompressed TSB's only
     2. Uncompressed TSB's and compressed TSB's

Thus the nature of the compression for  the dataset is  determined at  the dataset
level.  Changes in the level of compression can only be done by copying  the data
to another dataset.  Thus, once set, the nature of  the  compression, specified in
the dataset label, cannot be changed by a simple update.


2.6  Access Methods

There are three different access methods for writing data  into a  dataset:


     1.  ADD:  This option preserves pre-existing data preceding the  span of time
        of the current run but destroys  all pre-existing  data subsequent to the
        starting point of the current run  including data  after the  span of time
        of the run.   All  pre-existing data in the dataset  is  lost  if  the time
        span of the run precedes the start  of  data  in  the  dataset.   The  calendar
        year blocks  in the  dataset must   be in physically sequential  order for
        this option.
                                       764                            RELEASE 8.0
</pre><hr><pre>
-------
                                                               Time Series Store

    2.  REPLACE:  This option preserves pre-existing  data both before and after
      •  the  time  span  of  the  current run.   Note  that  the  data  must  be
        uncompressed for this access option.   The number, size, and composition
        of the calendar year blocks,  TSB's and  frames will not be altered by a
        REPLACE option. Only data items stored in the dataset can be changed.

    3.  INSERT: This option writes data for calendar years which are not present
        in the dataset.   No pre-existing data  is changed or overwritten.   The
        pre-existing data need not be in chronological order.

The least complex  option is ADD and  the most complex option  is REPLACE.   Run
times and cost will reflect these differences in complexity.
                                    TABLE 1

                            TSS Descriptor Contents
<-IDENTIFIER STRUCT->TYPE <	DESCRIPTION-
1 TSSDES(12)         REG  TSS descriptor(uses  12 REAL words of space)

 2 FILESZ            INT  Number of TSS records in the TSS
 2 TDFREC            INT  Record number of the first TSS record in the TSS
                          directory
 2 TDLREC            INT  Record number of the last TSS record in the TSS
                          directory
 2 FREESP            INT  Number of free TSS records in the TSS
 2 TDDS              INT  Dataset number of the TSS directory-default:TDDS=1
 2 TOTDS             INT  Total number of datasets allowed for this TSS
 2 FDS               INT  Dataset number of the first dataset in the TSS
                          in sequence of increasing TSS record numbers.
                          Default will be FDS=1(The TSS directory is first
                          in the TSS by default.)
 2 RECLT             INT  TSS record length in REAL words
 2 FIXLBL            INT  Length of a dataset  label in REAL words
 2 TDSIZE            INT  Record length in real words for the TSS directory
                          dataset
 2 TSSTYP            INT  Type code for TSS for compatibility checking
 2 IDUM              INT  Space holder
                                      765                             RELEASE 8.0
</pre><hr><pre>
-------
                                                               Time Series Store
                                    TABLE  2

                             TSS Directory Contents
<-IDENTIFIER STRUCT->TYPE
                -DESCRIPTION-
1 TDREC(6)           REG  TSS directory record(length in REAL words).   Space
                          for one record for each potential dataset(including
                          the TSS directory) is made available in the TSS
                          directory.  However, only the records  for the
                          current datasets in the TSS contain meaningful
                          information.  The records are indexed  by dataset
                          number.
 2 DSNO              INT  Dataset number
 2 SECURE            INT  Write protect flag. Must be OFF to write to the
                          dataset.
 2 FREC              INT  Number of the first TSS record for the dataset.
 2 LREC              INT  Number of the last TSS record for the  dataset.
 2 FPNT              INT  Dataset number of the dataset forward  of this
                          dataset in the direction of increasing TSS record
                          numbers.
 2 BPNT              INT  Dataset number of the dataset backward of this
                          dataset in the direction of decreasing TSS record
                          number.
                                    TABLE 3

                           Time Series Dataset Label
<-IDENTIFIER STRUCT->TYPE
                -DESCRIPTION-
 1 DSLABL(256)

 2 DSLEV

  3 DSDSNO
  3 LBLSZ
  3 DSFREC
  3 DSLREC
  3 VOFRWD
  3 VOYEAR
  3 LASTYR
REG  Dataset label(length in REAL words)

     All values at the dataset level

INT  Dataset number
INT  Label size in REAL words
INT  Record number of the first TSS record in the dataset
INT  Record number of the last TSS record in the dataset
INT  Virtual origin of first free word  in the dataset
INT  Virtual origin of year used for updating label
INT  Last chronological year stored in  the dataset
                                       766
                                                 RELEASE 8.0
</pre><hr><pre>
-------
                                                               Time Series Store
  3  DSSEC
  3  BASEYR
  3  VOKEY
    KEYS(100)
    NAME(3)
    UNITS
    DSCMPR
     (COMPR)
  3  YEAROR

  3  OBSTIM
  3  STA(3)
  3  LOCATN(10)
  3  GAPCOD
  3 DSDELT
     (DELTAT)
  3 NMEMS

  3 MEMNAM(3,20)

  3 MSUB(20)

  3 MKIND(20)
  3 PMT(20)
     with value of zero if no data is present
INT  Write protect flag
INT  Base year for the keying system
INT  Virtual origin for next set of VOKEY and KEYS
     Multiple keys feature not yet implemented
INT  Virtual origin of each calendar year
INT  Name for the dataset( 6 characters permitted).
INT  Code giving the units of measurement of the data
INT  Code for dataset compression:
      1-uncompressed
      2-zero and/or undefined compressed
INT  Flag to indicate that the data is stored in
     chronological year order.
INT  Observation time
INT  Station name
INT  Description of the location of the data source
INT  Code for handling of any leading or
     trailing gaps in a calendar year for
     an uncompressed dataset. If ABS(GAPCOD)=
     1 then both leading and trailing gaps filled
       with uncompressed TSB's
     2 then trailing gaps filled using compressed
       TSB'sf leading gaps filled using uncompressed
       TSB's
     3 then leading gaps filled using compressed
       TSB's} trailing gaps filled using
       uncompressed TSB's
     4 then both leading and trailing gaps filled
       using compressed TSB's

       Default is GAPCOD= 1
     If GAPCOD > 0 then the time frames in the  gaps
     are set to zero. If GAPCOD < 0 then the time
     frames in the gaps are set to undefined. All
     leading and trailing gaps are compressed if
     the dataset is compressed.
INT  Value of the time step in minutes(limit  1440)

INT  Number of members in the dataset

INT  Member name(limit of 6 characters)

INT  Number of components

INT  Kind of time series(point=1 or mean=2 value)
INT  Format code for each member
*USGPO; 1984-759-102-972
                  767
RELEASE 8.0
</pre><hr><pre>
-------</pre></td></tr></table></body></html>