USER'S GUIDE TO THE EXPECTED
EXCEEDANCES SYSTEM
SYSAPP-88/035
25 February 1988
Prepared for
U.S. Environmental Protection Agency
Source Receptor Analysis Branch, OAQPS
Research Triangle Park, NC 27711
(EPA Contract 68-02-4352 Option I)
Prepared by
B. S. Austin
T. E. Stoeckenius
M. C. Dudik
T. S. Stocking
Systems Applications, Inc.
101 Lucas Valley Road
San Rafael, CA 94903
(415) 472-4011
-------
USER'S GUIDE TO THE EXPECTED
EXCEEDANCES SYSTEM
SYSAPP-88/035
25 February 1988
Prepared for
U.S. Environmental Protection Agency
Source Receptor Analysis Branch, OAQPS
Research Triangle Park. NC 27711
(EPA Contract 68-02-4352 Option I)
Prepared by
B. S. Austin
T. E. Stoeckenius
M. C. Dudlk
T. S. Stocking
Systems Applications, Inc.
101 Lucas Valley Road
San Rafael, CA 94903
(415) 472-4011
-------
PREFACE
Air quality analysts charged with examining the impacts of coal-fired
power plants on ambient sulfur dioxide concentrations must contend not
only with the usual difficulties associated with estimating dispersion of
effluent from a stack but also with the fact that coal sulfur content and
hence S02 emission rates vary randomly. Tools currently available to the
analyst, such as the Gaussian dispersion models contained in the UNAMAP
system, are not capable of addressing this variability. These models
require that a constant monthly, seasonal or annual emission rate be
specified. If an upper-extreme (worst-case) rate is specified, ambient
concentrations will be overestimated, since such high emissions are
unlikely to occur continuously day after day. If, on the other hand, an
average rate is specified, peak concentrations will be underestimated
since the chance of a higher than average emission rate occurring in con-
junction with poor atmospheric dispersion is not properly accounted for.
What the analyst needs to deal with this problem is a method of estimating
ambient S02 concentrations that accounts for the full range of possible
emission rates and the likelihood of those rates occurring in conjunction
with various dispersion conditions.
The ExEx (expected exceedance) system is a set of computer programs that
embodies an algorithm designed to address the problem of estimating S02
concentrations in the vicinity of coal-fired power plants. It has been
developed by Systems Applications, Inc., over several years, under con-
tract to the U.S. EPA. The system is used in conjunction with one of
three UNAMAP air quality models (ISCST, MPTER or CRSTER). In addition to
the source characteristics and meteorological data required by the
dispersion models, inputs to the the ExEx System include information on
the distribution of sulfur in the coal being burned and a reference
ambient concentration level. Given this information, the system produces
estimates of the average number of times per year exceedances of the
reference concentration level can be expected to occur in the vicinity of
the plant as well as the probability that more than a specified number of
exceedances will occur in a single year. These results represent proba-
bilistic descriptions of the distribution of S02 concentrations in the
vicinity of the plant arising from the combination of randomly varying
rates of emissions and dispersion conditions.
871801 .j .j
-------
This user's guide briefly describes the algorithms used in the ExEx System
and provides detailed instructions on how to operate it and interpret its
output. This guide is designed to enable personnel familiar with the use
of standard UNAMAP models on mainframe computers to successfully operate
the ExEx System.
871801
-------
ACKNOWLEDGEMENTS
The development and documentation of the ExEx system was undertaken with
the support of the U.S. Environmental Protection Agency (EPA), Office of
Air Quality Planning and Standards (OAQPS). The authors would like to
express their appreciation to Johnnie Pearson, Thomas Braverman, David
Guinnup, and Ned Meyers of the EPA for their helpful comments and sugges-
tions on this User's Guide. We also wish to thank Gerry Moss and Don
Salisbury, of the EPA, for their help and cooperation in transferring the
ExEx System codes to the NCC IBM computer system. Finally, we would like
to acknowledge C. Shepherd Burton for his assistance in developing the
ExEx system.
87 1 80 lr
' TV
-------
CONTENTS
Preface i 1
List of Illustrations ix
List of Tables xiii
1 INTRODUCTION TO THE EXEX SYSTEM 1
1.1 Emissions Variability and Coal Sulfur Content 1
1.2 Summary of the ExEx Methodology 2
1.3 Use of the ExEx Methodology to Determine Air
_ Quality Impacts 2
1.4 Use of the ExEx System to Determine Compliant
Fuel Distributions 3
1.5 Purpose of the Manual 3
1.6 Manual Organization 4
2 OVERVIEW OF THE EXEX SYSTEM 5
2.1 Emission Rates in ExEx 7
2.1.1 Relationship Between Coal Sulfur Content
and Sulfur Dioxide Emission Rate 7
2.1.2 The Coal Sulfur Distribution 8
2.2 ExEx Calculations 9
2.2.1 Expected Exceedances 10
2.2.2 Probability of Violation 10
2.3 Modeling Multiple Sources with ExEx 11
2.4 Finding Compliant Distributions with ExEx 13
2.5 Summary of Applications of ExEx 14
2.6 Limitations of ExEx 14
2.7 Summary of Inputs and Outputs 17
87180
-------
3.1
3.2
3.3
fXEX
4.1
4.2
4.3
ExEx Preprocessor Inputs
3.1.1 General Considerations
3.1.2 Input of Normalized Concentrations from
the Dispersion Model
3.1.3 Input Parameter File for the ExEx Preprocessor
Preparing Inputs for the ExEx Program
3.2.1 Preprocessed Dispersion Model Results
3.2.2 Input Parameter File for the ExEx Program
3.2.3 Input Parameters for Expected Exceedances
Appl i cat i ons
3.2.4 Input Parameters for Probability of
Violation Appl i cations
3.2.5 Input Parameter File for Iterative Applications
3.2.6 Input Parameter File for Applications Using
Both Expected Exceedances and Probabilities
of Violation
Job Control Language for the ExEx System
SYSTEM OUTPUT
ExEx Preprocessor Output
ExEx Program Output
4.2.1 Echoed Output
4.2.2 Expected Exceedances Single Source
Appl ication Output
4.2.3 Covarying Sources Expected Exceedance
Application
4.2.4 Independently Varying Sources Expected
Exceedance Appl ication
4.2.5 Expected Exceedance Iterative Application
4.2.6 Single-Source Probability of Violation
Application
4.2.7 Covarying-Sources Probability of Violation
Appl ication .
4.2.8 Independently Varying Sources Probability of
Violation Appl ication
4.2.9 Probability of Violation Iterative Application
Di agnostic Messages
4.3.1 Input Variable Values Exceed Limits Set in ExEx
4.3.2 Preprocessed Dispersion File Values Are Not
Compatible with Present Values in ExEx
19
19
21
21
29
29
29
30
40
48
54
55
59
59
59
61
61
65
69
69
75
75
75
80
80
82
85
87180 IT VI
-------
4.3.3 Values in the Input Parameter File Invalid
for the Type of Variable 86
4.3.4 Values in the Input Parameter File Contradict
Values in the Dispersion Model Results 87
4.3.5 Warning Messages 87
5 EXAMPLES 89
5.1 Single Source Expected Exceedance Example 89
5.1.1 Preprocessor Run 90
5.1.2 ExEx Run 91
5.2 Covarying Sources Expected Exceedance Example 98
5.2.1 Preprocessor Run 98
5.2.2 ExEx Run 99
5.3 Independently Varying Sources Expected Exceedance Example 99
5.3.1 Preprocessor Run 108
5.3.2 ExEx Run 108
5.4 Iterative Expected Exceedance Example 115
~~ 5~.4.1 Preprocessor Run 115
5.4.2 ExEx Run 115
5.5 Single Source Probability of Violation Application 124
5.5.1 Preprocessor Run 124
5.5.2 ExEx Run 125
5.6 Covarying Sources Probability of Violation Example 133
5.6.1 Preprocessor Run 133
5.6.2 ExEx Run 133
5.7 Probability of Violation Independently Varying
Sources Application 140
5.7.1 Preprocessor Run 140
5.7.2 ExEx Run 140
5.8 Iterative Probability of Violation Example 147
5.8.1 Preprocessor Run 147
5.8.2 ExEx Run 147
References 155
Glosssary 175
Appendix A: SPECIAL CONSIDERATIONS IN RUNNING A DISPERSION
MODEL FOR USE WITH THE EXEX SYSTEM
87180 If
vii
-------
Appendix B: DEVELOPMENT OF AN ANALYTICAL METHOD FOR CALCULATING
EXPECTED EXCEEDANCES
Appendix C:
Appendix D:
Appendix E:
Appendix F:
CONVERSION OF EMISSION RATE UNITS OF MEASURE
INSTALLATION OF THE EXEX SYSTEM ON OTHER COMPUTERS
OVERVIEW OF THE EXEX COMPUTER PROGRAM
LISTING OF THE EXEX PREPROCESSOR AND PROGRAM CODES
87180
vm
-------
FIGURES
3-1 ExEx system input and output files 20
3-2 Input parameter file structure for the ExEx
preprocessor 22
3-3 Input parameter file structure for expected exceedance
or probability of violation modes 31
3-4 Input parameter file structure for ExEx iterative mode 49
4-1 Example of the first page of output 62
4-2 Example of second page of output 63
4-3 Expected exceedance output: single source 64
4-4 Expected exceedance output: covarying sources 66
4-5 Expected exceedance output: independently
varyi ng sources 70
4-6 Expected exceedance output: iterative application:
page 1 of output 71
4-7 Expected exceedance output: iterative application:
output of results 72
4-8 Probability of violation output: single source 76
4-9 Probability of violation output: covarying sources 78
4-10 Probability of violation output: independently
varying sources 79
4-11 Probability of violation output: iterative application 81
87180 If
IX
-------
5-1 Example of single-source expected exceedance application:
input parameter file .......................................... 94
5-2 Example of single-source expected exceedance
application: page 1 of output ................................ 95
5-3 Example of single-source expected exceedance
application: page 2 of output ................................ 96
5-4 Example of single-source expected exceedances
application: output of results ................................ 97
5-5 Example of expected exceedance covarying-sources
application: input parameter file ............................ 102
5-6 Example of expected exceedance covarying-sources
application: page 1 of output ................................ 103
5-7 Example of expected exceedance covarying-sources
application: page 2 of output ................................ 104
5-8 Example of expected exceedance covarying-sources
application: output of results ............................... 105
5-9 Example of expected exceedance independently varying
sources application: input parmeter file ..................... Ill
5-10 Example of expected exceedance independently varying
sources application: page 1 of output ........................ 112
5-11 Example of expected exceedance independently varying
sources application: page 2 of output ........................ 113
5-12 Example of expected exceedances independently varying
sources application: output of results ....................... 114
5-13 Example of expected exceedance iterative application:
input parameter file ..........................................
5-14 Example of expected exceedance iterative application:
page 1 of output
5-15 Example of expected exceedance iterative application:
page 2 of output .............................................. 120
87180 If
-------
5-16 Example of expected exceedance iterative application:
output of results 121
5-17 Example of probability of violation single-source
application: input parameter file 128
5-18 Example of probability of violation single-source
application: page 1 of output 129
5-19 Example of probability of violation single-source
application: page 2 of output 130
5-20 Example of probability of violation single-source
application: output of results 131
5-21 Example of probability of violation covarying-sources
application: input parameter file 136
5-22 Example of probability of violation covarying-sources
application: page 1 of output 137
5-23 Example of probability of violation covarying-sources
application: page 2 of output 138
5-24 Example of probability of violation covarying-sources
appl ication: results 139
5-25 Example of probability of violation independently
varying sources application: input parameter file 143
5-26 Example of probability of violation independently
varying sources application: page 1 of output 144
5-27 Example of probability of violation
independently varying sources application:
page 2 of output 145
5-28 Example of probability of violation independently
varying sources application: results 146
5-29 Example of probability of violation iterative
application: input parameter file 150
5-30 Example of probability of violation iterative
application: page 1 of output 151
ir
-------
5-31 Example of probability of violation iterative
application: page 2 of output 153
5-32 Example of probability of violation iterative
appl ication: results 154
87180 If
xii
-------
TABLES
2-1 Summary of ExEx applications, analysis methods,
and outputs 15
3-1 Input parameter file for the ExEx preprocessor
for CRSTER dispersion model run 23
3-2 Input parameter file for the ExEx preprocessor for
MPTER dispersion model run 24
3-3 Input parameter file for the ExEx preprocessor for
ISCST dispersion model run 25
3-4 Example input file structure for single-source
expected exceedances application 32
3-5 Example input file structure for covarying sources
expected exceedances appl ication 32
3-6 Example input file structure for independently
varying sources expected exceedances application 33
3-7 Typical values of the first-order autocorrelation
coefficient of coal sulfur content for various
averaging times 38
3-8 Example input file structure for single-source
probability of violation application 41
3-9 Example input file structure for covarying sources
probability of violation application 41
3-10 Example input file structure for independently varying
sources probability of violation application 42
3-11 Example input file structure for iterative expected
exceedances appl ication 50
87180 If
xiii
-------
3-12 Example input file structure for iterative probability
of violation application 51
4-1 Options chosen and corresponding results for output
examples 60
5-1 Input parameter file for single-source expected
exceedance example 92
5-2 Input parameter file for covarying-sources expected
exceedances example 100
5-3 Input parameter file for independently varying
sources expected exceedances example 109
5-4 Input parameter file for expected exceedance iterative
appl ication 116
5-5 Input parameter file for single-source probability of
violation example 126
5-6 Input parameter file for covarying-sources probability
of violation example 134
5-7 Input parameter file for independently varying sources
probability of violation example 141
5-8 Input parameter file probability of violation
exampl e 148
A-l Dispersion model options for obtaining binary output
for use with the ExEx System A-3
E-l Pre-set control parameters in ExEx E-2
87180 lr
XIV
-------
1 INTRODUCTION TO THE ExEx SYSTEM
1.1 EMISSIONS VARIABILITY AND COAL SULFUR CONTENT
Emission rates of sulfur dioxide (S02) from coal-fired power plants vary
as a result of variability in the sulfur content of the fuel. This varia-
bility makes assessments of the effects of emissions from such plants on
short-term (1- to 24-hour average) air quality more complicated than for
plants using fuels characterized by invariant sulfur content. For oil-
and gas-fired units for example, the sulfur content of the fuel is uniform
enough so that this issue is of little concern. However, for coal-fired
plants, variations in fuel quality may be great enough to make it
impossible to fully assess the plant's impact on the environment without
considering-the resultant variability in S0£ emissions.
Sulfur dioxide emission variability can be incorporated into an air qual-
ity impact assessment by using a probability distribution to describe the
random variations in coal sulfur content. The distribution can be
obtained from measurements of coal sulfur content or actual stack emis-
sions. Using such a distribution in conjunction with estimates of the
rate of dispersion of stack emissions, it is possible to estimate the
probability that ground-level concentrations at specified locations in the
vicinity of the plant will exceed a given value. These probabilities can
then be used to estimate the average number of times per year that exceed-
ances will occur, i.e., the expected exceedance rate. They can also be
used to estimate the probability that a violation will occur, i.e., the
probability that two or more exceedances will occur at a location in a
single calendar year.*
This probabilistic treatment of coal sulfur content puts into perspective
the concern over the occurrence of a single worst-case event (such as an
hour with higher than average emissions and worse than average dispersion
conditions) by making a calculation of the frequency with which events of
all types are expected to occur over the long term. This allows each
event to be weighed according to the probability of its occurrence.
* The minimum number of exceedances that define a violation is specified
by the ExEx System user. Two is the most common.
87180 2
-------
1.2 SUMMARY OF THE ExEx METHODOLOGY
The U.S. Environmental Protection Agency has developed a methodology
called the ExEx (expected exceedances) System for considering the varia-
bility of sulfur in fuel. Used in conjunction with Gaussian dispersion
models, it predicts the expected impact of an emission source by consider-
ing variations in both meteorological conditions and the fuel sulfur con-
tent. Specifically, it assesses the probability that poor dispersion con-
ditions will coincide with unusually high S02 emission rates arising from
random fluctuations in coal sulfur content.
In the ExEx methodology, a dispersion model (either CRSTER, MPTER, or
ISCST) is used to calculate 1-, 3- and/or 24-hour S02 concentrations (x/q
values) at a selected array of critical receptor sites. The dispersion
model is run with a special emission rate that normalizes these results
such that they can be multiplied by a randomly selected coal sulfur con-
tent to obtain an estimate of the corresponding ground-level S02 concen-
tration. Thus, the normalized dispersion model predictions can be com-
bined Jwith_the distribution of coal sulfur content to obtain the distribu-
tion of ground-level concentrations. Expected exceedances and probabili-
ties of violation are then calculated from the resultant concentration
distribution. Details of this procedure are described in Section 2.2.
1.3 USE OF THE ExEx METHODOLOGY TO DETERMINE AIR QUALITY IMPACTS
The ExEx methodology can be used to measure progress toward an air quality
goal expressed either as a maximum allowed number (over a receptor
network) of expected exceedances of a certain reference concentration
level, or as a maximum allowed probability of exceeding the level more
than one time in a single calendar year (i.e., a violation).
The procedure is as follows. Assume the reference air quality concentra-
tion is 365 yg/nr averaged over a 24-hour period. For each 24 hour
period, an S02 emission rate is randomly drawn from a probability distri-
bution and combined with each normalized (x/q) value to estimate the
ground-level S02 concentration during that period. If this concentration,
when added to the background concentration, is greater than 365 yg/m^, an
exceedance is recorded. This procedure is used to count exceedances at
each receptor for each averaging period throughout the year to simulate a
year's exceedances. This simulation of a year's exceedances is repeated
many times to obtain an estimate of the long-term average rate of
occurrence of exceedances. This use of ExEx is referred to as the
expected exceedance application. If an air quality goal were specified in
87180 2
-------
terms of a maximum allowed probability of violation (over the network of
receptors), the above procedure could be used to count the number of times
the concentration is exceeded two or more times* in a year and thus
estimate the probability of violation. This use of ExEx is referred to as
the probability of violation application.
The above procedure can be used to estimate the probability of violation
or expected exceedances (or both) resulting from the simultaneous effects
of up to six sources.
1.4 USE OF THE ExEx SYSTEM TO DETERMINE COMPLIANT FUEL DISTRIBUTIONS
If an air quality problem is identified by the above process (i.e., there
are more than the desired maximum number of expected exceedances or the
probability of exceeding the critical concentration is higher than
desired), the ExEx System can be used to determine the fuel characteris-
tics that will result in achievement of the desired air quality goal.
Using the normalized predictions of ground-level concentrations (x/q)
obtained from the dispersion model, the ExEx System can provide a range of
acceptable-values for the fuel quality necessary to meet the expected
exceedance rate or probability of violation specified in the goal. This
use of ExEx is referred to as the iterative application. It is applicable
only to single sources since it is not practical to analyze the large
number of possible combinations of emission and dispersion conditions that
arise when considering the impact of multiple sources.
1.5 PURPOSE OF THE MANUAL
This user's manual describes the techniques and processes required to
operate the ExEx System. It describes in detail the input parameters,
input formats, run setup, and output of the two computer programs that
comprise the ExEx System.
The manual is intended for persons both within and outside the EPA who are
responsible for estimating S02 impacts in the vicinity of coal-fired
industrial or utility steam-electric boilers. These sources are charac-
terized by randomly fluctuating emissions resulting from variations in
coal sulfur content. Readers are assumed to be familiar with the routine
applications of EPA's UNAMAP series of dispersion models, but not
necessarily with the ExEx method. It is recommended that nontechnical
personnel who are not familiar with regulatory dispersion modeling
* See footnote on page 1.
87180 2
-------
embodied in the UNAMAP models seek assistance from experienced air quality
modelers.
1.6 MANUAL ORGANIZATION
There are five chapters in this user's manual. Chapter 1 constitutes a
general introduction to the concepts of the ExEx methodology.
Chapter 2 is intended for readers unfamiliar with ExEx. It provides an
overview of important concepts such as the relationship between coal sul-
fur content and emission rates; the calculation of expected exceedance
rates and probabilities of violation; the application of the system to
single and multiple sources, alternative applications, limitations of the
system, and a summary of inputs and outputs. Chapter 3 describes all
input variables and their format and provides examples of input files.
Familiarity with the information in Chapters 2 and 3 should be all that is
necessary to set up an ExEx run.
Chapter 4 describes the ExEx System output in detail and offers some
guidance on interpretation, including error and warning messages.
Chapter 5 discusses sample cases for each of the eight applications of the
ExEx System, and includes sample input and output files.
Included as appendices are special considerations for running the disper-
sion model used with the ExEx System (Appendix A), mathematical derivation
of concepts implemented by ExEx (Appendix B), conversion of emission units
of measure (Appendix C), installing the ExEx System on computers other
than the IBM (Appendix D), an overview of the ExEx computer program
(Appendix E), and a listing of the ExEx program and preprocessor codes
(Appendix F).
87180
-------
OVERVIEW OF THE ExEx SYSTEM
In this chapter concepts necessary for understanding the ExEx System are
defined. These definitions will be most helpful to people using the ExEx
System for the first few times, and for personnel who need to understand
the basic theoretical concepts of and the inputs to ExEx. Proper selec-
tion of input parameters and accurate interpretation of results is not
possible without understanding the concepts set forth in this chapter.
For the sake of brevity, these concepts are not explained again elsewhere
in the manual. A glossary of technical terms is included immediately fol-
lowing the references.
As described in Chapter 1, S02 emissions from coal-fired industrial and
utility boilers vary with the sulfur content of the coal being burned.
The sulfur "content varies both along and within seams in a coal mine in a
random fashion (Burton et al., 1982). This variability can be described
by a probability distribution estimated from coal sulfur content measure-
ments . Such a distribution identifies the probability that
the sulfur content of a particular sample of coal is greater or less than
some value. For example, a particular distribution might specify an 89
percent probability that the sulfur content of a sample of coal selected
at random falls below 2 percent.
Because there is a direct connection between coal sulfur content and S02
emission rates, a probability distribution that describes sulfur content
variability can be used to describe the corresponding variability in S02
emissions under constant operating conditions (i.e., constant plant
load).* The ExEx method combines information about S02 emissions varia-
bility, as encoded in a probability distribution, with dispersion esti-
mates obtained from a standard point source dispersion model to obtain
* Because constant plant load is assumed throughout this manual, the
phrases "coal sulfur content" and "S02 emissions" or "S02 emission
rate" are used interchangeably. In this context, emissions are always
assumed to be expressed in Ib S02/MMBtu unless otherwise stated.
87180
-------
estimates of the ground-level concentrations in the vicinity of a coal-
fired boiler. The technique used to accomplish this is a Monte-Carlo
simulation.
As a simple illustration of a Monte-Carlo simulation, imagine a jar con-
taining 20 red marbles and 80 white ones, making a total of 100 marbles.
Basic probability theory states that there is a 20 percent probability
that a marble chosen at random from the jar will be red. A Monte-Carlo
simulation can be used to confirm this. The simulation consists of the
following procedure: select one marble at random from the jar, note its
color, and place it back in the jar. Repeat this process a large number
(e.g., 1000) of times. Finally, divide the total number of times a red
marble was selected by 1000. This value will be almost exactly equal to
the probability of choosing a red marble, i.e., 20 percent.
The marble sampling procedure described above contains all the elements of
a Monte-Carlo simulation. An input variable (the marble) is randomly
selected from a probability distribution (represented by the jar of red
and white marbles) and a calculation (noting the color of the marble) is
made from the input. This process (often referred to as a trial) is
repeated many times and the accumulated results are used to infer what the
outcome of~the calculations will be in general (in this case, the likeli-
hood of selecting a red marble).
In the case of ExEx, each trial in the Monte-Carlo simulation consists of
the following steps: (1) select a one-year set of randomly generated
values of coal sulfur content (from which S02 emission rates can be calcu-
lated) from an appropriate probability distribution, and (2) using the
dispersion model results, calculate the number of exceedances (occurrences
of ambient S02 concentrations greater than a specified reference concen-
tration) that would occur during the year under the selected set of emis-
sions.
In expected exceedance applications this procedure is repeated many times
and the number of exceedances is averaged over all trials to obtain an
estimate of the expected (i.e., long-term average) exceedance rate. In
probability of violation applications, exceedances are counted for each
sample year and a violation is recorded for every year in which there are
two or more exceedances.* The number of sample years (i.e., trials) in
which a violation was recorded is divided by the total number of sample
* The minimum number of exceedances that define a violation is specified
by the ExEx system user (in an input parameter file described in Chapter
3). Two is the most common.
87180
-------
years to find the probability of violation. These procedures are
described in greater detail in the following sections.
2.1 EMISSION RATES IN ExEx
In traditional air quality modeling a single emission rate is specified
that remains fixed throughout a given month, season, or year. Choosing
this rate is difficult because the use of an average value will not
account for those times when a high emission rate and unfavorable disper-
sion conditions occur at the same time; as a result, the model will under-
estimate impacts at these times. On the other hand, using an upper
extreme emission rate will tend to overestimate impacts. In ExEx, how-
ever, the emission rate is treated as a random variable that is associated
with a particular probability distribution. Thus, emissions can take on a
range of values. The probability that the emission rate is greater than
or less than some number is given by the probability distribution. There-
fore the occurrence of high and low values can be weighted by the appro-
priate probabilities of occurrence.
2.1.1 Relationship Between Coal Sulfur Content
and Sulfur Dioxide Emission Rate
Dispersion modeling of power plant plumes is normally carried out under
the assumption of constant plant load (EPA, 1986). Under such conditions
S02 emission rates are directly proportional to coal sulfur content. Thus
in ExEx the distribution of coal sulfur content is used in place of the
distribution of emission rates. Step 2 of the ExEx Monte-Carlo procedure
described above requires that a dispersion model be used to calculate the
number of exceedances that would occur under a given set of randomly
chosen emission rates. Although this could be done by rerunning the dis-
persion model for each set of randomly chosen rates, such a procedure
would be very cumbersome. It is possible to run the model just once and
obtain the concentrations required in each trial of the Monte-Carlo proce-
dure simply by normalizing the concentrations predicted by the dispersion
model (through a technique such as that described in Appendix A) and
multiplying these normalized concentrations by each set of randomly selec-
ted emission rates.
To obtain the desired normalized concentration output from the dispersion
model, it is necessary to specify in the dispersion model the rate of S02
emission in g/s that would result from burning coal that releases one
pound of S02 for each MMBtu of heat produced (i.e., 1 Ib S02/MMBtu).
87180
-------
(A method for calculating the desired emission rate is presented in Appen-
dix A.) This emission rate will vary from source to source. Normalized
concentrations obtained in this way can be multiplied by randomly drawn
$62 emissions stated in terms of Ib S02/MMBtu to obtain concentrations in
g/m3 or yg/m .
2.1.2 The Coal Sulfur Distribution
The ExEx system as it is presently configured assumes that coal sulfur
content follows a two-parameter lognormal distribution (Johnson and Kotz,
1970). This distribution, while roughly approximating the distribution of
coal sulfur content, does not provide a better or worse approximation than
that provided by several other distributions (such as the Weibull, gamma,
and inverted gamma). However, its relative simplicity and close agreement
with other distributions in the upper tail make it a good choice in many
applications (Burton, Nordin, and Stoeckenius, 1982). The lognormal dis-
tribution is uniquely described by two numbers: its geometric mean (GM)
and geometric standard deviation (GSD).* For coal sulfur content, these
parameters can be estimated in a number of ways, such as from coal
sampling on stack emissions data . The methodology for
estimating these parameters is not examined in detail here.
Coal sulfur content has been shown to be highly autocorrelated (Burton,
Nordin, and Stoeckenius).** For expected exceedance applications of ExEx
it is not necessary to consider autocorrelation. However, autocorrelation
is important for the probability of violation applications and in making
calculations for certain multiple-source situations. The ExEx system
handles autocorrelation by assuming a first-order autoregressive model
(referred to as an AR(1) process). Although no existing evidence conclu-
sively shows that as-burned coal sulfur content actually follows an AR(1)
process, the available data are not inconsistent with modeled sulfur con-
tents derived from such a process (Burton, Nordin, and Stoeckenius,
1982). This implies that the AR(1) process is a useful tool for modeling
sulfur content. Use of the AR(1) process requires an estimate of the
autocorrelation coefficient of coal sulfur contents. Such estimates can
* GM = ey, where y is the average of the natural logarithms of coal
sulfur content; GSD = e°, where a is the standard deviation of the
natural logarithms of sulfur content.
** Autocorrelation refers to the dependence of the coal sulfur content in
one hour on the coal sulfur content in the previous hour.
87 1 80
-------
be obtained from coal sampling or stack emissions data
Methods for estimating autocorrelations from such data are not described
here. In the absence of plant-specific data, the recommended autocorrela-
tions in Table 3-7 can be used.
2.2 ExEx CALCULATIONS
The description of ExEx calculations that follows is based on application
of ExEx to the 24-hour average air quality impacts of a single source.
Directly analogous procedures are used for 1- and 3-hour impacts.
In the ExEx System ground-level concentrations are assumed to be directly
proportional to emission rates. Thus in the Monte-Carlo simulation each
normalized concentration is multiplied by a randomly sampled emission rate
to get a probable concentration at a receptor for a given time period:
where
x^ = simulated concentration for day i at receptor j
Q.J = randomly chosen emission rate for day i
(x/q)ij = normalized concentration (from dispersion model) for day i at
receptor j.
Once X-H has been computed, it is compared to a standard concentration
(STD) specified by the user. If x^,- ^ STD, then an exceedance is
recorded. If a background concentration has been specified, exceedances
are recorded when the sum of x^j and the background concentration is
greater than STD.
The above process is repeated for each day, and the number of days in
which an exceedance occurs is noted. This process, carried out at each
receptor for one year of dispersion model results, constitutes one sample-
year, or simulation. After completing calculations for one sample-year, a
new random sequence of 365 emission rates is generated and the whole pro-
cess is repeated. In most applications, calculations are made for between
500 and 1000 sample-years. The user specifies the number of sample-years
to generate in an input parameter file (see Sections 3.2.3 and 3.2.4).
The entire simulation procedure is carried out once for each year of dis-
persion model results (also referred to as a meteorological year). For
87180 8f
-------
example, if there are five years of dispersion model results, and the num-
ber of sample-years per meteorological year to be generated (as specified
by the user) is 1000, a total of 5000 sample-years will be generated.
This Monte Carlo simulation is actually not used for all ExEx applica-
tions. In calculating expected exceedances for single sources and
multiple sources with covarying emissions (described in Section 2.3) ExEx
uses an analytical procedure (described in Appendix B) to calculate expec-
ted exceedances directly. In the example of the jar containing 100
marbles, this approach is analogous to making a direct calculation of the
frequency with which red marbles would be drawn based on knowledge of the
contents of the jar rather than carrying out the random selection process
1000 times. For the more complicated calculation of the probability of
violation and the application of ExEx to multiple sources with indepen-
dently varying emissions, a simple analytical calculation is not possible
and the Monte Carlo simulation must be used.
2.2.1 Expected Exceedances
In the_above procedure a certain number of exceedances are calculated in
each sample year. Averaging these exceedances over all sample years
yields an estimate of the expected exceedance rate. This rate can be
thought of as the average number of exceedances per year that are likely
to occur over a period of many years. For example, an expected exceedance
rate of five per year can be interpreted to mean that roughly 50 exceed-
ances will occur over a 10-year period (i.e., an average of five per
year). Of course this interpretation assumes that meteorological condi-
tions over the 10-year period will not be significantly different from
those occurring in the year(s) upon which the expected exceedance calcula-
tions is based. If the ExEx calculations are made using dispersion model
results obtained over a large number of meteorological years, this assump-
tion is more likely to be valid than if only a few years are used.
An expected exceedance rate is calculated by ExEx at each receptor used in
the dispersion model. The largest expected exceedance rate across the
receptor network is referred to as the maximum expected exceedance rate
(MEE).
2.2.2 Probability of Violation
A violation is defined as the occurrence of a predefined number of exceed-
ances (usually chosen by the user to be two or more) in a sample-year.
The probability of a violation (POV) in a year is estimated by dividing
87 1 80 8r -, ,-,
J.U
-------
the number of sample years in which violations were simulated at a recep-
tor by the total number of sample years. For example, if violations were
simulated in 10 out of 100 sample years, the probability of violation is
0.1 or 10 percent. This can be interpreted as meaning that the source
will cause a violation once every 10 years on average. The probability of
violation is calculated at each receptor. The largest probability of vio-
lation across the receptor network is referred to as the maximum proba-
bility of violation (MPOV).
2.3 MODELING MULTIPLE SOURCES WITH ExEx
Emissions from a complex of multiple sources can be viewed as resulting
from a combination of two different idealized coal supply situations. In
the first situation each emission source is associated with a separate
coal handling facility and therefore the emissions from one source are not
related to, i.e., are independent of, the emissions from any other
source. This may occur even if a common coal supply is used for all
sources, so long as coal storage and retrieval facilities are sufficiently
separate for each source. In the second situation all sources are fed
essentially- identical coal simultaneously from the same coal storage pile.
To account for these different coal supply situations, multiple sources
are treated in ExEx as having either covarying or independently varying
emissions. When the emissions of several sources vary independently, one
source's emission rate has no relation to the emission rate of another
source; the coal each burns during a given time period will likely not
have the same coal sulfur content and the distribution of sulfur content
may vary from source to source. When the emissions of several sources
covary, one source's emission rate is directly related to another source's
emission rate; the coal each source burns in a given time period has
exactly the same coal sulfur content. This in turn implies that each
source uses coal with the same sulfur content distribution. Various com-
binations of covarying and independently varying sources can be included
in a single ExEx run.
Deciding whether to treat emissions as covarying or independently varying
may be difficult in some cases. Assuming covarying emissions is the most
conservative approach since this results in more frequent occurrences of
simultaneous high emissions from all sources, and thus higher exceedance
rates than would occur if the sources were assumed to have independently
varying emissions.
87180 By
-------
In the ExEx System sources treated as having covarying emissions must
belong to the same source group; assigning sources to the same group
signals the system to treat emissions from these sources as covarying.
Sources with independently varying emissions are assigned to different
source groups. ExEx can accommodate up to six source groups. In addi-
tion, the total number of sources that can be accomodated is also limited
to six. Thus, if six source groups are defined, none may be made up of
more than one source.
Calculation of exceedances in the vicinity of multiple sources is compli-
cated by interactions that occur when more than one source impacts a
single location. While the average concentrations from individual sources
can be summed to produce the average concentration due to all sources,
expected exceedances cannot be so added. Ambient concentrations that are
high enough on a given day at a particular receptor to cause an exceedance
may be the result of emissions from a single source or several sources.
If a single source has an emission rate high enough to account for the
exceedance, the contribution of other sources will not affect the
determination of an exceedance. However, the high ambient concentration
may be the result of the combination of impacts from two or more sources
that individually produce ambient concentrations that are not classified
as an exceedance.. For example, if source A produces an ambient concentra-
tion of 100 yg/m at a receptor point and source B produces a concentra-
tion of 300 yg/m , then neither source contribution is in excess of a 365
yg/m standard. However, the combined impact of both sources (equal to
400 yg/m3) does constitute an exceedance. Such exceedances are referred
to as synergistic exceedances. The sum of expected exceedances for indi-
vidual sources will not in general equal the expected exceedances result-
ing from the combined impacts of multiple sources because of the existence
of such synergistic exceedances. Synergistic violations can be similarly
defined as violations arising solely as the result of synergistic effects,
I.e., those that cannot be accounted for by any individual source.
Synergistic effects are always accounted for by ExEx in any of its
multiple-source applications, although different amounts of detail are
provided in the ExEx output for different applications. A report of
expected exceedances and/or probabilities of violation due to the combined
impacts of all sources is always provided. This constitutes the only type
of output provided for covarying-sources applications. For independently
varying sources applications, separate reports of expected exceedances
and/or probabilities of violation resulting from each source are also
provided. If probabilities of violation are being calculated (i.e.,
probability of violation applications for independently varying sources),
an additional report listing the synergistic probabilities of violation is
also output. Such a report is not output if only expected exceedances are
being calculated.
87180 8r
12
-------
2.4 FINDING COMPLIANT DISTRIBUTIONS WITH ExEx
Most users of the ExEx system will first determine the maximum expected
exceedance rate (MEE) or maximum probability of violation (MPOV), using
either the single-source or one of the multiple-source applications des-
cribed above, with a current or anticipated emissions distribution. If
the MEE or MPOV thus determined is higher than that allowed by the appli-
cable air quality goal, ExEx can then be used to determine what coal sul-
fur content distributions will result in an MEE or MPOV no larger than
that specified by the goal. In this way it is possible to determine the
coal quality characteristics that will result in the fulfillment of air
quality goals. This use of the ExEx System is referred to as an iterative
application. It is only available for single-source groups, i.e., single
sources or multiple sources whose emissions are covarying.
In the iterative application the user specifies a target MEE or MPOV, such
as one expected exceedance per year, or a POV of 0.2 and a typical value
for the GSD (or GM); ExEx is then used to calculate the GM (or GSD) that
produces the target MEE or MPOV. The following procedure is carried out
in ExEx in an iterative application for calculating a compliant GM:
1. Choose a fixed value for the GSD.
2. Make an initial guess at the GM.
3. Use the ExEx methodology to calculate the MEE or MPOV that
results from the selected GM and GSD pair.
4. If the MEE or MPOV is greater or less than the desired target,
execute step 5, otherwise stop and print results.
5. Adjust the GM up or down, as appropriate, and return to step 3.
Steps 3 through 5 are repeated until an MEE or MPOV equal to the target
value is calculated. Each execution of steps 3 through 5 is referred to
as an iteration.
The iterative procedure described above will result in the calculation of
a unique GM for a given GSD (or vice versa). As an extension to this pro-
cedure, several GSDs can be specified, and a GM can be calculated for
each. Thus, a family of GM-GSD pairs can be found, all of which result in
an MEE or MPOV equal to the desired (or target) value. Distributions of
87180 8r-
13
-------
coal sulfur content that are members of such a family are referred to as
compliant distributions.
The above procedure produces compliant GMs for selected GSDs. In some
cases the opposite may be desirable, i.e., to find compliant GSDs corres-
ponding to selected GMs. The ExEx System can be operated in either
fashion by specifying the appropriate inputs (see Section 3.2.5).
2.5 SUMMARY OF APPLICATIONS OF ExEx
The ExEx System is used for evaluating a source's progress toward achieve-
ment of an S02 air quality goal stated in terms of a maximum permissible
expected exceedance rate or probability of violation. ExEx can calculate
expected exceedances and/or probabilities of violation for either a single
source or two or more sources with covarying or independently varying
emissions, or it can calculate the characteristics of fuel sulfur distri-
butions that will produce MEE rates or MPOVs less than or equal to those
specified in an air quality goal. These eight different applications of
ExEx are summarized in Table 2-1.
2.6 LIMITATIONS OF ExEx
Certain limitations of the ExEx methodology should be kept in mind. Among
the most important are:
Limitations imposed by the atmospheric dispersion model. ExEx is used in
conjunction with an atmospheric dispersion model. Any limitations
inherent in the dispersion model will affect ExEx results. For example,
if the dispersion model is known to underpredict peak concentrations, then
expected exceedance rates will also be underpredicted.
Accuracy of emissions distribution. The emissions distribution used with
ExEx may not accurately describe the true distribution of emissions from
the source being studied. The ExEx System uses a lognormal distribution
(described in Section 2.1.2). This distribution provides a reasonably
good description of the upper range of the sulfur content of as-burned
coal in most cases. However, a completely accurate fit to the whole range
of sulfur content cannot be expected (Burton, Nordin, and Stoeckenius,
1982). Thus, inaccurate results may be obtained in applications where
even moderate (as compared to upper extreme) sulfur contents can cause
exceedances.
87180 8y
14
-------
TABLE 2-1. Summary of ExEx applications, analysis methods, and outputs.
Application
Analysis Method
Output
Calculation of Expected Exceedances
Single source
Multiple sources,
covarying emissions
Multiple sources,
independently
varying emissions
Iterative application
Analytic technique using pro-
perties of lognormal proba-
bility distribution
Analytic technique using pro-
perties of lognormal proba-
bility distribution
Monte Carlo simulation
Analytic technique applied
Heratively to identify
compliant GM-GSD pairs
Maximum expected exceedance
and expected exceedances at
each receptor
Maximum expected exceedance
and expected exceedances at
each receptor for all sources
combined
Maximum expected exceedance
and expected exceedances at
each receptor for each source
group and for all sources
combined
Compliant GM-GSD pairs that
result in target maximum
expected exceedance and
expected exceedances at each
receptor resulting from this
pair
Single source
Calculation of Probability of Violation
Monte Carlo simulation
Maximum probability of
violation and probability of
violation at each receptor
Covarying sources
Monte Carlo simulation
Maximum probability of
violation and probability of
violation at each receptor
for all sources combined
continued
87180 5
15
-------
TABLE 2-1. concluded
Application
Analysis Method
Output
Independently vary-
ing sources
Monte Carlo simulation
Iterative application
Monte Carlo simulation
applied iteratively to
identify compliant GM-GSD
pairs
Maximum probability of
violation and probability of
violation at each receptor
for each source group and for
all sources combined; syner-
gistic violations at each
receptor
Compliant GM-GSD pairs that
result in a target maximum
probability of violation, and
probabilities of violation at
each receptor resulting from
this GM-GSD pair
87180 5
16
-------
Changes in emission distribution. The underlying distribution of source
emissions may change. For example, emissions characteristics could change
if a plant were to switch to a new source of coal.
Sample size. The Monte Carlo simulation method used in the POV and
multiple-source application (where emissions from multiple sources vary
independently) relies on the fact that expectations can be estimated
accurately if the sample size is large enough. If computing resources
severely limit the number of simulations that can be performed, undesir-
ably large sampling errors may result.
Interpretation of results. Proper interpretation of ExEx results requires
an understanding of the method itself. In particular, it must be recog-
nized that quantities such as the expected exceedance rate and probability
of violation are representative of a long-term average. Thus, any one
year will actually have a greater or fewer number of exceedances or a
greater or lesser probability of violation than would be expected over the
long term.
2.7 .SUMMARY OF INPUTS AND OUTPUTS
Application of the ExEx System involves the execution of CRSTER, MPTER,
or ISCST, using as input the characteristics of the source(s) being
examined, locations of receptors in the vicinity of the source, and
at least one full year of meteorological data. The emission rate speci-
fied in the dispersion model will be that which normalizes the output to
1 Ib S02/MMBtu (see Appendix A, "Special Considerations in Running the
Dispersion Model for Use with the ExEx System"). The user should activate
appropriate options to obtain binary output (these options are identified
in Section 1.2 of Appendix A).
The binary file of normalized concentrations calculated by the dispersion
model will run through the ExEx preprocessor according to instructions
contained in the input parameter file for the preprocessor. The prepro-
cessor is executed once for each year of dispersion model output. The
binary preprocessor output and an input parameter file for the ExEx pro-
gram are used to run the ExEx program. The input parameter file is
described in detail in Chapter 3. Key information contained in this file
includes:
Instructions to the ExEx program concerning which general application
to run (POV, ExEx, or both) are specified in this file in the vari-
able OUTOPT.
87180 8f 17
-------
To treat emissions from multiple sources as covarying, all covarying
sources must be put in the same source group in the input parameter
file. This is accomplished by assigning each covarying source the
same source group number specified in the variable IGRP- This source
group classification has no relation to the classification used in
air dispersion models, such as ISCST. If emissions from multiple
sources are to be treated as independently varying, they must be put
in different source groups by assigning different source group num-
bers to each source in the variable IGRP.
ExEx must use a Monte Carlo procedure to calculate expected exceed-
ances for independently varying sources and to execute any of the POV
applications (see Section 2.2). However, in calculating expected
exceedances for single sources or covarying sources, ExEx can use an
analytical procedure that directly calculates the long-term average
expected exceedance rate without using a Monte Carlo simulation (see
Appendix B). For these two applications the variable NSIM, specify-
ing the number of sample years to generate for the Monte Carlo simu-
lation, is set to 1. For all other applications NSIM must be set to
the desired number of sample years.
To use the first-order autoregressive process mentioned in Section
2.1.2, an autocorrelation coefficient is specified in the variable
RHO. This coefficient can be calculated by the user on the basis of
coal sulfur content data or, if such data are unavailable, the recom-
mended values listed in Table 3-7 can be used. The autocorrelation
coefficient need only be specified when using one of the probability
of violation applications. When using any of the expected exceedance
applications, the user may set RHO equal to 0.
Other information includes the run title; a comparison air quality
standard; the number of emission sources; the averaging period; vari-
ous options controlling the level of detail in the output; and coal
sulfur distribution parameters.
ExEx results include estimates of maximum expected exceedances or proba-
bility of violation, expected exceedances or probability of violation at
each receptor in the receptor network, and (if the iterative application
was used) summaries of fuel characteristics that meet the specified air
quality goals.
87180 8f
18
-------
PREPARING INPUT FILES FOR THE ExEx SYSTEM
Using the ExEx system is a two-step process. The user first runs the ExEx
preprocessor and then the ExEx program using the output from the prepro-
cessor (see Figure 3-1). The preparation of input files for both steps is
described below. Section 3.1 describes inputs for the preprocessor;
Section 3.2 describes inputs for the eight applications of the ExEx
program; Section 3.3 describes how to run the system on the EPA National
Computing Center's IBM computer.
For the sake of clarity, inputs are illustrated in card image format,
although all input files are actually disk files. Inputs for the
preprocessor are formatted. Most inputs for the ExEx program are in free
format? In- free format values may appear anywhere in a record so long as
they are in the proper order and are separated by either a space or a
comma. Character variables are input using the standard A format
beginning in column 1. Examples of these formats are included in several
tables in this chapter. Concentration files generated by the dispersion
model and the ExEx preprocessor are in binary (machine readable) format.
Files in binary format are written with a FORTRAN unformatted WRITE
statement.
Both the ExEx preprocessor and the ExEx program are run in batch mode.
The necessary JCL commands are described in Section 3.3
3.1 ExEx PREPROCESSOR INPUTS
3.1.1 General Considerations
The ExEx preprocessor requires as input files created by a dispersion
model that contain predicted concentrations at an array of receptors.
Such a file can contain one year of daily average S02 concentrations at
each receptor; or one year of 3-hour average concentrations at each
receptor, or one year of hourly average concentrations at each receptor.
In some cases such a file might contain concentrations for two or more of
the above averaging times. Files containing 1- and 24-hour average
concentrations can be obtained from either the CRSTER, MPTER, or ISCST
87180 3
19
-------
rreprocessor input
parameter file
(free format)
One year of normalized
concentrations from dispersion
model (binary file)
Reformatted and screened
normalized concentrations
f ExEx input
parameter file
(free format)
>
1
J14-19
11
(
Ex
proc
\
Ex
jram
12
>
;ExEx
output file
(printable)
13 f
(
Temporary
paging file
[binary format)
FIGURE 3-1. ExEx system input and output files. Numbers indicate
FORTRAN file units to which files must be assigned.
87180
20
-------
dispersion models. Files of 3-hour average concentrations can only be
obtained from ISCST.*
NOTESpecial considerations apply in setting up inputs for
these models when they are used with the ExEx system. The
dispersion model must be exercised according to the instruc-
tions in Appendix A in order to generate the required files
of properly normalized concentrations.
The preprocessor will be run once for each year of dispersion model
results. The ExEx program uses up to six such runs. As discussed in
Section 3.1.3, the preprocessor also requires an input parameter file
containing various user-selected parameters and options.
3.1.2 Input of Normalized Concentrations from the Dispersion Model
A disk file of suitably normalized concentrations (obtained in the manner
described in Appendix A) from the exercise of CRSTER, MPTER, or ISCST
should be assigned to file unit 13 for use as input to the preprocessor.
3.1.3 Input Parameter File for the ExEx Preprocessor
The input parameter file for the preprocessor (assigned to FORTRAN file
unit 11) will list the preprocessor run title, the dispersion model used
to obtain normalized concentrations, the year of meteorological data used
by the dispersion model, the averaging period to use (1, 3, and/or 24
hours), a list of the output options specified for MPTER or ISCST if one
of these models was used, and a cut-off value to use for screening out
small concentrations from the dispersion model output. The set-up of this
file is illustrated in Figure 3-2. Tables 3-1, 3-2, and 3-3 describe the
set-up of this file if the dispersion model used was CRSTER, MPTER, or
ISCST, respectively. Required parameters are:
TITLE~The title for the preprocessor run.
MODELThe dispersion model used. Beginning in column 1 enter
CRSTER, MPTER, or ISCST.
IAVPERThe averaging period to be processed; must be 1 or 3 or 24
hours. Enter a "1" for 1 hour, "3" for 3 hours or "24" for 24
* Although MPTER can also produce files of 3-hour average concentrations,
the ExEx preprocessor cannot process these files.
87180 3
21
-------
8I5/IOPT7, IOPT9,
/ INX, INY, INW
IOPT14, INGRD, INGRP,
5I5/MOPT21,MOPT23, INGRD, INSRC, INX
If CRSTER was run just use first 3 cards. If MPTER or
ISCST was run, use appropriate 4th card.
F10.0/^
4
(ISCST)
4
(MPTER)
IYEAR, IAVPER, CCUT
MODEL
BOA/TITLE
FIGURE 3-2. Input parameter file structure for the ExEx preprocessor.
Note that an additional 'card' is required if the dispersion model run
was MPTER or ISCST.
22
-------
TABLE 3-1. Input parameter file for the ExEx preprocessor for CRSTER
dispersion model run.
Line
Number
1
2
3
Columns
1-80
1-6
1-5
6-10
11-20
Format
80A
6A
15
15
F10.0
Variable
TITLE
MODEL
IYEAR
IAVPER
CCUT
Description
User's title for preprocessor run
Name of dispersion model which
created concentrations (CRSTER,
MPTER, or ISCST)
Year of data used for model run
(example: 1987)
Averaging period desired for
preprocessed output
Cutoff value for screening small
concentrations
87180 5
23
-------
TABLE 3-2. Input parameter file for the ExEx preprocessor for MPTER
dispersion model run.
Line
Number
1
2
Columns
1-80
1-6
Format
80A
6A
Variable
TITLE
MODEL
Description
User's title for preprocessor run
Name of dispersion model which
created concentrations (CRSTER,
MPTER, or ISCST)
3 1-5
6-10
_ .11-20
4 1-5
6-10
11-15
16-20
21-25
15
15
F10.0
15
15
15
15
15
IYEAR
IAVPER
CCUT
MOPT21*
MOPT23*
INGRD
INSRC
INX
Year of data used for model run
(example: 1987)
Averaging period desired for
preprocessed output
Cutoff value for screening small
concentrations
Option 21* was used in the MPTER
run to generate 1-hour output; 0
= no, 1 = yes
Option 23* was used in the MPTER
run to generate 24-hour output; 0
= no, 1 = yes
Grid type used for model run;
1 = polar, 4 = polar with
discrete
Number of sources
Number of x-direction receptors
* Either MOPT21 or MOPT23 may be set to one, but not both.
87180 5
24
-------
TABLE 3-3. Input parameter file for the ExEx preprocessor for ISCST
dispersion model run.
Line
Number Columns
1 1-80
2 1-6
3 1-5
6-10
11-20
4 1-5
6-10
11-15
16-20
21-25
26-30
31-35
36-40
Format
80A
6A
15
15
F10.0
15
15
15
15
15
15
15
15
Variable
TITLE
MODEL
IYEAR
IAVPER
CCUT
IOPT7*
IOPT9*
IOPT14*
INGRD
INGRP
INX
INY
INN
Description
User's title for preprocessor run
Name of dispersion model which
created concentrations (CRSTER,
MPTER, or ISCST)
Year of data used for model run
(example: 1987)
Averaging period desired for
preprocessed output
Cutoff value for screening small
concentrations
Option 7 was used in the ISCST
run to generate 1-hour output;
0 = no; 1 = yes
Option 9 was used in the ISCST
run to generate 3-hour output;
0 = no, 1 = yes
Option 14 was used in the ISCST
run to generate 24-hour output;
0 = no, 1 = yes
Grid type used for model run;
1 = polar, 2 = rectangular, 3 =
discrete, 4 = polar with
discrete, 5 = rectangular with
discrete
Number of source groups
Number of x-direction receptors
Number of y-direction receptors
Number of discrete receptors
* Any combination of these three options may be specified.
87180 5
25
-------
hours. The averaging period must be one of the periods specified in
the dispersion model (except that if CRSTER was used, IAVPER may be
set to 3; CRSTER always calculates 1-hour concentrations. If IAVPER
is set to 3, the preprocessor will calculate 3-hour averages from the
hourly model output).
CCUTPrescreening value to screen out small concentrations (g/m ).
Concentration files generated by the dispersion model are very
large. However, they often contain thousands of concentrations so
small that they can be safely eliminated from consideration without
affecting the results of the ExEx simulation. In other words, many
concentrations are so small that they would have to be paired with an
unrealistically large emission rate to produce an exceedance. A
calculation is performed during the ExEx run which eliminates all
such concentrations; however, the size of the files output by the
preprocessor and then input to ExEx can be significantly reduced by
screening out as many of these concentrations as possible during the
preprocessor run. While it is possible to use the same procedure as
is used in ExEx for calculating the proper screening value, in
practice it is more efficient to choose a somewhat smaller value
(-which-eliminates fewer concentrations) so that the resulting
preprocessed files can be used for a larger variety of ExEx
applications. The following procedure for selecting the value of
CCUT has been found to satisfy this requirement while also minimizing
the size of the preprocessor output file.
(1) Calculate a "worst-case" emission limit, Qmav, as follows:*
llluA
Qmax = QGM(QGSD)6
where QGM is the geometric mean and QGSD is the geometric standard
deviation to be used in the ExEx Program (see Section 3.2.3).
If more than one ExEx run will be made using the same preprocessor
output file, a value of Qmax should be calculated for each run and
the largest resulting Qmax should be applied in step 2.
* Under the assumed lognormal distribution used in ExEx, the probability
of finding an emission rate larger than Qmax is approximately 10 .
In an hourly average ExEx simulation involving the generation of 8760
random emission rates in a sample year, the probability of generating
one or more emission rates in excess of Qmax would be 1 - (1 - lo~9)S760
= 8.76 * 10~ . This value is small enough to be safely neglected.
87180 3
26
-------
(2) Calculate CCUT as follows:
CCUT = 1CT6 (CSTD - CBACK)/(N Qmax) ,
where
CSTD = the smallest ambient standard concentration (yg/m3) to be
used in any of the planned ExEx runs
CBACK = the largest background concentration (yg/m3) to be used
in any of the planned ExEx runs
N = the number of sources in the dispersion model normalized
concentrations output file.
If the above procedure is not properly carried out, the value of CCUT in-
put to the preprocessor may be larger than the screening value calculated
by the ExEx program in one or more of the planned ExEx runs. Since this
situation could result in underestimation of the expected exceedance rate,
the ExEx program will print out a warning message under such circumstances
(see Section 4.3.5). If this message appears in the ExEx output, the pre-
processor should be rerun with a value of CCUT calculated via the above
procedure.
If the dispersion model used was CRSTER, the above inputs are sufficient
to run the preprocessor. If either MPTER or ISCST was used, additional
inputs are required, and are contained on a fourth record.
MPTER-specific inputs for card four (see Table 3-2)
MOPT21Was option 21 used in the MPTER run to generate 1-hour
concentrations?
0 = no
1 = yes
MOPT23~Was option 23 used in the MPTER run to generate 24-hour
concentrations?
0 = no
1 = yes
NOTE: Either MOPT21 or MOPT23, but not both, must be set
to 1.
87180 3
27
-------
INGRD--The receptor grid type used in the MPTER run:
1 = polar
4 = polar with discrete receptors
INSRCNumber of sources
INXNumber of receptors in the x-direction. For example, for a
polar receptor grid with five rings, the user should enter a
five. For a Cartesian grid with six directions to the east and
six to the west of the source, the user would enter "12".
ISCST-specific inputs for card four (see Table 3-3)
IOPT7Was option seven used in the ISCST run to generate 1-hour
concentrations?
0 = no
1 = yes
IOPT9Was option nine used in the ISCST run to generate 3-hour
concentrations?
0 = no
1 = yes
IOPT14Was option 14 used in the ISCST run to generate 24-hour
concentrations?
0 = no
1 = yes
NOTE: Any combination of IOPT7, IOPT9, and/or IOPT14 may be set
to 1.
INGRDGrid type used in the ISCST model run:
1 = polar
2 = rectangular
3 = discrete
4 = polar with some discrete receptors
5 = rectangular with some discrete receptors
87180 3
28
-------
INGRPNumber of source groups
NOTE: The output of ISCST for a source group has no
relationship to the ExEx System definition of a source
group. Output from an ISCST source group will be
considered as one source by ExEx.
INX~The number of x-directions or azimuths
INYThe number of y-directions or rings
INWThe number of discrete receptors
3.2 PREPARING INPUTS FOR THE ExEx PROGRAM
The ExEx program requires two different types of input files. One is the
normalized concentrations output from the ExEx preprocessor; the other is
an input parameter file containing various program parameters and options.
3.2.1 Preprocessed Dispersion Model Results
Each disk file containing a year of preprocessed dispersion model results
is assigned to a separate file unit. FORTRAN logical units 14 through 19
are reserved by ExEx for these files. The maximum number of years of
dispersion model results that can be handled is six. This limitation can
be modified as described in Appendix E.
3.2.2 Input Parameter File for the ExEx Program
As mentioned in Section 2.5, there are eight applications of the ExEx
System. Three are for calculating expected exceedances; three are for
calculating probabilities of violation; the other two calculate the
compliant GM or GSD for a user specified MEE or MPOV. (A descriptive list
of these was provided in Table 2-1). Although all eight input parameter
files are almost identical, there are some important differences.
Therefore, inputs for each application are described separately below and
an example of each is provided so the user can turn directly to the
desired application. Section 3.2.3 describes the input parameter file for
the expected exceedances applications for single sources and covarying and
independently varying multiple sources. Section 3.2.4 describes the input
parameters for the probability of violation application for the same three
applications. Section 3.2.5 describes the input parameters for the iterative
87180 3
29
-------
application. Section 3.2.6 summarizes inputs needed to run expected
exceedances and probability of violation applications simultaneously.
3.2.3 Input Parameters for Expected Exceedances Applications
The input parameter file structure for these applications is illustrated
in Figure 3-3; examples are provided in Tables 3-4, 3-5, and 3-6. Free
format* is used throughout, with the exception of the parameters TITLE and
SNAME, which are character strings. TITLE can be typed in alphabetic
characters anywhere in the first 80 spaces of record 1; SNAME is typed
anywhere in the first 20 spaces of record 6.
Record 1
Single-Source Application
TITLE--Title of the ExEx run to be printed on the output (may be
up to 80 characters long)
Covarying-Sources Application
TITLESame as above
Independently Varying Sources Application
TITLESame as above
Record 2
Single-Source Application
CSTDThe air quality standard being examined (in yg/m3)
CBACKThe background concentration (yg/m )
Covarying-Sources Application
CSTDSame as above
CBACKSame as above
* In free format, values may appear anywhere in a record so long as they
are in the proper order and are separated by either a space or a comma.
87180 3
30
-------
SRC,IGRP.QGM,QSD,GSDCUT, RHO*
SNAME
NYEARJYEARd .,NYEAR)
LGRID,LYRLY, OUTOPT
y
I.NSRCJAVPER
CSTD,CBACK
TITLE
+ Records 6 and 7 are repeated once for each source.
FIGURE 3-3. Input parameter file structure for expected exceedance or probability of
violation modes. All variables except TITLE and SNAME are in free format.
87180
31
-------
TABLE 3-4. Example input file structure for single-source expected
exceedances application.
Line Examples of Actual
Number Entries in File
Corresponding Variable Names
1 RUN TITLE
2 365.,100.
3 1,1,3
4 1,1,0
5 4,1973,1974,1981,1985
6 SOURCE 1
7 1,1,3.00,1.2,6.0,0
TITLE
CSTD, CBACK
NSIM, NSRC, IAVPER
LGRID, LYRLY, OUTOPT
NYEAR, IYEAR(1),...,IYEAR(NYEAR)
SNAME
ISRC, IGRP, QGM, QGSD, GSDCUT, RHO
TABLE 3-5. Example input file structure for covarying sources* expected
exceedances application.
Line Examples of Actual
Number Entries in File
Corresponding Variable Names
1 RUN TITLE
2 365.,100.
3 1,1,24
4 1,1,0
5 4,1973,1974,1981,1985
6 SOURCE 1
7 1,1,3.00,1.2,6.0,0
8 SOURCE 2
9 2,1,3.00,1.2,6.0,0
TITLE
CSTD, CBACK
NSIM, NSRC, IAVPER
LGRID, LYRLY, OUTOPT
NYEAR, IYEAR(1),...,IYEAR(NYEAR)
SNAME
ISRC, IGRP, QGM, QGSD, GSDCUT, RHO
SNAME
ISRC, IGRP, QGM, QGSD, GSDCUT, RHO
* Covarying sources are placed in the same source group: sources 1
and 2 form 1 source group.
87180 5
32
-------
TABLE 3-6. Example Input file structure for independently varying*
sources expected exceedances application.
Line Examples of Actual
Number Entries in File
Corresponding Variable Names
1 RUN TITLE
2 365.,100.
3 1,1,24
4 1,1,0
5 4,1973,1974,1981,1985
6 SOURCE 1
7- -1,1,3.00,1.2,6.0,0
8 SOURCE 2
9 2,2,2.5,1.5,6.0,0
10 SOURCE 3
11 3,2,2.5,1.15.6.0,0
TITLE
CSTD, CBACK
NSIM, NSRC, IAVPER
LGRID, LYRLY, OUTOPT
NYEAR, IYEAR(1),...,IYEAR(NYEAR)
SNAME
ISRC, IGRP, QGM, QGSD, GSDCUT, RHO
SNAME
ISRC, IGRP, QGM, QGSD, GSDCUT, RHO
SNAME
ISRC, IGRP, QGM, QGSD, GSDCUT, RHO
* Sources in different source groups vary independently. Source 1 is in
a source group by itself; sources 2 and 3 form a second group.
87180 5
33
-------
Independently Varying Sources Application
CSTDSame as above
CBACKSame as above
Record 3
Single-Source Application
NSIMAlways set to 1 for this application. (An analytic
procedure that does not use NSIM is used to calculate expected
exceedances in the single-source application.)
NSRCAlways set to 1 for this application.
IAVPERThe averaging period. Enter "1" if 1-hour average pre-
processor output is being used, "3" if 3-hour averages are being
used, or "24" if 24-hour averages are being used. The value
specified for IAVPER must be the same as the value specified for
tAVPER in the preprocessor run (see Section 3.1.3).
Covarying-Sources Application
NSIMAlways set to 1 for this application. (An analytic
procedure that does not make use of NSIM is used to calculate
expected exceedances for the covarying application.)
NSRCThe number of sources (must be less than 6).
IAVPERSame as for single-source application.
Independently Varying Sources Application
NSIMThe number of sample years to generate for the Monte Carlo
simulation. For this application, enter a number between 100-
1999. The larger this number is, the more accurate the
results. If NSIM is too small, undesirably large sampling
errors may result. Since the cost of execution increases
roughly in proportion to NSIM, using too large a value may
result in unacceptably long run times. The smallest value of
NSIM that still results in insignificant sampling errors depends
on the application; no general rule exists. However, past
experience has shown that a value of 500 is sufficient in most
cases. If only approximate results are required, it may be
34
-------
sufficient to use a value as low as 200, but such results should
be viewed as preliminary.
NSRC~The number of sources (must be 6 or less).
IAVPER---Same as for single-source application.
Record 4
Single-Source Application
LGRIDOption for printing expected exceedances by receptor:
0 = do not print
1 = print in regularly spaced format
2 = print in tabular format (10 at a time across the page)
ExEx calculates and prints the maximum expected exceedance (MEE)
rate when the expected exceedance option is used no matter which
print option is specified. If the MEE is sufficient, enter a
"0" for this option. If output of expected exceedances at all
receptors in the network is desired, enter "1" or "2". If the
dispersion model has been run with regularly spaced receptors
(e.g., distances from or directions around the source are spaced
at regular intervals), enter "1". If the model was run with
irregularly (sometimes called discretely) spaced receptors,
enter "2".
LYRLYOption to print expected exceedances for individual
meteorological years (i.e., individual years of dispersion model
results) in addition to printing one set of results averaged
over all meteorological years.
0 = do not print
1 = print
OUTOPTOption to calculate and print expected exceedances,
probabilities of violation, or both.
0 = Calculate and print expected exceedances only
1 = Calculate and print probabilities of violation only
2 = Calculate and print both expected exceedances and
probabilities of violation
87180 3
35
-------
Covarying-Sources Application
LGRID--Same as above
OUTOPTSame as above
LYRLYSame as above
Independently Varying Sources Application
LGRIDSame as above
LYRLYSame as above
OUTOPTSame as above
Record 5
Single-Source Application
NYEARThe number of years of dispersion model results (maximum
6).
IYEARA list of the years of dispersion model results.
Enter all four digits of the years (i.e., 1965, 1966, 1978, not
65, 66, 78).
Covarying-Sources Application
NYEARSame as above
IYEARSame as above
Independently Varying Sources Application
NYEARSame as above
IYEARSame as above
The next two records are repeated for each source when more than one
source is being considered.
Record Type 6
Single-Source Application
SNAMEA name for the source being examined to be printed on the
output (can be any alphanumeric string up to 20 characters).
87180 3
36
-------
Covarying-Sources Application
SNAMESame as above
Independently Varying Sources Application
SNAMESame as above
Record Type 7
Single-Source Application
ISRCThe number used in the dispersion model to identify this
source. If the dispersion model was exercised for sources num-
bered 10, 11, and 12, and the user wants to examine only source
11, enter "11" in this space.
IGRPFor single-source application, enter "1".
_ Q.GMThe geometric mean of coal sulfur content (units are
Ib S02/MMBtu).
QGSDThe geometric standard deviation of coal sulfur content.*
GSDCUTNumber of GSDs above the GM at which to truncate the
distribution. A value of 6 is recommended.
RHOAutocorrelation coefficient. Set to 0 if expected
exceedances application only is desired. If probability of
violation applications are to be run (see Sections 3.2.4 and
3.2.6), enter appropriate autocorrelation coefficient
(calculated by the user or taken from the list in Table 3-7).
* Approximate ranges for values that are commonly encountered are
1.05 to 1.3 for the GSD although a few sources may have values
outside of this range. These values are for unscrubbed units;
scrubbed units generally have larger GSDs due to variabilities in
scrubbing efficiency. Analyses of scrubbed unit emissions variability
have been carried out by Foster Associates (1979).
87180 3
37
-------
TABLE 3-7. Typical values of the
first-order autocorrelation coeffi-
cient of coal sulfur content for
various averaging times (block aver-
ages). (Sources: Burton, Nordin,
and Stoeckenius, 1982; Baldwin,
1986)
Averaging Time p
1 hour 0.95
3 hours 0.90
24 hours 0.70
30 days 0.10
* Values shown are based on actual
coal sulfur content data and do
not reflect the progression of
autocorrelation coefficients with
increasing averaging time, which
would be predicted by a first-order
autoregressive model of coal sulfur
content.
87180 5
38
-------
Covarying-Sources Application
ISRC~The number used in the dispersion model to identify this
source. For example, if the dispersion model was exercised for
sources numbered 10, 11, and 12, and the ExEx user wants to
examine all of them, enter "10" on the first type-7 record, "11"
on the second type-7 record, and "12" on the third type-7
record. See the example in Table 3-5.
IGRP--The source group number. For this application, enter "1".
QGMThe geometric mean of coal sulfur content (units are
Ib S02/MMBtu).
QGSD--The geometric standard deviation of coal sulfur content.
GSDCUTNumber of GSDs above the GM at which to truncate the
distribution. A value of 6 is recommended.
RHO--Same as above. For covarying sources, each source must
_ tiave the same auto-correlation coefficient.
Independently Varying Sources Application
ISRCSame as for covarying-sources application.
IGRP~The source group number. Each source will be assigned to
a source group such that all sources with covarying emissions
(see Section 2) will belong to the same source group and sources
with independent emissions will be in different source groups.
This application is used only when there is more than one source
group. The source group number must be between 1 and 6. See
the example in Table 3-6.
QGMThe geometric mean of coal sulfur content for this source
group (units are Ib S02/MMBtu).
QGSD--The geometric standard deviation of coal sulfur content
for this source group.
GSDCUTNumber of GSDs above the GM at which to truncate the
distribution. A value of 6 is recommended.
87180 3
39
-------
RHOSame as for covarying-sources, except that the
autocorrelation coefficient is not necessarily the same for
different source groups.
3.2.4 Input Parameters for Probability Of Violation Applications
Input parameter files for probability of violation applications differ
slightly from those for expected exceedance applications. The principal
differences are that probability of violation applications require that a
value for the autocorrelation coefficient (RHO) be input and that the
value of OUTOPT be set to 1 (i.e., calculate probabilities of violation
only) or 2 (i.e., calculate both probabilities of violation and expected
exceedances).
The input parameter file structure for these applications is illustrated
in Figure 3-3; examples are provided in Tables 3-8, 3-9, and 3-10. Free
format is used throughout, with the exception of the parameters TITLE and
SNAME, which are character strings. TITLE can be typed in alphabetic
characters anywhere in the first 80 spaces of record type 1; SNAME is
typed .anywhere in the first 20 spaces of record type 6.
Record 1
Single-Source Application
TITLETitle of the ExEx run (may be up to 80 characters long)
Covarying-Sources Application
TITLESame as above
Independently Varying Sources Application
TITLESame as above
Record 2
Single-Source Application
CSTD--The air quality standard being examined (in yg/m3)
CBACKThe background concentration in (yg/nr)
87180 3r 4Q
-------
TABLE 3-8. Example input file structure for single-source probability
of violation application.
Line Examples of Actual
Number Entries in File
Corresponding Variable Names
1 RUN TITLE
2 365.,100.
3 1.1.3
4 1.1.1
5 4,1973,1974,1981,1985
6 SOURCE 1
7 1,1,3.00,1.2,6.0,0.7
TITLE
CSTD, CBACK
NSIM, NSRC, IAVPER
LGRID, LYRLY, OUTOPT
NYEAR, IYEAR(1),...,IYEAR(NYEAR)
SNAME
ISRC, IGRP, QGM, QGSD, GSDCUT, RHO
TABLE 3-9. Example input file structure for covarying sources
probability of violation application.
Line Examples of Actual
Number Entries in File
Corresponding Variable Names
1 RUN TITLE
2 365.,100.
3 1,1,24
4 1.1.1
5 4,1973,1974,1981,1985
6 SOURCE 1
7 1,1,3.00,1.2,6.0,0.7
8 SOURCE 2
9 2,1,3.00,1.2,6.0,0.7
TITLE
CSTD, CBACK
NSIM, NSRC, IAVPER
LGRID, LYRLY, OUTOPT
NYEAR, IYEAR(1),...,INYEAR(NYEAR)
SNAME
ISRC, IGRP, QGM, QGSD, GSDCUT, RHO
SNAME
ISRC, IGRP, QGM, QGSD, GSDCUT, RHO
87180 5
41
-------
TABLE 3-10. Example input file structure for independently varying
sources probability of violation application.
Line Examples of Actual
Number Entries in File
Corresponding Variable Names
1 RUN TITLE
2 365.,100.
3 400,1,24
4 1,1,1
5 4,1973,1974,1981,1985
6 SOURCE 1
7 1,1,3.00,1.2,6.0,0.7
8- -SOURCE 2
9 2,2,2.5,1.5,6.0,0.6
10 SOURCE 3
11 3,2,2.5,1.15.6.0,0.6
TITLE
CSTD, CBACK
NSIM, NSRC, IAVPER
LGRID, LYRLY, OUTOPT
NYEAR, IYEAR(1) lYEAR(NYEAR)
SNAME
ISRC, IGRP, QGM, QGSD, GSDCUT, RHO
SNAME
ISRC, IGRP, QGM, QGSD, GSDCUT, RHO
SNAME
ISRC, IGRP, QGM, QGSD, GSDCUT, RHO
87180 5
42
-------
Covarying-Sources Application
CSTDSame as above
CBACKSame as above
Independently Varying Sources Application
CSTDSame as above
CBACKSame as above
Record 3
Single-Source Application
NSIMThe number of sample years to generate. Although an
analytic procedure can be used to calculate expected exceedances
for single and covarying sources, it cannot be used in any
probability of violation applications. Therefore, for this
application, enter a number between 100-1999. The larger this
- number is, the more accurate the results. If NSIM is too small,
undesirably large sampling errors may result. Since the cost
of execution increases roughly in proportion to NSIM, using too
large a value may result in unacceptably long run times. The
smallest value of NSIM that still results in insignificant
sampling errors depends on the application; no general rule
exists. However, past experience has shown that a value of 500
is sufficient in most cases. If only approximate results are
required, a value as low as 200 may be used, but such results
should be viewed as preliminary.
NSRCAlways set to 1 for this application.
IAVPERThe averaging period. Enter "1" if 1-hour average dis-
persion model results are being used, "3" if 3-hour averages are
being used, or "24" if 24-hour averages are being used.
Covarying-Sources Application
NSIMSame as for single-source application
NSRCThe number of sources (must be less than 6)
IAVPERSame as for single-source application
87180 3
43
-------
Independently Varying Sources Application
NSIMSame as for single-source application
NSRCThe number of sources (must be 6 or less)
IAVPERSame as for single-source application
Record 4
Single-Source Application
LGRIDOption for printing expected exceedances by receptor:
0 = do not print
1 = print in regularly spaced format
2 = print in tabular format (10 at a time across the page)
ExEx calculates and prints the maximum probability of violation
(MPOV) in all cases using the probability of violation mode. If
this is sufficient, enter a "0" for this option. If output of
_ probabilities of violation at all receptors in the network is
desired, enter "1" or "2". If the dispersion model has been run
with regularly spaced receptors (i.e., distances from or
directions around the source are spaced at regular intervals),
enter "1". If the model was run with irregularly (sometimes
called discretely) spaced receptors, enter "2".
LYRLYOption to print probabilities of violation for individual
meteorological years (i.e., individual years of dispersion model
results) in addition to the default printing of results averaged
over all meteorological years:
0 = do not print results for individual meteorological
years
1 = print results for individual meteorological years
OUTOPTOption to calculate and print expected exceedances,
probabilities of violation, or both:
0 = Calculate and print expected exceedances only
1 = Calculate and print probabilities of violation only
2 = Calculate and print both expected exceedances and
probabilities of violation
87180 3
44
-------
Covarying-Sources Application
LGRIDSame as above
LYRLYSame as above
OUTOPTSame as above
Independently Varying Sources Application
LGRIDSame as above
LYRLYSame as above
OUTOPTSame as above
Record 5
Single-Source Application
NYEARThe number of years of dispersion model results (maximum
6).
IYEAR--A list of the years of dispersion model results.
Enter all four digits of the years (i.e., 1965, 1966, 1978, not
65, 66, 78).
Covarying-Sources Application
NYEARSame as above
IYEARSame as above
Independently Varying Sources Application
NYEARSame as above
IYEARSame as above
The next two records are repeated for each source when more than one
source is being considered.
Record Type 6
Single-Source Application
SNAMEThe name of the source being examined (up to 20 charac-
ters)
87180 3
45
-------
Covarying-Sources Application
SNAMESame as above
Independently Varying Sources Application
SNAMESame as above
Record Type 7
Single-Source Application
ISRCThe number used in the dispersion model to identify this
source. If the dispersion model was exercised for sources num-
bered 10, 11, and 12, and the user wants to examine only source
11, enter "11" in this space.
IGRPFor single-source application, enter "1".
_ QGMThe geometric mean of coal sulfur content (units are
Ib S02/MMBtu).
QGSD*--The geometric standard deviation of coal sulfur content.
GSDCUTNumber of GSDs above the GM at which to truncate the
distribution. A value of 6 is recommended.
RHOAutocorrelation coefficient. Enter appropriate auto-
correlation coefficient (calculated by the user or taken from
the list in Table 3-7).
Covarying-Sources Application
ISRCThe number used in the dispersion model to identify this
source. For example, if the dispersion model was exercised for
sources numbered 10, 11, and 12, and the ExEx user wants to
examine all of them, enter "10" on the first type-7 record, "11"
on the second type-7 record, and "12" on the third type-7
record. See the example in Table 3-8.
* Approximate ranges for values that are commonly encountered are
1.05 to 1.5 for the GSD. These values are for unscrubbed units;
scrubbed units generally have larger GSDs.
87180 3
46
-------
IGRP-The source group number. For this application, enter "1".
QGMThe geometric mean of coal sulfur content (units are
Ib S02/MMBtu).
QGSDThe geometric standard deviation of coal sulfur content.
GSDCUTNumber of GSDs above the GM at which to truncate the
distribution. A value of 6 is recommended.
RHOSame as above. Each source will have the same auto-
correlation coefficient.
Independently Varying Sources Application
ISRC---Same as for covarying-source application.
IGRPThe source group number. Each source will be assigned to
a source group such that all sources with covarying emissions
fsee Section 2) will belong to the same source group and sources
with independent emissions will be in different source groups.
This application is used only when there is more than one source
group. The source group number must be between 1 and 6. See
the example in Table 3-10.
QGMThe geometric mean of coal sulfur content for this source
group (units are Ib S02/MMBtu).
QGSD~The geometric standard deviation of coal sulfur content
for this source group.
GSDCUTNumber of GSDs above the GM at which to truncate the
distribution. A value of 6 is recommended.
RHO~Same as for covary ing-sources applications. Each source
within a source group will have the same autocorrelation
coefficient. Each source group may or may not have the same
autocorrelation coefficient. For example, in Table 3-10 the
first source and the second two sources are in different source
groups and have different RHO values.
87180 3
47
-------
3.2.5 Input Parameter File for Iterative Applications
The input parameter file for this mode is illustrated in Figure 3-4;
examples for both the expected exceedances and probability of violation
applications are shown in Tables 3-11 and 3-12. A description of the
individual variables follows. This application must be run for either the
expected exceedance application or the probability of violation
application; it may not be run simultaneously for both (whereas the
single-source, covarying-sources, and independently varying sources
applications can.
Record 1
TITLE--Title of the ExEx run (can be up to 80 characters)
Record 2
CSTDThe air quality standard being examined (in yg/m )
CBACK~-The background concentration (in pg/m )
Record 3
NSIMSet to 1 for this application
NSRCEnter "1" for this application
IAVPERThe averaging period. Enter "1" if 1-hour average dispersion
model results are being used, "3" if 3-hour averages are being used,
or "24" if 24-hour averages are being used.
Record 4
LGRIDOption for printing expected exceedances by receptor. In the
iterative mode, expected exceedances can be output for all receptors
for each compliant distribution by specifying option 1 or 2. See
Section 3.2.3 or 3.2.4 for additional information on this parameter.
0 = do not print
1 = print in regularly spaced format
2 = print in tabular format (10 at a time across the page)
87180 3
48
-------
TARGET,EPSJVARY,NQI, Q 1 BEG,
Q1END.Q2MI!M,Q2MAX
ISRCJGRP,QGM,QGSD,GSDCUT,RHO
SNAME
NYEARJYEAR(1...,NYEAR)
LGRID,LYRLY, OUTOPT
NSIM,NSRC,IAVPER
CSTD,CBACK
8
FIGURE 3-4. ..Input parameter file structure for ExEx iterative mode. All variables
except TITLE and SNAME are in free format.
49
-------
TABLE 3-11. Example input file structure for iterative expected
exceedances application.*
Line Examples of Actual
Number Entries in File
Corresponding Variable Names
1 RUN TITLE
2 365.,100.
3 1,1,3
4 1,1,0
5 4,1973,1974,1981,1985
6 SOURCE 1
7 1,1,3.00,1.2,6.0,.85
8 1,.05,2,3,1.05,1.09,1.,10
TITLE
CSTD, CBACK
NSIM, NSRC, IAVPER
LGRID, LYRLY, OUTOPT
NYEAR, IYEAR(1),...,IYEAR(NYEAR)
SNAME
ISRC, IGRP, QGM, QGSD, GSDCUT, RHO
TARGET, EPS, IVARY, NQI, QIBEG,
QIEND, Q2MIN, Q2MAX
* The addition of line 8 signals the system that the iterative
application is desired.
87180 5
50
-------
TABLE 3-12. Example input file structure for iterative probability of
violation application.
LineExamples of Actual
Number Entries in File Corresponding Variable Names
1 RUN TITLE TITLE
2 365.,100. CSTD, CBACK
3 1,1,24 NSIM, NSRC, IAVPER
4 1,1,1 LGRID, LYRLY, OUTOPT
5 4,1973,1974,1981,1985 NYEAR, IYEAR(1),....IYEAR(NYEAR)
6 SOURCE 1 SNAME
7 1,1,3.00,1.2,6.0,.95 ISRC, IGRP, QGM, QGSD, GSDCUT, RHO
8 .1,.05,2,3,1.05,1.09,1.,10 TARGET, EPS, IVARY, NQI, QIBEG,
QIEND, Q2MIN, Q2MAX
87180 5
51
-------
LYRLYUser option to print expected exceedances for individual
meteorological years (i.e., individual years of dispersion model
results) in addition to printing one set of results averaged over all
years.
0 = do not print
1 = print
OUTOPTOption to calculate and print the compliant GM or GSD for a
specified expected exceedance rate, or a specified maximum
probability of violation.
0 = calculate compliant distribution given a MEE
1 = calculate compliant distribution given a MPOV
Record 5
NYEAR~The number of years of dispersion model results (maximum 6)
IYEARA list of the years of dispersion model results. Enter all
fo.ur djgits of each year (i.e., 1965, 1966, 1978, not 65, 66, 78).
Record 6
SNAMEThe name of the source being examined (can be up to 20 charac-
ters).
Record 7
ISRCThe number used in the dispersion model to identify the
source. If the dispersion model was exercised for sources number 10,
11, and 12, and the user wants to examine only source 11, enter an
"11" in this space.
IGRPThe source group number. For this application enter "1".
QGMEnter any number. This variable is ignored in this application.
QGS-Enter any number. This variable is ignored for this application.
GSDCUTNumber of GSDs above the GM to truncate the distribution. A
value of 6 is recommended.
87180 3
52
-------
UNOAutocorrelation coefficient. Set to 0 if expected exceedances
application is being used. If the probability of violation
application is being used, enter appropriate autocorrelation
coefficient (calculated by the user or taken from Table 3-7).
Record 8
TARGETThe target MEE or MPOV A common value for the target might
be 1.0 for a MEE application or .10 for a MPOV application.
EPSA tolerance on TARGET, i.e., how close to the MEE or MPOV target
the distribution must come to be considered compliant. For example
in a probability of violation mode, if EPS is .005, the calculated
MPOV must come to within ± .005 of the target MPOV.
IVARYOption to specify which parameter to calculate and which to
hold fixed. For example, one might want to calculate the GM for a
given GSD. More commonly, one will want to calculate the GM for a
number of specified GSDs. The GSD will be considered the varying
parameter in this case.
1 = find GSDs for specified GMs
2 = find GMs for specified GSDs.
In describing the remaining parameters an example is used where IVARY has
been set to 2 so that GMs are being calculated for certain GSDs.
NQlThe number of GSD values to be used in searching for compliant
GMs. For example, if the user is determining the GMs that will com-
bine with the three GSDs 1.05, 1.07, and 1.09 to produce a MEE of 1,
NQ1 will be 3. If the user wants to examine GMs between 1 and 10 for
GSDs of 1.05, 1.06, 1.07, 1.08, and 1.09, NQ1 will be 5. The maximum
allowed is 20.
Q1BEGThe specific values for the parameter being varied are defined
by a range of values and NQ1. In the above example for NQ1, Q1BEG
would be 1.05.
Q1ENDThe ending value of the range of values (1.09 in the above
example).
Q2MINFurther developing the example started above, a GM will be
calculated for each of the specified GSDs 1.05 - 1.09. To limit pro-
gram execution time and to assure generation of reasonable values,
87180 3
53
-------
the user must specify a range of values for the GM.* Q2MIN is the
minimum valid value (in Ib S02/MMBtu). A value of 1 is used in the
example above.
Q2MAXThe maximum valid value to be considered for the GM (in Ib
S02/MMBtu). A value of 25 is used in the above example.
3.2.6 Input Parameter File For Applications Using Both Expected
Exceedances and Probabilities of Violation
Some users may want to examine both expected exceedances and the
probability of violating a given concentration level. To do this, refer
to either Section 3.2.3 or 3.2.4, which describe the inputs for the two
applications. All but two inputs are the same for each application:
1. On record 4 the third variable, OUTOPT, specifies whether the
user wants to calculate expected exceedances only, probabilities of
violation only, or both. To do both, enter a "2" for this variable.
2-. OR record type 7 the variable RHO is included for specifying an
autocorrelation coefficent. Enter a coefficient either calculated
from coal sulfur content data or from Table 3-7.
As discussed in Section 2, the probability of violation application
requires a Monte Carlo simulation for all applications (single, covarying
or independently varying sources, and iterative). When the ExEx System is
run for the expected exceedance and probability of violation applications
simultaneously, all calculations will use the Monte Carlo procedure. This
has two effects: (1) the computer run time is longer than it would be for
runs not employing the Monte Carlo simulation, and (2) the expected
exceedances calculated this way will vary slightly from the exact values
calculated with the analytic method. These differences are not
significant, namely, less than ± 0.02 expected exceedances per year, so
long as a sufficiently large value of NSIM is specified. Nevertheless,
the user should be aware that they exist.
GM values ranging from roughly 0.05 to 15 Ib S02/MMBTu are conceivable
depending on the type of plant, emission control equipment (if any) and
sources of coal.
87180 3
54
-------
3.3
JOB CONTROL LANGUAGE FOR THE ExEx SYSTEM
The following run streams illustrate the job control language
(JCL) required to execute the ExEx preprocessor and the ExEx
program on the EPA National Computer Center's IBM 3090/300
computer. For further information the user should refer to the
system JCL manual.
//j obid JOB (acct,bin),username,TIME=(2,0),NOTIFY=uid,
// MSGCLASS=P,PRTY=3
//*
//* RUN PREPROCESSOR TO PROCESS DISPERSION
//* MODEL RESULTS FOR THE PROGRAM EXEXS
//*
/*ROUTE PRINT HOLD
//RUN EXEC PGM=preproc,REGION=5000K
//STEPLIB DD DSN=loadfile,DISP=SHR
//SYSPRINT DD SYSOUT=A
/*
//FT06F001 DD SYSOUT=A
//FT11F001 DD DSN=inputfile,DISP=SHR
//FT12F001 DD UNIT=DISK,
// DSN=msgfile,
// DCB=(BLKSIZE=13200,RECFM=FB,LRECL=132),
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(50,50),RLSE)
//FT13F001 DD DSN=dispfile,DISP=SHR
//FT14F001 DD UNIT=DISK,
// DSN=b inaryout file,
// DCB=(RECFM=VBS,LRECL=13026,BLKSIZE=13030),
// DISP=(NEW,CATLG,),
// SPACE=(CYL,(10,5),RLSE)
/*
This first run stream illustrates the JCL for running the ExEx
preprocessor. Lower case names are user-specified as follows:
jobid
username
uid
acct
bin
preproc
loadfile
inputfile
msgfile
dispfile
binaryoutfile
job identification name
user identification name
user id
account number
bin drop number
preprocessor program name
file containing preprocessor load module
input parameter file
output message file
file containing dispersion modeling results
file for the preprocessed output
The first line contains job identification parameters:
TIME1 indicates the CPU time alloted for the run (here it
55
-------
is two minutes and zero seconds)
'MSGCLASS1 is the job scheduler message class
'PRTY1 is the job execution priority, which ranges from 0
(lowest priority) to 4 (highest)
The next four lines are comment lines (indicated by a double
slash followed by an asterisk) for clarification.
The next line ('ROUTE PRINT HOLD1) allows the printed output to
be examined from a terminal before it is printed.
The next three lines execute the program: 'RUN1 executes the
program; 'STEPLIB' gives the location of the executable load
modules, and; 'SYSPRINT' routes the output to a print device.
The parameters are as follows:
'EXEC' executes the program ('PGM=')
'REGION' indicates the amount of storage space needed for
the run step (5000K bytes in this case)
'DD1 indicates that what follows is a data definition step
"giving information such as the data set name, disposition,
organization, and record length
DSN' is the data set name of the load module file (also
used later to designate input or output files)
'DISP' describes the current status of the data set('SHR' =
shared)
'SYSOUT1 defines a print data set ("A1 specifies a printer,
as opposed to a card punch or other print mechanism)
The remaining lines open files for reading and writing during
program execution, as follows:
FORTRAN unit 6 ('FT06') contains program messages
FORTRAN unit 11 ('FT11') contains the input parameter file
FORTRAN unit 12 ('FT12') contains the message output file
written by the preprocessor program
'DCB' is a data control block statement indicating the block
size (BLKSIZE=13200), record format (RECFM=FB, for fixed-
length blocked records), and logical record length
(LRECL=132) of the output file
'DISP1 describes the disposition of the output file (here it
56
-------
is 'NEW'); 'CATLG1 means to save the file, along with its
unit and volume; 'DELETE1 means to delete the file in the
event of an abnormal program completion
SPACE1 allocates space on the system; '(TRK,(50,50),
RLSE)' means that space is allocated on 50 tracks, with
overflow extending by groups of 50 tracks, and any excess
space is released once the data set is closed.
FORTRAN unit 13 is the file of normalized concentrations
output by the dispersion model.
FORTRAN unit 14 contains the file for the preprocessed
output that will be used by the ExEx program.
The run stream for an ExEx run is shown below.
//jobid JOB (acct,bin),username,TIME=(2,0),NOTIFY=uid,
// MSGCLASS=P,PRTY=3
//*
/*ROUTE PRINT HOLD
//RUN EXEC PGM=exexprog,REGION=5000K
//STEPLIB- DD DSN=loadfile,DISP=SHR
//SYSPRINT DD SYSOUT=A
/*
//FT06F001 DD SYSOUT=A
//FT11F001 DD DSN=inputfile,DISP=SHR
//FT12F001 DD UNIT=DISK,
// DSN=OUtfile,
// DCB=(BLKSIZE=13200,RECFM=FB,LRECL=132),
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(50,50),RLSE)
//FT13F001 DD UNIT=DISK,
// DSN=tempfile,
// DCB=(DSORG=DA,BLKSIZE=1600,RECFM=FB,LRECL=80),
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(5,5),RLSE)
//FT14F001 DD DSN=binaryinfilel,DISP=SHR
//FT15F001 DD DSN=binaryinfile2,DISP=SHR
/*
These commands are almost the same as those used for the
preprocessor. The job identification line is identical to that
of the preprocessor (although not all runs would have the same
CPU time limit). The RUN sequence requires the name of the ExEx
program module in the loadfile instead of the preprocessor
program module, and the open statements differ slightly. The
file opened on unit 11 is the input file for the ExEx program,
the file opened on unit 12 is the printed output file, and the
57
-------
file opened on unit 13 is a temporary paging file.
Specific applications of the ExEx preprocessor and the ExEx
program will use JCL commands almost identical to the examples
above. The main differences will be associated with specific
output disposition, time limits, and filenames. In the ExEx
example above, only two binary input files are used (opened on
units 14 and 15). If more years are used, units 16 through 19
may be opened. (As discussed in Section 3.2.3, up to six years
of preprocessed data may be used in any one ExEx run.)
The CPU time will vary from run to run. The user should consult
the examples in Section 5 for approximate CPU limits to assign to
different runs. In general, the probability of violation
applications or the expected exceedance application for
independently varying sources will require many more CPU seconds
than other applications.
58
-------
4 EXEX SYSTEM OUTPUT
This section describes output from the ExEx System, covering outputs from
the preprocessor (Section 4.1) and the ExEx Program (Section 4.2), includ-
ing expected exceedances outputs and probability of violation outputs for
single, covarying and independently varying sources. Outputs for itera-
tive applications are also described. Diagnostic output messages are dis-
cussed in section 4.3.
4.1 EXEX PREPROCESSOR OUTPUT
Output from the ExEx Preprocessor consists of one file for each year of
dispersion-model results. These files are written in binary (i.e.,
machine readable) format and are not printable. As discussed in Section
3, the output from the preprocessor is input directly to the ExEx Program.
4.2 EXEX PROGRAM OUTPUT
The purpose of this section is to familiarize the user with output from
ExEx applications under the various options that control the level of
detail provided in the output. The large number of applications and out-
put options creates the potential for needless repetition of material. To
minimize this, each example of an application described below is also used
to illustrate one of the output options. Table 4-1 lists the applications
and corresponding output options used to generate the output presented in
this section. Only two of the output examples include all pages of out-
puts in the expected exceedance single source and iterative applica-
tions. In all other examples, the first two pages of output (which merely
echo the inputs used) are not included. In Section 5, which provides a
full example of each application with all inputs and outputs, all pages of
output will be provided. The examples will be the same as those shown in
this chapter but will be presented in a way that clarifies the relation-
ship between inputs and outputs.
87180 t
59
-------
TABLE 4-1. Options chosen and corresponding results for output
examples.
Application
Output Option
Chosen
Output Result
Single source
Covarying sources
Independent sources
Iterative mode
Single source
Covarying sources
Independent sources
Iterative mode
Expected Exceedances
OUTOPT = 0 Expected exceedances over all
LYRLY = 0 years at regular receptors
LGRID = 1
OUTOPT = 0 Expected exceedances for each
LYRLY = 1 individual year at discrete
LGRID = 2 receptors
OUTOPT = 0 Maximum expected exceedance
LYRLY = 0 for each source group and all
LGRID = 0 source groups combined over
all years
OUTOPT = 0 Expected exceedances at
LYRLY = 0 regular receptors for
LGRID = 1 alternative GMs
Probability of Violation
OUTOPT = 1
LYRLY = 1
LGRID = 2
OUTOPT = 1
LYRLY = 1
LGRID = 1
OUTOPT = 1
LYRLY = 0
LGRID = 1
OUTOPT = 0
LYRLY = 0
LGRID = 2
POVs for individual years
at discrete receptors
POVs over all years at
regularly spaced receptors
POVs and synergistic POVs
by source group, over all
source groups, over all years
at regularly spaced receptors
POVs for alternative GMs over
all years at discrete
receptors
87180 5
60
-------
4.2.1 Echoed Output
The first two pages of output from the System echo inputs used for running
the dispersion model and entered in the ExEx input parameter file. A
header identifying the date and time of the run appears at the top of the
first page of output (see the example in Figure 4-1). This is followed
by a list of user-supplied inputs from the input parameter file, such as
the run titles, the air quality standard, the background concentration,
the number of sample-years, the number of sources, the averaging period,
the option to calculate and print expected exceedances, probability of
violation, or both, and the years of dispersion model results. In the
example in Figure 4-1 the comparison standard is 650.0 ug/m ; the back-
ground concentration is 100.0 yg/m ; 500 sample years are being run; there
are two sources; a one-hour averaging period is being used; expected
exceedances only will be printed (OUTOPT = 0); and the years 1973, 1974,
and 1975 are being examined.
Print options activated are also listed on the first page of output. In
Figure 4-1 the user has chosen to print only the MEE (LGRID was set to 0)
and to output the result over all meteorological years (LYRLY = 0). Coal
su!fur_content information in the form of the GM, GSD, and the autocorre-
lation coefficient is listed next for each source. In this example there
are two sources, each with a GM of 2.85 and a GSD of 1.05. A boxed note
identifying the type of application appears at the bottom of the page (in
the example in Figure 4-1, the application is the multi-source group
expected exceedance application).
The second page of output contains information about the dispersion model
run and the prescreening results (see the example in Figure 4-2). Listed
for each year of dispersion results are the run title, number of sources
(two in the example), number of receptors (180), number of averaging peri-
ods (8760), receptor grid type (polar), and the cut-off value used in the
preprocessor for screening out small concentrations (1.5 x 10 ). One
such set of information is printed for each year of dispersion model
results. The results of the data screening are printed next, listing the
number of concentrations in the preprocessed dispersion model results
(22,106 for the first year) and the number of concentrations greater than
the (xAOnrin inPut b> tne user as CCUT for the preprocessor (2,232 for the
first year).
4.2.2 Expected Exceedances Single Source Application Output
Figure 4-3 illustrates output for a single source using an air quality
standard of 650 ug/nr. Expected exceedances were calculated and printed
for a full array of 180 regularly spaced receptors (LGRID was set to 1).
87180 4
61
-------
[XPCCTED EXCEEDANCES SYSTEM
ExExs V3.01 Ol-JAN-88
IBM TSO F77 VERSION I
SYSTEMS APPLICATIONS, INC.
Date t time of run: HON. JAN 11 {988 09:52:44
User Input Information
Title of run
Comprir i sun standard concentration (ug/mJ)
Background concentration (ut)/mJ)
I simulations per year
t emission sources
Averaging period (hours)
Out put Opt Ion
Years of requested dispersion ibsults
Opt ions ac t i v.ited :
Print max expected exceedances
Output all-years result only
CASE 3: EXEXS RUN FOR INDEPENDENTLY VARYING SOURCES APPLICATION
650.00
100.00
500
2
1
0
1973 1974 1975
en
ro
Coal Sulfur Content Distribution:
Source* Group/ Source name
1
1
SOURCE 8
SOURCE c
Geometric mean
(Ib S02/HHBU)
2.85
2.85
Geometric std dcv IGSO to max Autocorrelation co-ef
1.05
1.05
G.O
G.O
0.95
U.95
Modi'I is run in Hulti Source-Groups mode.
Expected e*ceedances are calculated using
a Monte-Carlo simulation.
FIGURE 4-1. Example of the first page of output.
depending on the computer system.)
(Output may be in upper or lower case,
-------
CT>
t/J
Dlspersion-Model-Resu I ts Oatd Information
Uataf I les Headers:
Title of Olspersion-Model-ResuIt data
Year modeled
l soun.es
I rucfcplors
I nvei ag I ng periods
Receptor grid type (l=polar , ?-t abular)
I radii or x-d i reel ion recui1' o' s
Cut-off value used in preprocessor (j/m3)
Title of Dispersion-Model-Result data
Te.n- modeled
I sources
I receptors
averaging periods
Receptor grid t>pe (1=polar,7= Iflbular)
I radii or x-directlon receptors
Lut-off value used in preprocessor (g/m3)
Title of Dispersion-Hodel-Resul t data
Year modeled
I sources
I receptors
I averaging periods
Receptor grid type (l=polar .?-\abular)
I raoii or «-dirt'ition receptors
Cut-off value used in preprocessor (g/m3)
CHI/Q PRE-PROCt'SSCD DATA rOK HUITIPIC SOUHCf
1973
180 I
87liU
I
36
1.5000E-05
CHI/Q PRE-PROCESSCD DATA FOR MULTIPLE SOURCE
19/4
1
180
8760
1
36
I.5000E-05
CHI/0 PRE-PROCESSED DATA FOR MULIIPLE SOURCE
1975
2
180
8760
1
36
1.5000E-05
Data Screening Result:
Lowest concentration that may cause exceedance is (X/Q)mtn = 7.2003?bE-05 g/mj.
Filel Year Iconc in datafile
1 1973 22106
? 1974 22034
3 1975 2179-1
Total 65934
Iconc > (X/Q)nin
2232
2286
2-180
6998
FIGURE 4-2. Example of second page of output.
87180
-------
CASE 1: EXEXS
S t andard cone
* (asterisk)
Al 1 years al
RUN FOR
650.00
In table
Source-Croup exex Model
SINGLE-SOURCE APPLICATION
ug/m3. background
indicates the max .
cone 100.00
ug/m3, 180 receptors.
1
averaging period 1-hour
1 sources MEE = 1.8506E+01
Expected exceedances
ring ]
ring 2
ring 3
rl ng 4
ring 5
2.39
1.59
0.67
5.28
13.86
5.35
1.70
4.22
2.01
0.09
0.09
0. 10
0.00
0.00
0.00
by receptor are
2.16 2.84
3.74 2.62
0.60 0.63
6.55 6.23
17.56 18.51
5.36 7.40
2.29 1 .33
6.76 5.92
2.07 3.40
0.11 0.26
0.28 0.04
0.21 0.03
0.00 0.00
0.00 0.00
0.00 0.00
2.74
1 .68
1.42
7.22
11.19
5.93
4.52
5.10
2.90
0.24
0.19
0.06
0.00
0.00
0.00
1
2.61 2.07 1
2.17 3.19 3
1.37 1.61 1
9.19 8.84 7
7.66 9.35 6
6.70 10.43 7
4.27 5.33 4
2.65 2.71 2
3.27 4.66 2
0.04 0.07 0
0.02 0.01 0
0.00 0.27 0
0.00 0.00 0
0.00 0.00 0
0.00 0.00 0
58 2.96 3.49 4.08
56 2.39 1.02 0.01
19 1.34 0.50 1.06
22 6.67 13.17 10.17
22 3.31 1.15 3.67
73 9.10 7.60 4.70
15 2.15 4.18 3.08
43 1.17 0.24 1.65
88 2.92 2.64 1.07
18 0.03 0.31 0.04
05 0.02 0.04 0.11
14 0.05 0.28 0.13
00 0.00 0.00 0.00
00 0.00 0.00 0.00
00 0.00 0.00 0.00
t
3.93 5.71
0.60 0.68
1.44 2.32
12.72 16.02
5.11 7.16
7.53 7.43
6.69 8.56
2.25 3.33
1.63 2.33
0.12 0.12
0.02 0.01
0.06 0.15
0.00 0.00
0.00 0.00
0.00 0.00
FIGURE 4-3. Expected exceedance output: single source.
-------
As described in section 3, "regularly spaced" receptors refers to either a
polar or a Cartesian grid in which receptors are placed in a recognizable
pattern. This section describes regularly spaced receptors in terms of
polar receptors for brevity. In this example the receptors are placed 10
degrees apart on five concentric rings around the source. Results are
printed over all meteorological years combined (LYRLY was set to 1).
In this output expected exceedances are listed ring by ring. The first
value for a ring corresponds to the receptor at 10 degrees for that ring;
the last for the receptor at 360 degrees. For example, in ring 1 the
receptor at 10 degrees has an expected exceedance rate of 2.39; the recep-
tor at 20 degrees has a rate of 2.16; the receptor at 30 degrees has a
rate of 2.84; and the receptor at 360 degrees has a rate of 2.32.
The maximum expected exceedance rate (MEE, identified by an asterisk in
the printout) was 18.5 on the second ring at 150 degrees. The other
highest exceedance rates, 17.56, 13.86, and 16.02, are also on the second
ring and also in the southeast quadrant. The lowest exceedance rates are
to the south and northwest. Receptors on the fourth ring had a very small
number of expected exceedances, and receptors on the fifth ring had
none. ~~ ~
4.2.3 Covarying Sources Expected Exceedance Application
This application treats two or more sources as having the same emissions
(expressed in Ib S02/MMBtu) in any given time period. Output is printed
in Figure 4-4. The output options chosen for this run were to print
results for tabular (discrete) receptors (LGRID = 2) separately for each
meterological year and over all years (LYRLY = 1). The MEE rate for each
year is listed at the top of the table. In 1973 the MEE was 39.82; in
1974 it was 23.38; in 1975 it was 32.42; and over all years it was 31.88.
The column and row headings for the tabular receptor output are for orien-
tation purposes and do not signify specific receptor locations as is the
case with the polar output. The MEE in 1973 occurs at the 77th receptor,
which is receptor number 77 in the list of receptors provided to the dis-
persion model. The expected exceedances of 2.43, 1, and 2.87 at receptors
37, 38, 39, as well as others, can also be referenced by their order in
the list provided to the dispersion model. If the receptors happened to
be polar and spaced every 10 degrees and this tabular output option had
been specified, the first expected exceedance value would correspond to
the 10° receptor on ring one, and the MEE of 39.83 would correspond to the
50° receptor on the third ring (it is the 77th value on rings with 36
values apiece and so corresponds to the fifth value on the third ring).
87180
65
-------
cr>
en
C 1 r, « 1 n
_ --__ j ( || y | c
CASE 2: EXEXS RUN FOR COVARYING SOURCCS APPLICATION
Standard cone 650.00 uq/mJ, background cone 100.0
* (asterisk) tn table indicates the max.
rear 1973 all sources MEE = 3.9825E+01
Expected exceedances by receptor are
0
10
20
30
10
50
60
70
80
90
100
1 10
120
130
110
150
160
170
Year 1974
£ xpec ted
0
10
20
30
10
50
60
70
80
90
100
110
120
130
110
150
160
170
1
0
0
0
0
1
2
0
2
5
3
2
I
0
0
0
0
0
0
.00
.00
.00
.00
.00
.00
.00
.00
.73
.61
.58
.70
.53
.38
.00
.00
.00
.00
all sources
exceedances by
1
0
0
0
0
1
1
1
1
12
1
1
0.
2
0
0.
0.
0.
0.
00
00
00
00
51
00
00
00
21
59
98
85
61
00
00
00
00
00
2
0.00
0.00
0.00
0.00
2.00
1 .00
0.00
2.00
7.06
0.00
1.38
6.13
0.88
0. 10
I .22
0.00
0.00
0.00
MEE = 2.
receptor
2
0.00
0.00
0.00
0.00
3.00
0.13
1.92
3.00
6.17
2.10
6.09
3.00
1.10
0.05
0.16
0.00
O.Ol
0.00
3
0.00
0.00
0.00
0.00
3.00
0.00
0.00
2.71
5.65
1 .00
2.01
8.08
0.00
2.19
2.26
0.00
0.00
0.00
3382EtOl
are
3
0.00
0.00
0.00
0.00
I .00
1.00
4.00
2.28
6.45
0.00
5.27
6.92
0. 11
0.31
0.00
0.00
0.00
0.00
4
0.00
0.00
0.00
0.00
4.00
0.00
0.00
8.58
7.66
0.04
2.46
3.41
0.42
0.08
2. 19
0.50
0.00
0.00
4
0.00
0.00
0.00
0.00
2.00
1.00
4.00
3.29
4.00
0.14
4.17
6.39
0.90
0.96
1 .45
0.00
0.00
0.00
Source-Group exex Model Outpi
0 ug/m3, 180 receptors, aver
1
5
0.00
0.00
0.00
0.00
4.00
0.00
1.00
5.03
7.21
0.92
1 .59
1.76
0.21
2.31
0.00
O.OU
0.00
0.00
5
0.00
0.00
0.00
0.00
3.70
2.00
5.03
5.11
5.43
0.01
3.77
4.31
1.12
1 .77
0.00
0.00
0.00
0.00
6
0
0
0
0
3
0
1
25
6
2
1
2
0
1
0
0
0
0
6
0
0
0
0
3
1
3
19
16
0
4
2
2
0
0
0
0
0
00
00
00
00
00
00
00
90
84
70
36
It)
16
54
00
00
00
00
00
00
00
00
27
00
98
77
46
01
45
21
43
95
00
00
00
00
7
0.00
0.00
0.00
2.43
2.00
0.00
3.66
* 39.83
2.19
2.06
6. 85
I. 79
0.42
0.07
0.02
0.00
0.00
0.00
7
0.00
0.00
0.00
1.00
1.93
1.00
2.35
* 23.38
1 .49
0.23
0.21
1.50
0.03
0.70
0.00
0.00
0.00
0.00
t - - ____.,__-- __________-__-_-_- . ---
agi ng per lod 1 -hour
8
0.00
0.00
0.00
1 .00
2.00
0.00
3.00
23.23
1.44
2.26
6.G6
3.47
0.05
0. 19
0.00
0.00
0.00
0.00
8
0.00
0.00
0.00
3.00
0.41
1.00
0.00
22.05
8.28
0.49
3.12
2.02
0.02
0.01
0.75
0.00
0.00
0.00
9
0.00
0.00
0.00
2.87
2.00
0.00
2.80
3.92
2.31
2.96
1 .00
2.21
0.00
0.52
0.01
0.00
0.00
0.00
9
0.00
0.00
0.00
2.00
1 .43
1 .00
0.00
10.40
7.08
1.29
2.00
1 .49
0.47
0.24
0.00
0.00
0.00
0.00
10
0.00
0.00
0.00
2.00
2.00
0.00
0.43
7.55
0.94
3.69
1 .43
0.80
0/51
0.08
0.00
0.00
0.00
0.00
10
0.00
0.00
0.00
4.00
2.00
1.00
0.00
11.98
5.87
1.07
0.10
1 .01
0.00
0.02
0.00
0.00
0.00
0.00
FIGURE 4-4. Expected exceedance output: covarying sources,
-------
cr>
. ...... Single
^ ft ii f f A _ ft t* n ii n
CASE 2: EXEXS RUN FOR COVARVING SOURCES APPLICATION
Standard cone 650.00 ug/m3. background cone 100.00 ug/m3. 180
(asterisk) in table indicates the max.
Year 1975 all sources MEE = 3.2125E+01
Expected exceedances by receptor are
0
10
20
30
10
50
60
70
80
90
100
110
120
130
HO
ISO
160
170
1
0
0
0
0
8
4
2
4
9
2
3
1
3
0
1
0
0
0
.00
.00
.00
.00
.25
.88
.00
.56
.51
.12
.83
.69
.50
.02
.05
.00
.00
.00
2
0
0
0
0
9
3
2
2
7
3
2
3
0
1
1
0
0
0
.00
.00
.00
.00
.91
.98
.00
.05
.34
.45
.79
.11
.95
.29
.91
.03
.00
.00
3
0
0
0
0
7
3
1
2
13
1
6
6
0
0
0
0
0
0
.00
.00
.00
.00
.00
.00
.98
.97
.25
.81
.62
.42
.90
.37
.82
.00
.00
.00
4
0.
0.
0.
0.
3.
2.
4.
7.
10.
1.
1.
1 .
0.
0.
1.
0.
0.
0.
00
00
00
00
71
00
00
20
80
00
02
80
43
2?
26
00
00
00
5
0.
0.
0.
0.
1.
0.
4.
8.
9.
0.
3.
2.
0.
1.
0.
0.
0.
0.
00
00
00
00
00
00
95
55
77
00
09
00
26
49
00
00
00
00
6
0
0
0
0
1
1
8
24
7
2
9
1
1
0
0
0
0
0
ft V P V
Unrfa 1
Ef A C A ri wu C >
receptor^ ,
1
.00
.00
.00
.00
.51
.00
.74
.52
.41
.40
.42
.87
.96
.73
.00
.00
.00
.00
7
0
0
0
2
1
1
7
* 32
6
0
3
1
0
0
0
0
0
0
averaging
00
00
00
47
00
00
00
43
67
00
15
79
46
02
00
00
00
65
8
0.
0.
0.
3.
2.
2.
7.
20.
6.
1 .
2.
2.
0.
0.
0.
0.
0.
0.
period
00
00
00
21
00
00
00
96
17
20
02
52
34
15
00
00
00
00
9
0
0
0
4
3
1
4
6
5
3
1
1
0
1
0
0
0
0
1-hour
.00
.00
.00
.99
.34
.00
.10
.49
.97
.52
.32
.80
.00
.17
.30
.00
.00
.00
10
0
0
0
5
4
2
5
13
7
3
0
1
0
0
0
0
0
0
.00
.00
.00
.03
.89
.00
.47
.70
.12
.63
.00
.47
.00
.32
.00
.00
.00
.07
FIGURE 4-4. Continued.
87180
-------
CTi
CO
CASE 2: EXEXS RUN FOR COVARriNG SOURCES APPLIC
Standard cone 650.00 u9/ro3, background cone
* (asterisk) In table indicates the max.
All years all sources MFC = 3.1877Et01
Expected exceedances by receptor are
0
10
20
30
10
50
60
70
80
90
100
110
120
130
HO
150
160
170
1
0
0
0
0
5
2
1
2
9
2
2
1
2
0
0
0
0
0
00
00
00
00
59
63
00
52
15
14
80
42
21
13
35
00
00
00
2
0
0
0
0
4
1
1
2
6
1
4
4
0
0
1
0
0
0
00
00
00
00
97
80
31
15
86
85
42
IB
98
48
20
01
01
00
3
0
0
0
0
3
1
1
2
8
0
4
7
0
1
1
0
0
0
00
00
00
00
67
33
99
66
45
94
64
14
34
06
03
00
00
00
4
0
0
0
0
3
1
2
6
7
0
2
3
0
0
1
0
0
0
Single Source-Group exex Model
UTION 1
100.00 ug/m3, 180 receptors,
1
00
00
00
00
24
00
67
36
49
39
55
87
58
42
63
17
00
00
5
0
0
0
0
2
0
3
6
7
0
2
2
0
1
0
0
0
0
00
00
00
00
90
67
66
23
47
31
82
69
53
86
00
00
00
00
6
0
0
0
0
2
0
4
23
10
1
5
2
1
1
0
0
0
0
00
00
00
00
60
67
57
40
24
70
08
08
51
07
00
00
00
00
7
0
0
0
2
1
0
4
* 31
3
0
3
1
0
0
0
0
0
0
Output
a ver ag i nc
00
00
00
97
64
67
34
88
55
76
41
69
30
26
01
00
00
22
8
0
0
0
2
1
1
3
2?
6
1
3
2
0
0
0
0
0
0
period
00
00
00
40
47
00
33
08
30
31
94
67
14
12
25
00
00
00
I
9
0
0
0
3
2
0
2
6
5
3
1
1
0
0
0
0
0
0
-hour
00
00
00
29
26
67
30
94
12
59
44
83
16
64
10
00
00
00
10
0
0
0
3
2
1
1
12
4
2
0
1
0
0
0
0
0
0
00
00
00
68
96
00
97
08
64
80
61
10
17
14
00
00
00
02
FIGURE 4-4. Concluded.
-------
4.2.4 Independently Varying Sources Expected Exceedance Application
Figure 4-5 illustrates output when sources are specified as independently
varying. The output options were set to print only the MEE rate (LGRID =
0) instead of the expected exceedances at each receptor. Also, results
have not been printed for individual years (LYRLY =0). In this instance
the output consists of a report of the MEE for each source group and the
MEE due to the combined impact of all source groups. If output options
had been chosen to print expected exceedances by receptor, a table of
expected exceedances at each receptor would have been produced for each
source group and for all source groups considered together.
The MEE rate for source group one was 1.39 and the MEE rate for source
group two was also 1.39. (In general the rate will not be the same for
different source groups.) The MEE rate over all source groups is 3.21.
This is greater than the sum of the two MEE rates because of the potential
for synergistic exceedances.
4.2.5 -Expected Exceedance Iterative Application
Output from the iterative application is slightly more complicated to
interpret than output for other applications. The first page of output,
shown in Figure 4-6, lists the input values for the run title, standard
concentration, background concentration, and other input parameters. In
the middle of the page characteristics of the coal sulfur content distri-
bution as input by the user are also listed. As described in Chapter 2,
the iterative application is used for identifying a coal sulfur distribu-
tion that will allow a target MEE rate to be reached. In the example in
Figure 4-6 it can be seen that the distribution was specified to have a GM
between 1.10 and 5.50, and one of three GSDs between 1.10 and 1.20. The
target MEE rate was 1.0 ± 0.05. These instructions directed the ExEx Sys-
tem to find a GM or GMs within the specified range (of 1.1 - 5.5 when the
GSD was 1.1, 1,15, or 1.2) that resulted in the target MEE rate. If no
such GM existed, the output would note this.
Additional output for the example is shown in Figure 4-7. A table is
printed for each selected GSD value, which shows the expected exceedance
at each receptor resulting from the GM calculated by the ExEx System. The
first GSD was 1.10. After trying seven different GMs (iterations) the
ExEx System found that a GM of 1.62 would result in a MEE rate of 0.99
when the GSD was 1.10. This rate occurs on the first ring and ninth
azimuth. The second GSD selected was 1.15. The compliant GM found for
this GSD was the same as in the first step: 1.62. However, the larger GSD
87180 «»
-------
Hulti Source-Groups exex Model Output
CASt 3: EXEXS RUN FOR INOEPENDENU₯ VARYING SOURCES APPLICATION
Standard cone 650.00 ug/mj. background cone 100.00 ug/m3. 180 receptors. averaging period 1-hour
I
All years source-group 1 MfE = 1.3853E+00
All years source-group 2 HIE = 1.3940C+00
All years all sources MEE = 3.?H8E+OI
FIGURE 4-5. Expected exceedance output: independently varying sources,
87 1 SO
-------
EXPECTED EXCEEDANCES SYSTEM
ExExs V3.01 Ol-JAN-88
IBM TSO F77 VERSION
SYSTEMS APPLICATIONS. |NC.
Oat* I time of run: HON. JAN 11 1988 10:12:51
User Input Information
Title of run
Comparison standard concentration (ug/m3)
Background concentration (ug/m3)
I simulations per year
I emission sources
Averaging period (hours)
Output Option
Years of requested dispersion results
CASE 4: EXEXS RUN FOR SINGLE-SOURCE ITERATIVE APPLICATION
650.00
100.00
1
1
1
0
1971 1972 1973
Opt ions act i vated:
Print expected exceedances on polar grid receptors
Output all-years result only
Coal Sulfur Content Distribution:
Source* Group* Source name
1 1 SOURCE A
Geometric mean
(Ib S02/HMBtu)
computed within
1.10 - 5.50
Geometric std dev
1.10 - 1.20
3 values
IGSO to max
6.0
Autocorrelation co-ef
0.95
Target max expected exceedance = 1.00 +/- 0.0500
! Model is run in Single Source-Group Iterative mode.
! No Monte-Carlo simulation is performed.
! No yearly result can be output.
FIGURE 4-6. Expected exceedance output: iterative application page 1 of output.
87180
-------
CASE 4: EXEXS RUN FOR S 1 NGLE -SOURCE ITERATIVE APPLICATION
Standard cone 650.00 ug/n\3, background cone 100.00 uq/m3,
larget max expected exceedance (HEE) is 1.000 */- O.ObOO
* (asterisk) In table Indicates the max.
Step* 1 : GSD = 1 .1000
After 7 iterations, found GH of 1.6156 which produces:
All years all sources HEE = 9.9107E-01
Expected
ring 1
ring 2
ring 3
ring 4
ring 5
Step* 2:
After 7
All years
Expected
ri ng 1
ring 2
ring 3
ring 4
ring 5
exceedances by
0.11
0.79
0.21
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
GSD = 1.1500
eratlve exex IHodel Output
180 receptors, averaging period
1 -hour
receptor are
0.17
0.20
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
iterations, found GH of
all sources
exceedances by
0.17
0.89
0.23
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
HEE = 1 .
receptor
0.23
0.27
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.09
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
1 .6156
0121E+00
are
0.01
0.18
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
which
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
26
08
26
00
00
00
00
00
00
00
00
00
00
00
00
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
.50
.03
.11
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
0.21
0.40
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
00
38
25
00
00
00
00
00
00
00
00
00
00
00
00
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
00 *
47
00
00
00
00
00
00
00
00
00
00
00
00
00
0.99
0.00
0.16
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.32
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.22
0.00
0.02
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.94
0.29
0.08
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
produces:
28
10
24
00
00
00
00
00
00
00
00
00
00
00
00
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
.59
.08
.17
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
0.24
0.45
0.02
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
00
52
28
00
00
00
00
00
00
00
00
00
00
00
00
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
04 *
49
02
00
00
00
00
00
00
00
00
00
00
00
00
t
1 .01
0.01
0.16
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.36
0.00
0.01
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.27
0.00
0.06
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.95
0.30
0.14
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
FIGURE 4-7. Expected exceedance output: iterative application.
8T 1 8 O
-------
co
n n a
n it i* i* a C i*nn n 1 t a i* a fr
CASE 4: EXEXS RUN FOR SINGLE-SOURCE ITERATIVE APPLICATION
Standard cone 650.00 ug/m3, background cone 100.00 ug/m3.
Target max expected exceedance (MEE) is 1.000 +/- 0.0500
* (asterisk) In table indicates the max.
Stepl 3: GSD « 1.2000
After 6 iterations, found GH of 1.5812 which produces:
All years all sources MEE = 9.51B1E-01
Expected exceedances by receptor
ring 1 0.18
0.88
0.22
ring 2 0.00
0.00
0.00
ring 3 0.00
0.00
0.00
ring 4 0.00
0.00
0.00
ring 5 0.00
0.00
0.00
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
.24
.29
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
are
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
.02
.21
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
.28
.11
.22
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
.57
.11
.19
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
*; i u v
180
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
iva&x£xMod£lOutDut
receptors, averaging period
1
.24
.45
.03
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
.00
.54
.26
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
0.07
0.45
0.04
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
* 0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1-hour
.95
.02
.15
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
0.37
0.00
0.02
0.00
0.00
0.00
0.00
0.00
0..00
0.00
0.00
0.00
0.00
0.00
0.00
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
28
00
09
00
00
00
00
00
00
00
00
00
00
00
00
0.89
0.28
0.16
0.01
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
FIGURE 4-7. Continued.
87180
-------
One Source-Group Iterative e»ex Model Output
CASE 4: EXEXS RUN FOR S INGLE-SOURCE ITERATIVE APPLICATION
Standard cone 650.00 ug/m3, background cone 100.00 uo/ro3, 180 receptors, averaging period 1-hour
Target max expected exceedance (MEE) is 1.000 +/- 0.0500
Summa ry:
Geometric mean Geometric std dev
1.6156
1.6156
1.5812
1.1000
1.1500
1.2000
HEE Differs from target by
0.9911 -0.0089
1.0121 0.0121
0.9518 -0.0182
FIGURE 4-7. Concluded.
-------
causes slightly higher expected exceedances, and the MEE rate here is 1.01
instead of 0.99 but still within the acceptable range. The next page of
output lists the results from the third GSD of 1.20. Because of the
higher variability of the coal sulfur content, the GM must be smaller to
achieve the same MEE rate. The compliant GM found is 1.58, which produces
a MEE of 0.95, just at the lower bound of the allowable range. The final
page of output from this application summarizes the GMs calculated for the
specified GSDs, the MEE rate they resulted in, and the amount by which
they differ from the target.
4.2.6 Single-Source Probability of Violation Application
The output from this application, shown in Figure 4-8, is similar to that
for the single-source expected exceedance application. In this example
the ExEx System was exercised for 44 receptors for a 24-hour averaging
period. The standard concentration was specified as 365.0 yg/m . Options
specified were for tabular output (LGRID = 2) for individual years (LYRLY
= 1). In the first year the maximum probability of violation (MPOV) was
0.0025. This is rounded to 0.00 in the individual receptor output. An
astertsk next to receptor number 36 indicates that this was the receptor
with a POV of .0025. The second year, 1975, had a MPOV of 0.998. This
probability occurs at the 27th receptor (it rounds to 1.0). The conclud-
ing page of output lists POVs over all years. The MPOV is 0.499. Rounded
to 0.50, this value appears at the 27th receptor. All but two of the
remaining receptors have zero POVs (or values less than 0.005).
4.2.7 Covarying-Sources Probability of Violation Application
This example was run for two sources, each with the same coal sulfur con-
tent distribution. The output is printed in Figure 4-9. POVs were cal-
culated at 36 regularly spaced receptors located along two rings and
spaced at 20 degree intervals. Output was requested for regularly spaced
receptors (LGRID = 1) over all years only (LYRLY = 0). The MPOV occurs at
the 180th degree azimuth on the second ring and equals 1.0. The second
and third highest POVs are 0.38 at the 300th degree azimuth on the first
ring, and 0.2 at the 200th degree azimuth on the second ring.
4.2.8 Independently Varying Sources Probability of Violation Application
Output for an independently varying sources probability of violation
application is illustrated in Figure 4-10. This example was run with 36
regularly spaced receptors for the same two sources run in the covarying
87180 4
75
-------
en
Ex.imple 3, Single Source ISCST run. 24 hr.
Standard cone 365.00 ug/m3, background cone 200.00 ug/m3, 44 receptors, averaging period ?4-hour
' (asterisk) In table indicates the max.
1
Year 1973 all sources MPOV = ?.5000E-03
Probability of Violation by receptor:
123456189
0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10 0.00 0.00 0.00 0.00 0.00 0.00 O.UO 0.00 0.00
20 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
30 0.00 0.00 0.00 0.00 0.00 * 0.00 O.OU 0.00 0.00
40 0.00 0.00 0.00 0.00
Vear 1975 all sources MPOV = 9.9750E-01
Probability of Violation by receptor:
123456789
0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10 0.00 0.0! 0.01 0.00 0.21 0.00 0.00 0.00 0.00
20 0.00 0.00 0.00 0.00 0.00 0.00 * 1.00 0.02 0.00
30 0.00 0.00 0.00 0.00 0.00 0.00 0.00 U.OO 0.00
40 0.00 0.00 0.00 0.00
10
0.00
o.uo
0.00
o.uo
10
0.00
0.00
0.00
0.00
FIGURE 4-8. Probability of violation output: single source
-------
Single Source-Group pov Model Output
Example 3. Single Source ISCST run. 24 hr.
Standard cone 365.00 ug/m3, background cone 200.00 ug/m3,
' (asterisk) In table Indicates tlie max.
All years all sources MPOV - 4.9875F-01
Probability of Violation by receptor:
44 receptors, averjg ing period ?
-------
CO
Single Source-Group pov Mode) Output
Example 1, Covarylng Sources, 24Hrs
Standard cone 36b.OO ug/m3, background cone 200.00 ug/m3.
' (asterisk) In table indicates the max.
36 receptors, averaging period 24-hour
All years all sources MPOV = l.OOOOE+00
Probability of Violation by receptor:
ring 1
ring 2
0.00
0.08
0.00
0.00
0.02
0.01
0.00
0.00
0.00
0.38
0.00
0.00
0.00
0.00
0.00
o.ou
0.00
0.00
0.00
0.00
0.00
0.01
0.00
0.06
0.00
0.00
0.00
0.01
0.00
1 .00
0.10
0.20
0.00
0.04
0.03
0.00
FIGURE 4-9. Probability of violation output: covarying sources.
-------
Example 2, Independent Sources, ?4Hrs
Standard cone 365.00 ug/m3, background cone 200.00 ug/m3, 36 receptors, averaging period 24-hour
* (asterisk) in table indicates the max.
I
All years source-group 1 MPOV = 3.3750E-02
Probabi 1 i ty
ring 1
ring 2
of Violation
0.00
0.00
0.00
0.00
All years source-group
ProbJbi 1 1 ty
ring 1
ring 2
All years
Probabi 1 i ty
ring 1
ring 2
All years
Probabi 1 ity
ring 1
ring 2
of Violat ion
0.00
0.00
0.00
0.00
by receptor:
0.00
0.00
0.00
0.00
2 MPOV
0
0
0
0
.00
.00
.00
.00
0.
0.
0.
0.
00
00
00
00
0
0
0
0
.00
.00
.00
.00
0
0
0
0
.00 'o. oo o.oo o.oo
.00
.00 0.00 0.00 * 0.03
.00
0.00 0.00 0.00
0.00 0.00 0.00
= 1.2500E-02
by receptor:
0.00
0.00
0.00
0.00
all sources HPOV - 5
of Violat ion
0.00
0.02
0.00
0.00
0
0
0
0
.00
.00
.00
.00
0.
0.
0.
0.
00
00
00
00
0
0
0
0
.00
.00
.00
.00
0
0
0
0
.00 0.00 0.00 0.00
.00
.00 0.00 0.00 * 0.01
.00
0.00 0.00 0.00
0.00 0.00 0.00
OOOOf-01
by receptor:
0.00
0.00
0.00
0.00
0
0
0
0
.00
.17
.00
.00
0.
0.
0.
0.
00
00
00
00
0
0
0
0
.00
.00
.00
.00
0
0
0
0
.00 0.00 0.00 0.00
.00
.00 0.00 0.00 * 0.50
.00
0.00 0.00 0.00
0.08 0.00 0.00
SHPOV = 1.6000E-01
of Synerg i st
0.00
0.02
0.00
0.00
1c Violat ion
0.00
0.00
0.00
0.00
0
* 0
0
0
by receptor:
.00
. 16
.00
.00
0.
0.
0.
0.
00
00
00
00
0
0
0
0
.00
.00
.00
.00
0
0
0
0
.00 0.00 0.00 0.00
.00
.00 0.00 0.00 0.08
.00
0.00 0.00 0.00
0.08 0.00 0.00
FIGURE 4-10. Probability of violation output: independently varying sources,
87180
-------
application (Section 4.2.3). Output was requested for individual recep-
tors (LGRID = 1) and over all years (LYRLY = 0). Figure 4-10 shows the
resulting output consisting of four tables. The first lists the POVs for
the first source group. The MPOV was 0.034 for this source group and
occurred at the 180th degree azimuth on the second ring. All other POVs
are zero (i.e., less than 0.005). The second source group has a MPOV of
0.013, which occurs at the same receptor as the first source group.
Again, all other POVs are zero.
The next table lists POVs over all source groups. These are larger than
POVs for individual source groups because of synergistic violations due to
the additive effect of the source inputs. The MPOV here is 0.5 and the
other two nonzero POVs are 0.17 and 0.08. These are lower than was the
case for covarying sources although the source characteristics were the
same. As mentioned in Chapter 2, this is due to the fact that covarying
sources will always have simultaneously high emission rates while indepen-
dently varying sources may not. The final table lists POVs resulting
solely from the synergistic impacts of the sources. The SMPOV (synergis-
tic maximum probability of violation) is 0.16 and occurs at the 300th
degree azimuth on the first ring.
4.2.9 Probability of Violation Iterative Application
The iterative application for POVs is similar to the expected exceedance
application except for the meaning of the output. Example output is shown
in Figure 4-11. This user requested that only one compliant distribution
be found. (In the expected exceedance iterative output example in section
4.2.5, three were requested.) The allowable range for the GM was 1.0 - 35
and the GSD specified was 1.15. The large value of 35 was chosen to
ensure that a compliant GM was found. The target MPOV was 0.12 ± 0.005.
Output is shown in Figure 4-11. After nine iterations the ExEx System
found that a GM of 6.38 produced a MPOV within the target. The actual
MPOV was 0.12 at the 27th receptor. The summary output beneath the recep-
tor output lists the results to five significant digits. It can be seen
that the difference from the target MPOV was -0.0025.
4.3 DIAGNOSTIC MESSAGES
Only a limited amount of error handling is included in the current version
of ExEx; it is largely up to the user to ensure that the system is being
properly applied. Five general types of errors are recognized in the cur-
rent version.
87180 4r
80
-------
00
One Source-Group Iterative pov Model Output
txample 4, Iterative Mode , single source ISCST. 24 hr.
Standard cone 365.00 ug/m3, background cone 20.00 ug/m3,
Target max probability of violation is 0.120 +/- 0.0050
(asterisk) tn table Indicates the max.
Step* 1: GSD = 1.1500
After 9 Iterations, found GH of 6.3789 which produces:
All years all sources HPOV = 1.17SOC-01
Probability of Violation by receptor:
44 receptors, averaging period 24-hour
1
0
10
20
30
40
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
7
0.00
0.00
0.12
0.00
8
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
10
0.00
0.00
0.00
0.00
Summary:
Geometric mean Geometric std dev
1 6.3789 1.1500
MPOV Differs from target by
0.1175 -0.0025
FIGURE 4-11. Probability of violation output: iterative application,
87180
-------
1. Values in the input parameter file exceed limits set in the ExEx
program code.
2. Values in the dispersion model output exceed limits set in the
ExEx Program code.
3. Values in the input parameter file are invalid for the type of
variable (for example, GSD < 1.0 is not valid).
4. Values in the input parameter file are inconsistent with values
in the dispersion model file.
5. Warning messages.
ExEx error messages may appear in two different places~in the run log
(e.g., the system command log in batch jobs) and in the output file. The
message in the run log will include the name of the subroutine that ExEx
was running when execution halted. The message in the output file will
usually be self-explanatory. The following supplemental discussion
elaborates on each warning and error message recognized by ExEx.
4.3.1 Input Variable Values Exceed Limits Set in ExEx
When the value of an input variable exeeds the limit set in ExEx, the
general remedy is simply to set the variable in question to a value that
is supported by ExEx. The limits that have been set for these variables
represent the highest values they are expected to take in normal applica-
tions of the ExEx System.
Run Log Message: STOP. Getlnp: NSIM > max
Output Message; ERROR! Max fsimulations is MSIM = 1999
Explanation: This error was reached in subroutine Getlnp. NSIM is
the number of simulations to perform for each meteorological year.
Each simulation redraws a year of emission values from the emissions
distribution. Currently the maximum number of "sample-years" the
program can accept is 1999. This error message will be encountered
only when ExEx is operating in the multiple-source or POV applica-
tion. If ExEx is operating in the single-source or covarying-sources
application, it will ignore this value since these two applications
employ an analytical procedure.
87180 4
82
-------
Run Log Message: STOP. Getlnp - OUTOPT is invalid
Output Message: Error, valid outopt values are 0,1,2
Explanation: This error was reached in subroutine Getlnp. OUTOPT is
the option to calculate and print expected exceedances only (OUTOPT =
0); probability of violation only (OUTOPT = 1); or both expected
exceedances and probability of violation (OUTOPT = 2). If any other
number has been entered for this variable, this error message will
result.
Run Log Message: STOP. SetUp: IGROUP > max
Output Message; ERROR! The highest source group# allowed is MGRP = 6
Explanation: This error was reached in subroutine SetUp. ExEx can
handle a maximum of six sources and six source groups. If there are
six source groups they must have only one source apiece in them. If
a number greater than six was entered for the group number on "card"
7_of the input parameter file, this error message will be printed.
Run Log Message; STOP. Getlnp: NSRC > max
Output Message: ERROR! Max # emission sources is MSRC = 6
Explanation; Too many emission sources have been specified.
Run Log Message; STOP. Getlnp: IAVPER is invalid
Output Message: ERROR! Allowed averaging periods are 1 or 3 or 24 hours
Explanation: A number other than 1 or 3 or 24 has been entered in
the position for averaging period.
Run Log Message: STOP. Getlnp: LGRID is invalid
Output Message: ERROR! Options to print ex-ex and/or pov by receptor are
LGRID=0,1,2,9
87180 4
83
-------
Explanation; The only valid choices for this option are
0 = do not print expected exceedances by receptor
1 = print expected exceedances by receptor on regularly spaced
grid
2 = print expected exceedances by receptor on tabular grid
9 = print expected exceedances by receptor on grid type speci-
fied in the disperion model. (If the dispersion model used
Cartesian, output will be in the tabular format described in
Section 3.3.5.)
Use of any other value for GRID will result in this message.
Run Log Message: STOP. Getlnp: LYRLY is invalid
Output Message: ERROR! Options to print yearly output are LYRLY =0,1
Explanation: The user can specify the option to print output
separately by each year or not. There are no defaults, so the only
valid values are 0 and 1.
Run Log Message; STOP. Getlnp: NYEAR > max
Output Message: ERROR! Max lyears (Idatafiles) is MYEAR = 6
Explanation: ExEx is programmed to handle a maximum of six meteoro-
logical years of dispersion model results. Each year of results con-
stitutes a data file for input to the ExEx System.
Run Log Message: STOP. Getlnp: IVARY is invalid.
Output Message: ERROR! Options to vary QGM to find QGSO or vice versa
are LVARY=1,2.
Explanation; QGM is the internal variable name for the geometric
mean; QGSD is the internal variable name for geometric standard devi-
ation. IVARY is an option for single-source iterative mode. When
IVARY is 1, ExEx will use certain user-specified values for the GM
and find a GSD that results in a target expected exceedance rate.
87180
-------
When it is 2, GSD takes on a series of values and different GMs are
found that result in a target expected exceedance rate. The only
valid values for IVARY are 1 or 2.
Run Log Message; STOP. Getlnp: NQ1 > max
Output Message: ERROR! Max #steps (of varying) QGM or QGSD is MQ = 20
Explanation: NQ1 is the number of user-specified values that ExEx
will use while calculating the GM or GSD in iterative mode. The
maximum number is currently set at 20.
4.3.2 Preprocessed Dispersion File Values Are Not
Compatible with Preset Values in ExEx
Run Log Message; STOP. Getlnp: NREC (from data file) > max
Outputs Message; ERROR! Max #receptors is MREC = 200
Explanation: This problem should occur only when the dispersion
model results are from ISC, since CRSTER and MPTER accept only 180
receptors. In ISC output, the dispersion output may have concentra-
tions for more than 180 receptors. The maximum number of receptors
ExEx is programmed to handle is 200.
Run Log Message: STOP. ChkDat: Invalid receptor grid type in data file
Output Message: ERROR! Valid receptor grid types are 1 & 2
Explanation: If this message occurs it is likely that something is
wrong with the dispersion model results. The preprocessor would not
have executed if no receptor type was specified.
Run Log Message: STOP. Datal, Data23: Save-buffers overflow
Output Message: ERROR! #Conc data to be stored and processed exceed
number user has entered as buffer size. (The max this
system can handle)
87180 » 85
-------
Explanation: The dispersion model data files are too large for the
user's system. The user may not have screened out enough of the con-
centrations to allow ExEx to handle the file size. If this is the
case, the value of GM, GSD, or GSDCUT input parameters will have to
be reduced. In most cases using a smaller value of GSDCUT (e.g., 4
instead of 6) will be sufficient without unduly affecting the
accuracy of the results (see EPA, 1988). Alternatively, the default
buffer size (specified in parameter MBSAVE in the program code) can
be made larger by changing the value for MBSAVE in the program
itself.
4.3.3 Values in the Input Parameter File
Invalid for the Type of Variable
This type of error can be fixed by adjusting the variable value to a valid
one.
Run Log Message: STOP. ChkDat: Iperiods in data file does not match the
- - year
Output Message; ERROR! #periods does not match the year in data file (1-6)
Explanation; The number of averaging periods (e.g., hours or days) for
which normalized concentrations (obtained from a dispersion model)
appear in the ExEx input data file does not correspond to the number of
such periods expected in a full year of data (e.g., 8760 or 365 for a
non-leap year). This message usually appears because dispersion model
results for a leap year were confused with those for a non-leap year.
The values of ExEx input parameter IYEAR should be checked carefully.
They must correspond to the actual years for which the dispersion model
was exercised. This message may also appear if the dispersion model
was not run for an entire year. ExEx can only accept a full year of
dispersion model results. Applying the ExEx methodology to less than a
year's data may yield inaccurate results.
Run Log Message: STOP Getlnp, SetUp: QGM < = 0.0
Output Message: ERROR! Coal sulfur content GM must be greater than 0.0
Explanation; Coal cannot have a negative or zero sulfur content.
87180 4r 86
-------
Run Log Message; STOP Getlnp, SetUp: QGM < = 1.0
Output Message; ERROR! Coal sulfur content GSD must be > 1.0
Explanation; It is not possible to have a geometric standard deviation
of 1 or less.
Run Log Message; STOP SetUp; QGM,QGSD,GSDCUT within a group are inconsis-
tent
Output Message; ERROR! Coal sulfur content data within a source group are
inconsistent
Explanation; All sources in a source group must have the same sulfur
content distribution.
4.3.4 Values in the Input Parameter File Contradict
Values in the Dispersion Model Results
This type of error can be fixed by checking certain values used in the dis-
persion model, such as the years of meteorological data or the number of
receptors. The numbers entered in the input parameter file must match
these.
Run Log Message; STOP. ChkDat: Year in user input <> year in data file
Output Message; ERROR! The year in input does not match data in file.
Explanation; ExEx compares the years entered by the user in the input
parameter file to the years it reads from the dispersion model output
files generated by the preprocessor. If they are not the same, ExEx
prints this message.
4.3.5 Warning Messages
WARNING! The max I converging iterations allowed to estimate target is
99.
87180 4
87
-------
Explanation; This message applies to the iterative model application
only. ExEx could not find a value for the requested parameter (either
GM or GSD) after 99 iterations. A likely cause for this is if the user
has specified a range of values that, given the fixed parameter(either
GSD or GM, respectively), cannot result in the target MEE rate.
WARNING! Chi/Q min value used (by preprocessor) to screen the cone data
is > the value calculated here. This may cause underestimation of
expected exceedances.
The calculated Chi/Q min value is CZERO =
Explanation: As described in Section 3.2.1, both the ExEx preprocessor
and the ExEx program itself screen out small concentrations. The pre-
processor "prescreens" the dispersion model results to reduce the size
of the data files handled by ExEx. The ExEx program screens out all
concentrations unlikely to result in an exceedance since they do not
need to be included in the calculations. The ExEx program calculates
the minimum concentration (x/Q)mi-n that is likely to cause an exceed-
ance and compares this to the value the preprocessor used. If the pre-
processor screened out values larger than (x/Q)mini this message will
be printed. To insure accurate results, it is necessary to rerun the
preprocessor with a smaller screening value.
87180
-------
EXAMPLES
This chapter presents examples of the eight basic applications of the ExEx
System. The examples serve three purposes: (1) to illustrate typical
applications of the ExEx System; (2) to provide examples of input and cor-
responding output files; and (3) to provide a means for the ExEx user to
verify the proper operation of the ExEx System on a particular computer.
In regard to this last purpose, any attempts to duplicate the ExEx output
from the example cases shown in this chapter should make use of the same
normalized concentration (x/q) data file as was originally used in devel-
oping the examples. This file will be supplied on the same magnetic tape
as the ExEx System code. All examples provided include a discussion of
the preprocessor run (detailed only for single-source and covarying-
sources expected exceedance examples), a print-out of the input to the
ExEx program, and a print-out of the output that resulted from the
inputs. Some discussion of the proper interpretation of the results is
also included. Abbreviations will be used throughout for maximum expected
exceedance rate (MEE), probability of violation (POV) and maximum
probability of violation (MPOV).
Although each application can be used with any of the three averaging per-
iods, for the purposes of the examples presented here a 1-hour averaging
period is used in discussions of the expected exceedance applications, and
a 24-hour averaging period for the probability of violation examples.
5.1 SINGLE-SOURCE EXPECTED EXCEEDANCE EXAMPLE
As part of the analysis for a 1500 MW coal-fired power plant with one
stack, the dispersion model MPTER has been exercised with three years of
meteorological data. MPTER has calculated 1-hour concentrations for an
array of 180 receptors placed every 10 degrees around five concentric
rings centered on the stack. The rings are located at radial distances of
1, 2, 4, 8, and 16 km. The stack characteristics are as follows:
Stack height: 300 m
Stack diameter: 10.5 m
Exit velocity: 24.4 m/s
Exit temperature: 405 K
89
-------
The coal currently used by the plant has a GM coal sulfur content of 5.50
Ib S02/MMBtu and a GSD of 1.15. The ambient standard concentration to be
analyzed is 650 yg/nr and the background concentration in the vicinity of
the plant is 100 yg/m3. (These are hypothetical values used for purposes
of illustration only.)
5.1.1 Preprocessor Run
The preprocessor must be run once for each of the three years of disper-
sion model results. The inputs required are a disk file of normalized
concentrations from one of the years of meteorological data (assigned to
file unit 13), the name of the dispersion model used to estimate the con-
centrations (MPTER, in this case), the averaging period (1 hour, in this
case), and the prescreening value to use to screen out small concentra-
tions (all in a file assigned to file unit 11). The value for CCUT is
calculated as described in Section 3.1.3:
_ a = QGM(QGSD)6 = 5.5(1.15)6 = 5.5(2.313) = 12.72
CCUT = 10~6(CSTD - CBACK)/N(Qmav)
fflclX
= 10~6(650 - 100)/(1)(12.72)
= .000550/12.72 = 4.3 x 10"5
Since subsequent use of the preprocessed files for future ExEx runs is a
possibility, the CCUT input to the preprocessor is made smaller than the
value calculated above to ensure compatibility with future ExEx runs.
Thus the value chosen for CCUT is 1.0 x 10~5. This leaves room for the
analysis of higher background concentrations, higher sulfur coal, or coal
with a larger GSD. The input parameter file for the preprocessor is as
follows:
Line Variable(s) Entry
1 TITLE Preprocessor Run 1
2 MODEL MPTER
3 IYEAR,IAVPER,CCUT 1971,1,0.00001
4 MOPT21,MOPT23,INGRD, 1,0,1,1,5
INSRC.INX
87180 7
90
-------
The preprocessor was run once for each of the three years of meteorologi-
cal data. The input parameter file was the same for each run, except that
the entry for TITLE and IYEAR was changed.
5.1.2 ExEx Run
The three years of preprocessed MPTER results are assigned to FORTRAN
logical file units 14, 15, and 16. The input parameter file is assigned
to file unit 11. Values of variables in the parameter file used for this
run are illustrated in Table 5-1. The actual file is reproduced in Figure
5-1. LGRID is set to 1, for printing results on regularly spaced recep-
tors; LYRLY is set to 0, for printing results over all meteorological
years but not individual years, and OUTOPT is set to 0, to calculate and
print expected exceedances only. The output is listed in Figures 5-2
through 5-4. The first page of output (Figure 5-2) lists the values of
parameters from the input parameter file. Near the bottom of the page is
a boxed message identifying the run as being a single source group run.
The se^ondjjage (Figure 5-3) lists pertinent information from the files of
preprocessed dispersion model results, such as the title of the dispersion
model run, the year modeled, the number of sources, the number of averag-
ing periods, the receptor grid type, the number of receptor radii, and the
cut-off value used in the preprocessor for screening out small concentra-
tions. Regularly spaced Cartesian or polar receptors will be identified
as polar in this output. All discrete receptors will be identified as
tabular. The number of radii refers to the number of azimuths.
At the bottom of the second page the results of the data screening are
listed. The cut-off value calculated by ExEx is 4.32 x 10~5 g/m3 in this
example. Out of the 27,881 concentrations in the preprocessed (x/q)
files, only 8,369 were greater than or equal to the cut-off value.
The third page of output lists the ExEx results (see Figure 5-4). The
largest expected exceedance over the entire receptor grid is 18.51. This
is observed at the 150° azimuth on the second innermost (2 km) ring. In
other words, the results show that the greatest exceedance rates occur 2
km from the plant when the wind is blowing to the north and west. The
area of least impact is located on the outermost (16 km) ring.
The ExEx run in this example took approximately 4 CPU seconds to run.
87180 7r
-------
TABLE 5-1. Input
Summary format is
parameter file for single-source expected exceedance example.
listed-directed/free format (except for character strings).
Record Variable
Description
Assigned
Value
TITLE Title of run (A80)
CSTD A comparison air quality standard (yg/m ).
CBACK Background concentration (yg/m3).
NSIM Number of sample years to generate for
each meteorological year. Not used in single-
source expected exceedance applications.
NSRC Number of emission sources.
IAVPER- Averaging period (1, 3, or 24 hours).
LGRID Option to print results for individual
receptors: 0 = do not output individual
receptors, 1 = output results on regular
grid receptors, 2 = output results on
tabular grid receptors.
LYRLY Option to calculate and print results for
individual meteorological exceedances:
0 = no yearly output, 1 = output results
for individual meteorological years as well
as well as averages over all years.
OUTOPT Option to calculate and print expected
exceedances (OUTOPT = 0), probabilities
of violation (OUTOPT = 1), or both
(OUTOPT = 2).
NYEAR Number of meteorological years (number of
data files).
IYEAR( ) The years of data, in the order of the
specified data files.
SNAME Source name (A20).
Case 1: ExEx run
for single-source
application
650.0
100.0
1
1971, 1972, 1973
Source A
Continued
87180
92
-------
TABLE 5-1. Concluded.
Record Variable
Description
Assigned
Value
ISRC Source number (maximum two digits), does not 1
have to be ordered.
IGRP Source-group number, does not have to be 1
ordered.
QGM Emission sulfur content geometric mean 5.5
(Ib S02/MMBtu).
QGSD Emission sulfur content geometric standard 1.15
deviation.
GSDCUT Number of GSDs above GM where the distribu- 6.0
- - tion is truncated. A value of 6 is recommended.
RHO Autocorrelation coefficient (ignored in 0.95
calculating expected exceedances).
87180
93
-------
CASE 1: fXFXS RUN FOR SINGlF-SOURCF APPLICATION
CASE 1: EXEXS RUN FOR SINGLC- SOURCE APPLICATION
650. I HO.
1 1 1
I U I)
3 10/1 1972 1973
SOUHCE A
I I 5.50 1.15 6.0 0.95
Pago
FIGURE 5-1. Example of single-source expected exceedance application: input parameter file.
-------
cn
Page
EXPECTED EXCEEOANCES SYSTEM
ExExs V3.01 01-JANJs8
IBM TSO F77 VERSION
SYSTEMS APPLICATIONS. INC.
Date I time of run: MON. JAN 11 1988 10:19:14
User Input Information
Title of run
Comparison standard concentration (ug/m3)
Background concentration (ug/ml)
I simulations per year
I emission sources
Averaging period (hours)
Output Opt ion
Years of requested dispersion results
CASE 1: EXEXS RUN FOR SINGLE-SOURCE APPLICATION
650.00
loo.no
1
1
1
0
1971 197Z 1973
Options activated:
Print expected exceedances on polar grid receptors
Output all-years result only
Coal Sulfur Content Distribution:
Sourcel Groupl Source name
1 1 SOURCE A
Geometric mpan
( Ib S02/HHBtu)
5.50
Geometric std diw *GSD to max Autocorrelation co-ef
1.15
0.0
0.95
! Model is run in Single Source-Group mode, i.e.
! expected exceedances are calculated analytically
! (no Monte-Carlo simulation is performed).
FIGURE 5-2. Example of sinqle-source expected exceedance application: page 1 of output
(Output may be in upper or Tower case, depending on the computer system.)
87180
-------
UD
cn
01sperston-Model-Results Data Information
Dot ,if i les Headers :
Title of Dispcrsion-Model-Result data
Year modeled
* sources
* receptors
I a vi'r.iq i ng per i ods
Receptor grid type (1-pol ar .? = tabu1ar)
* radii or x-d-trect Ion receptors
(iit-uff value used in preprocessor (g/m3)
Title of Dispersion-Model-Resu1t data
Year modeled
I sources
* receptors
I averaging periods
Receptor grid type (l=polar,2=tabular)
* radii or x-direction receptors
Cut-off value used in preprocessor (g/m3)
Title of Dispersion-Model-Result data
Year modeled
I sources
I receptors
* averaging periods
Receptor grid type (l=polar,?=tabular)
I radii or x-direction receptors
Cut-off value used in preprocessor (g/m3)
CHI/Q PRE-PROCESSED DATA I OR SINliLE SOURCE
180
87bO
]
36
1.OODOE-05
CHI/0 PRE-PRDCESSCD DATA FOR SINGLE SOURCE
1972
1
180
8784
1
36
1 .OOOOE-05
CHI/Q PRE-PROCESSED DATA I-OR SINGIE SOURCE
1973
1
180
8760
1
36
1.OOOOE-05
Data Screening Result:
Lowest concentration that may cause exceedance is (X/Q)min = 4. 3Z3274E-05 g/m3.
Filel Year Iconc in datafile
1 1971 9691
? 1972 9200
3 1973 8087
Total 27881
Iconc > (X/Cj)min
2984
272b
26b9
8369
FIGURE 5-3. Example of single-source expected exceedance application: page 2 of output,
-------
CASC 1: EXEXS
RUN FOR
Standard cone 650.00
' (asterisk) in table
All years all
Source-Gi
SINGLE-SOURCE APPLICATION
ug/m.1, background
Indicates the max.
sources NEC - 1.
Expected exceedances
ring 1
ring 2
ring 3
ring 4
ring 5
2.39
4.69
0.6?
5.28
13. 86
5.35
1.70
1.22
2.0}
0.09
0.09
0.10
0.00
0.00
0.00
by receptor
2.16
3.74
0.60
6.55
17.56
5.36
2.29
6.76
2.07
0.11
0.28
0.21
0.00
0.00
0.00
8506E+01
are
2.84
2.62
0.63
6.23
* 18.51
7.40
1.33
5.92
3.40
0.26
0.04
0.03
0.00
0.00
0.00
cone 100.00
2.74
1.68
1.42
7.22
11.19
5.93
4.52
5.10
2.90
0.24
0.19
0.06
0.00
0.00
0.00
ug/n3.
2.61
2.17
1.37
9.19
7.66
6.70
4.27
2.65
3.27
0.04
0.02
0.00
0.00
0.00
0.00
180 receptors, averaging period 1-hour
1
2.07 ,1.58 2.96 3.49 4.08
3.19 '3.56 2.39 1.02 0.01
1.61 1.19 1.34 0.50 1.06
8.84 7.22 6.67 13.17 10.17
9.35 6.22 3.31 1.15 3.67
10.43 7.73 9.10 7.60 4.70
5.33 4.15 2.15 4.18 3.08
2.71 2.43 1.17 0.24 1.65
4.66 2.88 2.92 2.64 1.07
0.07 0.18 0.03 0.31 0.04
0.01 0.05 0.0? 0.04 0.11
0.27 0.14 0.05 0.28 0.13
0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00 OJ30
0.00 0.00 0.00 0.00 0.00
3.93 5.71
0.60 0.68
1.44 2.32
12.72 16.02
5.11 7.16
7.53 7.43
6.69 8.56
2.25 3.33
1.63 2.33
0.12 0.12
0.02 0.01
0.06 0.15
0.00 0.00
0.00 0.00
0.00 0.00
FIGURE 5-4. ExEx single source application output.
87180
-------
5.2 COVARYING-SOURCES EXPECTED EXCEEDANCE EXAMPLE
As part of the air quality impact analysis for a 600 MW coal-fired power
plant with two stacks, the dispersion model MPTER has been exercised with
three years of meteorological data. For each stack MPTER has calculated
individual source contributions to 1-hour concentrations for 180 receptors
located every 10° around five concentric rings centered on the stacks at
radial distances of 0.5, 1.0, 2.0, 4.0, and 8.0 km. The individual stack
characteristics are as follows:
Stack One Stack Two
Stack height 75.9 m 75.9 m
Stack diameter 7.25 m 6.90 m
Exit velocity 15.8 m/s 14.6 m/s
Exit temperature 386.5 K 367.0 K
The coal currently used by the plant has a coal sulfur distribution with a
6M of 2.85 Ib S02/MMBtu and a GSD of 1.05. The ambient standard concen-
tration to be analyzed is 650 yg/m ; the background concentration in the
vicinHy of- the plant is 100 yg/m , the same as those used in the single
source example. In this example the sources are treated as covarying
(i.e., as if the same randomly sampled coal sulfur content is used for
each source).
5.2.1 Preprocessor Run
Most inputs for the preprocessor are the same as for the single-source
example except that INSRC is now 2 and a different value of CCUT is
used. The dispersion model used was MPTER and the averaging period is the
same as for the single-source example. The value for CCUT is calculated
as described in Section 3.1.3:
Qmax = WQGSD)6 = 2.85(1.05)6 = 2.85(1.34) = 3.82
CCUT = 10"6(CSTD - CBACK)/N(Qmav)
max
= 10"6(650 - 100)/2(3.82)
= .000550/7.64 = 7.2 x 10'5 g/m3.
Again, since the same preprocessed files may be used for future ExEx runs,
the CCUT input to the preprocessor is made smaller to ensure compatibility
871807
-------
with future runs. Thus, the value chosen for CCUT is 7.2 x 10~5. The
preprocessor is run once for each of the three years of meteorological
data. The input parameter file is the same for each run, except that the
year of dispersion model results is different. This file is assigned to
file unit 11.
5.2.2 ExEx Run
The three years of preprqcessed MPTER results are assigned to units 14,
15, and 16. The input parameter file is assigned to file unit 13. Values
used for variables in the input parameter file are listed in Table 5-2.
The input parameter file used for this run in illustrated in Figure 5-5.
Note that the two sources are both in the same source group. This signals
the ExEx system that they are to be treated as covarying. To illustrate
the tabular receptor grid option, LGRID has been set to 2 and LYRLY has
been set to 1. This will cause expected exceedances to be printed for
receptors displayed in a tabular format for individual meteorological
years as well as over all meteorological years. OUTOPT has been set to 0,
to calculate and print expected exceedances only.
The output is listed in Figures 5-6 through 5-8. The first and second
pages of output contain the same type of information as in the single-
source example (Figures 5-2 and 5-3). The lowest concentration that is
likely to cause an exceedance is 1.44 x 10 ; 3499 concentrations greater
than this value are present in the x/q files.
The output lists expected exceedances at each receptor for all three years
of meteorological data as well as for the entire meteorological record.
The receptors are numbered by the dispersion model and listed in this
order in the output 10 at a time across the page. The first 10 constitute
the first line of output, receptors 11-20 are listed in the second line of
output, and so forth. For 1973 the MEE is 39.83 at receptor number 77;
for 1974 it is 23.38, at the same receptor; and for 1975 it is 32.43,
again at receptor number 77. Over all years in the record the MEE is
31.88, also at receptor number 77.
The ExEx program took approximately 4 CPU seconds to run this example.
5.3 INDEPENDENTLY VARYING SOURCES EXPECTED EXCEEDANCE EXAMPLE
Continuing the analysis for the two-stack plant examined in the previous
example, it is decided that a more realistic treatment of the emissions of
the two stacks would be to treat the sources as being independent of one
another (i.e., as if a separate randomly sampled coal sulfur content is
87180 7^ gg
-------
TABLE 5-2. Input parameter file for covarying-sources expected exceedances
example. Summary format is listed-directed/free format (except for character
strings).
Record Variable
Description
Assigned
Value
TITLE
CSTD
CBACK
NSIM
NSRC
IAVPER
L6RID
LYRLY
OUTOPT
NYEAR
IYEAR( )
SNAME
Title of run (A80).
Comparison air quality standard (yg/m ).
Background concentration (yg/nr).
Number of sample years to generate for
each meteorological year. Not used in
covarying-source expected exceedance
applications.
Number of emission sources.
Averaging period (1, 3, or 24 hours).
Option to print results for individual
receptors: 0 = do not output individual
receptors, 1 = output expected exceedances
on polar grid receptors, 2 = output results
on tabular grid receptors.
Option to calculate and print results for
individual meteorological years: 0 = no
yearly output, 1 = output results for
individual meteorological years as well
as averages over all years.
Option to calculate and print expected
exceedances (OUTOPT = 0), probabilities
of violation (OUTOPT = 1), or both (OUTOPT = 2).
Case 2: ExEx run
for covarying-
sources applica-
tion
650.0
100.0
1
2
1
2
Number of meteorological years (number of
data files).
The years of data, in the order of the
specified data files.
Source name (A20).
1973, 1974, 1975
Source B
Continued
100
-------
TABLE 5-2. Concluded.
Record Variable
7 ISRC
IGRP
QGM
QGSD
GSDCUT
RHO ~
8 SNAME
9 ISRC
IGRP
QGM
QGSD
GSDCUT
RHO
Description
Source number (maximum two digits), does not
have to be ordered.
Source-group number, does not have to be ordered.
Emission sulfur content geometric mean
(Ib/MMBtu).
Emission sulfur content geometric standard
deviation.
Number of GSDs above GM where the distri-
bution is truncated. A value of 6 is recom-
mended .
Autocorrelation coefficient (ignored in
calculating expected exceedances).
Name of source.
Source number.
Source-group number.
Geometric mean.
Geometric standard deviation.
Number of GSDs above GM where distribution
is truncated.
Autocorrelation coefficient (ignored in
calculating expected exceedances).
Assigned
Value
1
1
2.85
1.05
6.0
0.95
Source C
2
1
2.85
1.05
6.0
0.95
101
87180
-------
o
IX)
CAST 2: CXCXS RUN FOR COVARYING SOURCES APPLICATION
CAST ?: fXFXS RUN FOR COVARYINU SOURCES APPLICATION
650. 100.
I ? I
2 1 0
.1 l?n 1974 1975
SOURCE B
I I ?.8b 1.05 6.0 0.95
SOURCE C
2 1 ?.85 1.05 6.0 0.95
Page
FIGURE 5-5. Example of expected exceedance covarying application: input parameter file.
-------
o
CO
tXPECHO EXCEEDANCES SYSHH
ExExS V3.01 01-JAN-P8
IBM TSO F77 VERSION
SYSTEMS APPLICATIONS, INC.
Date & time of run: MON. JAN 11 1988 10:25:29
User Input Information
Title of run
Comparison standard concentration (ug/m3)
Background concentration (ug/m3)
I simulations per year
I emission sources
Averaging period (hours)
UutpuF Option
Years of requested dispersion results
CASE 2: EXEXS RUN FOR COVARVING SOURCES APPLICATION
650.00
100.00
1
1
0
1973
1974 1975
Options activated:
Print expected exceedaiices on tabular grid receptors
Output both yearly and all-years results
Coal Sulfur Content Distribution:
Sourcel Group* Source name
SOURCE B
SOURCE C
Geometric mean
(Ib S02/MM8tu)
2.85
2.85
Geometric std dev IGSD to max Autocorrelation co-ef
1 .05
1.05
6.0
6.0
0.95
0.95
! Model Is run in Single Source-Group mode, i.e.
! expected enceedant.es are calculated analytically
! (no Monte-Carlo simulation is performed).
FIGURE 5-6. Example of expected exceedance covarying application: page 1 of output.
87180
-------
0 I spers ion-Model -Resul ts DJla I iif ormat ton
Datafiles Headers:
Title of 01spersion-Model-ResuIt data
Year modeled
* sources
I receptors
f averaging periods
Receptor grid type (1 = po1ar ,2 = 1abuIar)
f radii or x-dlrectlon receptors
Cut-off value ust>d in preprocessor (g/m3)
Title of Dispers Ion-Model -Result data
Year modeled
I sources
I receptors
I averaging periods
Receptor grid type (l=polar,2 = tabular)
I radii or x-directlon receptors
Cut-off value used In preprocessor (g/«3)
Title of Dispersion-Model-Result data
Year modeled
f sources
I receptors
I averag i ng periods
Keceplor grid type (1=polar,2=tabular)
* radii or x-dlrectlon receptors
Cut-off value used In preprocessor (g/m3)
CHI/0 PRE-PROCESSED DATA FOR MULTIPLE SOURCE
1973
180 '
8760
1
36
1.5000E-05
CHI/0 PRE-PROCESSED DATA FOR MULTIPLE SOURCE
1971
2
ISO
8760
1
36
1.5000E-05
CHI/0 PRE-PROCESSED DATA FOR MULTIPLE SOURCE
1975
2
180
8760
1
36
1.5000E-05
Data Screening Result:
Lowest concentration that may cause exceedance Is (X/Q)min
fconc
1 . 440065E-04 g/m3.
File! Year iconc in dataMle
1 1973 ??106
2 1974 22034
3 1975 21794
Total 65934
X/Q min
1116
1143
1240
3499
FIGURE 5-7. Example of expected exceedance covarying application: page 2 of output.
-------
o
en
Single Source-Group exex Model Output
CASC 2: EXEXS RUN FOR COVARYING SOURCES APPLICATION
Standard cone 650.00 ug/mJ, background cone 100.00 ug/m3.
* (asterisk) tn table indicates the max.
Tear 19/3 all sources MEE = 3.9825E+01
expected exceedances by receptor are
0
10
20
30
40
50
60
70
80
90
100
110
120
130
140
IbO
160
1/0
Tear 1974 all sources HEE = 2.3382£*01
Expected exceedances by receptor are
0
10
?0
30
40
50
bO
70
80
90
100
110
120
130
140
150
100
170
180 receptors.
I
averaging period 1-hour
10
0.00
0.00
0.00
0.00
4.00
2.00
0.00
2.00
5.73
3.61
2.58
1.70
0.53
0.38
0.00
0.00
0.00
O.UO
0.00
0.00
0.00
0.00
2.00
1.00
0.00
2.00
7.06
0.00
4.38
6.43
0.88
0.10
1.22
0.00
0.00
0.00
0.00
0.00
0.00
0.00
3.00
v 0.00
0.00
2.74
5,05
1.00
2.04
8.08
0.00
2.49
2.26
U.UO
0.00
0.00
0.00
0.00
0.00
0.00
4.00
0.00
0.00
8.58
7.66
0.04
2.46
3.41
0.42
0.08
2.19
0.50
0.00
0.00
0.00
0.00
0.00
0.00
4.00
0.00
1.00
5.03
7.21
0.92
1.59
1.76
0.21
2.31
0.00
0.00
0.00
O.OU
0.00
0.00
0.00
0.00
3.00
0.00
1.00
25.90
6.84
2.70
1.36
2.10
0. 16
1 .54
0.00
O.UO
0.00
0.00
0.
0.
0.
2.
2.
0.
3.
* 39.
2.
2.
6.
1.
0.
0.
0.
0.
0.
0.
00
00
00
43
00
UO
06
83
49
06
85
79
42
07
02
00
00
00
0.
0.
0.
1 .
2.
0.
3.
23.
4.
2.
6.
3.
0.
0.
0.
0.
0.
0.
00
00
00
00
00
00
00
23
44
26
66
47
05
19
00
00
00
00
0.00
0.00
0.00
2.87
2.00
0.00
2.80
3.92
2.31
2.96
1.00
2.21
0.00
0.52
0.01
O.UO
0.00
0.00
0.00
0.00
0.00
2.00
2.00
0.00
0.43
7.55
0.94
3.69
1.43
0.80
0.51
0.08
0.00
0.00
0.00
0.00
10
0.00
0.00
0.00
0.00
4.51
1.00
1.00
1.00
12.21
1.59
1.98
0.85
2.01
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
3.00
0.43
1.92
3.00
6.17
2.10
6.09
3.00
1.10
0.05
0.46
0.00
0.01
0.00
0
0
0
0
1
1
4
2
6
0
5
6
0
0
0
0
0
0
.00
.00
.00
.00
.00
.00
.00
.28
.45
.00
.27
.92
.11
.31
.00
.00
.UO
.00
0.00
0.00
0.00
0.00
2.00
1.00
4.00
3.29
4.00
0.14
4.17
6.39
0.90
0.96
1.45
0.00
0.00
0.00
0.00
0.00
0.00
0.00
3.70
2.00
5.03
5.11
5.43
0.01
3.77
4.31
1.12
1.77
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
3.27
1.00
3.98
19.77
16.46
0.01
4.45
2.21
2.43
0.95
0.00
0.00
0.00
0.00
0.
0.
0.
4.
1.
1.
2.
* 23.
1 .
0.
0.
1.
0.
0.
0.
0.
0.
0.
00
00
00
00
93
00
35
38
49
23
24
50
03
70
00
00
00
00
0
0
0
3
0
1
0
22
8
0
3
i
L
0
0
u
0
0
0
.00
.00
.00
.00
.41
.00
.00
.05
.28
.49
. 12
.02
.02
.01
.75
.00
.00
.00
0.00
0.00
0.00
2.00
1.43
1.00
0.00
10.40
7.08
4.29
2.00
1.49
0.47
0.24
0.00
0.00
0.00
0.00
0.00
0.00
0.00
4.00
2.00
1.00
0.00
14.98
5.87
1.07
0.40
1.04
0.00
0.02
0.00
0.00
0.00
0.00
.
FIGURE 5-8. Example of expected exceedance covarying application: output of results,
87180
-------
o
en
CASE 2: £XfXS RUN FOR COVARYING SOURCES APPI.IC
Sljnd.ird cunc 650.00 ug/m3, Lai Lgrouud cone
' (asterisk) in table indicates the max.
Year 1975 all Sources MCF - 3.2425E+01
(peeled exceedances by receptor are
0
111
20
30
40
50
60
70
80
90
100
1 10
120
130
14U
IbO
160
170
1
0
0
0
0
8
4
2
4
9
2
3
1
3
0
1
0
0
0
00
00
00
00
25
80
00
56
51
12
83
69
50
02
Ob
00
00
00
2
0.00
0.00
0.00
0.00
9.91
3.98
2.00
2.05
7.34
3.45
2.79
3.11
0.95
1 .29
1.91
0.03
0.00
0.00
3
0.00
0.00
0.00
0.00
7.00
3.0U
1.98
2.97
13.25
1 .81
6.62
6.42
0.90
0.37
0.82
0.00
0.00
0.00
4
0
0
0
0
3
2
4
7
10
1
1
1
0
0
1
0
0
0
Single Source-G
UTION
100.00 ug/in3.
00
00
00
00
71
00
00
20
80
00
02
80
43
2?
26
00
00
00
5
0
0
0
0
1
0
4
8
9
0
3
2
0
1
0
0
0
0
00
00
00
00
00
00
95
55
77
00
09
00
26
49
00
00
00
00
oup exex Mode)
180 receptors.
1
6
0.00
0.00
0.00
0.00
1.51
1 .00
8.74
24.5?
7.41
2.40
9.42
1 .87
1 .96
0.73
0.00
0.00
0.00
0.00
7
0
0
0
2
1
1
7
32
6
0
3
1
0
0
0
0
0
0
Output
j v e r a <) i ii
00
00
00
47
00
00
00
43
67
00
15
?1
46
02
00
00
00
65
8
0
0
0
3
2
2
7
20
6
1
")
2
0
0
0
0
0
0
g period 1-hour
.00
.00
.00
.21
.00
.00
.00
.06
. 17
.20
.02
.52
.34
.15
.00
.00
.00
.00
i
9
0.00
0.00
0.00
4.99
3.34
1.00
4. 1U
6.49
5.97
3.52
1 .32
1 .80
0.00
1.17
0.30
0.00
0.00
0.00
10
0.00
0.00
0.00
5.03
4. 89
2.00
5.47
13.70
7. 12
3.63
0.00
1.47
0.00
0.32
0.00
0.00
0.00
0.07
FIGURE 5-8. Continued.
-------
Single Source-Group exex Model Output
CASE 2: CXtXS RUN FOR COVARYINO SOURCtS APPLICATION
Staiid.iid cone 6^0.00 uy/inj, background cone 100.OK ug/m3,
* (asterisk) 1n table indicates the max.
18U rtteptorsu averaging period 1-hour
O
-J
All years alt sources HFC = 3.1877t+01
expected exceedances by receptor are
.
0
10
20
30
40
50
60
70
80
90
100
110
120
130
MO
ISO
too
170
I
0.00
0.00
O.flO
0.00
5.54
2.63
1.00
?.52
9.15
2.44
2.80
1.42
2.21
0.13
O.J5
0.00
0.00
0.00
00
00
00
00
97
BO
31
15
.86
1.85
4.42
4.18
0.98
0.4t)
1.20
0.01
0.01
0.00
0.00
0.00
0.00
0.00
J.67
1.33
.99
.66
.45
.94
.b4
.14
.34
.06
.03
O.UO
0.00
0.00
00
00
00
0.00
24
00
67
36
49
0.39
2.5b
1.87
0.58
0.42
1.63
O.I/
0.00
0.00
5
0.00
0.00
0.00
0.00
2.90
0.67
3.66
6.23
7.47
0.31
2.82
2.69
O.SJ
1.06
0.00
O.UO
0.00
0.00
6
0.00
0.0(1
0.00
0.00
2.60
o.e;
4.57
23.40
10.24
1.70
5.06
?.08
1.51
1.07
0.00
0.00
0.00
0.00
1
7
0.00
0.00
0.00
2.37
1.64
0.67
4.34
* 31.88
J.55
0.76
3.41
1.60
0.30
0.26
0.01
0.00
0.00
0.22
B
0.00
0.00
0.00
2.40
1.47
1.00
3.33
2?. 08
6.30
1.31
3.94
2.67
0.14
0.12
0.25
0.00
0.00
0.00
00
00
00
29
26
0.67
2.30
6.94
5.12
3.b9
1 .44
.83
6.1(1
0.64
0.10
0.00
0.00
0.00
10
0.00
0.00
0.01)
3.68
2.96
1.00
1.97
12.Ofl
4.6J
2.80
0.61
1. 10
0.17
0.14
0.00
0.00
0
0
.
.00
.02
FIGURE 5-8. Concluded.
87180
-------
used for each). This could occur if the units associated with each stack
all use coal with the same sulfur distribution but do not draw the coal
from the same pile. Therefore, it is possible that the MEE of 31.88
obtained in the previous example, when these emissions were treated as
covarying, is too conservative. The stack parameters, coal sulfur content
distribution, the ambient standard, and the background concentration are
the same as for the covarying-sources example.
5.3.1 Preprocessor Run
The same preprocessed MPTER results are used as in the covarying-sources
example. No additional preprocessor run need be made.
5.3.2 ExEx Run
The three years of preprocessed MPTER results are assigned to units 14,
15, and 16. The input parameter file is assigned to file unit 13. Values
used for variables in the input parameter file are listed in Table 5-3.
The parameter file used for this run is illustrated in Figure 5-9. The
main difference between this file and the input parameter file for the
covarying-source example is that the two sources are in different source
groups (I6RP is set to 1 for the first source and 2 for the second). The
placement of the sources in separate source groups signals ExEx that the
sources are independently varying. Also this example has set LGRID to 0,
so that ExEx will print the MEE but not expected exceedances at each
receptor.
The output is listed in Figures 5-10 through 5-12. The first and second
pages of output contain the same type of information as in the single-
source example.
Options to print expected exceedances for individual meteorological years
and receptors were not activated, so the output consists only of the MEE
for each source group and the MEE for both source groups combined over all
years. It can be seen that each source by itself has a MEE of about
1.4. The two sources combined produce a MEE of 3.21. Note that this is
far smaller than the value found in the covarying-source example.
This example took approximately 1,210 CPU seconds to run. The calcula-
tions involved in the independently varying case require large amounts of
computer time.
87180 If
108
-------
TABLE 5-3. Input parameter file for independently varying sources expected
exceedances example. Summary format is list-directed/free format (except for
character strings).
Record Variable
Description
Assigned
Value
TITLE
CSTD
CBACK
NSIM
NSRC
IAVPER
LGRID
LYRLY
OUTOPT
NYEAR
IYEAR( )
SNAME
Title of run (A80).
o
Comparison air quality standard (yg/m ).
Background concentration (ug/nr).
Number of sample years to generate for
each meteorological year.
Number of emission sources.
Averaging period (1, 3, or 24 hours).
Option to print results for individual
receptors: 0 = do not output individual
receptors, 1 = output results on polar
grid receptors, 2 = output results on
tabular grid receptors.
Option to calculate and print results for
individual meteorological years: 0 = no
yearly output, 1 = output results for
individual meteorological years as well as
averages over all years.
Option to calculate and print expected
exceedances (OUTOPT = 0), probabilities
of violation (OUTOPT = 1), or both (OUTOPT
Number of meteorological years (number of
data files).
The years of data, in the order of the
specified data files.
Source name (A20).
109
Case 3: ExEx run
for independently
varying sources
application
650.0
100.0
500
2
1
0
- 2).
1973, 1974, 1975
Source B
Continued
-------
TABLE 5-3. Concluded.
Record Variable
7 ISRC
IGRP
QGM
QGSD
GSDCUT
RHO
8 SNAME
9 ISRC
IGRP
QGM
QGSD
GSDCUT
RHO
Description
Source number (maximum two digits), does not
have to be ordered.
Source-group number, does not have to be
ordered.
Emission sulfur content geometric mean
(Ib/MMBtu).
Emission sulfur content geometric standard
deviation.
Number of GSDs above GM where the distribu-
tion is truncated. A value of 6 is recom-
mended.
Autocorrelation coefficient (ignored in
calculating expected exceedances).
Source name.
Source number.
Source-group number.
Geometric mean.
Geometric standard deviation.
Number of GSDs above GM where distribution
is truncated.
Autocorrelation coefficient (ignored in
calculating expected exceedances).
Assigned
Value
1
1
2.85
1.05
6.0
0.95
Source C
2
2
2.85
1.05
6.0
0.95
87180
110
-------
CASC 3: tXIXS RUN TOR I NDCPCNOf NU Y VARYING SOURCES APPLICATION
CASE 3: fXEKS RUN FOR INOEPENOFNTLY VARYING SOURCES APPLICATION
6bO. 100.
SUO ? 1
000
3 1973 1974 1975
SOURCE B
I 1 ?.85 l.Ub 6.0 0.95
SOURCE C
2 2 2.85 1.05 6.0 0.95
Page
FIGURE 5-9. Example of expected exceedance independently varying application: input parameter file.
87180
-------
IN3
EXPECTED EXCEEOANCtS SYS1EM
ExExs V3.01 01-JAN-8B
IBM TSO F77 VERSION
SYSTEMS APPLICATIONS. INC.
Date I tine of run: MON, JAN 11 1988 10:34:20
User Input Information
Title of run
Comparison standard concent rat ion (ug/n3)
Background concentration (ug/m3)
I simulations per year
I emission sources
Avprjgiiit) period (hours)
Out put Opt i on
Ye,\rs of requested dispersion results
Opt ions act i v.ited:
Print max expected exceedances
Output all-years result only
CASE 3: EXEXS RUN FUR INOEPENDENflY VARYING SOURCES APPLICATION
650.00
100.00
000
2
1
0
1973 1971 1975
Coal Sulfur Content Distribution:
Source* Group/ Source name
I 1 SOURCE B
2 2 SOURCE C
Geometric mean
(Ib S02/MMBtu)
2.85
2.85
Geometric std dev IGSO to max Autocorrelation co-ef
1.05
1.05
6.0
G.O
0.95
U.95
Model is run in Multi Source-Groups mode.
Expected eoceedances are calculated using a Honte-Carlo simulation.
FIGURE 5-10. Example of expected exceedance independently varying application: page 1 of output.
-------
to
Dispers lon-Hodel-Resu11s Data Int orm.it ion
Udtat" 11os Headers:
Title or Uispers ion-Hode I-Ki-su I1 data
Year modeled
I sources
I receptors
I averaging periods
Receptor grid type (1 = pol or .?-1 .ibu lar)
I radii or x-direcllon reieplurs
Cut-off value used In preprocessor (g/ra3)
Title of Oispersion-Model-ResutI data
Ye.ir modeled
* sources
t receptors
t averaging periods
Receptor grid type (1=polar,? = tabular)
* radii or x-direction receptors
Lut-ot'f value used in preprocessor (g/ra3)
Title of Dispersion-Model-Result data
Vear modeled
* sources
I receptors
f averaging periods
Receptor grid type (l = pol ar .1'-1 abular)
* radii or x-diroction i-c-cept ors
Cut-off value used in preprocessor (g/ra3)
CHI/Q PRE-PRUClSSCO DATA K)K MUITIPI.I SOURCt
1973
180 '
87t>0
1
36
1.5000E-05
CHI/Q PRE-PROCESSCD DATA FOR MULT I IMC SOURCE
19/4
2
180
8760
1
30
I.SUOOE-05
CHI/Q PRE-PROCESSED DATA FOR HIH.IIPU bOURCE
1975
?
IBU
8700
1
36
1.5000E-05
Data Screening Result:
Lowest concentration that may rouse exceedance is (X/Q)min - 7.200325E-05 cj/inJ.
Filei Year Iconc In datafile fconc > (X/Q)min
1 1973 22106 223?
? 1974 22034 2280
3 1975 21794 2480
Total
65934
6998
FIGURE 5-11. Example of expected exceedance independently varying application: page 2 of output.
87180
-------
Multi Source-Groups e»ex Model Uul|jiil
CASI i: EXfXS RUN fOR I NOt t>l NDI N 11 Y VARYING SOURCES APPLICATION
SlJiidjrd cone 6SO.OU uij/mj. hiii kground cone 100.OU ug/3. 180 receptors, avvrjtjing period 1-hour
I
All years source-group 1 Mft - I.385JE«00
All years source-group 2 Hit - 1.394UCtOO j
All years all sources Ht[ - J.7M8F+OI
FIGURE 5-12. Example of expected exceedances independently varying application: output of results,
-------
5.4 ITERATIVE EXPECTED EXCEEDANCE EXAMPLE
Since the plant described in the single-source example produces a MEE
greater than one, it was decided to use the ExEx System to determine the
characteristics of several coal sulfur content distributions that will
produce a MEE no larger than one. The stack parameters, the ambient stan-
dard, and the background concentration are the same as for the single-
source example.
5.4.1 Preprocessor Run
The iterative application will make use of the same preprocessed files
as the single-source example.
5.4.2 ExEx Run
The three years of preprocessed MPTER results are assigned to units 14,
15, and 16. The input parameter file is assigned to file unit 13. Values
used for variables in the input parameter file are listed in Table 5-4.
The parameter file used for this run is illustrated in Figure 5-13.
It was decided to find three coal sulfur distributions that produced a MEE
of 1.0 ± .05. The three GSDs picked were 1.1, 1.15, and 1.2. The GMs to
be calculated were to be in the range of between 1.1 and 5.5. Thus TARGET
1s 1.0, EPS is .05, NQ1 is 3, Q1BEG is 1.1, Q1END is 1.2, Q2MIN is 1.1,
and Q2MAX is 5.5.
The output is listed in Figures 5-14 through 5-16. The first and second
pages of output contain the same type of information as in the single-
source example. Figure 5-14 verifies that the output option chosen was 0,
signifying that expected exceedances only are being calculated, and that
the ExEx System is executing an iterative application for GMs between 1.10
and 5.50 for three GSDs between 1.10 and 1.20 inclusive for a target MEE
rate of 1.0 +/- 0.05. Figure 5-15 shows that the lowest concentration
that could cause an exceedance is 3.35 x 10 and that there are a total
of 11,211 concentrations greater than this in the x/q file.
The first GSD against which to calculate a compliant GM was specified in
the input parameter file to be 1.1 After seven iterations, ExEx found a
corresponding GM of 1.6156 Ib S02/MMBtu, which resulted in a MEE of
0.99. Expected exceedances at each individual receptor resulting from
this fuel sulfur distribution are listed next.
87180 7r
-------
TABLE 5-4. Input parameter file for expected exceedance iterative application.
Summary format is list-directed/free format (except for character strings).
Record Variable
Description
Assigned
Value
TITLE Title of run (A80).
CSTD Comparison air quality standard (yg/m ).
CBACK Background concentration (yg/m3).
NSIM Number of sample years to generate for each
meteorological year. Not used in expected
exceedance iterative applications.
NSRC Number of emission sources.
IAVPER Averaging period (1, 3, or 24 hours).
LGRID Option to print results for individual
receptors: 0 = do not output individual
receptors, 1 = output results on polar
grid receptors, 2 = output results on
tabular grid receptors.
LYRLY Option to calculate and print results for
individual meteorological years: 0 = no
yearly output, 1 = output results for
individual meteorological years as well
as averages over all years.
OUTOPT Option to calculate and print expected
exceedances (OUTOPT = 0), probabilities
of violation (OUTOPT = 1), or both (OUTOPT
NYEAR Number of meteorological years (number of
data files).
IYEAR( ) The years of data, in the order of the
specified data files.
SNAME Source name (A20).
Case 4: ExEx run
for single source
iterative
application
650.00
100.00
1
1
1
1
0
= 2).
1971, 1972, 1973
Source A
Continued
87180 Say-
-------
TABLE 5-4. Concluded.
Record Variable
7 ISRC
IGRP
QGM
QGSD
Description
Source number (maximum two digits), does not
have to be ordered.
Source-group number, does not have to be
ordered.
Emission sulfur content geometric mean
(Ib/MMBtu).
Emission sulfur content geometric standard
Assigned
Value
1
1
0.0
0.0
8
deviation.
GSDCUT Number of GSDs above GM where the distribu-
tion is truncated. A value of 6 is recom-
mended.
RHO Autocorrelation coefficient (ignored in
calculating expected exceedances).
TARGET Target maximum expected exceedance value.
EPS Tolerance (epsilon) for TARGET.
IVARY Which emission data to vary to caculate
the other parameters
1 = vary by GM to calculate GSD
2 = vary by GSD to calculate GM
6.0
0.95
1.0
.05
2
NQ1
Q1BEG
Q1END
Q2MIN
Q2MAX
Number of varying steps.
Low end of the range for the parameter being
varied.
Upper end of the range for parameter being
varied.
Low end of range to search parameter being
iteratively calculated.
Upper end of range for parameter being
calculated.
3
1.10
1.20
1.1
5.5
87180 63
117
-------
00
CASl 4: CXEXS RUN FOR SINGLE-SOURCE ITERATIVE APPLICATION
CASE 4: EKtXS RUN FOR SINGLE-SOURCF ITERATIVE APPLICATION
650. 100.
I I I
I 0 0
3 1971 1972 1973
SOURCE A
1 1 0.0 0.0 6.0 0.95
1.0 0.05 2 3 1.10 1.20 1.1 5.5
Page
FIGURE 5-13. Example of expected exceedance iterative application: input parameter file.
-------
EXPECTED EXCEEOANCCS SYSTEM
ExExt V3.01 Ol-JAN-88
IBM TSO F77 VERSION!
SYSTEMS APPLICATIONS, INC.
Date I tine of run: HON, JAN 11* 1988 10:47:49
User Input Infornatlon
Title of run
Comparison standard concentration (ug/m3)
Background concentration (ug/n3)
I simulations per year
I emission sources
Averaging period (hours)
Output Option
Years of requested dispersion results
CASE 4: EXEXS RUN FOR SINGLE-SOURCE ITERATIVE APPLICATION
6SO.OO
100.00
1
1
1
0
1971 1972 1973
Options activated:
Print expected exceedances on polar grid receptors
Output all-years result only
Coal Sulfur Content Distribution:
Sourcel Group! Source name
1 1 SOURCE A
Geometric mean
(Ib S02/HHBtu)
computed within
1.10 - 5.50
Geometric std dev
1.10 - 1.20
3 values
IGSO to max
6.0
Autocorrelation co-ef
0.95
Target max expected exceedance = 1.00 + /- 0.0500
! Model is run in Single Source-Group Iterative mode.
! No Monte-Carlo simulation is performed.
! No yearly result can be output.
FIGURE 5-14. Example of expected exceedance iterative application: page 1 of output.
87180
-------
rv>
o
Datafiles Headers:
Title of Olspersion-Model-ResuIt data
tear modeled
* sources
I receptors
I averaging periods
Receptor yrld type (1= polar.2=tabuIar)
I radii or x-direction receptors
Cut-off value used In preprocessor (g/m3)
Title of Dtsperslon-Hodel-Result data
rear modeled
I sources
I receptors
I averaging periods
Receptor grid type (I=polar.2=tabular)
I radii or x-dlrection receptors
Cut-off value used in preprocessor (g/m3)
Title of DlspersIon-Model-Result data
Vear modeled
I sources
I recept9rs
I averaging periods
Receptor grid type (1=polar,2=tabular)
i radii or x-dlrection receptors
Cut-off value used In preprocessor (g/n3)
DisperSIon-Model -Results Data Information
I
CHI/0 PRE-PROCfSStO DATA FOR SINGLE SOURCE
1971 I
1 '
180
8760
1
36
l.OOOOE-05
CHI/Q PRE-PROCESSED DATA FOR SINGLE SOURCE
1972
1
180
8784
1
36
l.OOOOE-05
CHI/0 PRE-PROCESSED DATA FOR SINGLE SOURCE
1973
1
180
8760
1
36
l.OOOOE-05
Data Screening Result:
Lowest concentration that may cause exceedance is (X/Q)min = 3.348979E-05 g/m3.
Filel Year tconc in datafile
1 1971 9694
'i 1972 9200
3 1973 8987
Total 27881
fconc > (X/Q)nin
3993
3642
3576
11211
FIGURE 5-15. Example of expected exceedance iterative application: page 2 of output.
-------
ro
CASE 4: fXfXS RUN FOR S INGLE-SOURCE ITERATIVE APPLICATION
Standard cone 650.00 ug/m3, background cone 100.00 uq/m3, 180 receptors, averaging period 1-hour
laiget max expected excteaance (HIE) is 1.000 */- 0.05UU
' (asterisk) In table indicates the max. 1
Stepf 1: GSD => 1.1000
After 7 iterations, found GH of 1.6156 which produces: 1
All years all sources MEE = 9.9107E-01
Expected
ring 1
ring 2
ring 3
ring A
ring 5
Stepf 2:
After 7
Al 1 year
Expected
ring 1
ring 2
ring 3
ring 4
ring 5
exceedances by
0.11
0.79
0.21
0.00
0.00
0.00
0.00
0.00
0.00
0.00
o.uo
0.00
0.00
0.00
0.00
GSD = 1.1500
receptor are
0.17 0.00
0.20 0.09
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
iterations, found GH of 1.6156
s all sources
exceedances by
0.17
0.89
0.23
0.00
0.00
0.00
0.00
0.00
0.00
0.00
o.uu
0.00
0.00
o.uo
0.00
MEt = I.0121E+00
receptor are
0.23 0.01
0.27 0.18
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
0.00 0.00
o.uo o.uo
0.00 0.00
0.26
0.08
0.26
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.50
0.03
0.11
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.21
0.40
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.38
0.25
0.00
0.00
0.00
0.00
0.00
0.00
0.00
o.uo
0.00
0.00
0.00
0.00
0.00
0.47
0.00
0.00
o.uu
0.00
0.00
0.00
0.00
0.00
o.uo
0.00
0.00
o.uo
0.00
« 0.99
0.00
0.16
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.32
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
o.uo
0.00
0.00
0.00
0.00
0.22
0.00
0.02
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.94
0.29
0.08
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
which produces:
0.28
0.10
0.24
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.59
0.08
0.17
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
o.uo
0.00
0.24
0.45
0.02
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.52
0.28
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.04
0.49
0.02
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
* 1.01
0.01
0.16
0.00
0.00
0.00
0.00
0.00
0.00
0.00
o.ou
0.00
0.00
0.00
0.00
0.36
0.00
0.01
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.27
0.00
0.06
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.95
0.30
0.14
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
FIGURE 5-16. Example of expected exceedance iterative application: output of results.
87180
-------
n«i*
a _ n i- nil n I t o r- a t-
CASE 4: EXEXS RUN FOR S 1 NGI.E - SOURCE ITERATIVE APPLICATION
Standard cone 650.00 ug/m3, background cone 100.00 ug/m3, 180 receptors, averaging period
Target max expected fxceudance (HIE) is 1.000 */- 0.0500 |
' (asterisk) In table Indicates the max.
Step* 3: GSO - 1 .2000 |
After 6 iterations, found GH of 1.5812 which produces:
All years all sources MEE = 9.518H-01
Expected exceedances by receptor
ring 1
ring 2
ring 3
r 1 ng 4
r i ng 5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
18
88
22
00
00
00
00
00
00
00
00
00
00
00
00
0.24
0.29
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
are
0.02
0.21
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
.28
. 11
.22
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
0.57
0.11
0.19
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
24
45
03
00
00
00
00
00
00
00
00
00
00
00
00
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
.00
.54
.26
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
0.07
0.4b
0.04
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
f
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-hour
95
02
15
00
00
00
00
00
00
00
00
00
00
00
00
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
.37
.00
.02
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
.28
.00
.09
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
.00
0.89
0.28
0.16
0.01
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
FIGURE 5-16. Continued.
-------
rv>
CASE 4: tXFXS RUN FOR SI NCIE-SOURCE ITERATIVE APPLICATION
Standard cone 650.00 ug/m3. background cone 100.00 ug/m3.
larget max expected exceedance (MEL) is 1.UOO +/-
Summary:
Geometric mean
One Source-Group Iterative exex Model Output
180 receptors, averaging period 1-hour
I
bOO
1.6156
1.6156
1.5812
Geometric std dev MCE
1.1000 0.9911
1.I500 1.0121
1.2000 0.9518
Differs from target by
-0.0089
0.0121
-0.0482
FIGURE 5-16. Concluded.
87180
-------
The second requested GSD was 1.15. After seven iterations, the same GM as
in the first case was found to produce a MEE within the target range spec-
ified. The MEE in this case was 1.01 Ib S02/MMBtu.
The third GSD requested was 1.2. The GM which, combined with this GSD,
produces the target MEE was found to be 1.5812 Ib S02/MMBtu. The MEE for
this GM and GSD is .95.
The final page of ExEx output (Figure 5-16) shows a summary table of the
compliant distributions ExEx has calculated. The three compliant GMs of
1.6156, 1.6156, and 1.5812 are listed along with the compliant GSDs of
1.10, 1.15, and 1.20. The MEE for each of these was 0.9911, 1.0121, and
0.9518, respectively. The difference from the target for each was
-0.0089, .0121, and -0.0482.
The ExEx Program took approximately 30 CPU seconds to run for this
example.
5.5 SINGLE-SOURCE PROBABILITY OF VIOLATION APPLICATION
In an analysis for another 1500 MW coal-fired power plant, this one with a
GM coal sulfur content of 5.2 and a GSD of 1.15, it has been decided to
examine the probability of a violation occurring in the vicinity of the
plant. The dispersion model ISCST was exercised for two years of meteoro-
logical data and calculated 24-hour average concentrations for an array of
44 receptors placed around two concentric rings centered on the stack.
5.5.1 Preprocessor Run
The preprocessor run is similar to those for the expected exceedance
applications. CCUT is calculated as shown in Sections 3.1.3, 5.1, and
5.2, but with a GM of 5.2 Ib S02/MMBtu to reflect the characteristics of
the coal used by this source. The input file for the preprocessor is
described below:
Line Variable(s) Entry
1 TITLE Preprocessor Run 6
2 MODEL ISCST
3 IYEAR,IAVPER,CCUT 1973, 24, 0.00001
4 IOPT7,IOPT9,IOPT14, 0, 0, 1, 1, 1, 2
INGRD,INGRP,INX,INY, 22, 0
INW
87180 7r
124
-------
The only difference between this input file and those used for the other
examples is that ISCST is the dispersion model instead of MPTER, and that
there are only 44 receptors instead of 180. The preprocessor is exercised
twice, once for each of the two years of ISCST output.
5.5.2 ExEx Run
The two years of preprocessed ISCST results are assigned to FORTRAN logi-
cal units 14 and 15. The input parameter file (described below) is
assigned to file unit 13. Specific values used in the input parameter
file for each of the variables are listed in Table 5-5. A print-out of
the actual input parameter file is presented in Figure 5-17. One impor-
tant feature is the entry of 400 for the number of simulation years.
Although no simulations need be performed for a single-source group expec-
ted exceedance run (because the analytical procedure described in Section
2.2 and Appendix B can be used instead), all POV applications require the
simulation procedure. Another important feature is that the autocorrela-
tion coefficient (RHO) is not ignored in this POV application as it was in
the expected exceedance applications. In other words, the value input for
RHO in the POV applications will affect the results one obtains. There-
fore, choosing a proper value for RHO is important. For guidance on this
choice and additional information, see Table 3-7. Also note that OUTOPT
(the last variable on the fourth line of output) has been set to 1,
requesting output for probability of violation; LGRID has been set to 2,
requesting tabular output (this is usually used for discrete receptors but
is used in this example to provide further help in interpreting this kind
of output); and LYRLY has been set to 1, requesting output for individual
meteorological years as well as over all years.
The output from this run is listed in Figures 5-18 through 5-20. Figure
5-18 lists the first page of output, echoing values used in the input
parameter file, and listing the coal sulfur distribution and the applica-
tion that the System is running. Figure 5-19 lists the preprocessor
inputs and the results of the screening of concentrations too small to
cause exceedances. In this run only 70 concentrations (x/q values) from
the 1973 ISCST results and 151 concentrations from the 1975 results are
large enough to potentially cause exceedances.
Results are printed in Figure 5-20 in tabular output. In 1973 the MPOV is
0.0025, occuring at the 36th receptor (marked with the asterisk). In 1975
the MPOV is 0.997, rounding to 1.00 at the 37th receptor (marked with the
asterisk). On the next page of output the result over both years is
87180 7
125
-------
TABLE 5-5. Input parameter file for single-source probability of violation exam-
ple. Summary format is listed-directed/free format (except for character strings),
Record Variable
Description
Assigned
Value
TITLE Title of run (A80)
CSTD A comparison air quality standard (yg/m ).
CBACK Background concentration (yg/m ).
NSIM Number of sample years to generate for
each meteorological year.
NSRC Number of emission sources.
IAVPER Averaging period (1, 3, or 24 hours).
LGRID Option to print results for individual
receptors: 0 = do not output individual
receptors, 1 = output results on regular
grid receptors, 2 = output results on
tabular grid receptors.
LYRLY Option to calculate and print results for
individual meteorological years: 0 = no
yearly output, 1 = output results for
individual meteorological years as well as
averages over all years.
OUTOPT Option to calculate and print expected
exceedances (OUTOPT = 0), probabilities
of violation (OUTOPT = 1), or both (OUTOPT
NYEAR Number of meteorological years (number of
data files).
Example 3, single
source ISCST run,
24 hours
365.0
200.0
400
1
24
2
= 2).
IYEAR( )
6 SNAME
The years of data, in the order of the
specified data files.
Source name (A20).
1973, 1975
Unit 1
Continued
87180
126
-------
TABLE 5-5. Concluded.
Record Variable
Description
Assigned
Value
ISRC Source number (maximum two digits), does not 1
have to be ordered.
IGRP Source-group number, does not have to be 1
ordered.
QGM Emission sulfur content geometric mean 5.2
(Ib S02/MMBtu).
QGSD Emission sulfur content geometric standard 1.15
deviation.
GSDCUT Number of GSDs above GM where the distribu- 6.0
tion is truncated. A value of 6 is recommended.
RHD _ Autocorrelation coefficient 0.7
87180
127
-------
IN}
CO
txdniple 3, Single Source 1SCST run, 21 hr.
Page
(>iim|ile J. Single Source ISLSI run.
3u^.O ,"00.0
100 I :M
: i i
? I')/J 1975
Unit I
1 1 5. I'D 1.15 6.0 0.7
hr.
FIGURE 5-17. Example of probability of violation single source application: input parameter file.
-------
ro
EXPECTED EXCEEOANUS SYSTEM
ExExs V3.01 Ol-JAN-8,8
IBM TSO F77 VERSION
SYSTEMS APPLICATIONS. INC.
** * M*
Date I time of run: HON. JAN 11 1988 10:56:54
User Input Informal ion
Title of run
Comparison standard concent rat ion (ug/i»3)
Background concentration (ug/mJ)
i s imulatIons per year
I emission sources
Averaging period (hours)
UutpuE Option
Years of requested dispersion results
Opt ions act I voted:
Print POVs on tabular grid of receptors
Output both yearly and all-years results
Example 3.
365.00
?GO.OO
400
1
24
1
1973 1975
Single Source (SCSI run, 24 hr.
Coal Sulfur Content Distribution:
Source* Groupl Source name
I
1
Unit 1
Geometric mean Geometric std dev IGSU to max Autocorrelation co-ef
(Ib S02/MHBtu)
5.20 1.15 6.0 0.70
! Model is run In Single Source-Group mode for POVs.
! Monte-Carlo simulation is performed.
FIGURE 5-18. Example of probability of violation single source application: page 1 of output.
87 1 8 0
-------
OJ
o
Dispersion-Hodcl -Resul ts Data Infornution
Oat jf I lei Headc-rs:
Title of Olspers Ion-Mode) -Resu It
Year modeled
t sources
I receptors
I averaging periods
Receptor grid type jl=pol ar ,?- 1 abu lar )
I radii or x-dlrectlon receptors
Cut-off value used in preprocessor (q/i«3)
Title of Ui spers Ion-Model -Resu 1 1 data
Year modeled
I sources
* receptors
I averaging periods
Receptor grid type ( l = pol ar ,2=t abu lar)
I radii or x-direction receptors
Cut-off value used in preprocessor (g/mJ)
ISCbT output
I
PRE-EtS run for
19/J
1
41
365
2
0
l.OOOOE-12
PRE-EES run for ISCST output
1975
1
14
36b
2
0
1.OOOOE-12
just
hour
just 24 hour
Data Screening Result:
Lowest concentration that may cause exceedance Is (X/Q)min - 1.37I808E-05 g/mj.
I cone
File* Tear Iconc in datafile
1 1973 4093
2 1975 4370
Total 8463
» (X/Q min
70
151
221
FIGURE 5-19. Example of probability of violation single source application: page 2 of output.
-------
Example 3, Single Source ISCST run. ?4 hr.
Standard cone 365.00 ug/m3, background cone 200.00 ug/m3, 44 receptors. averji| ing period ?4-hour
* (asterisk) tn table indicates the max.
Year 1973 all
Probaoi 1 Ity of
0
10
20
30
40
Year 1975 all
Probability of
0
10
20
30
40
sources HPOV - ?.bOOOt-03 ,
Violation by receptor: '
123456709
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 O.UO U.Oo 0.00
0.00 0.00 0.00 0.00 0.00 0.00 U.OO 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 0.00 U. 00 0.00
0.00 0.00 0.00 0.00
Sources MPOV = 9.9750F.-01
Violation by receptor:
1 2 3 4 5 6 7 B 9
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.01 0.01 0.00 O.?l 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.02 0.00
0.00 O.Oll 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00
10
0.00
0.00
0.00
0.00
10
0.00
0.00
0.00
0.00
FIGURE 5-20. Example of probability of violation single source application: output of results
87180
-------
CO
Single Source-Group pov Model Output
t«ample 3. Single Source ISCST run, ?ears all sources HPOV = 4.487bl-UI
Probability of ViolJtion by receptor:
200.00 ug/m3, 44 receptol-i, avor.iij i HJ period ?
-------
printed. The MPOV is 0.5 and occurs at the 37th receptor. The 38th recep-
tor is the only other one with a POV of 0.01 or greater.
This example took 2 CPU seconds to run.
5.6 COVARYING-SOURCES PROBABILITY OF VIOLATION EXAMPLE
5.6.1 Preprocessor Run
ISCST has been run for two co-located sources, each generating a set of
24-hour average normalized concentrations at an array of 36 receptors
located every 20° around two concentric rings centered on the sources.
Both sources burn relatively high-sulfur fuel; the GM coal sulfur content
for each is 5.66. The GSD is 1.15. The inputs for the preprocessor are
the same as for the single-source POV example except for the title, the
value of INGRP (set equal to 2 instead of 1), the number of y-direction
receptors (entered as the sixth value on the fourth line of input), which
are 18 instead of 22 as in the previous example, and CCUT, which is the
same as the calculated for the multiple source expected exceedance
examples.
5.6.2 ExEx Run
The two years of preprocessed ISCST results are assigned to units 14 and
15, and the input parameter file is assigned to unit 13. Values used for
each of the variables in this file are listed in Table 5-6. A listing of
the actual file is reproduced in Figure 5-21. As for the single-source
example, 400 simulation years are requested. LGRID is set to 1, to print
POVs on regularly spaced receptors; LYRLY is set to 0, to print results
over all years and not for individual years; and OUTOPT is set to 1, to
calculate and print POVs instead of expected exceedances. With the
exception of ISRC, the parameter values in record type 7 are identical for
each source.
Output is printed in Figures 5-22 through 5-24. The first page echos the
inputs, verifying that the user has chosen the POV application in the
single-source group mode (covarying) case, and output will be printed on
regular receptors and for the all-years result. The second page of output
(in Figure 5-23) echos preprocessor results, including the number of con-
centrations remaining after screening the dispersion model output (326 in
1973 and 467 in 1975). The number of concentrations left after the
screening is larger than the number left after the screening in the
single-source case because of the higher sulfur content of the coal.
87180 7f
133
-------
TABLE 5-6. Input parameter file for covarying-sources probability of violation
example. Summary format is listed-directed/free format (except for character
strings).
Record Variable
Description
Assigned
Value
TITLE Title of run (A80).
CSTD Comparison air quality standard (yg/m ).
CBACK Background concentration (ug/m3).
NSIM Number of sample years to generate for
each meteorological year.
NSRC Number of emission sources.
IA_VPER_ Averaging period (1, 3, or 24 hours).
LGRID Option to print results for individual
receptors: 0 = do not output individual
receptors, 1 = output results on polar
grid receptors, 2 = output results on
tabular grid receptors.
LYRLY Option to calculate and print results for
individual meteorological years: 0 = no
yearly output, 1 = output results for
individual meteorological years as well
as averages over all years.
OUTOPT Option to calculate and print expected
exceedances (OUTOPT = 0), probabilities
of violation (OUTOPT = 1), or both (OUTOPT
NYEAR Number of meteorological years (number of
data files).
Example 1,
covarying sources,
24 hours
365.0
200.0
400
2
24
1
= 2).
IYEAR( )
6 SNAME
The years of data, in the order of the
specified data files.
Source name (A20).
1973, 1975
Unit 1
Continued
134
-------
TABLE 5-6. Concluded.
Record Variable
Description
Assigned
Value
ISRC Source number (maximum two digits), does not 1
have to be ordered.
IGRP Source-group number, does not have to be ordered. 1
QGM Emission sulfur content geometric mean 5.66
(Ib/MMBtu).
QGSD Emission sulfur content geometric standard 1.15
deviation.
GSDCUT Number of GSDs above GM where the distri- 6.0
bution is truncated. A value of 6 is recom-
mended.
RHO
8 SNAME
9 ISRC
IGRP
QGM
QGSD
GSDCUT
RHO
Autocorrelation coefficient.
Name of source.
Source number.
Source-group number.
Geometric mean.
Geometric standard deviation.
Number of GSDs above GM where distribution
is truncated.
Autocorrelation coefficient
0.7
Unit 2
2
1
5.66
1.15
6.0
0.7
87180
135
-------
Example 1. Covarylng Sources, 24Hrs
Ixdmple 1, Covarylny Sources, ?4Hrs
365. ?00.
100 2 24
I 0 1
2 1973 1975
Unit 1
1 1 5.66 1.15 6.0 0.7
Unit 2
2 1 5.66 1.15 6.0 0.7
Page 1
FIGURE 5-21. Example of probability of violation covarying sources application: input parameter file.
-------
CO
CXPCCTCO tXCEEDANCCS SVSTCH
ExExs V3.01 Ol-JAN-88
IBM TSO F77 VERSION I
SYSTEMS APPLICATIONS. INC.
Date t tine of run: HON. JAN 11 1988 11:02:32
User Input Information
Title of run
Comparison standard concentration (ug/m3)
Background concentration (ug/m3)
I simulations per year
I emission sources
Averaging period (hours)
Output Option
Years of requested dispersion results
Options activated:
Print POVs on polar grid of receptors
Output all-years result only
Example 1, Covarylng Sources. 24llrs
36b.l)0
200.00
400
2
24
1
1973 1975
Coal Sulfur Content Distribution:
Sourcel Croup* Source name
Unit 1
Unit 2
Geometric mean
(Ib S02/HMBtu)
5.66
5.66
Geometric std dev IGSO to max Autocorrelation co-ef
1.15
1.15
6.0
6.0
0.70
0.70
Model is run in Single Source-Group mode for POVs.
Monte-Carlo simulation is performed.
FIGURE 5-22. Example of probability of violation covarying sources application: page 1 of output.
87180
-------
CO
oo
Dispersion-Model-Ri'Milts Data Information
0,H ,1 f i les Headers:
Title of Dispersion-Model-Result data
tear modeled
I sources
I receptors
I averaging periods
Receptor grid type (1=polar.?=tabular)
/ radii or x-directlon receptors
Cut-off value used in preprocessor (g/m3)
Title of Dispersion-Model-Result data
rejr modeled
I sources
» receptors
I averaging periods
Receptor grid type (1=polar,2=tabu1ar)
I radii or x-directlon receptors
Cut-off value used in preprocessor (g/n>3)
PRE-EES test run for ISCST output
1973
2 I
36
365
1
18
l.OOOOE-12
PRE-EES test run for ISCST output
1975
2
36
365
1
18
l.OOOOE-12
-- 21 hour
-- 21 hour
Data Screening Result:
Lowest concentration that may cause exceedance Is (X/Q)mln = 6.301592C-06 g/m3.
Iconc > (X/Q)niin
167
Total 11101 793
File*
1
2
Year
1973
1975
fconc In dataflle
7030
7368
FIGURE 5-23. Example of probability of violation covarying sources application: page 2 of output.
-------
CO
10
Single Source-Group pov Model Output
1, Covarying Sources. 24Hrs
Standard cone 3Gb.00 ug/mJ. background cone 200.00 ug/ra3,
(asterisk) in table indicates the max.
36 receptors, averaging period ?4-hour
All years all sources HPOV = l.OOOOEtOO
Probability of Violation by receptor:
ring 1
ring 2
0.00
0.08
0.00
0.00
0.02
0.01
.00
.00
0.00
0.38
0.00
0.00
0.00
0.00
0.00
o.ou
0.00
0.00
0.00
0.00
0.00
0.01
0.00
0.06
lo.oo
0.00
0.00
0.04
0.00
1.00
0.10
0.20
0.00
0.04
0.03
0.00
FIGURE 5-24. Example of probability of violation covarying sources application results,
87180
-------
The results are printed in Figure 5-24. The MPOV is 1.0, occurring at the
180th degree receptor on the second ring (marked with an asterisk). The
second highest POV is 0.38 at the 300th degree receptor on the first ring.
The ExEx Program took approximately 10 CPU seconds to execute for this
example.
5.7 PROBABILITY OF VIOLATION INDEPENDENTLY VARYING SOURCES APPLICATION
5.7.1 Preprocessor Run
The same preprocessed results as those used in the covarying-source exam-
ple are used here.
5.7.2 ExEx Run
The two years of preprocessed ISCST results are assigned to FORTRAN units
14 and 15, and the input parameter file to unit 13. Table 5-7 lists the
values-assigned to the variables for this run, and the file is reproduced
in Figure 5-25. Four hundred simulations are requested; LGRID is set to
1, requesting output on regularly spaced receptors; and LYRLY is set to 1,
requesting output over all years, and not individual meteorological
years. OUTOPT is set to 1, requesting that POVs be calculated and
printed. For the purposes of this example, both sources are assigned the
same values of QGM, QGSD, GSDCUT, and RHO although different values could
have been used. Note that IGRP is not the same for each source, signaling
the program that the two sources have independently varying emissions.
The first page of output (Figure 5-26) echos these inputs. The second
page (Figure 5-27) lists characteristics of the ISCST run and receptor
grid and number of concentrations remaining after the screening process
(510). (There are fewer concentrations than for the covarying-sources
application because the more conservative treatment in the covarying-
sources applications causes more concentrations to be left after the
screening.)
Figure 5-28 prints the results by source group, over all source groups,
and for synergistic violations. For source group one, the MPOV is 0.034
at the 180th degree receptor on the second ring. All other POVs are
zero. The second source group has a MPOV of 0.013, occurring at the same
receptor as the first source group. The MPOV from the two sources com-
bined, listed on the following page, is 0.5 at the 180° receptor on the
second ring. Several other non-zero POVs occur as well, such as 0.08 at
the 200° receptor, and 0.17 at the 300° receptor on the first ring. These
POVs, not present in the results for the source groups taken separately,
87180 7r
140
-------
TABLE 5-7. Input parameter file for independently varying sources probability of
violation example. Summary format is list-directed/free format (except for
character strings).
Record Variable
Description
Assigned
Value
TITLE
CSTD
CBACK
NSIM
NSRC
IAVPER
LGRID
LYRLY
OUTOPT
NYEAR
Title of run (A80).
Comparison air quality standard (vig/m3).
Background concentration
Number of sample years to generate for
each meteorological year.
Number of emission sources.
Averaging period (1, 3, or 24 hours).
Option to print results for individual
receptors: 0 = do not output individual
receptors, 1 = output results on polar
grid receptors, 2 = output results on
tabular grid receptors.
Option to calculate and print results for
individual meteorological years: 0 = no
yearly output, 1 = output results for
individual meteorological years as well
as averages over all years.
Option to calculate and print expected
exceedances (OUTOPT = 0), probabilities
of violation (OUTOPT = 1), or both (OUTOPT
Number of meteorological years (number of
data files).
Example 2,
independent
sources, 24 hours
365.0
200.0
400
2
24
1
= 2).
IYEAR( )
6 SNAME
The years of data, in the order of the
specified data files.
Source name (A20).
1973, 1975
Unit 1
Continued
141
87180
-------
TABLE 5-7- Concluded.
Record
7
8
9
Variable
ISRC
IGRP
QGM
QGSD
GSDCUT
RHO
SNAME
ISRC
IGRP
QGM
QGSD
GSDCUT
RHO
Assigned
Description Value
Source number (maximum two digits), does not 1
have to be ordered.
Source-group number, does not have to be 1
ordered.
Emission sulfur content geometric mean 5.66
(Ib/MMBtu).
Emission sulfur content geometric standard 1.15
deviation.
Number of GSDs above GM where the distribu- 6.0
tion is truncated. A value of 6 is recom-
mended.
Autocorrelation coefficient. 0.7
Source name. Unit 2
Source number. 2
Source-group number. 2
Geometric mean. 5.66
Geometric standard deviation. 1.15
Number of GSDs above GM where distribution 6.0
is truncated.
Autocorrelation coefficient. 0.7
87180
142
-------
-pi
CO
Example 2. Independent Sources. 24Hrs
fxample ?, Independent Sources. 2
-------
tXPECTCD EXCEEDANCES SYSTEM
E«Exs V3.01 Ol-JAN-88
IBM TSO F77 VERSION ,
SYSTEMS APPLICATIONS, INC.
Date I time of run: MON. JAN 11 4988 11:11:33
User Input Information
Title of run
Comparison standard concentration (ug/m3)
Background concentration (ug/m3)
I simulations per year
I emission sources
Averaging period (hours)
Output Opt ion
rears of requested dispersion results
Opt ions act ivated:
Print POVs on polar grid of receptors
Output all-years result only
Example 2. Independent Sources, ?4Hrs
365.00
200.00
400
2
24
1
1973 1975
Coal Sulfur Content Distribution:
Sourcel Group! Source name
Unit 1
Unit 2
Geometric mean
(Ib S02/HHBtu)
5.66
5.66
Geometric std dev IGSD to max Autocorrelation co-ef
1. 15
1.15
6.0
6.0
0.70
0.70
Model is run in Multi Source-Group mode for POVs.
Monte-Carlo simulation is performed.
FIGURE 5-26T
output.
Example of probability of violation independently varying sources application: page I of
-------
en
Qatarilei Headers:
Title of Oisperslon-Hodel-Result data
Year modeled
I sources
f receptors
I averaging periods
Receptor grid type (l=polar.2=tabular)
* radii or x-direction receptors
Cut-off value used in. preprocessor (g/m3)
Title of Dispersion-Model-Result data
Year modeled
I sources
I receptors
t averaging periods
Receptor grid type (1=polar,2=tabular)
/ radii or x-directjon receptors
Cut-off value used in preprocessor (g/n3)
Oispersion-Hodel-Results Data Information
I
PRE-EES test run for ISCST output
\ \
36
365
1
18
l.OOOOE-12
PRE-EES test run for ISCST output
1975
2
36
365
1
18
l.OOOOE-1?
21 hour
-- 24 hour
Data Screening Result:
Lowest concentration that may cause exceedance is (X/Q)min = 6.301592E-06 g/m3.
Iconc > (X/Q)min
Fl lei
1
2
Year
I9?3
1975
Iconc in datafile
7036
7368
Total
14404
338
510
FIGURE 5-27. Example of probability of violation independently varying sources application:
page 2 of output.
87180
-------
Unit!
1
Cmiii*ra_nrniii\c r>nu klitd ^> 1 lluliint
Example 2, Independent Sources. ?4Hrs 1
Stjndjid cone 365.00 ug/m3. background cone 200.00 ug/m3, 36 receptors, averaging period 24-hour
' (asterisk) in table indicate:, the max.
All years source-group 1 HPOV = 3.3750E-02
Probability of Violation by .receptor :
ring 1 0.00 0.00 0.00 O.UO 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0 00
0.00 0.00 0.00 0.00 0.00 0.00
ring 2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.03 0.00 0.00 0 00
0.00 0.00 0.00 0.00 0.00 0.00
All years source-group 2 HPOV = 1.2500E-02
Probab i 1 i ty
ring 1
ring 2
I All years
Probitb i 1 i ty
! ring 1
ring 2
All years
Probab i 1 ity
r 1 ng 1
ring 2
of Violation
0.00
0.00
0.00
0.00
by receptor:
0.00
0.00
0.00
0.00
all sources HPOV =
of Violation
0.00
0.02
0.00
0.00
0.00
0.00
0.00
0.00
5.0000E-01
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
o.oo o.oo o.oo o.oo o.oo o.oo
0.00 0.00 0.01 0.00 0.00 0.00
by receptor:
0.00
0.00
0.00
0.00
0.00
0.17
0.00
0.00
SHPOV = 1.6000E-01
of Synergistic Violation by
0.00
0.02
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0. 16
0.00
0.00
0.00
0.00
0.00
0.00
receptor:
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.50 0.08 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.08 0.08 0.00 0.00
FIGURE 5-28. Example of probability of violation independently varying application: results.
-------
are synergistic violations, i.e., violations caused by the combined effect
of the sources where the effect of either source alone was not enough to
cause a violation. The next table prints these synergistic violations
separately. It can be seen from this table that about 8 percent of the
MPOV of 0.5 listed in the previous table at the 180° receptor was due to
synergistic POVs, implying that the rest of the 0.5 is due to the indi-
vidual effects of the sources. Also the POV of 0.08 at the 200° receptor
is due only to synergistic effects.
The ExEx program took approximately 31 CPU seconds to execute for this
example.
5.8 ITERATIVE PROBABILITY OF VIOLATION EXAMPLE
The MPOV for the single-source example was 0.5. It was decided to use the
ExEx System to determine the characteristics of a coal sulfur content dis-
tribution with a GSD of 1.15 that would produce a MPOV of 0.12 for the
single-source example.
5.8.1 Preprocessor Run
The iterative POV application example used the same preprocessed ISCST
files used in the single-source example (Section 5.5).
5.8.2 ExEx Run
The two years of preprocessed ISCST results are assigned to FORTRAN units
14 and 15. The input parameter file is assigned to unit 13. Values used
for each of the variables are listed in Table 5-8. The parameter file is
reproduced in Figure 5-29. It was decided to find the GM that would
result in a MPOV of 0.12 ± 0.005 when the GSD was 1.15. The range of GMs
was specified as 1.0 to 35.0 (the last two values on the eighth line of
input). In other words, the target MPOV is 0.12, EPS is 0.005, NQ1 (the
number of distributions to calculate) is 1, Q1BEG (the first GSD to try)
is 1.15, and Q1END (the last GSD to try) is also 1.15.
The first page of output (Figure 5-30) echoes the values in the input
parameter file. The GM is to be computed within 1.0 and 35.0* for a GSD
* The upper bound of 35 Ib S02/MMBtu for the GM is unrealistically high
and is used here for example purposes only (see discussion at end of
Section 3.2.5).
87180 7y
147
-------
TABLE 5-8. Input parameter file probability of violation example.
is list-directed/free format (except for character strings).
Summary format
Record Variable
Description
Assigned
Value
TITLE
CSTD
CBACK
NSIM
NSRC
IAVPER-
LGRID
LYRLY
OUTOPT
NYEAR
Title of run (A80).
Comparison air quality standard (yg/m ).
Background concentration (vg/nr).
Number of sample years to generate for
each meteorological year.
Number of emission sources.
Averaging period (1, 3, or 24 hours).
Option to print results for individual
receptors: 0 = do not output individual
receptors, 1 = output results on polar
grid receptors, 2 = output results on
tabular grid receptors.
Option to calculate and print results for
individual meteorological years: 0 = no
yearly output, 1 = output results for
individual meteorological years as well
as averages over all years.
Option to calculate and print expected
exceedances (OUTOPT = 0), probabilities of
violation (OUTOPT = 1), or both (OUTOPT = 2).
Number of meteorological years (number of
data files).
Example 4,
iterative mode,
single source
ISCST, 24 hours
365.00
20.00
400
1
24
2
IYEAR( )
6 SNAME
The years of data, in the order of the
specified data files.
Source name (A20).
1973, 1975
Unit 1
Continued
148
87180
-------
TABLE 5-8. Concluded.
Record Variable
7 ISRC
IGRP
QGM
QGSO
GSDCUT
RHO
8 TARGET
EPS
IVARY
NQ1
Q1BEG
Q1END
Q2MIN
Q2MAX
Description
Source number (maximum two digits), does not
have to be ordered.
Source-group number, does not have to be
ordered.
Emission sulfur content geometric mean
(Ib/MMBtu).
Emission sulfur content geometric standard
deviation.
Number of GSDs above GM where the distribu-
tion is truncated. A value of 6 is recom-
mended.
Autocorrelation coefficient.
Target maximum probability of violation value.
Tolerance (epsilon) for TARGET.
Which emission data to vary to calculate
the other parameters
1 = vary by GM to calculate GSD
2 = vary by GSD to calculate GM
Number of varying steps.
Low end of the range for the parameter being
varied.
Upper end of the range for parameter being
varied.
Low end of range to search parameter being
iteratively calculated.
Upper end of range for parameter being
calculated.
Assigned
Value
1
1
30.00
1.15
6.0
0.7
0.12
.005
2
1
1.15
1.15
1.00
35.00
87180 5g
149
-------
en
O
Example 4. Iterative Mode . single source ISCST, 24 hr.
Example 4, Iterative Mode , s i ngl e-source ISCST, 24 hr.
365.0 20.0
'IUU 1 24
2 1 I
2 1973 1975
Unit 1
1 I 30.00 1.15 6.0 0.7
0.12 0.005 2 1 1.15 1.15 1.00 35.00
Page I
FIGURE 5-29. Example of probability of violation iterative application: input parameter file.
-------
EXPECTED EXCEEDANCES SYSTEM
ExExs V3.01 01-JAH-8I
IBM TSO F77 VERSION
SYSTEMS APPLICATIONS. INC.
...................................f
Date I time of run: MON, JAN 11 1988 11:41:21
User Input Information
Title of run
Comparison standard concentration (ug/m3)
Background concentration (ug/m3)
I simulations per year
! emission sources
Averaging period (hours)
Output Option
Years of requested dispersion results
Options activated:
Print POVs on tabular grid of receptors
Output both yearly and all-years results
Example 4,
36S.OO
20.00
400
1
24
1
1973 1975
Iterative Mode , single source ISCST. 24 hr.
Coal Sulfur Content Distribution:
Source! Group! Source name
b 502/MMBtu)
Geometric mean
(Ib S02/MM8tu)
Geometric std dev !GS1) to max Autocorrelation co-ef
1 Unit 1
Target max probability of violation = 0.12 */- 0.0050
computed within
1.00 - 35.00
1.15 - 1.15
1 values
6.0
0.70
Model is run in Single Source-Group Iterative mode for POVs.
Monte-Carlo simulation is performed.
FIGURE 5-30. Example of probability of violation iterative application: page 1 of output.
87180
-------
of 1.15 and a target MPOV of 0.12 ± 0.005. The second page of output
(Figure 5-31) shows the preprocessor results. The lowest concentration
that may cause an exceedance is 4.26 x 10 . A total of 1413 concentra-
tions are greater than or equal to this in the data file. Figure 5-31
shows the results. After trying nine different GMs (nine iterations), the
ExEx System has found that a GM of 6.379 produces a MPOV of 0.117, which
is within 0.005 of 0.12. This MPOV occurs at the 37th receptor (the same
receptor that had the MPOV in the single-source example). This GM is
actually higher than that used in the single-source example, but the back-
ground concentration in this case was assumed to be much smaller than that
assumed in the single-source case. Printed next is a summary for each
distribution calculated (in this case one), giving the GM, GSD, MPOV, and
difference from the target. The difference in this run was 0.0025.
The ExEx Program took approximately 100 CPU seconds to execute this
example.
87180 7f
152
-------
to
DispersIon-Model-Results Data Information
Datafiles Headers:
Title of Dispersion-Model-Result data
Tu.tr modeled
I sources
I receptors
l averaging periods
Receptor grid type (1 =polar,2 = tabular)
I radii or x-direction receptors
Cut-off value used in preprocessor (g/i«3)
Title of Oispersion-Hodel-Result data
Tear modeled
I sources
I receptors
I averaging periods
Receptor grid type (1-polar.2-tabular)
I radii or x-directlon receptors
Cut-off value used in preprocessor (g/n3)
PRE-EES run for 1SCST output -- just 24 hour
1973 I
1
44
365
2
0
l.OOOOE-12
PRE-EES run for 1SCST output -- just 24 hour
1975
1
44
365
2
0
l.OOOOE-12
Data Screening Result:
Lowest concentration that may cause exceedance is (X/Q)min - 4.261S13E-06 g/m3.
Iconc > (X/Q)mtn
Filel
1
2
Tear
1973
1975
fconc in datafile
4093
4370
Total
B463
812
1413
FIGURE 5-31. Example of probability of violation iterative application: page 2 of output.
87180
-------
One Source-Group Iterative pov Model Output
Example 4, Iterative Mode , single source 1SCST, 24 hr.
Standard cone 365.00 ug/m3, background cone 20.00 ug/ra3,
l.irget man probability of violation is O.l/'O */- 0.0050
(asterisk) in table indicates the max.
Step* 1: GSD = 1.1500
After g iterations, found CM of 6.3789 which produces:
All years all sources HPOV = I.1750C-OJ
Probability of ViolJtion by receptor:
44 receptofs. averaging period 24-hour
0
10
20
30
40
1
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
00
00
12
0.00
8
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
10
0.00
0.00
0.00
0.00
Summary:
Geometric mean Geometric std dev
1 6.3789 1.1500
HPOV Differs from target by
0.1175 -0.0025
FIGURE 5-32- Example of probability of violation iterative application: results,
-------
REFERENCES
Baldwin, B. 1986. Letter from Bryan Baldwin, Utility Air Regulatory
Group, to David Stonefield, U.S. EPA, November 20, 1986.
Burton, C. S., J. P. Nordin, and T. E. Stoeckenius. 1982. "Variability
(Uncertainty) in Sulfur Emissions: A Summary of Current Knowledge
and the Effects of Ambient Standard Attainment Demonstrations of
Adopting Some Simple Models of Sulfur Variability." Systems Applica-
tions, Inc., San Rafael, California.
Burton, C. S., T. E. Stoeckenius, and J. P. Nordin. 1982. "On a New
Short-Term Standard for Sulfur Dioxide: The Protection from Calcula-
ted Pejik One-Hour Concentration Provided by the Existing 3- and 24-
Hour NAAQS in the Vicinity of a Hypothetical Power Plant." Systems
Applications, Inc., San Rafael, California (SYSAPP-82/255).
Burton, C. S., T. E. Stoeckenius, and J. P. Nordin. 1983. "The Temporal
Representativeness of Short-Term Meteorological Data Sets: Implica-
tions for Air Quality Impact Assessment." Systems Applications,
Inc., San Rafael, California (SYSAPP-83/092).
EPA. 1977. User's Manual for Single-Source (CRSTER) Model. U.S.
Environmental Protection Agency, Research Triangle Park, North Caro-
lina (EPA-450/2-77-013).
EPA. 1979. Industrial Source Complex (ISC) Dispersion Model User's
Guide, (EPA/DF-80/003A and 003B; EPA-450/4-79-030).
EPA. 1980. User's Guide for MPTER, A Multiple Point Gaussian Dispersion
Algorithm with Optional Terrain Adjustment. U.S. Environmental Pro-
tection Agency, Research Triangle Park, North Carolina (EPA-600/8-80-
016).
EPA. 1986. Guidelines on Air Quality Models (Revised). U.S. Environ-
mental Protection Agency, Research Triangle Park, North Carolina
(EPA-450/2-86/027).
87180 9f
155
-------
Foster Associates. 1979. "A Statistical Study of Coal Sulfur Variability
and Related Factors." Washington, D.C.
Hillyer, M. J., and C. S. Burton. 1980. "The ExEx Method: Incorporating
Variability in Sulfur Dioxide Emissions Into Power Plant Impact Assess-
ment." Systems Applications, Inc., San Rafael, California (SAI No. 80-
80R2).
Johnson, N. L. and S. Kotz. 1970. Continuous Um'variate Distributions-1.
Wiley, New York.
87180 9f
156
-------
GLOSSARY
In describing and applying the ExEx System it is necessary to assign pre-
cise meaning to a number of terms, some of which are not normally used in
air quality analysis. These terms and their definitions as used in this
manual are summarized here as an aid to the reader.
COMPLIANT EMISSION DISTRIBUTION. A distribution of emission rates that
results in the calculation of a maximum expected exceedance rate less
than, or equal to, a desired value.
COVARYING SOURCES. Sources that are assigned the same randomly sampled
emission rate (expressed in Ib S02/MMBtu) during each averaging time
period- Covarying sources are assigned to the same source group.
EXCEEDANCE. An occurrence of a concentration greater than that specified
in an air quality standard or goal.
EXPECTED EXCEEDANCE (Expected Exceedance Rate). The sum of the probabili-
ties of exceedance across all averaging periods (hours or days) in a
year. An expected exceedance rate of E can be interpreted as meaning
that approximately N-E exceedances will occur in an N-year period.
The approximation becomes more exact as N gets larger.
GEOMETRIC MEANS (GM) AND GEOMETRIC STANDARD DEVIATION (GSD). If Y = In X
is a normally distributed random variable with mean y and variance
a2, then X is lognormally distributed with GM = ey and GSD = e°.
INDEPENDENTLY VARYING SOURCES. Sources that are assigned emissions
(expressed in Ib S02/MMBtu) independently of one another in each
averaging time period. Independently varying sources are each
assigned to different source groups.
MAXIMUM EXPECTED EXCEEDANCE (MEE) RATE. The largest of a set of expected
exceedances defined over a network of receptor sites.
MAXIMUM PROBABILITY OF VIOLATION (MPOV). The largest of a set of proba-
bilities of violation over a network of receptor sites.
87180 9r
157
-------
METEOROLOGICAL YEAR. A continuous 12-month period, usually running from
January through December, for which dispersion model results are
available.
MMBtu. One million British thermal units (Btu).
NORMALIZED CONCENTRATION. A concentration (x/q) (usually predicted by a
dispersion model) divided by the emission rate of the source that
caused it. Thus, a normalized concentration is the concentration
that would be produced by a source when operating at a unit emission
rate.
PROBABILITY OF VIOLATION (POV). The probability of exceeding an ambient
concentration level more than some specified number of times in a
year. (More than once per year is a commonly used definition of vio-
lation.) The probability of violation at a receptor is estimated by
dividing the number of sample-years in which a violation was simula-
ted by the total number of sample years.
SAMPLE-YEAR. A simulated 12-month period.
SINGLE-SOURCE EFFECTS. Exceedances and violations due to the impact of
just one source.
SOURCE GROUP. One or more sources with covarying emissions. If sources
have independently varying emissions, they are assigned to separate
source groups.
SYNERGISTIC EFFECTS. Exceedances and violations caused solely by the com-
bined impact of two or more sources, i.e., events in which the impact
of any one source is by itself not enough to cause an exceedance or
violation but in which the combined impacts from multiple sources are
sufficient to cause the exceedance or violation.
VIOLATION. The occurrence of more exceedances in a year than is allowed
by an air quality goal or standard.
158
-------
Appendix A
SPECIAL CONSIDERATIONS IN RUNNING A DISPERSION
MODEL FOR USE WITH THE ExEx SYSTEM
87180 6
-------
Appendix A
SPECIAL CONSIDERATIONS IN RUNNING A DISPERSION
MODEL FOR USE WITH THE ExEx SYSTEM
Any atmospheric dispersion model that produces an output file of 1-, 3-,
or 24-hour average S02 concentrations at an array of receptors can, in
principle, be used in conjunction with the ExEx methodology. The ExEx
System is currently set up to use results from any of three EPA guideline
models: CRSTER (EPA, 1977), MPTER (EPA, 1980), and ISCST (EPA, 1979,
1987r). As knowledge of these models is presumed, they are not described
in detail here. In order to use these with the ExEx System, certain
options for the averaging period(s) and sources must be activated. These
options are listed in Table A-l and described in Section 1.2. A special
emission rate must also be used; the procedure for calculating this rate
is described in Section 1.1. When running a dispersion model for use with
the ExEx Systems, only full years of meteorological data may be used as
input. For additional information, the reader may refer to the user's
manual of the appropriate dispersion model.
1.1 CALCULATION OF UNIT EMISSION RATES FOR USE WITH ExEx
When exercising a dispersion model for use with the ExEx System the user
must specify the S02 emission rate for each source (in grams per second)
that would result from burning coal containing an amount of sulfur which
produced one pound of SOo for every million Btu (MMBtu) of energy
released. Running the dispersion model with this emission rate will yield
a set of ground-level concentrations normalized to an emission rate of 1
Ib S02/MMBtu. These concentrations are also referred to as x/q values.
They can be directly multiplied by an emission rate stated in Ib S02/MMBtu
to obtain the ground-level S02 concentration that would be predicted under
the given emissions. The required unit emission rate, q, is given by:
q = 0.126HP
where
q = unit emission rate (g S02/s)
H = the plant heating rate (MMBtu/MW-h)
P = the electric power generated by the unit (MW)
87180 6 A-l
-------
For example, if a 500 MW power plant is to be modeled and the plant heat-
ing rate is 9.00 MMBtu/MW-h, then the emission rate to be specified in the
dispersion model is
(0.126)(9.00)(500) = 567 g/s .
When this emission rate is specified in the input, the model will calculate
concentrations that are normalized to an "emission rate" of 1 Ib SOo/MMBtu.
Thus, if the plant's fuel quality is such that it produces 2.5 Ib S02/MMBtu,
then the predicted concentrations under this emission rate can be found
simply by multiplying the normalized concentrations obtained with the 567
g/s emission rate by 2.5.
1.2 DISPERSION MODEL OPTIONS TO ACTIVATE
The ExEx Preprocessor accepts binary output only. Appropriate options to
specify in the dispersion model to obtain the necessary binary output
(sometimes referred to as "tape" output) are identified in the following
paragraphs_as well as in Table A-l. The dispersion models can be run with
a number of different output options and averaging times. When exercising
these dispersion models for use with the ExEx System, the user must
specify only 1-, 3-, and/or 24-hour averaging periods where applicable.
If the models are run with other averaging periods as well, the preproces-
sor will read incorrect concentrations for a given averaging period. A
brief discussion of each model follows. Variable names in capital letters
and options described below refer to inputs to the dispersion model that
must be specified by the user. Additional information on dispersion model
inputs can be found in the appropriate User's manual.
CRSTER
Averaging Period. CRSTER automatically calculates 1- and 24-hour average
concentrations for each receptor. If CRSTER output is used with ExEx, the
option for additional averaging periods should not be activated.
Sources. CRSTER can accept up to 19 stacks. All stacks are treated
together as a single source in CRSTER, i.e., individual source contribu-
tions are not output.
Output. By setting ITAP = 1, all 1- and 24-hour concentrations for each
receptor will be output into a single file in binary format.
871806 .
-------
TABLE A-l. Dispersion model options for obtaining
binary output for use with the ExEx System. (For
more Information on dispersion model options, see
appropriate user's manual.)
Dispersion
Model Option Value Output
CRSTER3
ITAP=1
1-hour and 24-hour aver-
ages on magnetic tape.
MPTERb
IOPT(21)=1 Hourly Individual source
contributions.
IOPT(23)=1 n-hour average sum of
source concentrations.
ISCSTC
ISW(5)=1
All specified averages
by source group.
a "User's Manual for Single Source (CRSTER) Model"
(EPA-450/2-77-013, EPA-600/8-86/041).
b "User's Guide for MPTER, a Multiple Point Gaussian
Dispersion Model" (EPA-600/8-80-016).
c "Industrial Source Complex (ISC) Dispersion Model
User's Guide" (EPA-450/4-86-005a,5b).
67180
A-3
-------
MPTER
Averaging Period. MPTER automatically generates a binary file of 1-hour
averaging periods. If a 24-hour averaging period is desired, the user
must set NAVG to 24 and NPER to the number of days in the meteorological
record. MPTER will generate both 1- and 24-hour averaging periods if this
is done. The ExEx System has not been designed to accept 3-hour averaging
periods from MPTER. If 3-hour averaging periods are desired, the user
must run CRSTER (and have the ExEx preprocessor create 3-hour averages) or
ISCST.
Sources. MPTER can output individual source contributions for up to 25
point sources, although no more than six sources can be used in any single
ExEx run. Individual source contributions are written only for 1-hour
averaging periods. Enter the number of sources in NSIGP on card 4. No
other source-related options need be specified.
Output. Option 21, if activated (set to 1), will direct the MPTER program
to write partial concentrations to disk. The concentration produced by
each individual source at each individual receptor for each hour will be
written on_file unit 10. Note that individual source contributions are
written only for 1-hour averaging period.
ISCST
Averaging Period. Options ISW(7) - ISW(14) allow the ISCST user to com-
pute average concentrations for up to eight averaging periods. To obtain
3-hour averages, set ISW(9) to 1. To obtain 1-hour averages, set ISW(7)
to 1. To obtain 24-hour averages, set ISW(14) to 1. If some combination
of 1-, 3-, and/or 24-hour averages is desired (for example, the user is
expecting to run ExEx once for 3- and once for 24-hour averages), set
appropriate options to 1. Do not set options 8, 10, 11, 12, or 13 to 1.
Sources. ISCST can calculate the individual contributions of one or more
source groups. A source group consists of one or more sources defined by
the user. The contribution of each group as defined by ISCST will be
written to the disk when ISW(5) is set to 1. The number of sources within
a group will not matter to the ExEx System since the output will represent
the combined impact of all sources in the group. For example, a group in
ISCST may have three sources (for instance a plant with three units).
This group of three sources will be output as one source group by ISCST,
and thus be treated as one source by the ExEx Preprocessor. The number of
source groups is entered in NGROUP. The number of sources in each group
is listed in the array NSOGRP, and the source identification numbers are
provided by the user in array IDSOR.
A-4
87180 6
-------
Output. To write output in binary format onto disk or magnetic tape, set
ISW(5) ("output tape" option) to 1. The variable named ITAP is used for
entering the Fortran logical unit number of the output. ITAP should be
set to the desired output file unit number.
A-5
87180 6
-------
Appendix B
DEVELOPMENT OF AN ANALYTICAL METHOD FOR
CALCULATING EXPECTED EXCEEDANCES
87180 6
-------
Appendix B
DEVELOPMENT OF AN ANALYTICAL METHOD FOR
CALCULATING EXPECTED EXCEEDANCES
This appendix describes the theoretical development of the analytical
method used in the single- and covarying-source applications of the ExEx
Program. This method can be applied only to single-source or single-
source group (covarying) situations. Calculations of expected exceedances
for multiple-source groups (where sources in different groups exhibit
independently varying emissions) requires the use of the Monte-Carlo pro-
cedure described in Chapter 2.
For purposes of simplicity, 24-hour average concentrations are used to
illustrate the development of the method. Expressions for other averaging
periods are directly analogous to those shown here.
EXPECTED EXCEEDANCES
The ExEx method is based on the computation of the number of times in a
year an applicable S02 ambient air quality standard (referred to subse-
quently as "the standard") is exceeded at a location in the vicinity of an
S02 source. The number of exceedances at a given location is not a fixed
number. It varies with meteorological conditions and variations in the
sulfur content of the fuel (coal) as it is burned. Meteorological factors
account for the degree of dispersion of S02 emitted from the source. Fuel
sulfur content determines the rate of S02 emissions (assuming constant
operating conditions, i.e., load). A dispersion model is used in conjunc-
tion with the ExEx Program to account for meteorological effects on
exceedances. Variations in fuel quality are handled by treating the S02
emission rate as a random variable.
The probability of observing an S02 concentration above the standard on
day i is denoted p^. The random variable appropriate to this situation is
X.j, a binomial variable that takes the value 1 if an exceedance occurs on
day i, and 0 if no exceedance occurs. Thus the random variable takes on
the value 1 with probability p^ and the value 0 with probability (1 - p^),
and its expectation is given by
87180 6
-------
E(X.) = p. . (1)
The total number of exceedances in a year is given by
365
The expected number of exceedances in a year (the expected exceedance
rate) is thus given by
365 365 365
E £ Xi = £ E(X.) = £ Pi - (2)
1=1 1=1 1=1
In other words, the expected exceedance rate is simply equal to the sum of
the expected exceedances for all time periods during the year.
DAILY -PROBABILITIES OF EXCEEDANCE
Having derived an expression for the expected exceedance rate in terms of
the daily probabilities of exceedance, it is now necessary to derive an
expression for the daily probabilities of exceedance based on the predic-
tions of an atmospheric dispersion model combined with a knowledge (known
or assumed) of the probability distribution of 862 emissions or coal sul-
fur content. This derivation will require the assumptions that (1) the
ground-level concentrations predicted by the dispersion model are directly
proportional to the emission rate, and (2) emission rates are not correla-
ted with atmospheric dispersion conditions. The first assumption makes it
possible to use the dispersion model to calculate a normalized concentra-
tion, (x/q)-j» for any day i such that the concentration for that day,
assuming an emission rate Q, is
Xi = Q (x/q)i (3)
Given a distribution of emission rates, the probability of observing an
exceedance of the standard level, STD, on day i is desired:
Pi = Pr (Xi > STD) .
Since for any day i, (x/q)1 is fixed, Eq. 3 gives
Pi = Pr(xi > STD) = Pr(Q > 5.) (4)
87180 6 B-2
-------
where c. , the critical emission rate, is merely the minimum emission rate
needed to produce a violation:
- STD/(x/q)
1
By the definition of the probability density distribution of emission
rates, f(q),
Pr(Q > Cj) - j"00 f(q) dq
and so from Eq. 4,
Pi = / f(q) dq . (5)
Equation 5 allows the calculation of the individual daily probabilities of
exceedance given the predictions of a dispersion model and a statistical
distribution of emission rates. These can in turn be used in Eq. 2 to
calculate the expected exceedance rate.
87180 6 B-3
-------
Appendix C
CONVERSION OF EMISSION RATE UNITS OF MEASURE
87180 6
-------
Appendix C
CONVERSION OF EMISSION RATE UNITS OF MEASURE
The following definitions and formulas should be useful to the ExEx model
user when performing various conversions involving coal sulfur content and
emission rates. In deriving these formulas it was assumed that all of the
sulfur in the coal is oxidized to form S02 when the coal is burned. This
assumption is made here for the sake of simplicity. In most cases an
allowance must be made for the fraction of sulfur remaining in the coal
ash.
Definitions:
W = sulfur content of coal (% sulfur by weight)
E = energy content of coal (in MMBtu/lb coal; 1 MMBtu = 1 x 106 Btu).
f = plant efficiency factor (unitless, always < 1)
H = plant heating rate (in MMBtu/MWh)
P = electric power output (in MW)
Q = rate of emission of S02 (g/s)
Q1 = amount of S02 emitted by burning coal of unit heat content
(Ib S02/MMBtu)
If the quantities defined above are expressed in the indicated units, then
the following relations hold:
H = 3.416/f
Q = 2.52 x 10"3 WHP/E = 0.126 Q1 HP
Q1 = 0.02 W/E
87180 6 C-l
-------
Appendix D
INSTALLATION OF THE ExEx SYSTEM ON OTHER COMPUTERS
87180 6
-------
Appendix D
INSTALLATION OF THE ExEx SYSTEM ON OTHER COMPUTERS
All of the ExEx model codes described in this guide are compatible with an
IBM model 3090/300 computer using the TSO FORTRAN version 2 compiler. The
models can be adapted without major modification to run on any minicompu-
ter or mainframe that has Fortran 77 capabilities. Some features of the
models that require special attention when making conversions to other
computers are discussed below.
SAVE BUFFER SIZE
When installing the ExEx System on other computers, the optimal save buf-
fer size must be entered for the variable MBSAVE in the INSERT file (see
Appendix E and Table E-l). For the IBM 3090 System an additional variable
called MWVRD is entered in bytes. Transfer to other machines may require
that this variable be in words.
GENERATION OF RANDOM NUMBERS
The random number generator used in ExEx (called RANDNO) should be port-
able without modification. This is possible because it is written in For-
tran. The program has produced identical results on a CDC 7600, a Univac
1110, an IBM 3090/300, and a Prime 750 computer. The main routine of ExEx
has a seed for this generator, so none need be supplied by the user.
Because the routine uses only the low-order 16 bits of the integer arrays,
conversion to machines with only two-byte integer variables is possible.
Conversion instructions are provided in comment statements included in the
RANDNO source code.
With the starting seed as given in the code of the main program of each
ExEx model, the first 100 random numbers produced are listed in Table
D-l. These values should be compared with those generated by the routine
after conversion.
87180 6
-------
OUTPUT
In most cases no modifications in output formats should be necessary to
adapt the ExEx program to other computers. Output may be in upper case or
lower case, depending on the computer system. All output is on FORTRAN
logical unit 12. This is a standard FORTRAN printer file that places
carriage control commands in column 1.
87180 6
D-2
-------
TABLE D-l. List of the first 100 random numbers generated by the
RANDNO routine. Numbers are ordered across the page from left to
right and then down, starting in the upper left corner.
.95263672
.00115967
,09298706
.B93659B6
66714476
12246704
7B723145
72119141
36171387
24749756
65112305
16729736-
71923B28
47586060
164672B5
54916362
BOB65479
79016113
59945679
57107544
,O4324341
O2609253
67142944
39605713
63598633
44433594
58145142
48049927
26190166
19982910
63256B36
49572754
16677856
77395630
50292969
O1416016
30459595
38641357
22253418
60534666
. B7026978
. 91995239
.10562134
.01342773
.66549683
.19049072
. OOO54932
. 92599487
.37121582
.67318726
.64210205
.91308594
.77606201
.20532227
.49810791
., 98696899
-. 23684692
. 61734009
. 50143433
. 04769897
42489624
64533691
01167134
45022563
68588257
81091309
36764526
24462891
62683105
10388164
34347534
97247314
30078125
52343750
49002075
33981323
75674438
38903809
24917603
00402832
. O550B423
.02517700
. 28524760
.74609375
.46974609
.02667236
.02734375
.72546387
.24417114
. 67214966
. 05291746
. 34255981
.61724854
. 60609326
..67575073
.44526196
. 33496094
.37911987
.47286967
.45686230
D-3
-------
Appendix E
OVERVIEW OF THE ExEx COMPUTER PROGRAM
87180 6
-------
Appendix E
OVERVIEW OF THE COMPUTER PROGRAM
The ExEx Program is written in Fortran 77 language for execution on an
IBM. It is composed of a main program, ten major subroutines (GETINP,
CHKDAT, SETUP, GETDAT, MODEL1, MODEL2, MODELS, MODEL4, MODELS, and
MODEL6), and a number of other subroutines.
The main program simply writes headers and titles, calls the subroutines,
and establishes values for nine preset parameters used in each subroutine
in the ExEx Program. These provide maximums for such variables as the
number of sources or source groups and the number of receptors. One
(MBSAVE) gives the optimal memory capacity for the computer running the
ExEx System. For the IBM system this capacity is set at 4095. If the
ExEx System is installed on a different computer system, this number
should be changed accordingly. These parameters are listed in Table E-l.
GETINP reads the input parameter file and echos the inputs in a convenient
format for output, listing their values and the options that have been
activated. The inputs are compared to default maximum values; if these
limits are violated, the program stops and error messages are written.
It is also in this subroutine that ExEx tests to see which mode (i.e.,
single-source group, multiple-source group, or iterative mode) it will be
operating in.
Subroutine CHKDAT reads the header records of the ExEx Preprocessor out-
put. The header records contain the title of the dispersion model run,
the years of meteorological data, the number of sources, the number of
receptors, the receptor grid type, the number of averaging periods, and
the value used to screen out small concentrations from the dispersion
model results.
87180 6f
-------
TABLE E-l. Preset parameters. Nine control parameters in the ExEx
source code are preset to certain values. These can easily be changed.
To change any of the following values, the user may substitute the desired
values in the appropriate section of the code (see line 519). When doing
this, care should be taken to observe instruction and guidance contained
in program COMMENT statements. The ExEx System is currently supported for
the values listed here.
Variable
Description
MSIM The maximum number of simulations per sampling year (see
description for NSIM in Section 3.2.3). Value is currently
set at 1999.
MSRC The maximum number of emissions sources, currently set to 6.
MGRP The maximum number of emission source groups, currently set
J:o 6.
MYEAR The maximum number of years of dispersion model results that
can be used, currently set at 6.
MREC The maximum number of receptors (currently set to 200).
MQ The maximum number of values to use for one parameters to
calculate the other in iterative mode (see desription of NQ1 in
Table 3-4). Value currently is 20.
MITER Maximum number of iterations for iterative mode (currently
set to 99).
MBSAVE The number of screened x/q values in a save buffer. This
should be set according to the memory capacity of the buffers
in the host computer (currently set to 4095).
NVIOL Number of exceedances constituting a violation (currently
set to 2).
87180
E-2
-------
Subroutine SETUP prepares the above parameters for later use. It computes
the effective standard concentration by subtracting the background concen-
tration from the standard concentration. It then sorts the sources in the
preprocessor results by source group number, using the subroutine SORTI
and an internal file for a temporary buffer. SETUP calculates the minimum
x/Q, the cutoff value used in screening the preprocessed results for all
values that are unlikely to cause an exceedance. If this value is less
than the value used in the preprocessor, a warning message will be
printed. The size of the concentration buffer to be used is also estab-
lished by SETUP. This is a ceiling on the number of data that can be
stored in memory without splitting the source group. A temporary file is
also prepared to store any overflow of concentration data. Finally, SETUP
determines how many tables of output to fit on each page when long output
options have been requested.
The subroutine GETDAT reads the preprocessed dispersion model results and
screens them to limit memory storage requirements. Two subroutines are
used for reading the ExEx Preprocessor results: DATA1 retrieves the data
for the independently varying sources applications and DATA23 gets the
data for the other four applications.
The subroutines MODEL1 (multiple source groups) and MODEL2 (single source
groups) calculate maximum expected exceedances and expected exceedances by
receptor, and print the results. In MODEL1 the routine EXEX1 calculates
the expected exceedance arrays and the maximums using a Monte Carlo simu-
lation. Random numbers are generated with the routine RANDNO. A random
sample of concentrations from a lognormal population is generated in the
subroutine SAMPLE. MODEL2 calls the routine EXEX23, which finds the
expected exceedances for single-source groups using the analytical proce-
dure derived in Appendix B. MODEL3 calculates compliant distributions.
It also uses the routine EXEX23. The three model routines call the rou-
tines HEADER and WREXEX for writing results to the output file.
The subroutine ERROR prints all error and warning messages.
87180 6 E-3
-------
Appendix F
LISTING OF THE ExEx PREPROCESSOR AND PROGRAM CODES
87180 6
-------
ExEx PREPROCESSOR CODE
87180
-------
CDECK
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
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
PRE-EES
PREEES
VERSION
{PREPROCESSOR FOR EXEXS PROGRAM)
1.00
1.01
PRIME F77
IBM 3090 VS
FORTRAN 2
M.C. DUDIK / T.
CREATED - AUG
TRANSFER - JAN
STOCKING
1986 -
1988 -
WITH PRIME 750 PRIMOS
TO EPA'S NCC IBM 3090
F77
SYSTEMS APPLICATIONS,
101 LUCAS VALLEY ROAD
SAN RAFAEL, CA 94903
INC.
i
(415)
!
i
PRE-EES IS A PRE-PROCESSOR FOR CHI/Q
DISPERSION MODELS FOR INPUT TO EXEX.
AND ISCST. THIS PROGRAM IS
24-HOUR AVERAGING PERIODS.
CONSIDERATIONS FOR RUNNING
SYSTEM' IN THE EXEX USER'S
DISPERSION MODE OPTIONS:
-- CRSTER --
AVERAGING PERIOD: CRSTER AUTOMATICALLY CALCULATES 1- AND 24-HOUR
CONCENTRATIONS FOR EACH RECEPTOR. IF CRSTER OUTPUT WILL BE USED WITH
EXEX, DO NOT ACTIVATE THE OPTION FOR ADDITIONAL AVERAGING PERIODS.
DESIGNED
REFER TO
THE DISPERSION
GUIDE.
BINARY FILES FROM UNAMAP5
THESE MODELS ARE CRSTER, MPTER
TO HANDLE 1-HOUR 3-HOUR AND
THE SECTION TITLED 'SPECIAL
MODEL FOR USE WITH THE EXEX
SOURCES: CRSTER CAN ACCEPT UP TO 19 STACKS.
TREATED AS COMPRISION A SINGLE SOURCE.
THESE ARE ESSENTIALLY
OUTPUT: BY SETTING ITAP=1, ALL 1- AND 24-HOUR CONCENTRATIONS FOR
EACH RECEPTOR WILL BE OUTPUT ONTO A SINGLE FILE IN BINARY FORMAT
-- MPTER --
AVERAGING
AVERAGING
PERIOD: MPTER AUTOMATICALLY GENERATES A BINARY FILE OF 1-HOUR
PERIODS. IF A 24-HOUR AVERAGING PERIOD IS DESIRED, SET NAVG=24
AND NPER TO THE NUMBER OF DAYS IN THE METEOROLOGICAL RECORD. MPTER WILL
GENERATE BOTH 1- AND 24-HOUR AVERAGING PERIODS IF THIS IS DONE.
SOURCES: MPTER CAN OUTPUT INDIVIDUAL
POINT SOURCES BUT ONLY 1 TO 6 SOURCES
NUMBER OF SOURCES IN NSIGP ON CARD 4.
NEED BE SPECIFIED.
SOURCE CONTRIBUTIONS FOR UP TO 25
CAN BE DEFINED IN EXEX. ENTER THE
NO OTHER SOURCE-RELATED OPTIONS
OUTPUT: OPTION 21, IF ACTIVATED (SET TO 1) WILL DIRECT THE MPTER
PROGRAM TO WRITE PARTIAL CONCENTRATIONS TO DISK. THE CONCENTRATION
PRODUCED BY EACH INDIVIDUAL SOURCE AT EACH INDIVIDUAL RECEPTOR FOR EACH
HOUR WILL BE WIRTTEN ON FILE UNIT 10. NOTE THAT INDIVIDUAL SOURCE
CONTRIBUTIONS ARE WRITTEN ONLY FOR 1-HOUR AVERAGING PERIODS.
F-2
-------
CDECK PRE-EES
Page
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
OPTION 23 CAUSES 1- OR 24-HOUR CONCENTRATIONS SUMMED FOR ALL SOURCES
TO BE WRITTEN ON UNIT 13.
-- ISCST --
AVERAGING PERIOD: OPTIONS 1SH(7) THROUGH ISW(14) ALLOW THE ISCST USER
TO COMPUTE AVERAGE CONCENTRATIONS IN UP TO 8 TIME PERIODS. TO OBTAIN
1-HOUR AVERAGES, SET ISW(7)=1. TO OBTAIN 24-HOUR AVERAGES SET ISW(14)=1.
IF BOTH 1- AND 24-HOUR AVERAGES ARE DESIRED, SET BOTH TO.l. DO NOT
ACTIVATE ISW(8) THROUGH ISW(13)
SOURCES: ENTER THE NUMBER OF SOURCES TO BE CONSIDERED IN EXEX IN
NGROUP FOR THE ISCST RUN. THE CONTRIBUTION OF EACH GROUP AS DEFINED BY
ISCST WILL BE OUTPUT ON DISK WHEN ISW(5)=1. NGROUP MUST BE BETWEEN 1
AND 6. THE ACTUAL NUMBER OF SOURCES IN A GROUP WILL NOT MATTER SINCE
THE OUTPUT WILL REPRESENT THE COMBINED INPACT OF ALL SOURCES IN THE
GROUP. FOR EXAMPLE, A GROUP IN ISCST MAY HAVE 3 SOURCES (FOR INSTANCE
A SOURCE WITH 3 UNITS). THIS GROUP OF 3 UNITS WILL BE OUTPUT AS ONE
SOURCE GROUP BY ISCST, AND TREATED AS ONE SOURCE BY THE EXEX PREPROCESSOR.
THE NUMBER OF SOURCES IN EACH GROUP IS LISTED IN THE ARRAY NSOGRP, AND THE
SOURCE IDENTIFICATION NUMBERS ARE PROVIDED BY THE USER IN ARRAY IDSOR.
OUTPUT: TO WRITE OUTPUT IN BINARY FORMAT ONTO DISK OR MAGNETIC TAPE, SET
ISW(5)=1 ('OUTPUT TAPE1 OPTION). THERE IS A VARIABLE NAMED ITAP WHICH
IS USED FOR ENTERING FORTRAN LOGICAL UNIT NUMBER OF THE OUPUT. SET ITAPTO
DESIRED OUTPUT FILE UNIT NUMBER.
PRE-EES USER INPUTS:
- CARD 1 -- FORMAT (80A)
TITLE : USERS TITLE FOR PRE-PROCESSED CHI/Q FILE
- CARD 2 -- FORMAT (6A)
MODEL : NAME OF DISPERSION MODEL WHICH CREATED CHI/Q FILE
= "CRSTER"
= "MPTER"
= "ISCST"
-- CARD 3 -- FORMAT (2I5.F10.0)
1980;
IYEAR : YEAR OF DATA USED FOR MODEL RUN, FORM IS YYYY (E.G.
IAVPER : AVERAGING PERIODS DESIRED FOR PRE-PROCESSED OUTPUT
= 1 OR 24
CCUT : CUT-OFF VALUE FOR SCREENING, ALL CONCENTRATION GREATER THAN
OR EQUAL WILL BE OUTPUT. UNITS ARE G/M3
. CARD 4 -- FORMAT (515), MPTER SPECIFIC INPUTS --OMIT OTHERWISE
MOPT21 : OPTION 21 WAS USED TO GENERATE 1 HOUR CHI/Q OUTPUT
= 0 OR 1
MOPT23 : OPTION 23 WAS USED TO GENERATE 24-HOUR CHI/Q OUTPUT
= 0 OR 1. NOTE: ONLY MOPT21 OR 23 MAY BE SET, NOT BOTH!
F-3
-------
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
1 30
L J J
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
Q
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
INGRD
INSRC
INX
-- CARD 5 -
IOPT7 :
IOPT14 :
INGRD :
INGRP :
INX :
INY :
INW :
: GRID TYPE USED FOR MODEL RUN
= 1 POLAR
= 4 POLAR WITH DISCRETE
: NUMBER OF SOURCES
: NUMBER IN X-DIRECTION
- FORMAT (715), ISCST SPECIFIC INPUT --OMIT OTHERWISE
OPTION 7 WAS USED IN GENERATING 1-HOUR CHI/Q OUTPUT
= 0 OR 1
OPTION 14 WAS USED IN GENERATING 24-HOUR CHI/lJ OUTPUT
= 0 OR 1 (NOTE: BOTH OF THESE OPTION MAY BE TURNED ON)
GRID TYPE USED FOR MODEL RUN
= 1 POLAR
= 2 RETANGULAR
= 3 DISCRETE
= 4 POLAR WITH DISCRETE
= 5 RETANGULAR WITH DISCRETE
NUMBER OF SOURCE GROUPS, ISCST DOESN'T HANDLE
SINGLE SOURCES WITHIN THE GROUP
NUMBER OF X-DIRECT10NS OR AZIMUTHS
NUMBER OF Y-DIRECTIONS OR RINGS
NUMBER OF DISCRETE
SUBROUTINE LIST:
PREEES
CDATA
CHEAD
IDATA1
IDATA2
IHEAD
LEAP
MDAT21
MDAT23
MHEAD
PRECRT
PREISC
PREMPT
WRDATA
WRHEAD
COMMON
INPT
MAIN ROUTINE, READS USER INPUTS TO PRE-PROCESSOR AND
DOES SOME CHECKING ON THE FILE UNITS
READ AND SCREENS CRSTER CHI/Q BINARY FILE
SET HEADER RECORD FOR CRSTER PRE-EES RUN
READS AND SCREENS ISCST CHI/Q BINARY FILE FOR EITHER
1- OR 24-HOUR AVERAGES BUT NOT BOTH
READS AND SCREENS ISCST CHI/Q BINARY FILE CONTAINING BOTH
1. AND 24-HOUR AVERAGES BUT OUTPUTS ONLY AVERAGING PERIOD
USER SETS IN IAVPER INPUT
READ AND SETS HEADER RECORD FOR ISCST PRE-EES RUN
FUNCTION RETURNS 1 OR 0 FOR LEAP YEAR DAYS
READS AND SCREENS MPTER CHI/Q BINARY FILE GENERATED BY
OPTION 21
READS AND SCREENS MPTER CHI/Q BINARY FILE GENERATED BY
OPTION 23
READS AND SET HEADER RECORD FOR MPTER PRE-EES RUN
CALLING ROUTINE FOR PROCESSING CRSTER DATA
CALLING ROUTINE FOR PROCESSING ISCST DATA
CALLING ROUTINE FOR PROCESSING MPTER DATA
10 ROUTINE FOR WRITING SCREENED DATA TO DISK
10 ROUTINE FOR WRITING HEADER RECORD FOR PREPOCESSED
DATA FILE FOR EXEX
BLOCKS:
: CONTAINS 10 UNIT PARAMETERS, MAXIMUM DIMENSIONING
PARAMETERS AND INPUT VARIABLE. SEE CODE INSERT FOR
DESCRIPTION OF VARIABLES
F-4
-------
CDECK PRE-EES
Page
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
OUTP : CONTAINS OUTPUT VARIABLES FOR HEADER AND THE
INDEX-CONC ARRAYW. SEE CODE INSERT FOR DESCRIPTION
OF VARIABLES.
CODING COMMENTS:
MACHINE SPECIFIC
CSAI - PRIME
CEPA - EPA'S
CODE BEGIN
50 SERIES
UNIVAC
WITH
-- PRIME -- USES SAI FAST BINARY 10
$INSERT
LIST.NOLIST
DATE$A
TIMESA
VARIN.VAROUT
INSERT CODE SEGMENT, USED HERE FOR COMMON BLOCKS
INFORM COMPILER WHEN TO INCLUDE CODE IN LISTING FILE
AGAIN USED HERE IN COMMON BLOCK INSERTS
RETURNS SYSTEM DATE (SEE SUBROUTINE ADATE)
RETURNS SYSTEM TIME (SEE SUBROUTINE ADATE
SAI FAST BINARY 10 ROUTINES
-- UNIVAC -- USES FORTRAN BINARY 10
ADATE
INCLUDE
RETURNS SYSTEM DATE & TIME FORM
INSERT CODE SECTION, SEE PRIME SINSERT
DEVELOPMENT_LOG :
860730 PAULUS IRPAN
PREEES VERSION 1.0 PARTIAL
INITIAL DESIGN & CODING OF THE GENERAL STRUCTURE; COMPLETED THE
PART FOR CRSTER MODEL DATA.
092286 - MCD - SYSTEM REDESIGN OF MAIN PROGRAM AND CODING
TO PRE-PROCESS MPTER AND ISCST FILES. FIRST
DRAFT OF COMMENTS
PROGRAM PREEES
MAIN PROGRAM CODE FOR EXEX PREPROCESSOR
VARIABLES:
FN
ICRD
KODE
LOPEN
RUNDAT
C RETURNED FILE NAME ARGUMENT FOR INQUIRE
1 CARD NUMBER FOR READ FROM USER INPUTS
I RETURN KODE FROM CALL SUBROUTINES
L FILE UNIT OPEN FLAG
C SYSTEM DATE OF RUN ARG TO ADATE
F-5
?-S^ "f «
-------
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
?fi4
C. \J *1
265
266
267
268
269
270
?71
L. t ±
272
273
274
275
276
277
278
280
281
282
283
284
285
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
i C
i C
i C
C
C
C
C
C
C
C
C
r
C
RUNTIM C SYSTEM TIME OF RUN ARG TO ADATE
TRACE C TRACE IDENTIFIER FOR CODE VERSION
COMMON VARIABLES:
-- INPT --
CCUT READ FROM USER INPUT
IAVPER READ FROM USER INPUT (
INGRD READ FROM USER INPUT
INGRP READ FROM USER INPUT
INSRC READ FROM USER INPUT .
INW READ FROM USER INPUT '
INX READ FROM USER INPUT
INY READ FROM USER INPUT
IOPT14 READ FROM USER INPUT
IOPT7 READ FROM USER INPUT
HEAR READ FROM USER INPUT
MODEL READ FROM USER INPUT, USED TO BRANCH TO MODEL SPECIFIC
SUBROUTINES
MOPT21 READ FROM USER INPUT
MOPT23 READ FROM USER INPUT
TITLE READ FROM USER INPUT
SUBROUTINES CALLED BY:
NONE
SUBROUTINES CALLED:
ADATE - SUBROUTINE REPLACED BY SYSTEM SUB ON UNIVAC
PRECRT
PREISC
PREMPT
LOG:
09/09/86 -MCD- ORIGINAL CODING AND DOCUMENTATION
SINSERT *>INPT.COM
CEPA
CEPA
CEPA
C
r
L-
C
C
C
-
C
C
C
C
C
INCLUDE INPT. COM, LIST
DEFINE LOCAL VARIABLES
LOGICAL LOPEN
CHARACTER TRACE*42 , FN*64
CHARACTER*8 RUNDAT, RUNTIM
DATA TRACE / 'PRE-EES: verOl . 00-092286 run date & time: ' /
GET NAMES OF FILES FOR THIS RUN
--FIRST WE WANT TO CHECK AND MAKE SURE THE MESSAGE FILE IS OPEN
INQUIRE (IFMES,OPENED=LOPEN,NAME=FN)
F-6
-------
CDECK PRE-EES
Page
286
287
288
289
290
291
292
293
294
295
296
297
9QO
t- J \J
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
0 Q 1
332
333
334
335
336
337
338
339
340
341
342
1000
C
c
C
c
c
r
\i
C
1001
1002
1003
1004
1005
1006
c
p
c
Q
1010
c
c
Q
1011
IF (.NOT.LOPEN) THEN
WRITE (1,1000)
FORMAT (3X,1 OPEN THE POD BAY, HAL...')
GO TO 99"9
ENDIF
. MFSSAGF Fll F OPFN ^fl URITF PROGRAM TRAfF AND 1
PILJ-JrAUC. (ILL Urull J U If f\ 1 1 C r i\ U U i\ r\ Fl liNriWU r\PIU 1
DATE / TIME OF RUN
CALL ADATE (RUNDAT , RUNT I M) i
WRITE (IFMES,1 (//A, A, A) ') TRACE .RUNDAT , RUNT IM
rHFTK RFST f)F THF Fll F <\
w n c. L* ^ A L j i ur inc. r i i_ L j
INQUIRE (IFINP,OPENED=LOPEN,NAME=FN)
IF (.NOT.LOPEN THEN
WRITE (IFMES, 1001) IFINP
FORMAT (3X, '---INPUT PARAMETER FILE NOT OPEN ON UNIT ',13)
GO TO 999
ELSE
WRITE (IFMES, 1002) FN
FORMAT (3X, 'INPUT PARAMETER FILE : ' ,A)
ENDlF
INQUIRE (IFDAT,OPENED=LOPEN,NAME=FN)
IF (.NOT.LOPEN) THEN
WRITE (IFMES, 1003) IFDAT
FORMAT 3X, '---INPUT CHI/Q FILE NOT OPEN ON UNIT ',13)
GO TO 999
ELSE
WRITE (IFMES, 1004) FN
FORMAT (3X, 'INPUT CHI/Q FILE : ' ,A)
ENDIF
INQUIRE (IFOUT,OPENED=LOPEN,NAME=FN)
IF (.NOT.LOPEN) THEN
WRITE (IFMES, 1005) IFOUT
FORMAT (3X, '---PROCESSED DATA OUTPUT FILE NOT OPEN ON UNIT ',
& 13)
GO TO 999
ELSE
WRITE (IFMES, 1006) FN
FORMAT (3X, 'PROCESSED OUTPUT FILE : ' ,A)
ENDIF
_ READ INPUT PARAMETERS CHECKING FOR VALIDITY AS WE GO
MODEL SPECIFIC INPUTS ARE CHECKED ON ENTRY TO SUBROUTINE
WRITE (IFMES, 1010)
FORMAT (//3X,'PRE-EES INPUTS: )
-- CARD 1: TITLE
ICRD = 1
READ (IFINP, ' (A)1 ,ERR = 900) TITLE
WRITE (IFMES, 1011) TITLE
FORMAT (6X, 'TITLE: ' ,A)
-------
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
3fi4
JUT
365
366
367
368
369
370
371
372
373
374
375
T7fi
J I U
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
C
C
C
1012
C
C
C
1007
9000
1013
C
r
i*
C
C
1008
1014
C
r
u>
C
C
1009
1015
C
C
C
C
-- CARD 2: MODEL
ICRD = 2
READ (IFINP,' fA)',ERR=900) MODEL
WRITE (IFMES.1012) MODEL
FORMAT (6X, 'MODEL: ' ,A) (
-- CARD 3: YEAR, AVERAGING PERIOD, CUT-OFF VALUE,
ICRD = 3 '
READ (IFINP, 1007, ERR = 900) I YEAR, IAVPER.CCUT
FORMAT (2I5.F10.0)
IF (IAVPER.NE.1 .AND. IAVPER.NE.3 .AND. I AVPER. NE . 24 ) THEN
WRITE (IFMES.9000) IAVPER
FORMAT (3X,1--- IAVPER = ',15,' NOT VALID1)
GO TO 999
ENDIF
WRITE (IFMES.1013) I YEAR, IAVPER, CCUT
FORMAT (6X,1 IYEAR, IAVPER, CCUT: ' ,2I5,3X ,E10. 5)
PARD 4' MPTFR MODF! <\PFriFTr flPTlftkK
urti\u i nriLi\ nuuuu orLuirji* uriiuno
OMIT THIS CARD IF NOT RUN FOR MPTER
IF (MODEL. EQ. 'MPTER') THEN
ICRD = 4
READ (IFINP, 1008, ERR=900) MOPT21 .MOPT23, INGRD, INSRC, INX
FORMAT (515)
WRITE (IFMES.1014) MOPT21 .MOPT23 , I NGRD , I NSRC, I NX
FORMAT (6X,'FOR MPTER :' /8X ,' MOPT21 .MOPT23 : ',2I5/
& 8X, ' INGRD, INSRC, INX: ',315)
ENDIF
TARn S I^f^T MDDFI SPFCIFlf OPTION"?
U fl l\ LJ J 1OUOI PIUULL OruL'ltlLr U r 1 1 U li J
OMIT THIS CARD IF NOT RUN FOR ISCST
IF (MODEL. EQ. 'ISCST') THEN
ICRD = 5
READ (IFINP, 1009, ERR = 900) IOPT7 , IOPT9, IOPT14 , INGRD, INGRP,
& INX.INY.INW
FORMAT (815)
WRITE (IFMES.1015) IOPT7 , IOPT9 , IOPT14 , I NGRD , I NGRP ,
& INX.INY.INW
FORMAT (6X,'FOR I SCST : ' /8X , ' IOPT7 , IOPT9 , I OPT14 : ',3I5/
& 8X,1 INGRD, INGRP, INX.INY.INW: ',515)
ENDIF
OKAY LET'S GO DO IT
IF (MODEL. EQ. 'CRSTER') THEN
CALL PRECRT (KODE)
IF (KODE.LT.O) GO TO 999
ELSEIF (MODEL. EQ. ' ISCST') THEN
CALL PREISC (KODE)
IF (KODE.LT.O) GO TO 999
ELSE
F-8
-------
CDECK PRE-EES
Page
400
401
402
403
404
405
406
407
408
409
41 0
T 1 \J
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
C
C
C
1016
C
C
C
C
900
905
C
C
999
1017
C
CDECK
CSAI
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
Q
Q
c
c
CALL PREMPT (KODE)
IF (KODE.LT.O) GO TO 999
ENOIF
GEE THAT WAS SIMPLE, HOPE EVERYTHING WENT OKAY
WRITE (IFMES.1016) ,
FORMAT (3X,1 RUN COMPLETE')
STOP
_ ._ _ . JHF FND - -- '
WRITE (IFMES.905) ICRD
FORMAT (3X,1--- READ ERROR ON INPUT PARAMETER FILE1,
& ' ON CARD TYPE ' ,15)
WRITE (IFMES.1017)
FORMAT (3X,1 RUN ABORTED '''')
STOP
END
ADATE
SUBROUTINE ADATE (SYSDAT ,S YST IM)
SUB TO REPLACE UNIVAX SYSTEM SUBROUTINE ADATE
ARGS:
SYSDAT C SYSTEM DATE IN UNIVAC FORM MMDDYY
SYSTIM C SYSTEM TIME IN UNIVAC FORM HHMMSS
VARIABLES:
PRMDAT C PRIME SYSTEM DATE RETURNED FROM DATE$A
PRMTIM C PRIME SYSTEM TIME RETURNED FROM TIME$A
XD R ARG TO DATE$A
XDATE R SYSTEM DATE EQUIVALENCED BY PRMDAT
COMMON VARIABLES
-- A$KEYS --
PRIME SYSTEM APPLIB KEYS COMMON BLOCK
CALLED BY: PRE-EES. MAIN
SUBROUTINES CALLED:
DATE$A - PRIME -
TIME$A - PRIME -
LOG:
092286 - MCD - ORIGINAL CODING FOR PREVIOUS UNIVAC TO PRIME
WORK
-
F-9
-------
-1 -J 1
458
459
460
461
462
463
464
465
466
" v \f
467
468
469
470
471
472
473
474
475
476
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
4Q7
H J /
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
C
SINSERT SYSCOM>A$KEYS
C
C
r
C
C
C
C
C
C
1000
C
C
C
CSAI
999
CDECK
C
C
C
C FOR
C READ
C
C
C
p
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
REAL*8 XDATE.XD
CHARACTER*8 S YSDAT .SYSTIM, PRMTIM
CHARACTERM6 PRMDAT
EQUIVALENCE (XOATE , PRMDAT) '
1
SYSDAT = '
SYSTIM = ' '
ft FT PR T MF ^ V<;TFM RATF awn T T MF
----- UL.I r K 1 n L o T O 1 L n Unit HHU lint.
XDATE = DATE$A (XD)
CALL TIME$A (PRMTIM)
GET INTO FORM SUBS EXPECT
READ (PRMDAT, 1000) SYSDATfl : 2) ,SYSDAT(3:4) ,SYSDAT(5:6)
READ (PRMTIM, 1000 SYSTIM 1 : 2 .SYSTIM 3:4 .SYSTIM 5:6)
FORMAT (A2,1X,A2,1X,A2,2X)
RETURN
END
CDATA
SUBROUTINE CDATA (KODE)
CRSTER MODEL.
, SCREEN, & WRITE CONC DATA.
ARCS:
KODE I ERROR CODE RETURNED TO CALLING SUB
= 0 EVERYTHING OKAY
= -1 OOPS
VARIABLES:
COAT R DATA ARRAY READ FROM MODEL OUTPUT BINARY FILE
DUM R DUMMY VARIABLE TO SKIP 24-HOUR RECORD
I I LOOP INDEX ON READS
IH I LOOP INDEX, DO 110
IPER I LOOP INDEX OVER TIME PERIOD, DO 100
IREC I LOOP INDEX OVER RECEPTORS, DO 120
NPAIR I NUMBER OF INDX/CONC PAIRS TO BE WRITTEN
NSAV I CURRENT NUMBER OF PAIRS SAVE IN OUTPUT BUFFER ARRAY
F-10
-------
CDECK PRE -
Page
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
ceo
J J (-
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
^fiQ
3 U J
570
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
£
NTOT I TOTAL NUMBER OF PAIRS OF SCREENED DATA
COMMON VARIABLES:
-- INPT --
CCUT R CUT-OFF VALUES FOR SCREENING INPUT DATA
IAVPER I CHECK AVERAGING PERIOD (1 OR 24)
IFDAT P READ INPUT DATA FROM UNIT ,
IFMES P WRITE MESSAGE TO UNIT '
MXPAIR P SET LOCAL NPAIR VARIABLE
MXR P DIMENSION LOCAL VARIALBE COAT .
1
-- OUTP --
CONC R CONCENTRATION OUTPUT BUFFER ARRAY
INDX I INDEX OUTPUT BUFFER ARRAY
NPER I NUMBER OF TIME PERIODS
NREC I NUMBER OF RECEPTORS
CALLED BY: PRECRT
SUBROUTINES CALLED:
MOD INTRINSIC PRIME,
WRDATA
LOG:
09/15/86 -MCD- ORIGINAL CODING AND DOCUMENTATION
SINSERT INPT.COM
SINSERT OUTP.COM
CEPA
CEPA
CEPA
CEPA
£
L
p
£
£
C LOOP
£
£
£
£
£
c
c
p
c
INCLUDE INPT. COM, LIST
INCLUDE OUTP. COM, LIST
INTEGER I ,1PER,IREC,KODE,NPAIR,NSAV,NTOT
REAL CDAT(MXR),DUM,CD3(MXP),CDIN(MXR,MXP)
KODE = -1
TO READ, SCREEN, & WRITE INDEX + CONC DATA
NPAIR = MXPAIR
NSAV = 0
NTOT = 0
IF (IAVPER. EQ. 3) GO TO 200
DO 150 IPER = 1, NPER
READ A RECORD OF CONC DATA,
SKIP UNWANTED RECORD AS NECCESSARY.
IF GOT AN EOF THEN THE DATAFILE IS NOT OF FULL YEAR, NO GOOD!
-- GET THE 1 HOUR DATA
F-ll
-------
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
fi(14
u u *t
605
606
607
608
609
610
611
612
fi1 T
U 1 J
614
615
616
fi1 7
U 1 /
618
619
620
621
622
623
624
625
626
627
C
C
C
110
C
C
C
C
C
120
C
150
C
r
L*
C
C
200
225
C
r
i«
C
C
r
^
C
230
IF (IAVPER .EQ. 1) THEN
READ (IFDAT, END=900) (CDAT( I ) , 1=1 , NREC)
IF (MOD(IPER,24) .EQ. 0) READ (IFDAT) (DUM, 1=1 , NREC)
ELSE GET THE 24-HOUR AVERAGE DATA
ELSE ,
DO 110 IH = 1, 24
READ (IFDAT, END=900) (DUM, 1 = 1 , NREC)
CONTINUE
READ (IFDAT) (CDAT( I ) , 1=1 ,NREC) '
ENDIF
SCREEN USING THE CONC CUT-OFF VALUE (SAVE CONC DATA ONLY IF IT
IS >= THE CUT-OFF VALUE).
WHEN THE ARRAY OF SCREENED DATA IS FULL, OUTPUT & RESET IT
DO 120 IREC = 1, NREC
IF (CDAT(IREC) .GE. CCUT) THEN
NSAV = NSAV + 1
INDX(NSAV) = IPERMOOOOO + 1*1000 + IREC
CONC(NSAV) = CDAT(IREC)
IF (NSAV .EQ. NPAIR) THEN /* ARRAY IS FULL, OUTPUT & RESET
CALL WRDATA (KODE)
NTOT = NTOT + NSAV
NSAV = 0
ENDIF
ENDIF
CONTINUE
CONTINUE
GO TO 350
RFAD IN A HAY'S WORTH OF 1HR AND CAI C "^HR AVFRARFS
I\LrAU 111 M LJrAl «J n U IA 1 1 1 U 1 lllr\ nllU L. rA L C jni\ nVLl\riUL«J
IF THAT'SHAT THE USER ASKED FOR
CONTINUE
DO 325 ID = 1, NPER
DO 225 IH = 1, 24
READ (IFDAT, END=900) (CDIN( I , IH) , 1=1 ,NREC)
CONTINUE
SKIP 24HR AVERAGED RECORD
READ (IFDAT, END=900) (DUM , I =1 , NREC)
ffli r AVFRAGES
" L*ML-l* rAVl_r\flUL.-J
DO 300 IR = 1, NREC
IPCNT = 0
DO 230 IP = 1, 24, 3
IPCNT = IPCNT + 1
CD3(IPCNT) = 0.
AVG = 0.
AVG = CDIN(IR.IP) + CDIN(IR,IP+1) + CD I N ( I R , I P + 2)
CD3(IPCNT) = AVG*0. 33333
CONTINUE
F-12
-------
CDECK PRE-EES
Page
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
U U "
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
C
C
C
250
300
C
325
C
C
C
SCREEN 3HR AVERAGED DATA
DO 250 IP = 1, IPCNT
IF (CD3( IP) .GE.CCUT) THEN
NSAV = NSAV + 1
INDX(NSAV) = IPMOOOOO + 1*1000 + IR
CONC(NSAV) = CD3(IP)
IF (NSAV.EQ.NPAIR) THEN
CALL WRDATA (KODE)
NTOT = NTOT + NSAV
NSAV = 0
ENDIF
ENDIF
CONTINUE
CONTINUE
CONTINUE
1
|
C REMEMBER TO CHECK THE LAST ARRAY OF DATA, IT IS VERY LIKELY NOT FULL
C AND
C
350
500
1000
C
c
c
c
C
900
905
&
c
910
915
c
c
c
999
c
NOT YET OUTPUT. PAD WITH OS AND OUTPUT IF SO.
CONTINUE
IF NSAV .GT. 0) THEN
NTOT = NTOT + NSAV
DO 500 I = NSAV+1, NPAIR
1NDX(I) = 0
CONC(I) = 0.
CONTINUE
CALL WRDATA (KODE)
ENDIF
WRITE (IFMES.1000) CCUT.NTOT
FORMAT (/3X, 'CUT-OFF VALUE: ',E10.5,' FLAGGED ',110,
KOOE = 0
GO TO 999
ABORT BECAUSE DATA IS INCOMPLETE (^PERIODS IS NOT OF
IPER = IPER - 1
WRITE (IFMES.905) NPER.IPER
FORMAT (/3X, '---EXPECTING1 ,15,' PERIODS, GOT1, 15,
1 PERIODS OF DATA. ..ERROR RETURNED FROM
GO TO 999
WRITE (IFMES.915) NPER
FORM/XT f 1Y ' NPFR - ' TR ' ftR F ATF R THAN MYPM
i U f\ rl M 1 lOAy lirLTx ~ 9 I J 9 \J f\ f. r\ } L. n Inttll PIAr )
RETURN
END
POINTS')
FULL YEAR)
CDATA1 )
F-13
-------
685) CDECK
686
687
688
689
690
691
692
693
694
695
696
\J ^ V
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
797
/ L- 1
728
729
730
731
732
733
734
735
736
737
7 O Q
/ OO
739
740
741
C
C
C
C
C FOR
C GET
C TO
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
r
C
CHEAD
SUBROUTINE CHEAD (KODE)
CRSTER MODEL. ,
OR SET REMAINING HEADER DATA. '
GET 3-HR AVERAGES LOOP OVER DAYS (NPER=365+LEAP( I YEAR)0
1
ARGS:
KODE I ERROR CODE RETURNED TO CALLING SUB
= 0 EVERYTHING OKAY
= -1 OOPS
VARIABLES: NONE (DO YOU BELIEVE THIS??)
COMMOM VARIABLES:
-- INPT --
IAVPER I USED TO CALC I OF TIME PERIODS (NPER)
IYEAR I ARG TO FUNC. LEAP
-- OUTP --
1GR1D I SET = 1; POLAR
NPER I CALC'D
NREC I SET = 180
NSRC I SET = 1
NXGRID I SET = 36
CALLED BY: PRECRT
SUBROUTINES CALLED:
LEAP
LOG:
09/15/86 -MCD- ORIGINAL COOING AND DOCUMENTATION
$INSERT INPT.COM
$INSERT OUTP.COM
CEPA
CEPA
CEPA
CEPA
C
C
C
C
INCLUDE INPT. COM, LIST
INCLUDE OUTP. COM, LIST
INTEGER KODE
KODE = -1
F-14
-------
CDECK PRE-EES
Page
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
7fi1
/ U A
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
C
C
CDECK
C
C
r
\f
C
C
C
r _ -
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
Q
c
c
c
c
NSRC = 1
NREC = 180
NPER = 24/IAVPER * ( 365 + LEAP ( I YEAR) )
IF (IAVPER.EQ.3) NPER = ( 365 + LEAP ( I YEAR) )
IGRID = 1
NXGRID = 36 1
KODE = 0
RETURN .
END '
IDATA1
SUBROUTINE IDATA1 (KODE)
RFAOS ISCST BINARY FII FS WITH 1 OR 1 OR ?4 HfiUR RFCORDS
r\ l_ rl U J IJlstJI U 1 11 rt i\ 1 1 i l_ L .) Ffllll I. \J r\ J v r\ L. ^ nUUi\ n. L L. U r\ U J
BUT NOT ALL THREE, I.E.
IOPT7 = 1 OR IOPT9 = 1 OR IOPT14 = 1
ARCS:
KODE I ERROR CODE RETURNED TO CALLING SUBROUTINE
= 0
= -1 OOPS
VARIABLES:
I I LOOP INDEX ON READ, DO 600
IG I LOOP INDEX OVER GROUPS - DO 100,300
IHR I HOUR OF RECORD
IPER I LOOP INDEX OVER TIME PERIODS - DO 500
IR I LOOP INDEX OVER RECEPTORS - DO 400
ISAV I LOOP INDEX TO SAVE DATA - DO 200
JDAT I JULIAN DATE OF RECORD
NPAIR I NUMBER OF INDX/CONC PAIR TO BE WRITTEN
NSAV 1 CURRENT NUMBER OF INDX/CONC PAIRS STORED IN
OUTPUT BUFFER ARRAY
NTOT I TOTAL NUMBER OF PAIRS SCREENED FROM DATA
NUMG I ARRAY OF GROUP I'S FOR RECORDS
PCHI I ARRAY OF CONC VALUE FROM MODEL OUTPUT BINARY FILE
COMMON VARIABLES:
-- INPT --
CCUT R CUT-OFF VALUE FOR DATA SCREENING
IFDAT P READ DATA FROM UNIT
IFMES P WRITE MESSAGES TO UNIT
-- OUTP --
CONC R OUTPUT CONC BUFFER ARRAY
INDX I OUTPUT INDEX BUFFER ARRAY
MXPA1R P SET NPAIT FOR WRITING
NPER I NUMBER OF TIME PERIODS
NREC I NUMBER OF RECEPTORS
NSRC I NUMBER OF SOURCE GROUPS
CALLED BY: PREISC
-------
799
800
801
802
803
804
805
806
\J v \J
807
808
809
810
811
812
813
814
815
816
817
818
819
U 1 J
820
821
822
823
824
825
826
007
O £. 1
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
C
C
C
C
C
C
C
C
SUBROUTINES CALLED:
WRDATA
LOG:
09/15/86 -MCD- ORIGINAL CODING AND DOCUMENTATION
$INSERT *>INPT.COM
$INSERT *>OUTP.COM '
CEPA
CEPA
CEPA
CEPA
C
C
c
C
C
C
r
L.
C
C
C
C
100
C
C
C
C
200
INCLUDE INPT. COM, LIST
INCLUDE OUTP. COM, LIST
INTEGER I,IG,IHR,IPER,IR,ISAV,JDAT,KODE,
& NPAIR,NSAV,NTOT,NUMG(MXS)
REAL PCHI(MXR,MXS),COMP
KODE = -1
NPAIR = MXPAIR
NSAV = 0
NTOT = 0
i nnp nvFR TIMF pFRinn^
i_uur uvLr\ ijnu r c i\ 1 u u j
DO 500 IPER = IAVPER, NPER, IAVPER
--- READ FOR ALL GROUPS
DO 100 IG = 1, NSRC
READ (IFDAT,END=900) IHR, JDAT,NUMG( IG) , (PCHI ( I , IG) , I
CONTINUE
--- CHECK RECEPTORS, CORRECT UNITS (UG - G) AND WRITE OUT
THAT EXCEED.
JPER = IPER / IAVPER
DO 400 IR = 1, NREC
DO 300 IG = 1, NSRC
COMP = PCHI(IR,IG)*1.0E-6
IF (COMP.GE.CCUT) THEN
DO 200 ISAV = 1, NSRC
NSAV = NSAV + 1
INDX(NSAV) = JPER*100000 + NUMG ( ISAV)*1000
CONC(NSAV) = PCHI(IR,ISAV)*1.0E-6
IF (NSAV. EQ. NPAIR) THEN
CALL WRDATA (KODE)
NTOT = NTOT + NSAV
NSAV = 0
ENDIF
CONTINUE
GO TO 400
=1,NREC)
THOSE
+ IR
F-16
-------
CDECK PRE-EES
Page 1
856
857
858
859
860
861
862
863
864
U
-------
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
qcc
3 J ~J
956
957
958
959
960
961
962
963
964
965
966
967
OfiQ
y o o
969
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
C
r
C
IH I LOOP INDEX OVER HOURS - DO 610
IHR I HOUR OF RECORD
IPER LOOP INDEX OVER TIME PERIODS - DO 500,800
1R LOOP INDEX OVER RECEPTORS - DO 400,750
ISAV LOOP INDEX TO SAVE DATA - DO 200,650
JDAT JULIAN DATE OF RECORD
L24 24TH HOUR FLAG
= 0 24TH HOUR '
NOT 0 NOT 24TH HOUR
NPAIR NUMBER OF INDX/CONC PAIR TO BE WRITTEN
NSAV CURRENT NUMBER OF INDX/CONC PAIRS STORED IN
OUTPUT BUFFER ARRAY
NTOT TOTAL NUMBER OF PAIRS SCREENED FROM DATA
NUMG ARRAY OF GROUP #'S FOR RECORDS
PCHI ARRAY OF CONC VALUE FROM MODEL OUTPUT BINARY FILE
ZDUM DUMMY VARIABLE FOR READS
COMMON VARIABLES:
-- INPT --
CCUT R CUT-OFF VALUE FOR DATA SCREENING
IAVPER I AVERAGE PERIOD 1 OR 24 USED FOR READ CONTROLS
IFDAT P READ DATA FROM UNIT
IFMES P WRITE MESSAGES TO UNIT
-- OUTP --
CONC R OUTPUT CONC BUFFER ARRAY
INDX I OUTPUT INDEX BUFFER ARRAY
MXPAIR P SET NPAIT FOR WRITING
NPER I NUMBER OF TIME PERIODS
NREC I NUMBER OF RECEPTORS
NSRC I NUMBER OF SOURCE GROUPS
CALLED BY: PREISC
SUBROUTINES CALLED:
MOD - INTRINSIC PRIME, UNIVAC
WRDATA
LOG:
09/22/86 -MCD- ORIGINAL CODING AND DOCUMENTATION
$INSERT *>INPT.COM
SINSERT *>OUTP.COM
CEPA
CEPA
CEPA
CEPA
C
C
C
INCLUDE INPT. COM, LIST
INCLUDE OUTP. COM, LIST
INTEGER I,IDUM,IG,IHR,IPER.IR,ISAV,JDAT,KODE,L24,
& NPAIR, NSAV, NTOT, NUMG(MXS),L3
REAL PCHI(MXR,MXS),ZDUM,COMP
F-18
-------
CDECK PRE-EES
Page
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
100
C
C
C
C
125
200
KODE = -1
NPAIR = MXPAIR
NSAV = 0
NTOT = 0
LOOP OVER TIME PERIODS FOR 1 HR
IF (IAVPER.EQ.3) GO TO 550 (
IF (IAVPER.EQ.24) GO TO 1550
IF (IAVPER.NE.1) GO TO 920
DO 500 IPER = 1, NPER
L3 = MOD(IPER,3)
L24 = MOD(IPER,24)
--- READ FOR ALL GROUPS
DO 100 IG = 1, NSRC
READ 1HR STUFF
READ (IFDAT,END = 900) IHR , JDAT,NUMG(IG),(PCHI(I,IG),I = 1,NREC1
--- SKIP 3 HOUR
IF (L3.EQ.O .AND. IOPT9.EQ.1) THEN
READ ( IFDAT,END = 125) I DUM , I DUM,1DUM,(ZDUM,I = 1,NREC)
ENDIF
--- SKIP 24 HOUR
IF (L24.EQ.O .AND. IOPT14.EQ.1) THEN
READ (IFDAT,END = 125) IDUM , I DUM,IDUM,(ZDUM,I = 1,NREC)
ENDIF
CONTINUE
--- CHECK ALL RECEPTORS, SAVE THOSE WITH AT LEAST ONE SOURCE
WITH CONC OVER CUTOFF. DON'T FORGET UNITS (UG - G)
CONTINUE
DO 400 IR = 1, NREC
00 300 IG = 1, NSRC
COMP = PCHI(IR,IG)*1.OE-6
IF (COMP.GE.CCUT) THEN
DO 200 ISAV = 1, NSRC
NSAV = NSAV + 1
INDX(NSAV) = IPERMOOOOO + NUMG (I SAV)*1000 + IR
CONC(NSAV) = PCHI(IR,ISAV)*1.0E-6
IF (NSAV.EQ.NPAIR) THEN
CALL WRDATA (KODE)
NTOT = NTOT + NSAV
NSAV = 0
ENDIF
CONTINUE
GO TO 400
ENDIF
F-19
-------
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
300
400
500
C
C
C
550
C
C
C
C
C
600
C
C
C
650
700
750
C
C
C
800
CONTINUE
CONTINUE
CONTINUE
GO TO 2000
--- LOOP OF PERIODS & SCREEN 3 HOUR DATA IF SO DESIRED
I
CONTINUE
DO 800 IPER = 1, NPER
'
L3 = MOD(IPER,3)
IF (IOPT7 .EO. 1) THEN
L24 = MOD(IPER,24)
ELSE
L24 = MOD(IPER,8)
ENDIF
--- SKIP HOURLY AND 24HR HOUR VALUES, READ 3 HR STUFF
DO 600 IG = 1, NSRC
IF (IOPT7.EQ.1)
& READ (IFDAT,END = 900) IDUM, IOUM, IDUM, (ZDUM, 1 = 1 ,NREC)
IFM3.EQ.O)
& READ (IFDAT,END = 900) IHR, JDAT,NUMG( IG) ,
& (PCHHI.IG), 1 = 1, NREC)
IF (IOPT14.EQ.1 .AND. L24.E0.0)
& READ (IFDAT,END = 900) I DUM , I DUM, IDUM , ( ZDUM , I = 1 , NREC )
CONTINUE
--- SCREEN THE THREE HOUR DATA, CORRECTING FOR UNITS (UG-G)
IF(L3.EQ.O) THEN
JPER = IPER / 3
DO 750 IR = 1, NREC
DO 700 IG = 1, NSRC
COMP = PCHI(IR,IG)*1.0E-6
IF (COMP.GE.CCUT) THEN
DO 650 ISAV = 1, NSRC
NSAV = NSAV + 1
INDX(NSAV) = JPER + 100000 + NUMG( ISAV)*1000 + IR
CONC NSAV) = PCHI(IR,ISAV)*1.0E-6
IF (NSAV.EQ.NPAIR) THEN
CALL WRDATA (KODE)
NTOT = NTOT + NSAV
NSAV = 0
ENDIF
CONTINUE
GO TO 750
ENDIF
CONTINUE
CONTINUE
ENDIF
--- GET NEXT AVERAGING PERIOD
CONTINUE
F-20
-------
CDECK PRE-EES
Page
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
C
c
C
1550
C
C
C
C
C
1600
c
*
1650
1700
1750
c
c
c
1800
C
GO TO 2000
i nnp OVFR PFRTfini AND ^PRFFN ?4 HR DATA
Luur u v L r\ r L r\ i u u j n n u j L. r\ c. L n t H n i\ L/MirA
CONTINUE
DO 1800 IPER = 1, NPER
IF (IOPT7.EQ.1) THEN
L24 = MOD IPER, 24)
ELSE
L24 = MODMPER.8)
ENDIF
IF (IOPT9 .EQ. 1) THEN
L3 = MOD(IPER,3)
ELSE
L3 = 99
ENDIF
--- SKIP HOURLY AND 3-HR VALUES
DO 1600 IG = 1, NSRC
IF (IOPT7.EQ.1)
& READ(IFDAT,END=900)IDUM,IDUM,IDUM,(ZDUM,I
IF (L3.EQ.O)
& READ(IFDAT,END=900)IDUM,IDUM,IDUM,(ZDUM,I
IF (L24.EQ.O)
& READ (1FDAT,END=900) IHR , JDAT ,NUMG( I G) ,
& (PCH1(I,IG),I=1,N
CONTINUE
IF (L24.EQ.O) THEN
JPER = IPER / 24
DO 1750 IR = 1, NREC
DO 1700 IG = 1, NSRC
COMP = PCHI(IR,IG)*1.0E-6
IF (COMP.GE.CCUT) THEN
DO 1650 ISAV = 1, NSRC
NSAV = NSAV, + 1
INDX(NSAV) = JPERMOOOOO + NUMG
CONC(NSAV) = PCHI(IR,ISAV)*1.0E
IF (NSAV.EQ.NPAIR) THEN
CALL WRDATA (KODE)
NTOT = NTOT + NSAV
NSAV = 0
ENDIF
CONTINUE
GO TO 1750
ENDIF
CONTINUE
CONTINUE
ENDIF
--- GET NEXT AVERAGING PERIOD
CONTINUE
1
I
=1,NREC)
=1,NREC)
REC)
(ISAV)MOOO
-6
+ IR
-------
A A T A
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1 1 SB
I 1 >J O
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
110-1
1 1 O J
1184
1185
1186
1 1 87
1 1 O /
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
C
C REMEMBER TO CHECK THE LAST ARRAY OF DATA. IT IS VERY LIKELY NOT FULL
C AND
C
2000
850
1000
C
r
C
C
C
C
900
905
C
920
925
C
C
C
999
CDECK
C
C
C
r
L>
C
C
C
r
C
C
C
C
C
C
C
C
C
C
NOT YET OUTPUT. PAD WITH OS AND OUTPUT IF SO.
CONTINUE
IF (NSAV .GT. 0) THEN
NTOT = NTOT + NSAV
DO 850 I = NSAV+1, NPAIR
INDX(I) = 0
CONCH) = 0.
CONTINUE
CALL WRDATA (KODE)
ENDIF
WRITE (IFMES.1000) CCUT.NTOT
FORMAT (/3X, 'CUT-OFF VALUE: '.E10.5,' FLAGGED ',110,
KODE = 0
GO TO 999
ABORT BECAUSE DATA IS INCOMPLETE (IPERIODS IS NOT OF
IPER = IPER - 1
WRITE (IFMES.905) NPER.IPER
FORMAT (/1X, '---EXPECTING1 ,15,' PERIODS, GOT1, 15,
& ' PERIODS OF DATA. ..ERROR RETURNED FROM
GO TO 999
WRITE (IFMES.925) IAVPER
FORMAT (3X,'BAD IAVPER = ',15,' FOR ISCST1)
RETURN
END
IHEAD
SUBROUTINE IHEAD (KODE)
NFFD T(l SFT ALL VARIABLE FOR ISCST
i
i
1
1 POINTS')
FULL YEAR)
IDATA21)
IlLLU I U OLI OU.L- lrni\lrlUU.L IUI\ Iv/l^iJI
OUTPUT DATA FILE FROM MODEL CONTAINS NO REAL HEADER INFO
ARGS:
KODE I ERROR CODE RETURNED TO CALLING SUBROUT
= 0 EVERYTHING OK
= -1 OOPS!
VARIABLES:
-- NONE --
COMMON VARIABLES:
INE
F-22
-------
CDECK PRE-EES
Page
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1 ?3fi
1 t- J U
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
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
-- INPT --
IAVPER USED TO CALC NPER
1NGRD USED TOSET IGRID FOR GRID TYPE
INGRP NUMBER OF SOURCE GROUPS - SAME AS NUMBER OF SOURCES
AS FAR AS PROGRAM IS CONCERNED
INW USED TO CALC NREC
1NX USED TO CALC NREC ,
INY USED TO CALC NREC
-- OUTP --
IGRID SET ACCORDING TO INGRD '
NPER CALC'D
NREC SET = INXMNY + INW
NSRC SEG = INGRP
NXGRID SET = INX
CALLED BY: PREISC
SUBROUTINES CALLED: LEAP
LOG:
092286 - MCD - ORIGINAL CODING AND DOCUMENTATION
$INSERT *>INPT.COM
SINSERT *>OUTP.COM
CEPA
CEPA
CEPA
CEPA
C
C
C
C
C
Q .
C
C
C
c
c
c
£
c
c
c
c
c
INCLUDE INPT. COM, LIST
INCLUDE OUTP. COM, LIST
--- DECLARE LOCALS
INTEGER KODE
ISCST COMBINES ALL SOURCE IN EACH GROUP
SO NSRC = NGRP
KODE = -1
NSRC = INGRP
NXGRID = INX
NREC = INXMNY + INW
I think this is a bug, and I'm gonna squash it!
NPER = 24/IAVPER * ( 365 + LEAP ( I YEAR) )
NPER = 24 * (365+LEAP(IYEAR))
FIX IGRID FOR EXEX
IF (INGRD. EQ.l) THEN
F-23
-------
1255)
1256)
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268,
1269
1270'
1271'
1272'
1273'
12741
1275
1276
1277
1278)
1279)
1280
1281'
1282'
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
CDECK
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
IGRIO
ELSE
IGRID
END1F
KODE = 0
RETURN
END
LEAP
FUNCTION LEAP (HEAR)
CHECK FOR
RETURNS 1
LEAP YEAR.
IF THE YEAR
INPUT MUST
IS LEAP, 0
BE INTERNATIONAL YEAR 'YYYY'
OTHERWISE,
ARGSt
-- NONE --
VARIABLES!
IYEAR I INTERNATIONAL/GREGORIAN YEAR (YYYY)
COMMON VARIABLES:
-- NONE --
CALLED BY! CHEAD
IHEAD
MHEAD
SUBROUTINES CALLED:
MOD - INTRINSIC PRIME,UNIVAC
LOGS
041786 - Pi - ORIGINAL CODING
092286 - MCD - DOCUMENTATION
DECLARE LOCALS
INTEGER IYEAR
IF (MOD(IYEAR,4).EQ.O .AND. MOD(I YEAR,100).NE.0
MOD(IYEAR,400).EQ.O) THEN
LEAP = 1
ELSE
LEAP = 0
ENDIF
RETURN
.OR.
F-24
-------
CDECK PRE-EES
Page
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
CDECK
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
c
c
c
c
c
c
c
c
c
c
c
c
c
END
MDAT21
SUBROUTINE MDAT21 (KODE)
READS, SCREENS AND WRITE OUT DATA FROM MPTER ,
PARTIAL CONC FILE (HOURLY SOURCE CONTRIBUTIONS)
NOTE: THERE SEEMS TO BE SOME ERROR WITH MPTER DOCUMENTATION
PARTIAL CONC FILE STRUCTURE IS NOT WHAT IT IS TO BE.
THIS ANALYSIS METHOD CAN BE SIMULATED BY RUNNING
ISCST WITH ONE SOURCE PER GROUP
ARGS:
KODE I ERROR CODE RETURNED TO CALLING SUBROUTINE
= 0 EVERYTHING OKAY
= -1 OOPS!
VARIABLES:
I I LOOP INDEX ON READS, DO 500
IDATE I DATE OF RECORD
IHR I HOUR OF RECORD
INREC I RECEPTOR NUMBER OF DATA RECORD
IPER I LOOP INDEX OVER TIME PERIODS, DO 400
IR I LOOP INDEX OVER RECEPTORS, D- 300
IS I LOOP INDEX OVER SOURCES, DO 200
ISAV 1 LOOP INDEX FOR SAVING, DO 100
NPAIR I NUMBER OF INDX/CONC PAIRS TO BE WRITTEN
NSAV I CURRENT NUMBER OF INDX/CONC PAIRS IN OUTPUT
BUFFER ARRAY
NTOT I TOTAL NUMBER OF SCREEND DATA POINTS
PARTC R INPUT ARRAY OF CONC VALUES TO BE SCREENED
COMMON VARIABLES:
-- INPT --
CCUT R OUTPUT BUFFER ARRAY OF SCREENED DATA
IFDAT P READ DATA FROM UNIT
IFMES P WRITE MESSAGES TO UNIT
-- OUTP --
CONC R OUTPUT BUFFER ARRAY OF SCREENED DATA
INDX I OUTPUT BUFFER ARRAY OF DATA POINTS INDICES
MXPAIR P SET NUMBER OF PAIRS TO BE WRITTEN
NPER I NUMBER OF TIME PERIODS TO LOOP OVER
NREC I NUMBER OF RECEPTORS FOR LOOPING
NSRC I NUMBER OF SOURCES FOR LOOPING
CALLED BY: PREMPT
SUBROUTINES CALLED: WRDATA
LOG:
092286 - MCO - ORIGINAL CODING AND DOCUMENTATION
-------
1369
1370
1371
1372
1373
1374
1375
1376
1377]
1378!
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
C
C
C
SINSERT
S1NSERT
CEPA
CEPA
CEPA
CEPA
C
*>INPT.COM
*>OUTP.COM
INCLUDE
INCLUDE
INPT.COM,LIST
OUTP.COM,LIST
100
200
C
300
400
C
DECLARE LOCALS
INTEGER I,IDATE,IHR,INREC,IPER,IR,IS,ISAV,KODE,
& NPAIR,NSAV,NTOT
REAL PARTC(MXS)
KODE = -1
NPAIR = MXPAIR
NSAV = 0
NTOT = 0
DO 400 IPER = 1, NPER
DO 300 IR = 1, NREC
READ (IFDAT,END=900) I DATE,IHR , INREC,(PARTC(I),1 = 1,NSRC)
IF ANY RECEPTOR EXCEEDS CCUT FOR ANY SOURCE
WRITE OUT ALL SOURCE FOR THE TIME PERIOD
DO
200
IF
IS = 1, NSRC
(PARTC(IS).GE.CCUT) THEN
DO 100 ISAV = 1, NSRC
NSAV = NSAV + 1
INDX(NSAV) = IPER*100000 + ISAVMOOO
CONC(NSAV) = PARTC(ISAV)
IF (NSAV. EQ. NPAIR) THEN
CALL WRDATA (KODE)
NTOT = NTOT + NSAV
NSAV = 0
ENDIF
CONTINUE
GO TO 300
ENDIF
CONTINUE
IR
CONTINUE
CONTINUE
C REMEMBER TO CHECK THE LAST ARRAY OF DATA, IT IS VERY LIKELY NOT FULL
C AND NOT YET OUTPUT. PAD WITH OS AND OUTPUT IF SO.
C
IF (NSAV .GT. 0) THEN
NTOT = NTOT + NSAV
DO 500 I = NSAV+1, NPAIR
F-26
-------
CDECK PRE-EES
Page
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1 *i -J -J
1456
1457
1458
J. T J U
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
500
1000
C
C
P
C
C
c
c
900
905
J
C
C
CDECK
C
C
C
C
C
Q
C
C
C
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
Q
c
c
c
c
INDX(I) = 0
CONC(I) = 0.
CONTINUE
CALL WRDATA (KODE)
ENDIF
WRITE (IFMES.1000) CCUT.NTOT
FORMAT (3X,1--- CUT-OFF VALUE: '.E10.5,1 FLAGGED ,Illj), POINTS')
KODE = 0
RETURN
1
ABORT BECAUSE DATA IS INCOMPLETE (IPERIODS IS NOT OF FULL YEAR)
IPER = IPER - 1
WRITE (IFMES.905) NPER.IPER
FORMAT (3X, 'EXPECTING' ,15, ' PERIODS, GOT', 15,' PERIODS OF DATA',
'...ERROR RETURNED FROM MDAT21 ' )
RETURN
END
MDAT23
SUBROUTINE MDAT23 (KODE)
RFAD9 SCRFFNS AND WR1TF OUT DATA FROM MPTFR
r\ u rS LJ J f O 1- r\ t_ L 11 J rAflU H (^ i 1 t UUI U r\ I n I l\ U rl rlrlLTN
1 & 3 & 24 HOUR AVERAGED DATA
ARGS:
KODE I ERROR CODE RETURNED TO CALLING SUBROUTINE
= 0 EVERYTHING OKAY
= -1 OOPS!
VARIABLES:
I I LOOP INDEX ON READS, DO 500
IDATE I DATE OF RECORD
IHR I HOUR OF RECORD
IPER I LOOP INDEX OVER TIME PERIODS, DO 400
IR I LOOP INDEX OVER RECEPTORS, D- 300
NPAIR I NUMBER OF INDX/CONC PAIRS TO BE WRITTEN
NSAV I CURRENT NUMBER OF INDX/CONC PAIRS IN OUTPUT
BUFFER ARRAY
NTOT I TOTAL NUMBER OF SCREEND DATA POINTS
PCHI R INPUT ARRAY OF CONC VALUES TO BE SCREENED
COMMON VARIABLES:
-- INPT --
CCUT R OUTPUT BUFFER ARRAY OF SCREENED DATA
IFDAT P READ DATA FROM UNIT
IFMES P WRITE MESSAGES TO UNIT
-------
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1 499
1 T J J
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1 C1 T
1 J 1 J
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
i c "3 7
1 D J /
1538
1539
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
r
C
-. OUTP --
CONC R OUTPUT BUFFER ARRAY OF SCREENED DATA
INDX I OUTPUT BUFFER ARRAY OF DATA POINTS INDICES
MXPAIR P SET NUMBER OF PAIRS TO BE WRITTEN
NPER I NUMBER OF TIME PERIODS TO LOOP OVER
NREC I NUMBER OF RECEPTORS FOR LOOPING
NSRC I NUMBER OF SOURCES FOR LOOPING ,
1
CALLED BY: PREMPT
SUBROUTINES CALLED: WRDATA '
LOG:
092286 - MCD - ORIGINAL CODING AND DOCUMENTATION
$INSERT *>INPT.COM
$INSERT *>OUTP.COM
CEPA
CEPA
CEPA
CEPA
C
C
C
C
r
C
C
C
300
400
C
C
INCLUDE INPT. COM, LIST
INCLUDE OUTP. COM, LIST
DECLARE LOCALS
INTEGER I,IDATE,IHR,IPER,IR,KODE,NPAIR,NSAV,NTOT
REAL PCHI(MXR)
KODE = -1
NPAIR = MXPAIR
NSAV = 0
NTOT = 0
DO 400 IPER = 1, NPER
READ (IFDAT,END=900) I DATE , IHR , (PCHI ( I ) , 1 = 1 , NREC )
DO 300 IR = 1, NREC
IF (PCHI(IR) .GE.CCUT) THEN
NSAV = NSAV + 1
INDX(NSAV) = IPERMOOOOO + NSRCMOOO + IR
CONC(NSAV) = PCHI(IR)
IF (NSAV. EQ. NPAIR) THEN
CALL WRDATA (KODE)
NTOT = NTOT + NSAV
NSAV = 0
ENDIF
ENDIF
CONTINUE
CONTINUE
C REMEMBER TO CHECK THE LAST ARRAY OF DATA, IT IS VERY LIKELY NOT FULL
F-28
-------
COECK PRE-EES
Page 28
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1 556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1 J / -J
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
C AND
C
500
1000
C
C
C
C
C
C
900
905
C
C
CDECK
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
NOT YET OUTPUT. PAD WITH OS AND OUTPUT IF SO.
IF (NSAV .GT. 0) THEN
NTOT = NTOT + NSAV
DO 500 I = NSAV+1 , NPAIR
INDX(I) = 0
CONC(I) = 0. 1
CONTINUE
CALL WRDATA (KODE)
ENDIF ,
WRITE (IFMES.1000) CCUT.NTOT '
FORMAT (3X,1--- CUT-OFF VALUE: '.E10.5, FLAGGED ',110, POINTS')
KODE = 0
RETURN
ABORT BECAUSE DATA IS INCOMPLETE (^PERIODS IS NOT OF FULL YEAR)
IPER = IPER - 1
WRITE (IFMES,905) NPER.IPER
FORMAT (3X, 'EXPECTING1 ,15,' PERIODS, GOT1, 15,' PERIODS OF DATA',
& '...ERROR RETURNED FROM MDAT23')
RETURN
END
MHEAD
SUBROUTINE MHEAD (KODE)
READS AND/OR SET HEADER RECORD
ARCS:
KODE 1 ERROR CODE RETURNED TO CALLING SUBROUTINE
= 0 EVERYTHING OKAY
= -1 OOPS!
VARIABLES:
I I LOOP INDEX FOR READ
1NAVG I AVERAGE PERIOD FROM HEADER RECORD
INPER 1 TIME PERIOD FROM HEADER RECORD
TDUM C DUMMY CHARACTER STRING FOR HEADER TITLE LINES
ZDUM R DUMMY REAL VARIABLE
COMMON VARIABLES:
-- INPT --
IAVPER I INPUT AVERAGE PERIOD CHECKED AGAINST HEADER VALUE
IFDAT P READ HEADER DATA FROM UNIT
IFMES P WRITE MESSAGES TO UNTI
INSRC I SET NSRC
.- OUTP --
-------
1597) C
1598) C
1599) C
1600
1601
1602
C
C
C
1603) C
1604
1605
1606
1607
1608
1609
1610
1611
1612
i U 1 4.
1613
1614
1615
1616
1617
1618
1619
1620
1 V L. \J
1621
1622
1 fi?"}
I U L. *J
1624
1625
1626
1627
1628
1 fi?Q
1 U C 7
1630
1631
1632
1 f,-j-i
1 \J J INPT.COM
$INSERT *>OUTP.COM
CEPA
CEPA
CEPA
CEPA
r
C
C
r
L-
C
C
r
C
C
r
I*
C
C
9000
C
9100
C
C
C
INCLUDE INPT. COM, LIST
INCLUDE OUTP. COM, LIST
_ __ DFflARF infAIS
ULl*[_rAI\L LUL*nl_«2
INTEGER I,INAVG,INPER,KODE
REAL ZDUM
CHARACTER TDUM*80
KODE = -1
RFAD RFCfiRH 1 AND CHFCK FOR CONSISTFNCY
i\ L. n u r\ L 1^ u r\ u i nnu t* 1 1 L v i\ i u r\ u>Lfii
-------
CDECK PRE-EES
Page 30
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1 fifU
1 U O 1
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1 fiQ"i
1 U J J
1696
1697
1 fiQfl
1 U -/ O
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
C
9200
C
C
C
C
C
C
C
900
905
C
C
C
999
CDECK
C
C
c
c
p
c
c
c
c
c
c
c
c
£
c
c
c
IF (MOPT21.EQ.1) THEN
READ (IFDAT,END=900) NREC , MSRC ,( ZDUM , I =1 , NREC ),( ZDUM , I =1 , NREC)
IF (MSRC.NE. INSRC) THEN
WRITE (IFMES.9200) INSRC, MSRC
FORMAT (3X, 'INPUT 1 SOURCE: ',15,' HEADER *: ,15)
GO TO 999 1
ENDIF
ELSE
READ (IFDAT,END=900) NREC , (ZDUM , I = 1 , NREC) ,( ZDUM , I = U NREC )
ENDIF r
SET REMAINING HEADER VARIABLES
NSRC = INSRC
IF (INGRD.EQ.l) THEN
IGRID = 1
NXGRID = 36
ELSE
IGRID = 2
NXGRID = INX
ENDIF
KODE = 0
GO TO 999
FflF
L u r
WRITE (IFMES.905)
FORMAT /3X,' EOF READ HEAD RECORD, RUN ABORT IN MHEAD')
STOP
RETURN
END
PRECRT
SUBROUTINE PRECRT (KODE)
PRDTFSS CRSTFR DISPERSION DATA
rl\ULrLJO vr\JILi\ L/IJiLrNJlUli L/Mlrt
ARGS:
KODE I ERROR CODE RETURNED TO CALLING SUBROUTINE
= 0 EVERYTHING OKAY
= -1 OOPS!
VARIABLES:
-- NONE --
COMMON VARIABLES:
-- NONE --
-------
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1 1 L. ff
1723
1794
1 / £ T
1725
1726
1727
1 728
i. 1 L \J
1729
1730
1731
1 732
J. / J t~
1733
1734
1735
1736
1737
1738
1 7 TO
1 / O J
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1 7 c.n
I / J T
1755
1 7 Rfi
1 / .J U
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
C
C
C
C
C
C
C
C
C
C
C
r - - - - -
C
r
Lr
C
C
r
C
C
r
U
C
C
r
i*
C
C
C
C
900
CDECK
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
CALLED BY: PRE-EES.MAIN
SUBROUTINES CALLED: CDATA
CHEAD
WRHEAD
LOG: |
092286 - MCD - ORIGINAL CODING AND DOCUMENTATION
DFCIARF 1 flfAl S
UuUL.nf\L L U 1* AA L J
INTEGER KODE
KODE = -1
RFAD HFADFR RFrflRD AND URITF TO OUTPUT FII F
ixLnu M i_ n L> L r\ r\i_i*ur\u niiu ni\iiL lu uuirui FILL
CALL CHEAD (KODE)
IF (KODE.LT.O) GO TO 900
CALL WRHEAD (KODE)
IF (KODE.LT.O) GO TO 900
RFAD SCRFFN AND URITF DIIT DATA
~ ~~~ r\ U rA U j J v^ r\ L L 11 rAHL/ n l\ 1 I u UUI \J r\ i r\
CALL CDATA (KODE)
IF (KODE.LT.O) GO TO 900
KODE = 0
RETURN
END
PREISC
SUBROUTINE PREISC (KODE)
PRE-PROCESS ISC BINARY FILES FOR EXEXS
ARGS:
KODE I ERROR CODE RETURNED TO CALLING SUBROUTINE
= 0 EVERYTHING OKAY
= -1 OOPS!
VARIABLES:
-- NONE --
COMMON VARIABLES:
-- INPT --
F-32
-------
CDECK PRE-EES
Page 32i
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1 7QS
1 I J J
1796
1797
1798
1 799
1/77
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1011
1 O 1 I
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
IFMES P WRITE MESASGES TO UNIT
IOPT14 I BRANCH FOR FILE TYPE
IOPT7 I BRANCH FOR FILE TYPE
-- OUTP --
--NONE --
j
CALLED BY: PRE-EES. MAIN
SUBROUTINES CALLED: IDATA1 ,
IDATA2 '
IHEAD
WRHEAD
LOG:
092286 - MCD - ORIGINAL CODING AND DOCUMENTATION
S1NSERT *>INPT.COM
CEPA
CEPA
CEPA
C
C
Q
C
C
C
C
c
C
£
p
c
£
c
c
INCLUDE INPT. COM, LIST
-. _ DFCIARF inCAIS
* ULl*Ufll\L LUL-fALJ
INTEGER KODE
KODE = -1
CHECK MODEL SPECIFIC INPUTS
IF (IOPT7.EQ.O .AND. IOPT9.EQ.O .AND. IOPT14.EQ.O)
& GO TO 900
IF (IAVPER.EQ.1 .AND. IOPT7.NE.1) GO TO 900
IF (IAVPER.EQ.3 .AND. IOPT9.NE.1) GO TO 900
IF (IAVPER.EQ.24 .AND. IOPT14.NE.1) GO TO 900
-- __ PROCFSS
- rr\Uvl_JJ
CALL IHEAD (KODE)
IF KODE.LT.O) GO TO 999
CALL WRHEAD (KODE)
IF (KODE.LT.O) GO TO 999
WORRY ABOUT DIFFERENT FILE STRUCTURE
ICK = 10PT7 + 10PT9 + IOPT14
IF (ICK.GT.l) THEN
CALL IDATA2 (KODE)
IF (KODE.LT.O) GO TO 999
ELSE
-------
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1 844
i U *1 T
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
I QK7
1 O J 1
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
C
C
900
905
C
C
C
999
CDECK
C
C
C
r
\*
C
C
C
C
C
C
C
C
C
C
C
C
r
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
CALL IDATA1 (KODE)
IF (KODE.LT.O) GO TO 999
ENDIF
KODE = 0
GO TO 999
t
WRITE (IFMES.905) '
FORMAT (3X,1--- BAD OPTION INPUTS FOR ISCST1)
1
RETURN
END
PREMPT
SUBROUTINE PREMPT (KODE)
pop PROCESS MPTFR FTI FS
r r\ L ri\UWLJJ rlrlLrN r i L. L O
THERE ARE TWO OPTIONS
MOPT21 = 1 INPUT MPTER FILE TO PRE-EES WAS GENERATED
BY DESIGNATION IOPT(21) = 1, PARTIAL CONC OR
BETTER KNOWN AS HOURLY SOURCE CONTRIBUTIONS
MOPT23 = 1 INPUT MPTER FILE TO PRE-EES WAS GENERATED
BY DESIGNATION IOPT(23) = 1, AVERAGING PERIOD
CONCENTRATIONS
IOPT(22) WAS OMITTED, THESE VALUES CAN BE PRE-PROCESSED BY
ARGS:
KODE I ERROR CODE RETURNED TO CALLING SUBROUTINE
= 0 EVERYTHING OKAY
= -1 OOPS!
VARIABLES:
-- NONE --
COMMON VARIABLES:
-- INPT --
IFMES P WRITE MESSAGES TO UNIT
INGRD I CHECK FOR VALID GRID TYPE
MOPT21 I CHECK FOR VALIDITY AND BRANCH FOR FILE TYPE
MOPT23 I CHECK FOR VALIDITY AND BRANCH FOR FILE TYPE
-- OUTP --
-- NONE --
CALLED BY: PRE-EES. MAIN
SUBROUTINES CALLED: MDAT21
MDAT23
MHEAD
F-34
-------
CDECK PRE-EES
Page 34
1882
1883
1884
1885
1886
1887
1888
1 889
1890
1 891
1892
1893
1894
1895
1896
1897
1 RQR
I O .7 O
1899
1900
1901
1902
1 j \J L.
1903
1904
1905
1 Qfifi
1 j \J U
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
C
C
C
C
C
C
C
C
C
C--
c
WRHEAD
LOG:
092286 - MCD - ORIGINAL CODING AND DOCUMENTATION
1
1
f
$INSERT *>INPT.COM
CEPA
CEPA
CEPA
C
r
lr
C
C
c
C
C
r
i»
C
9000
C
9001
c
c
Q
c
c
900
Q
C
INCLUDE INPT. COM, LIST
nrriARF IDTAIS
(J L lr L. ri r\ L l_ U ^ ri l_ J
INTEGER KODE
KODE = -1
- - CHFCK MOnFI SPFflFTf INPUTS
u n L L» [\ D u u L u jrLL.ii ic i n r u i j
IF (INGRD.NE.l .AND. INGRD.NE.3) THEN
WRITE (IFMES.9000) INGRD
FORMAT (3X,'---GRID TYPE = ',15,' INVALID TYPE FOR MPTER1)
GO TO 900
ENDIF
IF (MOPT21.EQ.1 .AND. MOPT23.EQ.1) THEN
WRITE (IFMES.9001)
FORMAT 3X,1--- OOPS, BOTH MOPT 21 & 23 SELECTED')
GO TO 900
ENDIF
NOW PROCESS ACCORDING TO MOPT
CALL MHEAD (KODE)
IF (KODE.LT.O) GO TO 900
CALL WRHEAD KODE)
IF (KODE.LT.O) GO TO 900
IF (MOPT21.EQ.1) THEN
CALL MDAT21 (KODE)
IF (KODE.LT.O) GO TO 900
ELSEIF (MOPT23.EQ.1) THEN
CALL MDAT23 (KODE)
IF (KODE.LT.O) GO TO 900
ENDIF
KODE = 0
RETURN
F-35
-------
1939
1940
1941
1942
1943
1944
1945
1946
1947
1Q4ft
1 J *i O
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1 Q7Q
i y 1 j
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1 QQfl
i y y u
1991
1992
1993
1994
1995
C
END
CDECK WRDATA
C
C
C MR
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 WRDATA (KODE)
ITE SCREENED ARRAY OF INDEX + CONC DATA. ,
1
1
ARGS:
KODE I ERROR CODE RETURNED TO CALLING SUBROUTINE
= 0 EVERYTHING OKAY
= -1 OOPS!
VARIABLES:
NPAIR I NUMBER OF INDX/CONC PAIRS TO BE WRITTEN
COMMON VARIABLES:
-- INPT --
IFOUT P WRITE SCREENED DATA POINTS TO UNIT
.- OUTP --
CONC R OUTPUT BUFFER ARRAY OF SCREENED DATA
INDX 1 OUTPUT BUFFER ARRAY OF DATA INDICES
MXPAIR P SET NUMBER OF PAIRS TO BE WRITTEN
CALLED BY: CDATA
1DATA1
IDATA2
MDAT21
MDAT23
SUBROUTINES CALLED: VAROUT -SAI FAST 10 ROUTINE FOR PRIME
LOG:
092286 - MCD - ORIGINAL CODING AND DOCUMENTATION
$INSERT INPT.COM
$INSERT OUTP.COM
CEPA
CEPA
CEPA
CEPA
C
C
C
C
C
INCLUDE INPT. COM, LIST
INCLUDE OUTP. COM, LIST
INTEGER KODE, NPAIR
KODE = -1
NPAIR = MXPAIR
FORTRAN BINARY 10 (THIS IS PREFERED)
F-36
-------
CDECK PRE-EES
Page 36
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
?0f)7
{- \J \J 1
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
?f)?fl
L. \J L. \J
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
C
C
c
C
C
C
C
C
C
c
C
C
C
C
C
C
c
C
WRITE (IFOUT) INDX
WRITE (IFOUT) CONC
FORMATTED 10 1
WRITE (IFOUT, (10112.9)') INDX
WRITE (IFOUT, (1P10E12.5) ) CONC ,
1
SAIOLB (FAST) BINARY 10
CALL VAROUT (IFOUT, NPAIR.INDX)
CALL VAROUT (IFOUT, NPAIR.CONC)
KODE = 0
RETURN
END
COECK WRHEAD
C
C
C
C
C
C
C
r
C
C
C
C
C
C
C
C
C
L
L
c
c
c
c
c
c
c
c
c
c
c
£
c
SUBROUTINE WRHEAD (KODE)
WRITE HEADER DATA.
RECORD 1 = TITLE OF DATA (80 CHARS)
RECORD 2=6 DATA PARAMS THAT ARE INTEGERS, REMAINING 4 ARE FOR FUTURE
RECORD 3 = 1 DATA PARAM THAT IS REAL, REMAINING 9 ARE FOR FUTURE
ARGS:
KODE I ERROR CODE RETURNED TO CALLING SUBROUTINE
= 0 EVERYTHING OKAY
= -1 OOPS!
VARIABLES:
I I LOOP INDEX FOR WRITES, DO 100, 200
IPARAM I INTEGER OUTPUT ARRAY FOR SA1 FAST 10
ITITLE I INTEGER OUTPUT ARRAY EQUIVALANED TO TITLE
VIA SDUM
RPARAM R REAL OUTPUT ARRAY FOR SAI FAST 10
SDUM C CHARACTER STRING FOR EQUIVALENCE TITLE
COMMON VARIABLES:
-- 1NPT --
CCUT R OUTPUT IN 3RD RECORD
IFOUT P WRITE HEADER TO UNIT
IFMES F WRITE MESSAGES TO UNIT
IGRID I OUTPUT IN 2ND RECORD
IYEAR I OUTPUT IN 2ND RECORD
TITLE C OUTPUT IN 1ST RECORD
-- OUTP --
NPER I OUTPUT IN 2ND RECORD
-------
Page
2053 C
2054 C
2055 C
2056 C
2057 C
2058 C
2059 C
2060 C
2061 C
2062 C
2063 C
2064 C
2065 C
2066 C
2067 C
2068 C
NREC I OUTPUT IN 2ND RECORD
NSRC I OUTPUT IN 2ND RECORD
NXGRID I OUTPUT IN 2ND RECORD
CALLED BY: CHEAD
IHEAD
MHEAD
SUBROUTINES CALLED: VAROUT -SAI FAST
LOG:
092286 - MCD - ORIGINAL CODING AND
j
10 ROUTINE FOR PRIME
DOCUMENTATION
2069 SINSERT INPT.COM
2070 $INSERT OUTP.COM
2071 CEPA
2072 CEPA
2073 CEPA
2074 C
2075 C
2Q76 C
2077 C
2078 C
2079 C
2080
2081
2082
2083
2084 C
2085 C
2086 C
2087
2088 C
2089 C
2090 C
2091
2092 C
2093 C
2094 C
2095
2096
2097
2098 C
?OQQ r
2100 C
2101 C
2102 C
2103 C
2104 C
2105 C
2106 C
2107 C
o i r\ Q r
L 1 U O L
2109 C
INCLUDE INPT.COM, LIST
INCLUDE OUTP.COM, LIST
DFCIARF LOCAIS
INTEGER KODE,IPARAM(10),ITITLE(20)
REAL RPARAM(IO)
CHARACTER SDUM*80
EQUIVALENCE ITITLE.SDUM)
KODE = -1
-- SET 1 OF PERIODS FOR EXEXS TO SEE
NPRD = 24/IAVPER * ( 365 + LEAP ( I YEAR)
FORTRAN BINARY 10 (THIS IS THE PREFERED
WRITE IFOUT TITLE
WRITE IFOUT lYEAR, NSRC, NREC, NPRD, IGRI
WRITE IFOUT CCUT, (0.0,1=1,9)
FORMATTED 10
WRITE (IFOUT,1 (A) ') TITLE
WRITE (IFOUT,1 10112)') I YEAR , NSRC , NREC
(0,1=1,4)
WRITE (IFOUT,' (1P10E12.4) ') CCUT, (0.0,
)
ONE)
D, NXGRID, (0,1 = 1,4)
, NPRD, IGRID, NXGRID,
1=1,9)
F-38
-------
CDECK PRE-EES
Page 38
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
100
200
1000
1001
1002
1003
C
C
C
SAIOLB (FAST) BINARY 10
SDUM =
IPARAM
1PARAM
IPARAM
IPARAM
IPARAM
IPARAM
DO 100
TITLE
1 = IYEAR
2 = NSRC
3 = NREC
4 = NPER
5 = IGRID
6 = NXGRID
I = 7, 10
IPARAM(I) = 0
RPARAM(l) = CCUT
DO 200 I = 2, 10
RPARAM(I) = 0.
CALL VAROUT
CALL VAROUT
CALL VAROUT
IFOUT,
IFOUT.
IFOUT,
20.ITITLE
10,IPARAM
10.RPARAM
WRITE (IFMES.1000)
FORMAT /1X,'HEADER TO PREPROCESSED CHI/Q FILE:1)
WRITE (IFMES.lOOl) TITLE
FORMAT 6X,'REC# 1: ',A)
WRITE (IFMES.1002) I YEAR , NSRC,NREC,NPRD,IGRID,NXGRID,(0,I = 1 ,4)
FORMAT (6X, 'REC# 2: ' ,1015)
WRITE (IFMES.1003) CCUT, (0.0,1=1,9)
FORMAT 6X, 'RECI 3: ' .10E8.2)
KODE = 0
RETURN
END
-------
ExEx PROGRAM CODE
87180
-------
J
0
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
I
EXEXS (EXPECTED EXCEEDANCES CALCULATIONS SYSTEM)
VERSION 2.00 PRIME F77
2.01 TSO IBM F77
TILL E STOECKENIUS & THOMAS S STOCKING
FIRST VERSION ON 18-JUNE-1986 BY P. IRPAN
MODIFIED TO INCLUDE OPTIONS FOR
PROBABILITY OF VIOLATIONS CALCULATIONS
AUGUST,1987, BY THOMAS STOCKING.
HOST IS PRIME 750 PRIMOS F77
SYSTEMS APPLICATIONS, INC.
101 LUCAS VALLEY ROAD
SAN RAFAEL, CA 94903
INCLUDED IN THIS CODE ARE 6 MODES OF CALCULATING EXPECTED EXCEEDANCES;
THEY ARE:
1 = MULTI SOURCE-GROUPS EXEX MODEL
2 = SINGLE SOURCE-GROUP EXEX MODEL
3 = SINGLE SOURCE-GROUP ITERATIVE EXEX MODEL
4 = PROBABILITY OF VIOLATION (POV) FOR MULTI SOURCE-GROUPS
5 = POV SINGLE SOURCE-GROUP
6 = POV SINGLE SOURCE-GROUP ITERATIVE
FOR MODEL1:
YOU MAY REPLACE THE RANDOM EMISSIONS SAMPLING ROUTINE SAMPLE IF A
DIFFERENT DISTRIBUTION IS DESIRED.
DEVELOPMENT_LOG:
PLEASE WRITE CLEAN & CONSISTENT CODE!!!
860618 PAULUS IRPAN, TILL E STOECKENIUS
EXEXS VERSION 1.0
INITIAL DESIGN & CODING OF THE PROGRAM.
BASED ON THE MAJOR CONCEPTS OF EXEX,FASTXX,FXMIN I PROGRAMS BY
MARTIN J HILLYER, JOHN P NORDIN, TILL E STOECKENIUS AT SAI.
DISK FILE) FOR THE CONC-
860722 PAULUS IRPAN
EXEXS VERSION 2.0
MODIFY & ADD PAGING SCHEME (MEMORY
DATA BUFFERS, USING A TEMPFlLE.
THE RUNFILE SIZE IS REDUCED SIGNIFICANTLY, YET THE PROGRAM NOW
CAN HANDLE INFINITE 4CONC-DATA WHERE DISK SPACE IS THE LIMIT!
THE PROGRAM MAINTAIN ONLY A PAGE OF CONC-DATA IN MEMORY, AND
PAGE IN & OUT TO THE TEMPFlLE (THE SAVE-DATA FILE) AS NEEDED.
THIS PAGING, USING TEMPFlLE, IS DONE ONLY WHEN THE ICONC-DATA
F-41
-------
Page
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
EXCEED THE PAGE/BUFFER SIZE.
THE RUN-TIME OF THIS VERSION IS
IN-MEMORY VERSION WHEN FEW OR
IS NEEDED!
NOT MUCH MORE THAN THAT OF VI.0
NO PAGING OF DATA TO TEMPFILE
8708XX THOMAS STOCKING
MODIFIED TO INCLUDE OPTIONS FOR PROBABILITY OF VIOLATIONS
CALCULATIONS
871110 THOMAS STOCKING
CHANGED TO REMOVE ARRAY(O)
REFERENCES
871207 MARIANNE DUDIK, SYSTEMS APPLICATIONS INC.
EXEX VERSION 2.0 IBM
REMOVED IN-LINE COMMENTS SET BY '/*' BY CREATING A PRECEEDING
COMMENT. IF COMMENTS USED TO DEFINE LOCAL VARIABLE THE DOCUMENT-
ATION WAS MOVED TO A SECTION TITLES 'SOME LOCAL VARIABLES'
IN ORDER TO PRESERVE PAULUS IRPAN DOCUMENT I ON .ALSO $INSERT
COMMON BLOCKS HAVE BEEN LOADED INTO THE PROGRAM AND DOCUMENTED
IN THE HEADER OF THE SOURCE CODE
880131 MARIANNE DUDIK
CONVERSION TO NCC IBM 3090 COMPLETE WITH STRAIGHT EXEX
MODEL AND A 24 HOUR COVARYING POV MODEL. PLEASE NOTE
THAT DOCUMENTATION INTERNAL TO CODE MAY NOT HAVE BEEN
COMPLETELY UPDATE TO REFLECT MODEL FULL POTENTIAL
USER_INPUT_FILE:
FORMAT IS LIST-DIRECTED/FREE-FORMAT (EXCEPT FOR CHAR STRINGS).
RECORD VARIABLE DESCRIPTIONS
TITLE
CSTD
CBACK
NSIM
NSRC
IAVPER
RHO()
LGRID
TITLE OF RUN (A80).
A COMPARISON AIR QUALITY STANDARD (UG/M3).
IN GENERAL, REDUCING THIS INPUT WILL INCREASE RUN-
TIME, SINCE MORE CHI/Q DATA WILL PASS THE SCREENING
PROCEDURE.
BACKGROUND CONCENTRATION (UG/M3).
I SIMULATIONS TO BE PERFORMED FOR EACH METEOROLOGY
YEAR. USED IN EXEX MODEL II ONLY.
* EMISSION SOURCES.
AVERAGING PERIOD.
FOR NOW, IT IS PURPOSELY RESTRICTED TO 1,3 & 24-HOUR
AUTOCORRELATION CO-EF FOR EMISSIONS DISTRIBUTION
BY SOURCE GROUP.
FLAG WHETHER TO PRINT EXEX OR POV BY THE RECEPTORS
0 = DON'T OUTPUT RECEPTORS' EXEX OR POV
1 = OUTPUT EXEX OR POV ON POLAR GRID RECEPTORS
2 = OUTPUT EXEX OR POV ON TABULAR GRID RECEPTORS
9 = OUTPUT EXEX OR POV WITH GRID TYPE SPECIFIED IN D
-------
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
1 Sfl
1 -J \J
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
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
r
Lr
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
LYRLY
OUTOPT
5 NYEAR
IYEAR()
6 SNAME
7 ISRC
IGRP
QGM
QGSO
GSDCUT
8
TARGET
EPS
IVARY
NQ1
Q1BEG
Q1END
Q2MIN
Q2MAX
DISPERSION-MODEL-
FLAG WHETHER TO CALC & PRINT YEARLY EXEX.
0 = NO YEARLY OUTPUT
1 = OUTPUT YEARLY EXEX
OUTPUT OPTION
0 = OUTPUT EXEX ONLY
1 = OUTPUT POV ONLY
2 = OUTPUT BOTH EXEX AND POV |
1 METEOROLOGICAL YEARS (4 DATAFILES).
THE YEARS OF DATA, ,
IN THE ORDER OF THE SPECIFIED DATAFILES.
SOURCE NAME (A20)
SOURCE*, MAX 2 DIGITS, DOESN'T HAVE TO BE ORDERED.
SOURCE-GROUP*, DOESN'T HAVE TO BE ORDERED.
EMISSION SULFUR CONTENT GEOM MEAN (LB/MMBTU).
EMISSION SULFUR CONTENT GEOM STD DEV (LB/MMBTU).
IGSD ABOVE GM WHERE EMISS RATE DISTR IS TRUNCATED.
VALUE 6 IS RECOMMENDED.
RECORDS 6-7 ARE REPEATED FOR NSRC SOURCES.
ADDITIONAL INPUT TO RUN MODELS (ITERATIVE EXEX).
TARGET MAX EXPECTED EXCEEDANCE VALUE.
TOLERANCE (EPSILON) TO TARGET.
WHICH EMISSION DATA TO VARY TO CALC THE OTHER PARAM
1 = VARY BY GM TO CALC GSD
2 = VARY BY GSD TO CALC GM
* VARYING STEPS
VARYING THE EMISSION PARAM BEGINS AT
VARYING THE EMISSION PARAM ENDS AT
MIN LIMIT TO CALC/SEARCH THE OTHER EMISSION PARAM
MAX LIMIT TO CALC/SEARCH
RESULTS DATAFILES:
THE FORMAT OF THIS DATA DEPENDS ON THE DATA I/O STATEMENTS/ROUTINES
YOU CHOOSE TO USE
; WHETHER STANDARD FORTRAN I/O OR SAIOLB I/O.
BUT, THE ORGANIZATION OF DATA SHOULD BE SIMILAR.
RECORD VARIABLE
1 DTITLE
2 IYR
NS
NR
NP
IGRD
NX
IDUM()
3 CCUT
DESCRIPTION
TITLE/NAME OF THE DATA.
THE YEAR OF MODELED DATA
ISOURCES, DOESN'T HAVE TO BE THE SAME AS NSRC
IRECEPTORS
^PERIODS IN THE YEAR
RECEPTOR GRID TYPE (OPTIONS ARE SIMILAR TO LGRID)
#RADII OR # X-DIRECTION RECEPTORS
4 RESERVED INTEGER DATA FOR FUTURE
CHI/Q CUT VALUE USED IN PRESCREENING OF DATA
-------
Page
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
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*
C*
C*
C*
C*
C*
C*
C*
C
C
C
C
C
C
C
C
C
RDUM() 9 RESERVED REAL DATA FOR FUTURE
4 ID() PERIOD,SOURCE,RECEPTOR #S (PPPPSSRRR).
5 CONC() CHI/Q NORMALIZED CONCENTRATIONS (G/M3) CORRESPONDING
TO THE ID CODES IN THE PREVIOUS RECORD.
RECORDS 3-4 ARE REPEATED AS MANY TIMES A'S NECCESSARY
WHERE THE LAST RECORD MAY BE PADDED WITH O'S TO MAKE
EVEN LENGTHS OF RECORDS. EACH RECORD PA.IR CONTAINS
NPAIR (DEFINED IN THE READING ROUTINE) CfATA.
PROGRAM PARAMETERS:
THESE ARE CONSTANTS
THEY CAN BE CHANGED
THEY ARE DEFINED IN
IN SOURCE-CODE WHICH SET VARIOUS LIMITS,
TO SUIT NEEDS (AS MEMORY PERMITS).
THE SOURCE-CODE INSERT FILE (EXEXS.INS).
CONVERGE ESTIMATES
MSIM MAX ^SIMULATIONS PER YEAR (MONTE-CARLO SIMULATION),
PROVIDED JUST FOR PROTECTION.
MSRC MAX ISOURCES (IN USER-INPUT FILE).
MGRP MAX ISOURCE-GROUPS.
MYEAR MAX IYEARS OF DISPERSION-MODEL-RESULTS (THUS, IDATAFILES)
MREC MAX IRECEPTORS.
MQ MAX ^VARYING (Q GM OR GSD) STEPS.
MITER MAX ^ITERATIONS ALLOWED IN THE LOOP TO
OF Q GM OR GSD TO THE TARGET.
MBSAV MAX #CONC-DATA THAT CAN BE KEPT IN MEMORY (DATA BUFFER/
SIZE). THIS IS LIMITED TO THE MAX I/O RECORD SIZE,
CHECK RECL=N ARGUMENT OF FORTRAN OPEN STATEMENT.
THE LIMIT = MAX RECORD SIZE / (1PERS() + I RECS(UCONCS()
DATA TYPE SIZES)
VIOL THE # OF EXCEEDANCES CONSTITUTING A VIOLATION
INSERT FILE EXEXS.INS
FOR EXEXS.F77
CONTA
V2.0
IN CONSTANTS & COMMON BLOCKS.
CONSTANTS:
INTEGER MSIM,MSRC,MGRP,MYEAR,MREC,MQ,MITER,MBSAV
PARAMETER (
MSIM
MSRC
MGRP
MYEAR
MREC
MQ
MITER
1999,
6,
6,
6,
200,
20,
99,
/*
/*
MAX * SIMULATIONS/SAMPLINGS PER YEAR
MAX # EMISSION SOURCES
MAX SOURCE-GROUPI
MAX
# YEARS OF DISPERSION MODEL RESULT
/* MAX # RECEPTORS
/* MAX * VARYING QGM/QGSD (MUST >= MSRC)
/* MAX * ITERATIONS ALLOWED FOR MODELS
F-44
-------
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
C . MBSAV = 4095,
C . VIOL = 2.)
C
C
C
C*
C*
COMMON PARAM
C* USER INPUTS/PARAMS:
C*
C CHARACTER
C
C
C
c
C
C
c
Q
C
c
C
C
c
C
C
C
c
C
C
C
c
C
C
C
C
C
c
c
C
TITLE*80,
SNAME(MSRC)*20
INTEGER
NSIM,
NSRC,
NREC,
NXREC,
IAVPER,
LGRID,
LYRLY,
NYEAR,
lYEAR(MYEAR),
ISRC(MSRC),
IGRP(MSRC),
IVARY,
NQ1,
POVFLAG,
OUTOPT
REAL
CSTD,
CBACK,
QGM(MQ),
QGSD(MO),
GSDCUT(MSRC),
TARGET,
EPS,
Q1BEG.Q1END,
Q2MIN.Q2MAX,
RHO(MSRC)
C*
C* COMPUTED PARAMS:
C*
C INTEGER
C MODEL,
C NSG,
C ISG(MGRP),
C NTP,
C MSAV
C REAL
C CCUTMX,
C QCUT(MGRP),
C CZERO
C*
C COMMON /PARAM/
C . TITLE, SNAME,
C . NSIM.NSRC.NREC
/* MAX # CONC DATA THAT CAN BE BUFFERED
/* IN-MEMORY (DATA-PAGE SIZE), THE LIMIT
/* DEPENDS ON THE MAX I/O RECORD LENGTH.
/* FOR PRIME F77 = 4095 = 16KW/(l+l+2) -
/* TITLE OF RUN
/* SOURCE NAMES
/* I SAMPLINGS (SIMULATIONS) PER YEAR
/* I SOURCES
/* I RECEPTORS
/* * X-DIRECTION/RADII RECEPTORS
/* AVERAGING PERIOD
/* OPTION TO PRINT EXEX BY RECEPTORS GRID
/* OPTION TO PRINT EXEX TABLE BY YEAR
/* I YEAR OF DISPERSION MODEL RESULTS
/* THE YEARS OF
/* SOURCE NUMBERS
/* SOURCE-GROUP NUMBERS
/* OPTION TO VARY QGM OR QGSD
/* I VARYING/STEPS OF QGM OR QGSD
/* FLAG FOR USE OF POV MODELS
/* OUTPUT OPTION
I
STANDARD CONCENTRATION (UG/M3)
BACKGROUND CONCENTRATION (UG/M3)
GEOMETRIC MEAN EMISSIONS
GEOMETRIC STANDARD DEVIATION EMISSIONS
I GSD POWERS TO LIMIT (CUT POINT)
TARGET EXCEEDANCE CONCENTRATION
TOLERANCE (EPSILON) TO TARGET CONC
START & ENDING OF VARYING QGM OR QGSD
RANGE TO COMPUTE QGM OR QGSD
AUTOCORRELATION CO-EF FOR EMMISSIONS
/* THE MODE/MODEL TO EXECUTE
/* * SOURCE-GROUPS
/* INDEXES TO START OF SOURCE-GROUPS
/* ^TABLES OF EXEX OUTPUT PER PAGE
/* EFFECTIVE SIZE OF CONC PAGE/BUFFER
/* MAX OF CHI/Q DATA SCREENING VALUES
/* MAX EMISS RATE BY SOURCE-GROUP
/* MIN CONC OF CONCERN
,NXREC,IAVPER,LGRID,LYRLY,NYEAR,I YEAR,I SRC,
F-45
-------
Page
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
O 1 C
316
317
318
319
320
321
322
323
324
325
326
327
328
329
T T f\
331
332
333
334
-1 -3 C
J J J
336
337
338
339
340
341
342
C
C
C
C
C
C*
C*
IGRP, IVARY.NQ1,
CSTD,CBACK,QGM,QGSD,GSDCUT,TARGET,EPS,Q1BEG,Q1END,Q2MIN,
Q2MAX,
MODEL, NSG.ISG.NTP.MSAV, CCUTMX ,QCUT , CZERO , RHO , POVFLAG ,
OUTOPT
COMMON STORE1 & STORE2 '
C* DATA FROM DATAFILES (PAGE BUFFERS):
C*
C*!
C*!
C*
C
C
C
C
C
C
C
C
C
C
C
C
C*
C
C
C
c
C THE
C (TH
c
c
c
c
c
c
£
c
c
c
c
p
c
C !
r.
p
C
Q
c
£
Q
Q
c
YOU CAN MAKE IPERS() & IRECS() ARRAYS OF SHORT INTEGEfe (INTEGER*2
TO REDUCE MEMORY REQUIREMENT, SO YOU CAN HAVE BIGGER MBSAV LIMIT.
INTEGER
. NDATYR(MYEAR), /* * AVAILABLE DATA PAIRS IN EACH YEAR
. ISAVYR(0:MYEAR) , /* INDEXES TO LAST DATA SAVED BY YEARS
. NSAVE, /* TOTAL 1 RECORDS SAVED/SCREENED
. NPAGE, /* 1 DATA-PAGE SAVED (PLUS THE LAST PAGE)
. NSAV, /* # DATA BEING BUFFERED IN SAVE-PAGE
. IOPAGE /* OLD PAGE* (CURRENT DATA BUFFER IN-MEM)
INTEGER*2
. IPERS(MBSAV) , /* PERIOD 1
. IRECS(MBSAV) /* RECEPTOR 1
REAL
. CONCS(MBSAV) /* CHI/Q CONCENTRATION
COMMON /STORE1/ NDATYR , ISAVYR , NSAVE , NPAGE, NSAV, IOPAGE
COMMON /STORE2/ IPERS.IRECS, CONCS
NON-STANDARD OR COMPUTER DEPENDENT CODES ARE:
ESE PARTS ARE WRITTEN WITH COMMENT CODE '*!'}
- I/O FILEUNITS (PARAMETERIZED IN THE MAIN PROGRAM).
- COMPILER DIRECTIVES.
- DATE-TIME SYSTEM ROUTINES
(PRIMOS1 DATE$A & TIME$A).
- IN-LINE COMMENT SYMBOL
(I.E. PRIME F77 USES '/*', UNIVAC ASCII FORTRAN USES '&').
- THE RANDOM* GENERATOR ROUTINE RANDNO + TAUS15.
- OTHER CODES HEADED WITH COMMENT SYMBOL '*!'.
PROGRAM EXEXS
SOME LOCAL VARIABLES
FUINP P FILEUNIT FOR INPUT PARAMETERS FILE
FUPRT P " PRINTFILE (OUTPUT FILE)
FUBUF P " SAVED CONC DATA (TEMPFILE)
FUDAT P FILEUNIT OF 1ST OF DATAFILES
YOU MUST ALLOW ENOUGH INCREMENT FROM
FUDAT UNIT TO FUDAT+N YEAR- 1 TO COVER
F-46
-------
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
Ift7
JO/
388
389
390
391
392
393
394
395
396
397
398
399
C
C
C
C
Q
C
C!
C...
C
C
C
C!
C
C
C
C! G
C! Y
C
C.
C.
C.
C.
C.
C.
C.
NYEAR OF DATAFILES!
FN*64 C FILENAME (PATHNAME)
DATE(4),TIME(2) I SYSTEM DATE & TIME (PRIME COMPUTER)
INTEGER
PARAMETER
PARAMETER
PARAMETER
PARAMETER
FUINP.FUPRT.FUBUF.FUDAT
FUINP=11
FUPRT=12
FUBUF=13
FUDAT=14
$INSERT EXEXS.INS
INTEGER MSIM,MSRC,MGRP,MYEAR,MREC,MQ,MITER,MBSAV
PARAMETER (MSIM = 1999 ,MSRC = 6,MGRP = 6,MYEAR = 6,MREC = 200,MQ = 20,
& MITER=99,MBSAV=4095,VIOL=2.)
CHARACTER TITLE*80,SNAME(MSRC)*20
INTEGER NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,
& IYEAR(MYEAR),ISRC(MSRC),IGRP(MSRC),IVARY,NQ1,
& POVFLAG.OUTOPT
REAL CSTD, CBACK, QGM(MQ),GSDCUT(MSRC),TARGET,EPS,Q1BEG.Q1END,
& Q2MIN,Q2MAX,RHO(MSRC),QGSD(MQ)
INTEGER MODEL,NSG,ISG(MGRP),NTP,MSAV
REAL CCUTMX,QCUT(MGRP),CZERO
COMMON /PARAM/
TITLE,SNAME,
NSIM,NSRC,NREC,NXREC,IAVPER,LGR10,LYRLY,NYEAR,IYEAR,ISRC,
IGRP.IVARY.NQ1,
CSTD, CBACK, QGM.QGSD,GSDCUT,TARGET,EPS,Q1BEG,Q1END,Q2M I N ,
Q2MAX,
MODEL,NSG,ISG,NTP,MSAV, CCUTMX,QCUT.CZERO,RHO.POVFLAG,
OUTOPT
INTEGER NDATYR(MYEAR) , ISAVYR(0:MYEAR),NSAVE,NPAGE,NSAV,IOPAGE
INTEGER*2 I PERS" (MBSAV) , I RECS (MBSAV)
REAL CONCS(MBSAV)
COMMON /STORE1/ NDATYR,ISAVYR,NSAVE,NPAGE,NSAV,IOPAGE
COMMON /STORE2/ IPERS.IRECS, CONCS
CHARACTER FN*64
INTEGER*4 DATE(4),TIME(2)
GET & OPEN FILES
YOU MAY WANT TO COMMENT OUT THIS SECTION FOR UNIVAC & IBM
PRINT '(A)1 , 'USER INPUT FILE: '
READ '(A)1, FN
OPEN (FUINP, FILE = FN, STATUS='OLD' )
PRINT '(A)', '# DISPERSION-MODEL-RESULTS DATAFILES (IYEARS):
READ *, NYEAR
PRINT '(A)', 'DATAFILES:'
F-47
-------
Page
400
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
.. .c
DO 100 IFU = FUDAT, FUDAT+NYEAR-1
READ '(A)' , FN
OPEN (IFU, FILE=FN, STATUS='OLD')
100 CONTINUE
PRINT '(A)', 'PRINTFILE:1
READ
OPEN (
(A)', FN
FUPRT. F
ILE=FN)
! WRITE DISCLAIMER MSGS & DATE-TIME OF RUN.
! CHANGE OR COMMENT OUT THE DATE-TIME SECTION FOR OTHER COMPUTERS.
PRINT '(IX, A)
WRITE (FUPRT, '(1H1///(3A)) ')
EXCEEDANCES SYSTEM
********** >
V3.01 Ol-JAN-881 , ' ' ,
TSO F77 VERSION ' , ' ,
APPLICATIONS, INC.1,
I I I I I
EXPECTED1 ,
t*** i
EXEXS
IBM
SYSTEMS
.1000
,C
1002
.1001
,101
CALL DATE$A (DATE)
CALL T1ME$A (TIME)
WRITE FUPRT,' /42X,A,2X,4A4,2X,2A4)')
. 'DATE & TIME OF RUN:1, DATE,TIME
-- ADD INQUIRE STATEMENT AND WRITES FOR IBM
SO THAT INPUT AND DATA FILES PRINTED TO OUTPUT
INQUIRE (UNIT=FUINP,NAME=FN)
WRITE (FUPRT,1000) FN
FORMAT (5X,'USER INPUT FILE: ',64A)
READ (*,*) NYEAR
WRITE (FUPRT,1002)
FORMAT (5X,'DATAFILES: ')
DO 101 IFU = FUDAT, FUDAT+NYEAR-1
INQUIRE (UNIT=IFU,NAME=FN)
WRITE (FUPRT,1001) FN
FORMAT (7X,A)
CONTINUE
INPUT USER PARAMETERS
AND SET-UP/PREPARE SOME OTHER PARAMS
-------
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
R1 T
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
r
CALL GETINP (FU INP,FUPRT)
CALL CHKDAT (FUDAT,FUPRT)
CALL SETUP (FUPRT,FUBUF)
READ & SCREEN DATAFILES (STORE ONLY THE NEEDED RECORDS)
AND WRITE SOME STATISTICS ABOUT THE DATA READ & STORED
CALL GETDAT (FUDAT,FUPRT,FUBUF)
COMPUTE EX-EX & WRITE OUTPUT
IF (MODEL .EQ.
CALL MODEL1
ELSEIF (MODEL
CALL MODEL2
ELSEIF (MODEL
CALL MODELS
ELSEIF (MODEL
CALL MODEL4
ELSEIF (MODEL
CALL MODEL5
ELSE
CALL MODEL6
ENDIF
1) THEN
(FUPRT,FUBUF)
.EQ. 2) THEN
(FUPRT,FUBUF)
.EQ. 3) THEN
(FUPRT,FUBUF)
.EQ. 4) THEN
(FUPRT,FUBUF)
.EQ. 5) THEN
(FUPRT,FUBUF)
(FUPRT,FUBUF)
! END OUTFILE & PROGRAM AND CLOSE SCRATCH FILE
CLOSE (FUBUF,IOSTAT=IX,STATUS='DELETE1)
ENDFILE FFUPRT)
PRINT '(IX,A)1 , 'OK. '
STOP
END
CDECK GETINP
C
C==== SUBR GETINP ======================================================
C
C GET USER INPUT PARAMS (INCLUDING SETTING DEFAULTS), AND PREPARE OTHER
PARAMS. ECHO INPUT INFO TO PRINTFILE.
SUBROUTINE GETINP (FUINP, FUPRT)
SOME LOCAL VARIABLES
FUINP,FUPRT I 10 FILEUNITS
F-49
-------
Page 1C
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
C
C
C
C
C
C
C
C
C
C
c
c
c
c
c
c
c
c
c
INTEGER FUINP,FUPRT
.SINSERT EXEXS. INS
INTEGER MSIM,MSRC,MGRP,MYEAR,MREC,MQ,MITER,MBSAV
PARAMETER (MS IM = 1999 , MSRC = 6 ,MGRP = 6 ,MYEAR = 6,MREC = 200,MQp20,
& MITER=99,MBSAV=4095,VIOL=2.)
CHARACTER TITLE*80 .SNAME(MSRC)*20 ,
INTEGER NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,
& IYEAR(MYEAR),ISRC(MSRC),IGRP(MSRC),1VARY,NQ1,
& POVFLAG,OUTOPT
REAL CSTD,CBACK,QGM(MQ),GSDCUT(MSRC),TARGET,EPS,Q1BEG,Q1END,
& Q2MIN,Q2MAX,RHO(MSRC),QGSD(MQ)
INTEGER MODEL,NSG,ISG(MGRP),NTP,MSAV
REAL CCUTMX,QCUT(MGRP),CZERO
COMMON /PARAM/
TITLE,SNAME,
NS1M,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,IYEAR,ISRC,
IGRP.IVARY.NQ1,
CSTD,CBACK,QGM,QGSD,GSDCUT,TARGET,EPS,Q1BEG,Q1END,Q2MIN,
Q2MAX,
MODEL,NSG,ISG,NTP,MSAV, CCUTMX ,QCUT,CZERO,RHO,POVFLAG,
OUTOPT
INTEGER NDATYR(MYEAR),ISAVYR(0:MYEAR),NSAVE,NPAGE,NSAV,IOPAGE
INTEGER*2 IPERS(MBSAV),IRECS(MBSAV)
REAL CONCS(MBSAV)
COMMON /STORE1/ NOATYR, ISAVYR , NSAVE,NPAGE,NSAV,IOPAGE
COMMON /STORE2/ IPERS.IRECS, CONCS
PRINT '(IX,A)1, 'GETINP1
WRITE (FUPRT,'(///3A/)')
! 'NPUT INFORMATION
USER I',
GENERAL RUN PARAMS
READ
READ
READ
READ
READ
FUINP, '
FUINP,*
FUINP,*
FUINP,*
FUINP,*
[A80)1) TITLE
CSTD.CBACK
NSIM.NSRC.IAVPER
LGRID.LYRLY, OUTOPT
NYEAR, (IYEAR(I),I=1
.NYEAR)
ECHO THESE USER INPUTS
WRITE (FUPRT,1(A50.A80/ A50.F7.2/ A50.F7.2/ A50.I4/ A50.I4/ A50.I4
/A50.I2/ A50,(T51,10(14,2X)))')
'TITLE OF RUN
TITLE,
-------
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
'COMPARISON STANDARD CONCENTRATION (UG/M3)
'BACKGROUND CONCENTRATION (UG/M3)
'I SIMULATIONS PER YEAR
'# EMISSION SOURCES
'AVERAGING PERIOD (HOURS)
OUTPUT OPTION
'YEARS OF REQUESTED DISPERSION RESULTS
(IYEAR(I),I=1,NYEAR)
CSTD,
CBACK,
NSIM,
NSRC,
IAVPER,
OUTOPT,
(/4X.A)1)
" OR.
WRITE (FUPRT,
IF (OUTOPT .EQ; o
IF (LGRID .EQ. 0)
WRITE (FUPRT ' '
'PRINT MAX
ELSEIF (LGRID
WRITE
OPTIONS ACTIVATED:
OUTOPT .EQ. 2) THEN
THEN
(4X.A)')
EXPECTED EXCEEDANCES1
EO. 1) THEN
(FUPRT,'MX,A)1)
'PRINT EXPECTED EXCEEDANCES
ELSEIF (LGRID .EQ. 2) THEN
WRITE (FUPRT,'(4X.A)')
'PRINT EXPECTED EXCEEDANCES
). 9) THEN
4X.A)')
IXCEEDANCES
THEN
THEN
'MX,A)')
PROBABILTIY
EQ. 1) THEN
OF VIOLATION1
4X.AV)
POLAR
GRID
THEN
OF RECEPTORS1
ELSEIF (LGRID .E
WRITE (FUPRT,'
. 'PRINT EXPECTED
ENDIF
ENDIF
IF (OUTOPT .GE. 1
IF (LGRID .EQ. 0
WRITE (FUPRT,'
'PRINT MAX
ELSEIF (LGRID .
WRITE (FUPRT,
'PRINT POVS ON
ELSEIF (LGRID .EQ. 2)
WRITE (FUPRT,'(4X.A)')
'PRINT POVS ON TABULAR GRID OF RECEPTORS'
ELSEIF (LGRID .EQ. 9) THEN
WRITE (FUPRT, '(4X.A)')
'PRINT POVS WITH FORMAT SPECIFIED
ENDIF
ENDIF
IF (LYRLY .EQ. 0) THEN
WRITE (FUPRT, '(4X,A)')
OUTPUT ALL-YEARS RESULT
ELSEIF (LYRLY .EQ. 1) THEN
WRITE (FUPRT,'(4X,A)')
'OUTPUT BOTH YEARLY AND ALL-YEARS
ENDIF
AND ERROR CHECK
ON POLAR GRID RECEPTORS'
ON TABULAR GRID RECEPTORS'
WITH FORMAT SPECIFIED IN DATAFILE'
IN DATAFILE'
ONLY1
RESULTS'
IF
IF
IF
IF
IF
OUTOPT.GT.2) CALL ERROR (FUPRT,21,0,0.)
NSIM .GT. MSIM) CALL ERROR (FUPRT, 1, MSIM.O.
NSRC .GT. MSRC CALL ERROR (FUPRT, 2, MSRC.O..
IAVPER.NE.l .AND. IAVPER.NE.3 .AND. IAVPER.NE.24)
ALL ERROR (FUPRT, 3, 0,0.)
(LGRID.NE.O .AND. LGRID.NE.l .AND.
LGRID.NE.2 .AND. LGRID.NE.9)
F-51
-------
Page 1:
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
C
Q
C
C
C
C
C
C
C
C
C
C
C
C
C
c
c
c
Q
c
. CALL ERROR (FUPRT, 4, 0,0.)
IF (LYRLY.NE.O .AND. LYRLY.NE.l) CALL ERROR (FUPRT, 5, 0,
IF (NYEAR .GT. MYEAR) CALL ERROR (FUPRT, 6, MYEAR.O.)
EMISSION SOURCES INFO ,
WRITE (FUPRT, '(//4X, A/) ') 'COAL SULFUR CONTENT DISTRIBUTI
READ THE EMISSION SOURCES INFO '
THIS SECTION WILL DETERMINE THE MODE OF MODEL TO EXECUTE
1 = MULTI-EXEX = MULTIPLE SOURCE-GROUPS
2 = SINGLE-EXEX = SINGLE SOURCE-GROUP & FIX QGM & QGSD
3 = ITERATIVE-EXEX = SINGLE SOURCE-GROUP & VARYING QGM
4 = MULTI-POV = MULTIPLE SOURCE-GROUPS
5 = SINGLE-POV = SINGLE SOURCE-GROUP & FIX QGM & QGSD
6 = ITERATIVE-POV = SINGLE SOURCE-GROUP & VARYING QGM &
DO 100 I = 1, NSRC
READ FUINP, ' (A20) ') SNAME(I)
READ(FUINP,*)ISRC(I , I GRP( I ) ,QGM( I ) ,QGSD ( I ) , GSDCUT( I ) , R
100 CONTINUE
IF (OUTOPT .GE. 1) GO TO 280
MODEL = 1
DO 200 I = 2, NSRC
IF (IGRP(I) .NE. IGRP(I-l)) GOTO 299
200 CONTINUE
MODEL = 2
READ (FUINP, *,END = 299)
TARGET, EPS, IVARY, NQ1 ,Q1 BEG ,Q1 END , Q2MIN.Q2MAX
MODEL = 3
GO TO 299
280 MODEL = 4
DO 210 I = 2, NSRC
IF (IGRP(I) .NE. IGRP(I-l)) GOTO 299
210 CONTINUE
MODEL = 5
READ (FUINP, *,END = 299)
TARGET.EPS, IVARY, NQ1 ,Q1BEG ,Q1 END , Q2MIN.Q2MAX
MODEL = 6
299 CONTINUE
ECHO THE SOURCES INFO
WRITE (FUPRT, (4X , A56 , A53/A56) ' )
. 'SOURCE* GROUP* SOURCE NAME GEOMETRIC MEAN
. 'GEOMETRIC STD DEV #GSD TO MAX AUTOCORRELATION CO-EF'
. ' (LB S02/MMBTU)
IF (MODEL. EQ.l .OR. MODEL. EQ. 2 .OR. MODEL. EQ. 4 .OR. MODEL
. THEN
WRITE (FUPRT, ' ( 6X , 12 , 7X , I 2 , 4X , A20 , 6X , F6 . 2 , 11X , F6 . 2 , 12X ,
11X.F6.2)1)
(ISRC(I),IGRP(1),SNAME(I),QGM(I),QGSD(I) ,GSDCUT(I) ,RH
1=1, NSRC)
o.)
ON: '
& QGSD
QGSD*
HO(I)
»
»
.EQ.5)
F4.1,
0(1),
-------
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
7?4
/ £ T
725
726
727
728
7 9Q
i c y
7 in
/ J U
731
732
733
734
735
736
737
738
739
740
741
C
ELSE
IF (IVARY .EQ. 1) THEN
WRITE (FUPRT, ' (6X , 12 , 7X , 12 ,4X , A20 ,2X ,F6 . 2 ,
A,F5.2,/,43X,I3,A,8X,F6.2,A,F6.2)
ISRC(1),IGRP(1),SNAME(1), Q1BEG,1 - ',Q1
'COMPUTED WITHIN', GSDCUT(l),'
NQ1,' VALUES', Q2MIN,' - ' .Q2MAX
ELSE
WRITE (FUPRT,'(6X,I2,7X,I2,4X,A20,2X,A,3X,
A,F5.2,/,43X,F6.2,A,F6.2,3X,I3,A)
ISRC(1),IGRP(1) ,SNAME(1), 'COMPUTED WITH
Q1BEG,' - '.QIEND, GSDCUT(l),1
Q2MIN,' - '.Q2MAX, NQ1,' VALUES'
ENDIF
IF (OUTOPT .EQ. 0) THEN
WRITE (FUPRT, '(/4X,A,F6.2,A,F8.4) ')
'TARGET MAX EXPECTED EXCEEDANCE = '.TARGET
ELSE
WRITE (FUPRT,'(/4X,A,F6.2,A,F8.4)')
A,F6.2,3X,A,6X,F4.1,
1 )
END,
F6.2,A,F.6.2,6X,F4.1,
| V I
IN' ,
',RHO(1),
,' +/-',EPS
'TARGET MAX PROBABILITY OF VIOLATION =', TARGET.' +/- .EPS
ENDIF
ENDIF
C
C
C AND ERROR CHECK
C
IF (MODEL .EQ. 3 .OR. MODEL .EQ. 6) THEN
IF (IVARY. LT.l .OR. IVARY. GT. 2) CALL ERROR (FUPRT, 7, 0,0.)
IF (NQ1 .GT. MQ) CALL ERROR (FUPRT, 8, MQ.O.
IF (IVARY .EQ. 1) THEN
IF (Q1BEG .LE. 0.) CALL ERROR (FUPRT, 16,
IF (Q2MIN .LE. 1.) CALL ERROR (FUPRT, 17,
ELSE
IF (Q1BEG .LE. 1.) CALL ERROR (FUPRT, 17,
IF (Q2MIN .LE. 0.) CALL ERROR (FUPRT, 16,
ENDIF
ENDIF
C
C_ _ _ _ ---.__-_-_-__
C
C PRINT WHAT METHOD/MODE OF MODEL IS TO BE EXECUTED
C
WRITE (FUPRT, '(//A, A)')
I 1
IF (MODEL .EQ. 1) THEN
WRITE (FUPRT, '(A, A) ')
. ' ! MODEL IS RUN IN MULTI SOURCE-GROUPS
i i >
' 9
' ! EXPECTED EXCEEDANCES ARE CALCULATED
. 'LO SIMULATION. ! '
ELSEIF (MODEL .EQ. 2) THEN
WRITE (FUPRT, '(A, A)')
. ' ! MODEL IS RUN IN SINGLE SOURCE-GROUP
i i '
! ' ! EXPECTED EXCEEDANCES ARE CALCULATED
)
0,0.)
0, Q2MIN)
0, Q1BEG)
0,0.)
1
MODE.
USING A MONTE-CAR1 ,
MODE, I.E.
ANALYTICALLY
F-53
-------
Page 14
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
' ! (NO MONTE-CARLO SIMULATION IS PERFORMED).
ELSEIF (MODEL .EQ. 3) THEN
WRITE (FUPRT,'(A,A ')
! MODEL IS RUN IN SINGLE SOURCE-GROUP ITERATIVE MODE,
NO MONTE-CARLO SIMULATION IS PERFORMED.
! ' ,
NO YEARLY RESULT CAN BE OUTPUT.
1 ! '
'ELSEIF (MODEL .EQ. 4) THEN
WRITE (FUPRT, ' (A, A) ')
' ! MODEL IS RUN IN MULTI SOURCE-GROUP MODE FOR POVS.
'
MONTE-CARLO SIMULATION IS PERFORMED.
i i
ELSEIF (MODEL .EQ. 5
THEN
WRITE (FUPRT, ' (A, A) ' )
MODEL IS RUN IN SINGLE SOURCE-GROUP MODE FOR POVS.
. ' ! MONTE-CARLO SIMULATION IS PERFORMED.
I | I
'ELSE
WRITE (FUPRT, '(A, A) ')
. ' ! MODEL IS RUN IN SINGLE SOURCE-GROUP ITERATIVE MODE
. ' FOR POVS. ! ' ,
. ' ! MONTE-CARLO SIMULATION IS PERFORMED.
. ' ! '
ENDIF
WRITE (FUPRT, '(A, A)1)
C
C
RETURN
END
CDECK CHKDAT
C
C==== SUBR CHKDAT =================================================
C
C GET & CHECK HEADERS OF THE DISPERSION-MODEL-RESULTS DATAFILES.
C HERE WE GET IRECEPTORS INFORMATION.
C ECHO THESE HEADERS TO PRINTFILE.
C
C
SUBROUTINE CHKDAT (FUDAT, FUPRT)
SOME LOCAL VARIABLES
FUDAT,FUPRT I DATAFILE & PRINTFILE FILEUNITS
DTITLE*80 C TITLE OF DATAFILE
IYR I YEAR MODELLED
NS,NR,NP I * SOURCES,RECEPTORS,PERIODS
1GRD.NX R RECEPTOR GRID TYPE, X-DIR RECEPTORS
CCUT I CHI/Q CUT VALUE USED IN DATA SCREENING
-------
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
C
c
C
C
C
C
C
C
C
C
C
C
C
C
C
C
INTEGER FUDAT.FUPRT
,$INSERT EXEXS.INS
INTEGER MSIM,MSRC,MGRP,MYEAR,MREC,MQ,MITER,MBSAV '
PARAMETER (MSIM=1999,MSRC=6,MGRP=6,MYEAR=6,MREC=200,MQ=20,
& MITER=99,MBSAV=4095,V10L=2.) (
CHARACTER TITLE*80,SNAME(MSRC)*20
INTEGER NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,
& IYEAR(MYEAR),1SRC(MSRC),IGRP(MSRC),IVARY,NQ1,
& POVFLAG.OUTOPT
REAL CSTD,CBACK,QGM(MQ),GSDCUT(MSRC),TARGET,EPS,Q1BEG,Q1END,
& Q2MIN,Q2MAX,RHO(MSRC),QGSD(MQ)
INTEGER MODEL,NSG,ISG(MGRP),NTP,MSAV
REAL CCUTMX,QCUT(MGRP),CZERO
COMMON /PARAM/
TITLE,SNAME,
NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,IYEAR,ISRC,
IGRP,IVARY,NQ1,
CSTD.CBACK.QGM.QGSD.GSDCUT,TARGET.EPS,Q1BEG.Q1END.Q2MIN,
Q2MAX,
MODEL.NSG.ISG.NTP.MSAV, CCUTMX,QCUT.CZERO,RHO.POVFLAG,
OUTOPT
INTEGER NDATYR(MYEAR),ISAVYR(0:MYEAR),NSAVE,NPAGE,NSAV,IOPAGE
INTEGER*2 IPER$(MBSAV),IRECS(MBSAV)
REAL CONCS(MBSAV)
COMMON /STORE1/ NDATYR , ISAVYR,NSAVE,NPAGE,NSAV,IOPAGE
COMMON /STORE2/ IPERS.IRECS, CONCS
CHARACTER DTITLE*80
INTEGER IYR
INTEGER NS.NR.NP
INTEGER IGRD.NX
REAL CCUT
YOU NEED THESE DELCARATIONS IF YOU USE
SAIOLB FAST 10 ROUTINES
LOGICAL LEND
INTEGER*4 ITITLE(20)
INTEGER IBUF(lO)
REAL RBUF(IO)
EQUIVALENCE
EQUIVALENCE
EQUIVALENCE
DTITLE.ITITLE)
IGRD,IBUF(5)),(NX,IBUF(6
IYR.IBUF(1)),(NS,IBUF(2)),(NR.IBUF(3)),(NP,IBUF(4)),
IGRD,IBUF(5 ,(NX,IBUF(6))
CCUT,RBUF(1))
PRINT '(IX,A)1, 'CHKDAT1
WRITE (FUPRT,'(1H1///3A)')
DISPERSION-MODEL ,
F-55
-------
Page 16
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
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
. '-RESULTS DATA INFORMATION
I I
'WRITE (FUPRT, ' (//A) ) ' DATAFILES HEADERS-.'
LOOP FOR EACH YEAR (EACH DISPERSION MODEL RESULTS FILE) I
CCUTMX = 0.
DO 100 IFL = 1, NYEAR ,
FILEUNIT FOR THIS DATAFILE IS IN 1 INCREMENTAL SEQUENCE STARTING
FROM THE 1ST FILEUNIT FUDAT
IFU = FUDAT + IFL - 1
READ THE HEADER DATA
THE PREFERRED BINARY 10
READ
READ
READ
IFU
IFU
IFU
DTITLE
IYR, NS,NR,NP, IGRD.NX, (IDUM,I=1,4)
CCUT, (RDUM,I=1,9)
ALT 1: FORMATTED 10
READ (IFU,'(A)') DTITLE
READ (IFU,*) IYR, NS,NR,NP, IGRD.NX, (IDUM,I=1,4)
READ (IFU,*) CCUT, (RDUM,I=1,9)
ALT 2: SAIOLB BINARY 10
CALL VARIN (IFU, 20,DTITLE, LEND)
CALL VARIN IFU, 10.1BUF, LEND)
CALL VARIN (IFU, 10.RBUF, LEND)
ECHO THIS HEADER INFO
WRITE (FUPRT, (/A50.A/ 6(A50,I4/), A50,1P,E10.4)')
'TITLE OF DISPERSION-MODEL-RESULT DATA
'YEAR MODELED
'* SOURCES
'# RECEPTORS
'# AVERAGING PERIODS
'RECEPTOR GRID TYPE (1=POLAR,2=TABULAR)
'I RADII OR X-DIRECTION RECEPTORS
'CUT-OFF VALUE USED IN PREPROCESSOR (G/M3)
DTITLE,
IYR,
NS,
NR,
NP,
IGRD,
NX,
CCUT
ERROR CHECK
IF (NR .GT. MREC) CALL ERROR (FUPRT, 9, MREC.O.)
NPER = 24/IAVPER * (365 + LEAP(IYR))
IF (NP .NE. NPER) CALL ERROR (FUPRT, 10, IFL.O.)
IF (IYR .NE. lYEAR(IFL)) CALL ERROR (FUPRT, 11, IFL.O.
F-56
-------
913 IF (LGRIO.EQ.9 .AND. IGRD.NE.l .AND. IGRD.NE.2)
914 . CALL ERROR (FUPRT, 12, 0,0.)
916 C -
917 C
918 C FIND THE MAX OF SCREENING CHI/Q VALUE USED, IN CASE IT IS
919 C DIFFERENT FOR EACH DATAFILE I
920 C
921 IF (CCUTMX .LT. CCUT) CCUTMX = CCUT
922 C ,
923 100 CONTINUE '
924 C
925 C --- - --- --
926 C
927 C GET i RECEPTORS INFORMATION.
928 C IF USER REQUEST FOR RECEPTORS TABLE AND WANT TO USE THE GRID STYLE
929 C FROM THE DATAFILES THEN SET THE GRID FLAG.
930 C
931 NREC = NR
932 NXREC = NX
933 IF (LGRID .EQ. 9) LGRID = IGRD
934 C
935 C
936 RETURN
937 END
938
939
940 CDECK SETUP
941 C
942 C==== SUBR SETUP =================*=====================================
943 C
944 C PREPARE INPUT & OTHER PARAMETERS FOR LATER USES.
945 C
946 C
947 SUBROUTINE SETUP (FUPRT,FUBUF)
948 C
949 C
950 C SOME LOCAL VARIABLES
951 C
952 C FUPRT I PRINTFILE FILEUNIT
953 C FUBUF I TEMPFILE FOR SAVED CONC DATA
954 C TFILE(MSRC)*54 C TMP - INTERNAL FILE FOR SORTING
955 C IND(MSRC) I INDEX OF SORTED ARRAY
956 C
957 c
958 C
959 INTEGER FUPRT
960 INTEGER FUBUF
961 C!
962 C...$INSERT EXEXS.INS
963 C
964 INTEGER MSIM.MSRC,MGRP,MYEAR,MREC,MQ,MITER.MBSAV
965 PARAMETER (MS IM = 1999,MSRC = 6,MGRP = 6,MYEAR = 6,MREC = 200,MQ = 20,
966 & MITER=99,MBSAV=4095,VIOL=2.)
967 C
968 CHARACTER T ITLE*80.SNAME(MSRC)*20
969 INTEGER NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,
F-57
-------
Page II
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
c
C
c
c
c
& lYEAR(MYEAR) , I SRC(MSRC),IGRP(MSRC),I VARY,NQ1,
& POVFLAG.OUTOPT
REAL CSTD,CBACK,QGM(MQ) , GSDCUT(MSRC),TARGET,EPS,QlBEG,QlEND,
& Q2MIN,Q2MAX,RHO(MSRC),QGSD(M0)
INTEGER MODEL,NSG,ISG(MGRP),NTP,MSAV
REAL CCUTMX,QCUT(MGRP) .CZERO
COMMON /PARAM/ I
TITLE,SNAME,
NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,IYEAR,ISRC,
IGRP.IVARY.NQ1, ,
CSTD,CBACK,QGM,QGSD,GSDCUT,TARGET,EPS,Q1BEG,Q1END,Q2MIN,
Q2MAX,
MODEL.NSG.ISG.NTP.MSAV, CCUTMX ,QCUT,CZERO,RHO,POVFLAG,
OUTOPT
INTEGER NDATYR(MYEAR),ISAVYR(0:MYEAR).NSAVE,NPAGE,NSAV,IOPAGE
INTEGER*2 IPERS(MBSAV) , IRECS MBSAV)
REAL CONCS MBSAV)
COMMON /STORE1/ NDATYR, ISAVYR,NSAVE,NPAGE,NSAV,IOPAGE
COMMON /STORE2/ IPERS,IRECS, CONCS
CHARACTER TFILE(MSRC)*54
INTEGER IND(MSRC)
PRINT "(IX,A)1, 'SETUP-
COMPUTE EFFECTIVE STANDARD CONCENTRATION
& CONVERT TO G/M3 FOR COMPATIBILITY WITH THE CHI/Q DATA
CSTD = (CSTD - CBACK) * l.E-6
SORT SOURCES INFO BY SOURCE-GROUPI & COLLECT THE GROUPS INFO
SORT SOURCES INFO BY THE GROUP*
USE AN INTERNAL FILE FOR TEMPORARY BUFFER
CALL SORTI (NSRC.IGRP, IND)
DO 100 I = 1, NSRC
J = IND(I)
WRITE (TFILE(I),'(A20,2I2,1P,3E10.5E1)')
SNAME(J),ISRC(J),1GRP(J),QGM(J),QGSD(J),GSDCUT(J)
100 CONTINUE
DO 110 I = 1, NSRC
READ (TFILE(I),'(A20,212,1P , 3E10.5E1) ')
SNAME(I).ISRC(I),IGRP(I),QGM(I) ,QGSD(I) .GSDCUT(I)
110 CONTINUE
FIND & STORE INDEXES TO START OF EACH SOURCE-GROUPS
AND FIND THE HIGHEST GROUP*
DO 120 I = 1, MSRC
IS(
120 CONT1
ISG(I) = 0
"INUE
F-58
-------
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
IGO = -1
DO 130 I = 1, NSRC
IF ?1GRP(1) .NE. IGO) THEN
ISG(IGRP(I)) = I
IGO = IGRP(I)
ENDIF
130 CONTINUE
NSG = IGRP(NSRC)
MORE ERROR CHECK FOR MODEL 1 & 2
I
IF (MODEL .NE. 3 .AND. MODEL .LT. 6) THEN
IF
IF
DO
NSG .GT. MGRP) CALL ERROR FUPRT, 18, MGRP.O.)
" ' ' ' CALL ERROR (FUPRT, 16, 0,f '
) CALL ERROR (FUPRT, 17, O.QGSD(l))
QGM(l) .LE. 0.) CALL ERROR' (FUPRT, 16, O.Oi)
QGSD(l) .LE. 1.) CALL ERROR (FUPRT, 17, O.QG
50 I = 2, NSRC
IF (IGRP(I) .NE. IGRP(I-l)) THEN
150
IF (QGM(I) .LE. 0.) CALL ERROR (FUPRT, 16, 0,0.)
IF (QGSD(I) .LE. 1.) CALL ERROR (FUPRT, 17, O.QGSD(I))
IF (QGM(I).NE.QGM(I-l) .OR. QGSD(I).NE.QGSD(I-1) .OR.
GSDCUT(I).NE.GSDCUT(I-1)) CALL ERROR (FUPRT, 19, 0,0.
ENDIF
CONTINUE
ENDIF
COMPUTE DISPERSION (CHI/Q) MIN VALUE CZERO, BELOW WHICH CHI/Q DATA
FROM MODEL RESULT CAN BE IGNORED (THUS NEED NOT BE STORED IN MEM).
IN THE CASE OF MODEL #3, SET MAX OF VARYING fQGM OR QGSD) INTO 1ST
SOURCE ARRAY FOR UNIFORMITY & SIMPLICITY OF THE NEXT CALC
IF (MODEL .EQ. 3 .OR. MODEL .EQ. 6) THEN
IF (IVARY .EQ. 1) THEN
QGM(l) = Q1END
QGSD(l) = Q2MAX
ELSE
QGM(l) = Q2MAX
QGSD(l) = Q1END
ENDIF
ENDIF
QMAX = 0.
DO 200 I = 1, NSG
J = ISG(I)
IF (J .EQ. 0) GOTO 200
QCUT(I) = QGM(J) * EXP(ALOG(QGSD(J))*GSDCUT(J))
IF (OCUT(I) .GT. QMAX) QMAX = QCUT(I)
200 CONTINUE
CZERO = CSTD / (NSRC*QMAX)
CHECK & PRINT WARNING IF CZERO IS LOWER THE THE CHI/Q MIN VALUE USED I
SCREENING THE DATA (IE. BY THE PREPROCESSOR).
F-59
-------
Page 20
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1 109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1 1 -i?
1 1 O L.
1133
1134
1135
1136
1137
1138
1139
1140
C
C
c
C
C FO
C SE
C SO
C CA
C VA
C TH
C
31
32
C
c
C
C CA
C TH
C AN
C
C! R
C! C
C! W
C! B
C!
C
C
C
C
CSAI
1111
c
p
c
C OE
C OF
C (T
c
c
IF (CZERO .LT. CCUTMX) CALL ERROR (FUPRT, 20, O.CZERO)
MODEL #3
STEPS OF (VARYING) QGM OR QGSD INTO ARRAYS, AS IF THEY,ARE DIFF
SOURCE-GROUPS. BUT DO THIS ONLY IF #STEPS IS MORE THAN 1 (#STEPS = 1
IS ALREADY TAKEN CARE OF IN PREVIOUS CODE, WHICH TAKES THE ENDING
: AS THE SINGLE STEP VALUE).
WILL SIMPLIFY/STANDARDIZE THE INPUT FOR LATER USE
I
IF ((MODEL.EQ.3 .OR. MODEL .EQ. 6)
STEP = (Q1END-Q1BEG) / (NQ1-1)
.AND. NQ1.GT.1) THEN
IF (IVARY
DO 310 I
QGM(I)
CONTINUE
ELSE
DO 320 I
QGSD(I) =
CONTINUE
ENDIF
ENDIF
EQ. 1) THEN
= 1, NQ1
= Q1BEG + (I-1)*STEP
= 1, NQ1
Q1BEG
(I-1)*STEP
: SIZE OF CONC BUFFER (PAGE) TO BE USED, WHICH IS CEILING # DATA
f CAN BE STORED IN-MEMORY WITHOUT SPLITTING SOURCE-GROUP.
PREPARE TEMPFILE FOR STORING OVERFLOWED BUFFERED CONC DATA.
RECL=NWORD ARGUMENT IN OPEN STATEMENT IS MACHINE DEPENDENT.
CHECK THE MAX LIMIT ON YOUR SYSTEM & WHAT UNIT IT IS IN (BYTE?,
WORD?); THIS "" ~ " " "
BUFFER SIZE),
ALSO SETS THE LIMIT OF CONSTANT MBSAV (IN-MEMORY CONC
NCC IBM VS FORT77 2 WANTS NWORD IN BYTES
MSAV = (MBSAV/NSG)*NSG
NWORD = IPERS() + IRECSM + CONCS()
NWORD = (MSAV + MSAV + MSAV*2)
NWORD = (MSAV + MSAV + MSAV*2) * 2
OPEN (FUBUF,STATUS='SCRATCH1,ACCESS='DIRECT',RECL=NWORD,
& FORM='UN FORMATTED1,IOSTAT=IX,ERR = 900)
WRITE (6,1111) FUBUF
FORMAT (3X,'UNIT :',I3,' OPENED1)
DETERMINE HOW MANY TABLES OF EXEX OUTPUT PER PAGE IS APPROPRIATE.
COURSE WE DO THIS ONLY WHEN A LONG OUTPUT OPTION IS REQUESTED.
IS CALC IS DEPENDENT ON THE OUTPUT FORMATS OF WRGRID ROUTINE!)
IF (LGRID .GT. 0 ) THEN
IF (LGRID .EQ. 1) THEN
F-60
-------
Page
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1 1 KB
1 1 J O
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1/1
1172
1173
1174
1175
1176
1177
1178
1179
iion
1 I O U
1181
1182
1183
1184
1185
1186
1 1 Q 7
1 1 O /
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
C
,
C
C
f
\f
C
900
905
C
C
999
CDECK
C
C_
C
C READ
NLINE = ((NREC+NXREC-1)/NXREC) * (1 + ( NXREC+1 1 ) /12 )
ELSE
NLINE = 3 + (NREC+9W10
ENDIF
IF (MODEL. EQ.l .OR. MODEL. EQ. 2 .OR. MODEL. EQ. 4 .OR. MODEL. EQ. 5)
THEN j
NLINE = NLINE + 4
NTP = 58 / NLINE
ELSE .
NLINE = NLINE + 6 '
NTP = 57 / NLINE
ENDIF
ENDIF
GO TO 999
FRRfiR f)N fiPFNTNR ^TRATTH FII F FIIRIIF-11
u i\i\ u i\ u u urLiiinu o u i\ n i c n TILL ruDur io
WRITE (6,905) IX, FUBUF
FORMAT (3X,1*** I/O ERROR :' ,Z12 ,' ON UNIT', 13,' ON OPEN1)
STOP 0
RETURN
END
GETDAT
DISPERSION MODEL RESULTS FILES, AND SCREEN THROUGH TO STORE JUST
C AS MUCH AS NECCESSARY (DUE TO MEM LIMITATION).
C
C
C
C
C
C
C
C
C
C
C
C!
C...SI
C
&
C
SUBROUTINE GETDAT ( FUDAT, FUPRT, FUBUF)
SflMF 1 OCAI VARIARI FS
J U rl U UUl^ttL- Vnr\lolJl-LJ
FUDAT, FUPRT I DATAFILE & PRINTFILE FILEUN1TS
FUBUF I TEMPFILE FOR SAVED CONC DATA
IFU I FILEUNIT OF DISP MODEL RESULTS DATAFILE
NDATA I TOTAL P DATA PAIRS AVAILABLE
INTEGER FUDAT, FUPRT
INTEGER FUBUF
NSERT EXEXS. INS
INTEGER MSIM,MSRC,MGRP,MYEAR,MREC,MQ,MITER,MBSAV
PARAMETER (MS IM=1999 ,MSRC=6 ,MGRP=6 ,MYEAR=6 ,MREC=200 ,MQ=20 ,
MITER=99,MBSAV=4095,VIOL=2.)
F-61
-------
Page 22
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
C
C
C
C
C
C
C
C
C
C
C
c
c
c
c
c
c
c
c
c
c
CHARACTER TITLE*80,SNAME(MSRC)*20
INTEGER NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,
& IYEAR(MYEAR),ISRC(MSRC),IGRP(MSRC),1VARY,NQ1,
& POVFLAG.OUTOPT
REAL CSTD,CBACK,QGM(MQ),GSDCUT(MSRC).TARGET,EPS,Q1BEG,Q1END,
& Q2MIN,Q2MAX,RHO(MSRC) ,QGSD(MQ)
INTEGER MODEL,NSG,ISG(MGRP),NTP,MSAV ,
REAL CCUTMX.QCUT(MGRP),CZERO
COMMON /PARAM/
TITLE,SNAME,
NSIM,NSRC,NREC,NXREC,IAVPER,LGRIO,LYRLY,NYEAR,I'YEAR,ISRC,
IGRP.IVARY.NQ1,
CSTD.CBACK.QGM.QGSD.GSDCUT,TARGET,EPS,QlBEG,Q1END,Q2MIN ,
Q2MAX,
MODEL,NSG,ISG,NTP,MSAV, CCUTMX,QCUT,CZERO,RHO,POVFLAG,
OUTOPT
INTEGER NDATYR(MYEAR),ISAVYR(0:MYEAR),NSAVE,NPAGE,NSAV,IOPAGE
INTEGER*2 IPERb(MBSAV),IRECS(MBSAV)
REAL CONCS(MBSAV)
COMMON /STORE1/ NDATYR,ISAVYR,NSAVE,NPAGE,NSAV,IOPAGE
COMMON /STORE2/ IPERS.1RECS, CONCS
INTEGER
INTEGER
IFU
NDATA
PRINT (IX,A)1, 'GETDAT'
INITIALIZE
NSAV = 0
NPAGE = 0
NSAVE = 0
ISAVYR(O) = 0
READ & SCREEN DATA 1 FILE (1 YEAR) AT A TIME.
DUE TO THE LARGE VOLUME OF DATA & ITERATIONS, IT'S BETTER TO SEPERATE
DATA PROCESSING FOR THE DIFFERENT MODELS. MODELS 2 & 3 ARE SIMPLER
BECAUSE THERE IS ONLY 1 SOURCE-GROUP.
DO 100 IFL = 1, NYEAR
IFU = FUDAT + IFL - 1
PRINT '(2X,A,I2)', 'SCREENING DATAFILE ',IFL
EXTRACT DATA FROM DATAFILES
IF (MODEL .EQ. 1 .OR. MODEL .EQ. 4) THEN
CALL DATA1 (IFU,FUPRT , FUBUF , IFL)
ELSE
CALL DATA23 ( 1 FU , FUPRT,FUBUF, IFL)
ENDIF
F-62
-------
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1 9fifi
1 L DO
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
11 A 1
302
1303
1304
1305
1306
1307
1308
1309
1310
1311
C
c
\J
c
c
c
c
c
r
c
c
c
c
c
c
c
c
c
c
c
c
REMEMBER INDEX OF LAST CONC-DATA STORED FOR THIS YEAR
ISAVYR(IFL) = NSAVE + NSAV
100 CONTINUE
LD PAGE)
IOPAGE = NPAGE ,
I
WRITE SOME STATISTICS ABOUT DATA READ & STORED
WRITE (FUPRT,'(//A)') ' DATA SCREENING RESULT:1
WRITE THE CONC CUT-OFF VALUE & SAVE-BUFFERS SIZE
WRITE (FUPRT,'(/A,A,1P,E12.6,A)')
. ' LOWEST CONCENTRATION THAT MAY CAUSE EXCEEDANCE IS1,
. ' (X/Q)MIN = ' , CZERO, ' G/M3.1
WRITE YEARLY AND TOTAL DATA READ & STORED
WRITE (FUPRT,1 (/A)1)
. ' FILEI YEAR #CONC IN DATAFILE ICONC > (X/Q)MIN'
NDATA = 0
DO 200 I = 1, NYEAR
NDATA = NDATA + NDATYR(I)
IF(I .EQ. 1) THEN
WRITE (FUPRT,1 (5X, I2.5X, I4.6X, I8.11X, IB) ' )
I, IYEAR(I), NDATYR(I), ISAVYR(I)
ELSE
WRITE (FUPRT,'(5X,I2,5X,I4,6X,I8,11X,I8)')
I, IYEAR(I), NDATYR(I), ISAVYR( I ) - ISAVYR( I -1 )
END1F
200 CONTINUE
WRITE (FUPRT, '(/A, 5X, 19, m, 18)') ' TOTAL ', NDATA, NSAVE
RETURN
END
CDECK DATA1
C
£=
c
Q
c
c
Q
c
c
= = = 5UBR DATA1 = =
GET DATA FOR MODEL 1 (MULTI SOURCE-GROUPS EXEX) .
READ, SCREEN & SAVE 1 YEAR OF DISPERSION MODEL RESULT DATA.
SAVE ONLY THE PAIRS OF DATA WHICH MAY CAUSE EXCEEDANCE.
SUBROUTINE DATA1 ( FU , FUPRT , FUBUF , IYR)
F-63
-------
Page 24
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1 IfiS
1 O U J
1366
1367
1368
C
C
C
C
C
C
C
C
C
C
C
C
C!
C. .
C
C
C
c
c
c
c
c
Q
p
c
Q
c
SOME LOCAL VARIABLES
FU.FUPRT DATAFILE & PRINTFILE FILEUNITS
FUBUF TEMPFILE FOR SAVED CONC DATA
IYR N-TH YEAR OF DATA
IBUF1 AN ID PART OF CONC DATA
IP.IS.IR PERIOD, SOURCE, RECEPTOR FROM DATAFILEi
IPO, IRQ PREVIOUS PERIOD, RECEPTOR
CG(MGRP) R BUFFERRED CONC BY GROUPS
1
INTEGER FU,FUPRT
INTEGER FUBUF
INTEGER IYR
.$INSERT EXEXS.INS
INTEGER MSIM,MSRC,MGRP,MYEAR,MREC,MQ,MITER,MBSAV
PARAMETER (MS IM=1999 ,MSRC = 6 ,MGRP = 6 ,MYEAR = 6 ,MREC = 200 ,MQ = 20 ,
& MITER=99,MBSAV=4095,VIOL=2.)
CHARACTER T ITLE*80 ,SNAME ( MSRC ) *20
INTEGER NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,
& IYEAR(MYEAR),ISRC(MSRC),IGRP(MSRC ,IVARY,NQ1,
& POVFLAG.OUTOPT
REAL CSTD, CBACK, QGM (MQ) , GSDCUT( MSRC), TARGET, E PS, Q1BEG.Q1 END,
& Q2MIN,Q2MAX,RHO(MSRC) ,QGSD(MQ)
INTEGER MODEL,NSG,ISG(MGRP) .NTP.MSAV
REAL CCUTMX.QCUT(MGRP) .CZERO
COMMON /PARAM/
TITLE, SNAME,
NSIM,NSRC,NREC,NXREC,1AVPER,LGR1D,LYRLY,NYEAR,IYEAR,ISRC,
IGRP.IVARY.NQl,
CSTD, CBACK, QGM, QGSD.GSDCUT, TARGET, E PS, Ql BE G ,Q1 END ,Q2M I N ,
Q2MAX,
MODE L.NSG, I SG, NTP.MSAV, CCUTMX ,QCUT , CZERO ,RHO , POVFLAG ,
OUTOPT
INTEGER NDATYR(MYEAR),1SAVYR(0:MYEAR),NSAVE,NPAGE,NSAV,IOPAGE
INTEGER*2 I PERS (MBSAV) , I RECS (MBSAV)
REAL CONCS(MBSAV)
COMMON /STORE1/ NDATYR , ISAVYR , NSAVE , NPAGE ,NSAV , I OPAGE
COMMON /STORE2/ IPERS.IRECS, CONCS
THE PREFERRED BINARY 10
I DATA PAIRS PER RECORD OF DATAFILE
ID (PERIOD, SOURCE, RECEPTOR)S RECORD
CHI/Q CONCENTRATIONS RECORD
PARAMETER (NPAIR=100
INTEGER IBUF(NPAIR
REAL CBUF(NPAIR
jHE ALTERNATE 1 FORMATTED 10
PARAMETER (NPAIR=10)
INTEGER IBUF NPAIR)
REAL CBUF(NPAIR)
-------
1369
1370
* J / V
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1 7Q1
1 o 0 J
1382
1383
1384
1385
1386
1387
1388
1389
1390
1392
1393
1394
1395
1396
1397
1 -JQQ
i j y o
1399
1400
1401
140?
J. " U t-
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1/117
1 H 1 /
1418
1419
1420
1421
1422
1423
1424
1425
C
r
Lr
C
C
c
c
c
c
r
\*
c
c
c
c
c
c
c
c
c
c
p
c
c
c
c
c
c
c
c
c
c
c
c
p
r
Q
c
c
PARAMETER (NPAIR=100) /* THE ALTERNATE 2, BINARY 10 WITH
LOGICAL LEND /* SAIOLB FAST 10 ROUTINES
INTEGER IBUF(NPAIR) /*
REAL CBUF(NPAIR) /*
i
INTEGER IBUF1
INTEGER IP.IS.IR
INTEGER IPO, IRQ ,
REAL CG(MGRP) '
INITIALIZE, NONE IS BUFFERRED YET
IPO = -1
DO 10 I = 1, NSG
CG(I) = 0.
10 CONTINUE
NDATYR(IYR) = 0
LOOP, READ 1 BLOCK OF NPAIR PAIRS OF ID & CHI/0 AT A TIME.
YOU CAN CHANGE NPAIR TO SUIT THE WAY YOUR DATA IS WRITTEN.
100 CONTINUE
RTMADV TO f TH T ^ T ^ PDFFFDDFfn
D 1 PI H r\ I 1U ^ 1 n 1 O I J ri\L.rLi\r\L.Uy
READ (FU,END=199) IBUF
READ (FU,END=199) CBUF
FORMATTFD TO
rwlNrlnl ILU JU
READ (FU,*,END=199) IBUF
READ (FU,*,END=199) CBUF
-----
CALL VARIN (FU, NPAIR, IBUF, LEND) /* YOU CAN USE THESE IF YOU HAVE
CALL VARIN (FU, NPAIR, CBUF, LEND) /* SAIOLB FAST 10 ROUTINES
IF (LEND) GOTO 199 /*
LOOP ON NPAIR PAIRS OF ID & CONC DATA
NDATYR(IYR) = NDATYR(IYR) + NPAIR
DO 110 IPAIR = 1, NPAIR
DECODE THE ID PART OF DATA INTO PER IOD .SOURCE , RECEPTOR 1
(PPPPSSRRR = PPPP SS RRR)
IBUF1 = IBUF(IPAIR)
IP = IBUF1/100000
IS = IBUF1/1000 - (IBUF1/100000)*100
IR = IBUF1 - (IBUF1/1000)*1000
-------
Page 26
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
C
C
C
C
C
C
C
C
C
C
210
C
C
C
C
220
C
C
C
230
229
C
C
C
C
240
c
c
c
c
c
c
c
c
WHEN A PERIOO+RECEPTOR'S DATA IS ACCUMULATED,
CHECK & SAVE INTO SAVE-BUFFER AS NECCESSARY
IF (IP.NE.IPO .OR. IR.NE.IRO) THEN |
CHECK CONC OF EACH GROUP, IF NONE CAN CAUSE EXCEEDANCE
I
THEN DON'T SAVE THE GROUP
DO 210 I = 1, NSG
IF (CG(I) .GE. CZERO) GOTO 220
CONTINUE
GOTO 229
CHECK IN-MEMORY STORAGE/BUFFER, IF FULL THEN WRITE/PAGE OUT
TO TEMPFILE & RESET THE BUFFER
CONTINUE
IF (NSAV+NSG .GT. MSAV) THEN
NPAGE = NPAGE + 1
URITE (FUBUF,REC=NPAGE)
NSAVE = NSAVE +
NSAV = 0
ENDIF
NSAV
IPERS(I
IRECS I
CONCS(I
1 = 1,MSAV
1 = 1,MSAV
.1 = 1, MSAV
THEN SAVE THE CONC DATA
DO 230 J = 1, NSG
NSAV = NSAV
IPERS
IRECS
CONCS
CONTINU
CONTINU
NSAV
NSAV
NSAV
= IPO
= IRQ
= CG(J)
AND RESET TMP BUFFERS FOR THE NEXT GROUPS
IPO = IP
IRQ = IR
DO 240 I = 1, NSG
CG(I) = 0.
CONTINUE
ENDIF
CHECK FOR ZERO VALUE WHICH INDICATES END OF DATA;
THE NUMBER OF DATA IS NOT ALWAYS AN EVEN MULTIPLE OF NPAIR
(THAT IS, THE LAST CHUNK MAY BE PADDED WITH O'S)
IF (IBUF1 .EQ. 0) GOTO 190
F-66
-------
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1 AQ-J
i *1 j 1
1498
1499
1500
1501
1502
1503
1504
i sns
1 J V J
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
Iron
5*:9
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
C
C
C
C IF EVERYTHING IS OK, CONTINUE
C FOR THE SAME PERIOD & RECEPTOR
C
DO 310 I = 1, NSRC
IF (IS .EO. ISRC(I)) THEN
CG(IGRPm) = CG(IGRP(I))
GOTO 319
ENDIF
310 CONTINUE
319 CONTINUE
C
r
C
110 CONTINUE
C
GOTO 100
190 NDATYR(IYR) = NDATYR(IYR) - NPAIR
199 CONTINUE
C
c
C
C DON'T FORGET TO SAVE THE LAST PAGE OF
C BUT OF COURSE, THERE'S NO NEED TO USE
C KEPT IN-MEMORY.
C
IF (IYR .EQ. NYEAR) THEN
NSAVE = NSAVE + NSAV
NSAV = 0
NPAGE = NPAGE + 1
IF (NSAVE .GT. MSAV) THEN
WRITE (FUBUF,REC=NPAGE) IPERS
IRECS
CONCS
ENDIF
ENDIF
C
C
RETURN
END
CDECK DATA23
C
CCiiQnnAT/VOO
===- oUBK UrtlHtJ
C
ACCUMULATING SOURCES INTO GROUPS
j
+ CBUF(IPAIR)
'
+ IPAIR-1
DATA TO TEMPFILE.
THE TEMPFILE IF ALL DATA CAN BE
m,I = l,MSAVK
(I) ,1 = 1, MSAV),
(I), 1=1, MSAV)
C GET DATA FOR MODEL 2 & 3 (SINGLE SOURCE-GROUP EXEX & ITERATIVE EXEX).
C READ, SCREEN & SAVE 1 YEAR OF DISPERSION MODEL RESULT DATA.
C SAVE ONLY THE PAIRS OF DATA WHICH MAY
C
C
SUBROUTINE DATA23 ( FU , FUPRT .FUBUF ,
C
C
C SOME LOCAL VARIABLES
CAUSE EXCEEDANCE.
IYR)
-------
Page 28
1540
1541
1542
1543
1544
1545
1546
1547
1548
1 549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1 SR4
1 -J \J *T
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
C
C
C
C
C
C
C
C
C
c
C
C!
C.
C
C
C
Q
p
c
c
c
c
c
Q
c
c
c
FU.FUPRT DATAFILE & PRINTFILE F1LEUNITS
FUBUF TEMPFILE FOR SAVED CONC DATA
IYR N-TH YEAR OF DATA
IBUF1 AN ID PART OF CONC DATA
IP.IS.IR PERIOD, SOURCE, RECEPTOR FROM DATAFILE
IPO.IRO PREVIOUS PERIOD, RECEPTOR i
CG R SOURCE-GROUP CONC
1
INTEGER FU.FUPRT
INTEGER FUBUF
INTEGER IYR
..SINSERT EXEXS. INS
INTEGER MSIM,MSRC,MGRP,MYEAR,MREC,MQ,MITER,MBSAV
PARAMETER (MS I M = 1999 ,MSRC = 6 ,MGRP = 6 ,MYEAR = 6 ,MREC = 200 ,MQ = 20 ,
& MITER=99,MBSAV=4095,VIOL=2.)
CHARACTER T ITLE*80 .SNAME (MSRC)*20
INTEGER NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,
& IYEAR(MYEAR),ISRC(MSRC),IGRP(MSRC), IVARY.NQ1,
& POVFLAG.OUTOPT
REAL CSTD,CBACK,QGM(MQ),GSDCUT(MSRC),TARGET,EPS,Q1BEG,Q1END,
& Q2MIN,Q2MAX,RHO(MSRC) ,QGSD(MQ)
INTEGER MODEL,NSG,ISG(MGRP),NTP,MSAV
REAL CCUTMX.QCUT(MGRP) .CZERO
COMMON /PARAM/
TITLE, SNAME,
NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,IYEAR,ISRC,
IGRP.IVARY.NQl,
CSTD,CBACK,QGM,QGSD,GSDCUT, TARGET, EPS , Ql BEG ,Q1 END ,Q2M I N ,
Q2MAX,
MODEL, NSG,ISG,NTP,MSAV, CCUTMX ,QCUT , CZERO , RHO , POVFLAG ,
OUTOPT
INTEGER NOATYR(MYEAR),ISAVYR(0:MYEAR),NSAVE,NPAGE,NSAV,IOPAGE
INTEGER*2 I PER5 (MBSAV) , I RECS (MBSAV)
REAL CONCS(MBSAV)
COMMON /STORE1/ NDATYR , ISAVYR , NSAVE , NPAGE , NSAV , IOPAGE
COMMON /STORE2/ IPERS.IRECS, CONCS
THF PRFFFRRFD BINARY 10
~~~~ lllt_ I n L 1 Lr\r\LL/ U 1 l» rl l\ 1 1U
1 DATA PAIRS PER RECORD OF DATAFILE
ID (PERIOD, SOURCE, RECEPTOR)S RECORD
PARAMETER (NPAIR=100
INTEGER IBUF(NPAIR
REAL CBUF(NPAIR
THE ALTERNATE 1, FORMATTED 10
PARAMETER (NPAIR=10)
INTEGER IBUF(NPAIR)
REAL CBUF(NPAIR)
-------
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
i C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
PARAMETER (NPAIR=100)
LOGICAL LEND
INTEGER IBUF(NPAIR)
REAL CBUF(NPAIR)
/* THE ALTERNATE 2, BINARY 10 WITH
/* SAIOLB FAST 10 ROUTINES
INTEGER
INTEGER
INTEGER
REAL
IBUF1
IP.IS.IR
IPO,IRQ
CG
INITIALIZE, NO SOURCE-GROUP IS BUFFERRED YET
IPO = -1
CG = 0.
NDATYR(IYR) = 0
LOOP, READ 1 BLOCK OF NPAIR PAIRS OF 10 & CHI/Q AT A TIME.
YOU CAN CHANGE NPAIR TO SUIT THE WAY YOUR DATA IS WRITTEN.
100 CONTINUE
BINARY 10 (THIS IS PREFERRED)
READ (FU,END=199) IBUF
READ (FU,END=199) CBUF
FORMATTED 10
READ (FU,*,END=199) IBUF
READ (FU,*,END=199) CBUF
CALL VAR1N (FU, NPAIR,IBUF, LEND) /* YOU CAN USE THESE IF YOU HAVE
CALL VARIN (FU, NPAIR,CBUF, LEND) /* SAIOLB FAST 10 ROUTINES
IF (LEND) GOTO 199 /*
LOOP ON NPAIR PAIRS OF ID & CONC DATA
NDATYR(IYR) = NDATYR(IYR) + NPAIR
DO 110 IPAIR = 1, NPAIR
DECODE THE ID PART OF DATA INTO PERIOD.SOURCE,RECEPTOR
(PPPPSSRRR = PPPP SS RRR)
IBUF1 = IBUF(IPAIR)
IP = IBUF1/100000
IS = IBUF1/1000 - (IBUF1/100000)*100
IR = IBUF1 - (IBUF1/1000)*1000
WHEN A PERIOD+RECEPTOR'S DATA IS ACCUMULATED,
F-69
-------
Page 30
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
L
£
c
c
c
c
c
CHECK & SAVE INTO SAVE-BUFFER AS NECCESSARY
IF (IP.NE.IPO .OR. IR.NE.IRO) THEN
SAVE THIS SOURCE-GROUP ONLY IF THE CONC CAN CAUSE EXCEEDANCE
IF (CG .GE. CZERO) THEN ,
CHECK BUFFER, PAGE OUT TO TEMPFILE IF FULL
IF (NSAV .GE. MSAV) THEN
NPAGE = NPAGE + 1
WRITE (FUBUF,REC=NPAGE)
NSAVE = NSAVE + NSAV
NSAV = 0
ENDIF
I
IPERS
IRECS
CONCS
i
1=1,MSAV
.1=1,MSAV
,1=1, MSAV
THEN RECEIVE THE CONC DATA INTO BUFFER
NSAV = NSAV + 1
IPERS
IRECS
CONCS
ENDIF
NSAV) = IPO
NSAV
NSAV
= IRQ
= CG
AND RESET FOR THE NEXT GROUPS
IPO = IP
IRQ = IR
CG = 0.
ENDIF
210
219
CHECK FOR ZERO VALUE WHICH INDICATES END OF DATA;
THE NUMBER OF DATA IS NOT ALWAYS AN EVEN MULTIPLE OF NPAIR
(THAT IS, THE LAST CHUNK MAY BE PADDED WITH O'S)
IF (IBUF1 .EQ. 0) GOTO 190
IF EVERYTHING IS OK, CONTINUE ACCUMULATING SOURCES INTO GROUPS
FOR THE SAME PERIOD & RECEPTOR
DO 210 I = 1, NSRC
IF (IS .EQ. ISRC(I)) THEN
CG = CG + CBUF(IPAIR)
GOTO 219
ENDIF
CONTINUE
CONTINUE
-------
1711
1712
1713
1714
1715
1716
1717
1718
1719
1 7?n
i / L. \j
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
17 A A
I *J *l
1745
1746
1747
1748
1749
1750
1751
1 7 C?
1 / J C-
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1 7 AT
1 / 0 J
1764
1765
1766
1767
C
c
c
c
c
r
\*
C
C
c
c
c
c
c
110 CONTINUE
GOTO 100
190 NDATYR(IYR) = NDATYR(IYR) - NPAIR + IPAIR-1 ,
199 CONTINUE
1
DON'T FORGET TO SAVE THE LAST PAGE OF DATA TO TEMPFILE.
BUT OF COURSE, THERE'S NO NEED TO USE THE TEMPFILE IF ALL DATA CAN BE
KEPT IN-MEMORY.
IF (IYR .EQ. NYEAR) THEN
NSAVE = NSAVE + NSAV
NSAV = 0
NPAGE = NPAGE + 1
IF (NSAVE .GT. MSAV) THEN
WRITE (FUBUF, REC=NPAGE) IPERS ( I ) , 1=1 ,MSAV ,
IRECS(I), 1 = 1, MSAV ,
CONCS(I), 1=1, MSAV
ENDIF
ENDIF
RETURN
END
CDECK MODEL1
C
=
C
C
i C
c
c
c
r
L.
c
c
c
c
c
c
c
c
c
c
-
c
C!
MO
MODEL 1 = MULTI SOURCE-GROUPS EXEX
SUBROUTINE MODEL1 (FUPRT, FUBUF)
- SOMF 1 nCAl VARIABLES
O U r 1 L. L. W l< rt l_ ₯rlr\inUL.L.J
FUPRT I PRINTFILE FILEUNIT
FUBUF I TEMPFILE FOR SAVED CONC DATA
EXEXYG(MREC.MGRP) R EXEX BY GROUP FOR A YEAR
EXEXG(MREC.MGRP) R " ALL YEARS
EXEXY MREC) R EXEX FOR ALL SOURCES FOR A YEAR
EXEX(MREC) R " ALL YEARS
EEMAXG(MGRP) R EXEX MAX BY GROUP
EEMAX R OVERALL EXEX MAX
INTEGER FUPRT
INTEGER FUBUF
F-71
-------
Page 32
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
C
C
C
C
C
C
C
c
c
c
c
c
c
c
c
c
c
. .5INSERT EXEXS.INS
INTEGER MSIM,MSRC,MGRP,MYEAR,MREC,MQ,MITER,MBSAV
PARAMETER (MS IM=1999,MSRC = 6,MGRP = 6,MYEAR = 6,MREC = 200,MQ = 20,
& MITER=99,MBSAV=4095,VIOL=2.)
CHARACTER TITLE*80,SNAME(MSRC)*20 |
INTEGER NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,
& lYEAR(MYEAR),I SRC(MSRC),IGRP(MSRC) , IVARY.NQ1,
& POVFLAG.OUTOPT ,
REAL CSTD,CBACK,QGM(MQ),GSDCUT(MSRC).TARGET,EPS,Q1BEG,Q1END,
& Q2MIN,Q2MAX,RHO(MSRC).QGSD(MQ)
INTEGER MODEL,NSG,ISG(MGRP),NTP,MSAV
REAL CCUTMX,QCUT(MGRP),CZERO
COMMON /PARAM/
TITLE,SNAME,
NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,IYEAR,ISRC,
IGRP.IVARY.NQ1,
CSTD.CBACK.QGM.QGSD,GSDCUT.TARGET.EPS,QlBEG,Q1END,Q2MIN,
Q2MAX,
MODEL,NSG,ISG,NTP,MSAV, CCUTMX,QCUT,CZERO,RHO,POVFLAG,
OUTOPT
INTEGER NDATYR(MYEAR),ISAVYR(0:MYEAR),NSAVE,NPAGE,NSAV , IOPAGE
INTEGER*2 IPERS(MBSAV),IRECS(MBSAV)
REAL CONCS MBSAV)
COMMON /STORE1/ NDATYR,ISAVYR,NSAVE,NPAGE , NSAV,IOPAGE
COMMON /STORE2/ IPERS.IRECS, CONCS
REAL
, EXEXYG(MREC.MGRP),
, EXEXG(MREC.MGRP),
, EXEXY(MREC),
, EXEX(MREC),
, EEMAXG(MGRP),
, EEMAX
PRINT '(IX,A)1, 'MODEL1'
FIRST OF ALL, SEE IF THERE IS ANY DATA STORED TO BE PROCESSED.
CAN'T CALC EXEX IF THERE ISN'T ANY DATA WITH POTENTIAL EXCEEDANCE
IF (NSAVE .EQ. 0) THEN
WRITE (FUPRT,'(//A) ' )
RETURN
ENDIF
NO EXPECTED EXCEEDANCES!'
INITIALIZE OVERALL EXEX ARRAYS
DO 110 IG = 1, NSG
DO 110 IR = 1, NREC
EXEXG(IR.IG) = 0.
110 CONTINUE
-------
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
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
DO 120 IR = 1, NREC
EXEX(IR) = 0.
120 CONTINUE
IF BRIEF OUTPUT IS DESIRED (NO TABLE OF EXEX BY RECEPTOR) THEN PRINT
ONLY 1 RESULTS PAGE; THUS, OUTPUT THE PAGE HEADER AS SPECIAL CASE
IF (LGRID .EQ. 0) THEN
CALL HEADER (FUPRT)
WRITE (FUPRT,'(/)')
ENDIF
I
LOOP TO CALC EXEX BY YEAR AND OUTPUT IF DESIRED,
AT THE SAME TIME MAINTAIN SUM OF ALL YEARS EXEX
DO 200 IYR = 1, NYEAR
CALC EXEX ARRAYS & THE MAXS
CALL EXEX1 (FUBUF, IYR, MREC,NREC,NSG,EXEXYG,EXEXY,EEMAXG,EEMAX)
KEEP TOTALS FOR LATER CALC OF ALL YEARS EXEX
310
320
400
DO 310 IG = 1, NSG
DO 310 IR = 1, NREC
EXEXG IR.IG) = EXEXG(IR.IG) + EXEXYG(IR,IG)
CONTINUE
DO 320 IR = 1, NREC
EXEX(IR) = EXEX(IR) + EXEXY(IR)
CONTINUE
OUTPUT YEARLY RESULTS IF SO DESIRED.
BUT BE SMART NOT TO OUTPUT BY YEAR OR BY SOURCE-GROUP WHEN THERE
IS ONLY 1 YEAR OR SOURCE-GROUP INPUT!
IF (LYRLY.EQ.l .AND. NYEAR.GT.l) THEN
IF (NSG .GT. 1) THEN
DO 400 IG = 1, NSG
IF (LGRID.GT.O .AND. MOD(I G , NTP).EQ.1) CALL HEADER (FUPRT)
CALL WREXEX (FUPRT, I YEAR(IYR),IGRP(ISG(IG)),LGRID,
NREC,NXREC,EXEXYG(1,IG),EEMAXG(IG))
CONTINUE
ENDIF
IF (LGRID .GT. 0) CALL HEADER (FUPRT)
F-73
-------
Page 3'
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1 QOR
1 J \J O
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1 A O Q
iy L o
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
C
C
c
C
C
c
C
C
C
C
C
C
C
C
c
C
c
CALL WREXEX (FUPRT, I YEAR( I YR) ,0 , LGR I D , NREC , NXREC , EXEX Y , E EMAX )
ENDIF
200 CONTINUE I
I
CALC ALL YEARS EXEX & THE MAXS
DO 510 1G = 1, NSG
EEMAXG( 1G) = 0.
DO 511 IR = 1. NREC
EXEXG(IR.IG) = EXEXG(IR.IG) / NYEAR
IF (EXEXG(IR.IG) .GT. EEMAXG(IG)) EEMAXG(IG) = EXEXG(IR.IG)
511 CONTINUE
510 CONTINUE
EEMAX = 0.
DO 520 IR = 1, NREC
EXEX(IR) = EXEX(IR) / NYEAR
IF (EXEX(IR) .GT. EEMAX) EEMAX = EXEX(IR)
520 CONTINUE
FINALLY, OUTPUT THIS OVERALL EXEX
DO 600 IG = 1, NSG
IF (LGRID. GT.O .AND. MOD( I G.NTP) . EQ . 1 ) CALL HEADER (FUPRT)
CALL WREXEX (FUPRT, 0 , 1 GRP ( ISG ( I G) ) , LGRI D ,
NREC, NXREC, EXEXG(I,IG),EEMAXG(IG))
600 CONTINUE
IF (LGRID .GT. 0) CALL HEADER (FUPRT)
CALL WREXEX (FUPRT, 0,0, LGRID, NREC , NXREC , EXEX , EEMAX)
RETURN
END
CDECK MODEL2
c
c=
c
c
Q
c
£
c
c
c
c II D D unnri *>
= MJUK MUU t L£
MODEL 2 = SINGLE SOURCE-GROUP EXEX
SUBROUTINE MOOEL2 ( FUPRT , FUBUF )
SOME LOCAL VARIABLES
FUPRT I PRINTFILE FILEUN1T
F-74
^t^t^^ct^c,:
-------
1939
1940
1941
1942
1943
1Q44
1 J ~ ~
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
i qp-3
i j O J
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
IQQ<;
C
C
C
C
C
C
C!
C.
C
C
C
C
C
r
C
C
C
C
C
C
r
FUBUF I TEMPFILE FOR SAVED CONC DATA
EXEX(MREC) R OVERALL EXEX BY RECEPTORS
EXEXYR(MREC) R YEARLY EXEX BY RECEPTORS
EEMAX R EXEX MAX
i
INTEGER FUPRT
INTEGER FUBUF
..SINSERT EXEXS.INS '
INTEGER MS1M,MSRC,MGRP,MYEAR,MREC,MQ,MITER,MBSAV
PARAMETER (MS 1M = 1999,MSRC = 6,MGRP = 6,MYEAR = 6,MREC = 200,MQ = 20,
& MITER=99,MBSAV=4095,VIOL=2.)
CHARACTER TITLE*80 .SNAME (MSRC)*20
INTEGER NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,
& IYEAR(MYEAR),ISRC(MSRC),IGRP(MSRC),IVARY,NQ1,
& POVFLAG.OUTOPT
REAL CSTD, CBACK, QGM ( MQ ), GSDCUT ( MSRC), TARGET, E PS, Q1BEG.Q1 END,
& Q2MIN,Q2MAX,RHO(MSRC),QGSD(MQ)
INTEGER MODEL,NSG,ISG(MGRP),NTP,MSAV
REAL CCUTMX,QCUT(MGRP),CZERO
COMMON /PARAM/
TITLE, SNAME,
NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,IYEAR,ISRC,
IGRP,IVARY,NQ1,
CSTD, CBACK, QGM, QGSD.GSDCUT, TARGET, EPS, Q1BEG ,Q1 END ,Q2M I N ,
Q2MAX,
MODEL,NSG,ISG,NTP,MSAV, CCUTMX .QCUT.CZERO, RHO .POVFLAG ,
OUTOPT
INTEGER NDATYR£MYEAR),ISAVYR(0:MYEAR),NSAVE,NPAGE,NSAV,IOPAGE
INTEGER*2 IPERS (MBSAV) , I RECS (MBSAV)
REAL CONCS(MBSAV)
COMMON /STORE1/ NDATYR, ISAVYR.NSAVE .NPAGE ,NSAV, IOPAGE
COMMON /STORE2/ IPERS, IRECS, CONCS
REAL
. EXEX(MREC),
. EXEXYR(MREC),
. EEMAX
PRINT '(IX, A)1, 'MODEL21
FIRST OF ALL, SEE IF THERE IS ANY DATA STORED TO BE PROCESSED,
THAT IS, SEE IF THERE IS POTENTIAL EXCEEDANCE
IF (NSAVE .EQ. 0) THEN
WRITE (FUPRT, '(//A) ') ' NO EXPECTED EXCEEDANCES ! '
RETURN
ENDIF
F-75
-------
Page 36
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
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
IF BRIEF OUTPUT IS DESIRED (NO TABLE OF EXEX BY RECEPTOR) THEN PRINT
ONLY 1 RESULTS PAGE; THUS, OUTPUT THE PAGE HEADER AS SPECIAL CASE
IF (LGRID .EQ. 0) THEN
CALL HEADER (FUPRT)
WRITE (FUPRT, '(/)') ,
ENDIF '
C CHOOSE HOW TO CALC EXEX, FOR ALL YEARS OR BY YEAR
IF (LYRLY .EQ. 1) GOTO 2000
1000 CONTINUE
CALC EXEX ARRAY FOR ALL YEARS AT ONCE
C AND OUTPUT RESULTS
CALL EXEX23 (FUBUF, -ALL',0, QGM(1),QGSD(1), NREC,EXEX,EEMAX ;
IF (LGRID .GT. 0) CALL HEADER (FUPRT)
CALL WREXEX (FUPRT, 0,0,LGRID, NREC,NXREC,EXEX,EEMAX)
RETURN
2000 CONTINUE
C CALC EXEX & OUTPUT BY YEAR
INITIALIZE OVERALL EXEX ARRAY
DO 100 I = 1, NREC
EXEX(I) = 0.
100 CONTINUE
LOOP TO CALC & WRITE EXEX BY YEAR
DO 200 IYR = 1, NYEAR
COMPUTE THIS YEAR'S EXEX, AND ADD TO OVERALL EXEX ARRAY
CALL EXEX23 (FUBUF, 'lYR'.IYR, QGM(1),QGSD(1),NREC,EXEXYR,EEMAX)
DO 210 I = 1, NREC
EXEX(I) = EXEX(I) + EXEXYR(I)
210 CONTINUE
AND OUTPUT THIS YEAR'S EXEX.
BUT BE SMART TO OUTPUT BY YEAR ONLY IF THERE IS > 1 YEAR!
IF (NYEAR .GT. 1) THEN
-------
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
01 ni
L. i U 1
2102
2103
2104
2105
2106
2107
2108
2109
C
c
C
c
c
c
c
c
c
c
c
CD
c
c=
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
r
C!
c.
c
IF (LGRID.GT.O .AND. MOD(IYR,NTP).EQ.1) CALL HEADER (FUPRT)
CALL WREXEX (FUPRT, IYEAR(IYR),0,LGRID, NREC .NXREC , EXEXYR,
EEMAX)
ENDIF
200 CONTINUE
CALC OVERALL EXEX, FIND THE MAX, AND OUTPUT
EEMAX = 0.
DO 300 I = 1, NREC
EXEX(I) = EXEXm / NYEAR
IF (EXEX(I) .GT. EEMAX) EEMAX = EXEX(I)
300 CONTINUE
IF (LGRID .GT. 0) CALL HEADER (FUPRT)
CALL WREXEX (FUPRT, 0,0,LGRID, NREC,NXREC,EXEX,EEMAX)
RETURN
END
CDECK MODEL3
SUBR MODEL3 ===
MODEL 3 = SINGLE SOURCE-GROUP ITERATIVE EXEX.
SUBROUTINE MODEL3 (FUPRT.FUBUF)
SOME LOCAL VARIABLES
FUPRT I
FUBUF I
N ITER I
EXEX(MREC) R
EXEXMX(MQ) R
QLOW.QHIGH.QEST, R
EEMAX R
PRINTFILE FILEUNIT
TEMPFILE FOR SAVED CONC DATA
IITERATIONS TO GET TO TARGET EXEX
EXEX BY RECEPTORS
EXEX MAX FOR EACH VARYING QGM OR QGSD
GUESSES/ESTIMATES OF QGM OR QGSD
EXEX MAX FOR A GUESSED QGM OR QGSD
INTEGER
INTEGER
FUPRT
FUBUF
.SINSERT EXEXS.INS
INTEGER MSIM,MSRC,MGRP,MYEAR,MREC,MQ,MITER,MBSAV
PARAMETER (MSIM=1999,MSRC=6,MGRP=6,MYEAR=6,MREC=200,MQ=20,
& MITER=99,MBSAV=4095,VIOL=2.)
-------
Page 38
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
?1 4?
t- 1 t t-
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
9 i 1:4
t~ 1 J *1
2155
2156
2157
2158
2159
2160
71 fi1
L. 1 D 1
2162
2163
2164
2165
2166
C
C
C
C
Q
C
C
C
C
C
£
p
c
c
c
c
c
p
Q
c
c
c
CHARACTER T I TLE*80 , SNAME (MSRC )*20
INTEGER NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,
& IYEAR(MYEAR),ISRC(MSRC),IGRP(MSRC) , IVARY.NQ1,
& POVFLAG.OUTOPT
REAL CSTD, CBACK, QGM ( MQ ), GSOCUT (MSRC), TARGET, E PS, Ql BE G.Q1 END,
& Q2MIN,Q2MAX,RHO(MSRC),QGSD(MQ) .
INTEGER MODEL, NSG, ISG(MGRP) .NTP.MSAV
REAL CCUTMX.QCUT(MGRP) ,CZERO
COMMON /PARAM/ ,
TITLE, SNAME, '
NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,IYEAR,ISRC,
IGRP.IVARY.NQl,
CSTD,CBACK,QGM,QGSD,GSDCUT,TARGET,EPS,Q1BEG,Q1END,Q2MIN,
Q2MAX,
MODE L, NS G, I SG, NTP.MSAV, CCUTMX , QCUT, CZERO , RHO , POVFLAG ,
OLJTOPT
INTEGER NDATYR(MYEAR),ISAVYR(0:MYEAR) , NSAVE , NPAGE , NSAV , I OPAGE
INTEGER*2 IPERS (MBSAV) , IRECS MBSAV)
REAL CONCS MBSAV)
COMMON /STORE1/ NDATYR, ISAVYR , NSAVE , NPAGE , NSAV , IOPAGE
COMMON /STORE2/ IPERS, IRECS, CONCS
INTEGER
. NITER
REAL
. EXEX(MREC),
. EXEXMX(MQ),
. QLOW.QHIGH.QEST,
. EEMAX
PRINT '(IX, A)1, 'MODELS'
FIRST OF ALL, SEE IF THERE IS ANY DATA STORED TO BE PROCESSED.
CAN'T CALC EXEX IF THERE ISN'T ANY DATA WITH POTENTIAL EXCEEDANCE.
IF (NSAVE .EQ. 0) THEN
WRITE (FUPRT,1 (//A) ' ) ' NO EXPECTED EXCEEDANCES!
RETURN
ENDIF
OUTPUT SPECIAL CASE PAGE HEADER IF BRIEF (NO RECEPTORS TABLE) OUTPUT
IS DESIRED
IF (LGRID .EQ. 0) CALL HEADER (FUPRT)
LOOP TO CALC (ESTIMATE) & OUTPUT BY THE VARYING Q GM OR GSD
DO 100 IQ = 1, NQ1
-------
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
NITER = 0
IF (IVARY
.EQ. 2) GOTO 500
VARYING QGM
IF (LGRID.GT.O .AND. MOD(IQ.NTP).EQ. 1)
WRITE (FUPRT,'(//A,I2,A,F8.4) "
I I . r -
STEP*',IQ,': GM = ' ,QGM(IQ
ij
CALL HEADER
(FUPRT)
DO A PRELIMINARY CHECK ON THE RANGE TO CALC QGSD
THE TARGET COULD BE OUT OF THE RANGE ALLOWED
QGM(IQ),Q2MIN, NREC,EXEX,EEMAX1)
QGM(IQ),Q2MAX, NREC,EXEX,EEMAX2)
CALL EXEX23 (FUBUF, 'ALL',0,
CALL EXEX23 (FUBUF, 'ALL',0
IF (TARGET.LT.EEMAX1 .OR. TARGET.GT.EEMAX2J THEN
WRITE (FUPRT,'(A/ A,F8.4,A,F8.4)')
1 DID NOT FIND GSD WITHIN ~ ~ "
1 AT THE MIN & MAX RANGE,
QGSD(IQ) = 0.
EXEXMX(IQ) = 0.
GOTO 100
ENDIF
THE
MEE
GIVEN RANGE! ' ,
ARE '.EEMAX1,1 & '.EEMAX2
THE RANGE IS OK,
ESTIMATE QGSD FOR
LIMIT ^ITERATIONS
THE TARGET EXEX BY BISECTION ITERATIONS.
TO PREVENT INFINITE/NEAR INFINITE LOOPING!
QLOW = Q2MIN
QHIGH = Q2MAX
200 CONTINUE
NITER = NITER + 1
QEST = (QLOW+QHIGH)/2
CALL EXEX23 (FUBUF, 'ALL',0, QGM(IQ),QEST,
IF (ABS(EEMAX-TARGET) .LE. EPS) GOTO 299
IF (NITER .GE. MITER) THEN
CALL ERROR (FUPRT, 15, MITER,0.)
GOTO 299
ENDIF
IF EEMAX .LT. TARGET) THEN
QLOW = QEST
ELSE
QHIGH = QEST
ENDIF
GOTO 200
299 CONTINUE
NREC,EXEX,EEMAX)
OUTPUT RESULT FOR THIS VARYING STEP
QGSD(IQ) = QEST
-------
Page 10
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
c
C
EXEXMX(IQ) = EEMAX
WRITE (FUPRT,'(A,I 2,A,F8.4,A)')
' AFTER ',NITER,1 ITERATIONS, FOUND GSD OF ',QEST,
1 WHICH PRODUCES:'
CALL WREXEX (FUPRT, -I.O.LGRID, NREC , NXREC , EXEX , EEMAX)
GOTO 100
500 CONTINUE
VARYING QGSD
IF (LGRID.GT.O .AND. MOD( IQ , NTP).EQ.1) CALL HEADER (FUPRT)
WRITE (FUPRT,'(//A,12,A,F8.4)')
1 STEP*1 ,IQ,': GSD = '.QGSD(IQ)
DO A PRELIMINARY CHECK ON THE RANGE TO CALC QGM
THE TARGET COULD BE OUT OF THE RANGE ALLOWED
CALL EXEX23 (FUBUF, 'ALL',0, Q2MIN,QGSD(IQ), NREC , EXEX , EEMAX1)
CALL EXEX23 FUBUF, 'ALL(,0, Q2MAX,QGSD(IQ , NREC,EXEX,EEMAX2)
IF (TARGET.LT.EEMAX1 .OR. TARGET.GT . EEMAX2) THEN
WRITE (FUPRT,'(A/ A,F8.4,A,F8.4)')
1 DID NOT FIND GM WITHIN THE GIVEN RANGE! ,
1 AT THE MIN & MAX RANGE, MEE ARE '.EEMAXl,1 & I,EEMAX2
QGM(IQ) = 0.
EXEXMX(IQ) = 0.
GOTO 100
ENDIF
600
THE RANGE IS OK,
ESTIMATE QGM FOR THE
LIMIT ^ITERATIONS TO
TARGET EXEX BY BISECTION ITERATIONS.
PREVENT INFINITE/NEAR INFINITE LOOPING!
QLOW = Q2MIN
QHIGH = Q2MAX
CONTINUE
NITER = NITER + 1
QEST = (QLOW+QHIGH)/2
CALL EXEX23 (FUBUF, 'ALL',0, QEST ,QGSD(IQ) , NREC , EXEX , EEMAX)
IF (ABS(EEMAX-TARGET) .LE. EPS) GOTO 699
IF (NITER .GE. MITER) THEN
CALL ERROR (FUPRT, 15, MITER,0.)
GOTO 699
ENDIF
IF EEMAX .LT. TARGET) THEN
QLOW = QEST
ELSE
QHIGH = QEST
ENDIF
-------
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
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
699
GOTO 600
CONTINUE
OUTPUT RESULT FOR THIS VARYING STEP
QGM(IQ) = QEST
EXEXMX(IQ) = EEMAX
I
WRITE (FUPRT,'(A,12,A,F8.4,A)1)
1 AFTER ',NITER,1 ITERATIONS, FOUND GM OF '.QEST,
1 WHICH PRODUCES:'
CALL WREXEX (FUPRT, -l.O.LGRIO, NREC.NXREC.EXEX,EEMAX)
100 CONTINUE
C SUMMARY OUTPUT.
C DON'T OUTPUT IF NONE OF VARYING STEPS HIT THE TARGET!
DO 700 I = 1, NQ1
IF (EXEXMX(I) .GT. 0.) GOTO 710
700 CONTINUE
GOTO 799
710 CONTINUE
LGRID = 0
CALL HEADER (FUPRT)
WRITE (FUPRT,'(//A// A,A/)1)
. ' SUMMARY:1,
. ' GEOMETRIC MEAN GEOMETRIC STD DEV
DIFFERS FROM TARGET BY1
MEE
WRITE (FUPRT,1( 4X , I 2 , 5X , F8 . 4 ,9X , F8 . 4 , 7X ,F8 . 4 ,9X ,F8 . 4 )')
. (I, QGM(I),QGSD(I) ,EXEXMX(I),EXEXMX(I)-TARGET, 1 = 1,NQ1)
799 CONTINUE
RETURN
END
CDECK MODEL4
C
C==== SUBR MODEL4 ==============================================
C
C MODEL 1 = MULTI SOURCE-GROUPS POVS
SUBROUTINE MODEL4 (FUPRT,FUBUF)
SOME LOCAL VARIABLES
FUPRT I PRINTFILE FILEUNIT
F-81
-------
Page
2338
2339
2340
2341
2312
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
C
-------
2395,
2396
2397'
2398'
23991
2400
2401'
2402'
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
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
EEMAXG(MGRP),
EEMAX,
POVYG(MREC.MGRP),
POVG(MREC.MGRP),
POVY(MREC),
POV(MREC),
MPOVG(MGRP),
MPOV,
SPOV(MREC),
SPOVY(MREC),
SMPOVY,
SMPOV
PRINT '(IX,A)1, 'MODEL41
FIRST OF ALL, SEE IF THERE IS ANY DATA STORED TO BE PROCESSED.
CAN'T CALC POV IF THERE ISN'T ANY DATA WITH POTENTIAL EXCEEDANCE.
IF (NSAVE .EQ. 0) THEN
WRITE (FUPRT,1(//A)1) 'ZERO PROBABILITY OF VIOLATION'
RETURN
ENDIF
INITIALIZE OVERALL EXEX ARRAYS
DO 110 IG = 1, NSG
DO 110 IR = 1, NREC
EXEXG(IR.IG) = 0.
POVG(IR.IG) = 0.
110 CONTINUE
DO 120 IR = 1, NREC
EXEX(IR) = 0.
POV(IR) = 0.
SPOV(IR) = 0.
120 CONTINUE
IF BRIEF OUTPUT IS DESIRED (NO TABLE OF EXEX BY RECEPTOR) THEN PRINT
ONLY 1 RESULTS PAGE; THUS, OUTPUT THE PAGE HEADER AS SPECIAL CASE
IF (LGRID .EQ. 0) THEN
CALL HEADPV (FUPRT)
WRITE (FUPRT,'(/)')
ENDIF
LOOP TO CALC POV AND EXEX BY YEAR AND OUTPUT IF DESIRED,
AT THE SAME TIME MAINTAIN SUM OF ALL YEARS EXEX
DO 200 IYR = 1, NYEAR
F-83
-------
Page
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
c
C
CALC EXEX ARRAYS & THE MAXS
CALL XX1PV (FUBUF.IYR.MREC,NREC,NSG,EXEXYG,POVYG,EXEXY,POVY,
EEMAXG,MPOVG,EEMAX,MPOV,SPOVY,SMPOVY) ,
KEEP TOTALS FOR LATER CALC OF ALL YEARS EXEX
310
320
DO 310 IG = 1, NSG
00 310 IR = 1, NREC
EXEXG(IR.IG) = EXEXG(IR.IG)
POVG(IR.IG) = POVG(IR.IG) +
CONTINUE
+ EXEXYG(IR.IG)
POVYG(IR.IG)
DO 320 IR = 1, NREC
EXEX(IR) = EXEX(IR) + EXEXY(IR)
POV(IR) = POV(IR) + POVY(IR)
SPOV(IR) = SPOV(IR) + SPOVY(IR)
CONTINUE
400
OUTPUT YEARLY RESULTS IF SO DESIRED.
BUT BE SMART NOT TO OUTPUT BY YEAR OR BY SOURCE-GROUP WHEN THERE
IS ONLY 1 YEAR OR SOURCE-GROUP INPUT!
IF (LYRLY.EQ.l .AND. NYEAR.GT.l) THEN
IF (NSG .GT. 1) THEN
DO 400 IG = 1, NSG
IF (LGRID.GT.O) CALL HEADPV (FUPRT)
IF (OUTOPT .EQ. 0 .OR. OUTOPT .EQ. 2)
CALL WREXEX (FUPRT, IYEAR(IYR),IGRP(1SG(IG)),LGRID,
NREC,NXREC,EXEXYG(1,IG),EEMAXG(IG)
IF (OUTOPT .EQ. 1 .OR. OUTOPT .EQ. 2)
CALL WRPOV (FUPRT, I YEAR( I YR) , 1GRP(ISG(IG)),LGRID,
NREC,NXREC,POVYG(1,IG),MPOVG(IG))
CONTINUE
ENDIF
IF (OUTOPT .EQ. 0 .OR. OUTOPT .EQ. 2) THEN
CALL HEADER (FUPRT)
CALL WREXEX (FUPRT , I YEAR(IYR) ,0,LGRID,NREC,NXREC,
EXEXY.EEMAX)
ENDIF
IF (OUTOPT .EQ. 1 .OR. OUTOPT .EQ. 2) THEN
CALL HEADPV (FUPRT)
CALL WRPOV (FUPRT, lYEAR(IYR) .O.LGRID,NREC,NXREC,POVY.MPOV)
CALL WRSPOV(FUPRT,I YEAR IYR),0,LGRID,NREC,NXREC,SPOVY,
SMPOVY)
ENDIF
ENDIF
-------
Page
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
200 CONTINUE
CALC ALL YEARS EXEX, POV & THE MAXS
DO 510 IG = 1, NSG
EEMAXG(IG) = 0.
MPOVG(IG) = 0.
DO 511 IR = 1, NREC
EXEXG IR.IG) = EXEXG(IR.IG) / NYEAR
POVG(IR.IG) = POVG(IR,IG)/NYEAR
IF (EXEXG(IR.IG)
IF (POVG(IR.IG)
511 CONTINUE
510 CONTINUE
GT. EEMAXG(IG)) EEMAXG(IG) = EXEXG(IR.IG)
GT. MPOVG(IG)) MPOVG(IG) = POVG(IR.IG)
EEMAX = 0.
SMPOV = 0.
MPOV = 0.
DO 520 IR = 1, NREC
EXEX(IR) = EXEX(IR)
POV(IR) = POV(IR) /
SPOV(IR) = SPOVHR),
IF (EXEX(IR) .GT. EEMAX) EEMAX = EXEX(IR)
IF (POV(IR) .GT. MPOV) MPOV = POV(IR)
IF (SPOV(IR) .GT. SMPOV) SMPOV = SPOV(IR)
520 CONTINUE
/ NYEAR
NYEAR
NYEAR
FINALLY, OUTPUT THIS OVERALL EXEX AND POV
DO 600 IG = 1, NSG
CALL HEADPV (FUPRT)
IF (OUTOPT .EQ. 0 .OR. OUTOPT .EQ. 2) THEN
CALL WREXEX (FUPRT, 0 , I GRP(ISG( I G)),LGRID,
NREC,NXREC,EXEXG(1,IG),EEMAXG(IG))
ENDIF
IF (OUTOPT .EQ. 1 .OR. OUTOPT .EQ. 2) THEN
CALL WRPOV (FUPRT, 0 , I GRP(ISG(IG)),LGRID,
NREC,NXREC,POVG(1,IG),MPOVG(IG))
ENDIF
600 CONTINUE
IF (OUTOPT .EQ. 0 .OR. OUTOPT .EQ. 2) THEN
CALL HEADER FUPRT)
CALL WREXEX (FUPRT, O.O.LGRID, NREC,NXREC,EXEX,EEMAX)
ENDIF
IF (OUTOPT .EQ. 1 .OR. OUTOPT .EQ. 2) THEN
CALL HEADPV (FUPRT)
CALL WRPOV (FUPRT, 0 ,0,LGRID,NREC,NXREC,POV,MPOV)
CALL WRSPOV(FUPRT, 0 ,0 , LGR I D,NREC,NXREC,SPOV,SMPOV)
ENDIF
C DC
-------
rage
2566
2567
2568
2569
2570
2571
2572
?S7 '
L. J / ..
2574
2575
2576
2577
2578
2579
2580
?5ft1
£, -J O 1
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
C
RETURN
END
CDECK MODEL5
C
C
C
C
C
C
C
p
C
C
C
C
C
C
C
C
C
C
c
C
C!
C .
C
C
Q
CMQD Mnnri fi
MODELS = SINGLE SOURCE-GROUP POV ,
'
SUBROUTINE MODELS ( FUPRT , FUBUF)
sriMF i nrAi VARIARI F^
JUrlL. LUUrtL VrAi\lr\DLLO
FUPRT I PRINTFILE FILEUNIT
FUBUF I TEMPFILE FOR SAVED CONC DATA
EXEX(MREC) R OVERALL EXEX BY RECEPTORS
EXEXYR(MREC) R YEARLY EXEX BY RECEPTORS
EEMAX R EXEX MAX
POV(MREC) R OVERALL POVBY RECEPTORS
POVYR(MREC) R YEARLY POV BY RECEPTORS
MPOV R POV MAX
INTEGER FUPRT
INTEGER FUBUF
..51NSERT EXEXS.INS
INTEGER MSIM,MSRC,MGRP,MYEAR,MREC,MQ,MITER,MBSAV
PARAMETER (MS IM = 1999 ,MSRC = 6 ,MGRP = 6 ,MYEAR = 6 ,MREC = 200 ,MQ = 20 ,
& MITER=99,MBSAV=4095,VIOL=2.)
CHARACTER T I TLE*80 , SNAME (MSRC) *20
INTEGER NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,
& IYEAR(MYEAR),ISRC(MSRC),IGRP(MSRC), IVARY.NQ1,
& POVFLAG.OUTOPT
REAL CSTD,CBACK,QGM(MQ),GSDCUT (MSRC), TARGET, EPS.QIBEG.Ql END,
& Q2MIN,Q2MAX,RHO(MSRC),QGSD(MQ)
INTEGER MODEL,NSG,ISG(MGRP),NTP,MSAV
REAL CCUTMX,QCUT(MGRP),CZERO
COMMON /PARAM/
TITLE, SNAME,
NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,IYEAR,ISRC,
IGRP,IVARY,NQ1,
CSTD,CBACK,QGM,QGSD,GSDCUT, TARGET.EPS, Ql BE G,Q1 END, Q2MIN,
Q2MAX,
MODEL, NSG,ISG,NTP,MSAV, CCUTMX ,QCUT , CZERO , RHO , POVFLAG ,
OUTOPT
INTEGER NDATYR(MYEAR),ISAVYR(0:MYEAR) , NSAVE , NPAGE , NSAV , IOPAGE
INTEGER*2 IPERS(MBSAV) , I RECS ( MBSAV)
REAL CONCS(MBSAV)
-------
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
?fiid
t. U J *l
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
C
C
r
u
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
COMMON /STORE1/ NDATYR,ISAVYR.NSAVE,NPAGE,NSAV,IOPAGE
COMMON /STORE2/ IPERS.IRECS, CONCS
REAL
EXEX(MREC),
EXEXYR(MREC),
EEMAX,
POV(MREC),
POVYR(MREC),
MPOV
PRINT '(IX,A)', 'MODEL5'
FIRST OF ALL, SEE IF THERE IS ANY DATA STORED TO BE PROCESSED,
THAT IS, SEE IF THERE IS POTENTIAL EXCEEDANCE
IF (NSAVE .EQ. 0) THEN
WRITE (FUPRT,1(//A)1)
, OF VIOLATION IS ZERO! '
RETURN
ENDIF
NO EXPECTED EXCEEDANCES, PROBABILITY
IF BRIEF OUTPUT IS DESIRED (NO TABLE OF EXEX OR POV BY RECEPTOR) THEN
ONLY 1 RESULTS PAGE; THUS, OUTPUT THE PAGE HEADER AS SPECIAL CASE
IF (LGRID .EQ. 0) THEN
CALL HEADPV (FUPRT)
WRITE (FUPRT,'(/)')
ENDIF
CHOOSE HOW TO CALC EXEX AND POV, FOR ALL YEARS OR BY YEAR
IF (LYRLY .EQ. 1) GOTO 2000
1000 CONTINUE
CALC EXEX AND POV ARRAYS FOR ALL YEARS AT ONCE
AND OUTPUT RESULTS
CALL XX23PV (FUBUF,'ALL',0,QGM(1),QGSD(1),NREC,EXEX,POV,
. EEMAX,MPOV)
IF (LGRID .GT. 0) CALL HEADPV (FUPRT)
CALL WRPOV (FUPRT, 0,0,LGRID, NREC , NXREC,POV,MPOV)
IF (OUTOPT .EQ. 2) THEN
CALL HEADER (FUPRT)
CALL WREXEX (FUPRT, 0,0 , LGRID,NREC,NXREC,EXEX,EEMAX)
ENDIF
RETURN
F-87
-------
Page
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
?7?fi
t- 1 L U
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
\*
C
C
C
C
C
C
C
C
c
C
C
C
C
C
C
C
C
C
C
c.
c
p
c
c
C
2000 CONTINUE
CALC EXEX AND POV & OUTPUT BY YEAR
j
INITIALIZE OVERALL EXEX AND POV ARRAYS
DO 100 I = 1, NREC ,
EXEX(I) = 0. '
POV(I) = 0.
100 CONTINUE
*
LOOP TO CALC & WRITE EXEX AND POV BY YEAR
DO 200 IYR = 1, NYEAR
COMPUTE THIS YEAR'S EXEX AND POV AND ADD TO OVERALL ARRAYS
CALL XX23PV ( FUBUF , ' 1 YR ' , I YR ,QGM( 1 ) ,QGSD( 1 ) , NREC , EXEX YR ,
POVYR, EEMAX, MPOV)
DO 210 I = 1, NREC
EXEX(I) = EXEX(I) + EXEXYR(I)
POV(I) = POV(I) + POVYR(I)
210 CONTINUE
AND OUTPUT THIS YEAR'S RESULTS.
BUT BE SMART TO OUTPUT BY YEAR ONLY IF THERE IS > 1 YEAR!
IF (NYEAR .GT. 1) THEN
IF LGRID.GT.O.AND. MOD( I YR , NTP) . EQ. 1 )
CALL HEADER FUPRT
CALL WRPOV (FUPRT, I YEAR ( I YR) ,0 , LGRI D , NREC .NXREC ,
POVYR, MPOV)
IF (OUTOPT .EQ. 2) THEN
CALL HEADER (FUPRT)
CALL WREXEX ( FUPRT , I YEAR( 1 YR) ,0 , LGR I D , NREC , NXREC ,
EXEX,EEMAX)
ENDIF
ENDIF
200 CONTINUE
CALC OVERALL EXEX AND POV, FIND THE MAXS, AND OUTPUT
EEMAX = 0.
MPOV = 0.
DO 300 I = 1, NREC
EXEX(I) = EXEX(I) / NYEAR
POV I) = POV(I)/NYEAR
IF EXEX(I) .GT. EEMAX) EEMAX = EXEX(I)
IF POV(I) .GT. MPOV) MPOV = POV(I)
-------
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
?77fi
f- 1 1 U
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
C
c
C
c
c
CD
C
C =
C
C
C
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
r
c
C!
c.
c
c
300 CONTINUE
IF (LGRID .GT. 0) CALL HEADPV (FUPRT)
CALL WRPOV (FUPRT, 0,0,LGRID, NREC.NXREC,POV,MPOV)
IF (OUTOPT .EQ. 2) THEN
CALL HEADER (FUPRT)
CALL WREXEX (FUPRT, 0,0,LGRID,NREC,NXREC,EXEX,EEMAX)(
E NDIF
RETURN
I
END
CDECK MODEL6
C
C==== SUBR MODEL6 =================================================
MODEL 6 = SINGLE SOURCE-GROUP ITERATIVE POV.
SUBROUTINE MODEL6 (FUPRT,FUBUF)
SOME LOCAL VARIABLES
FUPRT I
FUBUF I
NITER I
EXEX(MREC) R
QLOW.QHIGH.QEST R
EEMAX R
POV(MREC) R
POVMX(MQ) R
MPOV R
MPOV1.MPOV2 R
PRINTFILE FILEUNIT
TEMPFILE FOR SAVED CONC DATA
^ITERATIONS TO GET TO TARGET EXEX
EXEX BY RECEPTORS
GUESSES/ESTIMATES OF QGM OR QGSD
EXEX MAX FOR A GUESSED QGM OR QGSD
POV BY RECEPTORS
POVMAX FOR VARYING GM.GSD
MAX POV FOR ESTIMATED GM.GSD
MAX POVS FOR EXTREMES TESTS
INTEGER
INTEGER
FUPRT
FUBUF
,$INSERT EXEXS.INS
INTEGER MSIM,MSRC,MGRP,MYEAR,MREC,MQ,MITER,MBSAV
PARAMETER (MS IM = 1999,MSRC = 6,MGRP = 6,MYEAR = 6,MREC = 200,MQ = 20,
& MITER=99,MBSAV=4095,VIOL=2.)
TITLE*80,SNAME(MSRC)*20
NSIM,NSRC,NREC,NXREC,IAVPER,LGRIp,LYRLY
CHARACTER
INTEGER NS I M.NSRC, NREC,NXREC,IAVPER,LGRID,LYRLY.NYEAR,
& IYEAR(MYEAR),ISRC(MSRC),IGRP(MSRC),IVARY,NQ1
& POVFLAG,OUTOPT
REAL CSTD, CBACK, QGM(MQ), GSDCUT(MSRC),TARGET,EPS,Q1BEG,Q1END,
& Q2M1N,Q2MAX,RHO(MSRC),QGSD(MQ)
INTEGER MODEL,NSG,ISG(MGRP),NTP,MSAV
-------
Page 50
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
?fl?1
L. O C- 1
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
?fH4
L. O J *1
2835
2836
2837
2838
2839
2840
?ft d 1
L O *t 1
2842
2843
2844
2845
2846
2847
2848
2849
9Rt;n
C
C
C
C
C
C
C
C
C
r
C
C
Q
c
C
p
c
C
c
c
{:
REAL CCUTMX,QCUT(MGRP),CZERO
COMMON /PARAM/
TITLE, SNAME,
NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,IYEAR,ISRC,
IGRP.IVARY.NQ1,
CSTD,CBACK,QGM,QGSO,GSDCUT,TARGET,EPS,Q1BEG,Q1END,Q2MIN,
Q2MAX, |
MODEL, NSG,ISG,NTP,MSAV, CCUTMX .QCUT.CZERO ,RHO , POVFLAG ,
OUTOPT
INTEGER NDATYR(MYEAR),ISAVYR(0:MYEAR),NSAVE,NPAGE,NSAV! IOPAGE
INTEGER*2 I PERS (MBSAV) , I RECS (MBSAV)
REAL CONCS MBSAV)
COMMON /STORE1/ NOATYR , ISAVYR , NSAVE , NPAGE , NSAV , I OPAGE
COMMON /STORE2/ IPERS.IRECS, CONCS
INTEGER
. NITER
REAL
EXEX(MREC) ,
QLOW.QHIGH.QEST,
EEMAX,
POV(MREC),
POVMX(MQ),
MPOV,
MPOV1.MPOV2
PRINT '(IX, A)1, 'MODEL61
FIRST OF ALL, SEE IF THERE IS ANY DATA STORED TO BE PROCESSED.
CAN'T CALC EXEX OR POV IF THERE ISN'T ANY DATA WITH POTENTIAL EXCEEDAN
IF (NSAVE .EQ. 0) THEN
WRITE (FUPRT, ' (//A) ' ) ' NO CONCENTRATIONS SAVED. CHECK
. CUTOFF VALUE. '
RETURN
ENDIF
OUTPUT SPECIAL CASE PAGE HEADER IF BRIEF (NO RECEPTORS TABLE) OUTPUT
IS DESIRED
IF (LGRID .EQ. 0) CALL HEADPV (FUPRT)
LOOP TO CALC POV (ESTIMATE) & OUTPUT BY THE VARYING Q GM OR GSD
DO 100 IQ = 1, NQ1
NITER = 0
IF (IVARY .EQ. 2) GOTO 500
-------
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
C
C
c
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
VARYING QGM
IF (LGRID.GT.O .AND. MOD(IQ.NTP).EQ.1)
CALL HEADPV (FUPRT)
'A,I2,A,F8.4)'
GM = ',QGM(IQ
i>n i_ u 11 L. n LS r v \
WRITE (FUPRT,'(///
' STEPf'.IQ.1: C
DO A PRELIMINARY CHECK ON THE RANGE TO CALC QGSD '
THE TARGET COULD BE OUT OF THE RANGE ALLOWED
CALL XX23PV (FUBUF,'ALL1,0,QGM(IQ).Q2MIN.NREC.EXEX,POV,
EEMAX1.MPOV1)
CALL XX23PV (FUBUF ,' ALL ' ,0,QGM( IQ).Q2MAX,NREC.EXEX,POV,
EEMAX2.MPOV2)
IF (TARGET.LT.MPOV1 .OR. TARGET.GT.MPOV2) THEN
WRITE (FUPRT,'(A/ A.F8.4,A,F8.4)')
1 DID NOT FIND GSD WITHIN THE GIVEN RANGE!1,
' AT THE MIN & MAX RANGE, MPOVS ARE '.MPOV1,1 & '.MPOV2
QGSD(IQ) = 0.
POVMX(IQ) = 0.
GOTO 100
ENDIF
THE RANGE IS OK,
ESTIMATE QGSD FOR THE TARGET EXEX BY BISECTION ITERATIONS.
LIMIT IITERATIONS TO PREVENT INFINITE/NEAR INFINITE LOOPING!
QLOW = Q2MIN
QHIGH = Q2MAX
200 CONTINUE
NITER = NITER + 1
QEST = (QLOW+QHIGH)/2
CALL XX23PV (FUBUF,'ALL1,0,QGM(IQ),QEST,NREC.EXEX,POV,
EEMAX.MPOV)
IF (ABS(MPOV-TARGET) .LE. EPS) GOTO 299
IF (NITER .GE. MITER) THEN
CALL ERROR (FUPRT, 15, MITER,0.)
GOTO 299
ENDIF
IF (MPOV .LT. TARGET) THEN
QLOW = QEST
ELSE
QHIGH = QEST
ENDIF
GOTO 200
299 CONTINUE
OUTPUT RESULT FOR THIS VARYING STEP
QGSD(IQ) = QEST
-------
Page
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
C
C
C
C
C
C
C
C
C
C
C
C
C
C
r
c
c
c
c
c
c
POVMX(IQ) = MPOV
WRITE (FUPRT, '(A,I 2,A,F8.4,A)')
1 AFTER ',NITER,1 ITERATIONS, FOUND GSD OF '.QEST,
1 WHICH PRODUCES:'
CALL WRPOV (FUPRT, -1,0,LGRID,NREC.NXREC,POV,MPOV)
IF (OUTOPT .EQ. 2 THEN i
CALL HEADER FUPRT)
CALL WREXEX FUPRT,-1,0,LGRID,NREC,NXREC,EXEX,EEMAX)
ENDIF ,
GOTO 100
500 CONTINUE
VARYING QGSD
IF (LGRID.GT.O .AND. MOD(IQ,NTP).EQ.1)
CALL HEADPV (FUPRT)
WRITE (FUPRT,'(//A,12,A, F8.4)')
' STEP*',IQ,': GSD = ',QGSD(IQ)
DO A PRELIMINARY CHECK ON THE RANGE TO CALC QGM
THE TARGET COULD BE OUT OF THE RANGE ALLOWED
CALL XX23PV (FUBUF , 'ALL',0 ,Q2MIN,QGSD(IQ),NREC,EXEX,POV,
EEMAX1.MPOV1)
CALL XX23PV (FUBUF ,' ALL' ,0 .Q2MAX ,QGSD(IQ),NREC,EXEX,POV,
EEMAX2.MPOV2)
IF (TARGET.LT.MPOV1 .OR. TARGET.GT.MPOV2) THEN
WRITE (FUPRT,'(A/ A ,F8.4 , A,F8.4)')
1 DID NOT FIND GM WITHIN THE GIVEN RANGE! ,
' AT THE MIN & MAX RANGE, POVS ARE '.MPOVl,' & '.MPOV2
QGM(IQ) = 0.
POVMX(IQ) = 0.
GOTO 100
ENDIF
THE RANGE IS OK,
ESTIMATE QGM FOR THE TARGET EXEX BY BISECTION ITERATIONS.
LIMIT IITERATIONS TO PREVENT INFINITE/NEAR INFINITE LOOPING!
QLOW = Q2MIN
QHIGH = Q2MAX
600 CONTINUE
NITER = NITER + 1
QEST = (QLOW+QHIGH)/2
CALL XX23PV (FUBUF,'ALL1
EEMAX,MPOV)
IF (ABS(MPOV-TARGET) .LE.
0,QEST,QGSD(IQ),NREC,EXEX,POV ,
IF (NITER .GE. MITER) THEN
EPS) GOTO 699
1111II II 1
F-91
-------
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2Q76
1, J / \J
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
pggg
i- J -f \J
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
C
c
C
C
C
C
C
c
C
C
c
C
C
C
C
C
C
C
CALL ERROR (FUPRT, 15, MITER, 0.)
GOTO 699
ENDIF
IF (MPOV .LT. TARGET) THEN
QLOH = QEST
ELSE
QHIGH = QEST 1
ENDIF
GOTO 600
699 CONTINUE .
'
OUTPUT RESULT FOR THIS VARYING STEP
QGM(IQ) = QEST
POVMX(IQ) = MPOV
WRITE (FUPRT,1 (A, I2.A.F8.4 ,A) ' )
' AFTER ', NITER,1 ITERATIONS, FOUND GM OF ' ,QEST,
1 WHICH PRODUCES: '
IF (OUTOPT .EQ. 2) THEN
CALL HEADER (FUPRT)
CALL WREXEX FUPRT ,-1 ,0,LGRID,NREC,NXREC ,EXEX , EEMAX)
ENDIF
CALL WRPOV (FUPRT, -1 ,0 , LGRI D , NREC .NXREC ,POV , MPOV)
100 CONTINUE
SUMMARY OUTPUT.
DON'T OUTPUT IF NONE OF VARYING STEPS HIT THE TARGET!
DO 700 I = 1, NQ1
IF (POVMX(I) .GT. 0.) GOTO 710
700 CONTINUE
GOTO 799
710 CONTINUE
LGRID = 0
CALL HEADPV (FUPRT)
WRITE (FUPRT,1 (//A// A, A/)1)
1 SUMMARY:1,
. ' GEOMETRIC MEAN GEOMETRIC STD DEV MPOV ',
. ' DIFFERS FROM TARGET BY1
WRITE (FUPRT,'(4X,I2,5X,F8.4,9X,F8.4,7X,F8.4,9X,F8.4)')
. (I, QGM(I),QGSD(I),POVMX(I),POVMX(I)-TARGET, 1 = 1, NQ1)
799 CONTINUE
RETURN
END
CDECK EXEX1
F-92
-------
Page 54
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
J U *1 U
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
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
==== SUBR EXEX1 =======================================================
CALC EX-EX FOR MODEL 1, USING MONTE-CARLO SIMULATIONS.
CALCULATE FOR ONE SPECIFIED YEAR.
SUBROUTINE EXEX1 (FUBUF, 1YR, MR.NR.NG, EXEXG , EXEX , EEMAXG,EEMAX)
SOME LOCAL VARIABLES '
FUBUF I
IYR I
MR.NR.NG I
EXEXG(MR,NG) R
EXEX(NR) R
EEMAXG(NG) R
EEMAX R
NRAND I
RAND(8784,MGRP) R
QRAND(8784,MGRP) R
TEMPFILE FOR SAVED CONC DATA
THE YEAR TO CALC EX-EX FOR
* RECEPTORS & SOURCE-GROUPS
ARRAY OF EX-EX BY SOURCE-GROUP
FOR ALL SOURCES
EX-EX MAX BY SOURCE-GROUP
FOR ALL SOURCES
I RANDOMS TO GENERATE FOR THE YEAR
1 PER PERIOD BUT MUST BE EVEN
RANDOM#'S, EVENLY DISTRIBUTED 0-1
RANDOMIZED EMISS-RATES
INTEGER
INTEGER
INTEGER
REAL
REAL
REAL
REAL
FUBUF
IYR
MR.NR.NG
EXEXG(MR.NG)
EXEX(NR)
EEMAXG(NG)
EEMAX
,$INSERT EXEXS.INS
INTEGER MSIM,MSRC,MGRP,MYEAR,MREC,MQ,MITER,MBSAV
PARAMETER (MS IM = 1999 ,MSRC = 6 ,MGRP = 6 ,MYEAR = 6,MREC = 200,MQ = 20,
& MITER=99,MBSAV=4095,VIOL=2.)
CHARACTER T ITLE*80 ,SNAME(MSRC)*20
INTEGER NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,
& I YEAR(MY EAR) , ISRC(MSRC) , IGRP(MSRC) , I VARY,NQ1,
& POVFLAG.OUTOPT
REAL CSTD,CBACK,QGM(MQ) , GSDCUT(MSRC).TARGET,EPS,Q1BEG,Q1END,
& Q2MIN,Q2MAX,RHO(MSRC),QGSD(MQ)
INTEGER MODEL,NSG,ISG(MGRP) ,NTP,MSAV
REAL CCUTMX.QCUT(MGRP),CZERO
COMMON /PARAM/
TITLE,SNAME,
NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,IYEAR,ISRC,
IGRP.IVARY.NQl,
CSTD,CBACK,QGM,QGSD,GSDCUT,TARGET,EPS,Q1BEG,Q1END,Q2MIN,
Q2MAX,
MODEL,NSG,ISG,NTP,MSAV, CCUTMX ,QCUT , CZERO , RHO,POVFLAG ,
OUTOPT
F-93
-------
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
onqi
O U J 1
3092
3093
3094
3095
^096
J V J V
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3110
J 1 1 O
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
T 1 T 1
J 1 J 1
3132
3133
3134
3135
INTEGER NDATYR(MYEAR),ISAVYR(0:MYEAR),NSAVE,NPAGE,NSAV
INTEGER*? IPERS(MBSAV),IRECS(MBSAV)
REAL CONCSfMBSAV)
COMMON /STORE1/ NDATYR, ISAVYR.NSAVE .NPAGE ,NSAV, IOPAGE
COMMON /STORE2/ IPERS.IRECS, CONCS
c
INTEGER NRAND
REAL
. RANO(8784,MGRP),
. QRANO(8784,MGRP)
C
f - RF IKF/DVFRIAY MFM Tfi rflKKFRVF
I* I\L~UJI./UVLl\l_rAl n [. PI IU UUrULI\VL
C PUT INTO COMMON 'CAUSE IT'S TOO BIG
EQUIVALENCE (RAND.QRAND)
COMMON // QRAND
C
r _
C
C INITIALIZE.
C DUE TO THE PECULIARITY OF SAMPLING ROUTINE, 1 RANDOMIS TO
C HAS TO BE AN EVEN * (CEILING EVEN f OF ^PERIODS).
C USE EXEXGQ & EXEXM ARRAYS (FROM THE CALLING ROUTINE) FOR
C IEXCEEDANCES TO CONSERVE MEM SPACE
C
NRANO = 24/IAVPER * 366
C
DO 110 IG = 1, NSG
DO 111 IR = 1, NREC
EXEXG IR.IG) = 0.
Ill CONTINUE
EEMAXG(IG) = 0.
110 CONTINUE
C
DO 120 IR = 1, NREC
EXEX(IR) = 0.
120 CONTINUE
EEMAX = 0.
C
r _
c
C PREPARE INDEXES OF NEEDED CONC DATA
C
CDBG
WRITE (12,1111) IYR
1111 FORMAT (3X, '---DEBUG: IYR= ',15)
CDBG
IBSAV = ISAVYR(IYR-l) + 1
IESAV = ISAVYR(IYR)
IBPAGE = (IBSAV + MSAV-1) / MSAV
IEPAGE = IESAV + MSAV-1) / MSAV
C
- _ - -_-
C
C MONTE-CARLO SIMULATIONS LOOP
C
DO 200 ISIM = 1, NSIM
, IOPAGE
i
i
1
BE GENERATED
COUNTING
F-94
-------
Page 56
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
-ii sn
O L -J \J
3151
3152
3153
3154
3155
3156
3157
3158
Tl 59
o I -J y
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
1 1 QQ
o i oy
3190
3191
3192
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
p
C
c
GENERATE RANDOMIS FOR EACH PERIOD & SOURCE-GROUP.
THEN MAKE SAMPLE EMISS-RATES USING THE RANDOMIS.
YOU MAY REPLACE THE SAMPLING ROUTINE SAMPLE WITH YOUR OWN IF YOU
WISH, BUT NOTE RAND() & QRAND() ARE EQU I VALENCED ! ,
DO 300 IG = 1, NSG
CALL RANDNO ( NRAND , RAND ( 1 , 1 G) )
CALL SAMPLE (NRAND , RAND ( 1 , I G) , QGM( ISG( I G) ) ,QGSD( ISfe( I G) ) ,0 . ,
l.QCUT(IG), QRAND(l.IG))
300 CONTINUE
LOOP OVER DATA STORED FOR THE YEAR,
MAKE SAMPLE CONCENTRATIONS AND COUNT EXCEEDANCES, BY GROUP & FOR
ALL SOURCES.
PAGE DATA IN FROM TEMPF1LE AS NECCESSARY.
DO 400 IPAGE = IBPAGE, IEPAGE
HAVF TO PAGE DATA IN
iiriVL. i \J rriuu uriiri l i*
IF (IPAGE .NE. IOPAGE) THEN
READ (FUBUF,REC=IPAGE) (IPERS I), 1=1, MSAV ,
(IRECS I), 1 = 1, MSAV ,
(CONCS I), 1=1, MSAV
IOPAGE = IPAGE
ENDIF
LOCATE BEGINNING & ENDING OF
WANTED DATA IN THIS PAGE
IBDAT = 1
IEDAT = MSAV
IF (IPAGE .EQ. IBPAGE) IBDAT = IBSAV - ( I PAGE-1 ) *MSAV
IF (IPAGE .EQ. IEPAGE) IEDAT = IESAV - ( I PAGE-1 ) *MSAV
THEN WE CAN ACCESS THEM
DO 410 IDAT = IBDAT, IEDAT, NSG
IP = IPERS(IDAT)
IR = IRECS IDAT)
CT = 0.
DO 411 IG = 1, NSG
CS = CONCS(IDAT-1+IG) * QRAND(IP.IG)
IF (CS .GE. CSTD) EXEXG(IR.IG) = EXEXG(IR.IG) + 1.
CT = CT + CS
411 CONTINUE
IF (CT .GE. CSTD) EXEX(IR) = EXEX(IR) + 1.
410 CONTINUE
400 CONTINUE
200 CONTINUE
F-95
-------
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
1 7 A <;
J C. H D
3246
3247
3248
3249
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
CALC EX-EX BY GROUP & FOR ALL SOURCES, AND FIND THE MAXS
DO 500 IR = 1, NREC
BY SOURCE-GROUP j
DO 510 IG = 1, NSG
EXEXG(IR.IG) = EXEXG(IR.IG) / NSIM .
IF (EXEXG(IR.IG) .GT. EEMAXG(IG)) EEMAXG(IG) = EXEXG(IR,IG)
510 CONTINUE
FOR ALL SOURCES
EXEX(IR) = EXEX(IR) / NSIM
IF (EXEX(IR) .GT. EEMAX) EEMAX = EXEX(IR)
500 CONTINUE
RETURN
END
C= = = = SUBR EXEX23 ======================================================
CDECK EXEX23
FIND EX-EX FOR MODEL 2 & 3, USING PROBABILITY (NORMAL DISTR FUNCTION).
CALCULATE EX-EX FOR ONE SPECIFIED YEAR OR FOR ALL YEARS.
MODE='1YR' = CALCULATE EX-EX FOR ONE SPECIFIED YEAR.
MODE='ALL' " « n ALL YEARS.
SUBROUTINE EXEX23 (FUBUF, MODE,IYR, GM.GSD, NR,EXEX,EEMAX)
SOME LOCAL VARIABLES
FUBUF I
MODE*3 C
IYR I
GM.GSD R
NR I
EXEX(NR) R
EEMAX R
GMLOG.GSDLOG R
QCLOG.QCNORM R
POE R
TEMPFILE FOR SAVED CONC DATA
OPTION TO CALC BY YEAR OR ALL YEARS
THE YEAR TO CALC EXEX, IF MODE='1YR'
GEOMETRIC MEAN & STD DEV TO BE USED
RECEPTORS
THE RESULTED EXEX, 1 YEAR OR ALL YEARS
THE MAX OF EXEX
LOG OF GM & GSD
THE CRITICAL Q VALUE (Q AT STD CONC)
PROBABILITY OF EXCEEDANCE
INTEGER FUBUF
CHARACTER MODE*3
INTEGER IYR
F-96
-------
Page 58
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
C
C
C
C
C
C
C
C
C
C
C
C
c
C
c
c
C
REAL
INTEGER
REAL
REAL
GM.GSD
NR
EXEX(NR)
EEMAX
.SINSERT EXEXS. INS
INTEGER MS1M,MSRC,MGRP,MYEAR,MREC,MQ,MITER,MBSAV
PARAMETER (MS IM=1999 ,MSRC = 6,MGRP = 6,MYEAR = 6,MREC = 200,MQ = 20,
& MITER=99,MBSAV=4095,VIOL=2.) ,
CHARACTER T ITLE*80,SNAME(MSRC)*20
INTEGER NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,
& IYEAR(MYEAR),ISRC(MSRC),IGRP(MSRC),IVARY,NQ1,
& POVFLAG.OUTOPT
REAL CSTD,CBACK,QGM(MQ),GSDCUT(MSRC),TARGET,EPS,QlBEG,QlEND,
& Q2MIN,Q2MAX,RHO(MSRC),QGSD(MQ)
INTEGER MODEL,NSG,ISG(MGRP),NTP,MSAV
REAL CCUTMX.QCUT(MGRP),CZERO
COMMON /PARAM/
TITLE,SNAME,
NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,IYEAR,ISRC,
IGRP,IVARY,NQ1,
CSTD,CBACK,QGM,QGSD,GSDCUT,TARGET,EPS,Q1BEG,Q1END,Q2MIN,
Q2MAX,
MODEL,NSG,ISG,NTP,MSAV, CCUTMX,QCUT,CZERO,RHO,POVFLAG,
OUTOPT
INTEGER NDATYR(MYEAR),ISAVYR(0:MYEAR),NSAVE,NPAGE,NSAV,I OPAGE
INTEGER*2 I PERS(MBSAV),IRECS(MBSAV)
REAL CONCS MBSAV)
COMMON /STORE1/ NDATYR,ISAVYR,NSAVE,NPAGE,NSAV , IOPAGE
COMMON /STORE2/ IPERS.IRECS, CONCS
REAL
. GMLOG.GSDLOG,
. QCLOG.QCNORM,
. POE
PRE-CALCULATE LOG OF Q GM & GSD FOR EFFICIENCY
INITIALIZE THE RESULTED EXEX ARRAY
GMLOG = ALOG(GM)
GSDLOG = ALOG(GSD)
EEMAX = 0.
DO 100 I = 1, NR
EXEX(I) = 0.
100 CONTINUE
PREPARE INDEXES, WHETHER TO PROCESS ALL OR JUST ONE YEAR'S DATA
IF (MODE .EQ. '1YR') THEN
IBSAV = ISAVYR(IYR-l) + 1
F-97
-------
3307)
3308
3309
3310'
3311'
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
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
IESAV = ISAVYR(IYR)
ELSEIF (MODE .EQ. 'ALL') THEN
IBSAV = 1
IESAV = NSAVE
ELSE
CALL ERROR (1, 14, MODE.O.)
ENDIF
IBPAGE =
IEPAGE =
IBSAV + MSAV-1) / MSAV
IESAV + MSAV-1) / MSAV
THEN, LOOP THRU THE STORED DATA TO CALC EXEX
DO PAGING OF DATA AS NECCESSARY
DO 200 IPAGE = IBPAGE, IEPAGE
CHECK CURRENT PAGE, IF NEEDED READ A NEXT PAGE FROM THE TEMPFILE
IF (IPAGE .NE. IOPAGE) THEN
READ (FUBUF,REC=IPAGE) (IPERS
IRECS
CONCS
IOPAGE = IPAGE
ENDIF
,1=1,MSAV
,1 = 1,MSAV
,1=1,MSAV
LOCATE BEGINNING & ENDING OF THE WANTED DATA IN THIS PAGE
1BDAT = 1
1EDAT = MSAV
IF (IPAGE .EQ. IBPAGE) IBDAT = IBSAV - (IPAGE-1)*MSAV
IF (IPAGE .EQ. IEPAGE) IEDAT = IESAV - (I PAGE-1)*MSAV
THEN, WE KNOW WHERE TO ACCESS THE DATA
DO 210 IDAT = IBDAT, IEDAT
CALC Q CRITICAL AT THE NORMAL DISTRIBUTION CURVE
QCLOG = ALOG (CSTD/CONCS(I DAT))
QCNORM = (QCLOG-GMLOG) / GSDLOG
CALC EXEX FOR THE RECEPTOR, AND ACCUMULATE INTO THE EXEX ARRAY
POE = 1. - GAUCDF (QCNORM)
EXEX(IRECS(IDAT)) = EXEX(IRECS(I DAT)) + POE
210 CONTINUE
F-98
-------
Page 60
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
1 "3QQ
j j oy
3390
3391
3392
3393
3394
3395
3396
3397
3398
5300
J J j J
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
C
C
c
C
C
C
C
C
200 CONTINUE
LASTLY, FINISH CALC OF EXEX (FOR ALL-YEARS EXEX) AND FIND THE MAX
1
IF (MODE .EQ. '1YR') THEN
DO 310 I = 1, NR
IF (EXEX(I) .GT. EEMAX) EEMAX = EXEX(I)
310 CONTINUE '
ELSE
DO 320 I = 1, NR
EXEX(I) = EXEX(I) / NYEAR
IF (EXEX(l) .GT. EEMAX) EEMAX = EXEX(l)
320 CONTINUE
ENDIF
RETURN
END
CDECK XX1PV
C
C_
-
C
c
c
c
c
c
c
Q
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
Q
Q
c
<;ilRD VY1DU - - - - -
o U D K AAlrv
CALC EX-EX AND POVS FOR MODEL 4, USING MONTE-CARLO SIMULATIONS.
CALCULATE FOR ONE SPECIFIED YEAR.
SUBROUTINE XX1PV ( FUBUF , I YR ,MR, NR , NG , EXEXG ,POVG , EXEX , POV ,
. EEMAXG,MPOVG,EEMAX,MPOV,SPOV,SMPOV)
SOME LOCAL VARIABLES
FUBUF I TEMPFILE FOR SAVED CONC DATA
IYR I THE YEAR TO CALC EX-EX FOR
MR.NR.NG 1 RECEPTORS & SOURCE-GROUPS
EXEXG(MR.NG) R ARRAY OF EX-EX BY SOURCE-GROUP
EXEX(NR) R DITTO FOR ALL SOURCES
EEMAXG(NG) R EX-EX MAX BY SOURCE-GROUP
EEMAX R DITTO FOR ALL SOURCES
POVG(MR.NG) R ARRAY OF POV BY SOURCE GROUPS
POV(NR) R DITTO FOR ALL SOURCES
MPOVG(NG) R MAX POV FOR SOURCE GROUPS
MPOV R MAX POV ALL SOURCES
SPOV(MR) R SYNERGISTIC POVS ACROSS SOURCES
SMPOV R MAX SYNERGISTIC POV
SEX(MREC) R SYNERGISTIC EXCEEDANCES ARRAY
GREX(MREC) R SOURCE-GROUP EXCEEDANCES ARRAY
EXGRP(MREC.MGRP) R INTERMEDIATE EXCEEDANCES ARRAY
EXFLG R FLAG FOR OCCURANCE OF SOURCE GROUP
IN EXCEEDANCE
NRAND I « RANDOM0S TO GENERATE FOR THE YEAR
1 PER PERIOD BUT MUST BE EVEN
-------
3421
3422
3423
3424
J M t. "
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
C
c
c
c
C!
C. .
C
C
C
c
RAND(8784,MGRP) R
QRAND(8784,MGRP) R
RANDOMf'S, EVENLY DISTRIBUTED 0-1
RANDOMIZED EMISS-RATES
,$INSERT EXEXS.INS I
INTEGER MS IM .MSRC.MGRP.MYEAR.MREC.MQ,MITER,MBSAV
PARAMETER (MS IM = 1999,MSRC = 6,MGRP = 6,MYEAR = 6,MREC = 200,MQ = 20,
& MITER=99,MBSAV=4095,VIOL=2.)
CHARACTER TITLE*80,SNAME(MSRC)*20
INTEGER NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,
& IYEAR(MYEAR),ISRC(MSRC),IGRP(MSRC),IVARY,NQ1,
& POVFLAG.OUTOPT
REAL CSTD.CBACK.QGM(MQ).GSDCUT(MSRC) .TARGET , EPS,Q1BEG,Q1END,
& Q2MIN,Q2MAX,RHO(MSRC),QGSD(MQ)
INTEGER MODEL,NSG,ISG(MGRP),NTP,MSAV
REAL CCUTMX,QCUT(MGRP),CZERO
COMMON /PARAM/
TITLE,SNAME,
NSIM,NSRC,NREC,NXREC,IAVPER.LGRID,LYRLY,NYEAR,IYEAR,ISRC,
IGRP.IVARY.NQl,
CSTD.CBACK.QGM.QGSD.GSDCUT, TARGET, EPS,QlBEG,Q1END,Q2MIN,
Q2MAX,
MODEL.NSG.ISG.NTP.MSAV, CCUTMX,QCUT,CZERO,RHO,POVFLAG,
OUTOPT
INTEGER NDATYR(MYEAR) , ISAVYR(0:MYEAR),NSAVE,NPAGE,NSAV,IOPAGE
INTEGER*2 IPERS(MBSAV),IRECS(MBSAV)
REAL CONCS(MBSAV)
COMMON /STORE1/ NDATYR, I SAVYR,NSAVE.NPAGE,NSAV,IOPAGE
COMMON /STORE2/ IPERS.IRECS, CONCS
INTEGER FUBUF
INTEGER IYR
INTEGER MR.NR.NG
REAL EXEXG(MR.NG)
REAL EXEX(NR)
REAL EEMAXG(NG)
REAL EEMAX
REAL POVG(MR.NG)
REAL POV(NR)
REAL MPOVG(NG)
REAL MPOV
REAL SPOV(MR)
REAL SMPOV
REAL SEX(MREC)
REAL GREX(MREC)
REAL EXGRP(MREC.MGRP)
REAL EXFLG
INTEGER NRAND
REAL
, RAND(8784,MGRP),
F-100
-------
Page 62
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
"J C I ~l
3518
3519
3520
3521
3522
3523
3524
3525
0 r O C
3527
3528
3529
3530
3531
3533
3534
C
c
C
C
c
c
c
c
c
c
c
c
c
11
c
c
c
c
c
c
p
c
c
c
c
c
c
. QRAND(8784,MGRP)
DC IKF/nVFRI flY MFM TD TflKKFRVF
l\ c. UjL/UVC.i\l_ni n L n IU cur(jLi\VL
PUT INTO COMMON 'CAUSE IT'S TOO BIG
EQUIVALENCE (RAND.QRAND)
COMMON // QRAND
1
PRINT ' (IX, A)1 , 'XX1PV ,
INITIALIZE. '
DUE TO THE PECULIARITY OF SAMPLING ROUTINE, # RANDOM#S TO BE GENERATED
HAS TO BE AN EVEN * (CEILING EVEN # OF ^PERIODS).
USE EXEXG() & EXEX() ARRAYS (FROM THE CALLING ROUTINE) FOR COUNTING
IEXCEEDANCES TO CONSERVE MEM SPACE
NRAND = 24/IAVPER * 366
DO 110 IG = 1, NSG
DO 111 IR = 1, NREC
EXEXG 1R.IG) = 0.
POVG(IR.IG) = 0.
EXGRP IR.IG) = 0.
1 CONTINUE
EEMAXG(IG) = 0.
MPOVG(IG) = 0.
110 CONTINUE
DO 120 IR = 1, NREC
EXEX(IR) = 0.
POV(IR) = 0.
SPOV(IR) = 0.
SEX IR) = 0.
GREX(IR) = 0.
120 CONTINUE
EEMAX = 0.
MPOV = 0.
SMPOV = 0.
PREPARE INDEXES OF NEEDED CONC DATA
IBSAV = ISAVYR(IYR-l) + 1
IESAV = ISAVYR(IYR)
IBPAGE = (IBSAV + MSAV-1) / MSAV
IEPAGE = (IESAV + MSAV-1) / MSAV
MONTE-CARLO SIMULATIONS LOOP
DO 200 ISIM = 1, NSIM
GENERATE RANDOM#S FOR EACH PERIOD & SOURCE-GROUP.
F_ini
-------
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
1 C A C
3546
3547
3548
3549
3550
3551
3552
3553
3554
J
-------
Page 64
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
"3 £ A 1
J04 1
3642
3643
3644
3645
3646
3647
3648
C
c
C
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
DO 412 IR = l.NR
DO 413 IG = l.NG
IF(EXGRP(IR,IG) .GE.VIOL)POVG(IR.IG) = POVG( I R, I G)+l
EXGRP(IR.IG) = 0.
413 CONTINUE
IF (SEX(IR) .GE. VIOL) SPOV(IR) = SPOV(IR) + 1.
1F( GREX(IR) + SEX IR )).GE. VIOL) POV(IR = POV IR)| + 1.
SEX(IR) = 0.
GREX IR) = 0.
412 CONTINUE ,
1
200 CONTINUE
CALC EX-EX AND POVS BY GROUP & FOR ALL SOURCES, AND FIND THE MAXS
AND SYNERGISTIC EXCEEDANCES
DO 500 IR = 1, NREC
BY SOURCE-GROUP
DO 510 IG = 1, NSG
EXEXG IR.IG) = EXEXG(IR.IG) / NSIM
POVGMR.IG) = POVGMR.IG) / NSIM
IF (EXEXG(IR.IG) .GT. EEMAXG(IG)) EEMAXG(IG) = EXEXG(IR.IG)
IF (POVG(IR.IG) .GT. MPOVG(IG)) MPOVG(IG) = POVG(IR.IG)
510 CONTINUE
FOR ALL SOURCES
EXEX(IR) = EXEX(IR) / NSIM
POV(IR) = POV(IR) / NSIM
SPOV(IR) = SPOV(IR) / NSIM
IF EXEX(IR) .GT. EEMAX) EEMAX = EXEX(IR)
IF (POV(IR) .GT. MPOV) MPOV = POV(IR)
IF (SPOV(IR) .GT. SMPOV) SMPOV = SPOV(IR)
500 CONTINUE
RETURN
END
CDECK XX23PV
c
c~
c
c
c
c
CMDD YY9TDW
oUbK AA^JrV
CALC EX-EX FOR MODELS 5 AND 6, USING MONTE-CARLO SIMULATIONS.
CALCULATE FOR ONE SPECIFIED YEAR, OR FOR ALL YEARS.
SUBROUTINE XX23PV ( FUBUF ,MODE , I YR , GM , GSD , NR , EXEX , POV ,
.EEMAX, MPOV)
F-103
-------
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
C
C
£
L
c
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
C!
c.
c
c
c
SDMF i nrAi uARiflRiF<;
juriL L. u un 1_ VnlxlMDLLj
FUBUF I TEMPFILE FOR SAVED CONC DATA
IYR I THE YEAR TO CALC EX-EX FOR
NR I RECEPTORS .
EXEX(NR) R EXEX ARRAY TO HOLD RESULT
EEMAX R EXEX MAX
POV(NR) R POV ARRAY TO HOLD RESULT ,
MPOV R POV MAX '
GM.GSD R GM AND GSD FOR LOGNORMAL SUBROUTINE
ISEX(MREC) R INTERMEDIATE SUM OF EXCEEDANCES
NRAND I t RANDOMS TO GENERATE FOR THE YEAR
1 PER PERIOD BUT MUST BE EVEN
MODE*3 C FLAG FOR 1 OR ALL YEARS
RAND(8784,MGRP) R RANDOM'S, EVENLY DISTRIBUTED 0-1
QRAND(8784,MGRP R RANDOMIZED EMISS-RATES
INTEGER FUBUF
INTEGER IYR
INTEGER NR
REAL EXEX(NR)
REAL EEMAX
REAL POV(NR)
REAL MPOV
REAL GM.GSD
..SINSERT EXEXS.INS
INTEGER MS I M, MSRC, MGRP.M YE AR.MREC.MQ, MITER, MBSAV
PARAMETER (MS IM=1999 ,MSRC = 6 ,MGRP = 6 ,MYEAR = 6,MREC = 200,MQ = 20 ,
& MITER=99,MBSAV=4095,VIOL=2.)
CHARACTER TITLE*80,SNAME (MSRC)*20
INTEGER NSIM,NSRC,NREC,NXREC,1AVPER,LGRID,LYRLY,NYEAR,
& lYEAR(MYEAR) , ISRC(MSRC) , I GRP (MSRC) , I VARY , NQ1 ,
& POVFLAG.OUTOPT
REAL CSTD, C B ACK, QGM ( MQ ), GS DCUT (MSRC), TARGET, EPS, Q1BEG.Q1 END,
& Q2MIN,Q2MAX,RHO(M$RC),QGSD(MQ)
INTEGER MODEL,NSG,ISG(MGRP) ,NTP,MSAV
REAL CCUTMX,QCUT(MGRP),CZERO
COMMON /PARAM/
TITLE, SNAME,
NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,IYEAR,ISRC,
IGRP.IVARY.NQ1,
CSTD,CBACK,QGM,QGSD,GSDCUT,TARGET,EPS,Q1BEG,Q1END,Q2MIN,
Q2MAX,
MODEL,NSG,ISG,NTP,MSAV, CCUTMX ,QCUT , CZERO , RHO ,POVFLAG ,
OUTOPT
INTEGER NDATYR(MYEAR) , ISAVYR(0 : MYEAR) , NSAVE , NPAGE , NSAV , 10PAGE
INTEGER*2 I PERS (MBSAV) , I RECS (MBSAV)
REAL CONCS MBSAV)
COMMON /STORE1/ NDATYR , ISAVYR, NSAVE , NPAGE , NSAV , I OPAGE
F-104
-------
Page 66
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
J / *i U
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
^757
J / J 1
3758
3759
3760
3761
3762
C
C
r
\f
C
C
f*
C
c
c
c
c
c
c
c
c
p
c
c
c
Q
c
p
c
c
c
c
COMMON /STORE2/ IPERS.IRECS, CONCS
REAL ISEX(MREC)
INTEGER NRAND
CHARACTER MODE*3
REAL 1
. RAND(8784,MGRP) ,
. QRANO(8784,MGRP)
RF IKF /flVFRI AY MFM TO fflN^FRVF '
r\tU*JL/UVLI*L"l rlLFl 1 U L.UI»«JLF\VL
PUT INTO COMMON 'CAUSE IT'S TOO BIG
EQUIVALENCE (RAND.QRAND)
COMMON // QRAND
INITIALIZE.
DUE TO THE PECULIARITY OF SAMPLING ROUTINE, # RANDOMIS TO BE GENERATED
HAS TO BE AN EVEN 1 (CEILING EVEN # OF ^PERIODS).
USE EXEXGM & EXEX() ARRAYS (FROM THE CALLING ROUTINE) FOR COUNTING
IEXCEEDANCES TO CONSERVE MEM SPACE
PRINT ' (IX, A) ' , 'XX23PV
NRAND = 24/IAVPER * 366
DO 111 IR = 1, NREC
EXEX( IR) = 0.
POV(JR) = 0.
ISEX(IR) = 0.
Ill CONTINUE
EEMAX = 0.
MPOV = 0.
PREPARE INDEXES, WHETHER TO PROCESS ALL OR JUST ONE YEAR'S DATA
IF (MODE .EQ. '1YR') THEN
IBSAV = ISAVYR(IYR-l) + 1
IESAV = ISAVYR(HR)
ELSEIF (MODE .EQ. 'ALL') THEN
IBSAV = 1
IESAV = NSAVE
ELSE
CALL ERROR (1, 14, MODE.O.)
ENDIF
IBPAGE = (IBSAV + MSAV-1) / MSAV
IEPAGE = (IESAV + MSAV-1) / MSAV
MONTE-CARLO SIMULATIONS LOOP
DO 200 ISIM = 1, NSIM
F-105
-------
** / V «* f 1*
3764) C
3765'
3766'
3767'
3768
3769
3770
3771
3772
1777
J / / J
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3700
j / .7 u
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3 Q 1 C
JO 1 D
3816
3817
3818
1R1 Q
C
C
C
C
C
C
r
\*
C
C
C
C
C
C
C
C
C
r
u
C
C
C
C
C
r
L
C
C
r
GENERATE RANDOM EMISSION RATES WITH RANDOM IS
AND LOGNORMAL SAMPLING ROUTINE.
YOU MAY REPLACE THE SAMPLING ROUTINE WITH YOUR OWN IF YOU
WISH, BUT NOTE RAND() & QRAND() ARE EQU I VALENCED !
i
CALL RANDNO (NRAND,RAND(1 , 1 ) )
CALL S AMPLE (N RAND, RAND ( 1,1 ) ,GM,GSD,RHO( 1 ) ,1 ,QCUT( 1 ) .QRAND (1,1))
. 1
LOOP OVER DATA STORED FOR THE YEAR,
MAKE SAMPLE CONCENTRATIONS AND COUNT EXCEEDANCES, BY GROUP & FOR
ALL SOURCES.
PAGE DATA IN FROM TEMPFILE AS NECCESSARY.
DO 400 IPAGE = IBPAGE, IEPAGE
HAVE TO PAGE DATA IN
IF (IPAGE .NE. 10PAGE) THEN
READ (FUBUF,REC=IPAGE) IPERS I ,I=1,MSAV),
IRECS I ,I=1,MSAV ,
CONCS I ,I=1,MSAV)
IOPAGE = IPAGE
ENDIF
1 DfATF RFRINNTNG & FNDINfi f)F
. LU^MIC. DtuinillliU Qt L 11 U 1 IT U U r
WANTED DATA IN THIS PAGE
THEN, WE CAN ACCESS THEM
IBDAT = 1
IEDAT = MSAV
IF (IPAGE .EQ. IBPAGE) IBDAT = IBSAV - ( I PAGE-1 )*MSAV
IF (IPAGE .EQ. IEPAGE) IEDAT = IESAV - ( I PAGE-1 )*MSAV
DO 410 IDAT = IBDAT, IEDAT, NSG
IP = IPERS(IDAT)
IR = IRECS(IDAT
CT = 0.
CT = CONCS(IDAT) * QRAND(IP.l)
IF (CT .GE. CSTD) THEN
EXEX(IR) = EXEX(IR) + 1.
ISEX(IR) = ISEX(IR) + 1.
ENDIF
410 CONTINUE
400 CONTINUE
DO 412 IR = 1, NREC
IF (ISEX(IR) .GE. VIOL) POV(IR) = POV(IR) + 1
ISEX(IR) = 0.
412 CONTINUE
200 CONTINUE
F-106
-------
Page 68
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3842
3843
3844
3845
3846
3847
3848
384Q
J O M -7
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
C
C
C
C
C
C
C
CALC POV FOR ALL SOURCES, AND FIND THE MAXS
DO 500 IR = 1, NREC
EXEX(IR) = EXEX( IR) / NSIM
POV IR) = POV(IR) / NSIM 1
IF EXEX(IR) .GT. EEMAX) EEMAX = EXEX(IR)
IF POV(IR) .GT. MPOV) MPOV = POV(IR)
500 CONTINUE '
RETURN
END
CDECK HEADER
C
r-
u
C
C
C
C
C
C
Q
C
C
C
p
C
C!
C .
C
Q
- - <;ilRD MFADFD - - -
WRITE PAGE HEADERS FOR MODEL RESULTS.
SUBROUTINE HEADER (FUPRT)
^OMF 1 OCAI VAR1ARI FS
JUP1L l_ U C fi l_ VfArVIrlOLUJ
FUPRT I PRINTFILE FILEUNIT
INTEGER FUPRT
..$INSERT EXEXS. INS
INTEGER MS IM, MSRC, MGRP,M YEAR, MREC.MQ, MITER, MBS AV
PARAMETER (MS I M = 1999 ,MSRC = 6 ,MGRP = 6 ,MYEAR = 6 ,MREC = 200 ,MQ = 20 ,
& MITER=99,MBSAV=4095,VIOL=2.)
CHARACTER T I TL E*80 , SNAME ( MSRC) *20
INTEGER NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,
& lYEAR(MYEAR) , ISRC(MSRC) , I GRP (MSRC , IVARY.NQ1,
& POVFLAG.OUTOPT
REAL CSTD,CBACK,QGM(MQ),GSDCUT(MSRC) .TARGET, EPS ,Q1 BEG ,Q1 END ,
& Q2MIN,Q2MAX,RHO(MS'RC),QGSD(MQ)
INTEGER MODEL,NSG,ISG(MGRP),NTP,MSAV
REAL CCUTMX,QCUT(MGRP),CZERO
COMMON /PARAM/
TITLE, SNAME,
NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,IYEAR,ISRC,
IGRP.IVARY.NQl,
CSTD,CBACK,QGM,QGSD,GSDCUT, TARGET, EPS , Ql BEG , Ql END , Q2M I N ,
Q2MAX,
-------
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
«j u y tJ
3896
3897
3898
3899
3900
3901
J y \j L
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
T (\ O A
39<:')
3925
3926
3927
3928
3929
3930
3931
3932
3933
C
c
C
c
c
c
c
c
c
c
CDECK
C
C -.
C
C WRI
C
C
C
C
C
C
MODEL, NSG.ISG.NTP.MSAV, CCUTMX .QCUT.CZERO, RHO .POVFLAG ,
OUTOPT
INTEGER NDATYRj(MYEAR),ISAVYR(0:MYEAR),NSAVE,NPAGE,NSAV,IOPAGE
INTEGER*2 IPERS(MBSAV) , IRECS(MBSAV)
REAL CONCS MBSAV)
COMMON /STORE1/ NDATYR, ISAVYR.NSAVE .NPAGE ,NSAV, IOPAGE !
COMMON /STORE2/ IPERS.IRECS, CONCS
CHARACTER STR(6)*48 ,
DATA STR /
--- MULTI SOURCE-GROUPS EXEX MODEL OUTPUT ,
--- SINGLE SOURCE-GROUP EXEX MODEL OUTPUT ,
ONE SOURCE-GROUP ITERATIVE EXEX MODEL OUTPUT
--- MULTI SOURCE-GROUPS POV MODEL OUTPUT '
--- SINGLE SOURCE-GROUP POV MODEL OUTPUT '
ONE SOURCE-GROUP ITERATIVE POV MODEL OUTPUT '/
PRINT '(IX, A)1, 'HEADER'
WRITE (FUPRT,'(1H1//3A// IX, A/ A.F7 .2.A.F7.2.A, 13, A, 12, A) ' )
' i STRfMODFIl
1 1
TITLE,
' STANDARD CONC ' , CSTD*1 . E6 + CBACK , ' UG/M3, BACKGROUND CONC ',
CBACK,' UG/M3, ',NREC,' RECEPTORS, AVERAGING PERIOD '.IAVPER,
'-HOUR'
IF (MODEL .EQ. 3) THEN
WRITE (FUPRT,'(A,F6.3,A,F8.4)')
1 TARGET MAX EXPECTED EXCEEDANCE (MEE) IS ', TARGET,' +/- '.EPS
ENDIF
IF (LGRID .GE. 1) THEN
WRITE (FUPRT,1 (A)1)
' * (ASTERISK) IN TABLE INDICATES THE MAX.'
ENDIF
RETURN
END
HEADPV
iubK HtHUrv - - -
TE PAGE HEADERS FOR POV MODEL RESULTS.
SUBROUTINE HEADPV (FUPRT)
SOME LOCAL VARIABLES
-------
Page 7
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
TQ7fi
J j 1 O
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
C
C
c
C
C!
C.
C
C
C
C
c
p
c
c
c
FUPRT
I PRINTFILE FILEUNIT
INTEGER FUPRT
.S1NSERT EXEXS.INS I
INTEGER MSIM,MSRC,MGRP,MYEAR,MREC,MQ,MITER,MBSAV
PARAMETER (MSIM=1999,MSRC=6,MGRP=6,MYEAR=6,MREC=200,MQp20,
& MITER=99,MBSAV=4095,VIOL=2.) '
CHARACTER TITLE*80,SNAME(MSRC)*20
INTEGER NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,
& IYEAR(MYEAR),ISRC(MSRC).IGRP(MSRC),IVARY.NQ1,
& POVFLAG.OUTOPT
REAL CSTD,CBACK,QGM(MQ),GSDCUT(MSRC).TARGET,EPS,Q1BEG,Q1END ,
& Q2MIN,Q2MAX,RHO(MSRC),QGSD(MQ)
INTEGER MODEL,NSG,ISG(MGRP),NTP,MSAV
REAL CCUTMX,QCUT(MGRP),CZERO
COMMON /PARAM/
TITLE,SNAME,
NSIM,NSRC,NREC,NXREC,IAVPER,LGRID,LYRLY,NYEAR,IYEAR,ISRC,
IGRP.IVARY.NQl,
CSTD,CBACK,QGM,QGSD,GSDCUT,TARGET,EPS,Q1BEG,Q1END,Q2MIN,
Q2MAX,
MODEL,NSG.ISG.NTP.MSAV, CCUTMX,QCUT.CZERO,RHO,POVFLAG ,
OUTOPT
INTEGER NDATYR(MYEAR),1SAVYR(0:MYEAR),NSAVE,NPAGE,NSAV,IOPAGE
INTEGER*2 IPERS(MBSAV),IRECS(MBSAV)
REAL CONCS(MBSAV)
COMMON /STORE1/ NDATYR,ISAVYR,NSAVE,NPAGE,NSAV,IOPAGE
COMMON /STORE2/ IPERS.IRECS, CONCS
CHARACTER STR(6)*48
DATA STR /
'--. MULTI SOURCE-GROUPS EXEX MODEL OUTPUT ---
'--- SINGLE SOURCE-GROUP EXEX MODEL OUTPUT ---
1 ONE SOURCE-GROUP ITERATIVE EXEX MODEL OUTPUT
'-.. MULTI SOURCE-GROUPS POV MODEL OUTPUT
'--- SINGLE SOURCE-GROUP POV MODEL OUTPUT
1 ONE SOURCE-GROUP ITERATIVE POV MODEL OUTPUT '/
PRINT '(IX,A)1, 'HEADPV
WRITE (FUPRT,'(1H1//3A// IX,A/ A.F7.2,A.F7.2,A,I 3,A,12,A)')
, | I.STR(MODEL),
\ TITLE,
. ' STANDARD CONC ' , CSTD*1.E6+CBACK. ' UG/M3, BACKGROUND CONC ,
, CBACK,1 UG/M3. '.NREC,1 RECEPTORS, AVERAGING PERIOD '.IAVPER.
'-HOUR'
IF (MODEL .EQ. 6) THEN
-------
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4fif)7
M U U /
4008
4009
4010
4011
4012
4013
4014
4015
T \J 1 fJ
4016
4017
4018
4019
4020
4021
4022
4023
40?4
" \J I* "
4025
4026
4027
4028
4029
4030
4031
4032
dfm
H U O J
4034
4035
4036
4037
4038
4039
4040
4041
4042
4041
H U M O
4044
4045
4046
4047
C
C
C
WRITE (FUPRT,'(A,F6.3,A,F8.4)')
1 TARGET MAX PROBABILITY OF VIOLATION IS ', TARGET,1 +/- '.EPS
ENDIF
IF (LGRID .GE. 1) THEN
WRITE (FUPRT, '(A)')
1 * (ASTERISK) IN TABLE INDICATES THE MAX.1 I
ENDIF
i
RETURN '
END
CDECK WREXEX
C
r-
L> ~"
C
C
C
C
C
C
c
C
C
C
C
C
C
C
C
r
C
C
r
L*
C
C
C
C
r
u
C
C
C
SIIRDURFXFX - - - ____ ___
OUTPUT EXEX RESULT (AS TABLE OR A VALUE).
SUBROUTINE WREXEX (FUPRT, I YR, IGRP, LGRID, NREC.NX , EXEX, EEMAX)
SOMF 1 flCAl VARIARIF5;
*}UrlL. L U W rA l_ Vrll\lrADL.L-J
FUPRT I PRINTFILE FILEUNIT
IYR.IGRP I THE YEAR & SOURCE-GROUP OF THE EXEX
LGRID I FLAG TO GRID OR NOT & WHAT KINO
NREC.NX I RECEPTORS & X-OEMENSION OF EXEX TABLE
EXEX(NREC) R THE EXEX ARRAY
EEMAX R THE EXEX MAX
INTEGER FUPRT
INTEGER IYR.IGRP
INTEGER LGRID
INTEGER NREC.NX
REAL EXEX(NREC)
REAL EEMAX
PRECEED OUTPUT WITH APPROPRIATE BLANK LINES
IF (LGRID .GT. 0) THEN
IF (IYR .GE. 0) WRITE (FUPRT, '(/)')
ELSE
IF (IGRP .LE. 1) WRITE (FUPRT, '()')
ENDIF
PRINT '(IX, A)1, 'WREXEX1
OUTPUT EXEX MAX FOR ALL CASES
-------
Page 72
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
A no 1
s uy i
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
C
C
C
C
C
c
C
C AND
C DON
C
C
C
C
c
CDECK
C
p
C
IF (IYR .GT. 0) THEN
IF (IGRP .GT. 0) THEN
WRITE (FUPRT,'(A,I4,A,I2,A,1P,E10.4)')
1 YEAR MYR,1 SOURCE-GROUP ',IGRP,' MEE = ', EEMAX
ELSE ,
WRITE (FUPRT, '(A, 14, A, IP, E10. 4)')
1 YEAR ',IYR,' ALL SOURCES MEE = ', EEMAX
ENDIF
1
ELSE
IF (IGRP .GT. 0) THEN
WRITE (FUPRT, ' (A,I2,A,1P,E10.4) ' )
1 ALL YEARS SOURCE-GROUP '.IGRP,1 MEE = ', EEMAX
ELSE
WRITE (FUPRT, ' (A.1P.E10.4) )
1 ALL YEARS ALL SOURCES MEE = ', EEMAX
ENDIF
ENDIF
OUTPUT TABLE OF EXEX BY RECEPTOR ONLY IF REQUESTED
'T FORGET TO CHECK IF THERE IS ANY EXEX
IF (LGRID .GT. 0) THEN
IF (EEMAX .LE. 0.) THEN
WRITE (FUPRT, '(A)1) ' NO EXPECTED EXCEEDANCE.'
ELSE
WRITE (FUPRT, ' (A) ' ) ' EXPECTED EXCEEDANCES BY RECEPTOR ARE1
CALL WRGR1D (FUPRT, LGRID, NREC , NX , EXEX , EEMAX )
ENDIF
ENDIF
RETURN
END
WRPOV
CMRD LJDPnW
j U D K WKrUV
C OUTPUT EXEX AND OR POV RESULTS (AS TABLE OR A VALUE).
C
c
c
c
c
c
c
c
Q
c
SUBROUTINE WRPOV ( FUPRT , I YR , I GRP , LGR I D , NREC , NX ,POV ,MPOV)
SOME LOCAL VARIABLES
FUPRT I PRINTFILE FILEUNIT
IYR, IGRP I THE YEAR & SOURCE-GROUP OF THE EXEX
LGRID I FLAG TO GRID OR NOT & WHAT KIND
NREC, NX 1 RECEPTORS & X-DEMENSION OF EXEX TABLE
-------
4105,
4106
4107'
4108'
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
A 1 *;/!
*i i j *i
4155
4156
4157
4158
4159
4160
4161
C
C
C
c
C
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
r
I*
c
c
c
c
POV(NREC) R ARRAY OF POVS
MPOV R MAX POV
INTEGER FUPRT
INTEGER IYR, IGRP ,
INTEGER LGRID '
INTEGER NREC,NX
REAL POV(NREC)
REAL MPOV 1
PRECEED OUTPUT WITH APPROPRIATE BLANK LINES
IF (LGRID .GT. 0) THEN
IF (IYR .GE. 0) WRITE (FUPRT, '(/)')
ELSE
IF (IGRP .LE. 1) WRITE (FUPRT, '()')
ENDIF
PRINT '(IX, A)1, 'WRPOV
OUTPUT POV MAXS FOR ALL CASES
IF (IYR .GT. 0) THEN
IF (IGRP .GT. 0) THEN
WRITE (FUPRT, '(A, 14, A, 12, A, IP, E10. 4)')
1 YEAR '.IYR,1 SOURCE-GROUP ',IGRP,' MPOV = ' ,MPOV
ELSE
WRITE (FUPRT, ' (A, 14, A, IP, E10. 4)')
1 YEAR MYR,1 ALL SOURCES MPOV = ' ,MPOV
ENDIF
ELSE
IF (IGRP .GT. 0) THEN
WRITE (FUPRT,1 (A, 12, A, IP, E10. 4) )
1 ALL YEARS SOURCE-GROUP ',IGRP,' MPOV = .MPOV
ELSE
WRITE (FUPRT,' (A,1P,E10.4) ')
1 ALL YEARS ALL SOURCES MPOV = ' ,MPOV
ENDIF
ENDIF
AND OUTPUT TABLE OF EXEX BY RECEPTOR ONLY IF REQUESTED
DON'T FORGET TO CHECK IF THERE IS ANY EXEX
IF (LGRID .GT. 0) THEN
IF (MPOV .LE. 0.) THEN
WRITE (FUPRT, ' (A) ' ) ' ZERO PROBABILITY OF VIOLATION.'
-------
Page 7-
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
*1 i. J J
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
r
U
C
C
C
C
C
p
c
C
c
c
c
c
ELSE
WRITE(FUPRT,'(A)')' PROBABILITY OF VIOLATION BY RECEPTOR:
CALL WRGRID (FUPRT, LGRID, NREC,NX,POV,MPOV)
ENDIF
ENDIF
RETURN
END
CDECK WRSPOV
C
C==== SUBR WRSPOV ===============================================
C
C OUTPUT SPOV RESULTS (AS TABLE OR A VALUE).
SUBROUTINE WRSPOV(FUPRT,IYR,IGRP,LGRI0,NREC,NX,SPOV,SMPOV)
SOME LOCAL VARIABLES
FUPRt
lYR.tGRP
LGRID
NREC,NX
SPOV(NREC)
SMPOV
PRINTFILE F1LEUNIT
THE YEAR & SOURCE-GROUP OF THE EXEX
FLAG TO GRID OR NOT & WHAT KIND
RECEPTORS & X-DEMENSION OF EXEX TABLE
* ARRAY OF SPOVS
* MAX SPOV
INTEGER
INTEGER
INTEGER
INTEGER
REAL
REAL
FUPRT
IYR.IGRP
LGRID
NREC,NX
SPOV(NREC)
SMPOV
C PRECEED OUTPUT WITH APPROPRIATE BLANK LINES
IF (LGRID .GT. 0) THEN
IF (IYR .GE. 0) WRITE (FUPRT, (/)')
ELSE
IF (1GRP .LE. 1) WRITE (FUPRT,'()')
ENDIF
PRINT '(IX,A)', 'WRSPOV
C OUTPUT SPOV MAXS FOR ALL CASES
IF (IYR .GT. 0) THEN
-------
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4273
4274
4275
C
C
c
c
c
c
c
c
c
AND
DON
CDECK
C
C
C
C
C
C
C
C
C
C
C
C
C
C
c
c
c
c
c
c
c
c
r
i~
C
= = = =
WRI
AND
USE
1
2
ELSE
WRITE (FUPRT,'(A,I4,A,1P,E10.4)')
1 YEAR '.IYR,1 SMPOV = ',SMPOV
ENDIF
WRITE (FUPRT,'(A,IP,E10.4V)
1 ALL YEARS SMPOV = ',SMPOV
OUTPUT TABLE OF EXEX BY RECEPTOR ONLY IF REQUESTED '
'T FORGET TO CHECK IF THERE IS ANY EXEX
IF (LGRID .GT. 0) THEN
IF (SMPOV .LE. 0.) THEN
WRITE (FUPRT,1(A)')'ZERO PROBABILITY OF SYNERGISTIC VIOLATION.1
WRITE(FUPRT,'(2A)') ' PROBABILITY OF SYNERGISTIC VIOLATION1,
. ' BY RECEPTOR:'
CALL WRGRID (FUPRT, LGRID, NREC,NX,SPOV,SMPOV)
ENDIF
ENDIF
RETURN
END
C==== SUBR WRGRID ================================================
WRITE VALUES OF ARRAY IN ONE OF THE GRIDDED OR TABULAR FORMAT.
A '*' WILL BE PRINTED ALONG THE ENTRIES WITH VALUE >= VFLAG,
USER CHOOSE THE FORMAT OF OUTPUT THROUGH MODE:
1 = POLAR GRID OF NX RADII
= TABULAR GRID OF NX VALUES PER ROW, WHERE NX=10
SUBROUTINE WRGRID (FUPRT, MODE, NXY,NX ,ARR,VFLAG)
SOME LOCAL VARIABLES
FUPRT I PRINTFILE FILEUNIT
MODE I THE FORMAT OF OUTPUT TABLE
NXY,NX I VALUES IN ARRAY & RADII OR COLUMNS
ARR(NXY) R THE VALUES ARRAY
VFLAG R VALUE AT/ABOVE WHICH '*' IS PRINTED
FLAG(MX) C '*' FLAGS FOR VFLAG ENTRIES
INTEGER
INTEGER
FUPRT
MODE
-------
Page 76
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
C
C
c
C
C
C
C
C
C
c
c
c
c
c
c
c
c
c
c
c
c
c
INTEGER NXY, NX
REAL ARR(NXY)
REAL VFLAG
PARAMETER (MX=36)
CHARACTER FLAG(MX)
1
CHECK DIMENSIONS AND PREPARE ,
1
IF (NX .GT. MX) STOP 'WRGRID: NX > MAX'
IF (MODE .EQ. 1) THEN
NCOL = NX
ELSEIF (MODE .EQ. 2) THEN
NCOL = 10
ELSE
PRINT '(IX, A) , 'WRGRID: INVALID MODE'
RETURN
ENDIF
LOOP BY THE ROWS
IF (MODE .EQ. 2) WRITE (FUPRT, (/Tl 1 , 10 ( 5X , I 2 , 3X ) / ) ) (I, 1=1, NCOL)
DO 100 J = 1, (NXY+NCOL-1)/NCOL
IBEG = (J-l) * NCOL
IF (IBEG+NCOL .LE. NXY) THEN
NC = NCOL
ELSE
NC = NXY - IBEG
ENDIF
SET FLAGS OF '*' FOR ARRAY VALUES >= VFLAG
DO 110 I = 1, NC
IF (ARRMBEG+I) .LT. VFLAG) THEN
FLAG(I) = ' '
ELSE
FLAG(I) = '*'
ENDIF
110 CONTINUE
THEN WRITE THIS ROW OF THE GRID
IF (MODE .EQ. 1) THEN
WRITE (FUPRT,' (/A7 , 1 2 , (Tl 1 , 12(3X , Al , F6 . 2) ) ) ')
'RING'.J, (FLAG ( I ) ,ARR( IBEG+I ), 1 = 1, NC)
ELSE
WRITE (FUPRT, ( 1 X , I 6 , 3X , 10 ( 3X , Al , F6 . 2 ) ) )
-------
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4"i4fi
T J T U
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4168
M J \J O
4369
4370
4371
4372
4373
4374
4375
4376
& ^ 7 7
*? J / /
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
c
c
100
c
c
COECK
C
c==-=
^,
c
C TAKE
(J-1)*NCOL, (FLAG(I).ARR(IBEG-H), 1=1, NC)
E N D I F
CONTINUE
1
RETURN
END
I
1
ERROR
CHRD FRRflR - -- - -
CARE OF ERRORS & WARNINGS.
C MESSAGES ARE OUTPUT TO THE FILEUNIT AND/OR TERMINAL.
C YOU
C
C
C
C
c
C
c
c
c
c
c
c
r _
C
C
,
C
c
r
C
10
c
20
C
30
CAN PASS 2 ARGUMENTS FOR VARIOUS USES.
SUBROUTINE ERROR (FU, ICODE, IARG.RARG)
SfiMF 1 nfAl VARTARI FS
J U rl C. L. U L< n L. Vr\F\lttDL.LJ
FU I FILEUNIT TO WRITE MESSAGES TO
ICODE 1 THE ERROR CODE
IARG I GENERAL PURPOSE INTEGER ARG
RARG R " " REAL "
INTEGER FU
INTEGER ICODE
INTEGER IARG
REAL RARG
GOTO ( 10, 20, 30, 40, 50, 60, 70, 80, 90,100,
110,120,130,140,150,160,170,180,190,200,210) ICODE
PRINT '(IX, A)', 'ERROR: NO SUCH ERROR CODE, ICODE =', ICODE
RETURN
WRITE (FU,'(/A,I5) ')
' ERROR! MAX ^SIMULATIONS IS MSIM=',IARG
PRINT '(IX, A)1 ,'GETINP: NSIM > MAX1
STOP
WRITE (FU, '(/A, 15)')
1 ERROR! MAX i EMISSION SOURCES is MSRC=-,IARG
PRINT '(IX, A)1 ,'GETINP: NSRC > MAX '
STOP
WRITE (FU,'(/A)')
F-116
-------
Page 78
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
1 ERROR! ALLOWED AVERAGING-PERIODS ARE 1 OR 24-HOUR1
PRINT ' (IX, A) ' , 'GETINP: IAVPER IS INVALID'
STOP
C
40 WRITE (FU,'(/A) )
. ' ERROR! OPTIONS TO PRINT EX-EX AND/OR POV ARE:
. LGRID=0,1,2,3,4,5' .
PRINT ' (IX, A) ', 'GETINP: LGRID IS INVALID1
STOP
C
50 WRITE (FU,1 (/A) ' ) '
. ' ERROR! OPTIONS TO PRINT YEARLY OUTPUT ARE LYRLY=0,1'
PRINT ' (IX, A) ', 'GETINP: LYRLY IS INVALID1
STOP
C
60 WRITE (FU,'(/A,I5) ')
1 ERROR! MAX #YEARS (IDATAFILES) IS MYEAR=',IARG
PRINT ' (IX, A) ', 'GETINP: NYEAR > MAX1
STOP
C
70 WRITE (FU, ' (/A) )
. ' ERROR! OPTIONS TO VARY QGM TO FIND QGSD OR VICE-VERSA ARE'//
. ' LVARY=1,2'
PRINT ' (IX, A) ', 'GETINP: IVARY IS INVALID1
STOP
C
80 WRITE (FU,'(/A,I5)')
. ' ERROR! MAX #STEPS (OF VARYING) QGM OR QGSD IS MQ=',IARG
PRINT ' (IX, A) ', 'GETINP: NQ1 > MAX1
STOP
C
90 WRITE (FU,'(/A,I5) ')
. ' ERROR! MAX PRECEPTORS IS MREC=',IARG
PRINT ' (IX, A) ', 'GETINP: NREC (FROM DATAFILE) > MAX1
STOP
C
100 WRITE (FU,'(/A,I2) ')
. ' ERROR! ^PERIODS DOES NOT MATCH THE YEAR IN DATAFILE ,IARG
PRINT ' (IX, A)' , 'CHKDAT: PERIODS IN DATAFILE DOES NOT MATCH1,
& ' THE YEAR'
STOP
C
110 WRITE (FU,'(/A,I2)')
1 ERROR! THE YEAR IN INPUT DOES NOT MATCH DATA IN FILE',IARG
PRINT ' (IX, A) ' , 'CHKDAT: YEAR IN USER INPUT <> YEAR IN DATAFILE'
STOP
C
120 WRITE (FU,'(A)')
. ' ERROR! VALID RECEPTOR GRID TYPES ARE 1 & 2'
PRINT ' (IX, A) ', 'CHKDAT: INVALID RECEPTOR GRID TYPE IN DATAFILE'
STOP
£
130 WRITE (FU.'t/A.IS.A)1)
. ' ERROR! #CONC DATA TO BE STORED & PROCESSED EXCE ED ' , I ARG ,
' (THE MAX THIS PROGRAM CAN HANDLE)'
PRINT ' (1X.A) ' , 'DATA1.DATA23: SAVE-BUFFERS OVERFLOW'
STOP
-------
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
140 WRITE (FU,'(A.A4)' )
. 'HUH? YOU HAVEN''T PROGRAMMED ME WITH MODE '.IARG
PRINT '(IX,A)','EXEX23: INVALID MODE'
STOP
150 WRITE (FU,'(A,I4)') I
. ' WARNING! THE MAX # CONVERGING ITERATIONS ALLOWED TO'//
. ' ESTIMATE TARGET IS1,IARG
RETURN ,
160 WRITE (FU,'(/A)')
. ' ERROR! COAL SULFUR CONTENT GM MUST BE >
PRINT '(IX,A)','GETINP,SETUP: QGM <= 0.0'
STOP
0.0'
170 WRITE (FU,1(/A.F6.2)1)
. ' ERROR! COAL SULFUR CONTENT GSD MUST BE > 1.0 IS '.RARG
PRINT '(IX,A)1, 'GETINP,SETUP: QGSD <= 1.0'
STOP
180 WRITE (FU,'(/A,I4)')
. ' ERROR! THE HIGHEST SOURCE-GROUP* ALLOWED IS MGRP=',IARG
PRINT '(IX,A)', 'SETUP: IGROUP > MAX'
STOP
190 WRITE (FU,'(/A)')
. ' ERROR! COAL SULFUR CONTENT DATA WITHIN A SOURCE-GROUP ARE1//
INCONSISTENT1
&
PRINT '(IX,A)','SETUP: QGM,QGSD,GSDCUT WITHIN GROUP ARE '
' IMrnKK TSTFNT'
STOP
INCONSISTENT
200 WRITE (FU,'(/A/A/A,1P,E12.4)')
WARNING! CHI/Q MIN VALUE USED (BY PREPROCESSOR) TO SCREEN'//
THE CONC DATA IS > THE VALUE CALCULATED HERE.',
THIS MAY CAUSE UNDER ESTIMATION OF EXPECTED'//
EXCEEDANCES AND/OR POVS.1,
THE CALCULATED CHI/Q MIN VALUE IS CZERO=',RARG
RETURN
210 WRITE (FU,'(/A)')
. 'ERROR, VALID OUTOPT VALUES ARE 0,1,2'
PRINT '(IX,A)','GETINP - OUTOPT IS INVALID'
STOP
C
C
END
CDECK SAMPLE
C
C==== SUBR SAMPLE ======================================================
C
C FROM TILL E STOEKENIUS, 821021.
C BASED ON LOGNORY.FTN BY JOHN P NORDIN.
C COMPUTE AUTOCORRELATED RANDOM SAMPLE FROM A LOGNORMAL POPULATION.
C YOU MAY REPLACE THIS ROUTINE IF A DIFFERENT SAMPLE DISTRIBUTION IS
C DESIRED. BUT NOTE THAT RAND() & QRAND() ARE EQUIVALENCED!
F-118
-------
Page 80
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4S40
H J *1 v
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
C
C
C
C
C
C
C
C
C
C
C
C
C
c
C
C
c
C
C
C
C
C
r
U
C
C
C
C
c
c
c
C
SUBROUTINE SAMPLE (N.RAND, QGM ,QGSD , RHO , LCUT, QCUT, QRAND)
SOME LOCAL VARIABLES
1
N I SAMPLES (MUST BE AN EVEN )
RAND(N) R RANDOM 'S, UNIFORMLY DISTRIBUTED 0-1
QGM,QGSD,RHO R EMISS GM, GSD, AUTO-CORR COEF ,
LCUT I FLAG, WHETHER TO TRUNCATE VALUE BY QCUT
QCUT R ALLOWED MAX VALUE OF SAMPLE
QRAND(N) R RESULTED LOGNORMAL SAMPLES
PARAMETER ( P 1 = 3 . 141 5926536 )
INTEGER N
REAL RAND(N)
REAL QGM,QGSD,RHO
INTEGER LCUT
REAL QCUT
REAL QRAND(N)
INITIALIZE
ETRM1 = EXP (ALOG(QGSD)**2)
IF (ETRM1 .LT. 1.) ETRM1 = 1.
GSD = EXP (SQRT (ALOG (1 + ( 1+RHO) / ( 1 -RHO) * ( ETRM1 -1 ) ) ) )
GM = QGM * (1-RHO) * EXP ( ( ALOG(QGSD)**2-ALOG ( GSD)**2) /2)
Al = QGM
A2 = QGM
LOOP OVER THE RANDOM #'S, GENERATING 2 LOGNORMAL VALUES AT A TIME
DO 100 I = 1, N, 2
Wl = SQRT(-2*ALOG(RAND(1))) * COS ( 2*P I*RAND( 1+1 ) )
W2 = SQRT(-2*ALOG RAND(I))) * S I N (2*P I*RAND( 1+1 ) )
XI = GM * EXP (ALOG(GSD)*W1)
X2 = GM * EXP (ALOG(GSD)*W2)
Al = A2*RHO + XI
IF (LCUT.EQ.l .AND. Al.GT.QCUT) Al = QCUT
A2 = A1*RHO + X2
IF (LCUT.EQ.l .AND. A2.GT.QCUT) A2 = QCUT
QRAND(I) = Al
QRAND(I-t-l) = A2
100 CONTINUE
-------
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
Ct
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
RETURN
END
CDECK RANDNO
C
0==== SUBR RANDNO ============================================F======
SUBROUTINE RANDNO(NRANDS , RANDS)
JOHN P NORDIN, GARY W LUNDBERG '
NRANDS - INPUT - NUMBER OF RANDOM NUMBERS TO GENERATE.
RANDS - RETURNED - VECTOR OF REAL NUMBERS, UNIFORMLY
DISTRIBUTED BETWEEN 0 AND 1.
REAL*4 RANDS(NRANDS)
INTEGERM 1 , J ,KK ,M, KOUNT, REMDR
INTEGER R(128)
SAVE R
DATA R /31215,1416,28516, 13922, 1804, 37, 854, 30144, -26368, 1 19*0/
M = NRANDS/128
KOUNT = M*128
REMOR = NRANDS - KOUNT
IF (M .LT. 1) GO TO 33
DO 20 I = 1,M
KK = 128*(I-1)
CALL TAUS15(R)
DO 25 J = 1,128
RANDS(KK+J) = (l.+FLOAT(R(J)))/32768.
25 CONTINUE
20 CONTINUE
33 CALL TAUS15(R)
DO 30 I = l.REMDR
RANDS(KOUNT+I) =
30 CONTINUE
. +FLOAT( R( I ) ) ) /32768 .
..... WRITE OUT RANDOM NUMBER TABLE TO
VERIFY RESULTS ON A NEW MACHINE THEN REMOVE
CSAIC THE TEST LINES
CSAIC
CSAI
CSAI1000
CSAIC. . .
CSAIC
CSAIC
RETURN
END
SUBROUTINE TAUS15(R)
C JOHN P NORDIN, GARY W LUNDBERG
WRITE (12,1000) (RANDS(I),1=1,NRANDS)
FORMAT (5F12.8)
STOP 1
END OF TEST
F-120
-------
Page 82
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4fifiO
T U U U
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
dfi7 ?
T D / L.
4673
4674
C
C
C *
C
C
C *
C
C
C
C. . .
10
C. . .
20
C. . .
C
C **
C
C
C
C
C
C
C
C
C
C
C
C
C
30
C
re fl I r
v J r\ 1 c
CSAIC
CSAI
CSAIK
C . . .
40
c
r<; A i r
C O rt 1 C
CSAIC
CSAIC
INTEGER*4 I , NB , NN , R( 128) , ITEMP
** R(9) IS NEGATIVE ONLY ON FIRST CALL TO TAUS15 ***
IF (R(9) .LT. 0) GO TO 30
I
** MAIN RECURRENCE OVERWRITES R(H-128) ON R(I). TWO
LOOPS AND A STATEMENT ARE USED SO THAT NO SUBSCRIPT
EXCEEDS 128. ***
1
DO 10 I = 1,16
ITEMP = IEOR(R I + 1),R(H-112))
R(I) = XOR R(I),XOR(R(I+1),R(I+112)))
R(I) = IEOR(R( ), ITEMP)
CONTINUE
DO 20 I = 17,127
R(I) = XOR R(I),XOR(R(H-1),R(I-16)))
ITEMP = IEOR(R I+1),R(I-16))
R(I) = IEOR(R( ), ITEMP)
CONTINUE
R(128) = XOR(R(128),XOR(R(1),R(112)))
ITEMP = IEOR (R(l) ,R(112))
R(128) = IEOR (R(128) , ITEMP)
RETURN
* INITIALISING RECURRENCE (USED ONLY ON FIRST CALL)
IF R IS SET ON FIRST CALL OF TAUS15 TO:
31215, 1416,28516,13922, 1804, 37, 854,30144, -26368,119*0
AFTER FIRST CALL R(l) TO R(30) SHOULD BE:
31215, 1416,28516,13922, 1804, 37, 854,30144,27699, 824,
3046,28554, 3460, 388, 9346,29289,12977, 439,14752,24447,
21860,20839,21806,22474,16047, 4012,14559, 6241,26571, 873
R(9) SHOULD BE SET TO -26368 ON MACHINES USING TWOS COMPLEMENT
REPRESENTATION (PRIME, IBM360/370) AND -26367 ON A COMPUTER
WHICH USES ONES COMPLEMENT NOTATION (CDC7600, UNIVAC).
WHEN FIRST INSTALLING ON A NEW MACHINE CHECK THAT THE RESULT
OF THE FIRST CALL IS AS LISTED ABOVE.
NN = R(9)
MflRF TFST STATEMENTS TO UNIT 1?
PlV/fNL 1 L O 1 J 1 n 1 L II L 11 1 J 1 \J U 11 1 1 1C
WRITE (12,1000) (R(I),I=1,30)
)00 FORMAT (1017)
DO 40 1=9,128
NB = R( I-8)/128
R(I) = AND (32767, XOR (R( I -1 ) .NN+NB) )
ITEMP = IEOR(R(I-1), NN + NB)
R(I) = IAND (32767, ITEMP)
NN = R(I-8)*256
CONTINUE
FINAL TEST STATMENT
-------
4675
4676
4677
4678
4679
dfiftO
M 0 OU
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4fiQO
" U j j
4700
4701
4702
4701
" / U J
4704
4705
4706
4707
4708
4709
4710
47 1 1
H / 1 I
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
A 7 9 "5
4 /£O
4724
4725
4726
4727
4728
4729
A ~7 Q n
4730
4731
cs
C
c
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
r
If
c
c
c
r
C
C
c
c
c
c
c
c
c
c
c
c
c
c
c
AI WRITE (12,1000) (R( I ) , 1 = 1 ,30)
RETURN
END
- - FUNC GAUCDF -- - _____________
j
GAUSSIAN CUMULATIVE DISTRIBUTION FUNCTION.
FROM HASTINGS, APPROXIMATIONS FOR DIGITAL COMPUTERS, PRINCETON UNIV
PRESS, 1955. ,
1
RETURNS GAUSSIAN CUMULATIVE DISTRIBUTION FUNCTION AT X (PROBABILITY
THAT A RANDOM VARIABLE HAVING A NORMAL DISTRIBUTION WILL BE <= X).
860506 PAULUS IRPAN
MODIFY (ADD CODES) TO PREVENT UNNECCESSARY CALCULATIONS.
ALSO PREVENT ARITHMATIC OVERFLOW BY LIMITING THE RANGE OF X,
THIS IS DEPENDENT ON PRECISION & MAGNITUDE OF VARIABLES USED;
FOR OUR PURPOSE, X OF -8.0 TO 8.0 IS ENOUGH TO GIVE 0. TO 1.
FUNCTION GAUCDF (X)
J U 1 I L U U L. rA L VrAlNinDLLJ
X R THE X-VALUE AT NORMAL DISTR CURVE
REAL A(7), DENOM.X
DATA A /
4.30638E-5, 2.765672E-4, 1.520143E-4, 9 . 2705272E-3 ,
4.22820123E-2, 7 . 05230784E-2, l.O/
CALCULATIONS ARE NECCESSARY ONLY WHEN X IS BETWEEN -8.0 & 8.0
BELOW & ABOVE THOSE, THE RESULTS ARE APPROXIMATED TO 0.0 & 1.0
IF (X .GE. 8.0) THEN
.__ APPROXIMATE 1.0
GAUCDF = 0.999999999999999
ELSEIF (X ,LE. -8.0) THEN
... APPROXIMATE 0.0
GAUCDF = 0.000000000000001
IF X IS APPROXIMATELY AT CENTER (0.0) THEN IT IS A TRIVIAL CASE
ELSEIF (ABS(X) .LT. l.E-4) THEN
GAUCDF = 0.5
F-122
-------
Page 84
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
C ELSE
C
100
PROCEED WITH THE APPROXIMATION CALCULATIONS
ELSE
Q = 0.70710675 * ABS(X)
DENOM = A(l)
DO 100 I = 2, 7
DENOM = DENOM * Q + A(I)
CONTINUE
DENOM = DENOM*M6
DENOM = DENOM*DENOM
DENOM = DENOM*DENOM
DENOM = DENOM*DENOM
DENOM = DENOM*DENOM
GAUCDF = 0.5 + SIGN((0.5-0.5/DENOM),X)
ENDIF
RETURN
END
CDECK SORTI
C
PAULUS IRPAN, 840830
SORT INPUT DATA ARRAY OF N ITEMS, IN ASCENDING ORDER.
DATA ARE NOT ACTUALLY SORTED IN-SITU; RESULT IS OUTPUT AS ARRAY OF
SUBSCIPTS OF THE SORTED DATA.
METHOD IS INSERTION-SORT.
BEST FOR SMALL AND ALMOST SORTED ARRAYS.
WORST CASE IS FOR INVERSELY SORTED ARRAY.
SUBROUTINE SORTI (N.ARR, IND)
SOME LOCAL VARIABLES
N
ARR(N
IND(N
I NUMBER ELEMENTS IN ARRAY TO BE SORTED
I THE ARRAY TO BE SORTED
I INDEXES OF THE SORTED ARRAY
INTEGER
INTEGER
INTEGER
INTEGER
INTEGER
N
ARR(N
IND(N
I.J
ELMT
-------
-1 / U 3
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
/I Q 1 Q
MO 1 t
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
483"
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
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
START WITH 1 SORTED ELEMENT (N_TH DATA ELEMENT)
IND(N) = N
THEN INSERTION SORT THE REST, CHANGING THE INDEXES ONLY |
DO 100 I = N-l, 1, -1
i
IF (ARR(I) .LE. ARR(IND(I+1))) THEN '
IND(I) = I
ELSE
ELMT = ARR(I)
J = I + 1
110 IND(J-l) = IND(J)
J = J + 1
IF (J.LE.N .AND. ARR( IND( J) ) . LT. ELMT) GOTO 110
IND(J-l) = I
ENDIF
100 CONTINUE
RETURN
END
= rUNL L t Mr . -
PAULUS IRPAN, 860417
CHECK FOR LEAP YEAR. INPUT MUST BE INTERNATIONAL YEAR 'YYYY'.
RETURNS 1 IF THE YEAR IS LEAP, 0 OTHERWISE.
FUNCTION LEAP (IYEAR)
SOME LOCAL VARIABLES
IYEAR I THE INTERNATIONAL/GREGORIAN YEAR (YYYY)
INTEGER IYEAR
IF (MOD(IYEAR,4).EQ.O .AND. MOD( I YEAR , 100) . NE . 0 .OR.
MOD( IYEAR, 400). EQ.O) THEN
LEAP = 1
ELSE
LEAP = 0
ENDIF
RETURN
F-124
-------
Page 86
4816)
END
-------
Finished: 88-02-10.09:44:20.Wed
Lines read: 4846, records: 65
User: MCO -at
Label: PRT001 -form VERS
EXIBM>U_IBM>EXEXS.IBM
Pages Printed: 84 Cost: $ 5.88
------- |