sc/EPA
                                 United States
                                 Environmental Protection
                                 Agency
                                 Environmental Research
                                 Laboratory
                                 Athens GA 30613
                                 Research and Development
                                 EPA-600/S3-82-059 August 1982
Project  Summary
                                 Maintenance and  Testing  of
                                 Hydrological  Simulation
                                 Program—FORTRAN  (HSPF)
                                 R. C. Johanson and D. Kliewer
                                  The Hydrological Simulation Program
                                 FORTRAN (HSPF) is a mathematical
                                 model that simulates hydrology and
                                 water quality in natural and man-made
                                 water systems. This report describes
                                 the work involved in maintaining and
                                 testing HSPF over a period of one year
                                 following  its initial development. An
                                 account is given of the chronology of
                                 major events during the maintenance
                                 work. The testing included work with
                                 hypothetical data and checks against
                                 outputs produced by three predecessor
                                 models, the ARM, NPS, and  HSP-
                                 QUALITY models. Through this process,
                                 it was determined that the HSPF
                                 model functioned as designed.
                                  This Project Summary was developed
                                 by  EPA's Environmental Research
                                 Laboratory. Athens. GA, to-announce
                                 key findings of the research project
                                 that is fully documented in a separate
                                 report of  the same title (see Project
                                 Report ordering information at back).

                                 Introduction
                                  The purpose of the work described in
                                 this report  was to maintain and test the
                                 Hydrological Simulation Program—
                                 FORTRAN (HSPF) developed under a U.S.
                                 Environmental Protection Agency (EPA)
                                 contract.
                                  HSPF is a mathematical model for
                                 simulating the hydrologic and water
                                 quality processes in and under the land
                                 surfaces of a watershed and in the
                                 associated streams and lakes. The roots
                                 of HSPF  go back to  the Stanford
                                 Watershed Model, which was one of the
                                 first rainfall-runoff computer models
                                 and was developed under National
                                 Science Foundation sponsorship. Many
                                 newer models have been developed
                                 from it; among the best known  is the
                                 Hydrocomp Simulation Program, which
                                 incorporated a sophisticated time series
                                 management system. Hydrocomp also
                                 developed a water quality model that
                                 simulates the accumulation of constit-
                                 uents on a watershed surface, their
                                 washoff into streams and lakes and the
                                 biochemical transformations that occur
                                 in such water bodies.
                                  The "Lands" section of the Stanford
                                 Watershed Model was also used as the
                                 basis for the Agricultural Runoff Man-
                                 agement (ARM) Model, which was also
                                 developed  under EPA contract. The
                                 ARM model simulates sediment produc
                                 tion, as well as the behavior of pesticides
                                 and nutrients, on agricultural lands.
                                 The EPA also sponsored the development
                                 of the Non-Point Source (NPS) Model,
                                 which simulates the washoff of consti-
                                 tuents from land surfaces by relations
                                 with washed-off sediment.
                                  Although all the above models origi-
                                 nated from the Stanford Watershed
                                 Model, they  have  each undergone
                                 development in their own specialized
                                 directions. Each is a powerful tool for
                                 use in its area of specialization, but it is
                                 not easy to  use them together in
                                 situations where their combined strength
                                 is required. With the goal of overcoming
                                 this problem, EPA sponsored the devel-
                                 opment of a "comprehensive package
                                 for the simulation of watershed hydro-
                                 logy and water quality," which later
                                 became known as HSPF. The objective

-------
was to incorporate the capabilities of all
of the  above  models  in  a single,
consistently designed  set of  well-
documented software, written as far as
possible in ANSI FORTRAN  (1966
version). This was part of EPA's progra m
to develop  engineering  tools to help
pollution control officials  achieve water
quality goals through watershed man-
agement.


Objective
  The objective of this project was to
provide a comprehensive initial test of
HSPF and correct any  errors or  short-
comings found in the  code. A new
release  of the program was  to be
prepared at the end of the  project. In
addition, utility modules that would
enhance the power of the system were
to be added to  the  system.  These
modules included an interface with a
digital plotter, a neatly formatted
summary  output  table,  a  statistical
analysis  package, and  a module to
perform  time series calculations.

Approach
  The purpose of  the testing program
was  to  check  that HSPF correctly
implemented the modeling algorithms
outlined in the  User's Manual.  These
algorithms are, forthe most part, similar
to those embodied in the predecessor
models,  but the manner  in which they
are included are  very different since
HSPF has a radically different structure.
Thus, most of the testing consisted of
comparing HSPF output against similar
runs of ARM, NPS. and HSP-QUALITY. If
the results were  similar, it would be
reasonable to expect that the algorithms
were correctly implemented. Differences
would have to be investigated to
determine whether HSPF was in error.
This was a  different approach than us-
ually taken where  model  output is com-
pared against observed data but  it was
reasoned that the predecessor models
had already been checked this way.
  Tests were conducted in three phases.
First,  very simplistic hypothetical data
sets  were constructed and  simulation
output was compared  against manual
calculations. Then the NPS and HSP-
QUALITY simulations performed for the
Northern  Virginia Planning District
Commission (NVPDC) were reproduced
using HSPF. Finally, the agricultural
runoff module of HSP was compared to
ARM  simulations  of a Michigan State
University test watershed. This site also
allowed testing of the snowmelt algorithms.
Results
  The manual calculations were very
useful. They were easy to set up and
permitted many aspects of the model to
be checked quickly.
  The NVPDC comparison showed that
it  is sometimes difficult to produce
identical results with HSPF because of
its radically different  structure. This
produced a  cumbersome HSPF input
sequence and resulted in lower execution
efficiency than if the  sub-basins had
been  segmented in a manner more
appropriate for HSPF.  The  results
pointed out  some subtle differences
between HSPF and predecessor models
but,  for the most part,  comparable
results could be produced by reasonable
adjustments  to accommodate  the dif-
ferences in implementation. A significant
difference was found in the phytoplank-
ton simulations due to a different
definition of "water body depth" used in
the light extinction equations.
  The Michigan State University simu-
lations produced  similar results. Minor
discrepancies in the snowmelt simulations
were attributable to slight differences in
implementation  of the algorithms.  In
many of these cases,  it was believed
that the HSPF  code more  closely
represents natural processes. Compari-
sons of the water balance routines
resulted in a correction  to the manner in
which HSPF handled snowmelt. Good
agreement was found  in the sediment
simulations. Pesticide and nutrient
simulations showed a difference that
was attributed to differences  in com-
putation sequencing in  the two models.
HSPF was  modified to more closely
coincide with the ARM model where it
was deemed appropriate. The testing
program did  raise questions about the
adequacy of  the  way the near-surface
region of the soil is  simulated in both
ARM and HSPF.

Conclusions and
Recommendations
  The care that went  into the design,
coding, and documentation of HSPF
was deemed to  be  worthwhile.  It is
relatively easy for a well-trained person
to use the system, and bugs have been
easy to locate and fix. New modules
were easy to add. It was also found,
however,  that the  model was more
costly to operate than its predecessor
models, largely because of the flexibility
built into the design.
  The testing program found  that the
algorithms  described in the User's
Manual were  correctly implemented.
When  checked against predecessoi
models, HSPF produced similar output
with these notable exceptions:
  1.  Simulation of nutrient behavior in
     pervious  land segments (PERLND
     module) did  not  agree with the
     results produced  by  the ARM
     model. This is attributable to:
     a.  Intermittent calculation of reac-
        tion fluxes in ARM Model runs
     b.  Problems  inherent in having a
        thin surface layer, with moisture
        storage dependent only on
        overland flow depth (a feature
        of both ARM and HSPF)
  2.  Simulation of phytoplankton in
     streams and reservoirs. Because
     HSPF and HSP-QUALITY use dif-
     ferent definitions of "water body
     depth" in  the light extinction equ-
     ation, they produce radically dif-
     ferent light-limiting phytoplankton
     growth rates.
  Recommendations for future develop-
ment of the model include:
  1.  Elimination of half-word integers,
     to  make it easier to install on a
     variety of  machines.
  2.  Development of a special version
     for large-memory  installations,
     designed to minimize disc input/-
     output and associated costs.
  3.  Improved trapping of user's errors,
     by the Run Interpreter.
  4.  Study of the feasibility of having a
     dynamically varying internal time
     step for certain processes  - fine
     when there is rapid  variation,
     coarse  when there is  not. This
     would save computer time.
  Two  problems  in the agricultural
chemical  simulation system of the
PERLND module need to be solved:
  1.  The MSTLAY section needs to be
     reformulated, so that the system
     will give  results  that  are  not a
     direct function of the  time step,
     thus freeing this part of HSPF from
     the 5 and 15 minute time steps to
     which it (and ARM) is  limited.
  2.  The problems posed by the use of a
     thin surface  layer, with moisture
     storage totally dependent on over-
     land  flow  depth, must be over-
     come.

-------
   R. C. Johanson and D. Kliewer are with Hydrocomp, Inc., Mountain View, CA
    94040.
   T. O. Barnwell is the EPA Project Officer (see below).
   The complete report, entitled "Maintenance and Testing  of Hydrological
    Simulation Program—FORTRAN (HSPF)." (Order No. PB 82-237 033; Cost:
    $10.50 subject to change) will be available only from:
           National Technical Information Service
           5285 Port Royal Road
           Springfield, VA 22161
           Telephone: 703-487-4650
   The EPA Project Officer can be contacted at:
           Environmental Research Laboratory
           U. S. Environmental Protection Agency
           Athens, GA 30613
* US GOVERNMENT PRINTING OFFICE. 19(2-559-017/0790

-------
United States                    Center for Environmental Research
Environmental Protection            Information
Agency                        C.nc.nnati OH 45268                                       Protection
                                                                                   Agency
	  EPA 335

Official Business
Penalty for Private Use $300
        PS   0000329
        U  S  ENVIR PROTECTION  AGENCY
        REGION  5 LIBRAKY
        <»30  S DEARBORN  STREET
        CHICAGO  IL 60604

-------