EPA-600/5-76-012
December  1976
Socioeconomie Environmental Studies Series
                  HANDBOOK FOR THE  ALLOCATION  OF
                COMPLIANCE  MONITORING RESOURCES
                                     Office of Air, Land, and Water Use
                                        Office of Research and Development
                                       U.S. Environmental Protection Agency
                                             Washington, D.C.  20460

-------
                RESEARCH REPORTING SERIES

Research reports of the Office of Research and Development, U.S. Environmental
Protection Agency, have been grouped into nine series. These nine broad cate-
gories were established to facilitate further development and  application of en-
vironmental technology  Elimination of traditional grouping  was consciously
planned to foster technology transfer and a maximum interface in related fields.
The nine series are:

      1   Environmental  Health Effects Research
      2.  Environmental  Protection Technology
      3.  Ecological Research
      4.  Environmental  Monitoring
      5.  Socioeconomic Environmental Studies
      6  Scientific and Technical Assessment Reports (STAR)
      7.  Interagency Energy-Environment Research and  Development
      8.  "Special" Reports
      9.  Miscellaneous Reports

This report has been assigned  to the SOCIOECONOMIC ENVIRONMENTAL
STUDIES series. This series includes research on environmental management,
economic analysis,  ecological impacts, comprehensive planning  and fore-
casting, and analysis methodologies Included are tools for determining varying
impacts of alternative policies; analyses of environmental planning techniques
at the regional, state, and local levels; and approaches to measuring environ-
mental quality perceptions, as well as analysis of ecological and economic im-
pacts of environmental protection measures. Such topics as urban form, industrial
mix, growth policies, control, and organizational structure are discussed in terms
of optimal environmental performance. These interdisciplinary studies and sys-
tems analyses are presented in forms varying from quantitative relational analyses
to management and policy-oriented reports.
This document is available to the public through the National Technical Informa-
tion Service, Springfield, Virginia  22161.

-------
                   fY OF               EPA-600/5-76-012
                                          December 1976
USER HANDBOCK FOR THE ALLOCATION  OF COMPLIANCE

            MOOT TOPING RESOURCES
                     by

              G. Paul Grimsrud
              E. John Finnemore
              Wendy J. Winkler
              Ronnie N. Patton
              Arthur I . Cohen

             Systems Control,  Inc.
         Palo Alto, California 94304
            Contract No. 68-01-2232
               Project Officer

               Donald H. Lewis
       Environmental Research Laboratory
           Corvallis, Oregon  97330
      OFFICE  OF AIR, LAND, AND WATER USE
      OFFI CE  OF RESEARCH AND DEVELOPMENT
     U.S.  ENVIRONMENTAL PROTECTION AGENCY
             WASHINGTON, DC  20460
                                     EPA-RTF  LIBRARY

-------
                                 DISCLAIMER
    This report has been reviewed by the Office of Air,  Land and Water Use,
U.S. Environmental Protection Agency,  and approved for publication.   Approval
does not signify that the contents necessarily reflect the views and policies
of the Environmental Protection Agency,  nor does mention of trade names or
commercial products constitute endorsement or recommendation for use.
                                     ii

-------
                               FOREWORD
     A successful water quality management program requires not only
thorough problem definition and prudent implementation of effective
control methods, but also adequate monitoring and strict enforcement
of the ambient and effluent quality standards upon which the program
is based.  The acquisition and analysis of adequate data for detection
and enforcement of standards violations is a complex and costly process,
and can be ineffective and inefficient unless due consideration is
given to the statistics and economics of the system, and the monitoring
program is designed and operated accordingly.

     This report is the eighth in a series within the Environmental
Management Research Program which addresses the management aspects of
the design and operation of water quality monitoring and information
management programs at the state or regional level, and develops
user-oriented handbooks to assist personnel in program design and
management.  The other seven reports are available from GPO or NTIS,
and are listed below:

     "Design of Water Quality Surveilance Systems," 16090DBJ08/70,
           August 1970

     "Quantitative Methods for Preliminary Design of Water Quality
           Surveilance Systems," EPA-R5-72-001, November 1972

     "Data Acquisition Systems in Water Quality Management,"
           EPA-R5-73-014, May 1973

     "Michigan Water Resources Enforcement and Information System,"
           EPA-R5-73-020, July 1973

     "Design of Cost-Effective Water Quality Surveilance Systems,"
           EPA-600/5-74-004, Janauary 1974

     "Demonstration of a State Water Quality Management System,"
           EPA-600/5-74-022, August 1974

     "Quantitative Method for Effluent Monitoring Resource Allocation,"
           EPA-600/5-75-015, August 1975
                               Thomas A.  Murphy
                               Deputy Assistant Administrator
                                 for Air  Land and Water Use
                               ill

-------
                               ABSTRACT
    This report is designed as a handbook specifically oriented to
environmental planners and managers.   It presents the development and
successful demonstration of hand and computerized procedures for the
design of effluent compliance monitoring systems.  The procedures may
help planners allocate compliance monitoring budgetary resources so as
to minimize environmental damage.  The original technical development
of these procedures is given in a companion report, "Quantitative
Methods for Effluent Compliance Monitoring Resources Allocation,"
EPA-600/5-75-015.  Both the computerized and hand calculation
procedures are demonstrated to function satisfactorily using data
supplied by the State of Michigan.

    This report is submitted in fulfillment of Contract Kumber
68-01-2232, by Systems Control, Inc., under sponsorship of the Office
of Research and Development, Environmental Protection Agency.

-------
                              TABLE OF CONTENTS
Section                                                             Page



   1.       INTRODUCTION	     1

   2.       DESCRIPTION OF COMPLIANCE MONITORING DESIGN PROCEDURES.     3

           2.1  REVIEW OF GOVERNING LAWS AND REGULATIONS	     3
           2.2  COMPLIANCE MONITORING PROCEDURES 	    11
           2.3  OVERVIEW OF RESOURCE ALLOCATION PROCEDURES ....    13
           2.4  RESOURCE ALLOCATION CRITERIA 	    16
           2.5  STATISTICAL CHARACTERISTICS OF EFFLUENT STREAMS.  .    21
           2.6  RESOURCE ALLOCATION PROBLEM	    29
           2.7  SIMPLIFIED EXAMPLE 	    34

   3.       GENERAL REQUIREMENTS FOR MANPOWER,  DATA,  AND COMPUTERS.    45

           3.1  INPUT DATA REQUIREMENTS AND PROCEDURES	    45
           3.2  COMPUTER AND MANPOWER REQUIREMENTS  	    54

   4.       USER MANUAL FOR HAND CALCULATION APPROACH	    58

           4.1  INTRODUCTION	    58
           4.2  STEP-BY-STEP PROCEDURE 	    65

   5.       USER MANUAL FOR COMPUTER CALCULATION	   145

           5.1  MODE  OF OPERATION	   145
           5.2  INPUT DESCRIPTION	   150
           5.3  SAMPLE INPUT DECK	   176
           5.4  OUTPUT DESCRIPTION 	   176

   6.       DEMONSTRATION OF PROCEDURES 	   197

           6.1  DEMONSTRATION OF HAND CALCULATION PROCEDURES -
                INITIAL ALLOCATION 	   198
           6.2  UPDATE PROCEDURE 	   212
           6.3  ALTERNATE DETERMINATION OF  VIOLATION WEIGHTING
                FACTOR	   218
           6.4  COMPARISON OF THE HAND CALCULATION AND COMPUT-
                ERIZED RESULTS	   221

-------
                     TABLE OF CONTENTS      — Continued
Section                                                          Page

  7        COMPUTER PROGRAM DOCUMENTATION	    229

           7.1  INTRODUCTION	    229
           7.2  PROGRAM DESCRIPTION	    231
           7.3  DESCRIPTION OF VARIABLES	    252

           REFERENCES	    309

           LIST OF SYMBOLS (For Section 4)	    313
                                 VI

-------
                                  TABLES
Table

 2.1       Constituents Recommended for Limitation by Industrial
           Category	     5

 2.2       Recommended Minimum Sampling and Analysis Frequency
           for Process Effluent	     9

 2.3       Municipal Wastewater Treatment Facilities Minimum
           Sampling Frequency	    10

 2.4       Damage Functions	    18

 2.5a      Self Monitoring Data for Source 1	    35

 2.5b      Self Monitoring Data for Source 2	    35

 2.5c      Self Monitoring Data for Source 3	    35

 2.5d      Self Monitoring Data for Source 4,  Pipe 1	    36

 2.5e      Self Monitoring Data for Source 4,  Pipe 2	    36

 2.6a      Initial Statistics for Source 1	    37

 2.6b      Initial Statistics for Source 2	    37

 2.6c      Initial Statistics for Source 3	    37

 2.6d      Initial Statistics for Source 4,  Pipe  1	    38

 2.6e      Initial Statistics for Source 4,  Pipe  2	    38

 2.7       Expected Damage and Probability of  Violation	    40

 2.8       Resources Needed to Sample	    41

 2.9       Priority List of Samples for Simplified Example  ....    42

 2.10      Final Allocation Given Monetary Budget	    44

 2.11      Final Allocation Given Maximum Allowed Cost of Un-
           detected Violations	    44
                                    Vll

-------
                         TABLES      — Continued



Table

 3.1       Summary of Input Data Types	     46

 4.1       Statistical Distribution Types of Constituent
           and Source	     68

 4.2       Effluent Standards 	     71

 4.3       Conversion Factors 	     72

 4.4       Data and Standards Conversion	     73

 4.5       Effluent Data, Statistics, and Probabilities 	     79

 4.6       Compliance Monitoring Input Data 	     90

 4.7       The Standard Normal Cumulative Distribution
           Function, (x)	    104

 4.8       Ranges of Sampling Rates and Expected Extents of
           Undetected Violations	    108

 4.9       Record of Task 10 Options and Calculations	    119

 4.10      Examples of Alternative Type of Weighting Factor
           Functions (WFF)	    120

 4.11      The Standard Normal Probability Density Function,  f(x)    121

 4.12      Resources Needed to Monitor Each Source Once 	    127

 4.13      Marginal Returns for Each Source	    131

 4.14      Sampling Priority List	    135

 4.15      Sampling Rates	    143

 5.1       EFFMON Inputs	    151

 5.2       pH/pOH Damage Function Breakpoints 	    171

 5.3       Non-pH Damage Functions	    172
                                  VI11

-------
                         TABLES     — Continued


Table                                                                Page

 5.4       Constituent Identification Numbers and Input Units.  .  .    173

 5.5       Input Units	    174

 5.6       Sample Input Data	    177

 6.1       Statistical Distribution Types by Constituent and
           Source	    199

 6.2       Effluent Standards	    200

 6.3       Source Number 9:  Raw Data	    202

 6.4       Data and Standards Conversion	    203

 6.5       Effluent Data,  Statistics,  and Probabilities	    204

 6.6       Worksheet for Task 8	    206

 6.7       Worksheet for Task 10	    207

 6.8       Record of Task 10 Options and Calculations  - K =  —  .  .    208

 6.9       Ranges of Sampling Rates and  Expected Extents of
           Undetected Violation	    209

 6.10      Resources Needed  to Monitor Each Source  Once	    211

 6.11      Marginal Returns  for Each Source	    213

 6.12      Sampling Priority List	    214

 6.13      Sampling Rates	    215

 6.14      Effluent Data,  Statistics,  Probabilities  	    217

 6.15      Record of Task 10 Options and Calculations	    219

 6.16      Ranges of Sampling Rates and  Expected Extents of  Un-
           detected Violations	    220

 6.17      Resources Needed  to Monitor Each Source  Once	    220
                                   IX

-------
                          TABLES      — Continued



Table

 6.18      Marginal Returns for Each Source	223

 6.19      Sampling Priority List Using Hand Calculation
           Procedure	224

 6.20      Sampling Rates Using Hand Calculation Procedures.  .  .  .   225

 6.21      Priority List of Samples Using Computer Calculation
           Procedure	   226

 6.22      Final Allocation Using Computer Calculation Procedure .   228

 7.1       Description of Common Variables 	   253

 7.2       Description of Local Variables	   258

-------
                               ILLUSTRATIONS



Figure

 2.1       Major Monitoring Activities	     6

 2.2       Flow of Resource Allocation Procedure	    14

 2.3       Example Damage Function	    19

 2.4       Initial Statistical Description Procedure	    25

 3.1        as a Function of Depth	    50

 3.2       Dissolved Oxygen Response as a Function of Water Body
           Type and 	    51

 3.3       Dissolved Oxygen Saturation Versus  Temperature and
           Chlorides	    53

 4.1       Example of Monitoring  Sequence 	    60

 4.2       Interrelationships of  Comprising Tasks  	    63

 4.3       Variation of Scaling Factor,  G,  with Sample Size for
           Normal Distributions 	    85

 4.4       Standard Deviation Estimated From the Mean and Maximum
           of Lognormal Distributions,  for Various Sample Sizes, n.    86

 4.5       Variation of the Confidence Parameter for Standard
           Deviation with Sample  Size	    87

 5.1       Organization of Input  Deck	170

 5.2       Organized Print of Inputs	179

 5.3       Organized Print of Inputs	180

 5.4       Printout of Initial Resource Allocation	137

 5.5       Printout of Sample Priorities	188

 5.6       Printout of Sample Priorities Beyond Minimum Allocation.   139
                                   XI

-------
                       ILLUSTRATIONS      ~ Continued



Figure                                                               Page

 5.7       Printout of Final Allocation Based on Budget Limit. .  .  .  190

 5.8       Printout of Final Allocation Based on Maximum Acceptable
           "Cost of Undetected Violations" 	  191

 5.9       Print of Source Statistical Summaries 	  193

 7.1       General Program Flow Diagram for EFFMON	232

 7.2       Main Program	233

 7.3       Function COMEXD	237

 7.4       Subroutine DAMAGO 	  238

 7.5       Subroutine EXPDAM 	  239

 7.6       Subroutine ISTAT	240

 7.7       Subroutine PARAMS	242

 7.8       Function PHEXD	243

 7.9       Subroutine PNVCOM 	  244

 7.10      Subroutine PRIORT 	  245
                                   Xll

-------
                                 SECTION 1
                                INTRODUCTION
       In response to increasing public awareness and concern for the
quality of the environment, government agencies at all levels are taking
steps to protect and enhance the quality of the nation's waters.  Control
of wastewaters is essential to the success of this initiative toward
environmental quality.  The Federal Water Pollution Control Act Amendments
of 1972 require the establishment of wastewater (effluent) limitations
for all joint sources by July 1, 1977.  The Environmental Protection Agency,
or designated state agency, is required to establish monitoring programs
to ensure that the effluent sources are in compliance with the standards.

       According to the Federal monitoring guidelines, there are three
ways the monitoring agency must obtain information concerning the com-
pliance of dischargers:

       1.  Self-Monitoring.  The effluent dischargers are required to
           sample their own effluent levels and periodically transmit
           records of these samples to the monitoring agency.
       2.  Compliance Monitoring.  The monitoring agency visits the
           effluent dischargers to ensure that the self-monitoring is
           being properly executed and reported.
       3.  Ambient Monitoring.  The water quality of the receiving waters
           monitored by state and/or local agencies.

The self-monitoring reports are the principal source of compliance in-
formation used by monitoring agencies since the agency expense to acquire

-------
these data is minimal.  Some check is, however, needed on the reliability
of self-monitoring data.  The compliance monitoring program is set up to
provide that check.  The compliance program also has other purposes
associated with the permit program, such as verifying that the plant pro-
cesses described in the permit are correct, evaluating new waste removal
equipment, reviewing progress toward scheduled pollution control activities,
and monitoring to aid in preparing enforcement actions.  The ambient
monitoring is primarily used to determine water quality, discern trends
in water quality, and evaluate the overall effectiveness of pollution
control in a region.  Under certain conditions, however, ambient monitoring
may flag effluent irregularities unmeasured by other means.  Through know-
ledge of the effluent sources that could contribute to the decline in
ambient quality, action can be initiated against possible violators.

       This handbook is directed toward responsible monitoring agencies
on the local, state and Federal levels, and specifically to the design
of compliance monitoring programs.  It is intended to extend the Resource
Allocation Procedure of a previous Research and Development report
[1] to include hand calculation procedures, and user oriented documentation.
The handbook provides simple and concise procedures for the preliminary
design of effluent compliance monitoring programs.  It includes the option
of using hand calculation or computer calculation techniques.  It is in-
tended to assist officials in developing efficient and effective compliance
monitoring programs using a relatively simple, yet meaningful approach.

-------
                                 SECTION 2
            DESCRIPTION OF COMPLIANCE MONITORING DESIGN PROCEDURE
       This section presents a technical overview of the monitoring
Resource Allocation Procedure, and how it relates to the governing laws
and regulations.

2.1    REVIEW OF GOVERNING LAWS AND REGULATIONS

       The Federal Water Pollution Control Act Amendments of 1972 shift
the emphasis of the law from water quality standards to effluent limitations,
These effluent limitations are asserted through the National Pollutant
Discharge Elimination System (NPDES) permits.  The Federal Environmental
Protection Agency (EPA) or state agency designated by the EPA regional
administrator must issue NPDES permits to all dischargers based upon cer-
tain criteria outlined as follows.

       The basic limitations are based upon known effluent control tech-
nology.  Permits for 28 industrial categories [2] are set according to the
Best Practicable Control Technology Currently Available (by 1977), and
Best Available Technology Economically Achievable (by 1983).  Municipal
sewage discharge permits are set according to the basic Secondary Levels
of Treatment (by 1977), and Best Practicable Waste Treatment Technology
                                                      *
(by 1983).  However, in Water Quality Limited Segments  the permits must
be based upon the level of additional treatment needed to assure maintenance
of acceptable water quality.  It is the responsibility of the state or
regional administrators to set the permit levels in these areas based upon
*
 Areas of receiving waters where acceptable water quality levels are not
 always reached when the effluents of that area are held to the basic
 limitations.

-------
studies such as those under Sections 303e and 208 of the Water Quality Act

[3].  Once the permits are specified, it is the responsibility of each

discharger to maintain their effluents within permit levels.


       The Federal government has set out guidelines to officials issuing

NPDES permits  in the form of Effluent Limitations Guidelines [2,4-20],

The important aspects of these guidelines are listed below.
       1.  Only constituents of major significance should be limited
           and monitored.  The full list of constituents recommended
           for effluent limitations in the 28 industrial categories
           is given in Table 2.1.

       2.  Limitations should be in terms of "production days," i.e.,
           loads throughout a day.

       3.  Each permit should contain limitations on (monthly) average
           and daily maximum.

       4.  Permits should be based upon gross loads, unless the discharger
           has a strong argument to use limitations on net loads (i.e.,
           outlet load minus the intake load).  Where possible, the permits
           should be in units of kilograms per day.
       The enforcement of these NPDES requirements requires certain
specified monitoring procedures, as outlined in the next subsection.


Monitoring Guidelines


       The Federal Water Pollution Control Act Amendments of 1972 and the

accompanying regulations and guidelines specify a comprehens'ive set of

monitoring programs for enforcement of the law.  The major monitoring
efforts to be required are shown in Figure 2.1.

-------
     Table 2.1  Constituents Recommended for Limitation by Industrial  Category
INDUSTRY




2 BUILDFRS PAPHR AND BOARD
3. TIMBER PRODUCTS
4 SOAP .Via DETERGENTS
5 DAIRY PRODUCTS
6 ORGANIC CHEMICALS
7 PETROLEKI REFINING
8 LEATHER TAXNTSG i FISHING
o CANNED AN'J PSFSl'KVED
FRCITS ASD viCTABLEs
10 NONFERP.OUS HITALS
11 GRAIN HILLS
12 SUCAR PROCESSING
13 FERTILIZERS
14 ASDESTOS
IS MEAT PRODUCTS
16 FERROALLOYS
1 7 CLASS
18 ELECTROPLATING
19 PHOSPHATE MANUFACTURING
20 FEEDLOTS
21 CF.NENT MANUFACTURING
22 RUSHER PROCESSING
23 PI.ASTICS A[.U SYNTHETICS
24 INORGANIC CHEMICALS
25 UOH AND STEEL
26 TEXTILES
j; STEAM EI.F.CfSlC GENERATING
EQU 1 PMFJIT
28 SEAFOOD PROCESSING

S
S

X

X
X
X
X
X
X
X
X

X
X


X

X


X

X
X


X

X

s

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

-J.

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

§
R

y

























X



o
R




X
X

X
X


X



X


X




X
X
X

X



U)




X


X
X








X
X





X

X
X


CREASE





X
X


X
X




X

X

X




X


X
X
X
X
CTACTS
a





X

























p








X
















X





s








X


X


X

X









X




U.








X
X





















*;








X
X







X

X




X
X

X



•o








X








X

X





X





U
z



















X




X

X



TROCEJI
X.









X




















COLIFORK
g









X
X


X


X




X





X



z














X











X



z
g














X















OSPHOROS
-.














X



X

X










§











X


X





X




X
X




s













X



X




X





X


D.
fi











X







X








X

§
1











X














X




f,

















X

X





X




U
U


























X




X

















X

X










L>
QC




















X









Ul
3
X




























X


I

























X


X


3

























X





p

























X
X



SOLVED SOLIDS
0




















X

X







From References [2,4-20]

-------
  DISCHARGER
SELF-MONITORING
                        STATE AND
                         FEDERAL
                       ENFORCEMENT
                 STATE  MONITORING
                  REQUIREMENTS
             (PL92-500,  Section  106)
                          PRIMARY
                       AMBIENT WATER
                    QUALITY MONITORING
                COMPLIANCE
                MONITORING
GROUNDWATER
             Figure  2.1
Major Monitoring Activities

-------
       The effluent discharger under an NPDES permit must monitor his
effluent (self-monitor) at some minimum sampling frequency, maintain
records of sample results, and periodically transmit these records to the
state.  In addition, state officials must have the authority to enter the
premises of a permittee at any reasonable time to inspect records and
instrumentation and to sample effluents, both to verify the quality of
self-monitoring reports and to check for compliance with permit conditions.

       The States have a number of monitoring responsibilities (shown in
Figure 2.1) in order to be eligible for Federal wastewater control program
grants.  These responsibilities are described in regulations developed
under Section 106e(l) of PL 92-500 [3].  In summary, these regulations re-
quire that monitoring systems include the following components:

       •   Compliance Monitoring to validate self-monitoring reports and
           support enforcement actions.  This monitoring must include
           scheduled and random quality control inspection of permittees'
           monitoring reports and equipment to establish the credibility
           of self-monitoring reports,  follow-up inspections Xv>hen there
           is evidence of an effluent standard violation, and ad hoc in-
           tensive surveys when there is evidence of a water quality
           violation.
       •   Intensive surveys (scheduled in advance on a periodic basis)
           conducted "before and after  implementing pollution controls
           in areas of significant pollution sources, clustered pollution
           sources, localized nonpoint  sources of pollution, and in major
           bodies of water which are known or suspected to be accumulating
           pollutants."  These surveys  may include monitoring of both
           ambient and effluent levels.

-------
       •   Primary ambient monitoring designed to give the long-term
           coverage necessary to describe trends in water quality and
           to establish a macroscopic view of the effectiveness of
           pollution control actions (see Section 305b, PL 92-500).
       •   Toxic pollutant monitoring including "studies and systematic
           sample collection from surface waters, groundwaters, sediments
           and biological communities" to define where toxic pollutants
           are entering the States'  waters and to provide basis for control
           actions.
       •   Groundwater monitoring consisting of stations designed to
           "determine baseline conditions and provide early detection of
           pollution."

The procedures given in this handbook are concerned with the allocation
of monitoring resources for compliance monitoring.

Self-Monitoring Requirements

       The NPDES permit program guidelines [2]  give detailed requirements
for self-monitoring programs.   They suggest that minimum self-monitoring
frequencies be set according to the discharge flows and constituent
nature for industrial and municipal effluents as given in Tables 2.2 and
2.3.  Since the effluent standards must be set  in terms of daily loads,
the monitoring guidelines strongly recommend the use of composite samples.
However, if it is only feasible to take grab samples, they can be used to
represent daily composite samples.

       The self-monitoring data must be reported on standard forms giving
the maximum and minimum of production day loading samples over a month,
and the monthly average of these samples.  The dischargers with more than

-------
      Table  2.2      Recommended Minimum  Sampling  and
                     Analysis  Frequency for  Process  Effluent
     Effluent
Flow Volume (MGD)
 Minimum Frequency
       for
 Major Constituents
Minimum Frequency
      for
Other Constituents
     < .05
       .05-1.0
      1.0-10.
     10. - 50.
    >50.
 Once per month
 Once per month
 Once per week
Three times per week
     Daily
Semi-Annually
Quarterly
Once per Month
Once per Month
Once per Month

-------
            Table 2.3     Municipal Wastewater Treatment Facilities
                          Minimum Sampling Frequency

                                EFFLUENT


















Plant Size (mgd)

Up to 0.99
1 - 4.99
5 - 14.99
15 and greater
















•j
o
tH
fK
Once each
Wkday.2
Daily
Daily
Daily










^^
tH
60
8


lO
o
§

^
00
B

to
-O
•H
tH
O
CO


-------
one discharge pipe are given the option of reporting on each discharge
separately, or on the combined discharges.  The self-monitoring data must
be transmitted to the State at least quarterly — semi-annually for very
small industries.

2.2    COMPLIANCE MONITORING PROCEDURES

       This handbook is concerned with the part of the compliance monitor-
ing program that determines whether effluent sources are in compliance
with the effluent standards.  Since the state monitoring agency has limited
resources available for compliance monitoring, it is important that these
resources be used in an efficient manner.  The procedure developed in the
first SCI study  [1], and presented in this handbook,determines how often
to monitor each source in a region to obtain maximum benefit from the
compliance monitoring program.  The procedure uses information from past
self-monitoring, ambient monitoring, and compliance monitoring reports.

       As discussed earlier, an effluent source is in violation (i.e., does
not comply with standards) if either the value of a daily composite measure-
ment exceeds the maximum standard, or the average of  the daily composites
over the month exceeds the average standard.   In order to determine whether
an effluent source is in violation of the "average" standard,  it is
necessary to take measurements over a large percentage of the  month, while
to determine if the "maximum" standard is violated, it is only necessary
to determine if the standard was exceeded over a single day.  Since com-
pliance monitoring is costly to the monitoring agency,  and since most
regions will contain many effluent sources, it is not expected, in general,
that compliance monitoring resources will be available to determine whether
the "average" standard is violated.  Additionally, the chronic, long-term
pollution effects resulting from the "average" violation can usually be
sensed in both the primary monitoring network, and through a compliance
                                     11

-------
monitoring scheme designed for the "maximum" standard.  Therefore, the
procedure given in this handbook is limited to determining whether the
"maximum" standard is violated.

       The Resource Allocation Procedure sets priorities on which effluent
sources should be monitored and how often.  The procedure determines the
sampling rates so that sources that have a high probability of violating
their standard, and (optionally) sources that may cause large environmental
damage will be sampled with high priority.  The objective in allocating
monitoring resources then is to minimize the "cost" of undetected violations,
or equivalently, the expected environmental damage that would result from
undetected violations.  The "cost" of undetected violations for a number
of effluent sources may depend on:

       1.  The expected number of undetected violations;
       2.  The expected "environmental cost" due to undetected violations;
       3.  The expected magnitude of undetected violations.

Any one of these three factors can be used as the criterion for the
allocation of monitoring resources.

       The first allocation criterion depends on the probability that the
various violating sources in the monitoring region will not  be caught in
violation once in the monitoring period (i.e.,  the probability of being
an undetected violator).   This quantity in turn depends on the sampling
rates and single day probability that each of the sources  will violate
one of their standards.   The other two criteria are also a function of the
probability of being an undetected violator; however, they all depend on
other factors.  The second criterion depends on the environmental damage
that is expected to result from a standard violation, while  the third
criterion depends on the degree or amount by which the standard is ex-
pected to be exceeded.  These criteria are defined in more detail in
Section 2.4.
                                    12

-------
       All the above criteria are functions of the discharges or loadings
from effluent sources.  These effluent loads, due to their inherent vari-
ability, are modeled statistically by either a normal or lognormal prob-
ability density function.  Allowing for two types of density functions
results in the ability to model a wide range of effluent loadings with
sufficient accuracy to determine sampling priorities.  Both the normal
and lognormal density functions can be defined by two parameters, a mean
and a standard deviation.  (For the lognormal case, the mean and standard
deviation are those of the logs of the effluent values.)  These parameters
are obtained for each constituent of each source from historical data, in-
cluding self-monitoring and compliance monitoring data.  The procedure
used to determine the statistical characteristics of the effluents is
described in Section 2.5.

2.3    OVERVIEW OF RESOURCE ALLOCATION PROCEDURE

       The basic task flow for the Resource Allocation Procedure is given
in Figure 2.2.  The various major functions of the procedure are briefly
described below, and described in more detail in Sections 2.4 through
2.6.

       1.  Initialize Statistical Description

           Combine the raw self-monitoring and compliance monitoring
           data to obtain an initial statistical description (distribution,
           mean and standard deviation) for each pollutant of each source.

       2.  Calculate Probability and "Cost" of Violation (Allocation
           Criteria)
           Use the statistical description of the effluent loads, the
           effluent standards, and the stream parameters to obtain the
                                   13

-------
           INITIALIZE
           STATISTICAL
           DESCRIPTION
RESOURCE ALLOCATION PROCEDURE
      CALCULATE  "COST" AND
      PROBABILITY OF VIOLA-
      TION  (ALLOCATION
      CRITERIA)
          DETERMINE
          PRIORITIES
                UPDATE
                STATISTICS
           MONITORING
           SCHEDULE
MONITORING \
 PERIOD    y~
                 	1
                              MONITORING PROGRAM
Figure 2.2      Flow of Resource Allocation Procedure
                          14

-------
           "cost" and probability of violation for each source.  Use the
           appropriate option in this calculation as described in Section
           2.4.
       3.   Determine Priorities
           Use the method of maximum marginal return to obtain the
           monitoring rates.
       4.   Monitoring Schedule
           Take the sampling rates obtained in the previous function and
           determine which date to sample which sources.
       5.   Monitoring Period
           This box represents the actual time spent monitoring the sources.
       6.   Update Statistics
           Combine new self-monitoring and compliance data with the initial
           statistics to obtain an updated statistical description of the
           effluents.

Functions 1, 2, 3, and 6 are performed by the Resource Allocation Procedure
and will be described in Sections 2.4 through 2.6.  The scheduling of the
sampling (Function 4) depends on a number of factors which are difficult
to quantify in an optimization framework, such as: the spatial location
of the various effluent sources, the size of the monitoring agency's
jurisdiction, and the availability of personnel.  This scheduling is left
to the individual monitoring agency.  Function 5 simply denotes the
passage of time.
                                    15

-------
 2.4    RESOURCE ALLOCATION CRITERIA

        The procedures presented in this handbook give users several
 optional criteria for resource allocation, as discussed in Section 2.2.
 This section discusses the mathematical definitions of these criteria.
 Those readers with non-mathematical background  are encouraged to skip
 this section.

 Number of Undetected Violators (Criterion //I)

        The objective of  this  allocation criterion is to minimize  the
 number of undetected violators,  which is defined as the expected  number
 of  effluent sources  which will not  be caught  in  violation  given that  the
 i    source is sampled s. times.

        Now (p.) i-is  the probability that the i    source will not  be caught
 in  violation, if it is  sampled  s. times,  where p.  is the probability that
 it  will not be caught  in violation  if it is sampled once.  The number  of
 undetected violators  is then
         n
          S  Si
        1=1

where ng is the number of sources.   The calculation of p .  is  discussed  in  [1],
 Equation  2.1  should more accurately be called the "Number of Undetected
 Sources," since the probability that each source will be a violator is not
 included.  The expected number of sources which will violate a standard
 but not be caught in violation given that the ith source is sampled s. times
 during a monitoring period of N days is                              1
        n
         s
             Pi
 Since this formula differs from Equation 2.1 only by a constant, the same
 sampling rates,  s   will  minimize both functions.   Therefore,  the simpler
 formula has been presented.
                                      16

-------
"Cost of Undetected Violations"  (Criterion #2)

       The objective of this allocation criterion is to minimize the
"environmental cost" of undetected violations, which is the damage to
water quality in receiving waters due to the effluent constituents of the
effluent sources.  The environmental damage due to a given effluent con-
stituent is related to the concentration of the constituent (or correspond-
ing water quality indicator) in  the receiving waters through a damage func-
tion.  The damage function is defined as a piecewise linear function where
a numerical value is given to each "level of damage" - the values 0, 2, 4,
6, 8 and 10 correspond to "none", "excellent", "acceptable", "slightly
polluted", "polluted", and "heavily polluted", respectively.  This type of
subjective damage function closely follows the approaches used by Prati [22],
Horten [23], and McCelland [24].  Using various references [22-27], appro-
priate damage function were specified for 26 water quality indicators as
shown in Table 2.4.   The user of this procedure may optionally modify the
damage functions in this table based upon his own experience and particular
needs.  Figure 2.3 gives an example, in graphical form, of a damage function;
the indicator considered is suspended solids.   The computation of the cost of
undetected violations using this approach is given in [1].

Magnitude of Undetected Violations (Criterion #3)

       This allocation criterion serves as an alternative to the very com-
plex "Cost of Undetected Violations" criteria.  It accounts for severity of
environmental damages, and yet is simple enough to be included in the hand
calculation procedures.  The "Magnitude of Undetected Violations" is defined
as the severity of undetected violations (i.e., the amount by which effluent
standards are exceeded).  The degree of violation, for a loading M and a
standard T, is given by equation

                  (0      ;  M < T
       DV(M,T)  =             "                                      (2.2)
                  ( ct(M--c);  M > T
                                     17

-------
                                            Table 2.4  Damage  Functions

Constituent
name

Aluminum
Ammonia
Dissolved oxygen
Inorganic carbon
Chloride
Chloroform extract
Chromium
Coliforms-total
Coliforms- fecal
Copper
Cyanide
Fluoride
Iron
Lead
Manganese
Mercury
Nickel
Inorganic nitrogen
Oil-grease
pH-MIN
pH-MAX
Phenol
Phosphates
Solids-dissolved
Solids-suspended
Temp. diff.
Tin
Zinc


Units

mg/1
mg/1
mg/1
mg/1
mg/1
mg/1
mg/1
MPN/lOOml
MPN/lOOml
mg/1
mg/1
mg/1
mg/1
Pg/1
mg/1
ug/1
mg/1
mg/1
mg/1


Ug/1
mg/1
mg/1
mg/1
°C
mg/1
mg/1
Level of damage

None
0
0
0
>9
<50
0
0
0
0
0
0
0
<0.7
0
0
0
0
0
<0.6
0
7
7
0
0
<100
0
0
0
0

Excellent
2
0.01
0.1
8.0
70
25
0.04
0.02
100
20
0.02
0.01
0.8
0.1
5
0.05
1
0.01
0.9
0.01
6.5
8.0
0.5
0.1
200
20
1.0
10
0.1

Acceptable
4
0.05
0.3
6.8
90
175
0.15
0.05
2000
200
0.10
0.02
0.9
0.3
50
0.17
5
1.0
3.0
0.10
6.0
8.4
1.0
0.2
500
40
2.5
40
1
Slightly
polluted
6
0.10
0.9
4.5
110
200
0.25
1.0
7500
800
1.00
0.05
1.2
0.9
100
0.50
10
3.0
4.5
5
5.0
9.0
20
0.5
1000
100
3.0
100
5

Polluted
8
.50
2.7
1.8
130
240
0.35
10.0
15,000
3,000
5.00
0.10
3.0
2.7
250
1.00
20
9.0
7.0
30
4.0
10.0
100
1.6
1500
280
4.0
300
15
Heavily
polluted
10
1.00
3.0
0.9
150
250
0.40
50.0
150,000
50,000
10.00
0.50
8.0
3.0
350
1.50
50
20.0
10.0
50
3.9
10.1
200
10
2300
300
10.0
1000
40


Reference*

7
2
5
5
3
3
6,7
3,6
4,5
6,7
6,7
7
2
6,7
2
7
7
5


67
, 1



6*7
»'
7
CD
     *The references shown are those  used  to  develop  the  damage  function  for  each  constituent.

-------
     101-
w
o
PM
O

w

3
       0         100        200        300        400




          CONCENTRATION OF SUSPENDED SOLIDS, mg/1
        Figure 2.3
Example Damage Function
                        19

-------
where a is a design constant discussed in detail in Section 4, Task 10.

       The expected degree of violation for the j   constituent of the
.th
i   source is
(2.3)
       DVr  = / DV(M,tr) 4>1-(M)dM  =/  ^.(M-T^) ^^
                O                        T. .
                                         13
        The expected degree of violation from all the constituents of the
 i   source is then
        DV   =  Max DV..                                             (2.4)
                 J    1J
 where it is assumed that the user is interested in the worst degree of
 violation from the source.  The derivation of the Degree of Undetected
 Violation now follows exactly the derivation of the "Cost of Undetected
 Violation" given in [1].  The Degree of Undetected Violation is therefore,

               n
                s      s.
        DV  =     l>V.p.   .                                           (2.5)
               i=l  1 1
 where, for the i   source,  DV. is the expected degree of violation, p. is
 the probability the source  will not be found in violation if sampled once,
 and s. is the number of times the source was monitored.

 Summary of Resource Allocation Criteria
        In examining the three optional resource allocation criteria, it
 is seen that they are all a function of the number of Undetected Violations
 given in Criteria #1.  In fact, they are all of the form
                                n
                                 s                        s .
        Allocation Criteria  =  £  (weighting factor) (p.) 1 .        (2.6)
                                i=l                     L

 In Criterion //I, the weighting factor is simply set to 1.  In Criterion #2,
 the weighting factor is set to the expected "environmental cost" of un-
                                   20

-------
detected violation.  In Criterion //3, the weighting factor is set to the
relative severity or magnitude of undetected violations given by Equations
2.3 and 2.4
        The manual calculation procedures presented in Section 4 gives the
 option of using Criteria //I and //3.  The computer calculation procedure
 gives the option of using Criteria #1 and //2.

 2.5    STATISTICAL CHARACTERISTICS OF EFFLUENT STREAMS

        All three of the allocation criteria, discussed in the previous
 section, require knowledge of the probability of violation for each
 effluent source.  Thus, the priority setting procedure for compliance
 monitoring requires that the daily composite effluent loads, due to their
 inherent variability, be modeled statistically.  Among the questions that
 must be addressed in developing a statistical model are:
       •   What probability distributions adequately model the
           effluent data?
       •   What is the statistical correlation between the various
           constituents of the effluent?
       •   What is the time-varying nature of the statistics?
        It  has been shown  in  [1],  for several  example  sets of  data,  that
 the  normal and  lognormal  distributions  adequately model  the  statistics
 of the  daily composite  effluent  loadings.   In order to decide whether  to
 model a particular constituent by  a  normal  or lognormal  distribution,  it
 is necessary to process a large  amount  of daily data.  It is  not  expected
 that the individual monitoring agency will  have the resources to  analyze
 the  daily  data  of  each  source  in its jurisdiction.  It is only  postulated
 that the monitoring agency will  have a  monthly mean and  maximum for  each
 constituent of  each source.  It  is,  therefore, necessary to determine,
 using industry-wide studies  of effluent characteristics, which  distribution
 can  be  associated  with  a  given industrial process.  Since this  information
 is unavailable  at  the publication  of this report, several guidelines are
 specified  in Section  4, Task 1,  on how  to choose between the  normal  and
 lognormal  cases.

                                    21

-------
       The normal and lognormal distributions are defined by a mean and a
 standard deviation.  (For  the lognormal distribution, the mean and standard
 deviation are of the logs  of the data.)  Since  it is only assumed that the
 monthly mean and maximum,  and not the sample standard deviation, are
 available to the monitor,  the standard deviation of the normal process
 must be estimated using nonstandard estimation  procedures.  Approximate
 maximum likelihood estimates of the mean and standard deviation from the
 mean and maximum were developed in [1] for both the normal and lognormal
 cases.  These estimates were tested on real data and it was shown that they,
 coupled with the associated distributions, adequately describe the statis-
 tical variations.

       There has been little study into the statistical correlation of the
 constituents of an effluent.  As with the problem of determining the
 appropriate distributions, it is not expected that the monitoring agency
would be able to determine the correlation of the constituents of the
 sources in its jurisdiction.  It is therefore necessary that the correlation
 coefficients be obtained from industry-wide studies.  Since these are un-
available at the present time,  it is assumed, unless other knowledge is
available, that the constituents from a source are uncorrelated.   The
priority setting procedure also allows for the  case where the constituents
are completely correlated.  In [1]  a correlation study for a single
municipal treatment plant was carried out.   It is clear that no general
conclusions can be reached from the analysis of one water treatment plant.
The analysis has shown that variability in the correlation between con-
stituents exists from month to  month, and that there are some'problems
inherent in choosing between the hypotheses of uncorrelated constituents
and correlated constituents.

       The time-varying nature  of effluent  statistics  comes from  two
sources:  (1)  periodic variations due  to weekly,  monthly,  or seasonal
                                   22

-------
variations and (2) trends due to changes in the plant processes.  The
weekly and monthly variations are averaged out in the input data (i.e.,
monthly mean and maximum).  These variations, if known, should be taken
into account when determining when, in a monitoring period, to monitor
a particular source.  The seasonal variations and trends are taken into
account in the statistical characterization by discounting appropriate
past information and updating the statistics as new data become available
(see Section A, Task 7).

       The specific procedures used in the Resource Allocation Procedure
to obtain the initial statistical description of the effluent sources and
to update the statistics as new information becomes available are dis-
cussed below.

Initial Statistical Description

       The monitoring agency will have two types of data available from
which it can initially determine the statistical characteristics of the
effluent discharges:

       •   Self-monitoring data
       •   Compliance data

       The self-monitoring reports will typically be sent to the appropriate
regulatory agency on a monthly or quarterly basis.  The reports will at a
minimum contain the monthly maximum and monthly sample mean of the daily
measurements (usually composite) of those constituents for which standards
have been set.   The report will also state the number of samples which were
used to obtain the sample mean and maximum.  Compliance data will also be
available on the sources the monitoring agency has inspected as part of
its compliance monitoring program.
                                    23

-------
       When using the Resource Allocation Procedure for the first time,
it is necessary to obtain an initial statistical description of all the
effluent source constituents.  This statistical description will be a
function of self-monitoring data and compliance monitoring data gathered
over many months.  The procedure required to obtain the initial statistical
description in the computer implementation is shown in Figure 2.4.  The
changes made for the manual procedure are discussed at the end of this
section.  The various components of this procedure will now be discussed.

       Aggregate Data.  The procedure to obtain estimates of the mean and
standard deviation from the sample mean and the maximum (given in Appendix
A of [1]) requires that the number of measurements used to obtain the
sample mean and the maximum be greater than three.  If the number of
measurements is three or less, the data over several months can be
aggregated to obtain a sample mean and maximum based on more than three
measurements.  In this way, the estimation procedures, which have been
shown to be applicable in describing the effluent statistics [1], can
still be used.  A theoretical description of the aggregation procedure
is given in [1, Section 5].

       Obtain Estimates of Mean and Standard Deviation From Monthly
Self-Monitoring Data.  The estimation procedures to obtain estimates of
the mean and standard deviation for normal and lognormal processes are
given in Appendix A of [1],

       Combine Self-Monitoring and Compliance Monitoring Data.   At this
point in the procedure (see Figure 2.4), estimates of the mean and standard
deviation, based on self-tnonitoring data, are available for each month or
aggregated month.  These will be combined with the compliance monitoring
data to obtain new improved estimates.   Since the monitoring agency will
be collecting the compliance monitoring data, this data will be more
                                    24

-------
               MONTHLY JJATA
               SELF-MONITORING:
                  MEAN,  MAXIMUM
                  NO. OF MEASUREMENTS
               COMPLIANCE MONITORING
               MEASUREMENTS
                  AGGREGATE DATA
                  (if necessary)
              FOR EACH MONTH, OBTAIN
              ESTIMATE OF MEAN AND
              STANDARD DEVIATION
              FROM SELF-MONITORING
                      DATA
              FOR EACH MONTH, COMBINE
              SELF-MONITORING AND
              COMPLIANCE  MONITORING
              DATA TO OBTAIN NEW
              ESTIMATE OF MEAN AND
              STANDARD DEVIATION
              COMBINE  ESTIMATES  FROM
               ALL MONTHS TO OBTAIN
              ESTIMATES  OF MEAN  AND
              STANDARD DEVIATION AT
              START OF MONITORING
                     PERIOD
Figure 2.4
Initial Statistical  Description Procedure
                       25

-------
reliable than the self-monitoring data.  This  should be  taken  into  con-
sideration in the method of combination.  The  combination  procedure is as
follows.  Let

       Z1'Z2' •"' Zc

be c daily composite values obtained in the compliance monitoring program
for a month.  Let m and V be the estimated mean and variance (estimated
standard deviation square d) for that month based on the self-monitoring
data.  Let n and v be the parameters which express the confidence in the
mean and variance respectively,  n and v  are  constants  representing the
                                                           *
equivalent number of measurements used to estimate m and V.   The values of
n and v are set proportionally to the number of measurements, N, used to
calculate the monthly mean and maximum.  That  is,
       n  =  h N                                                     (2.7)
              n
and
       v  =  h (N-l)                                                 (2.8)

where h  and h  are design parameters.
       n      v
        The compliance data and the monthly estimates are combined sequen-
tially, using the updating formula described in Appendix E of [1],  First,
the compliance data z  from a given month are combined with the self-
monitoring estimates (m, n, V, v) for that month using the update formula
(E.3) of [1], yielding the posterior estimates (m , n , V  v,).   The second
compliance data z« for that month are then combined with this estimate to
yield a new estimate (m^, r\2, V^, V2).  The process is repeated until all
the compliance data are used to obtain a final monthly estimate for each
month.  In order to give the compliance monitoring data more weight (since
 A discussion of these confidence parameters is given at the end of this
 section.   They are also discussed in [1].   For further information see
 [28].
                                     26

-------
they will, in general, be more reliable),the values of V and n-used in
(E.3a) and (E.3b) of  [1] should be replaced by V/y and n/y where y >1 is
a design constant.

       As an example, consider the case where the estimate of the mean,
from self-monitoring  data, is m = 100, and the estimate of the standard
deviation is a =  25.  The confidence parameters are assumed to be n = 15
and v = 10.  Suppose  compliance data for the month are also available with
values z  = 115 and z« = 145.  Let y be equal to 2. [Recall n' - 1 and y1 =• 0.]
Using  (E.3), of  [1],  z  can be combined with the estimates  (m, n, V, v) to yield

              (n/y)m  +  z
       m1  =     . N   .   =  101.8
        1     (n/y) + 1

       nL  =  n + 1 = 16
              [(v/y)  V + (n/y)m2] + z2 - ((n/y) + l)m2
       vi  =  	,  , ,  , |	-=543.7
        1                     (v/y) + 1
and
       vn  =  v + 1 = 11.                                             (2.9)
The new estimate of  the  standard deviation  is a, =  vv  = 23.3.  The process
is then repeated with  (m.. , n  , V , v ) replacing (m, n, V, v) and z? re-
placing z1  to yield

       m    =  106.6

       n2   =  17
       V2   =  715.27
and
       v2   =  12.                                                     (2.10)
The new estimate of  the  standard deviation  is a~  =26.7.
                                      27

-------
       Combine Estimates From Several Months.  The final step  in obtaining
an initial statistical description is to combine the estimates from several
months to obtain an estimate of the mean and standard deviation at the
start of the monitoring period.  The estimates are combined by sequentially
using the Bayesian update formula (E.3) given in Appendix E of [1],  If the mean,
m , and the variance, V , along with the confidence parameters, n£, and
v , are available for months t = 1,2,  .... T, the final estimates would be
obtained by first combining (m,, n^ V^ v 2> and (ny n^, V2> v2> using  (E.3) of [1]
yielding (mj, n£, V.J, vp .  Then (m£, nj, Vj, vp would be combined with  (raj
n3, V3, v3) to yield (mj, nj, Vj, vJ).  This process would be repeated until
the estimate  (m^,, n^, Vj,, vj,)is obtained, which is the estimate to use in the
priority setting procedure.

       Confidence Parameters.  In order to use the Bayesian update formula,
it is necessary to specify the confidence parameters n and v.  These para-
meters describe one's confidence in the estimates of the mean and
variance.   A discussion of how to obtain these parameters is given in
Section 5,  of [1].  A detailed manual procedure for obtaining them is given
in Section 4, Task A.

Update of Statistics

       In the previous section, a procedure was given to obtain the
statistical characteristics of the effluent sources at the commencement
of the use of the Resource Allocation Procedure.  The Resource Allocation
Procedure will be used on a periodic basis to obtain the sampling frequencies
for the following monitoring period.  At the same time the monitoring agency
will continue to receive self-monitoring and compliance data.  The purpose
of this section is to describe how this data should be used to obtain an
updated statistical description.
                                      28

-------
        The update procedure is identical to the procedure for the Initial
Statistical Description with the small exception that the old statistical
characterization is used as a starting point in the procedure.  To be
precise, the statistical update procedure follows the Initial Statistical
Description procedure  (see Figure 2.2), in that first, the new monthly
data are aggregated, if necessary, to obtain sample sizes greater than 3;
estimates of monthly means and standard deviations based on the self-moni-
toring data are then obtained.  The Bayesian update formulas  (Appendix E of
[1]) are then used to  combine the compliance monitoring data and the monthly
statistical description of the effluent and thus the new monthly statistical
descriptions based on  the new data are available.  These are combined
sequentially, starting with the original statistics, using the Bayesian
update formula, therby obtaining an updated statistical description.

Manual Procedure

        The manual procedure described in Section 4 is the same as the
computer implementation except that the data from all the previous months
are aggregated in the "Aggregate Data" step.   This eliminates the need
for computing the standard deviation for each month of data — they only
have to be estimated once per monitoring period — and the need for combin-
ing the monthly estimates using the update formula.   The tremendous reduction
in computation far outweighs the loss of accuracy in the effluent statistics.

2.6     RESOURCE ALLOCATION PROBLEM
        In Section 2.4, performance criteria for the procedure of allocating
monitoring resources were defined.  This section defines the complete resource
allocation problem and describes the method of solution used in this hand-
book, the maximum marginal return method.
                                      29

-------
 Formulation  of  The  Problem

        There are  three  resource  allocation  problems  that  the monitoring
 agency  might want solved :

        1.  Given  a  certain amount of  resources  (i.e., budget), determine
           how  the  monitoring resources should  be allocated to minimize
           the  allocation  criteria, (i.e., minimize  the Probability of
           Undetected Violations, Cost of Undetected Violations, or
           Magnitude of Undetected Violations).

        2.  In setting up a monitoring program,  determine what level of
           resources is needed to insure that  an allocation criterion
           is below a given level.
        3.  Given  an increment of monitoring resources, determine how to
           allocate these  additional resources  and the resulting improve-
           ment in  the  monitoring system performance.

 In the  remainder  of this subsection, these problems are formulated math-
 ematically.

        The allocation criteria are all of the form
                n
                    .
-------
no violation is observed at the i   source, n  is the number of sources,
                                .             s
s^ is the number of times the i   source is monitored, and C. is defined by
the criteria used as explained in Section 2.4.  The total monetary cost to
monitor all the sources, where the i   source is monitored s. times is
                n
       R(s)  =  £ rS                                                (2.13)
where r. is the cost of monitoring source i once.  r. is made up of man-
power, transportation, equipment and laboratory costs.  The actual values
of these costs will vary from agency to agency and as a function of time.

       Upper and lower bounds on s. may also be given, i.e.,

       £. < s. < L.                                                  (2.14)
        i -  i -  i

       To see when a monitor may desire to specify bounds, consider the
case where, from ambient monitoring, it has been observed that in a certain
river section  the level of a particular constituent is higher than usual.
Then, one might want to check at least once during the next period all  the
effluent sources that might have caused this.   In this case a lower bound
of one is set on the corresponding sampling rates.  Also,  consider the
case of an effluent having a small expected violation cost.  Based upon
the existing information, it will have a low priority for  being monitored.
In order to prevent information from becoming obsolete, one can stipulate
that it has to be monitored at least once during a certain period of time.
An upper bound might be desired if the monitor does not want to sample
any source more than a given number of times.   This should be true, for
example, if the monitor were required to visit a certain number of sources.
Another situation can occur when there is a known polluter (e.g., one
against which there are sufficient data to initiate legal  action or one
which is improving its treatment according to an approved  long-term plan);
                                    31

-------
the monitor may then decide not to survey this source frequently because
the result is predictable.  In this case, the upper bound for s. would
be set to some specified value.

       The three optimization problems can now be specified.

           Problem 1:   minimize C(s)
                        subject to R(s) £ B
                        I £ s £ L

where B is the monitoring agency's budget and £=(£,...,£  ) and
                                                              g
L  = (L,, ..., L  ) are upper and lower bounds.
       1        ns
           Problem 2:   minimize R(s)
                        subject to C(s) < A
                        I a s i L

where A is the maximum "cost" of undetected violations allowed.

       Problem 3 is of the same form as Problem 1, except B includes the
additional resources and L specifies the sampling frequencies under the
original allocation.  The decrease in "cost" between when the original
budget is used and the new budget is used  is the system improvement.
The additional samples specify where to use the additional resources.

Method of Maximum Marginal Return - - Problem Solution

       The optimization method used to solve the resource allocation
problems is the method of maximum marginal return.  It is particularly
suited for these problems since it solves all of them in the same manner.
It is based on the following intuitive idea: the best place to allocate
                                    32

-------
one unit of resource is where the marginal return (the decrease in damage
cost - in our case, undetected violation "cost" - accrued by using that
unit of resource) is greatest.  Therefore, by ordering the marginal returns
in descending order, one obtains a priority list with the samples  having
highest priority on top.

       To be precise, the marginal return accrued when the sampling rate
on the i   source is increased from s.-l to s. is
                                     i       i
                  VS.-D - c.cs.)
In view of the convexity of C., these marginal returns are monotonically
decreasing with s., i.e.,
The priorities of allocation are obtained by simply ordering these
marginal returns.  If the ordering obtained is, for example

       V2(l) > y1(l) > u2(2) > u3(D ...

then effluent source 2 is sampled with highest priority,  then effluent
source 1, then again effluent source 2, then effluent  source 3,  etc.  Following
this, a relation between the minimized "cost" of undetected violations  and  the
corresponding resource cost is obtained.  Therefore,  this method solves simul-
taneously the problem of minimizing the undetected violation "cost"  subject  to
the total budget and the minimization of the budget subject to a given  "cost"
of undetected violations.
                                      33

-------
        The  problem  of  allocating  an  increment  of  resources  to  maximize
 the  improvement  in  an  existing monitoring  system  is  solved  as  follows:
 set  up  the  priority list as described  above, and  remove  from the  list
 those samples that  have been  allocated.  The remaining items on the  list
 are, in descending  priority,  the  ones  that  should be monitored with  an
 increase in resources.

 2.7     SIMPLIFIED EXAMPLE
        The  performance of the Resource Allocation Program is demonstrated
 in this section, using a simplified example.   Initially, it is assumed
 that there  are four sources to be monitored, each having four months of
 self-monitoring data available from which to obtain  the initial statistics.
 The  initial self-monitoring data assumed are shown in Tables 2.5a through
 2.5e.   The  data have been abstracted from real data  that were used for the
 demonstration case of [1] .  Using the procedure outlined in Section 2.5 and
 Section 2.3 of [1], Tables 2.5a through 2.5e present the initial statistics
 obtained from the data.  The estimated mean and estimated standard deviation
 are  the monthly estimates.  For Source A, the  sample size of the effluent
 constituents for a single month is 2; therefore, the data in months 1 and 2
 and months  3 and 4 have to be aggregated, as discussed in Section 2.5.
Thus, only  two estimates of the mean and two of the variance are given in
Tables  2-,5d and 2.5e.  Tables 2.6a through 2.6e also show how the estimates
of the mean and standard deviation are sequentially updated as  the monthly
estimates are combined to obtain the estimates to be used in the Resource
Allocation Program.  For this case the design parameters k  and k , which
                                                          n      V
determine the degree of the discounting of past information, have been set
 to 3.  The updated mean and variance for month 2 are therefore  the combined
estimates derived from the 1st and 2nd monthly estimates.  The  updated
mean and variance for month 3 are the combination of the updated estimates
 for month 2 and monthly estimate for month 3.   The same process is repeated
 for month 4, yielding the initial statistical description to be used in
the program.
                                    34

-------
Table  2.5a   SELF MONITORING DATA FOR SOURCE 1



Month

1
2
3
4


Mean
source
tlou.
Ml/day
0.90
1.10
1.20
0.85
Parameter: pH Max
Eff. stundnrJ: 9
Distribution: Normal

Mean
8.S
7.6
8.3
8.1
Max
10.6
9.0
9.B
9.5
Somile
size
20
22
22
20
Parnneter: pi! Mln
Eff. standard: 6
Distribution: Noranl

Me.in
8.5
7.6
8.3
B.I
Hln
6.0
5.4
6.4
6.4
San. Die
size
20
22
22
20
Parameter: Lead
Eff. standard:2 kg
Distribution: Noreal

Mean.
0.41
1.08
1.09
0.52
MAX.
kg
1.0
1.7
6.3
1.8
Sar-.ple
size
20
22
22
22
Table 2.5b  SELF MONITORING DATA FOR SOURCE 2



Month

1
2
3
4


Mean
source
tlov.
Ml/day
0.80
0.78
0.87
0.65
Parameter: Chromium
Zff. standard: 0.45 kg
Distribution: Normal

Kcan,
kg
0.216
0.313
0.214
0.132
Max,
kR
0.808
0.867
0.620
0.255
Sanple
size
18
19
21
14
Parameter: Copper
Eff. standard: 1.5 kg
Distribution: Lognoreal

Mcant
V.R
0.524
0.374
0.364
0.110
Max
kg'
1.89
1.87
1.25
0.42
S.ir.ale
size
IB
19
22
14
Parameter: Fluoride
Eff. standard: 30 kg
Distribut lea: Noraa!

Mean
kg
24.4
25.4
24.7
14.0
Max .
kg
31.4
31.9
31.0
31.0
Sanple
size
18
19
22
11
Table 2.5c  SELF MONITORING DATA FOR SOURCE 3
Month
1
2
3
4
Mean
source
t low,
Ml/day
105
110
109
108
r'jraraeter: BODj
Erf. standard: 3500 kf,
Distribution: Nomal
Mean ,
1165
900
1395
1060
Max i
kS
2115
2115
2880
2385
Sa-.?le
size
30
31
30
31
Pnr.iinetcr : Phosphate
Eff. st.iml.ird: 300 kg
Distribution: Loguomal
Moan ,
kv.
178
171
171
68
N.ix ,
658
338
500
275
SsT?ee
30
31
30
31
1'ar.imet rr : Sus. Solids
!'f f . Ft.indard: 4050 kg
Distribution: Logno rn.i 1
Mean .
ki:
2430
1665
3240
2160
Mnx ,
6030
5130
10935
4590
Sample
size
30
31
30
31
Parane ter :
Dissolved
oxygen
Me.in i
3.9
3.8
4.2
4.1
Sample
30
31
30
31
                      35

-------
Table 2.5d  SELF MONITORING DATA FOR SOURCE 4, PIPE 1
Month
1
2
3
4
Mean
source(
tlov
Ml/day
0.35
0.26
0.29
0.30
Paraneter: Phosphates
EfC. 5car.ii.ird: 0.6 kg
Distribution: Normal
Mcjn,
kg
0.15
0.30
0.31
1.20
Max,
kg
0.24
0.36
0.36
2.56
Sample
size
2
Z
2
2
Parameter: Sue. Solids
Eff. standard: 25 kg
Distribution: Normal
Nca (i ,
kg
12.0
U.6
16.4
11.0
Max,
kg
18.9
18.9
18.0
15.3
Sample
size
2
2
2
2
Table 2.5e  SELF MONITORING DATA FOR SOURCE 4,  PIPE 2
Month
1
2
3
4
P/traoeter: Phosphates
Distribution: Normal
Est.
mean ,
kg
„
3.20
-
4.35
Esc.
at.dev. ,
kg
_
0.526
-
4.096
Updated
r.ean ,
kg
„
-
-
3.78
Updated
st. dev. ,
k«
_
-
-
2.719
Parameter: Suspended Solldfl
Distribution: Normal
Est.
mosn,
kg
_
88.0
-
62.0
Eat.
at . dev. ,
kg
_
156.3
-
62.3
Updated
neon ,
kg
„
-
-
75.0
Updated
St. dev. ,
kg
.
-
-
108.2
                        36

-------
Table 2.6a  INITIAL STATISTICS FOR SOURCE 1


Month


1
2
3
4
Parameter: pH Max
Distribution: Normal

Est.

8.5
7.6
8.3
8.1

r.st.

1.12
0.73
0.78
0.74

Updated

_
8.03
8.12
8.12

Updated

„
1.06
0.98
0.92
Parnrofctrr: ' pH Min
Distribution: Normal

Est.

8.5
7.6
8.3
8.1

Esi.

1.33
1.15
0.99
0.90

Updated


8.03
8.12
8.12
Updated


1.33
1.22
1.14
Parameter: Lead
Distribution: Nonaal

Est.

0.41
1.08
1.09
0.515
Est. st.

0.31
0.32
2.72
0.67
Updated
mean, kg

0.76
0.87
0.78
Updated
St. dev., kg

0.51
1.62
1.45
Table 2.6b  INITIAL STATISTICS FOR SOURCE 2
Month
1
2
3
4
Parameter: Chromium
Distribution: Normal
Est.
mean .
Vg
0.216
0.315
0.214
0.132
Est.
Bt. dev.,
Vg
0.321
0.297
0.214
0.070
Updated
dean ,
kg
.
0.266
0.247
0.218
Updated
st. dev. ,
kg
_
0.308
0.277
0.246
Parameter: Copper
Distribution: Lognoroal
Est.
log k.g
-0.437
-0.6S5
-0.570
-1.146
Est.
loE kg
0.369
0.474
0.337
0.404
Updated
log kg
_
-0.565
-0.567
-0.711
Updated
lofc kg
_
0.443
0.403
0.502
Parameter: Fluoride
Distribution: Normal
Est.
Kg
24.4
25.4
24.7
24.0
Est.
kg
3.79
3.49
3.29
4.17
Updated
kg
-
24.9
24.8
24.6
Updated
kg
-
3.62
3.46
3.61
Table 2.6c  INITIAL STATISTICS FOR SOURCE 3






1
2
3
4
Pornmetcr: BOH.

Distribution: Norcval
Est.
oean,
kg
1165
900
1395
1080
Est.
st . dev. ,
kg
470
598
734
642
Updated
mean.
ks
	
1030
1150
1133
Updated
st .dev. t
kg
	
555
648
643
Parameter: rhnppli.-ite

Distribution: Loynorofll
Est .
ce.in ,
log kc
2.12
2.20
2.12
1.85
Est.
st .dev. ,
log kg
0.339
0.157
0.268
0.286
Updated
cr.e.in,
log kg
	
2.16
2.16
2,08
Updated
st .dev . ,
lor, kg
	
0.265
0.264
0.313
r.ir.irorter: Suspended Solids

Distribution: Lofinormjl
r.st.
jnc.1 n ,
log kp.
3.33
3.13
3.40
3.30
Kst.
st . dev. ,
IOR ke
0.218
0.282
0.312
0.175
Updated
irriin ,
IOR kS
	
3.23
3.29
3.29
Updated
:;t .dev. ,
log kg
	
0.277
0.302
0.274
P.ir.ine t cr :

oxycen
Est.
mean ,
Tf/\
3.90
3.80
4.20
4.10
V'pd.it ed
rean,
r.-./ 1
—
J.85
3.96
4.00
                  37

-------
 Table 2.6d  INITIAL STATISTICS FOR SOURCE A, PIPE 1
Month
I
2
3'
4
Parameter: Phosphates
Distribution: Normal
Esc.
oean ,
kg
-
0.225
-
0.755
Eet.
•t.dcv. ,
kg
-
0.101
-
1.356
Updated
mean ,
kg
-
-
-
0.490
Updated
St. dev. ,
kg
-
-
-
0.925
Parameter: Suspended Solids
Distribution: Normal
Ent.
mean ,
k£
-
13.3
-
13.7
Esc.
st .dev. ,
kg
-
4.21
-
3.23
Updated
mean ,
kg
-
-
-
13.5
Updated
at. dev.,
k&
-
-
-
3.3S
Table 2.6e  INITIAL STATISTICS FOR SOURCE 4,  PIPE 2
Month
1
2
3
4
Mean
source
!low,
Hi/day
0.90
1.01
1.09
1.00
Pjrancter: Phosphates
Eff. st.ino.ird: 3.5 kg
Distribution: Normal
Mean ,
2.9
3.5
2.9
5.8
Max i
kg
3.2
3.9
3.1
9.8
Sample
2
2
2
2
Parameter: Sufi. Solids
Eff. standard: 80 kg
Distribution: Norcal
Mean ,
kg
158
18
93
31
Max ,
296
26
145
33
Sarole
size
2
2
2
2
                       38

-------
       The expected damage  and probability of violation obtained from
the data are  shown in Table 2.7, along with the estimated source flow
and the stream  flow.  For this case, the upstream concentration was
assumed to be at a level causing zero damage, and the distributions of
the various parameters were assumed uncorrelated.  Certain of the
entries deserve some comment.  Source 3 is a large sewage treatment
plant.  From  the table, the impact of BOD  and phosphates is large; how-
ever, the standards are also large and therefore the probability of
violation for the parameters is small.  Source 4 has a relatively small
impact on the stream (i.e., small expected damage); however, the standards
have been set so that the probability of violation is very large.  The
resources required to sample the sources are given in Table 2.8, and the
priority list is given in Table 2.9.  For the purposes of this example,
it was assumed that the sources could be sampled between 0 and 10 times.
From the table, one sees that sources 1 and 3 should be sampled with
higher priority than sources 2 and 4.  This is due to the much larger
expected damage from the former sources.  Source 4 appears relatively
early in the list, but most of the samples have low priority.   This is
because the probability of violation is very large and therefore the
chances are that the source will be caught in violation after  one or two
visits.  Further sampling is therefore not necessary.   Source  2 has a
small expected damage and a fairly large probability of no violation
resulting in a low sampling priority.  Table 2.9 also gives the marginal
return, "cost" of undetected violations and resources used.   The marginal
returns are decreasing (the list has been ordered in just this manner).
The "cost" of undetected violations is decreasing, and the resources
required are increasing as more sources are sampled.

       If only, say $10,000 were available for monitoring, then only the.
sources with priority 1 through 17 would be monitored.   The  sampling
frequencies for this case are shown in Table 2.10.   If,  on the other
hand,  a maximum allowed "cost" of undetected violations  of say,  100 were
specified, then sources with priorities 1 through 10  would be  sampled.
                                    39

-------
                            Table 2.7  EXPECTED DAMAGE AND PROBABILITY  OF  VIOLATION
Source
1
2
3
4
Pipe
1
1
1
1
2
Esc. source
flow,
Ml/day
0.961
0.845
108
0.297
1.016
Stream
flow,
Ml/day
100
320
525
300
Parameter
PH
Lead
Chromium
Copper
Fluoride
Phosphate
Suspended Solids
Phosphates
Suspended Solids
Phosphates
Suspended Solids
Expected
damage
0.29
1.60
0.08
0.12
0.00
3.22
3.64
0.37
0.29
0.03
Probability
of no viola-
tion - P.,,%
80.0
80.0
82.6
96.1
93.1
100.0
97.6
87.8
100.0
51.8
54.4
46.0
Expected
damage for
source - C
1.60
0.12
3.64
0,29
Probability of
no violation
for source
64.0
74.0
85.6
13.0
-p-
o

-------
Table  2.8  RESOURCES NEEDED  TO SAMPLE
Source
1
2
3
4
Field and
office costs
$525
$525
$525
$525
Laboratory
costs
$10.50
$23.00
$38.00
$30.00
Total Cost
-r .
i
$535.50
$548.00
$563.00
$555.00
                 41

-------
Table 2.9   PRIORITY LIST OF SAMPLES FOR SIMPLIFIED EXAMPLE
PRIORITY
               SOURCE
        COST OF
>'Al     UrOETErTI
 X100   VIOLATIONS
1
2
3
U
5
6
7
B
9
10
11
12
13
10
15
16
17
1ft
19
20
?1
22
23
2"
2.5
?b
27
28
29
30
31
32
33
31
35
36
37
3R
39
00
1
3
3
J
3
3
3
a
1
3
3
3
1
3
3
1
1
1
u
2
1
2
2
1
2
1
2
2
2
i\
2
2
2
 3
,0231 5'-i9£
,01M1 1 U
. 8 0 '} ?. 6
,50^55
. « o i a i
.7997?
. 7992?
. 7991 T
, 799 1 tl
.799JU
7 Q Q \ /J
"T Q Q * •!
,7991'J
535.50
1095.50
1 f55 . 50
2191 , CO
?75 1 . f*0
3311.00
3*71 , f. ?
ca
-------
The sampling frequencies for this case are shown in Table 2.11.  The
priority list in Table 2.9 also'shows when the return from monitoring
(i.e., the marginal return) starts becoming negligible; the return,
in this case, for monitoring more than 25 sources is very small.
                                  43

-------
     Table  2.10 FINAL ALLOCATION  GIVEN MONETARY BUDGET

                   FT'AL  ALLOCATION

                   BUDGET  11000.00
SOURCE
1
2
3
a
MJN; NO.
0
0
C
0
•nx NO.
SAMPLES
10
10
10
10
TITS
SAMPLED
7
0
10
i
COPT OF
RtSCU^CtS 0'\0':HCTHri
USEO VIOL ATI CVS
37U8,50 .07081
.00 ,U7i3
5600.00 .77376
55b,OC .03767
TOTAL ^ESOU^CFS ;JSEO   9903.50
Flk
-------
                                SECTION 3
          GENERAL REQUIREMENTS FOR MANPOWER, DATA, AND COMPUTERS
3.1     INPUT DATA REQUIREMENTS AND PROCEDURES

        The types of input data required by both the hand calculation
approach and the computer approach are indicated in Table 3.1.  These
data types have been classified into categories in this table, which al-
so provides some indication of their relative availability.  The data
needs, availability, adequacy, and preparation procedures required are
discussed below for each category.

Standards

        Essentially, the same data on effluent standards is required by
both approaches.  The computer approach is somewhat limited in the range
of units in which the data may be expressed (see Table 5.1).  Therefore,
conversions into such units must be completed, where necessary, before
input to the computer, while the hand approach includes any needed con-
versions (units unlimited) as part of the procedure.  The required data
should be readily available since they provide the basis and incentive
for the monitoring; the new National Pollutant Discharge Elimination System
(NPDES) required to be initiated by 1 July 1977, should provide a strong
added impetus to standard setting.

        Data on ambient receiving water quality standards may be needed
only by the hand calculation approach, and then only when a certain option
is chosen.   Under this option, the standard is only used to develop a

-------
              Table 3.1
Summary of Input Data Types
Data Type
STANDARDS
Effluent
Receiving Water
EFFLUENT CHARACTERISTICS
Statistical Distribution Types
Constituent Correlations
MONITORING DATA
Self -Monitoring
Compliance Monitoring
ENVIRONMENTAL CHARACTERISTICS
Environmental Damage Functions
Upstream Constituent Concentrations
BOD-DO Transfer Coefficients
DO Saturation Concentrations
COMPLIANCE MONITORING COSTS
Sample Collection
Sample Analysis
DESIGN PARAMETERS
Discount Factors
Procedure
Requiring
Hand

A

/

/



/

Computer

/

/

/

J

/
/
Relative
Availability

High
High

Low
Low

High
Medium

Medium
High
High
High

Med ium
High
User
Determined
Need depends upon options selected
                                    46

-------
weighting factor; therefore its value is less critical, and may be esti-
mated if not legally established.  For this purpose, there is probably
sample information available on receiving water quality standards which
have been established or recommended by various government agencies.  Any
preparation of the data needed will again be internal to the hand cal-
culation approach.

Effluent Characteristics

       Needed effluent information includes a determination of the statis-
tical distribution types which best describe the daily constituent loading
rates, limited to normal and lognormal, and the correlations (full or none),
between the constituents at a given source.  The requirements of both ap-
proaches are identical.

       Very few determinations of such statistical distributions have
been made to date.  Therefore, while this would appear to be an area
where availability could be greatly improved, the cost would clearly be
great and the benefits small, since analysis and sensitivity studies have
indicated that errors resulting from insufficient information will gen-
erally be quite small (see Section 4, Task 1: Discussion).   Furthermore,
a good approximation method has been developed.

       Little information is also likely to be available on the cor-
relations between the various constituents.  A similar situation exists,
where the results are not very sensitive to error in this area, where it
would be very costly to reduce the errors, and where guidance for select-
ion is provided (see Section 4, Task 9: Procedure, Step 2).

       The guidance provided in the hand approach (Section 4, Tasks 1
and 9) may also be used to help the user prepare this input data for the
computer approach.
                                    47

-------
 Monitoring Data

         Self-monitoring  and  compliance  monitoring  data  are  required by
 both the approaches.   Self-monitoring data for  the computer approach must
 have been preprocessed to  yield  the  maximum (or minimum), mean,  and sample
 size for each  separate month of  all  data  collected;  data preprocessing  is
 optional for the  hand  approach,  which does not  require  separate  monthly
 inputs,  nor does  it need to  re-input data inputted to previous applic-
 ations of this allocation  procedure. Another difference between the two
 procedures is  that water discharge rates  in receiving streams are required
 only by  the computer approach; effluent discharge  rates are required in
 the  computer approach, and in the hand  approach only to determine the
 constituent loading rates.

        Compliance monitoring data are entered only on an item-by-item
basis for both approaches.   However,  the month corresponding to  each  item
of data must be provided for the computer approach.  With regard  to up-
dating and effluent discharge rates,  the same difference between  the  two
approaches apply as for self-monitoring  data.

         For both  these types  of  data, the acceptable units  of input data
 are  more limited  in the  computer approach (see  Table 5.5),  than  in the
 hand calculation  approach; some  preprocessing may  be needed with the
 computer approach, while unit conversions form  part of the  hand  approach.

         The availability of  self-monitoring data should of  course, be as
 high as  the surveillance agency  wishes  to make  it, within reasonable
 and  justifiable limits.  The  availability of compliance monitoring data
 will probably  depend mostly upon the resources  made available to the
 surveillance agency.
                                   48

-------
Environmental  Characteristics

        Receiving water data are required only by the computer approach,
since the impact of discharged effluent constituents upon the receiving
waters are considered directly only in that approach.

        An estimate of streamflow immediately upstream of each effluent
source is needed.  Streamflow data is usually available from the U.S.
Geological Survey on a daily basis.  Since only one  "design" streamflow
can be used, a single worst case, low streamflow is  suggested.  For design
purposes, the seven day, ten year low flow is often available, and is a
reasonable design flow for this procedure.

        Information on environmental damage functions for each constituent
representing the variation of environmental damage with constituent con-
centration, has been collected and organized to a useful extent (see SCI's
first report [1], Section VI.2).  When improved damage/water quality
information becomes available, and it is desired to  input new damage
function data  (i.e., override the program's default values in Tables 5.2
and 5.3), some preparatory re-scaling may be needed.  Both the concentration
levels and the environmental damage values may be changed (input variables
"DMG", "DAMAGE", "S", and "SSPH").
        Some idea of the upstream environmental damage (or corcp.rfration)
is necessary as input for the computer procedure.  Since only one overall
value is used, the user must examine his damage functions and pick that
damage level which represents the "average" upstream damage for all con-
stituents of all sources (input variable "ICOPT").

        The selection of the required BOD-DO transfer coefficient may be
readily achieved through the use of Figure 3.1 and  Figure 3.2 (from [29]).
                                    49

-------
        Depth  (fc)
        Streamflow  (ft  /sec)
100.0
 10.0
  1.0
  0.1
                Creeks £
                Shallow
                Streams
                 10-20
                  1-10
Upstream
Feeders
 2-5
10-100
Interme-
diate
Channels
            5-10
          100-1000
Main
Drainage
Rivers
          10-20
          1000-
          10,000
                             Large
                             Rivers
          20-30
            >
          10,000
Impounded
Rivers
                                                                 30
                 1.0
               10

          DEPTH IN FEET
                                                                100
NOTE: H = Depth (ft.)
      Q = Streamflow (ft /sec)
       Figure 3.1      Assimulation Ratio () as a Function of Depth

                                     50

-------
Figure 3.2      Dissolved Oxygen Response as a  Function of  Water Body Type and Assimulation
                Ratio ()

-------
Likewise, the required dissolved oxygen saturation concentrations may be
obtained from Figure 3.3 (also from [29]) given the water temperature
and chlorides content (salinity).

Compliance Monitoring Costs

        These costs are required in much the same way by both approaches;
one minor difference is that the computer approach lumps together travel
costs for samples taken from different pipes (outfalls) belonging to the
same source, while the hand approach does not.   The development of these
cost data must remain the responsibility of the surveillance agency, which
should be able to extract the information from records hopefully kept on
past monitoring operations.  Sample analysis costs for the various con-
stituents should be easily available from the water quality laboratory
which performs the analyses.

        The hand approach (Section 4,  Task 13)  lists the various component
costs required.  These must be combined together into separate analysis
costs (per constituent) and base costs (per number of pipes at a source)
before input to the computer approach.

Design Parameters

        There are several design parameters used in combining monitoring
data for the computer procedure.  First, there is a parameter used to
exponentially smooth the monthly effluent discharges at a source into a
single value.  This parameter (input variable "ALPHA") should be between
0. and 1. where an ALPHA close to 0. represents the case where each new
piece of data is heavily weighted with respect to older data and an ALPHA
close to 1.0 represents the case where newer data is very lightly weighted
with respect to older data.
                                   52

-------
§
M
H
Z
w
§
I— I
I
I
w
X
o
Q
W
O
            CHLORIDES  (ppm)


       *^5
           0&3
    1.0
                                            20        25        30


                                               TEMPERATURE, °C
                Figure 3.3
Dissolved Oxygen Saturation Versus Temperature and Chlorides

-------
        A second design parameter  is  the discount factor used in in-
cluding compliance monitoring data.   This factor, called "y", was ex-
plained in  SCI's first report ([1], Section V.2).  The corresponding
input variable is "GAMMA" and the  value should be greater than 1.  The
larger the  input value of "GAMMA"  is,  the more weight that is given to
compliance  monitoring data  in comparison to self-monitoring data.

        Other discount factors are "k  " and "k " (from [1], Section V.2),
                                      n        v
where the corresponding input variables are "KETA" and "KNU".  The larger
the values  of these variables are, the more heavily weighted is past data
with respect to the current month's data in combining monthly constituent
self-monitoring data.
        Finally, the values of "h " and "h " must be considered (from [1],
Section V.2).  Since "h " is considered to be "1" and is not input, only
"h " need be considered.  It was recommended that this be set according
to Table A.3.3 in [1] (use an "average" sample size for the source in
reading the table).   The input variable is "ENU".
3.2     COMPUTER AND MANPOWER REQUIREMENTS

        The requirements for manpower and hardware differ substantially
between the hand and computer calculation techniques.  Generally, the
hand calculation option requires more person time to implement, but re-
quires only an inexpensive hand calculator.   On the other hand, the
computer calculation option requires a large scale digital computer with
marginally less person time for programming and interpretation of results.
The computer calculation option becomes more cost-effective as the number
of effluent sources and constituents to be considered increase.  If the
number of effluent sources is small, say less than 10, the hand calculation
technique becomes less tedious and more cost-effective.
                                     54

-------
        The hand calculation's efficiency depends more upon the efficiency
of the  tester  than does  the computer.procedure.  Numerous opportunities
exist for  errors to creep into the early calculations.  It would be quite
easy to carry  these errors through the complete analysis only to discover
the necessity  of repeating much of the analysis.

        The same opportunities for error exist with the computerized pro-
cedure, but correction is a simpler process which would require substantially
less personnel time.

        For the test case described in Section 6, seven effluent sources
and seven  constituents were used in both the hand and computer calculation
options.   Approximately  60 hours of professional man-time were spent per-
forming the hand calculations and determining the final allocation of
monitoring resources.  Nearly half of this 60 hours was spent in initial
data extraction and tabulation, which must also be done to derive inputs
for the computer procedure.  This was performed by an SCI staff member
previously unfamiliar with the Resource Allocation Program.

Other Differences Between the Computerized and Hand Procedures

        The two major areas of difference between the hand calculation
approach and the computerized procedure (see Sections 5 and  7) are in the
resource allocation criteria used and in the methods of using the newly
entered self-monitoring and compliance monitoring data.

        Among  the resource allocation criteria used in the computerized
procedure  is the total expected environmental damage from undetected
violation  (see Section 2.4, Criterion Number 2).   The expected environ-
mental damage  computation is quite a lengthy procedure, more appropriate
for computers, based on the expected damage per source and the expected
damage per constituent.  This in turn is computed from a "damage function"
for each constituent, which attempts to quantify environmental damage
                                     55

-------
resulting from various concentrations of the constituent in the receiving
waters.  Thus, the receiving water concentrations caused by each con-
stituent in an effluent must be determined, requiring a knowledge also of
the volume flowrates of both the source and the receiving stream.  This
criterion is too complicated for use in the hand calculation procedures.

        The resource allocation procedure is greatly simplified in the
hand calculation approach by the use of a different resource allocation
criterion: the total expected extent of undetected violation (discussed
in Section 2.4 as Criterion Number 3).  The extent of violations is com-
puted from either the amount by which the effluent standards are exceeded,
or the number of times by which they are exceeded, at the user's option.
This has the effect of directing compliance monitoring towards those dis-
chargers with the more serious violations of the standard, whose conviction
is easier.  It also eliminates all the calculations required to assess the
impact on the receiving waters, and in particular, prevents consideration
of the impact of BOD loads upon dissolved oxygen in the receiving waters.

        Exclusion of the damage function criterion from the hand calculation
approach also enables the treatment of sources with multiple outfall pipes,
each with its own effluent standards, to be greatly simplified; the com-
puterized procedure requires many more involved computations to determine
the environmental damage caused by one source with multiple outfalls.   For
the purposes of this entire hand calculation approach,  a source is defined
as a separate outfall or discharge pipe, with its own set of effluent
standards.  This differs from the computerized procedure, in which a source
may have a number of outfall pipes each with its own standards.  The effect
of this difference appears in the resulting sampling rates,  since with the
computerized approach, all pipes of one source would be sampled at the same
time (economizing on travel costs), whereas in the hand calculation approach,
each pipe will probably be assigned a different sampling rate (economizing
on compliance monitoring with low marginal returns).   Since  actual moni-
toring programs have historically been implemented on a source  basis
rather than an individual pipe basis,  this may be a slight  deficiency  in
the hand calculation procedure.

                                     56

-------
        Another major area of difference between, the hand and comput-
erized procedures is in the methods of using the newly entered monitor-
ing data.  In the computerized procedure, the self-monitoring data are
entered monthly, aggregated across months if the number of data are too
small, and then used to estimate monthly statistics.  The compliance
monitoring data are also entered monthly, incorporated into the monthly
statistics, which are then combined into cumulative statistics.  In the
hand calculation approach the same general procedure is used, but the
data are not divided up into monthly subsets.  Thus, the sample sizes
are much larger, and there is no need to aggregate across months or
combine monthly statistics.  The principal effect of this difference is
in the time discounting of the data.  In the hand procedure, only data
prior to the last monitoring period may be discounted, or down-weighted,
whereas, in the computerized procedure data as recent as that for the
month before last, may be discounted if desired.
                                  57

-------
                                 SECTION 4
                  USER MANUAL FOR HAND CALCULATION APPROACH
4.1    INTRODUCTION

       Section 4 constitutes a stand-alone handbook for the hand applic-
ation of resource allocation methods for effluent compliance monitoring.
       This handbook is intended for use in determining for an effluent
monitoring agency the rate (or frequency) with which it should sample
each effluent source within its jurisdiction.  This sampling rate will
specify the number of samples to be taken at each source during a forth-
coming monitoring period, but it will not allocate their timing within
the period.

       The criterion for determining the sampling rate is the "degree of
undetected violations".  This is explained further in Section 2.2 and
Reference  [1].  The sampling rate may be subject to constraints on the
total resources available for monitoring  and on the maximum and minimum
sampling rates specified by the user for each source.  The user may choose
to either:
       1.  Expend the remaining monitoring resources so as to minimize
           the total degree of undetected violation from all sources;  or
       2.  Bring the total degree of undetected violation from all sources
           below some specified limit while minimizing the monitoring  re-
           sources spent.
                                    58

-------
       Since conditions in the jurisdictional region will undoubtedly
change with time, and since information on the dischargers may improve
with time as more data is collected, the rate allocation should be re-
designed from time to time in the future, each time incorporating all
new information available.  The user therefore selects a suitable length
for the next compliance monitoring period, e.g., 3-, 6-, or 12-months.
Since some time is required to analyze the data and design the allocation
procedure for the next monitoring period, there must be a lag period be-
tween data collection and application of the new procedure.  The timing
of the various monitoring and analysis functions is illustrated in an
example monitoring sequence in Figure 4.1.  Some of the implications of
seasonal variations in effluents upon the selection of monitoring periods
are included in the discussion under Task 3.

       The user may wish to apply this allocation procedure for any of
several reasons, such as:
       A.  For the preliminary design of a new effluent compliance
           monitoring system.
       B.  To compare the effectiveness of an existing surveillance
           system against that produced by this procedure.
       C.  For program planning, to evaluate (on the basis  of the re-
           source allocation criterion) the overall level of surveillance
           required in a basin, region, or nation.
He may prefer the hand calculation procedure outlined in this Section to
the alternative computerized procedure (see Sections 5 and 7), for such
reasons as:
       A.  The lack of staff or facilities to operate the computerized
           procedure.
       B.  The wish to become intimately familiar with the procedure, be-
           fore implementing it on a computer.  (However, there are some
           differences, which will be discussed below.)
       C.  The small size of this surveillance operation does not justify
           the use of a computer.
                                   59

-------
         Start Allocation Procedure
Start Compliance Monitoring Based on Allocation Procedure



1



2a



2b



3

Month
Collect
Compliance
Monitoring
Data Set Number
Update Compliance
Monitoring
Statistics
Through Set Number
Design
Compliance
Monitoring
Procedure Number
Apply
Compliance
Monitoring
Procedure Number



'OLD'



'OLD'



'OLD'



'C

1






'OLD'



Pl



)LD'

2
















3
















4


Dl











Pl

5
















6
















7





n
Ul



P2





8
















9
















10


D2











P2

11
















12
















13





n
U2



P3





cr>
o
        Figure 4.1      Example of Monitoring Sequence.   This assumes: (1)  a six month compliance monitoring

                        period, and (2)  a one month lag  time to complete data analysis and to design the

                        procedure for the next monitoring period.

-------
       The user should be familiar with basic engineering statistics and
mathematics up to, but not includin-g, calculus.  He should also have
available a desk calculator or similar computational device.  Once the
procedure is well understood, a programmable calculator could undoubtedly
be used to provide added convenience with the repetitive computations.

       Many of the technical terms used are explained in the Glossary at
the back of this handbook.

Limitations

       This hand procedure is limited to the preliminary design of effluent
compliance monitoring systems for which the primary goal is the minimization
of the total expected extent of undetected violations (or optionally,
minimization of the number of undetected violations).  The methods require
that the effluent standards be expressed as simple thresholds for each
constituent (maximum or minimum values, or both).

       This hand procedure does not include considerations of monitoring
system implementation costs, accessibility, maintainability, reliability,
and other similar practical engineering factors.

Assumptions

       The methods employed in this hand procedure are based on the follow-
ing assumptions:

       1.  Only one set of effluent standards applies to each source.
       2.  Concentrations at various sampling times are independent.
       3.  The loading rates of the various constituents at one source
           may be taken to be completely dependent (correlated) or
           completely independent.
                                     61

-------
       4.  The frequency distributions of daily loading rates of each
           constituent may be represented by either a normal or a log-
           normal distribution.
       5.  Effluent standard violations are the only concern.  Therefore,
           any damage to the receiving waters caused when source con-
           stituents do not violate the effluent standards cannot be con-
           sidered.
       These assumptions are explained in more detail in the areas of
Section 4.2 where they are employed.

Other Requirements

       Another requirement of the hand procedure employed here is that:
           Data should be available on the component cost for transport-
           ation, sampling, materials, labor, analysis, and reporting
           which together comprise the total cost to take a 24-hour com-
           posite (compliance monitoring) sample at each source within
           the area of jurisdiction.
Overview of the Hand Calculation Approach

       The quantitative preliminary design procedure used in the hand
calculation approach consists of a number of individual tasks.  These
tasks are numbered, and their relationships indicated, in Figure 4.2.
Each task is relatively self-contained; the objective, outputs,  inputs,
and procedure required for each are discussed separately in the  following
subsection.

       The 20 tasks have been grouped in Figure 4.2, into the four
principal activity areas identified in the original formulation  of this
monitoring resource allocation procedure (see [1], p. 97).  The  first
three activities comprise the overall allocation procedure.   The fourth
                                   62

-------
INPUTS

Assign, conntit. distribs.


Effluent standards


New self-mon. data , 	 *,
j


New cor.pli-rion. data T *"











Init. won. rss. alloc'n.


Cost/sample, ea. source










I
1
1 	
NHTF • TVi 0 niiml-\£}r- -in Kr\vQO -i


1





T















1 1























•t 	 1


* '



























,a (-_







<


1

*• c
1





,
1


i r
•ta T

i
ir 1

i


i
i
\


r*
' 1
u i
- — < j_
L .
1 	 1
J 20 I
i 	 i










t

)
f






0


<
0

f






6



8'
. j
91
1
. j


















R


1 '



















CALCULATIONS







Est. new self-mon. statistics



Combine, for improved
statistics
Cotabinc into cumulative
statistics

Prob. of non-viol'n/constit.


Violation wt. factor/source
Prob. of non-viol'n/source


Alt. exp. extents of undet.
viol'no.

Tabulate marginal returns


Preselect init. allocated '
samples

Priority order marg. returns

Det. sampling rates/source

Devel. monitoring schedule
Compliance monitoring
Self monitoring





.
H
to
M
<
) C°»H

r [ »—
ft <3
I-1
E-i
Q



pa .
O *
* >
5> c



to
bl
H
o:
o

)
w
M
Ul
H
w



LI
o
H
1

task numbers of the hand cal-
culation procedure as described
in Section 4.2.
      Figure 4.2      Interralationships of Comprising Tasks (linking
                      areas in present flow of effluents)
                                  63

-------
activity represents the remaining tasks to be executed by the monitoring
agency and the dischargers, which will provide additional inputs for the
next allocation.

Organization

       Following this introduction, the objectives, outputs, inputs, and
the step-by-step procedure required for each task are discussed separately.
Examples of the computational tables required are provided.  For user
convenience, each task begins on a fresh page.  For clarification,  task
numbers are placed in boxes similar to those in Figure 4.2.
Units
       For computational efficiency, an attempt has been made to use a
consistent system of units throughout.  The system used is the metric
system (specifically, the CGS system).  It is recognized that this system
does not always reflect common practice and tables have been provided for
rapid conversion from more common units.

Symbols

       To the extent possible, the symbols used herein have the same
meaning as they have in Section 2: Summary.  The meanings are given in
the list of symbols at the back of this handbook.
                                    64

-------
4.2    STEP-BY-STEP PROCEDURE

TASK.Q]:  ASSIGN CONSTITUENT DISTRIBUTIONS

Objective

       For each water quality constituent of interest in the surveillance
program and at each source where it occurs, assign a type of statistical
distribution which best represents the frequency distribution of the
daily loading rates of the effluent.
Output
       The output for TaskQ] is the completed Table 4.1 with the name of
the frequency distribution type (must be either "Normal" or "Lognormal").
Inputs
       Previous determinations of statistical distributions in the area
of interest, if available.

Information Sources

       •   Reference [1], Section V.I
       •   References  [2,3]

Discussion

       Very few determinations of statistical distributions have been
made to date (see  [1], Recommendation 3).  Sensitivity studies ([1],
Section 8.3) indicate  that an error in the specification of a distribution
                                   65

-------
type would be small (approximately 10 percent), if not negligible, in  effect,
Therefore, the extensive studies of effluent data required to make a more
accurate determination do not seem to be justified, especially when a
good approximating alternative method is available (Alternative 2 of Step
6 below).

       In the SCI first report [1], it was found that a large majority of
effluent loading rates could be accurately represented by either normal
or lognormal distributions.  Therefore, candidate distributions are limit-
ed to these two.

Procedure

       1.   List all the sources of interest in the region and constituents
           of interest at each source, in columns 1-3 of Table 4.1,
           arranging them in source order (for convenience later).  Choose
           a convenient ordering which will be repeated in many subsequent
           tasks.  In column 1, assign a number to each source for con-
           venient reference later.

       2.   At a given source, for a given constituent, assign constituent
           distributions as follows:  if this is the first time this
           particular constituent at this source is being considered for
           assignment, (determine this from Table 4.1 for the most recent,
           previous application of this allocation procedure), then pro-
           ceed to Step 4; otherwise go to Step 3.

       3.   Procedure has been applied previously.  Copy the distribution
           assignment from Table 4.1 for the previous application into
           the new Table 4.1 for this application.  (Note: Such assign-
           ments must not be changed after the first application of this
           procedure, since once "typed" normal or lognormal, the cumul-
           ative statistics cannot be later converted from one type to
           the other).
           Go to Step 7.
                                     66

-------
4.  For first application of procedure.  If the constituent is pH
    or coliform bacteria, go to Step 5; otherwise skip to Step 6.
5.  For pH and coliforms only.  Because specific assignments are
    the most reasonable for certain constituents, and they are
    also of help in subsequent tasks, this overall hand calculation
    procedure requires the following constituents, if present, to
    be always assigned the following distributions:

       Constituent          Distribution
       pH          always    Normal (N)
       Coliforms   always    Lognormal (Lj

    Indicate the distribution assignment in column 4 of Table 4.1,
    and enter a dash in column 5 (not applicable).
    Go to Step 7.

6.  For all other constituents.  Select one of the following two
    alternative methods to assign a distribution type (see Taskf!),
    Discussion):

       Alternative 1:  Where available, use previous determinations
                       of the statistical distribution type made
                       for this specific constituent and source.
       Alternative 2:  Assume a normal distribution for all cases.
                       (Note:  This assumption may be modified
                       later in Step 4g of TaskQj]) .
    Enter the assignment and selection into columns 3 and 4
    respectively on Table 4.1.

7.  Repeat Steps 2-6 (as appropriate) for each constituent of
    interest at the same source.

8.  Repeat Steps 2-7 (as appropriate) for each source of interest
    in the region.
                                67

-------
Table 4.1
              Statistical Distribution Types By Constituent and Source
    Source
      No.
      (i)
                     Constituent
                        Name
Distribution
Type (N or L)
    Task [I]
 Alternative
Used (1 or 2)
      (1)
                         (2)
     (3)
Note:  This table can be duplicated for use in the hand calculations.
                                  68

-------
TASKQJ:  INPUT EFFLUENT STANDARDS

Objective

       For each source and each constituent, prepare a list of the effluent
standards.

Output

       TaskQJ's output is Table 4.2 which lists by source the limiting
loading rates or concentrations permitted for each constituent.
       •   Effluent limitations stated on National Pollution Discharge
           Elimination System  (NPDES) discharge permits (required by
           1 July 1977).
       •   Pending the establishment of the above, equivalent limitations
           previously established by the responsible water quality control
           agency.
Discussion

       In some cases, effluent standards may alternatively be specified
as either (a) a maximum loading (e.g., kg/day, Ib/day, MPN/day), or (b)
a maximum concentration (e.g., mg/L, ppm) together with a maximum volu-
metric flow rate (e.g., ML/day, cfs, mgd).  Assuming these maxima are
synchronous, (a) can be computed from (b).  In the last analysis, it is
the loading rate which is the crucial quantity and which must be con-
trolled to prevent environmental damage.  Furthermore, for Task |LOl.
Step 4 (see Subsection a), the allocation procedure requires that the
effluent standard S be prescribed in the form of a loading rate wherever
possible. pH is a special case, and is so treated in Task [iCJ, Step 4,
Subsection c.
                                   69

-------
       The same units used to specify these effluent standards will be
also specified for the monitoring data to be input in Tasks [3] and[3j, in
order to obtain consistency.

Procedure

       Enter the applicable standards into Table 4.2, following the same
source and constituent order established in Table 4.1 (Task 1).  Where-
ever possible, enter the standard in the form of a loading rate (e.g.,
kg/day, MPN/day - see Discussion); use Table 4.3 to assist in making the
conversions.  Also, wherever possible, convert the units of the standard
to CGS units; use Table 4.4 to assist in making these conversions.

       For pH standards, make two separate entries: for pH MAX and pH
MIN.
                                    70

-------
                 Table 4.2
          Effluent Standards
    Source
                                     Constituent
Name
Units
Standard
 Value,
   S
     (1)
 (2)
 (3)
  (A)
k
 Specify in the form of a loading rate,  preferably kg/day,
 wherever possible (see TaskQ]Discussion).   For concentrations,
 only where unavoidable, preferably use  mg/L.


 Note:  This table can be duplicated for use in the hand calculations.
                                 71

-------
                     Table 4.3
       Conversion Factors
MASS
       1 pound      (Ib)
       1 kilogram   (kg)
       1 kilogram   (kg)
       1 kilogram   (kg)
       1 kilogram   (kg)
.4536 kilograms (kg)
2.205 pounds (Ib)
1000 grams (g)
1,000,000 milligrams (mg)
1,000,000,000 micrograms
VOLUME
       1 gallon     (g)
       1 gallon     (g)
       1 liter      (L)
       1 liter      (L)
                       3
       1 cubic foot  (ft ) =
                       3
       1 cubic foot  (ft ) =
.13368 cubic feet (ft )
3.785 liters (L)
.2642 gallons (g)
.03532 cubic feet (ft3)
7.4805 gallons  (g)
28.3161 liters  (L)
TIME
       1 day
       1 second
86,400 seconds
.0000115741 days
                 NOTE:   Parts-per-million (ppm)  is  approximately
                        equivalent  to milligrams per liter (mg/L)
                                 72

-------
             Table  4.4
             Data and Standards Conversion
Unconverted
  Data or
  Standard
Unconverted
   Units
Conversion
  Factor
Converted
  Units
Converted
 Data or
Standard
 Note:  This table can be duplicated for use in the hand calculations.
                                 73

-------
TASK[5]:  INPUT NEW SELF-MONITORING DATA

Objective

       For each constituent, and for each source, tabulate summary infor-
mation on all the new self-monitoring data collected during the monitor-
ing period just completed.

Output

       The output, to be recorded in columns 1-7 of Table 4.5, will
include:

       •   Listing of constituents of concern at each source in the
           region.
       •   Self-monitoring summary data on these constituents for
           the monitoring period just completed.

Inputs

       Depending upon both the source and the constituents, the inputs
may be either raw, grab sample and daily composite measurements, or they
may be summaries for subintervals, such as monthly means, monthly maxima,
and the number of measurements made during each interval.

References

       •    [1], Section III
                                   74

-------
Discussion

       Input data from composite self-monitoring samples are clearly pre-
ferred to data from grab samples, because they are far more representative
of the total pollutant load and they relate directly to the NPDES daily
maximum effluent standard.  However, there are likely to be many more
grab sample data available, due to their lower acquisition cost.  Unless
there are ample composite sample data available, it is suggested that the
grab sample data should be included in the input self-monitoring data for
this task.  The fact that the grab sample data are less reliable can be
accounted for later in the reliability factor, y> of Taskjjjj, Step 1.

       Where fairly strong seasonal variations in effluents are known to
occur, as for example, in the food processing industry, possible measures
to reduce misallocation would be:
       1.  to design for a one-year-long compliance monitoring period,
           and to then allocate the compliance monitoring samples to
           suit the seasonal operations;
       2.  to treat data from "peak season" and "off season" periods as
           though they came from two different regions, and to therefore
           design separate compliance monitoring programs for each period,
       Since the surveillance agency can specify the units in which the
self-monitoring data is to be reported, it is assumed in this task that
these units will be the same as those used to define the effluent standards
(see Taskfjj) •  Therefore, no conversions of self-monitoring input data
should be needed; in the event they are needed, the user may refer to
Task[]2J, Procedure.

       For the purposes of this entire hand calculation approach, a source
is defined as a separate outfall or discharge pipe, with its own set of
effluent standards.  In the case of the constituent pH, pH Max and pH Min
are treated as separate constituents until TaskfSJ.  The mean (m) of pH Max
and the mean (m) of pH Min (Table 4.5, Column 4) should be equal and re-
present the mean of all pH values.

                                     75

-------
Procedure
       1.  For the first constituent at the first source (outfall) listed
           in Table 4.1, enter the source name, constituent name and units
           in the first three columns of Table 4.5 (Taskfjj) .   The units to
           be used will be those with which the effluent standards are
           specified for this constituent (see Task("2}).

       2.  Using all the self-monitoring data collected  for this consti-
           tuent during the most recent monitoring period,  find the sample
           mean, maximum (and/or minimum), and sample size  as described
           below.  If no processing of raw daily measurements (into means,
           etc.)  has  been done,  use Method A.   If processing has been done,
           use Method B.  (Note:  In allocation procedures  for previous
           monitoring periods,  some data may not have been  used because
           its sample size was  less than four (see TaskjTj,  Steps 1 and 2).
           This data can be conbined with data for the new  monitoring
           period in this step.

           Method A:  (for raw data)

                                 sum of all  values    1
              mean,  m
                                 number  of  values
                                                         r=l
              maximum,  £       =  maximum of  the  values  = max  (y  )
                                                         n    r
              minimum,  w       =  minimum  of  the  values  = min  (y  )
                                 [for  pH  only]            n    r
              sample  size, n  =  number of values
             where  y   is  the  r-th of n data values
                                  76

-------
    Method B; (for processed data)
       Suppose the data for the last monitoring period was divided
       up and summarized for R smaller reporting periods (e.g.,
       months), and the input data consists of a mean, m , a
       maximum, £  (or minimum, co ), and sample size, n ,  for
       each reporting sub-period number r.  Then for the entire
       monitoring period:
                              R
£
                                m n
         mean, m
         maximum, £      =

         minimum, w      =

         sample size, n  =
maximum of the £  values = max (£ )
                            R
minimum of the co  values = min (co )
                            R
 R
f>
r=1 r
       Enter the results in columns 4-7 of Table 4.5,
                NOTE:   When this Task Qj is being done in
                       a region for the first time,  the
                       "data collected during the monitor-
                       ing period just completed," will in-
                       clude £ll_ the desired past self-monitor-
                               _
                       ing data collected.
3.  Repeat the preceding Steps 1 and 2 for each constituent of
    interest at the first source, following the constituent
    order established in Table 4.1,
                             77

-------
4.  Repeat the preceding Steps 1-3 for each source of interest
    in the surveillance region, following the source order of
    Table A.I.
                            78

-------
                            Table  4.5   Effluent  data,  Statistics and Probabilities
                           Y(Task 6)
                         Discounting constant, h(Task 7)  -
TASK Q]
Self-ironitorlng Input data (record in source sequence)



Source
(1)







Constituent
Name
(2)








Units
(3)







Mean
m
(4)






*
Max
c
(5)







Kin
CO
(6)






Sample
Size
n
(7)





TASKQ]
Self-monitoring statistics

Est'd
Mean
V
(8)





Est'd
Std.
Dcv.
O
(9)






Distrib-
uLicn
L or N
(1C)








n
(ID








M
(12)





TASK [5]
Self + compliance



V
(13)








O
(14)








n
(15)








•o
(16)





TASKH
New cum. statis.



V
(17)








e
(18)








n
(19)








0
(20)





TASK 1 31
Probabilities
Norm'd
Effl't
Std.
X
(21)








*(x)
(22)





I'r . non-
viol 'n./
const .
Pi.1
(23)





 Not required for pH nin,
tk
 Required only for pK rain.
Note:  This table can be duplicated for use in the hand calculations.

-------
TASKJ4J:  ESTIMATE SELF-MONITORING STATISTICS

Objective

       To obtain for each constituent occurring at each source, an esti-
mate of the mean and standard deviation of the newly entered self-monitor-
ing data.

Output

       Tabulation of the estimated means and standard deviations in columns
8-12 of Table 4.5

Inputs

       •   Distribution types (from Table 4.1, TaskQ})
       •   Self-monitoring input data (from Table 4.5, Task 0)

References

       •   [1], Appendix A
       •   [1], Section V.I
       •   [1], Section IX.1
       •   [4], for the preparation of Figure 4.5

Discussion

       The procedure employed in this task to obtain estimates  of  the
source mean and standard deviation from the sample mean and the maximum
                                   SO

-------
requires that the number of measurements (sample size) upon which these
are based be greater than three.

       If the sample size for a constituent is greater than three, then
the estimation procedure to be used differs between normal and lognormal
distribution types.

Procedure

       1.  For the first constituent at the first source, determine from
           column 7 of Table 4.5, Task[3], whether the sample size n is
           less than 4.
           If n is less than 4, go to Step 2, otherwise proceed to Stepfsl.

       2.  For n < 4.  In Table 4.5 write "INSUFFICIENT DATA" under Task 3,
           The insufficient data may be saved for incorporation with the
           data from the next monitoring period.   Return to Step 1 and re-
           start the procedure for the next constituent.

       3.  Determine from Table 4.1, TaskQ] whether the constituent's
           distribution type is Normal or Lognormal (N or L), and which
           Task^ alternative was used for it (Alternative 1  or 2).
           If the distribution type is Normal (N),  go to Step 4; if
           Lognormal (L), go to Step 5.

       4.  For normal distributions.

              a.   Use the sample mean, m, from column 4 of Table 4.5,
                  TaskQj, as the best estimate of the source  mean, y.
              b.   Use the sample size, n, from column 7 of Table 4.5,
                                  31

-------
    Task[3|,  to determine the scaling factor, G, from
    from Figure 4.3.
c.   Compute the estimated standard deviation for the source
    a,  from
                £ — m             m -
          o  =  — —   or  a  =  —
    where m, £, and w are obtained from columns 4-6 of
    Table 4.5, TaskQL
d.  If this task has been performed previously to design a
    prior compliance monitoring program for this constituent
    and source, go to Step 4f; if not, go to Step 4e.
e.  If both the following are true:
          A.  Alternative 2 was used in Task[T| (see Step 6)
              and
          B.  o > 1.5u
    then go to Step 4g; otherwise go to Step 4f.

            NOTE:  The factor of 1.5 used in condition B
                   is somewhat arbitrary, but is near-best
                   based on the limited known information.
                   Even if it were sufficiently in error
                   to yield the wrong distribution, the
                   effect on the resource allocation would
                   still be small — see the TaskfT],
                   Discussion.
f.  Enter the values of y and a obtained in Steps 4a and 4c
    above,  into columns 8 and 9 respectively of Table 4.5,
    Task[4j.  Enter an "N" in column 10 of Table 4.5, Task[5J.
    Go to Step 6.
                             82

-------
       g.   Change the distribution type from normal (N)  to log-
           normal (L) in column 4 of Table 4.1.  Go to Step 5
           immediately following and redetermine y and o as for
           lognormal distributions.

5.  For lognormal distributions:
       a.   Compute the ratio of the maximum to the mean, p = —
                                                             rn
           where m and E, are obtained from columns 4 and 5 of
           Table 4.5, Task 3.
       b.   Knowing the ratio, p, and the sample size, n, from
           column 7 of Table 4.5, determine the estimated standard
           deviation (of the logarithms of the measurements), o,
           from Figure 4.4; interpolate carefully between curves
           for different sample sizes, where necessary.
       c.   Compute the estimated mean (of the logarithms of the
           measurements), v, from
                                      2
               Vi  =  l°810m ~ 1.1513 o
       d.   Enter the values of y and o obtained in Steps 5c and 5b
           above into columns 8 and 9 respectively of Table 4.5,
                 -  Enter an "L" in column 10 of Table 4.5, TaskQJ
6.  Knowing the sample size n (from column 7 of Table 4.5), determine
    the confidence parameters.  Prescribe n, the confidence parameter
    for the mean, to be
               TI  =  n
    and obtain v, the confidence parameter for the standard deviation
    from Figure 4.5.
    Enter the results into columns 11 and 12 of Table 4.5, Task[4].
                                 83

-------
7.  Repeat the preceding Steps 1-6 (as required) for each additional
    constituent of interest at the first source.

8.  Repeat the preceding steps 1-7 (as required) for each source
    of interest in the surveillance region.
                                84

-------
00
            3.2,
            3.0
            2.8
            2.6
         e>
         u
         rt
         oo
         s
            2.2
            1.8
            1.6
            1.4
1.21	1	1	1—I—I—I-
                               10
                                                  J	I	I   I   I  I  I
                                               50


                                      Sample Size, n
100
                                                                                                    500
                         Figure 4.3      Variation of Scaling Factor, G, with Sample Size

                                         for Normal Distributions

-------
1.5
Figure A. A
                   2               34

                     Ratio of the Maximum to the Mean,
         Standard Deviation Estimated from the Mean and Maximum of
         Lognormal Distributions,  for Various Sample Sizes, n

-------
                   200
00
—I
                o
                01
                O
                C
                CB
                n)
                01
                o
                c
                0)
                -o
                •H
                U-i
                c
                o
                     2 _
                                  10
100
500
1000
                                                      Sample Size, n

            Figure 4.5  Variation  of  the Confidence Parameter for  Standard Deviation with Sample  Size

-------
TASKIJJ:  INPUT NEW COMPLIANCE MONITORING DATA

Objective

       For each constituent, and for each source, tabulate all the new
compliance monitoring data collected during the monitoring period just
completed.

Output

       Data on the constituents monitored by the surveillance agency at
each source in the region.

Inputs

       Daily composite data values obtained in the compliance monitoring
program during the last monitoring period.

Discussion

       It is assumed that grab sample data will not be included in com-
pliance monitoring input data, since the objective of the surveillance
exercise is to identiy violators, and violations are defined (via the
NPDES  daily maximum effluent standard) in terms of daily composite samples.

       The computational procedure requires that the units of effluent
standards and self-monitoring and compliance monitoring data are con-
sistent for any one constituent at a given source.  Therefore, it is
required that the compliance monitoring data be converted, if necessary,
before input, to have the same units as the corresponding effluent
standards specified in TaskQJ.  Information which may aid such conversions
is provided in Tables 4.3 and  4.4.
                                    88

-------
Procedure
       1.  Follow the same source order as was established in Table A.I,
           TaskQ.

           At a given source with compliance monitoring data, copy or
           record all such data collected during the monitoring period
           just completed into Table 4.6.  Ensure that the units of this
           data are the same as those specified for the effluent standards
           in Taskjj?]; if they are not, convert them as necessary (see
           Discussion above).
                      NOTE:  When this task is being done for the
                             first'time, these input data will in-
                             clude all the past compliance monitor-
                             ing data of interest which has been
                             collected.
       2.  Repeat Step 1 for each source in the region having compliance
           monitoring data.
                                    89

-------
          Table 4.6
 Compliance Monitoring Input Data
       Source
                                  Constituent
Name
Units
Monitored
  Value
    z
        (1)
 (2)
 (3)
   (4)
Note:  This table can be duplicated for use in the hand calculations.
                                 90

-------
TASK 6:  COMBINE SELF-MONITORING STATISTICS AND COMPLIANCE MONITORING
         DATA
Objective

       To obtain, for each constituent, and for each source, new improved
estimates of the means and standard deviations of the data.
Output
       Tabulation of improved means, standard deviations, and confidence
parameters in columns 13-16 of Table 4.5.

Inputs

       •   Self-monitoring statistics from Table 4.5, Taskfgl.
       •   Compliance monitoring data from Table 4.6, TaskMSl.

References

       •   [1], Section V.2
       •   [1], Appendix E

Discussion

       Compliance monitoring data are treated differently in this pro-
cedure from self-monitoring data, since the former may be considered more
reliable and weighted accordingly.

Procedure

       1.  If only self-monitoring data is used, skip this task and go
           to TaskQj, and write the words "same as TaskQ," in columns
           13-16 of Table 4.5.  Otherwise, select for the region, a value
                                   91

-------
    for Y» always greater than 1, and probably in the range of
    1.5-3, but possibly much larger.   This y value will represent
    the greater weight (due to greater reliability) given to the
    compliance monitoring data than to the self-monitoring data.
    Therefore, one consideration might be the ratio of composite
    to grab sample data in the self-monitoring input data (see
          L Discussion).  Enter the chosen y value above Table 4.5,
            NOTE:  Once the user becomes familiar with the
                   intent and effect of y,  there is no rea-
                   son why it could not be  varied with the
                   constituent, source, etc., treated.
2.  For the first constituent and source with a compliance monitor-
    ing measurement, z, and with sufficient data from self-monitor-
    ing statistics (see Step 2, TaskRl);

       a.  Compute the improved estimate of the process mean,

                     z + yn/Y
               P     1 + n/Y
           where z is obtained from Table 4.6, Task[31j and y and
           n are obtained from Table 4.5, Taskpl.

       b.  Compute the improved estimate of the process standard
           deviation
               -  = /z2 + (vo2 + ny2)/y - (1 + n/y)y2
               °   V             1 + v/Y
           where o and v are also obtained from Table 4.5,  TaskQ.

       c.  Compute the new confidence parameter for the estimated
           mean

               fj  =  1 + n
                               92

-------
       d.  Compute the new confidence parameter for the estimated
           standard deviation

               v  =  1 + v
3.  If more than one compliance monitoring measurement, z,  was
    taken for the same constituent and source during the last
    monitoring period, then successively combine them into  the
    statistics by repeating Step 2 above for each measurement.

4.  Enter the final results for jl, d, n and v obtained from
    Step(s) 2 (and possibly 3), into columns 13-16 of Table 4.5,
5.  Repeat Steps 2-4 for each source and each constituent  where
    compliance measurements were taken during the most recent
    monitoring period.

-------
TASK[TJ:  COMBINE LATEST STATISTICS INTO CUMULATIVE STATISTICS FOR
         COMPLIANCE MONITORING PERIOD
Objective

       To obtain, for each constituent and each source, estimates of the
mean and standard deviation of the data based on all past measurements.
Output
       Tabulation of cumulative means, standard deviations, and confidence
parameters in columns 17-20 of Table 4.5.
Inputs
           Cumulative estimates (if any)  of process statistics from previous
           allocation period.
           Latest improved estimates of process statistics from Table
           4.5,
References

       •    [1], Section  V. 2
       •    [1], Appendix E

Discussion

       One  or  two of the formulas used in this task look rather complex.
However, only  straightforward substitution and computation are required
to  evaluate them, for which a hand calculator should be found very help-
ful.  If the size of the formula is of concern to a user, it is suggested
                                   94

-------
he develop a table for operating on the various terms in a step-by-step
procedure.

Procedure

       1.  Determine whether this compliance monitoring allocation pro-
           cedure has been used previously.  If it has, go to Step 3;
           otherwise go to Step 2.

       2.  No previous statistical computations or monitoring allocations
           have been made with this procedure.  Therefore, the cumulative
           statistics desired in this task will be derived entirely from
           the "latest" (all previous) data, summarized in Table 4.5,
           In columns 17-20 of Table 4.5 (Task 7), write "VALUES SAME
           AS FOR TASKfU."
       3.  Keep at hand the cumulative statistics (in Table 4.5, Taskf7|)
           from the most recent, previous application of this allocation
           procedure.  These previous cumulative statistics will be re-
           presentative of all data preceding the latest monitoring data
           used in Tasks 2-5.
           Select a value for the data discounting constant,  h, for the
           region.  This value will probably be in the range  1-3,  but may
           be less than one.   It effectively discounts past data (relative
           to new data) by limiting their sample size to  h  times the
           size of the new sample.   It should therefore be made smaller
           for longer monitoring periods.
           Enter the chosen h value over  Table  4.5.

-------
         NOTE:  Once the user becomes familiar with
                the intent and effect of h, there is
                no reason why it could not be varied
                with the constituent, source, etc.,
                treated, or with the age of the data.
Update the cumulative statistics for one constituent at one
source as follows:  Let a "-" indicate a new statistic for
the latest monitoring period (taken from columns 13-16 of
Table 4.5, TaskQJ); a "~"  without  & subscript  will indicate
cumulative statistics  obtained  from the previous application of
this allocation procedure (see  Step 3).   A "A"  with a subscript
"1" indicates statistics updated for this application.   Then:

   a.  Compute  the new cumulative estimate of  the process mean,

                   ny + ny
           y,   -   ~   -
             i      n + n
   b.  Compute  the new cumulative estimate of  the process
       standard deviation
            °1
ro    	2    * A 2    " *2
/va   + ny   + va   + ny
             •N.    A
             V +  V + 1
    c.   Compute the new confidence  parameter for  the  cumulative
        estimated  mean,
            r\   =  min (n  + n),  hn I
    d.   Compute the new confidence parameter for the cumulative
        standard deviation
            A         r ~   A        ~~|
            v,   =  min (v + v + 1),  hv
                            96

-------
       e.  Enter the values of U-, , o , r\  and v  obtained in
           Steps 5a-d above, into columns 17-20 of Table 4.5,
           TaskPTj.
6.  Repeat Step 5 for each additional constituent of interest at
    the same source.

7.  Repeat Steps 5-6 for each source of interest in the surveil-
    lance region.
                             97

-------
         DETERMINE PROBABILITY OF NON-VIOLATION PER CONSTITUENT

Objective

       To obtain, for each constituent at each source, its probability
of non-violation.

Output

       A tabulation of the probabilities of non-violation in columns 21,
22, and 23 of Table 4.5.
Inputs
       •   Distribution types (from Table 4.1, TaskQ)
       •   The cumulative statistics for each constituent at each source
           (from Table 4.5, TaskQJ) .
       •   The effluent standards  (from Table 4.2,
References
            [1], Appendix C, Sections C.2 and C.4
Procedure
       For  a  given  source,  i, and a  given constituent, j:

       1.   Determine  from Table  4.5,  Task[4] whether  the  constituent's
            distribution  type  is  normal  (N)  or  lognormal  (L).   If  it  is
            type  -N, go to Step 2; if  it  is  type  -L,  go to  Step  5.
                                    98

-------
2.  Check whether or not the constituent is pH.  If it ±s pH, go
    to Step 3; otherwise go to Step 4.

3.  For pH only.  During this step, statistics for pH Max and pH
    Min (columns  17-20 of Table 4.5) will be combined to produce
    a probability of no violation of the overall pH standards.
    Note that quantities such as o (standard deviation for pH Max)
    and 5 (standard deviation for pH Miri) can both be required in
    one calculation of joint probability.  In this step, pH Min
    and pH Max should be treated as one constituent.
    Compare the estimated mean y (from column 17 of Table 4.5) with
    the standards for maximum and minimum pH, S and £ respectively
    (from column 4 of Table 4.2), and proceed as follows:

       If  u < S_, go to Section (i)
       S^ < M < S, go to Section (ii)
           u > S, go to Section (iii)

       (i)    For p < S (pH only).
                Compute the normalized effluent standard
                         § - y
                   X  —    =:
                           a

                where
                   S  =  pH Min standard from column 4 of Table 4.2
                   y  =  estimated mean from column 17 of Table 4.5

                   ~  =  cumulative estimate of the standard devi-
                   °     ation of pH Max, from column 18 of Table
                         4.5, Task]""
                                99

-------
         Enter the result  for x into column 21 of Table 4.5,
         TaskQO.

         Determine 0(x)  from Table 4.7.   Enter the result in-
         to column 22 of Table 4.5, Task[8j.

         Determine the constituent (pH)  probability of non-
         violation at this source


            p±.   =  I ~ *(x)

         Enter the result  into column 23 of Table 4.5, Task[8].

         Go to Step 6.


(ii)    For S < y  < S (pH only).


         Compute  the normalized upper and lower effleunt
         standards

                  V - §   _     g _ -

                    2             o

         where

            g    is as above,

            A
            2  =  cumulative estimate of the standard devi-
                 ation of  pH Min, from column 18 of Table
                 4.5, Task[7].

         Enter the results for x and x into column 21 of
         Table 4.5, TaskQO, using a row for each and
         identifying which is which.

         Determine *(x) and *(x) from Table 4.7.  Enter the
         results  into column 22 and the corresponding rows
         of Table 4.5, TaskQO.

         Determine the probability of non-violation of pH
         at this  source (overall, not separately for pH Max
         and pH Min) from
                            100

-------
                Enter the result into column 23 of Table 4.5,
                TaskQQ.

                Go to Step 6.


       (iii)    For y > S (pH only).

                Compute the normalized effluent standard
                         f\   •—
                   x  =  u:s
                           n

                where
                   2 is as above.

                Enter the result for x into column 21 of Table 4.5,
                Task|j).

                Determine (x) from Table 4.7.  Enter the result
                into, column 22 of Table 4.5, TaskQO.

                Determine the probability of non-violation of pH
                at this source


                   Pij  =  ~2 ~ *^

                Enter the result into column 23 of Table 4.5,
                Task [8].

                Go to Step 6.
4.  For Normal Distributions (except pH).   Compute the normalized

    effluent standard
       x  =
    where y and CT are taken from Table 4.5, TaskQJ. a^d S is taken

    from Table 4.2.
                                101

-------
            NOTE:   v  and a  must have the same units as S,  so check
                   column 3 of Table 4.5 against column 3  of Table
                   4.2.
    Enter the result for x into column 21 of Table 4.5, TaskCsl
    Determine (x)  from Table 4.7.   Enter the result into column 22
    of Table 4.5,  Task[8J.
    Determine the  constituent probability of non-violation at this
    source

       Pij  -  |  +  *<*)

    Enter the result into column 23 of Table 4.5, Task[|J.
    Go to Step 6.

5.  For Lognormal  Distributions .  Compute the normalized effluent
    standard
       x  =
             losios -
    where u, a, and S are obtained in the same way as for Step 4,
    and the same check on their units should be made.
    Enter the result for x into column 21 of Table 4.5, Taskf^J.
    Determine 4>(x) from Table 4.7.  Enter the result into column 22
    of Table 4.5, TaskQi].
    Determine the constituent probability of non-violation at this
    source

               I
       P. .  =  ~r  +  $(x)
        ij     2
    Enter the result into column  23 of Table 4.5, Task[|].
    Go to Step 6.
                                102

-------
6.   Repeat Steps 1-5 (as appropriate) for each constituent j at
    the same source i.

7.   Repeat Steps 1-6 (as appropriate) for each source i in the
    region.
                            103

-------
     Table 4.7
The Standard Normal Cumulative Distribution Function, $(x)
X
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2.0
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
2.9
0.00
.00000
.03983
.07926
.11791
.15542
.19146
.22575
.25804
.28814
.31594
.34134
.36433
.30493
.40320
.41924
.43319
.44520
.45543
.46407
.47128
.47725
.48214
.48610
.48928
.49.180
.49379
.49534
.49653
.49744
.49813
0.01
.00399
.04380
.08317
.12172
.15910
.19497
.22907
.26115
.29103
. 31859
.34375
.36650
.38686
.40490
.42073
.43448
.44630
.45637
.46485
.47193
.47778
.48257
.48645
.48956
.49202
.49396
.49547
.49664
.49752
,49819
0.02
.00798
.04776
.08706
.12552
.16276
.19487
.23237
.26424
.29389
.23121
.34614
.36864
.38877
.40658
.42220
.43574
.44738
.45728
.46562
.47257
.47831
.48300
.48679
.48983
.49224
.49413
.49560
.49674
.49760
.49825
0.03
.01197
.05172
.09095
.12930
. 16640
.21094
.23565
.26730
.29673
.32381
.34850
.37076
.39065
.40824
.42364
.43699
.44845
.45818
.46633
.47320
.47882
.48341
.48713
.49010
.49245
.49430
.49573
.49683
.49767
.49831
0.04
.01595
.05567
.09483
.13307
.17003'
.20540
.23891
.27035
.29955
.32639
.35083
.37236
.39251
.40988
.42507
.43822
.44950
.45907
.46712
.47381
.47932
.48382
.48745
.49036
.49266
.49446
.49585
.49693
.49774
.49836
0.05
.01994
.05962
.09871
.13683
.17364
.20884
.24215
.27337
.30234
.32894
.35314
.37493
.39435
.41149
.42647
.43943
.45053
.45994
.46784
.47441
.47982
.48422
.48778
.49061
.49286
.49461
.49598
.49702
.49781
.49841
0.06
.02392
.06356
.10257
.14058
.17724
.21226
.24537
.27637
.30511
.33147
.35543
.37698
.39617
.41309
.42786
.44062
.45154
.46080
.46856
.47500
.48030
.48461
.48809
.49086
.45305
.49477
.49609
.49711
.49788
.49846
0.07
.02790
.06749
.10642
.14431
.18082
.21566
.24857
.27(-x) = -4>(x)
                                        104

-------
TASK[9]:  DETERMINE PROBABILITY OF NON-VIOLATION PER SOURCE

Objective

       To obtain, for each source, its probability of non-violation.

Output

       A tabulation of the probabilities of non-violation in columns 1,
2, and 3 of Table 4.8.
Inputs
           The probabilities of non-violation for each constituent at
           each source  (from Table 4.5, Taskf"8|) .
References
       •    [1], Section VI.3
       •    [1], Appendix B
       •    [1], Section VIII.3
Procedure
       For a given source, i:

           1. Indicate  the source number in column 1 of Table 4.8.

           2. Select whether the various constituents at the source as
              a group are to be described as statistically dependent  (SD)
              or  statistically independent  (SI).  If SD, all the constituents
                                      105

-------

                        vary  together  in time  in  the  same way  (are completely cor-

                        related) maintaining the  same ratios to one  another; if  SI,

                        there is zero  statistical correlation  between  their variations,
                                NOTE:   Since  sufficient  data  to  ascertain  the
                                        exact  correlation between various con-
                                        stituents  are not readily available,
                                        one of the above  extremes must be as-
                                        sumed.   Appendix  B  of  [1] suggests  SD
                                        is less likely  to be true than SI.  Sen-
                                        sitivity studies  (Section 8.3 of  [1]
                                        revealed that in  many  cases  the resulting
                                        compliance monitoring  priorities will be
                                        insensitive to  this selection; however,
                                        cases  could clearly be devised where the
                                        priorities would  be very  sensitive  to the
                                        correlation assumption.

                         Indicate  the  type of  dependence  (SD or SI)  chosen  in column

                         2  of Table 4.8, Task[9].
                      3.  Accordingly,  knowing  the  probabilities  of  non-violation,

                         p . . ,  of  the various constituents  at  source i,  from  column
»'.                       23 of Table 4.5,  Task[&j,  determine  the  source probability

                         of non-violation, P.,  from either a or  b  below.
.^ i
 •'                           a.   If dependent  (SD) , then


                                    f±  =   min(p  )
                                            3
  !                               i.e., P.  is the smallest of the constituent

                                 probabilities  at  this  source i.

                             b .   If independent (SI) ,  then
                                                    106

-------
           i.e.,  P.  is the product of all the  constituent  pro-


           babilities at this source i.
   Enter the result for P.  into column 3 of Table 4.8,
                         i
4. Repeat Steps 1-3 for each source i in the region.
                            107

-------
                                                      -*„ •««•.  v
              Table 4.8
Ranges of Sampling Rates and  Expected  Extents of Undetected Violations
Source
No.
i
(1)

Constitu-
ent Inter-
dependence
SD/SI
(2)

TASK GO
Prob. of
Non-
violation
Pi
(3)

TASK |OJ
Violation
Weighting
Factor
Ci
(4)

TASK jll|
Min . No .
Samples
Required
*i
(5)

Max. No.
Samples
Allowed
Li
(6)

TASK (lU
Alternative Expected Extents of
Undetected Violations, C. (s.), for
Various Sampling Rates, s.
V1
(7)

2
(8)

3
(9)

4
(10)

5
(ID

6
(12)

7
(13)

8
(14)

o
00
       Note:  This table can be duplicated for use  in  the  hand calculations.

-------
TASK p.0|;  DETERMINE THE VIOLATION WEIGHTING FACTOR PER SOURCE


Objective


       To obtain, for each source, a quantitative factor representing the
significance attached to violations which might occur there.


Output


       A tabulation of violation weighting factors in column 4 of Table
4.8.  These factors are found by completing an interim Table 4.9.


Inputs


       •   Effluent standards, from Table 4.2, TaskfT].

       •   Constituent distribution type (normal and lognormal), from
           Table 4.5. TaskQ.

       •   Cumulative estimates of constituent means and standard devi-
           ations, from Table 4.5, TaskpTJ

       •   x (normalized effluent standard), 0(x) , and p (probability of
           non-violation) for each constituent at each source, from
           Table 4.5, TaskQJJ.

       •   Receiving water concentration standards for the region and
           the constituents of interest (need depends upon options
           chosen).


References


       •   [1] , Section VI - Introduction

       •   [1], Section 6.3

       •   [1], Appendix C, Section C.I
                                  109

-------
       •   [1], Appendix C, Section C.2.1
       •   [1], Section VI.2

Discussion

       The purpose of the Violation Weighting Factor is to make available
to the user alternative ways in which he can weight the allocation of his
surveillance resources.  This is done by weighting the violations.

       One obvious way to do this is to weight them in proportion to the
environmental damage caused in the receiving waters, through the use of
environmental damage functions (damage as a function of concentration)
for each constituent.  While desirable, this approach necessitates much
detailed computation, and has therefore, been excluded from this hand
calculation procedure.  It is included in the computerized procedure,
however.   (See Sections 5 and 7 of this handbook, and  [1], Section 6.)

       Two simpler alternative weighting methods have been included in
this hand  calculation approach.  One gives all violations equal weights,
the other  weights them by the amount by which the standards are exceeded.
With these simpler methods, the effects of the effluents on the receiving
waters are still taken into account indirectly, since the effluent stand-
ards should have been set with these effects in mind.

       Since the second simpler method contains a number of options and
since different procedures are required for different constituents, it
has been necessary to break this task up into numerous components, many
of which may turn out to be skipped in any one application.
                                   110

-------
Procedure
       1.  For the entire region, select one of the following two alter-
           native methods for assigning violation weighting factors:

           Method 1:  Set all the weighting factors to be equal.  This
                      has the effect that the sampling frequency then
                      depends only upon the probability of violation,
                      Task GO.

           Method 2;  Make the weighting factors increase with the extent
                      by which the standard is exceeded.  This has the
                      effect of directing compliance monitoring towards
                      those dischargers with the more serious violations
                      of the standards, where conviction is easier.
           Indicate the method selected above Table 4.9.
           If using Method 1, go to Step 2; if Method 2, go to Step 3.

       2.  Method 1.  For all sources, set the source violation weighting
           factor, c. = 1.
           Enter this result into column 4 of Table 4.8, Task jLO|.
           Go to Task (Tl|.

       3.  Method 2.  Copy, in the same order, the information from columns
           1 and 2 (Task[3l) and 10 (TaskQj) of Table 4.5 into columns 1,2,
           and 3 respectively of Table 4.9.

       4.  For each constituent at one source, select a weighting factor
           function (WFF) type from the following three types, (A, B or C)
           and select a WFF coefficient k for each:
                                   111

-------
                    a,  WFF Type A; (General, for Normal or Lognormal
                                    constituents, excepting pH)
                            W


                        where

                            M
( k(M-S),  M > S
10,       M < S
 constituent mass loading rate or concentration
 in effluent, depending upon the form of S

 applicable effluent standard for M

 a WFF coefficient (see below)
                        With this type of WFF, the weighting factor, W, for a

                        constituent is proportional to the amount by which M

                        exceeds its standard.

                        The coefficient, k, may be chosen to specify the principle

                        upon which the WFF is preferred to operate, such as:
                            1.  k a —  for each constituent
                                    8
                                where 6 is the receiving water concentration
                                standard for the constituent.  This will result
                                in, W, varying as the magnitude of the exceed-
                                ance.

                                In the case of BOD, assume the in-stream standard
                                to be as follows :
1  2
e
15.0
10.0
5.0
Type of Streams
Fast flowing, shallow
streams
Slow flowing, shallow
streams and fast flowing,
medium to deep streams
Slow flowing, deep rivers
and estuaries
                                                    112

-------
    2.  k a — for each constituent at each source
            O
        This will result in  W  varying as the number
        of times by which the standard is exceeded.
The difference between these two alternatives for k is
illustrated in Table 4.10.  Alternative (1) is seen to
penalize the larger dischargers, and is therefore, gen-
erally preferred; alternative (2) penalizes the smaller
dischargers.
k may also be weighted to emphasize concern for any
particular constituent, regardless of its source.

WFF Type B; (For Lognormal constituents only, e.g.,
            colifoons)
The concentrations (and hence loading rates) of certain
constituents, particularly coliform bacteria, vary so
rapidly that their orders of magnitude are of more
significance than their actual size.  As a result, their
type of frequency distribution in Task[T],  will usually
be lognormal (specifically required for coliforms), and
the following Type B WFF is a more appropriate measure
of standard exceedance.

          /k(log M - log S),   M > S
    W     10,                  M s S
Here, k, would be either (1) I/log 9, or (2) I/log S.
W, M, S, and k are as defined in Subsection a above.

          NOTE:  A lognormal (L) distribution
                 in TaskQp, Table 4.1,  is
                 specifically required for
                 constituents to be assigned
                 a Type B WFF.
                       113

-------
if*'
£; •
i*}
«:•
ji;
       c.   WFF Type C; (for pH only)
           For pH, the logorithm of the hydrogen ion concentration
           has already been taken, and the possible range of values
           is very limited.  With this constituent, therefore, the
           weighting factor is the amount by which the pH standard
           is exceeded (in either direction, since there are both
           upper and lower standards).
               W
               w  =
           where
               S
               S
               W
                                         k(S - M),   M < S
                                         0,          M > S

                                         k(M - S) ,   M > S
                                         0,          M < S
                                         minimum pH standard
                                         maximum pH standard
                                         weighting factor for pH  (Min or Max)
           and commonly, k = k * 1.

    Record the type of WFF selected for this constituent in column
    4 of Table 4.9.  If the selection is Type B, check that the
    corresponding distribution is lognormal (Type "L" in column 3
    of Table 4.9) as is required.  Record the magnitude chosen for
    the WFF coefficient, k, (or k and k, identifying which is
    which) in column 5 of Table 4.9.

5.  Repeat Step 4 for each constituent at the same source.

6.  For each constituent at the same source, compute the expected
    extent of violation, D, from the appropriate section below,
                                114

-------
depending upon the WFF type as follows:


   For WFF Type A, go to Section a

   For WFF Type B, go to Section b

   For WFF Type C, go to Section c


       a.  For WFF Type A; (W = k[M-S])

           If the constituent distribution is normal (N) (from
           column 3 of Table 4.9), go to Subsection (1); if
           lognortnal (L), go to Subsection (2) .


              1.  For Normal Distribution (W = k[M-S])


                    D  = kojf(x) - x [l-p]|

                  where

                    x  = probability of non-violation per
                         constituent, from column 23 of
                         Table 4.5, Task Of]

                    o  = cumulative estimate of the standard
                         deviation, from column 18 of Table
                         4.5, TaskQ]

                    f(x) is given by Table 4.11

                    k    is recorded in column 5 of Table 4.9


              2.  For Lognormal Distribution  (W = k[M-S])
                     D   =   k exp"'  '  A °
                                       2   /

                                              2.
                    where

                      p, o,  and  k are as above,  and
                              115

-------
                                              y  =   cumulative estimate of the mean
                                                    from column 17 of Table 4.5,
                                                    Task(T|

                                              S  =   effluent standard, from Table


                                          log  S  =   loglQS

                                              A  =   InlO =  2.3026

                                           $(x)      is  given by Table 4.7

                                       Go to  Step  7.


                           b.  For WFF Type B (W = k[log M-log S]


                                       NOTE:  This  may  be used only for
                                              constituents  with distri-
                                              bution type L in Table 4.5,
                                              TaskQj.
."'' "'

•» .                                 D  =   kajf(x)  - x[l-p]j
«''.;,                                          '             '
{(_ ••                            where
. * • ' (
'                                   x, k, o,  f  and p are as above
 -:!''.
 ji ••                            Go to Step 7.
 •• •'.

                           c.  For WFF Type C (W = k[S-M], W = k[M-S]
   ,                                                                      n
  '. •'                            For pE only, compare the estimated mean, v (from
   ii                            column 17  of Table  4.5,  with the standards for
                               maximum and minimum and minimum pE, S and S re-
                               spectively (from column 4 of Table 4.2), and pro-
                               ceed as follows:  if
                                     /\
                                     y <  S, go  to  Subsection (i).

                                 S < y <  S, go  to  Subsection (ii).

                                     y >  S, go  to  Subsection (iii).
                                                      116

-------
(i)    For u < S (pH only)
        D  =  k

      where
                 (o - a)   S - u
 2TT
+ alf(x) + x*(x)j
           x = normalized effluent standard from
               column 21 of Table 4.5, Task[jB)

           /»
           a = cumulative estimate of the standard
               deviation of pH Min, from column 18
               of Table 4.5, Taskft]

           a = cumulative estimate of the standard
               deviation of pH Max, from same
               location
               is obtained from column 22 of Table
               4.5,  Task QO
        f(x)   is given by Table 4.11

          k    is recorded in column 5 of Table 4.9

      Go to Step 7.

(ii)   For S < y < S  (pH only)
        D  =  kcr
f(x) + x[0.5-*(x)]
    4 ko
f(x)
              + x[0.5-*(x)]
      where
        a, o, and f are as above, and

        x and x are obtained from column 21 of
        Table 4.5, TaskQO

        $(x) and 
-------
                                       (iii)   For  p  >  S  (pH only)

- k.
where
5 ^ u - s
27T ' 2
                                               a,  a,  and  f  are as above,  and


                                               x and  •'                 8.  Repeat Steps 6-7 for all constituents of interest at the same
V * *' ;
•'•" • ";                     source.
.T :•.',
£J j   :
/j   •••                 9.  Of the expected extents  of  violation,  D,  for the various con-

    'ttt                     stituents at this same source i,  find the  largest,  to be the

 ^•i                        source violation weighting  factor, c  ,  i.e.,

 M:-;                                                          i
 i :' |

                             c.  =  max(D)


  ' ' **                                                                       r*^-m
  .<*t                     Enter the result into column 4 of Table 4.8,  Task (lOJ.

  lil,'

                      10.  Repeat Steps 4-9 (Method 2).for each  source  of  interest in

                          the region.
                                                      118

-------
      Table 4.9
Record of Task |10| Options and Calculations
Violation weighting factor assignment method  (I or II):
Source
No.
i
(1)

Constituent
Name
(2)

Distri-
bution
L or N
(3)

Type of
WFF
A/B/C
(4)

WFF
Coefficient
k
(5)

Expected
Extent of
Violation
D
(6)

Note:  This table can be duplicated for use in the hand calculations.
                                 119

-------
Table 4.10      Examples of Alternative Type of Weighting
                Factor Functions (WFF)
                (Comparison for the same constituent, Q = 100)

Let S
Let M
Then (M-S)
(1) k = 1/9
W = (M-S)/ 9
(2) k = 1/S
W = (M-S)/S =
Source 1
100
600
500

5

5
Source 2
10,000
10,500
500

5

0.05
Source 3
10,000
12,000
2,000

20

0.2
                       120

-------
Table 4.11    The Standard Normal Probability Density Function, f(x)
ix
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
1.0
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2.0
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
2.9
3.0
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
0.00
.3989
.3970
.3910
.3814
.3683
.3521
.3332
.3123
.2897
.2420
.2179
.1942
.1714
.1497
.1295
.1109
.0940
.0790
.0656
.0540
.0440
.0355
.0283
.0224
.0175
.0136
.0104
.0079
.0060
.0044
.0033
.0024
.0017
.0012
.0009
.0006
.0004
.0003
.0002
0.01
.3989
.3965
.3902
.3802
.3668
.3503
.3312
.3101
.2874
.2396
.2155
.1919
.1691
.1476
.1276
.1092
.0925
.0775
.0644
.0529
.0431
.0347
.0277
.0219
.0171
.0132
.0101
.0077
.0058
.0043
.0032
.0023
.0017
.0012
.0008
.0006
.0004
.0003
.0002
0.02
.3989
.3961
.3894
.3790
.3653
.3485
.3292
.3079
.2850
.2371
.2131
.1895
.1669
.1456
.1257
.1074
.0909
.0761
.0632
.0519
.0422
.0339
.0270
.0213
.0167
.0129
.0099
.0075
.0057
.0042
.0031
.0022
.0016
.0012
.0008
.0006
.0004
.0003
.0002
0.03
.3988
.3956
.3885
.3778
.3637
.3467
.3271
.3056
.2827
.2347
.2107
.1872
.1647
.1435
.1238
.1057
.0893
.0748
.0620
.0508
.0413
.0332
.0264
.0208
.0163
.0126
.0096
.0073
.0055
.0040
.0030
.0022
.0016
.0011
.0008
.0005
.0004
.0003
.0002
0.04
.3986
.3951
.3876
.3765
.3621
.3448
.3251
.3034
.2803
.2323
.2083
.1849
.1626
.1415
.1219
.1040
.0878
.0734
.0608
.0498
.0404
.0325
.0258
.0203
.0158
.0122
.0093
.0071
.0053
.0039
.0039
.0021
.0015
.0011
.0008
.0005
.0004
.0003
.0002
0.05
.3984
.3945
.3867
.3752
.3605
.3429
.3230
.3011
.2780
.2299
.2059
.1826
.1604
.1394
.1200
.1023
.0863
.0721
.0596
.0488
.0396
.0317
.0252
.0198
.0154
.0119
.0091
.0069
.0051
.0038
.0028
.0020
.0015
.0010
.0007
.0005
.0004
.0002
.0002
0.06
,3982
.3939
.3857
.3739
.3589
.4410
.3209
.2989
.2756
.2275
.2036
.1804
.1582
.1374
.1182
.1006
.0848
.0707
.0584
.0478
.0387
.0310
.0246
.0194
.0151
.0116
.0088
.0064
.0050
.0037
.0027
.0020
.0014
.0010
.0007
.0005
.0003
.0002
.0002
0.07
.3980
.3932
.3847
.3726
.3572
.3391
.3187
.2966
.2732
.2251
.2012
.1781
.1561
.1354
.1163
.0989
.0883
.0694
.0573
.0468
.0379
.0303
.0241
.0189
.0147
.0113
.0086
.0065
.0048
.0036
.0026
.0019
.0014
.0010
.0007
.0005
.0003
.0002
.0002
0.08
.3977
.3925
.3836
.3712
.3555
.3372
.3166
.2943
.2709
.2227
.1989
.1758
.1539
.1334
.1145
.0973
.0818
.0681
.0562
.0459
.0371
.0297
.0235
.0184
.0143
.0110
.0084
.0063
.0047
.0035
.0025
.0018
.0013
.0009
.0007
.0005
.0003
.0002
.0001
0.09
.3973
.3918
.3825
.3697
.3538
.3352
.3144
.2920
.2685
.2203
.1965
.1736
.1518
.1315
.1127
.0957
.0804
.0669
.0551
.0449
.0363
.0290
.0229
.0180
.0139
.0107
.0081
.0061
.0046
.0034
.0025
.0018
.0013
.0009
.0006
.0004
.0003
.0002
.0001
Note:  f(-x) = f(x)
                                 121

-------
TASK [Li]:  ESTABLISH LIMITING SAMPLING RATES


Objective


       To establish limits on the surveillance sampling rate desired at

each source.


Output


       A tabulation of the minimum and maximum number of samples required

at each source listed in columns 5 and 6 of Table 4.8.


Inputs


       Information on:


           •  Past sampling rates

           •  Established policy (if any), on minimum and maximum
              sampling rates

           •  Suspected trouble spots, based on self-monitoring or
              ambient receiving quality data

           *  Length of planned monitoring period


References


       •   [1], Section VII.1


Procedure


       Based on the information provided by the inputs,  assign a mininum

and maximum number of samples required at each source.  Enter these into

columns 5 and 6 of Table 4.8.
                                  122

-------
TASK |12J:  DETERMINE ALTERNATIVE EXPECTED EXTENTS OF UNDETECTED VIOLATIONS


Objective


       To obtain, for each source, expected extents of undetected violations
for various sampling rates.


Output


       A list of expected extents of undetected violations for each can-
didate sampling rate recorded in columns 7-14 of Table 4.8.


Inputs


       •   Minimum and maximum sampling rates (from Table 4.8, Task [H])

       •   Violation weighting factors (from Table 4.8, Task (ic|)

       •   Probabilities of non-violation (from Table 4.8, Task{"9b
References
            [1], Section VI.3
Procedure
       1.  For each source i:

              In Table 4.8, Task J12], blank out spaces under s  values
              less than i. or greater than L..

                    NOTE:  The user can extend the table for larger
                           values of s., if necessary.  The sampling
                           rate limits, SL.  and L., are given in columns
                           5 and 6 of Table 4.8.1 If £.=0, no column
                           is needed for s.=0 because this eventually
                           is considered later.
                                     123

-------
I )
Hi.
                   2.   For  a  given  source  i:
                          a.   For the  lowest  s.  value,  compute the corresponding ex-
                               pected extent of  undetected  violation,  C.,  from
                                  C.(s.)   =   c.P.  X

                               where
                                    p.  and  c.  are taken  from  columns 3  and 4  (Tasks (ITI
                                    i      i
                                    and 0  of  Table 4.8
                               Enter the result  in  Table 4.8  appropriate s. column
                               under Task |12|.

                          b.   For the  next s. value,  compute C. by multiplying  the
                               result of Step  2a  again by p..   Enter the result  in
                               Table 4.8, next column  under Task (T2J.
                          c.   Repeat Step  2b  for all  s   values of  interest,  i.e., not
                               blanked  out.
                   3.  Repeat Step 2 for each source  in  the region.
                                                   124

-------
TASK [13J:  DETERMINE COST TO SAMPLE EACH SOURCE ONCE

Objective

       To obtain, for each source, the total cost of collecting, analyzing
and reporting a surveillance monitoring sample.

Output

       A list of component costs and a total sampling cost for each source.
Output is recorded in Table 4.12.

Inputs

       •   Man-hours required to sample each source and process resulting
           data
       •   Unit cost of labor
       •   Travel distance to sample each source
       »   Unit cost of field transportation
       •   Cost of expended field equipment
       •   Laboratory analysis charge for each constituent of interest

References

       •   [1], Section IX.1 (Table 9.2)
       •   [1], Appendix D
                                   125

-------
                  Procedure

                         1.  Enter names of constituents to be checked in headings of columns
                             10 through 15 in Table 4.12.

                                    NOTE:  The user can increase the number of
                                           these columns as required by his list
                                           of constituents

                         2.  For a given source i:
                                a.  Enter the above input information (input items a-e) into
                                    columns 2-5 and 8 respectively of Table 4.12.

                         3.  Multiply contents of column 2 by column 3, and enter results
                             in column 6 of Table 4.12.

                         4.  Multiply column 4 by column 5, and enter the result in column
                             7 of Table 4.12.

,. ......                     5.  Enter in columns 10-15 of Table 4.12, where appropriate, the
^;'•••••                         constituent analysis cost for each constituent to be analyzed
{•••;';'                         at an individual source.  The constituents to be analyzed at
                             any given source are listed in Table 4.5, TaskQJ.
 ' • 'i'
 i'/."                                NOTE:  The analysis costs will probably be quite
 !Ji.                                        small by comparison with the cost of the
                                           man-hours and travel, columns 6 and 7.

                         6.  Add the contents of columns 6-8 to obtain total cost per
                             sample.  Enter the results in column 9.  Add the contents
                             of columns 9-14 in Table 4.12, to obtain the total cost of
                             a sample at an individual source; enter the result in the
                             last column.
                         7.  Repeat Steps 2-6 for each source of interest in the region.
                                                     126

-------
         Table 4.12      Resources  Needed  to  Monitor  Each  Source Once
Source
No.
i
(1)

Man
Hours
Per
Sample
(2)

Cost
Per
Man
Hours
(3)

Travel
Miles
Per
Sample
(4)

Cost
Per
Mile
(5)

Per Sample Cost of:
Man
Hours
(6)

Travel
(7)

Expend .
Equip' t.
(8)

Total
Per
Sample
Cost
(9)

Laboratory Analysis
Charge/Constituent
(add constituent names)
#1
(10)

#2
(ID

//3
(12)

l?4
(13)

05
(14)

#6
(15)

Total
Cost

Note:  This table can be duplicated for use in the hand calculations.

-------
                   TASK |14j;   TABULATE MARGINAL RETURNS

                   Objective

                          To obtain,  for each source, the marginal return from each additional
                   surveillance monitoring sample collected there.

                   Output

                          A  tabulation of marginal returns for each sample to be taken at each
                   source-.   Output is recorded in Table 4.13.

                   Inputs

                          •    Alternative expected extents of  undetected violations, C.,
P'^'                         from Table 4.8, Task [H].                                1
•" ;•'•                     •    Costs to sample each source once, r., from Table 4.12, Task |13l.
j / '  S                                                            1

 "'!!!              References
 it'''
                          •    [1], Section VII.2

  , .-,.              Discussion

                          The marginal return, \i. , at a source i, varies with the sampling rate,
                   s.,  there.  As the source is sampled more frequently (s. increases), the
                   expected  extent of undetected violations, C., decreases.  Therefore, the
                   marginal  return for a given sample, y.(s.), is defined to be the incremental
                   decrease  in C , resulting from taking that  single sample, divided by the
                   cost,  r., to take that sample.   The cost, r., includes the analysis of
                   all  constituents of interest in the sample.
                                                       128

-------
Procedure
       1.  Enter the source numbers into Table 4.13, and for each source
           blank out spaces under y.  which correspond to those blanked
           out in Table 3.8 under Task ^2J.  In addition, for each source
           also blank out in Table 4.13, the p. space under, s. = £. ,
           where H. is given in column 5 of Table 4.8, Task O.
                  1                                         fc^^—*

       2.  For a chosen source, i, if the marginal return, u., for  sample
           s. = 1, has been blanked out, skip to Step 4, otherwise  proceed
           to Step 3.
       3.  For the same source, i, and for sample number 1 (s. = 1), compute
           the marginal return
                      c. - C  (1)
           where c. and C.(l) are taken from columns 4 and 7 of Table 4.8,
           and  r.  is  taken  from Table 4.12.  Enter y.(l)  into the  second
           column  of  Table  4.13.
       4.   For  the next sample number,  s., at the same source, if y  has
            been blanked out  (i.e.,  if  s.  < H. ), then increase s. by 1
            and  restart this  Step 4.  Otherwise, compute  the marginal return

                          C.(s.-l) - C.(s  )
                   (\       11       -LI
                i  Si)  =   	rT	

            where  the  C's  are taken  from Table 4.8 and r.  is taken from
            Table  4.12.  Enter the result, p.Cs..^), into the appropriate
            s.  column  of Table 4.13.
             i
                                    129

-------
ti-
lt
                         5.  Repeat Step 4  for  each  subsequent  sample,  s.,  not blanked  out

                             (i.e., s±  < L± ) in Table 4.13.


                                    NOTE:   The  user  can extend  the table for larger
                                            values of s., if necessitated by an ex-
                                            tended Table 4.8.
                         6.  Repeat Steps 2-5 for each source in Table 4.13.
                                                       130

-------
                 Table 4.13
Marginal Returns for Each Source
Source
No.
i

Marginal return, Uj(s.), from one additional sample, number s
V1

2

3

4

5

6

7

8

Note:  This table can be duplicated for use in the hand calculations.

-------
                   TASK |15|:  PRESELECT INITIALLY ALLOCATED SAMPLES


                   Objective


                          To preselect those  samples  needed to  meet the previously established

                   minimum requirements for each source.


                   Output


                          A listing of the samples  required to  meet minimum requirements,  with

                   the resulting degrees of undetected  violation and monitoring resources  re-

                   quired.  Table 4.14 is utilized.


                   Inputs


   :                       •   Minimum  sampling  rates, &.,  desired at each source (from
                              Table 4.8,  Task (ll|).      *

                          •   Violation weighting functions,  c.,  for all sources (from
                              Table 4.8,  Task (lOJ) .            1

i>. •'...,                       •   Expected extents  of undetected  violations, C.(s.), for  all
f! "•                           sources  (from Table 4.8,  Task J12|).           1  1
i • f * *
                          •   Resources needed  to monitor  each  source once, r.,  for all
                              sources  (from Table 4.12, Task J13J) .             """


"''••                Discussion


                          Since the initially allocated samples treated in this  task  must  be

                   included to meet the minimum requirements  established in Task (O,  no choice

                   may be exercised as to whether or not they may be included.   Therefore,

                   their marginal returns and ordering  are of no  consequence, and  so  these

                   computations have been omitted from  this task  to save labor.
                                                      132

-------
Procedure
       1.  Complete the first line of Table 4.14 for the case when no
           surveillance monitoring samples would be collected.  In that
           case
           Obtain this quantity Vc .), by summing all the entries in
           column 4 of Table 4.8.  Enter the result in both columns 5
           and 6, row 1, of Table 4.14.  Enter a "0" in column 8, row 1,
           of Table 4.14.

       2.  Find the first source in Table 4.8 with JL > 0.  If all £± = 0,
           go to Task [l6j.  In order to minimize the computations, all the
           £  samples required as a minimum at that source, will be treated
           together as follows:

              a.  Enter a "0" for the priority order in column 1, row 2,
                  Table 4,14.
              b.  Enter the source number, i, in column 2, row 2.
              c.  Enter the range of the number of samples, "1 to 8,." where
                  the value of I. is indicated, in column 3.  Thus, if
                  £. = 3, we will write: 1 to 3.
              d.  Write a dash for the marginal return in column 4 (since
                  this quantity is not required subsequently).
              e.  Compute AC. for the 8,. samples from
                      AC. = C.(£.) - c.
                        i    11     i
                                   133

-------
                                  where  C,(£.)  is  the first  entry for source,  i,  under
                                  Task |l2J in Table 4.8,  and  c.  is obtained from column 4
                                  of  Table  4.8.  Note that AC.  will  be negative.   Enter
                                  the result,  AC., into  column  5.
                               f.  Add the latest AC.(s.) (from  Step  2e above)  into the
                                  cumulative total,  £^C.(s.)  in the  previous row.   Note
                                  thaty]C.(s.)  should decrease, since the AC.(s.)  being
                                  added  in  is  negative.   Enter  the new cumulative total
                                  in  column 6.
                               g.  Multiply  the  number of samples,  £., (see Step 2c)  by
                                  the cost  per  sample, r., (obtained from Table 4.10)
                                  and enter the result in column 7.
                               h.  Add the latest column  1 entry (Step 2g  above) to the
                                  previous  total in  column 8, and enter the resulting
. ,.                                new total in  column 8.
5,
   1 I
    :                    3.   Repeat Step 2 for each  subsequent  source  in Table 4.8,  with
 '' :                         H.  >  0,  entering the results  into  subsequent rows of Table  4.14.

 }(-•   .                 4.   Draw  a line across Table  4.14, below the  last  entry, to indicate
 ';il                         the end  of Task  O.
                                                        134

-------
                Table 4.14
Sampling Priority List
Priority
Order
(1)

Source
No.
i
(2)

Sample
No.(s)
Si
(3)

Marginal
Return
y.(Si)
(4)

Degree of
Undetected
Violation
Incre-
mental
ACi(si)
(5)

Cumula-
tive
zc^)
(6)

Monitoring
Resources
Required
Per
Sample(s)
ri
(7)

Cumula-
tive
R=Zr
(8)

Note:  This table can be duplicated for use in the hand calculations,




                                  135

-------
»i:
TASK p|;  PRIORITY  ORDER MARGINAL  RETURNS

Objective

       To order  the marginal  returns  from  all  optional  samples  at  all
sources, in  terms of  their  sizes.

Output

       An ordered tabulation  of marginal returns  from each  optional  sample
collected at  each source, together with the resulting degrees of undetected
violation and monitoring resources required.   Output is recorded in  Table
4.14.

Discussion

       The term  "optional sample"  here refers  to  samples over and  above  the
minimum requirement and  below the  maximum  limit  (both established  in Task
jll]), and therefore, in the  range where choice  may be exercised.

Inputs
                          •   The results of the preselection of  the initially allocated
                              samples (from Table 4.14,  Task O) .
                          •   The tabulation of marginal returns  (not ordered) obtained  in
                              Task [L3],  Table 4.13.
                          •   Resources needed  to monitor each source once,  r.,  for  all
                              sources (from Table 4.12,  Task |l3J).             1
                                                      136

-------
Procedure
       1.
           a. Locate the largest marginal return, y.(s.), in Table 4.13.
              Enter its value into column 4 of the next available now in
              Table 4.14.  Enter its corresponding source number, i, and
              sample number, s., into columns 2 and 3 of Table 4.14.
              Enter its priority order, "1", into column 1.  Check it off
              in Table 4.13 as having been extracted.

           b. Enter the cost, r., for this single sample (obtained from
              Table 4.12) into column 7 of the same row of Table 4.14.
           c. Add the latest column 7, cost entry (Step Ib above) to the
              previous total cost in column 8, and enter the resulting
              new total cost in column 8.
           d. Compute the incremental degree of undetected violation from
              either
                  (i)    ACi(si)  =  Ci(s1) - Ci(si-l)

              where the C.(s ) are obtained from Table 4.8, Task Ez] and
                         X  1                                    ^"""^
              where C.(0) is defined to be, c., (also from Table 4.8) or
              from
                  (ii)   AC^s..)  =  -riPi(s.)

              where the r.  and p. are obtained from Steps Ib and la above
              columns 7 and 4 of Table 4.14.  Enter the result into
              column 5 .
                      NOTE:  AC.(s.) will be negative
           e. Add the AC.(s.) from Step Id above,  to the cumulative total
              5jC.(s.) in column 6 of the previous now.  Note that y^C . ( s . )
              should decrease, since the AC.(s.) being added in is negative.
              Enter the new cumulative total into column 6.
                                   137

-------
2.  Repeat Step 1 for the next largest marginal return, v^s ), in
    Table 4.13, increasing its priority order (column 1 of Table
    4.14) by 1.
3.  Repeat Step 2 until all the entries in Table 4.13 have been ex
    tracted, and entered in order in Table 4.14.
                           138

-------
TASK 17:  DETERMINE SAMPLING RATES


Objective


       To determine and summarize for the chosen constraint, the sampling
frequency for each source.


Output


       A source-by-source tabulation of sampling rates, monitoring re-

sources required, and resulting degrees of undetected violations.


Inputs


       •   Limiting sampling rates (from Table 4.8, Task pjj) .

       •   Cumulative degrees of undetected violation and monitoring
           resources required for individual samples, rank ordered by
           marginal return (from Table 4.14, Task [l6j).

       •   Resources required to monitor each source once (from Table
           4.12, Task (l^).

       •   Degrees of undetected violation per source for various
           alternative sampling rates (from Table 4.8,  Task JTJJ) .

       •   The constraint on the surveillance monitoring funds available,
           or on the maximum acceptable degree of undetected violation.


Discussion


       The two principal constraints most likely to limit the total number

of surveillance samples to be collected during a monitoring period are:
(i) the amount of funds (resources)  available for surveillance monitoring,
or (ii) the maximum acceptable degree of undetected violation (compare
                                   139

-------
with  column  6 of Table 4.14).  The  former obviously increases with more
sampling, while a decrease in  the latter requires more samples to be
taken.

       It is expected that the dollar constraint (i) will most commonly
be used, particularly at first when the users of this allocation pro-
cedure are not very familiar with the concept of "degree of undetected
violation."  However, as familiarity with both this concept and the
numbers which measure it grows, it is quite possible that improved effluent
control by dischargers could lead to a type (ii) constraint requiring
fewer surveillance samples than type (i).

       When a compliance sample detects a violation during a monitoring
period, the compliance monitoring program could be said (depending upon
the extent of the violation)  to have "achieved its objective" at the
source in question.   If further samples had been scheduled at the same
source during the monitoring period, these may now be deemed unnecessary,
depending upon the  surveillance agency's policy.  The funds from these
saved samples, may be. applied to samples at sources next in priority order
(see Table 4.14)  if  the agency can reschedule in mid-period, or they may
be saved for use  in  the following monitoring period.

Procedure

       1.   Copy the  contents  of columns 1,  5,  and 6 of Table 4.8  into
           the first three  columns of  Table 4.15.

       2.   Determine which  of the following two constraints  will  limit
           the total number of samples to  be collected in  the proposed
           monitoring (see  Discussion  above)  period:
                                  140

-------
       (i)   The maximum monitoring resources (funds) available;
             or
       (ii)  the maximum acceptable degree of undetected violation.

3.  Locate the position of the chosen constraint in relation to the
    contents of column 6 or 8 of Table 4.14, whichever is appropriate.
    Draw a second line across Table 4.14 immediately below the
    largest entry smaller than the constraint.   (To meet the con-
    straint, the samples below this line cannot or need not be
    taken.)

4.  From the portion of Table 4.14 above, the cutoff line drawn
    in Step 3, determine the total number of samples to be taken
    at each source, and enter the results in column 4 of Table 4.15.

5.  Determine the monitoring resources needed per source by (i)
    adding the individual resources, r., for that source listed in
    column 7 of Table 4.14 above the cutoff line, or by (ii)
    multiplying the number of times to be sampled (column 4 of Table
    4.15) by the resources, r., required to monitor each source
    once (last column of Table 4.12).   Enter the result for each
    source in column 5 of Table 4.15.

6.  Determine the degree of undetected violations per source by
    finding the value of C.(s.) in Table 4.8, Task O, which cor-
                          i  i                     ^"""^
    responds to the sampling rate, s., specified in Table 4.15,
    column 4.  If s.  = 0, for any source enter  C., because C(0)=C..
    Enter the result for each source into the last column of Table
    4.15.
                              14.1

-------
7.  Add up all the entries in columns 5 and 6 of Table 4.15 to
    obtain the two respective totals and enter them below those
    columns.

           NOTE:   The appropriate total should meet the
                  constraint specified above Table 4.15.
                            142

-------
                    Table 4.15
Sampling Rates
   Maximum monitoring resources  available,  R =  $	
   Maximum acceptable degree  of  undetected  violations
Source
No.
i
(1)

Min. No.
Samples
Required
*i
(2)

Max . No .
Samples
Allowed
Li
(3)

No. of
Times
to be
Sampled
Si
(4)

Totals:
Monitoring
Resources
Needed
$
(5)


Degree of
Undetected
Violations
C^s.)
(6)


Note:  This table can be duplicated for use in the  hand calculations.
                                  143

-------
... 'j
                    TASK J18J:  DEVELOP MONITORING SCHEDULE (Discussion)

                    Objective

                           To develop a time schedule for monitoring the sources to be sampled
                    during the forthcoming monitoring period.
                           A surveillance monitoring time schedule, indicating on which days
                    which sources are to be sampled.
                           The sampling rate determined for each source in Task JITJ,  Table A.15.
                    Discussion

                           The scheduling of the sampling depends on a number of factors which
                    are difficult to quantify in an optimization framework,  such as:  the
    : ,               spatial location of the various effluent sources, the size of the monitoring
                    agency's jurisdiction,  the availability of personnel, and the desire for
    • '.               "random" timing within the monitoring period, to combat  possible  "gamesman-
    ; ji               ship" on the part of the dischargers.  This scheduling must, therefore,  be
                    the responsibility of the surveillance agency;  it is  not part of  the re-
                    source allocation procedure provided in this handbook.
                                                        144

-------
                                 SECTION 5
                    USER MANUAL FOR COMPUTER CALCULATION
5.1    MODE OF OPERATION

Purpose

       The purpose of the Effluent Monitoring Program (EFFMON) is to aid
the user in scheduling future compliance monitoring visits to effluent
sources.  The user of the program may specify up to 30 effluent  sources
which are of interest, inputting information about the sources,  including
up to two years of past self-monitoring and compliance monitoring data.
The program uses this information to compute a "priority allocation",
a listing of the effluent sources showing how often each should be sampled
during the upcoming monitoring period in order to minimize environmental
damage.  The larger the amount of past effluent data which is input, the
better EFFMON will perform.  Likewise, the quality of information is also
important.

Solution Technique and Model Usage

       The algorithms used by EFFMON in the calculation of a priority
allocation are described in detail in Section 2 and also in Reference  [1].
Briefly, the procedure is as follows: for each distinct constituent of
each effluent source, all given self-monitoring and compliance monitoring
data are combined to yield overall estimates of the mean and standard
deviation of the constituent loading.  Using these statistics, and the
effluent standard, a probability of not violating the standard is found
for the constituent.  From the constituent probabilities, a source prob-
ability of no violation is calculated.
                                   145

-------
        Next,  an  expected  damage of  an  undetected violation  is  calculated
 for  each  constituent  of a source, which  leads  to the  expected  damage  for
 that source.   Expected damage  is defined as  the average  environmental
 damage expected  to  be caused by the effluent;  it is determined on  the
 basis of  damage  functions (see Section 2.4,  Criterion #2 for details).
 These damage  functions relate  environmental  damage to constituent  con-
 centrations,  and  consist  of six "breakpoints"  (11 in  the case of pH)
 which are assigned  increasingly larger "damage values" as shown in Table
 2.4  and Figure 2.3.   Damage values  are numerical values which indicate
 the  relative  environmental damage caused (i.e., 0, 2, 4, 6, 8 and  10)
 corresponding to  "none",  "excellent",  "acceptable", "slightly polluted",
 "polluted", and "heavily  polluted".  The breakpoints  are the associated
 levels of concentration for the constituent.   The specific damage values
 and  breakpoints used  influence  the  determination of expected damages and
 hence,  the priority allocation.  The user can  rely on the default values
 for  these functions present in  EFFMON, but should consult Section 3.1 for
 advice on inputting his own values.  The user  can optionally set all ex-
 pected damages at 1.0 and compute the  priority allocation solely on the
 basis  of  probabilities of no violation (as discussed in Section 2.4,
 Criterion #1)  and monitoring costs.

       Finally, the program uses the information about expected damage
 and  probability of no violation  for each source to compute monitoring
 allocations for all effluent sources.  Other factors important  in deter-
 mining the allocation which the user has input control are the  monitoring
 costs.  Each  source has a resource cost  (cost to monitor) which is deter-
mined by adding a laboratory cost for each constituent of the  source onto
 a base cost determined by the number of pipes at the source. Default
values are present in the program,  but these costs  are highly variable,
and  the user  should input his own (see Section 3.1).
                                 146

-------
       As has been pointed out, the user has various ways of influencing
the program results given a particular set of monitoring data.  There are
also other constants which affect the final results (i.e., the constants
used in the combination of data to find the mean and standard deviation
of each constituent).  All such influential variables are marked by a "+"
in the input description, Table 5.1, and the user is referred to Section
3.1 for assistance in determing input values.

       The program works in standard units which are the same as those
listed in Table 5.4.  (Table 5.4 lists acceptable input units for com-
pliance monitoring data and effluent standards.)  Data which is input in
other units is converted by the program.

General Model Inputs

       The information which the user must have to input to the program
consists of:
       1.  A list of effluent sources to be considered and the minimum
           and maximum number of samples for each, for the next monitoring
           period.  If the user specifies "zero" as the minimum, and a
           large value as the maximum, the program makes the most optional
           allocation; however, the user may need to meet certain con-
           straints and thus, specify other values.
       2.  A list of the discharge pipes present at each effluent source
           and the constituents to be considered from each pipe.
       3.  A decision for each constituent as to whether that constituent
           loading is distributed normally or lognormally.  Note that pH
           is always considered to be distributed normally whereas coli-
           forms are always considered to be lognormal (see Section 4,
           Task 1 for assistance in making decisions on other constituents)
       4.  A decision for each effluent source as to whether or not the
           various constituent loadings are correlated (see Section 3.1).
       5.  The stream flow immediately upstream of each effluent source.
                                   147

-------
        6.   Self-monitoring data (effluent measurements taken by the dis-
            charger and  sent to  the monitoring agency)  for each constituent
            and flows for each pipe.

        7.   Any compliance monitoring data (measurements taken by the
            monitoring agency) which is available for the dischargers.

        8.   An effluent  standard for each constituent (of each pipe of
            each effluent source)  except DO.   The constituent DO is
            different from all others in that  it  is  only used to aid in
            calculating  expected damage due to BOD,,  loads.   No expected
            damages or violation probabilities are calculated for DO it-
            self.   Therefore,  whenever possible,  DO  effluent data should
            be entered for sources containing  BOD,.;  in  the event that no
            DO data is input,  default values are  used.

        9.   The "permit  effluent flow" (as registered with the monitoring
            agency on a  discharge permit)  for  each pipe of each source.

       10.   The saturation level of dissolved  oxygen (DO) in the stream
            for effluent sources where BOD,, is a  considered constituent.

       11.   Various options and  coefficients  (as  marked by a "+" in the
            input  list of Table  5.1 and explained in Section 3.1).
 Restrictions  and  Requirements
        1.   The maximum number of  effluent  sources which  can be  considered
            in the monitoring allocation  procedure at  one time is  thirty.*

        2.   A maximum  of  four discharge pipes  can be considered  at each
            source.

        3.   All discharge pipes  at a  single source are assumed to  empty
            into  the same receiving water body.

        4.   No more  than  ten distinct  constituents may be considered  at
            one effluent  source  (there may  be  forty constituents if the
            same  ten occur in each pipe).

        5.   The self-monitoring  data must consist of measurements  of  the
            effluent levels and  pipe  flow made once, on several  days, or
            daily during  a calendar month.   All  self-monitoring  data must
            be reducible  to a monthly  mean  of  each constituent's loadings,
:
The limit of 30 sources was set for purposes of demonstration in this
project.  This capability could easily be expanded in the computer pro-
gram by changing  the appropriate numbers in the DIMENSION and COMMON
statements of the program.
                                  148

-------
           monthly maximum of each constituent's loadings, and a sample
           size for the month (except for -the constituent pH, for which
           a monthly minimum must also be available and a monthly mean
           is not mandatory).   The pipe flows must reduce to a monthly
           mean of the measured daily flows.

       6.  A minimum of one calendar month of self-monitoring effluent
           data must be available for each constituent of every pipe of
           every source.  More than the minimum one month's data is man-
           datory if the sample size for that month is less than four;
           in that case as many months as is necessary for the sum of
           the monthly sample sizes to be four or larger is needed.

       7.  A maximum of twenty-four calendar months of self-monitoring
           data may be input for any pipe of a source.  The months need
           not be consecutive months, but a monthly mean pipe flow and
           data for each constituent of the pipe (or zeros if no data is
           available for some of the constituents for a given month),
           must be entered.

       8.  Compliance monitoring data may be entered for any constituent
           for any month for which self-monitoring data (or zeros) was
           entered.  Compliance monitoring consists of a single measure-
           ment, and a maximum of thirty of these compliance monitoring
           points may be entered for a constituent for any given month.

       9.  Compliance monitoring data must be entered in units as specified
           in Table 5.4.  Likewise, self-monitoring data and effluent
           standards must also be entered in units as specified in Table
           5.4.  The user must convert the data in all other cases;
           assistance may be found in Section 4, Task 2.

      10.  The permit flow units must be Megaliters/day and a permit flow
           must be entered for each pipe of each source.  This value is
           necessary for use in converting the effluent standards into
           proper units; the program has standard units (generally Kg)
           and does conversions of its own.  The permit flow is also used
           in cases where all monthly pipe flows are 0.0 (no pipe flow
           data).
Preparation of Inputs


       Before entering numbers on coding forms, the user should organize

his data.  He should have a list of all his sources which he should number

as 1, 2, 3, 4 and so on (in whatever source order is convenient).  The
                                   149

-------
                     total number must be less than or equal to 30,  He should number each
                     pipe of each source as 1, 2, 3, and 4 (for a 4-pipe source), in whatever
                     order is convenient.  Finally, he should number each constituent of the
                     pipes as 1, 2, 3, 4, and so on (maximum of 10).

                            Next, he should examine each pipe of each source and all of its
                     constituents to find all months for which monitoring or flow data will
                     be entered.  These months should be ordered chronologically and numbered
                     as 1, 2, 3, 4, and so on (to a maximum of 24).  The numbers themselves
                     mean nothing; they serve only for identification.   Therefore, it does not
                     matter if there are months skipped,  or even larger gaps, so long as each
                     month is numbered sequentially, larger numbers indicating more recent
                     data.  Even if some part of the data is missing for a particular month,
                     assign a number (i.e., if only two constituents for a particular month
                     have monitoring data and there is no flow data for the month, one can
                     enter the data for the two constituents for that month and enter 0.0 for
                     all other constituents and the flow) .

                            All of the numbers assigned should be carefully recorded.  They
                     must be consistently used for identification throughout the input cards.
'V j •"  •
--'                   5.2    INPUT DESCRIPTION
                            The inputs required by EFFMON are described in Table 5.1.   Any
                     variable marked by a "+" is discussed in Section 3.1  and  the user  should
                     refer to that Section for suggested input values.   A  sample  input deck
                     is illustrated in Figure 5.1.
                            All  variables which  require a decimal point are specified, and the
                     user  should be  careful  to insert  a decimal point.  For the other variables,
                     no  decimal  point  is allowed.   For a given variable, the numerical data
                     need  not  fill all the allowed  columns, but the data must be placed in the
                                                        150

-------
                                            Table  5.1  EFFMON  Inputs
   CARD
  NUMBER
  CARD
COLUMN(S)
DECIMAL
 POINT?
VARIABLE
  NAME
UNIT MUST
    BE
DEFAULT
 VALUE
DESCRIPTION
DAMAGE FUNCTION/RESOURCE COST OPTIONS
                                    No
                                 ICOSTS
                                    No
                                 IDMG
                                    No
                                 IDAMAG
                                                              0,  Default  values
                                                                 for  monitoring
                                                                 costs  (see
                                                                 variables PIPCST
                                                                 and  CONCST)

                                                              0,  Costs  will be
                                                                 inputted

                                                              0,  Default  pH and
                                                                 pOH  damage
                                                                 function break-
                                                                 points will  be
                                                                 used (see DMG)

                                                              1,  Read in  pH o_r
                                                                 pOH  damage
                                                                 function break-
                                                                 points

                                                              2,  Read in  both pH
                                                                 and  pOH  damage
                                                                 function break-
                                                                 points

                                                              0,  Default  damage
                                                                 function break-
                                                                 points for non-
                                                                 pH constituents
                                                                 (see DAMAGE)

-------
                                              • •  :'.• :  "  ' '.•'•{ .1" "; JTC  ':
   CARD           CARD             DECIMAL        VARIABLE        UNIT MUST        DEFAULT
  NUMBER        COLUMN(S)           POINT?           NAME              BE             VALUE


                                                                                             = X, Total number of
                                                                                                  constituents
                                                                                                  whose damage
                                                                                                  function break
                                                                                                  points will be
                                                                                                  replaced with
                                                                                                  inputted values
                                                                                                  (530)

                    7               No              ISS                                      = 0, Default damage
                                                                                                  function values
                                                                                                  will be used

                                                                                             ^ 0, Inputted damage
                                                                                                  function values
                                                                                                  will be used
                                                                                                  (see S and SSPH)


*****Cards 2-6 are included only if ICOSTS^O************************************************^
*BASE COST TO MONITOR
*   2               1-10            Yes          PIPCST(l)             $          $ 525      Base cost to monitor
                                                                                             1-pipe source
*                   16-25           Yes                (2)             $            525      Base cost to monitor
                                                                                             2-pipe source
*                   31-40           Yes                (3)             $            857      Base cost to monitor
                                                                                             3-pipe source
*                   45-54           Yes                (4)             $            857      Base cost to monitor
                                                                                             4-pipe source
*LAB COSTS TO MONITOR
*   3               1-5             Yes          CONCST(l)             $              8.50   Lab cost  to analyze
                                                                                             aluminum
*                   11-15           Yes                (2)             $             10.00   Lab cost  to analyze
                                                                                             ammonia
*                   21-25           Yes                (3)             $             20.00   Lab cost  to analyze
                                                                                             BOD

-------
                                             Table  5.1
Continued
Ul
OJ
CARD
NUMBER
*

*

*

*

*

* 4

*

*

*

*

*

*

*

* 5

*

*

*

*

CARD
COLUMN (S)
31-35

41-45

51-55

61-65

71-75

1-5

11-15

21-25

31-35

41-45

51-55

61-65

71-75

1-5

11-15

21-25

31-35

41-45

DECIMAL
POINT?
Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

VARIABLE
NAME
CONCST (4)+

(5)

(6)

(7)

(8)

(9)

(10)

(11)

(12)

(13)

(14)

(15)

(16)

(17)

(18)

(19)

(20)

(21)

UNIT MUST
BE
$

$

$

$

$

$

$

$

$

$

$

$

$

$

$

$

$

$

DEFAULT
VALUE
0.00

10.00

0.00

5.00

15.00

7.50

15.00

15.00

7.50

15.00

8.00

7.50

7.50

7.50

15.00

7.50

10.00

10.00

DESCRIPTION
Not used-leave
columns blank
Lab cost to analyze
carbon
Not used-leave
columns blank
Lab cost to analyze
chloride
Lab cost to analyze
chloroform
Lab cost to analyze
chromium
Lab cost to analyze
total coliforms
Lab cost to analyze
fecal coliforms
Lab cost to analyze
copper
Lab cost to analyze
cyanide
Lab cost to analyze
fluoride
Lab cost to analyze
iron
Lab cost to analyze
lead
Lab cost to analyze
manganese
Lab cost to analyze
mercury
Lab cost to analyze
nickel
Lab cost to analyze
nitrogen
Lab cost to analyze
oil-grease

-------
                                Table 5.1
                                ContinueH
   CARD
  NUMBER
  CARD
COLUMN(S)
DECIMAL
POINT?
VARIABLE
  NAME
UNIT MUST
    BE
DEFAULT
 VALUE
DESCRIPTION
                  51-55
                    Yes
               CONCST(22)
                                   3.00
*

*

*

*
61-65
71-75
1-5
11-15
21-25
31-35
41-45
51-55
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
(23)
(24)
(25)
(26)
(27)
(28)
(29)
(30)
$
$
$
$
$
$
$
$
0.00
12.50
10.00
5.00
5.00
0.00
8.50
3.00
                           Lab cost to analyze
                           PH
                           Not used-leave blank
                           Lab cost to analyze
                           phenol
                           Lab cost to analyze
                           phosphorus
                           Lab cost to analyze
                           dissolved solids
                           Lab cost to analyze
                           suspended solids
                           Lab cost to analyze
                           temperature difference
                           Lab cost to analyze
                           tin
                           Lab cost to analyze
                           DO  (dissolved  oxygen)
******Cards 7 and 8 are included only if  IDMG^O********************************************************************
* pH/pOH DAMAGE FUNCTION  BREAKPOINTS  IN UNITS  OF ION  CONCENTRATION
                                     No
                                                      II
*
*
*
*
*
*
* 8
6-15
16-25
26-35
36-45
46-55
56-65
6-15
Yes
Yes
Yes
Yes
Yes
Yes
Yes
DMG(Il.l)
(11,2)
(11,3)
(11,4)
(11,5)
(11,6)
(11,7)
                                                                             =1 for pH damage
                                                                                function

                                                                             =2 for pOH damage
                                                                                function
                                                See Table 5.2  See Table 5.2 1st damage function
                                                                             breakpoint
                                                      "                "       2nd damage function
                                                                             breakpoint
                                                      "                "       3rd damage function
                                                                             breakpoint
                                                      "                "       4th damage function
                                                                             breakpoint
                                                      "                "       5th damage function
                                                                             breakpoint
                                                      "                "       6th damage function
                                                                             breakpoint
                                                      "                "       7th damage function
                                                                             breakpoint

-------
                               Table 5.1       Continued
CARD
NUMBER

*

*

*

*

CARD
COLUMN (S)

16-25

26-35

36-45

46-55

DECIMAL
POINT?

Yes

Yes

Yes

Yes

VARIABLE
NAME

DMG(I1,8)

(11,9)

(11,10)

(11,11)

UNIT MUST
BE
As in
Table 5.2

M

It

tl

DEFAULT
VALUE
See
Table 5.2

It

It

It

DESCRIPTION

8th damage function
breakpoint
9th damage function
breakpoint
10th damage function
breakpoint
llth damage function
breakpoint
*****Cards 9 and 10 are included only if iDMG=2******************!l:************************************************
*   9             Cards 9 and 10 correspond to 7 and 8 except that the other damage function must be inputted
    10            (i.e., if 7 and 8 input pH,  9 and 10 must input pOH, or vice versa)

*****Card(s) 11 are included only if IDAMAG>0*********************************************************************
*   NON-pH DAMAGE FUNCTION BREAKPOINTS
    11            1-2                No               II                                      Damage function
*                                                                                             identification
                                                                                              number (i.e.,  01
*                                                                                             for aluminum,  15
                                                                                              for iron, and  so on -
*                                                                                             see Table 5.3)

*                 6-15               Yes           DAMAGE(I1.1)+ See  Table  5.3  See Table  5.3  1st damage function
                                                                                              breakpoint for II
*                 16-25              Yes                 (11,2)         "              "       2nd damage function
                                                                                              breakpoint for II
*                 26-35              Yes                 (11,3)         "              "       3rd damage function
                                                                                              breakpoint for II
*                 36-45              Yes                 (II.,4)         "              "       4th damage function
                                                                                              breakpoint for II
*                 46-55              Yes                 (11,5)         "              "       5th damage function
                                                                                              breakpoint for II
*                 56-65              Yes                 (11,6)         "              "       6th damage function
                                                                                              breakpoint for II
*   Repeat card 11 as many times as specified  by the value of IDAMAG (one card for each damage function,
    in any order).

-------
                                    Table  5.1
Continued
Ln
cr-
CARD CARD DECIMAL
NUMBER COLUMN(S) POINT?
VARIABLE UNIT MUST DEFAULT
NAME BE VALUE
DESCRIPTION
********Cards 12 and 13 are included only if iss^O**************************************************************
NON-pH BREAKPOINT DAMAGE VALUES +
* 1-5 Yes S(l) 0. 1st value of non-

*

*

*

*

*

*
*

*

*

A

*

*

*

*

*

*

*


6-10

11-15

16-20

21-25

26-30

pH BREAKPOINT DAMAGE VALUES
13 1-5

6-10

11-15

16-20

21-25

26-30

31-35

36-40

41-45

46-50

51-55


Yes

Yes

Yes

Yes

Yes


Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes


(2)

(3)

(A)

(5)

(6)

-I-
SSPH(l)

(2)

(3)

(4)

(5)

(6)

(7)

(8)

(9)

(10)

(11)


2.

4.

6.

8.

10.


0.

1.

2.

3.

4.

5.

6.

7.

8.

9.

10.

pH damage functions
2nd value of non-
pH functions
3rd value of non-
p-H functions
4th value of non-
pH functions
5th value of non-
pH functions
6th value of non—
pH functions

1st value of pH/
pOH damage function
2nd value of pH/
pOH damage function
3rd value of pH/
pOH damage function
4th value of pH/
pOH damage function
5th value of pH/
pOH damage function
6th value of pH/
pOH damage function
7th value of pH/
pOH damage function
8th value of pH/
pOH damage function
9th value of pH/
pOH damage function
10th value of pH/
pOH damage function
llth value of pH/
pOH damage function

-------
                              Table  5.1
                                Continued
 CARD
NUMBER
  CARD
COLUMN(S)
DECIMAL
POINT?
VARIABLE
  NAME
UNIT MUST
    BE
DEFAULT
 VALUE
DESCRIPTION
  OUTPUT OPTIONS
  14           1
                11



                16



                21



                26-35

                36-45
                    No



                    No



                    No



                    No



                    No



                    Yes

                    Yes
                 NOUT



                 IOUT1



                 IOUT2A



                 IOUT2B



                 I OUT 3



                 B

                 D
                                             ?fO,  No tabled output
                                                 (as in Figure
                                                 5.7)
                                             =0,  Tabled output
                                             5*1,  No type 1 output
                                                 (as in Figure
                                                 5.2)
                                             =1,  Output type 1
                                             ^1,  No type 2A output
                                                 (as in Figure
                                                 5.3)
                                             =1,  Output type 2A
                                             ^1,  No type 2B output
                                                 (as in Figure
                                                 5.4)
                                             =1,  Output type 2B
                                             ^1,  No type 3 output
                                                 (see Figures
                                                 5.5 and 5.6)
                                             =1,  Output type 3
                                             Budget limit (used
                                             if  IOUT3=1)
                                             Undetected-violation-
                                             cost limit (used if
                                             IOUT3=1)—for B and  D,
                                             one  allocation is
                                             made for each which
                                             is not 0.

-------
                                     f-y^  -* n S f
                                    Table  5.1
                                 Continued
      CARD
    NUMBER
  CARD
COLUMN(S)
DECIMAL
POINT?
VARIABLE
  NAME
UNIT MUST
   •BE
DEFAULT
 VALUE
DESCRIPTION
       SOURCE CONSTANTS
       15            1
oo
                     11-12
                     16-17
       UPDATING CONSTANTS
       16             1-10
                     11-20
                     21-30
                     31-40
                     41-50
                     No
                  ICOPT
                                       No
                                   IEXPD
                     No
                                       No
                    Yes
                    Yes
                    Yes
                    Yes
                    Yes
                 NOSORS
                                  NUSORS
                 ALPHA
                  GAMMA
                  KETA
                  KNU
                  ENU+
                                             That damage  function
                                             breakpoint n (n=l,
                                             2,3,4,5,or 6) which
                                             represents the up-
                                             stream  concentration
                                             of all  non-coupled
                                             constituents (by  the
                                             nth breakpoint of
                                             their respective
                                             damage  function)
                                             ±0, All expected
                                                 damages  in the
                                                 allocation are
                                                 set at .1.0
                                             =0, All expected
                                                 damages  are
                                                 calculated from
                                                 the data
                                             Number  of sources
                                             for which data will
                                             be read in
                                             Number  of sources
                                             to be considered  by
                                             the program  for
                                             allocation (
-------
                             Table  5.1
                             Continued
   CARD
  NUMBER
  CARD
COLUMN(S)
DECIMAL
POINT?
VARIABLE
  NAM:;
UNIT :
-------
                                             Table 5.1
                        Continued
CARD
NUMBER
SOURCES TO
20


CARD
COLUMN (S)
BE ALLOCATED
1-2
3-4
5-6
DECIMAL
POINT?

No
No
No
VARIABLE UNIT MUST D
NAME BE

INSORS(l)
(2)
(3)
ST DESCRIPTION

Sources to be considered
for priority allocation
in sequential order (i.e.,
by source number)
                                                    (NOSORS)
SOURCE DESCRIPTION

    21              1-2
No
             ID
For variable NAME only,  data must begin in column 4 and need not fill all columns.

                    4-55           No           NAME(I,J)
57-62
63-68
69-74
QU(I)
KBOD(I)
DOSAT(I)
Megaliters/
day
Mg/liter
Source number (between 1 and
30)
                                                         Source  description  as
                                                         desired (i.e.,  XYZ  COMPANY,
                                                         RIVER CITY).
                                                         Upstream flow for sources
                                                         ID
                                                         BOD transfer  coefficient
                                                         for source  ID
                                                         Saturation  level of DO  for
                                                         source  ID

-------
                                            Table  5.1
                                             Continued
 CARD
NUMBER
  CARD
COLUMN(S)
DECIMAL
 POINT?
VARIALLE
  NAME
UNIT MUST
    BE
DEFAULT
 VALUE
DESCRIPTION
                   77-78
                  79-80


   PIPE  DESCRIPTIONS

     22             1-2
                   4-5
                                IONESD(1)
                                NPIP
                                NPPARS(l)
                                NMNTHS(l)
   Fill  in  the  following  if  there is a 2nd pipe, otherwise leave remainder of card blank

                   7-8                          NPPARS(2)
                  10-11
                                NMNTI!S(2)
   Fill  in  the  following  if  there  is a  3rd pipe, otherwise leave remainder of card blank

                  13-1A                         NPPARS(3)
                  16-17
                                NMNTHS(3)
                                                            = 0, if there is no
                                                            for source ID or if
                                                            for source ID has a
                                                            minimum and mean.

                                                            = 1, if pH data for
                                                            source ID consists of
                                                            only a maximum and
                                                            minimum (no mean)

                                                            Number of discharge
                                                            pipes for source ID
                                                            Number of constituents
                                                            discharged from 1st'
                                                            pipe to be entered as
                                                            data
                                                            Number of months of con-
                                                            stituent and flow data
                                                            from 1st pipe
                                                            Number of constituents
                                                            discharged  from 2nd pipe

                                                            Number of months of con-
                                                            stituent and  flow data
                                                            from  2nd pipe


                                                            Number of constituents
                                                            discharged  from 3rd pipe

                                                            Number of months of con-
                                                            stituent and  flow data
                                                            from  3rd pipe

-------
                                             Table 5.1
                                         Continued
     CARD
    NUMBER
  CARD
COLUMN'(£)
DECIMAL
POINT?
VARIABLE
  NAME
UNIT MUST
    BE
DEFAULT
 VALUE
DESCRIPTION
Fill in the following if there is a 4th pipe,  otherwise  leave  remainder of card blank
                      19-20                        NPPARS(A)                                   Number of constituents
                                                                                              discharged from 4th pipe

                      22-23                        MHHTHS(4)                                   Number of months of con-
                                                                                              stituent and flow data
                                                                                              from 4th pipe
Cards 21 and 22 must be repeated  for every  source  (i.e.,  21 and  22  for the first souce, then 21 and 22 for the second
source, then 21 and 22 for the third).   Note  that  the number of  times NPPARS(i) and NMNTHS(i) appears on card 22 is
the number that was listed under  NPIP on card  21;  in counting  constituents for NPPARS, pH  (if present) must be counted
twice.
PIPE FLOW DATA

     23
    1-2

    5-6

    7-8


    9-10
  No

  No

  No


  No
                      15-16


                      19-24

                      29-30
                   No


                   Yes

                   No
ID

PIPNO

IQS


QSUNIT(J)




MNTHQS(J.l)
               QSMEAN(J.l)    Megaliters/day or
                              million gallons/day
               MNTHQS(J,2)
                            Source number (between
                            1 and 30)

                            Pipe number (between 1
                            and 4)

                            Enter "99" (signals com-
                            puter that this is a
                            flow card)

                            Units that pipe-flow will
                            be entered in (for this
                            source and pipe J=PIPNO),
                            = 8 for megaliters/day
                            = 3 for million gal/day

                            First month for which
                            pipe J-PIPNO flow will
                            be entered
                            Mean pipe flow for first
                            month, pipe J=PIPNO

                            Second month for which
                            pipe J=PIPNO flow will
                            be entered

-------
                                     Table 5.1
         Continued
u>
CARD CARD
NUMBER COL-UMAT(S)
33-38
43-44
47-52
57-58
61-66
71-72
DECIMAL
POINT?
Yes
No
Yes
No
Yes
No
VARIABLE
NAME
QSMEAN(J,2)
MNTHQS(J,3)
QSMEAN(J,3)
MNTHQS(J,4)
QSMEAN(J,4)
MNTHQS(J,5)
UNIT MUST DEFAULT
BE VALUE
Megaliters/day or
Million gallons/day

Megaliters/day or
Million gallons/day

Megaliters/day or
Million gallons/day

DESCRIPTION
Flow for second month
Third month for which
pipe J=PIPNO flow will
be entered
Flow for third month
Fourth month for which
pipe J=PIPNO flow will
be entered
Flow for fourth month
Fifth month for which
                           75-80
Yes
QSMEAN(J,5)
Megaliters/day or
Million gallons/day
                                                       pipe J=PIPNO flow will
                                                       be entered

                                                       Flow for fifth month
       Repeat columns 15-80 on as many cards  as  needed  (up  to 4  additional cards) to enter more months and flows for this
       pipe; at any point on any card  when the end  of the month/flows  is  reached, leave  the remainder of the card blank
       and proceed to card 24.  Note that  the months must be placed  sequentially on the  cards  (i.e., 1,2,3,5,6,8,10, ...)
       although some may be skipped if no  data is available; but any month for which data is entered must appear.  If  for
       a certain month flow data is not available,  enter 0.for QSMEAN  for that month.
       SELF-MONITORING CONSTITUENT DATA

            24              1-2
                                             No
             ID
                                          Source number (must be
                                          the same as on card 23)

-------
Table 5.1
Continued
CARD CARD
NUMBER COLU'-CT(S)
5-6
7-8
9-10
11-16
17-22
23-24
25-30
31-36
37-38
39-44
45-50
DECIMAL
FOIN'T?
No
No
No
Yes
Yes
No
Yes
Yes
No
Yes
Yes
VARIABLE
NAME
PIPNO
IPARM(J,K,I)
PRUNIT(J,K)
SMAX(J,K,1)
SMEAN(K,K,1)
NSIZE(J,K,1)
SMAX(J,K,2)
SMEAN(J,K,2)
NSIZE(J,K,2)
SMAX(J,K,3)
SMEAN(J,K,3)
UNIT MUST DEFAULT
BE VALUE

See Table 5.4
See Table 5.5
As in PRUNIT(J,K)
above
As in PRUNIT(J.K)
above
As in PRUNIT(J,K)
above
As in PRUNIT(J,K)
above

As in PRUNIT(J,K)
above
As in PRUNIT(J.K)
DESCRIPTION
Pipe number (must be
the same as on card 23)
Constituent identification
number (see Table 5.4)
for first constituent
of source ID, Pipe
J=P1PNO
Units this constituent's
data is in
Maximum of this con-
stituent samples for
first month
Mean of this constituent
samples for first month
Number of samples taken
from this constituent
for first month
Maximum for second month
Mean for second month
Sample size for second
month
Maximum for third month
Mean for third month
                           above

-------
                                           Table 5.1
                       Continued
CARD CARD
NUMBER COLUMN (S)
51-52
53-58
59-64
DECIMAL
POINT?
No
Yes
Yes
VARIABLE
NAME
NSIZE(J,K,3)
SMAX(J,K,4)
SMEAN(J,K,4)
UNIT MUST DEFAULT
BE VALUE
As in PRUNIT(J.K)
above
As in PRUNIT(J,K)
DESCRIPTION
Sample size for third
month
Maximum for fourth month
Mean for fourth month
                   65-66
                   67-72
                   73-78
                   79-80
No
Yes
Yes
No
NSIZE(J,K,4)
SMAZ(J,K,5)
SMEAN(J,K,5)
NSIZE(J,K,5)
                                                                above
As in PRUNIT(J.K)
above

As in PRUNIT(J,K)
above
Sample size for fourth
month

Maximum for fifth month
Mean for fifth month
                             Sample size for fifth
                             month
Repeat columns 11-80 on as many cards as needed  (up  to  4  additional  cards)  to  enter more months of data; at any point
on any card when the end of the data is reached,  leave  the  remainder of  the card blank  and  proceed to  the next step  as
detailed below.  If no data is available for a constituent  during  a  month,  enter zeros  for  maximum, mean, and sample
size for that month.  Note that a maximum,  mean,  and sample size must be entered for  each month that was listed on
card 23 and that the maximum, mean,  sample-size  groups  must be  ordered as the  months  were.  When  the constituent  being
entered is pH, card 24 must be repeated twice.  The  first time, pH must  be  entered as constitutent 23  (pll max) and means,
maximums, and sample sizes are listed as above.   The second time,  pH must be entered  as constituent 22 (pH min) and  the
same means and sample sizes are listed but  instead of sample maximums, sample  minimums  are  listed.  If, as may be the
case for pH, no means are available, enter  zeros in  those columns.

After the first constituent has been completed,  repeat  card 24  for every other constituent  of  the pipe (that pipe listed
on card 23).  Once all constituents  have been done.,  repeat  cards 23  and  24  for pipe 2,  pipe 3, and then pipe 4  (if
they exist), of the source (that source listed on card  23).  Then  proceed to card  25.

-------
                                     Table  5.1
                                     Continued
   CARD
  NUMBER
  CARD
COLUMN(S)
DECIMAL
POINT?
VARIABLE
  NAME
UNIT MUST
    BE
DEFA'JLT
 VALUE
DESCRIPTION
EFFLUENT STANDARDS

    25              1-2

                    4-5

                    7-12


                    13-14




                    15-20


                      22
                   No

                   No

                   Yes


                   No




                   Yes


                   No
               ID

               PIPNO

               EFFLOW(J,I)


               IP(D
                  Megallters/day
               IUNIT(1)
                  As in IUNIT(1)


                  See Tables 5.4
                  and 5.5
                            Source  number

                            Pipe  number  (1  to  4)

                            Permit  flow  for pipe
                            J=P1PNO

                            First constituent  of
                            pipe  PIPNO  (use identifi-
                            cation  number as in Table
                            5-4)

                            First constituents effluent
                            standard

                            Units that standard is
                            expressed in
                      23



                    25-26

                    27-32
                   No



                   No

                   Yes
               IP(2)

               Xl(2)
                  As In IUNIT(2)
                            Distribution of  constituent
                            0  =  Normal
                            1  =  Lognormal

                            Second  constituent

                            Second  constituent's
                            effluent  standard
                      34
                   No
               IUN1T(2)
                                            Units  of  standard

-------
Table 5.1
Continued
CARD CARD
NUMBER COLOMN(S)
35

37-38
39-44

46
47

49-50
51-56

58
59

61-62
63-68

70
71
DECIMAL
POINT?
No

No
Yes

No
No

No
Yes

No
No

No
Yes

No
No
VARIABLE
NAME
M(2)

IP(3)
Xl(3)

IUNIT(3)
M(3)

IP(4)
Xl(4)

IUNIT(4)
M(4)

IP(5)
Xl(5)

IUNIT(5)
M(5)
•JNiTM-iJST DvIlUET DESCRIPTION
Distribution of second
constituent (0 or 1)
Third constituent
As in IUNIT(3) Third constituent effluent
standard
Units of standard
Distribution of third con-
stituent (0 or 1)
Fourth constituent
As in 1UNIT(4) Fourth constituent effluent
standard
Units of standard
Distribution of fourth
constituent (0 or 1)
Fifth constituent
As in IUNIT(5) Fifth constituent effluent
standard
Units of standard
Distribution of fifth
                                                       constituent (0 or  1)

-------
                                                  Table 5.1
                                           Continued
         CARD
       NUMBER
  CARD
COLUMN (S)
DECIMAL
POINT?
 VARIABLE
   NAME
UNIT MUST
    BE
DEFAULT
 VALUE
DFSrRTPTTON
DESCRIPTION
00
     Repeat columns 13-71 on another card,  if necessary,  to  list  all  constituents  and  their standards for the pipe.  Then
     repeat card 25 for pipes 2,  3,  and 4 of  the source  (if  they  exist).  Once all pipes have been completed, repeat
     cards 23, 24 and 25 for the  next source.  Proceed until all  sources have been completed, being careful  to enter the
     sources in their proper order (source  1, source  2,  source  3,...).  Note that  no standard is necessary if the con-
     stituent is DO (enter "0." under XI).
     COMPLIANCE MONITORING DATA
         26
   1-2

    5



   7-8


   11-12



   14-19


   20-21


   23-28

   29-30

   32-37

   38-39
 No

 No



 No


 No



 Yes


 No


 Yes

 No

 Yes

 No
ID

J



IPAR


NUM
Xl(2)

M(2)

Xl(3)

M(3)
                                                                       See Table 5.4
                                                                       See Table 5.4
                                                                       See Table 5.4
                           Source number

                           Pipe number ("0" if there
                           is no compliance monitoring
                           for this source)

                           Constituent identification
                           number (as in Table 5.4)

                           Number of compliance moni-
                           toring points to be entered
                           for this constituent

                           Value of first compliance
                           monitoring point

                           Month from which compliance
                           monitoring point was taken

                           Second CM point

                           Month of second CM point

                           Shird CM point


                           Month of third CM point

-------
                                      Table 5.1
Continued
o\
VD
CARD CAK2
NUMBER COLUMN (S)
41-46
47-48
50-55
56-57
59-64
65-66
68-73
74-75
DECIMAL
POINT?
Yes
No
Yes
No
Yes
No
Yes
No
VARIABLE
NA.ME
Xl(4)
M(4)
Xl(5)
M(5)
XI (6)
M(6)
Xl(7)
M(7)
UNIT MUST DEFAULT DESCRIPTION
BE VALUE ULbLKli'l.U.N
See Table 5.4 Fourth CM point
Month of fourth CM point
See Table 5.4 Fifth CM point
Month of fifth CM point
See Table 5.4 Sixth CM point
Month of sixth CM point
See Table 5.4 Seventh CM point
Month of seventh CM point
     Repeat columns 14-75 on as many cards as needed  (up  to  5  additional  cards)  to  enter  all  compliance monitoring points
     the constituent.  At any point on any card when  the  last  CM point  is recorded,  leave the remainder of  the card blank
     and proceed as below.  Repeat card 26 for any other  constituents in  any  of  the pipes of  the  source for which there are
     compliance monitoring points (any order is acceptable and the number of  CM  points may vary with  constituents where
     some constituents may not have any and need not  be entered).   Once a source has been completed,  a final  card for  the
     source must be added which contains the source number under ID and "0" for  J before  going on to  the next source.
     Repeat card 16 for all compliance monitoring data of the  next source.  Each source listed under  variable INSORS
     on card 20 must be represented, and in the same  order;  if a source has no compliance monitoring  data,  enter the
     source number under ID and a "0" for J and proceed to the next source on the next card.

-------
Cards 21 through 26 are grouped for
each source/pipe/constituent.   Refer
to Figure  5.1, "Organized Print of
Inputs," for and example.          /
                                                                                 COMPLIANCE
                                                                                 MONITORING
                                                                                 DATA *
                                                                                             26
                                                                             EFFLUENT"
                                                                             STANDARDS
                              /
                             (SE
                             lew
                                                                       ELF-MONITORING
                                                                      CONSTITUENT
                                                                                  DATA
                                                                     PIPE  *
                                                                     FLOW  DATA
                                                                                23
                                                                PIPE *
                                                                DESCRIPTION
                                                           SOURCE
                                                           DESCRIPTION
                                                                       21
              'SOURCES
               TO BE
               ALLOCATION
                                                                  20
                                                   CONSTITUENT
                                                   CORRELATION
                                            /SAMPLlT  "  18
                                           f  ALLOCATION
 'SAMPLE
 ALLOCATION
 MAXIMA
                                                     171
    DAMAGE FUNCTION
    BREAKPOINTS
    AND VALUES
MONITORING
COSTS
                     Figure  5.1
Organization of  Input  Deck
                                               170

-------
         Table 5.2      pH/pOH Damage  Function Breakpoints
                                        BREAKPOINTS
Damage Function
    Point
      PH
Cone of H ions
      pOH

Cone of OH~ions
   10
   11
                           1.00 x 10
                                    -7
                           1.78 x 10
                                    -7
                           3.16 x 10
                                    -7
                           5.62 x 10
                                    -7
                           1.00 x 10
                                    -6
                           3.16 x 10
                                    -6
                           1.00 x 10
                                    -5
                           3.16 x 10
                                    -5
                           1.00 x 10
                                    -4
 1.12  x 10
                                    -4
 1.26  x 10
                                    -4
                           1.00 x 10
                           3.16 x 10
                                    -7
                           1.00 x 10
                                    -6
                           1.58 x 10
                                    -6
                           2.51 x 10
                                    -6
                           5.01 x 10
                                    -6
                           1.00 x 10
                                    ~5
                           3.16 x 10
                                    -5
                           1.00 x 10
                                    -4
 1.12  x 10
                                    -4
 1.26  x 10
                                    -4
                                171

-------
--J
ro
Table 5.3 Non-pH Damage Functions
DFIN*


01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Constituent
Name

Aluminum
Ammonia
Dissolved Oxygen
Not Used
Inorganic Carbon
Not Used
Chloride
Chloroform Extract
Chromium
Coliforms-Total
Col if orms-Fecal
Copper
Cyanide
Fluoride
Iron
Lead
Manganese
Mercury
Nickel
Inorganic Nitrogen
Oil-Grease
Not Used
Not Used
Phenol
Phosphates
Solids-Dissolved
Solids-Suspended
Temp. Diff.
Tin

Units

mg/1
mg/1
mg/1
mg/1
mg/1
mg/1
mg/1
mg/1
mg/1
MPN/lOOml
MPN/ 100ml
mg/1
mg/1
mg/1
mg/1
mg/1
mg/1
mg/1
mg/1
mg/1
mg/1
mg/1
mg/1
mg/1
mg/1
mg/1
mg/1
C°
mg/1




1
0
0
>9
0
<50
0
0
0
0
0
0
0
0
<0.7
0
0
0
0
0
<0.6
0
0
0
0
0
<100
0
0
0



2
0.01
0.1
8.0
0.
70.
0.
25.
0.04
0.02
100.0
20.
0.02
0.01
0.8
0.1
0.005
0.05
0.001
0.01
0.9
0.01
0.
0.
0.0005
0.1
200.
20.
1.
10.

•— BTTGciicpoin t s~

3
0.05
0.3
6.8
0.
90.
0.
175.
0.15
0.05
2000.
200.
0.1
0.02
0.9
0.3
0.05
0.17
0.005
1.
3,
0.1
0.
0.
0.001
0.2
500.
40.
2.5
40.



4
0.1
0.9
4.5
0.
110.
0.
200.
0.25
1.
7500.
800.
1.
0.05
1.2
0.9
0.1
0.5
0.01
3.
4.5
5.
0.
0.
0.02
0.5
1000.
100.
3.0
100.



5
0.5
2.7
1.8
0.
130.
0.
240.
0.35
10.
15000.
3000.
5.
0.1
3.
2.7
0.25
1.
0.02
9.
7.
30.
0.
0.
0.1
1.6
1500.
280.
4.
300.



6
1.
3.
0.9
0.
150.
0.
250.
0.4
50.
150000.
50000.
10.
0.5
8.
3.
0.35
1.5
0.05
20.
10.
50.
0.
0.
0.2
10.
2300.
300.
10.
1000.
      *Damage  Function Identification Number

-------
Table 5.4    Constituent Identification
             Numbers and Input Units
Number
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Constituent
Aluminum
Ammonia
BODj
-
Carbon
-
Chloride
Chloroform
Chromium
Total Coliforms
Fecal Coliforms
Copper
Cyanide
Fluoride
Iron
Lead
Manganese
Mercury
Nickel
Nitrogen
Oil-grease
pH-rain
pH-max
Phenol
Phosphorus
Dissolved Solids
Suspended Solids
Temperature Difference
Tin
DO
Acceptable Units for Self-
Monitoring Data and Effluent Standards
ug/1
X
X
X

X

X
X
X


X
X
X
X
X
X
X
X
X
X


X
X
X
X

X

mg/1
X
X
X

X

X
X
X


X
X
X
X
X
X
X
X
X
X


X
X
X
X

X
X
Ibs/day
X
X
X

X

X
X
X


X
X
X
X
X
X
X
X
X
X


X
X
X
X

X

Kg/day
X
X
X

X

X
X
X


X
X
X
X
X
X
X
X
X
X


X
X
X
X

X

°c



























X


pH





















X
X







MPN/day









X
X



















Acceptable Units for
Compliance Monitoring Data
Kg/day
Kg/day
Kg/day

Kg/day

Kg/day
Kg/day
Kg/day
MPN/100 ml.
MPN/100 ml.
Kg/day
Kg/day
Kg/day
Kg/day
Kg/day
Kg/day
Kg/day
Kg/day
Kg/day
Kg/day
pH
pH
Kg/day
Kg/day
Kg/day
Kg/day
°F
Kg/day
mg/1

-------
                          Table  5.5
Input Units
Identification Number
          Units
         4






         5
         8






         9
                                                     rog/1
                                                     Ug/1
                                                     MGD (Million Gallons/Day)
           Ibs/day
           pH






           MPN/lOOml






           Ml/day (Megaliters/day)






           Kg/day
                                     174

-------
right-most columns allowed (i.e., if the value 2 is to be placed in columns
60-62,  specify  "002" in columns 60-62 or simply place "2" in column 62).

       If a decimal point number being entered as input data is too large
to fit into the allowed columns, scientific notation should be used (i.e.,
6,020,400 would be 6.02 x 10 , which is entered into the columns as 6.02E6
and likewise, .0000005 would be entered as 5.0E-7).  Make sure in this
case also that the entry is in the right-most columns allowed, and has a
decimal point.

       All self-monitoring or flow data which is read in as 0.0 is con-
sidered to be "missing data".  Therefore, if a sample value really is 0.0,
a very small number (i.e., .00001) should be entered instead.

       The variable INSORS on card 20 allows the user flexibility in
specifying which sources to consider in the priority allocation.  All
sources must be numbered (1 to 30), their pipes numbered (1 to A), and
the months of data numbered (1 to 24) as described in Section 5.1.  Sup-
pose that all data has been entered on cards and the user decides that
for some reason he wants to delete one or more sources.  Rather than
having to renumber and retype all cards, he simply specifies exactly which
numbered sources he does want in his allocation and lists these under
INSORS.  If he does not wish to delete any sources, he lists all source
numbers under INSORS.

       Finally, the user should study the examples of input and output
presented in Sections 5.3 and 5.4.  These examples should help in re-
solving any questions arising out of the table of inputs.
                                  175

-------
5.3
SAMPLE INPUT DECK
       Suppose that the available self-monitoring and compliance monitor-
ing monthly data for sources of interest is as in Table 5.6.   The card
input would then resemble that of Figure 5.2, depending upon the rest of
the data and the options which the user chooses.
5.4
OUTPUT DESCRIPTION
       The output generated by EFFMON is printer output.  Except for an
initial printout of all the inputs which is always printed (see Figure
5.3), the output may consist of any or all of the following as desired
by the user (the theoretical background for the various outputs is dis-
cussed in Section 2.6).

       Output Option 1 :  An initial allocation, including the minimum
                         number of times each source must be sampled as
                         specified by the user (see Figure 5.4).
       Output Option 2a;

       Output Option 2b;
                  A priority list of the samples, 'including the
                  minimum required samples (see Figure 5.5).
                  A priority list of the samples, including only
                  samples to be taken beyond the minimum number
                  required for each source (see Figure 5.6).
       Output Option 3 : A final allocation including the total number of
                         times each source is to be sampled and other
                         summary information based on a given budget
                         limit (see Figure 5.7).
       Output Option 4 : A final allocation including the same information
                         as in 4 above, but based on a given maximum "cost
                         of undetected violations" as defined below (see
                         Figure 5.8).
                                    176

-------
                  Table  5.6
Sample Input Date

Source
& Pipe
Source 1
Pipe 1











Source 2
Pipe 1










Source 3
Pipe 1







Constituent
(or Pipe Flow)

Flow

pH-max

pH-min

Lead

Phosphorus

Cyanide


Flow


pH-max



pH-min




Flow







Self -Monitor ing
Monthly
Max. or
Min.

NA
NA
10.6
9.0
6.0
5.4
800.
510.
" .017
.066
.025
-

NA
NA
NA
10.0
9.9
9.2

7.6
7.4
7.6


NA

NA
NA
NA
NA
NA
NA
Monthly
Mean

.254
.148
-
-
-
-
760.
400.
.011
.025
.020
-

.04
.04
.05
9.0
9.2
9.0

9.0
9.2
9.0


.430

.437
.524
—
.491
.482
.554
Sample
Size

NA
NA
6
7
6
7
6
7
6
7
6
-

NA
NA
NA
10
12
12

10
12
12


Units

MGD

pH

pH

ug/1

mg/1

rag/1


MGD


PH



pH





Compliance
Monitoring
Points

NA
NA
10.0,9.0,9.5

8.0,7.1,6.8

Month
and Year

6/74
7/74
6/74
7/74
6/74
7/74
.461,. 202,. 371* 6/74

.051, .023

7/74
6/74
7/74
.052, .059,. 071 6/74


NA
NA
NA
8.5
9.1,8.9
8.3,8.4,8.3,
8.7,8.5
7.7
8.0,7.7
7.6,7.6,7.5
7.4,7.6

NA Megaliters/ NA

NA
NA
NA
NA
NA
NA
day







NA
NA
NA
NA
NA
NA
7/74

2/74
7/74
8/74
2/74
7/74
8/74

2/74
7/74
8/74


10/73

11/73
12/73
6/74
7/74
8/74
12/74
 *  Note that units are k.g as required.
NA-Not Applicable
                                   177

-------
Table 5.6
Continued

Source
& Pipe








Pipe 2



































Constituent
(or Pipe Flow)
Chloroform
Extract






Flow





Chloroform
Extract






Total
Colifonns






BOD.
J





DO






Self-Monitoring
Monthly
Max. or
Min.
24.0

8.0
23.6
45.0
56.8
16.8
13.2
NA
NA
NA
NA
NA
NA
8.4

19.2
15.6
20.0
28.0
19.2
-
1080.

-
1200.
1210.
1150.
-
-
7.8
13.0
18.0
11.0
-
-
-
5.7
7.0
8.0
6.7
-
5.4
"
Monthly
Mean
15.5

2.8
7.6
31.4
30.1
-
6.0
.121
.125
.131
.126
-
.133
3.5

5.8
7.1
8.1
6.2
8.9
-
1010.

-
-
1050.
1100.
-
-
6.3
5.0
12.0
7.7
-
-
-
5.0
6.7
7.0
6.3
-
5.2
*~
Sample
Size
2

2
3
5
7
2
1
Units
mg/1








Compliance
Monitoring
Points








NA Megaliters/ NA
NA
NA
NA
NA
NA
2

2
3
7
7
7
-
2

-
3
10
10
-
-
2
2
3
7
-
-
-
2
2
3
7
-
2
""
day




mg/1







MPN







mg/1






mg/1






NA
NA
NA
NA
NA






























Month
and Year
10/73

11/73
12/73
6/74
7/74
8/74
12/74
10/73
11/73
12/73
2/74
3/74
8/74
10/73

11/73
12/73
2/74
3/74
8/74
9/74
10/73

11/73
12/73
2/74
3/74
8/74
9/74
10/73
11/73
12/73
2/74
3/74
8/74
9/74
10/73
11/73
12/73
2/74
3/74
8/74
9/74
          178

-------
00*0
0 ' 1 I J 10000.
1 ° 3 3
.« 1.5 1
10100505
01020101
001
010203
01 JONES MANUFACTURING CO.
05 02
02 SAKE CHEMICAL CO.
02 03
05 SEWAGE TREATMENT
01 07 On 07
01 019903 01 ,25a 02
01 012306 10.6 0.0 6 9.0
01 012206 6,0 0.0 6 5.1
01 011602 POO, 760. b 510,
01 012501 .017 ,011 6 .066
01 011301 ,025 ,020 6 0.0
01 01 ,5?9?3 9.5 60 22 6.
02 oi^oi 01 ,na 02
02 012306 JO.O 9,010 9,9
82 012206 7.6 9.010 7.1
02 01 1,1323 9.5 60 22 6.
OJ 019903 01 .130 02
06 ,482 07
03 010801 2U.O 15.502 8.0
16,8 0.002 13,2
03 029908 01 ,121 02
06 .133
03 02^801 8.1 3.5fi2 J9.2
19,2 8,907
03 021007 1080, 1010,02 0.0
0,0 0.000
OJ 020301 7,8 6.302 13,0
0.0 0.000
03 023001 5,7 5.002 7,0
5.4 5,?02
03 01 2,0008 10. 11
03 0? ,16508 20, 11 10 1*500
01 23 03 10.0 1 9.0 1
01 22 03 P,0 1 7,1 1
01 16 03 ,061 1 .202 1
01 25 02 .051 1 ,0?3 1
01 13 03 ,052 1 ,059 1
01
02 1 23 08 8,5 1 9.1 t
8.5 3
02 1 22 08 7,T 1 8,0 2
7, A 3
02
03
M

.5










.118
0.0 7
0.0 7
«00, 7
.025 7
o.ooo
5 60 16
,0«
9,212
9.212
7 60
."37
.55U
2.602
6.001
.125

5,802

0.000

5.002

6,702


i 70 03
9.5 1
A.e i
.371 1

,071 1

fl.9 2

7.7 2




,25

.7




100, ft. 0. 0101

20.7 0. 0. 0001

525. .5 9.0 0002







.1 10 25 ?, 11 13 .25 11
03 .05
9,2 9.012
7,6 9.012

03 ,5?« 0« 0.0 05 ,«<>1

23.6 7.&03 U5.0 31.105 56.8 30.107

03 .131 01 ,126 05 0.0

15,6 7,103 20.0 8,107 ?8,0 6.207

1200, 0,003 1210. 1050,10 1150. 1100,10

18.0 12,003 11.0 7.707 0.0 0.000

8.0 7.003 6,7 6,307 0,0 0,000


15, 10 30 10






8,3 3 »,1 3 8,3 3 B.7 3

7.6 3 7.* 1 7,5 3 7.1 3




Figure 5.2      Organized Print of Inputs
               179

-------
        05/30/75   1?J56:0<>  "INK    000373i)53
000573
S30   75
                                                          OATE
                  •THE  INPJT  CARv
oo
o
:CQSTS=O
PTPCSTC 15=
( 2) =
( 3) =
( ENPtD  SOLIDS
                                       Tf^PERATUKE  DIPF
                                       TIN
                                       DO
                                  Figure 5,3
    Organized Print of  Inputs

-------
               OS/30/7S
                   WINK    OOC373oS3
                                                                    S30   75
                                                                                                              OATE  OS307S
                                                                                                                                 PAGE
--POn
00
               S(J)
NCijTiO

J)
V J •

.( l.J)
( 2.J)
( 3.J)
( . J)
(27. J)
(25. J)
(29. J)
(30? J)

)

J= 1 2
0000001 .0000002
0000001 .0000003
J= 1
.00000
.00000
9.00000 8
.00000
50.00000 70
.00009
3
.000000*
.OnOOOlO
2
.PlOoC
.10000
.00000
.00000
.00000
. 0 0 0 fl 0
.00000 25.00000
.00-^00
.00100
.00000 100
.00000 20
.00000
.ooooo
.70000
.00000
. fl o o r o
.00000
.00000
.00000
.6:000
.03UO
.ooooo
. 0 0 0 0 0
.00^00
. 0 3DOO
i o o . o :• o o .1 200
.0-3300 2 ;
.00?00 1
.00000 10
.00000
.00 ?.00
.00 1.00
I CUT 1 = 1
.C'iODO
.02000
11
.0000006
.0000016
3
.ObOOO
.30000
6.60000
.00000
90.00000
.OOUOO
175.06000
. 15000
.05000
.00000 2000.00000
.OOOoO
.02000
.01000
.SCCoO
. 10000
.00500
.&5000
.00100
.01000
.90000
.01000
.00000
.OOCOO
•00050
. 1 0 0 1) C
• a o o o o
. 0 0 C :) 0
. o c o o o
.00000
.ooooo
1.00
2.00
IOLJT,
200.00000
. 10000
.02000
.90000
.30000
.05000
. 17000
.00500
1 .00000
3.00000
. 10000
.00000
.ooooo
.00100
.70000
SOD. ooooo
'10.00000
2.50000
40.00000
.00000
6.00
3.00
2i=l
1 lEXKCsJ NOSORS= 3
•
OiJRCE 1 =
I)
(I)
.10 GAIL*.
1 2 3
10 10 5
1 2 1
5
.0000010
.0000025
'I
. 10000
.90000
4.SOCOO
.OOCOO
1 10.00000
.00000
200.00000
.25000
1 .00000
7500.00000
600-00000
1.00000
.05000
1 .20000
.90000
. 10000
.50000
.01000
3.00000
1.50000
5.00000
,00000
.00000
.02000
.50000
100 D. OOOOO
100.00000
3.00000
100.00000
.00000
8.00
A. 00
:ouT2s=]
NUSJRS=
00 KETA= l.SO K,NU =









6
.0000032
.0000050
s
.50000
2.70000
1.80000
.00000
130.00000
.00000
210.00000
.3SUOO
10,00000
1SOOO. OOOOO
3000.00000
5.00000
. 10000
3.00000
2.70000
.25000
1.00000
.02000
9.00000
7.00000
30.000UO
.00000
,00000
. 10000
1.60000
1500.00000
280,30000
4.00000
200. OOOOO
.00000
10.00
5.00
I
3
1.50



7
.0000100 .OOOC
.0000100 .OOOC
6
1.00000
3.00000
.90000
.00000
150.00000
.00000
250.00000
.10000
5 0 . u 0 0 0 0
150000. OOOOO
SOOOO. OOOOO
10.00000
.50000
8.00000
3.00000
.55000
1 .50000
.05000
20.00000
10.00000
50.00000
.00000
.00000
.20000
10. OOOOO
2300.00000
300.00000
10 .00000
1000.00000
.00000

6.00 7.00
IOU13S1

ENU= ,ro



                                                                                                                   .0001000
                                                                                                                   .0001000
                                                                                                                    10
                                                                                                               .0001120
                                                                                                               .0001120
     11
.0001260
.OOOU60
               ALPHA=
               ISFUP(i)
               ISFLO(I
               1C3PCI)          0   0
                         F3R  1 = 1  TO NjSQSSA 1, £. I.
                                                                                                                   8.00       9.00      1J.OO
                                                                                                                3s  10000.00        0=        .3
               ic
                                                                            QU
                                                                                   KBOD   DOSAT
                                                                                                    IONESD NPIP  NPPAKS(J) ,iiMNTnSU)  J=l  TO  NPIP
                                                        Figure 5.3
                                                             — Continued

-------
     05/1-0/75   12:56109 >>INK


     1  JONES MAMUFACTUKlNG CO.
     2  SAFE CHEMICAL CO,
     3  SEWAGE  TREATMENT
00047J
75

 100.000
  ao.7oo
 sas.ooo
                 OATF
                                 .00
                                 .00
                                 .50
 , Oo
 .00
9,00
It  7
oo
NJ
                                              Figure 5. 3
                                                                i— Continued

-------
05/30/75  12156109
                                     000373D53
                                       000^73
S30   75
DATE
PIPF FLO* AND SELK-MONlTo"P'G
(SO"RCt> (PIHF)
   ID    HlPNO  IOS GSuN'lT
     1     1     
-------
0^/30/75  12|56IO<>  "ij1^    QOC-573.-5?    <>OM'/t          530
PIPE FLO* ANd SEUF-HONlTilRING CONSTITUENT
(50'iRCE)  CrlPE)
   ID    PlPNO   IOS  (3SUf;iT    MNTnOSiQS;-.EA>:--fOH ALL  MONTHS
     2      t     99   3        t.        .0'* / ?t        ,0«  /  3,        .05 /


   ID    PjPNO   IFAUM  PKH's'TT      S'^AX tS^E AN »NS iZf-FOP  ALL  MONTHS
     2      t       23     6       10.00.    '  
-------
05/30/75  I2l5i:09  X
                          G00373Q53
000373
               S30    75
                                                        DATE 053075
                                                                                                                 PAGE
;• ;PF FLO* AND SELF-MONITORING  CONSTITUENT DATA
(SOURCE)  (PIPE)
   10    PlPNO  JOS  OSuNjT   MMTnOSt CSMEAN--KOH ALL MONTHS
3
10
3

PIPP FLOn
(S2I'SC£)
10
3

10
3

3

3
i— j
oo 3
Ln
1 99
8
PlPNO IPARM PRUNIT
1

AND SELF-
(P1PE)
PIPNO ICS
Z 99

PIPNO IP
i

2

Z

2

8 1

MONITORING

OSUNlT
a

ARM PRUMT
6 I

10 7

3 1

30 1

1, .£3
5, .49
/ 2, .'11
/ b, .'16
SMAX,SMEAN,USIZE--FOR
211.00,
5b.8o,
CONSTITUENT

15.50, 2/
30.10, 7/
DATA

/ 3,
/ 7,
ALL MONTHS
a. oo,
16.80,


.52 / 4
.55 /

2.80,
.00,


f

Zf
^t


.00 /

23.60,
13.20,




7.60,
6.00,




3/ 45,00,
I/




31.40, 5/



M(vThjOS«()Sr1EAI>.--f OS ALL MONTHS
1, .12
5, ,00
SMAX.S,
8.40,
28.00,
ICBO.OO,
1150.00,
7. 60,
.00 ,
5.7n,
.00,
/ 2, .13
/ 6, .13
i£AN>f.SIZE--FOR
3,50, 2/
6.20, '//
1C10.00. 2/
1 100.00, 10/
6.30, 2/
.00, O/
5.00, 2/
.00, O/
/ 3,
/ 0,
ALL MONTHS
19,20 ,
19.20,
.00,
.00,
13.00,
.00,
7.00,
5.40,
.13 / 4
.00 /

5.60,
8.90,
.00,
.00,
5.00,
.00,
6.70,
5.20,
,


2/
7/
O/
O/
2/
O/
2/
2/
.13 /


15.60,
.00,
1200.00,
.00,
18.00,
.00,
8.00,
.00,



7.10,
.00,
.00,
.00,
12.00,
.00,
7.00,
.00,



3/ 20.00,
O/
3/ 1210.00,
O/
3/ 11,00,
O/
3/ 6.70,
O/



8.10, 7/

U50.00.10/

7.70, 7/

6.30, 7/

EFFLUENT
(SOURCE)  (PIPE)
   ID   PIF-0  E?FLO^      IP,x:.IUNlT,K—FOR ALL CONSTITUENTS CF PIPE
     3     I          2.Co    6,       lO.OOn.l. 1
                      ."6
                           b,
                           10,
                           3,
                           30,
                                   20.000,1, 1
                                  1500.000,7, 0
                                   15.000,1, 0
                                      .0001 1, 0
CO-.PLlANCE  «ONITCR1NG
          (PIPE)
1C
1

1

1

1

1

2


J IP/"
1 23

1 22

1 1*

1 25

1 1 J

1 23


Nj«
3

3

3

2

3

8


X) (K) ,-"(K)--F3R *=1 TO

10.000,

8.000,

.461,

.051,

.052,

P. 500,
6.300,
NlH

1

I

I

1

1

1
3
C* POINTS

9.

7.

,

,

,

9.
8.

000,

100,

202,

023,

059,

100,
700,

1

1

I

1

1

2
3

9.500,

6.800,

.371,



.071,

8.900,
8.500,

1

1

1



1

2
3
                                           Figure  5.3      — Continued
                                                                                        6.300, 3
                                                                                                       8.400, 3

-------
OS/30/75

    2
                                  b3u
                                                                                 0!>307b
23
7.70"r  I
       3
8.000*  2
7.«00*  3
7.700t  a
7,600i  3
                                                                                        7.600* 3
                                                                                     7.600* 3
                      Figure 5.3
                                        — Continued

-------
        05/30/75   [2J56J09 WjNX   Oflrt37.'5c.53    «On.?/J         S30   75                                  OATE  05307S

                                                                 1MTIAL ALLOCATION

                                                SCHftCt             TIMES JiAPPLED       RESOUKCtS  USED
                                                    t                    i                  560.50
                                                    2                    2                 1050.00
                                                    3                    1
                                                       TOTAL RESOURCES  USED    3309,SO
M                                                      COST OF UNDETECTED VIOLATIONS       .32322
                                   Figure 5.4      Printout of Initial Resource Allocation

-------
          05/?0/7S  12»S6«09
                                               000i73
        S3u
              75
DATE 053075
                                                                      tiST OF SAf.Pt.tS
                                                                                   COST Of-
oo
oo
PRIOHITY
1
?.
J

17
16
19
20
21
as
23
;:u
25
SOURCE
SAMPLED
3
1
1
2
Z
2
2
2
2
2
?
2
2
1
1
1
1
1
1
3
1
1
3
3
3
MARGINAL
RETUKN XJOO
,308i7G(3
.012^1636
.008C.SS93
,OQ7i«7338
.00*) '15239
,00557088
,00060981
.OP'115270
,003'J3S37
.OOJ09SS5
.00267265
.002J0752
,00062all
.ouooiue
,00000157
,00000006
,00000000
.00000000
,00000000
.00000000
.00000000
.00000000
.00000000
.00000000
UNOETtCTEu
VIOLATIONS
1.810B2
,«0fl38
.3S»«23
.29253
.25307
.21900
.18958
.lt>
-------
05/30/75  12;56:09 WINK
               Sit)
                                                        75
                                                                                          UATE OSJ075
                                                           LISI  OF  SiMPLtS
sousct MARGINAL
'''UIKITY SAMPLED KffURN XJOO
\
<>
3
1 ,0l25lb3o
2 .Oo6'l7nJ3V
? ,OOSb70«8
'1 ? . 0 0 
9 2 ,00
-------
(15/7,0/75  I2s56»0<>  WINK   000373l>S3
  75

FINAL ALLOCATION

8'IOGET  10UOO.OO
DATE 053075
MIN MO. MAX NO. COST OF
SAMPLES SAMPLES TIMES RESOURCES UNDETECTED
SOURCE KEOl'JPEO ALLOWED SAMPLED USED VIOLATIONS
1
a
*
I 10 7 3923. bO
£ 10 10 5aao.OO
1 5 I 593.00
.00000
.07700
.00000
                                     TOTAL RESOURCES  USED   9796.50
                                     rINAL COST  OF  UNDETECTED VIOLATIONS    .07700
          Figure 5.7      Printout of Final Allocation Based  on Budget Limit

-------
OV30/75
 "On.*73         S30    7'J

                    Ftt-*L

MAXIMUM Al.l P*l'0  COST  OK UNDETECTED VIOLATIONS
OATE 053075
                                                                                     ,25000
                                             MIN  MO,    MAX NO.
                                             SAclPLES    SAMPLES
                                     SOURCE  REUUiPtO   ALLOv-TD
                                                COST  OF
                            TIMES    RESOUHCLS  UNOETtCTtD
                            SAMPLED     USED    VIOLATIONS
1
2>
5
\ 10
?. 10
1 S
2
3
1
1121.00
15BI4.00
593.00
.00369
.21530
.00000
                                     TOTAL RESOURCES  USED   3296.00
                                     FINiL COST  OF  UNUCTFCTEO VIOLATIONS    .21900
                           Figure 5,8       Printout  of Final Allocation Based on Maximum
                                             Acceptable "Cost of Undetected Violations"

-------
       Output Option 5 :  Statistical summary tables for each source
                         (see Figure 5.9).

       All of the values under "Resources Used" or "Resources Required"
in the output are dollar values.  They are derived from the base cost to
monitor each effluent source given: (1) its number of pipes (input vari-
able PIPCST), and (2) the cost to analyze each of the constituents of each
pipe of an effluent source (input variable CONCST).

       The "Cost of Undetected Violations", as listed in the output, re-
fers to the expected value of the damage caused by the pollutants (assuming
Resource Criterion #2 is used) for those days when violations go undetected
(see Section 2 of this handbook, and Section VI of Reference 1 for a more
complete description of the term).  The "Marginal Returns" listed are
simply the decrease in the cost of undetected violations per unit of re-
sources expended as each sample is taken.

       In the statistical summary tables, the means, standard deviations,
and standards are in units of Kg/day.  For lognormal distributions ('L'
under 'DIST'), the mean and standard deviation are of the log values of
the loadings.

       In some cases, a series of  '***' will be printed out in the sta-
tistical summary tables.  This occurs when a constituent is discharging
from more than one pipe; only one value of expected damage and probability
of no violation  (for the combined loadings) is possible, and so when the
constituent  is printed more than once  '***' replaces the numerical value.
Similar output occurs for pH, since pH is always printed out under pH MIN
and pH MAX.
                                    192

-------
05/^0/75  l2!S6tO<> WINK   0003731)53
                             00(1.473
S30   75
OATE 053075
                                                          » » » 4 * * f * * * *
                                                           sonnet   i
                               DISCHARGE  (MLXOAY)c
                                               .7207
                   UPSTREAM FLOw (ML/DAY)=
    100,0000
              CONSTITUENT
         LEAD
         PHOSPHORUS
         CYANIDE
STANDARD
Q.5000
A. 5000
.OS29
1 .OS80
.1322
DIST
N
N
N
L
L
EST. MEAN
8,0'137
7.M12
.'Ii67
-1.9153
-1.5S15
EST. SIGMA
l.fa3bH
1.4335
.2788
.3106
.2849
EXPECTED
DAMAGE
*»****»*
.5626
1.U763
,0031
.0687
PROB. UF NO
VIOLATIUN
**»»»******
,S
-------
                      e ;r-
os/30/75
          WINK
000373
S30   75
DATE OS3075
                                                  SOUKCt  2
                      DISCHARGE (ML/r>AY)3
                                                                         UPSTREAM  FLUW  (HL/DAY)a
                                                              20.7000
PH-MIN
STAV04
-------
05/30/75  12:56!09 *1
                           00u373i;5j
S30   75
                                                                                                 DATE 053075
»FIN
                                                            SOUKCE  3
         PJPt = 1           UFA!.
           MEAN DO CONCENTRATION'
                                                          ,52-b5
                   UHS1KEAM FLOW CML/DAYJs
                                                                                                    52S.OOOO
                                                                                        EXPECTED    PKOfl,  OF  NO
COr.'STlT'-'c'^T
ChLOROFORf' EXTRACT
PTPE = 2 MF
MEAN 00 CQNCF.NiTRA
C 0 »• S T I T u f. >; T
CHLOkOFORl EXTRACT
CJUIFOKXS-- TOTAL
0005
STANDARD
tO.OOOO
AM niScwARf,E (ML/OAY
1 1 0 N ( r< r, / L ) = 11 .
STA^-Df^D
P. 3000
1500.0000
6.97'JO
OlST
L
J =
1M2
DIST
L
N
N
ESI. MEAN
1.1335
.1305
EST. MEAN
-.0380
1069.0909
1.0201
EbT. SlbMA
.5262
UPSTREAM f-LOW
EST. SIGMA
.3944
^7307
DAMAGE
1.8286
(ML/OAY)=
EXPECTED
DAMAGE
.0267
.0090
V10LAIION
.624^
S25.0000
PROB. OF NO
VIOLATION
.9907
1.0000
1.0000
                                       Figure  5.9
                                                        — Continued

-------
Error Messages

       The program performs a careful check on the input data and should
an error be found, a series of 'XXX1 followed by an error message will be
printed and the program will stop.  The error message will include infor-
mation such as the card number (Column 1 in Table 5.1) or source and pipe
number so that the user can locate his mistake; the error message will
also include a brief diagnosis of the problem.  In most cases, an obvious
error such as a transposition of data or a misspecification of an option
can be easily found and the reader need only refer to Section 5.2 (Input
Description) to correct the error.  In certain instances, a sequencing
mistake will have been made—a card may have been deleted or identifying
numbers rearranged.  In this case the error message may not point directly
to the source of the error but to some point downstream and the user will
need to carefully compare the preceding part of the input deck against
Section 5.2 to find the error.

       Sometimes an error may not be detected until processing of the data
has begun.  If sample minimum loadings and mean or maximum loadings have
been transposed, for a sample in the input stream, the program will auto-
matically delete the incorrect sample and print out a message specifying
the details but processing is continued.  However, should the total number
of valid samples during the sampling period for any constituent be too
small (less than 4) or too large  (larger than 40 for pH or 365 for other
constituents) an error message will be printed specifying the source and
the constituent and the program will stop.  Also, should the ratio of the
combined maximum to the combined mean, during the sampling period for any
constituent too large  (greater than 6.0), or too small (less than 1.25),
the program will print the details and stop.  In the cases mentioned above,
a decision will .have to be made to correct data that was incorrectly enter-
ed or to delete constituents which cannot be tolerated by the program.
                                    196

-------
                                SECTION 6
                        DEMONSTRATION OF PROCEDURES
        This section demonstrates results of tests of both hand and com-
puter calculation procedures.  The tests were performed using data supplied
by the State of Michigan, Department of Natural Resources.  The data was
obtained on seven effluent sources which are a subset of the data used in
the previous SCI demonstration of the computerized procedure [1] .  The
effluent sources used were those computed to give the highest environmental
damage in the first SCI report (see Section 9 of [1]).  The constituents
used in this demonstration are high and low pH, biological oxygen demand
(BOD, total suspended solids (SS), chromium, phosphorus, and oil-grease.

        In Section 6.1, data from the year 1972 is used in the hand cal-
culation procedure to determine the initial allocation of monitoring re-
sources.  Section 6.2 shows how the more recent 1973 data is used to
illustrate the update of statistics procedure.  Section 6.3 shows an
alternate method of evaluating the magnitude, or severity, of violations
in hand calculations.  Finally, Section 6.4 gives results of the  computer
calculation method applied to the same test problem, and compares these
with the hand calculation results.

        Although there are minor discrepancies between the hand and com-
puter calculation results, due primarily to the different allocation
criteria used (described in Section 2), they are in general agreement.
In all cases, results were found to be reasonable.

CAVEAT

        The objective of this section is the demonstration of the hand
calculation approach.  The selection of the Grand and Saginaw Rivers to

                                     197

-------
further this objective should not be construed as an expression of opinion
concerning the status of these rivers or their tributaries.  The results of
the demonstration are based on a careful application of the procedure to
the data available.  The authors have made every attempt to assure that
the data used is exhaustive and representative, but they recognize the
possibility that relevant information may have been overlooked.  To this
extent, the results of the demonstration may be considered directly appli-
cable to evaluation of water quality surveillance on the Grand and
Saginaw Rivers.

6.1    DEMONSTRATION OF HAND CALCULATION PROCEDURES - INITIAL ALLOCATION

       The hand calculation approach was successfully demonstrated using
the Section 4, User Manual.  Self-monitoring data from seven effluent
sources on the Grand and Saginaw Rivers in Michigan were used to determine
resource allocations for effluent compliance monitoring.  Four sources
are automobile and chemical industries, typical of the area, while the
other three effluent sources are municipal waste treatment plants located
on the same rivers.  All are major effluent sources whose discharges
historically have been significant.  The presentation here follows the
order of tasks found in the User Manual (Section 4).  The reader is en-
couraged to use this section as a step-by-step illustration of the hand
calculation procedure.

TASKS 1 and 2

       The procedures are self-explanatory.  Tables 6.1 and 6.2 represent
the output from these tasks.  All seven sources, their constituents, and
relevant standards are shown, although subsequent tasks generally will
illustrate the technique only for one source in order to reduce repetitive
calculations.
                                   198

-------
Table 6.1      Statistical Distribution Types by
               Constituent and Source


Source
9




10




12



18

22


25

27




Constituent
pH Max
pH Min
BOD
SS
CHR
pH Max
pH Min
SS
phos
Oil - Gr
pH Max
pH Min
BOD
SS
BOD
SS
BOD
SS
phos
BOD
SS
BOD
SS
ph'os


Distribution
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
Task 1
Alternate Used
1 or 2
_
-
2
2
-
-
-
2
2
2
-
-
2
2
2
2
2
2
2
2
2
2
2
2
                    199

-------
Table 6.2
Effluent Standards

Source
(1)
9




10




12



18

22


25

27


Constituent
Name
(2)
pH Max
pH Min
BOD
SS
CHR
pH Max
pH Min
SS
Phos
Oil - Gr
pH Max
pH Min
BOD
SS
BOD
SS
BOD
SS
Phos
BOD
SS
BOD
SS
Phos
Units
(3)


Kg/day
Kg/day
Kg/day


Kg/day
Kg/ day
Kg/day


Kg/ day
Kg/day
Kg/ day
Kg /day
Kg/day
Kg/day
Kg/day
Kg/day
Kg/day
Kg/ day
Kg/day
Kg/day
Standard Value S
(*)
9.5
6.5
189.27
473.2
5.7
10.5
6.5
46.4
1.35
19.9
9.0
6.0
41.6
104.1
3000.0
4445.2
1360.8
907.2
378.5
4535.9
3628.7
272.2
272.2
58.3
              200

-------
TASK 3
       Table 6.3 presents raw data for source 9 and illustrates the cal-
culation of the mean, m.  Data for other sources are similar and are not
included in this example.

       All constituent data except pH are expressed as concentrations,
but must be converted to loading rates (Kg/day) in order to compare data
to the standards in Table 6.2.  Table 6.4 shows typical conversions.

       Finally, all converted data is entered in columns 1-7 of Table
6.5.

TASK 4

       Task 4 is concerned with the calculation of self-monitoring
statistics.  The hand calculation procedure is illustrated below for pH
Max.

       M  =  m  =  8.39
      ' G  =  2.735 (Figure 4.3)
Distribution is normal (N)

       N  =  n  =  249
       v  =  50 (Figure 4.5)

       Although formulas may differ, the procedure for the remaining
four constituents of source 9 is virtually identical.  The calculated
statistics are entered in columns 8-12 of Table 6.5.
                                  201

-------
                                     Table 6.3
Source Number 9:  Raw  Data


Jan, 72
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec, 72
Sn
Lnx
m=^
Z_»n
Min=io
Max=C
PH
Avg Max Min n
8.67 9.95 7.52 17
8.9 10.3 7.8 20
9.21 10.43 7.9 20
9.7 10.9 7.7 20
8.4 10.4 6.4 22
6.2 7.8 4.4 22
8.4 10.6 6.1 19
8.5 10.8 7.3 23
9.1 10.2 7.8 21
8.2 9.0 7.2 22
7.8 9.4 7.5 22
7.9 9.0 7.3 21
249
2089 -
8.39
4.4
10.9
BOD (mg/fc)
Avg Max n
115.6 155.4 15
95.5 168.9 20
179.1 279.2 20
126.5 295. 20
101.9 234. 22
92.1 134. 22
60. 84. 19
46.2 100.4 18
70.8 198. 17
94. 358. 22
80. 150. 22
86.5 208. 19
236
22670
96.06
_
358.
SS (mg/SO
Avg Max n
6.03 15.2 17
6.8 16.8 20
5.0 12.2 20
3.1 9.0 20
9.9 44.6 22
10.6 47. 22
3.8 16. 19
4.7 13.8 23
3.9 8.0 21
6.3 12.2 22
4.4 8.1 22
3.5 6.0 21
249
1423
5.713 - 0
_
47.
CHS (ug/Jl)
Avg Max n
3.53 30. 17
0. 0 20
35.5 320. 20
2.0 20. 20
.91 10. 22
4. 20. 22
5.21 70. 19
0. 0. 23
0. 0. 21
59. 400. 22
0. 0. 21
0. 0. 21
248
2315
9.335
_
400.
Effluent
Flow
Avg (mgd)
1.14
1.21
1.27
1.18
1.17
1.19
1.0
1.1
1.3
1.4
1.49
1.5
-
-
1.25
-
-
NJ
O
to

-------
                     Table 6.4
Data and Standards Conversion
Unconverted
Data or
Standard
96.06
358
5.713
47
9.335

400
Unconverted
Units
mg/1
mg/1
mg/1
mg/1
mg/1

mg/1
Conversion
Factor
3.783*1.250
3.783*1.250
3.783*1.250
3.783*1.250
3.783*1.250
*10~3

Converted
Units
kg/day
kg/day
kg/day
kg/day



Converted
Data or
Standard
454.4
1693
27.02
222.3
.04416

.1892
BOD
 SS
Chr
          Note:  This table can be duplicated for use in the hand calculations.
                                      203

-------
                                                 Table 6.5
                                                                Effluent Data, Statistics, and Probabilities
                                             Y(Task 6)
                                                                                 Discounting constant, h(Task 7) -

Self-nor.iroring input data (record in source sequence)



Source
(1)
9





10





12




18

22


25

27




Constituent
Kar.e
(2)
pH Max
pH Min

SOD
SS
Chr
pH Max
pH Min

SS
Phos
Oil - Gr
pH Max

pH Min
BOD
SS
BOD
SS
BOD
SS
Phos
BOD
SS
BOD
SS
Phos



Units
(3)
_
-

Kg/day
Kg/day
Kg/day
_
-

Kg/day
Kg/day
Kg/day
-

-
Kg/day
Kg/day
Kg/day
Kg/day
Kg/day
Kg/day
Kg/day
Kg/day
Kg/day
Kg/day
Kg/day
Kg/day


Mean
m
(4)
8.39
8.39

454.4
27.02
.04416
8,11
8.11

29.86
1.614
0
7.64

7.64
64.25
67.50
252.98
1815.1
2140
2094
132
5197
5942
3639
2849
295.3


Max
^
(5)
10.9
-

1693
222.3
1.892
10.1
-

91.63
15.71
0
9.91

-
300.1
617.9
1673.5
6945.5
6105.4
9616.3
453.6
11958
17452
7838.2
8291.8
476.28


Mln
u)
(6)
_
4.4

-
-
-
_
7.0

-
-
-
-

6.68
-
-
_
-
-
-
-
_
-
_
-
-

Sample
Size
n
(7)
249
249

236
249
248
285
285

285
285
0
248

248
215
247
21
21
349
351
347
295
297
142
149
128
1 TASK 4 |
Self-monitoring statistics

Est'd
Mean
V
(8)
8.39
8.39

454.4
1.2466
-.8227
8.11
8.11

29.86
-.005
0
7.64

7.64
64.25
1 . 6204
2.073
1815.01
2140
2094
132
5197
5942
3639
2849
295.3
Est 'd
Std.
Dcv,
0
(9)
.9177
1.459

455.37
.401
.68
.7176
.4003

22.276
.43
-
.8300

.3510
87.742
.426
.549
2681.9
1396.3
2648.7
113.24
2429.4
4135.8
1643.5
2117.8
68.87

Distrib-
ution
L or N
(10)
N
N

N
L
L
N
N

N
L
-
N

N
N
L
L
N
N
N
N
N
N
N
N
N



n
(ii)
249
249

236
249
248
285
285

285
285
0
248

248
215
247
21
21
349
351
347
295
297
142
149
128



V
(12)
50
50

49
50
50
53
53

53
53
-
50

50
47
50
13.8
L3.8
58
58
58
54
54
39
40
43

Self •*• conpliance



U
(13)
SAMI

















SA>











a
(14)
AS '

















E AS











n
(15)
ASK

















TASK











V
(16)
4

















6








TASK 7
N'ev cue*



U
(17)
VAL
TAS





























e
(18)
;cs ;
; 6


























statis.



n
(19)
utr '





























0
(20)
s



























Probabilities
Norsi'd
Effl't
Std.
X
(21)
1,2954
x =•
1.2954
-5822
3.5622
2.3288
2.0220
X
3.3905
.7425
.31473
-
1.639
x =
4.632
-.25314
.93204
2.5576
.9807
-.5580
-.4481
2.1768
-.27212
-.55934
-2.0486
-1.2167
-3.4413



4(x)
(22)
.38676

.4024
-21978
.4997
.49007
.4996

.4998
.27111
.12352
-
.4494

.4999
-.1018
.32434
.49473
.33663
-.2115
-.1729
.48525
-.1072
-.2120
-.4798
-.3882
-.4993
Pr . non-
viol 'r../
const.
Pij
(23)
7892


.2802
.9997
.99007

.9994

.7711
.6235
-
.9593


.39815
.82434
.9947
.8366
.2584
.3271
.9853
.3928
.2880
.0203
.1119
.0003
K)
O
.p-
             Not  required  for  pH nin.


             Required  only  for  pH rain.
                                                   Note:  This table can be duplicated for use in the hand calculations.

-------
TASKS 5,6, and 7

       These tasks do not apply in this calculation.

TASK 8
       Task 8 is illustrated in Table 6.6, where values for x, 
-------
                    Table 6.6      Worksheet for Task 8
pH (Max and Min considered simultaneously)



                 y  =  8.39  (Table 4.5)

                 S  =  9.5   (Table 4.2)

                 S  =  6.5   (Table 4.2)


                       S < \i < S, SO
                      u - S
                 x  = —;—  =  1.2954
                 x  = 2—-*-  =  1.2095
                        a


                 *(x)  =  0.38676   (Table 4.7)

                 *(x)  =  0.4024    (Table 4.7)
                 P. .   =  *(x) +  $(x) =  0.7892
                           206

-------
                   Table  6.7      Worksheet  for Task  10
Method B is chosen  for each source




pH (Max and Min considered simultaneously)










            k = k = 1





            U = 8.39




            S = 9.5




            S = 6.5







                     S i y ^  S,  SO







            D =  k  a j f(x) +  x[0.5-*(x)]|+  k  aj=(x) + x[0.5-*(x)]j






              =  (1) (0.9177) j 0.192 +  1.2095[0.5-0.38676]'







                 +  (1) (1.459) JO.1725  +1.2905[0.5-0.4024]   =  .7373
                                207

-------
 Table  6.8
Record of Task 10 Options and Calculations - K
Violation weighting factor assignment method (1 or 2 );  2,1
Source
No.
i
(1)
9



10




12


18

22


25

27



Constituent
Name
(2)
pH Max
pH Min
BOD
SS
CHR
pH Max
pH Min
SS
Phos
Oil - Gr
pH Max
pH Min
BOD
SS
BOD
SS
BOD
SS
Phos
BOD
SS
BOD
SS
Phos

Distri-
bution
L or N
(3)
N
N
N
L
L
N
N
N
L
-
N
N
N
L
L
N
N
N
N
N
N
N
N
N

Type of
WFF
A/B/C
(4)
C
C
A
A
A
C
C
A
A
A
C
C
A
A
A
A
A
A
A
A
A
A
A
A

WFF
Coefficient
k
(5)
.1
.1
.2
.025
.20
.1
.1
.025
.10
.10
.1
.1
.2
.025
.2
.025
.2
.025
.10
.2
.025
.2
.025
.10

Expected
Extent of
Violation
D
(6)
0.7373
68.84
0.003
1.1767
0075

.0740
6.9984
-
.1555
9.498
.4196
1.9724
5.790
228.57
43.86
6.12
267.10
86.10
657.78
67.29
5370.

 Note:   This  table can be duplicated  for use  in  the hand calculations,
                                 208

-------
         Table 6.9
Ranges of Sampling Rates and Expected Extents of Undetected Violation
Source
No.
i
(1)
9
10
12
18
22
25
27

Constitu-
ent Inter-
dependence
SD/SI
(2)
SI
SI
SI
SI
SI
SI
SI

TASK 9
Prob. of
Non-
violation
Pi
(3)
.2189
.4805
.3149
.8322
.1054
.1131
.000001

TASK 10
Violation
Weighting
Factor
c .
(4)
68.84
6.9984
9.498
5.970
228.57
267.1
2370.

TASK 11
Min . No .
Samples
Required
SL.
i
(5)
0
0
0
0
0
0
0

Max. No.
Samples
Allowed
Li
(6)
3
3
3
3
3
3
3

TASK 12
Alternative Expected Extents of
Undetected Violations, C .(s .) , for
Various Sampling Rates, s.
SrL
(7)
15.1
3.36
4.99
4.97
24.1
30.2
.002

2
(8)
3.30
1.62
.942
4.13
2.54
3.42
0

3
(9)
.722
.776
.300
3.44
.268
.386
0

4
(10)
-
-
-
-
-
-
-

5
(11)
-
-
-
-
-
-
-

6
(12)
-
-
-
-
-
-
-

7
(13)
-
-
-
-
-
-
-

8
(14)
-
-
-
-
-
-
-

to
o
       Note:  This table can be duplicated for use in the hand calculations.

-------
TASKS 11 and 12

      Limiting sampling rates are established and entered in Table 6.9,
columns 5 and 6.

      For source 9, the expected extent of undetected violations,
C.., is calculated below.
          Sg  =  C9(l)  =  (68.84)(0.2189) =  15.07
                 C9(2)  =  3.2986
                 C9(3)  =  0.7221
TASKS 13 and 14

      Component per sample costs were not obtained for this demonstration.
As in the computerized procedure, total cost per sample was assumed to be
$525 for each source.  This figure and the laboratory charges per con-
stituent are entered into Table 6.10.

      The marginal return for source 9 and sample 1 is computed using
the formula:
                                              .  0.09593
      For sample 2 and 3, the following calculations are made:
                                    210

-------
                  Table 6.10
Resources Needed to Monitor Each Source Once
Source
No.
i
(1)
9
10
12
18
22
25
27

Man
Hours
Per
Sample
(2)








Cost
Per
Man
Hours
(3)








Travel
Miles
Per
Sample
(4)








Cost
Per
Mile
(5)








Per Sample Cost of:
Man
Hours
(6)








Travel
(7)








Total
(8)
525
525
525
525
525
525
525

Total
Per
Sample
Cost
(9)








Li
ri
0
#L,
•PH
Max
(10)
3
3
3
-
-
-
-

iboratory Analysis
large/Constituent
idd constituent names)
92
pH
Min
(11)
0
0
0
-
-
-
-

ff'J
BOD
(12)
20
-
20
20
20
20
20

#4
S9
(13)
5
5
5
5
5
5
5

f/5
Chr
(14)
750
-
-
-
-
-
-

ffb
Phos
(15)
-
10
-

10
-
10


Total
Cost
560.5
543
553
550
560
550
560

Note:  This table can be duplicated for use in the hand calculations.

-------
                        r9
              -  15.07 - 3.2986
       P9
       yg(3)  =  0.0046

These values are entered in Table 6.11.

TASKS 15, 16, and 17

      There are no mandatory samples, so Task 15 does not apply.  Tasks
16 and 17 are self explanatory and are illustrated by Tables 6.12 and
6.13.

6.2   UPDATE PROCEDURE

      The preceding initial allocation of resources (given in Section 6.1)
utilized data from 1972.  This section incorporates self-monitoring data
from 1973 to illustrate the hand calculation update procedure.  Tasks 3
through  7 are illustrated because only these tasks are directly concerned
with the update procedure.

      The other tasks do not change, although Tasks 8 through 20 are
repeated during the update procedure.

      Only  one source  (27) is used to  illustrate the update procedure,
but all  sources are handled similarly.
                                  212

-------
                                  Table 6.11
Marginal Returns for Each Source
Source
No.
i
9
10
12
18
22
25
27
Marginal return, u.(s.), from one additional sample, number s
V1
.09593
.00670
.01177
.00182
.36514
.43071
4.2321
2
.02100
.00322
.00371
.00153
.03848
.04871
.000004
3
.00460
.00155
.00117
.00125
.00406
.00551
0
4
_
-
-
-
-
-

5
_
-
-
-
-
-

6
_
-
-
-
-
-

7
„
-
-
-
-
-

8
„
-
-
-
-
-

ho
h-'
LO
      Note:  This table can be duplicated  for use  in  the  hand  calculations.

-------
               Table 6.12
Sampling Priority List
Priority
Order
(1)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

Source
No.
i
(2)

27
25
22
9
25
22
9
12
10
25
9
22
12
10
18
10
18
18
12
27

S ample
No. (3)
s .
i
(3)

1
1
1
1
2
2
2
1
1
.3
3
3
2
2
1
3
2
3
3
2


Marginal
Return
V8i>
(4)

4.2321
.43071
.36514
.09593
.04871
.03818
.02100
.01177
.00670
.00551
.00460
.00406
.00371
.00322
.00182
.00155
.00153
.00125
.00117
.000004

Degree of
Undetected
Violation
Incre-
mental
Aci(Si)
(5)
2957.
-2370
-236.9
-205.5
-53.8
-26.8
-21.6
-11.8
-6.5
-3.6
-3.0
-2.6
-2.3
-2.0
-1.7
-1.0
-8.4
-8.4
-.69
-6.5
-.002

Cumula-
tive
tt^s,)
(6)
295.7
587
350.1
145.6
91.8
65.0
43.4
31.6
25.1
21.5
18.5
15.9
13.6
11.6
9.9
8.9
8.06
7.22
6.53
5.88
5.878

Monitoring
Resources
Required
Per
Sample(s)
ri
(7)

560
550
560
560.5
550
560
560.5
553
543
550
560.5
560
553
543
550
543
550
550
553
560

Cumula-
tive
R=Er .
i
(8)
0
560
1110
1670
2230.5
2780.5
3340.5
3901
4454
4997
5547
6107.5
6667.5
7220.5
7763.5
8313.5
8856.5
9406.5
9956.5
10509.5
11069.5

Note:  This table can be duplicated for use in the hand calculations.
                                 214

-------
                 Table  6.13      Sampling Rates
Maximum monitoring resources available, R = $ 5000
Maximum acceptable degree of undetected violations  =
Source
No.
i
(1)
9
10
12
18
22
25
27

Min. No.
Samples
Required
*i
(2)
0
0
0
0
0
0
0

Max. No,
Samples
Allowed
Li
(3)
3
3
3
3
3
3
3

No. of
Times
to be
Sampled
Si
(4)
2
1
1
0
2
2
1

Totals:
Monitoring
Resources
Needed
$
(5)
1121
543
553
0
1120
1100
560

4997
Degree of
Undetected
Violations
Vs.)
(6)
3.2986
3.3530
2.9910
5.9700
2.5390
3.4170
.0024

21.5810
                              215

-------
TASK 3


New self-monitoring data is entered  in  columns  1-7  of  Table 6.14


TASK 4


The following values for a are calculated  for each  constituent


*nn .  „  -  5892 - 3780     Q ,,
iSUJJ •  0  —     '-•••"•  ••      =  o»3D



 cc          8868 - 3236
 SS :  °  =  ~2756	


T>U           984 - 318
Phos:  0  m    2i5Q       -



TASKS 5, 6, and 7


Tasks 5 and 6 are not applicable to  this update,  but  calculations

for Task 7 are shown below
Source 27, BOD
            ,
         n + n
                     (144) (3780) +  (142) (3639)   =
                            144 +  142              J/J-
          va  +  nu  +   va  +   ny   -
                      v + v +  1
           (39.5)(825)2+(144)(3780)2-f(39)(1643.5)2+(142)(3639)2-(144+142)(3710)2
                             39.5  +39+1
          1297
                                      216

-------
                               y(Task 6) •
 Table 6.14      Effluent Data, Statistics, and Probabilitico





	            Discour.tiag constant, h(Task. 7) - _2	
TASK 3
Self-aonitorir.g input data (record in source sequence)
Source
(1)
27







Constituent
Xa-.e
(2)
BOD
SS
Phos





Units
(3)
kg/day
kg/day
kg/day





Mean
01
(4)
3780
3236
318





Max*
(5)
5892
8868
894





Min
(J
(6)
-
-
-





Sample
Size
n
(7)
144
145
120





TASK 4
Self-monitoring statistics
Est'd
Mean
V
(S)
3780
3236
318





Est'd
Std.
Dev.
0
(9)
825
2200
230





Distrib
ution
L or N
(10)
N
N
N





n
(ii)
144
145
120





V
(12)
395
395
36





TASK 6
Self +• compliance

y
(13)









o
(14)
amc
tas







n
(15)
as
4







M
(16)








TAS<< 7
New cum. statis.

V
(17)
371
304
30





8
(18)
L297
L'177
165





„
(19
286
290
240





V
(20)
79
79
72





!
Norm' c
Std.
X
(21)








TAS:-; i

•Xx)
(22)








Pr . ncn-
vial'r../
ccr.sc .
(23)


I
1
1
i
1

Not required for pH nin.
                                     Note:  This  table can be duplicated  for use  in  the  hand calculations.

-------
      n   =  min|(n+n),  hnj
          =  286
      v1   =  min | ( v+v+1 ) ,  hv |  = 79

                                          A                        A
      Updated values of the process mean (p.), standard deviation (o ) ,
and confidence constants (n  and v, ) for the cumulative estimated mean
and standard deviation have been calculated for the constituent BOD for
source 27.  Calculation for other constituents and other sources are
similar.   The updated values were entered in columns 17-20 of Table 6.14
(Update of Table 6.5).  It can be noted that these updated numbers are
somewhat, but not drastically, different from the prior statistics given
in columns 8-12 of Table 6.5.

6.3   ALTERNATE DETERMINATION OF VIOLATION WEIGHTING FACTOR

      The initial hand calculation calculated a weighting factor function
(WFF) with a coefficient k which varied with the reciprocal of the re-
ceiving water concentration standard, — .  An alternative is to vary k
     1                                0
with — where S is the constituent effluent standard for a particular
     O
source.  Task 10 discusses the differences in these representations.

      This section illustrates the alternative where k = — .  Tasks 10-
                                                         £>
17 are completed and the results are summarized in the following tables.

      Table 6.15 shows the WFF constant k and the expected extent of
violation D for each constituent.  These results are utilized in Table
6.16 to calculate c. and C (s ) for each source.  In all instances,
                                 218

-------
     Table  6.15
Record of Task 10 Options and Calculations
Violation weighting factor assignment method (1 or 2 ):
Source
No.
i
(1)
9




10




12



18

22


25

27


Constituent
Name

(2)
pH Max
pH Min
BOD
SS
Chr
pH Max
pH Min
SS
Phos
Oil - Fr-
pH Max
pH Min
BOD
SS
BOD
SS
BOD
SS
Phos
BOD
SS
BOD
SS
Phos
Distri-
bution
L or N
(3)
N
N
N
L
L
N
N
N
L
-
N
N
N
L
N
N
N
N
N
N
N
N
N
N
Type of
WFF
A/B/C
(4)
C
c
A
A
A
C
C
A
A
A
C
C
A
A
A
A
A
A
A
A
A
A
A
A
WFF
Coefficient
k
(5)


.00528
.00211
.1754
.1
.1
.00216
.7471
t
1
1
.0240
.0961
.00033
.00022
.00073
.00110
.00264
.00022
.00028
.00367
.00367
.01715
Expected
Extent of
Violation
D
(6)
.73733

1.8186
.0002
.01032
.0075
-
.07974
.5184
—
.1555
-
1.1415
.16123
.00329
.05210
.83984
1.9339
.001617
.29443
.94910
12.0827
9.8883
4.0652
Note:  This table can be duplicated for use in the hand calculations.
                                219

-------
              Table 6.16
Ranges of Sampling Rates and Expected Extents of Undetected Violations
Source
No.
i
(1)
9
10
12
18
22
25
27
Constitu-
ent Inter-
dependence
SD/SI
(2)
SI
SI
SI
SI
SI
SI
SI
TASK 9
Prob. of
Non-
violation
Pi
(3)
.2189
.4805
.3149
.8322
.1054
.1131
.000001
TASK 10
Violation
Weighting
Factor
c .
i
(4)
1.8186
.5184
1.1416
.0521
1.9339
.94910
12.0927
TASK 11
Min . No .
Samples
Required
i.
i
(5)
0
0
0
0
0
0
0
Max. No.
Samples
Allowed
Li
(6)
3
3
3
3
3
3
3
TASK 12
Alternative Expected Extents of
Undetected Violations, C. (s .) , for
Various Sampling Rates, s.
V1
(7)
3981
2491
3595
0434
2038
.1072
00001
2
(8)
.0871
.1197
.1132
.0351
.0215
.0121
*•"
3
(9)
.0191
.0575
.0356
.0300
0023
0014
"""
4
(10)
-
• -
-
-
-
-

5
(11)
-
-
-
-
-
-
~~
6
(12)
-
-
-
-
-
-
~*
7
(13)
-
-
-
-
-
-
'
8
(14)
-
-
-
-
-
-
'
NJ
o

-------
calculations  for  each  constituent are  identical to those performed in the
initial allocation.

       Table  6.17,  the same as  Table 6.10  in  the initial allocation procedure,
is used in conjunction with Table 6.16  to  calculate the marginal returns y.(s )
found in Table  6.18.   Finally,  the sampling priority list (Table 6.19) and
the sampling  rates  (Table  6.20) are formed by allocating resources in the
order of diminishing marginal returns.

6-4    COMPARISON OF THE HAND CALCULATION AND COMPUTERIZED RESULTS

       The  data in  the hand calculation procedure was used in the computer
allocation  program  to  obtain the results shown in Tables 6.21 and 6.22.
In general, the agreement between the two procedures was quite good,  how-
ever results  were not  identical.  Each assesses potential damage differently,
so disagreement - particularly in the realm of marginal returns - is  reported.
Priorities  may be expected to differ, although monitoring frequencies for a
fixed budget  are  remarkably close.  Refer  to  Section 3.2 which discusses the
major technical differences between the two approaches.

PRIORITIES
       Similarities In the hand calculation and computerized results  are
observed in Tables  6.19 and 6.21.  Both procedures have determined source 27
to be the  most  injurious to the environment,  and consequently both procedures
assign top  priority to monitoring that source.  Furthermore, the probability
of uncovering a violation of standards  for source 27 was sufficiently high in
both procedures so  that repeat monitoring was unnecessary.

       Sources 9, 22,  and 25 were given, the next three  priorities in  both
 cases,  however,  their  relative positions differed.   This is attributed to
 the different methods  of calculating marginal returns.
                                      221

-------
                 Table 6.17
Resources Needed to Monitor Each Source Once
Source
No.
i
(1)
9
10
12
18
22
25
27

Man
Hours
Per
Sample
(2)








Cost
Per
Man
Hours
(3)








Travel
Miles
Per
Sample
(A)








Cost
Per
Mile
(5)








Per Sample Cost of:
Man
Hours
(6)








Travel
(7)








Total
(8)
525
525
525
525
525
525
525

Total
Per
Sample
Cost
(9)








L
(
#1
(10)
3
3
3
-
-
-
-

aboratory Analysis
large/Constituent
add constituent names)
if 2
(11)
0
0
0
-
-
-
-

ff3
(12)
20
-
20
20
20
20
20

f> ^
(13
5
5
5
5
5
5
5

ffi>
(14)
750
-
-
—
-
-
—

//fa
(15
-
10
-
—
10
-
10


Total
Cost

560.5
543
553
550
560
550
560

Note:  This table can be duplicated for use in the hand calculations.

-------
                                Table 6.18     Marginal Returns for Each  Source
Source
No.
i
9
10
12
18
22
25
27

Marginal return, u.(s ), from one additional sample, number s
V1
.00253
.00050
.00141
.00002
.00309
.00153
.02158

2
.00055
.00024
.00045
.000011
.00033
.00017
0

3
.00012
.00011
.00014
.00001
.00003
.00002
0

4
-
-
-
-
-
-
-

5
-
-
-
-
-
_
-

6
-
-
-
-
-
-
-

7
-
-
-
-
-
-
-

8
-
-
-
-
-
-
-

NJ
N>
U>
        Note:  This  table  can  be  duplicated1' for  use in the hand calculations.

-------
Table 6.19
Sampling Priority List Using Hand Calculating Procedures

Priority
Order
(1)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Note:

Source
No.
i
(2)
27
22
9
25
12
9
10
12
22
10
25
12
9
10
22
25
18
18
18
27
27

Sample
No. (a)
Si
(3)
1
1
1
1
1
2
1
2
2
2
2
3
3
3
3
3
1
2
3
2
3

Marginal
Return
u.Csp
(4)
.02158
.00309
.00253
.00153
.00141
.00055
.00050
.00045
.00033
.00024
.00017
.00014
.00012
.00011
.00003
.00002
.00002
.00001
.00001
0
0
Degree of
Undetected
Violation
Incre-
mental
ACi(Si)
(5)
18.4964
-12.0827
- 1.7301
- 1.4205
- .8418
- .7821
- . 311
- .2314
- .2463
- .1823
- .1294
- .0952
- .0776
- . 068
- .0622
- .0192
- .0107
- .0087
- .0073
- .0061
- .00001
0
Cumula-
tive
DC^s,)
(6)
18.4964
6.4137
4.6836
3.2631
2.4213
1.6392
1.3282
1.0968
.8505
.6685
.5388
.4436
.3660
.2980
.2358
.2166
.2059
.1972
.1899
.1838
.1838
.1838
Monitoring
Resources
Required
Per
Sample (s)
ri
(7)
560
560
560.5
550
553
560.5
543
553
560
543
550
553
560.5
543
560
550
550
550
550
560
560
Cumula-
tive
R=Er.
i
(8)
560
1120
1680.5
2230.5
2783.5
3344.
3887.
4440.
5000.
5543.
6093.
6646.
7206.5
7749.5
8309.5
8859.5
9409.5
9959.5
10509.5
11069.5
11629.5
This table can be duplicated for Use in the hand calculations.
                                     224

-------
                 Table  6.20      Sampling Rates Using Hand Calculation
                                  Procedures
Maximum monitoring resources available, R = $ 5000
Maximum acceptable degree of undetected violations = 	
Source
No.
i
(1)
9
10
12
18
22
25
27

Min. No.
Samples
Required
*i
(2)
0
0
•o
0
0
0
0

Max. No.
Samples
Allowed
Li
(3)
3
3
3
3
3
3
3

No. of
Times
to be
Sampled
Si
(4)
2
1
2
0
2
1
1

Totals:
Monitoring
Resources
Needed
$
(5)
1121
543
1106
0
1120
550
560

5000
Degree of
Undetected
Violations
Ci(si}
(6)
.0871
.2491
.1132
0.
.0215
.1073
.00001

.57821
                              225

-------
       Table 6.21     Priority List of Samples Using Computer
                     Calculation Procedure
t, i n ;• I i v
          SOU&LE
          S A f. P L E C
        k F: f i Ik M  Vino
              COST  OF
             UNOfTtCTEG
             VIOLATIONS
                                                  RESOURCES
 7

 o
I"
1 1
1?
IS

IS

17
             Q
            e1?
1 0
 Q

2?
                10
                        .1 J 'J 2 6 H U 6
                        . 1 0 r> b 3 S 0 6
                        .0 7626479
                        ,0o
. n M 5 7 u a 3
. n 1 u o fc 6 P 0
,o13bO 756
. 0 0 Q <* 1  f 10 u 0 0 0 (.1
. nooooooo
                                       20.
                                       1 o , 9 7 0 a 5
                                         .1 I5a3
                                        a . 2 e 0 7 o
                        5.71670
                        3.69072
                                        "5,6b8u7
 b60.00
1 123.00

2233.bO
279U.OO
3357,00
3910.00
0060,00
S 0 1 0 . 0 0
55*0.00
6110.00
6653.00
7213,bO
7766.50
                                                     9672.bO
                                                 996b.bO
                                                lOSlB.bO
                                                1 1078.bO
                                                11636,bO
                             226

-------
SAMPLING RATES

        Although discrepancies may be found in the priority ordering for
each procedure, relatively little disagreement should be found in sampling
rates for a sufficiently large budget.  Different marginal returns may
suggest different priorities, but both procedures should be able to sense
in general terms, those sources that require high monitoring priorities.
It was seen, for instance, that both procedures recognize the need to
monitor source 27 first, but found repeat monitoring unimportant.

        Table 6.20 and Table 6.22 present sampling rates for each procedure
assuming a fixed budget of $5,000 and the results are close.  In both al-
locations sources 9 and 22 are monitored twice and sources 12 and 27 once.
Small differences are found in the number of samples required for sources
18 and 25.  The computerized procedure would monitor both sources once,
but the hand procedure monitors source 25 twice.  Another difference be-
tween the two methods can be seen for source 10 which is monitored once
by the hand procedure, but is not monitored by the computer method.  This
difference is largely due to the different sequences in which the budget
is spent.  Using the hand procedure, it was possible to spend $4,997 to
monitor 9 times, but using the computerized procedure it was only possible
to monitor 8 times for a cost of $4,460.  Had the hand calculation run in-
to similar budetary limits during allocation number 9, source 10 would not
have been monitored, and both procedures would agree.

        The disagreement in the sampling rates appear quite small.  Both
procedures tend to monitor the seven sources at about the same frequency
but may accomplish these tasks in different sequences.  Both procedures
recognize the necessity to assign a high monitoring priority to potentially
harmful sources and to give lower priority to situations where additional
effect would yield relatively little new information.
                                   227

-------
            Table 6.22      Final Allocation Using Computer
                           Calculation Procedure
                           . T    5000.00

         fM'-i Nfl.    ?'AX M\                           CUM  OF
         SAIL'S    S^PLES    Tires     Ptsnunces
bi.K'QCt   Kuj'UWfcD   all.'Wo    bArPL^D     USbO
TniflL  wtbni.iPCF. S  i.iStO   oiJftO.OO
l-T'.&l  C^ST OF  U'4/^TfCTLQ  VIOLATIONS
0 03
in n .i
\? 0 }
IM 03
^? 0 j
2^ n 3
<=7 U 3
c?
0
1
1
I
1
I
U?l

b53
550
ll?b
550
560
.00
.00
.00
.00
.00
.00
.00
,?.3376
.3d 3<*2
.250bl
^.2^'Jio
.0^031
. 3 0 0 0 P
.00000
                             228

-------
                                 SECTION 7
                       COMPUTER PROGRAM DOCUMENTATION
7.1    INTRODUCTION

       The Effluent Monitoring Program (EFFMON) computes a priority al-
location used to schedule future monitoring visits to discharge sources,
having been given past information about those sources.  For a description
of the solution technique and restrictions on the model, the reader should
consult Sections 2 and 5.  This section will present documentation for
EFFMON including general requirements for implementation, descriptions
of the main program and subprograms (flow charts included) and, finally,
definitions of program variables.

       The EFFMON code conforms to ASA Standard FORTRAN V and has been
successfully run on a UNIVAC 1108.  The average size of the program on
the UNIVAC 1108 is about 42K words.  Along with the use of logical units
5 and 6 as card reader and line printer, two auxiliary mass storage units
are utilized by the program for temporary storage.  Logical unit 11 is
referenced in the main program only, and is used to sequentially store
discharge data for all sources; the data is then read back one source at
a time as needed to compute initial statistics, probability of no violation
and expected damage for that source.  Logical unit 12 is called in the main
program to sequentially store certain computed statistics for each source
until the time such statistics have been computed for all sources; then,
if these statistics are to be written out, subroutine OUTPUT is called,
and the statistics are read back andprinted source by source (see Figure
5.7 for an example).  Note that if NOUT (the flag variable which controls
this putput option) is non-zero, OUTPUT is not called and unit 12 is not
used.
                                    229

-------
       One machine-dependent feature of the program which might need
to be changed occurs in subroutines PNVCOM and EXPDAM.  In those two
routines, variables labelled as "WENDTA(7,J,-)" and "WENDTA(6,J,-)" are
set equal to extremely large numbers.  The reason for doing this is so
that an overflow condition will exist when printing out certain terms.
The UNIVAC 1108, which the program was run on, prints out the desired
asterisks in this case.  Adjustments may have to be made on another
machine.  Note that these asterisks are printed in the (optional) sta-
tistical summaries in place of a value for expected damage and prob-
ability of no violation when duplication (in multiple pipes) of any
constituent at a source occurs.

       One other item requiring attention is the function RNORM.  Re-
ferenced within Function XNORM, RNORM(X) computes a rational function
approximation to the standard normal distribution function with argument
X:
                         ,X
       RNORM(X)  =  -±-  f  exp(-t2/2)dt
RNORM is a library function available through the UNIVAC 1108 STAT-PACK
(statistical library).  The method for computation as described by STAT-
PACK is:
       RNORM(X)  =
  f;  X < 0
1-f;  X > 0
where
                         i~|-16
             Li=o
    1
                                  230

-------
and where the a.'s are taken from Hastings' Numerical Approximations for
Digital Computers (Princeton, 1955). .The user must accommodate EFFMON
by supplying a suitable reference for RNORM.

7.2    PROGRAM DESCRIPTION

       The EFFMON main program and subprograms are described in the suc-
ceeding pages.  Figure 7.1 demonstrates the linkages between the main
program and subprograms.  Simplified flow charts of major individual
routines are presented in Figures 7.2 through 7.10.  All equations
labelled therein are located in Reference  [1].

Main Program

       The main program reads all input data and echo prints all inputs.
The constituent data are converted where the units are inappropriate
(standard units for the program are the same as those listed in Table 5.4),
The only other calculations done in the main program are those for es-
timating an average pipe flow for each pipe.  The rest of the calculations
and output are carried out by subroutines  coordinated by the main program.
For each source to be considered, the main program calls ISTAT, PNVCOM,
and EXPDAM to determine initial statistics, calculate the probability of
no violation, and find the expected damage of undetected violations re-
spectively.  The priority allocations and  corresponding output are then
created by calling PRIORT.  Additional output of the statistics of the
individual sources is obtained by calling  OUTPUT.

Subroutine ABEF

        Subroutine ABEF computes the coefficients used in calculating
the expected  damage for pH/pOH.
                                   231

-------
                     MAIN
                    PROGRAM
K)
CO
to
                                      ISTAT
                                                     PARAt-IS
                                     PNVCOM
                                     OUTPUT
                                      MAJOR ROUTINES
                             Figure  7.1
                                                                                    I	1
                                                                                                •
                                         IL,
                                        I ILINAO,
                                        I ILINFA,
                                        | ILINFB,
                                        | IN,
                                       ^ ININFA,
                                       " ININFB,
                                        I RILBT1,
                                        I DIFF,
                                       J DNORM,
                                         XNORM
                                                                                    I	I
                                    SUPPORTING
                                   -FUNCTIONS.
General Program Flow Diagram for EFFMON

-------
GENERAL
INPUTS
PIPD FLOWS
SELF-MONITORING
DATA
EFFLUENT
STANDARDS
                              c
         START
                                    I
     /READ PRO-
     JGRAM CONSTANTS
     AND OPTIONS
                                 READ  SOURCE
                              (DESCRIPTIONS
                               AND CONSTANTS
                                              REPEAT FOR EACH SOURCE I
                                              REPEAT FOR EACH PIPE J AT
       READ MONTHS,i
     (PIPE FLOWS &
     UNITS
                                              SOURCE I
                                   ARE
                                 FLOW  UNIT
                                GALITERS/DAY
                          CALCULATE  SINGLE  ESTI-
                          MATE OF  PIPE  FLOW (EX-
                          PONENTIAL  SMOOTHING OF
                          ALL DATA FOR  THAT PIPE)
 /READ ALL SELF-MONITOR-
[ING CONSTITUENT DATA &
 UNITS FOR ALL MONTHS
                                                      PIPE LOOP
                          FIND LIST  OF  DISTINCT
                          CONSTITUENTS  FOR
                          SOURCE I
                                                  REPEAT FOR EACH PIPE
      /READ ALL
     [STANDARDS &
      UNITS FOR PlPt
     LL
 Figure  7.2     Main Program
                                    ARK
                                 STANDARDS
                                IN CORRECT
                                    SITS2
                                     233

-------
CONVERSION  OF DATA
INTO  USABLE UNITS
COMPLIANCE
MONITORING
                               IS
                            SOURCE  I
                        TO  BE USED  IN
                           ALLOCATION
                                    REPEAT FOR EACH PIPE J AT SOURCE I
       IS
   CONSTITUEN
DATA IN PROPER
      UNITS
                              STORE
                           FLOW AND
                          CONSTITUENT
                         DATA FOR SOURC
                          I TEMPORARILY
                            (UNIT 11)
                                                   SOURCE  LOOP
                                       REPEAT FOR EACH SOURCE  I THAT
/READ SOURCE I
 COMPLIANCE MON-
 ITORING  (ASSUM-
 ED  IN CORRECT
 UNITS')
                                          IS TO BE IN THE  ALLOCATION
                              READ
                            SOURCE I
                           DATA  BACK
                           FROM  UNIT  11
                            Figure 7.2      — Continued
                                   234

-------
INITIAL STATISTICS
SOURCE
PROBABILITY OF
NO VIOLATION
SOURCE
EXPECTED
DAMAGE
PRIORITY
ALLOCATION
AND TABLES
    /  CALL  1STAT
   /  (CALCULATE
   \ INITIAL
    \STATISTJCS)
 /CALL PNVCOM
/ (COMBINE PIPE DATA
\A
                               AND CALCULATE PROB.
                                F NO VIOLATION)
                                      SHOULD
                                  XPECTED DAM-
                                  GES BE CALCUI
                                      ATED
      CALL EXPDAM
     (CALCULATE  EX-
      ECTED DAMAGE)
                                       ARE
                                    TABLES OF
                               SOURCE STATISTICS T
                                   BE PRINTED
                                      STORE
                                     OUTPUT
                                   STATISTICS
                                   EMPORAR1LY
                                     ON TAPE
    /CALL PRIORT
   /(ALLOCATE
   \  PRIORITIES)
                         Figure  7.2
             — Continued

-------
SUMMARY TABLES
                                ARE
                          TABLES OF SOU-^  NO
                        CE STATISTICS TO BE
                             PRINTED
                                  9
  ACALL OUTPUT
/ (PRINT SUHM-
\ARY TABLES BY
     SOURCE)
  c
                                END
                   Figure 7.2
           — Continued
                         236

-------
CONSTITUENT
EXPECTED
DAMAGE
                     (    ENTRY   J
        ^C.2.8
CALCULATE AND
ADD SIX INTEGRAL
TERMS FOR EXPECT
ED DAMAGE
                                                     CALCULATE AND
                                                     ADD DELTA FUNC-
                                                     TION TO EXPECTED
                                                     DAMAGE
                       CALL DAMAGO\
                      (CALCULATE    \
                    DAMAGE AT 0-LOAD/
                             	y
 JNG
                     (RETURN    J
             Figure 7.3
        Function COMEXD
                                 237

-------
ZERO-LOAD
CONSTITUENT
EXPECTED
DAMAGE OR
DELTA
FUNCTION
COEFF1CIENT
         TO
CALCULATE 0 -
 OADING DAMAGE
RESET 0-LOAD-
ING TO FIND
DELTA FUNCT-
ION COEFFIC-
IENT
       LOCATE 0-LOAD-
       IHG WITH RESPEC1
       TO DAMAGE FUNC-
       TION BREAKPOINTS
LOCATE 0-LOADING
WITH RESPECT TO
DAMAGE FUNCTION
BREAKPOINTS
       CALCULATE EXACT
       0-LOADING
       DAMAGE
CALCULATE EXACT
0-LOADING DAMAGE
       (   RETURN    )
 \^ RETURN   J
                           Figure  7.4     Subroutine  DAMAGO
                                          238

-------
CONSTITUENT
EXPECTED DAMAGE
FUNCTION COMEXD\
(CALCULATE EX-
PECTED DAMAGE
 OG NORMAL)
                                                 REPEAT  FOR  EACH  DISTINGUISHABLE
                                                 CONSTITUENT M  AT  SOURCE
                                                   YES
                                                            FUNCTION  PIIEXD
                                                           (CALCULATE  F.X'i'KCTEU
                                                          .DAMAGE FOR  pli AND
                                                             C.2.40
                                                        CALCULATE
                                                        TEMPERATURE
                                                        CONSTANTS
                                 CALCULATE
                                 CONSTANTS FOR
                                 NON-COUPLED
                                 CONSTITUENTS
                                 DETERMINE UP-
                                 STREAM DAMAGE
                                 LEVEL
                                      WHAT
                                  IS CONSTITU-
                                ENT DISTRIBUTION
 /FUNCTION' COMEXD
/  (CALCULATI-: EX-
\  PECTKI) DAMAGE
 \IORMAL)	
                                      -*r«
SOURCE
EXPECTED
DAMAGE
                                                    CONSTITUENT LOOP
                             SOURCE EXPECTED DAMAGE
                             = LARGEST OF CONSTI-
                             TUENT EXPECTED DAMAGES
                                 (RETURN^
                        Figure 7.5
                                        Subroutine EXPUAM
                                        239

-------
Check of  Self-
Monitoring  Data
Aggregate
Months
                           c
        ENTRY
                                           REPEAT FOR EACH PIPE L
                                           REPEAT FOR EACH CONSTITUENT J OF PIPE L
                                           REPEAT FOR EACH MONTH K OF PIPE L
REMOVE ANY ERROR DATA-
DATA ENTERED AS 0.  OR
DATA WHERE THE MAXIMUM
: MEAN OR MINIMUM >  MEAN
                                           MONTHS LOOP
 CHECK SAMPLE SIZE FOR
 EACH MONTH AND COMBINE
 SAMPLE SIZES FOR MONTHS
 IF  SAMPLE SIZE < 4
                                  IS
                               THE TOTAL
                             AMPLE SIZE
                                                                                  1A1  (IB
                          Figure  7.6
                  Subroutine ISTAT
                                            240

-------
 ESTIMATE MEAN
 AND  STANDARD
 DEVIATION
INCLUDE
COMPLIANCE
DATA
(BAYESIAN UPDATE
IN APPENDIX E,
REFERENCE 1)
COMBINE MONTHLY
ESTIMATES
                                   REPEAT FOR EACH MONTH  (OR COMBINATION OF
                              IS
                           THIS A
                      COMBINATION OF
                           MONTHS
                             COMBINE MEANS
                             AND MAXIMUMS/
                             MINIMUMS
      
-------
       ESTIMATE  0  AND 6
       OF  CONSTITUENT
       LOADING
                                WHAT
                            IS CONSTITU-
                          ENT DISTRIBUTIO
ESTIMATE PARAMETERS FOR
FUNCTIONAL MODEL* GIVEN
MAXIMUM (OR MINIMUM)
AND MEAN OF SAMPLE
ESTIMATE PARAMETERS FOR
FUNCTIONAL MODEL* GIVEN
MAXIMUM (OR MINIMUM)
AND MEAN OF SAMPLE
                                                                               A.3.1
                            ESTIMATE
                            AND 8
                         CALCULATE 0
                         AND 8
                           (  RETURN    J
          *FUNCTIONAL MODELS WERE DEVELOPED AS APPROXIMATIONS TO THE EXACT
           METHODS FOR FINDING p AND 3 IN APPENDIX A OF REFERENCE 1.
                                  Figure 7.7
    Subroutine PARAMS
                                       242

-------
                               (   ENTRY     )
EXPECTED DAMAGE FOR
CONSTITUENT pH/pOH
                                FIND UPSTREAM
                                DAMAGE LEVEL
                                MEAN OF pOH=
                                14-MEAN OF pH
                                 CALL PHDMGO
                               (CALCULATE 0-
                                       DAMAGE:
                               REMOVE 0-LOAD-
                               ING DAMAGE FROM
                               EXPECTED DAMAGE
                                           C.2.28
                           CALCULATE AND SUM 11
                           INTEGRAL TERMS FOR
                           EXPECTED DAMAGE OF pH
                           OR pOH-WHICHEVER IS
                           SIMPLf'R
                                           C.2.32
                           CALCULATE AND  ADD
                           INTEGRAL TERMS FOR pH
                           OR pOH-WHICHEVER WAS
                           NOT DONE
                               (    RETURN    )
           Figure 7.8    Function PHEXD
                        243

-------
                                          REPEAT  FOR  EACH PIPE CONSTITUENT K
                                            N0
COMBINE STATISTICS
AND DETERMINE
CONSTITUENT
PROBABILITIES OF
NO VIOLATION
                                          REPEAT  FOR  EACH DISTINGUISHABLE
                                          CONSTITUENT M OF SOURCE
                                          REPEAT  KOR  EACH SOURCE PIPE J
                                               C.3.6,C.3.7,C.2.3.5,C.2.3.6
   COMBINE C's AND
   8's AND CALCU-
   LATE P(NO  VIOL)
                                               C.3.2.C.3.3.C.2.10
                                                COMBINE O's AND
                                                d's  AND CALCU-
                                                LATE P(NO VIOL)
                   C.3.6,0.3.7
                     COMBINE C's  AND  8's
                     AND CALCULATE P(NO
                     VIOLATION)
                   C.3.8.C.3.9
                                     CONSTITUENT LOOP
                                     PIPE LOOP
                        FINISH CALCULATING
                        COMBINED 0 AND  8
                        FOR M
DETERMINE SOURCE
PROBABILITY OF
NO VIOLATION
C. 3. 11, C. 3. 12
SOURCE P(,\'0 VIOLA-
TION) ^PRODUCT OF ALL
CONSTITUENT PROBAB-
ILITIES (EXCEPTING
DO)
  SET DO COEFFICI-
  ENT USING P (DE-
 IFAULT is 0.)
                                           SOURCE CONSTITUENT  LOOP
C. 3. 11, C. 3. 12
SOURCE P(NO VIOLA-
TION') =PRODUCT OF THE
MINIMUM CONSTITUENT
PROBABILITY OF EACH
PIPE (EXCEPTING DO)
                            RETURN
                   Figure 7.9     Subroutine PNVCOM
                                     244

-------
                    (
                        ENTRY
                                   REPEAT FOR EACH SOURCE I
                     DETERMINE
                     RESOURCE COST
                     TO MONITOR
 CALCULATT ON
 OF MARGINAL
 RETURNS
                                   SOURCE LOOP
                                  REPEAT FOR EACH SOUKGE I
CALCULATE MARGINAL
RETURNS (MR's)
FROM LOWER TO UP-
PER SAMPLING LIMIT
                                   SOURCE LOOP
                                   7.8
                  COMBINE ALL MR's
                  AND SORT INTO
                  DECREASING ORDER
             DETERMINE TOTAL RESOURCE COST
             AND TOTAL COST OF UNDETECTED
             VIOLATIONS (EACH SOURCE MONI-
             TORED MIN. KG. OF TIMES)
PRT NTI NG
OPTI ONS
                  YES
PRINT
"INITIAL
 ALLOCATION;
                                                            7.6
                                                                                      7.8
Xi.
OUT!
OPT]
^
NO
\
5\
>UT
ON
•Jx

'X. YES

FOR EACH SOURCE:
CALCULATE MR's FROM
0 TO MINIMUM NUMBER
OF SAMPLES

PRINT "PRIO-
RITY LIST OF ^_
SAMPLES"
U->-


DETERMINE CUMU-
LATIVE RESOURCE
COST AFTER EACH
SAMPLE
b


d _,

COMBINE WITH PREVIOUS
MR's AND SORT INTO
DECREASING ORDER
I
DETERMINE TOTAL COST
OF UNDETECTED VIOLA-
TION COST AFTER EACH
SAMPLE

                         o
                        Figure  7.10
                      Subi-outiiie PRIORT
                                           245

-------
            USING FIRST SET OF
            ORDERED MR'S: DETERMINE
            VIOLATIONS COST AND
            TOTAL RESOURCE COST AT
            EACH SAMPLE
PRINTING
OPTIONS
CONTINUED
                                             PRINT
                                             "PRIORITY LIS
                                             3F SAMPLES"
 IS OUTPUT
OPTION 211=1?
                  IS OUTPUT
                 OPTION 3=1?
                      IS
                   THE BUDGET
                   CONSTRAINT
                   NON-ZERO?
                             LOCATE FIRST SAMPLE FOR
                             WHICH TOTAL COST OF UN-
                             DETECTED VIOLATIONS
                             < DESIRED COST
            LOCATE THE LAST SAMPLE
            OF WHICH TOTAL RESOURCE
            COST i BUDGET
                          REPEAT FOR EACH SOURCE
            COUNT THE NUMBER OF
            TIMES SOURCE I IS TO BE
            SAMPLED (PRIOR TO LIMIT
            DETERMINE TOTAL RESOURCJ
            REQUIRED TO SAMPLE
            SOURCE I THAT MANY TIME!
             DETERMINE SOURCE I COST
             OF UNDETECTED
             VIOLATIONS
                         Figure 7.10

                                  246
                         —  Continued

-------
               DETERMINE TOTAL
               RESOURCE COST AND
               VIOLATIONS COST
               OVER ALL SOURCES
PRINTING
OPTIONS
CONTINUED
                  PRINT
                  "FINAL
                  ALLOCATION"
                   HAS COST
               CONSTRAINT BEEN
                  ALLOCATED?
      LOCATE FIRST SAMPLE FOR
      WHICH TOTAL COST OF
      UNDETECTED VIOLATIONS
      < DESIRED COST
              IS THE
           COST CONSTRAIN
             NON-ZERO?
                                                            NO
                         Figure  7.10
— Continued
                                 247

-------
Function COMEXD

       Function COMEXD calculates the expected damage of any non-pH con-
stituent with the use of IN, IL, ININFB, ILINFB, ILINAO, and XNORM.
DAMAGO is used to calculate the damage which would occur under zero load
and this damage is subtracted from the expected damage.

Function DAMAGO

       DAMAGO calculates the damage for a given constituent that would
occur under zero load (damage caused by the upstream concentration of
the given constituents).  This value is also used as the delta function
coefficient.

Function DIFF

       Function DIFF is used in conjunction with function XNORM in order
to obtain greater accuracy in taking the difference of two values of the
standard normal distribution functions.

Subroutine  EXPDAM

       Subroutine EXPDAM determines the expected damage for a single
source using functions PHEXD (constituent pH/pOH) and COMEXD (non-pH
constituents), and sets the source expected damage equal to the maximum
of the constituent expected damages.
ft
 The delta  function concept is used in the case of normally distributed
 constituents.  The normal distribution curve includes loading values
 from -°°  to +°°.  Since actual loading values cannot be less than 0.0,
 the delta  function accounts for this fact by lumping all negative values
 together and adding them into the 0.0 loading value when calculating
 expected damage.
                                   248

-------
Functions IL, ILINAO, ILINFA, ILINFB, IN, ININFA, ININFB

       These functions (along with the entry point RILBTl in IL)  all
compute variations of the integral (C.2.9 in Reference [1]).
       I (e,f,a,e,p,a)  =  / (ex + f)4» (x)dx ,

                                                                  2
where   is the normal density function with mean y and variance 0  if
Y = normal, and where $  ^s lognormal, with mean and variance of the
                       Y                       2
corresponding normal distribution being y and a , if y = lognormal.  All
of the above functions beginning with the letters "IN" are normal, while
those containing "IL" are lognormal.
Subroutine ISTAT
       Subroutine ISTAT calculates the initial statistics for a single
source.  ISTAT combines all given data to find an estimated mean and
standard deviation for the loading of each constituent of each discharge
pipe.  First, these estimates are made for each month (or group of months
if any sample size is less than 4) by calling PARAMS, then compliance
monitoring data is used to improve the monthly estimates, and finally,
the estimates for all the months are combined into a single mean and
standard deviation for the constituent.

Subroutine ORDER

       ORDER organizes a given array of values into descending order.
Called by PRIORT, ORDER is used to rearrange the marginal returns so that
a priority allocation can be made.
                                    249

-------
Subroutine OUTPUT

       This subroutine prints one table for each source being considered
(see Figure 5.8 for an example).  The table summarizes the source statistics
for the monitoring period by listing average source flows as well as stand-
ards, means, standard deviations, expected damages, and probabilities of
no violation for each of the constituents, and also source expected
damage and source probability of no violation.  OUTPUT is called by the
main program only if the user has specified that he desires such tables.

Subroutine PARAMS

       PARAMS estimates a mean and standard deviation for the loading of
a single constituent given a sample mean, sample maximum, sample size,
and distribution specification (normal and lognormal).  PARAMS uses two
functional models (one for the normal case, the other for the lognormal
case), which were developed from the methods of Appendix A of Reference
[1].  PARAMS will also yield estimates of mean and standard deviation for
the constituent pH/pOH given a mean and maximum, or mean and minimum, or
maximum and minimum.

Subroutine PHDMGO

       PHDMGO is analogous to DAMAGO in that it calculates the damage
caused by zero loading (the upstream damage) or, equivalently, the delta
function coefficient.  PHDMGO specifically treats pH/pOH, and DAMAGO is
called for all other constituents.

Function PHEXD

       Function PHEXD calculates the expected damage for a pH constituent.
                                   250

-------
Calling ABEF to compute coefficients, PHEXD uses IL, RILBT1,  and ININFA.
PHEXD also calls PHDMGO to calculate'zero-loading damage which is sub-
tracted from the total expected damage.

Subroutine PNVCOM

       PNVCOM, for a source with multiple discharge pipes,  combines con-
stituent loads when the same constituent occurs in more than  one pipe of
an effluent source.  That is, PNVCOM creates a single mean  and single
standard deviation for each distinguishable constituent of  a  multi-pipe
source.  PNVCOM also calculates probabilities of no violation (with the
use of IN, ININFA, and ILINFA) for all constituents and combines these
into a source probability of no violation.  In addition, PNVCOM calculates
the total effluent source flow and sets the combined DO concentration if
DO data has been provided.

Subroutine PRIORT

       PRIORI calculates the total cost to monitor each source.   PRIORT
also calculates marginal returns for each source and calls  ORDER to sort
these into descending order.  Depending upon which print options are
specified by the user, PRIORT uses this sorted list to determine the
sampling allocation and prints tables giving the sampling frequencies,
monitoring costs, and costs of undetected violations.

Function XNORM

       XNORM finds the value F(x) of the standard normal distribution
function with argument x.  If  x  < 4.0, XNORM calls RNORM (see Section
5.1, Introduction, for an explanation of RNORM) to find this  value.
                                   251

-------
For |x|  > 4.0, XNORM uses its own approximation formula (for greater accuracy)
XNORM contains entry point DNOKM, used when calculating l-F(x).

7.3    DESCRIPTION OF VARIABLES

       Variables residing in common blocks within the program will be
described in Table 7.1.  Then in Table 7.2, local variables are defined
according to their respective subprograms.  Note that the variable I,
defined under COMMON/UPDATE, is used consistently throughout both tables
to refer to that effluent source which is currently being worked on by
the program.

       A complete program listing follows Table 7.2.
                                     252

-------
              Table 7.1
Description of Common Variables
        VARIABLE
                                                    DEFINITION
COMMON/BIJ/
  —Refer to Equation C.2.22 in Reference 1—
Al
B(2)


COMMON/BODDMG/

TQS

QU

CS

IBOD
COMMON /BRKPTS/
S(J)
   *J ~"i 5 • • • y O

SSPH(J)
COMMON/CONST/
Parras  (J,K)
COMMON/DMG1/
DAMAGE  (J,K)
   K= JL 5 • • • 5 b
COMMON/DMG2/
DMG (J,K)
    J=l and
    K=l,...,11
    J=2 and
        Mass loading coefficient of downstream
        concentration for pH or pOH constituent, a
                                                                              iJ
                                    Downstream concentration factor for pH, b
                                                                             iJ
                                                  iJ
Downstream concentration factor for pOH,  b




Total flow for effluent source I

Upstream flow at effluent source I

Mean of DO concentration for source I

Internal flag for BOD to indicate the
calculation of either zero load damage or
delta function coefficient


Damage value of the J   point of the non-
pH/pOH damage functions

Damage value of the J   point of the pH/pOH
damage functions
        Alphanumeric description  (J=l,...,5
        alphanumeric words) of constituent
        identified as K  (see Table 5.4)
        The Kth breakpoint of the Jth function
        where J is the damage function identifica-
        tion number  (see Table 5.3)
        The K   breakpoint of the pH damage function

        The K   breakpoint of the pOH damage
        function
                                     253

-------
                        Table 7.1
   Continued
       VARIABLE
                DEFINITION
COMMON/EXP/
NPPARS (J,I)
COMMON/FLAGD/
       ID
COMMON/IST/
MNTHQS (J,K)
   K=l,...,24
NSIZE (J,K,L)


SMEAN (J,K,L)


SMAX (J,K,L)



NOCPTS  (J,K)


MNTHSZ  (J,K,L)




Z(J,K,L)



DELTA

GAMMA


KETA
Number of constituents discharged from pipe
J of effluent source I
Distribution of constituent being examined
(0 for normal, 1 for lognormal)
Sequentially numbered months (in the range
1-24) for which data was entered for pipe J
of source I

Sample size for data on the K   constituent
of pipe J, month L of source I

Sample mean of the K   constituent of pipe J
month L of source I

Sample maximum (or minimum in the case of pH)
of the K'-h constituent of pipe J, month
L of source I
Number of compliance monitoring points for K
constituent of pipe J of source I
                                            th
Numbered month  (in the range 1-24) corres-
poinding to  the Lth compliance monitoring
point  (Z(J,K,L)), Kth constitutent of pipe
J, source I

L    compliance monitoring point  (maximum 30
points) for  the Kth constituent  of pipe J
of source I

Not  used

Coefficient  used  in Bayesian update in
Subroutine ISTAT

Coefficient  used  in Bayesian update in
Subroutine ISTAT
                                     254

-------
                         Table 7.1
    Continued
        VARIABLE
               DEFINITION
KNU
ENU
IPARM  (J,K,I)
ISTATS  (I,J,K,L)
   L=l
   L=2
    L=3
    L=4
 COMMON/ISTPNV/
 MU (J,K)
 SIGMA (J,K)



 COMMON/OUT/
 WSRC(l)

 WSRC(2)

 WSRC(3)


 UPFLW

 DO

 NPTSW

 WEND(1,J)
Coefficient used in Bayesian update in
Subroutine ISTAT

Coefficient used in Bayesian update in
Subroutine ISTAT

Constituent identification number of the
Kch constituent of pipe J of source I (see
Table 5.4)
Combined mean of the K   constituent of
source I, pipe J (for the monitoring period)

Combined variance of the KC  constituent of
source I, pipe J (for the monitoring period)
                                        Lf
Combined confidence in the mean of the K
constituent of source I, pipe J (for the
monitoring period)

Combined confidence in the variance of the
Kth constituent of source I, pipe J (for the
monitoring period)


Combined mean of the K   constituent pipe
J, of  source I  (equal to ISTATS (I,J,K,1)

Combined standard deviation  of the K
constituent pipe J, for the  monitoring
period for source I  (equal to  ISTATS
 Identification number  for  effluent source I

 Expected  damage  for  effluent  source  I

 Probability  of no  violation for  effluent
 source I

 Upstream  flow at effluent  source I

 Mean of DO concentration for  source  I

 Number of pipes  for  source I

 Mean discharge flow  of pipe j, source I

 255

-------
                          Table 7.1
                                        Continued
        VARIABLE
                                                    DEFINITION
WEND(2,J)

WENDTA(J,K,L)

   J=l


   J=2

   J=3

   J=4


   J=5


   J=6

   J=7

COMMON/PCOPT/
ICOPT
                                    Number of constituents of pipe J, source I

                                    For L   constituent of pipe K of source I:

                                    Constituent identification number (see
                                    Table 5.4)

                                    Constituent effluent standard

                                    Constituent distribution code

                                    Estimated constituent loading mean for the
                                    monitoring period

                                    Estimated constituent loading standard
                                    deviation for the monitoring period

                                    Constituent expected damage

                                    Constituent probability of no violation
                                    Damage function point (1,2,3,4,5, or 6)
                                    whose corresponding damage value is
                                    closest to the upstream concentration for
                                    a non-coupled constituent (the same point
                                    is used for all non-coupled constituents of
                                    all sources)

COMMON/PNVEXP/
   —For this common block, constituents present in more than one pipe of an
     effluent source have been combined and each of the J constituents is
     distinct—
DIST(J)


TMU(J)

TSIG(J)
COMMON/PRI/  (as listed in MAIN)
NOPIPS (I)

NOPARS (I)
                                    Distribution of the J   constituent of source I
                                    specified as 0 or 1 for normal or lognormal
                                    Mean loading of the J   constituent

                                    Standard deviation of loading of the J
                                    constituent
th
                                    Number of pipes at effluent source I

                                    Number of distinct constituents of effluent
                                    source I (constituents present in more than
                                    one pipe are only counted once)
                                      256

-------
                           .Table 7.1
        Continued
       VARIABLE
               DEFINITION
INDPAR(J.I)


ISFUP(I)

ISFLOW(I)

EXPDM(I)


PNV(I)


IOUT1


IOUT2A


IOUT2B


IOUT3


NAME  (I,J)


B


D

NUSORS



INSORS(I)


PIPCST(J)


CONCST(J)
 COMMON/UPDATE/
 I

 QS(J,I)
Index of distinct constituents (J=l,...,10)
of effluent source I

Upper sampling limit of effluent source I

Lower sampling limit of effluent source I

Expected environmental damage due to
effluent source I

Probability of no violation of effluent
source I

Output option 1 (a value of "1" signals to
print)

Output option 2A (a value of "1" signals to
print)

Output option 2B (a value of "1" signals
to print)

Output option 3 (a value of "1" signals
to print)

Source identification for source I (J=l,...,13
alphanumeric words)

Budget limit for the monitoring agency during
the next monitoring period

Desired limit to the undetected violation cost

Number of effluent sources actually included in
the allocation procedure(out of all those
entered in input)

Index of effluent sources actually included
in the allocation procedure.

Cost to monitor an effluent source with
J pipes

Laboratory cost to analyze a sample
containing constituent J (see Card Groups
3-6 in Table 5.1)


Effluent source  currently being  examined

Calculated estimate  of pipe  flow for pipe
J of  effluent  source I
                                    257

-------
               Table 7.2
Description of Local Variables
       VARIABLE
                     DEFINITION
MAIN PROGRAM

  — See Section 5.2 for a description of input variables —

Subroutine ABEF
Function COMEXD

TMU
TSIG
M
FUNGI
                                      aiJ

                                      biJ
  — Refer  to Equation C.2.27 in Reference 1 —

Dl

D2

A

B

KD

ALPHA

BETA

E

F

L
                  where k is KD below

                  where k is KD below

                  (from C.2.222b)

                  (from C.2.22c)
                                      aiJk

                                      BiJk

                                      eiJk

                                      fiJk
                                      Internal flag indicating if ALPHA and
                                      BETA are both outside of limits (where
                                      the limits are

                                          .0000001 < ALPHA < BETA < 1.)

                                      L=l if ALPHA and BETA are within limits,
                                      2 if not
        Combined mean of the loading of con-
        stituent M (defined below) for the
        entire monitoring period and all pipes
        of an effluent source where M occurs

        Combined standard deviation of con-
        stituent M for the entire monitoring
        period and all pipes of an effluent
        source where M occurs

        Constituent identification number as
        defined in Table 5.4

        External function — IN or IL
                                    258

-------
                           Table 7.2
       Continued
        VARIABLE
                DEFINITION
 Function COMEXD Continued,..,


 FUNC2

 A

 B

 E

 F

 ALPHA

 BETA

 DJB
Subroutine DAMAGO
DJB
M


B

BBOD
Subroutine EXPDAM
IPARAM (J)
KBOD

EXPDM

NOPARS


IPARM(J,K,I)


NOPIPS(I)
 External function  —  ININFB  or  ILINFB

 a.  (See  equation C.2.4b, Reference 1)

 bij  (See equation  C.2.4c, Reference 1)

      (See equation C.2.7d)

      (See equation C.2.7e)

      (See equation C.2.7b)

      (See equation C.2.7c)
                                    Delta function coefficient or zero-loading
                                    damage for constituent M
Delta function coefficient or zero—loading
damage  for constituent M

Constituent identification number (as
defined in Table 5.4}

Coefficient B of COMEXD

Coefficient B adjusted (if the constituent is
BOD)
Constituent identification number (as defined
in Table 5.4) for Jc^ distinct constituent
of source I

Coefficient 1^ (C.2.16)

Expected damage due to effluent source I

Number of distinct constituents of
effluent source I

Constituent identification number for K
constituent of pipe J of effluent source I

Number of discharge pipes for effluent
source I

Effluent source number
                                     259

-------
                               Table  7.2
                                       Continued
       VARIABLE
                                           DEFINITION
EXPD(J)


A

B

COPT
                            Expected damage for each distinct
                            constituent of effluent source I
                            a. (as in COMEXD)

                            bi>  (as in COMEXD)

                            Upstream concentration of a non-coupled
                            constituent
Functions IL. ILINAO. ILINFA. ILINFB. IN. ININFA. ININFB

   —Refer to equations for the normal integral (C.4.1) and lognormal
     integral (page 197) in Reference 1—
A

B
a

b
ALPHA   a

BETA    B
MU

SIGMA
u
a
Subroutine ISTAT
NOPIPS

NPPARS(J)

NMNTHS(J)


DIST(J.K)

QU

EMEAN(L,J,K)

ESIGMA(L,J,K)


ETA(L,J,K)


NU(L,J,K)
                            certain of the above functions use constants
                            in place of a, b, a or 3 in order to
                            calculate commonly used integrals
                            Number of discharge pipes for effluent source I

                            Number of constituents of pipe J

                            Number of months of constituent and flow data
                            for pipe J

                            Distribution of constituent K of pipe J

                            Streamflow just upstream of effluent source I

                            Estimated mean of loading
                            Estimated standard deviation
                            (or at some points, variance)

                            Confidence in the estimated
                            mean

                            Confidence in the estimated
                            variance
Pipe L, Jth
constituent,
month K
                                          260

-------
                    Table  7.2
   Continued
       VARIABLE
               DEFINITION
Subroutine ORDER
XMR(M)
ISORC(M)
Subroutine OUTPUT
NUSORS
Subroutine PARAMS
SSIZE
SMEAN
SMAX


SMIN


IONESD


DIST

EMEAN

ESIGMA


IPRM


Subroutine  PHDMGO
DJB(l)

DJB(2)

Function PHEXD
TMU(J)

TSIG(J)

TQS

QU
Array of M marginal returns to be organized
into decreasing order

Array of effluent source numbers
corresponding to marginal returns in XMR,
which is organi^ed exactly as XMR

Number of elements in XMR and ISORC as
calculated by the program
Number of effluent sources included in the
allocation procedure,  (see definition
of INSORS in Section 5.2)
Sample size of constituent  loadings
Sample mean of constituent loadings

Sample maximum (or minimum for pH) of
constituent loadings

Sample minimum (for pH) of constituent
loadings

Flag to indicate pH data in maximum/
minimum form (no mean)

Constituent loading distribution

Estimated mean of constituent loading

Estimated standard deviation of
constituent loading

Constituent identification number  (as in
Table 5.4)


Expected damage for zero-loading of pH

Expected damage for zero-loading of pOH


A monthly mean for constituent  j=l=pH,  j=2=pOH

A monthly standard deviation for J=l=pH, J=2=pOH

Total flow  for effluent source I

Streamflow  just upstream of source I
                                   261

-------
                               Table  7.2
           Continued
       VARIABLE
                                                   DEFINITION
Function PHEXD continued
A

B(J)
PSI

Subroutine PNVCOM
NOPIPS

NPPARS(J)

NOPARS


IPARM(J.K)


INDPAR(M)


DISTYP(J,K)


EFST(J.K)

QU

PNV


IGOR


TQS

DO

CS

TMU(M)


TSIG(M)


TEMPNV


TEMPM

SUMM
a.j (from C.2.22b, reference 1)

b  , where J=pH=l or J=pOH=2 (from C.2.22c,
reference 1)

Delta function coefficient for pH and pOH
Number of discharge pipes, effluent source I

Number of constituents discharged from pipe J

Number of distinct constituents, effluent
source I

Constituent identification number for K
constituent of pipe J

Index of constituent identification numbers
containing each distinct constituent

Distribution of K   constituent of pipe J (0
or 1 for normal or lognormal)

Effluent standard of K   constituent of pipe J

Streamflow just upstream of effluent source I

Probability of no violation of effluent
source I

Flag indicating if the constituents of source
I are correlated (1=1) or not (I?4!)

Total effluent source flow

Dissolved oxygen concentration

Dissolved oxygen concentration (CS=DO)

Mean of M   distinct constituent (all pipes
of effluent source I combined)

Standard deviation of M   distinct constituent
(all pipes of effluent source I combined)

Probability of no violation for a single
constituent

m in equation C.3.4, reference 1

m in equation C.3.4, reference 1

   262

-------
                          Table 7.2
     Continued
       VARIABLE
Subroutine PN'VCOM continued
TEMPV

SUMV

Subroutine PRIORI

IPARM(J,K,I)
NPPARS(J,I)


RESRCE(I)

XMR(M)
ISORC(M)



TMR(Ml)
ISORCT(Ml)
NUM(I)
               DEFINITION
v in Equation C.3.5,  Reference 1

v in Equation C.3.7,  Reference 1
Constituent identification number for
the Kt" constituent of pipe J, effluent
source I

Number of discharged constituents of
pipe J, effleunt source I

Total resource cost to monitor source I

Marginal returns array where number of
elements in array XMR =
                                       NUSORS
                                        E
                                        1=1
          (ISFUP (I) - ISFLOW(I))
(see COMMON/PRI/ for definition of other
variables)

Effluent array containing the sources
which correspond to the marginal returns
in XMR above

Marginal returns array containing XMR
plus marginal returns for the 1st through
minimal number of samples for each source
where number of elements in array TMR =
                                      NUSORS
                                       E.
                                       1=1
        ISFUP (I)
(see COMMON/PRI/ for definition of
variables)

Array containing the sources which cor-
respond to the marginal returns in TMR
above

Number of monitoring visits allocated
to effluent source I
Function XNORM

X
Argument of the standard normal dis-
tribution function, F(x)
                                   263

-------
Program Listings
   264

-------
                                             M A I N C 1 )
 DATE  021676
                                                                                                      PACE
 1 .
 2.
 3.
 o.
 5.
 6.
 7.
 8.
 9.
1 0.
11.
12.
13.
10.
15.
16.
17.
18.
73.
23.
?9.
JO.
5! .
32.
IS.
3fc.
37,
03.
.i5..e.,7.5.7.5»7.5,l5.,7.5,10,,10.t3.t0.ti2.5tl0.iS.i5.»
*n.,?.S,.s./
Dirt
DATA
DATA
DATA
DAT 4
DiTt
DATA
DATA
, fe) XO. » .01 t .05, . 10» .50, 1 ./
,fe)/o.,. 1, .3, .<»»2.7,3.X
, b) /9. , 8 . ,O.B,0.,ii0.tl30.il50.X
,6) XO. »0, ,0. ,0. » 0. » O.X
,b)/0. .35. t 175. . 200. ,240. ,250.X
,o)Xo., .00. .15«.25f .35, .aX
,6)XO. , .02, .05, t ., 10.? 50.X
i , fa) /O., 100., 2000. » 7500., 15000. ,150000. X
l,6)XO., 20. ,200. ,800. ,3000. ,50000.X
1 1 1>) /O , . . 02 , . 1 , ! . , 5. , 1 0 . X
i ,6) /o, , . o i , ,o2, . 05. . l , .SX
l .61 /.7, .B, .9, 1 ,2t 3. ,8.X
1 »o)/0. , .J «.j», 9,2. 7,3.X
       ! !>t«AGt ( 1 , Jl , J=l
       fDi«4t;t.(2. J) ,J-i
       (r>iMAGt f 3, jj , j=j
       ( QiMfiGt f u . J) , J= l
       (OA «AGi.(S,J)«J=l
       (,OAMAGE(6» J) . Jsl
       c^*M4Gt(7, j) ,j=]
       rC'-MAGr (S, J) . J=i
       rPiw-iPtf V. J) , J=l
       ( D*MA&t' f 10, J) . Js
       (OiM6Gt(ll,J),J=
       ( D.SMAGE O2 . J) , J=
       c OA^r-t < i 3 , j) . j=
       (OivAGEuu , J) , J=
       (O^xAGt.^, J) ,J=
 OATA  ( PAM^Gt Cl 7 , J) , J= l ,6) /O . , . OS, . 1 7. .5, I . , 1 .SX
 OiTAfDt^AGF(I8,J),Jsl,«>jXO.».001,.005,.01,.02».05/
 OAT*  (PAMiGEn«, J) , J=l .65 XO. , ,01 , 1 . i3.,9. ,20.X
 DATA  ( O^MAGL t 20 , J) , J=t .6) X .6, .9, 3. , o . 5, 7 . , l 0 .X
 PAT/  (OA«Ar,Ef 21 , j; , j=i ,b)/0. , .01 . . 1 ,5, ,30. ,SO.X
 OiTi  cD4»iG:.f 22, J) , J=l •&)/b*0./
 OATA  t PA Mir,c ( 23 , J j , j= j , &) /6* o . X
00000 100
00000200
00000300
oooooaoo
00000500
00000500
00000700
00000800
00000900
OOOOlOOO
00 001 100
00001200
0000130C
0000l«00
00001500
OOOClfcOO
00001700
00001800
00001900
00002000
00002100
00002200
OOOU2300
00002UQO
0000?500
00002600
00002700
00002300
00002900
00003000
00003100
00003200
00003300
00003«00
00003SOO
00003600
00003700
00003600
00003900
0000«100
00000200
00000300
00000000
00000500
0000^600
OOOOU700
00000800
00000900

-------
 5! .
 S2.
 S3.
 5a.
 «=5.
 56.
 57.
•56.
 59.
 £0 .
 61 .
 62.
 63.
 6J.
 fc5.
 fo.
 .
07.
      OAT.,
      OATA
      DATA
      DATA
      DATA
     I
      DATA
                                                          DATE 02187t>
                                                           00005000
                                                           00005100
                                                           00005200
                                                           00005300
                                                           oooosuoo
                                                           00005500
                                                           00005600
tDwG(l.J)»J=1.1 I)/.0000001..000000178*.000000316..0000005600005700
                                                                                                      PAGE
(DA HAGc(26,J),J=l,o)/100..200..500..1000.ilSOO.i2300./
(DAMAGt(27,J),J=l,6)/0..20.,40..100.,280..300./
(Oi'-1AGcCce,J),J=i,6)/0.,1..2.5»3.,4.,10./
(r>AMAGfc(29,j),j = 1,6)/o.,10.,UO.,100.,300..1000./
(DAMAGE. (-3 0,J),J=1,0)/0,,0.,0.,0.,0.»0./
C *«*
C ***
     *?..9000.11,.00000316,.00001..0000316.,0001,.000112*.000126/        OOOOiBOO
     -2                                                                  00005900
      DATA    (DMCf2>J)•Js1,1 I)/.O000001..0000003l6..000001..00000158,.000006000
     * '10 0 0 ?:'. ! • . '10 0 p 0 5 o 1 , . 00001. .0000316, .0001. .000112, .000126/          00006100
     **«xt*tx«.***«x*».********
C pEAD IN UsF.^-sPF.ClFlED DAMAGE  FUNCTIONS  AND  MONITORING COSTS
C (PPOG^AM HAS PPESfcT FUNCTIONS  AND  COSTS  IF  NONE ARE READ IN)
C
      "Etncs.'W) ICOSTS.ID^G.IOAHAG.ISS
 9000 FOBvATfJfIl'lX))
      ».'pTTEf6.<>oo) ICOSTS.IDMU.IPAMAG.ISS
  900 FCRMAT( ! \ i,i0('-'),'THE  INPUT  CARO'DATA  FOLLOWS I»10('- I),/ I 0'.
     1       'TCo5TS=i»Ii»T21, iJDMGsifill Tili"IDAMAG=I111fT611IISS=I111
      IFI-TCOSTS.FO.O) GO TO 7
 9100 FOP"4T(Jfrli).i,5x).a(/8(FS.2fSX)))
    7 IFfTOsG.fd.O) GO TO 9
      IFf innG.Nt.1.AND.IDMG.NE.2) GO  TO  200
      no OP:10 i oun = i. i oMr;
 9200 OfAp(S. 9300) I 1 , (OMG( II.J),Js1,11)
 930.-) FOP"Ar(i,,ux,6Fio.3./5x.5FlC.3)
    9 IFClC'AMi&.eg.o) GO TO  11
      IFf iniMiG.LT.l.0".I01MAG.GT.30)  GO  TO  200
      00 00 )0 IOUM=1•IDAMAG
 9UOO SF.iQf S. ^500) I 1 . (DAMAGE ( I 1 , J) , J=l ,6)
 9500 FORMAT(I?,SA»6F10.3)
   11 IFflSS.EQ.O) GO TO 13
      R£0(S.*600) (S(Jj,J=i,6),(SSPH(J)fJ=i,n}
 960^ rOPvAT(oF5.2.XJiFS.2)
     1               I=1,30).(J»J=1.11)*((^HG(I.J)»J=1»11)»I=1.2),(J.
     2               J=1.6)*(I.(OAMAGECI.J).J=l.6)fI=l»30))
  910 FOR>;ir( ! 0't 'PIPCSTfi , 12,")= ' ,F 10.2, 10x,'**IF  PIPCST.  CONCST,  OR'.
     l        -  DAMAGE FUNCTIONS AND BREAKPOINTS  WE.RE  NOT  READ  IN.i./i  '
     2        oV. ' C' ,1?, ')=' .F10.2, 17X. iVALUES  PRINTED  ARE THOSE EXISTI.
     3        'ING  IN THE  PROGRAM) ,2(/i i  ,bX , 1( ' , 12 • ') = ',F 1 0.2)./ I 0 ' .
     «              lCoNCSTC',I2il)=i.F10.2.lOX,5Aa.29c/'  '.6X,i(i,I2»
     5              ' )='.Fio.2«10X,5AC),/' 1 ' ,T18, ' J=' ,10(12.9X).I2./I  L
     6              i..PHI,/i   ),IOMG(!,J)i.2x.1 IF 1 1.7•/ '  '»l--HOH',/ '  I*
     7              '!?(-'GC2.J)'»2x,llF11.7,/"0',Tl8.iJ=i,6(2XfI2«9X),/iOl
                                                           00006400
                                                           00006500
                                                           00006600
                                                           00006700
                                                           00006800
                                                           OOOO&VOO
                                                           00007000
                                                           00007100
                                                          )00007200
                                                           00007300
                                                           00007«oo
                                                           00007^00
                                                           00007600
                                                           00007700
                                                           00007800
                                                           00007900
                                                           00008000
                                                           00008100
                                                           00008200
                                                           00008300
                                                           00008UOO
                                                           ooooesoo
                                                           00008600
                                                           00008700
                                                           00008800
                                                           00008900
                                                           00009000
                                                           00009100
                                                           00009200
                                                          »00009300
                                                           00009400
                                                           00009500
                                                           00009600
                                                           00009700
                                                           00009600
                                                          ,00009900

-------
                                                M A I N C 1 )                           DATE 021676         PACE

     IOC.             9             'DAHAGECi»12t' »J) ' . 1X?°F 1 3 . S , 29C/ '  ' t6X i I C' . I 2 , • , J) ' .00010000
     101.             9             1X.6F13.5J)                                            00010100
                                                                                          00010200
                                                                        t3X.ll(3X«F5.2»3X00010300
     l oa.             i))                                                                   oooioaoo
     1(15.        C                                                                          OOOlObOO
     in6.        C   REAO TN CONSTANTS AND OPTIONS                                          00010600
     J07.        C                                                                          00010700
     108.              PEiOfSiI) NOuT«IOUTl»lOUT2AiIOUT2BiIGUT3fBiDiICOPTiIEXPD?NOSORSi   00010600
     10*.             *          KUSORS                                                    00010900
     110.            1  FOPMIT {5 r 11 f ax } , 2F i o.2»/2d 1 •''X) » 2 (12 »3x ))                          00011000
     111.              K(RnEf6t925) NCUT»IOUTliIOUT2A,IOUT2e.IOUT3.BfDfICOPTtIE.XPDtNOSORS00011100
     112.             1            .NUSORS                                                 00011200
     113.          92S  FoRM4TClOl.lKOOT=l.Il»T2l.'IOUTl=I.Il,TaitlIOUT2A=i.Il,T61.lIOUT2'00011300

     115.             2       /i ' . i ICQPTsi,11,T21.'lEXPOsI.II»T>;^lTF('>TQU7)CICOR(I).lsltl>;0&ORS)                                    00013400
                  au?  FOPwiTC1  ' » ' ICORfI) i  , 7Xt30CIX,12))                                  00013500
      Jo.              W(ou9)                                                        00013600
      30.          9a
-------
M A I N (  1  )                           DATE 021876        PAGE
UB.
145.
ISO.
151.
1S2.
153.

ass!
156.
1*7.
155.
159.
160.
161 .
162.
163.
1^4.
lf.5.
1 60.
167.
168.
169.
170.
a> 171.
00 172.
173.
17U.
175.
176.
177.
178.
179.
1 ?. 0 .
1 ?1 .
1 ?2.
•183.
1 S4 .
165.
1 "6.
1P7.
1*8.
189.
190.
1 9 I .
1°2.
193.
10-4.
195.
«; FORMAyf. I?. 1 X, 13A«» 1X.3E6.0.2X.212. / U ( 12 . 1 X . 12. 1 X) )
u--MTE(fc'<>'^)10»CNA«ECI»J)»J=l»iS)»QUCl) »KBOO( I)»OOSAT(I)»IONESOCI)
1 , NpIP,(NPPAftSf,JfI),NMNTHS(JfI).J=l»NPIP)
95o FOPMiTf ' ' .12, 2x,13A4fix,F12.3. lX,Fb.2i2Xf F6.2.6X» 11 »5X» I2.5X'i
1 4(12,',' ,12, IX))
NO0 IPS f I ) =NP JP
IFflC.NE.I) GO TO 205
20 CO^Tl^'UE.
C
C RCAD FLO'* CARL) FOR ALL SOURCES AND CONVERT FLOWS IF NECESSARY
C
DO 75 I = i«MJSi)KS
"•1 R I T f. ( 6 • 9 5 1 3
9Si FOPMAT C ' 1 ' )
Jl = MfjpTpS( I)
DO US J=l • Jl
'V(*lTr(6»955)
955 FOCKATt '0 ' . lp!pE FLOW AND SELF-MONITORING CONSTITUENT DATA'f/i l»
1 "(SOURCE) (PIPE)'t/1 I «3X» ' ID1 .4X. IPIPNO IQS QSUNIT I,
2 ' MNTHQS.QSMEAN-.FOR ALL MONTHS')
MUrM^NlTHSCj. I)
9tAp(s.2S) Ip«PlPNO,IQS.OSU'v'lT(J)«fMNTHQS(J.K),QSMEAN(J,K),K = l,S)
2S FOcMAT(I?«2x«3I2»5(yx,I2»2X»Efc.O)3
IF(NM.GT^>) R£AD(5,32) (MN^HOsCJiK) »3Si*F.AN(J,K) »K = 6.NM)
32 FOPMAT(10X.4Xrl2t2x.E6.0t4X(I2l2X,E6.0,'I2f2XtEb.C
* . JX.I2.2X.E6.0)
00014600
00014900
00015000


00015300
00015400
00015500
00015600
00015700
00015800
00015900
00016000
00016100
00016200
00016300
00016400
00016500
00016600
00016700
00016600
00016900
00017000
00017100

00017300
WRITE C6»9«)OnO»PIP NO, IQS'OSUN IT CJ)tCMNTHQs(J»K),QSMEAN(J»K),K31,NM 00017400
1 )
960 FOP^ATC ' «2I6f4x, 213, 6X,6(T30t 4(12, i , I ,Fio.3.1Xi '/") i/1' •))
Ir CTO.Nfc .I.UR.PJPNO.NE.J) GO TO 220
IFf IOs.NF.99) GO TO 210
CNvRTsl .
IF(GSL'NIT(J).EQ.8) GO TO 381
IF(oS|iNlT(-J).NE.3) W»ITE(6,380) I , J » QS|jN 1 T C J 1
33n FOOMATC '0 ' . !QS ERROR--SOURCE '.I2,i PIPE l»I2t' UNITS ARE 1,12.1
* RATHE1? T»*N 3 (MGO) OR 8 ( ML/CAY) --PROGRAM ASSUMES MGD")
00 3*00 KS ) , NM
3800 QSWEAMCJ»'<)=3.785306*QSMEAN(J,K)
c ESTIMATE & SIMPLE MONTHLY PLOW FOR SOURCE/PIPE
i&l aS(J,I)=QSMEAN(J,l)
IFf.QS(.JiT) .LE.O) OS(J,I)=EFFLOW(J,I)
00 332 Ks2.NM
IFf r,SrF.A.s.'(J,K) .LE.O.) GO TO 382
OSfJ.I)s(l-ALPHA)*QSMEAN(J,K)+ALPHA*QS(JtI)
332 CONTINUE
C
C SEAD CONSTITUENT DATA FOR ALL SOURCES
C
00017500

0001770C
00017800
00017900
00016000
00018100
00018200
00018300
00018400
000185QO
00018600
00018700
00018800
00018900
00019000
00019100
00019200
00019300
00019400
00019500

-------
                                           M  4  I  N  C  1  )
199.
200.
201.
2m.
203.
20".
2C-7.
210.
211.
2t2.
213.
21«.
2)5.
2li.
217.
2l&.
2]9.
2?0.
2?i.
2?U.
225.
226.
2?8.
2?9.
230.
23«.
23h.
237.
238.
2U1.
2'J2.
2fl3.
             9fc5
(6.9E40C5,390)(SMAXCJ»K«L)«SMEAN(J»K»L)»NSIZECJiKiL)fl=6»00020500
                                                                                     00020600
                                                                                     00020700
                                                                                     ooo2oeoo
                                                                                     00020900
                                                                                     00021000
  lOX.2E6.Oi !2i2E6.0t I2.2£6.0iI2f 2t6.0, I2t 2E6.0t 12)
                      AT c
                 wHlTt(b.970)IO.PTP'JO.lPARMCJ.K.l5tP«UNlT(J»K)t(SMAX(JtKfL)»
                 1             SMEANCJ,K,L) tNSIZtC J.K.L) .L=1|NM)
             97o FORM4!*'  ' «2Io.SX. !«.4X.I2t3Xf6(T30f «(P10.2i t i I ,F10,2i ' t I f 12?
                 1       /'  ' ) )
                 TF(iD.Nt.I.OR.PjPNo.NE.J)  GO TO 230
           C FIND LIST OF  DISTI\CT  CONSTITUENTS FOR SOURCE I
                 KISMPPAKSC 1 « I)
                 DO
             363
                  iFt
                             , I) .NE.22)  GO  TO  383
                             «i , I) .NE.23) GO TO 2«0
                           I )=
                 IF(jl.F(5.1J GO  TO  386
                 00 58^ J=2,J1
                 KIs.sjPpiftsC J. I)
                 C>0 ^B"? Ksl.M
                  Po  in«  LslrNO
             33a  TFf jPaP'U J,K, n .EQ.INDpAR(L. I) )  GO TO 385
                  NJ 0 = N; 0 4- 1
                  MO?4cSf I) ="'.0
                  TNOPAxf '-'fit I) = IPA«?M(J.Kt I)
                  IF( r^D^ARC^U, J) .tvE.23)  GO  TO  385
                  IFf TMo°APt^O-l, n .NE.23)  GO TO 240
                         ^n-l • I)=22
                          O. I)=23
             535  COMTlfjlIt"
                    COMsTlluENT
                                         STANDARDS
             33*, W

                1
                                                              00021300
                                                              0002UOO
                                                              00021SOO
                                                              00021600
                                                              00021700
                                                              00021800
                                                              00021900
                                                              00022000
                                                              00022100
                                                              00022200
                                                              00022300
                                                              00022^00
                                                              00022500
                                                              00022600
                                                              00022700
                                                              00022800
                                                              00022900
                                                              00023000
                                                              00023100
                                                              00023200
                                                              00023300
                                                              00023400
                                                              00023500
                                                              00023600
                                                              00023700
                                                              00023800
                                                              00023VOO
                                                              0002«000
                                                              0002«100
                                                              0002«200
                             t 3X. iPIPNO" • '
                                                   rXI  l»3Xf
                     EFFLOW" .SXi ' IPfXlt IUNIT,M.-FOR ALL CONS I 0002«500

-------
                                               M A I N C 1 )                           DATE  021876         PACE

    206.             I        »'TITt'E^TS  OF  PIPEI)                                        00024600
    2u7.             00  72  J=1»J1
                     NPSNPP4.95(J»I)                                                     00024800
                     pf.*OC5.50)  IO.PlPNofEFFLOHCJfl).CIPrS.Sn CIPCK) tXl CK) .IUMT(K) rM(K) tK = 6tNP)          00025100
    252.           Si FQRMATC12X.l2.Eb.0.lx»2M.lX»12*E6.0tlXf211?lX»I2»E6.0tlXi2Il»lXt 00025200
    253.             *       I2,tfc.0.1X.2Il.lX,l2.E6.0,lX,2Il)
    254.             WRITE(6.995)ID»PJPNO•tFFUOWCJiI)»ClPCK)iXlCK)fIUNITCK).MCK)»K=l,NP00025400
    255.             1)                                                                  00025500
    256.          985 FORM^TC.'  ' «2I6. 1X.F12.2, 10CT29,12, ' » ' »F12.3» ' t ' ill» ' » I i12,/ I  D)
    257.             IFflO.Ne.I.GS.PIPNO.NE.J)  GO TO  250                                00025600
    255.        c  HATCH i/p  STANDARDS  *ITH PIPE  CONSTITUENTS                              00025900
    259.             iNSsO                                                              00026000
    260.             00  5^00  Ilsl.NUSORS                                                00026100
    2M.             IF {IMSCRSCI1) .NE.I) GO  TO  5300                                    00026200
    262.             iNSsl                                                              00026300
                     GO  TO  53pl                                                         00026400
                5300 rnWTlwl t                                                           00026500
    265.             GO  TO  72
    266.        5301 DO  70  K=}.^P                                                       00026700
    267.             ICHNHrO                                                            00026800
    266.             00  55  Lsl?*?                                                       00026900
f°   2fe9.             IFCIP(L) ,NE.IPARM(J,K,I))  60 TO  55                                00027000
O   270.             ICHMGsl                                                            00027100
    271.             C N V R T =i ,                                                           00027200
    272.             IF{TP(Ll.NE.23.ANO.IP(L).KiE.22.ANO,lP(L).NE.23.ANO.IP(L,) ,NE. 1 0 . AND000273CO
    273.             *    .IPCU.Nt.ll) GO TO  5302-                                       00027400
    27«.             IFripCL).E0.28.ANO.IUNlTCU.NE.5)  GO TO  260                       00027500
    275.             If t ( IPCI.I .EU.22.0R.IPCU .EQ.23) . AND. IUNIT (L) .NE.6) GO TO 260       OOC27bOO
    276.             IFffIPCL).Etf.10.0R.IP(U.EO.ll).ANO.IuNlTCU.NE.7) GO TO 260       00027700
    277.             GO  TO  54                                                           00027800
    273.        530? TFCIiJ.MIT(U) .EQ.9)  GO  TO 54                                        00027900
    279.             IF(lUNlTrU) .NE.«)  GO  TO 530                                        00028000
    280.             CMV3T=.a53592                                                      00028100
    281.             GO  TO  5«                                                           00028200
    282.          530 IFCIUMIT(U).NE.2)  GO  TO 531                                        00028300
    283.             CNVRTsEFFuOMfJtI)*.001                                             00026400
    284.             GO  TO  54                                                           00028500
    285.          531 IFCIUMIT(U).NE.I)  GO  TO 260                                        00028600
    266.             CNVkT=fFFLC«CJ»I)                                                  00026700
    267.           $u FFSTCJ,K,I)=X1CL)*CNVRT                                           00028800
    2"«i             OISTYPCJ.i
-------
                             M A I N  C 1 )
72
DATE 021876
 00029SOO
 00029600
                   PAGE
   00 S303 Ilsl.NUSOSS
   TFC t*SO*sni).NE.I) GO TO 5303
   U'Ssl
300.
301.
302.
in3.
30( J ,K, I )
TFf jP9.',T.i .OH.lPR.EO.a.OR.IPR.EQ.6.0R.IPR.GT,30)
IPflP9.fr. 30) Go TO 721
It- '(P9gMT( J«k ) .NE. 1) GO TO 290
GO Tl 7500
I(-(I?'^,Mt:.2c!,ANJo.lPR..%E.22.A'S|O.IPR.'vE.23.ANO.IPR.I
* It) GO TO 725
IFf jiap.co.Sa.AND.PRUNlTCJfK) .NE.5) GO TO 290
lF((I»9.E0.22.0R.lPR.E.Q.23).AND.PRUNIT(JfK).NE,6)


TFfpRUs'lT(J.K) .tO. 9) GO TO 7300
If f P0ij"« IT( J iK) .EO.U) GO TO 726
U'f p«jMIT( Jf-<) .NE.2) GO TO 72fc
CMV«T=..JOI
GO TO 726
IFcP^jNlTCJ.Kj.NE.l) GO TO 29Q
CMU^TS i .
DO 7?7 Lrl.NM
75M=C.Sv'i4^fJ»L)


S"iFlf;(J.KfL) = S^EAN(JiKiL)*CNvRT*OSM
CONTl'i'Jc
C-G TO 7^00
00 7?Q u a 1 . li M
5'.'AxfJi-
-------
 3«5.
 3«6.
 346.
 5u9.
 3SO.
'3S1.
 352.
 353.
 354.
 3S5.
 357.
 358.
 3 = 9.
 3feO.
 361.
 362.
 363.
 364.
 365,
 366.
 367.
 368.
 369.
 J7Q.
 571.
 372.
 373.
 37«.
 375.
 37fc.
 377.
 373.
 379.
 3*0.
 361.
 382.
 303.
 3B«.
 3«5.
 3«6.
 337.
 3«6.
 3*9.
 300.
 331.
C Rt*D JM cnwPLlAMCE MONITORING DAJA
c FOR SOURCES R&ING USED CINSORS)
C
                                A  i  N (  i  )                           DATE 021876
                                                                       00033800
                                                                       00033900
                                                                       00034000
                                                                       00034100
                                                                       00034200
990 F03-&T('0't"COMPLIANCE MONITORING DATA't/t  Ifi(SOURCE)   (PIPE)   »?00034300
   1       /' i,3vt'IQI,8Xt'Jif4X»IIPAR NUM   X1CK)«M(K)--FOR K=l  TO  'f00034400
   2       iNi.iM CM POINTS')                                             00034500
    DO 120  il=l»MUSoRS                                                 00034600
    TsTNSOSSCU)                                                        00034700
    00 96 Njijlsl «SO                                                    00034800
    REAOC5.79)  10. J.IPAR.NUM, (XKK) .M(K) ,K=li7)                        00034900
 79 FORKAT(I3«2X.II.IX.I?,2x»I2.IX•7Cfc.6 .0112.IX))                      00035000
    IFcin.Mt.I) GO TO 295                                              00035100
    IFfJ.EQ.O)  GO TO 100                                               00035200
    IF(MU«.GT,7)  REAO(5,800)(X1(K).M(K)tK;8»NUM)                       00035300
800 ropMATn3X.E6.0,l2,lxrE6.C.I2flX.E6>Otl2flXfE6*OtI2flXtE6.0tI2»lXt00035400
                                                                       00035500
                                                                       0003S600
                                                                       00035700
                                                                       00035800
                                                                       00035900
    CO 90 K=1.Kl                                                        00036000
                                                                                                      PAGE
     *E6.0.I2.lX.E6.0,:2,lX)
      WRlTE(6.99S)IOtJ,IPARf
  995 FQP"AT<'  'tI5»bx.I3»«Xtl3,3X.12.50(/' !iT«0i5(Pi2.31 I i I 112)))























C
c
c
IK( IpA".N£.lPARM(J,K»n) GO TO 90
ICHvG=l
00 95 L=1 .MUM
Z(JiK.L)=Xl CD
W!^THS2(J.K'D=MCD
85 CONyTNUE
NOCPTSf J,K)=Nu^
GO TO 9o
?0 CONTINUE
Iff ifHMG.EO.O) GO TO 297
96 COMTIMUE
100 Jls.^jOPIPSC I )
R£AD(ltM(f)SME*NCJ,t<)tHNTriOS(J,K),J=l,Jl),K=l,2«).CCCSMAXCJtK,L).
* s-JfANtJ«K.L3.MS!ZE(J»K.L).J=l»jn.K=1.10).L=l«24)
CALL TSlATfNiOPIPSCl)»NPPARSCl»I)fNMHTHS(lrI)tDISTYP(rfl?I)tQU(I)t
* lONEsD(I))
11^ CALL PNVCOM[NOPlPStI) .NPPARSd ,1) .NOPARS(l) ,1PARM( 1, 1,1) .
* TNDpAhrl.n .OISTvPtJ.lf I)iEFST(lil?I)iQUCI)»PNVCIl)t ICOR(I))
117 IF(IEXPO.EO.O) GO TO 118
EXD0"CI 1) = 1 •
GO TO 1 1«0
IIP CALL t:xPOAM(iN,DPARtl.I)fKBOO{I)fDOSAT(I),EX?OM(Il)tNOPARS(I)i
* IPA8M.NQPIP5. I)

LOADING FnK SPECIAL OUTPUT

00036100
00036200
00036300
00036400
00036SOO
00036600
00036700
00036800
00036900
00037000
00037100
00037200
00057300
00037*400
00037500
00037600
00037700
00037800
00037900
00038000
00038100
00038200
00038300
00038400
00038500
00036600

-------
NJ
--J
M A r N C 1 ) DATE 021876
3«o.
39S.
396.
397.
308.
399.
400.
401 .
40?.
unj.
000.
005.
006.
007.
408.
"09.
1180 IF(WOuT
Iu,( hsl
WSRcC?)
WS»CC3)
UPFi>' = 0
NPTS^rN
DO 1 1*
wE*Of 1 •
ITF-'P1 =
J«ff.'f 2-
DO 119
I*E*r>T(
wENnTA f
iwEf.;Or(
VfENOTA C
ViENDTAC
,wE..O) GO TO 120

= PXP!)M(Ii)
=pNv(in
ij ( I )
opipscn
J=l ,NPTSw
Ji=nscj« i)
N?pi;-K(j,n
JISITC^PI
K=l »ITEMP1
1 , J.K) = IPARM( J, K, I)
2. JiMsEFSTdJtKfl)
3,J.K)=DlSTvp(J.K,l5
O.Jf K) = ISTATS(I»J'K, 1)
5,J,K)rsQRTf IST*TSCI«J«K,2))
410. 11 "5 CONTINUE
Oil.
412.
013.
010.
4t.5.
WRITEf 1
120 CONTlMM
CALL PR
iF(.%iOuT
RE wj MO
2) DUMMY
K
10RT(IPARM,MPPARS)
.NE.Ol GO TO 150
12
tj6. CALL OUTOUTCNUSQRS)
"17.
013.
419.
J?0 .
421 .
022.
«?3.
U?4 .
0?5.
o?b.
"27.
026.
429.
030.
031.
«?2«
053.
b\ii.
4Ti5.
OJ6.
4?7.
038.
039.
U40.
«ai.
4
-------
4U3.         ?3o WRITF(6,?3U ID,PIPNO,I,J                                          00043600
uuii.         231 PORwATCO' ,10C'«" ), 'SEQUENCING OR SPECIFICATIONS ERROR—If/I  1,15X00043700
UU5,            1       , iSt'LF-MONlTORlNG CONSTITUENT DATA CARD READ  AS  SOURCE I » 13 , 0 0043800
tiuo.            2       'PlPE'fI3»l WHEN IT SHOULD HAVE BEEN SOURCE'»I3»'  PIPE I 113)00043900
HUT'.             wPiTF.c6.p990)                                                      00044000
iius.             STOP                                                               ooouaioo
Jii9.         2JO b,-RITEC6.;>4t) ItJ                                                   00044200
4SO.         2'J1 FQRMATC'0', 10('*') ,'SOUKC£i,I3, ' ,PIPE',I3,'—PH MUST  BE INPUTTED ' f 0004U300
451.            1       'WITH PH MAX  (23) PRECEDING PH MIN  (22)')                    00044400
452.             STOP                                                               00044500
9.          ?70  W«ITEc6»?7l)  I,J, IPAHMf JtK.I)                                      00046200
 "7o.          ?7i  FORHATC'o1loti*'>.ISOURCEI,is,i  pjp£.iti3,i  CONSTITUENT'fi3ii sTANiooo«63oo
 "71.             1        ,'DARD NOT  ENTEHEDl)                                        00046400
 u7^.              STOP                                                               OOOU6500
 "73.          2Sft  wRITE(b,?3n  I.J.IPR                                               OOOU6600
 U7U.          281  F-OP^ATCO'.IOC'*') , iSOURCEi ,I3t ' PIPE",13,'  CONSTITUENT SPECIFIED ' OOOU6700
 U75.             1        'ASI,I3,i—RECHfc'CK  LIST  OF ALLOWABLE  CONST ITUENTS I }        00046800
 ^76.              STOP                                                               00046900
 "77.          2«0 WR!TE(6,29t)  ItJ.IPR                                               OOOU7000
 "78.          29i FORMATC'o1.IOC'*').'SOURCEi,13,• PIPE',13,"  CONSTITUENTi,13,'  SELI00047100
 U7
-------
    095.
    095.
    096.
    097.
      1
      2
      3
      0
                      STOP
                      END
'0'.'CHECK CARDS TO BE SURE THAT* DSOURCE AND PIPE NUMBER'00008600
,iS ARE AS INTENDED"f''  'i20X«•2)CAROS ARE IN PROPER StQUEI 00006700
 lNCfci,/i  I.20X,I3)NU«8ER  OF MONTHS OF DATAt NUMBER OF PIPI00008800
'. lESiETC.  AND OTHER DATA ARE CORRECTI,/' 't22Xi'FOR SOURCE' 00008900
tl3?'  AND  PRECEDING SOURCES                               00009000
                                                           00009100
                                                           00049200
—I
Ln
      0.
      7.
      8.
      9.
     10.
     11.
     12.
     13.
     1 0.
     15.
     16.
     17.
     18.
                     SUBROUTINE  ABEFCD1,1)2'
                                      A B E F
                                         BETA»E»F»U
C COMPUTE COtFMCIENTS ALPHA,BET A.E.F F0R PH INTEGRALS
      cjMHn"aBKPTS/S(fc),5SPhCll)

      L=l
      ALptJi = (Hi -B) /A
      BtTA= CD2-")/4
      DSS=SSPH(KD+1)-SSPH(KO}
      F-pSS»(B.Dl)/OD+S5PH(KD)
      ys.OOOOOOl
      I'F(4LPHA.LT.X)
       IFf ALpHA.GT.l.)  L=2
       IFCBETA.GT.l.)  BETA=1.
       RETURN
       END
                                                           DATE 021876

                                                          00000100
                                                          00000200
                                                          00000300
                                                          00000000
                                                          00000510
                                                          00000600
                                                          00000700
                                                          00000600
                                                          00000900
                                                          00001000
                                                          00001 100
                                                          00001200
                                                          00001300
                                                          ooooiooo
                                                          00001500
                                                          00001600
                                                          00001700
                                                           00001SOO
                                                                                                          PAGE

-------
 1.
 •2.
 3.
 4.
 5.
 6.
 7.
 8.
 9.
10.
1 U
52.
13.
14.
15.
16.
17.
IS.
19.
20.
21.
?2.
23.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
ilO.
01.
02.
«3.
44.
45.
Ufa.
47.
48.
                                    C 0 M E X 0

      FUMCTlON COMF.XDCTMU»TSIGt M.FUNCl-FUNC2»At8)

c CO^E*D CALCULATES EXPECTED DAMAGE FOR ANY NON-PH CONSTITUENT
      PEAL II.IMAO
      COMxO"J/0>iGl /DAMAGE (JO. fa)
C ID CONTAINS DISTRIBUTION SPEC IF 1CAT ION —0 IS NORMAL AND  1  IS
      COMMON/FLAGD/ID
      CO*MON/BRKPTS/S(6).SSPH(ll)
      CO*MON/BnODMG/TQS,QutCS»I BOD
c FIPST FIVE TEK*S Qf EXPECTED DAMAGE SUMMATION
      DO 10 KDsl.5
      E:OS*A/OD
              ' )-S(KD)
      IF CRETA.L&.0.) GO TO  10
      IF (ALPHA. GT.Ot) GO TO 7
        r IO.FO.O) GO TO 7
         EXO=C
      GO TO 10
   10 CONTINUE
L
c SI*TH TERM OF EXPECTED DAMAGE SUMMATION
                T.Oi) GO TO 12
      IFf lO.F.B.n  GO TO 15
   12 COuExO = CnMExO + F,jNC2CALPHA,'
      TFCIO.Ea.l) GO TO H
C COMPUTE DELTA FUNCTION FOR NORMAL CASE
C
      IFf.EQ.3) 1800=1
      CALL OAM4&0(DJB,M,6)
      TF(M,f0.3) CAUL DAMAGOCDJBtM,8)
   15 CC
   11 CALL
      R E TU R N
      END
          DATE 021876

         00000100
         00000200
         00000300
         00000400
         ooooosoo
UOGNORMAUOOOOOfaOO
         00000700
         oooooaoo
         00000900
         ooooiooo
         00001100
         00001200
         00001300
         00001400
         00001500
         0000)600
         00001700
         ooooiaoo
         00001900
         00002000
         00002100
         00002200
         00002300
         00002400
         00002500.
         00002600
         00002700
         00002600
         00002900
         D0003000
         00003100
         00003200
         00003300
         00003400
         00003SOO
         00003600
         00003700
         00003800
         00003900
         00004000
         00004100
         00004200
         00004300
         00004400
         00004500
         00004600
         00004700
         00004800
         00004900
                                                                                            PACE

-------
                                              0  A  M  A  G  0                           DATE 021876        PAGE

 1.             SUBROUTINE DAf"AGO(DJBiM,B3                                         00000100
 2.       C                                                                        00000200
 3]       C SUBROUTINE D4MAGt-ZERO DETERMINES DAMAGE FC« LEVEL  0  OF PARAMETER M   00000300
 Uf       C                                                                        00000400
 5*             CO^MON/DMtJl/OAMAGEfSO.b)                                           00000500
 6.             COM«.ON/BRKPTS/S(6),SSPH(113                                        00000600
 7.             CO""0"l/?ODOMG/TQS.r)U.CS.IBOD                                       00000700
 8.             IFCM.E^.33 GO TO 41                                                00000800
 9.             IFfB.GE.OAMAGEtMtt)) GO TO  15                                      00000900
10.             Djo=0.                                                             00001000
 1.             RETl'RN                                                             00001100
 2.          15 Do 20 *0rli5                                                       00001200
 3.             IF(04HAGE(M,KD3.LE.B.AND.8.LT.DAMAGE(M,KD*133  GO  TO 30            00001300
 «.          20 CONTINUE                                                           00001400
 5.             DJR = S(*>3                                                           00001500
16.             GO TO «0                                                           00001600
17.          30 DJp-(S(KDtl)-S{KD))*(B-DAMAGE(M,KD)3/(OAMACE(MtKD+l)-DAMA6E(MtKO))00001700
18.            »+5(KO)                                                             00001600
tq.          40 RETURN                                                             00001900
?Qt       c                                                                        00002000
21!       c BOD ROUTINE                                                            00002100
22.       C                                                                        00002200
?3*          M BBOD=8                                                             OOOQ2300
jy        C                                                                        00002UOO
?sl       C ISODrO  FOR n-LEvEL DAMAGE DETERMINATION                               00002500
30.       C     =1  FOR DELTA FACTION COEFFICIENT DETEKMINATION                   00002600
J7>       C                                                                        00002700
23^             IFCIROD.EQ.O) BBOD=B+T°S*C9..Cs3/(Qu+TQS3                          00002800
2<».             ISOD = 0                                                             00002900
30.             IFtR«cO.LE.OAMAGE(3,1)3 GO  TO 42                                  00003000
11.             DJPr.O.                                                             00003100
32.             RETURN                                                             00003200
33.          4? 00 a? KD=lt5                                                       00003300
3U.             ir(0*"4GP(3tK03.GE.B800.AND.8BOD.GT.DAMAGE(3iKD+l33 GO TO 430     00003UOO
•55.          43 CO^TIMJE                                                           00003SOO
36.             OJB=S(63                                                           00003600
37.             RETURN                                                             00003700
38.         430 DJ8=(S(KDtl)-S(KD))*CBBOD.DAMAGE(MfKD)3/(DAMAGE(M,KD+13-DAMAGE(M, 00003800
39.            *K033+SfKO)                                                         00003900
aO.             RETURN                                                             00004000
«1.             END                                                                00004100

-------
                                                0 I F F                             DATE  021876         PAGE

 1.             FUNCTION DIFFCX.Y)                                                 OOOOOiOO
 2.       C                                                                        OOOOOIOO
 i.       C Dlf-'F CALCULATES THE DIFFERENCE QF TWO STANDARD NORMAL DISTRIBUTION FUN00000300
 a.       C                                                                        00000^00
 5.             IF(y.GT.«..AND.y.CT.O.) GO TO 10                                   00000500
 6.             GO TO 2S                                                           00000600
 7.          10 niFF=4BStO^ORMtX)-DNORM(Y)5                                        00000700
 8.             RETURN                                                             ooooosoo
 t>.          2? DIFF = XNORM(X)-XNOKMCY)                                             00000900
10.             RETURN                                                             ooooiooo
11.             END                                                                ooooiioo

-------
E X P D A H
                                     D*TE 021676
PAGE
1.
2.
3.
«.
5.
6.
7.
8.
9.
10.
1 1.
12.
13.
1«.
15.
16.
17.
13.
t Q
I ^ .
20.
21'.
22.
?3.
24.
?5.
?fa.
27.
26.
29.
30.
31.
32.
33.
34.
35.
36.
37.
33.
39.
40.
41.
42.
11 1
u J •
44.
45.
46.
47.
48.
49.

C
C
C



















c
c
c
c



c
c
c





c
c
c



c
c
c
SUBPOIJTIME EXPDAM(IPARAM.«BOD.DOSAT»EXP

EXPDAM pt'rERMlNts EXPECTED DAMAGE FOR A SOU

OIKENsIOM lPARAM(NOpARS)tEXPD(10),IPARM
COw.MON/O^Gl/DAMAGt(30t6)
COuvOM/D'«U2/DNG(2t 11 )
COMMON/PL AGD/IO
CO"MON/8PKPTS/S(6),SSPH(H)
COMMOM/BnODMr./TOSiOUtCS,I60D
COMMON/PMVEXP/DIST(lO)iTMU(iO)iTSI6(10)
CO--"Mn,N/PcOPT/lCOPT
COMMOM/EyP/NPPARS(4,303
I^CL'JOf PltLIST
INTEREP oIST
RE*L KROD
RE^L !>•'• JUt JLl^FRr ININFB
ExTF«K*L IMtlLiILlNFBilNlNFB
F j D rt M u f
tXPDM-0 .
DO 100 M-l.NQPARS
ID=nIST(M)
IF f JPAPAM(M) .EQ.30) GO TO 100
IFnPAfiAy(M) .E0.23) GO TO 100
Iff rPAEAM(H) .NE.22) GO TO 10

EXPECTFo OAMAGE FOR PH
DARAM p p s P H
PAPAM ?J=PGH
EyPD(M)=PMExD(TMU(M)fTSIGCM),TOS,QU) .
GO TO 60
10 IF(lpA"AM(Hj .ME. 28) GO TO 20

TEMpERATUfiE

AsnS/CGU + TQS)
P=0.
IP^r?6
GO T° ?5
20 IFt lPARAw(Mj .NE..3) GO TO 30

300
4 ixQ/^n///"!ll^TnC\
z-KrfOIJ/fvJU+TQo)
B=(i./(JU + TQS))*fCS*TQStOOSAT*OL1)
IP^ = 3
GO TO 55

NON-COi.iplED CONSTITUENT

                                    00000100
                                    00000200
                                    00000300
                                    OOOOOUOO
                                    OOOOObOO
                                    OU000600
                                    00000700
                                    00000600
                                    00000900
                                    00001 000
                                    00001100
                                    00001200
                                    00001300
                                    ooooiaoo
                                    00001500
                                    0000 1600
                                    00001700
                                    00001800
                                    00001900
                                    00002000
                                    00002100
                                    00002200
                                    00002300
                                    00002«00
                                    00002500
                                    00002600
                                    00002700
                                    00002800
                                    00002900
                                    00003000
                                    00003100
                                    00003200
                                    0000X300
                                    00003400
                                    00003500
                                    00003600
                                    00003700
                                    00003800
                                    00003900
                                    00004000
                                    ooooaioo
                                    00004200
                                    0000^300
                                    00004&00
                                    00004500
                                    0000^700
                                    00004600
                                    00004900

-------
N3
00
O
50.
51.
52.
53.
sa.
55,
56.
57.
58.
59.
60.
61.
63.
63.
64.
65.
66.
67.
66.
69.
70.
71.
72.
73.
70.
75.
                  30 4=i ./(CU+TGS)
                                           E X P D A M
                     IFftPH.EO.10.OR.IPM.EO.il)  AsA«TQS
                     CGPT=DAMAGECIPM, ICOPT)
                     IFf JCOPT.EQ.i. AND. COPT. GT.O.)  COPTsO.
                     B=COPT*OU*A
                  55 IFfJO.EO.l) GO  TO 56
                                                                            DATE 021676
                                                                               PAGE
                     GO TO 60
                  56
               C  Stt  OP  sPfcClAL OUTPUT
                  60
00 bl J=1 »NP
NPP-MPPA»S( J, I)
00 65 Klrl.NPP
!FfiPARM(J.Kt,I).NE.IPARAMCM)) GO TO 65
                     IF(iPARAM(HJ.EQ,a2)  WENOT A ( 6. J,KL1) = 10000000.
                     IFtlCHVG.GT.l)  «ENDTA(6iJ,Kl)slOOOOOOO.
                  65  CONTINUE
                     !F(FXPO(M).GT.EXPDM)
                 100  CONTINUE
                     END
00005000
00005100
00005200
00005300
GOOOS400
00005500
OOOOSoOO
00005700
00005600
00005900
00006000
00006100
00006200
00006300
00006400
00006500
00006600
00006700
00006800
00006900
00007000
00007100
00007200
00007300
00007400
00007SOO

-------
NJ
00
 1.
 a.
 3.
 a.
 5 .
 6.
 7.
 8.
 9.
10.
11.
12.
13.
                          I  I  I  N  F  B

FUNCTION lLINFB(ALPHAiHU»SIGMA)
               c CO«PUTTKG iLro«s(6) .ALPHA, INFINITY»MU»SIGMA)
               c
                     a E A L M "J
                     ALPMA]=CALOGlO( ALPHA) -MU5/SIGMA
                     IF (ALPHit .GT.«.)  GO 'TO 20
                     ILTNFB=S(6)*(1.-XNORM(ALPHA1))
                  20 ILIMFB=S(6)*DNORM(ALPHA1)
                     RETI.IRN
                     END
 DATE 021876

00000100
oooooaoo
00000300
00000000
ooooosoo
00000600
00000700
00000800
00000900
00001000
00001 100
00001200
00001300
                                                                                                             PAGE

-------
oo
1 .
2.
3
*•
4.
5.
6.
7.
                                                   I  L  I  N  F  A

                    REAL FUNCTION  iLiNrA(BETA,MUf3iGMA)

                 C1UCULATING lL(Oilt-lN!FlNlTYiB£TA.MU»SlGMA)
                    END
 DATE 021676

00000100
00000200
00000300
OOOOOilOO
00000500
00000600
00000700
                                                                                                      PAGE

-------
                                                   I  L  I  N  A  0
                                                                                    DATE  021876
                                                  PAGE
N3
CD
LJ
 1.
 2.
 3.
 u.
 5.
 6.
 7.
 8.
 9.
10.
11.
                    REAL ^UNCTION  ILINAO  c *i
         Mfi tl. f A, b,0, BETA, Mg, SIGMA)
      RCiL MU
      8tTAl=(4LOGlO (BETA). MU) /SIGMA
C USING LNf 10)=2.ioaS851
      BETA 3 = BE TAJ. SIGH A*2. 3025651
      lL!NAo=A*EXP(CSIGMA*2. 3025851)**?.
     *B*XNOP'<(8ETA1)
                             oooooioo
                             00000200
                             00000300
                             OOOOOUOO
                             00000500
                             00000600
                             00000700
+2. 3025851*MU)*XNORM(BETA2)+ 00000800
                             00000900
                             ooooiooo
                             00001100

-------
                                                       I L                              DATE  021876         PAG£

      1.              R£*L Fl'MCTlON JL(A,BiALPHA.aETA,MU,SIGMA)                          00000100
      2.        c                                                                         00000200
      3.        C  CQ'SIGMA                                    OOOOOsoo
      7.              PET*TsCALdGlOCtETAj-MlO/SIGMA                                      00000700
      8.        C  USING  |.N( ] 0)r2.3025851                                                  00000800
      9.              ALPH42=ALPHAj.siG^A*2.3025851                                      00000900
K>    10.              BETA2 = Bt'T.Al-SIGMA»?.3025851                                        00001000
3°    11.              IL=»»EXPC(SIGK,A»2.3025851)**2./2.+2.3025851*MU)*DIFF(BETA2.AUPHA2)00001100
     i?.             **e*oiFF(RETAi.ALPHAD                                               00001200
     13.              RETIJ'N                                                              00001300
     1".        C                                                                         OOOOlUOO
     15.        C  ILCOiSffa).ALP^A. 1,MU,SIGMA)                                             00001500
     16.              EMTpY RlLCTl(ALPHA,MU»SlGMA)                                        OOOOlbOO
     17.              ALPHAjs(ALOGlO(ALPHA)-Mu)/SIGMA                                    00001700
     18.              3ET4l=-MU/SIGMA                                                     00001800
     19.              IL=S(6)*OIFF(BETA1,ALPHA1)                                          00001900
     20.              RETURN                                                              00002000
     2t.              END                                                                 00002100

-------
00
1.
a.
3.
a.
5.
6.
7.
                                     1 N  I  N  F  A

           FUNCTION lNlNFA(8ETA,MUiSIGMA)
C CALCULATING IN C 0 , 1 i . INF INIT Y » Bt'J A »
      REAL MU
      RF.TURM
      END
 DATE 021676

OOOOOiOO
00000200
00000300
00000400
00000500
00000600
00000700
                                                                                                           PAGE

-------
                                                        I  N
                                                                                    DATE  031876
                                                                                                             PAGE
CO
 1.
 a.
 3.
 a.
 5.
 6.
 7.
 6.
 9.
10.
tl.
12.
13.
14.
15.
16.
17.
                     JO.B.£0.1.) CO  TO  10                                   00000700
C USING Fls3.1fll5«>27                                                     00000800
C  AKD i./SQRT(2*PI) =  .59e9«22                                          00000900
      INrA*SlKMA*,3989«22*ffc-xPC»(ALPHAN**2.)/2.)-£XP(-(B£TAN**2.>/2.»+ 0000 I 000
     *(MU*AtB)*L>IFF(BETAN|ALPHAN>                                        00001100
      RETU°N                                                             00001200
C                                                                        00001300
C IN(0,l.Al.pHA,bETAtMU'SlGMA)                                            00001400
   10 INsOIFF(BETANt ALPMAN)                                              00001500
      RETURN                                                             00001600
      END                                                                00.001700

-------
ro
CO
1.
2.
3.
u.
5.
6.
7.
8.
ej
*» •
10.
11.
12-
13.

C
C
c

c






                                                   I  N I  N F B

                     REAL  FUNCTION  ININFBCALPHA»MU»SIGMAJ

                                    ,AUPHA, INFINITY. H
REAL MU
ALDHAN=
IF C ALPHAS. G7 .«. ) GO TO 20
                  20  INlNjFB = Sf 6)*CNORM(ALPHAN)
                     RETURN
                     END
 DATE OH1876

00000100
00000200
00000300
00000«00
00000500
00000600
00000700
oooooeoo
00000900
00001000
00001100
00001200
00001300
00001400
                                                                                                            PAGE

-------
                                                    I  3  T  A  T                            DATE 021876        PAGE

      *•              SUBROUTINE  ISTATCNoPIPSfNPPARStNMNTHStDlSTfQUtIONESO)              00000100
      2.       C                                                                        00000200
      3.       c s'iBsouTiME  ISTAT  COMPUTES  THE  INITIAL STATISTICAL DESCRIPTION GIVEN INOOOOOSOO
      4.       C   DATA  FROM  4 SINGLE  SOURCE                                            00000400
      5.       C                                                                        00000500
     .6.              REAL NU(4,10t22.            *    GAMMAtKETA.KNUtENUiIPARMUi10fJO)tISTATSC30»4»10»4)             00001200
     13.              CO^'MON/lsTP'l.       C                                                                        00002600
    27.       C                                                                        00002700
    28.              IF(lONF.s".NE.i.oR.(IPARM(L,Jf I).NE.22.AND,IPARM(L»J»I),NE,23))  GO 00002600
    29.            V    TO 100                                                          00002900
    30.       C CHECK PH DATA WHERE ONLY MAx/MIN  ARE  GIVEN                             00003000
    31.              IFnPA«H(L.J,I).EQ.22) G0  T0  H13                                  00003100
    32.             00  90 K=t»NM                                                       00003200
    33.              IFfNSIZEtL.J.K).GT.O.AND.SMAX(LiJ»K).GT.O.)  GO TO  90               00003300
    34.             NS!ZECL..7f K) = 0                                                     00003400
    35.             SMAxfL»Jt*)S0.                                                     00003500
    36.             NslzECL»J+l»K)*o                                                   00003600
    37.             PMAX CL.' J*l tK)sO.                                                   00003700
    3?.          90 CONTINUE                                                           00003800
    39.             no  9^. «=iiNM                                                       00003900
    40.             NSl7E(L.J*l»K)=NSIzE(L»J»K)                                        00004000
    41.             IF(NSJZEfLtJ+l.K).GT.O.AND.SMAx(L»J-HtK).GT.O.)  GO  TO  98           00004100
    42.             NSIZc(L•J+1»K)*0                                                   00004200
    43.             SM*XCL'J+l»Kl=0.                                                   00004300
    44.             MSI7E(L»J»K)=0                                                     00004400
    45.             SHAx(L•JtK)=0.                                                     00004500
    46.          9fl TF(gMAX(Lf J^lfK) .LE.S,^AX(Lt JtK))GO  TO 99                           0000<»600
    47.             WRITE (61101) MN-rHQstL t *) »Lf I                                       00004700
    "8.         101  FCRMATt>0't'MIN.MAX ERROR FOR *ONTHI.I3»'  OF  PlPEitlS.i  OF  SOURCE 100004800

-------
                                                T  Q  T  A  T                                                •».*•*-
                                                1  "  '  A  '                             DATE  O2itj7t>        PAGE
a9-             1        »l3t/'  '.'CONSTITUENT 22 MINIMUM  IS  GREATER THAN CONSTITUEI 0000^900
50.             2        .'NT  23 MAXIMUM--DATA DELETED')                             oooosooo
51.             NST?S(LtJ+liK)=o                                                   00005100
52.             SMAy(LFJ+ltK)=0.                                                   00005200
53.             NSTzE(L«JfK)=o                                                     00005300
5«.             S M A X ( I. • o F * ) = 0 .                                                     00005UOO
55.          99 CONTINUE                                                            00005500
56'             G0 TO  1113                                                          00005600
57.       C CHECK F03  REGULAR  CONSTITUENTS (INCLUDING PH WITH  MEAN)                00005700
59.         100 DO 1M2  K=IFK'M                                                     00005800
59.             IFfN,SlztrL.J.K).GT.O.AND.SMEAN(L,J,K).GT.O..AND.SMAXCL»JiK).GT.O.)00005900
60.             *  GO  TO  1110                                                       00006000
61.             N5TzE{Li..'fK)50                                                     00006100
62.             SM*xfL•Jt^)=0.                                    "                 00006200
63.             S •• F A M (L t.! F K ) = 0.                                                    00006100
63.         1110 !K((TPA^M(LFj|I).NE.22.ANO.SMAv;(L.J.K).GE,SMEAN(L.JFK)).OR.(lHARM(00006i400
65.             *l ..J, I) .tn.22.AND.SMAX(Lf J»K) ,LE ,S;-1EAN(L« J»K) ))  GO TO 1112         00006500
66.             WHTTF. (6t t Hi)  MNTHQSCL.K) tLf lf IPARMCL, Jf I)                         00006600
67.         1111 FC»MAT('0'•"MAX.MEAN OR MIN-MtAN REVERSED  FOR  MONTH"tI3.l OF PIPE I 00006700
68.             *        tT3.' OF SOURCE'113.'t CON$TITUENT'»13•'"»OATA DELETED')   00006600
69.             VSTZECL».I«K)sO                                                     00006900
70.             S'xAv(L'J«K)=0.                                                     00007000
71.             5" FA*(U«JfK) = 0.                                                    00007100
72.         1112 CONTINUE                                                            00007200
73.         1113 Klrfl                                                                00007300
74.             ]"MTH=0                                                             00007000
75.             DC 1=1  Ksi.l^M                                                       00007^00
7b.             IFtKJ.GE.K)  GO TO 15                                               00007600
77.             KI=K                                                                00007700
754             l!5zrgsT7t-(L.JtK)                                                    00007600
79.          12 IFn-iS.GE.3.             GO TO  160                                                           00009300
90.       C                                                                         00009000
95.       C FIND ESTIMATES FOR *LL MONTHS FOR GIVEN PIPE/PARAMETER                00009500
°6.       C                                                                         00009600

-------
                                                    I S T A T
CO
vo
O
      97.
        X 1 =KO ?K2
                                        i JfKj)*SMEAN(Lf J»K1)
       IFf JPARM(U»J»J).NE.22) SO TO 18
       IFfNSlzEcUt J.K1 ) ,£0.0) GO TO IS
       TF(sHAX(L»J»K).6T.SMAX(LtJ,Kl)) SMAX (L » J . K)=SMAx (L • J.K1 )
       GG  TO  19
   19  lc(s*iAX(|_»J»K) .GT.SMAxCL'Jf K1J) GO TO  I1?

   19

  200  JFf irwKSO.^E.l)  GO  jO 21
       IFf I"AR^(Li J, I) .^E.23) GO TO 21
       IFfK.jn,K2)  r,o  TO  202
       00  20:  »
     1             EMEAN(LfJfK)ttSIGKA(LfJ»K) , O.tlPARMCL, J, I)ilt IONESD)
   22 ET4(L,J,Kj=NSIZefL, J,K)
      Ni."'L.Jt^) = (;-'
  220 EsTG>''AtL,Jf!<)
                                  i JtK)
                              (L t J t
C ADE> in 4Ny COMPLIANCE  pOINTS  FOR MONTH(s) BEING DONE
C
                      IF(MCP.cn.D) GO TO 28
DATE 02J876

 00009700
 00009800
 00009900
 00010000
 00010100
 00010200
 00010300
 00010400
 00010SOO
 00010600
 00010700
 00010800
 00010900
 0001 1000
 0001 1100
 00011200
 00011300
 00011400
 00011500
 00011600
 00011700
 00011800
 00011900
 00012000
 00012100
 00012200
 00012300
 00012400
 00012500
 00012600
 00012700
 000]2600
 00012900
 00013000
 00013100
 OOC13200
 00013300
 00013400
 00013500
 00013600
 00013700
 00013800
 00013900
 0001UOOO
 00014100
 00014200
 0001 U300
 00014UOO
 00014500
                                                                                                             PAGE

-------
                                                  I  S T A T
NJ
VO
     1U7.
     150.
153.
1SU.
155.
156.
157.
155.
159.
160,
161.
162.
163.
168.
169.
170.
171.
172.
173.
I7a.
175.
1 76.
177.
178.
179.
     1P2.

     lea.
     IBS.
1P7.
IPo .

1QO,

192.
193.
19U.
                 00
                            Ki=KiK2
                   23 DO 2"  M = HLO>I.NCP
                      TFfHNTH5z(l» J, *} .EQ.M.MTri) GO TO 25
                   25
                      GO Tn
                         fjij'sNij (U t Jt K) /GAMMA
                      TFfOIST(Lt J) .EQ.l)  2CL»JiM)sALCG10(ZCLtJtM))
                            r.M-c &'•"('.! J»K)
                      S!G=SQBT(ESIGMA(L»JiK))
                      1F{"LQW.GT .NCR)  GO TO 2d
                      GC> TO  ?5
C REsEf?uEf.iCF.--.s£T  UP  f (111  ASRAYs BY SEQUENTIAL  INDEX  OF  'MONTHS!
C INCLUDE COMBINATIONS  OF  MONTHS rtHERE DATA WAS  INSUFFICIENT
                      N.jfL* Jf Nl)=NU(Lt JtK)
                      EotGk'A(l-.J.Nl)=ESlGMACLfJt
                      f '• F. A '•' ( L f J t * 1) = E M E A W ( L » J « K )
                       lr CM.MF . I'lNTW) GO TO 30
                       IF f TFLAG.f 5.0)  GO TO
                      SIGMACLtJ)sESlGMA(LtJtl)
                      TMPFTAsETA(Li J t 1)
                      TN.P'..'J = NU(Lf Ji 1)
                      r,0  TO U7
      KJ 1 = N + j
      GO TP  17

C

C
   3? ^u(
      SIC-"4fL..n=£SIGM4(LiJ,l)
                                   ESTIMATES
    DATE 021676
       0001«600
       0001«700
       0001
-------
195.
106.
107.
lo*.
199.
200.
201.
202.
2P3.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
21<5.
219.
220.
221.
222.


  I.
  2.
  3.
  4.
  5.
  6.
  7.
  8.
  9.
 10.
 11.
 12.
 t3.
 14.
 15.
 16.
 17.
 18.
 19.
 20.
 21.
   PC o 0 K = K 1 •
   TFfT"PNJ.G1
   IFf T^PETi.C-T .KETA»FTACLf JtK  ))  TMPETA=KETA*ETACL«J•K)
       (Lt
  *.K)*F;TA(U'J|K)*fc^EAN(L'J«K)*E^EANCL»JfKJ-(TMPETA*£TA(L«JtK))
                    »Jn
u o C 0 '-• T I' i Ll E
47 ISTAT.SCl «Lt J, 1)=MU(L. J)
   ISTiTS(I.LtJi2)=SlGMA(L»J)
   ISTATs(I,LtJ.3)=TMPETA
           .J)=SIG
           -fJ)=0
SO COWTTNUE
C
 9999
10000
 wRTTE(6»10000)  ItIPARM(LtJrl)
 FC-PMATC *0 '• 10( !* ') t ' INSUFFICIENT DATA (COMBINED SAMPLE SIZE
1       ,i  THAN  a)   FOR SOURCE'«I3»i CONSTITUENT I«13)
 SVPP
                                                                LESS
                                  ORDER
              OSOER(XMRtlSORCtM)
C
C  B!
   RLR SO=>T
   DO 70 1=1.
      DO
      IF
                        65t65»64
64
               ( J)
   XhR(..T+
65 CONTINUE
   IFCKFLiG.EO.O) RETURN
70 CONTINUE
   RETURN
   END
      00019SOO
      00019600
      00019700
      00019800
      00019900
      00020000
      00020100
     J00020200
*MUCLi00020300
      00020400
      00020500
      00020600
      00020700
      00020800
      00020900
      00021000
      00021 100
      00021200
      00021300
      00021400
      00021500
      00021600
      00021700
      00021800
      00021900
      00022000
      00022100
      00022200
       OAFt  02187fe

      00000100
      00000200
      00000300
      00000400
      00000500
      00000600
      00000700
      00000800
      00000900
      ooooiooo
      00001 100
      00001200
      00001300
      00001400
      00001500
      00001600
      00001700
      00001800
      00001900
      00002000
      00002100
                                                                                          PAGE

-------
OUTPUT
                                     DATE 021876
PAGE
1.
^.
3.
a.
5.
6.
7.
S.
9.
1 0.
1 1 .
12.
13.
14.
15.
16.
17.
16.
19.
?0.
21 .
?2.
23.
au.
25.
26.
?7.
2*.
29.
30.
31 .
32.
33.
3".
•T C
S3.
36.
37.
38.
3".
UO.
"1 .
02.
U3.
uu.
SUBpnuTlNc OUTPUT(NUSORS)
C
C OUTPUT ;> S
C
If'CU,1


00000100
00000200
IMS source STATISTICS SUMMARY TABLES 00000300

CE Pl.LIST


OIMFMSION DISTC2)
CO-MMn\.vCO^SI/P4RMS(5,30)
DATA
DATA
OAT 4
DATA
DATA
DATA
DATA
DATA
DATA
OAT4
DATA
DAT4
DATA
DATA
OATA
DATA
DATA
DATA
OATA
DiTA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
r> « T *
U •* ' A
DATA
PATA
DATA
C
c OUTPUT r!'-<
00 ill
PEinc
« R ! T F
S FQP.HA
OT JT{ 1 ) f DISTC?)/' N I , i L
( P A o .", s C L » 1
(PAOMSU. 2
(FAPM.SCL ,
CPAPMSU.
( P A P M S ( L •
(PAQ:'.S(L.
(PASMSCL,
(PARMSf U t
C P t R .« S ( L •
:°ARMS(L. 1
( ° 4 P ". S ( L ' 1
(OAp'-iSCLt 1
(pARMSCLt 1
(PA3^S(L. 1
) «L=1 »5>/ ' AUUKi ,
) »Lsl t 5) / ' AMMO i ,
3) .L=1.5)/iBOD5'
1) tL=l .5)/5* '
5) »L=1 f5)X ICAR6"
6) .L=1.5)/5*'
7) .1=1 .5) / ' CnLO
8) .U=l .5)/ iCHLO
9) «L = lt 5) / ' CMRO
0) .L=1.5)/'COL1
n ,L=i »5)/ ICOLI
2) »L=1 .5) / ICOPP
3) tL = l i5) / 'CYAN,
u) .L = 1.5)/'FLUO
(PAPfS(l.t 15) iU = 1 tS)/ ' ISO
000001*00
00000500
0 0 0 0 0 6'0 0
00000700
'/ 00000600
i INUMI » l 1 t 1 ' . 1 1 / 00000900
"NIAII l»l '»' I/ 00001000
f i ,' ' » 1 l » 1 '/ 00001 100
'/ OOOC1200
.ION . ' if" ' t l " / 0 0 0 0 1 i 0 0
I/ 00001400
, IRIOE
, i ROFO
i ' WIUM
f ' FOKM
. 'FORM
, 'fcR
. i IDE
, IRIOE
, IN
(PAP.MS(L,16) .1 = 1 i5)/'LEAC ,'
f BA9-S(L, I
r' = A*<"SU. , 1
( P i = y- 3 ( L i 1
f P4PMSU ,2
-PARMSCL .2
fPiOMSCL,2
7) .1=1 ,5)/IHA,M(j
6) t L = i • •>) / ' MERC
<9).L=ltS)XiNICK
0) tL=t i5) / INITR
1) .L=liS)/l01L-
2) »L=1 .5) / ' PH-M
fPARr-iS(L,23)»L=l.S)/iPK-K
(PAPMsa,2a) tL = 1.5)/'PH£N
CP'«MS(L»25) »L=l«5)/iPHOS
( P A a M S C t » 2
*Q«.r3Mcf| p
«•) .1 = 1 «5)/i DISS
7>.i -i_c;iyiCiiCU
;*xafc'1^ol,UfC//»t-*"lB-J'' 'vwvji
(PAP.MS(L«28)tL=lt5)/'TE»'pi
(PAPMSC1..29) .1=1 .S)/'TIN 1
CPiRMS CL . 30) .1=1 .5) / i DO l


f TAPUH. FOP EACH SOURCE
!= 1 f^uSOR
; P ) o U * « y
r6«S) Ih( 15
T ( ' 1 i . T60«
S


1 1 C I* ' ) ./ ' ' »T61
a5. C h'LAOI^r, FQR EACH PIPE
U6.
•i f
U 7 .
ue.
U9.
DO 37
w ^ T T c
IP FCB-MA
» , ' lipS
J = 1 , N P T s «
(6t10) Ji1^
T r ' 0 ' • T ! 1 f
TREAH FLO'''
CKlA^I T^ 1 1 D P 1 LJ
, I ANtS
» >uRy
. ' tL
, 'OGEN
, 'GREA
, 'IN
, IAX
. "OL
. ' PHQR
, 'OLVE
• i f-' KJ n r
V ' L. "i U U.
, IERAT
, 1
. I
1
IRM E

S.-T
S--F





E



SE



US
0 SO
r> sn
V O U
URE

t ' »
, XTRAI,
. ' .
. OTAL't
. ECAL't
t ' .
t ' •
. ' »
. ' t
. ' .
« ' .
. ' .
. ' .
T '•
• ' •
t ' «
. ' t
« ' .
. ' .
. LIDS' .
t LIDS'.
T I. 4 W V »
. OIFF'.
i ' .
. ' «

CT






















/ 00001500
/ 00001600
/ 00001700
/ 00001600
/ 00001900
/ 00002000
/ 00002100
/ 00002200
/ 00002JOO
/ 00002aoo
/ 00002500
/ 00002600
/ 00002700
/ 00002800
/ 00002900
/ 00003000
/ 00003100
/ 00003200
/ 00003300
/ 00003UOO
/ 00003SOO
/ 00003600
/ 00003700
/ 00003800
00003900
OOOOUQOO
OOOOU100
0000^200
OOOOU300
i 'SOURCE'»I3,/i l .TfeOilK I*')) 0000**aoO
0000^500
0000«600
t.NU[ I *JJ fU'^^L.'*'
|PIP£= i t 12. 1 OXt (MEAN DISCHARGE (ML/DA Y) • i ,M 2.4 1 1 1 X
(MtXOAY)s 1 ,F 12.
«) OOOOU900

-------
                                             OUTPUT                           DATE  021876

SO.              IFfDC|.GT.O)wPlTEC6,15)00                                           00005000
SI.           IS  FOPn*T('  '.TlSt'HEAN  DO CONCENTRATION  (MC/L)»'«F12,4)              00005100
52.              wanE(6t?0)                                                        00005200
53.           20  FOPMA-J-C i o'»T89t'EXPECTED    PROS.  OF  f.'O I / '  ' » T 16» ' CONSTITUENT ' • T38t 00005.400
Sfl.            *'STANDARD'.T52.iDIST'tT60.'tST.  MEAN IfT75» I EST.  SIGMA I . T90f I DAMAGE00005«00
55.            *>tTiOl.'VlOLATlONi/i  i,Tll.20C«-')»T36tl3(l.l)»T52»«(l"l)»T5''fl2C|00005500
56.            *-') ,T7at 12('.I)|T69»6('-')«T100tU('-'})                          00005600
57.              NP = IWE»J(2» J)                                                       00005700
S8.       C DATA FOR EACH  PARAMETER                                                ooooSeoo
59.              00  ^0 Ks)iWp                                                       00005900
60.              IP=IWF>OT(I•J»Kj                                                   00006000
41.       C DOM'T  OUTPUT 00 AS REGULAR VARIABLE                                    00006100
•62.              IFfTP.PG.30) GO TO  30                                              00006200
63.              in=I*'fMOT( 3> Jt K) 11                                                 00006300
fa.              *RTTF(o,?5)(PARMS(L.IP)fL=l,5)tWENOTA(2.J,K),DISTCID)rWENQTA(«»JtK00006UOO
*5.            *)fWEKDTA(5tJtR)TKENDTA(6.J.K)»WENOTA(7»JfK)                        00006500
66.           25  FORMATC1  ' iT1l'5Aa,T36.F13t4iT52iAUiT59iFl2,a»T7a»F12.4fT89,F8.a»  00006600
67.            *TIOO.FII.«)                                                        00006700
68.           30  CO^TlMJE                                                           00006800
69.              WRIjECoF^b)                                                        00006900
70.           36  FOPV.ATC'0't/iO')                                                   00007000
71.           37  COMTO.'Mt:                                                           00007100
72.              WHTTE(6,?5)^S«C(2)tWSRC(3j                                         00007200
73.           3S  FORvATCQ1tTll»50(i*f)t/l  ' tT12•'SOURCE  EXPECTED DAMAGE"iT«6fF12.400007300
74.            *,/' i,112,"SOURCE PROBABILITY  OF  NO  VJOLATlONIiT«6fFIZ.It/I  ItTUi00007400
75.            *50fi*D)                                                           00007500
76.           «0  CONTINUE                                                           00007600
77.             RETuRN                                                             00007700
7?.             END                                                                00007600

-------
                                                    p  A  R  A  M                            DATE 021676        PAGE
     i.       PI      pent                                                                oooooioo
     2.              COMMON/OUT   /I-.SRCC3) 'UPFLWtDOfNPTSW^WENDCZia) »WENDTAC7i«i 10}       00000200
vo    >.              DlfF.NSlOM DUMMV(29«j) , jw(3) • IWEN(2»4) t IWtNDTC 7»0i 10)                OOOOOiOO
01    u.              EQuIVALfcMCk'  ( Iw,ws»C) f C IWENi WtND) i ClWtNCTf WENDTA) t CwSRC»DUMMY)     00000400
     5.        E^O                                                                       00000500

-------
P A R A M S
DATE 021876
PACE
1.
2.
3.
o .
5.
6.
7.
8.
9.
10.
1 1 .
1 2-
1 3.
!«.
15.
t 6.
17.
'.8.
t 9.
2 0 .
' 1 .
r '
22.
?3.
?o.
?5.
?6.
27.
26.
?9.
30.
31.
32.
33.
•i(J),J=l, 00) /!.,!. 126, 1.693, 2, 059, 2*326.2.530, 2. 7oai2.8a7i
* ?. o?0. 3. 073, 3. 173, 3. 253,3.336,3. 007, 3. 072,3. 532, 3. 588,
* 3. frOO, 3. 6P9. 3. 735, 3- 778. 3. 819, 3. 658, 3. 89 5, 3. 930. 3. 960,
* J. 997, o.O 27, 4. 0^7,0,086,0.113,0, 139, 0.165.0. l69,
* a, ji3,0. 236, 0,e'59,0.23o,0. 301,0, 322/
iMFGpe nIST , SSIZF
DATA CHfCKS
If t SSI7E.GT.36S) GO TO 350
IF(lONE5o.F.Q.l.AND. (1PRM.EQ.22.0R.IPRM.EQ.23)) GO TO 325
IftDlST.E'J. 1 ) f-0 To 100

EST!MATI.MG PnR NORMAL CASE
•C=fALOG(SS!zE/1.525l7)/2.9l5U6)tl.
ESIGMAr(SMAX.SMEAN)/C
E "••• F i ^ s S ."> f A N
RETU^;,

ESTIM4TT-J fpf- LnG'-oRH4L CASE
100 HATIOrSM4!'/iMEAN
IF f WATIO.LT. 1 . 25. OR. RATIO. GT. 6, 00) GO TO 365
IFfBATTO.GT.2.3) Go TO 200
*LPHi=l . Q
-------
                                             p  *  R  A  K  S                           DATE 021876        PAGE
50.             IFCSSlze.LT.25)  8ETA = a.963a2-(SSlzE-5.J*C . 021 11"CSSIZE-10.)*(     00005QOO
51 .            l.on 522
-------
                                                   P  H  0  M  G  0
                                                                                        DATE 021876
                                                                                                       PACE
VO
00
 1 .
 2.
 3.
 u.
 5.
 fe.
 7.
 8.
 
-------
                                      P  H  £  X 0
                                                                                     DATE 021876
                                                                                              PACE
 1.
 2.
 3.
 4.
 5.
 6.
 7.
 a.
 9.
1 0.
11.
I 2.
[3.
I 4.
IS.
16.
 7.
I 6.
[9.
?0.
21.
22.
?3.
34 .
?s.
26.
30.
31 .
32.
33.
34.
?5.
3o.
37.
36.
39.
40.
4! ,
42.
43.
to.
45.
"6.
07.
lie.
09.
50.
        CALCULATES ExpEClEO  DAMAGE  FOR  CONSTITUENT PH (AND POHJ
      C 0 M M 0 >J / 6 I J / A . B ( 2 )
                    1 i 1C)
      COPT?=DA^AGE(2t 1C)
      TMUC?)= 1 O.-TMUC 1 )
      PM i = crvTl
      ?C2)-COPf2'
   20 IFCT'HH 1 ) .GT.7 . ) GO  TO  24

       w"ci
-------
                                                   H H E X 0                            DATE 021876        PAGE
     SI.           39  00  00  KD=ltlO                                                      00005100
     52.              CALL  A«EF(DAMAGE(I.KD) iDAMAGEdfKD*!) .AtB(Z) »KDtA|.PHA,BETAiE»F»U  00005200
     ?3.              TF(L.Erj«2)  GO To *»0                                                00005300
     5U.              IF  (iLPrtA.Lt.T.AND.T.LT.BETA) GO TO 50                             00005400
     •S5.              PHE-xOiPhEXO+ILCEtF.ALPHAtBETA.-TMuCD »TSIG(J))                     00005500
     56.           UO  COMTlNUE                                                            00005600
     57i        C  ALPHAf l D=BETA( 10J                                                      00005700
     58.        C  LI=11                                                                   00005800
     59.              PHFXD=oHexO*IL(O..SSPH(ll).BETAtTf-THU(I)iTSIG(J))+RILBTl(Ti-TMU(100005900
     60.            *)tTSlG(I))                                                          00006000
     61.              RETURN                                                              00006100
     (,2.        C                                                                         00006200
O    *3«        C  LI = 1  TO  <5                                                               00006300
o    t,u.           50  PHFyO=PHPxO+IL(EiFtALPHA»T»-TMU(I)»TSIGCJ))+IL(EtF»T»BETA|-TMUCI)f00006UOO
     6S.            *TSIR(in                                                            00006500
     f,6.              LI = +1)tA»B(I)»KD»ALPHAtBETAtE»F»L)  00006900
     70.              TFCL.fc'O.?)  GO TO 55                                                00007000

     72.           55  CONTINUE                                                            00007200
     7J.        CALPHA(Ji) = E?ETA(10)                                                      00007300

     75.              RETURN                                                              00007500
     76.              END                                                                 00007600

-------
                                               P N V C 0 M                           DATE 021876        PACE
 1.             SUR9PUT1ME  PMVCQMlNOPlPS»NPPARS«NCPARS»IPARM. INQPARf DISTYPiEFSTf   00000100
 2.            *  nu»PNV,ICUP)                                                      00000200
 3.       C                                                                         00000300
 U.       C pNvCol"- r 'LC'JLATLS  PROBABILITY  OF  NO VlQL*TlON FOR A SOURCE.  AND  COMBINOOOOOUOO
 5.       C    P«RMG/T(JS«TQU.C$. IBQD                                      00001300
 u.             COMMOM/IsTP'-'V/^Uf «• 10) tSlGMACU, 10)'                                 00001UOO
 5.             COMMOv/P.M^Exfr/OISTdO) fTMUCIO) .TSIGC10)                            00001500
 6.             COM-/P-.VUPOATE/I tOS(«.30)                                            00001600
 7.             INCLUDE PI. LIST                                                     00001700
 8.       C                                                                         00001300
 9.       C FIND ALL PlpF  LOCATIONS  OF  SAME PARAMETER FOR SOURCE  I                 00001900
?0.       C AND COM8INE DATA                                                        00002000
21 .       C                                                                         00002100
•>2.             00 = 0.                                                               0000c200
?3.             CS=0.                                                               00002300
?u.             TQitr^u                                                              00002UOO
?5.             TQSrO.                                                              00002500
?6.             DO 10 0 = '..^OOIOs                                                    00002600
?7.          10 T(3SrTQS + -?S(J,I)                                                     00002700
38.             PMVsl.                                                              00002800
29.             no 80 ^sitMOPAPS                                                    00002900
30.             S'JMMsQ.                                                             00003000
31.             SUMV=0.                                                             00003100
J2.             TM|i(V)=o.                                                           00003200
33.             T s I G C K- ) = 0 .                                                          00003300
3".             MSAMgrO                                                             00003aoO
?S.             00 t>0 J51.NOPIPS                                                    00003500
36.             MP=MPP4«s( J)                                                        00003600
?7.             00 60 " = 1.N-P                                                        00003700
76.             IFfiPiPi( J.KI ,NE. INDPAR(M) ) GO TO 60                               00003800
?                        0000«900

-------
P N V C 0 H
                                      DATE  021876
PACE
50.
51.
52.
53.
51.
55.
56.
57.
«?8.
59.
60.
M .
ft2.
f>3.
6 J .
65.
*-6.
67.
6S.
69.
70.
71 .
72.
73.
7U.
75.
76.
77.
78.
79.
1=0 .
61 .
82.
?3.
«'J.
«5.
»e.
a?.
B5.
P9.
00.
91 .
°2.
9 ? .
9u .
"5.
96.
o 7
° ' .
«6.
GO TO 52
C
C--LCGK>'OPlliV=TE'«PM»TEMPM* (10.** (2. 3025851 *SIGMA ( J, K) *SIGMA ( J, K) ) -1
SilMiy = 5|.iMV» TEMP V
Si Tt^P'VvilL 1N?« CEFgTf J.K5 »M0(J«K) «5IGMA(J,K))
C SET ViDTA^.Lt POrt OUTPUT OPTION
5? A'EfnTc. C /i J «K) = T£MPK'V
1Tf-!ji'*iDAOf*M r(j ??> toFKjDTAf7*,I«K*1^s1nfiOnnfi
f | ^ m 1 1 K « K ^ -J # t, W , C C J VNC'^Wl **(, / fWfr\^iJ«»lUUVUvV#
IF(TNnP4P(K) ,EO,30) GO TO 60
IF('Cf..R.F5.1) GO TO 60
p^!V = P^:V*Tt.MPNV
GO TC 60
C
C
C PH/pOrl
53 Tf^pM=iO.«:*C.Mu(J.K}*1.15l2925*SIGMA(J,K)*SlGMA(JtK))
SUWi-rsU^MtTt^PM
TE^PV=Tf"Pf*TEMPM*{io.**(2. 3025851*51 GMA(JiKJ*SlGMACJ»K))-l,
Si/'-o 100 KK= i » 2
KPCt^+1-KK
k-
-------
OJ
o
OJ
 •50.
100.
1M.
102.
103.
10".
1P5.
int>.
107.
109.
109.
110.
111.
112.
113.
ll«.
SIS.
1 16.
117.
lie.
119.
1?0.
121.
                                                 p N V C  0  M
                      TSTG f«i}s.
                   69
                   70
                             = .
                            S! . 151?<»25*TSIG(H)-ALOG10(SUMM)
                                   (TSIG(M))
                                   .NE.30)  GO  TO  80
CO'iT INUT
JFClC05.Nt.n GO TO 90
CO Si J=ltNOPIPS
                      00  ft5  X
                      IFrwF-ND
                   JS eC-Ml^1
                .LT.TE.MPNV)
                   9o IF(PI»V1.'UT. .0000000001)  PNVs.0000000001
                      END
DATE 021676
  00009900
  000100CO
  00010100
  00010200
  00010300
  00010UOO
  00010500
  00010600
  00010700
  00010800
  00010900
  00011000
  00011100
  00011200
  00011300
  00011UOO
  00011SOO
  00011600
  0001 1 700
  00011800
  00011900
  00012000
  00012100
                                                                                                           PAGE

-------
                                   PRIORI
  DATE  021876
                                                                                                           PAGE
o
*-
      1.
      2.
      3.
 6.
 7.
 8.
 9.
10.
1 1 .
'.2.
13.
13.
15.
16.
17.
18.
19.

pi.

23.

2s!
     29.
     29.
     30.
     31 .
     32.
     33.
     33.
     ?5.
     36.
     37.
     36.
     39.
     30.
     3! .
     32.
     33.
     33.
     35.
     46.
     37.

     39.
    SUBROUTINE PRIORTClPARMt NPPARS)

P=IO"T D£TFRMIM£S PRIORITY  MONITORING  ALLOCATION AND PRINTS TABLES
                      « THS=900
              RtSnCECSO).  XMH ( MKS) • ISORC (MRS ) , RESCST (MRS) t
   *  PeQRF.S(TPS)fCOSTCTRS)»NUM(M«S)«IPARMCU.«10,30)tNPPARS(4f30)
    DIMENSION THR ( TRS) , ISORCT(TRS)
    COMMON /PRl/NOPlPS(30)fNOPARSC3b)flNL>PARC10t30).ISFUPC30)t
   *   I$FLOw(30)t£XPD(30)»PNVC30)tIOUTl»10UT2AtIOUT2BiIOUT3«
   *   N/.M(3o.l3),e,D,NUSORS,ISLlST(30)f PIPCST (4) » CONCST £ 30)
    l=ISLI5T(IJ

DETERMINE RESOURCE NEED TO MONITOR  SOURCE  I
    NPzNOPIPSC II)
    RESPCff I)=PIPCSTCNP)
    00 ^ J-\ »NP
    K1=MFPA»SC J- II)
    DC ^ K=) .Kl
    IPslPi^MfJ.K, II)
    RESRCt Cl)=RESRC£(I)i.CONCST(IP)
 55 CONTINUE

CALCULATE MARGINAL RETURNS FOR EACH SOURCE
    M=0
    DO b? iM
    Kl=ISFUP( I)
    00 60 KslSFL.Kl
    M = »+l
    XHRcM)=(exPD(I)*(PKlv(I)**£K.i))»(l..PNv(I)))/RESRCECI)
 60
 6?
ARRAMGF MARGINAL RETURNS IN DESCENDING ORDER
    CALL .OROERCX^Rt ISORC»M)
          C
          C
          c
          c
          C--OPTIOM i..
        NECESSARY COSTS
FOR OESIRF.O OUTPUT OPTIONS AND WRITE OUTPUT
    TGTCST=0.
    PO PO 1 = 1 .K-USORS
 00000100
 00000200
 00000300
 ooooo«oo
 ooooosoo
 00000600
 00000700
 00000800
 00000900
 00001000
 00001100
 00001200
 00001300
 ooooiuoo
 00001500
 00001600
 00001700
 00001800
 00001900
 00002000
 00002100
 00002200
 00002300
 00002UOO
 00002500
 00002oOO
 00002700
 00002600
 00002900
 OC003000
 00003100
 00003200
 00003300
 00003*400
 00003SOO
 00003600
 00003700
 00003800
 00003900
 00004000
 000041QO
 00004200
 00004300
 0000^400
00004500
00004600
00004700
OOOOUdOO
 OOOOU900

-------

50.
•51 .

53.
Si.
55.

57.
5 8
59.
60.
M.
62 .
e>3 .
6" .
65 .
66.
67.
68 .
S9 .
70.
71 .
1-0 7?
g 73 :
T /j
75.
7c.
77.
76.
79.
eo.
M.
SP .
*3.
"i .
*5.
*>6 .
"7.
a52( i- ')./' 0' rT50» 'TOTAL RESOURCES USED ' »F1 0 .2 » / i
*TSO,'r.OST OP UNDETECTED V I OL AT IONS ' « f 1 2 . 5)
£
C - - 0 P T I 0 " ? A - -
91 IF f TOijTZ&.NE., 1 ) GO TO 104
«c;jT^f(3il05;
Ml = 0
T 0 T C = 0
OQ <5 5 ! = 1 .NUSORS
T 0 T r. rTnTC-'EXPOCI)
IF f ISFLO'-C I ) .£0.0) GO TO 93
TSsISFLO-^CT)
00 ^? *st • IS

T^p("l) = f£xpOCl)*CPNv(I)**Ci<.l))*(l..PNv(I)))/RESRCECI3
ISORCTCM1 )=I
92 C 0 '-• T T N ' ) t
93 CO Mr P.'.iE
T F f •< . c -1 . 0 ) (i 0 TO 1 0 0 0
o o nti>'~Y£ 1 1
»EQOr S( 1)=KLSKC££ IS)
CO?T(l.i = TC'|TC.(T'"<8(i)*HESRCE£IS))
11 = 1 ^LTST( IS)
T[p'MO''PsTM'
-------
OJ
o
0\
     QP..
    100.
    101 .
    102.
    103.
    1 04.
    105.
    106.
    107.
    108.
    1 l«J.
    110.
    111.
    112.
    li*.
    1 1 a.
    115.
    116.
    1(7.
    lie.
    119.
125.
     l?*.
     l?9.
     no
     131.
     us
     133.
     13"
    137
    138.
    140.
     143.
    107
            1001
                                             PRIORI

                              If IlfTEHPMR,COST(I),REORESU)
                             )
             104 IS=ISUBC(1)
                      n = TOTCST.(XMR(l)*RESRCE(IS))
                 TFrMjcO.1)  GO TO 1002
                 00 110 Isc tM
                 TS=lSO»Cf I)
                 Co?T(I)=CCST(l-l)-(XHRCI)*pESRCt(ISJJ
            100? Cc,":fTf.-.lE
                 TF muTaT«0
                *"ITY i , T5a. ' SAMPLEDI iTb«» 'HETURN X100   VIOLATIONS    KEOUIREDi
      00 1)2 Irl.M
      75=fSORCt I)
      T.lrlSLISTUS)
      TE^PfS=X"«f15*100.
  11? kRlTFJc-n n5J I. Il.TEMPHRfCOST(I) . REURESCI)
  MS FoPnAyC ' . (T«3,13,155.I3,T60,Fl3.8. 1 X» F 12.5.2X , F 10 .2) )
      wPITE(*»tl8)
  tiff FOR^ATcio'fT40.56C i-' j)
c
C--C°TION 3--
  120 IF(IOUT3.ME.J) RETURN
      TF (R)1?0f170.125
  12S Ici'T^sO
      wplTr. ( 6 • 126) 3
  126 F0r.-K.AT c i i < .760. 'FINAL ALLoCATloNi/iOI.T60t I BUDGET i « 1X»F9.2)
      nn )35 I=I.M
      TF' P-oEoocs(I)) 130.135.1J5
  130 LI»=1-1
      GO TO 1 4()
  13S C0MTIN11E
      W P I T E(6 • 137}
  )37 FO°KATC'0 I»69(I* ' ),/I lfl6UDGET  CONSTRAINT  CANNOT  BE  REACHED
     •CHRKENT M&XIMUH SAMPLE SIZES IN  EFFECT'f/l  tt69( I * I ) , / I 0 I )

      00 1^5 Iai
                 no i5o 1=1.
     DATE 02187&
      OOOOV900
      00010000
      00010100
      00010200
      00010300
      00010400
      00010500
      00010600
      00010700
      00010800
      OG010SOO
      00011000
      00011100
      00011200
      00011300
      00011400
      0001 1500
  If  00011600
 "PKI000011700
/I  It 00011800
      0001 1900
      OC012000
      00012100
      00012200
      00012300
      00012400
      00012500
      00012600
      00012700
      00012800
      00012VOO
      00013000
      00013100
      00013200
      00013300
      00013^00
      0001 3500
      OOOlJoOO
      00013700
      00013800
      00013900
      0001UOOO
 WITH 0001U100
      OC01U20Q
      0001^300
      0001««00
      0001«SOO
      00014600
      00014700
      0001U800
      OOOJU900
                                                                                                           PACE

-------
                                                  P R  1  0  R  T                           DATE  021676         PAGE
     ISO.          150  CONTINUE                                                           00015000
     1 c. 1 .              WPTTF. (*>«<5U)                                                        00015100
     1S2.          15U  FOPMAJ ( ' 0 ' t T«8, "Mlto NO.   MAX NO.  ifT89t'COST  OF ' / I  '»T«8,ISAMPLESO00 I 5200
     1^3.            * i f T5". iS4i'-5LfSi r T68» ITJMES' t «X« "RESOURCES   UNDETECTED • ? / i  "«T40i  00015300
     15a.            *iSOllcc^'.Tue.'PEOUIHFD'tTSS.'ALLOWED!,T68.1SAMPLED Ii5X.iUSEDI»«Xf 00015400
     IS5.            *'VIOLATIONS'/'  >?TUO»58(I.i)/i0')                                  00015500
     1S6.              00  ifrO  I = l»NijSORS                                                   00015600
     1S7.              PP?S = ??S^Ct ( I ) *,\UMC I)                                               00015700
     15H.              CSTsExPOfl)+f?NV(I)**(NUM(j)))                                      0001580Q
     IS".              DrlSLISTfl)                                                        00015900
     UO.              w»lTEfo,i55)  II i ISFLOi«(I) iISFUP(I) tNUM(I) iRREStCSJ                 00016000
     161.          155FOSM1T,''  ' .Tu2t l2fT5«,I2.T61il2tT71«I2.T77.F9.2,T88tF10.5)         00016100
     if.2.          160  ru^TiM.it                                                            00016200
     1*>3.              ^HITE(6» t e5)  REORESCLIM) ,cOST(L I")                                 00016500
     lea.          16S  PO?''AT f ' o ' .TiiOi58( l-' ) / ' 0 i .Tao, i  TOTAL  RESOURCES USEDl.F9.2i/i  i»T400016ETP CT£C  VICLATTOMS '  • iXtF'.S)                                    00017100
     172.              D01P01=1«M                                                       00017200
     17J.              TF fcr>ST( n-l>) 176'176,180                                           00017300
     174.          176  LT'sl                                                               000l7aoo
     175.              GC  in  l<4p                                                           00017500
     176.          I6o  Cr^'TTvijt                                                           00017600
     177.              wRTrEch»1&00)                                                      00017700
     17(i.         leOO  FOPKtT( '0' f37C'»')./'  ' ( 'UNDETECTED-V I OLAT ION-COST  CONSTRAINT  CANN0001780Q
     179.            *OT  151  P£4O£D ^'ITh  CURRENT MAXIMUM SAMPLE  SIZES  IN  EFFECT'f/'  l»  00017900
     180.            *«7f i*i ),/ ' 0')                                                      00018000
     1«1.              LI«=H                                                               00018100
     182.              GO  TO  14.0                                                           00018200
     193.          181  RETURN                                                              00018300
                      END                                                                 ooo;8«oo

-------
                                   X  N  0  R  M
                                                                       DATE 021876
                                                                                                            PAGE   1
OJ
o
00
 1,
 2.
 3.
 u.
 5.
 6.
 7.
 e.
 9.
10.
1 i.
12.
13.
t i.
IS.
1 6.
17.
16.
19.
20.
                                  T*E
                   F0° v.rjT." UB X.LT.-U
                   •OS" CiLc"LATfc-S l-F(X)
f A:
CX,
   TF
                          K 20 TO OUT
                          Sf A) .LE.y.j GO TO
                          GT ,u. ) GO TO  10
          2s TO OUT
                              NORMAL  DISTRIBUTION  FUNCTION FCX)
                       AMD INFERENCES  FUNCTION  RNORM TO FIND A  VALUE
                           X+  AND  FCX)  FOR  X-
                          10
10
     r 1 ./( A*X)
         y2
      TO
       "•= CFy/xj*( 1 ..
         }UT
2 n
   END
00000100
00000200
00000300
ooooouoo
00000700
00000800
00000
-------
                                REFERENCES
1.      Cohen, A.I., Y. Bar-Shalom, W. Winkler and G.P. Grimsrud.
        "Quantitative Methods for Effluent Compliance Monitoring
        Resource Allocation," EPA-600/5-75-015, September 1975.

2.      Environmental Protection Agency, Office of Enforcement.   Effluent
        Limitations Guidelines for Existing Sources and Standards of
        Performance for New Sources.  EPA National Field Investigations
        Center, Denver, Colorado, August, 1974.

3.      92nd Congress.  Federal Water Pollution Control Act Amendments
        of 1972.  Public Law 92-500, Washington, D.C., October,  1972.

4.      Environmental Protection Agency. Notice of Proposed Rulemaking;
        Effluent Limitations Guidelines for Existing Sources and Standards
        of Performance and Pretreatment Standards for New Sources,
        Federal Register, Vol 38, No. 173, Washington, B.C., September 7,
        1973.

5.      Environmental Protection Agency. Proposed Rules; Effluent Limit-
        ations Guidelines and Standards of Performance and Pretreatment
        Standards for Electro-plating Point Source Category, Federal
        Register, Vol 38, No. 193, Washington, D.C., October 5,  1973.

6.      Environmental Protection Agency, Proposed Rules; Effluent Limit-
        ations Guidelines and Standards of Performance and Pretreatment,
        Federal Register, Vol 38, No. 196, Washington, B.C., October 11,
        1973.

7.      Environmental Protection Agency, Glass Manufacturing; Effluent
        Limitations Guidelines, Federal Register, Vol 38, No. 200,
        Washington, B.C., October 17, 1973.

8.      Environmental Protection Agency, Proposed Guidelines and Standards;
        Ferroalloy Manufacturing Point Source Category. Federal  Register,
        Vol 38, No. 201, Washington, B.C., October 18, 1973.

9.      Environmental Protection Agency, Proposed Effluent Limitations
        Guidelines for Existing Sources and Standards for New Sources;
        Meat Products Point Source Category, Federal Register, Vol 38,
        No. 207, Washington, D.C., October 29, 1973.
                                    309

-------
10.     Environmental Protection Agency. Proposed Rules; Effluent Limit-
        ations Guidelines for Asbestos Manufacturing Point Source
        Category. Federal Register, Vol 38, No. 208, Washington,  B.C.,
        October 30, 1973.

11.     Environmental Protection Agency. Proposed Effluent Limitations
        Guidelines for Existing Sources and Standards for New Sources;
        Canned and Preserved Fruits and Vegetables Processing Industry
        Category. Federal Register, Vol 38, No. 216, Washington,  B.C.,
        November 9, 1973.

12.     Environmental Protection Agency. Proposed Effluent Limitations
        Guidelines; Nonferrous Metals Manufacturing Point Source  Category.
        Federal Register, Vol 38, No. 232, Washington, D.C., November 30,
        1973.

13.     Environmental Protection Agency. Grain Mills, Effluent Limitations
        Guidelines, Federal Register, Vol 38, No. 232, Washington, B.C.,
        December 4, 1973.

14.     Environmental Protection Agency, Fertilizer Industry Leather
        Tanning and Finishing Industry Sugar Processing Industry; Effluent
        Limitations Guidelines and New Source Performance Standards.
        Federal Register, Vol 38, No. 235, Washington, B.C., Becember 7,
        1973.

15.     Environmental Protection Agency. Proposal Regarding Minimizing
        Adverse Environmental Impact; Cooling Water Intake Structures.
        Federal Register, Vol 38, No. 239, Washington, B.C., Becember 13,
        1973.

16.     Environmental Protection Agency. Effluent Limitation Guidelines
        and New Source Standards; Petroleum Refining Point Source
        Category. Federal Register, Vol 38, No. 240. Washington,  B.C.,
        Becember 14, 1973.

17.     Environmental Protection Agency. Organic Chemicals Manufacturing
        Industry; Proposed Effluent Limitations Guidelines. Federal
        Register, Vol 38, No. 241, Washington, B.C., Becember 17, 1973.

18.     Environmental Protection Agency, Bairy Products Processing Industry;
        Proposed Effluent Limitations Guidelines. Federal Register, Vol 38,
        No. 244, Washington, B.C., Becember 20, 1973.
                                      310

-------
19.      Environmental Protection Agency, Proposed Effluent Limitations
         Guidelines and New Source Standards; Soap and Detergent Manu-
         facturing Point Source Category. Federal Register, Vol 38, No. 246,
         Washington, B.C., December 26, 1973.

20.      Environmental Protection Agency. Effluent Limitations Guidelines;
         Builders Paper and Board Manufacturing Point Source Category.
         Federal Register, Vol 39, No. 9, Washington, D.C., January 14,
         1974.

21.      Environmental Protection Agency.  NPDES Self-Monitoring Require-
         ments - Program Guidance.  Attachment C of Memorandum from Don
         Lewis, Project Officer, Office of Research and Development, EPA,
         Washington, D.C., October 23, 1973.

22.      Prati, L., et al.   "Assessment of Surface Water Quality by a
         Single Index of Pollution," Water Reserach, (GB),  Vol 5, pp.  741-
         751, 1971.

23.      Horton, R.K.   An Index-Number System for Rating Water Quality.
         Water Pollution Control Federation Journal, 37,  pp.  300-306,
         March, 1965.

24.      McClelland, N.I., Water Quality Index Application in the Kansas
         River Basin, Report No. EPA-907/9-74-001, U.S. Environmental
         Protection Agency, Kansas City, February, 1974.

25.      Dee, N., et al.   Environmental Evaluation System for Water
         Resource Planning.  Battelle Columbus Labs, January 1972.

26.      McKee, J., and Wolf,  H.,  (Eds.), Water Quality Criteria, Second
         Edition, State Water  Resources Control Board,  California,
         Publication No. 3-A,  1963.

27.      Water Quality Criteria, Report of the National Technical Advisory
         Committee, U.S. Department  of Interior,  Washington,  D.C.,  1968.

28.      Raiffa, H. and Schlaiffer,  R.  Applied Statistical Decision Theory,
         The M.I.T. Press, Cambridge., Mass., 1961.

29.      Hydroscience, Inc.  Simplified Mathematical Modeling of Water
         Quality.  Report to EPA,  Washington, D.C.,  March,  1971.
                                     311

-------
30.     Hann, Jr., R.W. ,  et al.   Evaluation of Factors Affecting Discharge
        Quality Variation.  Environmental Engineering Division, Civil
        Engineering Department,  Texas A&M University, September, 1972.

31.     Tarazi, D.S., et al.  Comparison of Waste Water Sampling Techniques.
        J. Water Pollution Control Federation, 42, (5), 1970.

32.     Budenaers, D. and A. Cohen.  Relative Efficiency of Range Versus
        Standard Deviation for Large Sample Sizes.  Systems Control, Inc.,
        (Technical Memorandum 5112-01), Palo Alto, California, May 14,
        1975.
                                   312

-------
                        LIST OF SYMBOLS (for Section 4)
Symbol                          Meaning




  A         A constant (in 10)




  C.        Expected extent of undetected violations




  c.        Violation weighting factor per source




  D         Expected extent of violation, per constituent




  f         The standard normal probability density function




  G         Scaling factor




  h         Data discounting constant




  i         Source number




  j         Constituent number




  k         Weighting factor function (WFF) constant




  L         Lognorraal distribution




  L.        Maximum number of examples required at source i




  £         Minimum number of examples required at source i




  M         Constituent mass loading rate (or concentration)




  m         Sample mean




  N         Normal distribution




  n         Sample size




  P.        Probability of non-violation per source




  p .        Probability of non-violation per constituent




  R         Total compliance monitoring cost
                             313

-------
Symbol                         Meaning




  r.        Compliance monitoring cost per source




  S        Effleunt standard,  for a constituent




  S        Lower effleunt standard for pH




  S        Upper effluent standard for pH




  s.        Sampling rate




  W        Weighting factor




  x        Normalized effluent standard




  y        Any data value (general)




  z        Compliance monitoring data point




  a        Reliability weighting factor




  A        An increment of




  n        Confidence parameter for u




  6        Receiving water concentration standard




  U.        Marginal return




  v        Confidence parameter for a




  5        Sample maximum




 PI       Product of




  p        Ratio of sample maximum to sample mean




           Sum of




  a        Estimated standard deviation




  $        The standard normal cumulative distribution function




  u        Sample minimum
                                 314

-------
                                    TECHNICAL REPORT DATA
                            (Please read Instructions on the reverse before completing!
 1. REPORT NO.
  EPA-600/5-76-012
                                                            3. RECIPIENT'S ACCESSION»NO.
 4. TITLE AND SUBTITLE

  USER HANDBOOK FOR THE  ALLOCATION OF COMPLIANCE
  MONITORING RESOURCES
              5. REPORT DATE
              December  1976 (Issuing date)
              6. PERFORMING ORGANIZATION CODE
 7. AUTHOR(S)
  G.  Paul Grimsrud, E.  John  Finnemore, Wendy J.  Winkler,
  Ronnie N.  Patton, Arthur I.  Cohen                	
                                                            8. PERFORMING ORGANIZATION REPORT NO
 9. PERFORMING ORGANIZATION NAME AND ADDRESS
  Systems Control, Inc.
  1801  Page Mill Road
  Palo  Alto,  California  94304
                                                            10. PROGRAM ELEMENT NO.
                 1HC619
              11. CONTRACT/GRANT NO.

                 68-01-2232
 12, SPONSORING AGf N£Y NAME AND ADDRESS
 Office of Air,  Land  and Water Use - Wash., DC
 Office of Research and Development
 U.S.  Environmental Protection Agency
 Washington,  DC  20460
              13. TYPE OF REPORT AND PERIOD COVERED
                JEinal
              14. SPONSORING AGENCY CODE

                 EPA/600/16
 15. SUPPLEMENTARY NOTES
 16. ABSTRACT

  This  report is designed  as  a handbook specifically oriented to environmental
  planners and managers.   It  presents the development and successful  demonstration
  of  hand and computerized procedures for the design of effluent compliance
  monitoring budgetary  resources so as to minimize  environmental damage.   The
  original technical development of these procedures is given in a companion report,
  "Quantitative Methods for Effluent Compliance Monitoring Resources  Allocation,"
  EPA-600/5-75-015.  Both  the computerized and hand  calculation procedures are
  demonstrated to function satisfactorily using data supplied by the  State of Michigan.

  This  report is submitted in fulfillment of Contract Number 68-01-2232,  by Systems
  Control, Inc., under  sponsorship of the Office  of  Research and Development,
  Environmental Protection Agency.
 7.
                                KEY WORDS AND DOCUMENT ANALYSIS
                  DESCRIPTORS
                                              b.lDENTIFIERS/OPEN ENDED TERMS
                           c.  COSATl Field/Group
  Wastewater
  Effluents
  Water Quality
  Statistical Analysis
  Cost Effectiveness
  Monitors
 Resource 'Allocation
 Program, Effluent
 Standards Compliance,
 Effluent Monitoring
14A
 8. DISTRIBUTION STATEMENT
    UNLIMITED
                                              19. SECURJTY CLASS (ThisReport)

                                                  TTNCT.ASSTFTF.n	
                           21. NO. OF PAGES

                                327
20. SECURITY CLASS (Thispage)
    UNCLASSIFIED
                                                                         22. PRICE
EPA Form 2220-1 (9-73)
                                           315
                                                  -U.S. GOVERNMEHT PRINTING OFFICE:  1977-757-056/5579 Region No. 5-11

-------
U.S. ENVIRONMENTAL PROTECTION AGENCY
    Office of Research and Development
         Technical Information Staff
           Cincinnati, Ohio 45268

           OFFICIAL BUSINESS
    PENALTY FOR PRIVATE USE, $300
  AN EQUAL OPPORTUNITY EMPLOYER
                                                             POSTAGE AND FEES PAID

                                                     U.S ENVIRONMENTAL PROTECTION AGENCY

                                                                     EPA-335


                                                            Special  Fourth-Class Rate
                                                                      Book
                    ^^^
                   MM
               D
\
 UJ
 o
 T
f
      i(D
      IE
      'O
      iCNJ
      !l-
                                               address is incorrect, please change on the above label;
                                        tear off; and return to the above address.
                                        If you do not desire to continue receiving this technical report
                                        series, CHECK HERE Q; tear oil label, and return it to the
                                        above address.

-------