United States
Environmental Protection
Agency
EPA bOO 3 82 '44
August 1 98?
Research and Development
Frequency
Analysis of Pesticide
Concentrations for
Risk Assessment
(Franco Model)
-------
EPA-600/3-82-044
August 1982
FREQUENCY ANALYSIS OF PESTICIDE CONCENTRATIONS
FOR RISK ASSESSMENT .(FRANCO MODEL)
by
A.R. Olsen and S.E. Wise
Battelle
Pacific Northwest Laboratories
Richland, Washington 99352
Contract No. 68-03-2613
Project Officer
Robert B. Ambrose
Technology Development and Applications Branch
Environmental Research Laboratory
Athens, Georgia 30613
ENVIRONMENTAL RESEARCH LABORATORY
OFFICE OF RESEARCH AND DEVELOPMENT
U.S. ENVIRONMENTAL PROTECTION AGENCY
ATHENS, GEORGIA 30613
-------
NOTICE
Mention of trade names or commercial products does not
constitute endorsement or recommendation for use.
-------
FOREWORD
As environmental controls become more costly to implement and the
penalties of judgment errors become more severe, environmental quality
management requires more efficient management tools based on greater know-
ledge of the environmental phenomena to be managed. As part of this Labora-
tory's research on the occurrence, movement, transformation, impact, and
control of environmental contaminants, the Technology Development and
Applications Branch develops management and engineering tools to help pollu-
tion control officials achieve water quality goals through watershed
management.
Many toxic contaminants are persistent and undergo complex interactions
in the environment. As an aid to environmental decision-makers, the Chemical
Migration and Risk Assessment Methodology was developed to predict the
occurrence and duration of pesticide concentrations in surface waters
receiving runoff from agricultural lands and to assess potential acute and
chronic damages to aquatic biota.
David W. Duttweiler
Director
Environmental Research Laboratory
Athens, Georgia
m
-------
ABSTRACT
This report describes a method for statistically characterizing the
occurrence and duration of pesticide concentrations in surface waters
receiving runoff from agricultural lands. The characterization bridges the
gap between simulated instream pesticide modeling and the risk assessment
information available from laboratory studies on aquatic biota. A computer
program FRANCO is given to complete the frequency analysis of concentration
characterization. The documentation is part of the Chemical Migration and
Risk Assessment Methodology.
Companion reports to this document are Methodology for Overland and
Instream Migration and Risk Assessment of Pesticides, User's Manual for the
Instream Sediment-Contaminant Transport Model SERATRA, User's Manual for"
EXPLORE-I: A River Basin Water Quality Model (Hydrodynamic Module Only),
and Mathematical Model SERATRA for Sediment-Contaminant Transport in Rivers
and Its Application to Pesticide Transport in Four Mile and Wolf Creeks in
Iowa.
This report was submitted in partial fulfillment of Contract No. 68-03-
2613 by Battelle Pacific Northwest Laboratories under the sponsorship of the
U.S. Environmental Protection Agency. This report covers the period April
1978 to January 1980, and work was completed as of January 1980.
-------
CONTENTS
ABSTRACT iv
ACKNOWLEDGMENTS vi
SECTION 1 - INTRODUCTION 1
SECTION 2 - FREQUENCY ANALYSIS OF CONCENTRATION CONCEPTS ... 2
SECTION 3 - HYPOTHETICAL EXAMPLE ILLUSTRATING FRANCO
COMPUTATION 8
SECTION 4 - FOUR MILE CREEK WATERSHED CASE STUDY 13
SECTION 5 - REFERENCES 37
APPENDIX A - FRANCO USER'S GUIDE 38
APPENDIX B - FRANCO PROGRAM MODULE DESCRIPTIONS 49
APPENDIX C - FRANCO SOURCE LISTING 58
-------
ACKNOWLEDGMENTS
We wish to acknowledge several people at Battelle, Pacific Northwest
Laboratories who significantly contributed to the development of the con-
cepts, and their implementation, for the statistical frequency analysis of
pesticides. Yasuo Onishi, Stuart M. Brown and Mary Ann Parkhurst ade-
quately described the information available as input to the analysis and
defined the toxicity information form. Without their help this program
could never have been designed. In the early stages of development,
Jim Johnston's painstaking attention to details and their implications was
invaluable. The assistance of Sharon Popp, Barbara Roberts and Mary Heid
in preparing this manuscript is greatly appreciated.
-------
SECTION 1
INTRODUCTION
In order to provide planners and decision makers in government and
industry with a sound basis for their decision making, a methodology is
needed to predict the occurrence and duration of pesticide concentrations
in surface waters receiving runoff from agricultural lands and to assess
the potential acute and chronic damages to aquatic biota. Such a method-
ology has been developed by Battelle, Pacific Northwest Laboratories (1).
The methodology consists of: 1) overland pesticide modeling, 2) instream
pesticide modeling, 3) statistical analysis of instream pesticide modeling
results, and 4) risk assessment procedure. This document describes the
methods and computer program used in the statistical analysis of the
pesticide concentrations
The statistical analysis was designed to bridge the gap between the
results of the instream pesticide modeling and the risk assessment infor-
mation available from laboratory studies on aquatic biota. The instream
pesticide model used in the methodology, SERATRA, provides detailed pesti-
cide concentration data over the simulated time period. For example, the
pesticide concentration is given for each half-hour for 3 years in the
case study used. A summary of this simulated pesticide time series is
necessary if it is to be useful in a risk assessment. The pesticide
concentration time series defines the information available for the
assessment. The particular summary selected is based on the toxicity
information available from laboratory studies. Results of acute bioassays
and toxicity testing are reported as the median lethal concentration
(LC50) for selected time periods, usually 24, 48 and 96 hours. Chronic
toxicity is usually recorded as the amount of toxicant causing measurable
effects- The maximum acceptable toxicant concentration (MATC) is one way
to describe the effect-no effect boundary for chronic toxicity. The
methods embodied in the frequency of Analysis Concentration (FRANCO) com-
puter program provide the link between the data available from SERATRA and
the available toxicity information.
The concepts underlying the procedures used by FRANCO are explained
in Section 2. This theoretical discussion is followed by a hypothetical
example in Section 3. Section 4 briefly describes an example from the
case study and illustrates the computer output available from FRANCO.
Appendix A contains a user's manual for running FRANCO. Appendix B
describes the functions of each of the modules in FRANCO and gives their
interrelationships. Appendix C contains the computer program source list-
ing for FRANCO.
1
-------
SECTION 2
FREQUENCY ANALYSIS OF CONCENTRATION CONCEPTS
Statistically summarizing the simulated pesticide concentrations
requires a precise interpretation of the phrase "frequency of occurrence
and duration of pesticide concentrations." The risk assessment method-
ology provides information on pesticide concentrations that will result in
an effect if the concentration remains at or above a specified level for a
certain length of time. This concept forms the basis for the statistical
summary. The summary of the simulated concentrations uses specific defi-
nitions for these terms: event and duration of an event. An event
defined by a concentration of C occurs when a sequence of simulated con-
centrations begins below C at time step tj_, becomes and remains greater
than or equal to C in subsequent time steps and then drops below C after
time step t^ (see Figure 1 where C is C$). This is referred to as an
event defined by concentration C. The duration of an event defined by
concentration C is the length of time from the beginning to the end of the
event, e.g., t2 - t]_.
Utilizing the preceding concept of an event FRANCO provides three
types of summaries: counts of time steps, counts of events and
LC-function global exceedance. The latter is defined subsequently. Let
Ci
-------
o
Csl
to
c
o
(13
+->
c
CD
(J
C
o
o
OJ
TD
•r—
O
CJ
CL
0)
S-
Cl)
CD
E
Q.
OJ
-M
OJ
E
QJ
•4-)
C_> O O
-------
The second summary is a count of the number of time steps in all
events defined by concentration C-j with a duration of dj or greater.
This is denoted as NT(C-j,d,-). When the duration is d]_, NT(C-j,di)
is equivalent to
The third summary measures the frequency of occurrence of concentra-
tions greater than or equal to C-j for all durations. Mathematically,
this is given by the fraction:
ANT(C>C.)
where T is the total simulation time and A is the time in a single time
step. PT(CIC-J) is a decreasing function of C-j with Py(C^O) = 1
and PT(C>Cmax) = 0 where Cmax is the maximum simulated concentration.
As an illustration of these summary measures, a particular time
series may indicate that for 10% of the time the concentration is greater
than or equal to C-j, i.e., Pj(C^C-j) = 0.10. At the same time the
total number of events that occurred during that fraction of the time may
be 5, i.e., NE(OC-j) = 5. In another case a single event may be respon-
sible for the 1035 figure, i.e., Pj(C^Ci) = 0.10 and NE(C^C-j) = 1.
The fourth summary gives frequency of occurrence information for
events categorized by duration. It is a generalization of the previous
summary and is defined as:
ANT(C.,d.)
PT«>C.,D>d..) = - ^_.
This gives the fraction of the total time there were events defined by
concentration C-j that extended for durations of dj or greater.
The following two relative frequency summaries only consider events
defined by a single concentration level C-j. They are useful when rela-
tive frequency information is desired for durations while only considering
a single concentration level to define the events. The summaries are:
NE(C,,d )
and
NT(C.,d.)
PT(D>d.j C>C.)
-------
for j=l,2,...,n and i=l,2,...,m. They measure relative frequency with
respect to the number of events defined by concentration C-j and the
amount of time in events defined by concentration C-j, respectively.
Laboratory toxicity experiments provide the main basis for developing
a risk analysis for fish. A common method of summarizing the results of
these experiments is to use a medium lethal concentration LC50 where 50%
of the fish die. A concentration, say C96, is determined such that 50%
of the fish die when exposed continuously for a duration of 96 hours,
i.e., d96. The previous summaries give:
a) NE(C96,d96); the number of events defined by C96 with
durations of 96 hours or greater, and
b) Pj(C>C96,D:>d96); the fraction of the total time period
that the calculated concentration exceeds the 96 hour lethal
concentration.
Usually information for LC50 concentrations at 24, 48 and 96 hours is
available. This information may be combined in the form of an LC curve.
In this study it is assumed that an LC curve is represented by up to five
piecewise straight lines, as shown in Figure 2.
o
<
I—
LlJ
O
.12
,24
C96
12 24 96
DURATION
Figure 2. LC50 piecewise linear curves.
-------
The summary NE(C96, d96) is a count of the number of times the
calculated concentration time-series meets or exceeds the 96-hr LC50 value
(shaded region above the LC50 curve in Figure 2). This is termed a point
exceedance of the LC50 curve. Multiple point exceedances can be measured
by judicious choices of dn and C-j in the preceding discussion.
Py[Dxl96, C>C95] gives the fraction of the total time that the time
series is in the 96-hr point exceedance.
A more comprehensive measure of exceedance is to obtain the fraction
of the total simulation time that the calculated pesticide concentration
exceeds a LC50 curve (shaded region above the LC50 curve in Figure 3).
This is termed a global exceedance of the LC50 curve. It is defined as:
Pr(LC50) =
("number of time steps in distinct events -i
[such that (C.,d.) is above the LC50 curve A
1—J -*
o
<
\—
UJ
O
2T
O
,96
24 96
DURATION
Figure 3. Global exceedance of LC curve.
-------
This summarization can be conducted not only for an LC50 curve but for
other LC curves such as LC90, LC10, etc. An example of the use of this
summarization involves deciding whether fish will be killed by acute
toxicity or chronic toxicity under a certain condition. Assume that the
chronic toxicity has a duration of 96 hr or more. In order to obtain the
answer, summarization will be conducted for the following cases:
a) Case A has a LC curve shown by the solid line in Figure 3, b) as shown
in Figure 4, Case B has a LC50 curve which is the same as the LC50 in
Case A for the duration of 96 hr or more but is parallel to the vertical
axis at d = 96. PQ for Case A provides the fraction of the total time
that 50% of fish will be killed by both acute and chronic toxicity of its
pesticide. PQ for Case B provides the fraction of the total time that
50% of fish will be killed by chronic toxicity alone.
.12
<
at:
o
•^.
O
o
.96
12 24 96
DURATION
Figure 4. Global exceedance of LC curve for the
duration greater than 96 hr.
-------
SECTION 3
HYPOTHETICAL EXAMPLE ILLUSTRATING FRANCO COMPUTATIONS
The statistical summaries based on the concepts in Section 2 are com-
pleted by the Frequency Analysis of Concentration (FRANCO) program. The
analysis requires a set of concentration values and a set of durations to
be specified. The time series is summarized based on these specified
values by a count of the number of events defined by concentration level
C-j with a duration of dj or greater. This is denoted by NE(C-j,dj).
A second count is made of the number of time steps occurring for all
events defined by concentration level C-j with a duration of dj or
greater. This is denoted by NT(C-j.dj).
As an example, suppose C\t C2, Cq, CIQ, Ci5, and C20 are
the specified concentrations and dj_, d5, d}Q» d^5 and d2Q are
the specified durations. Table 1 presents the number of events defined by
concentration levels C-j and duration dj for the data given in Figure 1.
TABLE 1. NUMBER OF EVENTS DEFINED BY CONCENTRATIONS C WITH
FOR DAT
Duration
DURATIONS OF dj OR GREATER FOR DATA IN FIGURE 1
Concentration
C4
C10
Cl5
dl
1
3
4
4
3
0
^5
1
2
2
1
0
0
dlO
1
2
1
0
0
0
4l5
1
1
1
0
0
0
^20
1
0
0
0
0
0
Table 2 presents the number of time steps occurring for all events
defined by concentration levels C-j and durations dj. In the example
d]_ was selected to be one time step, C]_ to be zero, and C2 to be a
model output cutoff value above which calculated instream dissolved
-------
pesticide concentrations are statistically analyzed. These choices are
necessary for further analyses to be meaningful. Under these restrictions
the total number of time steps in the study period is given by
NT(Ci,di), the number of time steps with simulated concentrations
above the model cutoff by NT(C2,di) and the number of events defined
by concentrations above the model cutoff by NE(C2,dj).
TABLE 2. NUMBER OF TIME STEPS FOR EVENTS DEFINED BY CONCENTRATIONS
HEATER FOF
Duration
WITH DURATIONS OF dj OR GREATER FOR DATA IN FIGURE 1.
Concentration
Cl
C2
C4
Cl5
C20
dl
40
35
28
13
4
0
d5
40
33
24
6
0
0
410
40
33
17
0
0
0
dl5
40
19
17
0
0
0
d20
40
0
0
0
0
0
In addition to the tabular summaries of numbers of events and time
steps, a compilation of each individual event defined by the input con-
centrations C-j is kept internally in FRANCO. This compilation, in the
order that is actually completed, is presented in Table 3 to clarify sub-
sequent concepts. Event concentration refers to the concentration level
that defines the event.
More specific information is obtained by considering the duration of
the events. For example, if a 10-hr LC50 value is given by Cq, then the
number of times this occurred, the total time during these occurrences and
the percent of time during the study period this LC50 condition was
exceeded is available. The number of events is given by
the amount of time by NT(C4,djo) and the percent of time by
NT(C4,d-|n)/NT(C;L,d;i). All of these are available as output from
FRANCO, this is valuable in the risk assessment methodology as it gives
information on whether the instream pesticide concentration exceeds
specific laboratory determined LC50 conditions.
If more than one LC50 condition is of interest, then each can be con-
sidered separately using the above approach. In that case care in the
interpretation of the results is necessary because of possible double
counting of times and events. An alternative summary termed global
exceedance is given to eliminate double counting. Global exceedance is
based on the same concept as an LC50 function. An LC50 function can be
-------
TABLE 3. COMPILATION OF EVENTS IN ORDER OF OCCURRENCE
FOR EXAMPLE DATA
Ending Time Step Number of Time Steps Event Concentration
5 1
7 4
15 2
17 6
19 17 C4
20 19 C2
23 1 C4
24 2 C2
26 1 C15
26 1 CIQ
28 3 C4
34 2 CIQ
37 7 C4
39 14 C2
40 40 G
defined by specifying pairs of concentration and duration values based on
LC50 experiments. By connecting these pairs with straight line segments
and extending the function in a reasonable manner at each end, a function
is defined such that an event defined by a particular concentration level
with a particular duration can be classified as exceeding or not exceeding
the function i.e., exceeding an LC50 value (see Figure 5). An event
exceeds the LC function when the concentration defining the event and the
duration of the event results in the pair falling above and to the right
of the function. For the example data three events exceed LC function 1
(see Figure 5):
Ending Time Step Number of Time Steps Event Concentration
19 17 C4
17 6
15 2
10
-------
O
<
I—
LU
O
O
O
'20
15
'10
LC FUNCTION 1
LC FUNCTION 2
LC FUNCTIONS
dld2
10
DURATION
15
J20
Figure 5. Examples of functions used for global exceedance summary.
However, all three events occur during the same time period of the
study, i.e., they consist of different slices of the same pesticide con-
centration peak. The global exceedance summary eliminates this double
counting by reporting only those events with the lowest concentrations
that occur in different pesticide peaks. In this case only the event
defined by 04 is reported for LC function 1 in Figure 5. A summary is
given of the number of non-overlapping events above the LC function, the
time during the study spent above the LC function, expressed as time and
as a percent of the total study period.
By selecting different LC functions it is possible to differentiate
between short-term high concentration pesticide peaks and long-term low
concentration peaks. By specifying the LC function to be the model cutoff
concentration for all durations, as in LC function 3, the location of each
11
-------
pesticide occurrence instream can be determined as well as the global
exceedance summary information. Figure 5 shows three LC functions which
split the concentration-duration space into four non-overlapping regions
(numbered 1 to 4). The percent of time spent in each region can be deter-
mined from the global exceedance percent summary. First LC function 1 is
exceeded 42.5% of the time, LC function 2 is exceeded 45% of the time, and
LC function 3 is exceeded 87.5% of the time. Therefore, during the study
period the time spent in each region is:
Region 1 42.5%
Region 2 2.5%
Region 3 42.5%
Region 4 12.5%
An interpretation of these numbers might be that 12.5% of the. time no
significant pesticide concentration was present instream with the remain-
ing 87.5% divided among acute episodes 2.5%, chronic episodes 42.5% and
potential but undetermined effects 42.5%.
12
-------
SECTION 4
FOUR MILE CREEK WATERSHED CASE STUDY
The dissolved pesticide distribution near the mouth of Wolf Creek
River Kilometer 5 was selected to illustrate FRANCO analysis procedures.
A complete description of the case study can be found in Onishi et al. (1).
The pesticide migration was simulated for the three-year period June 1,
1971 to May 31, 1974. The simulation results near the mouth of Wolf Creek
were analyzed. A 30-minute time step was used, resulting in 51,264 simu-
lated dissolved pesticide concentrations to be summarized by FRANCO.
Data input for FRANCO requires concentration and duration values to
be selected based on the laboratory toxicity information and preliminary
information on the concentration and durations expected from the SERATRA
simulation. Table 4 summarizes the risk assessment information used in
defining the input. SERATRA uses a cutoff value of Ixl0'9 kg/m3 for
dissolved pesticide concentration. It is assumed that simulated con-
centrations below that value are zero. This basic information was used to
define the input for FRANCO. A complete description of the input proce-
dures is given in Appendix A.
TABLE 4. CONCENTRATION AND DURATIONS FROM RISK ASSESSMENT
RELATIVE TO FRANCO INPUT
LC 50 Concentrations (kg/m3)
Toxaphene Alachor
24-hour LC50 1.15 x 1Q-5 9.6 x 10~3
48-hour LC50 8.4 x 10~6 7.8 x 10'3
96-hour LC50 8.4 x 10~6 3.7 x 1Q-3
MATC 1.5 x ID'8 1.9 x 10~4
FRANCO'S input procedure presently requires the user to judiciously
select the concentrations and durations to be used for summarization. The
risk assessment information is used to assure that the basic information
desired is available. For this case the seven concentration values in
Table 4 and the SERATRA cutoff value were used as concentration input
values. A user determined number of concentration values between the
input concentrations were logarithmically interpolated by FRANCO. The
number to be interpretated is chosen to provide a smooth description of
13
-------
the simulated concentration distribution. A trial and error process is
used to obtain approximately an equal number of time steps between succes-
sive concentration levels.
The durations selected should include the LC50 durations as well as
reflect the durations that are expected to occur or be of interest. In
general, as many concentration and durations as FRANCO allows should be
used.
The global exceedance summary requires LC curves to be specified as
indicated in Section 2. The curves are specified by concentration dura-
tion pairs that define the endpoints of each piecewise linear segment. A
maximum of five such functions may be specified in a FRANCO run. Detailed
procedures for selecting these LC curves are given in the risk assessment
methodology description in Onishi et al. (1).
The output available from FRANCO is presented at the end of this
section. The information given to control FRANCO is repeated for the
convenience of the user. This is followed by five large tables giving
detailed information about the frequency of occurrence and duration of
dissolved pesticide concentrations. For example, the first table indi-
cates that nine distinct events occurred during the simulation when the
concentration exceeded the SERATRA cutoff value. Moreover, these events
involved 8,201 time steps (next table) which accounted for 16.0% of the
simulation (fifth table). By considering events with longer durations, it
is learned that three events with durations greater than 672 hours
accounted for 6,193 of the time steps or 12.1% of the total time. This
implies that the dissolved pesticide concentration exceeded the cutoff
value only a few times but that one-third of these lasted for more than
4 weeks each. At no time did the dissolved pesticide concentration exceed
the Alachlor MATC of 1.9 x 10~4.
FRANCO can also be used to determine the number of events, the number
of time steps and the percent of the simulation period the dissolved pes-
ticide concentration exceeded the 24-hr LC50 concentration (1.15 x 10~5)
for toxaphene. In this simulation this occurred twice involving 628 time
steps (314 hours) which was 1.2% of the time. Similarly, for the 96-hr
LC50 concentration of 8.4 x 10~6, this occurred twice involving 595 time
steps (297.5 hours) or 1.2% of the time. Although the summary statistics
do not indicate it, it would be suspected that these two events are the
same in both cases. When the 24-hr concentration was exceeded, the con-
centration was high enough to also exceed the 96-hr value.
A global exceedance summary for five LC curves follows the initial
five concentration-duration tables. This summary uses the concepts of
global exceedance as defined in Section 2. The five curves are:
- SERATRA cutoff
- MATC for Toxaphene
- Lethality curve least likely to indicate mortality
- LC50-MATC conservative curve
- LC50-MATC alternative curve.
14
-------
The actual concentration-duration pairs used are given in the FRANCO out-
put. A complete discussion of the rationale behind the curves is given in
Onishi et al. (1). The first function is simply a horizontal line at the
SERATRA cutoff value. The summary is a repetition of the information con-
tained in previous tables. The second function is set at toxaphene's MATC
value for events of any duration, i.e., horizontal line. The summary
shows the MATC value was exceeded by 12 distinct events and this accounted
for 14.9% of the simulation period. More detailed information can be
obtained from previous tables The third function is defined by the three
LC50 values with the function extended vertically at 4 hours and hori-
zontally at a concentration of 8.4 x 10~6. The simulated concentration
exceeded this LC function for two distinct events which accounted for 1.2%
of the total time. This global summary eliminates the possibility of
double counting certain time periods as a result of the concentration
exceeding more than one LC50 value, e.g., both the 24-hr and 96-hr LC con-
centration. It is this aspect that makes the concept of global exceedance
useful.
Detailed information about the events exceeding each LC curve is
available as optional output from FRANCO. Each event exceeding the LC
curve is tabulated by the ending time step of the event, the duration of
the event and the concentration level defining the event. For the first
LC curve, the location of each event exceeding the SERATRA cutoff value is
given.
The remainder of the FRANCO output was designed to characterize the
concentration distribution of the dissolved pesticide concentration when
both duration and time sequence were ignored. This part of the program
was originally implemented as part of a simplified methodology and is not
an integral part of the risk assessment summarization. A brief descrip-
tion is included here for completeness.
The FRANCO program summarizes the time series of instream dissolved
particulate pesticide concentrations. The series is characterized by
periods when pesticide concentration is lower than the chosen SERATRA
cutoff value and other periods with runoff events causing the concen-
tration to increase above this value The cutoff value is selected to
represent the point below which the simulated concentration values are due
to limitations on the numerical accuracy of the model and the computer.
Hence, time periods below this concentration are considered to be zero.
As a result, the relative frequency of pesticide concentration consists of
two parts: A discrete part at the SERATRA cutoff value with an associated
frequency that estimates the percent of the time the concentration is con-
sidered to be zero and a continuous part that summarizes the relative
frequency of concentrations above the cutoff value.
Let Ci equal zero, C2 equal the cutoff value and the remaining
C-j chosen such that C3
-------
6(0 = pF(C) + (l-p)I(C)
where: p = Pj[C >_ 02] is the relative frequency of concentrations
occurring above the cutoff value, I(C) is a discrete cumulative frequency
function with probability one at the cutoff value, and F(C) is a
continuous distribution function.
During the 3-yr period starting June 1, 1971, the dissolved pesticide
concentration was greater than the cutoff value of 1.0 x 10"9 for 16.23%
of the time. Hence, p is estimated as 0.1623. The continuous part F(C)
of the cumulative distribution function G(C) is well represented by the
log-normal distribution. A probability plot constructed from the cumula-
tive frequency concentration data illustrates this fit (see output from
FRANCO). Similar probability plots using the normal and gamma distri-
butions as alternative choices did not result in the expected straight
line plot characteristic when the data fits a particular probability dis-
tribution. The log-normal probability density function is:
-| (£n X - )2/a2
f(X) = — e X > 0.
X a /2
2
Stated in this form, the parameters y and a are estimated by
*„ x,
y =
n ^ 9
| (An X1 - yr
nTI
where n is the number of concentrations greater than the SERATRA cutoff
value and X^ are the simulated dissolved pesticide^concentrations^for
those time steps. In this case the estimates are y = -14.83 and a = 2.26.
The mean and variance of the log-normal distribution are
E(X) =
9 r n2
Var(X) = E(Xr e
16
-------
Using the estimated values for y and a2, the estimates are E(X) = 4.66 x
10~6 with a standard deviation of 5.97 x 10~5.
The statistical distribution summary for the dissolved pesticide con-
centration is completed by the program FRANCO. The distribution parameter
estimates are obtained from all concentrations greater than or equal to
the SERATRA cutoff value. Because of the number of time steps involved,
these estimates are computed by summarizing the data with a flow-through
technique that does not require all the data to be present at once. In
constructing the probability plots, a modification of the standard proce-
dure, such as described by Hann (2), was necessary. It was not feasible
for all data points to be plotted individually for the probability plot.
To overcome this difficulty the data were accumulated as an empirical
cumulative distribution function with up to 50 intervals used for the con-
centration. The probability plot was constructed using those values. The
effect on the plot is minimal if these concentration values are appro-
priately selected to result in approximately an equal number of time steps
in each interval. The interpretation of the plot is not affected.
The dissolved pesticide concentration at Wolf Creek River Kilometer 5
is adequately summarized by the mixed distribution:
6(C) = 0.1623LN(C;-14.83,2.26) + 0.8377I(C)
where
,-9
•c
C > 1.0 x 10"
KO
C < 1.0 x 10"
and LN(C;y,a) denotes the log-normal distribution with parameters y and
a. A severe limitation of this summary is the total loss of all infor-
mation concerning the actual time sequence of the concentrations.
17
-------
FRANCO
SEGMENT n DISSOLVED PESTICIDE (K«/M««J) RUN NO. i
CALCULATE" CONCENTRATIONS IUPUT FUF. NAME --OPJI1 1«», M T IMSERIES.DAT
CONCENTRATION* MF THE RESULTS FRO« --» SESATRA STMUL»TIOW
THE DATA FJFLn 10 8E ANALVSIZFO IS NUMBER -- 1
STAPTINC- TIMF STEP NUHBFR -. 1
ENDING TI"f STEP NUMBER --51ZM
ANALYZING SEGMENT NUMBF" -- T
ANALYSIS TIMF STEP .- a, 50 HOUR
UATA ANALYZED IS — RAW
CONCENTRATION INPUT METHOD -. 3
THE TH1RO MFTHO» HAS BEEN CHOOSEN FOR INPUTTING CONCENTRATIONS
Hl LIMIT FUR RANIiF. 1
0 MIII18ER OF INTEWI1 VILUES IN RANGE 1
W LIMIT FOR RANGE 1
5 MUllUER OF INTERIM VALUES IN RANGE i
V» LIMIT FOR RANRE «
?5 NilMHEX OF INTERIM VALUES IN RANGE J
wiS LIMP FOR RANGE J
0 NUM8E" OF INTERIM VALUES IN RUNGE
!.lSf,c»fiF-['5 LI'lIT FOR TANGE 0
IB riUHHER OF INIFRIM VALUES IN RANGE 3
fii LIMIT FOR RANGE 5
NIIMHEP OF INtEHIM VALUES IN RANGE
LI'^IT FOR RANGE 6
0 NU'lflt« OF INTERIM VALUES IN RANGE T
aj LIMIT FOR 9ANRE 7
« NHiihEH OF INTERIM VALUES IN RANGE 8
9.fcBB("H( .«J LUIT Ft") RANGE 0
hiiHUEH OF VALUES (COMPUTED)
j.iiJCTF-e
5 b.MJM IE-H5
(HIKMION INPUT MEI
CONCENTRATIONS [CALCULATED)
J4I1BE-08 I.05IJ8E-C17 |.34086E>07
7,3fc«,8JF-07 9,J9»«|E-07 1.198*^-06 1.52B9BE-B6
S 1.91097E-05 Z,071t3E-fV5 3.18S60E-B5
2.44856E-B8
2.78281E-07
lil'K AT T0'*'<* T'1 f*F RFAO
SPECIFIED DURATIONS
GLOBAL FKCfFUAMCt INPUT
NUKnER OF PIECFWTIt LINEAR FUNCTIONS
NUMBER UF IIJKATInM, CTNCE N TR A T ION PAIRS
CONI ENTRATION l.0n0i»0E-09
? DURATI1IN 3.000B0E-01
CUNCEMTRATIDN
CONCENTRATION
DURATION
CONCENTRATION
DURATION
l.l503>0E-04^
S.0B000E-n)
I.150B0E-P5
5.000PI>E-1»1
1.15BCEE-05
I.15BHBE-05
"0 LC COIlTINUdllS FUNCTION EKCFEDANCF ANALYSIS TO BE PERFORMED
,60B00Et01
,50B00E-0«
,4BBB0E-B«
,400B0E-0fi
.(KI0BUE-B*
.560BHE40Z
.4B0BBEFB6
18
-------
«B
•
nt
a>
•c
tr
UJ
<
UJ
a:
or
o
(9
s
B
ru
in
a; 2
co
•z o s
o o z •
ft c m
*- >- «-i r-
< IT H-
a: •*
3 o or
o tu 3
z s
X UJ
•- D
U. iU
C I
I
>—
z
K.
•
cu
U^U^UJU^ UJU.
o
u
19
-------
(9
E
S
G>
-------
DC f
3 UJ
U tt
(_] u
c
a:
a c
UJ
Or CJ
IE
or 2
o o
" or
C I-
2.
U_ ul
O O
2
- >-«
cr
13
o
U
f- O
CO
u t-
z z
< UJ
_J >
a. uj
a
UJ
«• »» « m K> nt
K> KI KI
a: (5 & (U
| |^| |fj \^ y_J ^ i ^
'
-------
(9
6!
o
»
(V
O
IS
»
-------
O
»
ni
a:
UJ
UJ
or
>- tt
•< O
UJ
o: ^
u. ct
O t-
•2. 10
ou
or o
^ >- ++
O tt (-
<
•« c or
U 3!
S 2 O
U- >
S UJ
t-J X
.1 t-
- •
-------
•e
fu
z
o
i/- sj — a: tc =» 0.1 »-- jr o- cr ru IT.
24
-------
s
s
m
<-«itin« OBS
a
^ a
o iu
o»-
O •<
uj
CECC
uj o
UJ O
Q:
b. •«
O or
m z
zuj
O O
< u o
CE >- >-<
3 CD •-
c «
O IT
I UJ Z>
*- 2 O
•~t!-!
3; k.
U. UJ
j: >
u, x
o t-
UJ >-
is •»
•< i
t— »—
2
UJ Z
CJUJ
a >
uj «-i
a e
E. 6. i C,
& ri s. ^
) — r~ ac —
i t 7 E. c, : ,
5. tt fi SG
25
-------
*>
«
«
nt
a
o
2
O
26
-------
or
or uJ
c »-
a
U_ G
O
z «-•
O (->
c t-
<
1 or
en z s
K- o G
IU C >- »^ r-
uu IE •-
•«
c o a
O UJ 3
»- Z C
•f UJ
t~
t- O
U-
o or
a
ts
csrvi — c-^
r. SKIITSC
27
-------
to
ID
•a
m
o m
o
28
-------
UlUhlhjhJUbitLiUJkJ
S«BSS«GSSB8
SCBSSieSetSBS
(9SSSBCBSSBS
I UJ uj UA teJ UJ UJ U UJ UJ Ul UJ UJ *»* *•' U1 ul *** Si1 **'
z
o
> UJ Z Kl (O K> IS Kl
o uJ cu o ni m ni
x u • • • • •
or ^? E •
0. CD
O O
UJU1UJUJUJUJUJUJUJUJ < UJ UJ UJ Ul U UJ UJ UJ UJ UJ
or OD z ssstassssss k-
u.z *— •- zsseomi
U)U-"-« ZZ z < . . . .
U O O i-l Ul O X G> BO O — >
Z *"> X **!>^^>f\*M4)l
u> o +» + »+i+t + t «o iiiiiiiiii a uj
« •••••••••• o ••••«••«••
O -0 (O IIIUJO
-J Ul Z Z >i
(S Z O « »-
•*«««-*ir>v4m«« a.z
UJ tlll-flltll Z IIIIIIIIII U) U.
^1 (9 S 1O S S (S *•* S ** 9 O
z .......... n-
_i uj »—
Z2ZZT»-« z5
C C O C O I
zarzttzaizckzar >^ a. a. CL o. a. >-ttz(^(Vf\i^fv
O>— C^-C*— Or— CJ>- IL UJ UJ UJ Ui UJ OTUJ.UJ ««
arzaezcrzcKzirz t-c»-o»-o»-o>-o nzu.
— O^OljOOOOC ZJZ.J2_JZ.JZ_J CO C
OOCCJOL>CUOC_I *>^0)*^ao»-(Cf>v-tQ^»^tf>
UJ
2 Z U Z
o c z o
«" «-l « M
*-— i\i»n«9ir >-—^rvKi'ssiri oi-^^Ai^^in
u u uj u
z z uj z
29
-------
SEGMENT 71 DISSOlVFO PESTICIDE (KG/M**3) HUN NO. 1
TTME STF.P
LC FUNCTION * 1
I.F.NNTH UF FVFNT (HOUR) FVFNT CONCENTRATION
1031.0
196.5
96.5
253.a
12P9.5
290,Cl
.00000E-09
.00PI00E-PI9
.009006-09
.000006-09
ENDING M»t STFP
LC FUNCTION # 2
IENQ1H OF EVFNT (HOUR) EVENT CONCENTRATION
8153
1899
178S
1535
ENDING TTME STEP
106.0
66.5
998.5
52.0
86.5
54.5
2J8.5
1257.5
117.5
37.0
.50000E-PI8
,5fl0i&flE-08
.50H00E-0"
.50000E-08
LC FUNCTION « 3
LENUTH OF EVENT (HOUR) EVENT CONCENTRATION
TtMt SUP
.496.5
'117.5
LC FUNCTION # H
I.F.NHIH OF EVENT tnouR) EVENT CONCENTRATION
1 "JMl 1
?I53
153S
lIMt hfFP
998,5
?t8,5
1557.5
U7.5
I FNf,TH OF f-.VFNT (HOUR)
i .
FUNCTION » s
f CONCENTRAIION
7 7 '4
30
-------
i~*ru(u a
u »^»-«->-< — «y^-.^^-«-.-.^-<-< — ru«(»xjAi«»iAj«ucu«o>nK>K>KiK>»nojrw-«-«—•*">-"«»•-•-'»» s si
»-
«D /-.
Ul +
!•->_» «—<~«vi«vn-'-" — -" — K—is—<«XjoMr-9(uc-Aimf^<>«>«mK)ir>-ms04>»«4>r-^-«Me>m<^r-ri^ir>x^ii
Ul O
33 • _J
I v *«tr^-«-r>»ofn»»iKii»iKi»»>i\ic»)r\icvi-»»<-«-"-««>»^ir«>onicu«»-»-<-<-»KiK>B»KS»6»s>«"«»»-«-«—«-"-"«->-«-*«»aO«D^Vl>»KtO>r<'>-&^>G;^*H*tn9'*D*~GO'fUOTr\JK>*?9fMKtKt&nir»»B8GG&G>G
« z _________
CO
a> —•
o a. +
Z ID <-•
< >— *-*
10 U
a; h.'(j -»— —— — -<-^.-«^.K)ai\j<»Kiru«v^r\i-< — — — —--"fvifo
•« s: •
a: •-! w
r *-«-.
3 >-•
xr~c>s(ax(unimininin>4>4>«r^^»^eira>DO'O>o-o-^(5Bisc&s
->- ,<^,«»._
c a. o
z
o
i-i U)
>- I. r*
< ^- •-* »-*
K Z t- «-"
«- U, t»
Z U _J •
ui a •< A
U Ul k- CJ
z a. o
o >-
u
c. u
•»-* *«»«ct»>-r»f^^>^r-r-*^*ir«r«r5»io»ri(n<\i«V)cV'
->
z u
u. •
> A
Ul CJ
*
u ——<-«»»-^ — —.-.-. — nrnjcurtruJufuruftjcvii^KifoKiK. >^>rKiK>Kitj=»«o«?siao=i3ir>
z
o co«)«>h-»^t-.f~i^r-r-f~r^r^^)^!^>^)^i-o>c*^)inmintrifiiPininir<^
(J
z
o •««~«mKt^><^~*w«c\ii'')fim4>9v4v««*fM'\jfO9irt»<>'&>~*«-*«i*AjK)9irt-^«o««*«v«<\!Kt4m^o«H*v*«i*«oi|'tr»*9
jj
31
-------
o
o
o
•>
o
9
IU
o
6J
«B <
D
or
a
in 6, s
G> S S
I + +
Hi UJ U
CD ^- I*"
»- a- s
" IV *
CS
D
a
^
x.
2 «
O I-
o r;
o a>
is •-•
or
UJ »-
a
c
cr
I
(J
c
> c.
aJ >-
C- *) --
4
c -*-
f- 2 UJ
•O 4 1C
UJ
• T. «
a cs i
o o <
2 _IO
32
-------
B>
S
*
*
tu
s
Ml
s
C9
• I
IS
I I
I t
u
I «
»n
I •
K.
I I
4- I
tu
n i
i •
s
I i
u + •
> Ul
•i SI
»- «
« • I
_t K
=) I «
I *
u;
i s.
« IV I
•
&
K.
ni
33
-------
I
u
a
I I
MJ
I ">
C
*-
C -J
_l •*
a. r
a:
v O
I I
U.
t o-
o-
I •
C5
t tf>
"« »— K> 5T *
z ** o- s
at a »*> ii
c *- sr iu
2 -z «• 4i
u. • •&
(J 9 » I
UJ < T
tT I »—
34
-------
ni
s
u
ni
G>
+
u
ni
s
(5
+
Ul
» I
tu
r- I
E> «
& • I
Ul II
o
_4
a.
s>
<
o
o
ct "
o
(9 •-* 9 »1 I
O >- I • —
_I7 — - I
* •> I C5
3 >- II
es x •
< z +
• ni
I •
s
t i
s
+
UJ
* nj
l +
tu
i ir
z
x
•) •-
•< o •»
02 —
•- e uj
2 x a.
UJ C X
'CJ w ui
2 a
> X
or •«
UJ I
-------
•*>
•
K
I
v
«r
ni
i
u
ni
i i
lu
I r»
fl •
S
fl *
oj
I I
• I
es
i
c •«
_> z
0. X
^
>- o
»-
*-l tf>
I I
1C
i er-
a
i •
O
or =r
a o
i i
UI
-O I
X
a
UJ UJ
C
ft
C
c
^
a.
o
o
I
lu
•c
36
-------
SECTION 5
REFERENCES
Onishi, Y., S. M. Brown, A. R. Olsen, M. A. Parkhurst, S. E. Wise and
W. H. Walters. 1979. "Methodology for Overland and Instream Migra-
tion and Risk Assessment of Pesticides." Battelle, Pacific Northwest
Laboratories, Richland, WA.
Hann, C. T. 1977. Statistical Methods in Hydrology. Iowa State
University Press, Ames, IA.
37
-------
APPENDIX A
FRANCO USER'S GUIDE
FRANCO Operating Instructions
FRANCO is activated by typing the MCR command
MCR RUN FRANCO
and after it is loaded from the disk it announces itself and asks for the
control file specification.
+++++ FREQUENCY ANALYSIS PROGRAM +++++
ENTER THE NAME OF THE CONTROL FILE
The operator must respond with the name of the control file that has been
prepared for the analysis that is to be run. A proper response would be:
DPL:SEG2P253.CNL
FRANCO Control File Input Requirements
What follows is the description of the data that is required for a
FRANCO analysis. The explanation of each data consists of:
1) the data set number
2) the data set title
3) a short description of the data included in the set and any
precautions that must be taken.
4) the general format of each record in the set and the number of each
record that will be read.
5) a breakdown of each field of the records that include the position in
the record, the variable's name and the description of the values the
variable may be assigned.
The order of the data sets is implied by the set's number. The order of
the sets is as follows:
38
-------
Data Set Number
Title
1
2
3
4
5
6
7
Analysis Title
Data Source Specification
Time Specifications
Control Options
Specified Concentrations
Specified Durations
LC-50 Piecewise Linear Functions
Data Set 1 - ANALYSIS TITLE
This record is used to title and identify each analysis.
Format: 80A1
Columns Variable Description
1-80 TITLE 80 columns of alphanumeric information used to
title the output.
Example:
RIVER MILE 5: TOTAL PESTICIDE (KG/M**3)
Data Set 2 - DATA SOURCE SPECIFICATION
FRANCO will analyze the time series output of both the agricultural
overland runoff model ARM and the instream transport model SERATRA, but it
must be told which set of results is being analyzed. This data set
specifies the input file name, the source of the file and the field within
the data file to be analyzed.
Columns Variable
1-7
9-12
Source
JFIELD
Description
Source of the time series to be analyzed = ARM;
data are the results of an ARM simulation =
"SERATRA"; data are the results of SERATRA
simulation.
Both models write more than one type of data out to
the time series result files and this variable points
to the data within the output to be analyzed.
If SOURCE = "ARM" and
JFIELD = 1; Discharge (m3/sec)
= 2; Sediment (kg/min)
= 3; Sediment (g/1)
= 4; Dissolved pesticide (g/min)
39
-------
Columns Variable
Description
= 5; Dissolved pesticide (ppm)
= 6; Participate pesticide (g/min)
= 7; Participate pesticide (ppm).
If SOURCE
JFIELD
= 1:
= 2:
"SERATRA" and
Discharge (m3/sec)
Average sediment concentration
(kg/m3)
= 3; Average dissolved contaminant
(kg/m3 or pc/m3)
= 4; Average particulate contaminant
(kg/m3 or pc/m3)
= 5; Average particulate contaminant
(kg/kg or pc/kg)
= 6; Total contaminant (kg/m3 or pc/m3)
Columns Variable
Description
9-38
INPFIL
Column
1-10
11-16
17
18-21
22-29
30-37
38-45
46-53
54-61
62-69
70-77
File name description of the time series analysis
file containing the data to be analyzed. The time
series file from the ARM model is formatted FRANCO
expects the record layout to be as follows:
Format: 110, 16, IX, 14, 7F8.3
Contents
Time plane number of record
Calendar time of the plane (YRMODY)
Not used
Clock time of time plane (HRMN)
Discharge (m3/sec)
Sediment (kg/min)
Sediment (g/1)
Dissolved pesticide (g/min)
Dissolved pesticide (ppm)
Particulate pesticide (g/min)
Particulate pesticide (ppm)
The SERATRA file is unformatted and the order of the variables in each
record should be as follows:
Field #
1
2
3
4
Contents
River segment number
Time plane number
Discharge (m3/sec)
Average sediment concentration (kg/m3)
40
-------
Field # Contents
Average dissolved contaminant
(kg /OH or pc/m^)
Average parti cul ate contaminant
(kg/rrH or pc/rrH)
Average parti cul ate contaminant
(kg/kg or pc/kg)
Total contaminant (kg/nv3 or pc/rrH)
Example:
ARM ..... 5 DPO:ARM 7174. TIM
In the above sample, the time series file is the result of an
A) ARM model analysis and the
B) 5th output parameter, dissolved particulate concentration (ppm) is to
be analyzed from the file
C) DPO:ARM7174.T1M.
Data Set 3 - TIME SPECIFICATIONS
The user is not restricted to analyzing the complete time series file
as it was written by the simulation model. This data set is used to
specify the time span that is to be included in the analysis. There are
two different record formats and FRANCO chooses between the two based upon
the value input as SOURCE.
Record type 1 used when SOURCE = "ARM" - Format: 215, F10.0, 6A1
Columns Variable _ Description _
1-5 BTP Starting time plane number of the analysis.
6-10 ETP Ending time plane number of the analysis.
11-20 DELT Size of the time step taken during the ARM simulation.
21-26 TUNIT Time step units.
= "DAY"; units of DELT is days
= "HOUR"; units of DELT is hours
= "MINUTE"; units of DELT is minutes
Record type 2 used when SOURCE = "SERATRA" - Format: 2110, 15, F10.0, 6A1
41
-------
Columns Variable
Description
1-10
11-20
21-25
26-35
36-41
Example #1
BTP Starting time plane number of the analysis.
ETP Ending time plane number of the analysis.
BSEG Number of the river segment to be analyzed.
DELT Size of the time step taken during the SERATRA
simulation.
TUNIT Time step units.
= "DAY"; units of DELT is days
= "HOUR"; units of DELT is hours
= "MINUTE"; units of DELT is minutes
-> «- D ->
15.0 MINUTE
The example above would be appropriate when analyzing the time series file
from an ARM simulation. The starting time step is to be number
A) 10, the ending time step is
B) 425, and the length of each time step during the ARM simulation was
C) 15.0
D) MINUTE
Example #2
->C ->
The second sample would be used with a SERATRA result file.
time step is
The beginning
A) 1, the last time step of the analysis is
B) 51264, and the river segment being analyzed is number
C) 7. the length of the time step during the SERATRA simulation are
D) 0.5
E) HOURS.
Data Set 4 - CONTROL OPTIONS
The data on this record and used to signal FRANCO to use either the
raw data or the natural log of the data. They also specify the method
that will be used to input the concentrations and durations.
Format: LI,215
42
-------
Columns Variable
Description
2-6
LOGC
OPTC
7-11
Example:
OPTD
T; FRANCO will use the natural log of the data
during the analysis.
F; the raw data will be used during analysis.
Control variable that signals the method chosen to
input the specified concentrations.
1; concentrations will be specified explicitly.
2; concentrations are input using a minimum value,
a maximum value and an interval.
3; concentrations are input by specifying a maximum
of four ranges with a separate interval between
each range.
Control variable that signals the method chosen to
input the specified durations. The possible values
and meanings are the same as described for OPTC.
A
T'
B ->•
^1^'
C ->
^2
In the above sample the user has asked FRANCO to use
A) the natural log of the data during analysis. The specified
concentrations will be input using method
B) 1 and the durations will be input using method number
C) 2.
Data Set 5 - SPECIFIED CONCENTRATIONS
The user has the option of using one of three methods when inputting
the specified concentration values. Options 2 and 3 are designed to ease
input burden.
Method 1 (OPTC=1) - Each concentration value is entered explicitly.
Record type 1 - Format: 15
Columns Variable
Description
1-5
NC
Number of specified concentrations (25 maximum)
Record type 2 - Format: 8F10.0; Repeated as often as necessary to input
NC values.
43
-------
Columns Variable
Description
1-10 C(J) jth specified concentration
11-20 C(0+l) J+l specified concentration
21-30 C(0+2) 0+2 specified concentration
71-80 C(J+7) 0+7 specified concentration
Example:
<- A +
...19
B + «- C
U • UAAAAAAU •
D -»••<- E -»••«- F -»••«- G -* «- H -*•«-
AAAAAAAU • AAAAAA • L AAAAAAU • UO A A A A A A\J • J.,jAAAAAAvJ , J.HAAAAAAU , .LOAAAA/NAvJ , J. ,/
I
A/S /N/-V/S
0.23
Above is a partial example of the method 1 type of input in which
The first eight values
A) 19 specified concentrations are to be input.
are as follows:
B) C(l) = 0.0
C) C(2) = 0.02
D) C(3) = 0.05
E) C(4) = 0.13
F) C(5) = 0.14
G) C(6) = 0.16
H) C(7) = 0.19
I) C(8) = 0.23
Method 2 (OPTC = 2) - Concentrations are input as a minimum value, maximum
value and an interval. FRANCO computes the concen-
trations between the minimum and maximum values.
Format: 3F10.0
Columns Variable
1-10
11-20
21-30
VMIN
VMAX
VINTVL
Description
Minimum concentration
Maximum concentration
Interval between concentration values.
FRANCO will use this information to calculate NC values. NC is computed
as NC=(VMAX-VMIN)/VINTVL+ 1 and the user must remember that NC must not be
greater than 25. Also, VMAX-VMIN should be evenly divisable by VINTVL.
Example:
-10.(
B •* «- C
2.5
44
-------
In the above sample, the minimum value is
A) 10.0, the maximum value is
B) 20.0, and the interval is
C) 2.5. This will result in the following 5 concentrations:
1)
2)
3
4
5)
C(I) = VMIN = 10.0
C(2) = VMIN + VINTVL = 12.5
C(3) = VMIN + 2*VINTVL = 15.0
C(4) = VMIN + 3*VINTVL = 17.5
C(5) = VMIN + 4*VINTVL = VMAX = 20.0
Method 3 (OPTC=3) - This method is used to input a set of ranges and the
numbers of values to be computed between each range.
The user is currently allowed to split the concen-
tration values into a maximum of four uneven intervals.
The maximum number of concentrations is 25.
Record 1 - Format: I5.F10.0
Columns Variable
Description
1-5 NS(J) Number of values to be computed between VALS(J-l)
6-15 VALS(J) Maximum value for this interval and the minimum value
of the next interval (if there is one).
Because concentration values can vary over orders of magnitude, concentra-
tions between the ranges are calculated using the natural log of the
values. Experience has shown that this produces values that more closely
match the clustering of events into the smaller concentrations found in
the ARM and SERATRA results.
Example:
•«- A ->- «- B ->
/N/\/S/\O S\ S\ S\ S\ S^. S\/\ ^\J • U
«- C + «- D ->
xs/\/\\J/\^^/\J- • w II ™H"
«- E -»• «- F -»•
/\/vx\/\/ /\/\s\/\J. «Ut.~U
*• G -> ^ H •*
The sample above will produce the following concentrations
C(l) = 0.0
C(2) = l.OOOOE-4
C(3) = 1.7783E-4
45
-------
C(4) = 3.1623E-4
C(5) = 5.6234E-4
C(6) = 9.9999E-4
C(7) = 1.7783E-3
C(8) = 3.1623E-3
C(9) = 5.6234E-3
C(10)= l.OOOOE-2
C(ll)= 1.1487E-2
C(12)= 1.3195E-2
C(13)= 1.5157E-2
C(14)= 1.7411E-2
C(15)= 2.0000E-2
Data Set 6 - SPECIFIED DURATIONS
The same three methods for inputting concentrations are available for
inputting specified durations. However, there is one major difference in
computing durations with method 3 (OPTD=3). Durations between the ranges
are calculated using a linear interpolation rather than a log
interpolation. This and the fact that durations are expressed in units of
time are the only differences. Therefore, refer to the section describing
Data Set 5 when preparing the input for specified durations.
Data Set 7 - LC50 PIECEWISE LINEAR FUNCTIONS
This data set is used to describe the LC50 curves that are to be
included in the analysis. The endpoint pair of concentration, duration
values is input for each of the line segments that make up the curve.
FRANCO uses this information to compute the slope and intercept of each
line segment.
Record type 1 - Format: 215
Columns Variable Description
1-5 NLC Number of LC50 piecewise functions to be used during
the analysis (O^NLC^B).
6-10 NPT Number of points that will be used to describe each
function. All NLC functions must have the same number
of concentration duration pairs. (Maximum of 6)
Record type 2 - Format 8F10.0; this type can have 1 or 2 records depending
upon the value of NPT and it must be
repeated for each curve being input. Of
course, if NLC=0, this record type would
not be included.
46
-------
First record
Columns Variable
Description
1-10
11-20
21-30
31-40
41-50
51-60
61-70
71-80
CF(I
DF(I,
CF(I
DF(I,
CF(I.
DF(I.
CF(I,
1)
1)
2)
2)
3)
3)
4)
DF(I,4)
Concentration
Duration value
Concentration
Duration value
Concentration
Duration value
Concentration
Duration value
value of first
of first pair
value of second
of second pair
value of third
of third pair
value of fourth
of fourth pair
pair for function I.
for function I.
pair for function I
for function I.
pair for function I.
for function I.
pair for function I
for function I.
Second record - Used only if NPT>4
Columns Variable
Description
1-10
11-20
21-30
31-40
CF(I.
DF(I,
CF(L
5)
5)
6)
DF(I,6)
Concentration value of fifth
Duration value of fifth pair
Concentration value of sixth
Duration value of sixth pair
pair for function I,
for function I.
pair for function I
for function I.
Example:
*• A -> *- B -»•
1 6
<- C -*•*• D -»<- E ^^ F -»•
oc RO ? R ^n
•«- 6 +«-H ->• *• I -><-J^
25 175 15 20 0
The above sample conveys the following information:
A)
B)
C,D)
E,F)
G,H)
I,J)
K,L)
M,N)
1 LC-50 piecewise linear function will be included in the analysis
and it will be described using
6 pairs of concentration
3.5, 5.0
duration values. Those 6 pairs are
2.5,
2.5,
1.5,
1.0,
1.5,
5.0
17.5
20.0
27.5
100.0
FRANCO Run Time Errors
There are three run time error messages that will be written on the
terminal device where FRANCO was activated. Two will terminate the
analysis. The first error message is as follows:
47
-------
***** FRANCO — ANALYSIS TERMINATED BECAUSE THE DATA WAS EXHAUSTED WITHOUT
ENCOUNTERING THE STARTING TIME PLANE. CHECK YOUR INPUT.
This message will be printed whenever an end-of-file is encountered while
searching the source file (Data Set 2) for the beginning time plane. The
two major reasons for this message are (1) invalid starting time plane
(Data Set 3) or (2) the wrong source file was specified (Data Set 2).
The second message will occur under similar circumstances as the
first.
***** FRANCO — ANALYSIS TERMINATED BECAUSE THE REQUESTED RIVER SEGMENT
COULD NOT BE FOUND.
This means that while searching a time series analysis result file from
SERATRA for the requested river segment, an end-of-file was encountered.
Examine the river segment number (Data Set 3) and the data file
specification (Data Set 2) for possible mistakes.
The final message that can be printed is associated with the
processing of the control file. When an error or data inconsistency is
detected in the control file, the following message will appear.
*****FRANCO — ERROR ENCOUNTERED DURING INPUT PROCESSING. EXAMINE LINE
PRINTER LISTING FOR AN EXPLANATION.
As FRANCO processes the control file, all input and calculated values
are enchoed to the line printer. Whenever possible, error messages will
appear directly beneath the input values that caused the error.
Below is the list of error messages that can be produced during
processing. They are self-explanatory and no further explanation will be
furnished. Those errors that will suspend further input processing are
marked with an "F" for fatal.
STARTING TIME IS LATER THAN THE ENDING TIME
F - INVALID VALUE FOR THE SPECIFIED CONCENTRATION INPUT CONTROL VARIABLE
- OPTC
F - INVALID VALUE FOR THE SPECIFIED DURATION INPUT CONTROL VARIABLE - OPTD
F - INVALID NUMBER OF LC PIECEWISE LINEAR FUNCTIONS XX MAXIMUM ALLOWED
F - INVALID NUMBER OF LC PIECEWISE LINEAR FUNCTION PAIRS (MUST BE AT
LEAST 3 AND NO MORE THAN XX)
48
-------
APPENDIX B
FRANCO PROGRAM MODULE DESCRIPTIONS
The modules that are described in this section include the executive
program FRANCO, numerous subroutines and one INCLUDE file that contains
the array dimensions and other limits. Each description will include a
narrative explanation and any links to and from the subprograms. Because
of their nature, some of the routines will be considered as "black boxes"
and very little information will be supplied.
Executive Program - FRANCO
FRANCO does very few computations. Its main responsibilities are to
read the time analysis data, control the flow of data through the proper
subroutines, and oversee the printing of the results.
The basic steps of an analysis are as follows:
1) Learn the name of the control file and open it.
2) Call the subroutine FACINP to read the control file.
3) Determine the number of time steps in each specified duration.
4) Open the time series analysis file and search through the file to
find the river segment to be analyzed and the starting time plane.
5) Call subroutine PIECE to compute the intercept and slopes of each of
the LC50 curves.
6) Open the temporary files needed for the LC50 analysis.
7) Process all of the time steps to be included in the analysis. This
step includes:
a) reading the next record in the file and filling in the gaps left
by any missing time planes,
b) calling subroutine EVENT which will increment the proper event
counters and marking the LC50 curves, and
c) calling subroutine SUMSAT which accumulates partial sums and
other counts.
8) Close off the analysis by counting the events caused by using a
concentration that is the difference of the first two specified
concentrations.
9) Print the event occurrence reports.
10) Call subroutine FRAC to compute and print the event percentage
occurrence reports.
49
-------
11) Call subroutine LCFINI to finish the LC50 analysis and to print the
results.
12) Call subroutine CDAS to compute and print the concentration
distribution summary analysis.
13) Call subroutine PLTSUM to plot the frequency plot, and the normal,
log normal and gamma distribution plots.
Calls subprograms FACINP, PIECE, EVENT, SUMSAT, MATPRT, FRAC, LCFINI,
CDAS, and PLTSUM.
Figure B.I is a graphical representation of the module linkages in
FRANCO. All of the linkages are shown so there is a certain amount of
duplication that is not reflected in the program's overlay descriptor.
Subroutine CDAS
Responsible for conducting the concentration distribution summary and
analysis computations for all events with a non-zero concentration. It
also prints the results of the analysis The items that are computed
include various means and standard deviations, chi square goodness of fit
tests, various probabilities, the expected observations of each
concentration and many others.
Called by FRANCO.
Calls subroutines GAMML, NORCUM, GAMCUM.
Subroutine CROSS
General purpose two dimensional line printer plotting routine.
Called by PLTSUM, QQPLOT
Calls subprograms EVICT, SORTP, and PSCALE
Subroutine EVENT
Counts the events and the time planes in the events that have
concentrations greater than or equal to each of the specified
concentrations and a duration that is greater than or equal to the
specified durations.
Called by FRANCO.
Calls subprograms LCCONT and LCPREP.
Function EVICT
Range checks the values being plotted by subroutine CROSS.
Called by CROSS.
Subroutine FACINP
Supervises the reading of the control input file and reads a majority
of the data itself.
Called by FRANCO.
Call subprograms OPT1, OPT2, and OPTS.
50
-------
FRANCO
MATPRT FRAC LCFINI
Figure B.I. FRANCO module linkages.
51
-------
Subroutine FRAC
Computes the percentage of occurrence values and causes them to be
printed.
Called by FRANCO.
Calls subprogram MATPRT.
Subroutine GAMCUM
Computes the value of the cumulative gamma distribution P with the
limits of intergration from 0 to X.
Called by CDAS.
Function GAMFNI
This function is called by subroutine GAMPPF to perform interim
calculations. The code of both the routines would have to be examined to
gain a full understanding of the routine.
Function GAMLN
Computes In r (A).
Called by GAMPPF.
Subroutine GAMML
Computes the maximum likelihood estimates for the gamma distribution
parameters alpha and beta.
Subroutine GAMPPF
Computes the probability point function (quantile) for the gamma
distribution given a probability p.
Called by QQPLOT.
Subroutine LCCONT
The purpose of this routine is to determine if the conditions of the
event cause exceedance of any of the LC50 continuous functions. Those
that do are written to the file corresponding to the curve that has been
exceeded for further processing.
Called by subroutine EVENT.
Subroutine LCFINI
This subroutine finishes the LC50 exceedance determinations. It
examines the direct access file for each function and eliminates those
records that would cause double counts. The remaining records are written
to permanent files which will then contain only those unique events that
exceed the LC50 curve. It also prints a summary of each file.
Called by FRANCO.
52
-------
Subroutine LCPREP
The purpose of this routine is to determine if the conditions of the
event cause exceedance of any of the LC50 piecewise linear functions.
Those that qualify are written to the file corresponding to the exceeded
curve for further processing.
Called by subroutine EVENT.
Subroutine MATPRT
This routine is responsible for printing tables containing either
real or integer values under a predefined format.
Called by FRANCO and FRAC.
Subroutine NQRCUM
Computes the cumulative (from minus infinity to X) probability P for
the normal distribution with a mean AMEAN and standard deviation SIGMA.
Called by CDAS.
Subroutine NORPPF
Computes the percent point function (quantile) for the normal
distribution with a mean of AMEAN and standard deviation SIGMA given a
probability P.
Called by QQPLOT.
Subroutine OPT1
Responsible for reading the explicit specified concentrations and
durations.
Called by FACINP.
Subroutine OPT2
Reads the specified concentrations and durations when the user has
elected to input them as a lower and upper limit and an interval. Also
computes the interval values.
Called by FACINP.
Subroutine OPTS
Called upon to read concentration and duration data that is to be
specified as a set of ranges and the number of values to be included in
each range. Also computes the values with the ranges.
Called by FACINP.
53
-------
Subroutine PIECE
The purpose of this routine is to construct a preset number of
piecewise linear functions given
function. Returns the slope and
Called by FRANCO.
Subroutine PLTSUM
the point pairs that describe the
intercept of each line segment.
Oversees the production of three line printer plots: base 10 log of
concentrations versus cumulative, observed concentration versus normal
quantile and observed concentration versus gamma quantile.
Called by FRANCO.
Calls CROSS and QQPLOT.
Subroutine PSCALE
Routine selects the scale for the line printer plots produced by
subroutine CROSS.
Called by CROSS.
Subroutine QQPLOT
Makes a line printer plot of the data in the array X versus percent
point probability data (quantiles) obtained from the subroutine PPF.
Called by PLTSUM.
Calls UNIFRQ and PPF which is the name of the subroutine passed by
the calling routine. In the FRANCO application only routines NORPPF and
GAMPPF.
Subroutine SORTP
This routine sorts the elements of the input vector X and puts the
sorted elements into the vector Y. It also carries along the index of the
original position of each element in X.
Called by CROSS, QQPLOT.
Subroutine SUMSAT
Responsible for accumulating partial sums and means that will become
part of the summary statistics.
Called by FRANCO.
Subroutine UNIFRQ
This routine is used by the probability plotting routine to obtain
the distributional quantiles. It computes an approximation to the median
of the NCI(I) order statistic from a uniform distribution.
Called by QQPLOT.
54
-------
Include File FRANCO.PRM
This file contains the parameters that control the maximum number of
specified concentrations and duration, the maximum number of LC50 curves,
the maximum number of points in each curve and the line printer logical
unit number.
Any changes to the parameters will necessitate recompiling the
program modules and rebuilding of the task image. It may also be
necessary to construct a new overlay description file.
Variable Descriptions
Listed below, in alphabetical order, are the brief descriptions of
the more important variables from FRANCO. Each description contains the
variable names, type and explanation.
Name Type
A(NLCF,NLCP) R*4
AA(4,NLCF) R*4
AMEAN(2) R*4
ASD(2) R*4
ASUMS(2) R*4
B(NLCF,NLCP) R*4
BSEG 1*2
BTP 1*4
C(JC) R*4
CF(NLCF,NLCP) R*4
CNTFIL(30) BYTE
CONC'7) BYTE
CURTP 1*4
Explanation
Slopes of each line segment of the LC50
piecewise linear curves.
Four constants that describe the LC50
continuous functions.
Arithmetic mean holding array.
Arithmetic standard deviation holding array.
Arithmetic sum of squares holding array.
Intercept of each line segment of each LC50
piecewise linear curves.
Number of the river segment to be analyzed.
Starting time plane number of the analysis.
Specified concentrations.
Concentration values of the LC50 piecewise
linear functions.
Holding array for the control input file name.
Concentration values read from the time series
analysis input data file.
Number of the time plane being processed.
55
-------
Name
D(JD)
DELT
DF(NLCF.NLCP)
ETP
GMEAN(2)
GSD(2)
IER
INPFIL(SO)
JFIELD
JC
JD
JMIS
LMEAN(2)
LOGO
LSD(2)
LSUMS(2)
LUN(NLCF)
MD
MISTP
NC
Type
R*4
R*4
R*4
1*4
R*4
R*/i
1*2
BYTE
1*2
1*2
1*2
1*4
R*4
L*l
R*4
R*4
1*2
1*2
1*4
1*2
Explanation
Specified durations.
Time step size.
Duration values of the LC50 piecewise linear
functions.
Last time plane to be analyzed.
Geometric mean holding array.
Geometric standard deviation holding array.
Input error flag.
Holding array for the time series analysis
input file.
Pointer to the concentration value being
analyzed.
Maximum number of specified concentrations.
Maximum number of specified durations.
Missing time plane number.
Log mean holding array.
Flag indicating whether or not the summary
statistics will be done with the natural log
of the concentrations.
Log standard deviations.
Log sum of squares.
Logical unit number of each LC50 file.
Number of specified durations to be used
during the analysis.
Missing time step number.
Number of specified concentrations to be
used
NCLC
1*2
during the analysis.
Number of LC50 continuous functions.
56
-------
Name Type
ND(JD) 1*2
NDC(OC) 1*4
NE(OC,JD) 1*2
NIC 1*2
NLCF 1*2
NLCP 1*2
NOT 1*2
NREC(NLCF) 1*2
NT(JC.JD) 1*4
NTIM 1*4
NXEQ 1*4
P(JC,JD) R*4
PRVTP 1*4
SOURCE(7) BYTE
W(2,2) R*4
FRANCO Data Files
Explanation
Number of time steps in each of the specified
durations.
Event counter that is incremented each time
the input concentration is greater than a
specified concentration.
Event counter matrix.
Number of LC50 piecewise linear functions.
Maximum number of LC50 curves.
Maximum number of points in each LC50 curve.
Number of concentration duration pairs that is
being used to describe the LC50 piecewise
linear functions.
Record counter for the LC50 temporary files.
Time plane counter matrix.
Current time plane number.
Time plane number.
Scratch pad array used to hold calculated
percentages.
Previous time plane.
Name of the model that produced the
concentrations being analyzed.
Count of the number of sums in LMEAN and
AMEAN.
The data file manipulation of FRANCO is very straightforward. In
addition to the control file and the file containing the time series data,
there are two sets of files that are used in the LC50 analysis.
Each condition that exceeds an LC50 curve is written to the direct
access file corresponding to the curve that was exceeded. Then after all
the time planes have been analyzed, these files are read in reverse order
and conditions that would cause duplicate counts of exceedance are ignored
and those that remain are written to the permanent file (such as
LCISAVE.RLT). The permanent file can be used for further analysis.
57
-------
APPENDIX C
FRANCO SOURCE LISTING
FRANCO computer source listings are present in FLECS compatible
code. Some subroutines are entirely in FORTRAN compatible source and may
be used as direct input to a FORTRAN computer. FLECS routines must be
preprocessed by a FLECS compiler which produces FORTRAN source.
The typing of variables is consistent with DEC POP 11 and VAX 11
software systems. In particular BYTE refers to a single character word
length.
FRANCO is not given in portable code but it should be relatively
simple to transport it to other operating systems that have FLECS or
Fortran 77 capabilities. Originally, FRANCO was designed to operate on a
POP 11/45 with 28K words of core available. The code must be overlaid to
achieve this. Execution times for most applications are less than
5 minutes CPU time.
58
-------
CFLECS VERSION 2?.
18-JUL-79
PAGE 00001
00001
00002
00003
00004
00305
000C16
003s!T
00'*08
00009
00010
00011
00012
000)3
00014
000)5
00016
00017
00018
00019
00020
00021
0012?
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
P0033
00034
00035
00056
00037
00038
00039
00040
00041
00042
00043
00044
000(15
00046
00047
00048
00049
001*50
00051
00052
C
C
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
(101,51 FRANCO, FLX
PROGRAM FRANCO
FREQUENCY ANALYSIS OF CONCENTRATION
.. .. --
PURPOSE IS TO SUMMARIZE A SINGLE TIME SERIES OF CONCENTRATIONS
USING THE CONCEPT OF EVENT AND DURATION, THE TIME SERIES IS
OPERATED UN A SINGLE RECORD AT A TJME SO THAT ANy LENGTH OF
SERIES MAY 8E HANDLED, OUTPUT CONSISTS OF PRINTED FREQUENCY
DISTRIBUTIONS IN TABULAR FORM, AND LINE PRINTER PLOTS. LC*50
INFO IS SAVED FOR FUTURE ANALYSIS,
INCLUDE 'SY|FRANCO,PHM»
RYTE CNTFIL(30),lNPFIL(30),SOURCEm,HEADl (60) / HE AD? (80) ,
1 HEAU3(80),HEAD4(60)
INTEGER*? B8EG
iMT£RtR*4 BTP,ETP,CURTP,NXEQ,NTIM,
1 PRVTP,MISTP,JMIS,NT(JC,JD),NDCCJC)
LOGICAL*! OONE,F.OF,LOGC
REAL LSUMS(2)|LMEA'J(2],LSD(2)
DIMENSION C(JC),n(JO),CFCNLCF,NLCP),DF(NLCF,NLCP),NE(JC,JD),
1 N0(jn),LUNCNLCF),NREC{NLCn,
2 A(NLCF,NLCP),8(NLCFfNLCP),CONCt7),AMEAN(a),ASUMS(2),
3 GMEANC2),A3lH8),GSOC2),H(2,2),AAC4,NLCF),P(JC,JD)
DATA EOF /.FALSE,/
DATA LORC /.FALSE,/
DATA LUN /2,3,4,9,A/ IAS NLCF CHANGES SO MUST LUN
DATA NREC /5*1/
DATA NE /JCJD*0/
OATA NT /JCjD*d/
0«TA HOC /JC*0/
D*TA NO /JD«0/
DATA CURTP/0/
OATA AMEAN, ASUMS, W,LMEAN,LSUM3 /12*0/
0»TA HF.A01/13*' ', 'N', 'U' ( 'M', «6'r 'E'» *R'» ' '»'0*,'F'»
j t • »£• »v» »f 'M« »T* 'S',' ','W 'I' 'T*
2 «H» • • 'A' • • '0» »U' 'R','A»,'T» 'I* '0' *N«
3 • » '0* ' F » • ' •!)• • [ » 'J',')'i' ' '0' 'R' ' '
4 »G» »R* '£• 'A' »T» •£' 'R',16*' '/
DATA HF.A 2/8 ' ' '5' »J» *V','E','N' ' ' 'T' 'H' 'A'.'T',' *r
j »T» »H» *t* ' * *E* 'V 'E','N','T' ' ' 'I' '8'
2 • » *n' »E» 'F' 'I' *N' 'E','0',' • '8' »V» ' • »C»,
3 «o» • M • • C » ' E ' 'N' • T • »R','A','T" 'I' '0' 'N'
'4 • 9 • • * 'C' 'f* 'I* ')' ' ','0','R' ' ' *G','R'
59
-------
(rues VERSION
IS-JUL-T1? HMP0I08 PAGE
00354
00055
00036
00057
0 pi ^15 S
0001^9
0&PI6PI
0P)0fe ]
00062
00163
00065
00066 C
00067
00068 1
00069
00070
00071 !
05)072
00073
00074 C
00075
00076
00077 C
0^078
00079
000P0
00081 C
00083
00083
00084
000P5
00086 3
00087
00080
000B9
00090
00091 C
00092 C
055093
00094 C
00095 C
00096
00097
00098
00099
00100 4
00101
0010?
00103
001 04
00105
001 06
00107
PI0108
00109
DATA HEAD3/8*' ','N' 'U','M',»S»,
1 •!• 'M»,'E',» • »P» «L','A','N«,
DATA HF.A04/8*' • '(!• M','V','E',
1 'T* *H','E*»* * *E' *V',*E*,'N*,
3 T.» 'Q','N',»C' '£• 'N','T','R',
5 * R ' 'E'i'A't'T'f'E'f'R'iS*' '/
WRITEC1,!)
'E' *R',» ','0','F',' ",'T',
•C' 'S',' ',
* A *
•N' • '.'T'.'H'j'A'.'T',' ',
, • ,9,^ ,y.t
'A' 'T','1','0',
tnt tot • t ttit
w n , ,w ,
FORMATU0X, •**•»* FREQUENCY ANALYSIS PROGRAM *****'//
1 '^ENTEH THE NAME OF THE CONTROL
RE AD (l, a) NCHR, CCNTFIL CD, !•!,«)
FORMAT (Q, 30A1 )
CNTFTL (NCHH*I j • o
CLnSE (UNIT"1 )
CALL ASNLUN(1,«OP',0)
nPEN(UNlT«l,NAME»CNTFIL»TYPE»»OLO
CALL FACINPCBSEr,,8TP,C,CF,D,OELT,
1 ETP,IE",I^PFIL,JFIELO
9 NCLC,AA,LOGC)
CLOSE(UNIT»1)
IF (TER ,NE, 0)
CALL ASNLUN(1,'TI',0)
WRITE(l,3)
FILE>')
•, READONLY)
Df,
, MO, NC,NLC,NPT, SOURCE,
FORMAT(//'*«*** FRANCO •• ERROR ENCOUNTERED DURING INPUT',
I ' PROCESSING'/' EXAMINE LINE
Z • EXPLANATION')
STOP
, »f TN
••» OETEHMINE THE NUMBER OF TIME
00 {K«1,MO) NO(K) • OCK) / CELT
PRINTER LISTING FOR AN",
STEPS IN EACH DURATION ***
*** OPEN THE INPUT FILE AND IF NECESSARY, SKIP DATA ***
WHEN CSOURCE(t) tEO. 'A')
0»»EN (UNI T"l, NAME* I NPFIL, TYPE* 'OLD', READONLY)
REPEAT UNTIL (CUHTP ,GE, BTP)
, READ ( 1 , 0, ENli»3(J0) CURTP
. FORMAT(9X,I1«,5F1S,0)
...FIN
BACKSPACE 1
..FIN
LSE
OPF.N(UNIT«1,NAME«INPFIL, TYPE* 'OLD', FORM "'UNFORMATTED', RE AH ONLY)
REPFAT UNTIL (ISEO ,E'3, 8SEG)
, RE*o(i ,END*5«0) ISER,NXEO
, , ,FIN
UNTIL INXEU .GE. BTP)
60
-------
(FLFCS VERSION 2?,a«O
1B-JUL-79 07120108 PAKE 00003
001 |0
00111
00112
00113
001 14
00115
00116
001)7
001 18
00119
00120
0Hl?l
00122
00123
00124
013125
00126
00127
00128
("0129
00133
00131
00132
00133
P0134
00135
0013»
P0138
00139
1 a?
00144
00145
001*16
70147
00150
00151
00154
00155
00156
00157
00158
00159
00161
1H0
00163
00164
00165 C
5'iuj ISFG,NXEO
. ...PIN
. BACKSPACE 1
...FTN
IF (NLC ,GT, 0)
. CALL PIECE(CF,DI»,UC,NPT,A,B)
. *** OPEN THE TEMPORARY FILES THAT ARE USED TO STORE DATA FROM
. SUBR, LCPREf ***
. DO
i.
8. .
. ...MN
...MN
(1PCN (UNI T^U'U I) fRFE" 'SCRATCH', ACCES3«'DZ*eCT'»
FORM«'UNFURMATTeD'fRECORD8
ASSOCIATEV*RIA8UE«NREC(D)
C2LUG i
DO'JE • .FALSE,
REPEAT UNTIL (DONE)
REAO-THE-NEXT-ENTKY
CALL EVENT(NC,HO,CaNC(JFIELO),C,NDC,ND,NE,NT,NT IM,DELT,
A,8,OF,MLC,NPT,NREC,LUN,NCLC,AA)
WHEN (LOGC) CARS • AUOGieCCONCUFIELO)) - C2L08
ELSE CARS • CONC(JFIELD)
CALL SUMSATfAMEAN,ASUMS,CARG,LMEAN,LSUMS,W)
CONTINUE
..FIN
CL
-------
(FLF.C3 VERSION ??,«61
Je-JUl-79 07120108 PAGE 0000fl
00170
00171
00173
00173
00170
00175
00176
05)177
00178
00179
00180
00181
0(9183
00183
C
300
CALL PLTS'JM(C,MT,Nr:,NTIM,AMEAN,LMEAN,A50,L9D,ALPHA,eETA)
STOP
CONTINUE
*** FILL TO THE ENiD *UTM ZEROS **«
MI8TP » ETP - PRVTP
FTLL-^TSTP-TIMF-SITFPS.WITH-ZEROS
DONE • ,TRUC.
Bt) TO
CONTINUE
rLO«F(UNlT«U
TALL ASNLUN(1,
/' ***** FRANCO — ANALYSIS TERMINATED B6C*USE THE DATA',
1 • WAS EXHAUSTED WITHOUT'/' ENCOUNTERING THE STARTING DATE,',
3 • CHECK YOUR INPUT,')
STOP
00185
00186
00187
00188
00169
00191
00193
00193
00194
00195
TO REAn-THfc.NEXT-ENTRY
. PRVTP • CURTP
, WHEN (SOURCF.(l) .CO, 'A') RCAOC1, «,END«aB0) CURTP,(CONC (I),I«l,5)
. ELSE REAO(1,END«300) ISEG,CURTP,(CONCCI),I»1,6)
. WHEN (CURTP ,GE. ETP) DONE • .TRUE,
. ELSE
. . MISTP • CURTP • PRVTP . 1
. . IF (MISTP .ST. 0) FILL-MISTP-TIME-STEPS-WITH-ZeROS
. ...FIN
. NTIM P NTIM + i
...FTN
00196
00J97
00198
00199
00200
00301
H0303
TO FILL-MISTP-TIME-STEPS-WITH.ZEROS
00 (JMIS«1, MISTP)
NTIM • NTJM » 1
CALL EVENT(NCrMO(a,p,C,NOC,NO,NE,NT,MTIM, OS1.T, A,B,OF ,NUC,
CALL SUMS AT (A ME AN, A8UM9,0,0,LMEAN,LSUMS,W)
..FIN
..FTN
END
PROCEDURE CR03S*REFERENCE TABLE
00196 FILL-MTSTP"TIME"8TFPS-WITH«ZEROS
00173 0H193
00185 REAO-THF-NEXT-ENTRY
62
-------
(FLECS VERSION ?3.4lb) 18-JUL-71 07130111 PACE 00001
000*1
0001*3
00003
00000
00005
0000*1
00007
B0008
00009
00010
00011
005)13
0001)
0001 0
00015
00016
00017
00018
00019
00030
00031
00033
00033
00030
00035
00036
00037
00038
00039
00030
00031
00033
00033
00030
00035
00036
00037
0003*
00039
00000
00041
00003
00003
00040
00045
00046
00007
00008
00049
00050
00051
00053
C
C
C
C
C
C
C
C
C
C
1
3
3
4
5
6
7
8
9
10
SUBROUTINE COAS(C,P,NE,NT,NTIM,NC,AMFAN,LMEAN, ASD, LSD, GMEAN , GSD ,
1 ALPHA, BETA)
CONCENTRATION DISTRIBUTION SUMMARY AND ANALYSIS ROUTINE
INCLUDE 'SYlFRANCO.PRM'
INTEGER** NT(JC,JO),NTIM,NN,NTOIF(JC),NOB,OBSN(JC)
REAL LME*N(3),LSD(?)
DIMENSION ENN(JC),eNLCJC),CN6(JC),CCJC),P(JC,JD),NE(JC,JO),
1 AMEAN(3),ASDC3),GMEAN(S),GSD(a),EXPN(JC)
DATA BOTCNT / 1,0 /
*** ANALY?E ALL NON-ZERO EVENTS ***
J " 3
N • ?
NN • NT(3,1)
COMPUTE-VALUES
PRINT-HEADING
PRINT-TABLES
RETURN
FORMAT(1H1,36X, 'CONCENTRATION DISTRIBUTION SUMMARY AND ANALYSIS'//
1 39X,'« TIME', OX,'PERCENT',5X, 'PERCENT', 36X,
3 'EXPECTED NUMBER OF TIME STEPS*/
3 ?0X,'*EVENTS STSPS TOTAL TIME TOTAL TIME NO, TIME STEPS',
0 10X,*CU) <• C «• C(I*J)'/1X, 'CONCENTRATION C(I) C»»C(I)',
5 3X,'C»«C(I) C>»C (I ) ' , 6X, *C«C (I) C (I) <«C«C (1*1 ) * ,
6 6X, 'NORMAL', 7X,'LnG NORMAL* , 6X, 'GAMMA'/ IX, 13 C '-*) > IX ,'.— ',
7 3X,7('»*),3X,7('-*),3X,10(*-'),3X,10(*«'),3X,14(''»*),
8 ?X,13('-'),!>X,13(*-')»3X,13('»'))
FORMAT(lPE13.5,3X,I3,«X,I5,OX,I5,5X,0PF6.3,6X,P6.3r9X,I5,6X,
1 3(1PE13,3,3X))
FORM4T(///' CHI SQUARE GOODNESS OF FIT'
1 /7X, 'DISTRIBUTION',
3 10X, 'PARAMETER E8TIMAT!S',7X,'TCST STATISTICS* ,5Xf
3 'PROBABILITY OF EXCEEDING DEGREES OF FREEDOM*
0 /7X, 1 3 ('•*), 10X, 38 (*"'),
5 3X,15('-'),5X,3« ('-'), ZX, ie('-'))
FORHAT(1X,'ARITHMET1C',10X,1PE13,5,5X,1PE13,5)
FORMAT(1X, 'ARITHMETIC (LOG C) ' , 3X , 1 PE 1 3 ,5, 5X , 1PE1 3,5)
FORMAT(1X,'6EOMETRIC',11X,1PE13,5,5X,1PE13,5)
FQRMATflX, 'NORMAL (MEAN, 9TD DEV) • , M , 1PE 1 3, 5 , 3X , 1 PE 1 3,5,
1 JX,0PFj.S.i, iix,F!3,3, 10X,F5,0)
FORHAT(1X,'LOG NORMAL CMEAN, STD DEV) • , 3X, 1PE 1 3,5, HX , 1PE13.5,
1 3X,0PF13,1,11X,F13,3,10X,F5,0)
FORMATtlX, 'GAMMA (ALPHA, BET A) • , 9X , 1 PE 1 3 , 5 , 3X , 1 PE 1 3 . 5 ,
1 3X , 0PF 1 3 , 1 , 1 1 X , FI 3 , 3 , 1 0X , F5,0)
FORMAT (1 HI///, ax, 'SUMMARY STATISTICS'/
, 'MEAN', TX, 'STANDARD DEVIATION'/
63
-------
(FLECS VERSION 2?. at,-)
0PH54 P ?1X,
00055 C
18-JUL-79 0712011! PAGE 0000?
('-'J ,2X, IM'-*})
00056
00057
0PI05*
00060
0R061
00062
00063
03065
00066
0(9067
0P068
00070
00071
00072
001073
00074
00076
00077
00078
00079
00060
000M
000B2
000fl3
000M
00085
00066
000S7
00088
000P9
00091
00092
00091
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
001f"5
00106
TD COMPUTE-VALUFS
r»U. GAMML(»MFAM(N) ,6ME*N(N) , ALPHA, BET A)
DO (I«J,NC)
CALL NORCi|Mtr:(I), AMEAN(N) , «SO(N) ,P3U8I)
ENN(I) . NN * PSU8I
PLUG • ALofi(ctD)
CALL Nn9CUM(rLO(5,LMEAN(N) , USD (N) , P8UB1 )
ENL(I) • NN * P3U8I
CALL GAMCUM(C (I) , ALPHA,BET»rPSUBI)
SNG(I) • NN * P9U8I
..'IN
-U • ENLCJ)
EMGfJ-1) • FMG(J)
00 U«J,NC-1)
. CNN(I) • (-NNCI*!) - INN(I)
. ENL(I) « ENLU + J) • CNLd)
. ENGCI) • ENC-(I»1) - ENG(I)
• NN
EMGfNC) • NN
ENG(NC)
DO (I"J-liNC-l) NTOIF(I) • N7(I,n - NTCI+1,1)
NTOIF(NC) • NT(NC,1)
DO (I«J-1,NC)
. EXPN(I"J+?) » ENN(I)
. 08SN(I-J+?) i
COLI-APSE.CELL8
CHIN • 0.0
DO CI»1»NCELL3) CHIN • CHIN * ((OBSN(I) . EXPN(I))**2) / EXPN(I)
OFN • NCELLS • 3
CALL SAi1CHM(CHIN,OFN/?t,.9,PCHIN)
CHIN • (CHIN-OM) / 80RT(2.*OrN)
OH (I«J"1,NC)
. EXPN(I-J»2) • ENL(I)
. UWSNCI-J*?) • NTOIF(I)
APSE-CELLS
CHIL • 0,0
DO H«l, NCELLS) CHIL « CHIL + ((OBSN(I) . EXPN(I))**?) / EXPN(I)
OFL » NCELLS • 3
CALL f5AMCUMfcHIL,DFL/2.,.5,PCHIL)
CHIL • CCHIL-DFL) / 8rJRT(2,*OFL)
DO (I«J"1,NC)
, ExPN(i-j»a) • ENS (i)
, QRSNCI-J + a) * NTOIFU)
...FIN
COLLAPSE- CELLS
CHja » tf, 0
64
-------
(FLECS VFRSION 2?.«6)
U-JUL-Ti
00107
0011*8
0B1PI9
00110
00111
00118
00111
00114
00115
00116
0011T
00118 1
00119
00180
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00138 55
00133
00134 60
00135
00136
0013T
00138
0013'
00140
00141
00148
0PM43 65
00144
00145
00146
00147 70
00148
00149
00150 75
00151
0P152 C
00 (I"l, NCELLS) CHIG • CHIG * ((OPSN(I) - EXP
DFG • NCELLS » 3
CALL GAMCUM(CHir,,l)FG/?,,,5,PCHIG)
CHIG • (CHIG-OFfO / SQRT(8.*OFG)
..FIN
TO PRINT-HEADING
. WRITFUP.n
...FIN
TO PRINT-TABLES
00 (I»J-1,NC)
. WRIT£(LP,2) C(I),I,NE(I,l),NTCI,n,PCI,l),
, NTOIF(nfENN(I),£NL(n,eN6(I)
..tFIN
WRITF.UP,101
WRITECLP.4) AMEAN(N),ASDCN)
WRITECLP.5) LMF-AN(N),L3fHN)
WPITE(LP,6) GMEAN(N) ,G80(N)
WRITE(LP,3)
WRITE(LP|7) AMEAN(N),A8D(N),CHIN,1,.PCHIN,DFN
HRITE(LP,») LMEAN(N),USO(N),CHIL,1,-PCHIL»DFL
WRITE CLP »•») ALPHA, BETA, CHIG, l.-PCHIG,OFG
..FIN
TO COLLAPSE-CELLS
K « 1
NCELLS • 0
NOB • 0.0
PK I 0,0
PK « PK + EXPN(K)
NOB « NOB * l)BSM(K)
K • K + 1
IF fK ,GT, NC-J+2) GO TO 65
IF fPK ,LT. 00TCNT) GO TO 60
NCELLS « NCPLLS + i
EXPN(NCELLS) • PK
OBSN(NCELLS) • NOB
GO TO 55
IF fPK ,GE, BOTCNT) GO TO 70
EXPN(NCELLS) • F-XPN(NCELLS) + PK
OBSN(NCELLS) • OHSN(NCELLS) * NOB
GO TO 75
NCELLS • NCFLL9 * 1
EXPN(NCELLS) • PK
0«SN(NCELL8) • NOB
CONTINUE
..FIN
END
65
-------
(FLECS VERSION
i8-jiti«7 0TI20U5 PAGE
000
-------
CFLECS
00054
00055
00056
00057
00058
00059
00060
00061
00068
00063
0(10)64
00065
(1(1066
00067
0(1068
0(iB69
00070
00071
00078
00073
00074
00075
00076
00077
00078
00079
00080
00081
00088
00083
A A ffl • A
QdnflO
00085
00086
00087
00088
0PCJ89
00090
0(1091
00098
00093
00094
00095
00096
0(1097
H0098
00099
00100
00101
0(il(i8
00103
00104
B0105
00106
0P107
00108
00109
VERSION j
C
C
c
c
c
c
c
C * * * * i
t aQa
I V T0
1180
1300
800(1
C
C
C
c
5
10
15
C
C
C
c
»2.«6) 18-JUL-79 07120115 PAGE 00003
• 1 UP TU NOIGIT DIGITS FROM ( SVMCX),I*liN ) PRINTED
NOIGIT SEE ABOVE
F0» A FULL DISCUSSION OF PLOT SIZE OPTIONS, SCALE SELECTION OPTION
DATA DELETION OPTION AND MULTIPLE DATA SET OPTIONS CONSULT
A.M. (TONY) OL9EN,
k***************A******:A*********:*****************ft**A*.Use,XBASE,IY8A8E,Y8ASE
DIMENSION X(n,YCn,IDUMCU,OUM(l),SYM(l)
DIMENSION PX(6),DIC.ITC10},ALF(105),NOIG(103)
DIMENSION FORMA(5),IFOR(0),FORMX(3),FORMY(7),FORMB(3)
LOGICAL POS,EV, EVICT
DATA PERT 00 ,IXBASE, XBASE, IYBASE,Y8ASE/1M,, 0,0,0,0,0,0/
DATA FORMA/' 87A1',' 47A1',' 6TA1',' 87A1 ' , ' 107A1 •/
OATA FOHMX/»(6X','F9,3',',5(UX*,'F9,3','))*/
OATA FORM8/'(UX,',M07A1»,')'/
OATA FORMY/'(JX','F9.S',',1X,<',M07A1',',IX','F9,S',^)'/
DATA FORM/'F9,3'/
DATA IFOR/'**, «+',»!',' '/
DATA DIGlT/lH0,lHl,lH3,lH3,lHa,JM3«lH6,lHT,lH8,iH9/
DATA DOLLAR, DASH, BLANK, WINSOY, WINSOX/1HI, 1H», 1H ,1HW,1HW/
DATA LI,NCUL,IXAX,IYAX/S0,100,2,2/
OATA ICONZ.NDICIT/0, I/
FORMAT(IH0,20X,21HCONTOUR • VALUE* IB** (, IS, 1H) )
FORMAT(1H0,10X,J9HCHOS3 HAD NO DATA POINTS TO PLOT « N «,I6)
FO«MATUH1,//,TH PAGE,I2,20H OF A PLOT REQUIRIN6, 13, 7H PAGES,
* * * *
)
LOSICAL FUNCTION EVICT IS USED TO SKJP LINE8 OF DATA
NOT TO BE PLOTTED
IPR»LP
IF(N) 5,5,10
W«ITE(IPR,1300) N
RETURN
XMTN«1,0E37
A(JMAX»"XMIN
XMAXiARMAX
IFCICONZ.E0.0) GO TO 20
00 15 I«1,N
EV«EVICT(X(I),Y(I))
IF(EV) GO TO 15
ARMAXlAMAXl(ARMAX,AnS(8YM(I)))
CONTINUE
IPOW»INT(AL06l0tARMAX)+00,)-NOIGIT"39
DETERMINE Y.AXIS SCALE FOR CROSS^LOT USING THE Y SCALE
SELECTION OPTION GIVEN BY IYAX
67
-------
(FLECS VFRSIflN 22.
18-JIIC-79 37120115 PAGE 00003
0PI110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
0P121
00122
00123
00124
00125
00126
00127
00128
00129
00131
00132
00133
00134
00135
00136
001 37
00136
00139
00140
00141
00142
00143
00144
00145
00146
00147
00J18
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00169
00U1
00162
00163
00164
00165
?« CALL 3"«TP(Y,N,DUM, JDUM)
J«N/2
KK*N+1
DO ?5 I»1»J
TI«KK-I
K«IOUM(I)
IOHM {15 «IDUM(ii)
25 lOUMfin'K
IF(IYAX,6Q,4) GO TO «B
00 33 I«1»N
IT"IOUM(KK»I)
CV"EVlCT(X(II)|Y(II))
TF(EV) GO TO 30
YMIN.Y(II)
GO TO 35
30 CONTINUE
35 DO 3* I«1,N
n«iouM(i)
EV«EVICT(X(II), Y(ID)
IF(FV) GO TO 36
v u i y • V f T T ^
T ™ * Jl • T \A^«
GO TO 37
36 CONTINUE
37 CONTINUE
IF f YMIM.EQ, YMAX) YHAX«YMIN*1 ,
I9CALE"IYAX
>F(IYAX,GT.2) ISCALE«0
00 TO 50
-------
(FUECS VERSION 22.46)
18-JUL-79 07120115 PAGE 00004
00166
00167
001*8
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
30183
00181
00182
00183
00164
00185
00186
00187
30188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
(50201
00302
00303
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
C
c
C
c
c
c
c
c
c
210
500
520
5?5
52«
525
526
MCOL»MCUL/2?)
3ET UP OUTER PLOT LIMITS FOR WINSORIZ1NG
YLOWFR •YFJRST-EXACT* (FLO»T (LINE8O) +0,5)
VUPPeR»Y
KOUNTW«0
FnRMXC4)«FORM
FORMYC2) "FORM
FOBMY(6)"FORM
DETERMINE PLOTTINO POSITIONS »NO setup PLOT BY LINE THEN
BY PAGE,
X AND V DATA POINTS OUTSIDE THE SPECIFIED PLOT RANGE
ARE HINSORIZEn AND COUNTED,
DO 700 LMrLEAF
M.5
IF(5«L-MCOL,GE,0) M»MOD(HCOL"1,5)*1
l)
FORMY(4)«FORMA(M)
PX(l)«XFlRST*100.tXACT*FLOAT(L
00 »1« I"2,MM
PXm«TENX*FLOAT(I»l)»PXCl)
IFfL.NE.l) WRITE(IPR»2008)
WRITE(IPR,FORMX)
WRITEUPR,FORMX) (PX(I)rI»l,MM)
WRTTe(TPH,1090) ((1H ),!•!, M)
J«l
JAAVE*0
XPLOTL«PX(1)«DEX
XPLOTU«PX(MMJ»2,5«XACT
YPLOTL"YUPPER»EXACT
00 600 I«|,LINFS
YPLOT«YFIRST-EXACT*FLaAT(I«2)
YPLOTU«YPLOTL
YPLOTU«YUPPER«FXACT*FLOAT(I
00 50B K"lf105
1J
AUF(K)«RLANK
IF(J-N) 523,523,553
PLOTY»Y(IOUM(J))
PLOTX»X(IDUM(J)J
EV«EVICT(PLOTX,PLOTY)
IFCEV) GO TO 5«0
*LPH»«SYM(1)
1FUSYMB.EQ.1) ALPHA»8YM(IOUM(J))
IFCPLOTX-XLOWER) 511,524,524
IF(PLUTX-XUPPER) 525,542,542
IFfPLf>TXi«XPLOTL) 51^,526,526
IFfYIJPPER.PLOTY) 513,3a3,527
69
-------
(FLEC8 VERSION 22.46!)
18-JUL-79 07120115 PAGE 00005
00222
00223
00224
00225
00226
00227
0022B
00232
00233
00235
00236
0023T
00238
00239
00241
00242
00243
00344
00245
00246
00247
00248
00249
00250
00251
00258
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00260
00269
00270
00271
00272
00273
00274
00275
00276
5!{)2T7
527
528
529
530
531
IFtPLOTY-YPLOTU) 5?8,52B,550
IF(PLOTY-YPLOTL) 550,550,529
IFfYLOWEH-PLOTY) "^M,530,543
IF(PL«TX-XPLOTU) 511,531,540
CONTINUE
KOL«INT((PLOTX-XPLOTL)/XACT * 3,0)
IFtKDL.GT.KK) KOL«KK
IFtKOL.LT.l ) KOL»1
DETERMINE if A ONE CHARACTER SYMBOL 18 TO BE PLOTTED AND
LOAD ALF ARRAY,
£0.1) GO TO 535
532 IFCALFfKOD.NE.BLANK) GO TO 533
ALF(KOL)"ALPHA
533
00 TO 540
TF(MDIG(KOL),Ge,101 GO TO 534
K«NOIG(KOl)*l
GO TO 540
534 ALF(KOL)«OOLLAR
GO TO 540
535 IF(ALPHA.EQ.WINSOY) 00 TO 833
TFCALPHA.EQ.W1NSOX) QQ TO 53?
INTGeR»INT(9YM(IOUM(J))*10,**(.IPOW))
POS • INTGER,Ge.0
DO 536 K«l,3
II«MOD(IA8S(INTGER),10)*1
ALPHAiOIGITdl)
II»KOL-K*1
IF CALF (I I),NE,BLANK) ALPHAtDOLLAR
IMTGER«INTGER/10
IFCINTGER.EQ.B) GO TO 537
536 CONTINUE
537 CONTTNUF.
IF(POS) GO TO 540
ALPHAIOASH
IFfALFdD.NE.BLANK) ALPHA«OOLLAR
ALFCID»ALPHA
540 J«J»1
GO TO 520
541 IFCL.NE.l) GO TO 540
PLOTX«XF1RST-2,0*XACT
IF(JSAVE.EQ.J) GO TO 526
J8AVE-J
KQIINTW.KOUNTW*!
GO TO 526
542 IFtL.NE.LEAF) GO TO 540
PLOTX«XUPPCR»1,5*X*CT
TF(JSAVE.EQ.J) GO TO 526
70
-------
(FLECS VERSION 22,46)
J9*VE«J
18-JUU-79 07120115 PACE 00006
00278
00279
00282
00283
00284
002B*
002*7
00289
00292
00295
00296
0029S
00299
00300
00301
00302
00303
00304
00309
00306
00307
00308
00309
00310
00311
003)2
00313
00314
00315
543
544
so m sab
IF(»LPHA,EU,WINSOX) GO TO 544
Gn TO
550 CONTINUE
TF(I. EQ. LINES, »NO.
e.N) 00 TO 5?9
PRINTOUT RESULTS POR A 8INOLE LINE,
IF(IXRASE,EQ,0) SO TO 553
KOL"INT(CXPA8E-XPtOTU)/X»CT+3.)
IF((KOL,5T,(KK.2)).OR,(KOLtLT,3)) 60 TO 553
IF (ALF(KOL).EO. BLANK) ALF (KOL) "PERIOD
553 IF(IVt)A3E,EQ.0) 60 TO 354
JF(YPA8E.ST,VPLOTU) 60 TO 534
IF(YBA8E.LE,VPLOTL) 60 TO 554
K»KK-2
DO 5S2 KOL«3,K,3
IF t ALF (KOL), EQ, BLANK) »LF (KOL) »OA8H
55? CONTINUE
554 IK«3
IF(I.EO,1,OR,I,EO,LINE3) IK»4
,10J,EO,5) IK»2
IFdK.EQ.l) GO TO 560
WRlTE(IP»iFORMB) IFOR ( U), ( ALF (K),K»J,KK), IFOR (IK)
GO TO 600
560 WRI TE ( IPS f f ORM Y)YPI.OT, IFOR (!),( ALF (K),Knl,KK), IFOR (1),YPLOT
600 CONTINUE
WRITE(IPR,1090)(CIH ),K«1,M)
WRITE(IPR»FORMX) (PX(K)»K«1,MM)
700 CONTINUE
IFUCUNZ.EQ.l) WRITE(IPR,1130) IPOW
RETURN
FNO
(FLECS VERSION 22.46)
71
-------
(FLECS VERSION 83.46)
18-JUL-79 07120120 PAGE 000191
00001
00002
00003
000PO
00005
00006
00007
00006
00009
00010
00011
00018
00013
00014
00015
00016
00017
00016
00019
00020
00021
00022
00023
00024
00025
00026
0002T
00028
00029
000*30
00031
00038
00033
00034
00035
00036
00037
00038
00039
00040
003al
00042
00043
00044
00045
00046
00047
00046
00049
00050
00051
00052
00053
SUBROUTINE EVENT(NC,MD,CQNC,C,NDC,ND,NE,NT,NTIM,DELT,A,B,
1
C
C THIS
DF,NLC,NPT,NREC,LUN,NCLC,AA)
ROUTINE IS RESPONSIBLE FOR COUNTING THE EVENTS AND THE TIME
c PLANES IN THE EVENTS THAT HAVE CONCENTRATIONS (CONC) GREATER THAN
C OR EQUAL TO C(J) AND A DURATION (NOC(J)J GREATER THAN OR EQUAL
C TO NO(K). IT ALSO CALLS LCCONT AND LCPRE? WHICH PREPARE THE SCRATCH
C DATA
C MAIN
C
FILES FOR THE LC50 FUNCTIONS, THIS ROUTINE IS CALLED BY THE
PROGRAM FRANCO,
C NC NUMBER OF CONCENTRATION LEVELS
C MD NUMBER OF DURATIONS
C CONC CONCENTRATION READ FROM THE INPUT FILE (CALCULATED)
C C
CONCENTRATION LEVELS INPUT BY THE USER (SPECIFIED)
C NDC EVENT COUNTER INCREMENTED EACH TIME STEP THAT CONC ,GE.
c
C ND(K) NUMBER OF TIME STEPS IN DURATION K,
C NE EVENT COUNTER MATRIX
C NT TIME PLANK COUNTER MATRIX
C MCLC
C AA
C
C VARIABLES NTIM THRU LUN ARE PASSED TO THIS SUBROUTINE ONLY TO
C PASSED TO LCCONT *NO LCPREP WHERE THEY ARE ACTUALLY USED,
C
INCLUDE 'SYIFRANCO.PRM*
c
INTEGER** NT(JC,JD),NDC(JC)
C
DIMENSION C(JC),ND(JO) ,NE(JC,JO),
1
2
C
OF(NLCF,NCCP),NREC(NLCF},LUN(NLCP),AA(4,NLCF),
A(NLCP,NLCP),B(NLCF,NLCP)
J«NC
RFPEAT UNTIL (J,EQ,0)
WHEN (CONC ,GR. C(J))
NDC(J)«NDC(J)*1
,,FIN
ELSE
TF(NOC(J) ,6T. 0)
K* 1
UNTIL (H .GT, MO ,OR, NDC(J) .LT, ND(KJ)
. NE(J,K)«NE(J,K)*1
, NT(J,K) •NT(JIK)*NDC(J)
, K'K+1
...FIN
IF (NLC ,GT, 0)
, CALL LCPREP(C(J),NOC(J),NTlM,DELT,A,B,DF,NLe,NPT,NR£C,LUN)
...FIN
IF (NCLC ,GT, 0)
. CALL LCCONT(C(J),NOC(J),NTIM,DELT,AA,NCLC,Nl.C,NRec,LUN)
...FIN
NOC(J)«C
..FIN
72
-------
(FLECS VERSION 2*. 061 IB-JUU-T1* 07120180 PAGE
. ...FIN
RFTUPH
FNf)
VERSION
73
-------
(FLECS VERSION 23.06}
1S-JUL-79 0719^189 PAGE
00001
Pip PI 02
00Q0S
0 PI PI (a 0
000P5
0000*
051007
00i*08
00009
00010
00011
0717112
00013
C
C
C
1
3
3
FUNCTION EVICTCX»Y)
LOGICAL EVICT
Cr>MMON/BAD/XBAD,Y8AO
(UTA XBAO,YBAO/1,PIE17, 1.0E37/
TRUE MEANS EVICT
IF(X«XBAD)1,Z,1
IF(Y-Y«AD)3,8,3
EVICT».TRUE,
RETURN
EVICT", FALSE.
RETURN
(FLECS VERSION
74
-------
(FLECS VERSION ??.06J
lfl»JUl>-7<»
PAGE 0007J1
00001
0000?
00003
00000
000P5
0000fc
00007
00P08
00009
00010
00011
00012
5)05113
00010
00015
0001fc
00017
n00l»
00019
00320
00021
00022
00023
007120
00035
005I2&
00027
00*?fl
00029
Bpnjfl
00031
00032
?pi?33
00030
00035
00036
00037
00038
00039
00000
00001
00002
00003
00000
00005
000a<>
00007
flcicafl
00009
00050
000;i
00052
00053
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
SUBROUTINE FACINPC9SC8» »TP» C, Cf , 0,
1 ETP, ICR, INPriL, Jf
2 NCi NI.C, NPT, SOURCE
DELT, OF,
1ELD, MO,
, NCLC, AA, LOGO
THIS ROUTINE is CALICO BY THE MAIN PROGRAM TO SUPERVISE THE READING
OF THE CONTROL INPUT FILE,
FORMAL PARAMETERSJ
RSEG
BTP
C
CF
0
nELT
DF
FTP
IFR
TNPFIL
JFIFLO
Mn
NC
NLC
NPT
SOURCE
NCCC
AA
CALLED 8YI FRANCO
INCLUDE 'SYIFRANCO.PHM'
BYTE INPFIL(30), SOU»CC(7), TITLEf80),
INTEGER*2 OPTC, OPTI), B3EG
INTEGERtO BTP, ETP
LOGICAL*l L06C
TUNITC6), LETRC, LCTRO
DIMENSION C(l), D(t)( CP(NLCP,N|.CP), DF (NLCF,NLCP) , A»(0,NLCM
C
C
C
C
C
C
C
C
C
C
C
DATA LFTHC / 'C' /, UETRO / »D' /
•** RECORD 1.0 *•*
TITLE . 80 COLUMNS USED TO TITLE
REAOfl,!) TITLE
WRITf(LP|2) TITLE
*** RECORD 2.0 *»«
THE OUTPUT
IMPFIL • INPUT FILE CONTAINING CALCULATED CONCENTRATIONS
SOURCE • KEYWORD IDENTIFING THE DATA TO BC ANALYSIZED
• 'ARM 'I DATA 18 THE
• MfRATRA'f DATA IS THE
SIMULATION
OUTPUT OF AN ARM SIMULATION
OUTPUT OF A SERATRA
75
-------
(FUfCS VERSION
0P054
0P055
00057
000*8
0P 21*9
00060
00061
00068
00963
-------
(FLECS VERSION 2?,46)
18-JUL-79 07120180 PACE 00003
00110
00111
00113
00114
00115
00116
00117
00118
00130
00131
00134
00135
00136
00137
00138
001?9
00130
00131
00133
00133
00134
00135
00136
00137
00138
00139
00140
00141
00143
00144
00145
00146
00147
00148
00149
00150
00151
00158
00153
00154
00155
00156
00157
00158
00160
00161
00ij»a
00163
00164
00165
C
C
C
C
C
C
C
C
C
C
C
C
C
• It RECORD SET 7,0
IE" • 0
SELECT (OPTC)
(1) CALL OPTKJC, C, LETRC, NC, IER)
(8) CALL OPT3(JC, C, LETRC, NC, IER)
(3) C*LL DPT3(JC, C, LETRC, NC, IER)
(OTHERWISE)
IER«3
WRIT6(LP,16)
WHITMLP.IT)
WRITE(LP,18)
..'IN
..FIN
ir HER ,EO. g) RETURN
*** RECORD SETS 8, PI, 9,0, AND 10,0 ***
SPECIFIED DURATIONS
RECORD SET DEPENDS UPON THE VALUE OF QPTO
«1» RECORD SET 8,0
• 3> RECORD SET 9, PI
•31 RECORD SET 10.0
IER •
0) OPTD
SELECT (OPTD)
(1) CALL OPTKJD, 0, LETRD, MD,
(?) CALL OPTaUO, 0, LETRO, MO,
C3) CALL OPT3(JO, 0, LETRD, MO,
(OTHERWISE)
TER • J>
WRITE(LP,16)
WRITE(LP,19)
WRITE(LP,18)
IER)
IER)
IER)
..FIN
IF (IER ,EQ, a) RETURN
*** RECORD 11,0 **«
NLC - NUMBER OF LC PIECEW18E LINEAR FUNCTIONS
NPT . NUMBER OF CONCENTRATION, DURATION PAIRS USED TO
DESCRIBE EACH FUNCTION
READ(1,14] NLC, NPT
IFR • 0
WHEN (NLC ,EO, R) WRITE(LP,B1)
ELSE
WRITE(LP,ZZ) NLC, NPT
IF(NLC ,QT, NLCF)
ICR • 2
WRlTE(LP,lfc)
WRITE(LP,23) NLCF
WRITE(LP,18)
F (NPT ,LT. 3 .OR. NPT ,GT.
IEH • 3
WRITE(LP,2«) NLCP
11
-------
(FLECS VERSION 22.4M
18.JUI.-79 07120184 PAGE
00166
00167
00168
00169
00170
00171
00172
00171
0K174
00175
00176
00177
00178
00179
00 180
00161
00163
00184
001S?
00186
00187
00188
00189
001 90
00191
P0192
00193
00194
00195
00196
PI0197
00198
00199
00200
P0201
00202
00203
00204
00205
00206
00207
00806
00209
00210
002H
00212
00213
00214
00215
00216
00217
00218
00?19
00220
00221
C
C
C
C
C
C
C
C
1
2
]
4
3
6
7
8
9
10
11
12
13
14
15
16
17
WRITE(LP,1«)
..FIN
UNLFS8 (IER ,EO. 2)
*«* RECORD SET 12,0 ***
NPT JOINT CONCENTRATION«OUR*TION PAIRS
WPITE(LPi?3) CI»I"1,NPT)
DO (IMfNLC)
. REAO(1.26) (CFtI, J) ,OF(I, J) , J«l,NPT)
. ^RITE (LP, 27) i, (DF(I,JJ,J*I,NPT)
. WRITE(LP,28) (CF(I,J),J»t,NPT)
...FIN
..FIN
, .F IN
*** RECORD SET 13,0 ***
NCLC • NUMBER OF LC CONTINUOUS FUN1IONS
WHEN (NCLC ,E3. 0) WRITECLP»31)
ELSE
WHEN (NCLC*NLC .GT. NCLF)
IER • 2
WRITE(LP,16)
wRiTE(LP,32) NLCF,NLC,NCLC
.,FIN
ELSE
WRITE(LP,33)
MRITE(LP,23) CI,I«l,4)
**• RECORD SET 14 ***
NCLC SETS OF 4 CONSTANTS DESCRIBING EACH LC CONTINUOUS FUNCTI
00 (1«1,NCLC)
. READ(1,26) (AA(J, I) , J«l,4)
. MfITE(LP,30) I, (AA(J,I),J"1,4)
...FIN
..FIN
. .FIN
RETURN
FORMAT(»0A1)
FORMAT (62X, 'FRANCO' /62X, 6 ('•*l)/62x,K'-')///83X,80AJ)
FORMAT(7Al,I5|lX,Qi30Al)
FORMAT(10X, 'CALCULATED CONCENTRATIONS INPUT FILE NAME',
J 9X,«-.',30AU
FORMAT(10X»'CONCENTRATION8 ARE THE RESULTS* FROM', 1SX, '•»')
FORMAT(1H»,61X,'AN ARM SIMULATION*)
FoRMAf(lM*,61X, 'A SCRATRA SIMULATION*)
FORMATC10X, 'THE DATA FIELD TO BE ANALYSIZED IS NUMBER',
j gx , '--• f 15)
FORMAT(2I5,F10,0,6A1)
FORMAT(10X, 'STARTING TIME STEP NUMBER' , 9X, ••»', 13)
FORMATCJ0X, 'ENDING TIME STEP NUMBER* , 11 X, '•-', 13)
FORMATC10X, 'ANALYSIS TIME STEP', 32X, '••',F10,8, 1X,6A1 )
FORMAT(//'5TARTING TIME IS LATER THEN THE ENDING TIME')
FORMATC2I3)
FORMAT(10X, 'CONCENTRATION INPUT METHOD' , 24X, '-•', 13)
FOPMATUH0,99X, '***** FATAL ERROR •****•)
FOPMATfSWX, 'iNVALin VALUF FOR THE SPECIFIED CONCENTRATION',
78
-------
(FLECS VERSION 2P.4fe)
18-JUL-79 07120124 PAGE 00005
00225
00229
00230
00231
00232
00233
00233
00236
002JT
00238
00239
00240
00241
00242
00243
00244
00243
00246
0024T
00248
00249
00250
00251
00232
00253
0d?54
18
19
21
22
23
24
23
26
27
28
29
30
31
32
33
34
33
36
3T
1 • INPUT CONTROL VARIABLE « OPTC*)
FORMAT(1«1X,'SCANNING WAS SUSPENDED')
FORMAK50X,'INVALID VALUE FOR THE SPECIFIED DURATION INPUT',
1 ' CONTROL VARIABLE - OPTD')
FORMATtlUX, 'DURATION INPUT METHOD',29X,'--',15)
FORMAT(10X,'NO LCP1ECENISE LINEAR FUNCTION EXCEEDANCE ANALYSIS'
1 ' TO «E PERFORMED')
FORMATC10X, 'SLOfJAL EXCEEDANCE INPUT'/
1 13X, 'NUMBER OF PIECEHI3E LINEAR FUNCTIONS',9X,'•-',IS/
2 i5x,'NUMBER OF DURATION, CONCENTRATION PAIRS',6x,'--',i5)
FORMATC50X,'INVALID NUMBER OF LC PIECEWISE LINEAR FUNCTIONS',
1 '(',12,' MAXIMUM ALLOWED)')
FOSMAHS0X,'INVALID NUMBER OF LC PIECEWISE LINEAR FUNCTION',
J ' PAIRS'/50X,'(MUST BE AT LEAST 3 AND NO MORE THAN ',
2 12,')')
FnRMATC20X,«FUNCTIUN',ax,«p(l3X,I»))
FORMATC8F10.0)
FORMATC39X,«CONCeNTRATION»,lX,lPElZ,S,,5(8X,lPElZi3))
FORMATt2I10,IS,F10.0,6Al)
FORMATU0X, 'STARTING TIME STEP NUMBER' , 23X, ••-',! 10/
10X,'ENDING TIME STEP NUMBER*,ZTX,•«»',I10/
10X,'ANALYZING SEQUENT NUMBER',26X, '.,',13)
FORMAT(10X,'NQ UC CONTINUOUS FUNCTION EXCEEOANCE ANALYSIS TO',
' Bf PERFORMED')
FORMAT(30X,'THE SUM OF NLC*NCLC MUST NOT EXCEED *,I2,/
FORMAT(//J«X,'UC CONTINUOUS FUNCTION DEFINED BV FOUR CONSTANTS')
FORMAT(23X,11,3X,'CONSTANTS',3X,«(ZX,JPE12,3))
FOPMATtl0X,»OATA ANALYZED IS',3«X,'»* RAW)
FORMAT(10X,'OATA ANALYZED IS',34X,'-» LOG')
FORMATtLl,2I5)
END
(FLECS VERSION 23,«i)
79
-------
(FLECS VERSION 83.4(0
18-JUL-79 07180188 PAGE 000101
00001
00008
C"0 C^P 5
00 ptpl tt
000H5
00006
00007
00008
00009
00010
00011
00018
00013
00014
00015
00016
00W1T
00018
00019
00080
00021
00088
00083
00024
00025
00026
00037
00088
00089
0ffl03«t
019031
00038
00033
00034
00035
00036
00037
00038
00039
00040
0004 1
00042
00043
00044
00045
00046
0B047
00048
00049
00050
00051
00058
00053
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
SUBROUTINE FRAC (N6, NT ,NTIM,NC, MO, P. C, 0)
THIS ROUTINE COMPUTES, PRINTS AND SAVES THREE ITEMS*
PE(I,J) - FRACTION OF THE EVENTS THE CALCULATED CONCENTRATION
IS cm UR GREATER THAT THE CONCENTRATION REMAINED
GREATER THAN OR EQUAL TO C(I) FOR A DURATION OF
0(J) OR GREATER.
PT(I,J) " FRACTION OF TIME THE CALCULATED CONCENTRATION IS C(I)
OR GREATER THAT THE CONCENTRATION REHAINED GREATER
THAN 0» EQUAL TO CCI) FOR A DURATION OF DCJ) OR CREATE
PTTfl.J) - FRACTION OF THE TOTAL TIME PERIOD THAT THE CALCULATED
CONCENTRATION REMAINED GREATER THAN OR EQUAL TO C(I)
FOR A DURATION OF D(J) OR GREATER,
INPUT VARIABLES
NF(I,J) - ACTUAL NUMBER OF EVENTS OCCURING^OF DURATION DCJ)
OR GREATER AND CONCENTRATION CCI} OR GREATER,
NT(I,JJ " NUMBER OF TIME STEPS COVERED BY THE EVENTS THAT ARE OF
DURATION 0(J) OR GREATER FOR CONCENTRATIONS C(I>
OR GREATER,
NTIM • NUMBER OF TIME STEPS ANALIZEO
NC " NUMBER OF SPECIFIED CONCENTRATIONS
MO • NUMBER OF SPECIFIED DURATIONS
PCI.J) • ARRAY USED FOR CALCULATIONS (SCRATCH PAD)
C - SPECIFIED CONCENTRATION VALUES
n • SPECIFIED DURATION VALUES
INCLUDE 'SYlFRANCO.PRM'
BYTE HF_AOl,HEA08fHEA03,HEA04,HeA05,MeA06
INTEGER*4 NT(JC,JO),NTIM
DIMENSION NE(JC,JO)»P(JC» JD),C(JC),D(JD),
1 HEAD] (e0),HEA02(S0),HEAD3(B0),HEAD4(80),HEAD5(80),HEAD(>CB0)
DATA HF.A01/18** • , «P' , 'E ' , 'R* , *C* » 'I ' , *N' , 'T ' , 'A ' , "G" , 'E * » * '»
1 »0»,»F»,» », »E», •V»(*E»,»Nfi *T«i*S*,« ','W'»'I'»'T«,
3 '"'I'D'!'*')' '','D'I'('!»J»!'*»!'T«I«0»I«R»I'N'I
4 *G'» *R'» 'E' , 'A', 'T'» ' E* i *R*t 13*' '/
DATA HEAD2/8*' » , 'G' , ' I » , ' V ' , »E ' , 'N' , » ' , 'T ' , «H« > * A • , »T • , ' ',
1 'T ' | *H ' r *E * ( ' ' , *E * , ' V ' , 'E* t *N ' , *T * , ' *,'I*i*8*»
8 * ','D','E','F','I','N',»E',"0',' ','8','Y',' *i'C«,
3 '0',*N',*C*,'E','N','T*,'R*,*A','T'r*I*»*0'f'N*i
4 'S',' ','C', »(','I'i ')»,' »,'0»,'R',' ',»G*,»R»,
5 'F_ ' | • A • , ' I • , *6 ' , *R* , 7* ' •/
DATA HEADS/8** • , »P « i 'E ' , 'R ' , *C ' , 'E ' , 'N» , • T • , ' A • , 'G« , 'E ' , ' ',
1 '0','F*,* ' , 'T' , • I • f 'M* , 'E* , » ' i *E* » 'V ' , •£' i 'N' ,
8 'T','9',' • , 'W , ' I * , *T* i 'H' , ' * | '0' > 'U* , 'R' , ' A* i
3 *T','I','0','N','S*|* 'j'O'i'F*,' 'i'D','(','J',
80
-------
(FLECS VERSION 2?,«6)
00054
00055
00036
00057
00058
00059
00060
00062
00063
00064
00065
00066
00067
00068
000fr9
00070
00071
00072
0007J
00074
00075
00076
00077
00078
00079
000B0
00081
00082
JI0089
00090
00091
000192
00095
00096
005)98
00099
00100
00101
00085 C
00087
0010J C
Pfllflfl
001515 C
1B.JUL-79
0','R* ' '
07IJS0I28
4 ')',' %'
DATA HSA04/8*' '
1 'T'.'H', •€»,' '
4 "N'f »S», • ',«C'
DATA HEADS /8*'
J rfQ» If• • « » J»
2 '£',• ','P',«E'
3 »N»,»T*» '3',* '
4 'A»,'T','I','0'
DATA HEA06/7*' •
,'0','e
i
• \) • , '
rT*'
'•'TS'E',
'I'i
'V,
'e'r'N',*T'
'(',»!*,»)»
» «.
* *
,' '.
'0',
',»!',«0'i
,'P'r'E'r'R',«C'i'E'
'0'f'T','*',»L'.' 'i
»R»»'I'i»0»,*0*i* ',
'W,'I','T','H»,' '.
8*' '/
'G','R»,'E»,'A»,'T'i
*0','R',' »,'E'i'V'i
•
•N',
'i'I','
S'v,1
'r'U','
'•'0','
.'IS
' t' I'
,ȣ',<
.t,.f*V*f*E*i'N',1
,»e',<*o«,' «,'8«,'
,7*' '/
'•'A'
•R',
*** PE CALCULATIONS **»
DO (I«1,NC)
00 CJ«i,MD)
IF(NEtI,l)
0)
CALL MATPPT(C,D,NE,NT,P,NC,Mn,
*** PT CALCULTIONS ***
DO (I»1,NC)
. no (j«i,MO)
. . tF(NTCI,l) ,NE, 0) P(I,J)»FLOAT(NT{I,J):
.'..FIN
CALL MATPRT(C,0,Ng,NT,P,NC,Mt
(NE(I,J))/FLOAT(NE(I,1))*100,
,HEAD?,2]
*** PTT CALCULATIONS ***
FT'NTlM
no (t«l,NC)
. DO (J»1,MO)
, . P(I,J)«FL')AT(NTCI, J))/FT*100,
. ...FIN
...FIN
C*LL
),HEA05,HE»Ufc,2)
CFI.EC8
22.46)
81
-------
(FLEC8 VERSION 2?.46)
18-JUL-T9 07120131 PAGE
00001
00003
P0CT0!
00004
PI00P5
00006
000BT
00004
00009
00010
00011
00012
005111
00014
000J3
00016
00017
00018
010019
001*20
00021
00022
000?3
0002*
000??
00026
00027
00028
00029
00030
910031
00038
00033
00034
00035
00036
00037
00038
00039
CH0040
00aai
00042
00043
00044
00043
00046
003«7
00048
00049
00050
00&M
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
1
10
20
30
40
50
SUBROUTINE GAMCUM(X, ALPHA, BETA, P)
FORM OF GAMMA 18 U** (ALPHA-l ) * EXP(f»ETA*U)
FOR CHI SQUARE DISTRIBUTION ENTER ALPHA* DP/8
AND BETA* 1/8
GAMCUM COMPUTES THE VALUE OF THE CUMULATIVE 6AMMA DISTRIBUTION
(P) WITH THE LIMITS OF INTEGRATION PROM 51 TO X
IF X.GE, (ALPHA/8 +4} THE ASYMPTOTIC EXPANSION
CO. 6.5.38 IN ABRAMOHITZ AND STEOUN IS USED,
OTHERWISE, A CONFLUENT HYPERGEOMETRIC JUNCTION
FOR THE INCOMPLETE GAMMA FUNCTION 18 USED, SEE
6.5,1* AND IS, 1.8 IN A8RAMOWITZ AND 8TESUN,
•
GIVEN BY
REPRESENTATION
EQUATIONS
THE RESULTS OF THE ROUTINE WERE CHECKED AOAINST TABLE 86tT
IN A'RAMOWITZ AND 9TEGUN
PROGRAMMED AND CHECKED BY AR(TONY) OL5EN
PATE! SEPTEMBER 29,1978
l|(ll NO ERROR CHECKING OF INPUT ARGUMENTS till
DATA ERR/1. E-4/
A • ALPHA
IF(X.GT,0,) GO TO 1
p • 0,
RETURN
V « «STA*X
IF(Y.LT.(A/2, * «.)} OO TO 30
suw •»,
R • I.
L • INT(A)
00 10 I • IrL
AI • I
P • R*(A-AI)/Y
TF(R.LT.ERR) GO TO 80
SUM • SUM * R
p • 1. . SUM*EXP((A-1,)*ALOB(Y) " Y • GAMLN(A)
RETURN
SUM • 1,
R "I.
no 10 i«t,50
AT • I
R • R*Y/CA * At)
IF(R.LT.ERR) GO TO 50
SUM • SUM + R
p • SU"t/A*EXP(A*ALnGlY} «Y »GAMLN(A))
RETURN
FNO
Illll
)
22.46)
82
-------
(FLECS VFKSIflN ??.ah) IR-JIIL-T1* H7U0I32 PAGE
FUNCTION GAMFN1(X,4)
C
C FUNCTION USED EXCLUSIVELY WITH GAMPPT SUBROUTINE.
C RpFF.R TO II FOR OPERATION
C
A J • PI ,
T»n*
5) PI PI pi 9 10 A.!*AJ+lf
n«0*X/CA*AJJ
TFC(»J-1,),LE.(X-A)) GO TO 10
TF((X*0/(Af AJ-l.-Xl/T) ,LT,1.E.7) GP TO 30
Gn TO 10
20 C*MFNl»A*ALOG(X)-X+ALOG(T)
RETURN
(FLECS VF-RSION 22,
83
-------
(FLECS VERSION 2?.46)
18-JUL-T9 071251134 PAGE 00001
00001
00002
00003
00004
00005
00006
00007
00008
00009
00(110
00011
0001?
0P013
0001
-------
(FLECS VERSION 22.46)
18-JUL-7" 07120135 PAGE 00001
00002
00003
00004
00005
00006
00007
0P0P8
CJI009
00010
00011
00012
00013
00014
00013
00016
00017
00018
00019
00020
00021
00022
00023
00024
0002?
00026
00087
00028
00029
00030
00031
00032
00033
00030
00035
00036
00037
00038
00039
00000
00041
0000P
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
10
30
40
50
60
SUBROUTINE GAMML(AMEAN,SMEAN,A,6)
GAMML COMPUTES MAXIMUM LIKELIHOOD ESTIMATES FOR THE
GAMMA DISTRIBUTION PARAMETERS ALPHA AND BETA, THE DENSITY
FOR THE GAMMA IS GIVEN AS
G(XMjB) • B**A*X**(A«l)*EXP(«.BtX)/G(A)
THE ESTIMATES ARE OBTAINED BY USING NEWTON-RAPHSON
METHOD AS DESCRIBED FOR THIS CASE BY
CHOI AND WETTE,TECHNOMETRICS ui683.690,i969
INPUTI AMgAN • ARITHMETIC MEAN OF SAMPLE
GMEAN • GEOMETRIC MEAN OF SAMPLE
OUTPUT! A • ALPHA MAXIMUM LIKELIHOOD ESTIMATE
8 » BETA MAXIMUM LIKELIHOOD ESTIMATE
PROGRAMMED AND CHECKED BY AR(TONY) OLSEN
OATEJ OCTOBER 3, 1978
Y ALOG(AM£AN/GMEAN)
A l./(2,*Y)
L INT(A).4
IF L.GE.0) GO TO 30
A A-L
X A*A
Y9 » •>6(/A*(l(«((i«(i,/21,«(5/X)/X)/X)/X + i2l*Y
Y« • 6,/X + (a.-(ffl-(2./7,«,4/X)/X)/X)/(A*X)
IF(L.GE,0) GO TO 5*>
A • A *L
LL • -I
00 4fl !• 1,LL
Y9 • Y9 -12,/(A *(I«D)
Y8 • Y8 *l8,/((A*(I"l))t(A*(]
CONTINUE
Y9 • Y9 * 12,*ALOGfl-L/A)
DELTA • Y9/Y8
A • A • UELTA
IFfABS(DELTA),LT.l,0E»0) GO TO 60
GO TO 10
8 • A/AMEAN
RETURN
END
(FLECS VERSION 22.46)
85
-------
(FLECS VERSION 8?,461
18-JUL-79 07120136 PAGE
00001
0000?
00003
00004
00005
00006
00007
000<"«
00009
000(0
0001 1
00013
00013
00014
00015
00016
0P017
00018
00SIJ9
00020
00021
00023
00c»?3
000S4
00025
00026
00027
0P028
q002"
0P0J0
00031
00032
00033
00034
00035
00036
00037
00038
00039
000451
00041
00042
00043
00044
00045
00046
00047
00046
00009
00050
00^51
00053
00053
SUBROUTINE GAMPPF (NOPRAM, P AR AM, P , PPP, NAMPRT)
c
C FORM OF GAMMA 13 X**CALPHA"|) * EXP(BETA*X)
C
C FOR CHI SQUARE DISTRIBUTION QUANTILES
c ALPHA »DF/a AND BETA • i/t
c
C — , GAMPPF COMPUTES THE PROBABILITY POINT FUNCTION
C FHR THE GAMMA DISTRIBUTION GIVEN A PROBABILITY
C
ENTER
(OUAMTILE)
P.
C-— . THE ALGORITHM is GIVEN BY W1LK, GNANADESIKAN, HUYETT (1*68)
c TECHNOMKTRICS 4.i«i8
c
c
C--— THE RESULTS w£Rg CHECK AGAINST THEIR TABLES.
C
C--— ExTER^aLS REQUIRED... GAMFN1, GAMLN
C
C-.— PROGBAMMEO AND CHECKED BY AR(TONY) OL8CN
C OATE j, SEPTEMBER 29,1978
C
C
COMMON/ IODEV/IPR, IRQ
C
LOGICAL NAMPRT
C
REAL LHS
C
DIMENSION PARAM(3)
c
IF(NOPRAM) 3,1,8
C---- DEFAULT VALUES FOR PARAMETERS
1 ALPHAM,
BETA •!,
GO TO 3
2 ALPH»«PA»AMC1)
BETA UPARAMC?)
3 IF(N*MPRT) 60 TO 60
C
PPF»0,
IFfP.LE.0.) RETURN
PPF»l ,
PPF«1,
IF(P.GE.l) RETURN
C
c COMPUTE RIGHT HAND SIDE OF EQUATION IN LOB FORM
C FIND LOWER BOUND FOR PPF
c
i.ALPH*
R«G»MLM(A)
PH3«ALOl> (P) +R
XLB»F.XP((ALOn(P*A)*fl)/A)
C
86
-------
(FLECS VERSION 22,46)
1B-JUL-T9 07120138 PAGE 00002
00054
00053
00057
00099
00060
00061
00062
00063
00064
00066
00067
00068
00069
00070
00071
00072
00073
00074
00073
00076
00077
00078
00079
00080
00081
00082
00093
00084
00085
C-—. FIND MULTIPLE OF LOWER BOUND SUCH THAT LH3.GT,RH3
C
LHS»GAMFN1 (X,A)
TFtLHS.GT.RHS) GO TO 20
XPBE-XU
IF(AB3((X«XPRE5/X).LT,1C"3) 60 TO 50
GO TO 10
C
C USE METHOD OF HALVING INTERVALS TO DETERMINE X
C
20 XL«(R-1,)*XLB
Jf»
IFfLHS.GT.RHS) GO TO 40
XL«X
GO TO 30
40 XU«X
GO TO 30
50 PPF«X/BETA
C
RETURN
o... WRITF TITLE AND RETURN
60 WRIT"! tIPR>100«) ALPHA,BETA
1000 FORMATr20X,27HEXPECTEO GAMMA WITH *LpHA "F9.4.
1 13H, ANO BETA
RETURN
FMO
(FLECS VERSION 22,46)
87
-------
(FLECS VERSION 22,461
19-JUL-70 07120140 PAGE
00001
00002
0P003
00004
00005
00006
0000T
0000S
00009
00010
00011
"10018
00013
00014
051015
00016
00017
00016
00019
00026*
00BS1
00028
00023
0002«
00025
00026
00027
00088
00029
00030
00031
00038
00033
00034
00035
C
c
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
SUBROUTINE UCCONT{rj|NOCJ»NTIM,oeLT,AA,NCLC,NCC,NRECiLUN)
THE PURPOSE OF THIS ROUTINE IS TO DETERMINE IF THE CONDITIONS
OF THE EVENT CAUSE EXCtEDANCE OF ANY OF THE LC CONTINUOUS
FUNCTIONS, THOSE THAT DO ARE HRITTCN TO THE FILE CORRESPONDING TO
THE CURVE THAT HAS BEEN EXCEEDED FOR FURTHER PROCESSINO,
CJ
NPCF
NTIM
CELT
At
NCIC
NIC
NREC
LUN
INCLUDE 'SYIFRANCO.PRM'
INTEGER*^ NOCJ.NT1M
DIMENSION AA(4,NICF),NREC(NLCF),IUN(NUCF)
0 • NDCJ*OELT
00 (J«1,NCU)
. IF (D ,CT. AA(e,J))
. FD • A»(1,J) * CAA(3,J)/CD-AA(8,J)M**(l./AAC4,Jn
. IF (CJ ,QE, FD)
. K • NREC(NLC*J)
, WRITE(LUNtNLC*J)'K) NTIM,NDCJ,CJ
,..^1N
..•'IN
..FIN
RETURN
END
(FLECS VERSION 22,46)
-------
(FLECS VERSION
18-JUI-79 0TI20I41 PARE 0000J
00001
00302
PP003
00004
00005
00006
00007
000P8
0071 C»9
00010
00011
00012
00013
0001 4
00015
00(916
00017
00018
00019
10020
00021
0002?
00023
00?2a
00025
00p?«i
00027
000?8
000?9
00030
00031
00032
00033
00035
00036
00*37
00038
0P039
00040
00041
00002
00043
00044
00045
00046
00047
0004*
00049
00050
00051
00052
00053
SUBROUTINE LCFINl(NHEC,LUN,NLC,NTIM,CFiOF,NPT,NCLC»AA,A,B,DEt.T)
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
THIS SUBROUTINE FINISHED THE LC50 DETERMINATIONS, IT EXAMINS
OIPECT ACCF.93 FILE FUR EACH LC FUNCTION AND ELIMINATES THOSE
THAT KfiULO CAUSE DOUBLE COUNTS, THE REMAINING RECORDS ARE
WRITTEN TO PERMANENT FILES WHICH WILL CONTAIN ONLY THE EVENTS
EXCEED THF. LC50 CURVE, IT ALSO PRINTS A SUMMARY OF EACH FILE
NRECCI) THE NUMBER OF RECORDS IN THE FILE FOR FUNCTION I
lUMfl) LOGICAL UNIT NUMBER OF THE FILE FOR FUNCTION I
NLC NUMBER OF LC FUNCTIONS
NTIM NUMBER OF TIME STEPS PROCESSED DURING ANALYSIS
CF
OF
MPT
NCUC
AA
A
8
nELT
INCLUDE 'SYIFRANCO.PRM*
INTEGF.««4 NOC J,NDCJP»KTIM,KTIMP, NTS | NTIM
DIMENSION NREC(NLCF) ,LUN(NLCF) ,CF(NLCF, NLCP) ,DF (NLCF.NLCP) ,
1 »Af4,ULCF),A(NLCF,NLCP),B(NLCF,NLCP)
WRITE (LP» 1 )
IF (NLC ,GT, 0)
. WPITECL**»2) (I,I«1»NPT)
. DO (I»1,NLC)
. . WRITE(LP,3) T,(OF(I,JJ,J«t,NPT)
! I..FIN
, WBITE(LP>5) (I, I»1,NPT»1)
. 00 (I«1,NLC)
. , WRITECLP.6) I, (A(I,J),J«1,NPT»1)
. . WRITE(LP,7) f8CI|J),J-l,NPT«l)
, ,, .FIN
...FIN
IF (NCLC ,GT, 0)
. WRITE(LP,8) (I,I«1,4)
. DO U-1,NCLC)
, . WRITE(LP,9) I,(AA(JfI),J«l,4)
. . . «f I^1
...FIN
CAIL ASNLUNd, 'SY',0)
no CI«I,NLC*NCLC)
. K n.'tPF. C ( I ) - 1
, ^HEN (K ,NE, 0)
THE
RfCOROS
THAT
,
. , i»t.uj(n I AS NCLF INCREASES so MUST THE NUMBER OF FH
c
. , BEING OPENFD BELOW
89
-------
(rues VERSION
IS-JUU'79 0712(9111 PACE 00002
00054
00055
00056
00057
00058
00039
00160
00*6 J C
00062 C
00063
00064
00065
00066
0006T
00068
00069
00070 ,
00071 ,
0007? ,
0*073 ,
I
t
1
1
1
1
I
|
1
1
I
I
1
t
1
1
, SELECT (I)
, (1) OPEN (UNI T"l, NAME* 'UC18AVE, RUT', TYPE«»NEW, FORM* 'UNFORMATTED')
, (2) OPEN (UNI T«t,NAME»'UC«8AVC, RUT *,TYPE*«NEH', FORM* 'UNFORMATTED')
, (3) OPEN (IINIT.1,NAME»'UC38AVE. RUT', TYPE«'NEW, FORM. 'UNFORMATTED')
, (4) OPEN (UNI T"1,NAME*'UC48AVE, RUT', TYPE* 'NEW, FORH*'UNFORMATTED')
, (5) OPEN (UNI T«1,NAME«'UC58AVE, RUT', TYPE* 'NEW', FORM* 'UNFORMATTED')
..FIN
i
, *** SEARCH FOR AND SAVE THE VALID RECORDS ***
, NEG»0
, NTG»0
, MREC»K
RF.AOU'MRCC) KTIMP, NOCJP, CJP
, IF (K .ST. 11
. DO (J*3,K1
. , MREC«M(?FC»1
. . READ(L'MREC) KTIM,NDCJ,CJ
. . IF(KTIH ,UE, KTIMP - NDCJP)
. , . NEG*NEG+1
00075 ..... KTIMP.KTIM
00077 CJP.CJ
00079
00080 C
00081
00083 ,
00083 ,
00084 ,
00085 ,
00086 ,
00087
00088 ,
00089 ,
00990
00091
00092
00093 ,
00094 ,
00095 ,
00096 ,
00097
00098
00099 ,
<
i
t
4
1
I
1
|
(
I
1
I
I
. ...FIN
. *»* SAVE THE LAST EVENT ***
, ...FIN
WRITE(l) KTIMP, NDCJP, CJP
NEG«NEG*1
NTG*NTG*NOCJ"
PG"FUOAT(NTG)/FUOAT(NTIM1 • 100,
TT • DEUT * NTG
IF (I .EO. 1) WRITE(UP,|0)
WHITE(LP,11) I,NES,NTB,TT,P8
CuOSE(UNIT*n
..FIN
-USE
NEG • 0
NTG • 0
TT « 0.0
PG • 0,0
TFU ,EO. 1) wRITE(UP,10)
MRITE(UP,11) I,NEB,NTG,TT,PG
...FIN
..FIN
00100 RETURN
00101 C
0B10* 1 FORM*T(1H1(46X,»GLOHAU EXCEEDANCE SUMMARY*//)
08103 2 FORMAT(32X,»UC PIECEWI8E UINEAR FUNCTIONS DEFINED BY JOINT',
00104 1 <• PAIRJV/6IX, 'JOINT POINTS'/9X,'FUNCTION'f9X,6(lSX,Il))
00103 3 FORM*T(13XrIt,4X,'OURATIONI»,6X,6(lPEl3,S,2Xn
00106 4 FORMAT(18X,»CONCENTRATION«',1X,6(1PE13,5,2X))
00107 5 FORM»T(//21X,'UC PIECE^ISE UINEAR FUNCTIONS DEFINED BY INTERCEPT',
0010» 1 * ANU SLOP (A+8(OURATION))»//58X,'SCGMENT'/9X, 'FUNCTION',
00109 2 9X,5(15X,I1))
90
-------
cnecs VERSION
IB-jut,-?1?
PAGE 00003
00110 6 F09MATfl3X,Il,«X,'INTERCEPTI»,3X,5(lPE13.3,2X))
00111 7 Fn»MAT(l8X,'Sl.aPF-l',9X,3(lPE13,3,?xn
00112 8 Fn«MAT(//3«X,'LC CONTINUOUS FUNCTIONS DEFINED BY FOUR CONSTANTS'
00111 t //9X,'FUNCTION',9X,5(13X,im
P0M« •> Ff5RMATU3X,n,«X|'CONSTANT3l',3X,5f JPE13,5,aX))
00113 la FORMAT(//8X,'EXCEEPANCC SUMM»RY'/?0X,'NUMBER*,«X,'NUMBER Qf't
0011ft I ' TIME PLANES'fSX,'DURATION WHILE',fcXf'GLOBAt EXCECOANCE'/
00117 2 9X,'FUNCTION',?X,'OF EVENTS',8(8X,'GREATER THAN FUNCTION'),
H0118 3 fcX,'(PERCENT)')
P0H9 11 FORM»T(l3x,Il,7X,I5,llX,I3,16X,F7,l,16X,F6,a)
00120 END
VERSION 82,06)
91
-------
(FLECS VFRSION 23,46}
1B-JUU-T"? 07188144 PAGE
00001
00002
00004
00005
00006
00007
00009
00010
00012
00813
00015
00016
90017
00018
00019
00030
00084
000?5
00036
000?7
00038
00029
00030
00031
03038
00033
00034
00035
00036
00037
00036
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
90058
00053
C
C
C
C
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
SUBROUTINE LCPREP(CJ,NDCJ,NTIM,OELT,A,B,DF,NLC,NPT,NREC,LUN)
THE PURPOSE OF THIS ROUTINE IS TO DETERMINE IF THE CONDITIONS
OF THE EVENT CAUSE EXCEEOANCE OF ANY OF THE LC PIECEWISE LINC*R
FUNCTIONS, THOSE THAT 00 ARE WRITTEN TO THE FILE CORRESPONDING TO
THE CURVE THAT HAS BEEN EXCEEDED FOR FURTHER PROCESSINO,
CJ
NOC.J
NTIM
OELT
A(l,J)
8(1,J)
nF(l,J)
NLC
NPT
NRECtI)
LUN(I)
INPUT CONCENTRATION VALUE C(J) OF THE EVENT
NUMBER OF TIMS PLANF.S IN THE EVENT
TIME PLANE NUMBER
TIME STEP SIZE
INTERCEPT OF FUNCTION i, LINE SEGMENT L
SLOPE OF FUNCTION I, LINE SEGMENT L
TIME FOR FUNCTION J, POINT L
NUMBER OF LC50 FUNCTIONS
NUMBER OF POINTS USED TO DESCRIBE EACH FUNCTION
ASSOCIATE VARIABLE OF DIRECT ADDE8S FILE POR FUNCTION I
LOGICAL UNIT NUMBER OF DIRECT ACCESS FILE I'OR
FUNCTION I
INCLUDE 'SYlFRANCO.PRM'
INTEGER*4 NTIM,NDCJ
DIMENSION A(NLCF,NLCP)iB(NLCF,Nl.CP),OF(NLCP,NLCP).
I NREC(NLCF),LUN(NLCF)
0»NOCJ*DELT
On
-------
(FLECS VERSION Za.«6) 18«JUL-7<» 0TI80I44 PAGE 00803
00<35« . .
...FIN
RETURN
VERSION
93
-------
(FUECS VERSION 22.46)
J6-JUL-71? 0712014.6 PACE 00001
00001
00002
000*3
00904
n A A AK
*' W "J (n ~
AM An JL
«*i? *>UO
Ola oi ot T
«i W Win 1
00008
A A An M
IP W V W *f
AM A • A
WB w 4 V
00011
00018
00013
000J4
00015
00016
00017
00016
00019
00020
00021
00022
00023
00029
00025
00fl?f>
00027
00028
00039
00030
0m 01 1 1
Wifjvt 3 J
00038
00(134
00055
00036
00037
00038
P0039
00040
00041
00042
00043
00944
00045
00046
00047
00048
00049
000^121
00051
00052
00053
C
C
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
SUBROUTINE MATPRT (C,D, N, ON, R, MAXC,MAXD,LIN*i »LINE8» TYPINO)
PRINT ROUTINE FOR 'FRANCO', MAY 1978.
C__M ADDAV PniuTAYklTKJR muf*VUY0ATYnu U A 1 1 1 V •
*w fNrfAT t»U^lji'**''lPiiW VfUniCC'vli^'^TXUIN V A L UC> v
Kl •••••*» lNT'f*PPA? ARRAV CONTAfMTNfi I^RlTOIIffMf*V nTMTBTHllTTOW V A 1 1
FROM FRANCO
n&i _ _«. • TklTfff^CD^iJI ADDAV PDkJTATIJfklfl U A 1 1 Iff • V DAM VDAU^n
UN »••••" InllclvCrfW** AttAT LUNfAJNJi'Nif V * ^ U C. 3 rnU™ r"A:NwU
R ______ flWC f\C TMDffff OK A I A DD A V ft f*fVWTAfKltWf* ftllMklADV n A T A PI W
m — •• — — w Urla t/r (flrttt nC At, AWn A T 8 CUNiAlNING oUnnAKT DATA UN
CONCENTRATION LEVELS OP SISNIPICAMT STRENGTH ANO OURA
TION FROM FRAC
M*XC ---» MAXIMUM NUMBER op c VALUES
MAXO — «• MAXIMUM NUMBER OP o VALUES
LINEl i
UINF.2 — TITLE LINES FQR PRINTOUT
TYPINO — REAL OR INTEGER VALUES TO BE OUTPUT
INCLUDE 'SYIFRANCO.PRM*
DIMENSION C(i),D(i>,R(jc, I)
INTEGER*? NCJC,D,PGPRST, TYPINO
INTEGER** DN(JC,1)
BYTE LINEl(n,LINE?(H»PRHTI(35},FRMTR(35)
HAT A FRMTI/' f ', M ", 'X', ',','1','P','E',M', '2', '.','5',, ', ','!',
2 »*' •/
1 -H' ,'*',',', M ', '0', ' C, '0', 'P', 'PS MS'B',',','!','1,'!
LNPRRW'MAXD/10
IF (M()n(MAXD,10),5T,0)LNPRRW«LNPRRW*l
PGPR9T.MAXC/50
IF (MOn(MAXC,50),NE,0)PQPRST«pr?PRST*!
NPASES«LNPHRW*POPR8T
WRITECLP.I)
WBIT€CLP»6) (LINEl (NDX)»NOX"1»80)
WRlTECLPrb) (LINE2(M)X) (NOX>lf80)
(_ IN«0
IOBEG"!
KNTC»1
t)0 (I"1,NPAGE3)
, IF (KNTC ,EQ, 1)
. . IF CI,OT.l)WRI1EUP»n
94
-------
tFUCS VERSION ??.0hi
lfl-JUL-T<> 0TI?0l4h PAGE
000-55
0005T
flpflfc*
003173
00075
00(176
05)177
00080
00081
00382
00083
000B«
00085
10B
. IF (
...'IN
,RT.
IOENO«MAXO
WRITEUPr ?nn(NDX) , NOXnIDREQ, IDEND)
WPITF.(LP,3)
UNTIU(LlN.RT.5W.OR,K,'nC.GT,MAXC)
. 3F.LECT (TYPINO)
, . (1) WRlT6{UP,FRMTIJC(KNTC)i (N
. . W WRlTE(UPrFRMTR)C(KNTC),(R(KNTC,NOX),NDXlI08lO»lDCNO)
. , (3) k|RlTE(uP»FRMTIJCCKNTC)»(DN(KNTCiNDX)|NDXtIOBeO, JOEND)
, ...FIN
, KNTC«KNTC*1
CONTINUE
IP (KNTC.Gr.MAXC)
. KNTC'l
...FIN
C
C
C
1
3
4
6
RETURN
(FtECS VERSION 21,46)
FORM»T(1H1/1H0)
t/il3X|iPi
(lX,'CONC
(57Xf 'DURATION')
95
-------
(FLEC8 VERSION 82,««i) 18-JUU-7'' 07120148 PACE 00001
99991
00004
00005
00006
00008
00009
00010
00911
00013
00914
00016
00017
00019
C
C
C
C
C
C
C
C
C
C
C
C
C
00081
00088
00083
00084
00085
00086
00087
00088
00089
00030
00031
00038
00034
10
80
30
40
50
SUBROUTINE NORCUM(X,AMEAN,8I6MA,P)
NOHCUM COMPUTES THE CUMULATIVE (-INFINITY, x) PROBABILITY
p FOR THE NORMAL DISTRIBUTION WITH MEAN AHEAN AND STAND*
ARO DEVIATION SIGH*.
PROCEDURE USES A POWER SERIES EXPANSION FOR B.IE.Z ,IE, !
RTVEM BY EU, 7,1,6 IN ABRAMOWlTZ AND 8TEGUN, FOR Z.GiT.t
THE CONTINUED FRACTION EXPANSION IN EQ, 7,1,14 IN
ABRAMOHITZ AND STESUN IS USED,
PROGRAMED AND CHECKED BY AR(TONY) OtSEN
DATEl OCTOBER 8, 1978
DATA ERR/1, 0E-8/
Y«fX-AMEAN)/8I6MA
AV • A8S(Y)/SQRT(8.)
IMAY.GT.1.) BO 70 30
At • AY
AS • AY
DO Id U • 1,50
A? • A2*AY*AY/(FUOAT(L)*0.S)
IP(A2,i.T,ERR) 60 TO 80
Al • At + Ag
ERF f 8, *EXP(«AY*AY)*A1/SQRT(3. 1419987)
60 TO 5(8
L » INT(18,*AY * 15.)
Al * FLOAT(U/ta,*AY)
DO 40 I«2»L
A8
Al
• (*?/2,)/(AY
• AY » Al
Al)
$••1.
00035 IFfY.6E.0,0) 8 • 1,
00036 P • (1, + 8*ERF)/8.
00037 RETURN
00038 END
(FLECS VERSION 88.46)
96
-------
(FLECS VERSION 82,46)
18«JUL»79 07180151 PAGE
00001
00008
00003
00004
00005
00006
00007
0P006
000019
000JO
00011
000)18
00013
00aja
00013
0fl01<.
00017
00018
00019
00020
00021
00022
00023
000?a
00025
00026
00027
00028
00029
00030
00031
00038
00033
00030
00«33
00036
00037
00038
00039
00040
00041
00048
00043
0^044
00045
00046
00047
00048
00049
00050
00051
00053
000*3
C
C— -
C
c
c
c
C-—
c
o—
c
c
c
c
c
o«.
c
c
c-..-
c
c
c
c
c
c
c— .
1
8
3
c
40
c
50
SUBROUTINE NORPPP (NOPR AM, PAR AM, P,PPF, NAMPRT)
NORPPF COMPUTES THE PERCENT POINT FUNCTION (OUANTILC)
FOR THE NORMAL DISTRIBUTION WITH MEAN AMEAN AND STANDARD
DEVIATION SIGMA GIVEN A PROBABILITY P, AMEAN AND SIQMA ARE
CONTAINED IN PARAM(l) AND PARAM(») RESPECTIVELY,
IF NOPRAM IS ZERO THEN THE DEFAULT VALUES FOR AMEAN ANO SIGMA ARE
USED, THAT IS PARAM(1)»0, AND PARAM(Z)«l,
IF NAMPRT IS .TRUE. THE ROUTINE WRITES OUT THE DISTRIBUTION
NAME, MEAN AND STANDARD DEVIATION, NO CALCULATIONS OCCURS IN
NAME, ALPHA AND BETA, NO CALCULATIONS OCCURS IN THIS CASE.
IF NAMPRT IS .FALSE, NO WRITING OCCURS, BUT THE COMPUTATION
IS MitiE.
PROCEDURE USES A RATIONAL APPROXIMATION GIVEN BY
En, 26.8.23 IN ABRAMOWITZ AND STEGUN,
PROGRAMMED ANO CHECKED BY AR(TONY) OLSEN
DATEt OCTOBER 8, 1978
LOGICAL NAMPRT
DIMENSION PARAM(NQPRAM)
COMMON XIOOEV/IPR.IRO
PITA CO,C1,C?,0 1,02, 03/8,5 177 17, 0,803853, 0,0 10328,
1 1,438788,0, 189269, 0.00J308/
JF(NOPRAM) 2,1,2
DEFAULT VALUES
AMEAN«0,
SIGMA«1,
GO TO 3
»MEAW«P*RAM(n
8lGMA»PAHAM(g)
IF(NAMPRT) GO TO 6P
X»0,
IF(P.LE.0..0R.P,GE.l.i?l) GO TO 50
R«P
TF(P,EO,0.5) GO TO «0
IF(P,GT,0.5) R • 1,«R
T«9QRT(-2,*ALOG(R))
ANUM«C0+T*(Ct*T« C?)
AOEN«1,»T*(D1»T«(D«» + T*03))
XBT-.ANUM/ADEN
IF(P,LT,0,5) X«»K
PPFnX*3IGMA+»MEAN
RETURN
PPF»Ji,
97
-------
(FLECS VERSION 2?.«e>) 1B-JUU-T1* 0TI20I51 PAGE
RETURN
00055 C
000s* c— • WPITE TITLE AND RETURN
FO"MAT(20X,'tXPF,CTEO NORMAt KITH MEAK'«» , JPE13,T,
00059 1 l«H AND STO OE'/ »P15,T)
END
(FLECS VERSION 22,
98
-------
(FLECS VFRSION
18-JUL-79 07120153 PAGE 00001
"10001
PI0a(»2
ppnipij
pi00pio
000105
0(9006
flflUC!7
00 (»8
000P9
00CTJ0
00011
00^12
00i? 13
00010
001713
00016
00017
00018
00019
00020
00021
00022
00325
00020
00025
00026
0002T
00029
00029
00030
00031
00032
00033
P003«
00035
00036
00037
00ns*
00059
00040
00101
00048
00043
00944
00045
00046
00007
00048
00049
00050
009! "51
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
1
2
3
4
5
6
7
8
C
SUBROUTINE OPT1 (LMT, ARAr,DORC,NVAL8,IER)
THIS PROr.HAM 18 CALLED BY FACINP WHEN FITHER OPTC OR OPTO
is INPUT AS "i" TO EXPLICITLY READ THE SPECIFIED CONCENTRATION
OR DURATION VALUES,
(.Mf . MAXIMUM NUMBER OP VALUES THAT CAN BE READ
»RAY - HOLDING ARRAY FOR THE VALUES READ
OORC - «"C"f CONCENTRATION VALUES BEING PROCESSED
»"0"r DURATION VALUES BEING PROCESSED
NVALS • NUMBER OF VALUES THAT WERE READ
IF.R - DATA ERROR FLAG
INCLUDE 'SYlFRANCO.PRM*
P.YTE DORC
DIMENSION ARAY(l)
READfl,!) NVAL8
SELECT (OORC)
. CC') WRITI(LP,2) NVAL8
. CO') WRITE(LP,3) NVAL8
...HN
WHEN (NVAL8 ,OT, LMT)
. IER«2
. «RITE(LP,4) L"T
...MN
ELSE
, IER"3
. SELECT IDORC)
. . <"C') WRITECLPiS)
. . t'U') WRITE(LP»6)
. ...PI*
. REAO(1,7) (ARAY(I),I«1,NVALS)
. WBITE(LP>8) (ARAY(I),I«1»NVAL8)
...HN
RFTURN
FORMAT(IS)
FORMAT(1H0,15X,I5,' NUMBER Of SPECIflEO CONCENTRATIONS TO BE*
1 ' READ')
FORMAT(1H0,15X,I5,' NUMBER OF SPECIFIED DURATIONS TO BE READ')
FORMAT(1H0,99X, ****** FATAL ERROR *****•/
1 50*, 'THE MAXIMUM OP', IS,' SPECIFIED CONDITIONS EXCEEDED'/
2 101X, 'SCANNING WAS SUSPENDED')
FORMAT (JH0,52X, 'SPECIFIED CONCENTRATIONS')
FORMAT (1H0,55X, 'SPECIFIED DURATIONS')
FoRMAT(8F10,0)
FnPMATU«,lP10El3,3)
END
(FLECS VERSION 22,46)
99
-------
(FLECS VCWS10N 22,««>)
JR-JUL-79 07120155 PAGE 00001
00001
051302
00303
00001
00105
000(*f>
00007
5105108
00009
00010
00CIJ1
00012
00313
00010
00015
0001*
00017
00018
t»0?19
00320
001*21
00922
001*33
00024
00*25
00026
00027
00028
00029
00330
00031
00032
00033
00034
00035
00036
00037
00038
00039
00010
00001
00012
00013
091014
00013
00046
00047
00018
00019
00050
00051
P0052
00053
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
1
2
3
1
5
SUBROUTINE OPT2(LMT,ARAY,DORC,NVALS,IER)
THIS ROUTINE IS CALLED BY FACINP WHEN EITHER OPTC OR OPTD 13
INPUT AS "2", A LOWF.R BOUND, UPPER BOUND AND INCREMENT ARE READ
AND FROM THIS THF. NUMBER OF VALUES AND THE VALUES ARE DETERMINED,
I_MT - MAXIMUM NUMBER Or VALUES THAT CAN BE CALCULATED
AR»Y - HOLDING ARRAY FOR THE CALCULATED VALUES
DORC - »"CHr CONCENTRATIONS BEING PROCESSED
•"U"; DURATIONS BEING PROCESSED
NVAL3 - NUMBER OF VALUES THAT ARE COMPUTED
IER - DATA ERROR FLAQ
INCLUDE 'SYlFRANCO.PRfl'
BYTE OORC
DIMENSION ARAY(l)
RE*n(l,l) VMIN,VMAX, VINTVL
NVALS«(VMAX«VMIN)/VINTVL*1
SELECT (OORC)
. C'C') MRITECLP,?)
. ('D') WRITECLP,3)
..."*•
WRITE(LP»4) VMIN,VMAX,VINTVL|NVALS
WHEN (NVALS ,GT, LMT)
. IKR-1
. «RITE(LP,5) LMT
...FIN
ELSE
. IER-PI
f ABAY(1)«VMIN
. DO (I»2, NVALS)
. , ARAY(n«ARAY(IM)»VINTVL
. ...FIN
. SELECT (DORC)
. . CC») WRITE(UP,7)
. . C'D«) WRItE(tP,B)
. ...riN
. H9ITEUP,*) (ARAYCI), I«l, NVALS)
...FIN
RETURN
FORMAT(3F10,0)
FORMAT(1H0,9X,'THE SECOND METHOD HAS BEEN CHOOSEN FOR INPUTTING'
1 • CONCENTRATIONS')
FORM»T(1H0,9X, 'THE SECOND METHOD HAS BEEN CHOOSEN FOR INPUTTING'
1 ' DURATIONS')
FORMAT(9X, 1PE12.5, ' MINIMUM VALUE1/
1 QX, 1PF.12.5, ' MAXI'UjM VALUE'/
2 9x, iPEie.s, • INTERVAL BETWEEN VALUES'/
s i*>x,n,' NUMBER OF VALUES (COMPUTED)')
FORMAT riH0,<»9x, ••***• FATAL ERROR *****'/
100
-------
(FLECS VERSION P3.461 18-JUL-79 HM2PM55 PACE 00008
1 5HX,'THE MAXIMUM OF',I5,' SPECIWO CONDITIONS EXCEEDED'/
g ItltX, 'SCANNING WAS CONTINUED')
T FOPMAT(lHei,«TX,'3PFClFICD CONCENTRATIONS (CALCULATED)')
8 FORMAT(lH0,
-------
(FLEC9 VERSION 2?,flfe)
lfl-JUl«n 07120157 PACE 00001
00001
aeat»2
00003
00000
000103
00006
00007
0051 08
000109
00(110
0001 1
0001?
00013
001*! a
00015
00016
00117
00*18
00019
00020
00021
00022
00023
00021
00025
00056
00027
00028
00929
00030
00031
0003?
00033
0003«
00035
00036
00037
00038
00039
00040
00001
00942
00043
00040
00045
00046
00007
00008
00049
00930
00031
00058
00053
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
SUBROUTINE 0>>T3(LMT,ARAY,DORC,NVAL9, JER)
THIS ROUTINE IS CALLED BY FACINP WHEN EITHER OPTC OR OPTD 18 INPUT
AS * "3". WITH THIS OPTION, THE USER SPECIFIES A SET OF RANGES AND
THE NUMBER OF VALUES TO BE COMPUTED WITHIN THE RANOE.
L*T MAXIMUM NUMBER OF VAUE3 THAT CAN BE COMPUTED
ARAY HOLDING ARRAY FOR THE CALCULATED VALUES
nORC «"C"» CONCENTRATIONS B|lN6 PROCESSED
•"0"f DURATIONS BEING PROCESSED
NVALS NUMBER OF VALUES THAT ARE PLACED INTO ARAY
IFR DATA ERROR FLAS
INCLUDE 'SYlFRANCQ.PRM*
BYTE DORC
DIMENSION ARAY(I) ,NS(19) , VALSCSB)
*** EXPLANATION OF INPUT VALUES »**
NSETS « NUMBER OF RANGES TO BE READ
VALS(I) . LOWER LIMIT OF RANGE 1*1; UPPER LIMIT OF RANGE I
VALS(I) is THE MINIMUM VALUE
VAL3(NSET*1) IS THE MAXIMUM VALUE
NSU) » NUMBER OF VALUES TO BE COMPUTED BETWEEN VALSCI)
AND VALSUfl)
RE*Otl,l3 NSETS, VAL3U)
RE AD (1,1) (N8(n,VAL8(I»n,I»l,NSETS)
SELECT (OORC1
. CC') WRITEtUP.2)
, CO') WRITE(LP,3)
...FIN
»** DETERMINE THE TOTAL NUMBER OF VALUES »**
NVALS • 1
DO (!•!, NSETS) NVAL9 • NVALS * N3CI) * I
WRlTECLPfO) VAlS(l), (NSC!),I,VALS(l*n,I,I«lfN3£TS)
WRITE(LP,8) NVALS
WHEN (NVALS .GT, LMT)
IEfl«l
WRITE(LP,5) LMT
..FIN
LSE
IER»0
KVAL3«0
On fl»2, NSETS*!)
*** PLACE LOWF.R LIMIT INTO HOLDING ARRAY ***
KVALS«KVAL8+1
ARAY(KVALS)«VAL9(I»1)
N « NS(I-l)
IF (N ,NE, 0)
, *** COMPUTE INTERIM VALUE« BETWEEN VALSO1) AND VALS(I) ***
102
-------
(FLECS VERSION 22,06)
1S-JUL-T9 07«20I5T PARE 00<"02
00055
SELECT (OtlRC)
. COM
00037
0005B
00059
00061
00068
00063
00064
00065
00066
00067
00068
00070
00071
00372
00373
00074
00073
00076
00077
00378
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00098
00093
010094
00095
00096
00097
00098
00099
00100
C
c
C
1
8
3
4
5
6
7
8
9
C
. . t , 00 (KM,N)
..... KVAtS«KVALS + 1
, , , , , »R*YUVALS)«ARAY(KVALS-1) * RINT
....... FIN
...... FIN
. . . CC»)
.... RTNT • (AtOG(VALS(n)-ALOG(VAtStl-l))) / (N*l)
, . . . DO (K«l,N)
..... KVALS • KVALS » 1
. . . . , TMP • AUOG(ARAY(KVALS»1)) + RINT
..... ARAY(KVALS) • EXP(TMP)
.... ...FIN
. . . ...FIN
..... FIN
. ...FIN
...FIN
*** PLACE MAXIMUM VALUt INTO HOLDING ARRAY ***
SELECT (OORC)
. (*C») WRITE(LP»6)
, CO*) WRITS(LP,9)
...FIN
WRITE(LP,7) (ARAYCI)rI«l»NVAL8)
..FIN
PETUPN
ro"MAT{lH0,9X, 'THE THIRD METHOD HAS BEEN CHOOSEN FOR INPUTTING*,
1 • CONCENTRATIONS*)
FORMAT(1H0,9X,*TH6 THIRD METHOD H»S BEEN CHOOSEN FOR INPUTTING*,
1 ' DURATIONS')
FQRMAT(lH0,8Xf 1PE18.5,* LIMIT FOR RANGE I'/
l f!6x,i5,* NUMBER OF INTERIM VALUES IN RANGE', i?/
2 9X.1PE12.5,' LIMIT FOR RANGE', I8/))
FORM*T(lH0,99X, '***** FATAL ERROR *****•/
1 30X,'THE MAXIMUM OF', IS,' SPECIFIED CONDITIONS EXCEEDED*/
2 101X, 'SCANNING WAS CONTINUED')
FORMAT(lH0,a7X, 'SPECIFIED CONCENTRATIONS (CALCULATED)')
FORMATfl X,1P10E13,5)
FORM*T(I«»X, is, ' NUMBER OF VALUES (COMPUTED)*)
FORMAT(1H0,Q9X, 'SPECIFIED DURATIONS (CALCULATED)')
VERSION 22,46)
103
-------
(CLECS VERSION 22,46)
18-JUL-79 07181101 PAGE
00001
00002
000513
00004
00105
00006
005107
00008
00009
00010
00011
00013
00013
00010
00016
00017
»001S
00019
00020
00021
00023
00024
00025
00026
0002T
00028
00029
00035"
00031
SUBROUTINE PIECE(CF|DF,NLCiNPT(A,B)
THE PURPOSE or THIS POUTINE is TO CONSTRUCT NLC
LINE*" FUNCTIONS C«F(0) PROM AN INPUT Of NPT PAIRS OP POINTS
fOF(I,J),CMI,J)) FOR EACH FUNCTION. A(I,J) AND 8(1,J) OP A LINE
SEGMENT WITH AN INFINITE SLOPE ARE RETURNED AS 0,
CF(I,J)
DF(!,J)
NIC
NPT
CONCENTRATION VAtUE FOR FUNCTION I, POINT J
TIME FOR FUNCTION i, POINT j
NUMBER OF LC PIECEHI8I LINEAR FUNCTIONS
NUMBER OF PAIRS USED TO DESCRIBE FUNCTIONS
INTERCEPT OF FUNCTION I, LINE SEGMENT J
SLOPE OF FUNCTION I, LINE SEGMENT J
INCLUDE 'SYlFRANCO.PRM*
DIMENSION CF(NLCF,NLCP)»OF(NLCF»NLCP),A(NLCF,NLCP)»8tNtCP»NLCP)
00 CIM,NLC)
. DO (J»1,NPT-1)
WHEN(OFII,J) ,EQ. DF(I,J»D)
...FIN
ELSE
. 8(I,J)«(CF(I,J*n»CF(I,J))/(DF(I,J»l).DF(I,J))
. A(I,J)-CF(I,J)-B(I,J)«DF(I,J)
..PIN
...PIN
RETURN
FMO
(FLECS VERSION 82.46)
104
-------
(FLECS VERSION
18.JUL-79 07121103 P*GE
00001
00002 c
001003
00004 c
0000?
00006 C
0P00T
00008 c
00009
00010 C
001*1 1
00012
00013 C
fl0AMCAN(?),A80(2)
COMMON /SCALE/ UYMIN,UYMAX,UXMIN,UXMAX
COMMON /CONTRUX L I . NCOL r 1XAX, IV»X, ICONZ, NDI6IT, FORM
COMMON /IODEV/ IPR,IRD
*** FREaucNCE PLOT ***
no (I«3,NC)
. NCIU-2) • NTt2,l) - NT(Ifl)
. PNCKI-2) • FLOATINCKI-2)) / FLOAT (NT (2, 1) )
. WORKCI-8) • ALOB1B(C(D)
...MN
NCPLOT • NC * 1
RfPEAT gNTIl (NTCNCPUOT, 1) ,NC. 0) NCPLOT « NCPLOT - 1
FORM • «E9,2'
IPR • LP
IYAX • 4
UYMIN • 0,0
UYMAX • 1,0
WRITCCLP.J)
FORMAT(lHl,34X,'Lor, 10 CONCENTRATION (X) VS CUMULATIVE •
1 'FREQUENCY (Y)')
CALL CR08 S ( NCPLO T-2( WORK, PNC !,*•», I DUM,DUM,0)
*** NORMAL PLOT ***
IY»X • 8
PARAM(l) • AMEAN(2)
PARAM(2) • ASO(2)
WRITC(LP,8)
FORMAT(1HJ,49X, "NORMAL PROBABILITY PLOT'/
1 36X, 'OBSERVED CONCENTRATION (X) VS NORMAL QUANTA (Y)')
CALL QQPLOT{NCPLOT-2,C(3),,FALSE,,2,PARAM,NORPPF,OUM,
1 WORK, NCI, NTC8,D)
*** LOG NORMAL PLOT ***
PARAM(l) « LM£AN(2)
PARAM(g) • LSO(2)
WRITECLP.3)
FORMAT(1H1,4TX, 'LOG NORMAL PROBABILITY PLOT'/
3«X,'LOG OBSERVED CnNCENTRAT ION (X) VS NORMAL QUANTlLE CY)')
C»LL QQPLUt (NCPLOT-2,C(3) , , TRUE . , , PAR AM, NORPPF, OUM,
1 WQRK, MCI, NT(3,U)
105
-------
(flECS VFRSION ??.«f>) H-JIIL-T9 07191103
c
C *** GAMMA PtOT ***
P*"AM(1) • ALPHA
P»RAM(?)
FORM*T(lHtia9X, 'GAMMA PROBABILITY PLOTV
1 36X,'OB8EHVEO CONCENTRATION (X) V8 OAHMA OUANTILE (Y)»)
CALL QOPLOT(NCPLOT-?,C(3),,F»l.9e.»a»PARAM,GAMPPFlOUM,
t WORK, NriiNT(2, D)
(FLEC3 VERSION
106
-------
VERSION 32.06)
18«JUL-7<> 07121186 PAGE 00B01
000P1
00003
00005
00006
00007
00°I08
00009
000110
BP0J J
00015
00016
000)8
00019
00020
00091
00088
00023
00020
00026
000?7
00028
C
5
13
20
81
22
SUBROUTINE P8CAL.e(UXIS,ISCALE,lINBEG,SMIN,9MAX,3INCR,8FIHST,
1 LINEND)
IF (ISCAU) 5, 5, la
SFI"ST»SMAX
IF(1AXI3 ,EO. ?) SFIRST«SMIN
RETURN
M.LIN8EG/IAXI9
8LOG»AI.OG10t(SM»X. SMI N) /FLOAT (M))
9INC«J*AINT(J0,**(»MOO(8UOG*
-------
(FLECS VERSION 2?.
19-JUL-f 07121107 PAGE 00001
00001
00002
000P3
00900
00^05
00006
00007
00008
00009
000J0
00011
00013
0001$
00014
00015
00016
0001?
0001*
00019
00020
00021
00022
00033
00324
00025
0P«?«
00027
00028
000129
00030
00031
00032
P0033
0003«
00035
00036
00037
00039
00039
00040
00041
00042
00043
00044
00045
00046
000*4T
00008
00049
00050
00051
0005Z
00053
C
C-—
C
C
C
c— —
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c.---
c
c
c
c
c
c
c
10
c
20
30
c
1000
2000
SUBROUTINE QQPLOT(N,X,LOGX,NOPRAM,PARAM,PPF,XS,WORK,NCI,NFREQ)
THIS SUBROUTINE MAKES A LINE-PRINTER PUOT Of THE DATA IN THE
ARRAY x(.) VS PERCENT POINT PROBABILITY DATA (QUANTU.I8) OBTAINED
FROM THE SUBPROGRAM PFF,
INPUT ARGUMENTS
N - NO, OF DATA POINTS IN THE ARRAY Xt,},
X • ARRAY CONTAINING THE DATA TO BE PLOTTED ON THE X.AXIS,
SEE ALSO LOGX BELOW. DIMENSION ,GE. N.
LOGX • A LOGICAL VARIABLE
If LOGX". TRUE, THEN ALOGtXC,)} IS PLOTTED ON THE X-AXI9
IF LOGX-, FALSE, THEN X(,J IS PLOTTED ON THE X-AXIS,
NOPRAM . NO, OF PARAMETERS REQUIRED BY PPF,
PARAM . ARRAY CONTAINING THE PARAMETERS REQUIRED BY PPF,
DIMENSION ,GE, NOPRAM.
PPF - SUBROUTINE SUBPROGRAM TO COMPUTE THE PERCENT POINT
PROBABILITY DATA (OUANTILES) TO BE PLOTTED ON THE
X-AXIS,
XS -A SCRATCH ARRAY WHICH AFTER THE RETURN, WILL CONTAIN
THE ARRAY X(,) tOR ALOBfXC,))) AFTER SORTING! SUCH THAT
XSC1) ,LE. XS(2) ,LE, ... ,LE, XS(N).
DIMENSION ,GC, N,
WORK . A SCRATCH ARRAY, DIMENSION ,8E. 3*N,
IN ADDITION TO PPF, THIS ROUTINE REQUIRES THE FOLLOWING
SUBPROGRAMS^ CROSS, SORTP , UNIFRQ
LOGICAL LOGX
INTEGER** NCI(1),NFREQ
DIMENSION X(1),XS(1) , WORK (3) , PAR AMU )
COMMQN/IODEV/IPR, I«D
CALL SORTP(X,N,X$,WORK)
CALL UNIFRQtN, NCI, WORK, NFREO)
IF(, NOT, LOGX) GO TO 20
DO 10 I«1,N
xsALOG(xsnn
00 30 I«l,N
CALL PPF(NOPRAM,PARAM,WORK(I),PPFVAL,,FALSE,)
J»I+N
WORK (J)«PPFVAL
CONTINUE
IFt.NOT. LOGX) WRITE (IPR,1000)
FORMATC45H QQPLOT X-AXIS ORDERED DATA VS Y-AXIS «)
IF(LOGX) WRITE (IP*»a000)
FORMAT(50H QQPLOT X-AXIS LOGtORDERED DATA) V9 Y-AXIS •)
108
-------
(FLECS VERSION 2?.«fc) 1«.JUL-71 07121187 PAGf PI0002
C
C---- MAKe PRINT C»UL
CALL PPF(NOPR*M,P*R»H,«Ol»K,PPFV»L»f TRUP.)
P!0("57 C--"« DP*W PLOT
P>Pif>l5» CALL CR08S(N,X9,WORK(N*l)l'*'lWO«K(J)»WORK(a*N«n,8)
RETURN
tFLECS VERSION 82,
109
-------
VERSION 22.«<>)
lfl»JUL»79 07121110 PAGE 005101
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
000J4
000J5
00016
00017
000J8
00&19
00020
00021
00022
00323
00024
00025
00026
00027
00026
00029
00030
00031
00032
00033
00030
00035
00036
00037
0-0038
00039
00040
00041
00042
00003
00044
00045
00046
000147
00048
PI 0 PI 09
00050
00051
00052
00053
C
C
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
SUBROUTINE 80RTP(X,N,Y, IPOS)
THIS ROUTINE SORTS THE CLEMENTS Or THE INPUT VECTOR X AND PUTS THE
SORTED ELEMENTS INTO THE VECTOR V, IT ALSO CARRIES ALONG THE
INDEX NUMBER OF EACH ORDERED OBSERVATION-. THAT ISi IT CARRIES ALO
THE POSITION OF THE I*TH ORDERED OBSERVATION (FOR EACH '[} AS IT
WAS IN THE ORIGINAL UNORDERED DATA VECTOR X, THESE POSITIONS ARE
PL*CEO IN THE VECTOR IPOS, THIS ROUTINE IS USEFUL IN ATTEMPTING T
LOCATE THE MINIMUM, THE MAXIMUM, OR SOME OTHER ORDERED OBSERVATION
OF INTEREST IN THE ORIGINAL UNORDERED INPUT VECTOR X.
THE INPUT TO THIS ROUTINE IS THE SINGLE PRECISION VECTOfl X OF
(UNStmEU) OBSERVATIONS, THE INTEGER VALUE N (• SAMPLE SIZE),
AN EMPTY SINGLE PRECISION VECTOR V INTO WHICH THE SORTED 098ERVATI
WILL BE PLACED, AND AN EMPTY SINGLE PRECISION VECTOR IPOS INTO WHI
POSITIONS OF THE SORTED OBSERVATIONS WILL BE PLACED,
THE OUTPUT FROM THIS ROUTINE IS THE SINGLE PRECISION VECTOR V INTO
THE SORTED OBSERVATIONS HAVE BEEN PLACED, AND THE SINGLE PRECISION
IPOS INTO WHICH THE POSITIONS OF THE SORTED OBSERVATIONS HAVE SEEN
RESTRICTIONS ON THE MAXIMUM ALLOWABLE VALUE OF N«»THE DIMENSIONS
OF VECTORS IU AND IL (DEFINED AND USED INTERNALLY WITHIN THIS ROUT
DETERMINE THE MAXIMUM ALLOWABLE VALUE OF N FOR THIS
ROUTINE, IF IU AND IL EACH HAVE DIMENSION K, THEN N MAY NOT EXCEE
2»*(K*1) » 1. FOR THIS ROUTINE AS WRITTEN, THE DIMENSIONS OF IU A
HAVE BEEN SET TO 36, THUS THE MAXIMUM ALLOWABLE VALUS; Of N IS
APPROXIMATELY 137 BILLION, SINCE THIS EXCEEDS THE MAXIMUM ALLOWA8
VALUE FOR AN INTEGER VARIABLE IN MANY COMPUTERS, AND 3INCI A 90RT
BILLTON ELEMENTS IS PRESENTLY IMPRACTICAL AND UNLIKELY, THEREFORE
TEST FOR WHETHER THE INPUT SAMPLE SIZE N EXCEEDS 117 BILLION HAS B
INCORPORATED INTO THIS ROUTINE, IT IS THUS ASSUMED THAT THERE IS
(PRACTICAU RESTRICTION ON THE MAXIMUM VALUE OF N FOR THIS ROUTINE
PRINTING— NONE UNLESS AN ERROR CONDITION EXISTS
THIS ROUTINE IS SINGLE PRECISION IN INTERNAL OPERATION,
SUBROUTINES NEEDED—NONE
SORTING METHOD—BINARY SORT
REFERENCE—C»CM MARCH 1969, PAGE m (BINARY SORT ALGORITHM BY RIC
c, SINGLETON,
•-CACM JANUARY 1970, PAGE 30,
—CACM OCTOBER 1970, PAGE 6?4,
— JACM JANUARY 1961, PAGE 41,
WRITTEN BY JAMES J. FRLIBEN, STATISTICAL ENGINEERING LABORATORY
NATIONAL BUREAU OF STANOARE8, WASHINGTON, D.C, 20234 JUNE 19
DIMENSION X(N),Y(N),IPQS(N)
COMMON /IODEV/ IPR,IRD
DIMENSION IU(J6), 11(36)
CHECK THE INPUT ARGUMENTS FOR ERRORS
IF(N.LT,1)GOT050
IFCN.EQ.l)GrjT055
HOLO-X (1)
IF (X(H ,NE. HOLD) GOT 090
CONTINUE
WRITE (IPR,9J HOL.O
n06JI«l,N
vm.xf n
110
-------
(FLECS VERSION ?2,46)
18-JUL-T9 07I21H0
B0P03
00054
00055
00056
00057
00SI58
00(559
00060
00061
00062
000*3
00064
00069
00066
00067
00068
00069
00070
00071
00078
00073
00070
00075
00076
00077
00078
001*79
00080
00061
("008?
00083
00084
000B5
00086
00087
000*8
000*9
00090
00091
00098
00093
00094
0009?
00096
00097
00098
00099
00100
00101
00102
00103
00104
00109
00106
00107
00108
00109
C
C
C
C
C
C
C
C
C
CONTINUE
50 WPnF(IPR,15)
WRITF(IPH,
-------
(FLECS VERSION ;
00110 380
.46)
18«JIIL-79 07121110 PACK 00003
00118
00113
00114
00M6
00117
0018?
00183
0018«
00185
("0186
0018T
00188
00130
00138
00J35
0013T
00138
00139
00140
00141
00148
00143
00140
00143
00146
00147
00U9
00150
00151
00158
00153
00154
00155
00156
00157
00H«
00159
00U8
00163
00164
IF (Y(.H,<;E,AMEr>) 60*03*0
YfMlO)»Y(J)
IPOS(»ID)"IP03(J)
IP03t,n«lMED
IMEO«IPOS(MID)
lMYm,LE,AMEO)GOTOJ4B
Y(Mir»«Y(I)
YfI)«*MEO
IPOSfD-IMEO
*MEO«Y(MIO)
330
340
350
COTQ340
YfL).Y(K)
Y(K)«TT
!POSfK)«ITT
L«L"t
IF(Y(L),CT.A«EO)GOTn340
ITT«IP03(U)
!FCY(K).LT,AMEO)GOT0350
IF(K.LE.U)GOT0330
JHKiJ.K
TMLMI.UE,JMK)GOT03fc0
360
370
360
I«K
M«M
GOT
IL(M)«K
ROT0380
M«M«1
J«IU(M)
JMI.J-I
IMJMI,GE,11)GOT0310
!•!-!
I«I*J
IFfI,EQ,J)60T0370
IMEO«1POS(I»1)
IF(Y(n.LE.»MEO)GOT0390
K.I
395
!POSfK»n«IPOS(K)
112
-------
(FLECS VERSION 23,46) IB.JUU-n &7I21I10 PACK 000)04
IF(*Meo.LT,yfK))60TOJ95
V(K+1)«AMED
GOT0390
EMO
(FLECS VERSION 22,fl(O
113
-------
(FLECS VERSION a?,at.)
18-JUU-T9
PAGE 0000J
000I?|
00008
0091*3
00004
00005
00006
00007
00008
00009
00010
00011
00018
00^13
P00J4
00015
00016
00017
00018
00019
00030
000?1
00028
00n?3
00^24
00023
00026
00027
00028
00029
00030
00031
00033
00033
00034
00035
00036
00037
0093»
00039
00040
00041
00043
00043
0P004
C
C
c
C
C
C
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
SUBROUTINE SUMSAT(AM£AN, ASUMS, CONC, LMEAN, L3UMS» W)
THIS SUBROUTINE 18 RESPONSIBLE FOR ACCUMULATING THE PARTIAL VALUES
THAT WILL FORM THE SUMMARY STATISTICS,
FORMAL PARAMETERS:
AMEAN ARITHMETIC MEAN
ASUMS
CONC CONCENTRATION
LMEAN LOG MEAN
L8UM8
W COUNT OF THE NUMBER OF SUMS IN AMEAN (H(l»D) AND
LMEAN (W (1,2) )
SUBSCRIPT I • ALL CONCENTRATION VALUES
i • ONLY NONZERO CONCENTRATION VALUES
CALLED BYI FRANCO
REAL*4 LHEAN(2), LSUM8(8)
DIMENSION AMEAN(8), ASUMS(S), W(8,8)
I • 1
COMPUTE-VALUES
IF (CONC ,CT, 0,0)
.1-8
, COMPUTE-VALUES
. . .FIN
RRTIJPN
TO COMPUTE-VALUES
. OEV • CONC - AMEAN(I)
. w(i,n • «d,n * 1.0
. AMEAN(I) « AMEAN(I) * OEV / W(I,l)
. ASUMS(I) • ASUMS(I) * OEV t (CONC - AMEANCI))
f IF rCONC ,GT, 0,0)
. H(I,2) • vj(l,2) » 1 ,0
, CL • ALOG(COHC)
. OEV « CL - LMEAN(I)
, LMEAN(I) • LMEAN(I) * OEV / W(I,8)
, LSUMS(I) a LSUMH(I) * OEV * (CL • LMEAN(IJ)
..FIN
...FIN
F N n
CROSS-REFERENCE
114
-------
(FLECS VERSION ??,«6) 18-JUL-79 07121115 PAGE 00001
SUBROUTINE IJNirRQ(N,NCI,X,NFREQ)
00002 C
C
DIMENSION X(N)
C
DATA GAMMA /0,3/
C
OEM • FlQATCNPREQ+1) - 8,*GAMMA
on U»I,N)
. Xd) • (FUOAT(NCHI)) • 6AMMA) / DEN
...PIN
RETURN
FHO
CFLtCS VERSION 22,ab)
115
-------
VERSION 82.86)
18.JUL-7« 07121117 PAGE 00901
00007
00008
00009
5J FRANCO.PRM
JC * MAXIMUM NUMBER OF SPECIFIED CONCENTRATIONS
JO • MAXIMUM NUMBER OF SPECIFIED DURATIONS
UP • LINE PRINTER LOGICAL UNIT NUMBER
NLCF » MAXIMUM NUMBER OF LC-50 CURVES
NLCP • MAXIMUM NUMBER OF POINTS IN EACH LC-30 CURVE
•** NOTE ***
IF NLCF IS L*«6ER THAN 9, LUN AND ITS ASSOCIATED FILES
WILL HAVE TO 9E ALTERED, IF NLCP GOES BEYOND *i MANY OUTPUT
FORMAT CHANGES MILL HAVE TO BE MADE,
PARAMETER JC«50, J0»25, JCJD«J25e, tP«T, NLCF«5, NLCPf6
116
ft US GOVERNMENT PRINTING OFFICE 1962-559-092/0470
------- |