=»*o4f>oo5iG co >• o r~«cier-jOfO«-(\iru>'o^^,^^,^IM^,^.^|^I^,4^«>H^^<^^^^I UJ i »-t 1-1 < ni i >- »- o CE — i »- Cf X GOOOOOOOOGOGGOOOOGOOOOGOOGOOOO •-» •« O u. OX O UJ o >- o _i rn »- UJ o «-t i-i 2 ac O > O UJ 3 O •-< »-• O I- * s. m » « < • n or^coo0v3r^aioKi(nr>-na — sOo^a-oicmwco^tcccouir^fvico ZJ u. o: «r »M •••••••••••••••••••••••••••••• U. O1I41 «^«c=J-OKifvi=»cciPinr^ruGOK>r- u. zi a o-tncrificroci>noo>if>-« «o£ =f«orui^^r~-ruj5^^«> — *h-arwK)iri^r o ui _ —<,>or^^cc -.^ «^. «^,^^, ^ « -, — ^ u* o H- •* £t U) X OOOGOGGGGGOOOOGGOQGGOOOOOOGOOO K UJ O o U) «v9>£iooDGru9>ocDoru9^iX!Of\i9->caoGnj9^>coo tu £ o uj _j 1-1 «->>«vi^<«<4(\j«\in;r\jrumi|OKiKiKi9«r9a'9tnmirintno » »-" K) »- * ua - < »- -* UJ U X ac. UJ Figure 3-15 3-38
-------
is generated for each hour.  This figure shows the detailed (internal)
eddy diffusivity coefficients as a function of elevation.   Each hour's
vertical profile is printed prior to the hour's average diffusion
coefficients.
     When the user selects the option for punched output (KPWIND = YES),
the user obtains card images punched on logical unit number 1 with the
following data:

     1)   the page title
     2)   trajectory start location in global coordinates
     3)   STANDARD or DAYLIGHT time card
     4)   trajectory node times, wind velocities and directions
     5)   trajectory grid square crossing times, coordinates, and
          either (I, J) indices or single identifiers
     6)   schedule of sky clearness ratios
     7)   schedule of surface temperatures
     8)   schedule of average diffusivity coefficients
     9)   schedule of atmospheric stability classes.

These card-images are punched in the order listed above with all refer-
ences to time made on the 0-1440 minutes/day clock.

3.7  Internally Specified Data

     The METMOD program requires internal specification of certain para-
meters specific to a particular modeling region.  These parameters are
designated using either FORTRAN DATA statements or FORTRAN replacement
statements.  Table 3-5 lists the code variable names, their functions,
and the subroutines in which they are specified.  In addition, the
FORTRAN source listing contains notes to the user where internal speci-
fication of data is required.

3.8  Surface Roughness Lengths

     The eddy diffusivity submodule requires the specification of sur-
face roughness length parameters.  Figure 3-16 illustrates the surface
roughness profile used in the model.  This profile has been designed for
                                   3-39

-------
                               TABLE 3-5
            METEOROLOGICAL MODULE INTERNALLY SPECIFIED DATA
Variable Name

  NUMSTA


  ISTANS
  SSTAN
  RLAT
  RLONG
  TMZONE
  NUMBAS
   BAS
   BUFZON
   ZW
              Function                    Subroutine

Number of measurement stations (wind,
temperature, radiation, etc.)                SETIN

The measurement station names.  A            SETIN
vector dimensioned 2 x NUMSTA which
contains two 4-character Hollerith
words for each station.  The second
word for each name must be unique.

The measurement station locations.           SETIN
A vector dimensioned 2 x NUMSTA
which contains the global (UTM)
horizontal and vertical coordinates
of the stations, (kilometers)

Latitude of the approximate center          _SETIN
of the modeling region.  Used in
solar zenith angle computation.
(degrees)

Longitude of approximate center of           SETIN
the modeling region.  Used in solar
zenith angle computation, (degrees)

Time zone of the modeling region.            SETIN
Used in the solar zenith angle compu-
tation.  Use 6. for St. Louis, which
represents the difference between
local time and Greenwich, England time.

Number of geographic terrain barriers        BARIER
specified,  (max = 20)

The global  (UTM) end point coordinates       BARIER
of terrain barrier in  the modeling
region.  A vector dimensioned 4 x NUMBAS
which contains the xj, yj_, X2, 72
coordinates of a line  segment repre-
senting a physical barrier to the wind
field,  (kilometers)

The width of a buffer  zone outside of        EDGE
emissions grid.  Backward trajectories
are not permitted to back off the grid
more than this distance,  (kilometers)

Elevation of wind measurement instrument     EDDY
above ground,  (meters)
                                   3-40

-------
                          TABLE 3-5   (CONTINUED)
Variable Name

  UTMXUR,
  UTMYUR


  ZOURBN


  ZORURL


  RADURB


  RADSUB


  NSTMAX



  NOSPEC



  CONAM



  ITGRID




  VGRID
           Function

Coordinates (x,y)  of the center of the
urban roughness length region.
(UTM = kilometers)

The urban surface roughness length.
(meters)

The rural surface roughness length.
(meters)

Radius of urban surface roughness
length region,  (kilometers)

Radius to rural surface roughness
length region,  (kilometers)

The maximum number of measurement
stations for which the program's
arrays are dimensioned.

Number of variables stored in the
CON array for interpolation along
the trajectory,   (max = 10)
A vector of 4-character Hollerith
words which contains the names of
the variables in the CON array.

A Hollerith variable equal to YES
when the variable size grid square
feature of the program is to be
used.
A two-dimensional array which
contains the variable size grid
square identifiers corresponding
to a grid with uniform size grid
squares.  (See Section 3.4)
Subroutine

   RUFNES



   RUFNES


   RUFNES


   RUFNES


   RUFNES


   METIN



   METIN



   METIN



   BLOCK DATA




   BLOCK DATA
                                   3-41

-------
Surface
Roughness
Length (ZO)

   ZOURBN
   ZORURL
                                                              Radial
                                                                Distance
Center of
Roughness Island
RADURB
RADSUB
            Figure 3-16   Surface Roughness Length Profile
                                   3-42

-------
modeling a region with a surface roughness island like St.  Louis.   The
program assumes there is a circular subregion with a district surface
roughness length ZOURBN and an outlying region with surface roughness
length ZORURL.  The user specifies these two roughness lengths in  meters,
the global x and y coordinates of the center of the subregion, and the
radii of the inner (urban) and outer (suburban) regions,  RADURB and
RADSUB, respectively.  The program assumes that the surface roughness
varies linearly with radial distance in the region between the inner and
outer radii.  These parameters are specified in subroutine RUFNES, as
described in Section 3.8.
     For applications without a surface roughness island, the user can
specify ZOURBN equal to ZORURL.  Similarly, the user may have an appli-
cation where an inverted profile (ZOURBN < ZORURL) is appropriate, such
as a. heavily forested outlying region.   In any case, the user must
choose RADURB not equal to RADSUB for proper operation of the code.

3.9  Printer-Plot Boundaries

     The printer-plot boundaries specified in the input deck may focus
on smaller areas than the complete modeling region.  The parameters XL,
XR, YB, and YT are, respectively, the local x-coordinates of the left
and right (east) boundaries of the plotted areas, and the local y-
coordinates of the bottom and top (north) boundaries of the plotted
area.  These parameters are input in kilometers.
     Because of the constraints involved in using a line printer to
produce a plot (fixed at 51 horizontal lines and 101 characters in this
case), certain rules of thumb should be followed in selecting the  plot
boundaries in order to obtain undistorted representations.   Since  char-
acter spaces are 0.6 times as large as line spaces, true-to-scale  plots
can be obtained only by maintaining a ratio of .84:1 between the character
position scale and the print line scale.  Thus, the user is instructed
to choose XR, XL, YB, and YT such that

          YT - YB  s   84
          XR - XL
to obtain undistorted plots of the trajectories.
                                  3-43

-------
3.10  Computational Procedures

     3.10.1  Calculation of Air Parcel Trajectories

     In its simplest form, the method, used by the program to obtain a
wind vector at some given point and time, consists of constructing the
weighted average of the wind speed and azimuth measurements recorded at
up to three neighboring stations.  However, the application of this
method in practical situations requires introduction of some additional
procedures to avoid various pitfalls.  In particular, procedures are
needed to deal with incomplete measurement records, stations supplying
conflicting information from the same relative azimuth, stations screened
from the trajectory node by geographic barriers, and stations very near
to or very remote from a node.  To clarify the ensuing discussion of
forward and backward trajectory development, we list here the definitions
of seven terms related to these supplementary procedures.  The names of
the subroutines performing the functions are also noted where appro-
priate.

     1)  DATA EXTRAPOLATION:  The longest gaps in the data record
         that will be filled are those with two adjacent missing
         points embedded in or on the end of a one-day record.
         These gaps can only be filled (by linear interpolation
         or extrapolation) if the two adjacent points on one side
         or the other are non-zero.   (Subroutine EXTRP)
     2)  DATA AVAILABILITY:  Data is considered available only if
         it is recorded or can be extrapolated.
    •3)  ANGLE TEST:  Wind data will not be accepted from two sta
         tions lying within 2° azimuth of each other as seen from
         the trajectory node being considered.  (Subroutine ANGTST)
     4)  BARRIER TEST:  Wind data will only be accepted from sta
         tions which can be connected to the trajectory node by a
         straight line which does not intersect any of the input
         barrier line segments.   (Subroutine BARIER)
     5)  VALID DATA:  To be valid, a wind measurement must be
         available and satisfy the angle and barrier test.
                                   3-44

-------
     6)  CLOSE STATIONS:  If a station is within a minimum distance
         (RMIN) from a particular trajectory node, the program uses
         only the data from this station.  When there are no stations
         within the minimum distance, or when a station within the
         minimum distance has no data available, the program searches
         for data from up to three neighboring stations.  It uses the
         measurements from the neighboring close stations, provided
         they are located within the maximum distance, RMAX, from the
         node.
     7)  EDGE TEST:  Development of a backward air trajectory may
                     be terminated early if its path takes it out
                     side the modeling region.  (Subroutine EDGE)

     Having established this background of terms,  we are ready to describe
the calculation sequences for forward and reverse trajectory development.
Forward trajectory development consists of cyclic execution of the
following steps:

     1)  Search the wind data of the stations in order of increasing
         distance from the trajectory point until the desired number
         of close stations having valid data are found, or RMAX is
         reached.  These operations are accomplished in subroutine
         GETAZV.  Lacking any close stations, the trajectory calcu-
         lation is terminated.
     2)  Combine the n wind speed/azimuth pairs found into an average
         speed and azimuth using the interpolation formula
                                       Rk
                                            S,
                        S  =        —-L	                 (3-1)
                              i=l           1	
                                      i=l    i

         where  i = station index
                n = number of close stations to be used
                    (1 £ n <_ 3,  as specified by the user)
                k = 1 or 2 as specified by the user
               R. = distance from trajectory point to i   station
                                   3-45

-------
               S.  = speed or angle measurement from i   station
               S  = weighted average speed or azimuth
         This calculation is performed in subroutine AZVDIS.
     3)  Integrate the trajectory one time step using Euler's method
         (i.e., using the current position and velocity to extrapolate
         the trajectory to the next node in a single step).
     4)  Unless the trajectory is complete, and provided the  barrier
         and edge tests permit, start again at step (1) using the time
         for the new node.
     Reverse trajectory development is somewhat more complicated, but
does utilize many of the calculations needed in the forward case.  .Re-
verse trajectories are calculated in the following manner:

     1)  Search the station measurement data using the current trajec
         tory point, using the time that will be appropriate  at the next
         node  (that being one time step earlier).
     2)  Combine the measurements.
     3)  Extrapolate the trajectory back one time step, using the current
         position and the velocity calculated for one time step earlier,
         to obtain an estimate of the next earlier node position (see
         Figure 3-17a).
     4)  Using the estimated node position, search the station data
         with  the same time for a new set of close station data.
     5)  Combine the measurements.
     6)  Starting from the reference node, reestimate the position of
         the next earlier node by extrapolating back one time step with
         the new wind vector  (see Figure 3-17b).
     7)  Repeat steps 4), 5), and 6) as desired (program currently does
         three iterations, see Figure 3-17c).
     8)  Barrier and edge test permitting, establish the last estimate
         of the next earlier node as the new reference node.
     9)  Record the last calculated wind vector with the time appro-
         priate to the new node.
                                   3-46

-------
                               a)  INITIAL ESTIMATE
y
         o-- •-
                               b)  FIRST ITERATION
                2   X)REF.
                    ,*\
                                c)   SECOND ITERATION
       Figure 3-17   Reverse Trajectory  Development
                         3-47

-------
    10)  Return to step 1),  unless the desired trajectory has been
         completed.

     When a reverse trajectory has been completed,  subroutine WINDY
reorders the table of times and wind vectors,  placing them in chrono-
logical order, and records the final calculated point as the trajectory
start point.

     3.10.2  Interpolation of Other Atmospheric Parameters Along the
             Traj ectory

     The code calculates the surface temperature and air quality data at
trajectory nodes in a manner very similar to that used to obtain wind
vectors.  The program searches the measurement records of close stations
for each parameter and interpolates the valid data (from up to three
stations) using the Equation (3-1).  The principal  difference between
the screening of these data and the wind data is that these data are not
subjected to the angle test or barrier test.  The rules for extrapola-
tion of data and determination of close stations are identical to those
described in the previous section.  The calculations are made in sub-
routine GETCON.

     3.10.3  Calculation of Eddy Diffusivity Coefficients

     The computation of vertical eddy diffusivity coefficients (K )
                                                                 LI
occurs after the generation of air trajectory and the interpolation of
atmospheric parameters.  The trajectory wind speeds, trajectory node
locations, and the interpolated surface temperatures are passed to sub-
routine EDDY, which controls the generation of the K  schedules.  This
                                                    z
subroutine calls KZDATA to read the vertical temperature data and the
vertical mesh point elevations.
     This subprogram's computation cycle employs an outer loop for each
vertical temperature profile and a nested (inner) loop for calculation
of hourly K  profiles between sounding release times.
     For each cycle through the outer loop, the program partitions the
vertical temperature structure into  (up to 30) layers with distinct
lapse rates.  Temperature data points which indicate very minor varia-
tions in the lapse rate are removed from the vertical profile by sub-
routine SMOOTH.

                                    3-48

-------
     Given the edited vertical temperatures and other data mentioned
above, the program proceeds to the inner loop.  The first computation
within the loop involves updating the vertical temperature profile if
the soundings release time precedes the trajectory start time (or cur-
rent time).  The update is performed using the incremental difference
between the current hour's surface temperature and that of the previous
hour or the sounding, whichever is closer.  The lapse rate used to
update the sounding is determined from the following rules:

     1)  If the increment in surface temperature is positive, the
         program uses the greater of the lapse rates in the pre-
         vious vertical sounding, the next vertical sounding, or
         the dry adiabetic lapse rate.
     2)  If the increment in surface temperature is negative, the
         program uses the lapse rate indicated by the surface
         temperature and first elevated temperature.

Once the sounding has been updated, the program calculates the surface
roughness length for the particular trajectory location.  Now the code
has all the information required to calculate the current hour's K  pro-
                                                                  Z<
file.  The stability of each atmospheric layer with a distinct lapse
rate is determined.  In addition, the atmospheric stability class of the
surface layer is computed for use in the emissions module.  Within each
layer, the K  values are calculated at either 10 or 20 meter vertical
            it
increments, using different K  formulations for within and above the
                             Li
surface layer.  Once this detailed K  profile is computed, the program
calculates a set of average diffusion coefficients (averaged between the
mesh points) for use in the chemical-diffusion model.
     At this point, the program remains in the inner loop (i.e., updating
the sounding and calculating K  profiles) until a new sounding time is
                              LJ
reached.  Then, control is passed to the outer loop, where the entire
process is repeated until the final trajectory time is reached.

3.11  Program Modifications

     3.11.1  Changing the Number of Measurement Stations

     The variable NUMSTA located in common block /WDATA/ is the number
of stations recognized by the program.  Many arrays in the program have
                                  3-49

-------
dimensions which must be equal or larger than NUMSTA.  Currently,  NUMSTA
and these dimensions are set equal to 25 for the St.  Louis application
of the model.  If the user desires to use N stations (N > 25), the
following arrays should be redimensioned:
     In all subroutines with common blocks:
     COMMON/AIRQAL/ 	  CON(24,N,10) 	
     COMMON/WDATA/  	 SSTAN(2,N), ISTANS(2,N) ...
     COMMON/WINFLD/ 	 AWDATA(52,N), DISAVE(N), IDSAVE(N)
     In subroutines:
     GETAZV   DIS(N), IDIS(N), DDIS(N)
     GETCON   IWORK(N), WORK(N)
     METIN    NWDATA(52,N), X(22,N), WORK(22,N)

In addition, NUMSTA and NSTMAX should be set equal to N in subroutines
SETIN and METIN, respectively.  See Appendix A for a list of subroutines
with the common blocks mentioned above.

     3.11.2  Changing the Station Azimuth Exclusion Sector

     Currently, data will not be accepted from two stations lying within
2° azimuth of each other, as seen from the trajectory node being consid-
ered.  The size of this exclusion angle  is determined by the variable
COSTST set in a DATA statement in subroutine ANGTST.  COSTST should be
set equal to the cosine of the desired exclusion angle.  Note that since
the exclusion angle is applied on both sides of the azimuth to a pre-
viously accepted station, the sector actually excluded is twice the
specified angle.
                                   3-50

-------
                        4.  THE EMISSIONS MODULE

     This section provides instructions for proper use of the emissions
module, program EMMOD.  The function of the program is to process data
from a region's emissions inventory to produce a tabulation of emissions
along a trajectory for use in the chemical-diffusion module.  The pro-
gram requires regionally disaggregated emissions data for nitrogen oxides,
sulfur oxides, carbon monoxide, and four classes of reactive hydrocarbon
species:  alkanes (paraffins), alkenes (olefins), aromatics, and aldehydes.
     Program EMMOD is designed to utilize emission inventories which have
been preprocessed into modeling format, a format in which the contribu-
tions of individual source types (mobile and stationary) have been summed
into single hourly area source emission rates for each grid square.  In
addition, the program considers the major emission point sources on an
individual basis.  The inputs to the program include a small file of
control parameters and trajectory data read from the card reader.  Also
included are three tape files, which contain the area source grid descrip-
tion; the hourly area source emission rates; and, the point source loca-
tions, hourly emission rates, and stack parameters.
     Portions of the program are designed specifically for the format of
the RAPS/St. Louis emissions tapes.  The user should anticipate making
significant modifications to the code for applications involving regions
other than St. Louis.  These modifications are necessary not only because
of the different formats of emission data in different regions, but also
in the interest of efficient processing of the data.

4.1  Control Parameters and the Input Deck

     The input deck parameters will be discussed in the general order in
which they are input to the code.  The reader should refer to several
figures and a table, as described below, to obtain a better understanding
of the input data and format.  Figure 4-1 illustrates the listing of the
input deck produced by subroutine PREDAT for the sample problem.  Table
4-1 lists the inputs by their code variable names, and describes their
functions and formats.  Figure 4-2 contains a flow chart of the input
variable sequence and options.  These aids will be helpful in formulating
input decks for the program.
                                    4-1

-------







































r-H
1
**
PJ
03
^£
E-


























































2
O
H- i
H
a.
I-H
OS"
u
CO

Q
H4
oa
3
^

fe
a,
2
hH
PJ

|""j
Q

^
CO

0
H- 1
co
co
HH
S
P4















































py
^r
&
E-
a;
o
tx,














CD
i-H
"rt
•M
^
rt
>


to
i
rt
2
i— i
o
rt
•rl
rl
rt
>

P

ft
tf











t/)
"^
rt
S
CD
3^















P

S

o
UH














c
o
• H
^_>
O
e

u.




O
rt
rt
)C*^
0
1
'3-

rt

(f>
•H

V}
•H
f**
H




,-— ^
^"
^J
«\
X
O
2^








o
•H
(/)
V)
•H
B
CD
a>
o
ri
3
O

rt
1




<
(^
^^
Q
2




CM




O

rl
0
•
CO i-l

>•

o 1
1— 1
rH O
rt o
3
cr c
CD -H

CD C^O
rH C
XI -H
rt P
•H rl
rl rt

> «




,— ^
^H/
^^
A
X
o






S
o
• e o
CD O* -H CD
Xi 2 co X •
tfl /->
O rl -H O O
4)J Q B P 2
CD
CD CO CD rl
rl PJ CD rl O
rt >- o rt
^ rl CO
in 3 W pj
0) T3 O CD >-•
»-H CD in <-t ^-^
£ tJ 3
13 3 -P 13 13
CD ft C CD CD
x; e -H x: +j
O O O03
1/1 o a, W ft




g
o
a.
Q
2




to
















/— ^
V)
*rJ
^
rt
o

CD
CD
rl
X!

V 	 /




/— \ /"~N /"~\ /^"\
•Tf rf CM CM
 O
WO S3XI 4-(ftCD -H
WO -H4HO OCDWO W
•H "WC i-l fl t-l W
S '.p 0-HC
3rt a"•< rt 33CGO
rt o v — ' tocu f-i i— loorto
CX! 4->X!OOrttflW -Hrl-
O 13 3 +-• i— 1 O ftt/lCD!/)
•HX!CD ft 3cO'rirtrtcut/>xa>
OOO'P -PrllSUJ bOCDOJi— I'H S-P
4)rt3 3OO>H O rl rl -H S 3rt
Dia»ftOtHEv-'HJrtrt4HCD 2ri




CO B Q" < H 2
S 2 OS a O X
co 3 u < a, J
Q 0. 3 D O PH
2 I-l J J J 2




^^ LO \o r*^*

































J^-^
fNJ
HH
•t
X
o





Pi
o
•H
t/)
w
•H
CD

^J
3
ft

3
o

4H
o

rl •
CD W
X> CD
e -p
3 rt
2 rl




g
o
X
[X,
2




00















/ — \
to
13
rl
rt
o

2
HH
X

[r t
2


•t
X
VO / — v
ft O
^- »
<; CM
ft 1— 1
X U,
o
^





1 p
e 3
O ft
0 fi
•H
13

rt o

(/) to
CD rl
E 0
rt -P
G 0
rt
X! 4n
+J
• H Cj
rl 0
CD -rl
1— 1 t/)
i-l rl
O CD
33 >




2" en
HH 3
2 *""3
^5 Q
2 <;




Ol


















































•
t/)
CD
•H
o
CD
ft
W

f^
o
• H
(T)
t/1
•H
CD

















4-2

-------





































Q
W
=1
Z
rH
O
u
V — /

r— I
1
^-

UJ
J
03
^
E-








































V)
^
rH
Ctf
S

OS











2r
< P
c2 as
H e
OS S
0 0
tXi

















0 G
rH O
XI -H
oS p
•rH O
S§
> tu



to
CD
Z O
u
 3
rH
P 0
3 X^
PH S
rH 3
















/— ^
to

rH
nJ
u

fe
O
X
IX,
ZHI
^-/
„
X
\0

^f
<

x"
o
V 	 1







\
p
3
O

^M
o

to
o

c^j
c

^^J
-p
•H
f^l
o
rH
r-H
£




Is
£^
s
^
2




0
rH































^^
f^i
•
O
r— 1
PH












to
0
•H
O
(U
PH
to

C
o
•H
(/)
•H
g

p
PH
















S • — >
3 to
6 T3
•H rH
G oS
•H O

o

»£« E~*
4-* v— '

O
P •
CD

C -H
o to
PH
(fi 0
CD rH
rH OS
rH 3
0 CT
o to

P 13
V) -H

£ 00

o*

o
rH
U,
•I
X
o
2/





•
to
0 rH
x: a)
P P

*-H S
O O
i— I
tr^ «H
4-* 1^1
*t3
•H C
3 -H

T3 rH
G O
ca o
x: as
"P Oi
00
C rH
0) -H
,-J 0$



•k
S S
Z Q
U rH
*J S
o, o,




r— |
rH

















^-^
to

03
O

fe
o
X

Z
V 	 '
^
o
•
0
rH
PH
#v
X
O
V — /








(1)
tr*
•P

0 rH
rH O

O
10 00
CD
OS 4->
0 oS
rH rH
03
P O
rH -H
3 W
oS to
4-1 -H
(D g
Q 0




58
OQ

^?
tu




CM
rH

















































•
T3
• H
(H
00

CD
*O
«rH.
to
P
3
O
pj
o
•H
00



























t — \
Q
O
•s.
H
°


S
O
^M

•P
pi_i
4->

^5
v_^
O
•
o
rH
U, r~>
to o
•» i-H
X rH
0
v — /



„
to
(U 1

•H 0
POO)
rH
O013 oS
G G 3
•H OS CT*
(ft tO
tO "
o to *o
r-l 1) -H
O P f-t
03 00
a) c
rH -r-l 00 W
OS "^ G rH
3 rH -H CO
C7* O 'O XI
H
s s
f-H F-H
CD *3




^j-
i— t
















































•
V)
^
d)
4J
0)
s
o
rH
•H
**/t

G
•H
fi
• H
00
•H
rH
O












































/ — s
0

o
rH
tu
(N
•,
X
o
V 	 /




to
(U
p
OS
P G
G TH
•H 13
0 rH
PM O
O
P O
£_(
er) X •
P tO

G 0
X 03 P

0 X S
P O
O rH rH
CD CC) *H
c? O
rH rH fi
H 00 -H



^
/•— ^ /^^
rH rH
n •»
rH CN
\ — t V — /
O, CL,




LO
rH


to
G CD
•H <1J
rH P
X 00 00
P CD 03
•H 13 CD
0
o G e •
rH -H O i 	 v
CD fH Q
> x; <4-i o
p S
•> 3 CD E-"
to 6 to tq
CD -H -H ;S
P N S
3 03 r* E
G 00
•H 13 O rH
er"* j t-t j
i»l ^^ t^
OS 0
C rH P
•H •> CD 3
rH P P*
CD x: c -P
6 -v. 3 3
•H 6 0 0
EH ^ O v— '
o"

0
rH
tL,
to
•\
X
0
\~J






*r3
G
OS
X
" rH
X 0
p p
•H O
O CD
O •!-,
rH OS
CD rH
> P

13 4H
G 0
•rH
P •
.. 3 w
CD g CD
g -H 13
•H N O
H OS C







** ** rn
£— < I> P




vO
I— 1

















/— ^
to
r[|3
rH
OS
0

*2
H

O
Z
V — /
/ — \
o

o o
rH rH
H U,
•^ *\
X X
o o
I J V. ^/





rH
CD
rfi O
tO rH rH
CD Oi OS
6 O PH
•H

03 rH -H
G CD OS
•H >
P C
rH 4H -H
CD O

CO P «
4n G C to
O O -H rH
• -H O CD
rH tO P PH P
CD P d  rfi g
g -H CD (0
3 O rH CD fi
2 PH W g -H




b
P-H
I/I U4
O U
Z M




t-- 00
rH rH

rH
3
4->
cS
rH
CD

g'
CD •
4_) CD
13
T3 OS
G rH
OS 00
•H
00 P
CD G
p 0
3 0
•H 00
g CD
0
G rH
•H 00
0
0 13

•H G
E-i -H
o"

o
rH
UH
CM
««
X
0
V 	 1






\
rH
3


^W
o •
(O
to 0
0 rH
3 3
rH P
03 03
> rH

13 PH
0$ 0
P
to
0) 0
•H 03
H 4H



^
O, PH
LJJ P
H §
*S W
§— ( E— t




O"»
.

4-3

-------
































/•— \
Q
S
2
i— i
2
O
U


I— 1
1
^J-

w
l_3
5
H







































t/1
,x
JH
rt
B
CD
oi












 0,





tn
o
6 0)
2 O
U
CD
r-l B
•SM
•H *d
H CD
rt in
S-i
P CD
t-3 rO
PH §
S 3
vO
X i
•p I— 1
i— i tn
jr*i
rt T)
•P 
rt CD
Ci^
tn w
CD
•P CD
3 h
B rt
•H
B rr i
i
B <
•H
in
CD in
S rt
•H t-t
E- U
O
0
^
P-4
f\l
•\
X
0

^^




1
O •
g 10
•p tn
rt rt
rH
4-1 O
o

CD -H
3 »H
^H -H
rt ,Q
> rt
4J
T3 in
B
rt o
•H
in J-<
CD CD
B X
• H CLi
H in




»*
PQ i— 3
^^ r^
H «C
^1 t/5
£-H ^J



0
(N



























O
0
UH
CM

X
o
^>
v — '




^
o
0 JH
CD
•d X in
§rt B -H
r-H O
•H fn
tn bo in CD

B -H CD CD
•H X > ,B
•P -H B O
6 -H -H

O W) ^H S
B 0
O -H •> •
i— i *d in tn M
3 B +J •»-> CD
*W O r^ ,d 4-*
O CX, bO bJ5 oj
X W -H -H O
O O  ( t-H
in p.
•H
CD P
+J ^H
0 3
2 S















CD
f|
4-> •
Q
tn 2
rt w
^ n
^3 0
U
•H W
J2 OS

S
*O
f-t MH
rt o
u
CD
4-> 3
tn 1-1
rt rt
Hj >







§
tu
H



CM
CM

4-4

-------

CARO
1
2
3
4
5
to
7
ft
9
1 0

CARD
11
12
3
4
5
6
7
ft
9
20

C A tf L*
21
22
23
24
25
26
27
28
29
30

CARD
31
32
33
34
35
36
37
36
39
40
1 11 21 31
•f + + +
41

ERT EMISSIONS MODULE -- ST. LOUIS
OU «v£ NE£0 AREA SOURCE EMISSIONS
UO f<£ MEEH POINT SOURCE E'-USSIOfvS
Oil rtE •'*££!> *EGIQfvAL SU^S
00 *£ NEED PUNCHED OUTPUT
LOGICAL UMT OF GRIM DESCRIPTION
- LOGICAL UNIT OF AREA SOURCE EMISSIONS
LOGICAL UMT OF POINT SOURCE EMISSIONS
MIK-JER OF INPUT VARIABLES
Ml'MBt* (>F OUTPUT VARIABLES
1 11 21 JJ

JNPt.T VARIABLE NAMES, ADJUSTMENT
2
3
a
5
6
/
ft
Q
JO
1 11 21 31

11
(U'TPUI VARIABLE NAMES,
2
3
U
5
6
7
WIDTH OF THE AIR PARCEL (KM)
LENGTH OF THE AIR PARCEL (KM)
1 11 21 31

DEFAULT AREA SOURCE RATES NOX
2 PARF
3 OLEF
4 AROM
5 ALOE
^ CO
7 SOX
TM,X,Y,ID 360.00 680.44 4224.05
2 394.40 683.00 4229.87
3 421.46 685.32 4234.39
YES
YES
YFS
YES
10
11
12
1 1
07
41

PART
SOX
NOX
THC
CO
DUST
NRHC
PARF
OLEF
AROM
41

ALOE
NOX
PARF
OLEF
AROM
ALOE
CO
SOX
1.0
1.0
41

0.
0.
0.
0.
0.
o.
0.



51 61 71

6/29/76 (181)









51 61 71

1.0
15.625 FROM KG TO MOLES
21.739 TO MOLES NO
25.0
35.714 TO MOLES CO
1.0
1.0
1.0
1.0
1.0
51 61 71

1.0









51 61 71

OE 00 MOLES PER HOUR
OE 00
OE 00
OE 00
OE 00
OE 00
OE 00
0
64
72
Figure 4-1   Emissions Module Sample Problem Input Listing
                            4-5

-------

C A^n
41
42
43
44
as
46
a 7
ah
49
so

CARD
SI
5?
S3
54
SS
56
57
5M
59
*0

CAPti
61
fee
63
64
65
frt>
67
68
60
70

C AKD
71
/?
7}
74
75
76
77
78
79
80
1

4
5
h
7
«
9
10
11
12
1?
1

14
15
16
17
)*
19
?0
?1
22
?3
1

24
25
?6
27
28
?9
30
31
32
33
1

34
35
36
37
3*
39
UO
41
4?
43
11

42b.39
486.07
496.41
bll.58
521 .06
537. Ofl
551.01
556.62
564.13
570.04
11

571.63
579.14
586.65
589.06
594.15
59P.58
601.97
610.88
614.85
619.79
11

62«.70
6J0.90
637.61
646.52
646.94
655.43
663.44
664.20
672. »1
6P1.42
11

681.90
685.72
690.03
691.13
694.33
698.64
700.56
702.94
707.25
709.59
21

685.32
690.00
692.03
695.00
696.86
700.00
703.50
705.00
707.00
708.57
?1

709.00
711.00
713.00
713.64
715.00
716.18
717.00
719.00
719.69
721.00
21

723.00
723.49
725.00
727.00
727.09
729.00
730.82
731 .00
733.00
735.00
21

735.11
736.00
737.00
737.36
736.00
739.00
7§SM»'«
740.00
741.00
741.54
31 41

4235.00
4242.90
4245.00
4248. OH
4250.00
4253.25
4255.00
4255.59
4256.38
4257.00
31 41

4257.17
4257.96
4256.75
4259.00
4259.53
4260.00
4260.39
4261.51
4262.00
4262.62
31 41

4263.73
4264.00
4264.84
4265.95
4266.00
4267.06
4268.00
4268.08
4269.02
4269.95
31 41

4270.00
4270.41
4270.88
4271.00
4271.35
4271.81
4272.00
4272.26
4272.75
4273.00
51

65
81
82
99
2026
129
130
2039
2048
2049
51

2056
2066
2076
2077
2093
2094
2115
2137
2138
2159
51

2178
2179
2198
2212
2213
2227
2226
2245
2255
706
51

707
746
781
782
818
850
851
884
924
925
61 71











61 71











61 71











61 71











Figure 4-1 (Continued)
       4-6

-------

C A 60
81
K?
83
84
85
8h
87
8«
89
90

c»»n
91
92
93
94
95
98
97
98
99
100

CARD
10J
102
103
104
105
106
! 07
IGfi
109
11"

CAWO
ill
1 12
113
114
115
116
1 1 7
lie
119
120
1

44
45
4b
47
4ft
49
50
M
5?
5*
1

54
5b
56
57
5*
59
60
61
C>2
63
1

64
65
66
67
6«
to9
70
71
72
73
1
+
74
75
76
77
78
79
80
LAST
11

711.55
715.85
723.60
723.89
727.64
727.72
731.38
731. B5
735.13
735.97
11

738.88
740.10
742.63
744.22
746.31
748.35
750.13
752.47
753.87
756.60
11

757.62
760.72
761.37
764.85
780.14
786.01
804.21
808.68
809.03
817.74
1 1

818.65
826.81
828.28
831.34
849.08
858.56
866.76
•10. (JO
UTO" COORDINATES OF
STARTING
LOCATION
21 31

7 4?. 00
743.00
744.92
745.00
746.00
74b.02
747 .00
747.12
748.00
748.22
21 31

749.00
749.32
750.00
750.42
751.00
751.53
752.00
752.63
753.00
753.73
21 31

754.00
754.83
755.00
755.93
760,00
761.22
765.00
765.93
766.00
767.61
21 31

768.00
769.69
770.00
770.64
775.00
777.69
780.00

GRID ORIGIN
UTM X & Y


4273.21
4273.6*
4275.00
4275.07
4275.98
4276.00
4276. B9
4277.00
4277.80
4278.00


4278.71
4279.00
4279.61
4280.00
4280.52
4281.00
4281.43
4282.00
4262.34
4283.00


4283.25
4284.00
4284.16
4285.00
4268.70
4290.00
4294.01
4295.00
4295.08
4297.00


4297.20
4299.00
4299.32
4300.00
4303.42
4305.00
4306.36



41 51 61 71

955
998
1030
1066
1095
1096
1119
1120
1152
1153
41 51 61 71

1182
1183
1219
1220
1254
1255
1283
1222
1317
1316
41 51 61 71

1350
1351
2326
1391
1499
1500
1592
2374
2392
2393
41 51 61 71

2404
2405
1626
1627
1642
1643
0

660.00 4230.00
660.44 4224.05
Figure 4-1 (Continued)
        4-7

-------

CAtfD
!?1
122
123
124
125
126
127
128
129
130

CARD
131
13?
133
134
135
13ft
137
13*
139
140

CftRD
41
a?
43
44
45
46
47
148
1 49
150

CAKO
151
152
153
154
155
156
157
158
159
160
\ 11 21 31

TRAJECTORY DESCRIPTIONS
R TlMEC^IN), ^IND V * D (KM/HR * DEG)
C
u
fc
F
G
H
I
J
1 11 21 31

K
L
w
LAST TRAJECTORY NODE (DUMMY NEGATIVE)
NUMR£f< UP KEMOO VERTICAL NiESH POINTS
MESH POINT ELEVATIONS (ABOVE SURFACE)
2
3
4
5
1 11 21 31

SURFACE TEMPERATURES









1 11 21 31



LAST OUHMY SURFACE TEMP (NEGATIVE)
STABILITY CLASSES
USE 1-6 FOR A-F



LAST STABILITY (DUMMY NEGATIVE)
MIXING LAYER DEPTHS (METERS)
41

360.0
420.00
480.00
54C .00
600.00
660,00
720.00
780.00
840.00
900.00
41

960.00
1020.0
1080.0
-100.0
05
0.0
120.0
300.0
600.0
1200.0
41

360.
420.
480.
540.
600.
660.
720.
780.
840.
900.
41

960.
1020.
- 10.
360.
660.
720.
900.
960.
•10.
360.
51

11.09
8.421
16.93
17.18
15.40
15.38
21.63
18.18
19.68
21.53
51

24.82
24.82
24.82


61 71

66.27
62.38
45.98
21.53
29.04
25.00
42.26
46.72
30.47
28.28
61 71

15.54
15.54
15.54


(METERS)




51

21.50
22.41
24.39
26.46
27.67
26.46
28.51
29.61
29.43
29.27
51
+
29.66
29.64







200.




61 71











61 71




2
5
2
3
2


Figure 4-1 (Continued)
         4-8

-------
1
161
lfe
-------
             NO
   MORE
                     TITLE
                     NDAREA
                     NDPONT
                     NDSUMS
                     IPUNCH
                     LUGRID
                     LUAREA
                     LUPONT
                     NFLXIN
                     NFXOUT
                     NAMIN,ADJUST
                     NAMOUT
                     PLENTH
                     PWIDTH
                             YES
                      EMABAS
                      TIMEHS,UTMHS,IDHS
                             YES
                      UTMXOR,UTMYOR
                      T,V,TH
                      NOSTAT
                      ZEE
                      TMTEMP,TEMPSF
                      TMSTAB,KSTABL
                      TMXHIT,HTMIXL
                         TERM
END
Figure 4-2   EMMOD Input Variable Sequence and Options
                        4-10

-------
     4.1,1  General Inputs

     The input stream begins with the user-selected page label (TITLE),
similar to the first card in the METHOD input deck.  This card is fol-
lowed by four option flags, which are specified by YES or NO inputs.
The user first specifies whether (YES) or not (NO) the area source
emissions schedule is to be generated in the run.  The next option flag
similarly indicates whether the point source schedule is desired.  The
third flag indicates whether or not the user wants the hourly sums of the
regional inventories generated and printed.  The fourth flag instructs
the program to punch the area source and point source emission schedules
in a format suitable for input to the chemical-diffusion module.  Since
the punched output of the program is typically 100 to 500 cards, the use
of this option is strongly recommended for error-free data transfer.
     Next, the user supplies three cards with the logical unit numbers
of the peripheral devices assigned to the three input files (tapes) .
These integer constants refer to the emissions grid file, the area source
file, and point source file, respectively.
     The user next specifies the number of species with emissions data
in the input files (NFLXIN) and in the output schedules (NFXOUT).  The
RAPS area source input file has data for eleven species and the point
source file has data for ten species.  The user should specify NFLXIN
equal to eleven in the input deck since the program internally accounts
for this discrepancy between the files.  The program utilizes data for
seven species, thus, the user should set NFXOUT equal to seven in the
deck.
     Next, the program reads NFLXIN cards, which contain 4-character
names for the species in the input files.  Adjacent to each species name
is a conversion factor to adjust the units of the input data to the
units required by the code.  The non-unity conversion factors shown in
Figure 4-1 are those used to convert the nitrogen oxides (NOX), sulfur
oxides (SOX), total hydrocarbons (THC), and carbon monoxide (CO) emis-
sions data from kilograms per hour to moles per hour.  A value of unity
is specified for the individual hydrocarbon class data since this data
is provided in moles per hour.  The program does not use the particulate
(PART) and dust (DUST) emissions data, so their units are left in kilo-
grams per hour by inputting a conversion factor of one.
                                   4-11

-------
     The program proceeds to read NFXOUT cards, which contain the 4-
character names of the species in the output schedules.  These species
name cards, as well as those described above, must appear in the order
shown in Figure 4-1 for proper labeling of the output data.
     The last two general inputs designate the air parcel length and
width in kilometers.  These are specified to correspond to the minimum
grid square size to which the area source da~a has been allocated.  For
the St. Louis application, the air parcel is considered to be on kilo-
meter square.

     4.1.2  Area Source Emission Control Inputs

     The user first specifies a set of NFXOUT cards which indicate the
default area source emission rates in moles per hour for the region out-
side of the emissions grid.  The order in which this data is input cor-
responds to the order of the output species names, as listed in Figure
4-1.  For the St. Louis application, the region outside the emissions
grid is rural, thus, the default emission rates have been set to zero in
the sample problem input stream.  There are, of course, cases where non-
zero default emission rates would be appropriate.  For example, if a
user generates a trajectory which parallels a major vehicular artery
prior to entering the emissions grid, the user should supply reasonable
estimates of the emission rates based on the vehicle-miles-traveled per
one-by-one kilometer grid square.
     Next, the user supplies a set of cards which describe the trajec-
tory grid square crossing schedule.  Each card contains a time in minutes
(0-1440 clock), global x and y coordinates of the crossing point, and
the corresponding grid square identifier.  These cards are punched by
the meteorological module to facilitate data transfer.  The last card in
the set is identified by a negative entry in columns 11-20.

     4.1.3  Point Source Emission Control Inputs

     The portion of the input deck which applies to the generation of
point  source emission schedules begins with  the specification of global
coordinates for the origin of the local coordinate system.  This card is.,
followed by data pertaining to the trajectory.  The card specifying the
trajectory start point in x and y global coordinates is followed by a
                                   4-12

-------
set of cards with the trajectory node times (minutes), wind velocities
(km/hr), and wind directions (polar angles).  These cards are output by
the meteorological module, and the final entry in the schedule is a
negative number in columns 41-50 of the last card.
     The user next inputs the number of vertical mesh points and the
vertical mesh point elevations in the same format used for the meteoro-
logical module input deck.  These cards are followed by schedules of
surface temperatures, atmospheric stability categories, and mixing
height elevations along the trajectory.  The times in the schedules are
specified on the 0-1440 minute clock, and each of the schedules is
terminated by a negative entry in columns 41-50 of the last card.  The
temperature and stability class data cards are output by the meteoro-
logical module.  The mixing height elevations are specified externally
at hourly intervals in meters above the surface from available meteoro-
logical data.

4.2  Description of the RAPS Input Files

     The format and contents of the RAPS/St. Louis input files are de-
scribed in this section to help the user understand the program's pre-
sent raw data requirements and retrieval software.  A common feature of
the files is that the data are blocked in groups of 510 binary words per
physical record on the tapes.  Each file, of course, has a different
number of physical records, as described below.  The data are read with
BUFFER IN statements in the CDC version of the code, but the equivalent
binary READ statements for other computers are included as comment cards
in the source listings contained in Appendix C.

     4.2.1  Emissions Grid File

     The emissions grid file contains 32 physical records of data.  The
first word in the file is the total number of grid squares which is less
than or equal to 2000 for the RAPS grid.  This word is followed by the
specification of eight parameters for each grid square as defined below:

     1)  Grid Square Identifier
     2)  Grid Square Area (km )
     3)  UTM Horizontal Coordinate of Southwest Corner (km)

                                  4-13

-------
     4)  UTM Vertical Coordinate of Southwest Corner  (m)
     5)  State Code
     6)  County Code
     7)  Average Source Height
     8)  Surface Roughness Length (cm)

The EMMOD program reads all the data in the file, but stores only the
total number of grid squares and two arrays with the grid square identi-
fiers and corresponding areas.  The importance of this data stems from
the fact that the ordering of the data in the area source emissions  file
corresponds to that of the grid square identifiers in this file.

     4.2.2  Area Source Emissions File

     The area source emissions file contains 1056 physical records of
emissions data for the single day.  The file contains subsets of 44
records for each hour beginning at midnight.  Each hourly subset lists
the Julian data, number of grid squares, hour (0-23), and emission rates
by grid squares for the eleven species listed below:

     1)  Particulates (kg/hr)
     2)  Sulfur Oxides (kg/hr weighed as SCL)
     3)  Nitrogen Oxides  (kg/hr weighed as N02)
     4)  Total Hydrocarbons  (kg/hr)
     5)  Carbon Monoxide  (kg/hr)
     6)  Dust  (kg/hr)
     7)  Nonreactive Hydrocarbons  (moles/hr)
     8)  Alkanes  (moles/hr)
     9)  Alkenes  (moles/hr)
    10)  Aromatics  (moles/hr)
    11)  Aldehydes  (moles/hr)
                                   4-14

-------
The program is designed to read as much of each hour's data as necessary
to satisfy the list of grid squares traversed by the trajectory during a
a particular hour.  See Section 4.4 for a description of these procedures,

     4.2.3  Point Source Emissions File

     The point source emissions file may contain up to 408 physical
records for one day.  The file is structured with hourly subsets of
data, and the number of point sources considered may vary from hour to
hour.  The file contains data for up to 505 point sources, which trans-
lates to a maximum of 17 records per hour.  Each hourly subset contains
the date and hour stored as a 7-character word  (YRDAYHR = year, Julian
day, hour) and the number of sources for that hour.  These two words are
followed by the seventeen parameters described below for each point
source.

      1)  UTM Horizontal Coordinate (km)
      2)  UTM Vertical Coordinate (km)
      3)  Stack Height (m)
      4)  Stack Diameter (m)
      5)  Stack Effluent Temperature  (°C)
      6)  Stack Effluent Volumetric Flow Rate (M /min)
      7)  Particulates (kg/hr)
      8)  Sulfur Oxides (kg/hr weighed as S0~)
      9)  Nitrogen Oxides (kg/hr weighed as N0_)
     10)  Total Hydrocarbons (kr/hr)
     11)  Carbon Monoxide (kg/hr)
     12)  Nonreactive Hydrocarbons  (moles/hr)
     13)  Alkanes (moles/hr)
     14)  Alkenes (moles/hr)
     15)  Aromatics (moles/hr)
     16)  Aldehydes (moles/hr)
     17)  Stack Identification Code
                                   4-15

-------
The program reads all the data for each hour of the trajectory and stores
all the data except the stack diameters, particulates, total hydrocarbons,
nonreactive hydrocarbons, and stack identification codes.

4.3  Description of the Outputs

     This section describes the printed and punched output obtained from
the EMMOD program.  The output includes a li. ting of the input deck pro-
duced by PREDAT, verification of portions of the input data, and listings
of the area and point source emissions data along the trajectory.  The
program also prints the hourly sums of the regional emission inventory
when the user selects this option.

     4.3.1  Area Source Emission Outputs

     Following the PREDAT input deck listing shown in Figure 4-1, the
program lists verification of the trajectory grid square crossing sched-
ule.  Figure 4-3 shows the first page of output for the sample problem
schedule, containing the crossing times, global x and y coordinates of
the crossing points, and the grid square identifiers.  The reader may
observe that additional entries have been placed in the schedule for the
even hours.
     Next, the program lists the hourly regional area source emission
sums when this option is selected.  Figure 4-4 shows the emission rate
sums for the eleven species with input data.  These regional emission
rates are tabulated in moles per hour with the exception of particulates
and dust, which are listed in kilogram per hour.  The reader may note
the message from subroutine AREAEM shown in the figure, which informs
the reader that due to parity errors in the file, the regional sums
could not be accurately tabulated for a particular hour.  The program
may use some data from previous hours when it encounters this problem,
as discussed in Section 4.4.
     The program then lists several pages of output with area source
emission rates  corresponding to the grid square crossing schedule.
Figure 4-5 shows a sample of the schedule, listing the crossing time,
grid square identifier, and emission rates in moles per hour.  At the
end of this listing, the program provides the total moles of each species
entrained into  the air parcel during the trajectory  (not shown).  This
                                   4-16

-------
em
ST.  LOUIS
6/39/76
(181)
ATA 8Y Gfr
i»e
360.00
394.40
420.00
421 .46
426.39
480.00
486.07
496.41
511.58
521.06
537.08
540.00
551.01
556.62
564.13
570.04
571.63
579.14
586.65
589.06
594.15
598.58
600.00
601.97

-------








^"N
«-•
CO
^



sO
r-
X.
CT-
V
•C




1
1




c
O
X







X
C
«/>







r—
a:
«x
a.







UJ

i— i
>-

9
O
UJ
IP
PI
CO
ni
9
O
UJ
CO
ru
IP
UJ
ru
o
IP
o
UJ
XI
IP
9
O
UJ
r*.
ao
-0
9
0

UJ
O
X>
V*

-"

•o
o

UJ
VI
CO
JD


IT.
O

UJ
0
-c
X
•c


IP
o
4
UJ
o
•c
ru
9


9
C

UJ
9
xi
rw




IP
0

ui
ot
o
9






O

j
j£
X>

9
O
UJ
IP
JB
ru
o
UJ
9
<5»
IP
O
UJ
.0
o
c
o
UJ
•M
IP
IP
9
O
UJ
IP
•o
Jo
9
O

UJ
o
ru
o

-*

•c
0

^
0
^^
IP


IP
o

UJ
tr-
ee
jn
•c


in
o
4-
UJ
XI
T*-
9
9


9
O

UJ
o
Kl
o-




JD
Cj

UJ
9
C
X5






o

o
fY^
9

9
O
UJ
o
9
O
9
uJ
10
9
IP
O
UJ
XI
o
J1
o
UJ
o
o
X
9
O
UJ
IP
<0
ac
XI
o

UJ
*••
CO
9

CO

sD
v^

UJ
o
o
•-*


jn
o

UJ
ru
CO
C7-
-C'


IP
o
+
UJ
»o
r^
o
9


-T
•Zt

UJ
r-
vC
CC




IP
o

UJ
IP
•C
9






0

C*
CC
9

9
<=>
UJ
9
O
UJ
o
•o
9
vP
o
UJ
IP
IP
o
IP
o
CT-
iP
9
0
OJ
,£•
CC
x>
o

UJ
iP
•«!
Or-

CO

£
^>

tja
CO
r^
x^


jn
^»

UJ
o-
p«^
o
r*


IP
c.
+-
LU
XI
CC'
—
9


9
•*

UJ
ir
o-
T




in
o

u^
in
x
9






O

O
9
IT

9
O
r-
XI
9
O
UJ
in
9
IP
O
LLJ
9
ru
•-*
IP
o
UJ
r~
sC
c
UJ
r^
ru
XI
o

kU
*-i
x>
eo

CT-

JD
O

UJ
,£'
J£
o-


in
o

'i i
r\l
f*~
9
1^


in
o
4-
LU
O
•-I
9
9


9
O

IL.
«ct
IP
IT-




IP
C.

UJ
ru
JT
XI






o

o
o
•o

9
O
UJ
IP
IP
XI
9
0
UJ
a-
CO
IP
IP
o
UJ
cr>
IP
UJ
r^-
9
UJ
CT
9
O

UJ
CO
r*-
o

•^

-0
£;

UJ
f/l
r^
IP
X,

•J^
o

UJ
•— 1
1-i
o-
r*


IP
0
4-
UJ
r\j
9
JD
9


9
O

UJ
*£
^*
o

ru


j~i
o

u;
*»
ct,
ru






^,

o
JD
JJ

9
O
UJ
ru
9
9
O
UJ
ru
ru
o
IP
o
UJ
CC
IP
*-<
IP
o
UJ
ru
f-*
9
O
UJ
ru
IP
9
9
O

UJ
•-*
ru
o

-*

•a
o

UJ
ru
«-«
ni
CC

IP
o

UJ
^
h~
JC
r^


in
o
4-
UJ
rvi
o
IT
9


9
C

Jj
^*
IT
0-

— *


IP
C

OJ
p*-
f^
9






O

O
ru
^

o
UJ

o
X

CO
3
o
14
>
UJ
a.

z
o
ex
u.

•a
<
c
UJ
2"
o
CO

1
1

C7>
Qt
o
or
i*
a-(

>-
»-
or
<
a

c,
UJ
a
U-
>—
^
U3
O
t->
£.
Uu

i
LU
•a
UJ
a
4

\^V
2
»—
^~
^j
O
ct
CC
3
CO
o
UJ
3
or
C
I

CO
~3
0
*-•
;>
UJ
a.

z
o
ar
u.

«x
^.
4
0
UJ
«L
^\
to

1
1

to
Qt
0
J^
a:
•u>

>-
•-
a:

Jt
UJ
»—
^
^
c
o
£
aj

•*
u>
4
UJ
X
<

Ui
2
>—
»—
^J
o
tr
:£.
JD
cn
                               0)
                               DO
                               •rl
                               U,
4-18

-------
in
^
c
    u;
    o
    ct
    UJ
    a:

X
o
00
o

o
u
o
'Jj
0
_J
c
ac
o

u
Ul
c

u
cc
o.

X
o
i 0
t- Kl
ru
Ul
ru
9
in
Kl
=0
o
S
ru
0
71626-
Kl
O
•32E/2
.n
o
•3E055
^
c
1579E
0
K-
in
3
X
O
9
9
3-
Kl
ru
c
UJ
ru
9
in
Kl
00
o
Ul
4-4
9
tr
ru
o
7177E-
Kl
ru
o
27376-
in
o
55186-
•"
o
in
c
i
9
X
O
0
o
ru
9
O
Ul
X
Kl
X
•"•
o
UJ
oc
in
m
Kl
0
•306017
o
•36902
ru
o
UJ

o
c.
0
9
O
Ul
ru
ru
"
o
Ul
o
9
9
O
UJ
X
00
in
•-4
o
Ul
un
rv
a
•31599
X
0
0
0-
•-4
0
I
CO
0
X
CC
9
ru
o
Ul
CO
X
ru
oo
CD
O
Ul
o-
r*.
ru
o
86036-
9
ru
o
3888E-
00
o
Ul
••4
Kl
Kl
•O
ru
o
I
4565F
in
o
o
Jj
9
ru
oo
9
O-
9
ru
Ul
00
00
*
0
1-36500
ru
o
Ul
tr
Kl
ru
o
Ul
X
o-
X
o
Ul
w-4
O
X
Kl
CC
o
t
35005
o
0
>3t»f 82
O-
CO
J1
in
ru
o
•396176
X
o
Ul

cc
0
84666
ru
o
o
UJ
CC
Kl
IM
O
ru
9
^
t-
in
o
ul
o
a
in
9
O
UJ
9
O
o
K3£/95
o
0
5P49E-I
ru
o
UJ
Kl
ru
o
o
00
o
Ui
9
9
9
O
67b6E-i
o
ru
in
X
X
CO
in
ru
o
•3999E
01
o
UJ
in
in
Kl
in
o
Ul
ru
r-
Kl
ru
o
Ul
ru
in
o
X
o
1679E1
Kl
O
ul
Kl
00
Kl
ru
c
o
1
o
ru
X
o
cr
00
in
o
ul
9-
9
Kl
O
Ul
in
X
Kl
O
O
u>
e
in
IM
o
o
Ul
9
C
a-
CC
Kl
O
Ul
00
o
•-*
in
X
o
Ul
o
in
in
00
o
c
I-3S17/10
CO
Kl
cr
c
ru
in
9
un
0
37366-
X
o
,6376E-<
X
o
o
Ul
9
Kl
in
o
o
Ul
00
in
in
9
**
O
Ul
Kl
00
00
•*
O
Ul
9
00
9
O
Kl
I
O
IM
CC
in
00
IT
in
*••
o
Ul
N-
9
X
O
Ul
Kl
9
in
o
o
o
Ul
ru
in
o
o
>39(7S9
•"
o
UJ
OO
9
Kl
CD
"*
O
1038E
Kl
O
67956-1
9
O
ru
o
o
o
X
o
111
X
9
Kl
9
in
o
Ul
9
O-
00
a-
in
o
o
Ul
ru
ru
o
o
4778EH
Kl
0
1
r»-
o
36550
o
Ul
•-4
X
in
ru
r~
o
                                                                                                                 0)

                                                                                                                 fH
                                                     4-19

-------
portion of the output is followed by a listing of the same area source
emission rate schedule in the code's units of mole fraction-meters per
minute.  This schedule is illustrated in Figure 4-6, which shows the
global coordinates of the grid square crossing points, in addition to
the crossing times and emission rates.  This schedule concludes the
printed output from the area source portion of the program.

     4.3.2  Point Source Emission Outputs

     The output from the point source portion of the program begins with
a verification of the trajectory description (see Figure 4-7).  This
page of output is followed by verification of the temporal schedules for
atmospheric stability class, the surface temperature, and mixing height.
Examples of these verification outputs are shown in Figure 4-8.
     The program prints the regional sums of the point source emissions
for each hour of the trajectory when this option is designated in the
input deck.  Figure 4-9 is an example of this printout, with the region-
al emissions rates of all the input species listed in units of moles per
hour, except particulates, which remain in kilograms per hour.
     The program lists data concerning the point sources with emissions
entrained into the air parcel.  As shown in Figure 4-10, the program
prints the effective time at which a source is passed, the fraction of
its emissions which will be entrained into the air parcel moving along
the trajectory, the perpendicular distance from the trajectory center-
line to the source, and the emission rates for the output species in
moles per hour.  The treatment of point source emissions in the Lagrangian
reference frame is quite complex; therefore, the reader is referred to
Section 4.4 for an explanation of the methods used to determine the
effective passing time and the fraction of emissions  entrained into the
air parcel.
     Next, the program prints the actual number of moles entrained into
the air parcel from each point source and its vertical distribution.
Figure 4-11 is an example of this listing, which first shows  the output
species names and the ranges of elevations of each vertical cell to
which  the emissions are allocated.  These ranges of  elevations are
determined from the vertical mesh geometry input to  the program.  For
each point source in the schedule, the  listing shows  the effective
                                    4-20

-------









•-•
00
X
(V
X,
4
Z
•JU
Ui
u
(3
to
Ul
or

X
O
CO
o

o
u
o
UJ
o
_J
•a
o
2
0
4
o
u.
Ul
_!
0
u.
a
"
X
O
>- ~
5. 3
x -O
1 0
t- it
r x
o
X 0
»— 1 X
h- Kl

U>
ru
9
ru
9
Kl
0
U.'
X
9
cr
a-
»o
i
Ul
ru
•0
ru
in
„
i
Ul
Kl
ru
Ul
r-
9
cr
o
Kl
UJ
X
9
9
UJ
ac
0-
(X)
3-
cr
ru
o
*
9
9
If
Kl

UJ
ru
9
ru
9
Kl
O
UJ
in
cr
cr
"*
i
Ul
OD
to
ru
in
^
Ul
ru
UJ
Kl
in
cr
o
Kl
Ul
OS
9
9
O
Jj
X
c
K-
I
ru

in
a?

o
ru
9

UJ
Kl
cr
•o
r-
9
O
UJ
9
M
X
~
i
Ul
t*l
in
N.
Ph.
in
UJ
to
in
c
cr
o
Ul
0
00
0
rvi
o
Ul
cr
cr
in
to
cr
o
,069'ie-
_,
VI

in
ru
9

Ul
cr
in
o
o
X
o
UJ
o
r*.
Kl
«j
i
u>
K)
0
9
00
C
UJ
OO
in
Kl
O
u;
•-*
o
9
00
ru
c
aJ
o
t*.
Kl

0
in
•o
ir
9
X
ru
9

Ul
f
nj
X
in
O
Ul
X
07
O
ru
1
Ul
cr
X
00
in
c
UJ
o
ru
o
Ul
00
X
OD
9
IV
UJ
ru
o
Kl
Kl
CT
Ul
9

ru

UJ
ru
ru
X
ru
LLj
oo
CO
Kl
*<«
in
o
Ul
9
in
in
ru
o
Ul
o
Kl
CO
n.
ru

|
•-*
r*-
Kl
in

UJ
er
**
o
9
Kl
r*.
cr
ru
UJ
9
OO
Kl
(V

Ul
in
ru
ni
X
OD
9
O
Ul
X
SC
o
Ul
in
OB
-C
in

o
c
o
9
in

Ul
to
X
X
w«
Kl
O
Ul
OD
OD
OD
cr
UJ
cr
X
X
o
Ul
00
00
9
0
Ul
o
v-l
9
O
Ul
ru
X
9
cr
cr
0
nj
IP
in
in
in
Kl
C
in
m

Ul
cr
ru
o
ru
X
o
UJ
X
Kl
in
ru
9
Ul
Kl
tf
r-
o
ru
UJ
tr
Kl
o
1
al
ru
ru
I
UJ
X
9
X
X
cr
o
UJ
in
9
1*1
X
in
IT
ru
o
in
o

in
in

Ul
ru
f-
9
ru

o
UJ
in
CO
o
o
ru
ru
UJ
o
o
00
Ul
m
t*-
ru
ru
ru
UJ
c.
in
Kl
oo
V*
ul
0
er
in
r-
o
aJ
*•
ru
a
X

o

9
in

UJ
ru
r»
9
ru

o
Ul
in
00
o
0
ru
ru
UJ
o
o
cc
UJ
in
ru
ru
ru
Ul
o
in
to
_
Ul
o
er
in
9
O
Ul
in
cr
CC
9
	
Jl
IVJ
X
at
o
o
in

Ul
ru
X
f*.
to

o
Ul
ru
9
O
cr
9
i
UI
to
ru
o
Ul
ru
X
OD
O
t
ul
cr
cr
o
o
Ul
OD
u
00
ru
oo
to
in
cr
o
Ul
00
X
X
o
Ul
9
tr
cr
XI
in
ru

~

(r
in
o
UJ
9
00
CC

o
Ul
cr
o
Ul
cr
in
0
in
X
cr
o
Ul
in
cr
in
o

UJ
0
o
03
ru
cr
o
Ul
o
OD
O
er
in
o
~jj
t*-
SC
-c
CO
in
ru
o
to

OD
in
••«
Ul
ru
CD
9
OD
Kl
O
UJ
cr
•o
00
ru
Ul
OD
er
9
cr
o
Ul
OD
0
00
9
ru
o
UJ
9
OO
ru
o
Ul
p-
X
Kl
O
Ul
CO
•c
CO
9
^
cr
IT
ru
•C
K,
r-
OD
in
o
Ul
Kt
O
•"
o
Ul
in
er
cr
UJ
9
9
X
O
O
Ul
X
9
IT

Ul
OO
X

-------
               CO
Of
ru
_t


o

"*>


CO


c



to
HH
s:
      a:
      e
      t—

      Uj     <-t
      ac
< UJ O O
*- UJ 1*- CC
uj o: ru xi
•— UJ -c ru
C. X! X
tM*
>-
t— <->
i-i Qf O --
ox 0- ru
a >< c ;»
U-! ^ -* CC
in o
/-> o ru
> *r =J ^
»— ru x>
re ru
=? ^

r* 9 tr
X j£ 0 7
o-* co a.
X X
^ C O
a.' Z • •
S ^^ C* «^
^5: x> ru
V_ v^ K> ^
cs •
ua o — < ru
OOOOOCOOGO
cc Xt ^T c^ -X> ru r^- co ^J ^J
o^moo^r^-^ruinin
u^-^o^inrux>otoinin
53 nj ru ru >r ^r xi ru ^* **
ooooo-^ocoo
xiccoooxtcocoxsruru
ai—'S3xix> — xiineoec
x^inin^.*cr^5r^
XJT =3 ruru>oocCvCXi
x>« — x-^xicrcoor-
«™* X* 'O ^* O 3C *~* *~* f\J CC
>rinx>or^i;o.^ruru
rurururururuxi^txixs
^r^^^^^^r^^sj-
^•^.irruxxixiCT-inx'
x-iTvj">oCT>ov^''>ox!ru
cr o ȣ; o xi cr ru cr cc ru
x> o. --^ PO ^j" J"> ^*^ cc o v>
,£!^t~-»^'*-«^(^I^CecO
coooooo ooc
• •••••••••
O^O 3-O.OOC-OO
cc^oxriioc^roxiru
^finxx'f-f^ccCT'cro
^*

xt>j inx i«-eC'Ovo«-
in
XI
x\
*
cc
•-4
sC
in
CC.
O
•
c
CC
o

XI
                                                                                                       r--
                                                                                                        i
                                                                                                        cu
                                                                                                       •H
                                                                                                       u.
                                              4-22

-------
STABILITY CLASS  DATA




  Tl»F      CLASS
360
660
720
900
960

SljRFACf
TIME
360
420
480
540
600
660
720
780
840
900
960
1020
2
5
?
3
P

TEMPERATURE DATA
TEMPERATURE
21.5
22.4
24.4
26.5
37.7
26,5
?8.5
29.6
29.4
29.3
29.7
29.6

^IXIMG
TIi'.fc
360
420
480
540
600
660
7?0
7HO
640
900
960







LAYER DEHTI
UtPTH
200.0
P70.0
340.0
410.0
490.0
600.0
710.0
820.0
"30.0
1040.0
1080.0






                         Figure 4-8
                           4-23

-------











X
Jj
a-
'Vj
X
i
i


V.
^
•s-

t

-L
—1
~
— UJ
/) ir t
- X 0-
Q.
•-( >— X
(X!
o
UJ
ct
(V.
in
3
o
UJ
ru
XI
'Vi
1*1
JJ
cr
PO
o
UJ
X

f*.
c
c
in
in
fVt
*
u.
X.


J-
c.
n.
A!
£

I
~
Oi
•~
^
XI

(XI
3
C
a-
o
0
nj
w.
^
UJ
3
UJ

o
UJ
o
Jl
r
"1
X
in
U.'


in
o
x
ji
X

^
"


•0
3
O
rxi
in
0
3

x
in
UJ
a:


•3
3
CC
£

CC

rw
=
r*;

p-
o
3
»
ru
o
UJ
PO
X
3
3
O
UJ
a-
o
(XI
m
3
O
UJ
X

f*1
3
O
in
IV
a-
ru
in
o
£

o
UJ
•o
ru


.n
£
o

rj-

rv
-•
u.
j-.
•o
3
O
o
o
o-
rvi
o
UJ
JJ
3
O
UJ
PC
PO
cr
PO
UJ
o
(XI
J-.
3
O
UJ
3

PO
3
O
in
o
rt

o
UJ
o-


£
X
3.
O

•v

rv
^
UJ
fXi
3
C
C
a-
o
UJ
x>
3
3
UJ
PO
o
UJ
o
(V
3
o
UJ
o
3

>o
3
O
c
0-
in
0
3

X
1/1
UJ
I


in
o
in
CC
r
o

"U

(Xl
-
u.*
IT

3
rvi
o
                                          I
                                         *3-

                                         0)
                                        •H
                                        Ci,
4-24

-------
                                      o
                                      o
                                      U)
                                      
9
in
             u>
             o
o
o
*
UJ
o
9
ru
in
(V
o
»
ILl
O
•-4
-0
9
ru
o
I
Ul
o
«o
I/I
rvi
ru
o
+
UJ
0
KO
in
in
po
o
»
UJ
Kl
IV
O
Itf*
(XI
o
«•
UJ
9
9
9
.n
o
o
*
UJ
•a
in
iy
CO
             o
             X
                                                        o
                                                         I
                                                        UJ
                                                        cc
                                                        IT
                                                                           Kl
                                                                           O
                                                              (V     -•
                                                              O    O
                                                              4-     •••
                                                              UJ    UJ
                                                              Kl     <4>
                                                              h-     •£>
                                                                     in
                                                                                                          ui
                                                                                                          <0
                                                                                                          9
                                                               9
                                                               in
a-
nj
             ui
             _j
             c
             u.
             ct







a
o
+
Ul
to
N-
o
Kl
9
O
1
.fli
CO
to
0
o
c o o ru o
o
0
Ul
CD
o»
in
9
oor-ooooo
o
«>
Ul
r-
rvi
o
K>
O O O 9 O







O O O O
•fr
Ul

a-
in
9
Ul
O
9
ru
in
ru
o
 I
UJ
to
a-
                                      o
                                      *•
                                                               9
                                                               9
                               9
                               O-
                                                                                                                       (XI
                                                                                                                       o
                                                                                                                       •o
                                                                                                                       9
(XI
o
*•
UJ
in
CO
9
in
                                                                                                                                  O
                                                                                                                                  1—I
                                                                                                                                   I


                                                                                                                                  a)

                                                                                                                                  3

                                                                                                                                  •H
                                                                                                                                  u,
      O
      I
      o
      2:

            UJ
            o
       »    .2
                   O    —
                   o    o
                   +     I
                   UJ    UJ
                   •O    -O
                   9    m
                   f~    C
                   ^4    O
                                                        o


                                                        o
                   o
                   9
                   ru
                   IT
^

n.
                         r\i
                         c
                                                  ru
                                            -•    -c
                                            jj    3-
-H    LTl
f    IT
O-    ,C
                                                                                 O
                                                                                 a
                                                                                       o
                                                                                       Kl
                                                                                 C
                                                                                 ro
                                                                           a-
                                                                           o
                                                                                                    CO
                                                                                                    cc
                                                                                             CC
                                                                                             CO
CO
00
                         CO
                         
                                                                                                                      O
                                                                                                                      •O
O
HH
to
to
X
Ul
t—
3C
UJ
Ul
(J
a: o
^ CC
to s coc«or--t-ir«— 999*
rnr2:^^s;si!G*™Sr?"

IT r-
o> a-
aO to
ru ru

9
O
ru

o-
ru
Cf
(XI

o
to

ru (U

                                                                               4-25

-------


o
0
0
o
0 0




o-
9
•14
ru


o
o
o
o
0 0




9
•£>
in
••*
ru
o
I
Ul
ao 0
9 O
tr, o
« 0
in o
ru
o
i
UJ
•£ CO
t*» f^
in —
cc ru
0
u»
in o
rj» o
ff\ O
J3 o
in o
ru
o
i
UJ
ru ec
(7- 1^
in —
eo ru


o
0
o
o
0 C.




ec
fw
Ph
•*


O
o
0
—
0 O
J
o
1
lu
FO C^
ru         o*        •>•        ("f"                  9        O

                           O        —     U_ ^        UJ                  UJ        UJ        '-'i                            UJ        nj        UJ                  iji        i«|        UJ        tLJ                           ^
       t/5     uj
       •->     _ll
       Q     a o
 i               •-
 I     _l        ru
       :>     u. ru
              at
       c     <  i
       ~z     a. o
                 c
                 •c
        I     O  I
        I     20
 C     «        CO
 S.     *->        2.
       £        O
 to    tu     co M*
 £           UJ t-
 O    UJ     •- <
 ""•I    O     (-> >
 co    a     uj Uj        o         o         ao        o        o        r*-        r-        o        o        ~*        cc        ru       ru       ru       rj>        in
 CO    w     Q. j        ec         9         9        in                    3'O*~*~*~*9v***~I*ruruincGcCcD4>6OCO
 uj                  »*o*-***<-«~*rurururururururu(Xiru(Xf

 I-    2

 Ul    O
       a.
o
o
*
UJ
pirn
^
ru
in
9
O
O
1
UJ
9 O
— (VI
CO 9
(U
O
1
^. o
••* ru
CO 9
ru
o
i
UJ
0 CC
O t»l
*
in
o
o
in
o
0
o
0
UJ
CO 9
ru
0
I
UJ
fl fo
9
o
o
Ul
9 Kl
-4 eo
ru m
„
o
ru
r»i
o
in
c
i
Ul
fu in
ru 9
CC Cl
Kl
IT
O
1
UJ
ru in
ru 9
00 f:
!"
in
o
1
UJ
ru in
(XI 9
go Kl
d
••*
o
1
UJ
ru J)
r^eo
M
ft ^D
fl I'l
O O
I—I
&
o
o
UJ
cc *O
o ~«
»^ ru
fO

co
0
ru
C:
O
UJ
ru ru
— (VI
f> ru
—
o
ec 10
wi ru
— ru
ro ru
—
o
0
9 O
Kl (V
« (O
rv
o
0
UJ
••« 0
9 (VI
^
900
O O 0
u: ui UJ
90 9 i"* in •£
ru o 9 cc \c  —
o in
0 O
UJ UJ
— > o a~ ru — i
KI pr ru cc co
Kt 0 l»l
in
o
U.1
ru fo
ru -<
Kl
rfl
O
UJ
ru ro
to jo
ru -«
CC fO
(O
0
Ui
« 9
fo po
f- C
in tfi
9

O
0-
0
0

ni
CD
O
o




ffl
tt
ru
"
^4
0
4.
UJ
r- f-
f- *
ru ^
•-< w
^J
O
^
U.I
ec o
9  fO
r^ —* **




o

in
•"
                                                                                        4-26

-------
passing time and moles of each species entrained on one line.  The fol-
lowing line indicates the normalized vertical distribution of the emis-
sions with respect to the vertical cells.  At the conclusion of this
listing (not shown), the program prints the total number of moles en-
trained into the air parcel during the trajectory.
     Lastly, the program prints the same schedule of point source emis-
sions in the units required by the chemical-diffusion module.  Figure
4-12 shows an example of this listing where the species emissions are
shown in the units of mole-fraction meters.

     4.3.3  Punched Outputs

     The program punches, on logical unit 1, the area source emissions
schedule shown in Figure 4-6, in a format suitable for input to the
chemical-diffusion module.  Similarly, the program punches out the point
source emissions data shown in Figure 4-12 and the vertical distributions
shown in Figure 4-11 for each source in the schedule.

4.4  Computational Procedures

     The computational procedures of the EMMOD program will be discussed
in the order in which they occur in the program.  The computational pro-
cedures of the program are quire simple for area source emissions and
quite complex for point source emissions.  The complexity in the treat-
ment of point sources stems from the fact that the approximate effects
of lateral (cross-trajectory) dispersion of point source emissions are
accounted for in the emission schedules.

     4.4.1  Area Source Emission Tabulations

     Once the program has read the general inputs, the grid square
crossing schedule, and default emissions from the card deck, the program
reads and stores the emission grid square identifiers and areas  (sub-
routine GRIDIT).  It then proceeds to insert entries for the even hours
in the grid square crossing schedule (subroutine ADHOUR).  These addi-
tional entries are necessary since new emissions data is available for
each hour.
     Program control is then passed to subroutine AREAEM, which reads
the area source emissions file and generates the schedule of emissions.
                                   4-27

-------



00
*"" '
-C
N.
o-
•v
•c





t
1


oo
^1
o
_l

•
t—
to




i
i




jj
?
^

0
1
UI
in
co
Kl
O «1
UJ
CC
in
o a

tr
o
i
jj
fw

o
UJ
Kl
CD
ru
ru
O Kl

1^ OC
O O
1 1
UJ UJ
^- C"
«-« K"r
o- -«
^) 3
r»- • !T






S OD

Z^ —


a.
1
UJ
a-
00
Kl
-O
O
1
UJ
o
ru
tr
o
1
UJ
»
OC
K^
O
1
UJ
ru
ru
in
9

u.
o
i
UJ
^
53-
Kl
O"
•D
O-
0
UJ
o
~-4
Kl
ru
KI

=o
o
1
aJ
UI
h^
»-«
^
;}






O
in
-



0
o
o


c

00
o
1
UJ
ru
co
*0
o-
-
00
o
lu
Jj
IT-
~C
Kl
in









o






^
•o
IT



O o O
O O O
000
3} ru
o —
If
I
UJ UJ
CC O
CC -JD
D
in cc in
co sr KI
=» ru in
-i ru —









C C. 0






f1* I*- O
CC CC P-
-• ^ ru
ru ru ru



o
0



o

30
o
9
UJ
in
o
•c
o
"
00
o
JU
Kl
Kl
o>
00
ru









o






o
r-
ru
ru


r~
o
t
UJ
ru
0 Jl
0 0
0 O


o o

00
o
1
UJ
*JD
•£
oo
o-
ru o
CO
o
UI
'U
CO
9
—•
3C 0









o o






— t co
in ~
IT. cc.
ru ru


ru
I
UJ
in
CO
ru
0
Uj
f**
in
CO
in
.4022E-13 1.
o-
Kl
•-*
UJ
Kl
"
Kl

Kl
^*
1
UJ
ru
*u
0
9

Kl
i
UJ
e\i
ru
o
=1
o^

o
•-4
1
UJ
ru
XI
~-
t;
0






ru

CO
ru


co co -o r>
o o o o
I I I i
UJ UJ UJ UJ
ru o" ru •*
r- =» ry —
ru o- 9 co
-O ;» o i
o KI ru -^ ru
o o o o o
o o o o o


o o o o o

o-
o
1
UJ
ru
ru
ru
•*
5» O O O O
00
0
•
vO
53
ru
-*
-10000









o o o o o






O- in r- 53 o
J3 o- a- o ru
SO 30 30 O- O*
ru ru ru ru ru



o o o o o
o o o o o
o o o o o
O- CO » CD CO
o o o o o
tit l«l ill UI i»J
ru .0 a- ru KI
o- » co -• ~o
v ru co KI -a
•c co ru cy* 1/1
K| vi ^ Kl K^









O O O O O







O O O O 0









o o o o o






o o o o o
Kl Kl Kl Kl Kl
0> s> 
-------
AREAEM skips data in the file pertaining to hours before the trajectory-
start time.  It then enters an hourly time cycle to determine the larg-
est grid square identifier in the current hour's grid square crossing
list.  It proceeds to read the data in the file up to the point where it
passes the data for the largest identifier, and skips the remaining data
for that hour.  If the user has requested printing of the regional sums,
of course, all of the data for that hour are read.  The program then
locates the species' emission rates for the grid squares being crossed,
and adjusts the rates to represent moles per hour for grid squares with
areas defined by the air parcel length and width inputs.  The hourly
time cycle is repeated until the program has located and adjusted the
emission rates for all grid squares crossed by the trajectory.
     If the program encounters a parity error when reading the area
source file, it uses the data from the previous hour for the subset of
grid squares with unreadable data.
     The program prints the schedule of area source emission rates in
moles per hour, and then proceeds to convert the data to the units re-
quired by the chemical-diffusion module.  The required conversion of
moles per hour to mole fraction-meters per minute is described below.

Let:        =  emission rate in moles per hour
          M  =  molecular weight of air (28.97)
          p  =  density of air (grams per cubic meters)
          A  =  air parcel area (square kilometers)
          a  =  10  square meters per square kilometer
          (3  =  60 minutes per hour
         '  =  emission rate in mole fraction-meters per minute

Then:    $'  =  -^r                                               (4-1)
         y      agpA                                               v   '

Following this conversion, the program proceeds to print and,  optionally,
punch the area souce emissions schedule.

     4.4.2  Point Source Emission Tabulations

     The objective of the point source algorithm is to determine the
pollutant emissions entrained into a Lagrangian air parcel travelling

                                   4-29

-------
across the modeling region.  To accomplish this objective, the program
examines the meteorologically-dependent characteristics of point source
plumes intersecting the trajectory path.  Plumes are treated on an indi-
vidual basis, assuming that the lateral and vertical dispersion of emis-
sions is Gaussian in nature.  Dispersion of effluent from tall stacks
and short (less than 100m) stacks are simulated by using separate sets
of diffusion coefficients.  The rise of an individual plume near the
trajectory is calculated with consideration of inversion penetration by
buoyant plumes.
     To comprehend the algorithm, the reader should first understand how
plumes are believed to be entrained into a fixed size Lagrangian air
parcel.  Figure 4-13 schematically illustrates a side view of a parcel
passing a point source.  Assuming for the moment that the source is
within the air parcel, the parcel entrains the emissions for the time
period required to pass the source.  Once these emissions have been en-
trained, lateral dispersion occurs, which may carry a portion of the
pollutants out the sides of the parcel.  Similarly, the parcel may pass
a source whose perpendicular distance from the trajectory's center line
is greater than the parcel's half width, and its plume may disperse into
the parcel at a distance downwind of the source.  This lateral spreading
of plumes into and out of air parcels is illustrated in Figure 4-14.
     According to the K-theory of diffusion, lateral dispersion of en-
trained emissions continues until the lateral concentration gradients
become negligible.  For practical considerations, the program makes the
assumption that the majority of lateral spreading occurs during a fixed
time interval, currently set at one hour.  Hence, the portion of stack's
emissions that remains in the air parcel after one hour of dispersion
forms the basis of the point source emissions schedule used by the
chemical-diffusion module.  The vertical distribution of the entrained
emissions depends on the meteorological conditions and individual stack
parameters;  and, these distributions are also generated for use by the
chemical-diffusion module by the program.
     The point source algorithm's computations begin after the trajec-
tory data, vertical mesh,  temperatures, stability class, and mixing
heights have been read by  the main program, and program control is
passed to subroutine PONTEM.  PONTEM performs several initialization
tasks, which include calling SEGMET.  SEGMET determines the distances
                                   4-30

-------
Moving
•Mr Parcel
                                   Plume
                     Point Source
                             Originally
                             Entrained
                             Emissions
                        I
                                                 Vertical  Spreading
                                                 of Emissions
                               >  X and t
                                fixed source location
     Figure  4-13   Plume Fntrainment in a Lagrangian Air Parcel
                   (Side Views at time = t,,  t   t_)
                                  4-31

-------
a)  Plume Spreading Out of Parcel  (CenterHne Passing)

                                       Plume
Trajectory
Path
                                                            Concentrati
                                                             nistributib:
 Z
4-
                                                                       m
      Entrained
       Emissions
                                                                         *- parcel

                                                                         t_ plume
b)  Plume Spreading Out  of Parcel (Off CenterHne  Passing)
                       Point Source
Trajectory
Path
                                                                       i  t- parcel
                                                                      ^- plume
 c)  Plume Spreading Into Parcel
Traiectory
Path
                                 ^Affective passing time
                                                                          plume
       parcel
              Figure 4-14    Lateral  Spreading of Plumes  Into
                               and Out  of Moving Air Parcels
                                          4-32

-------
Height
         Zi
         Z   ••
inversion base height
effective source height
                  Concentration
Figure 4-15   Vertical Distribution of Emission Below Inversion Base
                              "4-33"

-------
between trajectory nodes and the bisector angles between trajectory
segments.  It also determines certain maximum distance criteria, which
are functions of stability class and the maximum segment length.  These
criteria are subsequently used by subroutine LOCATE to efficiently
select a subset of plumes along a segment, which may intersect the tra-
jectory path.  PONTEM then calls subroutine STACKS to read the RAPS/St.
Louis point source file for the first hour of the trajectory.
     Following the initializations tasks, PONTEM passes control to an
outer loop, which cycles through each segment of the trajectory.  Sub-
routine GESTAB is called to retrieve the current hour's and subsequent
hour's atmospheric stability classes.  Also, the time period for entrain-
ment is calculated from the current wind speed and the parcel's length.
     Control is then passed to an inner loop, which considers each point
source in the current hour's emissions inventory.  Subroutine LOCATE
examines the location of a source relative to the trajectory segment end
points and bisector angles to determine if it meets certain preliminary
or relative position criteria.  If a source meets the criteria, subrou-
tine PLUMAS is called.  Here, special treatment is given to sources
passed with a perpendicular distance greater than the parcel half width.
PLUMAS determines whether or not the edge of such a plume intersects the
side of the parcel within one hour after passing the source.  For prac-
tical purposes, the program considers the edge of the plume to be the
10% centerline concentration boundary (i.e., a  = 2.14).  Plumes which
fail this test are ignored.  If the plume edge is found to intersect the
parcel within the current hour, the program resets the passing time to
the time at which the plume edge is intercepted.  For sources within the
air parcel path, the passing time is simply the time at which parcel
center is perpendicular to the source.  PLUMAS next evaluates the frac-
tion of entrained emissions which exist in the air parcel one hour after
the effective passing time.  This computation involves the lateral inte-
gration of the Gaussian concentration distribution over the width of the
air parcel.  Changes in wind speed and/or stability class during the
hour are accounted for in the assumed Gaussian distribution.
     Given the fraction of emissions entrained from a source, PONTEM
proceeds to  calculate the vertical characteristics of the plume.  Sub-
routine DHPLUM is called to determine the source's plume rise and inver-
sion penetration fraction, using formulas developed by Briggs,  1969 and
                                    4-34

-------
1975.  This information requires the following information:

     •    Ambient and stack effluent temperatures
     •    Wind speed and atmospheric stability class
     •    Stack height and volumetric flow rate
     •    Inversion height or mixing layer depth
     •    Potential temperature gradient in the inversion layer

The effective plume centerline height is determined from the source
height and plume rise.  Next, subroutine PARTIT is called to evaluate
and integrate the vertical concentration distribution.  This distribu-
tion is currently evaluated 20 minutes after the time of passing.  For a
source below the inversion base, the program assumes the distribution is
Gaussian with reflections at the surface and inversion base as shown in
Figure 4-15.  Subroutine PARTIT integrates this profile over each verti-
cal cell to determine the vertical distribution of emissions.  The
fraction of emissions which penetrate the inversion base are allocated
to the cell which bounds the inversion, unless the inversion base is
within ten meters of the next vertical cell's lower boundary.  When this
occurs, the penetration fraction is allocated to the next vertical cell.
     The computations within the inner loop are complete when the pro-
gram has stored the passing time, source emission rates, entrained mass,
and vertical distribution for each qualifying source on a trajectory
segment.  Program control is then returned to the outer loop which up-
dates the temperature and mixing height data and reads another hour's
data from the RAP point source file.  This cycle of computations is
repeated until all the plumes intersected along the trajectory have been
evaluated.
     PONTEM then orders the data chronologically and converts the units
of the entrained emissions to the units required by the chemical-diffusion
module.  Given the entrained emissions in moles, the conversion is per-
formed as follows:

Let:      <|>  =  moles entrained
          M  =  molecular weight of air (28.97)
          p  =  density of air (grams per cubic meter)
                                  4-35

-------
          A  =  air parcel area (square kilometers)
          a  =  10  square meters per square kilometers
         '  =  mole fraction-meters entrained

Then:    «(,'  =  -^
                ctpA

Following the units conversion, PONTEM proceeds to print, and optionally
punch, the point source emissions schedule.

4.5  Internally Specified Data

     The emissions module has numerous internally specified parameters
of which the user should be aware.  Table 4-2 lists the parameter's code
variable names, functions, and location in the code.  Only one of the
parameters, the density of air, is specific to a particular modeling
region.  The user should change the surface air density value when apply-
ing the model to a region with surface elevations significantly above
sea level.
     Two additional tables are provided which contain information on
plume dispersion coefficients used in the model.  Table 4-3 list the
plume dispersion coefficients, a  and a , for non-tall stacks.  Table
                                y      z
4-4 lists the coefficients, a, b, c, and d, used in the formulas to
determine tall stack plume dispersion coefficients.  The data in the
tables was obtained from Turner, 1969, and the ASME, 1968.

4.6  Program Modifications

     As previously mentioned, the program has been equipped with re-
trieval software to read the RAPS grid and emissions files.  For adapta-
tion of EMMOD to a region other than St. Louis where the data formats of
available data are quite similar in structure, the user may redesign the
retrieval software in subroutines GRIDIT, AREAEM, and STACKS to suit the
data base.
     The point source portion of the program is considered to be quite
general.   If the user designs a new subroutine STACKS to fill the appro-
priate arrays with the proper data, the program should run without dif-
ficulty.  The user should note that the arrays in STACKS are presently
dimensioned for 505 point sources per hour, and can easily be enlarged.
                                    4-36

-------
     The area source portion of the program is not considered to be gen-
eral enough to utilize without major modifications for most regions
other than St. Louis.  Users adapting the program to other regions may
find it more convenient to acquire ERT's FLXGEN program.  The FLXGEN
program is a general-purpose regional emissions processor capable of
generating area source emission schedules for the chemical-diffusion
module.  It assembles inventories for up to fifty different area source
categories and uses constant-size grid square I and J indices instead of
variable-size grid square identifiers.
                                   4-37

-------
                                TABLE 4-2

               EMISSIONS MODULE INTERNALLY SPECIFIED DATA
Variable Name

  ROAIR


  SIGEDG




  DTFREZ



  VDXFRC



  DTDZ



  NDY



  XDY



  SIGYD




  NDZ



  XDZ



  SIGZD




  NCAT
  ATALL,
  BTALL
               Function                      Location

Density of air (gin/meters ) (currently       EMMOD
set equal to 1178)

The lateral edge of a Gaussian plume,        EMMOD
defined by the number of standard de-
viations from the plume's centerline.
(currently equals 2.14)

The time interval for consideration of       EMMOD
lateral diffusion from a point source
(currently set at 60 minutes).

The non-dimensional fraction of DTFREZ       PONTEM
at which a plume's vertical distribu-
tion is evaluated (currently equals  .33).

Potential temperature gradient (°C/m)        PONTEM
in the inversion layer (currently equals
.0137).

The number of distances downwind for         BLOCK DATA
which  lateral dispersion coefficients
(a ) are tabulated (currently equals 4).

The distances downwind corresponding to      BLOCK DATA
the tabulated lateral dispersion coeffi-
cients (km).
The tabulated lateral dispersion coeffi-     BLOCK DATA
cients (a ) as functions of atmospheric
stability^class and downwind distances
(km).

The number of distances downwind for         BLCOK DATA
which  vertical dispersion coefficients
(a ) are tabulated (max = 12).
The distances downwind corresponding to      BLOCK DATA
the tabulated vertical dispersion coeffi-
cients (meters).

The tabulated vertical dispersion coeffi-    BLOCK DATA
cients (a ) as functions of atmospheric
stability class and downwind  distance
(meters).
Number of tabulated atmospheric stability    BLOCK DATA
classes  (max = 6).

The "a"  and "b" coefficients  by stability    BLOCK DATA
class  in the tall stack lateral dispersion
coefficient formula a  = ax^.
                     y
                                    4-38

-------
                         TABLE 4-2   (CONTINUED)


Variable Name                   Function                      Location

  CTALL,         The "c" and "d" coefficients by sta-         BLOCK DATA
  DTALL          bility class in the tall stack vertical
                 dispersion coefficient formula a  = ex .
                                   4-39

-------
                                TABLE 4-3




            PLUME DISPERSION COEFFICIENTS FOR NON-TALL STACKS
a)  Lateral Dispersion Coefficients (a  in kilometers)
Distance
Downwind
(km)
0.1
1.0
10.0
80.0
b) Vertical
Distance
Downwind
(km)
0.1
0.2
0.3
0.5
1.0
2.0
3.0
5.0
10.0
20.0
50.0
100.0
A
.027
.212
1.57
9.0
Dispersion
A
14.
29.5
48.
105.
450.
1950.
4600.
13562.
58818.
255084.
1774117.
7694071.
B
.019
.157
1.19
6.8
Stability
C
.0125
.104
.84
5.05
Coefficients (a in
L*
B
10.8
20.3
30.2
51.
110.
232.
365.
640.
1350.
2900.
7968.
17117.
Stability
C
7.4
13.9
20.1
32.
61.
116.
169.
267.
500.
950.
2170.
4000.
Class
D
.008
.068
.555
3.35
meters)
Class
D
4.6
8.5
12.1
18.6
31.5
50.0
64.5
89.0
137.
202.
328.
455.
E
.006
.050
.410
2.73

E
3.5
6.38
8.8
13.0
21.3
33.7
42.7
56.0
79.0
110.
153.
183.
F
.004
.034
.273
1.68

F
2.3
4.05
5.6
8.5
14.0
21.5
26.5
34.0
46.5
60.0
79.0
93.0
                                    4-40

-------
                                TABLE 4-4



              PLUME DISPERSION COEFFICIENTS FOR TALL STACKS





                    Where:  a   =  ax


                                     d
                            a   =  ex



                            x   =  downwind distance





Coefficient              A         B         C $ D
a
b
c
d
.40
.91
.40
.91
.36
.86
.33
.86
.32
.78
.22
.78
.31
.71
.06
.71
                                  4-41

-------
                   5.   THE CHEMICAL-DIFFUSION MODULE

     This section provides instructions for the use of the chemical -
diffusion module program KEMOD.  The basic function of the program is
solution of the atmospheric diffusion equation in the Lagrangian refer-
ence frame for the pollutant concentrations at vertically discretized
heights.  The solution is obtained by numerically integrating finite
difference approximations to the equation shown below:
     9C (z,t)         /        3C (z,t) \   .
                                     -*5             -'-'     (5-1}
Where:    C.(z,t)  =  concentration of i   species
          K (z,t)  =  eddy diffusivity coefficient
          S.       =  source emissions of i   species
          R.       =  chemical rate of change of i   species
          z        =  elevation above ground
          t        =  time

     The program utilizes the schedules of emissions data, K  coeffi-
                                                            Zi
cients, temperatures, and sky clearness parameters.  In addition, the
user provides initial concentrations and chemical rate constants for the
model.  The program solves the equations and outputs the concentrations
as functions of time and height along the trajectory.

5.1  Control Parameters and Input Data

     The input parameters will be discussed in the order in which they
are input to the model.  The reader should refer to the figures and
table described below to obtain a better picture and understanding of
the KEMOD input structure.  Figure 5-1 illustrates the listing of the
sample problem input deck produced by subroutine PREDAT.  Table 5-1 lists
the input variables by code variable name, and describes their functions
and input formats.  Figure 5-2 contains a flow chart of the input vari-
able sequence and options.  The user will find these aids quite helpful
in developing input decks for the program.
                                   5-1

-------











































t— 1
1
LO

ft!
J
CQ
«Y
H
































































2
O
n
H
OS
U
OO

Q

PJ

03
 ft







0
rH

rt
•H 0
rt rt
> 2
0
43 rH
rt 0
•H 43
rH G
rt 3
> 2
•H

to
P
C
0
S
S
o
u
rH
0
to
3

X
P!
rt •
0
P) oo
•H 1
rt rH
4_)
Pi tn
0 Pi
o S
^S rH
rt o
•Z: 0






f — N
••*

o
CM








4-1
0

0
60
rt


42
O
rt
0

f-H
o
4-1 .
p
rH 3
0 PH
43 P
rt 3
Hj 0





PI
^
hH
H



1— 1






































/— -\
^"
^
•t
X
o
rt






rH S
Pi 0 TO
O P 0
•H 4-t rH
to rt p
3 to
4-1 T3
4-1 0 P
•rH P 3
Q 3 PH
PH C •
-d g -H r-^
CO O
rt O 0 2

X 0 P
rH 43 rH
P 60 O
tn o C

E X oo
0 0 PH PJ
42 f-i O >-i
U rt 0 ^




Q
PJ

O




CM




rH 0
rt 42
rH •!-> rH
3 rt
0 C rH
0 -H O
rH £
o -o
E 0 rt
to
0 3 O
42 P
P 0
rH W
•> rt 0
PJ X
J PJ 3

2 O 4-1
jr
*tls E-H 4n
S O
£-
2 C P!
3 -H O
X -H
i-j to tn
ft, p H •
42 0 in
C 00 > -H
0 -H pi tn
42 0 O rt
•S- S <-> 43




t — \
^J-

0
to

to
•H

E
3
E
•H
X
rt



f — \
0
t— <
hH
*\
X
0
•*t








42
P
•H
^

to
0
•H
0
0
PH
to

4-1
O

^_i
0
43
E
3
2




X
r-J
IX
5
2



^]-





















































•
tn
C
o
•H
tn
tn
•H
E
0
0
O

3
O


rt
0
£_i
rt

















rt
• p
in rt
0 "d
"O -H
Pi 0 Pi
rt 0 o
PH 'H
0 in in
E in
•H f-l -H
P 3 S
O 0
rt 4-i
en
tO rH rt
rt o 42
42 4-1
rrj
13 rt rH
f-i p rt
rt rt o
O 13
-d
•P to C
W Pi O
rH O O
•H -H 0
4-1 to to
to
0 -H 0
42 B 42
E- 0 H

- ^
CM - •
• \ CM
O •» rH
rH ^f PJ
ft • tO
"CM "
X rH X
O PJ O
CM 'S- tO




in
0 to
S tn
•H rt •
P 6 0
P
Pi rH 3
o o c
•H -H
tn 0 E
tn rH \
•H o in
S E rH
0 0
$2 P
0 -H 0
0 E
rH 10 1
3 0 C
0 P O
tn rt -H
rH P
rt o
0 -O 03
rH C rH
•< rt 4n

rH*2
•> 1— 1
•> -H X
2 "— ' 2
rH 2 ft
E-l rH "
X X •
J _] •
ft ft •



LO






4-1
O

rH O
•H P
rt
PH PH
3
0
42 T3
E-> 0
P
rt
• 0
tO PH
0 0
•H f-4
0
0 0
Pn43
tn
X •
0 rt to
0 E 0
f-i E
42 tn -H
p p p
3
rH PnO
0 Pi 0
4-1 -H CM













































/ — x
hH
p^»
,
















•
to
0
•H
U
0
PH
to

C
0

0
in

4-1
O

E
3
E
•rH
X
rt



t — ^
O
t-H
hH
*v
X
o
•^-


p
Pi
•H
O
PH

42
P
•H
^

tO '
0 to
•H C
0 O
0 -H
PH tO
tn to
•H
4-t S
O 0

rH 0
0 O
43 f-l
E 3
3 O
Z tn




X
i-j
ft.
a,
2



^O



^3 I
rt rH P
• p rt rt
-a to rt o 0
(2 0 T3 • PH
rt -H t3 P! 0
0 C rH O rH
0 0 O -H -H
S PH-H x P pi
•H to tn p 3 0
P in 43 42
rH -H 0 .H -P
0 3 E 42 rH
42 O 0 H P in
P 4-i in -H
tn -H
tn f-i rt • t3 to tn
rt o A to t3 0
42 4H 0 rH rH E
TJ -H rt rt -H
13 rt rH O O O P
f-i P rt 0 -H
rt rt O PH P 4-1 O
O T) to f-l O O
13 0 CM
P to C 0 > O
tn pi o 0 -HO
rH O O rH 0 rH P
•H -H 0 42 42 P
4-i in tn p p PH
in in 3
0 -H 0 rH W -H
42 E 42 0 rt 42 T5
H 0 H 4H 42 E- 0
•t
'*"?
CM " •
• ^ CM CM
O " rH rH
rH rt PJ PJ
ft • tO LO
* (Nl w •>
X rH X X
O PJ O 00
CM Tj- tO rH

^
1 O '
in -H / — > 0 tn
0 P • PH P
E m -3 rH rH Ul f2
•H to 0 0 0 -H
P rt Pi > O rH O
S -H P PH
C rt 42
O f-l rH • • -P 42
•H O P rH O -H 10
to f2 0 v-^ S 0
in C 0 U S
•HO rH P! tO
S -H tn rt o Pi 1-1
0 P f-i PH-H o rt
O0 P -H O
0 ctf p f-i 3 tn -H
O f-l 0 -H 43 10 P
rH 4-1 S rt -H -H rH
3 1 rH E 0
O 0 (2 0 P 0 >
in rH o 42 to
O -H P -H 0 0
PEP 13 42 42
f2 O O -P P
•H Id rt P rH
O C rH r2 rt 4-1 o
O-, rt 4-1 -H 0 OP

•>/-^DS OS •>
r-~> rH 00 ft • /— \
rH •> E-" £> • rH
^-' rH fX •> • •>
00 "— ' ^^/-^LO
00 OS " rH rH ^-*
< OO • * •> OS
OH H • t-~ rH ft
E- P, • ^^>



t^N,



5-2

-------
Q



2
2
O
 I
LO

UJ
1-J
ca















w
p^
rl
rt
B
0
OS









2
2 rt
H B
OH M
O 0
FT fr .












0 Pi
rH O
43 *H
rt -p
•H O
?H Pi
rt 3
^^ r




0
f,
rt
•H 0
cti Cu
> 2
0
43 £•<
rt 0
•H 43
rt 3
> 2













LO
1
UJ

i — l
A
£_H
jj
UJ
Q
A
to
1
UJ

1— 1
o
o
PH

x*
0
> — '

1
rt
f-t
bO C
0 -rl
•P
Pi 0
•H N
•H
4-1 t/>
O
PH
0 0
3 P

rt
> 0
6 •
i— 1 -H t/1
rt P 0
•H -P
p Pi 3
•HOC
C -H .rl
I-H P B



J
UJ
Q



00




















•
^H^
A
OH
H
CO

h- 1
03
A
•
00
<• — \
0
0
PH

X*
o
\ — /


0
B
•H
•P •
t/1
C 0
O P
•H 3
•P Pi
rt -rl
bo6
0 C

C
•H 0
N
B >H

B
•H PH
X 0
S: W

OH
H
CO
t—t
CQ



CT>

















^-
1
UJ

1— 1
A
CO
OH
UJ
A
fO
1
UJ

f— 1
o
o
PH

x"
o
V — '

1— 1
o

^J
Pi
o
o

^H
o

0

C
o
•H •
•P rt
rt -H
?H rt
00 0
0 p
+-> -H
£ 0



CO
OH
UJ



O
T-_J


















•
o
f-H
A
H

i— i
Q
OH

A
.
O
 0 0
rt 45 E Pi
> 0 0 -H
?H -H 45 P rl
0 45 -P O

Pi (fl O
•H P rX tO
rt o t/) ?H
0 000
g t/i 45 r-l 4_>
•H 0 O 3 0
4_> 4_> *rj £;
3 B 0 rt
0 C rt 45 ri
45 'H fn G rt
H B bO to PH

f_
^
1-H
Q
OH




rH




4-1
O

0
i— i
PH
•H
P
i— 1
3
B

?-H
o

,—4
rt
3
cr
0

0 '
43 H
2
P I-H
t/l Q
3 OH


^
]§•
•V
X
o
-st-

*T3
0
^
45 -H
O W
•H 0
4| 13

to
P -H
rt
•P
rH 3
rt PH
> P
rl 3
0 O
P
C 13
•H 0
•P
0 Pi
S -H
•H fH
H P,

2
HH
g
2
OH



(N





















































•
V)
0
P
3

•H
B

C
•H















•P •>
to rl 4-1
rt 0 o
t-H rO
fH rH
" O 0

0 -P E

Pi rt pi
•H r-l
•»
Pi * tO
O 0 PH
•H N 0
-P -H -P
rt (/)!/)
£_l
bO Pn4H
0 0 O
P P
Pi W rl
•H 0
0 43
0 S S
45 -H 3
H P Pi

/ — N
^
•t
X
O
^^
1
^j
w fi
V) -H
0 rl
rl PH
bO
O 0
rH 43
Pt *
O /-^
Pi -P O
o 2
•H 0 ^
•P rl
rt rt M
rl O
bO to
0 0 ,— >
+-> i-H CO
Pi 43 UJ
•H rt >-i
• H ' — '
0 rl
£2-8

L^
^3
g
)__l
H



fO
r-H







MH
o

rH
CD
rf^
€
3
Pi

13
P!
rt

•t
t/1
CH
O
•H
•P
U
C
3
4H



















































•
""O
0

P!

P-t
PJ^

0
rl
rt

to
Pi
rt
•H
f^
O
O
rt
>->













































rt
0
O rl
X
CJ 0
prj o

T3 +J
Pi V)
rt 3 •
e co
CM UJ
O to >"
2 0
p ~»k
4n rt
O rl 2

0 to e3
rH -H 2
3 (/> 3
T3 ^* CO
0 rH
45 0 4-1
O P -H
t/) O
45 Pi
< PM-H

--^
^
•^
X
0
V 	 1

T) •
0 /— v
•P O
rt 2^

O 0
•H p! rl
P 0 O
rt bO

O 0 CO
O 43 UJ
V) >-"
if) O v— '
•H 4->

O 0 rH
•P rl rH
O rt rt
45 C
PH tO rl
0 0
0 .p +->
45 rt _C

2
UJ
U
p—j
CO



•*
rH
































^ — \
^
•\
X
o
V 	 /





Pi
o
•H
40
rt
•H
O
O
(/)
to
•rl

O
+J
O

O-*




W
C~4
2
rH




LO
rM







































q
o
•rl
•P
rt
>
0

0

r*^
•P
•H
2 •

xo"
rl 2
rt

O

0 CO
H-> OJ
h^












o
2
II
Pi
0 Q
•H 3
•P O
rt J
• H CJ
O O*
o
Ifl Pi
W 0
•H 45

O
P 13
O 0
45 W
PH 3

X 0

to rt

rl tO
rt 0
0 p
i — i rt
U rl

/->
^
*
X
o
\ 	 /
/ — ^
CO
UJ

rH ^^-^
rt
0 P
rH 3
O Pi
Pi
X-H

to 0
4H rt
O
in
0 o
rH -H
3 P •
13 rt / — \
0 rl O
45 2
O i/l ^-^
t/) t/)
0 rl
< C O

Q
3
S
CJ
o-



vD
i — 1

                                                    5-3

-------
Q
PJ

Z
O
U
 I
LO

PJ
-J
CQ
•
o
z















t/1
^4
fH
cj
6
s










J2
 PL,




4)
3
•H CD
5
> Z
4)
X< fH
nj o>
•H Xl
fH S
oS 3
> Z

II

PL,
^*
U
C— ,
p>

C
4)
XI
f

rt3
0)
t/)
3

to
•H
U
O
LO
CN

II

H


^— ^
•^
<;

X
o
xS




o
•H
fH
4)
X
CM
to
O

•p
OS

H-i
0
4)
rH
3

XI
 fH
ai O
fH
CD /-^
p^ y}
g 04
4) >H
i i \,^












p
i P rt
C rt S
O fH
U "O 0
4) <4H
4> XI
604)
•H C XI

PL,
4) C
X « -H •
P -H /— X
rH *"^
" X eS «
CO fH > Tf
P4 O fn •
^s p CD CM
V) P rH
n .H p] uj
X -H vO
^•4 \^j
CJ C P f~
Z 0 C
3 -H -H •>
a. P fn -^
co crj PL, •>
fn '^
c: p x •
4) C O CN
Xi 4) ni rH
S O CD PJ


/ — N
*^f
— '
C fH
O 0$ fH
0 0

T3 4) /—\
§*r4 CO
fH PJ
0 0 >>
rH P v— '
bo in
•H T3
T3 X 4>
•P C O
3 0 g
CL,-H 3
g -P PL,
O QkJ
O M 
rH 
P
f^
•H

^H
o •
t/)
fn a.
U 4>
•S ^
B tn
3

e -H
3 P
^
•H C
X 0
as -H
S P

Cu
H

5?
2



O^
r— |



•
S
to
•H
C
nj
X
o
(D
g

H

PJ

4>
X
p

^1
o
(p,
rH
LO

to
rH
OS
3
a4
PJ

f—^
o
rH
rH

X
o
x^x

tn
C
O
•H
P
O
as
CD
fH

i-H
aj
O
•H
S

X
o

0
i-l
o
Xl

*

U
[1J
c5
§



o
CM


S

• H
C
aS
X
O
4)
g

H
Crf


4)
X
P

^
O
Cu

0
to
o
p

rH
aS
3
0*
pq

/— ^
o
i— i
rH

X
O
X 	 '









tn
CD
•H
O
4>
PL,
to

4>
r\
§
e
rH
as
•P


U
a,
CO
i



rH
CM


.
g
to
•H
p^
aS
X
O
4)
£

H
Crf
PJ

4)
X
P

fH
O
t4H

rH
O
p

rH
ciS
3
cr
PJ

/ — x
o
rH
rH
*
X
o
\^_/


1
1 X
•H -0
X trS
O CD
fH -P

p l
cS O
rrj
10 0)
4) 3
•H to
o p.
4)
p, CD
•P
0 X
XI
o -a
Xl 4)
g p
3 g

^
Q
f-H
z



CM
CM
















































"O
rH
4)
X

fH
O

C
o

4->
%
3
in p
aS C
ctS
4> -P
P tn
as C
•P O
tn O



















tn
•H

LO

II

H

£__t
c»o
o
z

•
• *^J
LO, 4)
v -a
H S
< 4)

C/3 S
o o
z.o
V |4)


,-— ^
0
rH
rH

X
O







x

(JJ
S

rH
aS
O -
•H in
P i*H
fH rH
4) CD
> 0

f 1 i {,
0 0
fn in
CD p

& *H
la

^
H
CO
O
Z



to
CM













•
*"O
OS
4)
fH

4)
fH
oS

in

fH
oS
O

EH

EH
CO
o
z
o
*
o
rH
tL,

X
O




4)
X
•p
X
to 4)
CD >
g 0
X
I-H etj
as
o tn
•H fH
P 4)
(H 4->
£8

O -H
•
•P in T3
X 4-> C
bO C 3
•H .H O
CD O r(
E PU M



PJ
tq



T^«
CN








CD
4>
CO


,
rQ
OS
4)
fH

4>
fH
CO •
to
to •

fH ^
OS LO
U

U 0
tq -H
a, P
CO O
O 4)
Z CO
x'o'
XO rH
•v HH
•* «
< CM
•* •
X 0
O rH
^xf V-,
<• — 1
tn
4)

fH 0
•> 3 0
m in
4) C
g T) O

C cti +J
•H
in " *o
4> in c
•H P O
o X o
CD bO

tn -4> fn
S as
4n rO
° as §
10 rH O
h 3 Xi
o o
P 4) 4)
0 rH O
4) O OS
^* g TH

.13 <
CJ ^2 nJ
w S pu
a, H u
CO S (M



LO
CM




C
o
•H
•P
U
CD
CO

4)
4)
CO


,
""O
aS
CD
fH

tn

fH
eS
o

X •
rj ^"
tL, •
S rH
»3 •
Z LO

,— ^
O
i-H
rH

X
O
rj-

in
4)
o
•H al .
T3 4> tn
C fn 4)
• H OS TH
o
- 4) 4)
to X PH
4) 4-> to
•H
O O to
4) -P C
PL, O
tn bO-H
P! in
tp, -H tn
O T3 -H
fH O 4)
O O i
P in CD
O 4) O
CD fH fH
> fH 3
0 0
•< o in

X
,-J
P-,
U
S



vO
CM


                                                   5-4

-------
Z
O
CJ
tn
CQ
a














to
^
f-l
rt
S
G
OS









py*
< P
2 rt
E— ' c
oS S
O 0
tt, tt.














G (2
rH O
43 -H
rt -P
•H O
rH C
rt 3
> tt.




G
43
rt
•H G
rt rt
> Z
G
43 f-l
rt G
•H 43
rH E
rt 3
> Z
O
•H
•P
O
G
CO







G

P

f-H
rt

II

C3
^
j_J
tt,
CJ







cfea
G
CO


»
-d

t/i
1-3

i/)
13
rH
rt
o
X
,_J
tin
CO
OH
Z

/ — -\
O
rH
1— 1
*
X
o
Tt
1 — '

G
0
•H
13
•H

me
to
G
• H
O
G
ft
trt

(4-|
O

M
o
p
u
G
£>
^

tt,
co
OH
3



r-
CN

















•
Tt

1— 1
•
m











•P
C •
•H  — '

rH
t \
•H
S
(/)
-H
C -P
0 -H
•H t>
•P O
•H r-l
trt G
0 >
ft
G p!
13 O
•H
G -P
0 -H
rt w
<4-l O

3 G

ttToJ

< O
tx a,
OH W
Q Q






































•
i to
O Pi
B-.S
G 4->
rt
G rH
42 -P
•p Pi
G
13 0
Pi Pi
rt O
o
•I
• G
Pi 42
•H -P
e

fi O
^1
G +->
•P (2
G G
B P!












ft
H
< w
H G
CO -H
o o
Z G
ft
X W
•H G
£ Pi
0

13* rH
rt o
G  -H 4-»
O Pi 4-> 13 trt
G 0 C C
G 4-> rt CN O •
+-> tn G o i—^
rt «H rH rt r-l
rH (rt G 1
55 a) in +j o
tH O 42 O rt P
O O 4-> rH 3

f-l (rt 14-1 4-> Pi -H
0 4J 0 -H 0 E
4-> 'H C -H 1
0 Pi rH 3 4->rH
G 3 G Ol
> TJ G rt S
_ P! rH 42 G ft
< -H O 4-> rH ft

^
o
i4
i



o





















co
Q
OS
^
U
U
^
tq
OS
O
Z




, — ^
^f
«a^
o
CN


C
o
•41 §
ft-H
•H +->
rH U
o rt
trt G
G rH
13
i— 1
U rt
•H O

4J 'S
G G •
E 42 E
rt o (rt
42 -H
ft G pi
rH 42 rt
rt P 42
O



E""1
QJ
I



,^
to































/— \
O
•
o
r— 1
tt,
•v
X
o
^


G
42

Pi -H
*T\ "1-^
rt
13 4->
G 3

0 S
O
G O
43
G
O rH •
4-> bO t/)
Pi G
G rt G
TJ rH
3 42 b<>
4-> -P G
•H «H 13
4-> Pi
rt G p!



p_!
OS



CN
































/ — \
O
•
o
1— 1
tt,
•V
X
o
Tt
> — '

G
42

p.
•H

13
G
(rt
r*,

G
43

O
4->

G
T3
3
4->
•H
bO
Pi
3


CJ
^
o
OS



to
to









































c
•H

g
•H
P
rt
4->

f^j
S
O
O

G
rH
bO
Pi
rt •
trt
42 G
4-> G
•H rH
C W
G G
N 13












                                             5-5

-------
Q
W
Z
o
u
 i
LO
U4
0
O 0
PI E















(/)
f^£
fH
03
S
0
as








*jjT
2 -p
K nl
C_4 €
OS fH
0 0
B- U-,
















 PL,





0
,0
ot
•H 0

OS oS
> Z
0
rO fH
oS 0
•H &
fH B
oS 3
> Z
0 -H
fH 4-1
0
t^H •»
<4H 13
•H C
13 OS
rH
0 bo
E C
•H U4
4->

0 A
rC 0
P -H
^
o e
P 0
0
rH fH
03 CJ3
o" c
0 0
0
o s
(/) 4->
rH 0
^^ ,o

/ 	 4
o
*
o
I— \
PL,
•I
X
o
\ — '

•
00

13
C
PI 03
O

WJ fn
0 O
fH >-.

fli j£
rC 0
4-1 Z

Mn M
o o

0
PI .
O LO

,
0 b(
B •
•H 0
bo
C
•H
rH
0
13
O
E

O
43
P

pj
•H

0
E
•H
^j

"8
05

§ •
4-> PI
t/) O
•H
T3 W>
OS fH























.
/^-^
(/)
0
rH
0
bO

^

t/1
O


fH
O
H ^ <4-l

«
Z
o

*



^»
to














































/^->
o
I— I
M
#1
X
0
> — I


13
0

oi
rH tf)
3 -H
E
•H en

vO
boo
fj \o
•H t-~ •
0 / — >
rO ** ^O
• [>^
X bocn
OS • rH
13 0
• — ' »\
<4-l CTi
O < CM
Q
0 O 0
4-^ 2 PJ
rt 2 3
Q >* >->


U
E"1
^*
Q



uo
to




















•
o

^
MH
o

^
•H
S
S



/ — \
o
rH
rH
•V
X
0
V 	 '

1
o
4->
O
rC


+J

0
*"O
C
0
PH

*"O
PI
•H

^4H
O

fH
0

£3
2


PJ
E-j

f^r
*



vO
to













































•
W
^.^
oS

fH
oS

0
4->

fH

C
O
•H
4_>
OS
•H
U
o

V)
•H
13


































13
fH
oS
O
S
1
Z



/ — \
o
rH
rH
•V
X
0
V — /
0

rH 4->
OS
0 rC
•H 4-)
S -H
0 S
^fj
U 'O
0
0 4->
X OS
•P -H
O
<+H O
O t/1
t/i
ui oS
0
O t/I
•H p|
T3 O
P: -H
•H 4->
O
0 03
X 0
9- fH

9_
OS
'^
U
3



^^
to









































•
X

fH
fH
03

0

OS
fH

PJ
O
•H
4J
oi
•H
O
O
If)
C/}
•H
13
O
p
O

PH













^
rH
Q
a,
CO 4-> 3
W 3
> PH 0
C 4J
Ik -H
rH
Z 0 OS
PJ ,a 3
C_D o^
*Z* -P O
^ t/1
CO 3 rH
E as
fi i ^
•H CN f-f
r^ O
X H P
-H < PI
c 2 -H
o
13 0
13 C E
0 oi -H
fH 4->
•H rH
3 W oS
0 <• C
ai K o

/ — i
•
CM
i-H
pq
LO
•^
X
0
CN
v — t
P

bo
O « -H
U oS 0
CN 43
X 

TJ 4-> C
Pi o) o)
OS fH
0
CNC E
O O -H
Z -H 4->
4->
fl> o) M-i
rC -H 0
4-> O
o c
tH  O
O (/I -H
•H 4->
(/) *^ O
X 0 PI
aS 4-> 3
fH O <4H
fH rC
< PH 03

„
rH CN
^^ ^
H E-




oo
to



•
C/D
W
^

II

Q
I"")
o
r-J
U


r]
P
•H
^

X
rH
3

13
0
fH
•H
1
as

/ — \
0
•
o
1— 1
pt,
CN
Vt
X
o
V 	 /

0
B
•H
P
If)
t/) (4-1
0 O
C
fH PI
aS O
0 'H
rH p
U O
P!
X 3

t/J
aS

O  4->
ai
< fH

E-T PL,
Q Q
wD r~^
o o
u u



01
to




•
co
pq


u

Cu
^
[•T*]
P-H
P>

rC
P
•H
^

X
rH
C
0

13
fH
•H
0
aS

o
•
o
rH
PU
CN
•\
X
0
^ 	 /

< — v
u
o
V 	 /

tn
0 •
fH 0
3 E
4J >H
0) 4->
fH
O M-{
PH O
B

P O
•H
^H 4-^
O 0
Pi
0 3
r-H M-(
,0
o! oS
P

< oS

&T
^
tlj OH
P-, 5j
2 W



o
Tt-






























•t
•> o o
o • •
. O O
O rH i— 1
rH PL, tL,
PL, to to
•V *i «\
XXX
O 0 0
CN i-H CN

1
U


O "4H •
•H 4->
in oj j^
3 M
4H W -H
<4H OS 0
•H rH
TJ /-^
NO
^X^ g

13 ^^
0 (/> 0
+-> E
MH P! -H
O 0 4-J
•H
CD O <4-l
rH -H O
Ct <4H
o3 tp C
4-> 0 O
O -H
< 0 4->


^>
^
M
s



I— I
^f


                                           5-6

-------
CARO
1
2
3
1
^
11

21
31
41

51
ERT CHEMICAL-DIFFUSION MODULE SIMULATION — ST. LOU
00 WE COMPUTE CHEMICAL DIFFUSION YES
UNITS OF EMISSION FLUXES MOLE FRACTION
a NUMBER OF AREA SOURCE EMISSION SPECIE
S
6
7
P
9
to

CARD
11
12
13
14
15
16
17
18
19
20

CARO
21
22
23
2*
25
26
27
2fi
29
30

CARD
31
32
33
34
35
36
37
38
39
40
flftEA

AREA

AREA

1

AREA

AREA

AREA

AREA

AREA

1

AREA

AREA

AREA

AREA

AREA

1

AREA

AREA

AREA

AREA

AREA

SOURCES

SOURCES

SOURCES

11

SOURCES

SOURCES

SOURCES

SOURCES

SOURCES

11

SOURCES

SOURCES

SOURCES

SOURCES

SOURCES

11

SOURCES

SOURCES

SOURCES

SOURCES

SOURCES

1

2

3



4

5

b

7

8



9

10

11

12

13



14

15

16

17

18

360.

394.

420.

21

421.

426.

480.

486.

496.

21

511;

521.

537.

540.

551.

21

556.

564.

570.

571.

579.

oo

40

00

31

46

39

00

07

41

31

58

06

08

00

01

31

62

13

04

63

14

0.
0.
6.2948E-10
1.52326-11
6.3056E-10
1. 52386-11
41

1.0695E-09
5.7753E-11
1.39876-09
8.4703E-11
1.27946-09
7.5869E-11
1.15686-09
6. 22456-11
7.06<59E-10
1.99216-11
41

5.26046-10
1.62366-11
5.3719E-10
1.6348E-11
3.8360E-10
1.23766-11
3.8517E-10
1.23846-11
S.4923E-10
9.6169E-11
41

1.13456-09
2.0793E-11
2.48956-10
6.60106-12
2.48956-10
8.60106-12
4.70476-10
2.77336-11
9.89346-10
6.80996-11
0.
0.
4.
3.
4.
3.


3.
1.
3.
2.
3.
2.
4.
1.
2.
4.


6.
4.
1.
4.
1.
2.
1.
2.
9.
9.


6.
4.
4.
2.
4.
2.
a.
«.
i.
i.
7


74616-11
99466-09
7468E-11
99516-09
51

1599E-10
621«E-08
83706-10
37106-Oft
3902E-10
08616-08
88036-10
68626-08
23656-10
78686-09
51

15046-11
1231E-09
2717E-10
1926E-09
2554F.-10
9728E-09
1836E-10
9734E-09
94626-10
88876-09
51

76466-11
2536E-09
75906-11
00856-09
75906-11
00656-09
29786-10
90426-09
16686-09
09666-08
61
^,
71
-\
IS - 6/29/76 (181)

0.
0.
3.0947E-11
3.4242E-11
3.0953E-11
3.4242E-11
61

2.1080E-10
4.7693E-1S
2.8401E-10
6.0059E-U
2.48686-10
5.62176-11
2.73186-10
5.05266-11
9.56286-11
3.61796-11
61

3.4266E-11
2.79486-11
5.98336-11
2.84856-11
5.13886-11
1.98116-11
4.87676-11
1.9811E-11
4. 61016-10
3.16636-11
61

3.6272E-H
6.2029E-H
1.83506-U
1.24726-11
1.8350E«U
1.2472E-U,
6.0799E«11
1.37626-11
3.53816-10
1.90006-11

0.

2.1613E-

2.16166-

71

9.0539E-

i.358lE-

1.21016"

1.02766-

3.4384E-

71

2.85346-

2.6795E-

2.6212E-

2.6215E-

1.48886-

7i

3»OiS9£-

2.2275E-

2.g£756-

i.Ofl&HE-

2.8772E-




11

11



11

10

10

10

11



11

11

11

11

10



11

11

11

10

10

Figure 5-1   Chemical-Diffusion Module Sample Problem Input Listing
                                  5-7

-------
  41
  42
  43
  44
  45
  46
  47
  46
  49
  50
CARD
  51
  5?
  53
  54
  55
  56
  57
  58
  59
  60
CAUD
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
CARD
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
1

AREA

AREA

ASfcA

AREA

AREA

1

AREA

AREA

AREA

AREA

AREA

1

AREA

AKEA

AREA

AREA

AREA

1

AREA

AREA

AREA

AREA

AREA

11

SOURCES

SOURCES

SOURCES

SOURCES

SOURCES

1 1

SOURCES

SOURCES

SOURCES

SOURCES

SOURCES

11

SOURCES

SOURCES

SOURCES

SOURCES

SOURCES

11

SOURCES

SOURCES

SOURCES

SOURCES

SOURCES

21

19

20

21

22

23

21



25

26

27

28

21

29

30

31

32

33

21

34

35

36

37

36



586

589

594

598

600



601

610

614

619

628



630

637

646

646

655



660

663

664

672

661

31

.65

.06

.15

.58

.00

31

.97

.88

.85

.79

.70

31

.90

.61

.52

.94

.43

31

.00

.44

.20

.81

.42



6.
6.
1.
9.
3.
1.
6.
2.
6.
2.


6.
8.
6.
4.
1.
2.
6.
4.
1.
1.


3.
4.
6.
2.
7.
3.
8.
7.
5.
6.


5.
7.
2.
2.
9.
6.
a.
7.
41

8719E-09
5059E-10
4868E-09
4978E-11
3096E-09
0644E-09
3348E-09
1032E-09
8837E-09
1592E-09
41

9314E-09
6568E-10
9818E-10
5322E-11
9784E-08
0370E-09
9015E-10
4960E-11
4073E-08
9403E-09
41

5109E-08
5420E-09
9160E-09
5417E-09
0907E-08
6717E-09
5201E-08
4444E-09
0874E-08
4e54E-09
41

5525E-08
0150E-09
1423E-08
8840E-09
7319E-08
3545E-09
9402E-08
47176-09
2.2408E-07
1.
4158E-08


5.
1.
3.
2.
3.
1.
1.
2.
1.
2.


4.
2.
6.
7.
1.
5.
3.
7.
7.
6.


1.
1.
1.
4.
1.
1.
3.
2.
3.
1.


3.
2.
1.
6.
2.
2.
S.
2.
51

9080E-09
9173E-07
3767E-09
1869E-08
5885E-09
3795E-07
2495E-08
7206E-07
2722E-08
8914E-07
51

3280E-09
4549E-07
5939E-10
5543E-09
1513E-08
8296E-07
8C22E-10
5380E-09
3394E-09
3982E-07
51

9592E-08
4549E-06
1519E-08
0971E-07
6750E-08
0389E-06
5487E-08
0575E-06
6667E-08
9298E-06
51

9251E-08
1113E-06
5587E-08
2212E-07
7934E-08
4187g*06
9616E»0«
0123E-06
6.7122E-08
3.
5628E-06


3,
1.
1.
3.
2.
1.
7.
2.
7.
2.


3.
2.
2.
1.
7.
6.
9.
1.
6.
3.


1.
9.
7.
2.
1.
2.
2.
2.
2.
1.


2.
1.
1.
6.
2.
a.
2.
61

2800E-09
8814E-10
2984E-09
8482E-U
6686E-09
3013E-10
3298E-09
6124E-10
5204E-09
7658E-10
61

0233E-09
2275E-10
0154E-10
5773E-11
9774E-09
4022E-10
8824E-11
5773E-11
3035E-09
2850E-10
61

5709E-08
1715E-10
4915E-09
5992E-10
2083E-08
9897E-09
6311E-08
3277E-09
4756E-08
5394E-09
61

6834E-08
6813E-09
0238E-08
8713E-10
1000E-08
642SC-09
4604E-08
71

1.0595E-09

2.4808E-10

1.5946E-09

3.0559E-09

3.1374E-09

71

1.4255E-09

1.8025E-10

3.1679E-09

1.7992E-10

2.5720E-09

71

6.1848E-09

3.8365E-09

5.0369E-09

1.1264E-08

9.8677E-09

71

1.0684E-08

5.0057E-09

1.1056E-0*

1.2319E-08
2.3221E-09
4.9568E-08
5.
0201E-09
2.1947E-08

                                   Figure  5-1  (Continued)
                                            5-8

-------
CARD

^2
83
a '4
AS
86
«7
8^
89
90

r ARD
91
9?
9?
94
95
96
97
qp
99
100

CARD
tot
102
103
104
105
106
107
10?
109
110

CANO
111
112
113
114
115
116
117
118
119
120
1
AREA

AfcEA

ARtA

AKF A

ARE 4

1

AREA

AWE.A

A "ft A

AK£A

AREA

1

AWEA

AREA

AREA

AREA

AREA

1

AREA

AREA

AREA

AREA

AREA

11
SOUWCES

SOURCES

SOURCES

SOURCES

SOi'f ff-'S

11

SOUWCES

SOURCES

SOURCES

SOUWCES

SOURCES

11

SOURCES

SOURCES

SOURCES

SOURCES

SOURCES

1 1

SOURCES

SOURCES

SOURCES

SOURCES

SOURCES

21
39

ay

41

42

43

21



45

46

47

4A

21

49

so

51

52

53

21

54

55

56

57

58


681

685

690

691

694



698

700

702

707

709



711

715

720

723

723



727

727

731

731

735

31
.90

.72

.03

.13

.33

31

.64

.36

.94

.25

.59

31

.55

.85

.00

.60

.89

31

.64

.72

.38

.85

.13

41
1.2276E-08
1.6197E-09
1.4732E-07
9.7926E-09
2.4403E-07
1.6213E-08
3.0036E-08
2.4762E-09
7 .7762E-08
5.5584E-09
41

6.6Q96E-07
1.9275E-08
4.7469E-08
4.4210E-09
?.6406E-07
2.0506E-06
6.0129E-08
7.6152E-09
1.0194E-06
3.4766E-08
41

6.3940E-08
l.liOOE-Oft
3.M32E-08
1.7254E-09
3.6127E-08
1.7254E-09
6.4366E-08
6.9096E-09
8.2130E-08
1.5649E-09
41

1.6197E-07
8.3109E-09
1.2944E-07
6.6244E-09
2.9946E-08
1.9029E-09
2.0728E-06
1.9100E-09
1.9631E-07
9.9254E-09
51
9.4233E-09
3.9667E-07
4.4158E-08
2.5547E-06
7.2917E-08
4.3681E-06
1.6661E-08
6.0171E-07
4. 1972E-08
1.4500E-06
51

1.0102E-07
7.1032E-06
3.9551E-08
1.1573E-06
1.0139E-07
4.4130E-06
2.0018E-06
5.1955E-07
1.6117E-07
1.3522E-05
51

4.8356E-06
1.0924E-06
4.4707E-09
3.7041E-07
4.4706E-09
3.7041E-07
1.6453E-08
4.3301E-07
4.4793E-09
7.6500E-07
51

3.0791E-06
3.3317E-06
3.56S7E-08
3.1642E-Ob
1.2529E-06
2.5645E-07
1.5666E-08
4.6731E-07
4.782ZE-08
3.9886E-06

5.
4.
3.
4 „
5.
5.
7.
1.
2.
2.


6.
2,
1.
1.
7.
7.
1.
4.
1.
4.


3.
4.
3.
2.
3.
2.
1.
5.
3.
4.


2.
6.
2.
5.
s.
2*
7,
8.
3.
8.
61
0348E-09
3259E-10
4444E-08
0982E-09
6342E-08
9780E-09
5976E-09
1920E-OS)
4156E-08
3799E-09
61


b70SE">0?i
9406E-08
7010E-09
0569E-08
3346E-09
5328E-08
6735E-09
2060E-07
1097E-08
61

1299E-08
t>7i 1E-09
2550E-09
5173c-09
2550E-09
5172E-09
2999E-08
3222E-09
S673E-09
5628E«09
61

6676E-08
6794E-09
Btb^E^Ott
291 5£«"Q9
6089E-09
i?66£B0^
70s»TE«09
0803E»10
3037E-OS
03S9E-0'9
7i
3.9136E

1 ,46(?2t

2.4167E

7.1257E

9.7636E

71

3.1858E

9.9850E

3.0225E

9.4348E


-09

-08

-08

-09

-09



-08

-09

-08

-09

5.5458E-08

71

1.4U1E

1.7789E




»08

-09

1.7789E-09

7.6082E

1.9805E

71

I.1577E

1.1405E

2.4602E

3.6459E

1 ,5Sfl2E


-09

-09



• 08

»08

-09

-09

-08

Figure 5-1 (Continued)

-------
CARD
123
124
125
126
127
128
129
130

CARD

132
1 33
134
135
136
137
13ft
139
140

CARD
141
14?
143
144
145
146
147
14*
149
150

CARD
151
152
153
154
155
156
157
158
159
160
1
AREA

AREA

Ai-i't A

ARFA

1



A**E A

AREA

AREA

AREA

1

AREA

AREA

AREA

AREA

AREA

1

AREA

AREA

A fit A

AREA

AREA

11
SOURCFS
SOURCES

SOURCES

SOURCES

SOURCES

11

SOURCES

SOURCES

SOURCES

SOUKCFS

SOURCES

11

SOURCES

SOURCES

SOURCES

SOURCES

SOURCES

11

SOURCES

SOURCES

SOURCES

SOURCES

SOURCES

21
60

61

62

63

21

64

65

66

67

68

21

69

70

71

72

73

21

74

75

76

77

78


735
73«

740

742

744



746

748

750

752

753



756

757

7*0

761

764



780

780

786

804

608

31
.97

.10

.63

.22

31

.38

.35

.13

.47

.87

31

.60

.62

.72

.37

.85

31

,00

.14

.01

.21

.66

41
4.6300E-08
4.8330P-09
8.1440E-08
8.1862E-09
4.7636E-08
3.549«E-04
2.2528E-06
1 .7477E-09
6.7886E-08
5.9397E-09
41
+
5.1974E-08
3.3554E-09
1.7501E-08
1.4522E-09
5.5456E-08
2.1263E-09
2.9751E-08
1.8640E-09
4.2545E-08
5.0765E-09
41

1.1158E-07
9.0309E-09
7.7618E-08
4.1363E-09
2.6556t-08
3.5042E-09
2.2253E-09
5.2463E-11
9.7855E-09
9.1493E-10
41

1.0082E-08
9.5131E-10
1.6879E-08
1.1489E-09
1.2894E-08
1.1814E-09
1.8912E-08
1.0023E-09
4.2857E-09
2.1933E-10
51
1.0985E-07
1.2811E-06
4.2957£-Ofl
2.1326E-06
2.0120E-08
9.2125E-07
1.2990E-06
3.7916E-07
2.0953E-0&
1.0349E-06
51

9.6121E-09
1.2986E-07
7.1070E-09
4.0337E-07
1.0458E-08
5.2400E-07
8.5048E-09
4.8754E-07
2.4172E-08
1.5675E-06
51

4.1985E-08
2.6394E-06
2.4618E-08
9.9341E-07
1.2410E-08
1.1621E-06
2.4085E-10
1.0590E-08
3.8962E-09
2.7167E-07
51

4.0294E-09
2.8343E-07
4.7010E-09
2.9758E-07
5.6629E-09
3.5647E-07
5.0814E-09
2.358ZK-07
6.7493E-10
1.1440E-08

4.
1.
2.
3.
1.
1.
6.
1.
1.
6.


5.
6.
5.
6.
6.
3.
6.
8.
1.
1.


3.
2.
1.
1.
1.
6.
9.
1.
3.
3.


3.
3.
3.
5.
4.
4.
3.
5.
3.
4.
61
5899E-08
6610E-09
8854E-0*
2988E-09
2847E-08
5318E-09
5250E-09
1440E-09
5628E-08
3957E-09
61

5713E-09
6724E-09
1910E-09
4837E-10
0765E-09
8953E-09
4970E-09
0619E-10
8510E-08
2504E-09
61

2555E-08
6261E-09
6697E-08
9096E-09
1216E-08
8794E-10
9396E-11
2042E-10
0311E-09
8702E-10
61

1500E-09
9404E-10
7089E-09
5979E-10
2625E-09
7925E-10
6166E-09
6661E-10
5794E-10
0399E-10

8
1

4

2

5



1

2

2

2

6



1

5

4

7

1



1

1

1

1

1

7 1
.7987E-09
,3311t-08

.9779E-09

.7563E-09

.6098E-09

71

.4503E-09

.3606E-09

.1443E-09

.5843E-09

.9910E-09

71

.1986E-OS

.7647E-09

.4364E-09

.9723E-11

.1224E-09

71

.1693E-09

.4773E-09

.5699E-09

.3528E-09

.1574E«iO

Figure 5-1 (Continued)
         5-10

-------

CARD
161
162
163
164
t 65
1 66
167
16P
160
170

CAKO
171
172
173
1 74
175
176
177
178
179
180

CARD
181
182
183
184
1N5
186
187
188
169
190
1

AREA

AREA

AREA

AREA

AKEA

1



Al^EA

AfifgA

ArfEA

AREA

1

AREA

AREA

AREA

LAST
LAST
11

SOURCES

SOURCES

SOURCES

SOURCES

SOURCES

11
+
SOURCES

SOURCES

SOURCES

SOURCES

SOURCES

11

SOURCES

SOURCES

SOURCES

21

79

80

81

82

83

21

84

85

86

87

86

21
+
89

90

91

AHEA SOURCES
AREA SOURCES
NUMBER OF POINT SOURCE
POINT
SnuRCES
1


809

817

818

626

828



831

840

849

858

866



900

960

1020

"10
•10
31

.03

.74

.65

.81

.28

31

.34

.00

.08

.58

.76

31

.00

.00

.00

.00
.00
EMISSION
709
.60
41

2.0977E-09
4.8433E-11
2.1125E-09
.4.8863E-11
1.5446E-08
8.1311E-10
1 .0788E-08
5.0024E-10
3.0009E-09
1.0657E-10
41

9.7101E-09
4.4745E-10
1.1121E-08
5.2452E-10
5.9993F.-09
2.7190E-10
6.4817E-09
3.2000E-10
08
0.
41

0.
0.
0.
0.
0.
0.


SPECIE
0.
51

2.0957E-10
1.0015E-08
5.0296E-10'
1.0034E-08
6.6220E-09
2.0427E-07
2.2318E-09
1.1919E-07
1.6689E-09
2.7944E-08
51

2.0080E-09
1.0672E-07
2.3653E-09
1.2570E-07
1.4448E-09
6.9699E-08
1.4557E-09
8.3000E-08
0.
0.
51

0.
0.
0.
0.
o.
0.


7
9.2240E-08
61

9.1448E-H
1.1491E-10
1.9941E-10
1.1491E-10
3.9139E-09
4.1824E-10
1.6973E-09
3.2680E-10
7.6653E-10
1.5557E-10
61

1.5118E-09
3.1587E-10
1.7899E-09
3.4617E-10
9.9115E-10
2.3467E-10
1.0764E-09
2.6381E-10
0.
0.
61

0.
0.
0.
0.
0.
0.
\


3.3810E-08


7

7

1

6

1



6

7

3

4

0



0

0

0




0
71
^,
—

.OS55E-11

.0904E

.17706

.9017E

.4068E

71

.0814E

.1755E

.7468E

.3&01E

•

71

.

.

.




•

•11

• 09

-10

•10



-10

"10

-10

-10















CARD
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
1
+ .
 11
, .* i
 21
• • + .
 31
. • + .
 41
, • + .
POINT SOURCES

POINT SOURCES
       1
       2

       2
       3
POINT SOURCES  4
  1.2828E-01
      711.40

  1.786SE-01
      711.48

  1.3090E-01
      711.50
    0.
    2.9127E-01
    7.6917E-07
    0.
    2.0977E-01
    4.4139E-08
    1.39571-09
    2.22S1E-01
    4.4175S-OB
    1.3869E-09
      51
>•••»..+•••<
 0.
 3.6558E-01
 0.
 0.
 4.5516E-01
 3.2283E-09
    61
>....>..«..!
 0.
 2.1488E-01
 0.
 1.9874£-06
 1.56«1E«01
 6.9367E-09
                                    4.2099E-01
                                    3.2310E-09
                                    1.2700E-06
                 6.93441*09
                 3.9689E-08
  7i
,.,*«,.....,

 0.
 0.

 0,
 4.5684E-10

 0.
 4.5722E-10
                                  Figure 5-1  (Continued)
                                           5-11

-------

CAKO
20J
202
203
204
205
206
207
?08
209
210

CAKO
211
212
213
214
215
216
217
21fl
219
220

CARD
221
222
223
224
225
226
227
228
229
230

CARD
231
232
233
234
235
236
237
238
239
240
1


POINT


POINT


PdlMT


1

POINT


POINT


POINT


POINT
1



POINT


POINT


POINT

1


POINT


POINT


POINT


11


SOURCES


SOURCES


SOURCES


11

SOURCES


SOURCES


SOURCES


SOURCES
11



SOURCES


SOURCES


SOURCES

11


SOURCES


SOURCES


SOURCES




u
5

5
6

8
7

7


6

ft
9

9
10

10
11



11
12

12
13

13
14



14
15

15
16

16
17

17
21

1


1


1


I
21



1


1


1

21


1


1


1


21

1


1


1


1
31

.3869E-01
719.64

.3251E-01
721.87

.4159E-01
721.87

.4159E-01
31

722.70

.5620E-01
722.70

.5333E-01
725.51

.3294E-01
728.18
31


,5995t-01
728,42

.6146E-01
726.42

.6146E-01
728.42

31

.6146E-01
728.69

.3385E-01
728.95

.5899E-01
728.97

.6733E-01
41

2.2231E-01
0.
0.
3.0197E-01
0.
0.
3.2003E-01
0.
0.
3.2003E-01
41

o.
o.
3.0831E-01
0.
0.
3.0859E-01
0.
0.
3.0126E-01
0.
41

0.
2.9466E-01
6.8132E-10
9.4022E-13
3.1331E-01
6.8132E-10
9.4022E-13
3.1331E-01
6.8132E-10
9.4022E-13
41

3.1331E-01
0.
0.
3.0337E-01
0.
0.
3.090SE-01
0.
0.
3.0824E-01


4.
5.
o.
3.
1.
r.
t, ,
2.
0.
4.


1.
0.
3,
2.
0,
3.
8.
0.
3.
0.


0.
3.
9.
1.
3.
9.
1.
3.
9.
1.


3.
1.
0.
3.
0.
0.
3.
0.
0.
3.
51

2097E-01
3696E-08

S773E-01
4858E-07

0849E-01
2484E-11

0849E-01
51

5356E-07

4087E-01
8933E-08

4212E-01
1482E-08

8733E-01

51


2098E-01
4022E-13
5857E-10
4446E-01
4022E-13
5857E-10
4446E-01
4022E-13
5857E-10
51

4446E-01
1246E-08

S761E-01


3927E-01


3558E-01


2.
1.
0.
1.
0.
0.
i.
0.
0.
1.


5.
0.
1.
1.
0.
1.
2.
0.
1.
0.


6.
2.
9.
2.
1.
9.
2.
1.
9.
2.


1.
4.
0.
1.
0.
3.
1.
0.
2.
1.
61

1783E-01
9682E-08

7778E-01


2988E-01


2988E-01
61

6287E-08

94626-01
0605E-08

9S96E-01
9866E-08

7847E-01

61
^
4126E-07
2442E-01
4022E-13
4485E-12
8077E-01
4022E-13
4485E-12
8077E-01
4022C-13
4485E-12
61

8077E-01
1222E-09

75186-01

*ttae»0a
42691-01

4949E-08
8885E-01
71

0.
0.

0.
2.0688E-06

0.
5.2169E-12

0.
71

0.

0.
0.

0.
0.

0.
0.
71


0.
3.1341E-13

0.
3.1341E-13

0.
3.1341E-13

71

0.
0,

0.
0.

0.
0,

0.
Figure 5-1 (Continued)
         5-12

-------
CArtl)
SHI
?42
?«5
244
205
Zuh
?.U7
24».
i?'J9
250

CARD
251
252
253
?5«
255
256
257
25P
259
260

CARD
261
262
2b?
264
265
266
267
26*
269
270

CARD
271
272
273
274
275
276
277
278
279
280
1
POINT
PCI'MT

PGIMT


POINT
1



POl^T


POINT


POINT

1
* • • • •

POINT


POT^T


PtUM


1

POINT


POINT


POINT


POINT
1 1
SOURCES
SOURCES

SOURCES


SOURCES
I 1



SOURCES


SOURCES


SOURCES

11


SOURCES


SfiHRCES


SOURCES


] 1

SOURCES


SOURCES


SOURCES


SOURCES

18
18
19
19
20

20
21



21
22

22
23

23
24



24
25

25
26

2fr
27

27


28

28
29

29
30

30
31
21
1
1


2

21


2


1


2


21

1


2


1


1
21



I


1


1

31
729.04
.6734E-01
729.29
.638'jfc-Ol
729.30

.6556E-01
729.30
31


.6556E-01
729.30

.5009E-01
729.30

.5326E-01
729.30

31

,51f>2E-01
729.30

.5326E-01
729.30

.4824E-01
730.04

.642SE»01
31

730.11

.7395E-01
730.43

.7551E-01
730.59

.7647E-01
731. 29
41
0.
0.
3.0825E-01
0.
0.
3.0867E-01
0.
0.
2.1556E-01
0.
41

0.
2.15b6E-01
0.
0.
2.9552E-01
0.
0.
2.0S58E-01
0.
0.
41

2.9538E-01
0.
0.
2.0558E-01
o.
o.
2.9569E-01
2.4348E-07
8.9601E-10
1.7565E-01
41

8.3123E-08
2.2942E-11
1.6796E-01
5.7404E-08
2.1125E-10
1.6628E-01
5.87716-08
1.9420E-10
1.6521E-01
4.7517E-09
51
0.
0.
3.3558E-01
0.
0.
3.3716E-01
0.
0.
3.3444E-01
0.
51

u.
3.3444E-01
0.
o.
3.2529E-01
0.
0.
3.1895E-01
0.
0.
51

3.2462E-01
0.
0.
3.1895E-01
0.
0.
3.2610E-01
8.9601E-10
5.3334E-08
4.2315E-01
51

2.2942E-11
3.8692E-09
4.4093E-01
2.1125E-10
1,257«E»08
4.4360E-01
1.9420E-10
1.1559E-08
4.«5a«E»01
4.3715E-12
61
0.
1.0422E-06
1.88826-01
0.
2.48116-07
1.9031E-01
0.
0.
1.8443E-01
0.
61

0.
1.8443E-01
0.
0.
2.2910E-01
0.
0.
2.2221E-01
0.
0.
61

2.2838E-01
0.
0.
2.2221E-01
0.
o.
2.2997E-01
8.960i£-10
3.6797E-07
2.3695E-01
61

2.2942E-11
5.9744E-11
2.1716E-01
2.1125E-10
8.6755E-Oa
2.14blE"OS
1.9420E-10
7.97S2E-08
2.1308E-01
4.3715E-12

0
0
0
0
3

0
1



0
9

0
3

0
3



0
3

0
2

0
2

0


7

0
7

0
6

0
1
71
•
•
•
•
.6492E-

•
.8246E-
71


•
.2889E-

0
.9312E-

«
.5663E-

71

•



09


0»




09


08


08




.6492E-09

•
.1564E-

0
.9867E-

*
71

.6474E-

0
.0417E-

«
.47S2E-

0
.4572E-


09


10




12


11


11


12
Figure 5-1 (Continued)
         5-13

-------

CftRD
«»*1
?H?
?8S
2«u
?85
286
?R7
2H8
2ft
291
29?
293
294
29>OINT


POINT
1



POINT


POI^T


POINT

11



SOURCES


SOURCES


SOURCES

11


SOURCES


SOURCES


SOURCES


tl

SOURCES


SOURCES


SOURCES


SOURCES
11



SOURCES


SOURCES


SOURCES




31
32

32
33

33
34



34
35

35
36

36
37

37


38

36
39

39
40

40
41



41
02

42
41

43
44

21


I


1


1


21

1


1


I


1
21



I


1


1

21


1


1


1


31


.5967E-01
731.32

.4429E-01
731.63

.5953E-01
732.00

31

.4113E-01
733.89

.62416-01
734.71

.7464E-01
735.11

.666PE-01
31

735.15

.5675E-01
735.39

.5077E-01
735.58

.5427E-01
735.58
31


.5427E-01
735.58

.5427E-01
735.58

.5427E-01
735.58



4.
2.
2.
7.
2.
4.
4.
2.
2.
7.


2.
0.
0.
3.
8.
3.
1.
0.
0.
2.


6.
«.
3.
o.
0.
2.
0.
0.
3.
0.


0.
3.
0.
0.
3.
o.
0.
3.
0.
0.
41

3715E-12
OS83E-01
8523F-07
8721E-11
0637E-01
7094E-09
3327E-12
0890E-01
8062E-07
7508E-11
41

1599E-01


0735E-01
9666E-08
2997E-10
6727E-01


1072E-01
41

9693E-10

1832E-01


9744E-01


1039E-01

41


1039E-01


10HE-01


1039E-01




4.
4.
7.
1.
a.
4.
4.
4.
7.
1.


4.
0.
1.
3.
3.
1.
4.
0.
0.
4.


1.
3.
3.
3.
0.
3.
1.
0.
3.
2.


0.
3.
1.
0.
3.
5.
0.
3.
4.
0.
51

3368E-10
7483E-01
8721E-11
3276E-08
3343E-01
3327E-12
2982E-10
7459E-01
7508E-11
3072E-08
51

2728E-01

8246E-05
3717E-01
2997E-10
9641E-08
4244E-01


8124E-01
51

0128E-10
64566-10
6481E-01
6550E-08

2587E-01
7957E-09

4256E-01
6442E-OB
51


4256E-01
2432E-09

4856E-01
0280C-08

4256E-01
4746E-OB

61

2.0404E-OS
1. 56676-01
7.8721E-11
2.0500E-10
2.1591E-01
4.3327E-12
2.0223E-08
1.569«E-01
7.7508E-11
2.0184E-10
61

2.1560E-01
0.
0.
1.9307E-01
3.2997EMO
5.02666-07
2.1565E-01
0.
1.7949E-08
1.4136E-01
61

8.3046E-09
5.0236E-08
1.5813E-01
0.
0.
2.2591C-01
6.5819E-10
0.
1.9276E-01
9.6920E-09
61

0.
1.9278E-01
4.5569E-10
0.
1.9278E-Ot
l.««2«f»0d
0.
1.9278E-01
1.6401E-08
0.
7 1


0.
2.6240E-11

0.
1.4442E-12

0.
2.5836E-11

71

0.
8.0997E-07

0.
1.0999E-10

0.
0.

0.
71

4.7262E-10

0.
5.0892E-09

0.
0.

0.
0.
71


0.
0.

0.
0.

0.
0.

Figure 5-1 (Continued)
         5-14

-------

CARD
321
322
3 T S"n«CF.S


^i'1'..T srtihCES


KM'l'-n SMiwcFS


< 1 1

*J 1 1 1 • J T S 1 1 1 1 w c E S


PII! A i SOi.kCKS


pi/IM S'^iiWCES


tr I -T S'"'brtCFS
1 1 1



i-"i II\.T s1 nwpES


f'H.MT SOURCES


P'"U 

4S
49

49
50

50
51



51
52

52
55

53
54



54
55

55
56

56
57

57
21

1


1


1


1
21



1


1


1

21


1


1


1


21

1


1


1


1


,5*luE
/?5

.5917E.
73*

.6205E
737

.7613F.


737

.75«5E
737

,7077fc
739

.5421E
740



.5144K
740

.6552E
740

.5286E
740



.4938E
741

.6375E
741

.56Z7E
742

.7204E
31

-01
.97

-01
.«!

-01
.04

-01
31

.35

-01
.51

-01
.81

-01
.23
31


-01
.23

-01
.32

-01
.60

31

-01
.63

-01
.88

-01
.24

-01
41

3.1004F--01
h.36u«E-10
0.
3.1953E-01
1 .2917F-OB
9.3005E-12
3.1071F-01
1.6074E-08
1.1573t-ll
1.6564E-01
41

1 ,7640t-Urt
1 .2701E-11
1.6596^-01
1 .3700E-08
9.8642E-12
3.0615E-01
4.7400E-09
3.4128E-12
3.3138E-01
R.3047E-08
41

5.9794E-11
1.9266E-01
6.3142E-08
0.
3.09166.-01
4.4604E-09
3.2115E-12
3.32086-01
0.3951E-09
3.1645E-12
41

3.3226E-01
6.9778E-08
0.
3.0930E-01
0.
0.
3.3154E-01
1.9817E-08
5.4696E-11
1.8905E-01
51

3.4086E-01
9.2221E-1 3
3.3197E-10
3.6474E-01
9.3005E-12
1.5685C-09
3.3899E-01
1.1573E-H
1.9518E-09
4.4498E-01
51

1.2701E-1 1
2.1420E-09
4.4451E-01
9.8642E-12
1.6636E-09
3.3291E-01
3.4128E-12
5.7556E-10
3.7875E-01
5.9794F.-11
51

1 .0084F-08
4.027«E-'il
0.
0.
3.3587E-01
3.2115E-12
5.4162E-10
3.7954E-01
3.1645E-12
5.3369E-10
51

3.8140E-01
0.
0.
3.3662E-01
0.
0.
3.7767E-01
5.4696E-11
2.1705E-09
4.8182E-01
61

1.9096t"-01
7.5621E-11
4.5745E-08
1.5656E-01
9.3005E-12
2.4220E-11
1.8825E-01
1.1573E-11
3.0138E-11
2.1325E-01
61

1.2701E-11
3.3074E-11
2.1369E-01
9.8642E-12
2.5688E-11
1.9017E-01
3.4128E-12
4.4a37E-13
1.3567E-01
5.9794E-11
61

1.5571E-10
2.5316E-01
0.
0.
1 .8945E-01
3.2115E-12
8.3633E-12
1.3552E-01
3.16456-12
4.1204E-13
61

1.3696E-01
0.
0.
1.9033E-01
0.
1.1199E-07
1.345ZE-01
5.4696E-11
7.4542E-08
1.5709E-01


0
4

0
3

0
3

0


4

0
3

0
1

0
1



0
0

0
1

0
1



0
0

0
0

0
1

0
71

*
.3036E

•
.1002E

*
,857hE

*
71

.23366

•
.2881E

•
.1376E

•
.9931E
71


•
•

•
.0705E

9
.0548E

71

•
•

•
a

•
.8232E

•



-12


-12


-12




-12


-12


-12


-11







-12


-1?










-11


Figure 5-1 (Continued)
         5-15

-------
CASO
361
36?
363
364
365
366
367
366
369
370

C ARO
371
372
373
374
375
376
377
378
37"
3«0

CASH
361
382
3fl3
3ft4
385
3^6
387
368
369
390

CAWD
391
39?
393
394
395
396
397
398
399
aoo
! 11
PUI-.T snii»cES

P 0 I f ; 1 SOURCES


Horn SOURCES
1 1 1



P01MT SOURCES


P'll'Mt Sl.'i'PCES


POINT SOURCES

1 1 1


POIMT SlH'RCES


Pni'MT SPi'^CES


POINT SOURCES


1 11

POINT SOURCES


POINT SOURCES


POINT SOURCES


PUIM SOURCES

58
59
59
60

60
6t



Hi
62

62
63

63
64



64
65

65
66

66
67

67


68

6H
69

69
70

70
71
21
1
1


1

21


1


1


1


21

1


1


1


• 1
21



1


1


1

31
742.30
.66356-01
742.31
.443b£-01
742.37

.6622E-01
742. J8
31


.7287E-01
742.51

.7186E-01
742.51

,72H9f -01
742.70

31

.6395L-01
751.10

.7301E-01
751.10

.7301E-01
754.31

.6241E-01
31

760.71

.779U-01
766.27

.4929E-01
768.67

.7277E-01
774.38
41
5.7709E-08
0.
3.1006E-01
3i7b27E-ll
3.3200E-01
1.3872E-08
5.1049E-11
3.3448E-01
2.3494E-08
41

6.4R43E-12
1.8789E-01
1.5186E-08
5.5887E-11
1.B926E-01
2.3189E-06
6.4001E-12
1.8789E-01
0.
o.
41

3.3004E-01
1.2966E-08
1.1260E-11
1.7207E-01
1.2966E-08
1.1260E-11
1.7207E-01
5.4798E-09
3.9455E-12
3.1530E-01
41

3.2740E-08
1.5862E-11
1.7212E-01
0.
0.
2.9969E-01
5.5572E-08
5.8430C-11
1.7219F-01
0.

0.
0.
3.
3.
2.
3.
5.
3.
3.
6.


1.
4.
5.
3.
4.
6.
1.
4.
0.
0.


3.
1.
1.
4.
1.
t.
4.
3.
6.
3.


1.
1.
4.
3.
0.
3.
51
367 OF -01
7627E-1 1
2397E-09
8401E-01
1049E-1 1
0386E-09
7935E-01
4843E-1?
51

0936E-09
8306E-01
5887E-11
3266E-09
8146E-01
4001E-12
0794E-09
8308E-01


51

7344E-01
1260E-11
5632E-09
3993E-01
1260E-11
5632E-09
3993E-01
9455E-12
6540E-10
4066E-01
51

5862E-11
6970E-09
5038E-01
4072E-09

2750E-01
5.8430E-11
?.
4.
6.
6085E-09
3982E-01
2820E-10

0.
2.
1.
3.
6.
1.
5.
8.
1.
6.


1.
1.
5.
9.
1.
6.
1.
1.
0.
1.


1.
1.
6.
2.
1.
6.
2.
3.
1.
1.


1.
4.
1.
5.
0.
2.
5.
?.
2.
2.
61
6396E-1 1
8690E-01
7627E-11
1438E-08
3963E-01
1049E-11
3353E-08
1995E-01
4843E-12
61

fe886E-ll
5618E-01
5887E-11
1252E-08
5741E-01
4001E-12
6667E-11
5615E-01

3493E-07
61

3257E-01
1260E-11
6436E-10
1498E-01
1260E-11
6436E-10
1498E-01
9455E-12
0274E-11
8162E-01
61

5862E-11
8280E-09
9959E-01
4929E-11

2352E-01
8430E-11
0007E-07
1522E-01
3026E-10
71
0.
0.
1.2542E
0.
1.7016E

0.
2.1614E
71


0.
1.8629E

0.
2.1334E

0.
0.

71

0.
3.7533E

0.
3.7533E

0.

-11

-11


-12




-11


-12







-12


-12


1.3152E-12

0.
71
+


'

5.2875E-12

0.
1.5794E

0.
1.9477E

0.
0.


-09


-11



Figure 5-1 (Continued)
         5-16

-------
C A y [)
40 1
aoP
40?
U \l >4
40S
40<5
40 7
4dr
409
ill (1

CARP
& \ 1
41?
413
4] 4
415
41 t>
417
u 1 rt
419
430
t 11

71
P P 1 i , T SOURCES / ?

72
p(M '-.'T .idunCFS 75

73
HOI -MT SOURCES 74

i 1.1

in
POINT SUi'KCf's 75

75
ruTfiT SOl'tfttS 76

76
LAST PTSK
LAST PTS»J
INITIAL U'TEGWAT
21 31

1 .57 1 flfr -0 1
A (>(i . «h

1 .66036-01
821.76

1 .6694F-01
«21 .87

21 31

1 .*693fc-01
622.1)7

1 .6692F.-01
822.18

1 .6691E-01
-100.00

ION TIME STEP 5;
41
0.
3.0M3E-01
1 .8367E-09
5.0694fc-12
3.1068E-01
P.1268E-09
2.2362E-12
3.2300E-01
2.1023E-09
2.2104E-12
41

3.2297E-01
2.0650E-09
2.1712E-12
3.2294E-01
2.0411E-09
2.1461E-12
3.2291E-01


rzE
51
o.
3.3990E-01
5.0694E-12
2.0117E-10
3.3514E-01
2,?562E-12
9.982SE-11
3.a218E-01
2.21046-12
9.86786-11
51

3.4217t-01
2.1712E-12
9.6930E-11
3.4216E-01
2.1461E-12
9.5«06E-il
3.4216E-01


l.Ofc-04
61
0.
1 .9409E-01
5.0694F-12
1 .P498E-09
1.8815E-01
2.2362E-12
2.0964E-10
1.678RE-01
2.2104E-12
2.0723E-10
61

1.6793E-01
2.1712E-12
2.0355E-10
1.6798E-U1
2.1461E-12
2. 01196-10
1 ,6«03E-01


(MINUTES)
7i

0.
1.6898E-1

0.
7.4539E-1

0.
7.3680E-1

71

0.
7.2375E-1

0.
7.1536E-1

0.






2


3


3




3


3






CARD

•1?2
«?3
42'l
4PS
«26
4^7
4e!e
y?9
'4 3 O

CARD
431
432
433
434
435
436
437
438
439
440
1 11 ?1 31

MAX im> INTEGRATION TINih STEP SIZE
T^TEG'-'ATTON ERROR CONTROL CRITERIA
UPDATE INTERVAL
P*I*>T INTERVAL
DC i\E miTPUT INTEGRATION PARAMETERS?
»0 AE GENERATE HHQTOP I SSPC I A T ION RATES?
SMfjtjLn THEY VARY *ITH ELEVATION?
i-'C ,*£ HAVE SKY CLEARNESS RATIOS INPUT?
on «*E HAVE TEMPERATURES INPUT?
SHOULD *E PUN'Cn GROUND CONCENTRATIONS?
1 11 81 31

MAXIMUM Mi.^KFfj OF INTEGRATION STEPS
Mjfr'dEe np CHEMICAL REACTIONS
•jU*-r*EN OF SPECIF.
-ifr/^EW OF SPECIE TREATED AS CONSTANTS
•MUMJER OF VERTICAL MESM POINTS
ELEVATION OP FIRST VERTICAL MESH POINT
ELEVATION OP SECOND VERTICAL MESH POINT
ELEVATION UP THIRD VERTICAL MfcSH POINT
ELEVATION OF FOURTH VERTICAL MESH POINT
ELEVATION OF FIFTH VERTICAL MESH POINT
41

6.0
1.
15.0
30.0
YES
YES
YtS
YES
YES
NO
41






0.0
120.0
300.0
600.0
1200.
51 61 71

(MINUTES)
OE-03
MINUTES)
MINUTES)






51 61 71

1000
51
30
1
5
(METERS ABOVE SURFACE)



0
Figure 5-1 (Continued)
        5-17

-------

C At-T)
'441
44^
44?
'444
445
'446
447
44H
449
450

CAPO
4S1
45?
4 S ^
454
455
456
457
458
45°
460

CAPO
461
46?
463
46 H
465
466
467
466
46°
47u

C*RO
471
472
473
474
475
476
477
478
479
4ftO
1

SHtCIES









1











1








sna *IT


i

SPECIE
SPECIE
SPECIE
SPECIE
SPECIE
SPECIE
SPECIE
SPECIE
SPECIE
SPECIE
11











1 1
« • . * • .










11








21

"OLE AT,









?1











21








w OPPOSITION


11

INDEX
INDEX
INDEX
IMDEX
INDEX
INDEX
INDEX
INDEX
INDEX
INDEX


21

F0» AREA
FOR AREA
FOR AREA
FOR AREA
FOR AREA
FOR AREA
FOR AREA
FOR POINT
FOR POINT
FOR POINT
31

AKO BOUND COND
2
3
4
5
6
7
8
9
10
31

11
12
13
14
15
16
17
18
19
20
3t

21
22
23
24
25
26
27
28
29
30
31

SOURCE FLUX NO.
SOURCE FLUX NO.
SOURCE FLUX NO.
SOURCE FLUX NO.
SOURCE FLUX NO.
SOURCE FLUX NO.
SOURCE FLUX NO.
SOURCE FLUX NO.
SOURCE FLUX NO.
SOURCE FLUX NO.
41

NO
IH>?
03
HOMO
CO
HCHd
RCHO
OLEF
PA
N03
41

HO?
PAN
AR
ARCO
R02
RC03
A02
PA02
0
HN04
41

ARO
AROH
AO
OH
0
PAD
N205
S02
S04
H20
41

1
2
3
4
5
6
7
1
2
3
51 61

30.
46.
46.
47.
28.
30.
58.
42.
5ft.
62.
SI 61

33.
121.
92.
156.
89.
103.
74.
89.
74.
79.
51 61

123.
107.
58.
17.
16.
73.
108.
64.
96.
16.
51 61

1
9
8
IS
6
5
26
1
9
8
71



1







71











71








1
1

71











Figure 5-1 (Continued)
         5-18

-------
AKP
481
UP?
UH7
4M9
490
iRD
40J
it 9 '4
495
UPfe
497
498
'499
500
1
1 1 21
31


SPF.CJE ropx FOR POTM SOURCE FLUX f.o. 4
sphCi£ II^DE* FOP POINT SOUKCF FLUX NO. 5
?DECIF J'V'DF* FOR POI'MT SOUSCF. FLUX NO. 6
SPECIF iMfifv FOR POINT SOURCE FLUX NO. 7
uEPOSiriOK SPECIF. I"iDEX, VELOCITY, EXP.
OtPf'SITIOu SPECIE INDEX, VELOCITY, EXP.
rifc^osiuoM SPECIE IP.DEX, VELOCITY, EXP.
M> 1C 3.0E-03 2.5E-03
M>? COMPUTED
0? IP .029 .043 .(
1 11 21 31 41
rl 0 A i )
RCHO
OLtF
PA
WO?
Hf>2
PAP'
4K
COMPUTED
1C ,133
1C 4
1C
1C
1C
COMPUTED
1C
COMPUTED
1C
2
6
3

1

6
.OE-04
.Ofc-04
.OE-04
.OF-03

.Ot-06

.OE-04
11

5
2



5
51
^

13
fe
5
3
28
29
1.5E-03 1.
)5B ,05fl
51
0 .066 .066
3.4E-04 2. OE-04 2.
1.7E-04
. 1 OE-04
.54E-03

1. OE-06

.10E-04
1. OE-04
3. OE-04
1.5E-03

1. OE-06

3. OE-04
1.
3.
1.

1.

3.
61
^

71
3 1.0
48 1.0
18 1.0
5E-03 1.5E-03
.058
61 71
.066
OE-04 2.0E-
OE-04
OE-04
5E-03

OE-06

OE-04
l.OE-
3.0E-
1.5E-

l.OE-

3.0E-
04
04
04
03

06

04

CAPO
501
SOP
504
50U
505
506
507
SO*
509
510

CARD
511
51?
5H
514
51S
516
517
51ft
519
520
1


KG 2
I'C03
AC?
PA02
,)
HMNtt
AtJT OF REACTION MD. 1
REACTION NO. 2
REACTION NO. 3
41 51 61 71











41 51 61 71

l.E-08 l.E-08 l.E-08 l.E-08



.28E-03 1.6E-03 1.6E-03 1.6E-03
,2«E-03 1.6F-03 1.6E-03 1.6E-03
1.7E 04 1.7E 04 1.7E 0« 1.7E 04
COMPUTED FROM SOLAR
4.12E 06 1/MIN
2.50E 01
Figure 5-1 (Continued)
         5-19

-------
1

5?1
522
523
52a
525
5?8
527
52b
529
SJO
1

5?1
532
553
•S34
535
53b
537
S3*
539
sao
1

541
S«
5b6
55?
558
559
560
1 1 21

REACTION NO.
WEACTIQW NO.
REACTION MO.
REACTION (JO.
REACTION Nf>.
^FACTION NO.
«EACHO'\ MO.
WEACTJON MO.
KE&CTIO'v NO.
Vfc ACT I DM NO.
11 21

REACTION NO,
HE ACT I ON NO.
KEACTIO^ NO.
REACTION MH.
PEACTION NO.
»
7
tt
9
10
11
1?
13
31

14
15
16
17
11
19
?C
21
22
23
31

24
?5
26
27
28
29
30
31
52
33
31
34
35
•"S6
37
38
39
40
41
42
43
41 51 61 71

2.20t-09
\ .40E-03
COMPUTED FROM SOLAR
1.506 04
1.50E 04
4. 4 Of; 02
1.20E 04
1.70E 03
8.40t 03
5.UOK-02
41 51 61 71

2.80E 04
9.30E 02
5.00E-05
2.40E 01
3.70E 04
2.90F Oa
4.10E 05
COMPUTED FROM TEMPERATURE
1.90E-02
2.30E 04
41 51 61 71

5.206 03
2.90E 04
3.80E 03
2.90E 04
2.60F 03
t.40fc 05 1/MlN
2.90fc 04
fe.TOfc 04 1/MIN
2.30E 04
2.20E 04
41 51 61 71
COMPUTED FROM SOLAR
2.90E 04
1.70E 04
COMPUTED FROM TEMPERATURE
COMPUTED FROM SOLAR
2.10E 04
4.20E 03
2.24E 04
5.02E 04
2.90E 04
Figure 5-1 (Continued)
         5-20

-------

'A90
561
562
5*3
5S4
565
5hb
567
S6*
569
570

A^n
571
572
575
574
575
578
577
57S
579
580
1 11 21

REACTION NO.
REACTION \'U.






) . "J ( ) 2 + H v
l.i1 + n?. •«• ^
1 M 21

1.03 + l.NH
l.^d * I.MIP -t- 1.H20
2. HO MO
1 .H0i\i(l + HV
1 .OH + 1 . r.jO f M
l.OH + 1.M02 + M
l.°H -(• l.CO
1 .H»2 + 1 ,MQ
1.H02 -»• l.'!02
2.HP2
51

44
'45
46
47
46
49
50
51
=
:
31


-
s
2
3
S
S
s
5
S
41









1.0 +
1.03 +
41

1.N02 +
2. HOMO
l.NO +
1 .OH +
I.HONO +
l.HfJOS +
1.H02 +
1.\'02 t
1 ,HMO«
H202 +
51 61

5.60E 03
2.90E 04
fl.4
1.76E 03
3.0E-02
?.9F 03
8.0
ft.O
l.NO
M
51 61

02

l.N'02 * 1.H20
l.NO
M
M
C02
l.OH

02
71











71











CARO
 5B1
1

1 .^'.2
1 .-il'3
1 . N 0 3
1 .N205
1 ,'M<»05
1 .OH
1.A02
l.AO
1 .HNoa
1 .03
1
i.o
1.0
1.0
l.OH
1.PA02
1.PA02
l.PAO
1.K02
l.PAO
l.PAO
1 1 21

+ 1.03
+ 1 .NO
•«• 1.N02
+ 1.H20

+ l.OLEF
+ l.MO
+ 02

+ l.OLFF
1 1 21
+ 1.N02
f l.OLfcF
+ l.NO
+ l.PA
* UNO
* l.NO

+ l.NO
+ 02
+ 1.N02
31


s
s
=
s
I
s
=
s
s
31
s
3
S
S
S
X
S
3
S
s
41

l.N'03 t
2.M02
1.N205
2.HMQ3
l.NO? +
1.A02
1.N02 +
l.RCHO +
1.H02 +
.5HCHO +,
41
1.N03 +
.3EPOX *•
1.N02 +
1.H20 *
1.N02 +
NTRA
1.R02 +
1.N02 +
.5KET *
.65NTRA +
51

02



1.N02

l.AO
l.HCHO
1.N02
,5RCHO +.
51
•5HCHO
.3RCHO
.5HCHO
1.PA02
.85PAO

.5HCHO
l.PAO
.5RCHO
.15RCHO
61 71








* 1.H02

25H02 +.25RC03 +.50H +.50
61 71
* .5RCHO
* .4H02 * .4H02
* .5RCHO

* .15R02

* .5RCHO

* 1.H02
* .15HONO
 5M6
 5«5
 5^7
 590
CARD
 591
 592
 503
 595
 596
 597
 598
 599
 600
                                 Figure 5-1 (Continued)
                                          5-21

-------
 601
 602
 603
 606
 607
 60«
 &rt
-------

CARD

642
843
644
6a*j
646
647
64M
849
650

C * ^0
651
65?
653
654
655
656
(,57
t>5R
659
660
c ft wn
661
662
663
664
665
666
667
668
669
670

CARP
671
hi?
673
674
675
676
677
678
679
680

CAWO
6H1
h«?
\ 11 21


LAST
SURFACE TEMPERATURES







1 11 ?1





L *ST !)liy(-y SURFACE TE^P
nif-H'bTVITIER 1

UTFFDSIVITIES 2

nif-FuSIVITIES 3
1 11 21

niFFuSJMTIES 4

OIFFUSIVITIES 5

DIFFUSIVITIES 6

OIFFUSTVITIES 7

OIFFUSIVITIES 8
1 11 21


OIFFUSIVITIES 9

DIFFUSIVITIES10

OIFFU3IVITIES11

D1FFUSIVITIE812

LAST
1 11 21

L AST
•I '•- P
31











31





(NhGATlVI
360.0
326.5
420.0
140.1
480.0
31
841 .9
540.0
H66.3
600.0
9842.7
660.0
1495.3
720.0
18901 .8
780.0
31

13582.4
840.0
13552.5
900.0
13092.3
960.0
7507.8
1020.0
7508.0
-10.0
31

-10.0



















E )

126

26


507

526

1766

363

6755



10763

10854

10930

2519

2519





41 51

960. 1.
-10.
360. 21
420. 22
460. 24
540. 2b
600. 27
660. 26
720. 28
780. 29
41 51

840. 29
900. 29
960. 29
1020. 29
- 10.
9.0
.2 126.2
41.1
.6 26.6
486.9
41 51
.3 507.3
1477.0
.5 526.5
1781.4
.4 1766.4
137.9
.1 363.1
3099.0
.4 6755.4
2136.2
41 51

.3 10763.3
1711.2
.4 10854.4
1416.5
.4 10930.4
103.1
.1 2519.1
103.1
.2 2519.2

41 51



61

00

.SO
.41
.39
.46
.67
.46
.51
.61
61

.43
.27
.66
.64

9.0

41.1

486,9
61

1477.0

1781.4

137.9

3099.0

2136.2
61


1711.2

1416.5

103.1

103.1


61



71











71






235.8

165.8

388.8
71

536.8

6200.8

738.8

11193.6

7653.7
71


7410.8

5997ffl4

5351.8

5352.0


71



Figure 5-1   (Continued)
            5-23

-------
                                                    to

                                                    §
                                                    •H
                                                    o

                                                    13
                                                    O


                                                    0
                                                    
-------
     The program's inputs begin with the 80-character page label (TITLE)
similar to that used in the other modules of the code.  The page label
is followed by a parameter (GOAHED), which indicates whether or not the
program should proceed beyond the PREDAT listing of the input deck and
reading of the emissions data schedule.

     5.1.1  Source Emissions Data

     The first card in the block of emissions data parameters specifies
whether the emission data is input on the mass fraction or mole fraction
basis.   The user should specify either the word MOLE or MASS starting in
column 41.  When the emissions data are input on the mass fraction basis,
the program converts it to a mole  (volume) basis, using the molecular
weights specified later in the input stream.
     The next card read indicates the number of species with area source
emissions data inputs.  The user should specify a value of seven (7)
corresponding to the species or species groups listed below:

     1)  Nitrogen oxides
     2)  Alkanes (paraffinic hydrocarbons)
     3)  Alkenes (olefinic hydrocarbons)
     4)  Aromatic hydrocarbons
     5)  Aldehyde hydrocarbons
     6)  Carbon monoxide
     7)  Sulfur oxides

     Next, the area source emission fluxes are specified using a pair of
cards for each entry in the schedule.  Each pair contains a time (0-1440
minute clock) and seven species emission fluxes in the units of mole or
mass fraction meters per minute.  In the St. Louis application, the
order of species' fluxes on the cards is indicated in the list shown
above.   In general, the order of the species' fluxes is arbitrary, sub-
ject to the constraint that nitrogen oxides (NO ) and aldehydes must be
                                               A
first and fifth in the list.   This constraint is necessary because the
program internally partitions these emissions data to more than one
species.  More specifically,  the program assumes the NO  emissions are
                                                       A.
                                   5-25

-------
90% nitric oxide (NO) and 10% nitrogen dioxide (NO-).   It assumes the
aldehyde emissions are 60% formaldehyde (HCHO) and 40% other aldehyde
species (RCHO).   The list of area source emissions flux cards is termi-
nated with a pair of cards, the first of which has a negative entry in
columns 21-30.  It is important to note that the program uses the ini-
tial and final times in the area source emissions schedule as the start
time and stop time of the simulation.
     Following the area source inputs, the program reads the point
source emissions inputs.  The number of species with point source emis-
sions data (NPSFLX) is read first.  The number of species here is nor-
mally seven, but may be less in situations where the user includes all
hydrocarbon and/or carbon monoxide emissions sources as area sources.
This card is followed by a temporal schedule, which normally (i.e., when
NPSFLX>4) has three cards per point source.  The first pair of cards
indicates the time and mole or mass fraction-meters of species emissions
entrained into the air parcel moving along the trajectory.  (See Section
4 for an explanation of these units).  The order in which the species
emissions are listed on the cards is subject to the same constraints
discussed above for area source emissions species.  The third card of the
set contains the normalized vertical distribution of the emissions with
respect to the vertical mesh points.  It is important to point out that
the sum of the elements of this vertical distribution must equal one for
proper representation of the source emissions.  The point source data
schedule is terminated by a pair of cards, the first of which has a
negative entry in  column 21-30.

     5.1.2  Control Parameters and the Vertical Mesh

     The program next reads a series of control parameters.  The first
card contains the  initial  integration time step size.  This parameter is
specified in minutes and must be quite small  (10~   to 10  ) for proper
start-up of the integration algorithm.  Next, the program reads a card
with the maximum integration time step size in minutes.  The program's
integration method is a variable  step method, which chooses the time step
at  each point in the solution on  the basis of certain convergence criteria.
In  practice,  the maximum step size permitted  is a necessary input to
this algorithm, and values of 4 to  8 minutes  are recommended.
                                    5-26

-------
     Next, the user specifies the integration error control criteria.
This is a dimensionless and somewhat empirical parameter, which should be
input in the range of 10~  to 10~ .   The program then reads a card which
contains the update time interval in minutes.  This is the interval at
which the program checks for new values in the various schedules of
time-varying input parameters.  The update interval is used to revise
the schedules of several inputs for use by the program, as described in
Section 5.5.  Values between 10 and 20 minutes are recommended.
     The next card in the input deck specifies the time interval between
printouts of the pollutant concentrations.  This print interval must be
chosen to be a multiple of the update interval for proper operation of
the code.
     The program next reads a series of cards with YES or NO inputs for
various program options.  The first card here indicates whether or not
the program should print six integration progress parameters at each
output interval.  These parameters are discussed in Section 5.4.  The
next card indicates whether the user wants the program to generate the
schedules of photodissociation rates (YES), or whether the user wants
the data read in directly (NO).  The following card also pertains to the
photodissociation rates, and it indicates whether  (YES), or not (NO),
they vary with elevation.  These last two cards should be input as YES
under almost all conditions.  See Section 5.3 for elucidation of the
photodissociation rates used by the program.  Next, the program reads an
option flag, which indicates whether (YES), or not  (NO), sky clearness
ratios are included in the input deck.  The program assumes clear sky
conditions when they are absent.  Continuing, the program reads a card
which specifies whether  (YES or NO) a schedule of temperatures is input.
The program assumes an atmospheric temperature of 25 C when this input
is NO.  The final YES or NO input indicates whether or not the user
wants the computed ground concentrations punched at each print interval.
This option is useful if the modeler wants to save the output in a form
convenient for subsequent processing.
     The program next reads a series of integer constants.  The first is
the maximum number of integration time steps permitted in a run.  This
number should be selected sufficiently large  (i.e., N >_ 75 steps per
hour of real-time simulation) so that termination of a run on the basis
of this criterion occurs only in abnormal/erroneous conditions.  Next,
                                   5-27

-------
the user specifies the number of chemical reactions (NOREAC) and number
of chemical species (NOSPEC) in the chemical mechanism.  For the ERT
photochemical mechanism, these parameters have values of 51 and 30,
respectively.  In addition, the user must specify the number of species
(a subset of NOSPEC) which are treated as constants or treated as steady-
state species in the model.  There is only one such species, H_0, in the
ERT photochemical mechanism.  The last integer constant read in the
section is the number of vertical mesh points (NOSTAT) input.  This card
is followed by NOSTAT cards with the mesh point elevations specified in
order of ascending elevations, as done in the input decks for other pro-
gram modules.

     5.1.3  Chemical Species List

     The program reads a series of cards which each contain the name (up
to 4 characters) of one chemical species, its molecular weight, and a
code for the type of surface boundary condition it has.  The species'
names must be input in the order shown in Figure 5-1 for the ERT photo-
chemical mechanism.  The molecular weight data is completely optional
when emissions data are specified in moles.  When the  emissions data is
input on the mass fraction basis, only the molecular weights of the
species with emissions data need be specified.  The boundary condition
code is input with an integer value of one when the user wishes to
include surface deposition for that species.  Otherwise, the user may
input a zero or leave the field blank to indicate the  default  (no depo-
sition) surface boundary condition.

     5.1.4  Emission Species and Surface Deposition Species

     The user inputs a  set of cards which indicates the correspondence
between area source emissions species and the species  number  (index) in
the chemical species list.  The first card indicates the chemical species
index for the first entry on the area source emissions data card pair.
In the sample problem,  the first entry of emissions data is for NO  ; so
                                                                  «rv
the corresponding species  index is  1 for NO.  Similarly, for the second
card here, the  species  index is input as 9  (for PA) since  the  alkane
emissions are specified second on the emissions data  card  pairs, etc.  A
similar  list of species indices is  input for the point source  emissions
                                    5-28

-------
species, following the cards for the area source species indices.
     Next, the program reads a set of cards with data for the species
with surface deposition boundary conditions.  The program reads one card
for each species that has a boundary condition code equal to one.  Each
card contains one of the depositing species' index (from the species
list), its surface deposition velocity (v) in meters/minute, and the
exponent  (p) of the concentration (c) in the analytic deposition flux
($,) expression shown below:

          $,  =  v*c"
           d

This exponent has a value of one for dry deposition,  but may take on
other values when modeling higher order surface chemical reactions.

     5.1.5  Initial Concentrations

     Initial pollutant concentrations are input using one card per
species and with the species ordered as shown in the species list.  Each
card contains the initial concentrations at the vertical mesh points in
the units of parts per million.  Ground-level concentration is entered
in columns 21-30; the concentration at the second mesh point is in
columns 31-40; etc.
     The reader can observe from Figure 5-1 that some cards are labeled
COMPUTED and their concentration input fields are blank.  Initial con-
centrations for these species are computed internally using the psuedo-
steady-state assumption.  Table 5-2 lists the species which require
initial concentration input data and those which are computed.  Note
that one card for every species in the species list must be included,
even though some cards have blank input fields.

     5.1.6  Chemical Reaction Mechanism Inputs

     The chemical reaction rate constants are specified next in the
input deck.  One rate constant per card is input in columns 41-50, and a
total of NOREAC (See Section 5.1.2) cards must be input.  The units of
the rate constants are ppm   - minute   for bimolecular reactions.  The
rate constants for ERT reaction numbers 1, 6, 21, 34, 37, and 38 may be
left blank since they are either photodissociation rates or temperature
                                   5-29

-------
                         TABLE 5-2
USER SPECIFIED AND INTERNALLY COMPUTED INITIAL CONCENTRATIONS
       User Specified
           NO
           03
           CO
           HCHO
           RCHO
           OLEF
           PA
           HO 2
           AR
           OH
           S02
           S04
           H20
Internally Computed
       NO 2
       HONO
       NO 3
       PAN
       ARCO
       R02
       RC03
       A02
       PA02
       D
       HN04
       ARO
       AROH
       AO
       0
       PAO
       N205
                                5-30

-------
dependent rates which are determined elsewhere in the model.
     The program next reads a block of cards (total number equals NOREAC)
which describe the chemical mechanism.  Each reaction is specified in
alphanumeric format in columns 1-80.  The information on these cards is
used only to reproduce the mechanism in the output listing; it is not
used in the computation.  The stoichiometric coefficients for the ERT
photochemical mechanism are contained in the program's explicit chemical
rate expressions; thus, they are not a part of the input stream.

     5.1.7  Photodissociation Rate Input Parameters

     The program internally stores photodissociation rate data as func-
tions of solar zenith angle and elevation above the surface.  The user
is required to specify the latitude, longitude, time zone, and date, so
that the program can determine a temporal schedule of solar zenith angles
and, thus, photodissociation rates.  The longitude and latitude of the
approximate center of the modeling region are first specified in degrees.
Next, the time zone is indicated by the number of hours difference
between Greenwich, England 0  meridian time and local standard time,
followed by the date in the year-month-day form (YRMODA).
     Next, the program reads the number and reaction number(s) of the
independent photodissociation reactions.  The program has built-in
photodissociation rate data for NCL and HCHO photolysis, the two indepen-
dent photodissociation rates.  The program has been equipped to deter-
mine the photolysis rates for other species (HONO and RCHO) on the basis
of the independent rates data.  Thus, the user should specify this data
exactly as shown in Figure 5-1 for the ERT photochemical mechanism.
     The program has a seldom-used option which allows the user to input
photodissociation rate constants.  The user should specify SUNGEN = NO
in the control parameter section of the input, and input two arrays for
the photodissociation rates of N02 and HCHO.  When the user wants to
input different rates for the different mesh point elevations, HIRATE =
YES is specified.  The program then reads a block of cards which each
has NOSTAT (See Section 5.1.2) entries of photodissociation rates for
one reaction in the fields 21-32, 33-44, 45-56, 57-68, 69-80.  The first
card in the block must correspond to the start time of the simulation,
and subsequent cards must be input for times at the frequency of the
update interval.  The last card in the block is input with a negative
                                   5-31

-------
entry in columns 21-32.  A second block of cards is input for the photo-
dissociation rates of the second reaction with the same format.  If the
user selects HIRATE = NO, only one entry per card is required in columns
21-32.

     5.1.8  Sky Clearness, Temperature, and Diffusivity Schedules

     The program reads a schedule of sky clearness ratios.  Each card in
the schedule contains a time in minutes and the ratio of actual ultra-
violet radiation to the expected clear sky radiation for that time, date
and location.  The ratio may have values between zero and one, where one
indicates clear sky conditions.  These ratios are used by the program to
adjust the photodissociation rates to represent the actual ultraviolet
radiation intensity.  The last card in the schedule is input with a
negative entry in columns 41-50.
     Next, the program reads a temporal schedule of temperatures.  Each
card contains the time in minutes and temperature in degrees Celcius.
The temperatures specified here are used by the model to determine the
rate constants of chemical reaction numbers 21 and 37.  The last entry
in the schedule contains a negative value in columns 41-50.
     Lastly, the program reads the schedule of eddy diffusivity  (K )
                                                                  LJ
coefficients.  A pair of cards is input for each hour which contains a
time in minutes and NOSTAT +1 K  coefficients.  The first card contains
                               z
the time in columns 21-30 and three K  coefficients in columns 41-50,
                                     £j
51-60, and 61-70.  The second card contains the remaining K  coeffi-
cients starting in column 21.  The coefficients on the cards are ordered
by ascending elevations.  As described in Section 3, these K  coefficients
                                                            Li
are the average K  coefficients between vertical mesh point elevations.
The first and last K  coefficients on the card pair are assigned values
                    Li
equal to the next innermost K  value for use by the program.  The reading
                             z
of this schedule is terminated when the program reads a pair of  cards
with the entry for time set less than zero.
     Each of the schedules described here are output by the meteorologi-
cal module in the proper format.  Nevertheless, it is important  for the
user to know that the program requires each of these schedules to start
at the same time as the simulation start time.  The schedules should
extend to a time when the input parameter becomes invariant.  For
example, the user may find it convenient to end the sky clearness ratio
                                    5-32

-------
schedule prior to the stop time if the sky is perfectly clear after a
certain time of day.  However, it is unlikely that this would be the
case for temperature or K  coefficients.

5.2  ERT Photochemical Mechanism

     The model's chemical mechanism, as shown in Table 5-3, simulates
the reactions occurring in an irradiated hydrocarbon/NO /SO  mixture in
                                                       .A.   J\.
air.  The hydrocarbon reactivity is delineated by the use of five class-
es of hydrocarbon species in the mechanism.  The primary purpose of the
mechanism is to provide the chemical rates which control the formation
of ozone, nitrogen dioxide, and sulfates in the atmosphere.  This mecha-
nism was developed by ERT and systematically tested against smog chamber
data from the University of California, Riverside, chamber facility.
The reader is referred to Table 5-4, which defines the chemical species
symbols used in the mechanism.
     The hydrocarbon reaction rate constants used in atmospheric applica-
tion of the chemical mechanism are approximations based on the estimated
reactivity of typical atmospheric hydrocarbon mixtures.  The reactivity
of the atmospheric alkanes is assumed to be somewhat greater than that
of pure propane, but less than n-butane.  The atmospheric alkenes are
assumed to be as reactive as propene.   The atmospheric aromatics have
been assigned a reactivity greater than toluene but less than m-xylene.
These rate constants may require adjustment for regions where the typical
atmospheric hydrocarbon mixture is more or less reactive than St. Louis.

5.3  Photodissociation Rates

     The ERT photochemical mechanism has four reactions which involve
photolysis by ultraviolet radiation.  These reactions play a particu-
larly important role in the chemical processes which control ozone
formation.  In fact, without ultraviolet radiation, the rate of ozone
formation in the troposhere would be negligible.  They are also impor-
tant as a source of the free radical species  (OH, H0?, and R0?) that
influence the HC/NO  mechanism and the rate of sulfate formation.
                   X
     The photlysis steps in the mechanism are for nitrogen dioxide, ni-
tric acid, formaldehyde, and other aldehydes.  The clear sky photodisso-
ciation rates for nitrogen dioxide and formaldehyde, as functions of
                                   5-33

-------
                                TABLE 5-3


                THE ERT PHOTOCHEMICAL REACTION MECHANISM
 1    N02 + hv  =  0 + NO


 2    0 + 02 (+ M)   =  03 (+ M)


 3    03 + NO  =  N02 + 02


 4    NO + N02 + H20  =  2HONO


 5    HONO + HONO  =  NO + N02


 6    HONO + hv  =  OH + NO


 7    OH + NO + M  =  HONO + M
 8   OH + N02 + M  =  HN03 + M


 9   OH + CO  =  H02 + C02


10   H02 + NO  =  N02 + OH
12


13


14


15


16


17


18


19


20


21
N03 + NO
               =  2N0
                 =  2HN0
                =  A0
OH + OLEF


AO  + NO


AO + 0   =  RCHO + HCHO +
                  N09 + AO
                    ^-
Rate Constants (ppnT  min  )
	at 1 Atmosphere


   Ultraviolet dependent


          4.12E+06


          2.50E+01


          2.20E-09


          1.40E-03


   Ultraviolet dependent


          1.50E+04


          1.50E+04


          4.40E+02


          1.20E+04


          1.70E+03


          8.40E+03


          5.00E-02


          2.80E+04


          9.30E+02


          5.00E-05


          2.40E+01


          3.70E+04


          2.90E+04


          4.10E+05


   Temperature dependent
                                    5-34

-------
                       TABLE 5-3 (CONTINUED)
                                        Rate Constants (ppm~  min  )
                                        	at 1 Atmosphere	
22
23
        + OLEF = 0.5HCHO + 0.5RCHO + 0.25H02 +
31


32




33


34


35
                 0.25RC0
                            0.50H + 0.5RCH0
     RCHO  + NCL  =  N0_ + 0.5HCHO + 0.5RCHO
         <~     £       O
24   0 + OLEF  =  .3EPOX + . 3RCHO + .4H0

                  .4RO
25   RCH02 + NO  =  N02 + 0.5HCHO + 0.5RCHO


26   OH + PA  =  H20 + PA02


27   PA02 + NO  =  N02 + .85PAO + .15R02


28   PA02 + NO  =  NTRA


29   PAO  =  R02 + .5HCHO + .5RCHO
30   R02 + NO  =  N02 + PAO
     PAO +
               =  .5KET + . 5 RCHO +
     PAO + N02  =  .85NTRA + .15RCHO +

                   .15HONO
     OH + RCHO  =  RC03 +


     RCHO + hv  =  R02 +
                             + CO
            NO  =
36   RCO  + N0
        *J
                 =  PAN
37   PAN  =  RC03 + N02


38   HCHO + hv  =  .67HO  + CO
39   HCHO + OH  =  H20 +


40   RO^ + HO,,  =  RO^H H
41   AR + OH  =  AROH + HO,
42   AROH + OH  =  ARCO
                             + CO
                                                   1.90E-02


                                                   2.30E+04




                                                   5.20E+03


                                                   2.90E+04


                                                   3.80E+03


                                                   2.90E+04


                                                   2.60E+03


                                                   1.40E+05


                                                   2.90E+04


                                                   6.70E+04
                                                   2.30E+04


                                                   2.20E+04


                                           Ultraviolet dependent


                                                   2.90E+04


                                                   1.70E+04


                                           Temperature dependent


                                           Ultraviolet dependent


                                                   2.10E+04


                                                   4.20E+03


                                                   2.24E+04


                                                   5.02E+04
                                  5-35

-------
                       TABLE 5-3 (CONTINUED)
                                        Rate Constants (ppm   min  )
                                        	at 1 Atmosphere	
43   ARCO + NO  =  N02 + RCHO                      2.90E+04

44   AR + OH  =  H20 + ARO                         5.60E+03

45   ARO + NO  = N02 + H02 + AR'cHO                2.90E+04

46   S02 + 0  =  S04                               8.40E+00

47   S02 + OH  =  SO.                              1.76E+03

48   S02 + H02  =  S04 + OH                        3.00E-02

49   S02 + D  =  S04 + RCHO                        2.90E+03

50   S02 + R02  =  S04 + PAO                       8.00E+00

51   S02 + A02  =  S04 + AO                        8.00E+00
                                    5-36

-------
Species

  AO

  A02

  AR

  AR'CHO

  ARCO


  ARO




  AROH

  CO


  C02*

  D

  EPOX*

  HCHO

  HONO
  HN04

  H02




  H2°2*

  HV

  KET*

  M*

  NO
             TABLE 5-4

CHEMICAL SPECIES SYMBOL DEFINITIONS


                      Symbol Designation

    Alkoxy radical equivalent to A0~

    Product of OH addition to olefin in the presence of 0,,

    Aromatic hydrocarbons

    Aromatic aldehyde

    Product of addition of OH to a cresol
    in the presence of 0_

    Product of H-abstraction from side chain alkyl
    group on benzene ring followed by addition of
    0? to radical formed


    Cresols

    Carbon monoxide

    Carbon dioxide

    Criegee intermediate (RCHO_)

    Epoxide formed from 0 atom addition to olefin

    Formaldehyde

    Nitrous acid

    Nitric acid

    Pernitric acid

    Hydroperoxyl radical

    Water

    Hydrogen peroxide

    Photon

    Ketones

    Any third body, such as N2 or 0~

    Nitric oxide
                               5-37

-------
                       TABLE  5-4  (CONTINUED)
   Species
     NO 2

     N03
     N2°5
     NTRA*
     0

     °2*
     °3
     OH
     OLEF
     PA
     PAN
     PAO

     PA02

     R**
     RCHO
     RC03
     RO
     R02H*
     S0n
     so.
                  Symbol Designation
Nitrogen dioxide
Nitrate radical
Dinitrogen pentoxide
Organic nitrate
Oxygen atom (ground state)
Oxygen
Ozone
Hydroxyl radical
Alkenes (olefinic hydrocarbons)
Alkanes (paraffinic hydrocarbons)
Peroxyacetyl Nitrate
Alkoxy radical formed by PA
Alkyl peroxy radical from the 0« addition
to the radical formed by H-abstraction
from a paraffinic hydrocarbon
Generalized alkyl group (e.g., C-H,., C_H_, etc.)
Aldehydes other than formaldehyde
Acyl peroxy radical
Alkoxyl radical
Alkyl peroxy radical
Product of disproportionation between H0~ and R0_
Sulfur dioxide
Sulfate
* Species' Concentration not computed by the model
**Definition of species group
                                   5-38

-------
elevation and solar zenith angle, are presented in Tables 5-5 and 5-6.
The rates shown are 95% of the values reported by Peterson, 1977 and
Peterson, et al 1976.

5.4  Description of the Output

     This section describes the printed output of the KEMOD program.
The output of the program includes the PREDAT listing of the input deck,
partial verification of the input data, the computed species concentra-
tions, and a printer-plot of the concentration history for five species.
There is also an optional listing to verify the schedules of all time-
varying parameters used by the program.
     The first page of output following the PREDAT listing (see Figure
5-1) is a partial verification of the input control parameters.  As
shown in Figure 5-3, the program lists the initial and final simulation
times, the initial and maximum integration time step sizes, and the
number of reactions, species, steady-state species, and vertical mesh
points.
     The next page of output, Figure 5-4, lists area source emissions
data for the seven emission species.  The columns labeled NO and HCHO
represent the total nitrogen oxides and aldehydes emissions fluxes,
respectively.  The user should note that the data has been rescheduled
such that each entry is at a fixed time interval, the update interval
described in Section 5.5.  Also, the fluxes have been converted to the
units of ppm-meters per minute.
     Next, the program lists the sums of the effective point source
emission rates by time, species, and vertical mesh points  (or cells) as
shown in Figure 5-5.  For each time shown, the program lists NOSTAT
lines of emission rates in ppm per minute.  The first line refers to the
emissions in the ground cell by species, the second line corresponds to
the second cell, etc.  The program converts the input data to the emis-
sion rates shown, as described in Section 5.5.
     The next page of output is a listing of the ERT photochemical mech-
anism and the rate constants used for each of the reactions (See Figure
5-6).  Note that the listing includes the initial photodissociation and
temperature-dependent reaction rates computed internally.  This page is
followed by one with the chemical species list, as shown in Figure 5-7.
                                   5-39

-------
          CD
          4->

          fi
          t-t
           o
it -H -=t
££
JS M
CM i-H O
O O 0
Z C/3 to
O
O
CM
O
O
1— 1
°a

to
1 
0 3  >  o o
r-l £) Ctf
W < 4-1

CM
0
00
0
i— I
CTi
i— 1
CN

to
to
vO
i-l
^


T— 1
f~*
•<*

00
o
LO
CN
to
LO
LO
^-
LO
O
LO
LO





O





vO
0)
0
vO
CN
r-l
f— 1
LO
CN
i— 1
f-^
to
to
LO
•*


^^
o
LO

to
*^
LO
vO
vO
LO
00
t^x
LO
to
oo
LO




•
o
LO
1— 1



00
og
O
LO
•5J-
1— 1
0
oo
CN
LO
0
•*f
vO
00
••*


O

LO

^t

LO
t--
CTi

00
O
vO
to
I— 1
vO




•
O
vO
to



CM
to
o
LO
vO
1— 1

0
to
vO
to
**
oo
i— i
LO


i— 1
f^
LO

LO
o
VO
VO
CM
vO

to
vO
i— i
O




*
O
^f
o



LO
to
0

00
1— t

to
to
vO

••3-

T^
LO


cr>
CTi
LO

"*
to
vO
to
LO
vO
LO
VO
VO
oo
vO
VO




•
O
oo
CTl



00
to
O
I— 1
o
CM

LO
to
I— 1
CTl
^f

t"C.
LO


VO
CN
vO

0>
LO
vO

r*^
vo

00
vO
to
CTi
vO




•
0
00
to
1— 1


1— I
^^
o
00
I— 1
CM
O
00
to

t— 1
LO
r-
Q"i
in


Q"i
•*t
vO

t_t
CO
VO
i-t
CTl
VO

r— 1
t-~
i— 1
Is-




•
O
^3"
CO
I— 1



T^-
o

to
CN
O
0
*3-
VO
to
LO

r-l
VO


CTl
vO
VO

r-t
O
t-~
o
CM
t~
o
to
i^
to
10
f*~




•
o
LO
to
CN



^J-
0
I-l
LO
CM
<— 1
CN
"*

LO
LO
CTl
to
VO


CTi
CO
vO

O
CM
^~-
00
to
t~~
00
^>
t^
t— 1
LO
^




•
o
f— 1
CT>
CM


CM
LO
O
CTi
vO
CM
to
^f
•*
oo
r*^
LO
CTi
LO
vO


oo
o
1^

(^
to
f~-
LO
LO
t^
LO
vO

00
vO
I*-




•
0
to
LO
to



LO
o
00
CO
CM
LO
vO

CTi
CTi
LO
r--
f^
vO


vO
CM
f*

^
LO
r--
i— i
i^-
t~~
o
CO
f-
to
CO
1^




•
o
1— 1
CN
^f


                                                                5-40

-------
         6


         a>
NO

 I

LO


PJ
         O
        •H
        +J
         rt
        •H
         O
         O
         to
         t/>
        •H
        ••a
         o
        +->
         o
        ,c
        a,

        o
        a:
to
to   o

     oc

     +
  CM
O   O
X,   U

NO   NO
 +

o














1— 1
I

JS
•H
c
rH
rt
i— i
o



















o
NO
OO
o
00
t^-
o
o

o
o
NO
o
o
LO
o
o


o
o
to
o
o
CM
o
0
rH
o
o

c/>
fH
to 1 CO
C rH 4->
030)
•H W S

rt 
> > CO
CO O CJ
r-H ,Q rt
OJ -H LO
NO t~^ f"*^
rH CTl 00
^ rH NO
NO (*•» t*^





• • •
o o o
LO NO rf
1— 1 tO NO


NO
o
LO
CTl
o
LO
CM
CM
to
CTi
to
to
to
LO
CM
^t
NO

rH
CM
1^
NO

^

o
00

rH
00





•
o
00
CTl


oo
o

o
rH

^>
CM
CM
CM
•*
NO
NO
LO
CTl
tv^
NO

rH
NO
f^
\0
rH
oo
CTl
^«
oo
00
LO
oo





•
o
oo
to
1— 1

CTl
o

rH
rH
NO
NO
CM

LO
•"*
LO
o
NO
to
CM
t~-

^
o
oo

NO
00

CTl
00

o
CTl





•
o

00
rH

o
o
-si"
CN
•-I
NO
oo
CM
CN
oo
•f
oo
to
NO

LO
r^

to
«5j-
oo
CTl
CTl
00
to
to
CTl
to
^J-
CTl





•
0
LO
to
CM

CM
o
NO
to
rH
oo
o
to
CM
rH
LO
CM
C*x
NO
LO
CTl
r^

CM
00
00
CTl
to
CTl
CM
t^
CTl
to
oo
CTl





•
o
rH
CTl
CM

CM
o
NO
to
rH
00
o
to
CM
r-l
LO
CM
r--
NO
LO
CTl
I"~

CM
00
00
CTl
to
CTl
CM

CTl
to
oo
CTl





,
o
to
LO
to

CM
o
NO
to
i-H
00
o
to
CM
i-H
LO
CM
r*^
NO
LO
CTl
I~~

CM
00
00
CTl
to
CTl
CM
[->.
CTl
to
co
CTl





•
o
r-l
CM


                                                                                                         CM

                                                                                                          o
                                                                                                          4->
                                                                                                           e

                                                                                                           c
                                                                                                           o

                                                                                                           x
                                                                                                                             rt
                                                                                                                             o

                                                                                                                             (/)

                                                                                                                             t/)

                                                                                                                             3
                                                                                                                            I—I
                                                                                                                             rt
                                                                                                                            <
                                                                   5-41

-------
                                                                  UJ

                                                                  o



                                                                  X
                                                                  t-

                                                                  o
                                                                  2:
                                                                  <.

                                                                  o
o-
ru
                                                                  o
                                                                  a.
                                                                  LD

                                                                  UJ
                                                                  X
 I

V)
                      co
                      UJ
                            CO
                            UJ
            co
            UJ
             cc
             UJ
                                o
                                3
                                _J
                                o
CO
             to
             UJ
             I
             c.
             I
2
*—i
Z

o
o

o
>o
Kl
Z
H-t
s:

o
o
 •
o

o
o
o
v>4
o
o
o
                                         o     »«
                                         o     to
                                                            —    in
                                                            UJ    CO
                                                                  CO
                                                                              to

                                                                              in

                                                                              0)
                                                                              fH

                                                                              bO
                                                                              •H
                                                                              P-,
                                                            CO
C:
O
o

CO

\L
u.
I—I
o
 I


u
 LU
 X
 o
             c
             •— 4
             to
             u.
             1— 1
             0
             O
             UJ
             o
             u.








to
^-*

U!
£
£

^
»-*
1—
»— 1
co
t— i

UJ
fv)
KH
co
o.
UJ
>—
to
CO
»-i UJ
5
z *-
t-l
*~ -<
H-
o
*x.
UJ
cc
u.
a
or
UJ
CD
2.




CO
k-t
CO
UJ
1-4
u
UI
a.
CO
u.
o
ct
UJ
CD
S"
O
UJ
1-
co

2i
*-*
CO
UJ
H-l
u
UJ
a
CO
U-
o
tt
UJ
cc
5:
o
a.
X
CO
UJ
3;

•a
O
»-l
1—
cc
UJ
~>
u.
o
CK
U
CD
2
             a.
             z
                                     5-42

-------
                           ooooooooooooooooooooooooooooooooo







                    OO                                                                                                                  OOOOOOOOOO






                           OOOOOOOOOOOOOGOOOOOOOOOOOOOOOOOOO

                           UJUiUJUikiJUJUimUJUJUJUJiUUJUJUJUJiUlAJUJilJUJUJUiUJlUIUJUJbJUJUItllliJ





                    OO                                                                                                                  OOOOOOOOOO






                           OOQOOOOOOOOOOCOOOOOOCOOOOOOOOOOOO
              C            Il§llilttiilliflt§»§llllll§i§ll8l






,-,                  OO                                                                                                                  OOOOOOOOOO
**


•~*     t_


       l-l                  OOOOCOOOOOCOOOOOOO O.O OOOOOOOOOOOOO







       i           OO                                                                                                                  OOOOOOOOOO  ^t
        I                                                                                                                                                                        I

       a
co     a.                                                                                                                                                                       ^


r>                         OOOOOOOGOOOOOQOOOOOOOOOOOOOOOOOOO                                     bo
_l            U-            ItltltllllllllillttlllllllltlttCt                                    'H
              UJ           ti I in  UJ ^J ^J ti t ul  ^ iil ^j \jl i^J ^ U I  ti { 1^ '  UJ It I UJ It i UJ yj UJ UJ it I U i  ul ut  It I UJ JjJ HI lal                                    PH





        I            00                                                                                                                  OOOOOOOOOO
 I      I
 I      t




C                         OGOCCOOGGOOOC-OOOGOGOOOOOOOOOOOOOO
t-H                          Itlllllllllllllllltltlltlllltllll
H-     UJ                  ill ul  ul 111 [1 I Ul t*l  tit U! tti lij ItJ til tl_l  Ul til  iil Ul 111 Iki Ui LiJ LlJ III III lit  Ul tit  Ui lit III ui It!





C/5CJ            OO                                                                                                                  OOOOOOOOOO

UJ
_J     >»

£     I)                                  _

 r                         ooooaooeooooocooc.oococoooeooooooo
       al                   IIIIIIIIIIIIIIIIIIIII-I-I9IIIIIIIII






U.     •<            CO                                                                                                                  OOOOOOOOOO
l-l     UJ
o     tx
 I     <

•a     O
<_>     UJ
l-i     (ft           C.OCCOOCOOOOCOCrOCCOOCCOC-CC'OOGOOOCOOOOOOOOOOGQlO
^     »-*     UJ      ••••••••••••••••••••••••••••••••••••••••••»|^||
uj     >     s    oifioinoinoinotneipoi/ioif
-------
Kl KI K> 5J
O O O O
IIII
uj UJ uj u:
l/"1 & in Kt
=j — o- a
"i ru — in
5» S»
O O
1 1
UJ Ul
«~ «
ru i—
Kl M
« in
o o
i i
Ul Ul
•o •-•
o* x*
*i* .
a
o
1
Ul
pfc
^
«••*
in ^ in
o o o
iti
Ul Ul Ul
9 in x*
co ru .M
""11*1 .

o
1
UJ
in
^i
"*
p» r- f.
O O 0
III
UJ UJ kit
KI fU 5»
Xl 00 P^
oo in x
p- p- p-
0 O O
III
Ul Ul Ul
ru o o
*C O* (^
N. in KI
p>-
o
i
U)
ru
o
•*
p^ r^ r~ ts.
o o o o
1 l t •
Ul Ul Ul Ul
ru o o ru
 9> 0
p- in Kl .*
                                                                                                                                                     o o o o o
ru ru K- Kt
o c o o
till
Ul Ul Ul Ul
x in ^ ^t
x ^i *& x
—< -* oc ru
•C X
0 0
1 1
UJ UJ
a —
P- Kt
I-. KI
4> X
O O
1 1
Ul Ul
co in
ao ru
^~i .
•c
o
1
Ul
ac
•**
*
X X P'
O 0 O
1 1 1
Ul Ul U!
in in P-
X X- X
-* ru -c
p- P- ao
O 0 O
1 1 1
Ul Ul UJ
X- 9" X*
aC Kl ff\
". 1*.
oo
o
1
Ul
o
CO
ru
i- r--
o o
1 1
ui ua
x o**
ec Kl
— i -.
00 00
o o
1 1
Ul Ul
•c o
K> op
a- ru
p- p~ p-
o o o
III
Ul Ul Ul
Kl «•* X*
X OD QD
KI ru -*
00
O
1
Ul

CO
*
!»• f» !»• OD
0 O O O
III*
ui ui ui ui

•a to «o co
Kl «\l — s»
* r- 
f~   h-
fO 0
ru i^
<*• O
^ ru ^
«O JJ s»
 « a-
<-• nj —« o
eo >o <» ^
                                                                                                                                                     o o o o o
      i.     O
      ^     I
£    Si     L>
t~~    CL     T
v    Q.

ru                             c                 o                o                 o                 o                o                 o    o o o o o
v.


                   ^j ^ ^ ^        ^Q  ^) pfc ^»       ^ ^ ^*  ^.        ^ (^ ^^ c^       o^ ^ ^5  c?        rj* ^p ^ c^       &"  &* ^p cd
 I                  O O O C        O  O C O       OOOO        OO-M.H       OO»^>-i        O O O —«       OOO«-t
                   IIII        IIII         IIII        IIII         IIII         IIII        tilt
(/3                 UIUIUIUI        U1U1U1UI       UIU.'UIUI        UIU1UIUI       U1UIUIU1        UlUlUJUl       U1UJU1U1
>-*           Q:     ac aC Kl in        ^^O^f1*-       Kl^C^in        Xr>t^X       ^P^h^X        «-tOfj>KI       *-*OO^I>O
"^           ^     «£; *•< M^ K)        k^  ^ K) ^D       Kl C> Kt  X        in ••• QD Kl       in ^* CO  Kt        ^^ ** Kl *O       V^1  ^^ Kt ^0

J	     .....     .....      .....     .  ."7   .   .      .  ,*^  ..     .....LO
                               O                 O                O                 O                 O                O                 O    O O O O O   I
 .                                                                                                                                                                   LO

OT                                                                                                                                                                     UJ
a ~
v~ ^-<
in ^
IT >C
0 0
1 1
U Ui
9 X
& Ks
ru oc
r- ec
O 0
1 i
Hi HI
Kl ^
^ JO
*;^
at or
o o
1 i
HI UJ
ru  »•
!•- Kl
~ in
p» r- p» co
0 0 O O
IIII
HI HI Ul Ul
•41 ru *-" ao
C X .- K\
ru -^ — KI
C^ ^'
0 O
1 1
Ul Ul
CO O
•a in
5T Kt
a o
0 x
i i
H» Hi
X* f^-
Kl O
(V (w
O*
o
1
Ul
*o
*.*
CO
rj* a> o>
0 O O
til
H. Ul Ul
^ ^JD ^
ru — < o
* ^'i
o*  0>
x rU »4 O
ao « t» -«
3 3
C 0
1 1
U; JJ
IT O-
=» rt
— —
IT IT.
T- C
1 1
jj LU
*-t f^.
Kl ll~
ac f\j
X1 X
C 0
1 1
Ul Ul
ru •*
O- Kl
ru  o
trt K* CT- ^^
tn sr ru rj-
tr a
c c
i i
Ul Ul
JC O
X U^
5J K
9- O
0 x
1 1
Ul Ul
XI P-
K> C
ru p-
o*  ru
CO X1
er *
c o
i i
Ul Ul
^D rj**
— o
** -*
       coKiifi'-*        »H-^aoru       x^-«vj        r^mK>»-i       h- in KI —*

U.UJ                       O                 O                O                 O                O                 O                OOOOOO
>->    o
o    a-

_>    o
•a.    00
O

?ZUIO                O                 C                 O                O                 O                O                 O
UJ    '-"'?•                  •                  •                  •                 •                  •                 •                  •
xo»-io                in                 o                 in                o                 in                o                 m
t_>n.i>—     in                x                 co                 CP                ~*                 ru                5*                 in
Ki -3 ^ =3
:> o - o
till
UJ UJ U' Ul
o in in o-
3 3 rv, 5»
— p- o- ru
3 IT-
O C
1 1
Ul U!
•C tfi
•~t p»
-;%
in in
C 0
i i
HI Ul
0* X*
CM or.
^1 .
IT' IP J~l IP
o o o o
IIII
HI oj Ul Ul
P* CO ^ P^-
in KI a KI
co KI in — •
X
c>
1
Ul
0-
X
**
•t> p~ p»
O 0 0
1 1 1
Ul Ut UJ
p- in x
ru in in
« 00 ru
,£
c
1
UJ
a-
X
"*
X P- P-
0 0 C
1 1 1
uj uj u.
i^ in x
ru in in
.- or  CO
P- O>
p- in
X X
o o
1 1
Ul Ul
X 9
CT* O
K) -<
x> *c
o o
1 1
Ul Ul
K» CO
P*- 9
i*- in
X X
o o
t t
Ul Ul
X? 9
c* o
*^*1 . . . . . .
                                                                              5-44

-------
The molecular weights and boundary condition codes are listed with each
of the species numbers and names.
     The next page of output, Figure 5-8, describes the vertical mesh
geometry and the initial diffusion coefficients.  Each vertical mesh
point (or station in the listing) has its elevation above ground listed
in meters.  The initial eddy diffusivity coefficients are listed in a
manner which shows that there is one K  coefficient associated with the
                                      z
first station, one K  coefficient between each pair of adjacent stations,
                    LI
and one K  coefficient associated with the top  (or edge) station.  The
vertical distance between the mesh points is printed under the column
labeled DELTA Z.  The figures in the last column indicate the cell
height, i.e., the height of the volume of air associated with each cell.
     The subsequent page of output lists the initial concentrations for
all of the species at all the mesh point elevations, as shown in Figure
5-9.  The list includes the concentrations of the species with inter-
nally computed initial concentrations.
     The program then begins to output a series of pages at the frequency
of the print interval which are similar to Figure 5-10.  Each page con-
tains the time in minutes (0-1440) and in hours (0-2400).  A summary of
several parameters for the surface cell is included.  The values of the
surface cell parameters shown are the last ones used before the times
shown (updating of these and other parameters occurs after the printout
is completed).  The surface parameters listed are the NCL photodissocia-
tion rate, the eddy diffusivity coefficient, and the area and point
source emission rates in ppm/minute.  Note that the list includes emis-
sion rates for nine species, which is the result of the program allo-
cating the NO  emissions to NO and N07, and the aldehyde emissions to
             JC                       &
HCHO and RCHO.  Next, the printout lists the species' names and the cor-
responding computed pollutant concentrations in parts per million at the
mesh points heights.  These, of course, are the most important results
of the model.
     Figure 5-10 also shows the optional output of integration progress
parameters for the case with TIMOUT = YES.  The listing includes the
integration indexx which is normally equal to two.  If the EPISODE algo-
rithm encounters erroneous/abnormal conditions which prevent successful
integration, the integration index is returned with a negative value and
an error message describing the error.  The listing shows the last
                                    5-45

-------
     «J
     »-«

      I
      I

     a
     a.

     •X.



            oooooooooococoooooooooooooooooooooooooocooooooooooo
      G
      O
      UJ
      *-
      -<
      Ct
                                                                                 O
                                                                                 u
                                                                                 cr     *•
                                                                                 in
                                                                                 nj  o    o            c        o
                          o                                               .    <               »u           (\;ocoro    focroru    _»o»vi    _ia_icoo    T>XOIXOXO    xo     oo
V    JJ     1C..?  r     X.?SU.?."     Oi;.'X    02C    Oa02aZ2"    2'070rl?'^'    XOXOOZOZOOIO«'«
«-     O:
CO
             4.4.4.4.     4.4.4.4.4.4.     4.44.4     +4-+     +4  +  4-*-*-+      +  +  + +  +•»•*•     +4-*-*-*-* +

                          CC                               IT IP           =»                  CC'ZXXCCOOCO<\l
-------
o

o


>-
or
               oo«c>oooooooooc>ooooooooooooo«-«»*o
         o
         cc
                                                                                                          I
                                                                                                         LO
2.


CO


UJ
                                                                                                                  •H
                                                                                                                  tt,
Uj    OOOOOOCOOOOOOOOOOOOOOOOOOOOOOO
 ?      •••••••••••••••••••••••••••••«
a
LL
U-
*— t
c
 I
u-
•-*
5
UJ
I
o
         o
         UJ
         _J
         o
         s.
to
la.'
ftM
o
Ui
a.
      ooou.

-------
c
o
X
1^1    Q

•-e    o
                       UJ
                       o
                                          o
                                          o
                                                o
                                                o
                                                       o
                                                       a-
                                                       
o
o
o
o
c
o
o
o
o
o
o
c
o
o
                          o
                          o
                          o
                          o
                          CO
                            •
                          in
                          Kl
                          (VI
                                                       o
                                                       o
                                                       o
                                                       o
                                                       in
                                                              ru
                                                              in
                                                                          o
                                                                          o
                                                                          o
                                                                          o
                                                                    •a
                                                                    (V
o
o
o
o
AJ
 •
vO
ru
                                                                                                  oo
                                                                                                   I
                                                                                                  LO

                                                                                                  CD
                                                                                                  h

                                                                                                  bO
                                                                                                 •H
                                                                                                 fc,
             u."
             cc
^           u.
O    JO    _i


»-    ^    X
•d    UJ
_l    >-«    CO
                             O

                             O
                       IJJ
                       s.
                                    c
                                    o
                                          o
                                          OJ
                          o
                          c
                                O
                                o
                                                              o
                                                              o
                                                          o
                                                          c
                                                            •
                                                          o
                                                          o
                                                          (VI
c
o
J.     O
LX.'     (!•

o     ct
       o
£     U.
o
l-l     UJ
co     a:
z>     <
                       X

                       CD
o     t-    eft
 I     I-    UJ
                       •z.
                       c     «
X
u
                                      5-48

-------
                                                        f\«h-       i* o i-      KI eo t-       M • f-       KI n r-
                                                        OOO       OOO      000       OOO       000
                                                         (tt        III        III        II*        II*
                                           .             Hi UJ W       UJ UJ Ui      Ul UI UJ       UJ UJ IX       UJ Ul S*i
                                         lil O          or^o       or-o      o r» o       o i- o       o i~- o
...                                       _j o x       omo       onto      o in o       o in o       o m o
»                                       OCEO       omo       o in o      ooo       ooo       ooo
;J                                                      o 9 o       »»o      o 9 o       o 9 o       o 9 o
                                                        * — «.       if! .. «.      «r»c«4       >n »v —       I»v IV *•
0.
                                         o
                                         X M
                                         OOO
                                         ac at f
to co  ni
o o •«
UIUI Ul
o m 9
o m (M
O !>• O
r- o o
o — > r-
-. — (VI
m r- ivi
o o «-•
UIUI Ul
0 «t ft
o » r^
o v o
o — r^
_* ~4 (VI
>n »- fu
o o -«
UIUJ Ukl
0 Ml»>
o 9 r>-
o r> o
0 ^ f-
•» M nj
                                                        oooooooooooooooooooo
                                                         •!•+     Ill*     III*     III*     III*
                                          OOZ       UJUJUIUJ    UIUJUIUJ    UJtiJUlltl    UJbJU^lJJ    UJUUltiJ
                                          I o o o    oamo    o r- r- o     o ®  J> o    o cr> Ji o    o » -o o
                                          uicarnt    O9r-o    o in in o     ovcoo    o ^j -    * in (
                                                        oooooooooooooooooooo
                                                         *itt*iii     tiii     iiii     iiii
                                                        UJUJIUUJUJUJUIUJUIUJILJUJUJUJUJUJUJUJUJUJ
                                                cv    oo<-o    oo^o    o o — o
                                          oacKO    o o (u o    ooo    mmoo    o- xi J3 o
                  o                      o«so    rvjoioo    r~o9o    r-in«o    j>owio
                  a            .          x a. I on    » — ru o    cc o o o    *3 ~ •£> o    co^,o.oK<—.c       3
                                                                                                                                    PL,
          o      z                                     ooo—    COO-HOOO—    OOO—OOO-H
          o      UJ                                     IIII     IIII     IIII     till     IIII
           •      cj                               i^    uiujiiJUJ    ujtijujui    iutututij    ujiuujuj    ujuuuJtiJ
          o      "z.                         fu    o    ooo»o    ootod    oo9fo    oo^>o    oorviin
          ^      c                      i*>o    «u    oo^in    OOKJO    ooo-o    ooo-«o    ooo-in
          m      u                      oxoz    oo»-
 ^                                                      ooo-*ooo~-ocio--ooO'p*c:oo--
 O                                                      "III     IIII     IIII      »lll     IIII
 t-f                                                      UJUJUlUJUJUJlllUlllJUJVIJdJUJuJUJUJUJUJUlUJ
 eo                                             (Vi       cot-(T'<=o«f>.oci-^oor^ooc:i^^;
 3                                       coc(\i^oc*HK>oo-^inoo^^eo
 u.                                       ^o.««o    ooir*   090^-    o o in —    oointr    oom=r
 u.                                                      ccin^iininxintnininicinmin^ininirtM
 »-4                                                      fOP'>fVI9(Vt(VI(VI^*-^^             
-------
      1C
      u
      u
      I
      o
      c
cr
ru
I

02





>-i 2
£ >-i
^ XL ^ mxT*~xoox3xcc
U (VI X, OOOOOOCOO
X* QL L^uJUJUjaJUJuJaJUJ
^•^ «^ r-a^.xixi-.
;r ^a.c-i S O=OO = OOOO
t- >-i 2 UJU.'UJiLJU:U.UJiua-
< u- Q. xitno3Dxi9xiino*
t-i u. x crxi^^ooDr^^co
o uj *-^ ~«r-inru»-«9r*'vix
co u
co - U.'
Ci r~ L3
c. — a n n » n n ii ii u ii
xmtc u. x "vi (v, x
a. z ^ eoia;
Al U- J-
21 C <




 in
o o o cr cr
ar £t i f- xt
• •
(VI OD
o o
UJ UJ
O O I I— 1C
I U O O X f-
(j 3* a: (vi r> -i r- in
_j c a a c -a i-
i-l CJ < •« C/3 •VI «-«
S X> (V
a:
UJ
Q.
«
1- 9 XI
X 00
Q. UJ OJ
o 3- r^ xi
Z 2? Z O (VI CO CO
>-« O « 2 O XI J3
x a. x tf> cr cr
m ru —
_i
u.
0
IT
Q. — • .C
0 0
o uj uj
_, J-i X O
i- fvi o cr in
«r xi o aj «' =J
a o i c, ^ in x
t— sj >r
'-U
o
1_>
— ' *
o o
1 1
u. UJ
r\i x c o x in
O C « ^ 3 O
i» 3 0. Q. C C
— (V
(\l (V
O 0
U. ^1.'
(VI =1 "VI
DOC CTX.
z a. .
t—
X 0
IS 0
»-* •
ULI O
X
.62325E-07
0
'-u
jj
•c
in
•
XI
0
UJ
XI

>o
f^
a.
^r




in
o
17000E-I

o
UJ
CO
r^
X1
(VI
o
UJ
(VI
CO
(VI
00
X

r«-
o
1
UJ
ZJ
r^
IT
1C
r*-
1
a.1
•D
XI


o o o
UJ UJ UJ
in r- •£>
C CO
o o o
"7092E-
72«93E-
30356E-
n. Ji ^
0 C 0
ill
UJ UJ U)
=3 M-, rr
in in x<
i1 c rvi
cr (vi -<
ru (\j p-
0 C 0
Ul UJ  ~
zt cr r-
— rv -«
a * m
o
•
(VI



>n
o
17000EH

c
UJ
o
CC
XI
(V
o
68289f

^
0
75670E-
c
1
UJ
XI
r*-
in
y
CC
u.1
cr
^
cr
*-«

(VJ f r-
o o o
III
UJ UJ UJ
^ XI CD
ao in r-
O3 -C 00
x> 9 (VI
rv — r-
(VI X O
0 O —.
UJ UJ 1 i
9 XI 0
,0 a: — •
x in »^
i- x in
• • •
(vi co xi in
OOOO
UJ UJ UJ UJ
a oc in o
(VJ -« — i O
(VI (VI 5! O
•VJ -< x r-
•-> CC (VI »•

oooo
uj UJ uj uj
«vi r- (vi f-
(vt "-" »« cr
o o cr xi
XI (VJ X **
9 xi in (Vi
OOOO
uj UJ UJ UJ
IT' XI X O
XI O vO O
9 or cr 9
-
oooo
U.I UJ UJ UJ
^ X C XI
0 =t -. -.
r~ cr 9 X)
r^ •£> o -«
^ r^ xi i^
(vj -£• f^ cr
c? o o o
1 1 1 1
U-1 UJ UJ UJ
x< in xi x
in „ „ „
9 0 X. 0
0- (VI — -<
'Vj >*VI t^ CC
o c. o o
aj u. UJ UJ
X — XI 3
rv cr «-< x
0 3 -. 0
•- — 9 (VI
9 x tn "
c
o
•
o
o
(VI r~ ^•
o o o
III
Ul UJ UJ
xi x in
(V cr o-
 in
r» P- X
• • •
ru co xi in
oooo
UJ UJ UJ UJ
r«- p*- (vi  » xi xi
(V ^< t~- —
9 xi in (vi
oooo
UJ uj ui uj
o in in co
co i •» X

••• X CO «—
oooo
ui uj UJ uj
xi x in un
0 XI 9 O
xi in in (vi
 XI X
(Vi X t- >J-
O C O O
1 1 1 1
UJ U.1 UJ UJ
r^ » xi X<
-. x -< o-
00-90
cr ~ « —
ru fu r~ - (Vi
9 in in -H
0
c
•
e
o
20827E-02
19029E-07
92a«6E-07
(VI X O
O O «4
UJ UJ Ul
CO — 9
(Vi 9 r^
XI 9- XI
r» o ^-
• • •
ru t- xi m
oooo
UJ UJ UJ UJ
xi in r- o
x in xi o
X f* 00 O
— • o in r-
»4 .* (XI •«

oooo
UJ Ul UJ UJ
ru in in x
x (Vi cr o
r- i>- O- 9
«vi « r- —•
9 xi in (V)
oooo
UJ UJ UJ UJ
•
UJ
z
»«l
u
2
O
U.
u.
o
cr
UJ
a>
£
2
O
(VI
(VI
II

-------
integration step size (in minutes) and the last order of the approxima-
tion used.  The order refers to the number of previous time step concen-
trations and derivatives used to predict the concentrations at that time.
The value of the order varies between one and five, depending on how
rapidly the solution is varying.  The listing shows the number of time
steps, the number of function evaluations, and the number of Jacobian
evaluations.  Since the method used is a predictor-corrector method, the
integration algorithm should always take more function evaluations than
time steps.  Similarly, the program is designed to minimize the number
of Jacobian evaluations; thus, the number of Jacobians should always be
less than the number of steps taken.
     The last printed page of output from the chemical-diffusion model
is a printer-plot of surface concentrations in ppm versus time.  Figure
5-11 shows a plot of the concentration histories for the sample problem.
The legend indicates the plotting symbols for the five species included
in the plot.  The nitric oxide, nitrogen dioxide, ozone, sulfur dioxide,
and one-tenth carbon monoxide concentrations are plotted on the same
page.  Note that when two or more species have approximately the same
concentrations at a plotting time, only the symbol associated with the
last species in the legend with that value appears on the plot.
     The user may select a seldom-used option of the KEMOD program which
provides verification of the times and values the code has used in
updating its parameters from the various temporal schedules.  When this
option is used, the following data is outputted.

     •    Photodissociation rates for all mesh point elevations
     •    Area source emission fluxes
     •    Point source emission rates
     •    Temperatures
     •    Sky clearness ratios
     •    K  coefficients

     The photodissociation rates, emission rates, and K  coefficients
are printed at the frequency of the update interval.  The temperatures
and sky clearness ratios are printed at the frequencies with which their
values are changed.  This results in a very sizable printout.  This data
                                   5-51

-------
                                                                      o

                                                                      o
                                                                   o

                                                                   o
                                                                                                          ru

                                                                                                          ru

                                                                                                          ru

                                                                                                          ru
                                                                                  09 Z


                                                                                  CO Z


                                                                                  (O Z


                                                                                  CO Z
                                                                c

                                                                o
                                                                   o

                                                                   o
                                                                          o

                                                                          u

                                                                           co
                                                                                                                      i
                                                                                                                   ru co
                                                                                                                      t
                                                                                                                   co z
                                                                                                                      •
                                                                                                                   CO Z
                                                                                                                      t
                                                                                                                   co z
                                                                                                                      I
                                                                                                                   CO Z
                                                                                                                      I
                                                                                                                   co z
                                                                                                                      t
                                                                                                                   CO Z
                                                                                                                      t
                                                                                                                   CO Z
                                                                                                                      I
                                                                                              o
                                                                                              o
                                                                                              o
                  O
                  Z
                  (U
                  c*
                                                                                  O
                                                                                   •
                                                                                                                                                                          u
                                                                                                                                                                          •-4

                                                                                                                                                                          X
                                                                                                                X
                                                                                                                u
                                                                                              o
                                                                                              o
                                                                                              o
                                                                                              o
o
o
o
o
CD
o
c.
o
•c
C:
O
o
                                                                                                                     O
                                                                                                                     ru
                                                                                                                     o
co
ru
 i
                                                                                   5-52

-------
              Time
Figure 5-12 (a)  Original Schedule
               Time
Figure 5-12 (b)  Revised Schedule
                  5-53

-------
is printed on logical unit numbers 10 and 11.  Thus, to obtain the
printout, the user must supply the appropriate installation-dependent
job control such that these files are disposed to the line printer
following the normal execution of the program.

5.5  Computational Procedures

     Once the program has read the input data as described in Section
5.1, it performs various initialization tasks prior to passing control
to the integration algorithm where the concentrations are computed.  One
common feature of most of the initialization tasks involves creating or
revising the temporal schedules of parameters so that the entries in the
schedules occur at a fixed time interval.  In the subsequent discussion,
we will refer to the program's 'update schedule', which is a schedule
with a fixed time interval equal to the user-specified update interval.
     The first initialization task involves generating the schedules of
N0? and HCHO photodissociation rates for the duration of the run.  The
schedules are created by subroutine PHOTOD on the program's update
schedule with entries for each mesh point elevation.
     Next, the program updates the sky clearness ratio and determines
the initial photodissociation rates in subroutines UPRAT2 and RATEHI.
Also, the initial temperature-dependent rate constants are determined in
subroutine TEMPR.
     The program then proceeds to transform the area source emissions
input data to the program's update schedule.  The revision of the sched-
ule involves an Euler integration of the emission rates to find the mean
rate at each time in the new schedule.  Figure 5-12 illustrates a typi-
cal input schedule and revised schedule of emission rates for one species,
This transformation, of course, conserves the mass of emissions injected
into the air parcel.  Following the rescheduling  (performed in subrou-
tine SKEDUL), the program converts the area source emission fluxes to
the units of ppm-meters/minute.
     The next initialization task involves determining the point source
emission rates from the input data.  The program  first truncates the
time at which the source is passed by the air parcel to the nearest  time
in  the program's update schedule.'  Second, it converts the mass or mole
fraction-meters of emissions entrained into the air parcel to a rate
                                   5-54

-------
assuming an entrainment/mixing period of twice the update interval.
Third, it allocates the emission rates to the appropriate vertical mesh
points, using the vertical distribution input for each source.  The
final result of this task is a schedule of the sums of point source emis-
sion rates by species and mesh point on the program's update schedule.
     The next initialization task involves smoothing the K  coefficient
                                                          z
schedule.  The program linearly interpolates the hourly K  coefficients
                                                         Lt
to determine intermediate values which coincide with the times in the
program's update schedule.  This task is performed to represent the mix-
ing process as one which gradually changes with time, as opposed to one
which may have order-of-magnitude changes in coefficients on the hour.
     The last significant initialization task is the computation of the
initial concentrations of species not specified in the input stream.
The calculation is performed in subroutine ISTATE, which includes ex-
plicit expressions for the steady-state concentrations applicable to the
ERT photochemical mechanism.
     At this point, the program passes control to the integration algo-
rithm which is controlled by subroutine DRIVE.  DRIVE and its 16 sub-
programs perform the integration of the finite-differenced, ordinary
differential equations where the chemistry and diffusion are coupled for
each time step.
     The integration method is one developed by Hindmarsh and Byrne  (1975)
named EPISODE (Experimental Package for the Integration of Systems or
Ordinary Differential Equations).  The method is a variable-step,
variable-order, implicit backwards differencing scheme that is particu-
larly useful for solving stiff systems of equations.  The model's ordi-
nary differential equations are quite stiff, and the algorithm is well-
suited for this application.  The EPISODE package has been modified to
take into account the block tri-diagonal form of the model's differential
equations, which greatly improves its efficiency.
     Program control is returned from DRIVE to subroutine KEMOD2 at
every time in the program's update schedule.  KEMOD2 checks certain
parameters returned by DRIVE to ensure that the integration is pro-
ceeding satisfactorily.  It prints the concentrations when appropriate.
It stores the concentrations for subsequent plotting, and punches the
ground concentrations if this option has been selected.  Then, it up-
dates the emissions data, sky clearness ratios, photodissociation rates,
                                    5-55

-------
temperature-dependent reaction rates, and K  coefficients to the current
                                           Li
time.  If the current time is less than the stop time, program control
returns to DRIVE where the integration is performed for another update
interval.  This cycle of integration, output, and updating is repeated
until the end of the simulation.  The final task for the program is the
generation of printer-plots of ground concentration histories for the
more important species.

5.6  Program Modifications

     The KEMOD program is quite complicated; only the most probable
modifications will be described here.  These modifications relate to
changing the chemical mechanism, changing the partitioning of emissions
data, increasing the number of emission species, and changing the
species' concentrations plotted.

     5.6.1  Changing the Chemical Mechanism

     The program is currently designed to include up to 40 chemical
species, 10 of which must be either specified as steady-state approxi-
mations, or treated as constants.  Thus, up to 30 species can be inte-
grated.  These dimensions are felt to be sufficiently large for any
practical application of the model.
     The program is presently equipped to handle up to 55 chemical reac-
tions.  The number of chemical reactions can easily be changed by chang-
ing  the dimension, N, in the arrays shown below:

              LOCATION                           ARRAY NAME
          COMMON/CHEM2/                     RATKON(N), RATEFF(N)
          COMMON/CHEM5/                     REACT(20,N)
          SUBROUTINE RATES                  R(N)
          SUBROUTINE ISTATE                 R(N)

See  Appendix A for the list of  subroutines  which contain  common blocks
CHEM2 and CHEM5.
     To  install a new  mechanism or change  the present mechanism, the
user must supply a set of explicit chemical rate equations  in  subroutine
                                    5-56

-------
RATES.  There should be one rate equation for each species that is  inte-
grated by the program.  The indices of the rate equation must correspond
to the indices of the species in the species list.  The method of deter-
mining the components of the rate equations is shown below for one
chemical reaction.  The expressions, of course, become quite long when  a
species is involved in many reactions, but the method is the same.
                      k
Reaction:  aC. + bC.  ->m  dC,  + eCL
             i     j        k     1
Let        C   =  C(N)  =  concentration of n   species
           k   =  R(M)  =  rate constant of m   reaction
          a,b  =  A,B   =  reactant stoichiometric coefficients of
                           m   reaction
          d,e  =  D,E   =  product stoichiometric coefficients of
                            th
                           m   reaction

Rate Equations:
          RATE (I)  =  -R(M)*  (C(I)**A) *  (C(J)**B)
          RATE(J)  =  -R(M)*~(Cf(iJ**A") *  (C(J)**B)
          RATE(K)  =  +R(M) * D*  (C(I) ** A) *  (C(J) ** B)
          RATE(L)  =  +R(M) * E*  (C(I) ** A) *  (C(J) ** B)

NOTE:  The reactant stoichiometric coefficients are included only when
       they are not equal to one.

     Once the rate equations are determined for the mechanism, the  user
must supply the matrix of partial derivatives  (i.e., the Jacobian)  of
the rate equations.  The elements of the Jacobian are specified in  sub-
routine JACOB as described below:

          A(N,N)  =  an N by N array with the elements of the
                     Jacobian, where N equals the number of
                     species being integrated.

Let:      RATE(I)  =  £(R,C)  =  £(R(l),...,R(J),...R(NOREAC),
                      C(1),...,C(K),...,C(NOSPEC))
                                   5-57

-------
Where:    RATE(I)  =  rate equation of I   species
             R(J)  =  rate constant of J   reaction
             C(K)  =  concentration of K   species
Where:    I  =  1,...,N
          K  =  1,...,N

     Next, the user must determine if changes need to be made concerning
the time-varying reaction rate constants embedded in the program.  If
the new or revised chemical mechanism has more than two photodissocia-
tion rates, the user must explicitly scale the extra photodissociation
rates in subroutine RATEHI.  For a photodissociation rate of reaction J,
which is A times the photodissociation rate of reaction II, and where
II is the reaction number of the first independent photodissociation
rate input, the user should insert the following two statements in
RATEHI:

          RATKON(J)  =  A RAKON(Il)
          RATEFF(J)  =  RATKON(J)

The user must, of course, remove the statements in RATEHI which pre-
sently determine the rates of reactions numbers 6 and 34 from the photo-
dissociation rates II and 12, respectively, if they are not appropriate
to the new mechanism.
     In addition, if the user wants to include temperature dependent
reaction rates, subroutine TEMPR must be modified.  The user must re-
place the current expressions for the temperature dependence of rate
constant numbers 21 and 37, with similar expressions for the appropriate
reaction numbers.  The expression should be formulated on the basis of
temperature (T) in degrees Kelvin.  If none of the rates are temperature
dependent, subroutine TEMPR should be converted to a dummy subroutine.
     Lastly, the user should supply a new version of subroutine ISTATE
that contains explicit algebraic equations for the steady-state initial
concentrations of selected species.  To determine the steady-state
                                   5-58

-------
expression for the I   species, let

          RATE (I)  =  f(R,C)  =  0

and solve for the I   concentration as a function (g) of the rate con-
stants (R) and the other known concentrations (C ' ) .

                =  g(R,C')
One may also choose to read in all of the initial conditions and convert
ISTATE into a dummy subroutine.

     5.6.2  Changing the Partitioning of Emissions Input Data

     As explained in Section 5.1.1, the program presently partitions  the
nitrogen oxides (NO ) and aldehyde (ALDE) emissions data to more than
                   j\
one species, respectively.  The manner in which this is performed  is  as
follows.  The program stores the NO  emissions as NO (species No.  1)  and
                                   A.
the aldehyde emissions as HCHO (species No. 6).  At each update interval,
subroutines UPFLX1 and UPSORC are called to retrieve the emissions data
for that time.  These subroutines perform the partitioning of the  emis-
sions data for KEMOD.  Let us use as an example the present partitioning
of aldehyde emissions as 40% RCHO  (species No. 7) and 60% HCHO.  Sub-
routine UPFLX1 would then include the statements:

          FLXW1(7)  =  .40*FLXW1(6)
          FLXW2(7)  =  .40*FLXW2(6)
          FLXW1(6)  =  .60*FLXW1(6)
          FLXW2(6)  =  .60*FLXW2(6)

Subroutine UPSORC would include the statements:

          DO 30  J    =  1,NOSTAT
          PSR1(7,J)  =  .40 PSR1(6,J)
          PSR2(7,J)  =  .40 PSR2(6,J)
          PSR1(6,J)  =  .60 PSR1(6,J)
          PSR2(6,J)  =  .60 PSR2(6,J)
       30 CONTINUE
                                    5-59

-------
If the user wishes to change the partitioning percentages, he/she merely
changes the corresponding coefficients shown above.

     5.6.3  Increasing the Number of Species With Emissions Inputs

     The program's arrays are presently dimensioned for se^en emissions
species and can easily be modified for up to 17 species.  To change the
arrays to handle emissions for N species (7 < N <_ 17), the following
changes should be made:

             LOCATION                    ARRAY NAME or Statement
         COMMON/CHEM5/*                 LOCFLX(N)
         COMMON/FLUXES/*                FLXIN(N,200)
         COMMON/PS1/*                   PS(N,5,75),LOCPSF(N)
         PROGRAM KEMOD                  PTSR(N,200),AF(N)
         SUBROUTINE KEMOD2              PTSR(N,200)
         SUBROUTINE KEMOD2              CALL XMIT(-N*375,0.0,PS)

Various input/output formats in KEMOD, KEMOD2, UPFLX1, and UPSORC also
require modification when the number of emissions species exceeds seven.

     5.6.4  Changing the Plot Species

     The plotting software is designed to provide a plot of surface con-
centrations of up to five species.  The user may change the number of
species plotted (NPTS), the plotting symbols  (array KSYM), and the plot
species indices (array KPS) by inserting the appropriate  statements in
subroutine KEMOD2.  As an example, suppose the user wishes to plot the
10th and 20th species in the species list with symbols A  and B, respec-
tively.  The user would insert the statements:

          DATA KSYM/1HA.1HB/
          KPS(l)  =  10
          KPS (2)  =  20
          NPTS  =  2
*See appendix A for the  list of  subroutines with  this  common  block.
                                    5-60

-------
and remove the present statements pertaining to these variables.  The
user will also wish to modify format statement number 1001 in subroutine
COPLOT to define the new legend.
                                   5-61

-------
                            6.  REFERENCES
ASME 1968.  Recommended Guide for the Prediction of Dispersion of
     Airborne Effluents.  M. Smith (ed), New York, NY.

Baulch, D.L., D.D. Drysdale, and D.G. Home 1973.   "Rate Constants for
     Reactions of the H2-N2-02 System" in Chemical Kinetic Data Survey V.
     Sixty-six Contributed Rate and Photochemical  Data Evaluations on
     Ninety-four Reactions, NBSIR 73-206.  D. Garvin, ed., National
     Bureau of Standards, Washington, DC, pg 49-115.

Briggs, G.A. 1969.  Plume Rise.  AEC Critical Review Series.

Briggs, G.A. 1975.  Plume Rise Predictions.  Lectures on Air Pollution
     and Environmental Impact Analysis, American Meteorological Socity,
     Boston, MA, September.

Demerjian, K.L., K.L. Shere, and J.T. Peterson 1979.  "Theoretical
     Estimates of Actinic (Spherically Integrated) Flux and Photolytic
     Rate Constants of Atmospheric Species in the Lower Troposphere."
     Advances in Environmental Science and Technology,  J.N. Pitts (ed);
     Vol 9 (in press).

Hindmarsh, A.C. and G.D. Byrne 1975.  Experimental Package for Integration
     of Systems of Ordinary Differential Equations  (EPISODE).   Lawrence
     Livermore Laboratory, UCID-20112.

Lloyd, A.C., F.W. Lurman, D.G. Godden, J.F. Hutchins, A.Q. Eschenroeder,
     R.A. Nordsieck 1979.  Development of the ELSTAR Photochemical
     Air Quality Simulation Model and Its Evaluation Relative to the
     LARPP Data Base, ERT Report 5287 prepared for Coordinating Research
     Council, New York (in press).

Moortgat, G.EK. F. Slemr, W. Seiler, and P. Warneck 1978.  Chem. Physics
     LeH., in press.

Peterson, J.T. 1977.  Dependence of N0? Photodissociation Rate Constant
     on Altitude, Atmospheric Environment, February.

Peterson, J.T., K.L. Demerjian, and K.L. Shere 1976.  Actinic Solar
     Flux and Photolytic Rate in the Troposphere,  International Conference
     on Photochemical Oxidant Pollution and its Control.

Turner, D.B. 1969.  Workbook of Atmospheric Dispersion Estimates.
     U.S. Department of Health, Education $ Welfare.  Public Health
     Service Publication No. 999, AP-26.
                                   6-1

-------
                                APPENDIX A
                  COMMON BLOCK LOCATIONS IN THE CODE
1.  Meteorological Module Common Blocks
    Common Block
       AIRQAL
       CELECT
       CNTRL
       CORIOL
       CROSS
       DATES
       DIFDAT
       GRID

       IMAG
       INPUTS

       KZINPT
       ORIGIN

       PEVE
       REUSE
       TEMPHT
       TRAJ

       VGRID
       WDATA

       WHERE
       WIND

       WINFLD
                  Location
GETCON, METIN, METMOD, WINDY
EDDY, STABIL
CROSIT, METMOD, SETTUP, WINDY
EDDY, STABIL
CROSIT
GETAZV, METIN, METMOD, WINDRD, WINDY,
EDDY, STADIF, KEKLAY
CROSIT, EDGE, METMOD, PLACIT, SETIN,
SETTUP, WINDY
SETPLT
CROSIT, EDDY, GETCON, METIN, METMOD,
SETTUP, WINDY
EDDY, KZDATA, METIN, METMOD, WINDY
BARIER, CROSIT, EDDY, GETAZV, METMOD,
RUFNES, SETIN, SETTUP, WINDY
EDDY, RUFNES, UXYPOS
CROSIT, GETCON, METIN, METMOD, WINDY
EDDY, KEKLAY, SMOOTH, STADIF
CROSIT, EDDY, METMOD, PLACIT, SETTUP,
UXYPOS, WINDY
CROSIT, BLOCK DATA
ANGTST, AZVDIS, GETAZV, GETCON, METIN
METMOD, SETIN, SETTUP, WINDY, WSECLS
EDDY, METIN, METMOD, SETIN, SKY, WINDY
CROSIT, EDDY, METMOD, PLACIT, SETTUP,
UXYPOS, WINDY
GETAZV, GETCON, METIN, METMOD, WINDY
                                   A-l

-------
2.   Emissions Module Common Blocks
    Common Block
       ANGLES
       ANSWER

       DEGRID
       EMRATE
       HISTRY
       INPUT
       LABLIN
       LABOUT
       LINKS
       MXHITE
       ORIGIN
       PARCEL
       PASSES
       PSDAT
       SIGMAS

       SIGTAL
       TABLES
       TEMPS
       TRAJ
       WIND
       WORKER
                  Locations
LOCATE, PONTEM, SEGMET
AREAEM, EMMOD, GRIDIT, PLUMAS, PONTEM,
SEGMET, STACKS
AREAEM, GRIDIT
AREAEM, EMMOD
ADHOUR, AREAEM, EMMOD
AREAEM, EMMOD, PONTEM, STACKS
AREAEM, EMMOD, PONTEM, STACKS
AREAEM, EMMOD, PONTEM, STACKS
DISTAN, LOCATE, PONTEM, SEGMET
EMMOD, PONTEM
EMMOD, PONTEM, STACKS
AREAEM, EMMOD, PLUMAS, PONTEM, STACKS
PONTEM
PONTEM, STACKS
PARTIT, PLUMAS, PONTEM, SEGMET, BLOCK
DATA
PARTIT, PLUMAS, BLOCK DATA
ADHOUR, AREAEM, EMMOD, PONTEM
EMMOD, PONTEM
EMMOD, LOCATE, PONTEM
DISTAN, EMMOD, LOCATE, PONTEM, SEGMET
ADHOUR, AREAEM, GRIDIT, PONTEM, STACKS
                                   A-2

-------
3.  Chemical-Diffusion Module Common Blocks
    Common Block
       CHEM1

       CHEM2

       CHEM3

       CHEM4
       CHEM5
       EPCOM1

       EPCOM2
       EPCOM3
       EPCOM4
       EPCOM5
       EPCOM6
       EPCOM7
       EPCOM8
       EPCOM9
       EPCM10
       EPCM12
       FLUXES
       INPUTS
       PRPLOT
       PS1
       PS2
                  Locations
DIFFUN, DRIVE, ISTATE, KEMOD2, PEDERV,
PSET, RATES, STEADY, TSTEP
DIFFUN, DRIVE, ISTATE, KEMOD2, PEDERV,
PSET, RATEHI, RATES, STEADY, TEMPR, TSTEP
DIFCOF, DIFFUN, DRIVE, KEMOD2, PEDERV,
PSET, TSTEP, UPFLX1
KEMOD2, PHOTOD, UPRAT2
DIFFUN, KEMOD2, UPFLX1
ADJUST, COSET, DRIVE, INTERP, PSET,
TSTEP
DRIVE, PSET, TSTEP
DRIVE, PSET, TSTEP
DRIVE, PSET, TSTEP
DRIVE, PSET, TSTEP
DRIVE, KEMOD, KEMOD2, PSET, TSTEP
DRIVE, PSET, TSTEP
DRIVE, PSET, TSTEP
DRIVE, PSET, TSTEP
ADJUST, COSET, TSTEP
DRIVE, PSET, TSTEP
KEMOD, KEMOD2, UPFLX1
KEMOD, KEMOD2, PHOTOD
COPLOT, KEMOD2
DIFFUN, KEMOD, KEMOD2, UPSORC
DIFFUN, KEMOD2, UPSORC
                                   A-3

-------
                            APPENDIX B
                   CODE SUBROUTINE DESCRIPTIONS

1.  Meteorological Module Subroutines and Their Use

     PROGRAM METMOD

     Use.  METMOD is the main program for the meteorological module of
the code.  It reads several key control parameters that determine which
submodules are to be called.  These parameters specify whether the wind
trajectory is to be generated from wind data or is specified in the input
data-cards, whether or not air quality data is to be interpolated along
the trajectory, and whether or not diffusivity coefficients (K ) are to
                                                              Li
be computed.  In addition, METMOD controls the multiple case feature of
the program.

     SUBROUTINE ANGTST (XS,YS,NGOOD,KUSE,OK)

     Use.  Compares the azimuth from (XS,YS) to the new station against
the corresponding azimuths for any previously qualified stations.  If
any two azimuths are less than 2 degrees apart, ANGTST returns a posi-
tive flag; otherwise, it returns a negative flag.  ANGTST is called by
GETAZV.

     Arguments.     XS  =  x-coordinate of current position
                    YS  =  y-coordinate of current position
                 NGOOD  =  number of measurement stations qualified thus
                           far
                  KUSE  =  index of new candidate measurement station
                    OK  =  output flag.  If positive, angle test is OK
                            (no other station within 2 degrees); if
                           negative, test not OK

     SUBROUTINE AZVDIS (NP,AZV,DDD,AZM,VEL,IRF)

     Use.  Given raw azimuth, velocity, and distance data from up to
three measurement stations, AZVDIS combines them, according to the
prescribed interpolation rule, to produce a single azimuth and velocity.
AZVDIS is called by WINDY.
                                   B-l

-------
     Arguments.    NP  =  number of measurements to combine (up to three's
                 AZV  =  array containing raw azimuths and velocities
                 ODD  =  array with distances from current position to
                         closest stations
                 AZM  =  calculated distance
                 VEL  =  calculated velocity
                 IRF  =  interpolation flag; if 1, inverse distance
                         weighting is used; ic 2,  inverse distance
                         squared weighting is used

     SUBROUTINE BARIER (X,Y,XS,YS,OK)

     Use.  Checks whether or not two given points are on the same side
of each of a set of (up to 20) finite-length, straight-line barriers.
The barrier line segments are stored internally, being defined by the
coordinates of their end points.  BARIER is called by GETAZV and WINDY.

     Arguments.   X  =  x-coordinate of point of interest
                  Y  =  y-coordinate of point of interest
                 XS  =  x-coordinate of reference point
                 YS  =  y-coordinate of reference point
                 OK  -  output flag; if positive, both points are on the
                        same side of all barriers; otherwise, the points
                        are on opposite sides of at least one barrier

     SUBROUTINE CELAVG (DH,NMESHP,CELVAT,AKZ.NZHI,STORE)

     Use.  This routine computes average K  coefficients for use in the
chemical-diffusion module from the detailed internal  K  profile.  CELAVG
                                                      Lt
is called by EDDY.

     Arguments.      DH  =  vertical increment  for internal K  profile
       i i. i- . . — i -.                                               2
                 NMESHP  =  number of vertical  mesh points  (up to five)
                 CELVAT  =  elevations of  vertical mesh points
                    AKZ  =  array of internal  K  coefficients
                   NZHI  =  number of K  coefficients in AKZ array
                                       z
                  STORE  =  array of average  K coefficients returned
                                               it
                                    B-2

-------
     SUBROUTINE CROSIT

     Use.  CROSIT generates trajectory grid square crossing schedules
and plots the wind trajectory.  CROSIT is called by WINDY.

     Arguments.  None

     SUBROUTINE DATE (IOLD,MOVE,IWAY,NEW)

     Use.  Calculates a new time and date from an old time and date
and a prescribed time increment.  Time is on a 0-2400 basis and dates
are represented as year, month, day  (e.g., 780901 for Sept. 1, 1978).
DATE is called by WINDY.

     Arguments.  IOLD  =  2-word array with time and date to be changed
                 MOVE  =  time increment in minutes
                 IWAY  =  if positive, time advances; otherwise, time
                          is decreased
                  NEW  =  2-word output array with new time and date

     SUBROUTINE DIFFUS (STAB,ZHT,AKZ.USTAR)

     Use.  This routine determines the K  coefficient at a specific
      1 "™"                                Z
elevation within the surface layer.  DIFFUS is called by STADIF.

     Arguments.   STAB  =  Monin-Obukhov length
                   ZHT  =  elevation above ground
                   AKZ  =  value of K  returned
                                     Z
                 USTAR  =  friction velocity

     FUNCTION DOTTY (A,B)

     Use.  DOTTY computes the dot product of the vectors A and B.
DOTTY is called by ANGTST.

     Arguments.  A  =  a 3-component vector
                 B  =  a 3-component vector
                                   B-3

-------
     FUNCTION DTIME (A)

     Use.  This function converts time from the 0-2400 clock to hours
and decimal hours.  DTIME is called by EDDY.

     Argument.  A  =  time on a 0-2400 hour clock

     SUBROUTINE EDDY (KPWIND)

     Use.  This routine is the driver for the eddy diffusivity sub-
module.  EDDY determines a schedule of atmospheric stability classes
for the emissions module and a schedule of diffusion (Hi ) coefficients
                                                       Zt
for the chemical-diffusion module.  EDDY is called by WINDY.

     Argument.  KPWIND  =  Hollerith variable equal to YES when punched
                           output is desired

     SUBROUTINE EDGE (X,Y,ITF,IEDGE)

     Use.  EDGE checks whether or not the point X,Y is outside the
modeling region.  EDGE is called by WINDY.

     Arguments.      X  =  x-coordinate of point of interest
                     Y  =  y-coordinate of point of interest
                   ITF  =  direction flag; if positive, the trajectory
                           is proceeding forward; if negative, the
                           trajectory is proceeding backwards
                  IEDGE  =  output flag; if zero, the point is inside
                           the modeling region; if non-zero, the point
                           is outside the modeling region with the  sign
                           of IEDGE indicating the direction of motion

     SUBROUTINE EXTRP  (IHOUR,ARY,VAL)

     Use.  This routine seeks a value corresponding to IHOUR in the
24-word data array ARY, assuming that the values in ARY  correspond  to
clock  times of 0000, 0100, 0200, etc.  If positive or zero, the value
found  is simply returned.  If the desired value is missing  (indicated
by a negative  entry),  EXTRP  will use  linear  interpolation to fill the
gap, provided  the two  adjacent values are non-negative.  Failing that,
                                    B-4

-------
EXTRP will attempt to fill the gap by extrapolation, provided that the
gap is no more than two locations wide and that two consecutive non-negative
values exist on one side of the gap.  A negative value returned indicates
that the data gap could not be filled by either method.  EXTRP is called
by GETAZV.
     Arguments.   IHOUR
                   ARY
                   VAL
clock time on a 0-2400 basis
array of 24 data values one hour apart
data value selected or calculated to
correspond to IHOUR
     FUNCTION FULGOL (A,ZO)

     Use.  This function determines inverse Monin-Obukhov length  (1/L)
FULGOL is called by STABIL.

     Arguments.   A  =  Fulle atmospheric stability parameter
                 ZO  =  surface roughness length  (meters)

     SUBROUTINE GETAZV  (KOLD,ID,XS,YS,NC,AZV,NGOOD,DDIS)

     Use.  This routine attempts to retrieve measurement records  from
the desired number of neighboring wind measurement stations having
valid data for the given date and time.  GETAZV is called by WINDY.

     Arguments.   KOLD  =  2-word array containing time  (on a 0-2400
                           basis) and date  (year, month, day)
                    ID  =  2-word array containing the station
                           identification (may be blank)
                    XS  =  x-coordinate of  current position
                    YS  =  y-coordinate of  current position
                    NC  =  desired number of close stations (up to  3)
                   AZV  =  array containing an azimuth and velocity
                           for each close station found
                 NGOOD  =  number of close  stations found
                  DDIS  =  array containing distances from current
                           position to close stations
                                    B-5

-------
     SUBROUTINE GETCON (KNEW.NC,IRF)

     Use.  This routine interpolates and extrapolates measurement
station data stored in the array CON to a trajectory node location.
Surface temperature and air quality data are normally stored in the
array CON.  GETCON is called by WINDY.

     Arguments.  KNEW  =  2-word array with the time and date
                   NC  =  desired number of s ".ations (up to 3)
                  IRF  =  variable equaling 1 or 2 indicating the
                          exponent in the interpolation formula,
                          I/Distance** IRF

     SUBROUTINE JULIAN (IDATE,JULDAT)

     Use.  This routine converts a 6-character date  (YR-MO-DA) to a
Julian date.  JULIAN is called by METIN.

     Arguments.   IDATE  =  6-character date
                 JULDAT  =  a 2-word array of Julian day and year

     SUBROUTINE KEKLAY (LMAX,ZMAX,ZHIGH,AKMIN,DH)

     Use.  This routine determines the K  coefficients in the Ekman
layer.  KEKLAY is called by EDDY.

     Arguments.   LMAX  =  number of points in the verical temperature
                           sounding
                  ZMAX  =  height of maximum potential temperature
                 ZHIGH  =  height of highest point in temperature
                           sounding
                 AKMIN  =  minimum K   coefficient allowed
                                    z
                    DH  =  vertical increment for the internal K  profile

     FUNCTION KLASS  (A)

     Use.  This function returns the  atmospheric stability class.
KLASS is  called by STADIF.

     Arguments.   A  =  Fulle atmospheric stability  parameter
                                    B-6

-------
     SUBROUTINE KZDATA (IERR)

     Use.  This routine reads the input data for the eddy diffusivity
submodule.  KZDATA is called by EDDY.

     Argument.    IERR  =  output flag which is returned with a positive
                          value when an error is encountered in reading
                          the data

     SUBROUTINE METIN (IDT,LTAPE)

     Use.  This subroutine retrieves wind, surface temperature, air
quality, and solar radiation data from the RAMS data tape for one
day.  METIN edits, stores and computes regional averages of various
atmospheric parameters.  METIN is called by WINDY.

     Arguments.    IDT  =  6-character date (YR-MO-DA)
                 LTAPE  =  logical unit number of the peripheral
                           device with the meteorological data

     SUBROUTINE PLACIT (DT,L,VX,VY,POS,NDX)

     Use^.  PLACIT computes the coordinates and grid square indices
of a new trajectory point.  PLACIT is called by CROSIT.

     Arguments.   DT  =  time duration of this trajectory segment,
                         minutes
                   L  =  index of last trajectory point in trajectory
                         data arrays
                  VX  =  x-component of V(L) (input)
                  VY  =  y-component of V(L) (input)
                 POS  =  2-word array containing x and y coordinates
                         of new position
                 NDX  =  2-word array containing grid square indices
                         (I,J) of new point

     SUBROUTINE RUFNES (ZO,J)

     Use.  This routine determines the surface roughness length at
a particular location.  RUFNES is called by EDDY.
                                   B-7

-------
     Arguments.    ZO  =  surface roughness length (meters)
                   J  =  integer corresponding to the hour of the day
                         plus one

     SUBROUTINE SETIN

     Use.   This routine initializes the names and coordinates of all
measurement stations.  SETIN also designates the total number of measure-
ment stations.  SETIN is called by WINDY.

     Argument.  None

     SUBROUTINE SETTUP

     Use.   SETTUP serves as the initialization routine for the generation
of trajectory grid square crossing schedules and the trajectory printer-
plot.  SETTUP is called by CROSIT.

     Argument.  None

     SUBROUTINE SKY  (UV,CLOUDY,IDATE)

     Use.   SKY generates sky clearness ratios from ultraviolet radiation
data.  SKY is called by METIN.

     Arguments.      UV  =  a 24-word array of hourly ultraviolet
                            radiation data in Langley's per minute
                 CLOUDY  =  a 24-word array of hourly sky clearness
                            ratios used  in the chemical-diffusion module
                  IDATE  =  6-character  date  (YR-MO-DA)

     SUBROUTINE SMOOTH  (ZW,ZO,USFC,ZHIGH,DH,AKMIN,ISKLAS)

     Use.  This routine smooths the raw  vertical temperature profile  and
divides the profile  into layers on the basis of  lapse rates.  SMOOTH  is
called by EDDY.

     Arguments.      ZW  =  height at which surface wind  data was
                            measured  (meters)
                     ZO  =  surface roughness  length  (meters)
                   USFC  =  wind  velocity measured at Z =  ZW
                                    B-8

-------
                  ZHIGH  =  height of highest point in vertical
                            temperature profile
                     DH  =  vertical increment for internal K  profile
                                                  2          Z
                  AKMIN  =  minimum value of K  (m /min)
                                              2
                 ISKLAS  =  atmospheric stability class on a scale of
                            1 to 6 corresponding to Pasquill-Gifford
                            classes A to F

     SUBROUTINE STABIL (STAB,J,A,ZTOP,DUDZ,DELT,U,ZHTMIX,USTAR,ZW,ZO)

     Use.  This routine determines the Fulle stability parameter, the
Monin-Obukhov length, and the internal mixing layer height from the
vertical temperature gradient within an atmospheric layer.  STABIL
is called by STADIF.

     Arguments.    STAB  =  Monin-Obukhov length (L)
                      J  =  index for the atmospheric layer
                      A  =  Fulle atmospheric stability parameter
                   ZTOP  =  highest elevation in the atmospheric layer
                   DUDZ  =  vertical wind shear
                   DELT  =  vertical temperature gradient in the
                            atmospheric layer
                      U  =  surface wind velocity
                 ZHTMIX  =  calculated mixing layer height
                  USTAR  =  friction velocity
                     ZW  =  height at which surface wind data was
                            measured (meters)
                     ZO  =  surface roughness length (meters)

     SUBROUTINE STADIF (ZW,ZO,USFC,ZHIGH,DH,AKMIN,ISKLAS)

     Use.  This routine controls the calculation of stability and
diffusivities.  STADIF is called by EDDY.

     Arguments.      ZW  =  height at which surface wind data was
                            measured (meters)
                     ZO  =  surface roughness length (meters)
                   USFC  =  surface wind velocity
                                   B-9

-------
                  ZHIGH  =  height of highest point in temperature
                            sounding
                     DH  =  vertical increment for the internal K
                                                                 Li
                            profile
                  AKMIN  =  minimum value of K
                                              z
                 ISKLAS  =  atmospheric stability class on a scale of
                            1 to 6 corresponding to Pasquill-Gifford
                            classes A to F

     FUNCTION TIMIN (T)

     Use.  Converts time from 0-2400 basis to minutes past midnight
(0-1440).  TIMIN is called by CROSIT, SETTUP, and WINDY.

     Argument.    T  =  clock time on a 0-2400 basis

     FUNCTION UNIDOT (A,B,)

     Use.  Returns the dot product of a unit vector parallel to A
with a unit vector parallel to B, i.e., the cosine of the acute angle
separating the vectors A and B.  UNIDOT is called by BARIER.

     Arguments.   A  =  a 3-component vector
                  B  =  a 3-component vector

     SUBROUTINE UNITY  (A,B)

     Use.  Returns B, the unit vector parallel to vector A.  UNITY
is called by ANGTST.

     Arguments.   A  =  a 3-component vector
                  B  =  a 3-component unit vector parallel to A

     SUBROUTINE UXYPOS

     Use.  This routine establishes the wind speed and  location
information used by EDDY.  UXYPOS is called by EDDY.

     Argument.   None
                                   B-10

-------
     SUBROUTINE WINDRD (KPWDAT,LTAPE)

     Use.   This subroutine is used in non-St. Louis applications to
read the wind measurement data.  For the St. Louis application, a
RETURN statement has been inserted near the beginning of the routine so
that it acts like a dummy subroutine.  WINDRD is called by WINDY.

     Arguments.  KPWDAT  =  a Hollerith variable equaling YES when
                            it is to print the wind data read from cards
                  LTAPE  =  logical unit of the peripheral device with
                            the wind data.  Use LTAPE = 3 for cards.

     SUBROUTINE WINDY (IWAS,LTAPE)

     Use.   WINDY is the secondary driver of the meteorological module.
This routine generates the air trajectories  (backward or forward) from
a prescribed start location and time.  WINDY is called by program
METHOD.

     Arguments.   IWAS  =  flag which is equal to zero on the first
                           call and greater than zero on subsequent calls
                 LTAPE  =  logical unit number of the peripheral device
                           with the meteorological data

     SUBROUTINE WSECLS (X,Y,DIS,IDIS)

     Use.   This routine calculates squared distances from the point
X,Y to each measurement station in SSTAN, and then orders the stations
by increasing distance out to a maximum value (RMAX).  WSECLS is
called by GETAZV and WINDY.

     Arguments.     X  =  x-coordinate of current position
                    Y  =  y-coordinate of current position
                  DIS  =  array of squared distances from X,Y to all
                          measurement stations.  Those values of DIS
                          less than RMAX are arranged in increasing
                          order at the top of the table
                 IDIS  =  array of station indices corresponding to
                          entries in the DIS array.  • (The indices
                          identify the stations in the SSTAN array).
                                     B-ll

-------
     BLOCK DATA

     Use.  This block data program contains the variable size grid
square identification numbers distributed to a fixed size grid square
array, IVG.  The current grid square identifiers correspond to grid
squares varying in size from 1x1 kilometer to 10 x 10 kilometers in
a St. Louis grid with origin at UTM coordinates x = 680 (km) and
y = 4230 (km).   The array (IVG) has been dimensioned 100 by 100
corresponding to a 100 kilometer square regioa considered as the
emissions grid.  In the portions of the region where grid square
identifiers are absent, the array contains zeroes.

2.  Emissions Module Subroutines and Their Use

     PROGRAM EMMOD

     Use.  EMMOD is the main program for the emissions module.  It
reads all the card-image data into the proper arrays and controls the
over-all generation of source emissions schedules along trajectories.

     Note.  When modified with computer installation specific control
statements for rewinding and/or skipping files, the program can be used
for multiple trajectories on the same day or different days.

     SUBROUTINE ADHOUR

     Use.  This routine inserts even hour values in an arbitrary
temporal schedule and interpolates variables associated with the schedule
to the even hours.  ADHOUR is called by EMMOD.

     Argument.   None

     SUBROUTINE AREAEM  (LUAREA,IPUNCH,KOK)

     Use.  This routine reads the RAPS area source emissions file and
determines the area source emissions schedule along the trajectory.
AREAEM is  called by EMMOD.

     Arguments.  LUAREA  =   logical unit of peripheral device with
                             area source emissions data
                                   B-12

-------
                 IPUNCH  =  a Hollerith variable equal to YES when
                            punched output is desired
                    KOK  =  a completion flag which is returned with
                            a positive value if an error is
                            encountered

     SUBROUTINE DHPLUM (TA,TS,U,ISTAB,ACMM,HTINV,HTPS,DH,PENTFR,DTDZ)

     Use.  This subroutine calculates the plume rise and the inversion
layer penetration fraction for a point source.  DHPLUM is called by
PONTEM.

     Arguments.      TA  =  ambient temperature (°C)
                     TS  =  stack effluent temperature (°C)
                      U  =  wind speed (meters/second)
                  ISTAB  =  atmospheric stability class
                   ACMM  =  stack effluent volumetric flow rate
                            (cubic meters/minute)
                  HTINV  =  inversion base height above surface (meters)
                   HTPS  =  stack height (meters)
                     DH  =  plume rise (meters)
                 PENTFR  =  inversion penetration fraction (0. to 1.)
                   DTDZ  =  potential temperature gradient of stable
                            layer (°C/meter)

     FUNCTION DISTAN (IPT,TS,TE)

     Use.  This function returns the distance along a trajectory
between two times.  DISTAN is called by PLUMAS.

     Arguments.   IPT  =  index of the last trajectory node
                   TS  =  initial time (minutes)
                   TE  =  final time (minutes)

     FUNCTION ERF (X)

     Use.  ERF returns the value of the error function of X.  ERF is
called by PLUMAS and PARTIT.

     Argument.   X  =  the independent variable
                                   B-13

-------
     SUBROUTINE GESTAB (TIME,ISTAB,DTNEXT,NXSTAB)

     Use.  This routine determines the atmospheric stability at the
specified time.  In addition, the value of and time difference to the
next stability class change are determined.  GESTAB is called by
PONTEM and PLUMAS.

     Arguments.    TIME  =  current time  (ir.inutes)
                  ISTAB  =  current stabilit/ class
                 DTNEXT  =  time difference to next stability class
                            change
                 NXSTAB  =  next stability class value

     SUBROUTINE GRIDIT (LUGRID,KOK)

     Use.  This subroutine reads the RAPS area source grid identifiers
and corresponding areas.  GRIDIT is called by EMMOD.

     Arguments.  LUGRID  =  logical unit peripheral device with RAPS
                            grid description
                    KOK  =  a completion  flag which is returned
                            positive if an error  is encountered

     SUBROUTINE LOCATE  (IPT,XP,YP,PDIST,TPASS,KFLAG,ISTAB)

     Use.  This routine examines the location of  a point  source relative
to a trajectory segment.  It determines whether or not the point  source
is passed on a particular trajectory segment and  whether  or not it  is
close enough to be considered for  the  point source emissions  schedule.
LOCATE is called by PONTEM.

     Arguments.    IPT  =  index of the last trajectory node
                    XP  =  point source x-coordinate  (km)
                    YP  =  point source y-coordinate  (km)
                  PDIST  =  perpendicular  distance to  XP,  YP
                  TPASS  =  time source is passed  (minutes)
                  KFLAG  =  a variable  which is positive when  a point
                           source's location meets all criteria to  be
                           included on the segment
                  ISTAB  =  atmospheric stability class
                                   B-14

-------
     SUBROUTINE PARTIT (X,HT,HTINVR,HTINTF,NOSTAT,ISTAB,TALL,PENTFR,VFRACT)

     Use.  This routine is used to distribute the elevated point source's
emissions to vertically partitioned atmospheric layers.  PARTIT is called
by PONTEM.
     Arguments.       X  =  downwind distance from source (km)
                     HT  =  height of source above surface (meters)
                 HTINVR  =  height of inversion base or mixing depth
                            (meters)
                 HTINTF  =  vector of heights of layer interfaces
                            (meters)
                 NOSTAT  =  number of layers
                  ISTAB  =  atmospheric stability class
                   TALL  =  Hollerith variable indicating whether or
                            not the source is a "tall stack"  (YES or
                            NO)
                 PENTFR  =  inversion penetration fraction (0. to 1.)
                 VFRACT  =  a vector of the normalized vertical
                            distribution of the source's entrained
                            emissions

     SUBROUTINE PLUMAS (IPT,TPASS,PDIST,PLUMFR,ISTAB,DXFREZ,TALL,KPLAG)

     Use.  PLUMAS is used to determine the fraction of point  source's
plume which is present in the Lagrangian parcel after a fixed time inter-
val from interception of the plume.  PLUMAS is called by PONTEM.
     Arguments.     IPT
                  TPASS
                  PDIST

                 PLUMFR

                  ISTAB
index of the current trajectory node
input as time of day when source is passed,
and returned as time of day when plume is
intercepted (minutes)
perpendicular distance to source at TPASS
(km)
fraction of plume's mass present in the
parcel after the fixed time interval
atmospheric stability class
                                   B-15

-------
                 DXFREZ  =  a fixed time interval  between the plume
                            interception and the lateral distribution
                            evaluation
                   TALL  =  a Hollerith variable indicating whether or
                            not the source is a "tall  stack" (YES or NO)
                  KPLAG  =  a flag returned with a value corresponding
                            to the characteristics listed below:
                            -1  =  plume's lateral spread is too  slow
                                   to reach the parcel (source ignored)
                             1  =  plume's lateral diffusion out  of the
                                   parcel is dominant
                             2  =  plume's lateral diffusion into the
                                   parcel is dominant

     SUBROUTINE PONTEM (LUPONT,IPUNCH,KOK,NDSUMS)

     Use.  This routine controls the generation of point source emission
schedules along a trajectory.  PONTEM is called by EMMOD.

     Arguments.  LUPONT  =  logical unit of peripheral device with
                            point source emissions data
                 IPUNCH  =  a Hollerith variable equal to YES when
                            punched output is desired
                    KOK  =  a completion flag which is returned with a
                            negative value when errors are encountered
                 NDSUMS  =  a Hollerith variable equal to YES when
                            regional sums of the point source emissions
                            inventory are desired

     SUBROUTINE SEGMET (P)

     Use.  This routine computes the length and bisector angles for
each segment of the trajectory.  In addition, it computes the maximum
radii and perpendicular distance criteria used in evaluating which point
sources will have plumes potentially intersecting the trajectory.
SEGMET is called by PONTEM.

     Argument.  P  =  vector of trajectory node locations
                                   B-16

-------
     SUBROUTINE STACKS (TIME,LUPONT,KOK,IWAS,NDSUMS)

     Us_e_.  This routine reads the RAPS point source emissions file each
hour and determines the regional point source emission totals if desired.
STACKS is called by PONTEM.
     Argument.     TINE
                LUPONT
                           time of day (minutes)
                           logical unit of peripheral device with the
                           point source emissions data
                   KOK  =  a flag which returns with a negative value
                           if errors are encountered
                  IWAS  =  a flag which is input as zero on the first
                           call to the subroutine and input as one on
                           all subsequent calls
                NDSUMS  =  a Hollerith variable equal to YES when
                           regional sums of the point source emissions
                           inventory are desired

     FUNCTION TRPLOG (X,XS,FS,NXF,NF)

     Use.  This function performs log-log interpolation of tabular func-
tions.  TRPLOG is called by PLUMAS and PARTIT.
     Arguments.
                   X  =  value of independent variable
                  XS  =  vector of independent variable values
                         corresponding to the tabulated function
                         values
                  FS  =  array of tabulated function values
                 NXF  =  number of tabulated function values
                  NF  =  number of functions in FS array  (normally 1)
     BLOCK DATA
     Use.  The emissions module block data program contains Gaussian
dispersion coefficients used in the point source submodule.  The a  and
a  coefficients for typical stack heights are tabulated by atmospheric
 LI
stability class and distance.  For tall stacks, the coefficients a, b,
c, and d used in the equations
                                   B-17

-------
                   b
          a   =  ax
           y
                   d
          a   =  ex
           z
are included as functions of atmospheric stability class.

3.  Chemical-Diffusion Module Subroutines and Their Use

     PROGRAM KEMOD

     Use.  KEMOD is the main program for the chemical-diffusion module.
This program reads the emissions data and calls KEMOD2 to perform the
remainder of the input/output and program control.

     SUBROUTINE ADJUST (Y,NO)

     Use.  This routine is a part of the EPISODE integration package.
It is used to adjust the concentrations history array upon a reduction of
the order of the approximation.  ADJUST is called by TSTEP.

     Arguments.   Y  =  a 2-dimensional array containing the concen-
                        trations history
                 NO  =  the maximum number of differential equations

     SUBROUTINE BLKDEC (QB,NN,KK,IP,A,C,TL,W,NOGO,BCFLAG)

     Use.  This routine performs LU decomposition of a block-tridiagonal
matrix system of linear equations.  BLKDEC is called by PSET.

     Arguments.  QB  =  a 3-dimensional array containing the
                        diagonal submatrices
                 NN  =  order of diagonal submatrices
                 KK  =  block order of  the system
                 IP  =  a 2-dimensional array of order NN*KK
                        used for storing pivot information
                  A  =  a vector of (KK-1) coefficients representing
                        the  lower diagonal submatrices which are
                        scaled  identify matrices  in this problem
                  C  =  a vector of (KK-1) coefficients representing
                        the  upper diagonal submatrices which are
                        scaled  identity matrices  in this problem
                                    B-18

-------
                   TL  =  a 3-dimensional array used to store the
                          lower diagonal elements of Q
                    W  =  a work vector of length NN
                 NOGO  =  a completion code which is returned as
                          one when a singular matrix is encountered
               BCFLAG  =  an integer vector of surface boundary
                          condition codes

     Remarks.  The matrix is of the form


Q =


QB(1) C(l)
A(l) QB(2)
0
0 0
0 O
o o o
C(2) o o
o
C(KK-l)
0 A(KK-l) QB(KK)
BLKDEC is designed only to be used with BLKSOL.

     SUBROUTINE BLKSOL (QB,NN,KK,RHS,IP,A,C,TL,W,BCFLAG)

     Use.   This routine solves a block-tridiagonal matrix system of
linear equations QX = RHS after LU decomposition has been performed on
Q.  BLKSOL is called by TSTEP.

      Arguments.   Same as BLKDEC except RHS and deletion of NOGO.
                   RHS  =  input as the right-hand side vector and
                           returned as the solution vector

     SUBROUTINE CHECKY (T,Y,YO,N,KOK)

     Use.   This routine is used to check for negative concentrations.
CHECKY is called by DRIVE.

     Arguments.     T  =  time of day (minutes)
                    Y  =  a two-dimensional array containing the
                          concentrations history
                   YO  =  the vector of concentrations last passed
                          to subroutine DRIVE from KEMOD2
                                   B-19

-------
                     N  =  the number of differential equations
                   KOK  =  a completion code which is returned
                           with a negative value when negative
                           concentrations are encountered

     SUBROUTINE COPLOT (NDPT)

     Use.   This routine controls the generation of a printer-plot of
up to five ground concentrations versus time.

     Argument.   NDPT  =  the number time increments to plot

     SUBROUTINE COSET

     Use.   This routine is a part of the EPISODE package.  It is used
to set coefficients for the predictor-corrector formula.  COSET is
called by TSTEP.

     Argument.   None

     SUBROUTINE DEC (N,NDIM,A,IP,IER)

     Use.   This subroutine performs the LU decomposition of a matrix.
DEC is called by BLKDEC.

     Arguments.      N  =  order of the matrix A
                  NDIM  =  declared dimension of the matrix A
                     A  =  on input, a matrix to be triangular!zed; on
                           output, A contains both the  upper and  lower
                           elements of the L and U matrices
                    IP  =  a vector of pivot indices
                    IER  =  a flag returned nonzero when A is a
                           singular matrix

     Remarks.   DEC is designed only to be used with SOL.

     SUBROUTINE DIFCOF  (NOSTAT)

     Use.   This routine calculates the  scaled eddy diffusivity
coefficients used in the finite difference form of the  diffusion
equation.  DIFCOF is called by KEMOD2.
                                   B-20

-------
     Argument.    NOSTAT  =  number of vertical mesh points

     SUBROUTINE DIFFUN (N,T,Y,YDOT)

     Use.   DIFFUN defines the finite difference ordinary differential
equations (YDOT = F[Y,T]).  It computes the boundary condition fluxes at
time T and the YDOT vector.  DIFFUN is called by TSTEP.

     Arguments.       N  =  number of differential equations
                      T  =  time of day in minutes
                      Y  =  a 2-dimensional array containing the concen-
                            trations history
                   YDOT  =  the rate of change of Y with respect to time

     SUBROUTINE DRIVE (N,TO,HO,YO,TOUT,EPS,IERROR,MF,INDEX,BIGSTP,KOK)

     Use.   DRIVE is the driver subroutine for the EPISODE package.
It performs initialization and control functions for the EPISODE
package.

     Arguments.         N  =  number of differential equations
                       TO  =  initial time (minutes)
                       HO  =  initial time step size (minutes)
                       YO  =  initial concentration vector
                     TOUT  =  time at which output is desired
                      EPS  =  integration error control criteria
                   IERROR  =  error control method
                       MF  =  method flag which must equal 21 for this
                              version of EPISODE
                    INDEX  =  EPISODE input control parameter and output
                              completion code
                   BIGSTP  =  maximum time step size allowed
                      KOK  =  a completion code returned as negative if
                              an error is encountered

     SUBROUTINE FMAX (A,N,B)

     Use.   This routine determines the maximum value of the elements
of the vector A.  FMAX is called by COPLOT.
                                   B-21

-------
     Arguments .     A  =  vector
                   N  =  number of elements of A
                   B  =  maximum value

     SUBROUTINE INTERP (TOUT, Y, NO ,¥0)
     Use.   INTERP is used by the EPISODE package to interpolate the
values of Y to the desired output time.  INTERP is called by DRIVE.
     Arguments.
TOUT
   Y

  NO
  YO
     SUBROUTINE ISTATE
desired output time (minutes)
a 2-dimensional array containing the
concentrations history
the number of differential equations
a vector of the concentrations at T = TOUT
     Use.   This routine calculates initial conditions for 17 species
based on the steady- state assumption.  ISTATE is called by KEMOD2.

     Arguments .   None

     Remarks.   This routine is specific to the ERT 4.1.78 photo-
chemical mechanism.

     SUBROUTINE KEMOD2 (INTIM,TSTOP,NUMFLX,FLXUNT)

     Use.   KEMOD2 is the secondary driver for the chemical -diffusion
module.  It controls all the input/output except for the emissions data.
It calls the EPISODE integration package and controls all the updating
processes.  KEMOD2 is called by program KEMOD.

     Arguments.     INTIM  =  initial time in minutes
                    TSTOP  =  final time in minutes
                   NUMFLX  =  number of species with area source
                              emissions input
                   FLXUNT  =  a Hollerith variable equal to MOLE  if  the
                              emissions data is input in mole fraction
                              instead of mass fraction
                                   B-22

-------
     SUBROUTINE MATMUL (A,B,C,N,M,L)

     Use.   This routine computes the matrix product C = A x B.

     Arguments.    A  =  matrix of order N x M
                   B  =  matrix of order M x L
                   C  =  A x B
                   N  =  number of rows of A
                   M  =  number of columns of A and rows of B
                   L  =  number of columns of B

     FUNCTION ITHOUR (TMIN)

     Use.   ITHOUR converts time of day in minutes to time on the 2400-
military clock.

     Arguments.   TMIN  =  time of day in minutes

     SUBROUTINE JACOB (A,C,R,N)

     Use.   JACOB computes the Jacobian matrix of the chemical rate
equations having the form dc./dt = f(c.., c7,..., c ), where c. is the
                       ,     i         i   i.       n          i
concentration of the i   species.  Each element of the Jacobian is
defined by A.. = 3f./3c., i, j = 1, 2, ..., N.
            ij     i   J
     Arguments.    A  =  Jacobian matrix of size N x N
                   C  =  vector of species concentrations
                   R  =  vector of chemical rate constants
                   N  =  order of the Jacobian matrix

     Remarks.    This routine is specific to the ERT photochemical
mechanism of 4.1.78.

     SUBROUTINE PEDERV (NO,Y,Q,NKM)

     Use.   This routine computes the block-tridiagonal Jacobian matrices
by calling JACOB for each vertical cell.  PEDERV is called by PSET.

     Arguments.   NO  =  number of differential equations
                                   B-23

-------
                   Y  =  a 2-dimensional array containing the
                         concentrations history
                   Q  =  a 3-dimensional array containing the
                         block-diagonal Jacobian submatrices
                 NKM  =  number of species being integrated

     SUBROUTINE PHOTOD (JSTART,JSTOP,NOSTAT,ZEE)

     Use.  This routine calculates diurnal schedules of elevation
dependent photodissociation rates for the following reactions:

                     kl     3
          N02 + hv   -jt   DTP) + NO
          HCHO + hv
                      V'
                      &-70
                       42  HCO -i- H

                      k"
                       4?  CO + H2

          V    =  V'   + k"
          K38      38   K38

PHOTOD is called by KEMOD2.

     Arguments.    JSTART  =  start time on the 2400-clock
                   JSTOP  =  stop time on the 2400-clock
                  NOSTAT  =  number of vertical mesh points
                     ZEE  =  vector of vertical mesh point elevations

     SUBROUTINE PSET (Y,NO,CON,MITER,IER)

     Use.  PSET is a part of the EPISODE package.  It computes the
coefficients of the matrix P = I - [H/EL(2)]*J where I is an identity
matrix, H is the time  step size, EL(2) is a corrector coefficient, and
J is the block-diagonal Jacobian matrices.  PSET is called by TSTEP.

     Arguments.       Y  =  a 2-dimensional array containing the
                           concentrations history
                    NO  =  number of differential equations
                                    B-24

-------
                   CON  =  scaling coefficient equal to H/EL(2)
                 MITER  =  a flag for the method of determining
                           Jacobian which must equal 1 for this
                           version of PSET
                   IER  =  a flag denoting that a singular matrix
                           has been encountered

     SUBROUTINE RATEHI (K)

     Use.  This routine retrieves photodissociation rates for the K
mesh point and computes other photodissociation rates which are propor-
tional to those rates computed by PHOTOD.  RATEHI is called by KEMOD2,
RATES, PEDERV, and ISTATE.

     Argument.   K  =  index of the vertical mesh point for which
                       the rates are desired

     SUBROUTINE RATES (Y,YDOT)

     Use.  This subroutine computes the chemical rates using explicit
rate equations.

     Arguments.     Y  =  a 2-dimensional array containing the
                          concentrations history
                 YDOT  =  a vector of the rate of change of concen-
                          trations with respect to time

     Remarks.  This routine is specific to the 4.1.78 ERT chemical
mechanism.

     SUBROUTINE SCALE (Y1,Y2,YB,YT)

     Use.  This routine computes the minimum and maximum printer-plot
boundaries such that the increments have a minimum number of significant
figures.

     Arguments.   Yl  =  minimum value to be plotted
                  Y2  =  maximum value to be plotted
                  YB  =  minimum value of the plot boundary
                  YT  =  maximum value of the plot boundary
                                   B-25

-------
     SUBROUTINE SKEDUL (X,T,NX,NINT,UPDELT,INTIM,TSTOP,DELTIN,?AIL,INT)

     Use.  This routine can perform three different transformations of
tabulated functions.
     1)   It transforms a tabulated function with arbitrarily spaced
          independent variable increments to a tabulated function
          with evenly spaced independent variable increments.
     2)   It transforms a tabulated function input on one evenly
          spaced independent variable increment to a tabular function
          with a different increment.
     3)   It performs linear interpolation of a sparsely tabulated
          function to create a tabulated function on an evenly spaced
          independent variable increment.  SKEDUL is called by KEMOD2.

     Arguments.       X  =  a tabulated function vector
                      T  =  an independent variable vector corresponding
                            to X
                     NX  =  number of elements of X upon input
                   NINT  =  number of elements of X returned
                 UPDELT  =  even increment of the independent variable
                  INTIM  =  initial value of independent variable
                  TSTOP  =  final value of independent variable
                 DELTIN  =  even increment of independent variable on
                            input for transformation 2
                    FAIL  =  a Hollerith variable equal to YES if an
                            error is encountered in the transformation
                            process
                     INT  =  a flag which is input positive when
                            transformation 3 is desired

     SUBROUTINE SOL (N,NDIM,A,B,IP)

     Use.   This routine solves a linear system of equations  AX = B
where A  matrix has  been decomposed into lower and upper triangular form
by DEC.  SOL  is called by BLKSOL.
                                   B-26

-------
     Arguments .      N  =  order of the A matrix
                 NDIM  =  dimensioned size of the A matrix
                    A  =  the matrix decomposed into lower and upper
                          triangular form by subroutine DEC
                    B  =  the right-hand side vector
                   IP  =  the pivot vector obtained from DEC

     SUBROUTINE SOL2B2 (A,B)

     Use.  This routine solves a system of two linear equations of
the form AX = B.

     Arguments .    A  =  a two-by-two matrix of coefficients of the
                        equations
                  B  =  input as the right-hand side vector and
                        returned as the solution vector

     SUBROUTINE STEADY (Y,N)

     Use.  A dummy subroutine as used in this version of the model .
It can be modified to compute the concentration of species carried
in pseudo-stationary state.

     Arguments .    Y  =  a 2-dimensional array containing the
                        concentrations history
                  N  =  number of differential equations

     SUBROUTINE TEMPR (IT, TIME, T)

     Use.  This routine computes the temperature dependent rate
constants associated with the following two chemical decomposition
steps:

                k21
          HN04   4-  N02 + H02
          PAN   4-   N02 + RC03
                                    B-27

-------
     Arguments.     IT  =  index of the temperature vector associated
                          with the current temperature
                 TIME  =  time in minutes
                    T  =  a vector of temperatures in degrees Kelvin

     SUBROUTINE TIMEX

     Use.  This is a dummy subroutine as used in this version of the
model.

     Argument.  None

     SUBROUTINE TSTEP (Y,NO)

     Use.  This routine performs one step of the integration of the
differential equations.  It is the core integrator of the EPISODE
package.

     Arguments.   Y  =  a 2-dimensional array containing the
                        concentrations history
                 NO  =  number of differential equations

     SUBROUTINE UNMIXR

     Use.  This is a dummy subroutine as used in this version of the
model.

     Argument^  None

     SUBROUTINE UPFLX1  (TIME,J)

     Use.  This routine updates the  area source emission fluxes.

     Arguments.  TIME  =  time in minutes
                    J  =  index of the area  source array (FLXIN)
                          corresponding to TIME

     SUBROUTINE UPRAT2  (T,IK1,RATEV,NOSTAT,NVRATE,CLOUDY)

     Use.  This routine updates the  photodissociation rates  to the
current  time  from  the  schedule of rates created by subroutine PHOTOD.   It
adjusts  the rates  by the sky  clearness ratio.
                                    B-28

-------
     Arguments.        T  =  time in minutes
                    IK1  =  index of the RATK1 and RATK2 arrays
                            corresponding to time T
                  RATEV  =  a 2-dimensional array in which the current
                            NO- and HCHO photolysis rates at the various
                            elevations are stored
                 NOSTAT  =  number of vertical mesh points
                 NVRATE  =  number of variable rates
                 CLOUDY  =  sky clearness ratio (0 to 1)

     SUBROUTINE UPSORC (TIME,IPS,NOSTAT,SPEC)

     Use.  This routine updates the point source emission rates.

     Arguments.     TIME  =  time in minutes
                    IPS  =  index of the point source emissions array
                            (PS) corresponding to TIME
                 NOSTAT  =  number of vertical mesh points
                   SPEC  =  a vector of Hollerith species names

4.  Utility Library Subroutines and Their Use

     SUBROUTINE FMINF  (F,NF,FMIN,NMIN)

     Use.  FMINF finds the minimum value in a linear array and returns
both the minimum value and its array index relative to the first value
in the array.  Called by WSECLS and PONTEM.
     Arguments.
F  =
                   NF  =
         the first location of a sequence to be
         checked
         the number of consecutive locations to
         be considered (starting with F)
FMIN  =  the minimum value among the NF consecutive
         members of the F array
NMIN  =  the index of FMIN relative to F, counting
         F as 1
                                   B-29

-------
     SUBROUTINE MCHAR (IFC,FROM,ITC,TO,NCHR)

     Use.  MCHAR moves a string of individual characters from one
storage location to another.  MCHAR is called by SETPLT.

     Arguments.   IFC  =  position of character to move from.  The
                          left most character is position 1
                 FROM  =  source word
                  ITC  =  position of character to move to
                   TO  =  destination word
                 NCHR  =  number of characters to move

     SUBROUTINE MDATE (IDATE)

     Use.  A dummy subroutine that is located in the code in a position
where it would access the machine date.

     Argument.   IDATE  =  machine date

     SUBROUTINE NEWPAG (TITLE,NSKIP,IDATE)

     Use.  This routine prints the TITLE as a header on each page of
output.

     Arguments.  TITLE  =  an 80-character  array containing any user
                           comment or title
                 NSKIP  =  number of pages  to skip  (normally 0)
                 IDATE  =  machine date

     SUBROUTINE PREDAT

     Use.  This routine reads the input data cards  for  each module
of the code from logical unit number five.  It writes the data card
images on the  output file, logical unit number six.  It also writes
the data card  images on logical unit number three,  and  rewinds this
file, so that  they can be read by the program.

     Argument.  None
                                    B-30

-------
     SUBROUTINE SECOND (A)

     Use.  SECOND is a dummy subroutine which is positioned in the
code to access the computer time used from the beginning of the run.

     Argument.   A  =  computer time used in seconds

     SUBROUTINE SETPLT (A,B,C,D)

     Use.  SETPLT is the initialization entry for a general purpose
printer plot routine.  SETPLT is called by SETTUP and COPLOT.

     Arguments.   A  =  minimum value on the horizontal (x) axis
                  B  =  maximum value on the x-axis
                  C  =  minimum value on the vertical (y) axis
                  D  =  maximum value on the y-axis

     ENTRY PLTPNT (A,B,C)

     Use.  PLTPNT enters a new data point in the printer-plot array.

     Arguments.   A  =  x-coordinate of new data point
                  B  =  y-coordinate of new data point
                  C  =  a Hollerith character to be plotted at x,y

     ENTRY PLTOUT (IFILE)

     Use.  PLTOUT is the final call in a plotting sequence.  It writes
the plot to the output file.

     Argument.   IFILE  =  the logical unit of output file

     SUBROUTINE SOLAR (SLA,SLO,TZ,IY,IM,ID,D,TIME,NV)

     Use.  SOLAR is used to compute the solar elevation in degrees.
SOLAR is called by SKI and PHOTOD.

     Arguments.   SLA  =  latitude in degrees (south = minus)
                  SLO  =  longitude in degrees (east = minus)
                   TZ  =  time zone
                                   B-31

-------
                   IY  =  year
                   IM  =  month
                   ID  =  day
                    D  =  solar elevation angle in degrees
                 TIME  =  time on the 0-2400 hour clock
                   NV  =  5 for solar elevation calculation

     SUBROUTINE XMIT (N,A,B)

     Use.  When N > 0,  XMIT transfers N words from A to B.  When N < 0,
the scalar value of A is transmitted to N words of B.  XMIT is called in
all three modules by many different subroutines.

     Arguments.   N  =  number of words to transfer
                  A  =  value of vector (or scalar) to transfer
                  B  =  vector receiving new values
                                    B-32

-------
                            APPENDIX  C
                   CODE FORTRAN SOURCE  LISTINGS
1.   Meteorological Module
    METHOD (Main)
    ANGTST
    AZVDIS
    BARIER
    CELAVG
    CLOCKT
    CROSIT
    DATE
    DIFFUS
    DOTTY
    DTIME
    EDDY
    EDGE
    EXTRP
    FULGOL
    GETAZV
    GETCON
    JULIAN
    KEKLAY
    KLASS
    KZDATA
    METIN
    PLACIT
    RUFNES
    SETIN
    SETTUP
    SKY
    SMOOTH
    STABIL
    STADIF
C-3
C-5
C-6
C-7
C-9
C-9
C-10
C-14
C-15
C-16
C-16
C-16
C-23
C-23
C-26
C-26
C-31
C-33
C-34
C-35
C-35
C-37
C-44
C-44
C-45
C-47
C-49
C-49
C-51
C-52
2.

TIMIN
UNIDOT
UNITY
UXYPOS
WINDRD
WINDY
WSECLS
BLOCK DATA
Emissions Module
EMMOD (Main)
ADHOUR
AREAEM
DHPLUM
D I STAN
ERF
GESTAB
GRIDIT
LOCATE
PARTIT
PLUMAS
PONTEM
SEGMET
STACKS
TRPLOG
BLOCK DATA
Page
C-52
C-53
C-53
C-53
C-54
C-56
C-64
C-65

C-78
C-83
C-83
C-89
C-90
C-91
C-91
C-92
C-93
C-94
C-97
C-98
C-103
C-104
C-107
C-108
                                   C-l

-------
3.
Chemical -Diffusion

KEMOD (Main)
ADJUST
BLKDEC
BLKSOL
CHECKY
COP LOT
COSET
DEC
DIFCOF
DIFFUN
DRIVE
FMAX
INTERP
I STATE
ITHOUR
JACOB
KEMOD2
MATMUL
PEDERV
PHOTOD
PRODUK
PSET
RATEHI
RATES
SCALE
SKEDUL
SOL
SOL2B2
STEADY
TEMPR
Module
Page
C-109
C-110
C-112
C-114
C-115
C-116
C-117
C-119
C-120
C-121
C-123
C-130
C-130
C-131
C-133
C-133
C-137
C-152
C-152
C-153
C-156
C-156
C-158
C-158
C-161
C-161
C-163
C-164
C-164
C-165
                                                               Page
                                               TIMEX           C-165
                                               TSTEP           C-165
                                               UNMIXR          C-173
                                               UPFLX1          C-173
                                               UPRAT2          C-174
                                               UPSORC          C-175

                                           4.  Utility Library
                                               FMINF           C-176
                                               MCHAR           C-176
                                               MDATE           C-177
                                               NEWPAG          C-177
                                               PREDAT          C-177
                                               SECOND          C-178
                                               SETPLT          C-178
                                               SOLAR.          C-182
                                               XMIT            C-183
                                    C-2

-------
1.   Meteorological Module Listing

c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
























c
too
c
c
PROGRAM METMOD MM
MM
THIS TS THE DRIVER PROGRAM FOR THE ERT METEORELOGICAL MODULE. MM
MM
SUBROUTINES AND FUNCTIONS REQUIRED MM
MM
ANGTST AZVOIS BARIER CELAVG CLOCKT DATE MM
FMINF FULGOL GETAZV GETCON JULIAN KEKLAY MM
KZDATA MCHAR MDATE METIN NEWPAG PLACIT MM
PHEDAT WUFNES SECOND 3ETIN SETPLT 8ETTUP MM
SKY SMOOTH SOLAR STABIL STAOIF TIMIN MM
UNIOOT UNITV UXYPOS WINDY WJNDRO NSECLS MM
XMIT CROSIT KLASS OTIME MM
MM
BLOCK DATA IS REQUIRED FOR VARIABLE GRID SQUARE SIZE APPLICATIOMM
MM
LOGICAL UNITS REQUIRED MM
MM
TAPE 1 s PUNCHED OUTPUT MM
TAPE 3 » PREDAT OUTPUT / METMOD INPUT MM
TAPE 4 * SETPLT SCRATCH FILE MM
TAPE 5 a INPUT (TO PREOAT) MM
TAPE 6 = PRINTED OUTPUT MM
TAPES 11-20 « POSSIBLE HIND DATA SCRATCH FILES MM
LTAPE a METEOROLOGICAL DATA FILE (USE 3 FOR CARDS) MM
MM
MM
COMMON /AIRI3AL/ NEEDAU, NOSPEC, CQNAM(IO), CON(34,25, 10) MM
CU^MQN /CNTROL/ KSTOP, TSUN MM
COMMON /DATES/ IDATESUO), ICT(IO), NFILES MM
C(jK"'Cn /GRID/ XI, X2, Yl, Y2, NX, NY, OELX, DELY, CELT MM
CO^Ou/INPUTS/ TITLEC20), JDATE(IO), NCURV MM
COMMON /KZINPT/ NEEOKZ, KZPRTX, NUMSD, MM
1 TIMESOC3), .TEMPSD(SO,3), ZELVSD(SO,3)MM
2 , TEMPSF(2«), NPTSDC3) , NKZDAT MM
COMMON /ORIGIN/ UTMXOR, UTMYOR MM
Cnwn.N /REUSE/ KPSTAT, KPWOAT, CONVRT, KXTRA, KPHINO MM
COMMO . /TRA.J/ T5TART, P(Z,100), 10(2,100) MM
CO'-'-'-'O'J /WDATA/ NUMSTA, SSTAN(2,25), ISTANS (2,25) , RMIN, RMAX MM
cof'-o'v /*HEPE/ RLAT, RLONG, TMZONE MM
CO^'O'i /rtlNO/ T(IOO), V(IOO), TH(tOO), MM
1 NPTS MM
COM--QI. /MMFLD/ A/*OATA(52,25) ,OISAVEC25), IDSAVE(25) MM
EOUIV4LENCE (HMOR,MORE) MM
DATA YtS,NEG,Mf)RE,END/3HYES,2HNO, OHMORE, 3HEND/ MM
DAT* DALITE/dHDAYL/ MM
DATA WTD/57.29578/ MM
DATA LIN, LOUT /3,6/ MM
IWAS =0 MM
NCU<
-------
C        KPKlNO  -•  DO YOU WANT THE OUTPUTS PUNCHED?                   MM    56
C        NEEDAO  •»  DO YOU WANT AIR QUALITY DATA INTERPOLATED          MM    57
C                    ALONG THE TRAJECTORY?                              MM    56
C        NEEDKZ  ..  VERTICAL DIFFUSITY CALCULATION DESIRED (YES OR NO) MM    59
C        LTAPE   ••  LOGICAL UNIT OF HIND/MET DATA PERIPHERAL.          MM    60
C                                                                       MM    61
      REAp(LIN,25) TITLE                                                MM    62
                                                                        MM    63
      READ(LIN,29) TRAJEX                                               MM    64
      RE»0(L1N,2<5) KPrtlMO                                               MM    65
      R£AOCLIN,29) NEEDAQ                                               MM    66
      READ(LIN,29) NEEDKZ                                               MM    67
      READ(LIN,a8) LTAPE                                                MM    68
C                                                                       MM    69
      CALL MDATE(JDATE)                                                 MM    70
      IF (TRAJEX.EQ.YES) GO TO 1ZO                                      MM    71
      CALL WINDY (IMAS,LTAPE)                                           MM    78
      IWAS » 1                                                          MM    73
      IF (KSTOP.EQ.l) GO TO 610                                         MM    70
      GO TO 150                                                         MM    75
180   PEADUIN,3) P(l,l),P(a,l)                                         MM    76
      READ(LIN,29) 3TIME                                                MM    77
      TSUN s 0.                                                         MM    76
      IF (STJME.EO.DALITE) TSUN * 0100.                                 MM    79
      DO 130 I = 1,101                                                  MM    80
      READ(LIN,3) A,B,C                                                 MM    61
      IF (A.LT.O.) 60 TO 140                                            MM    62
      T(I) « A                                                          MM    83
      V(I) * B                                                          MM    64
      TH(I) e C/RTO                                                     MM    85
130   CONTINUE                                                          MM    66
      WUTE(LOUT,2)                                                     MM    87
      GO TO 610                                                         MM    86
140   NPTS * 1-1                                                        MM    69
      CALL TRAJECCIWAS,LTAPE)                                           MM    90
      I«VAS * 1                                                          MM    91
C                                                                       MM    98
150   CONTINUE                                                          MM    93
C                                                                       MM    94
810   R£AD(LIN,25) TERM                                                 MM    95
      IF (TERM.EO.RMOR) GO TO 100                                       MM    96
      STOP                                                              MM    97
C                                                                       MM    96
2     FORMAT (1H1,10X,45HDIMENSION9 OF ARRAYS T, V, TH IN COMMON/WIND/  MM    99
     133H HAVE BEEN EXCEEDED. JOB ABORTED.)                             MM   100
3     FORMAT (40X,3F10.3)                                               MM   101
25    FORMAT (20A4)                                                     MM   102
28    FORMAT (40X.I2)                                                   MM   103
29    FORMAT (40X.A4)                                                   MM   104
      END  -                 '                                            MM   10S
                                          C-4

-------
SUBROUTINE AN,GTST(XS,YS,NGOOD,KUSE,OK)
C
C THI3 ROUTINE PERFORMS THE ANGLE TEST
C
C XS X-COORD1NATE UF POSITION
C YS Y-COOROINATE OF POSITION
C NGOOD NUMBER OF POINTS»1
C KU3E INDEX OF CLOSEST STATION
C OK FLAG IF POSITIVE ANGLE TEST IS OK OTHERWISE LOOK FOR
C
COMMON /WDATA/ NUMSTA, SSTAN(Z,85), ISTANS (8,35) , RMIN,
C
DIMENSION RVECC3,3),SV£C(J,3)
DATA COSTST/.99939083/
C
OK a "1.
MUSE 3 NGOOO+1
60 TO (100,120, ISO), NUSE
C
C STORE FIRST VECTOR

100 CONTINUE
HVEC(lfl) = XS-SSTAN(lfKUSC)
RVEC(2,1) * Y3-S3TAN(8,KUSE)
RVEC(3,1) * 0.0
110 CONTINUE
OK = 1.0
RETURN
C
C STORE SECOND VECTOR AND CHECK ANGLE
120 CONTINUE
RVECU.2) s XS-SSTANO.KUSE)
RVfcC(2,2) * YS-SSTAN(2,KUSE)
RVEC(3,2) a 0.0
CALL UNITV(RVEC(1,1),SVEC(1,1))
CALL UNITV(RVEC(1,2),SVEC(I,2))
COSEY * DOTTY(SVEC(1,1),SVEC(1,Z))
C
C PROVIDE A 2 DEGREE ANGLE CHECK
IF CCOSEY.GT.COSTST) RETURN
GO TO 110
C
C STOKE THIRD VECTOR AND CHECK ANGLE
130 CONTINUE
RVEC(1,3) « XS-SSTAN(l,KUSE)
RVEC(2,3) s Y3-SSTAN(2,KU3E)
RVEC(3,3) * 0.0
CALL UNITV(RVEC(l,3),3VECd,3))
COSEY = OOTTY(SVEC(l,l),SVEC(l,3))
IF CCOSEY.GT.COSTST) RETURN
COSEY « OOTTr(3VEC(l»e)iSVEC(l,3))
IF (COSEY. ST. COST8T) RETURN
GO TO 110
C
END
MM
MM
MM
MM
MM
MM
MM
MM
MEM POINT MM
MM
RMAX MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
106
107
10S
109
110
in
112
113
114
115
116
117
its
119
120
121
122
123
124
125
126
127
12ft
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
J57
158
159
160
C-5

-------
      SUHROUTINE AZV[>IS(NP,AZV,DOO,AZM,VEL»IRF)                         MM   161
C                                                                       MM   162
C THIS SUBROUTINE TAKES THE RAW AZIMUTH AMD VELOCITY DATA AND           MM   163
C PRODUCtS ONE AZIMUTH ANO VELOCITY                                     MM   16
-------
c
c









i:




c


c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c

c




c
c
c
c
c
c
c


CALCULATE M(I) AND THE AZIMUTH AND VELOCITY OF INTEREST

SUMX 3 0.
SUMY s 0.
SIJM2 s 0.0
DO 130 I * 1,NP
U = 1-1
WU) = R(I)/SUM
SUMX = 3UMX+AX(I)*W
-------
C                                                                       MM   268
      OK s 1.0                                                          MM   269
      IF (NUMBAS.LE.O) GO TO 140                                        MM   270
      If (IFIN.GT.O) GO TO UO                                          MM   271
C                                                                       MM   272
C SETUP SLOPF- INTERCEPT FORM OF A LINE                                  MM   273
      00 100 I » 1»NUMBA3                                               MM   271
      0V s 8AS(2,I)-B»SC4,J)                                            MM   375
      OX = BAS(I,I>-BA8(3,I)                                            MM   276
      SLPINU»I) « DY/OX                                                MM   277
      SLPIN(2,I) • BAS(2,I)-3lPlN(l,n*BASU,I)                         MM   278
100   CONTINUE                                                          MM   279
      IFIN a 1                                                          MM   260
C                                                                       MM   281
110   CONTINUE                                                          MM   282
C                                                                       MM   283
      X s X * UTMXOR                                                    MM   2B«
      Y a Y + UTMYOR                                                    MM   885
      XS s XS * UTMXOR                                                  MM   286
      YS s YS + UTMYOR                                                  MM   287
C                                                                       MM   268
      CU) » XS-X                                                       MM   289
      C(2) » YS«Y                                                       MM   290
      A(3) « 0.                                                         MM   291
      8(3) » 0.                                                         MM   292
      CC3) = 0.                                                         MM   293
      DO 120 I * 1.NUM8A3                                               MM   294
      01 * YS-SLPIN(l,I)*XS-SLPIN(2fI)                                  MM   295
      02 « Y-SLPIN(l»n*X-3LPIN(2,I)                                    MM   296
      IF (01*02.GE.O.) GO TO 120                                        MM   297
      A(l) « 8*8(1,I)-X                                                 MM   298
      A(21 « BA8(2,I)-Y                                                 MM   299
      HO) s BA8(3,I)-X                                                 MM   300
      8(2) = BAS(«,I)-V           .                                      MM   301
      COSAB » UNIOOT(A.B)                                               MM   302
      COSAC a UNIOOT(A,C)                                               MM   303
      COSbC « UNIOOT(B,C)                                               MM   30«
      IF (COSAC.LT.COSAB.OR.COSBC.LT.COSAB) 60 TO 120                   MM   305
      OK B -1.0                                                         MM   306
      GO TO 130                                                         MM   307
120   CONTINUE                                                          MM   308
130   CONTINUE                                                          MM   309
C                                                                       MM   3JO
      X s X « UTMXOR                                                    MM   511
      Y « Y - UTMYOR                                                    MM   312
      XS = XS - UTMXOR                                                  MM   313
      YS a YS » UTMYOR                                                  MM   310
                                                                        MM   J15
C                                                                       MM   316
140   CONTINUE                                                          MM   317
      RETURN                                                            MM   318
      END                                    '                           MM   319
                                  C-8

-------
      SUBROUTINE CELAVG(DH,NMESHP,CELVAT.AKZ.NZHI.STORE)                MM    320
C                                                                       MM    321
C     «CELAVG* CALCULATES THE AVERAGE DIFFUSIVITY COEFFICIENTS          MM    322
C              BETWEEN VERTICAL MESH POINT ELEVATIONS FOR USE           MM    3H3
C              IN THE CHEMICAL-DIFFUSION MODULE.                        MM    324
C                                                                       MM    325
      DIMENSION CtlVATU),AKZ(l) ,STORE(6)                               MM    326
      NP1=NMESHP»1                                                      MM    327
      DO 20 K=2,NMESHP                                                  MM    328
      NTOPrIFIX(CF.LVAT(K)/DH4..5)                                        MM    32
      FUNCTION CLOCKT(TSTART.OT)                                        MM    350
C                                                                       MM    351
c         CLOCKT RETURNS MILITARY CLOCK TIME AT TSTART » DT             MM    352
C              TSTART * INITIAL CLOCK TIME                              MM    353
C                  DT « ELAPSED TIME IN MINUTES                         MM    354
C                                                                       MM    355
      XMIN s AMOO(TSTART,100.)                                          MM    356
      HRS a TST»RT-XMIN                                                 MM    357
      XMIN s XMIN+DT                                                    MM    358
      RMIN 3 AMOD(XMIN,60.)                                             MM    359
      MRS s HRS+100.*(XMIN-RMIN)/60.                                    MM    360
      CLOCKT z HRS+RMIN                                                 MM    361
      IF (CLOCKT.GT.2400.) CLOCKT * AMOO(CLOCKT,2400.)                  MM    362
      RETURN                                                            MM    363
      END                                                               MM    364
                                     C-9

-------

c
c
c











c







c






too
c
c
c
















110
120

110

SUBROUTINE CROSIT

CROSIT GENERATES TRAJECTORY GRID SQUARE ID HISTORY

DIMENSION ICHAR(?6), TX(4), KSYM(50), IDVG(TOl)
COMMON /CNTROL/ KSTOP, TSUN
COMMON /REUSE/ KPSTAT, KPWDAT, CONVRT, KXTRA, KPWIND
COMMON /CROSS/ TC(SOO), PC(2,500), 100(3,500), NC
COMMON /GRID/ X1,X2,Y1,Y2,NX,NY,0£LX,DELY,D£LT
COMMON /INPUTS/ TITLE(20), JDATE(IO), NCURV
COMMON /ORIGIN/ UTMXOR, UTMYOR
COMMON /TRAJ/ TSTART, P(2,100), 10(2,100)
COMMON /WIND/ T(100)r V(IOO), TH(IOO), NPT8
COMMON /VGRID/ ITGRIO, IVG(100,100)


DATA ICHAR/1HA,1HB,1HC,1HD,1HE,1HF,1HG»1HH,1HI,1HJ,1HK,1HL,
t 1HN,1MO,1HP,1HQ,1HR,1HS,1HT,1HU,1HV,1HW,1HX,1HY,
DATA NCMAX/500/, JTMAX/500/
DATA SRO/57.29577951/
DATA NQNO/4HNO /
DATA KYES /aHYES /
DATA LOUT, LPUNCH, IDFALT /6,1,0/

KSTOP = 0
CAUL SETTUP
IF (NPT8.GE.2) GO TO 100
KSTOP » 1
WRITE(LOUT,5)
RETURN
CONTINUE

TABULATE ALL TIMES ASSOCIATED WITH GRID LINE CROSSINGS

NC s 0
KSYM(l) * ICHAR(l)
CALL PLTPNT(P(1,1),P(2,1),KSYMC1))
DO 250 K a 2,NPT8
L = K-l
DELT s T(K)-TCL)
VX = V(L)*COS(TH(L))
VY = VCL)«SIN(TH(L1)
CALL PLACIT(DELT,L,VX,VY,P(1,K),ID(1,KJ)
TSAVE = 0.
TXMAX s 9999.
IF (VX.NE.O.) TXMAX * ABSCDELX/VX)
TYMAX s 9999.
IF (VY.NE.O.) TYMAX = ABSCDELY/VY)
RX = P(1,L)-(ID(1,L)-1)*OELX
RY a P(2,L)-(ID(2,L)-1)*DELY
IF (VX) 120,130,140
TX(1) = -RX/VX
GO TO 150
TX(1) « 9999.
GO TO 150
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
1HM,MM
1HZ/MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
361
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
4»9
C-10

-------
UO   TX(l) = (DELX«RX)/VX                                              MM   020
150   CONTINUE                                                          MM   421
      IF (VY) 160,170,180                                               MM   422
160   TY = »RY/VY                                                       «M   023
      GO TO 190                                                         MM   424
170   TY s 9999.                                                        MM   425
      60 TO 190                                                         MM   426
180   TY s (DELY-RYj/VY                                                 MM   427
190   CONTINUE                                                          MM   428
      T3 3 AMIN1(TX(1),TY) » TSAVE                                      MM   429
      T8 = A"AXl(TX(n,TY) » TSAVE                                      MM   430
      IF (TS.6T.OELT) SO TO 2«0                                         MM   431
      TNXT e TS                                                         MM   432
      T3NX « AMIN1(TXMAX,TYMAX)                                         MM   433
200   CONTINUE                                                          MM   434
      NC * WC + 1                                                         MM   435
      TC(NC) » T(L)»TNXT                                                MM   436
      CALL PLACITCTNXT,L,VX,VY,PCCI,NC),IOCCI,NC))                      MM   437
      IF (NC.EQ.NCMAX) 60 TO 260                                        MM   438
      TSAVE s TNXT                                                      MM   439
      TNXT = TNXT»TSNX                                                  MM   440
      IF (TNXT-DELT) 210,210,220                                        MM   441
                                                                        MM   442
210   IF (TNXT-TB) 200,200,230                                          MM   443
220   IF (OELT-TB) 2«0,230,230                                          MM   4«4
230   CONTINUE                                                          MM   445
      NC 8 NCtl                                                         MM   446
      TC(NC) a T(L)+TB                                                  MM   4«7
      CALL PLACIT(TB,L,VX,VY,PC(1,NC),IDC(1,NO)                        MM   448
      IF (NC.EQ.NCMAX) GO TO 260                                        MM   449
      T3AVE * TB                                                        MM   450
      HX s PCU,NC)-CIOCU,NC)-n«OELX                                  MM   451
      RY a PC(2,NC>-CIOC(2.NC)-n*DElY                                  MM   452
      GO TO 110                                                         MM   453
240   CONTINUE                                                          MM   454
      K.K « K                                                            MM   455
      It (K.GT.26) KK « MOD(K,26)                                       MM   456
      If (K.EQ.52) KK « 26                                              MM   457
      KSYM(K) * ICHAR(KK)                                               MM   458
      C»LL PLTPMT(P(l,K)fP(2,K),K8VH(K))                                MM   459
250   CONTINUE                                                          MM   460
      G(J TO 270                                                         MM   461
260   KSTOP =2                                                         MM   462
      NPTS ' K                                                          MM   463
270   CONTINUE                                                          MM   464
      K s NPTS                                                          MM   46S
C                                                                       MM   466
C         PRINT GRID LOCATIONS AND NINO VECTORS AT TRAJECTORY NODES     MM   467
C                                                                       MM   ttfa8
      STRT a TIMIN(TSTART)                                              MM   469
      CALL MEWPAG(TITLE,0,JOATE)                                        MM   470
      W«IT£(LOUT,1)                                                     MM   471
      DO 290 L » l.K                                                    MM   472
      IF (MOD(L,25).NE.O) GO TO 280                                     MM   473
      CALL MEWPAG(TITLE,0,JDATE)                                        MM   474
                                     C-ll

-------
                  )                                                      MM    475
280   CONTINUE                                                           MM    476
      VV a V(L)*60.                                                      MM    477
      A.MG s TH(L)«3RD                                                    MM    478
      TCL) a T(L) + STRT                                                 MM    479
      »RITE(LOUT,2) KSYM(L),T(L),ID(l,L),IO(a,U,P(l.L),P(2,L),VV,ANG    MM    4BO
290   CONTIMUi                                                           MM    481
C                                                                        MM    4«2
      CALL PLTOUTUOUT)                                                  MM    483
C                                                                        MM    484
      CALL NE*PAG(TITLE,0,JDATE)                                         MM    485
      HRITEUOUT,3)                                                      MM    486
      Pt - P(l»l) t UTMXOR                                               MM    487
      P2 s P(2,l) » UTMYOR                                               MM    «88
      K«1TE(LOUT,«)  STRT, PI, P2, 10(1,1),  10(3,1)                      MM    «80
      IF(ITGRIO.NE.KYeS) WRITE(LPUNCH,9)  STRT,PI,P2,ID(1,t),10(2,1)     MM    «90
      00 3JO L * 1,NC                                                    MM    «91
      IF («00(L,25).NE.O) GO  TO 500                                      MM    «9Z
      C»LL NEWC»G(TITLE,0,JO*TE)                                         MM    «93
      WRITE(LOUT,3)                                                      MM    «94
300   CONTINUE                                                           MM    495
      TC(L) a TC(L) + STRT                                               MM    496
      PC(1,L) « PC(l.U) + UTMXOR                                         MM    497
      PC(2,L) « PCCa.L) * UTMYOR                                         MM    496
      «RITE(LOUT,4) TC(L),PC(1,L),PC(B,L),IDC(1,L),IDC(2,L)              MM    499
      IFdT6RIO.EO.KYE3)  60  TO 310                                      MM    500
      IF(KPKIND.EQ.KYES)                                                 MM    501
     1  WRITE (LAUNCH,9) TC (L) ,PC (1 ,L) ,PC (a,L) , IOC (1 ,U , IOC(2,U)         MM    502
310   CONTINUE                                                           MM    503
      A = -10.                                                           MM    504
                                                                         MM    505
      IF(IT6RIO.NE.KYE3) WRITE  (7,9)  A                                   MM    506
C                                                                        MM    507
      IF (KSTOP.EQ.2) *RITE(LOUT,6)                                      MM    508
      KSTOP » 0                                                          MM    509
C                                                                        MM    510
C         GENERATE GRID SQUARE  10 HISTORY FOR  VARIABLE  SIZE  GRID         MM    511
C                                                                        MM    512
      IF(IT6RID.NE,KYE3)  60  TO 360                                      MM    513
 320  CONTINUE                                                           MM    514
      I = 10(1,1)                                                        MM    515
      J = 10(2,1)                                                        MM    516
      IFCI.GE.l  .AND.  l.LE.NX  .AND.  J.GE.l  .AND. J.LE.NY)  GO TO 322    MM    517
      IOVG(1) *  IOFALT                                                   MM    518
      GO TO 323                                                          MM    519
322   IDVG(l) «  IVG(I,J)                                                .MM    520
323   IOK = KYES                                                         MM    521
      00 330 Kat.NC                                                      MM    522
      I = IOCd,K)                                                       MM    523
      J = IDC(a.K)                                                       MM    524
      IOK * KYES                                                         MM    525
      IFd.LT.l)   IOK  « MONO                                             MM    526
      IF(I.GT.NX)  IOK  s NONO                                             MM    527
      IF(J.LT.l)   IOK  a NONO                                             MM    528
      IF(J.GT.NY)  IOK  « NONO                                             KM    529
                                    C-12

-------
      IF(IOK.EO.KYES)  60 TO 325                                       MM   5JO
      IDVGfK+1) s IDFALT                                              MM   531
      GO  TCI  330                                                       MM   533
  325 CONTINUE                                                        MM   533
      IOVG(K«1) s IVG(!,J)                                             MM   534
  330 CONTINUE                                                        MM   535
      CALL NEwPAG(TITLE,0,JOATE)                                       MM   536
      *"mE(LOUT,12)                                                  MM   537
      *RITE(LOUT,13) STRT,Pl,P2,IDVG(l)                                MM   536
      IF(KPWIND.EO.KYES)  WRITE  (LPUNCH.10)  TITLE                     MM   539
      IFCKPtflND.EQ.KYES)  WRITE (LPUNCH,14)   3TRT, PI,  P2,  IDV6C1)      MM   540
      N =  I                                                           MM   541
      NLST = N                                                        MM   542
      DO  350 K » 1,NC                                                 MM   543
      !FfMOD(N,25).NE.O)  60 TO  3«0                                    MM   541
      IFCN.EQ.NL3T)  GO TO 340                                         MM   545
      CALL NEKPAG(TITL£,0,JOATE)                                       MM   546
      *HITE(LOUT,12)                                                  MM   547
      NLST ' N                                                        MM   548
  340 CONTINUE                                                        MM   54<»
      IFdDVG(Ktl)  .EO. IDVG(K))   GO  TO 350                            MM   550
      N a  N  +  1                                                       MM   551
      WRITEUOUT.13)  TC(K), PC(1,K), PCC2.K), IDV6(K*1)                MM   552
      IF(KP*INO.EO.KYES) WRITE(UPUNCH,14)TC(K),PC(1(K),PC(2,K),IOV6(K+1)MM   553
  350 C0^4T^^UE                                                        MM   554
      IF(KPMND.EO.KYES)  WRITECLPUNCH, 14) *                           MM   555
  360 CONTINUE                                                        MM   556
      HETURN                                                          MM   557
C                                                                    MM   558
C                                                                    MM   559
1     FORMAT (1H0.15HTRAJECTORY  DATA,/                                 MM   560
     1 IHO/flPH  STM80L  T(MIN)     I     J     X(KM)      Y(KM),        MM   561
     2 3X,17HV(K>VHR)    THETA   )                                     MM   562
2     FORMAT (/6X,A1(F10.2,2I6,4F10.2)                                 MM   563
3     FORMAT (IHO,14X,3HUTM,7X,3HUTM,/,                                MM   564
     1          3X,7HTC(MIN),4X,6HXC(KM),4X,6HYC(KM),4X,2HICt4X(2HJC ) MM   565
4     FORMAT (/3F10.2.2I6)                                            MM   566
5     FORMAT (1H0.63HSUBROUTINE  CROSIT HAS RECEIVED LESS  THAN   2  TRAJECMM   567
                                                                     MM   568
     ITORY POINTS.  / ITH CASE TERMINATED. //)                          MM   569
6     FORMAT UHO.TOHSUBROUTINE  CROSIT TERMINATED TRAJECTORY E»RLY TO AVMM   570
     1010  ARRAY OVERFLOW. //)                                         MM   571
  9   FOHM»T (10X,3F10.2.2I10)                                         MM   572
  10  FORMAT (20A4)                                                   MM   573
  12  FORMAT (1HO,2X,10HTIME (MIN)  ,5X,20H   UTM-X     UTM-Y    ,        MM   574
     1 5X.15HGRIO  SQUARE 10    )                                      MM   575
  13  FORMAT UHO,3X,F7.a,bX,2F10.2,5X,I10)                          '  MM   576
  14  FORMAT (10X.3F10.2, 110)                                         MM   577
      END                                                             MM   578
CORRECTIONS
1)   Before  MM 554 insert
         TTLAST =  TC  (K)

2)   After MM 554 insert

         IF(TTLAST.EQ.T(NPTS) GO TO  355
         XX =  P(1,NPTS)  +  UTMXOR
         YY=  P(2.NPTS)  + UTMYOR
         TI=  T(NPTS)
         WRITE (LOUT, 13)  TI,XX,YY, ITLAST
         IF(KPWIND.EQ.KYES)  WRITE (LPUNCH, 14)  TI,XX,YY, ITLAST

     355 CONTINUE

                                  C-13

-------
c


100



110


120



130
SUBROUTINE DATE(lOLDrMOVE,IKAY,NEW)

THIS SUBROUTINE CHANGES THE TIME AND DATE

DIMENSION IOLDC2),N£W(2)

lOLO(l)  OLD TIME  24 HOUR CLOCK
IOLO(2)  OLD DATE  YEAR-MONTH-DAY
MOVE     TIME INCREMENT
         POSITIVE  OR NEGATIVE APPLICATION OF THE INCREMENT
         NEW TIME  24 HOUR CLOCK
NEW(2)   NEW DATE  YEAR-MONTH-DAY

II s IOLD(1)/100
12 = IOLD(1)-100*I1
Jl = IOLO(2)/IOOOO
J2 *  10000*JI+100*K22+K2
RETURN
CONTINUE
IF (K2.LE.28) GO TO 110
K3 s K2-28
GO TO 100

CONTINUE
IF (K2.LE.30) GO TO 110
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
579
580
581
582
583
sea
585
586
58T
588
589
590
591
593
593
594
595
596
59T
598
599
600
601
602
603
604
605
606
60T
608
609
610
611
612
613
614
615
616
61T
618
fcl9
630
631
633
633
624
635
626
637
628
629
630
631
632
633
                                     C-14

-------
      Ka = 63
170   CONTINUE                                                          MM   664
      K3 x 30                                                           MM   665
      GO TO 160                                                         MM   666
180   CONTINUE                                                          MM   667
      Ka s aa                                                           MM   668
      GO TO 160                                                         MM   669
C                                                                       MM   670
      END                                                               MM   671
C                                                                       MM   673
      SUBROUTINE DIFFUS(STAB,ZHTf*KZ,USTAR)                             MM   673
C                                                                       MM   674
C-.- — THIS SUBROUTINE C»LCUL»TES THE VALUES OF KZ IN THE SURFACE     .   MM   675
C     LAYER USING THE FORMULATIONS OF BUSINSER.ET AL(1971).             MM   6T6
C                                                                       MM   677
      AKM«,35«USTAR*ZHT                                                 MM   678
   66 IF(STAB) 67,68,69                                                 MM   679
   67 AKZsAKN*((l.»15.*ZHT/STAB)**0.a5>                                 MM   680
      GO TO 70                                                          MM   681
   69 AKZ=AKN/(1.+4.7*ZHT/STAB>                                         MM   682
      60 TO 70                                                          MM   683
   68 CALL EXIT                                                         MM   684
   70 RETURN                                                            MM   685
                                      C-15

-------
      END                                                               MM   686
      FUNCTION OOTTY(A,B)                                               MM   687
C                                                                       MM   688
C RETURNS THE DOT PRODUCT OF VECTOR A AND VECTOR 8                      MM   689
C                                                                       MM   690
      DIMENSION A(3)iB(3)                                               MM   691
C                                                                       MM   692
      DOTTY • 0.0                                                       MM   693
                                                                        MM   694
      DO 100 I s 1,3                                                    MM   695
      DOTTY « A(I)*B(I)*DOTTY                                           MM   696
100   CONTINUE                                                          MM   697
      RETURN                                                            MM   698
      END                                                               MM   699
      FUNCTION OTIME(A)                                                 MM   700
O-.-.THIS FUNCTION CONVERTS TIME ON FROM HOURS AND MINUTES             MM   701
C     TO HOURS AND DECIMAL FRACTIONS OF AN HOUR,  FOR EXAMPLE,          MM   702
C     1130 IS CONVERTED TO 11.5.                                        MM   703
C                                                                       MM   704
      TIMEXBA*0.01                                                      MM   705
      DTIMEs(TIMEX-AINTCTIMEX))/0.6+AINT(TIMEX)                         MM   706
      RETURN                                                            MM   707
      END                                                  '             MM   708
      SUBROUTINE EDDY   CKPWIND)                                         MM   709
C                                                                       MM   710
C     THIS SUBROUTINE IS THE DRIVER FOR THE VERTICAL EDDY OIFFUS1VITY   MM   711
c     SUB-MODULE.                                                       MM   ?ia
C     0. GODOEN  1.25.78                                                MM   713
C                                                                       MM   71«
      DIMENSION   STOREC6), ZTIME(15),TEMP(201),TTMP(201),JKLASC15)     MM   715
      COMMON /INPUTS/ TITLE(aO),        JDATE(IO),          NCURV       MM   716
      COMMON /KZINPT/ NEEOKZ,           KZPRTX,             NUMSD,      MM   717
     1                TIMESD(3),        TEMP30(50,3),       ZELVSO(50,3)MM   718
     2    ,           TEMPSF(24),       NPTSDC3),           NKZDAT      MM   719
      COMMON/CELECT/CELHTS(5,I),NOHTS,NMES                              MM   730
      COMMON/TEMPHT/Z(50),ZZ(50),T(50),TT(50)                           MM   731
      COMMON/OIFOAT/DELTAT(30),STAB(30),ZMIX(30),USTAR(30),             MM   722
     »              UZZ(201),AKZC201)                                   MM   733
      COMMON/WINO/TIM£(100),VUOO),TH(100),NPTS                         MM   724
      COMMON/ORIGIN/UTMXOR.UTMYOR                                       MM   73b
      COMMON/TRAJ/TSTART,P(3,100),10(2,100)                             MM   726
      COMMON/PEVE/PE(2,24),VE(2«)                                       MM   727
      COMMON/CORIOL/F                                                   MM   738
      COMMON/fcHERE/STALAT.RLONG.TMZONE                                  MM   729
      DATA IYES/4HYES /                                                 MM   730
      DATA LOUT.LPUNCH  /6,1/                                           MM   731
                                     C-16

-------
   DATA ADVECT/0./                                                   MM   732
   DATA ZW/30./                                                      MM   733
   SUPER » -0.98                                                     MM   734
   ZSUP s 0.0                                                        MM   735
   SUP a 0.0                                                         MM   736
   CALL KZDATA(IERR)                                                 MM   737
   IFCIERR.LT.O) 60 TO 8000                                          MM   738
   I08U3 = IERR                                                      MM   739
   IKKU = 1                                                          MM   740
   C»LL UXYP03                                                       MM   741
   00 1000 ISD*1,NUMSO                                               MM   742
   ISOP1 * ISO + 1                                                   MM   743
   IF(ISD.EQ.NUMSO) 60 TO 10                                         MM   744
   SUP=CTEMPSO(2,ISDP1)-TEMPSD(1,ISOP1))/(ZECVSO(2,I3DP1)«ZELV3DC1,   MM   745
  1ISDP1))*100.                                                      MM   746
   IF(SUP.GE.SUPER) SO TO 10                                         MM   747
   SUPERsSUP                                                         MM   746
   ZSUP=ZELVSD(2fISDP1)«ZELV30(1,ISDP1)                              MM   749
10 IT = 1                                                              MM   750
   ZTIME(IT)sTIMESDCISO)                                             MM   751
   IF(STALAT.EO.O.) STALAT»35.                                       MM   758
   H»DL*T=ST*LAT*0.017453                                            MM   753
   Fsl,458aE»04oSIN(R»OL*T)                                          MM   754
   DH = 0,                                                             MM   755
   AKMIN*6,                                                          MM   756
                                                                     MM   757
   ZTIME(IT)sOTIME(ZTIME(IT))                                        MM   75S
   IN=IFIX(ZTIMECIT))+1                                              MM   759
   IFCZW.EO.O.) ZW*10.                                               MM   760
 2 CALL XMIT(NPTSO(ISO),ZELV80(liI30)iZ(D)                          MM   761
   CALL XMIT(NPT30(ISO),T£MPSO(1,I80),T(1))                          MM   762
   I.MAXSNPTSOUSD)                                                   MM   763
   TE"P(1)»T(1)                                                      MM   764
   TlSTsTEMP(l)                                                      MM   765
   UZ7(1)=0.                                                         MM   766
   TMAXsTEMPCl)                                                      MM   767
   ZMAXSO.                                                           MM   768
   STAELV=Z(1)                                                       MM   769
   00 5 I=1,LMAX                                                     MM   770
   Z(I)sZ(I)-STAELV                                                  MM   771
 5 CONTINUE                                                          MM   772
   LMAXMJSLMAX-1                                                     MM   773
 6 CALL XMITCLMAXMI,Z(2),ZZU))                                      MM   774
   CALL XMIT(LMAXM1,T(2),TT(1))                                      MM   775
   ZHIGHiZZ(LMAXMl)                                                  MM   776
   TLAPS*(TTC1)-T{1))*100./ZZ(1>                                     MM   777
20 nH=nH+10.                                                         MM   778
   NMAX=IFIX(ZHIGH/DH»0.5)»l                                         MM   779
   IF(NX*x.GT.201) 60 TO 20                                          MM   780
   DH01SDH*0.01                                                      MM   781
   L=l                                                               MM   782
   M=l                                                               MM   783
 9 IF(L.EO.LMAX) 60 TO 24                                            MM   784
   ZZ(M)*AINT(ZZ(L)/DH+0.5)*DH                                       MM   785
   IF(ZZ(M).EO.Z(M)> 60 TO 16                                        MM   786
                                       C-17

-------
    Z(M»l)sZZ(M)                                                       MM   787
    T(M»U«TT(L)                                                       MM   788
    L = LM                                                              MM   789
    M=M»1                                                              MM   790
    GO  TO  9                                                           MM   791
 16 L*L + 1                                                              MM   792
    GO  TO  9                                                           MM   793
 24 LMAXiM                                                            MM   794
    LMAXM1=LMAX-1                                                      MM   795
    CALL  XMIT(LMAXM1,Z(2),ZZ(D)                                       MM   796
    CALL  XMIT(LMAXM1,T(2),TT(1))                                       MM   797
    IFUSUP.EQ.O.)  ZSUP*Z(2)                                           MM   798
    CALL  SMOOTH(LMAX)                                                  MM   799
    IF tLMAX.GT.3l)   UMAX a 31                                          MM   800
    ZHIGH  = ZCL^AX)                                                    MM   801
    IFCZMTE.EO.O.)  ZNIT£»Z(2)                                         MM   802
    ZNITE=AMAX1(100..ZNITE)                                           MM   803
  7 DO  12  L=2«LMAX                                                     MM   804
    TPOT3TT(L-1)*.0098*ZZ(L»1)                                         MM   805
    IF(TPOT.LT.TMAX) GO TO 12                                          MM   806
    TMAXsTPOT                                                         MM   807
    ZMAXaZ(L)                                                         MM   808
 J2 CONTINUE                                                          MM   809
    IFCTLAPS.GE.-.98.0R.ZMAX.GT.O..OR.l.MA.X.L,E.2) 60 TO J4             MM   810
    TMAX=TC2)                                                         MM   811
    ZMAXSZC2)                                                         MM   812
    GO  TO  7                                                           MM   813
 14 Ns|                                                                MM   814
    AKZ(N)sAKMIN                                                       MM   815
    J=l                                                                MM   816
  1 DELT»T(J)*(TT(J)-T(J))«100./(ZZ(J)-Z(J))                           MM   817
107 ZHT=Z(J)                                                          MM   818
108 ZHT=ZHT+DH                                                        MM   819
                                                                      MM   820
    N=N+1                                                              MM   821
    TEMP(N)«TEMP(N-n*OELT»T(J)«OH01                                  MM   822
    IF(ZHT.GE.ZZ(J» GO TO 8                                          MM   823
    GO  TO  108                                                         MM   824
  8 IF(ZZ(J).GE.ZHIGH)  GO TO 21                                       MM   825
    J=J+1                                                              MM   826
    GO  TO  1                                                           MM   8H7
 21 NMSxrN                                                            MM   826
    IF(TLAPS.GT.-.98)  GO TO 33                                        MM   829
    bz\                                                                MM   830
    TT^P(N)=TEMP(N)                                                    MM   831
    r,0  TO  330                                                         MM   832
 —UPDATE SURFACE  TEMPERATURE AND WIND SPEED                         MM   833
 33 N=l                                                                MM   834
    J=l                                                                MM   835
    ZHT=0.                                                            MM   836
    IT=IT+1                                                           MM   837
    TSTOPsAINTCOTlME(TIME(NPT8)))                                     MM   638
    IF(ISD.EO.NUMSO) GO TO 30                                          MM   839
    TSTOP»AINT(DTIME(TIMESO(I80P1)))                                  MM   840
 30 ZTIME(IT)»(AINT(TIME(1)*0.01)+FLOAT(IT»2))                        MM   841
                                        C-18

-------
      IF(ISD.GT.l) ZTIME(lT)»AINT
-------
      r>ELTAT(J)s(TT(J)-T(jn*100./(ZZ(J)-ZU))                          MM   897
  250 CONTINUE                                                          MM   898
      IF(OELTATU).GT.DELT) DELTAT (1 )«OELT                              MM   899
      IFUT-2) 33,23,35                                                 MM   900
   22 MSNTHSCT + I                                                       MM   901
      UO = NM«X-MRSCT                                                    MM   902
      CALL XMir(Nn,TEMP(Nl),TTMP(Nl))                                    MM   90S
   23 CALL STADIF(ZW,ZO.USFC,ZHIGH,DH,AKMIN,I3KLASj)                     MM   904
      GO TO 29                                                          MM   905
C.....NEW SFC TE^P EQUAL TO LAST SFC TEMP                               MM   906
   35 IFUT.GT.2) GO TO 38                                              MM   907
      CALL XMlTtNMAXf TEMP(n,TTMP(U)                                    MM   908
   38 CALL STAOIF(ZW,ZO,USFC,ZHIGH,DH,AKMIN,I3KLAS)                     MM   909
      GO TO 29                                                          MM   910
O—.-NE* SFC TEMP LESS THAN LAST SFC  TEMP                              MM   911
   00 IF(DELTAT(n.LT..0.98.ANO.IT.OT.l> 60 TO 470                      MM   912
      T(1)»TTMP(1)                                                      MM   913
      DELTAT(l)s(T(Z)>T(l))«100./Z(2)                                    MM   911
      IF(DELTAT(1)»0.98) 45,45,44                                       MM   915
   44 1F(Z(2)-ZNITE) 440,45,450                                         MM   916
   45 N1»1FIX(ZZ(1)/DH)»1                                               MM   917
      00 400 N=2,N1                                                     MM   918
      TTMP(N)iTTMP(N-l)»OEUTAT(n*OH01                                  MM   919
  «00 CONTINUE                                                          MM   920
      IF(IT.GT.2) GO TO «8                                              MM   921
      NllsNl+i                                                          MM   922
      NO=\MAX-N1                                                        MM   923
      CALL XMH (NO,TEMP(N11),TTMP(N11))                                 MM   924
   48 CALL STADIF(ZN,ZO,USFC,ZHIGH,DH,AKMIN,ISKLA3)                     MM   925
      GO TO 29                                                          MM   926
  440 00 445 J=3,LMAX                                                   MM   927
      IFCZ(J)-ZNITE) 443,44J,«42                                        MM   928
  441 JSTAST»2                                                          MM   929
      GO TO 443                      .                                  MM   930
  442 NITE=IFIX(ZNITE/DH)»1                               .              MM   931
      T(2)=T£Mp(NITc)                                                   MM   932
      Z(2)sZNITE                                                        MM   933
      JSTART=3                                                          MM   934
  443 NO=L^AX-J»1                                                       MM   935
      CALL XMIT(NO,ZZ(J-n,Z(JST*RT))                                    MM   936
      C«LL XMIT(NO,TT(J-1).TUSTART))                                    MM   937
      NOsJ-JSTAHT                                                       MM   938
      JMAX=LMAX-NO»1                                                    MM   939
      CALL XMIT(-NO,O.,ZCJMAX))                                         MM   940
      CALL XMIT(-NO,0.,T(JMAX))                                         MM   941
      N(i = LMAX-l                                                         MM   942
      CALL XMITCNO,ZC2),ZZ(1))                                          MM   943
      CALL XMlT(NO.T(2)tTT(t))                                          MM   944
      LMAX:JMAX»1                                                       MM   945
                                                                        MM   946
      GO TO 446                                                         MM   947
  445 CONTINUE                                                          MM   948
  446 JMAX=LMAX-1                                                       MM   949
      00 449 I«1,JMAX                                                   MM   950
      OELTAT(I)«(TT(X).T(I))»100./(ZZ(I)-Z(I))                          MM   951
                                     C-20

-------
  «49 CONTINUE
      GO TO 45
  «50 T(2)iT(2)*.0098«(ZCZ)-ZNITE)
      Z(8)=ZNITE
      D£LTAT(n = (T(2)-T(l))*100./CZ(2)-Z(l)>
      DELT=DELTAT(2)
      OELTAT(e)=-.9B
      DO 455 Ms?, UMAX
      T(Mtl)=TT(M.l)
    STORE=DELTAT(M+1)
    DELTAT(M+l)sDELT
455 OELTSSTOHE
    CALL XMITUMAX,T(2),TT(1))
    CALL XMIT(LMAX,Z(2),ZZ(l))
    LMAXsLMAXtl
    GO TO 15
470 T2=T(1)+DELTAT(1)*ZSUP*0.01
U71 DELTAT(l)s(T2-TTMP(l))*100./ZSUP
    IF(DELTAT(1).GT.-0.98) 60 TO 40
    T(l)sTTMPU)
    CALL ST4DIF(ZW,ZO,U3FC,ZHI6H,DH,AKMIN,ISKLA8)
    GO TO 130
 29 CONTINUE
    CALL XMIT(NMAX,TTMP(l),TEMP(l))
130 CALL KEKLAY(LMAX,ZMAX,ZHIGH,AKMIN,DH)
890 IF(KZPRTX.NE.irES) 60 TO 301
    *RITE(LOUT,25) OH
    NOPTS*NMAX-1
    "HITECLOUT, 1260)
    NL = NOPTS/5
    NL2 s 2»NL
    NL3 « 3*NL
    NL« * <*«NL
             MOOCNOPT8.5)
       100 1=1, ML
100
94
95
      oo
           I»NL
           I+NL2
           I + NL3
    13
    14
    15
    ZI s DH«FLOAT(I)
    ZI2 = OH*FLOAT(I2)
    ZI3 * OM*FLOAT(I3)
    ZI4 * DH*FLOATU4)
    ZI5 = DH«FLOATU5)
    WRITE(LOUT,28) ZI ,AKZ(1 + 1),ZI2,AKZ(12 + 1),ZI3,AKZ(13*1),
   1                            ZI4,AKZ(I4+1),ZI5,AKZ(I5+1)
    CONTINUE
    IF(NTHUNC.EO.O)   GO TO 95
    15 * 15 + 1
    00 94 I «I5,NOPTS
    ZI f DH«FLOAT(I5)
    15 = 15 » 1
    *RITE(LOUT,1250) ZI,  AKZ(I+1)
    CONTINUE
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
952
955
95«
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
97«
975
976
977
978
979
980
981
982
983
98«
985
986
987
986
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
                                       C-21

-------
      NOHP1 s NOHTS » 1
      wRIT£(LOUT,1190)
      WRITE(LOUT,1210)  CIG, IGal,NOHP1)
      WRITEUOUT,1220)
  301 IFUKKL.NE.l)  GO  TO 302
      CALL NErtPAG(TITLE,0,IOATE)
      NOHP1 s NOHTS + 1
      W»ITEUOUT,1190)
                         (CELHTSCIG,1),I6«1,NOHTS)
      *RITE(LOUT,1210)    (IG,16*1,NOHP1)
      KRITE(LOUT,1220)
302   ITPP s IFIX(ZTIMEUT) * 1)
      CALL CELAVG(OH,NOHTS,CELHTS(1,1),AKZ,NMAX,STOHE)
      TJJJ s ZTIME(IT)*100.
      ftRITE(LOUT,1230)  TJJ J, TEMPSF (ITPP), ISKLAS, (STORE (IG), IG«1 ,NOHP1)
      TJJJ s ,60*TJJJ
      IF(KPMND.EG,IYES)
     1   WRITE(LPUNCH,12«0) IKKL,TJJJ,(STORE(16),IG*1,NOHP1)
      IKLAS(IKKL) > ISKLAS
      IKKL s IKKL * i

      IF(ZTIME(IT).6E.T8TOP) 60 TO 1000
      GO TO 33
 1000 CONTINUE
      CALL NEWPAG(T1TLE,0,JOATE)
      IKKL s IKKL » i
      TMINXX = IFIX(TIME(1))*,60
      DO 1005 KK « 1,IKKL
      IF(KPWIND.EQ.IYES) WRITE(LPUNCH,1001) TMINXX, IKLAS(KK)
      TMINXX s TMINXX + 60.0
 1005 CONTINUE
      RETURN
 2000 MRITE(LOUT,2001)
      W(?ITE(LOUT,2002)  IERR
      STOP
  25  FORMAT(1HO,33H VERTICAL EODY OIFFUSIVITY EVERY ,F3.0,8H METERS
   26 FORMAT(lHO,3X,6HHEIGHT,6X,5HDT/OZ,7X,5Hnu/OZ,7X,lHA,14X,lHL,8X,
     15HUST»R,4X,6HMIX HT./22H   (METERS)   (C/1 COM),5X,7H(I/SEC),18X,
     2flH(METERS),3X,17H(M/SEC)  (METERS))
  28  FORM»T(1H  ,5X,5(F6,0,F9.1,5X))
   39 FORMAT(1HO,15X,4HTIME,2X,F4.0,6HOO LST)
 1001 FORMAT(25H TIME AND STABILITY CLASS   ,15X,F10,1,110)
1190  FORMAT(1HO,7X,70HAVERAGE DIFFUSION COEFFICIENTS FOR THE CHEMICAL/OMM
     IIFFUSION MODULE                 /)
1200  FORM»T(1HO,7X,22HMESH POINT ELEVATIONS ,15X,5F10.0, 5X, 6HMETERS/ ) MM
1210  FO«MAT(lHO,7X,itHTlM£,5X,7HSURFACE,5X,9HSTABILlTY,8X,6(2HKZ,Il,TX))MM
1220  FORMATdH  , 1 «X , 11HTEMPERATURE, 5X, 5HCLASS, 30X, HH (M»*3/MIN)  )
1230  FORM»T(1HO,7X,F«.0,6X,F5.1,9X,I2,5X,6F10.0)
1240  FORMATU4H OIFFUSIVITIES  , 12, 4X ,F10. 1,1 OX, 3F10.1,/,20X ,3F10.1)
1250  FORMATOH  ,85X,Ffa.O,F9, 1)
1260  FORMAT(1HO,6X,5(6HHEIGHT,SX,2HKZ,7X)/8X5(tSH(M)   (M**2/MIN),4X)/)MM
 2001 FOttMAT(lH0.69HERROR IN SUBROUTINE KZOATA WHICH READS IN DATA NEEDEMM
     10 TO CALCULATE KZ)
 2002 FORMATdH  ,5HIERR»,I«)
      END
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
) MM
MM
MM
MM
MM
MM
MM
/OMM
MM
) MM
))MM
MM
MM
MM
MM
/)MM
DEMM
MM
MM
MM
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1023
1023
1024
102S
1026
1027
1028
102<»
1030
1031
1032
1033
1034
1035
1036
1037
1036
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
10S3
1054
1055
1056
1057
1058
1059
1060
1061
                                        C-22

-------
100
c
c
c
110
SUBROUTINE EDGE (X,Y,ITF,IEOGE)

•FOG£« CHECKS WHETHER NEW POINT IS OUTSIDE THE MODELING REGION

COMMON /GRID/ XI,  X2, Yl. Y2, NX,  NY,  DEUX,  DELY,  CELT
DMA IONE/1/
DATA BUFZON /J5./

Xrt » XI - BUFZON
XE s X2 + BUFZON
Y3 » Yl • 8UFZON
YN s Y2 + BUFZON

IF (X.LT.XW) 60 TO 100
IF (X.GT.XE) GO TO 100
IF (Y.LT.YS) 60 TO 100
IF (Y.6T.YN) GO TO 100

    POINT 18 OK

IEOGE = 0
GO TO 110
CONTINUE

    POINT IS OUTSIDE GRID + BUFFER ZONE

IEOGE » ISIGN(IONE.ITF)
RETURN

END
                                        MM   1062
                                        MM   1063
                                        MM   1064
                                        MM   1065
                                        MM   1066
                                        MM
                                        MM
                                        MM
                                        MM
                                        MM   1071
                                        MM   1072
                                            1073
                                            1074
                                                                            1067
                                                                            1068
                                                                            1069
                                                                            1070
                                                                            1075
MM
MM
MM
MM  1076
MM  1077
    1078
    1079
                                                                        MM
                                                                        MM
                                                                        MM  1080
                                                                        MM  1081
                                                                            1062
                                                                            1083
                                        MM
                                        MM
                                        MM  1084
                                        MM  1085
                                        MM  1086
                                        MM  1087
                                        MM  108A
                                        MM  1089
                                        MM  1090
                                        MM  1091
      SUBROUTINE EXTRP CIHOUR, ARY, VAL)
       EXTRP SELECTS A VALUE OUT OF A 24-WORD ARRAY.  IF THE VALUE
       SOUGHT IS MISSING (INDICATED 8Y A NEGATIVE ENTRY),  EXTRP
       WILL ATTEMPT TO FILL THE GAP BY INTERPOLATION OR EXTRAPOLATION.
      IHOUR
      ARY
      VAL
             CLOCK TIME ON A 24 HOUR BASIS
             ARRAY OF 24 VALUES  (WIND OR VELOCITY)
             VALUE SELECTED
      MISSING DATA SITUATIONS HANDLED BY EXTRP
            1-3  1-2
      CASE
       0
       1
       2
       3
       4
       5
       6
      DIMENSION ARY(J4)
                1-1
                 X
                 X
                 X
1*1
 X
                                     1*2  1*3
                                        MM  1092
                                        MM  1093
                                        MM  1094
                                            109S
                                            1096
                                            109T
                                            1098
                                            1099
                                            1100
                                            1101
MM
MM
MM
MM
MM
MM
MM
MM  1102
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
1103
1104
1105
1106
1107
1108
1109
1110
mi
1112
1113

-------
      IPICK » IHOUR/100*!
      IF (IPICK.GT.34) IPICK « IPICK»2«
      VAL = ARY(IPICK)
      IF (VAL.GE.O.) RETURN
C
C ENTRY MISSING. MUST TRY TO GET VALUE BY INTERPO.
C IS THERE A VALUE ON BOTH SIDES
      VAL * -1.
      IF (IPICK.EO.l) GO TO 100
      IF (IPICK.E0.24) GO TO 130
      IF (ARY(IPICK-l).LT.O.) GO TO 160
      IF (ARYUPICK + D.LT.O.) GO TO 190
C
C CASE 0
C
      VAL « 0.5«(ARY(IP1CK"1)*ARY(IPICK»1))
      RETURN
C
C WE ARE AT THE FIRST POINT
100   CONTINUE
      IF (ARY(2).LT.O.) GO TO 110
      IF (ARY(S).LT.O.) GO TO 120
      VAL = ARY(2)-(ARYC3)-ARY(2))
      GO TO 220
110   CONTINUE
      IF (ARY(3).LT.O..OR.ARY(
      60 TO 220
120   CONTINUE
      IF (ARY(4).LT.O.) RETURN
      ARY(3) * 0,5*(ARY(Z)+ARY(4))
      GO TO 100
C
C hE ARE «T THE LAST POINT
ISO   CONTINUE
      IF (ARY(23).LT.O.) GO TO 110
      IF (ARY(22).LT.O.) GO TO ISO
      VAL a ARr(23)+ARY(23)«ARY(22)

      GO TO 220
140   CONTINUE
      IF (AWY(22).LT.O.,OR.ARY(21).LT.O.) RETURN
      VAL a ARY(22)»2.*(ARY(22)-ARY(21))
      GO TO 220
150   CONTINUE
      IF (ARY(21).LT.O.) RETURN
      ARY(22) s 0.5*(ARY(21)+ARY(23))
      GO TO 130
160   CONTINUE
      IF (ARY(IPICK+1).LT.O.) GO TO 160
      If (IPICK+2.GT.24) GO TO 180
      IF (ARY(IPICK+2).LT.O.) GO TO 170
C
C CASE 4
                      MM  1110
                      MM  1115
                      MM  1116
                      MM  HIT
                      MM  1116
                      MM  1119
ATION OR EXTRAPOLATIONMM  1120
                      MM  1121
                      MM  1122
                      MM  1123
                      MM  1124
                      MM  1125
                      MM  1126
                      MM  1127
                      MM  1128
                      MM  H29
                      MM  1130
                      MM  1131
                      MM  1132
                      MM  1133
                      MM  1134
                      MM  U35
                      MM  1136
                      MM  1137
                      MM  1138
                      MM  H39
                      MM  1140
                      MM  1141
                      MM  1142
                      MM  1143
                      MM  1144
                      MM  1145
                      MM  1146
                      MM  1147
                      MM  1148
                      MM  1149
                      MM  1150
                      MM  1151
                      MM  1152
                      MM  1153
                      MM  1154
                      MM  1155
                      MM  1156
                      MM  1157
                      MM  1158
                      MM  1159
                      MM  1160
                      MM  1161
                      MM  1162
                      MM  1163
                      MM  1164
                      MM  1165
                      MM  1166
                      MM  1167
                      MM  1168
                                      C-24

-------
      VAL - ARYnPICK+l)«(ARY(IPICK»2)-AHY(IPlCK*n)
      GO TO 230
170   CONTINUE
      IF (IPICK+3.GT.24) GO TO 180
      IF 
-------
      FUNCTION FULC.OLCA.ZO)
C.-.--THIS FUNCTION COMPUTES
      COLDER'
      1/L.
                             1/L FROM THE FULLE PARAMETER A USING
S CONVERSIONS FROM STABILITY CATEGORIES TO VALUES OF
      IF(A.GT.S.O) GO TO 101
      SLOPEiO.0156-0.0072*(A"7.)
      XL=0.0540*(A.6,33)*SLOPE*ALOG(2.*ZO)
      IF(XL.GT.-O.OOJ) XLs-0.003
      GO TO 107
  101 IF(A.GT.8.75) 60 TO 102
      SLOPE=0,00ft4-0,0085*(A-8.)
      XL=0.0213*(A.e.84)+SLOPE*ALOG(2.*ZO)
      IF(XL.GT.-0.0001) XL=-0.0001
      GO TO 107
  102 IF (A.GT.<).02) GO TO 103
      SLOPE30.0019-0.0070*(A-8.75)
      XL=0,007a*(A-9.02)»SLOPE*ALOG(2.*ZO)
      IFCXL.GT.-0.00001) XL*-0.00001
      GO TO 107
  103 IFtA.GT.9.5) GO TO 10M
      SLOPE=-0.0039*(A-9.02)
      XL=0.n031*(A.9.02)»SLOPE*ALOG(2.*ZO)
      IF(XL.LT.0.00001) XL*0.00001
      GO TO 107
  104 IF(A.GT.11,25) GO TO 105
      SLOPE=-0.0014-0.0040*(A-9.5)
      XL=0.0083*(A-9,32)+SLOPE*ALOG(2.*ZO)
      IF(XL.LT. 0.0001) XL»O.OOOl
      GO TO 107
  105 IFU.GT.12.375) GO TO 106
      SLOPEs-0.0084-0.0069*(A-l1.25)
      XLiO.OOa3*(«.'9.32)»SLOPE*AL06C2.*ZO)
      IF(XL.LT.O.OO«) XL»O.OOa
      GO TO 107
  106 SLOPEE-0.0163-0.0069*(A-12.375)
      XL=0.0083*(A»9.32)+SLOPE*ALOG(2.*ZO)
      IFCXL.LT.0.00667) XU«0.00667
  107 FULGOL=XL
      KETURlj
      SUBROUTINE GETAZV(KOLD.ID.XS,YS.NC,AZVtNGOoo.oois)

      THIS SUBROUTINE RETRIEVES MEASUREMENT RECORDS FROM
      CLOSE STATIONS.

      KOLD(l)  - TIME - 24 HOUR CLOCK
      KOLOC2)  DATE - YEAR-MONTH-DAY
      10       STATION ID (IF ANY)
      XS       X COORDINATE OF POSITION
      YS       Y COORDINATE OF POSITION
      NC       NUMBER OF CLOSEST STATIONS TO USE
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
U30
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1350
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
126S
1266
1267
1268
1269
1270
                                     C-26

-------
c
c
c
c
c
c



















c
AZV(l) AZIMUTH
AZV(2) VELOCITY
AZV(3) NUMBER OF DIGITAL HIND POINTS
AZV(«) NAME OF CLOSEST POINT
NGOOO NUMBER OF POINTS ACTUALLY FOUND TO BE GOOD
001S DISTANCE TO POINTS FOUND
DIMENSION KOLD(2) rAZVU2)
DI"ENSION PT(2E AT A STATION
IF (10(1). EO. IBLK) 60 TO 170

YES GET THE STATION DATA
DO 110 I B l.NFILES
IF (KOLD(2).EQ.IDATE(D) 60 TO 130
CONTINUE
CONTINUE
MM
MM
MM
MM
MM
MM
MM
MM
1271
1272
1273
127«
1275
1276
1277
1278
1??9
1280
1281
1282
1283
1280
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1301
1305
1306
1107
1308
1309
1310
1311
1312
1313
I3ia
1315
1316
1317
1316
1319
1320
1321
1322
1323
1320
1325
C-27

-------
      NGOOD = 0
130
140
C
c
144
145
C
c
C
148

149
150


C
                    KOLOC2)
CONTINUE
1C = 0
IF = IFILE « I
IF(INCO«.EO,IOATE(I))  60 TO 145
REWIND IF
CONTINUE
1C = IC-M
IFUC.GT.ICT(I)) GO TO 144
REAO (IF) N*DTE,NAM,APT,PT,XIMPH
Mv.D»T» (1 ,IC) • NWDTE
NWDATA(2,IC) « NAM(l)
NKOATA(3,IC) e NAM(2)
AftOATA(4, 1C) « APT

CALL XMIT(24,PT,AWDATA(5,IC))
CALL X*IT(24,XIMPH,AHDATA(29,1C))
GO TO 140
INCOR » IDATE(I)
CONTINUE

SEARCH FOR STATION

M s ICT(I)
DO 148 K > 1,M
NAM(l) s NWOATA(2,K)
NAH(2) a N*»OATA(3,K)
IF(IOU).EQ.NAM(1).AND.ID(2).EQ.NAM(2))  60  TO  149
CONTINUE
GO TO 150
CONTINUE
CALL XMIT(24,AHOATA(5,K),PT)
CALL XMIT(24,AWOATA(29,K)«XIMPH)
APT = AnOATA(4,K)

wE HAVE FOUND THE DATA, NOW EXTRAPOLATE  IF  NECESSARY
CALL EXT»P(KOLD,PT,AZVC1»
IF (AZV(l).LT.O.) GO TO 160
CALL EXTHP(KOLD,XIMPH,AZVC2))
IF (AZV(2).LT.O.) GO TO 160
A2V(3) s APT
NGOOD » 1
DDIS(l) a  .00000001
   FOR ST. LOUIS USE 10(2)  NOT   10(1)
KO = 10(2)
AZVC4) c XID
RETURN
CONTINUE
ftRITECLOUT,2) ID,KOLO(2)
GO TO 170
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
1326
1337
1338
1339
1330
1331
1332
1333
1334
1335
1336
1337
1318
1339
1310
1341
1342
1343
1344
134S
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1378
1373
1374
1375
1376
1377
1378
1379
1380
                                      C-28

-------
C DATA RECORDS HIVE GAPS, TRY NEIGHBORING STATION(S)                    MM  1381
160   CONTINUE                                                          MM  1382
      *R1T£(LOUT,3) ID.KOLD                                             MM  1383
C                                                                       MM  1384
C ORDER THE STATIONS »NO CHECK THEIR DATA                               MM  1385
170   CONTINUE                                                          MM  1386
      CAUL WSECLS(X3,YS,OIS,1DI3)                                       MM  1387
      KCT =0                                                           MM  1388
      NGOOD a 0                                                         MM  1389
180   CONTINUE                                                          MM  1390
      IF (NGOOD.CQ.NC) GO TO 2«0                                        MM  J391
      KCT s KCT«l                                                       MM  1392
      IF CKCT.GT.NUMSTA) GO TO 240                                      MM  1393
      KUSE = IOIS(KCT)                                                  MM  1394
      NAME(l) « IST»NS(1,KU3E)                                          MM  1395
      NAM£(2) « ISTANS(2,KUSE)                                          MM  1396
      00 190 Isl.NFILES                                                 MM  1397
      IF (KOLO(2).EQ.IOATEd)) 60 TO 200                                MM  1398
190   CONTINUE                                                          MM  J399
      GO TO 120                                                         MM  1400
BOO   CONTINUE                                                          MM  1401
C                                                                       MM  1402
C         *»«*«*•**•  FOR ST. LOUIS ONLY  **««*K«*«*«««*»*»»«******«*««»MM  1403
C                                                                       MM  1404
                                                                        MM  140S
C         REMOVE CARDS BETWEEN THESE LINES FOR OTHER CITIES             MM  1406
      1=1.                                                        MM  1407
      GO TO 215                                                         MM  1408
 205  CONTINUE                                                          MM  1409
C                                                                       MM  1410
C         ***«•»•*«*»»••*****»•*«*«****»****»*»•***»»***•»•*»«»»**»«•*««MM  1411
      1C s 0                                                            MM  1412
      IF » IFILE + I                                                    MM  1413
      IFtlNCOR.EQ.IDATE(I)) GO TO 215                                   MM  1414
      REftlNfl IF                                                         MM  1415
210   CONTINUE                                                          MM  1416
      1C = 1C * 1                                                       MM  1417
        IFdC.GT.ICTd)) GO TO 214                                      MM  1418
      READ (IF) NKDTE,NAM,APT,PT,XIMPH                                  MM  1419
      NAUATA(1,IC) * NWDTE                                              MM  1420
      N*OATA[2,IC) « NAM(l)                                             MM  1421
      N*DATA(3,K) = NAM(2)                                             MM  1422
      »/«DATA(4,IC) = APT                                                MM  1423
      CALL XMIT(24,PT,AWOATA(5,IO)                                     MM  1424
      CALL XMIT(24,XIMPH,AWOATA(29,IO)                                 MM  1425
      GO TO 210                                                         MM  1426
C                                                                       MM  1«27
214   INCOH • IDATEd)                                                  MM  1428
215   CONTINUE                                                          MM  1429
C                                                                       MM  1430
C     SEARCH FOR STATION                                                MM  1431
C                                                                       MM  1432
      M = ICTd)                                                        MM  1433
      DO 217 K * 1,M                                                    MM  1434
      NAM(t)  s NWOATAC2.K)                                              MM  1435
                                      C-29

-------

230

240
C
C
C
GO TO 180
CONTINUE
NGOOO = I
CONTINUE

CHECK WHETHER

.




DISTANCES ARE EQUAL TO ZERO

               NWDATA(3,K)                                               MM  1436
      IFCN»MEU).EG.NAM(n.AND.NAME(2).Ea.NAM(2)) GO TO 220             MM  1437
217   CONTINUE                                                          MM  i«38
      GO TO ISO                                                         MM  1439
220   CONTINUE                                                          MM  1440
      APT e AWDATA(4.K)                                                 MM  1441
      CALL XMITC24, AWDATA(5,K),PT)                                      MM  1442
      CALL XMITC24,AWDATA(29,K),XIMPH)                                   MM  1443
C                                                                       MM  1404
      CALL EXTRP(KOLD,PT,ZAZ)                                           MM  1445
      IF CZAZ.LT.O.) 60 TO 180                                          MM  1446
      CALL EXTRP(KOLD,XIMPH,VELL)                                       MM  14«T
      IF CVELL.LT.O.) GO TO 180                                         MM  14«8
      AZV(4*f.GOOD + l) * ZAZ                                              MM  1449
      AZV(4*NGOOD»2) » VELL                                             MM  1430
      *ZV(«*NGOOD»3) » APT                                              MM  1451
      KO = NAM(2)                                                       MM  l«52
      AZV(4*NGOOO»4) > XID                                              MM  1453
      OOIS(NGOOD + 1) s SQfJT(DIStKCT))                                    MM  1454
      IF (DIS(KCT).LE.RMIN) 60 TO 830                                   MM  1455
      IF (OIS(KCT).GT.RMAX) 60 TO 240                                   MM  1456
C                                                                       MM  1457
C PERFORM ANGLE TEST                                                    MM  1458
      CALL ANGTST(XS,YS,NGOOD,KU8E,OK)                                   MM  1459
      IF (OK.LT.O.) GO TO ISO                                           MM  1460
C                                                                       MM  1461
C PERFORM THE BARRIER TEST                                              MM  1462
      XT = SSTAN(1,KUSE)                                                MM  1463
      YT = 3STANC2.KUSE)                                                MM  1464
      CALL BARIER(XT,YT,XS,YS,OK)                                       MM  1465
      IF (OK.LT.O.) 60 TO 180                                           MM  1466
      NGOOO * NGOOO*!                                              '     MM  1467
                                                                        MM  14(<8
                                                                        MM  1469
                                                                        MM  1470
                                                                        MM  1471
                                                                        MM  1472
                                                                        MM  1473
                                                                        MM  1474
                                                                        MM  1475
      IF(NGOOD.EQ.O) RETURN                                             MM  1476
      iFtoomn.eo.o.) ooistn » I.OE-S                                MM  1477
      IF(NSOOD.EO.n RETURN                                             MM  1478
      00 250  I * 2rNGOOO                                                MM  1479
      IF(ODIS(I).NE.O.) GO TO 250                                       MM  1480
      «RITECLOUT,4) XS.YS                                               MM  1481
      STOP                                                              MM  1482
250   CONTINUE                                                          MM  1493
      RETURN                                                            MM  1464
1     FORMAT  (//,33H GETAZV CANT FIND DATE FILE  FOR  ,16,               MM  1485
     1           22H   IN WIND DATA  TABLES.,//)                          MM  1486
2     FORMAT  (/,54H GETAZV CANT FIND MIND DATA FOR THIS STATION AND DATEMM  1487
     1.  ,2X,A4.A4,2X,I6,/,32H WILL  CHECK NEAREST NEIGHBOR(S).,/)        MM  1488
3     FORMAT  (/,51H INCOMPLETE DATA PREVENTS USE OF THIS STATION DATA., MM  1489
     1   2X,A4,A4,2X,I6,2X,I6,/,30H  MUST USE NEAREST NEIGHBOR(S).,/)     MM  1490
                                     C-30

-------
 FORMAT  tlHO,2X,33HMULT!PLE WIND STATIONS FOUND AT C,F8.2,1H,,      MM  1491
1        F«.2,15H).  JOB ABORTED.)                                  MM  1492
 END                                                              MM  1493
SUBROUTINE GETCON (KNEW, NC, IRF)

GETCON FINOS THE 'NC' CLOSEST STATIONS WITH DATA FOR EACH
VARIABLE IN THE AIR QUALITY DATA ARRAY (CON) AND
DETERMINES THE INTERPOLATED VALUES.

DIMENSION KNEW(2), IDDC2), ISTUSE (3, 1 0) , ACON(4,10),
1IWOHK(25), WORK(25), R(3), W(3) > DISTC3)
COMMON /AIRQAL/ NEEDAQ, NOSPEC, CONAMUO), CON(24, 25,10)
COMMON /INPUTS/ TITLEC20), JOATEC10)f NCURV
COMMON /KZ1NPT/ NEEDKZ, KZPRTX, NUM30,
MM 1494
MM 1495
MM 1496
MM 1497
MM 1498
MM 1499
MM 1500
MM 1501
MM 1502
MM 1503
MM 1504
t TIMESD(3), TEMPSO(50,3), ZELVSD(50,3)MM 1505
2 , TEMPSF(24), NPTSO(J) , NKZDAT
COMMON /REUSE/ KPSTAT, KPWOAT, CONVRT, KXTRA, KPWIND
COMMON /KOATA/ NUMSTA, SSTANC2.25), ISTAN3(2»2S) , RMIN, RMAX
COMMON /WINFLD/ *WDATA(52,25) ,DISAVEC25), IDSAVEC2S)
EQUIVALENCE (WORK.IWORK)
INtEGER ATSTAT
DATA LOUT /6/
DATA IYES /4HYES /
DATA NONE /4HNONE/
M s NOSPEC
IHR « KNEW(l)
NCP » NC * I

Ml « N*4
CALL XMIT(-N1,-1.00«ACON)
HI r Nl« N
CALL XMIT(-M, NONE, ISTUSE)

ATSTAT s NONE
IF(OISAVE(1).6T. RMIN) GO TO 90
ATSTAT = IYES
KD t IOSAVEO)
CO'JHNUE
00 300 JS « 1,N
KSUC * 0

KTRY z 0
IF(ATSTAT.NE.IYES) GO TO 100
THE TRAJECTORY IS AT A STATION
CALL XMIT (24,CONU,KO, JS),WORK)
CALL EXT«P CIHR,WORK,VAL)
IF (VAL.LT.O.) GO TO 100
INTERPOLATION OF DATA FROM OTHER STATIONS IS UNNECESSARY.
ISTUSE(l.JS) B ISTANS(2«KD)
ACON(1,JS) B VAL
ACON(NCPiJS) * VAL
GO TO 300
MM 1506
MM 1507
MM 1508
MM 1509
MM 1510
MM 1511
MM 1512
MM 1513
MM 1514
MM 1515
MM 1516
MM 1517
MM 1518
MM 1519
MM 1520
MM 1521
MM 1522
MM 1523
MM 1524
MM 1525
MM 1526
MM 1527
MM 1528
MM 1529
MM 1530
MM 1531
MM 1532
MM 1533
MM 1534
MM 1535
MM 1536
MM 1537
MM 1536
MM 1539
MM 1540
MM 1541
MM 1542
                                  C-31

-------
100

HO
120
130
200

210
220
230
     CONTINUE
     FIND  AND  CHECK  DATA FROM CLOSEST STATIONS,
     KTWY  s  KT*Y  +  1
     IF(KTRY.GT.NUMSTA) GO  TO 120
     IF (DISAVE(KTRY)  .C.T. RMAX)  GO TO  130
     KT  s  lOSAVC(KTRY)
     CALL  XM1T124,  CONU.KT.JS), WORK )
     CALL  tXTRP  (JHR, WORK , VAL)
     IFCVAL.LT.0.0)   60 TO  110
     KSUC  s  KSUC  *  1
     ISTUSECKSUC.JS)  * ISTANS(2,KT)
     ACON(KSUC,JS)  £  VAL
     DI3TCKSUC)  s SQRT( OISAVE(KTRY)  )
     IF  (KSUC.UT. NO  60 TO  110
     KTRY  =  MINO(KTRY.NUMSTA)
     CONTINUE
     IF(KSUC.LT.l)   SO TO JOO

        NOW INTERPOLATE THE  VALUES FROM  THE CLOSEST  STATIONS

     SUMS  x  o.O
     00  220   1=1, KSUC
     IFCIRF.EQ.  2)   60 TO 200
     N(I)  *  l./DISTd)
     60  TO 210
     R(I)  s  l./(OIST(n*»2>

     SU"R  *  SIIMR +  RCI)
     CONTINUE
           =  0.0
      DO  230  I  *  1,K3UC
      1(11  =  R(I)/SUMR
      SUMrt  s  SUMM >  ACON(IrJS)»WU)
      CONTINUE
      ACON(NCP,JS) > SUMN
  300  CONTINUE
^

      IF(KXTRA.NE.IYES)    60 TO «10
      RS  : SORT(RMAX)
      00  ISO I  > l.NUMSTA
      J = IOSAVECI)
      IwORK(I)  « ISTAN3(2,J)
      DISAVE(I)  s 30RT(  DISAVE(D)
      IF(DI3AVECI).6T.RS)   GO TO 360
  350  CONTINUE
 360   KTHYM a I  - 1
        WRITE  STATION VALUES AND  INTERPOLATED  VALUES ON FILE.
MM
MM
MM
MM
MM
    1513
    1544
    1545
    1546
    1547
MM  1548
MM  1549
MM  1550
MM  1551
MM  1552
MM  1553
MM  1554
MM  1555
MM
MM
MM
                                                                      MM
      hRITE(LOUT,l)  KNEW(l),
      WRITE(LOUT,2)  KNEW(2)i
                            ( IMORK(I),I»1>KTRYM)
                            (OISAVEU),I>lrKTRYM)
    1556
    1557
    1558
    1559
MM  1560
MM  15bl
MM  1562
MM  1563
MM  1564
MM  1565
MM  1566
MM  1567
MM  1568
MM  1569
MM  15TO
MM  1571
MM  1572
MM  1573
MM  1574
MM  1575
MM  1576
MM  1577
MM  1578
MM  1579
MM  1580
MM  1581
MM  1582
MM
MM
MM
MM  1586
MM  1587
MM  1588
MM  1589
MM  1590
MM  1591
MM
MM
MM
MM
                                                                          1583
                                                                          1584
                                                                          1585
MM
MM
    1592
    1593
    1594
    1595
    1596
    1597
                                        C-32

-------
     *RITE(LOUT,3)   (K,K«1,NC)
     00 «00  JS * 1»N
     *HITECLOUT,4) CONAM(JS), (ACONd, JS) , ISTUSE (Ii JS) ,
    1   »CON(NCP»JS)
 400 CONTINUE
     GO TO 430
410  CONTINUE
     *RITE(LOUT,5)  KNEW
     .vRITf (LOllT.b) (CONAMCJ), ACONCNCP, J) » J*l ,N)
420  CONTINUE
     Nl s 2«RMAX
     CALL XMm.NUMSTA,NI,01SAVE)
     CALL XMIT(-NUMSTA, 0,IDSAVE)
     IHR r KNEWUJ/100 * 1
     TE«PSF(IHR) i ACON(NCP,1)
     RETURN
                                                          l ,NC)
                                                           4X,
     FOHMATUH ,/,3X,6HTIME »t16,5X,16HSTATION NUMBERS  i
    1 5(2X,A4),/,4(40X,2X,A4,2X,A4,2X,A4,2X,A4,2X,A4,/))
     FORMATUH ,/,3X,6HDATE ». 17, 4X, 16HDISTANCES (KM)   ,4X,5F6.2,/,
    1    «(40X,5F6.2,/))
     FORMAT UHO, JX.9HVARIABLES , 3(5X, 1HX, 11111H   (STAT)    ),
    1  14HX-INTERPOLATEO  )
     FORMtTUH ,4X,A4,4X,3(E9.2f2H (,A4,3H)   ),3X,E11.4 )
     FORMAT (1HO,4X>6HTIME «» I5,5X,6HDATE « , I7,//,5X,
    1  31HVARIABLE     INTERPOLATED VALUE   )
     FORMAT UHO,7X,A4,10X,E12.4,//,9(eX,A4»10X,E12.4,//))
     END
      SUBROUTINE JULIAN UDATE,JULDAT)
c
C****»»********»»»»******    ST. LOUIS ONLY
C
                                             ****»*********************MM
  to
        THIS SUBROUTINE CONVERTS A 6-INTE6ER DATE (YR-MO-DAY) IN TO
        A JULIAN OATE......JULOAT(l)eDAY....,...,JULOAT(2)«YEAR

      DIMENSION MD(ll) ,  JULOAT(2)
      DATA MO /31,a8,31,30,31,30,31,31,30,31»30/

      IY = IOATE/10000
      IM > (IOATE » IY*10000)/100
      ID = IOATE • IY*10000 • IM»100

        CHECK FOR LEAP YEARS

      NL = Mno(IY,4)
      IF(NL.LT. 1)   M0(2) • 29

      ISU"> a 0
      IM = IM - 1
      DO 10 J a l,IM
      ISUM « ISUM » MDtJ)
      CONTINUE
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
iMM
MM
MM
MM
HIM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
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
1687
1626
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1646
1649

-------
      JULDATC1)
      JULOAT(2)

      RETURN
      END
13UM
1900
ID
IY
MM  J650
MM  1651
MM  1652
MM  1653
MM  1654
      SUBROUTINE KEKLAY(LMAX,ZMAX,ZHIGH,AKMIN,DH)
C.....THI3 SUBROUTINE DETERMINES THE VALUES OF KZ IN THE EKMAN LAYER
      IN THE BANNER SUGGESTED BY 0'BRIEN(1«)TO) .

      COMMOf./DIFDAT/OElTAT(30),STA6(30),ZMIX(30),USTAR(30),
     *              UZZ(201),AKZ(20l)
      COMKPN/TEMPHT/Z(50),ZZ(50),T(50),TT(50)
      00 229 JS2.LMAX
      ZHT=ZCJ-1)
      ZB=0.10«7MIX(J-l)
      DZ8=ZHIX(J-1)»ZB
      IF(STAB(J«1).GT.O.) GO TO 226
  223 ZFHEfs- S.*STAB(J-1)
      IFCZK.GT.ZFREE) GO TO 22«
      AKB*.3b*USTAR(J-l)"ZB*(l.-15.*ZB/STAB(J-l))**.25
      DKZB = ,35*U3TAR(J-l)*{Cl.-18.75«Z8/STAB(J«in/Cl.-15.*ZB/STABU«n)MM
     +«*.75)
      GO TO 227
  22a ZB=ZFREE
      »KH = . J5«UST*R(J-1)«ZB*(1.-15.*Z8/STA8(J-1))*«.25
      OK ZB = 0. 7 *USTAR(J-1)*(-ZB/STA8 («/•!))*•. 3333
      60 TO 227
  226 AKB=.35*USTAR(J-l)*ZB/(l.»«.7*Z8/STABCJ-n)
      OKZe=.35*USTAR(J«l)/Cl.+«.7*ZB/3TAB(J-l))**2.
  227 CONTINUE
      AKO=AKB-AKMIN
  228 ZHt=2HT+OH
      IF(7HT.GT.Z(J)) GO TO 229
      IF(ZMT.LE.ZB) GO TO 228
      NZHT=IFIX(ZHT/DH)»1
      DELZ=ZHT-ZMIX(J-1)
      IF(UELZ.GT.O.) GO TO 228
      DEL7=DELZ«DELZ
      AKZ(N2HT):AKMIN+DELZ/(DZB**2.)*(AKD«(ZHT»ZB)*(DKZB+2.*AKO/OZB))
      GO TO 22B
  229 CONTINUE
  2hO LMAXMlzL"'AX-l
      DO 270 J=2,LMAXM1
      IF CSTAb(J-l).GT.O.) GO TO 270
      MZ=IFlX(Z(J-l)/OH)+l
      NZ7«IFIX(Z(J)/DH)»1
      ZHTsZ(J-l)
      IF(ZHT.GE.ZMAX) GO TO 275
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
1655
1656
1657
1658
1659
1660
1661
1662
1663
166*
1665
1666
1667
1668
1669
1670
1671
1672
1673
1671
1675
1676
1677
1678
1679
1680
1681
1682
1683
168a
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701

-------
265 ZHT=ZHT+OH
    IFfZHT.GT.Z(J)) GO TO 270
    ZHZ=UZ(J)-ZHT)/(Z(J)-Z(J-1))}*». 33333
    ADOK2s(ZHT-ZtJ-l>)*(AKZ(NZZ)-AKZ(NZ))/(Z(J)«ZU-l))+AKZ{NZ)
    AKZ(NZHT)=(AKZ(NZHT)"ADDKZ)*ZHZ»AODKZ
    IFCAKZ(NZHT).LT.AKMIN) AKZ (NZHT) «AKMIN
    60 TU 265
270 CONTINUE
275 IF(LMAX.LT.3) GO TO 290
    DO 280 JS3.LMAX
    NZ=IFIX(ZCJ-1)/DH)+1
    IF(AKZ(NZ*n.LE.AKZ(NZ)) GO TO 280
    ZMT=Z(J-1)
    IF(ZMIX(J-1).LT.Z(JJ) ZHTX»ZMIX(J-1)
276 ZHTsZHT*OH
    IFCZHT.GT.Z(J)) GO TO 280

    IF(ZHT.GT.ZMIX(J-U) 60 TO 280
    NZHT=IFIX(ZHT/DH)+1
    ZHZ=C(ZHT«Z(J-l))/(ZHTX-Z(J-l)))**.a5
    ADnKZ=(ZMIX(J-l)-ZHT)*(AKZ(NZ)-AKMlN)/{ZMIX<,l-l)»Z(J»l))*AKMIN
    AKZ (NZHT) «(AKZ (NZHT) •ADDKZ)*ZHZ+ADOKZ
    GO TO 276
280 CONTINUE
290 RETURN
    END
    FUNCTION KLASS(A)

    •KLASS* DETERMINES THE ATMOSPHERIC STABILITY CLASS
            FROM THE PULLE STABILITY PARAMETER (A).
    KLASS a 6
    IFCA.LE.ll.25) KLASS   5
    IFCA.LE. 9.50) KLASS   4
    IF(A.LE. 8.75) KLASS   3
    IFU.LE. 8.00) KLASS   2
    IF(A.LE. 7.00) KLASS   1
    RETURN
    END
    SUBROUTINE KZDATA(IERR)

      THIS SUBROUTINE READS (UP TO 3) VERTICAL TEMPERATURE PROFILES.
      THIS SUBROUTINE READS HOURLY SURFACE TEMPERATURES (DEGREES C)
      hHEN  RDTEMP EQUALS YES.

      NOTE .. FOR ST. LOUIS RDTEMP EQUALS NO SINCE THE SURFACE
              TEMPERATURES ARE INTERPOLATED ALONG THE TRAJECTORY.
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
1702
J703
170«
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750

-------
      COMMON /KZINPT/ NEEDKZ,           KZPRTX,
     I                 TIMESDC3),        TEMPSDC50,3),
     2,               TEMPSF(2«),       NPTSDC3),
      COt"MON/CELECT/CELHT3(5,l),NOHTS,NME3
      DATA LIN m
      DATA YES, HNEG /4HYES ,«HNO  /
      EQUIVALENCE YES, YES)
C
      REAOCLIN,!) NKZDAT
      IF(NKZOAT.NE.KYES) 60 TO 120
      REAO(LIN,1)  KZPRTX
C       HEAD VERTICAL PROFILES
      DO 50  180 = 1,«
      READCLIN.a)  A
      IF(A.LT.O.)  CO TO 60
      IFriSD.GE.4)  GO TO 131
      TIME 3D(I SO) * A
      00 10  jsl,51
      IFU.GE.S1)  GO TO 132
   10 RE»0(LIN,2)  B, C
      IF(B.LT.O.O)   GO TO «0
C***********************NOTE TO USER*********************
C
C     CARDS BETWEEN STARRED LINES SHOULD BE REMOVED
C     F0« CITIES OTHEH THAN ST. LOUIS.  THESE CARDS
C     REMOVE FROM THE TEMPERATURE PROFILES THE POINTS
C     HAVING HEIGHTS WHICH ARE MULTIPLES OF 100.0 M.
C     IT IS OFTEN STANDARD PROCEDURE TO RECORD THESE
C     HEIGHTS EVENTHOUGH THEY ARE NOT IMPORTANT TO
C     THE SHAPE OF THE SOUNDING.
      IF(J.EO.l) GO TO 20
      IB=IFIX(B«1000.+.l)
      1F(*ODCI8,100000).EQ.O) GO TO 10
C**»*»»*»*********»************«*************************
   ao zELVso(j,isD) s a

      TE"PSD(J,ISD) » C
  30  CONTINUE
      GU TO 131
  flO  NPTSD(ISD) « J • 1
  50  CONTINUE
      GO TO 132
   60 CONTINUE
      NUUSD=ISO«1
      REAIMLIN,!)  RDTEMP
       IF(RDTEMP.NE.YES)  GO TO 90
C       hEAO SURFACE TEMPERATURES
      DO 80 I< 1,25
      HEADfLIN,2) A, B
      U (A.LT.0.0)  GO TO 90
      IS s IFIX((A+l.E>3)/100.)tl
      IFCIS.GE.2S)  GO TO 133
      TEMPSFIIS) » B
   80 CONTINUE
      GO TO 133
NUMSO,
MM 1751
ZELVSD(50,3)MM 1752
NKZDAT




















































MM 1753
MM 1750
MM 1755
MM 1756
MM 1757
MM 1758
MM 1759
MM 1760
MM 1761
MM 1762
MM 1763
MM 1764
MM 1765
MM 1766
MM 1767
MM 1768
MM 1769
MM 1770
MM 1771
MM 1772
MM 1773
MM 1770
MM 1775
MM 1776
MM 1777
MM 1778
MM 1779
MM 1780
MM 1781
MM 1782
MM 1783
MM 1784
MM 1785
MM 1786
MM 1787
MM 1788
MM 1789
MM 1790
MM 1791
MM 1792
MM 1793
MM 1794
MM 1795
MM 1796
MM 1797
MM 1798
MM 1799
MM 1800
MM 1801
MM 1802
MM 1803
MM 1800
MM 180S
                                         C-36

-------
 90 CONTINUE
    REAU(LIN,4)
    RE AD (LIN, 5)
    NMES » 1

120
                NOHTS
                  CCELHTS(Irl),I»l.NOHTS>
    RETURN

131  IERRs-1
    RETURN
132  IERRs-2
    RETURN
133  lEKHs.j
    RETURN
J34  IERHs-4
    RETURN

  1  FORMAT (40X,A4)
  2  FORMAT (40X,2F10.0)
  a  FORMAT(«OX,I2)
  5  FORMAT(40X,F10.0)
    END
    SUBROUTINE METIN (IOT,LTAPE)

       THIS IS THE SHORT RECORD  VERSION OF METIN

       THIS SUBROUTINE READS MIND SPEEDS AND DIRECTIONS,  SURFACE
       TEMPERATURES, AIR QUALITY  DATA,  AND SOLAR RADIATION DATA
       FROM ST. LOUIS RAMS TAPES. .

       THE rtIND OATA IS STORED IN AWOATA.
       THE TEMPERATURE DATA IS STORED IN CON(I,J,1)  AND  TEMPSF(I).
       THE AIR QUALITY DATA IS STORED IN CON(I,J,2 THRU  10).
       THE RADIATION DATA IS REDUCED INTO UVCI)  AND  PRINTED ON LOUT

       NOTE	ONLY ONE DAYS hORTH OF OATA IS  STORED  AT » TIME.
       THIS SUBROUTINE  FINOS THE DATA  FOR THE DATE  (IDT) SPECIFIED.


    DIMENSION AIMAGEC662) , WORKC550),   X(25,22), UV(24), JULDATC2),
   1  NftOATA(52,25)  , DTEMP(20) , ASHRC24) , LhOSTA(9),  CLOUOY(24)
    COMMON /AIRQAL/
    COMMQM /PATES/
    COMMON /INPUTS/
    COMMON /KZINPT/
    COMMON /REUSE/
    COMMON /HDATA/
                    NEEDAO,    NOSPEC,    CONAM(IO),    CONC24,25,10)
                    IOATEUO),   ICT(IO),   NFILES
                    TITLE(20),   JOATE(IO),   NC.URV
                    NEEDKZ,            KZPRTX,              NUMSD,
                    TIMESOC3),         TEMPSOCSO.S),        ZELVSD(50,
                    TEMPSFC24),        NPTSDC3)        ,     NKZDAT
                    KPSTAT,  KPWDAT,  CONVRT,  KXTRA,  KPWIND
                    NUMSTA,  3STAN(2,25),   I3TAN8(2,25),  RMIN,  RMAX
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
3)MM
MM
MM
MM
1606
1607
1608
1809
1310
1811
1812
1813
1811
1815
1616
1817
1818
1819
1820
1821
1622
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1641
1642
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1654
1655
1856
1657
                                     C-37

-------
     COUMON
     COMMON
            /WHERE/
                RLAT,    RLONG,      TMZONE
                AWOATA(52,25)  ,DI8AVE(25),
                                                  IOSAVE(Z5)
     EQUIVALENCE (YES.IYES)
     EQUIVALENCE (X.wORK)
     EQUIVALENCE (NKDATA, AViDATA)
     DATA IYES,  NO /4HYES  r«HNO  /
     DATA ZERO /O.OOOOOOO/
     DATA LIN, LOUT, LPUNCH  /3,6,l/

        *«*»»»«»«»«OATA SPECIFICALLY FOR ST. LOUIS***«*****»»**********MM
     DATA NOOAY3 /!/
     DATA NRAM /4HRAMS/
     DATA APT /  90. /
     DATA HIVAL  / 500.  /
     DATA LwDSTA  /  108, 1 10, 1 14, US, 1 16, 117 , 1 IB, 121 , O/
     DATA t.STMAX , N9PMAX  /25i  10/
     DATA CONAM  /aHTEHP, 4H03   r  4HCO  , 4HCH4 , 4HTHC ,  4HNO
                     4HTS
                             4HS02
 95
100
     NOSPEC =
     DEBUG =
        4HNOX
         10
        MO
   *»«*»**«***»*********«************»****************«***********MM
LU a LTAPE
KNTER s 0
NFILE a 0
IMIN a 1
IM«X i 24

IDATE(l) a IDT
ICT(U » NUMSTA
NFILES s 1


CALL JULIANUDT, JULOAT)

   INITIALIZE ARRAYS

IF(IMIN.E0.1.AND.IMAX.E0.24)  60 TO 95

CALL XMIT 
-------
C        RETRIEVE ONE HOURS WORTH OF DATA FROM TAPE                     MM  1913
C                                                                       MM  1914
 HO  CONTINUE                                                          MM  1915
C                                                                       MM  1916
C         ON UNIVAC ELIMINATE CARDS BETWEEN STARED CARDS                MM  1917
C         ELIMINATE AIMAGE FROM DIMENSION STATEMENT ABOVE               MM  1918
C         *»*»**«********»*****************************ft*****ft**********MM  1919
      BUFFER IN UU,0) (AIMAGEU) i AIMAGE(Z))                            MM  1920
 120  ir(UNIT,LU)  180. 130, 160, 470                                   MM  1921
C           NOT READY  ....READY...EOF...PARITY                         MM  1922
 130  CONTINUE                                                          MM  1923
      OECOOEU2,20,AIMAGE(1))  IYR,  IOAY,  IHR                         MM  1924
C         »****»*»******»»**»*******««**********************«***********MM  1925
C         ON UNIVAC INCLUDE THE FOLLOWING CARD                          MM  1926
C     READ (LU,20,ERR=470,END»460)  IYRi IDAY, IHR                      MM  1927
      IFdDAY.EQ.JIJLOATd))  60 TO 140                                  MM  1928
C      SKIP FILE LU                                                     MM  1929
      NFILE = NFILE + 1                                                 MM  1930
      IF(NFILE.GE.NODAYS)  GO TO 450                                    MM  1931
      GO TO 110                                                         MM  1932
 140  CONTINUE                                                          MM  1933
C         ON UNIVAC ELIMINATE CARDS BETWEEN STARED CARDS                MM  1934
C         ••*•***•«**•»***•«**»«**»»»•*••**»*«**»»»«****»**••»»*»*•»»»**MM  1935
      II = 3                                                            MM  1936
      12 s 11 + 29                                                      MM  1937
      DO 1«5 I * 1,22                                                   MM  1938
      BUFFER IN (LU,0)  (AIMAGEU1), AIMAGEU2))                         MM  1939
 143  IFCUNIT.LU)  143,  144,  460,  470                                MM  1940
 144  II = 12 * 1                                                       MM  1941
      12 = II + 29                                                      MM  1942
 145  CONTINUE                                                          MM  1943
C         «»**•»•«*•*«*•»*•«***•***»*****«•**•*»•*«•»*•***********•*****MM  1944
C         ON UNIVAC INCLUDE THE FOLLOWING CARDS                         MM  1945
C     00 ISO K s 1,22                  .                                MM  1906
C     READ (LU,40,ERRS470,ENO*460)  (X(J,K),J=l,NUMSTA)                 MM  1947
C150  CONTINUE                                                          MM  1948
      II = IMIN - 1                                                     MM  1949
      IF(IHR.LT.Il)  GO TO 110                                          MM  1950
C         ON UNIVAC ELIMINATE CARDS BETWEEN STARED CARDS                MM  1951
C         •••••••*»K»**«***»««»*****»**»*««*«»**««*«*****««««**«**«««***MM  1952
      II = 3                                                            MM  1953
      Jl « 1                                                            MM  1954
      J2 = 10                                                           MM  1955
      00 150 K * |,55                                                   MM  1956
      OECODE(120,40,AIMAGE(IU)  (WORK (JS) , J8«Jl, J2)                    MM  1957
      Jl = Jl + 10                                                      MM  1958
      J2 = J2 + 10                                                      MM  1959
      II i 11 » 12                                                      MM  1960
 150  CONTINUE                                                          MM  1961
C         •**«*«»****o«»****««***«*«***»*****«««**««**»«**»*«*»»n*«««»«*MM  1962
      KNTER a KNTER » 1                                                 MM  1963
C                                                 '                      MM  1964
      IF(DEBUG.NE. YES)  GO TO 170                                      MM  1965
      WRITECLOUT,30)  IYR, IOAY, IHR                                     MM  1966
      00 160 K • 1,22                                                   MM  1967
                                      C-39

-------
     WRnE(LOUT,50)
160  CONTINUE
170  CONTINUE
                K,  (X(J,K),J»1,NUM3TA)
300  INUEX s IHR » 1
310
320
330
340
350
        Xt'IT
                  DAT*
II » INDEX » a
12 s INDEX » 28
00 310 J « 1,NUMSTA
ANDATAdl, J) s XU,2)
A«OATA(I2rJ) B X(J,1)
CONTINUE
   X"IT TEMPERATURE OAT»
DO 320 J a l.NUMSTA
COMdNDEX, J, 1) s XCJ.3)
CONTINUE
IF(NEtDAQ.NE.IYES)   60 TO 350

   REDUCE SOLAR RADIATION DATA
   CURRENTLY ALL SOLAR RADIATION DATA BELOW .OS LANGLEYS/MIN
   AMD ABOVE 2.0 LANGLEYS/MIN is EXCLUDED.

UVU"DEX) » 0,0
SUM1 a 0.0
SU>-2 = 0.0
KS B 0
00 330 JB l.NUMSTA
IF( X(J,7).LT. 0.05)
IF( X(J,7).GT. 2.00)
IF( X(J,B).LT
IF( x(J,fl).GT
SUt'l
               0.05)
               2.00)
       SUM1 » X(J,7)
SU«? = SUM2 + X(J,«)
KS r KS + 1
CONTINUE
IF(K
-------
 360
370
380
390
400
410
                             60 TO  360
                             60 TO 360
ASHH(INDEX) e 1.219
SU"1 = 0.0
KS = 0
00 360 J = 1,NUMSTA
IF(Y(J,b) .GT. 10.  )
IF(X(J,6) .LT.-10.  )
SUM1 * SUM) » X(J,6)
KS s KS + 1
CONTINUE
IF(KS.LT.l)  GO TO 3/0
OTEMP(INOEX) = SUM1/25./KS
    UNSTABLE CONDITIONS
IFCOTEMPUNDEXj.LT. -.015)
    STABLE CONDITIONS
IF(OTEMP(INDEX) .GT. -.005)  ASHR(INOEX) • 1.437
                                 ASHR(INDEX) • 1.166
     CONTINUE

     IFCKNTEH.LT. IMAX)   60 TO 110

        YOU ARE FINISHED READING THE DATA FROM THE TAPE.

        EDIT MIND DATA AND CONVERT THE WIND DIRECTIONS FROM THE
             360 POINT SYSTEM TO A 90 POINT SYSTEM
CONTINUE
KS = 1
A = APT/360.0
AINV = 1./A
DO 390 J * 1,NUMSTA
K = LV»DSTA(KS) - 100
DO 390 I « IMIN
II e I » 4
12 * I t 28
IF(AWDATA(I1,J).GT.HIVAL) AWDATA(I1,J) • - AINV
AWDATA(tl,J) s AWDATAdl, J)*A
IF(AWOATA(I2,J).GT.HIVAL)   AMOATA(I2,J) * -1.0
    «NO ADJUST 10M WIND SPEEDS TO THE 30M STANDARD
IF(J.'ME.K)   GO TO 390
A»DATA(I2,J) 3 AWDATA(I2,J)*ASHR(I)
KS s KS + 1
CONTINUE
TF(NEEOAQ.NE.IYES)   60 TO  440

   EDIT ATMOSHPERIC CONCENTRATION DATA

DO 410 K a Z, NOSPEC
DO 410 J • 1, NUMSTA
00 400 I m IMIN, IMAX
IF CCOMU, J,K).GT.HIVAL)  CON(I,J,K) c -1.0
CONTINUE
CONTINUE

   EDIT AND REDUCE TEMPERATURE DATA
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
    2023
    2024
    2025
    2026
    2027
    2026
    2029
    2030
    2031
    2032
    2033
    2034
    203S
MM  2036
MM  2037
MM  2038
MM  2039
MM  2040
MM  2041
MM  2042
MM  2043
    2044
    2045
    2046
    2047
    2048
    2049
    20SO
    2051
    2052
    2053
                                                                           2054
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM  2055
MM  2056
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
    2057
    2056
    2059
    2060
    2061
    2062
    2063
    2064
    2065
    2066
    2067
MM  2068
MM  2069
MM
MM
MM
MM
MM
MM
MM
MM
    2070
    2071
    2072
    2073
    2074
    2075
    2076
    2077
                                        C-41

-------
420

430
440
450


460

470


480
490
500
510
     00 430 I  = IMIN,  IMAX
     KS s 0
     SUfl s 0.
     00 020 J  s I,  NUMSTA
     IF (CON(1,J,1).GT.HIVAL)    CON(I,J»1)  « -1.0
     IF(CON(I,J,1).LT.ZERO)   GO TO «20
     SUMt s SUM1  »  CON(IrJil)
     KS = KS + t
     CONTINUE
     IF(KS.GT.O)   TEMPSFU)  » SUM1/KS
     CONTINUE
     CONTINUE

          GENERATE  SKY CLEARNESS RATIOS FROM UV DATA

     CALL SKY{UV, CLOUDY, IOATE)

     REMND LTAPE

     GO TO 480
     «»ITE(LOUT,60)  NFILEr IYR, 10X1, IHR
     GO TO 500
     WRITE(LOUT,70)
     GO TO 500
     *P.ITE(lOUT,80)
     GO TO 500
IYR,   IDAY,   IHR

   IYR,   IDAY,   IHR
     CONTINUE
        FRINT WIND DATA IF KPWDAT * YES
        PUNCH WIND DATA IF SPCHwD « YES
     SPCH/0 = NO
     IF (KPWDAT.NE.IYES)  GO TO 500.
     CALL N£WPAG(TITLE,0,JDATE)
     WRITE(LOUT,77)
     DO 490 J » 1,NUMSTA
     *hITE(LOUT,78) (NWDATA(I),Is!,28}
     rtRITE(LOUT,79) (NWDATA(I),I«l,3) , (NWOATA(I),I«29,52)
     IF (SPCHWO.NE.IYES)  GO TO 490
     iVRITE(LPUNCH,73)  (NrtDAT A (I ) , 1 = 1, 28)
     MRITE(LPUNCH,74)  (NMDATA(I),IB1,3), (NWDATA(I),1*29,52)
     CONTINUE
     CONTINUE

     IF (DEBUG.NE.YES)   GO TO 530
     rtRITECLOUT.fl?)
     00 510 J = 1, NUMSTA
                 5) J, (NWOATAd,
     MRITE(LOUT,90)
     CONTINUE
                       ( AWDATA C I , J) ,  1=5,52)
                                            AWDATA(4,J)
                                                      2078
                                                      2079
                                                      2000
                                                      2061
                                                      2082
                                                      2083
                                                      2080
                                                      2085
                                                      2086
                                                      2087
                                                      2088
                                                      2089
                                                      2090
                                                      2091
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM  2092
MM  2093
MM  2094
MM  2095
MM  2096
MM  2097
MM  2096
MM  2099
    2100
    2101
    2102
    2103
                                                                       MM
                                                                       MM
                                                                       MM
                                                                       MM
                                                                       MM  2104
                                                                       MM  2105
                                                                           2106
                                                                           2107
                                                                           210S
                                                                           2109
                                                  MM
                                                  MM
                                                  MM
                                                  MM
                                                  MM  2110
                                                  MM
                                                  MM
                                                  MM
                                                  MM
                                                  MM
                                                  MM
                                                  MM
                                                  MM
                                                  MM
                                                  MM
                                                  MM
                                                  MM
                                                  MM
                                                  MM
                                                  MM
                                                  MM
                                                  MM
                                                  MM
     *RITE(LOUT,8«)
     DO 520 K « l.NOSPEC
    2111
    2112
    2113
    2114
    2115
    2116
    2117
    2118
    2119
    2120
    2121
    2133
    2123
    2121
    2125
    2126
    2127
    2128
MM  2129
MM  2130
MM  2131
MM  2132
                                       C-42

-------
      *RITE(LOUT,86)    CONAM(K),   CONAM(K),   CONAH(K), CONAM(K)
      OU 520 J * I.NUMSTA
      WRITEUOUT.85)  J,  CNWDAT»(I,J),I«1,3)
      wRITEUOUT.90)  X,2A4,14X,3HM/S,24I3)
  80  FORMAT UNO, 38HPARITY ERROR ENCOUNTERED   »• METIN






















00






















416)
416)







416)
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
9146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2167
                                      C-43

-------
  81  FOHWAT (JOA4)                                                    MM  2188
  63  FORMAT (1HO,I2,10X,I&,4X,AU,I4,F10.I  )                            MM  ?|«9
  62  FORMAT (iHi,22HrtiNo DATA FROM AWDATA    )                          MM  ?i«o
  84  FOK^*T(IH1,47H TEMPERATURE AND ATMOSMPEHIC  CONCENTRATIONS       )  MM  8|<>1
  86  FOKMATC1HO,4(A4,20X)   )                                          MM
  87  FORMAT (1HO,10X,26HREG10NAL HOURLY AVERAGES    ,// 11X,4MHOUR,    MM
    1  10X.22HULTRAVIOLET RADIATION  ,4X,I1HTEMPERATURE  ,«X,          MM  2194
    2  20HTEMPERATUHE  GRADIENT  ,4X,15HCLKARNE33 RATIO  ,              MM  2195
    J  /,25X,22H   (LANGLEYS/MIN)       ,                              MM  2196
    5  flX, 11M   (OEG  C)     , 9X,1«H(DEG  C/METER)             )        MM  2197
  88  FORMAT C1HO,8X,I4,3H -  ,I4,5X,E15.3,F20.2,F20.4,F20.3 )           MM  2198
  89  FORMAT(1HO,!OX,21HST.  LOUIS     YEAR  •   ,15,  SX.6HOAY •   ,13 )   MM  2199
  90  FORMAT (1H ,5X,12E10.2)                                          MM  2200
                                                                     MM  2201
     END                                                             MM  2202
 10
 20
SUBROUTINE PLACIT(OT,L,VX,VY,POS,NOX)

    STARTING FROM  THE POSITION DEFINED BY  LOCATION  L  IN THE  P
    ARRAY,  PLACIT COMPUTES THE POSITION   POS  AND GRID SQUARE
    INDICES  NDX   AT TIME  T(U * DT.   VX   AND  VY  SHOULD 8E
    THE  X  AND  Y COMPONENTS OF  V(L).

DIMENSION POS(2),NDx(2)
COMMON /WIND/ T(100), V(100), TH(IOO), NPTS
COHVON /TRAJ/ TSTART, P(2,100), 10(2,100}
COK'TJN /GRID/ XI, X2,Y1,Y2,NX,NY,DELX,DELY,DELT
DAU SMALL /!.£•
-------
   CCMMON/PEVE/PE(2,24),V£(24)
   COMMON/OHIGIN/UTMXOR«UTMYOR

   DATA UTMXUR,  UTMYUR  / 739.Si  4880.3/
   DATA HADURB, RAQSUB  /5..10./
   DATA ZOURBN, ZORURL  /1...2S/

   PEU,J)sPE(l,J)+UTMXOR
   PE(2,J)sPEC2,J)*UTMYOR
   Ar(PE(l,J)-UTMXUR)**Z
   B«(PEC2,J)"UTMVUR)**2
   A a SQKTU+B)
   IF(A.GE.RAOSUB)   60 TO 40
   IF(A.LE.RADURB)   GO TO 30
   PORT = (A - RAOUR8)/(RADSUB  • RAOURB)
   20 * ZOURBN + PORT*(ZORURL-ZOURBN)
   GO TO SO
30 ZO s ZOURBN
   60 TO 50
40 ZO = ZORURL
50 RETUSN
   ENO
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
    2337
    2238
    2239
    2240
    2241
    2242
    2243
MM  2244
MM  2245
MM
MM
    2246
    2247
    2248
MM  2249
MM  2250
MM
MM
MM
MM
    2251
    2252
    2253
    ?254
    2255
    2256
    2257
    2258
    2259
SUBROUTINE SETIN

SEUN FOR ST. LOUIS

SETIN INITIALIZES MIND STATION NAMES AND COORDINATES.
SETIN INITIALIZES LATITUDE, LONGITUDE, AND TIME ZONE.

ISTANS IS AN ARRAY CONTAINING THE NAMES OF THE WIND STATIONS
SSTAN IS AN ARRAY CONTAINING THE UTM X-Y COORDINATES OF THE
METEROLOGICAL STATIONS

NUMSTA IS THE NUMBER OF STATIONS
RLAT IS THE LATITUDE
HLONG IS THE LONGITUDE
TMZONE IS THE TIME ZONE (IE
6. FOR ST. LOUIS
8. FOR LOS ANGELES )


COMMON /WDATA/ NUMSTA, SSTANC2.25), ISTANSC2 , 25) , RMIN, RMAX
COMMON /OHIO/ XI, X2, VI, Y2, NX, NV, OELX, DELV, OELT
COMMON /ORIGIN/ UTMXOR, UTMYOR
COMMON /WHERE/ RLAT, RLONG, TMZONE


USER MUST DEFINE THE FOLLOWING INFORMATION

DATA RLAT /38.6X
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
uu
FtM
MM
MM
MM
MM
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
a aa/t
K CO**
2285
2286
2287
2286
                                  C-45

-------
DATA RLONG /90.2/
DATA TMZONE /6.0/
DATA NUMSTA /25X
DATA ISTANS












C
C
C































1
2
3
4
5
6
7
8
9
»
1
2



























/4HRAM3>













STAT

































SSTANU,
SSTAM2,
SSTAM1 ,
SSTAM2,
3STAM(1,
SSTAM2,
SSTAM1,
SSTAM2,
SSTANll,
SSTAM2,
SSTAMU,
SSTANC2,
SSTAM1,
SSTAN(2,
SSTANU,
SSTANC2,
SSTAHU,
SSTAM2,
SSTAMlp
SSTANf2,
SSTAM1,
SSTA\(2,
SSTAMU.
SSTAi.ta,
SSTA'JU,
SSTA.\i(2r
SSTAM1,
S3TAM2,
SSTA'vd,
SSTANC2,
SSTANU,

1)
n
2)
2)
3)
3)
4)
«)
5)
5)
6)
6)
7)
7)
8)
6)
9)
9)
10)
10)
in
in
12)
12)
13)
13)
14)
14)
15)
15)
16)
SSTAM(2,16)




SSTAMd,
3STAN(2,
17)
17)

e
9
*
s
c
c
c
s
C
f
s
s
2
:
B
3
z
*
a
B
X
*
9
*
*
B
*
s
3
:
B
m
m
n
UHRlMSf
4HRAMS,
4HRAMS,
4HRAMSr
4HRAMSr
4HRAMS(
4HRAMS,
4HRAM3,
4HRAM3>
4HRAMS»
4HRAMS>
4HRAMS,

UTM-X

744.183

742. 518

747.588

747,312

743.706

738.660

740.179

748.407

755.802

747.209

738.812

733.938

737.738

744.320

757.111

762.777

760.560

4H 101.
4H 102, 4HRAM3, 4»- 103,
4H 104, 4HRAMS, 4K 105,
4H 106, 4HRAMS, 4H 107,
4H 108, 4HRAMS, 4H 109,
4H 110, 4HRAMS, 4H 111,
4H 112, 4HRAMS, 4H 113,
4H 114, 4HRAMS, 4H 115,
4H 116, 4HRAMS, 4H 117,
4H 118, 4HRAM3, 4H 119,
4H 120, 4HRAMS, 4H 121,
4H 122, 4HRAMS, 4H 123,
4H 124, 4HRAMS, 4H 125 /

UTM-Y


4279.862

4286.045

4282.467

4277.304

4276.453

4277.566

4282.610

4291.102

4279.886

4272.826

4272.479

4280.913

4289.820

4297.456

4297.799

4290.083

4272.818
MM  2289
MM  2290
MM  2291
MM  2292
MM  2293
MM  2294
MM  2295
MM  2296
MM  2297
MM
                                                                 MM
    2298
    2299
MM  2300
MM  2301
MM  2302
MM  2303
MM  2304
MM  2305
MM  2306
MM  2307
MM  2303
MM  2309
MM  2310
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
                                                                 MM
    2311
    2312
    2313
    2314
    2315
    2316
    2317
    2316
    2319
    2320
    2321
    2322
    2323
    2324
    2325
    2326
    2327
    2328
    2329
    2330
    2331
    2332
    2333
    2334
    2335
                                                                  MM  2336
                                                                  MM  2337
                                                                  MM
                                                                  MM
     2338
     2359
 MM  2340
 MM  2341
 MM  2342
 MM  2143
                                C-46

-------

















c
c
SST4M1, IB)
S5T»NCa,l»)
SSTAN(1,19)
SSTAN(5, 19)
SSTAN(1,20)
SSTANC2.20)
SSTAN(1,21)
SST»N(2,21)
SSTAN(1,22)

SSTAN(2,22)
SSTAN(1,?3)
SSTAN(2,23)
SSTAN(l,2a)
SSTAN(2,24)
SSTAN(1,2S)
SSTAN(2,25)


703.06!
4263. 256
729.759
•270.547
723.079
42S5.909
732.414
4302.376
741.631

4329.223
777.320
4286.378
749.275
4236.537
697.445
4262.240


DO 40 I » l.NUMSTA


C
40






SSTAN(l.I) s
SSTAN(2,I) *

CONTINUE
XI a 0.0
X2 * NX*OELX
Yl = 0.0
Y8 * NY*DELY
RETURN
ENO
SSTAN(I,I) • UTMXOR
S3TAN(2,I) » UTMYOR








SUBHOUTINE SETTUP
C
C
c
c



INITIALIZATION SUBROUTINE FOR GENERATION OF
TRAJECTORY GRID SQUARE HISTORIES.

DIMENSION

UTMC2,5)
COMMON /CNTROL/ KSTOPi TSUN
COMMON /GRID/ XI, X2, Yl, Y2, NX, NY, DEUX, DELY, CELT
COMMON /INPUTS/ TITLE(20), JDATEUO), NCURV
COMMON /TRAJ/ TSTART, PC2,100), 10(3,100)
COMMON /WDATA/ NUM3TA, SSTAN(2,25), I3TAN3(2,25) , RMIN,
COMMON /WIND/ T(IOO), V(IOO), TH(IOO), NPT3
COMMON /ORIGIN/ UTMXOR» UTMYOR
DATA LIN, LOUT /3,6/
C
C
C


CONVERT MIND VELOCITIES TO KM/MIN AND TIMES TO MINUTES


V(l) • V(l)/60.
TSTART « T(l) * TSUN
TSHIFT « TIMINCT(l))
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
RMAX MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2356
8359
2360
2361
3T**>
C JoC
2363
2364
2365
2366
2367
2366
2369
2370
2371
2372
2373
2374
2375
2376
2377
2376
2379
2380
2381
2382
2383
23A4
2385
23H6
2387
238B
2389
2390
2391
2392
2393
2394
                               MM  2395
C-47

-------
     DO  100
     TCK)  »
            K  a  2.NPT3
            V(K)/60.0
            TIMIN(TCK))
 • TSHIFT
 TCK) « TCK)
                                    * 1040.0
100  CONTINUE
         SET  UP  GRID AND LOCATE TRAJECTORY START POINT
     XI  » 0.0
     X2  = NX«OELX
     Yl  * 0.0
     Y2  = NY»DELY
         N'ORTH-hEST CORNER
     UTf(l.l) «  UTMXOR
     UTM(2,t) *  UTMYOR  + Y2
         NORTH-EAST CORNER
     UTM(1,2) «  UTMXOR  * X2
     UT*(2,2) «  UTMYOR  + Y2
         SOUTH-EAST CORNER
     OTMU.3) s  UTMXOR  » X2
     UTM(a,3) s  UTMYOR

         SOUTH«WE3T CORNER
     UTM(1,0) e  UTMXOR
     UTMC2»«) *  UTMYOR
         START POINT
     UTM(1,5) »  UTMXOR  + P(l»l)
     UTM(2,5) »  UTMYOR  » P(2(l)
     CALL PLACIT  (0.,1,0.,0.,UTM(1,5),JDATE(9))
     ID(1,1)  = JDATE(9)
     ID(2,1)  = JDATE(IO)


         PRINT GRID CORNER  AND START POINT COORDINATES
UTMU,1),  UTM(2,1),  XI,  Y2
UTM(1,2),  UTH(2,8),  X2f  Y2
UTM(1,J),  UTM(2,3),  X2,  Yl
UTM(l,a),  UTM(2,4),  XI,  Yl
UTMU.5),  UTM(2,5),
    «»ITE(LOUT,0)
    «RITE(LOUT,5)
    WRITF.(LOUT,6)
    WHITE(LOUT,8)
         INITIALIZE PRINTER-PLOT
    READ(LIN.l) XL ,XR, YB, YT
    CALL  SETPLT(XL,XR,YB,YT)
    RETURN
        FORMATS
    FORMAT(30X,«F10.0)
    FORMAT   (1HO,/////,21H
    1   laH(KILOMETERS)  ,15X,
    2S   ,/,5aX,1HX,9X,1HY,13X
    FORMAT  C1HO,4X,17HNORTH
    FORMAT  (1HO,4X,17HNORTH
    FORMAT  (1HO,4X,1THSOUTH
    FORMAT  UHO,4X,17HSOUTH
    FORMAT  (1HO,4X,17HSTART
    END
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
     GRID REFERENCE  DATA   ,//, SX,
     1SHUTM COORDINATES  ,8X,17HLOC*L
     ,1HX,9X,1HY  )
     MEST CORNER   ,feX,ZFlO.i,IX,3F10.
     EAST CORNER   ,6X,2F10.2,4X,2F10.
     EAST CORNER   ,t>X,2F10.e,4X,2F10.
     WEST CORNER   ,6X,2F10.2,4X,2F10.
     POINT        ,6X,2F10.2,4X,2F10.
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2409
2409
2410
2411
2412
2413
2414
2415
2416
2417
2416
2419
2420
2421
2422


















MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
COORDINATEMM

2 )
2 )
2 )
2 )
2 )

MM
MM
MM
MM
MM
MM
MM
242S
2426
2427
2426
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2446
2449
2450
                                     C-48

-------
     SUBROUTINE SKY CUV.CLOUDY,IOATE)

     GENERATE SKY CLEARNESS RATIOS
     ST. LOUIS VERSION   12.22.77
     CONVRT IS SET TO CONVERT WATTS/METER**? TO LANGLEYS/MIN.

     DIMENSION        UV(1),  CLOUOY(l),  IDATE(l)
     COMMON /*HERE/   RLAT,  RLONS,  TMZONE
     IHALF 9 30
     CONVT s 1./697.333334
     IY = 1DATE(1)/10000
     IM s IOATE(1)/100 • IY*10G
     ID s IOATEU) • IYMOOOO  • IM*100
     IY = IY » 1900
     DO 10 I »1,24
     IFtUVtn.GT. l.E-4)  GO TO IS
     CLOUDY(I) = 1.0
10   CONTINUE
     GO TO SO
15   CONTINUE
     IHR i {i-i)*ioo * IHALF
     TIME z FLOATflHR)
     DO 40 J s 1,24
     IFCUVm.LT. l.E-4)  GO TO 30
     CALL SOLAP(RLAT,RLONG,TM20NE,IY,IM,IO,TIME,D,5)
     Z 3 90.0 » D

     IFCZ.GT.SO.)  GO TO 20
     CLEAR s (•.0146667*2*7 + .05633334*2 + 66)*CONVT
     GO TO 25
20   CLtAH s (..992727*2 » 84.4}*CONVT
25   CLOUOY{J) « UV(J)/CLEAR
     IF(CLOUOY(J),GT. 1.)  CLOUOY(J)  » 1.0000
     TIME = TIME + 100
     GO TO 40
30   CONTINUE
     CLOUOY(J) * I.000
40   CONTINUE
50   RETUKN
     END
MM
MM
    2453
    2454
    2455
    2456
    2457
    2458
MM  2451
MM  2452
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
    2460
    2461
    2462
    2463
    2464
    2465
    2466
    2467
    2468
    2469
    2470
    2471
    2472
    2473
    2474
    2475
    2476
    2477
    2478
    2479
MM  2480
MM
MM
    2481
    2462
MM  2483
MM  24A4
MM  2485
    2486
    2487
MM  2488
MM  24R9
MM
MM
                                                                       MM
    2490
    2491
    2492
     SUBROUTINE SMOOTHUMAX)

    -THIS SUBROUTINE SMOOTHS THE TEMPERATURE SOUNDING BY DIVIDING THE
     SOUNDING INTO LAYERS WITH LAPSE RATES WHICH ARE GT 0.98,  tT 0.98
     BUT GT 0.0, AND LE 0.0, AND THEN DETERMINING THE AVERAGE  LAPSE
     BATE OVER EACH LAYEH.

     COMMON/TEt-PHT/2{50),22(50),T(50),TT(SO)
     EOUIVALENCE(JMAXM1,LMAXP1,LHAXM2)
     DIMENSION OELTAT(49)
MM
MM
MM
MM
MM
MM
MM
    2493
    2494
    2495
    2496
    2497
    2498
    2499
MM  2500
MM  2501
MM  2502
                                      C-49

-------
     JMAXSLMAX
     Ma)
     on loso LSI. UMAX
     OELTAT(L)=(TT(t)"T(L))*100./(2Z(L)»Z(t))t.98
     IF (L.EQ.l)  GO TO 1050
     IF(OELTATCL))      1025,1025,1030
1020 Msn»l
     GO TO  1035
1025 IF(DELTAT(L-1).GT.O.)    60 TO 1020
     GO TO  1035
1030 IF(OELTATU-1).LE.O.)  60 TO 1020
     IF(CUELTATrU.GE.,98.AND.DELTAT(L-l),LT,.98).OR.
    + CDELTATU).LT..96.ANO.DELTAT(I.-1).GE..98))  60 TO  1020
1035 TT(M)»TT(L)
     ZZ(M)aZZCL)
1050 CONTINUE
     LMAXeM+1
     NO=JMAX-M
     C«LL XMITC-NO,0.,TTCl.MAX))
     CALL XMIT(«NO,0,,ZZ(LMAX))
     JMAXV-IIJMAX-I
     CALL XMIT(JMAXM1,TT(1),T(2))
     CALL X«IT(JMAXMl,ZZCn,Z(2»
     JMAXSLMAX
     Ms?
     IF(L^AXM?.LT.3)       RETURN
     00 1100 L33,LMAXM2
     OELTAT(L)s(TTCL).TT(L"l))*100./(ZZ(l.)-ZZ(L-l)) + .98
     IF(DELT»T(L).LT.O..AND.(ZZ(L)-ZZ(L«1)).LT.100.) GO  TO  1080
     M = M»1
     GO TO 1100
1080 NO=LMAX-1-L
     CALL XMIT(NO,TT(L*1),T(M*1))
     CALL xMiT(No,zzu+i),z(M*in
1100 CO'.TINUE
     NO=JMAX«LMAX

     LMAXPleLMAX*!
     CALL XMIT(-NO,O.,T(LMAXPD)
     CALL XMIT(-NO,0.,T(LMAXP1))
     JM4XM1=JMAX-1
     CALL XMJT(JMAXMl,T(a),TT(l))
     CALL XMIT(JMAXMJ,Z(a),ZZ(l))
     RETURN
     END
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
    2503
    2504
    2505
    2506
    2507
MM  2S08
MM  2509
MM  2510
    2511
    2512
    2513
    2514
    2515
    2516
    2517
    2518
    2519
    2520
    2521
    2522
MM  2533
    2520
    2525
    2526
    2527
    2528
    2529
MM  2530
MM  2531
MM
MM
    2533
    2553
MM  2534
MM  2535
MM  2536
    2537
    2538
    2539
    2540
    2541
    2542
    2543
    2544
    2545
    2546
    2547
    2508
    2549
MM  2550
                                      050

-------
      SUBROUTINE 9TA8IL(STAB,J,A,ZTOP,OUDZ,OELT»U,ZHTHIX,U3TAR,Zw,ZO)
C— —THIS SUBROUTINE CALCULATES THE VALUE OF THE STABILITY PARAMETER A MM
C     DEVELOPED BY FULLEU975), AND THEN DETERMINES THE CORRESPONDING
C     VALUE OF THE MONIN-08UKHOV LENGTH, L.  FIRSTi AN APPROPRIATE
C     STABILITY CLASS IS SELECTED ACCORDING TO THE VALUE OF A, AND THEN MM
C     A v>LUE OF L IS DETERMINED AS SUGGESTED BY COLDER (1972) ,
c     IN ADDITION, THE HEIGHT OF THE BOUNDARY LAYER is DETERMINED FOR
C     ST46LF, NrUTRALr AND UNSTABLE CONDITIONS AS A FUNCTION OF U*/F.
C
      COf'MON/CORIOL/F
      RtAL LASTAB
      U60=U*60.
      IF(J.EQ.l) DUDZ»U/(ZW«ZO)
  100 LASTAgsSTAB
      DTDZ=DELT
      IFCOTDZ.LT.-5.) OTDZ«-5.
      Axl./(lo.*OTOZ)**2».0025*OUOZ
      Asl./SQRT(A)
  107 STAB=1 ,/FULGOL(A,ZO)
      IF(J.EO.l) GO TO 106
      CHAf,ST«A8S< (LA STAB-STAB) /STAB)
      IF(rH»NST.LE.,01) GO TO 108
      ZOL=ZTOP/STAB
      IF(STA8.LT.O.) OUDZ«OUM8*(1..15.*ZOL)**-,25
      IFtSTAB.GT.O.) DUDZsOUMB* ( 1 ,+4.7*ZOL)
      GO TO 100
  108 IF(STAd.LT.O.) GO TO 110
      UST»R = 0.35/(ALOG(ZW/ZO)»4.T/STAB*(Z»»-ZO))*U60
      USTORsUSTAR/60.
      ZHTMIX=0.5*SORT(USTOR*STAB/F)
      ZHTMAXs0.5«USTOR/F
      IF(ZHTMIX.GT.ZHTMAX) ZHTMIX*ZHTMAX
      GO TC 115
  110 ZWPHI*tl.-15.*Z«/STA8)**.Z5
      ZOPHH(1.-15.*ZO/STAB)**.25
      USTARs0.35/(ALOG(ZW/ZO)+ALOG(((ZOPHI*»2*|.)*(ZOPHI*l.}»*2)/
     l((7»PHl»*e«l.)*(ZwPHl + l.)*»2))l'2.*(ATAN(ZNPHI)>ATAN(ZOPHI)))*U60
      USTORxUSTAR/60.
      ZHTMIN=o.5*USTOR/F
      ZHTMIX=0.5*(USTOB/F)**1.S/SORT(-STAB)
      IFCZHTMIX.GT.4000.) ZHTMIX*4000.
      IFC(ZHTMIX.LT.ZHTMIN) .OR. (J.GT.l)) ZHTMIX«ZHTMIN
  115 RETURN
      END
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
256B
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
                                       C-51

-------
                 STADIFCZW.ZO.USFC.ZHIGH.DH.AKMIN.ISKLAS)
c
C...—THIS SUBROUTINE CONTROLS THE CALCULATION OF THE STABILITY
      AND THE OIFFUSIVITIES FOR EACH HOURLY UPDATE

      CO>»Mcih;/DIFDAT/OELTAT(30),STAB(30),ZMIX(30),USTAR(30),
     »              Um201),AKZ<201)
      DATA LOUT, YES, YNO /6,«MYES , 4HNO  /

      OBUGS1NO
  202 J=J+1
      ST»9(J)s-l.E6
      OFLT=CELTAT(J)
      UZZ(Jtl)=U3FC*ALOGCZZ(J)/ZO)/ALOG(ZW/ZO)
      DDZ = ArtS(UZZ(J»n-UZZ(J))/(ZZ(J)-Z(J»
      ZTOP=/Z(J)
      CALL STABIL(STABCJ), J, A,ZTOPf DDZ,DELT »USFC,ZMIX U) lOSTMU J) »ZW, Z05MM
      IF(J.EQ.l) ISKLAS s KLASS(A)
      USTORE=USTAR(J)/60.
  207 ZHT=Z(J>
  208 ZHT=ZHt+OH
      NsN + 1
      CALL niFFUS(STAB(J),ZHT,AKZ(N),USTAR(J))
      IF(tnZtN).LT.AKMIN) AKZ(N)*AKMIN
      IFCZHT.LT.ZZ(J)) GO TO 208
      IF(OHUG.EO.YES) A«ITE(LOUT,9) Z(J)rZZCJ),OELT,OOZ,A,STAB(J),
     1    USTORE.ZMIXCJ)
      IF(ZZU).EQ.ZHIGH) GO TO 29
      GU TO 202
   29 RETURN
    9 FORMAT(1H ,Fa.O,lH.,Fa.O,F10.3,3X,F10.7,F10.3,F15.1,F10,2,F10.1)
      END
      FUNCTION TIMINtT)

                CONVERTS MILITARY CLOCK TIME TO MINUTES
      XMIN s AMOD(T.100.)
      MRS » CT-XMIN)/IOO.
      TIMIN s 60,*HRS*XMIN
      RETURN
      END
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM.
MM
MM
MM
MM
MM
359*
2597
2b98
21>99
2600
3601
2602
2603
2(>U4
260S
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
263S
2639
                                         C-52

-------
too
 FUNCTION UNIDOT(A.B)

     UNIOOT RETURNS THE DOT PRODUCT OF A UNIT  VECTOR  PARALLEL
     TO  A  WITH A UNIT VECTOR PARALLEL TO  B,   I.E.  THE  COSINE
     OF THE ACUTE ANGLE SEPARATING  A  AND  6.
 DIMENSION A(3), 8(3)
 OENOM t SORT((All)**2*A(8)**2*A(3)**2)*(B(l)«*2*B{2)«*2+8(3)*«8))
 UNIDUT « 0.
 IF (DENOH.EQ.O.) RETURN
 PO 100 I * 1,3
 UNIOOT * UNIOOT+A(I)*§(I)
 CONTINUE
 UNIDOT a UNIOOT/DENOH
 RETURN
 END
MM
MM
MM
MM
                                                                            2640
                                                                            2b41
                                                                            2642
                                                                            2643
MM
MM
MM
MM
MM  8644
MM  2645
MM  2646
MM  2647
MM  2648
MM  2649
MM  2650
MM  3651
    2652
    2653
    2654
                                                                            2655
      SUBROUTINE UNITV(A,B)
c
C RETURNS 8 THK UNIT VECTOR PARALLEL TO VECTOR A
C
      DIMENSION A(3)»B(3)
C
      X s SQRT(A(1)**2+A(2)**2«A(3)**2)
      00 100 I • 1,3
      8(1) * A(I)/X
100   CONTINUE
      RETURN
      ENO
                                                                   MM   2656
                                                                   MM   2657
                                                                   MM   2658
                                                                   MM   2659
                                                                   MM   2660
                                                                   MM   2661
                                                                   MM   2662
                                                                   MM   2663
                                                                   MM   2664
                                                                   MM   2665
                                                                   MM   2666
                                                                   MM   2667
    5
   20
 SUBROUTINE UXYPOS

•THIS SUBROUTINE DETERMINES THE MIND  SPEED AND  X,Y  COORDINATES
 (LOCAL  OWIGIN)  AT EACH HOUR FROM THE TRAJECTORY  VECTOR.

 CO'
MM  2680
MM  2681
MM  2682
MM  2683
MM  2684
MM  2685
MM  2686
MM  2687
MM  2688

-------





30








50



C
C
C
C







C

PEU, J)aP(l,I)
PE(3,J)=P(2.I)
Vt(J)sVCI)
TE = U+1.
60 TO 50
J = J+1
IKJ.GT.2a) RETURN
TK=OTIME(TIME(I-1))
TFACTRs(TI-TE)/CTI«TK)
PEU,J)=P(l,I)-(P(l,I)-PU,I-in*TFACTR
PE(2,J)=P(2,I)-CP(a,I)-P(2,I-l))*TFACTR
VE(J)=V(I)-(V(I)-V(I-1))«TFACTR
TEsTE'l.
GO TO 5
CONTINUE
RETURN
END
SUBROUTINE WINDHD(LUWND,KPWDAT,TITLEiJOATE)

THIS SUBROUTINE READS WIND DATA AND PUTS IT ONTO AS MANY
SEPARATE FILES BY DATE. THE DATES ARE NOT ORDERED.

DIMENSION TITLE(aO), JDATEC2)
OIMEr.SION PT(24),XIMPH(24),IQ(24),JQ(84)
DIMEl^SION NAM(2)
DIMENSION IDATE(IO), ICT(IO)
COMMON /DATES/ IDATE, ICT, NFILES
DATA IBLNK/2H /.NONO/4HNO /
DATA LOUT /6/

NFILES = 10
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
AS NFILEMM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
C************************ ST. LOUIS ONLY **«»**««*«**«***«»K**«****MM
C
C
C
C
C

C

GET THE ST. LOUIS WIND DATA IN SUBROUTINE *** METIN •••

ALL CARDS BETWEEN THE LINES SHOULD BE REMOVED FOR OTHER

RETURN

MM
MM
MM
CITIES. MM
MM
MM
MM
(;•*••*•**«••**••»«»*»•**• ST. LOUIS ONLY *»*******»*«***»********»*MM
C
90








C
100

ISET = 0

IOLOD = 0
IFILE = 11
ICOLO s 0
IF (KP4DAT.EQ.NONO) 60 TO 100
CALL NEWPAGCTITLE,0, JOATE)
WRITE UOUT.1)
L = 0

CONTINUE
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
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
3726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
C-54

-------
110
120
c
c
c
130
C
140

ISO
C
160

170
C
ieo
190
READ (LUWN0.2) N«OT£,NAM,APT,PT
IF (N*OTE.EO. 999999) 60 TO 200
BACKSPACE LU*ND
READ (LU*ND,3) 10
READ (Lu*ND,4) XIMRM
BACKSPACE LUMND
READ (UUrtND.J) JO
IF (KPrtOAT.EO.NONO) GO TO 120
L = L + l
IF (MOD(L,51).NE.O) 60 TO 110
CALL NEWPAG(TITLE,0, JOATE)
*WITE tLOUTrl)
CONTINUE
rfSITE (LOUT, 5) NWDT6,NAM,APT,PT
WRITE (LOUTtb) XIMPH
CONTINUE

    REPLACE MISSING DATA WITH NEGATIVE INPUTS

DO 130 K s 1,24
If UQ(K).EO.IBLNK) PT(K) « -1.
IF (JQ(K).EO.IBLNK) XIMPH(K) m •!.
CONTINUE

IF (NAOTE.EQ.IOLDO) GO TO 170
IOLOO s NwQTE
IF (ICOLO.EO.O) GO TO ISO
00 140 I s 1,ICOLO
IF (IDATE(I).EO.NMOTE) GO TO 160
CONTINUE
IF (ICOLD.EQ.NFILES) GO TO 180
ICOLD a ICOUO»1
lOATE(ICOLO) a NWOTE
I = ICOLO
ICT(ICOLO) s 0
IFILEO s IFILE t I
KEMNO IFILEO
60 TO 170

CONTINUE
IF1LED = IFILE*!
CONTINUE
*RITE (IFILED) NWOTE,NAM,APT,PT,XIMPH
ICT(IFILED-IFILE) a ICT t IFILED-IFILE) * 1
GO TO 100

CONTINUE
IF (ISET.GT.O) GO TO 190
*RITE (LOUT, 7) NFILES
ISET s I
NRITE (LOUT, 5) NWDTE.NAM, APT.PT
WRITE (LOUT, 6) XIMPH

GO TO 100
                                                                        MM
                                                                        MM
                                                                        MM
                                                                        MM
                                                                        MM
                                                                        MM
MM
MM
MM
MM
                                                                        MM
                                                                        MM
                                                                        MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
    2741
    2742
    2743
    2744
MM  274S
MM  2746
MM  2747
MM  2748
MM  2749
MM  2750
    2751
    2752
MM  27S3
MM  2754
MM  2755
    2756
    2757
    2758
    2759
MM  2760
MM  2761
MM  2762
MM  2763
MM  2764
    2765
    2T66
    2767
                                                                        MM  2768
                                                                        MM  2769
                                                                        MM  2770
    2771
    2772
    2773
    2774
MM  2775
MM  2776
MM  2777
MM  2778
MM  2779
MM  2780
MM  2781
    2782
    2783
MM  2784
MM  2785
MM  2786
MM  2767
MM  2788
MM  2769
MM  2790
    2791
    2792
    2793
                                                                        MM  2794
                                                                        MM  2795
                                       C-55

-------
c
200   CONTINUE
      00 210 I  •  l.ICOLO
      IF » IFILE  *  I
      END FILE  IF
MM
MM

MM
2796
2797
2798
MM  3799

MM  2800

210
C

1
3
3
4
S
6
7



C
C
C
C
C










REMIND IF
CONTINUE

RETURN
FORMAT (//1H ,50X,9HWIND DAT*,//)
FORMAT (I6,1X,A4,A4,13X,F3.0,3X,34F3.0)
FORMAT (32X.34A2)
FORMAT (32X,24Fa.O)
FORMAT (1H ,I6,lX,A4rA4,13X,F3.0>aHPT»34F3.0)
FORMAT (in ,3ax,aaF3.0)
FORMAT (//11H MORE THAN .I3.40H DATES HAVE BEEN FOUND IN THE WIND
10ATA.,/,45H THE FOLLOWING ENTRIES COULO NOT BE ACCEPTED. t//)
END
SUBROUTINE KINDY(IWAS.LTAPE)

WINDY IS THE SECONDARY DRIVER FOR THE AIR TRAJECTORY MODULE

MODIFIED BY F,«, LURMANN (12.9.77)

DIMENSION KOLD(2),KNEW(2)
DIMENSION DDD(3)
DIMENSION AZV(ia)
OIMt\SION ID(2), 100(3)
COMMON/INPUTS/ TITLE(aO), JDATE(IO), NCURV
COMMON /AIRQAL/ NEEDAO, NOSPEC, CONAM(IO), CON (24, 25, 10)
COMMON /CNTHOL/ KSTOP, TSUN
COMMON /DATES/ IDATE(IO), ICT(IO), NFILES
COMMON /GRID/ XI, X2, Yl, Y3, NX, NY, DELX, OELY, OELT
COMMON /KZINPT/ NEEOKZ, KZPRTX, NUMSD,
MM 2801
MM 2802
MM 2803
MM 2804
MM aeos
MM 2806
MM 2807
MM 2808
MM 2809
MM 2810
MM 2811
MM 2812
MM 2813
MM 2814
MM 28 IS
MM 2816
MM 2817
MM 2818
MM 2819
MM 2820
MM 2821
MM 2822
MM 2823
MM 3824
MM 2825
MM 2826
MM 2827
MM 282S
MM 2629
1 TIMESO(3), TEMPSD(50,3), ZELVSO C50, 3)MM 28SO









C




2 , TEMP3F(24), NPTSD(3) , NKZOAT
COMMON /ORIGIN/ UTMXOR, UTMYOR
COMMON /REUSE/ KPSTAT, KPVyDAT, CONVRT, KXTRA, KPWIND
COMMON /TRAJ/ TSTART, P(2»100), IOXX(2,100)
COMHON /MDATA/ NUM3TA, SSTAN(2,85), I3TAN3 (2, 25) , RMIN, RMAX
COMMON /AHERE/ RLAT, RLONG. TMZONE
COMMON /WIND/ T(100), V(100), TH(IOO), NPT3
COMMON /WINFLO/ AWDATA(5a,25) ,DISAVE(25), I03AVE(25)
INTEGER ENTRAJ

DATA OALITE/4HDAYL/.I8LNK/1H /,NONO/«HNO /
DATA NIT/3/
DATA RTD/S7.29578/, NE6/2HNO/
DATA IDATE /10«0/
MM 2831
MM 8833
MM 2633
MM 2834
MM 2835
MM 2836
MM 2837
MM 2838
MM 2839
MM 3840
MM 2841
MM 3842
MM 2843
MM 2644
                                       C-56

-------
       DAT*  IIN.LOUT.LPUNCH /3»6,1/
       DATA  KYES/1HYES  /
       ENTR4J  =  MONO
       IF  (IftAS.GT.O) GO  TO 130

   95  CONTINUE

       READUIN.9)  KPSTAT.KPHOAT
       R£AO(LIN,9)  KXTRA
       REAOCLIN.ll) CONVRT
       IF  (CONVRT.LE.O.)  CONVRT «  1,0
       REAO(LIN,11)   UTMXOR,  UTMYOR
       READ(LIN,ll)   DELX,  DELY
       READ(LIN,31)   NX,  NY
       READriIN,ll)   RMIN,  RMAX
       RUIN  s  RMIN»»2
       RMAX  ~  hMAX**2
       CALL  SETIN
       IF  (KPSTAT.EO.NONO) GO  TO  120
       CALL  NE»P*G(TITLE,0,JDATE)
       «RITECLOUT,1)
       00  110  I  s  1,NUMSTA
       IF  ("f)3(I,52).NE.O) GO  TO  100
       CALL  (.EWP»S(TITLE,0,JOATE)
       *RITE(LOUT,1)
       CONTINUE
       *RITE(LOUT,2)  ISTANS(J,I),ISTAN3(2,I),SSTANCl,I),33TAN(8,I)
       CONTINUE
       CONTINUE
       IF(ENTRAJ.EQ.KYES)  GO  TO  333
100
no
120
c
c
 c
 130
 C
 C
 C
132
      READ *IND DATA
      CALL nINDRD(LTAPE,KPWD«T,TITLE,JDATE)
      I»AS = 1

      CONTINUE

      READ CASE DATA

      ICASES « 1
      IK s 0
      REAO(LIN,6)  IOT.XLCL
      TSUN a 0.
      R£AO(LIN,9)  3TIME
      IF (STIME.EO.DALITE) TSUN •  0100.
      ILCL « IFIX(XLCL)
      1ST = IFIX(XLCL«T3UN)
      REAn(LIN,10)  IO,XS,YS ,
      XS s X3 » UTMXOR
      Y8 = YS - UTMYOR
      REAOtLIN.ll)  TTOTAL
      REAO(LIN.ll)  DTSEG
      ITN > IFIX(60.*DT3E6)
      NN s IFIX((TTOTAL+0.9*OTSEG)/OTSEG)
                              IF(ID(1).NE.IBLK)GOTO  132
                                                                       MM  28a5
                                                                       MM  aaab
                                                                       MM  2647
                                                                       MM  2848
                                                                       MM  2849
MM
MM
                                                                           2850
                                                                           2851
MM  2852
MM  2653
MM  2654
MM  2655
MM  2856
MM  2857
MM  2858
MM  2859
MM  2860
MM  2661
MM  2862
MM  2863
MM  2864
MM  2865
MM  2866
MM  2667
MM  2868
MM  2869
MM  2870
MM  2871
MM  2872
MM  2873
MM  2874
MM  2875
MM  2876
MM  2877
MM  2878
MM  2879
MM  2880
MM  2881
MM  2832
MM  2883
MM  2884
MM  2885
MM  2886
MM  2887
MM  26S6
MM  2689
MM  2890
MM  2891
MM  2692
MM  2893
MM  2894
MM  2895
MM  2896
MM  2897
MM  2898
MM  2899
                                       C-57

-------
                                    24 HOUR CLOCK » LOCAL TIME
                                    34 HOUR CLOCK - STANDARD TIME
    READ(LIN,11)  AZ.VEL
    REAO(UI'
-------
180
C
HO
200
210
C
C
      i«RITE(LOUT,16) XSfYS
      IF UDCl).EQ.IBl.NK) WRITE (LOUT, 1?)
      IF (lOU).NE.IBLNK) WRITE (LOUT, 18) 10
IF (VEL.GT.O.) WRITEUOUT.80) AZ,VEl
r'RITE(LOUT,81)
IF (ITF.GE.O) WRITE(LOUT,22)
IF (ITF.LT.O) WRITE(LOUT,23)
            4) TTOTAL
            S) OTSE6
*RITE(LOUT,86) NC
IF (IRF.EO.l) WRITE(LOUT,87)
IF (IRF.E0.8) WRITE(LOUT,88)
IF(KXTRA.EO.KYES)  WRITE (LOUT, 33)

KOLO(l) = 1ST
K(UO(8) * IOT
KNEM(l) « 1ST
Ki£«(8) s IDT
IDU(l) s 10(1)
100(8) s io(a)
If (ITF.LT.O) CALL DATE (KOLO, ITN, ITF, KNEW)
IF (VEL.GT.O.) GO TO 190
CALL GETAZV(KNEW,IOD,XS,YS,NC,AZV,NGD,DOO)
IF (NGD.LE.O) GO TO 180
CtLL AZVOIS(NGD,AZV,DDO,AZ,VEL.IRF>
VEL a VEL»CONVRT
GO TO 190

CONTINUE
IK s IK-1
nRITE(LOUT,3)
GO TO 280
CONTINUE
IK = i
P(l,l) *
               XS
               YS
NTM a 0
X>*UL = OTSEG
IF (ITF.GT.O) GO TO 200
XMUL » "DTSEG
T(t) = FLOAT(KOLOd))
IK a a
GO TO 850
CONTINUE
IF (KXTRA.EO.KYES) WRITE (LOUT, «) KOLO,XS,Y8
IF (UF.6T.O) GO TO 310
KOLD(l) s KNEW(l)
KOLD(a) » KNEW(2)
CONTINUE

APPLY MOVE NOW TO GET NEW POINT
ANG s 90. -AZ
IF (ANG.LT.O.) ANG * ANG+360.
MM  Z955
MM  3956
MM  2957
MM  Z958
MM  29b9
MM  2960
                                                                        MM
                                                                        MM
                                                                        MM
MM
MM
MM
MM
MM
MM
MM
    8961
    2968
    2963
MM  2964
MM  2965
MM  8966
MM  8967
MM  £968
MM  2969
MM  2970
MM  2971
MM  2978
MM  2973
MM  a?7«
MM  2975
MM  3976
MM  8977
MM  8978
MM  2979
MM  8980
MM  2981
MM  8988
MM  2983
MM  298a
MM
MM
2985
8986
2987
8988
2989
2990
8991
2992
2993
MM  2994
MM  8995
MM  8996
MM  2997
MM  8998
MM  8999
MM  3000
MM  3001
MM  3008
MM  3003
MM  3004
MM  3005
MM  3006
MM  3007
MM  3008
MM  3009
                                      C-59

-------
2>0
3*0
4'iGUSt • AN6/57, 89577951
KJO • FLOAT(KQLD(1))
VCim • VIL
TH(llk) • AKOUSI
I» (lITIt.lt0.KTII) MITKLOUT.S) XOLO,VEL,ANG,(AZV(I),IM,1Z,«)
     * i»*mm*cos(Au»usi)*vEL
     * VS«I»UL*SIN(AftftWM)*VEL
CALL OAMIUUlNffe.VMCH.lS.VSiOK)
IF (oi.LT.t.) eo TO s«
CALL tOtl(m«.m».lTF,I(DCE)
ir iicoM) ]>•»«>•••••
COMT1MUI
ir (HIM. M. MM) to 10 >••
MM • MTM«|
CONTINUE
»S a »«(•
V«
               >0 TO *••
CALL 0<1II«OLO»ITN,ITr,l(MfW)
IV  (IT'.LT.O) »0 TO l«»
•0LDII) * 1111*11)
KIU.OI2) • ••»•»(•)
COWI1MIC
100111 * IOLIW
100 (») * 10LNI
C*LL
IF  (NGQ.Lf.Q) CO TO 180
C*U
                                                 NIT  ITERATIONS
      LASt NOtfl CMC*
      \f

      IN *
      M( 4Ult 60T * HIM AZIMUTH AND VELOCITY
      IF nf »M HOVIHt MCKWAID IN TIME, THERE FOLLOW
      TO MtriMl TM( UIMUTM AND VELOCITY.
      IN1T  I* MT IN A OtTA STATEMENT ABOVE.)

      Ittllf.•?.•)  00 TO II*
      COMTIfcUf
      IF  (MIT. tO.t) 00 TO IT*
      00  ?»0 IT • I, WIT
      Alt! • *».•*!
      IF  (*t»t.LT.t.) AN»t • »NCt«)«l.
      •NftfW
                                                                        MM  3010
                                                                        MM  3011
                                                                        MM  3013
                                                                            1015
                                                                            3011
                                                                            3015
                                                                            3016
                                                                            3017
                                                                            3018
                                                                            3019
MM
MM
MM
MM
MM
MM
MM
MM  3020
MM  3821
MM  3022
MM  3023
    3020
    3025
    3026
    3027
    3028
    3029
    3030
    3031
    3032
    3033
    J03a
    3035
MM
MM
MM
MM
MM
MM
MM
MM
MK
MM
MM
MM
MM  3036
MM  3037
MM
MM
MM
    3038
    3039
    3040
MM  3041
    3042
    3043
    3044
    3045
    3046
    3047
    3048
    3049
    3050
    3051
    3052
    3053
      CALL OA»lll(l«lllf»TNVf«IO(fO,OH)
      If  <0«.kt.«) 90 10 111
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM  3054
MM  3055
MM  3056
MM  3057
MM  30SS
MM  3059
MM  S0*0
MM  30«>1
MM  10*2
MM  30*3
MM  10*4
                                       C-60

-------
260
270
C
260
290
300
100(1) s IBLNK
100(2) a IBLNK
CAUL GETAZV(KNEW,IDO,XNUT,YNUT,NC,AZV,NGO,ODD)
IF (N&O.LE.O) GO TO 180
CALL AZVOIS(NGD,AZV,DDO,AZ,VEL,IRF)
VEL s V£L«CONV«T
CONTINUE
CONTINUE
NTM s NTMM
GO TO 200

CONTINUE
NPTS * IK

IF (ITF.GT.O) GO TO 300

REVERSE THE ORDER OF THE TIME, VELOCITY, AND ANGLE LISTS

NXY a (IK-MODCIK,2))/2
00 290 K > l.NXY
J a IK»K»1
TT s T(K)
T(K) = T(J)
t(J) = TT
VV = V(K)
V(K) = V(J)
V(J) = VV
At z TH(K)
TH(K) s TH(J)
TH(J) x M
CONTINUE
VllK) * V(IK-l)
TH(IK) = TH(IK-l)
P(l,l) a XS
P(2,l) » YS

IF (KPWINO.EO.NEG) GO TO 308
»»ITE(LPUNCH,30)  TITLE
A r P(l,l) * UTMXOR
6 = P(2,l) » UTMYOR
WWITE(LPUNCH,47)  A, B
IF(TSUN.EO.O.)  MRITE(LPUNCH,48)
IF(TSUN.GT.O.)
DO 305 I « l.NPTS
      A = TH(I)*RTD
      8 = TIMINCTCD)
      «»ITE(LPUNCM,32)
  JOS CONTINUE
      A = -100.
      *HITE(LPUNCH,S2)
308   CONTINUE
C
      GO TO SOO
C PRINT MESSAGE
6,  V(I),
                                                MM  3065
                                                MM  3066
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
    3067
    3068
    3069
    3070
    3071
    3072
    3073
    3074
    3075)
    3076
    3077
    3078
    3079
    3080
MM  3081
    3062
    3083
    3084
    3085
    3086
    3087
    3088
    3089
    3090
    3091
    3092
    3093
    3094
    3095
    3096
    3097
    3098
    3099
    3100
    3101
    3102
    3103
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM  3104
                                                MM  3105
                                                MM
                                                MM
                                                MM
                                                MM
    3106
    3107
    3108
    3109
MM  3110
MM  3111
MM  3112
MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
                                                MM
    3113
    3114
    3115
    3116
    3117
    3118
    3119
                                      C-61

-------
310


320



3SO



 332
C
C
C
C
C
CONTINUE
X'iE* = XNUT
YiwEHi = YMJT
CONTINUE
IF(ITF.LT.O)
             IK a IK - J
              XS,YS,XNE*,YNE»
GO TO 280
CONTINUE
IK s IK-I
*R1TE)  P(l,l)< P(2,l)
      *SITE(LOUT,26) NC
      If (IRF.EO.l) WRITE{LOUT,87)
      IF (IRF.EQ.2) MRITECLOUT,28)
      DO 360 J *  l.NPTS

      V(J) = VCJ)*CONVRT
 360  CONTINUE
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MX
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
3120
3121
3122
3123
3124
3125
3126
3187
3120
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
                                          C-62

-------
 500  CONTINUE
 510
  515
  520
  530
 CALL CROSIT
 IFUSTOP.GT.O)  60 TO 5«0

 CALL EMETIN

 CONVERT TIME FROM MINUTES TO 2400 - HOUR CLOCK AND CONVERT
 AIND SPEEDS FROM KILOMETERS/MINUTE TO METERS/SECOND
 OT = T(2) - TCI)  * .001
 T(l) s T5TART
 V(l) x V(l)«16.666667
 00 510 J = 2.NPTS
 IFU.GT.100)  GO TO SIS
 OTMXT s T(J+1) • T(J) * .001
 T(J) s CLOCKTf T(J-l) , OT)
 OT s OTNXT
 V(J) = V(J)*16.666667
 CONTINUE
 CONTINUE

 IFCvEEDAO.NE.KYES)  60 TO 530

 CALL N£nPAG(TITLE,0,JDATE)
 KNEft(2) » IDT
 DO 520 J s 1,NPT3
 KNEKt) « IFIX(TCJ))
 CALL KSECLS 4X,2F6.2)
 FORMAT ClH+,4nx,I6,4X,I6>4X,2F8.2,2X»3(2X,A4))
 FORMAT (27HOPOINT MOVED ACROSS BARRIER.iC«X,2F10.2)//)
 FORMAT (/42HOTRAJECTORY BACKED MORE THAN 15 KM  OF GRID    //)
 FORMAT (40X,I6,4X,F4.0)
 FORMAT (40X,A4,6X,A4)
 FORMAT (40X,2A4,2X,2F10.0)
 FORMAT (40X.2FIO.O)
 FORMAT («OX,I2)
 FORMAT (///,33H  AIR TRAJECTORY CALCULATION DATA ,///
1  47H     START DATE AND LOCAL TIME AT INITIAL  POINT,13X,16,4X,
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
KM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
I4JMM
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3301
3202
3203
320
-------
ia
15
16
17
18

19

20
21
22
as
24
35
26
a?
as
30
31
32
33

07
as
09


C
c
C
C
C
C
c
c
c
c
c
c
c
c


c



100
c



FORMAT UH+,73X,20H MRS (STANDARD TIME))
FORMAT (lM+,T3X,aOH HRS (DAYLIGHT TIME))
FONMAT ( /,30H LOCATION OF INITIAL PC ! i , , juX , F6.2, 4X,F6.2, 3X)
FORMAT (1H+,78X,30H(NOT AT A MEASUREMENT 3 ATIUN))
FORMAT (iH+,7Bx,iH(,A4,A4,23H MEASUREMENT -.TATION) )

FORMAT (/,
1 5«.H PRESCRIBED STARTING AZIMUTH AND VELOCITY (OPTIONAL) )
FOkMAT (IH*,59X.F&.2,4X,F6.a, 6H KM/HR )
FORMAT ( /,UOH DIRECTION UF TRAJECTORY DEVELOPMENT )
FQXMAT (IH+,59X,7HFORHARO )
FORMAT (1H+ ,59X,8H8ACKWARD )
FORMAT ( /,32H DESIRED TRAJECTORY DURATION, a8X,F5, 1 ,4H MRS )
FORMAT ( /,30H TRAJECTORY SEGMENT LENGTH, 30X.F5. 1 , 4H MRS )
FORMAT ( /,42H MEASUREMENT INTERPOLATION SCHEME ,i8x,m
FORMAT (1H+,60X,39H CLOSEST STATIONS WITH 1/R WEIGHTING ,//)
MM 3230
MM 3231
MM 3232
MM 323i
MM 3234
MM 3235
MM 3236
MM 3237
MM 3238
MM 3239
MM 3240
MM 3241
MM 3242
MM 3243
MM 3244
MM 3245
FQKMAT (1H+,60X,42H CLOSEST STATIONS WITH 1/R«*2 WEIGHTING , //)MM 3246
FORMAT (20A4)
FORMAT (40X.2I10)
FORMAT (aOX,3F10.3)
FORMAT (1HO,//,17H OLD TIME . DATE ,7X, 1HX.5X, 1HY, 10X,
1 16HI<.E^I TIME • DATE . bX , 1 6HVELOC ITY AZIMUTH ,OX,8H3TATION3 ,/)
FORMAT (23HSTART LOCATION (COORDS), i7x,aFio. a)
FORMAT (30HIS LOCAL TIME STANDARD OR DA YL IGMT , 6X , 8HSTANOARD)
FORMAT (3flMlS LOCAL TIME STANDARD OR DAYLIGHT, 6X,8HDAYLIGHT)
END
SUBROUTINE WSECLS(X,Y,DIS,IDIS)

THIS SUBROUTINE CALCULATES SQUARED DISTANCES FROM A GIVEN
MM 3247
MM 32«8
MM 3249
MM 3250
MM 3251
MM 3252
MM 3253
MM 3254
MM 3255
MM 3256
MM 3257
MM 3258
POINT TO EACH OF A SET OF POINTS AND THEN ORDERS THE DISTANCESMM 325S
OUT TO A MAXIMUM VALUE.

X X COORDINATE OF GIVEN POINT
Y Y COORDINATE OF GIVEN POINT
OIS THE SQUARE OF THE DISTANCE FROM THE GIVEN POINT TO
ALL THE POINTS IN THE POINT SET. THOSE VALUES OF
DIS LESS THAN RMAX ARE ARRANGED IN INCREASING
ORDER AT THE TOP OF THE TABLE.
IDIS THE NUMBER OF THE POINT IN THE POINT SET
CORRESPONDING TO THE OIS ARRAY

DIMENSION DlS(a), IDIS(2)
COMMON /MOATA/ NUMSTA, 3STAN(2,25), ISTANS (2,25) , RMIN, RMAX

DO 100 I B 1, NUMSTA
IDIS(I) z I
DIS(I) = 
-------
110
C
120
1
1
2
3
4
5
6
7
a
9
I
2
3
4
5
6
7
a
9

NMIN s NMIN»N»1
IF (FMIN.GT.RMAX) 60 TO 120
J = IDIS(N)
lOIS(N) e IDIS(NMJN)
IDIS(NMIN) a J
XK = OIS(N)
DIS(N) » FMIN
OISCMM1N) « XX
CONTINUE
RETURN
END
BLOCK DAT*
BLOCK DAT* PROGRAM NUMBER ONE
VARIABLE flit CRUX JD CUMBERS FOR ST. LOUIS
INTEGER Al, A2, A3, A4, AS, A6, A7, A8
DIMENSION AK341), »2(370), A3(«39) , A4(441),
A5(319)> A6(315), A7(308), Afl<248)
COMMON /VGRIO/ ITGRID, IVG(lOOilOO)
EQUIVALENCE (A 1 ( 1 ) » I VG ( 1 , 1 ) )
EQUIVALENCE (A2C1), IVG(42,4))
EQUIVALENCE (A3U),IVG(12,B))
EQUIVALENCE (A4(U,IVGt51,12))
EQUIVALENCE (AS (1 ) , IVG(92, 16) )
EQUIVALENCE (A6(1),IVG(11.20)}
EQUIVALENCE (A7C1), JVG(26,23))
EQUIVALENCE (A8 C 1 ) , I VG (34, 26) )
DATA ITGRID /4HYES /
DATA Al/
64,
147,
348.
4* 695,
4*1373,
4*1616,
4* 79,
4* 214,
528,
1205,
1582,
72,
181,
426,
4* 878,
2*2335,
4*1633,
9* 96,
DATA A2/
4* 64,
4* 147,
395,
876,
2335,
1633,
96,
291,
4* 528,
4*1205,
4*1582,
4* 72,
4* 181,
468,
1056,
2362,
64,
107,

72,
161,
424,
4* 878,
2*2335,
4*1633,
9* 96,
4* 291,
695,
1373,
1616,
79,
214,
496,
4*1056,
2360,
4* 64,
4* 147,

4* 72,
4* 181,
467,
1056,
2361,
64,
147,
349,
4* 695,
4*1373,
4*1616,
4* 79,
4* 214,
528,
1205,
1582,
72,
181,

79,
214,
1* 467,
4*1056,
1*2361,
4* 64,
4* 147,
396,
878,
2335,
1633,
96,
291,
4* 528,
4*1205,
4*1582,
4* 72,
4* 181,

4* 79,
4* 214,
528,
1205,
1582,
72,
181,
425,
4* 878,
2*2335,
4*1633,
9* 96,
4* 291,
695,
1373,
1616,
79,
214,

96,
291,
4* 528,
4*1205,
4*1582,
4* 72,
4* 161,
467,
1056,
2361,
64,
147,
350,
«* 695,
4*1373,
4*1616,
4* 79,
«» 214,

MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
9* 96, MM
4* 291, MM
695, MM
1373, MM
161 6, MM
79, MM
214, MM
1* 467, MM
4*1056, MM
1*2361, MM
4* 6
-------
1
2
3
a
5
6
7
8
9
1
2
J
4
5
6
7
8
9

1
2
3
a
5
6
7
8
9
1
2
3
a
5
6
7
8
9

1
2
S
n
5
6
7
6
9
1
2
3
4
5
6
7
8
1» 291,
695,
1373,
4*1582,
1* 72,
4* 181,
070,
1056,
2318,
4*1633,
4* 12b,
9,
4* 355,
4*1375,
4* 81,
4* 163,

4* 530,
9*1480,
4* 99,
4* 216,
9* 697,
9*1617.
4* 127,
4* 293,
9*1057,
9* 65,
4* 149,
4* 355,
4*1375,
4* 82,
4* 184,
2*2186,
9* 697,
398,
678,
2336,
4*1616,
4. 79,
4* 214,
528,
1205,
1*2363,
9* 65,
4* 148,
400,
879,
1617,
126,
292,
4* 696,
9*1480,

4* 97,
4* 215,
696,
1480,
97,
215,
4* 529,
4*1374,
4* 80,
4* 182,
529,
1374,
81,
183,
530,
1480,
98,
216,

697,
1617,
127,
293,
1057,
65,
149,
355,
1375,
81,
183,
530,
1480,
99,
2086,
2203,
1056,
427,
4* 878,
1*2336,
1633,
96,
291,
4* 528,
4*1205,
1582,
80,
182,
429,
4* 879,
9*1617,
4* 126,
4* 292,
879,
1617,

126,
292,
4* 696,
9*1480,
4* 97,
4* 215,
696,
1480,
97,
215,
4* 529,
4*1374,
4* 81,
4* 183,
4* 530,
9*1480,
4* 98,
4* 216,

9* 697,
9*1617,
4* 127,
4* 293,
9*1057,
9* 65,
4* 149,
4* 355,
4*1375,
4* 81,
4* 183,
4* 530,
9*1480,
4* 99,
2*2088,
2*2203,
1*1056,
469,
1056,
2347,
1*1633,
9* 96,
4* 291,
695,
1373,
4*1582,
4* 80,
4* 182,
471,
1057,
65,
148,
354,
4* 879,
9*1617,

4* 126,
4* 292,
879,
1617,
126,
292,
4* 696,
9*1480,
4* 97,
4* 215,
696,
1480,
98,
216,
697,
1617.
127,
293,

1057,
65,
149,
355,
1375,
81,
183,
530,
1480,
98,
216,
697,
1617,
128,
2129,
2232,
1116,
- ®'' t
4* ; 156,
2., S3,
'',
1 7,
352,
4* 695,
4*1373,
1616,
97,
215,
499,
9*1057,
9* 65,
4* 148,
3* 354,
1057,
65,

148,
354,
4* 679,
9*1617,
4* 126,
4* 292,
879,
1617,
126,
292,
4* 696,
9*1480,
4* 98,
4* 216,
9* 697,
9*1617,
4* 127,
4* 293,

9*1057,
9* 65,
4* 149,
4* 355,
4*1375,
4* 81,
4* 183,
4* 530,
9*1480,
4* 98,
4* 216,
9* 697,
9*1617,
4* 128,
2*2129,
1*2232,
1145,
528,
1205,
1*2363,
4* 64,
4* 147,
399,
878,
2336,
4*1616,
4* 97,
4* 215,
529,
1374,
80,
162,
500,
9*1057,
9* 65,

4* 146,
3* 354,
1057,
65,
146,
354,
4* 679,
9*1617,
4* 126,
4* 292,
679,
1617,
127,
293,
1057,
65,
149,
355,

1375,
81,
163,
530,
1480,
98,
216,
697,
1617,
127,
293,
1057,
66,
150,
2151,
2246,
11T4,
4* 528, MM
4*1305, MM
1582, MM
72, MM
181, MM
428, MM
4* 878, MM
1*2336, MM
1633, MM
126, MM
292, MM
4* 529, MM
4*1374, MM
4* 80, MM
4* 182, MM
529, MM
1374, MM
80/MM
MM
182, MM
501, MM
9*1057, MM
9* 65, MM
4* 148, MM
3* 354, MM
1057, MM
65, MM
148, MM
354, MM
4* 879, MM
9*1617, MM
4* 127, MM
4* 293, MM
9*1057, MM
9* 65, MM
4* 149, MM
4* 355/MM
MM
4*1375, MM
4* 81, MM
4* 183, MM
4* 530, MM
9*1480, MM
4* 96, MM
4* 216, MM
9* 697, MM
9*1617, MM
4* 127, MM
4* 293, MM
9*1057, MM
9* 66, MM
4* 150, MM
2*2151, MM
2*2246, MM
1206, MM
3334
3335
3336
3337
3336
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
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3360
3381
3382
3383
3364
338S
3366
3387
3388
C-66

-------
9
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
a
9

1
2
3
a
5
6
7
8
9
1
2
3
4
5
6
T
8
9

1
2
3
4
5
6
7
a
9
1
2
3
4
*>
t>
4*1206,
OAT* »5/
4*1618,
4* 99,
2*8088,
2*2205,
1*1056,
1«81,
6f>,
150,
2151,
2246,
1206,
1618,
99,
2089,
2171,
2236,
1148,
1583,
DATA A6/
82,
184,
2152,
2218,
1059,
1481,
66,
151,
2153,
2219,
1060,
1584,
2028,
2090,
2191,
698,
1377,
66,
DATA *7/
151.,
2154,
2220,
1060,
1584,
2028,
2090,
2192,
698,
1377,
66,
151,
2134,
2207,
698,
1376,
1634,
128,
2129,
2232,
1117,
4*1481,
9* 66,
4* 150,
2*2151,
2*2246,
4*1206,
4*1618,
4* 99,
1*2069,
1*2171,
1*2236,
1177,
4*1583,

4* 82,
4* 184,
1*2152,
1*2218,
2*1059,
4*1481,
9* 66,
4* 151,
1*2153,
1*2219,
4*1060,
9*1584,
4*2028,
3*2090,
1*2191,
4* 698.
4*1377,
9* 66,

4* 151,
1*2154,
1*2220,
4*1060,
9*1584,
4«2028,
3*2090,
1*2192,
4* 698,
4*1377,
9* 66,
4* 151,
1*2134,
1*2207,
4* 698,
4*1376,
4*1634,
4* 128,
2*2129,
1*2232,
1146,
1583,
82,
184,
2188,
697,
1376,
1634,
128.
2111,
2190,
2247.
1206,
1618,

99,
2089,
2171,
2236,
1149,
1583,
2026,
185,
2172,
2237,
1207,
1635,
129.
2132,
2205,
880,
1482,
2026,

185,
2173,
2237,
1207,
1635,
129,
2133,
2206,
880,
1482,
2026,
18%,
215S,
2221,
880,
1481,
66,
150,
2151,
2246,
1175,
4*1583,
4* 82,
4* 184,
2*2188,
9* 697,
4*1376,
4*1634,
4* 128,
1*2111,
1*2190,
1*2247,
4*1206,
4*1618,

4* 99,
1*2089,
1*2171,
1*2236,
1178,
4*1583,
4*2026,
4* 185,
1*2172,
3*2237,
4*1207,
4*1635,
4* 129,
1*2132,
1*2205,
4* 880,
4*1482,
4*2026,

4* IBS,
1*?173,
3*2237,
4*1207,
4*1635,
4* 129,
1*2133,
1*2206,
4* 880,
4*1462,
4*2026,
4* 185,
1*2155,
1*2221,
4* 680,
4*1491,
9* 66,
4* 150,
2*2151,
2*2246,
1206,
1618,
99,
2088,
2203,
1059,
1481,
66,
150,
2131,
2204,
697,
1376,
1634,

128,
2111,
2190,
2247,
1206,
1618,
2028,
2090,
am,
698,
1377,
66,
151,
2153,
2219,
1060,
1584,
2028,

2090,
2192,
698,
1377,
66,
151,
2154,
2220,
1060,
1584,
2028,
2091,
2174,
2236,
1060,
1563,
82,
184,
2168,
697,
4*1206,
4*1618,
4* 99,
2*2088,
2*2203,
2*1059,
4*1481,
9* 66,
4* 150,
1*2131,
1*2204,
9* 697,
4*1376,
4*1634,

4* 128,
1*2111,
1*2190,
1*2247,
4*1206,
4*1618,
4*2028,
3*2090,
1*2191,
4* 698,
4*1377,
9* 66,
4* 151,
1*2153,
1*2219,
4*1060,
9*1584,
4*2028,

3*2090,
1*2192,
4* 696,
4*1377,
9* 66,
4* 151,
1*2154,
1*2220,
4*1060,
9*1584,
4*2028,
1*2091,
1*2174,
1*2238,
4*1060,
4*1583,
4* 82,
4* 184,
2*2188,
9* 697,
1376,
1634,
128,
2129,
2233,
1147,
1583,
82,
184,
2152,
2218,
1059,
1481,
66,

150,
2131,
2204,
697,
1376,
1634,
129,
2132,
2205,
880,
1482,
2026,
165,
2172,
2237,
1207,
1635,
129,

2133,
2206,
880,
1482,
202b,
185,
2173,
2237,
1207,
1635,
129,
2112,
2193,
2248,
1207,
1618/MM
MM
99, MM
208S,MM
2203, MM
1058, MM
4*1376, MM
4*1634, MM
4* 128, MM
2*2129, MM
2235, MM
1176, MM
4*1583, MM
4* 82, MM
4* 184, MM
1*2152, MM
1*2218, MM
2*1059, MM
4*1481, MM
9* 66/MM
MM
4* 150, MM
1*2131, MM
1*2204, MM
9* 697, MM
4*1376, MM
4*1634, MM
4* 129, MM
1*2132, MM
1*2205, MM
4* 880, MM
4*1482, MM
4*2026, MM
4* 185, MM
1*2172, MM
3*2237, MM
4*1207, MM
4*1635, MM
4* 129/MM
MM
1*2133, MM
1*2206, MM
4* 880, MM
4*1482, MM
4*2026, MM
4* 185, MM
1*2173, MM
3*2237, MM
4*1207, MM
4*1635, MM
4* 129, MM
1*2112, MM
1*2193, MM
1*2218, MM
4*1207, MM
3389
3390
3391
3592
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
C-67

-------
7
a
9

1
2
3
a
5
6
7
8
9
t
2
3
4
5
6
7
a
9

1377,
67,
2039,
DAT* A8/
2075,
2155,
2221.
881,
9*1208,
9» 67,
1*2039,
1*2075,
1*2156,
1*2222,
1* 881,
1483,
2027,
20U9,
2092,
2175,
2239,
950,
END
1*1377,
9* 67,
1*2039,

1*2075,
1*2155,
1*2221,
1* 681,
1483,
2027,
2018,
2092/
2175,
2239,
919,
«*1183,
1*2027,
1*2019,
1*2092,
1*2175,
1*2239,
991,

1482,
2027,
2018,

2091,
2171,
2238,
918,
4*1483,
1*2027,
1*2018,
1*2092,
1*2175,
1*2239,
990,
1581,
2029,
2058,
2113,
2194,
22«9,
1027,

4*1182,
4*2027,
1*2048,

1*2091,
1*2171,
1*2238,
990,
1584,
2029,
2057,
2113,
2194,
2249,
1* 990,
9*1584,
1*2029,
1*2058,
1*2113,
1*2194,
1*2249,
1061,

1584,
5029,
2057,

2112,
2193,
2248,
1* 990,
9*1584,
4*2029,
1*2057,
1*2113,
1*2194,
1*2249,
1061,
1636,
130,
2066,
2135,
2208,
699,
4*1061,

9 a 1 1 ", '4 ,
-1-2J29,
1-2057,

I*ill2,
1*2193,
1*2248,
1061,
1636,
130,
2065,
2135,
2208,
699,
4*1061,
4*1636,
4* 130,
1*2066,
1*2135,
1*2208,
4* 699,
1206,

1635,
130,
2065,

2134,
2207,
699,
4*1061,
4*1636,
4* 130,
1*2065,
1*2135,
1*2208,
4* 699,
1208,
67,
2040,
2076,
8156,
2222,
863,
9*1208,

4*1635, MM
4* 130, MM
1*2065/MM
MM
1*2134, MM
1*2207, MM
4* 699, MM
1208, MM
67, MM
2039, MM
2075, MM
2156, MM
2222, MM
881, MM
9*1208, MM
9* 67, MM
1*2040, MM
1*2076, MM
1*2156, MM
1*2222, MM
922, MM
1463/MM
MM
3444
3445
3446
3447
3446
3449
3450
3451
3152
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3465
3464
3465
3466
BLOCK DATA

VARIABLE SIZE GRID ID NUMBERS FOR ST.
BLOCK DATA PROGRAM NUMBER TWO


LOUIS





INTEGER A9.A10>A11,A12,A13,A14,A15,A16,A17,A18
DIMENSION <9(265),
2 A10(254), A1K255), A12C229),
3 A15(203), A16(202), A17C202),
COMMON /VGRID/ ITGHID, IVGUOO,100)
EQUIVALENCE (»9 ( 1 ) , I VG (82, 26) )
EUUIVALENCE ( A 1 0 ( 1 ) , I VG (47 , 31 ) )
EQUIVALENCE (Al 1 (1 ) , IVG (1 , 34) )
EQUIVALENCE (A] 2(1 ), IVG (56, 36) )
EUUIVALENCE ( A 1 3 C 1 ) , IVG (85, 38) )
EQUIVALENCE (A14(l) , IVG(27,41))
EOUIVALENCE (A15(1),IVG(38,43))
EQUIVALENCE (A16(i),IVG(41,45))
EOUIVALENCE (A17 (1 ), IVG (43,47) )
EQUIVALENCE (*18(1),IVG(1S,19))
EQUIVALENCE ( Al 9 ( 1 ) , I VG (47 , 51 ) )

DATA A9/
1 I 4*1483, 1584, 9*1584, 163SU 4*1636,
2 4*2027, 2029, 4*2029, 130, 4* 130,
3 1*2049, 2058, 1*2056, 2066, 1*2066,
4 1*2093, 2114, 1*2114, 2136, 1*2136,
5 1*2176, 2195, 1*2195, 2209, 1*2209,
6 1*2240, 2250, 1*2250, 699, 4* 699,
7 992, 1026, 1061, 4*1061, 1206,
A13(212)
A18C202)














67,
2040,
2076,
2157,
2223,
883,
9*1208,




,A19
, A141211),
, A19(212)














9* *7,
1*2040,
1*2076,
1*2157,
1*2323,
1* 683,
1463,














MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
202*> MM
2049, MM
2093, MM
2176, MM
2241
),MM
951, MM
4*1463, MM
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3464
3485
3466
3487
3488
3489
3490
3491
3492
3493
3494
3495
C-68

-------
8
9
1
2
3
a
5
6
7
S
9

1
2
3
a
5
6
7
6
9
i
2
3
a
5
6
7
6
9

1
2
3
4
5
6
7
8
9
1
2
3
a
5
6
7
8
9

1
a
3
4
5
1584,
2029,
2059,
2114,
2195,
2250,
1029,
9*1584,
4*2030,
1*2059,
1*2115,
DATA MO/
1*2(96,
1*2251,
1*2270,
4*1484,
9* 67,
1*2042,
1*2094,
1*2177,
1*2241,
1*2262,
9*J2»S,
(1*1637,
«• 131,
3*2068,
1*2159,
1*2225,
2263,
1484,
DATA AH/
67,
2043,
2095,
2178,
2242,
2*2263,
4*1484,
9* 67,
t*2043,
1*2096,
1*2179,
1*2243,
2273,
1585,
73,
156,
2139,
2212,
DATA A12/
702,
1« 994,
3*1378,
4*1566,
4. 73,
9*1584,
4*2029,
1*2059,
1*2114,
1*2195,
1*2250,
1061,
1636,
131,
2067,
2137,

2210,
2256,
2279,
1585,
85,
2051.
2115,
2196,
2251,
2270,
14«4,
67,
2042.
2095,
2178,
2'42,
2*2263,
4*14H4,

9* 67,
1*2043,
1*2095,
1*2178,
1*2242,
2273,
1585,
85,
2052,
2117,
2198,
2253,
2*2273,
4*1585,
4* 73,
4* 156,
1*2139,
1*2212,

741,
1063,
1459,
1620,
86,
1636,
130,
2067,
2136,
2209,
699,
4*1061,
4*1636,
a* 131,
1*2067,
1*2137,

1*2210,
1*2256,
1*2279,
4*1585,
4* 85,
1*2051,
1*2115,
1*2196,
1*2251,
1*2270,
4*1484,
9* 67,
1*2042,
1*2095,
1*2178,
1*2242,
2273,
1565,

85,
2052,
2116,
2197,
2252,
2*2273,
4*1585,
4* 85,
1*2052,
1*2117,
1*2198,
1*2253,
1062,
1619,
86,
189,
2160,
2226,

776,
4*1063,
1485,
4*1620,
4* 86,
4*1636,
4* 130,
1*2067,
1*2136,
1*2209,
4* 699,
1208,
67,
2041,
2077,
2158,

2224,
2261,
1062,
1619,
2030,
2060,
2137,
2210,
2256,
2279,
1585,
85,
2051,
2116,
2197,
2252,
2*2273,
4*1585,

4* 85,
1*2052,
1*2116,
1*2197,
1*2252,
1062,
1619,
2030,
2061,
2139,
2212,
2259,
4*1062,
4*1619,
4* 86,
4* 189,
1*2160,
1*2226,

813,
2304,
1506,
1637,
103,
67,
2041,
2077,
2157,
2223,
883,
9*1208,
9* 67,
1*2041,
1*2077,
1*2158,

1*2224,
1*2261,
4*1062,
4*1619,
4*2030,
1*2060,
1*2137,
1*2210,
1*2256,
1*2279,
4*1565,
4* 85,
1*2051,
1*2116,
1*2197,
1*2252,
1062,
1619,

2030,
2061,
2138,
2211,
2258,
4*1062,
4*1619,
4*2030,
1*2061,
1*2139,
1*2212,
2260,
1208,
1637,
103,
2096,
2179,
2243,

1* 813,
2*2304,
1517,
4*1637,
4* 103,
9* 67,
1*2041,
1*2077,
1*2157,
1*2223,
1* 883,
1483,
85,
2050,
2094,
2177,

2241,
2262,
1208,
1637,
131,
2066,
2158,
2224,
2261,
1062,
1619,
2030,
2060,
2136,
2211,
2257,
4*1062,
4*1619,

4*2030,
1*2061,
1*2136,
1*2211,
2260,
1208,
1637,
131.
2066,
2160,
2226,
2*2260,
9*1208,
4*1637,
4* J03,
1*2096,
1*2179,
1*?243,

886,
2313,
1539,
68,
132,
2U27,
2050,
2093,
2176,
2240,
952,
4*1463,
4* 85,
1*2050,
1*2094,
1*2177,

1*2241,
1*2262,
9*1208,
4*1637,
4* 131,
3*2068,
1*2158,
1*2224,
1*2261,
4*1062,
4*1619,
4*2030,
1*2060,
1*2136,
1*2211,
2260,
1206,
1637,

m,
2068,
2159,
2225,
2*2260,
9*1208,
4*1637,
4* 131,
3*2068,
1*2160,
1*2226,
2263,
1484,
68,
132,
2117,
2198,
2253,

2* 666,
1*2313,
1559,
4* 66,
4* 132,
4*2027, MM
1*2050, MM
1*2093, MM
1*2176, MM
1*2240, MM
993, MM
1584, MM
2030, MM
2059, MM
2115, MM
2196/MM
MM
2251, MM
2270, MM
1484, MM
67, MM
2042, MM
2094, MM
2177, MM
2241, MM
2262, MM
1206, MM
1637, MM
131, MM
2066, MM
2159, MM
2225, MM
2*2260, MM
9*1208, MM
4*1637/MM
MM
4* 131, MM
3*2068, MM
1*2159, MM
1*2225, MM
2263, MM
1484, MM
67, MM
2043, MM
2096, MM
2179, MM
2243, MM
2*2263, MM
4*1484, MM
4* 68, MM
4* 132, MM
1*2117, MM
1*2198, MM
1*2253/MM
MM
994, MM
1378, MM
1586, MM
73, MM
156, MM
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3.516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3526
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
C-69

-------
6
7
8
9
1
2
3
a
5
6
7
6
9

1
2
3
4
5
6
r
8
9
1
2
3
a
5
6
7
8
9

1
2
3
4
5
6
7
8
9
t
i
3
4
5
6
7
a
9

i
z
3
4* 156,
1*2140,
1*2227,
313,
230a,
1509,
1637,
103,
2097,
2199,
2250,
2* 8B6,
2318,
Q»T» M3/
1561,
a* 68,
a* 132,
1*2119,
1*2214,
744,
1063,
3*1378,
4*1566,
a* 73,
4* 156,
1*2141,
1*2228,
816,
2305,
1449,
4*1566,
a* 74,
DATA A14/
4*2044,
1* 281,
172,
746,
2284,
2*1274,
2349,
1638,
109,
226,
328,
1* 540,
850,
2291,
1412,
2369,
69,
133,
DATA A15/
252,
368,
637,
189,
2161,
2244,
1* 815,
2*2304,
1518,
4*1637,
4* 103,
1*2097,
1*2199,
1*2254,
995,
1378,

1586,
73,
156,
2141,
2228,
779,
4*1063,
1462,
1620,
86,
189,
2161,
2245,
848,
1*2305,
1463,
1620,
»7,

190,
310,
1* 472,
781,
1*2284,
1380,
1*2349,
4*1639,
a* 104,
i* 226,
338,
598,
888,
2296,
1433,
1*2369,
4* 69,
4* 133,

1* 252,
403,
667,
4* 169,
3*2161,
1*2244,
686,
2313,
1540,
68,
132,
2118,
2213,
704,
1* 995,
3*1378,

4*1586,
4* 73,
4* 156,
1*2141,
1*2228,
815,
2305,
I486,
4*1620,
4* 86,
4* 189,
3*2161,
1*2245,
887,
2310,
1489,
4*1620,
4* 87,

4* 190,
1* 310,
540,
817,
2290,
1411,
2369,
69,
133,
251,
367,
636,
923,
1*2296,
1451,
2388,
74,
2044,

282,
432,
709,
2097,
2199,
2254,
2* 686,
1*2313,
1560,
4* 68,
4* 132,
1*2118,
1*2213,
743,
1063,
1461,

1620,
86,
189,
2161,
2245,
847,
1*2305,
1511,
1637,
103,
2098,
2200,
2255,
2* 887,
1*2310,
1512,
1637,
104,

226,
327,
1* 540,
849,
2296,
1432,
1*2369,
4* 69,
4* 133,
1* 251,
402,
666,
953,
1211,
1465,
3*2386,
4* 74,
4*2044,

1* 282,
473,
748,
1*2097,
1*2199,
1*2254,
994,
1378,
1586,
73,
156,
2140,
2227,
778,
4*1063,
1487,

4*1620,
4* 86,
4* 189,
3*2161,
1*2245,
887,
2310,
1520,
4*1637,
4* 103,
1*2098,
1*2200,
1*2255,
996,
2320,
1521,
4*1637,
4* 104,

1* 226,
337,
597,
ear,
1*2296,
1450,
2388,
74,
2044,
281,
431,
708,
997,
1*1211,
2337,
1621,
87,
190,

311,
504,
783,
2118,
??13,
f03,
* ^94,
:• - '.?s,
4 1566,
4* 73,
4* 156,
1*2140,
1*2227,
814,
2304,
1510,

1637,
103,
2098,
2200,
2255,
2* 887,
1*2310,
1542,
68,
132,
2119,
2214,
706,
1* 996,
1379,
1543,
69,
133,

25J,
366,
635,
2* 887,
1211,
1464,
3*2368,
4* 74,
4*2044,
1* 281,
472,
747,
1* 997,
1274,
1*2337,
4*1621,
4* 87,
4* 190,

1* 311,
541,
814,
1*2118,
1*2213,
742,
1063,
1460,
1620,
86,
189,
2161,
2244,
846,
2*2304,
1519,

4*1637,
4* 103,
1*2098,
1*2200,
1*2255,
995,
2319,
1562,
4* 68,
«* 132,
1*2119,
1*2214,
745,
1063,
1410,
1563,
4* 69,
4* 133,

1* 251,
401,
665,
996,
1*1211,
2337,
1621,
87,
190,
310,
1* 472,
762,
22H4,
2*1274,
2349,
1638,
104,
227,

329,
571,
851,
2140, MM
2227, MM
7 7 7, MM
4*1063, MM
I486, MM
4*1620, MM
4* 86, MM
4* 189, MM
3*2 161, MM
1*2244, MM
886, MM
2314, MM
1541/MM
MM
68, MM
132, MM
2119, MM
2214, MM
705, MM
1* 995, MM
1378, MM
1566, MM
7 3, MM
156, MM
2 141, MM
2228, MM
780, MM
4*1063, MM
1431, MM
1586, MM
74, MM
2044/MM
MM
281, MM
430, MM
707, MM
1* 996, MM
1274, MM
1*2337, MM
4*1621 ,MM

-------
li
5
6
7
a
9
i
2
3
4
5
6
7
8
9

1
2
3
4
5
6
7
e
9
1
2
3
u
5
6
7
8
9

1
a
3
4
5
6
7
a
9
1
2
3
a
5
6
7
8
9
924,
2301,
U52,
2368,
71,
20aa,
2B2,
433,
710,
998,
1247,
1067,
3*2388,
4* 7«,
4*2044,
DATA Alb/
1* 283,
a/5,
750,
1* 998,
1276,
2339,
2400,
75,
191,
312,
507,
786,
1066,
1310,
1*2339,
1*2400,
9* 75,
4* 191,
DATA A17/
1* 313,
545,
623,
1096,
1343,
2352,
1622,
105,
229,
334,
576,
856,
1120,
1387,
1*2352,
4*1622,
4* 105,
1* 230,
954,
1212,
1466,
3*2388,
4* 74,
4*2044,
1* 282,
474,
749,
1* 998,
1275,
2338,
1621,
87,
190,

312,
506,
785,
2286,
1309,
1*2339,
1*2400,
9* 75,
4* 191,
1* 312,
544,
822.
1095.
1342,
2351,
1622,
105,
229,

333,
575,
855,
1119,
1386,
1*2352,
4*1622,
4* 105,
1* 229,
344,
604,
894,
1152,
1418,
2372,
1639,
134,
255,
997,
1246,
2338,
1621,
87,
190,
311,
505,
784,
2266,
1308,
1*2338,
4*1621,
4* 87,
4* 190,

1* 312,
543,
821,
1*2286,
1341,
2351,
1621,
105,
228,
332,
574,
854,
1118,
13B5,
1*2351,
«*1622,
4* 105,
1* 229,

343,
603,
893,
1151,
1417,
2372,
1639,
134,
254,
373,
642,
929,
1181,
1439,
1*2372,
4*1639,
4* 134,
1* 255,
1* 997,
1274,
1*2338,
4*1621,
4* 67,
4* 190,
1* 311,
542,
820,
1*2286,
1340,
2350,
1638,
104,
228,

331,
573,
853,
2294,
1384,
1*2351,
4*1621,
4* 105,
1* 228,
342,
602,
892,
1150,
1416,
2371,
1639,
134,
254,

372,
641,
928,
1180,
1438,
1*2372,
4*1639,
4* 134,
1* 254,
408,
672,
959,
1217,
1456,
2390,
60,
159,
285,
2285,
2*1274,
2350,
1638,
104,
227,
330,
572,
852,
229S,
1383,
1*2350,
4*1638,
4* 104,
1* 228,

341,
601,
891,
2298,
1415,
2371,
1638,
134,
253,
371,
640,
927,
1179,
1437,
1*2371,
4*1639,
a* 134,
1* 254,

407,
671,
958,
1216,
1455,
2390,
60,
159,
264,
437,
714,
1001,
1251,
1*1456,
1*2390,
4* 60,
4* 159,
1* 2BS,
2289,
1382,
1*2350,
4*1636,
4* 104,
1* 227,
340,
600,
890,
2298,
1414,
2370,
69,
133,
253,

370,
639,
926,
1*2298,
1436,
1*2371,
4*1638,
4* 134,
1* 253,
406,
670,
957,
1215,
1455,
2389,
60,
159,
284,

436,
713,
1000,
1250,
1*1455,
1*2390,
4* 60,
4* 159,
1* 284,
478,
753,
1032,
1279,
2340,
2401,
75,
191,
314,
2292,
1413,
23YO,
69,
133,
252,
369,
636,
925,
1*2298,
1435,
1*2370,
4* 69,
4* 133,
1* 253,

405,
669,
956,
1214,
1454,
2389,
60,
159,
263,
435,
T12,
999,
1249,
1*1455,
I*23fi9,
4* 60,
4* 159,
1* 284,

477,
752,
1031,
1278,
2340,
2401,
75,
191,
313,
509,
788,
1066,
1312,
1*2340,
1*2401,
9* 75,
4* 191,
1* 314,
DATA AIS/
1
345,
374,
409,
438,
479,
510,
547,
2297, MM
1434,MM
1*2370, MM
4* 69, MM
4* 133, MM
1* 252, MM
404. MM
668, MM
955, MM
1213, MM
1453, MM
2388, MM
7 4, MM
2044, MM
283/MM
MM
434, MM
7 11, MM
998, MM
1248, MM
1468, MM
1*2369, MM
4* 60, MM
4* 159, MM
1* 283, MM
476, MM
751, MM
1030, MM
1277, MM
2339, MM
2400, MM
75, MM
191, MM
313/.MM
MM
508, MM
7 87, MM
1067, MM
1311, MM
1*2340, MM
1*2401, MM
9* 75, MM
4* 191, MM
t* 313, MM
546, MM
824, MM
1097, MM
1344, MM
2352, MM
1622, MM
105, MM
230, MM
335/MM
MM
577, MM
3606
3607
3608
3609
3610
3611
3612
3613
3614
361S
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
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
C-71

-------
2
3
4
5
6
7
6
9
1
2
3
4
5
6
7
8
9

1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
6
9



605,
895,
1153,
1*1388,
2373,
1639,
134,
255,
375,
644,
931,
1183,
1441,
1*2373,
4*1639,
4* 135,
2130,
DATA A19/
411,
675,
962,
1254,
1*2331,
«»1623,
4* 106,
1*2100,
1*2181,
608,
696,
2*1123,
1*2327,
4*1590,
9* T5,
4* 192,
1*2163,
551,
END
BLOCK DATA

643,
930,
1182,
1440,
1*2373,
4*1639,
4* 134,
1* 255,
410,
674,
961,
1219,
1457,
2391,
60,
160,
2142,

440,
717,
1004,
12B2,
1494,
1640,
135,
2121,
377,
646,
<»33,
1221,
2331,
1623,
106,
2100,
2181,
581,



673,
960,
1216,
1456,
2391,
60,
159,
285,
439,
716,
1003,
1253,
1469,
1*2391,
4* 60,
4* 160,
2150,

481,
756,
1035,
1315,
2*1494,
4*1640,
4* 135,
1*2121,
«12,
676,
963,
1255,
1*2331,
4*1623,
4* 106,
1*2100,
1*2161,
609.


*
715,
1002,
1252,
1*1456,
1*2391,
4* 60,
4* 159,
1* 265,
480,
755,
1034,
1281,
2341,
2402,
T5,
192,
2162,

512,
791,
1071,
1347,
1544,
60,
160,
2143,
441,
718,
1005,
1283,
1494,
1640,
135,
2121,
376,
647,



754,
1033,
U80,
2311 ,
2402,
75,
ill,
314,
511,
790,
1070,
1314,
1*2341,
1*2402,
9* 75,
4* 192,
2170,

549,
827,
1100,
2322,
1564,
4* 60,
4* 160,
1*2143,
482,
757,
1036,
1316,
2*1494,
4*1640,
4* 13S,
1*2121,
413,
677,



789,
1 0(l9r
1313,
1 * Z 3 *; . ,
1*2< x 3-i
9* 7 5,
4* 191
1* 314,
546,
626,
1099,
1346,
2353,
1622,
106,
2099,
2180,

579,
859,
1123,
2327,
1590,
75,
192,
2163,
513,
792,
1072,
1348,
1545,
60,
160,
2143,
442,
719,



825,
1098,
1345,
2353,
1622,
105,
230,
336,
578,
856,
1122,
1368,
1*3353,
4*1622,
4* 106,
2109,
2189,

607,
897,
2*1123,
1*2327,
4*1590,
9* 75,
4* 192,
1*2163,
550,
628,
1101,
2323,
1565,
4* 60,
4* 160,
1*2143,
483,
758,



BLOCK DATA PROGRAM NUMBER THREE
85V, MM
11 21, MM
1386, MM
1*2353, MM
4*1622, MM
4* 105, MM
1* 230, MM
346, MM
606, MM
896, MM
1154, MM
1*1388, MM
2373, MM
1639, MM
135, MM
2120, MM
376/MM
MM
645, MM
932, MM
1220, MM
2331, MM
1623, MM
106, MM
2100, MM
2181, MM
580, MM
860, MM
1123, MM
2327, MM
1590, MM
75, MM
192, MM
2163, MM
514, MM
793/MM
MM
MM
MM
MM
INTl::^?£ft8lAE2&IZA^2iRIA>25' Xlf?EX54 F.R^I?TA2T?UA%7,A28,A29,A30 MH

5
6
DIMENSION
420(212), A2K206), A22(210),
A25(220), A26(219), 427(224),
423(235),
428(266),
424(230), MM
429(281), MM
A30(317)
CO'-MON /VGRID/ ITGRID,






EQUIVALENCE
EQUIVALENCE
EQUIVALENCE
EQUIVALENCE
EQUIVALENCE
EQUIVALENCE
(A20(l)
CA2K1)
(A22(l)
(A23(t)
(A24(l)
(A25(l)
IVGdOO,
100)


,IVG(59,53))
,IVG(71
,IVG(77
,IVG(87
,IVG(22
,IVG(52
,55))
,57))
,59))
,62))
,64))















MM
MM
MM
MM
MM
MM
MM
MM
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
3666
3687
3668
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
C-72

-------
EDU I VALENCE (A26(l),IVG(72,66))
EQUIVALENCE ( A27 < 1 ) , I VG (91 , 68) )
EQUIVALENCE (A28 ( I) , I VG ( 15, 7 1 ) )
EQUIVALENCE ( A29 ( 1 ) , I VG (81 , 73) )
EQUIVALENCE (A 30 ( 1) , IV6 (62, 76) )

1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9

1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9

1
2
3
4
5
6
7
8
9
1
DATA A20/
829,
1102,
2326,
1590,
75,
192,
2164,
515,
794,
1074,
1350,
1522,
4*1640,
4* 135,
1*2122,
415,
679,
966,
DATA Aai/
1222,
1*2333,
1623,
107,
2069,
1*2145,
486,
761,
1040,
1284,
1549,
70,
2045,
1*2102,
1*2183,
613,
903,
1158,
DATA A22/
4*1391,
1624,
107,
2069,
1*2146,
«88,
763,
1*1010,
1286,
1571,

861,
1123,
2330,
4*1590,
9* 75,
4* 192,
1*?!M.
552,
830,
1103,
2325,
1507,
60,
160,
21«4,
444,
721,
1008,

2*1222,
1496,
4*1623,
4* 107,
2*2069,
2165,
517,
796,
1076,
1320,
1569,
4* 70,
2*2045,
2123,
382,
651,
938,
1187,

1498,
4*1624,
4* 107,
2*2069,
2166,
519,
798,
1078,
1322,
1591,

899,
2*1153,
2332,
1633,
106,
2101,
2182,
582,
862,
1124,
2329,
1567,
4* 60,
4* 160,
1*2144,
465,
760,
1039,

1319,
1514,
1640,
136,
2083,
1*2165,
554,
832,
1105,
1352,
1591,
76,
2055,
1*2123,
417,
681,
968,
1224,

1516,
1641,
136,
2085,
1*2166,
556,
834,
1107,
1354,
4*1591,

934,
1222,
2334,
«*J623,
4* 106,
1*2101,
1*2182,
610,
900,
1155,
1*2329,
1590,
75,
J92,
2164,
516,
795,
1075,

1351,
1523.
4*1640,
4* 136,
2102,
2183,
584,
864,
1126,
1391,
«M591,
9* 76,
2*2055,
2145,
446,
723,
1010,
1257,

1525,
4*1641,
4* 136,
2103,
2184,
566,
866,
1128,
1391,
1624,

964,
2*1222,
1494,
1640,
135,
2122,
379,
648,
935,
1184,
2333,
4*1590,
9* 75,
4* 192,
1*2164,
553,
831,
1104,

2326,
1548,
70,
2045,
1*2102,
1*2183,
612,
902,
1157,
4*1391,
1624,
107,
2069,
1*2145,
467,
762,
1*1010,
1285,

1550,
70,
2045,
1*2103,
1*2184,
614,
904,
1159,
4*1391,
4*1624,

1006,
1317,
2*1494,
4*1640,
4* 135,
1*2122,
414,
678,
965,
1222,
1*2333,
1623,
106,
2101,
2182,
583,
863,
1125,

2329,
1568,
4* 70,
2*2045,
2123,
381,
650,
937,
1186,
1497,
4*1624,
4* 107,
3*2069,
2165,
518,
797,
1077,
1321,

1570,
4* 70,
2*2045,
2124,
383,
652,
939,
1188,
1499,
1641,

1037,
1349,
1546,
60,
160,
2144,
443,
720,
1007,
2*ie?z,
1495,
4*1623,
4* 106,
1*2101,
1*2182,
611,
901,
1156,

1*2329,
1590,
76,
2055,
1*2123,
416,
680,
967,
1223,
1515,
1641,
136,
2084,
1*2165,
555,
833,
1106,
1353,

1591,
76,
2055,
1*2124,
418,
682,
969,
1225,
2*1499,
4*1641,
MM
MM
MM
MM
MM
MM
MM
1073, MM
2324, MM
1566, MM
4* 60, MM
4* 160, MM
1*2144, MM
484, MM
759, MM
1038, MM
1318, MM
1513, MM
1640, MM
135, MM
3122, MM
380, MM
649, MM
936, MM
1185/MM
MM
2333, MM
4*159Q,MM
9* 76, MM
2*2055, MM
21«5,MM
445, MM
722, MM
1009, MM
1256, MM
1524, MM
4*1641, MM
4* 136, MM
2102, MM
2183, MM
585, MM
865, MM
1127, MM
1391/MM
MM
4*1591, MM
9* 76, MM
2*2055, MM
21«6, MM
447, MM
724, MM
1010, MM
1258, MM
1551, MM
70, MM
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
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
5757
3758
3759
3760
3761
3762
3763
3764
376S
3766
376T
C-73

-------
2
3
a
5
6
T
8
9

I
2
3
a
5
6
7
8
9
1
2
3
4
5
6
7
8
9

1
2
3
4
5
6
7






5
6
7
a
9

1
2
3
4
5
6
7
8
4* 70,
1*2046,
1*8078,
1*2166,
Sb7,
835,
1*1079,
1355,
0*T* A2J/
4*1591 ,
9* 76,
1*2053,
1*2104,
1*?185,
616,
906,
1161,
4*1391,
4«lfc24,
«* 108,
1*2104,
1*2185,
617,
907,
1 162,
"*1392,
U*1641,
DAT* »24/
4* 137,
1*2126,
422,
666,
973,
1229,
4*1500,
4* 71,
4* 163,
1*2148,
493,
768,
1043,
1327,
1625,
108,
2106,
2187,
0»TA A25/
592,
872,
1165,
4*1392,
4*1641,
4* 137,
1*2127,
1* 389,
76,
2053,
2103,
2184,
587,
867,
1129,
1391,

1624,
107,
2062,
2125,
385,
654,
941,
1190,
1499,
1641,
137,
2125,
386,
655,
942,
1191,
1500,
71,

163,
2148,
451,
728,
1013,
1262.
1592,
76,
195,
2168,
524,
803,
1081,
1359,
4*1625,
4* 108,
1*2106,
1*2187,

620,
910,
1194,
1500,
71,
163,
2149,
454,
9* 76,
1*2053,
1*2103,
1*2164,
615,
905,
1160,
4*1391,

4*1624,
4* 107,
1*2062,
1*2125,
420,
684,
971,
1227,
2*1499,
4*1641,
4* 137,
1*2125,
421,
685,
972,
1228,
4*1500,
4* 71,

4* 163,
1*2148,
A92,
767,
1042,
1290,
4*1592,
9* 76,
4* 195,
1*2168,
561,
839,
2*1081,
1392,
1641.
137,
2127,
389,

658,
945,
1231,
4*1500,
4* 71,
4* 163,
1*2149,
«95,
107,
2062,
2124,
384,
653,
940,
1189,
1499,

1641,
136,
2070,
2147,
449,
726,
1011,
1260,
1553,
71,
163,
2147,
450,
727,
1012,
1261,
1592,
76,

195,
2168,
523,
802,
1080,
1326,
1625,
108,
2105,
2186,
591,
671,
1164,
4*1392,
4*1641,
4* 137,
1*2127,
1* 389,

688,
975,
1264,
1592,
76,
195,
2169,
526,
4* 107,
1*2062,
1*2124,
419,
683,
970,
1226,
2*1«99,

4*1641,
4* 136,
1*2070,
1*2147,
490,
765,
1*1011,
1288,
1573,
4* 71,
4* 163,
1*2117,
491,
766,
1041,
1289,
4*1592,
9* 76,

4* 195,
1*2168,
560,
838,
1*1080,
1358,
4*1625,
4* 108,
1*2105,
1*2186,
619,
909,
1193,
1500,
71,
163,
2149,
453,

730,
1015,
1292,
4*1592,
9* 76,
4* 195,
1*2169,
563,
136,
2C7C
2' 46.
u 8,
7t ',
101 ,
1259,
1552,

70,
2046,
2078,
2167,
521,
800,
1079,
1324,
1591,
76,
195,
2167,
522,
801,
1080,
1325,
1625,
108,

2105,
2186,
590,
870,
1132,
1392,
1641,
137,
2126,
388,
657,
944,
1230,
4*1500,
4* 71,
4* 163,
1*2149,
494,

769,
1044,
1326,
1625,
ioa,
2106,
2187,
593,
4* 136,
1*2070,
1*2146,
489,
764,
1*1011,
1287,
1572,

4* 70,
1*2046,
1*2078,
1*2167,
558,
836,
1*1079,
1356,
4*1591,
9* 76,
4* 195,
1*2167,
559,
837,
1*1080,
1357,
4*1625,
4* 108,

1*2105,
1*2186,
618,
908,
1163,
4*1392,
4*1641,
4* 137,
1*2126,
423,
687,
974,
1263,
1592,
76,
195,
2169,
525,

804,
1081,
1360,
4*1625,
4* 108,
1*2106,
1*2187,
621,
2046, MM
2078, MM
2166, MM
520, MM
799, MM
1079, MM
1323, MM
1591/MM
MM
7 6, MM
2053, MM
2104, MM
2185, MM
588, MM
868, MM
1130, MM
1391, MM
1624, MM
108, MM
2104, MM
2185, MM
589, MM
869, MM
1131, MM
1392, MM
1641, MM
137/MM
MM
2126, MM
387, MM
656, MM
943, MM
1192, MM
1500, MM
71, MM
163, MM
2148, MM
452, MM
729, MM
101 4, MM
1291, MM
4*1592, MM
9* 76, MM
4* 195, MM
1*2169. MM
562/MM
MM
840, MM
2*1081, MM
1392, MM
1641, MM
137, MM
2127, MM
389, MM
659, MM
3766
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
C-74

-------
9 689,
J 976,
2 1365,
3 1592,
« 77,
5 122,
6 196,
7 a* 308,
8 622,
9 2264,
DATA A26/
1 «*1233,
2 1*2374,
3 (t*1642,
« 1* 109,
5 2*2037,
6 276,
7 2230,
8 807,
9 1062,
I 2354,
2 1626,
3 86,
4 2*2035,
5 347,
6 2216,
7 773,
8 1082,
9 2355,
DATA A27/
1 1626,
2 88,
3 2036,
4 196,
5 4* 308,
6 663,
7 1*2266,
8 4*1393,
9 1*2393,
1 a* 61,
2 124,
3 1*20«7,
a 280,
5 567,
6 8
-------
7
a
9
1
z
3
4
5
6
7
e
9

1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9

1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
9

4*1642,
3* 94,
»» 197,
4* 568,
102295,
1119,
2396,
61,
121.
241,
737,
1235,
D*T* A29/
2345,
2406,
78,
140,
309,
914,
1297,
2360,
1627.
90,
166,
392,
2266,
1366,
1*2360,
4*1627,
I* 93,
9* 242,
DAT* MO/
2* 915,
1238,
2*1442,
9* 0,
9» 0,
a* 738,
1168,
1422,
««1643,
a* HI,
«• 569,
1110,
1369,
1595,
95,
393,
977,
1241,
END
61,
120,
301,
737,
2302,
3*1419,
1*2396,
4* 61,
1* 121,
4* 241,
4* 757,
1266,

1*2345,
1*2406,
4* 78,
4* 140,
4* 309,
4* 914,
1333,
1*2360,
4*1627,
1* 90,
4* 166,
4* 392,
2*2288,
1398,
2381,
1642,
95,
393,

1017,
1269,
1505,
91,
242,
915,
1197,
1442,
0,
0,
738,
1135,
1401,
9*1595,
5* 95,
4* 393,
1020,
1272,

4* 61,
1* 120,
4* 241,
4* 737,
1*2302,
2345,
2406,
78,
140,
309,
914,
1296,

2359,
1627,
89,
166,
392,
2288,
1365,
2381,
1642,
93,
197,
568,
2300,
1420,
1*2381,
4*1642,
5* 95,
4* 393,

1046,
1299,
4*1505,
3* 91,
9* 242,
2* 915,
1239,
2*1442,
9* 0,
9* 0,
4* 738,
1169,
1423,
1643,
141,
569,
1049,
1302,

78,
140,
309,
914,
2309,
1*2345,
1*2406,
4* 78,
4* 140,
4* 309,
4* 914,
1332,

2367,
4*1627,
3* 89,
4* 166,
4* 392,
2*2288,
1397,
1*2381,
4*1642,
1* 93,
4* 197,
4* 568,
1*2300,
1442,
2397,
0,
141,
569,

1085,
1335,
1595,
95,
393,
1018,
1270,
1505,
91,
242,
915,
1196,
1443,
4*1643,
4* 141,
4* 569,
1088,
1336,

4* 78,
4* 140,
4* 309,
4* 914,
1295,
2356,
1627,
89,
166,
392,
2288,
1364,

2380,
1642,
94,
197,
568,
2300,
1419,
2397,
61,
95,
241,
737,
1237,
2*1442,
1*2397,
9* 0,
4* 141,
4* 569,

1108,
1367,
9*1595,
5* 95,
4* 393,
1047,
1300,
4*1505,
3* 91,
9* 242,
2* 915,
1240,
1458,
0,
0,
738,
mi,
1370,

89,
' 66,
:*9«;,
2t 37,
13. ,
23. .,
4*1627,
3* 89,
4* 166,
4* 392,
2*2288,
1396,

2387,
4*1642,
3* 94,
4* 197,
4* 568,
1*2300,
3*1419,
1*2397,
4* 61,
5* 95,
4* 241,
4* 737,
1268,
2346,
2407,
90,
0,
738,

1133,
J399,
1643,
141,
569,
1066,
1336,
1595,
95,
393,
1019,
1271,
1470,
9* 0,
9* 0,
4* 738,
1136,
1402,

3* 69,
4* 166,
4* 392,
1*2287,
1363,
2379,
1642,
94,
197,
S68,
2299,
1419,

2396,
61,
121,
241,
«7,
1236,
2346,
2407,
78,
140,
309,
914,
1298,
1*2346,
1*2407,
1* 90,
9* 0,
4* 738,

1167,
1421,
4*1643,
4* 141,
4* 569,
1109,
1368,
9*1595,
5* 95,
4* 393,
1048,
1301,
1505,
91,
242,
916,
1170,
1424,

94, MM
197, MM
568, MM
2295, MM
1395, MM
2386, MM
4*1642, MM
3* 94, MM
4* 197, MM
4* 568, MM
2303, MM
3M419/MM
MM
1*2396, MM
4* 61, MM
1* 121, MM
4« 241, MM
4* 737, MM
1267, MM
1*2346, MM
1*2407, MM
4* 78, MM
4* 140, MM
4* 309, MM
4* 9 14, MM
1334, MM
2360, MM
1627, MM
93, MM
242, MM
915/MM
MM
1196, MM
1442, MM
0,MM
0,MM
738, MM
1134, MM
1400, MM
1643, MM
141, MM
569, MM
1087, MM
1337, MM
4*1505, MM
3* 91, MM
9* 242, MM
1* 9J6, MM
1199, MM
1444/MM
MM
3878
3879
3880
3881
3662
3663
3884
3883
3886
3887
3868
3889
3890
3891
3892
3893
3694
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
C-76

-------
BLOCK DATA
BLOCK OAT* PROGRAM NUMBER FOUR
VARIABLE SIZE GRID ID NUMBERS FOR ST.
INTEGER A31, A32, A33
DIMENSION A3H393), A32(524),
COWON /VGRID/ ITGRID, IVG(100,100)
EQUIVALENCE ( A31 ( 1 ) , IVG (79, 79) )
EQUIVALENCE (A32(l ), IVG (72,83) )
EQUIVALENCE (A33(t),IVG(96,88))

1
2
3
«
5
6
7
8
9
1
2
3
4
5
6
7
8
9

1
2
3
a
5
6
7
8
9
J
2
3
4
5
6
7
8
9

1
2
3
4
5
6
7

DATA A31/
1*1444,
0,
0,
738,
1112,
1371,
1595,
394,
979,
2306,
1*1445,
0,
739,
1114,
1*2316,
1595,
394,
981,
DATA A32/
2*2307,
4*1506,
9* 2«2,
!• 918,
2307,
1506,
242,
2267,
2*1140,
2*1446,
54* 0,
1094,
1596,
740,
1245,
1626,
2268,
1409,
DATA A33/
1644,
2283,
1507,
0,
1*2283,
«*1S07,
100*0,
f Mfl
t "If

1471,
9* 0,
9* 0,
4* 736,
1137,
1403,
9*1595,
4* 394,
1022,
1*2306,
1473,
34* 0,
«* 739,
1139,
1405,
9*1595,
4* 394,
1024,

2316,
1595,
394,
982,
2*2307,
4*1506,
9* 242,
1*2267,
2307,
1506,
740,
4*1094,
4*1596,
4* 740,
4*1245,
4*1628,
2*2268,
4*1409,

4*1644,
1*2283,
4*1507,
54* 0,
1094,
1596,

1505,
91,
242,
916,
1171,
1425,
1643,
2234,
1051,
2311,
1506,
242,
917,
1173,
1427,
1643,
2234,
1053,

1*2316,
9*1595,
4* 394,
1025,
2317,
1595,
394,
983,
2*2307,
4*1506,
4* 740,
1245,
1628,
2268,
1409,
1644,
2282,
1507,

0,
1094,
1596,
740,
4*1094,
4*1596,

4*1505,
3* 91,
9* 242,
1* 916,
1200,
1444,
4*1643,
4*2234,
1090,
2315,
4*1506,
9* 242,
1* 917,
1202,
1445,
4*1643,
4*2234,
1092,

1406,
1643,
2234,
1054,
1*2317,
9*1595,
4* 394,
2281,
2317,
1595,
2267,
4*1245,
4*1628,
2*2268,
4*1409,
4*1644,
1*2282,
4*1507,

54* 0,
4*1094,
4*1596,
4* 740,
1245,
1628,

1595,
95,
393,
978,
1242,
1*1444,
0,
739,
1113,
2321,
1595,
394,
980,
2306,
1*1445,
LOUIS
A33O205)

9*1595,
5* 95,
4* 393,
1021,
1273,
1472,
34* 0,
4* 739,
1138,
1404,
9*1595,
4* 394,
1023,
1*2306,
1474,
0,34* 0,
739,
1*1092,

1428,
4*1643,
4*2234,
1092,
1407,
1643,
2234,
1*2281,
1*2317,
9*1595,
1*2267,
1409,
1644,
2282,
1507,
0,
1094,
1596,

740,
J245,
t628,
2269,
4*1245,
4*1628,
4* 739,
1140,

1446,


1643,
141,
569,
1050,
1303,
1505,
242,
917,
1172,
1426,
1643,
2234,
1052,
2312,
1506,
242,
918,
2*1140,

2*1446,
0,34* 0,
739,
1*1092,
1«29,
4*lb43,
4*2234,
1093,
1408,
1643,
2277,
4*1409,
4*1644,
1*2282,
4*1507,
54* 0,
4*1094,
4*1596,

4* 740,
4*1245,
4*1628,
2272,
1409,
1644,
100*0, 100*0, 100*0, 100*0, 100*0, 100*0,





4* 739,
1140,
1446,
0,
739,
1115,
1430,
4*1643,
2261,
1507,
0,
1094,
1596,
740,
1245,
1628.

2268,
1409,
1644,
2278,
4*1409,
4*1644,
100*0,

MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
4*1643, MM
4* 141, MM
4* 569, MM
1089, MM
1339, MM
4*1505, MM
9* 242, MM
1* 917, MM
1201, MM
1445, MM
4*1643, MM
4*2234, MM
1091, MM
2316, MM
4*1506, MM
9* 242, MM
1* 9 18, MM
2307/MM
MM
1506, MM
242, MM
918, MM
2*1140, MM
2*1446, MM
34* 0,MM
4* 739, MM
1140, MM
1446, MM
0,MM
1*2281, MM
4*1507, MM
54* 0,MM
4*1094, MM
4*1596, MM
4* 740, MM
4*1245, MM
4M628/MU
MM
2*2268, MM
4*1409, MM
4*1644, MM
2283, MM
1507, MM
100*0, MM
100*0/ MM
MM
3929
3930
3931
3932
3933
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
3978
3979
3980
3981
3982
3983
3984
3985
3986
c-;

-------
2.   Emission Module Listing
    c
    c
    c
    c
    c
    c
    c
    c
    c
    c
    c
    f
    c
    c
    c
    c
    c
    c
    c
    c
    c
    c
    c
PROGRAM EMMOO


  EMMOD IS THE DRIVER FOR THE
                                ER7   EMISSIONS MODULE.
  THIS IS A SPECIAL VERSION OF EMMOD SUITABLE  ONLY  FOR
  CREATING EMISSION FLUX HISTORIES FROM THE R .PS DAT* BASE.
  SUBROUTINES REQUIRED
        AOHOUR      AREAEM
        PLUMAS      PARTIT
        PREDAT      NEHPAG
        SECOND      DHPLUM

  FUNCTIONS REQUIRED
        ERF         TRPLOG

  PERIPHERALS REQUIRED
        TAPEI 3 PUNCHED  OUTPUT
        TAPES = INPUT
        TAPE? * INTERMEDIATE  I/O
        TAPE6 s OUTPUT      (UNIT
        UJr.RlO = LOGICAL UNIT OF
        I.UAHEA s LOSICAL UNIT OF
        LUPONT = LOGICAL UNIT OF
COMMON /HISTRY/  TIMEHS(520),
                 NIIMH3
                 THOU8(24)
                                GRIDIT    PONTtM    LOCATE
                                6ESTAB    SEUMET    STACKS
                                XMIT      MDATE     8LOCKOATA
                                DISTAN
                                  (UNIT (.PUNCH)

                                    (UNIT LIN)
                                 LOUT)
                                 GRID FILE
                                 AREA  SOURCE EMISSIONS FILE
                                 POINT SOURCE EMISSIONS FILE
                                   IDHS(520),      UTMHS(2,520)<
                                                             NCASE
                                                             WTMOLIU1),


                                                             WTHOLO(T)
                                                             IVE3,


                                                             TH(IOO),
                                                             PLENTH,
                                                            SIGEOG,
                                                             NOSTAT,

                                                             NTEMP,


                                                             NMIXL,
                                                              ISTBMX

                                                              NOSU'-'S


                                                          4HNO   /
                             /4HMORt,  4HEND   /
           DATA NCA3E,  KOK  /!,•!/

           DATA THOUR /O.0,60.0,120.0,ieO.O,240.0,300.0,360.0,420.0, 480.0.
          1  540.0,600.0,660.0,720.0,780.0,840.0,900.0,960,0,1020.0,1080.0,
          1  1140.0,1200.0,1260.0,1320.0,1380,O/
           DATA  SMALL,   ROAIR,   RAD   /!,£•«,   1178.,   .01749322925 /
COMMON
COMMON
1
COMMON
COMMON
1
COMMON
1
COMMON
COMMON
1
2
3
COMMON
1
COW»ON
1
COMMON
COMMON
COMMON
/INPUTS/
/LABLIN/

/LA80UT/
/ANSWER/

/WIND/

/TRAJ/
/PARCEL/



/TEMPS/

/MXHITE/

/ORIGIN/
/PAS04L/
/E'^RATE/
DATA YES, RNFG,
DATA P'
'OR, TEND
TITLEC20),
MAMIN(U),
AOJUST(ll)
NAMQUT(7)i
YES,
NO,
T(IOO),
NPTS
P(2,100)
PWIDTH,
PAREA,
1ft (5) ,
RUA Iw
TMTEMP(25),
ITEMP
TMXHIT(25)»
IM1XL
UTMXOR,
TM3TAB(25),
EMARAT(7,520),
IYFS, NO /4HYE3
/4HMORt, 4HEND
JDATE(IO),
NFLXIN,

NFXOUT,
RNEG,
SMALL
V(100)/


HPWID7,
DTFREZ,
HTINTF(6),

TEMPSF(25)f

HTMIXL(2S),

UTMYOR
KSTABLC25),
EMAB«S(7),
,4HNO ,4HYE8
/
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EH
EM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Ib
17
18
19
20
il
22
33
24
25
26
27
28
29
30
31
32
33
3D
35
36
37
3B
39
40
41
42
SI
44
45
46
47
as
49
50
51
•52
53
54
55
                                             C-7S

-------
      DATA SIGEOG, OTFRE7. /2.U . 60./                                  EH    56
      0«TA LIM, LOUT /3,6/                                              EM    57
      TERM s TEND                                                       EM    58
      DEBUG *YES                                                        EM    59
      CALL MOATE(JI)ATE)                                                 EM    60
C                                                                       EM    61
C        READ GENF.HAL INPUTS                                            EM    62
C                                                                       EM    63
100   CONTINUE                                                          EM    64
      CALL SECOMD(Al)                                                   EM    65
      CALL FREOAT                                                       EM    66
      READUIN,!)  TITLE                                                EM    6T
      READUIN,2)  NOAREA                                               EM    66
      R£AD(L1N,2)  NOPONT                                               CM    69
      REAOtLIN.2)  NOSUM3                                               EM    70
      REAO(LIN,2)  IPUNCH                                               EM    71
      READ(LIN,J)  LUGRIO                                               EM    72
      READUIN,3)  LUAHE*                                               EM    7J
      READUIM.S)  LUPONT                                               EM    74
      READ(LIN,3)  NFLXIN                                               EM    75
      READCLIN.3)  NFXOUT                                               EM    76
      READUIM,)!)   (N»MIN(I),AOJUST(I)/I«J,NFLXIN)                     EM    77
      R£*OUIM.?)  (N«MOUT(I),I«J,NFXOUT)                               EM    78
      RE^O(LIN,^3)  PLENTH                                              EM    79
      >»EAO(LIN/aj)  PWIOTH                                              EM    60
      PAREA s PCENTW«PWIOTH                                             EM    61
      HP^IOT » ,SO*PWIDTH                                               EM    82
      IF(NDAREA.ME.IYES)  60 TO 160                                     EM    63
C                                                                       EM    69
C          AREA SOURCE INPUTS AND DETERMINATION                         EM    85
C                                                                       EM    66
      REAOaiN.13)  (EMA8ASU),I»I»NFXOUT)                              EM    87
      DO 120 K * 1,501                                                  EM    88
      REAP(LIN,4) A, B, C, ID                                           EM    89
      IFCA.Lf.O.)  60 TO 140                                            EM    <)0
      TU'EHStK) s A                                                     EM    91
      UT"'H.SU,K) sB                                                    EM    92
      UT^HS(2,K) • C                                                    EM    93
      IOHS(K) * ID                                                      EM    94
120   CONTINUE                                                          EM    95
      *RITEUOUT,5)                                                     EM    96
      SO TO 500                                                         EM    97
140   NUMHS « K-1                                                       EM    98
C                                                                       EM    99
      CALL ACHOUR                                                       EM   100
C                                                                       EM   101
      CALL NE*PAG(TITLE,0,JOATE)                                        EM   10?
      *RITE(LOIIT,1«)                                                    EM   103
      00 160 K s I,NUMHS                                                EM   104
      IF(MOO(K,25).NE.O) 00 TO 150                                      EM   105
      CALL NEAPAG(TITLE,0,JOATE)                                        EM   106
      «RITE(LOUT,14)                                                    EM   107
150   «RITE(LOUT,6) TIMEHS(K),UTMH3(1,K),UTMHS(2,K),IOHS(K)             EM   108
160   CONTINUE                                                          EM   109
      IF(NCASE.GT.l)  CO TO 170                                         CM   110
                                        C-79

-------
C                                                                       EM   Hi
      CALL GRIDIT(LU6RID,KOK)                                           EM   113
C                                                                       £M   11S
      IF(KOK.LE.O) 60 TO 170                                            EM   lia
      *»RITECLOUT,13)  KOK                                               EM   115
      60 TO 500                                                         EM   116
170   CONTINUE                                                          EM   117
      IF(MO*R£A.N£.IYE8) GO TO 180                                      EM   113
C                                                                       EM   119
      CALL AREAEM(LUARE*,IPUNCH,KOK)                                     EM   130
C                                                                       EM   121
      IFCKOK.LE.O)  60 TO 160                                           EM   132
      worn; (LouT.e)  KOK                                                EM   ias
      60 TO 500                                                         EM   134
180   CONTINUE                                                          EM   135
      IMNOPONT.NE.IYES)  60 TO «00                                     EM   136
C                                                                       EM   137
C          POINT SOURCE INPUTS AND DETERMINATION                        EM   138
C .                                                                      EM   129
      READ(LIN,20)  UTMXOR, UTMYOR                                      EM   130
      REAO(LIN,20)  P(l,l),  P(3,l)                                     EM   131
      00 300 I * 1,101                                                  EM   133
      READ(LIN,20)  A, B, C                                             EM   133
      IF(A ,LT. 0.0)  60 TO 310                                         EM   134
      T(I) * A                                                          EM   135
      V(I) = B/60.                                                      EM   136
      THU) = C*RAO                                                     EM   137
300   CONTINUE                                                          EM   138
      ««ITE(LOUT,21)                                                    EM   139
      60 TO 500                                                         EM   110
210   NPTS * I - 1                                                      EM   141
      00 230 I * 2,NPTS                                                 EM   143
      J =  I - 1                                                         EM   143
      OT = TU) • T(J)                                                  EM   1«4
      OX = VU)*COS
-------
      HTlNTF(l) « ZEEU)                                                EM   166
      00 350 J a 2,NOSTAT                                               EM   167
      I = J • I                                                         EM   168
      HTINTF(J) = 0.50*(ZEEU) » ZEE(J))                                EM   169
250   CONTINUE                                                          EM   170
      HTINTF(WSTATtl) » ZEE(NOSTAT)                                    £M   171
C                                                                       EM   173
C     READ(LIN,23)  OTFHEZ                                              EM   173
C     R£AD(LIN,23)  SIGE06                                              EM   174
      00 2fcO I * 1,26                                                   EM   175
      K£AP(LIN,20)  A,8                                                 EM   176
      IF(A .LT. -9.)  60 TO ZTO                                         EM   177
      TMTEMP(I) a A                                                     EM   178
      UMPSFCI) SB                                                     EM   179
260   CONTINUE                                                          EM   ISO
      «RIT£CLOUT,2«)                                                    EM   181
      60 TO 500                                                         EM   182
270   NTEMP s 1 . 1                                                     EM   183
      HEMP « 1                                                         EM   18l))  60 TO 280                                  EM   191
275   CONTINU*                                                          EM   192
      TMSTAH(K) » A                                                     EM   193
      KSTA6UK) = 13                                                    EM   19fl
             K  = K + l                                                  EM   195
280   CONTINUE                                                          EM   196
      «B1TE(LOUT,26)                                                    EM   197
      GO TO 500                                                         EM   198
300   CONTINUE                                                          EM   199
      ISTBMX=K-r1              .                                     EM   200
      00 310 I * 1,26                                                   EM   201
      REAOUIN,20) A, B                                                 EM   202
      IF(A.LT.O.O)  t>0 TO 320                                           EM   203
      TMXHITCI) * A                                                     EM   204
      HTMIXL(I) « B                                                     EM   205
3JO   CONTINUE                                                          EM   206
      *RITE
-------


400
C




410



«2o


500
C
:
2
3
u
5
6
7
6
9
10

11
12
13
14

20
21
22
a
so
25
26
27


28
29

30

31

32

*Rnt(LOUT,9) KOK
GO TO 500
CONTINUE

CALL NE«*PAG(TITLE,0,JOATE)
CALL SECOMO(A2)
»2 = A2 - 41
«RITE(LOUT,10) NC»SE, A2
REAouiNfi) TERM
IF(TEHM.EQ.RMOR) 60 TO «20
IF(TERM.NE.TEND) SO TO «JO
60 TO 500
CONTINUE
NCASE a NCASE + 1
60 TO 100
STOP

FOWMAT (20A4)
FC'R'-'AT (40X.A4)
FORMAT (aox,i2)
FORMAT (10X,3F10.2»IIO)
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
FORMAT (54H1TQO MANY GRID SQUARE CROSSINGS INPUT •- JOB ABORTED JEM
FORMAT (1HO,6X,3F12.2,I12)
FOWCAT (40X,A4,bX.2FlO,0)
FOPKAT CJOH1CALCULAT10NS STOPPED IN 'AREAEM' .« JOB ABORTED
FORMAT (50H1CALCUUATIONS STOPPED IN 'PONTEM* — JOB ABORTED
FORMAT (20HOENO OF CASE NUMBER , 13, 1 OX, 1 OHCP TIME * ,F8.B,
1 5H SEC )
FOWMAT (40X,A«,6X,F10.0)
FOHMAT (SOHICALCULATIONS STOPPED IN 'GRIOIT' •- JOB ABORTED
FORMAT (40X.F10.0)
FORMAT (1HO,31HTRAJECTOR» DATA 9Y GRID SQUARE ,
1 // ,12X,ilHTIME,8X,6HUTM-X ,6X,6MUTM-y ,10X,2HIO )
FORMAT (aOX,3FIO.O)
FOWVAT (1H0.4SHTUO MANY TRAJECTOPY NODES INPUT •• JOB ABORTED
FORMAT (1H0.4SHTOO MANY VERTICAL STATIONS INPUT - JOB ABORTED
FOWfAT (HSURFACE TEMPERATURE DATA , // , 1 1 X, 4HTIME, 7X
1 11HTEMPERATURE , 25 (// , 1 OX.F5. 0 , 7X , F7 .1 ) )
FORMAT(1MO,8X,2SHMIXING LAYER DEPTH DATA , //, U X, «HTIME,6X,
I *HOEPTH ,25(//,10X,F5.0,5X,F6.1))
FORMAT (51HOTOO MANY MJXJNG LAYER HEIGHTS INPUT •- JOS ABORTED
END
EM
, EM
EM
EM
EM
} EM
EM
221
222
223
224
225
226
227
226
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
C-82

-------
      SUBROUTINE ADHOUR                                                 EM   373
C                                                                       EM   2T4
C          *AOHOUR*  INSERTS TRAJECTORY TIMES ON THE EVEN HOURS         EM   275
C                                                                       EM   276
      OINENSION  IViORK(520)                                             EM   277
      COMMON /HISTRY/ Ti*EHS(520),    toHscseo),      UTMHs(2,520)»     EM   zi6
     I                NUHHS                                             EM   879
      COMMON /TABLES/ THOUR(2«)                                         EM   880
      COMMON /WORKER/ IDATEt          NG» IHR,        WORK(22440)       EM   381
      EQUIVALENCE (1WORK.WORK)                                          EM   282
C                                                                       EM   283
      K = \                                                             EM   280
      JT a IFIX(TIMEHS(1)»SMALL)/60 * 2                                 EM   285
      DO 100 I * 1,NUMHS                                                EM   266
      IMl i I . 1                                                       EM.  287
60    IFUIMEHStn.LE.THOURtJT)) GO TO 90                               EM   288
      I«*OR<(K) = IDHS(IMl)                                              EM   289
      hO»K(K»520) » THOURCJT)                                           EM   290
      TPORT = (THOUR(JT)-TlMEHSUMin/mMEHS(I)-TIMEHSCim))           £M   291
      *ORK(K»10
-------
c
c
c
c

























c
c





65

70
PART SOX 	
.....ALOE
(REPEATED NGRIO TIMES PER

DIMENSION 4SOURC (11,2000), IDLAST(44),
1 , ISUM13)
COMMON /OEGRID/ 10(2000), AREA(2000),
COMMON /INPUTS/ TITLEC20), JOATE(IO),
COMMON /HISTRY/ TIMEHS(520), IDHS(520),
1 NUMHS
COMMON /TABLES/ THOUR(2«)
COMMON /PARCEL/ PrtlOTH, HPWIDT,
1 PAREA, DTFRE.Z,
2 ZEE(5), HT1NTF(6),
3 ROAIR
COMMON /WORKER/ IDATE, NGrlHOUR,
COMMON /EMRATE/ £MARAT(T,520), EHABAS(T),
COMMON /ANSWER/ YES.RNEG, IYES,NO,
COMMON /LABLIN/ NAMIN(U), NFLXIN,
1 AOJUST(ll)
CO"*ON /LA80UT/ NAMOUT(7), NFXOUT,
EQUIVALENCE (ASOURC, WORK )
EQUIVALENCE (ISUM, SUM)
DATA ALL, LOUT, LPUNCH /4HALL ,6, I/
0»TA NIJMREC, NwPREC /44.510/
DEBUG a RNEG
PAKERB * RNEG
NM1 s NUMREC • 1
IF(NCASE.GT.l) GO TO 80
RFNEHATE IOLAST ARRAY WHICH CONTAINS THE GRID


HOUR)

SUM(StO)

NGRID
NCASE
UTMHS(a,S20),


PLENTH,
SIGEOG,
NOSTAT,

WORK (82440)
NOSUM3
SMALL
WTMOLIO1),

HTMOLO(7)








SQUARE ID NUMBER
ASSOCIATED WITH THE LAST SET OF NFLXIN VARIABLE IN EACH RECORD
00 70 J = 1, NUMREC
JL a (N«PREC*J • 3)/NFLXIN
IFUL.LE. NGRIO) GO TO 65
IDLAST(J) » ID(NGRID) » 1
GO TO 70
CONTINUE
IDLAST(J) * ID(JL)
CONTINUE








IF (DFBUG.EQ.YES) WRITE (LOUT, 9) (IDLA3T U) ,J«1 , NUMREC)
80
C
C
C




CONTINUE

SKIP 'PRE-TRAJECTORY START TIME DATA* IN FILE

INDEX = IFIX(TIMEH3(1)»SMALL)/60
IFUNOEX.EQ.O) CO TO J25
IF(INOEX.GT.23) STOP
00 120 I = 1, INDEX








CUNIVAC f?eAD(LUAREA,ERRsJOO,£NDS510) ( ISUM ( J J) , J J»l , 3)

90
95
too

110
SUFFER IN (LUAREA.l) (ISUMd ) , ISUM(3) )
IF(UNIT(LUAHEA)) 95, 510, 100
IF(DE3UG.EQ.YES) WRITE (LOUT, 1) (ISUH(JJ) , JJ»1 ,3)
00 110 J ' i, NUMREC
READ(LUAREA)
CONTINUE






EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
.EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
325
326
327
328
329
330
331
332
333
334
33S
336
337
338
339
340
341
342
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
C-84

-------
120   CONTINUE                                                          EM   360
C                                                                       EM   381
125   I\'EXT = J                                                         EM   382
      K2MAX i NFUXIN*2000                                               EM   383
      JF(NOSUMS.NE.IYES)  60 TO 130                                     EM   JBtt
      CALL NE*P»GUITLE,0,JOATE)                                        EM   385
      *RITE(LUUT,6)  (NAMIN(JJ),JJ"1.NFLXIN)                            EM   366
C                                                                       EM   367
c         HOURLY TIME CYCLE BEGINS HEBE                                 EM   388
C                                                                       EM   389
130   IHIST = INEXT                                                     EM   390
      DONTRO « RNEG                                                     EM   391
      INDEX * INDEX » j                                                 EM   392
      IDMAX * -1                                                        EM   393
      00 150 I * IHIST,NUMH3                                            EM   394
      JT a IFIX(TIMEHS(I)+SMALL)/60 » 1                                 EM   395
      1FUT.LE.INDEX)  GO TO 140                                        EM   396
      INEXT * I                                                         EM   397
      GO TO 160                                                         EM   396
140   IOMAX = MAXOdDMAX, IDHS(I))                                       EM   399
150   CONTINUE                                                          EM   400
      INEXT » I * 1                                                     EM   401
160   IF(IOMAX.GT.O)   GO TO 200                                        EM   402
C                                                                       EM   403
C        ALL TRAJECTORY NODES THIS HOUR ARE OFF GRID AND                EM   404
C        THE DEFAULT AREA SOURCE EMISSION RATES ARE USED                EM   405
C                                                                       EM   406
      DONTRD * YES                                                      EM   407
      KEAD(LUAREA) IOATE , NG , IHOUR                                   EM   408
      IFUUCHEC(LUAREA))  165.180                                       EM   409
IflO   IF(DfcBUG.EQ.YES) WRITE(LOUT,1} IDATE,NG,IHOUR                     EM   410
185   CONTINUE                                                          EM   411
      DO 190 J * 2,NUMREC                                               EM   
-------
      BUI-FFP IN (LIJAREA,!)  (SUM(U,SUM(NNPREC))                         EM   435
2«0   IF (UMT(LUAREA))   242,   510,  245                                EM   436
242   IOATE = ISUMCD                                                   EM   437
      NG a I5UM(2)                                                      EM   438
      IHOUR = I5UM(3)                                                   EM   439
      CALL XMIT(K2,SUM(4),WORK)                                          EM   440
      60 TO 250                                                         EM   441
245   PARtRR = YES                                                      EM   442
      *RlTE(LauT,7)                                                     EM   443
250   CONTINUE                                                          EM   444
      IFUSTREC.EG.l)  GO TO 275                                        EM   445
      00 270 J = 2,NUMREC                                               EM   446
      Kl * K2 + 1                                                       EM   447
      K2 = K2 « NWPREC                                                  EM   448
      IF(J.GT.LSTREC)    GO TO 265                                      EM   449
C                                                                       EM   450
C        ON THE UNIVAC REPLACE BUFFER IN AND IF(UNIT) WITH              EM   451
C     READ(LUAREA,ERKx263,ENO«510) (SUM(JJ),JJ«l,NHPR£C)                EM   452
C                                                                       EM   453
      BUFFER IN fLUARE*,!) (SUM(l), SUM(NMPREO)                         EM   454
260   IF(UU!T(LUAPEA))   262,   510,  263                                EM   455
262   CALL XMIT(NV»PREC,SUM,WORK(K1))                                     EM   456
      GO TO 270                                                         EM   457
263   PARERR a YES                                                      EM   458
      «RITE(LOUT,7)                                                     EM   459
      GO TO 270                                                         EM   460
265   READ (LUAREA)                                                     EM   461
      IFCIOCnEC(LUAREA)) 270,270                                        EM   462
270   CONTINUE                                                          EM   463
275   CONTINUE                                                          EM   464
      IF(DEBUG.NE.ALL)  GO TO 280                                       EM   465
      WRITF(LOUT.l) IOATE, NG, IHOUR                                    EM   466
      N » LST»SC»NWPREC                                                 EM   467
      «RITF-(LOUT,5) CNORK(K),K*1,N)                                     EM   468
280   CONTINUE                                                          EM   469
      IF(NDSUMS.NE.IYES)  GO TO 300                                     EM   470
      IF(PAWEHR.Efl.YES)  60 TO 300                                      EM   471
      00 290 I = 1,NFLXIN                                               EM   472
      SUM(I) s 0.0                                                      EM   473
      00 285 J f t.NGWIO                                                EM   474
      SUM(I) » SUM(I) » ASOURC{I,J)                                     EM   475
285   CONTINUE                                                          EM   476
      SUM(I) * 3UM(I)«ADJU3T(I)                                         EM   477
290   CONTINUE                                                          EM   476
      wRITECLOUT,18) THOUR(INDEX), (SUM(I),I«l,NFLXIN)                  EM   479
C                                                                       EM   480
300   CONTINUE                                                          EM   481
C                                                                       EM   4B2
      INM1 = INEXT • 1                                                  EM   483
      00 360 I * IHIST.INM1                                             EM   484
      IOSD = IDHS(I)                                                    EM   485
      IF(IOSQ.LE.O)  GO TO 340                                          EM   486
      00 310 J • l.NGRIO                                                EM   487
      IFUOS3.NE.IOU))  SO TO 310                                      EM   488
      JDEX » J                                                          EM   489
                                       C-R6

-------
      GO TO 320                                                         EM   490
310   CONTINUE                                                          EM   491
      GO TO 5SO                                                         EM   492
320   CONTINUE                                                          EM   493
      AREAFR = PAREA/CAREACJOEX))                                       EM   494
C                                                                       EM   495
C     NOX, PARF, OLEF, AROM, ALOE, CO, SOX                              EM   496
C                                                                       EM   497
      EMARATCl,!) » ASOURCC 3,JDEX)*AOJUST( 3)*AREAFR                   EM   498
      EMARATC2,!) s ASOURCC 8.JOEX)«AOJU3T( 8)»AREAFR                   EM   499
      EMAhATC3,I) * ASOURCC 9,JUEX)•ADJUST( 9)«AREAFR                   EM   500
      EMARATC4,!) » ASOUHCC10,JDEX)*ADJUSTC10)*AREAFR                   EM   501
      EMARATC5,n B ASOURCCH»JDEX)*AOJUSTCin*AREAFR                   EM   502
      EMARATC6.I) a ASOURCC 5,JOEX)«AOJUSTC 5)*AReAFR                   EM   503
      EMARATC7,!) « ASOURCC 2,JOEX)*AOJUSTC 2)«AREAFR                   EM   504
C                                                                       EM   505
      IFCDEBUG.NE.rES)  CO TO 360                                       EM   506
      *RITE(LOUT,
-------




410



420


C
510


520


530


C
1
2
4
5
6

7

8

9
to

11


12
13
14
« C
1 7
16

17
IB

0(1 «aO J o liNUMHS
IF(MUD(J,25).NE.O) GO TO 410
CALL NE*PAG(TITLE,0, JDATE)
*10) IOSO» KOK
RETURN

FORMAT (1H0.7HIOATE =rI8,10H N6RIO * ,I7,10H IHOUR * »I4)
FORK54T (1HO,1BH L*ST RECORD NO. a 14)
FORMA7 OH ,bHTIME a,F6.2,6H ID * , 16, 3X , 7E 11 . 3, 9H MOLES/HR )
FOHMtT (1H .11E11.3)
FOHM»T (1MO, 35HREGIONAL AREA SOURCE EMISSION SUMS ,30X,
1 12H(MOLES/HOUR) ,//,8H TIME , 6X, 1 H*4, TX) )
FORMAT (50HO SUBROUTINE AREAEM ENCOUNTERED PARITY ERRORS ""
1 45HSOME OAT« FROM PREVIOUS HOUR USED 14)
FORMAT (80H1 SUBROUTINE AREAEM ENCOUNTERED UNEXPECTED EOF •-
1 J0« ABORTED 18)
FORK'ATCIHO.BHIDLAST )
FORMAT (1HO,//,23H GRID SQUARE 10 NUMBER ,I6,aX,
1 36HIS NOT ON THE GRID -- .JOB ABORTED ,/, 6H KOKS ,18)
FORMAT (!HO,a7HARF.A SOURCE EMISSION FLUXES , 30X, 13HMOUE FRACTION
1 17H - METERS/MINUTE , // , 6X , 5HTIME r 5X , 5HUTM-X, 5X, 5t'HUTM»Y,
2 7(5X,A4,3X))
FORMAT C30H AREA SOURCE EMISSIONS )
FORMAT (1HO,3F10.1,7E12.«)
FORMAT (12HAREA SOURCES, 14 , «X , Fl 0.2, 4E12.4, /, 30X,«E12t4)
1 SX,7E12.4)
FORMAT (IHO,46HAREA SOURCE EMISSION RATES »• MOLES/HR ,
1 //-.SX.SHTIME ,5X,2HIO,«X,7<5X,A«, 3X))
FORMAT (lHO,H0.2,3X,I«,3X,7Eie.4)
FORMAT (IHO,F7,1,2X,11E11.3)
END
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM-
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
FM
en
EM
EM
EM
EM
EM
EM
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
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
cat
JO O
587
588
589
590
591
592
C-88

-------
      SUBROUTINE OHPLUM(TA,TS,U,ISTAB,ACMM,HTINV,HTPS,OH,PENTFR,DTDZ)    EM   593
C                                                                       EM   594
C        OHPLUM CALCULATES PLUME  RISE AND INVERSION PENETRATION,         EM   595
C                                                                       EM   596
C     INPUTS                                                            EM   597
                     AMBIENT TEMPEKATURE  (DEC C)                        EM   598
                     STACK GAS TEMPERATURE  (OEG C)                     EM   599
                     WIND SPEED   (M/SEC)                                EM   600
                     ATMOSPHERIC STABILITY CLASS (1»6  FOR  A»F)         EM   601
                     STACK VOLUMETRIC FLOW RATE   (M**3/MIN)             EM   602
                     INVERSION HEIGHT (METERS)                           EM   603
                     STACK HEIGHT  (METERS)                             EM   601
                     POTENTIAL TEMPERATURE GRADIENT  (OEG C/METER)       EM   605
                                                                        EM   606
                                                                        EM   60T
                     PLUME RISE  ( METERS  )                             EM   606
C          TA
C          TS
C          U
C          ISTAB
C          ACMM
C          HTINV
C          HTPS
C          OTDZ
C
C     OUTPUTS
C          DH
C          PENTFR    INVERSION PENETRATION FRACTION  (0 TO 1)           EM   609
C                                                                       EM   610
      DATA ERLMT, NITRAT, YES /.005, 159, 4HYES /                       E«   611
      DATA DFDTDZi GRAV, BETPSQ /.0137,  9.80665,  .160X                EM   613
      DATA UMIN  /!./                                                   EM   613
      DEBUG = GHAV                                                      EM   614
      TAK * 1A + 273.3                                                  EM   615
      TSK i TS » 373.2                                                  EM   616
      ACMS s ACMM/lflB.49556                                             EM   617
      F = GRAV*ACM8*(T3K-TAK)/TSK                                       EM   618
      UU s AMAX1(U.UMIN)                                                EM   619
      UDTDZ = OTOZ                                                      EM   620
      IFCOTDZ.LT.O.O  .OR.  DTDZ.GT.O.10)  UOTOZ • OFOTDZ               EM   631
      S s GRAVUOTOZ/TAK                                                EM   63?
      ZB a HTINV • HTPS                                                 EM   633
      Z8M s IS - 5.                                                     EM   634
      PENTFR s 0.0                                                      EM   635
      IF(ZRU.LE.0.0)  PENTFR * 1.0000                                   EM   636
      IF(UU.GT.1.39   .OR. ISTAB.LE,4)  GO TO 10                        EM   637
C     .......  CALM CONDITIONS  ........                                EM   638
      OH = 5.0*(F/S**1.5)**,35                                          EM   629
      GO TO 100                                                         EM   630
10    IF(IST*8.LE.«)  GO TO 30                                          EM   631
C     	  STABLE WITH WIND  -...«•—                               EM   633
      DH = 3.9*(F/(UU*S))«*.333333                                      EM   633
      GO TO 100                                                         EM   634
30    COMTINUE                                                          EM   635
C     ........  NEUTRAL OR UNSTABLE WITH WIND, WITHOUT INVERSION •••••  EM   636
c                   (IE....STACK HEIGHT ABOVE INVERSION HEIGHT)         EM   637
      IFtF.GT.55.) GO TO 30                                             EM   638
      XSTAR : 1U.*F«*.635                                               EM   639
      GO TO 40                                                          EM   640
30    XSTAR a 3«.5«F**.«0                                               EM   641
40    XRSTAR 3 3.5*XSTAR                                                EM   643
      OH * 1.6*((F*XRSTAR**2)**.333333)/UU                              EM   643
      IF(ZBM.LE.O.O)   GO TO 100                                        EM   644
      DHMAX * DH                              '                         EM   645
C     .......  NEUTRAL OR UNSTABLE WITH WIND BELOW A STABLE LAYER  -.-—EM   646
C              DEFINE ZR « ZEO/ZB                                       EM   647
                                     C-89

-------
C                     As  (3«F/(8ETPSQ»U*S»ZB**3)-2/9)«,666.666         EM   feUS
C              SOLVE  FOR  THE  ROOTS OF                                   EM   6*19
C                     FCTCZK)  «  0 » ZR**3 • ZR»*2 - A                   EM   650
C              USING  THE  NEWTON-RAPHSON METHOD                          EM   651
60    A = .6fcb666«(3.*F/(BETPSO*UU*S*ZB**3) «.222?222)                  EM   652
      ZH = ,75                                                         EM   653
      00 70 I s 1,NITRAT                                                EM   651
      FCT = ZR**3 . ZR**2 -A                                           EM   655
      OFCT s 3.*Z«**2 »2.*ZR                                            EM   656
      ZRNU a ZR - FCT/OFCT                                              EM   657
      ERR = ABS(ZR"JU-ZR)                                                EM   658
      IF (EWR.UE.ERUMT)  GO  TO  80                                        EM   659
      ZR s ZKNU                                                        EM   660
70    CONTINUE                                                         EM   661
      DH = ZR*ZB                                                       EM   662
      *«ITt(6,l) I,ERLMT,HTINV,HTPS,DH                                  EM   feb3
      GO TO 90                                                         EM   664
80    OH a ZR*ZB                                                       EM   665
      UH s AMIM(DHMAX,DH)                                              EM   666
      IFCOEHUG.EQ.VES)  WRITEC6,2) I.HTINV.HTPS,ZB.DH                    EM   667
90    PENTFH s 1.5 -  1,/IR                                              EM   66S
      PENTFR s AMAXKO.O.PENTFR)                                        EM   669
      PENTFR a AMIi^l (1.0,PENTFR)                                        EM   670
100   RETURN                                                           EM   671
C                                                                      EM   672
1     FORMAT(1HO,10X,61HCONVERGENCE TO ROOTS OF PLUME RISE EQUATION NOT EM   673
     X ACHIEVED IN   ,Ia,l?H  ITERATIONS   ,/,10X,5F12.3)                 EM   674
2     FORMATC1H ,10X,8HITERAT *  .J1.9H  HTINV  * ,F6.1,9H  HTPS  «, Ffc.liEM   675
     1  7H  ZB »   >F6.1,  6H DH *   ,F6.1 )                           EM   676
      END                                                              EM   677
      FUNCTION OIST«NCIPT,TS,TE)                                        EM   6?«
C                                                                      EM   679
C        DETERMINES THE DISTANCE  ALONG  THE  TRAJECTORY                   EM   680
C        BETWEEN TIMES *TS* AND  *TE*.                                   EM   68S
C                                                                      EM   682
      COMMON /rtINO/  T(IOO),   V(100),   THC100),  NPTS                   EM   683
      COMMON /LINKS/ SEGLEN(IOO),   RAOI30UOO),  RADMUL,  PDISMXC6)     EM   684
      IFCTE.LT.TCNPTS))  60 TO 5                                        EM   665
      OISTAN = 1000000.                                                EM   686
      RETURN                                                           EM   687
5     IP1 » IPT +1                                                    EM   688
      IF(TUPl).LT.TE)  60 TO 10                                        EM   689
      OISTAN « (TE - TS)*V(IPT)                                         EM   690
      RETURN                                                           EM   691
10    OX a (T(IPl) - TS)OV(IPT)                                         EM   692
15    II a IPt                                                         EM   693
      IP1 a IPl + 1                                                    EM   694
      IFCTCIP1) - TE)  20,25,25                                        EM   695
20    OX a OX + SEGLEN(Il)                                             EM   696
      60 TO 15                                                         EM   697
25    DX a OX * (TE - T(Il))*V(n)                                      EM   69B
      DI3TAN 3 OX                                                      EM   699


CORRECTION
After EM  670,  insert
      IF  (PENTFR.LT.  .1)  PENTFR=0
                                       C-90

-------
      RETURN                                                            EM   700
      END                                                               EM   701
      FUNCTION ERF(X)                                                   EM   702
C                                                                       EM   703
C        RATIONAL APPROXIMATION FOR THE ERROR FUNCTION FROM THE NBS    EM   704
C        HANDBOOK OF MATHEMATICAL FUNCTIONS (AM3-55)   PG.  299.           EM   70S
C        MAX ERROR  *  2,5 * 10*«-5                                     EM   706
C                                                                       EM   707
      DATA Al, A2, A3. P / .3460242, -.0958798, .7478556,  .47047 /      EM   708
      T s ABS(X)                                                        EM   709
      IF(T-5.)  Z, 2, 10                                                EM   710
2     V x l./(l.«P*T)                                                   EM   711
      0=1.- ((((A3*V)»A2)*V»A1)«V)*EXP(«T*T)                         EM   712
      GO TO 20                                                          EM   713
10    Os 1.000000                                                      EM   714
20    ERF i SI6N(0,X)                                                   EM   715
      RETURN                                                            EM   716
      END                                                               EM   717
      SUBROUTINE 6ESTAB(TIME»ISTA8,DTNEXT,NXSTAB)                        EM   718
C                                                                       EM   719
C        DETERMINES STABILITY CLASS                                     EM   720
C                                                                       EM   721
C         ISTAB  * STABILITY CLASS AT TIME SPECIFIED                    EM   722
                                                                        EM   723
C         OTNEXT * TIME TO NEXT STABILITY CLASS CHANGE                  EM   724
C         NXSTAB s STABILITY CLASS AT NEXT UPDATE  TIME                  EM   725
C                                                                       EM   726
      COMMON /PASCAL/  TMSTAB(2b),  KSTABLC25),  ISTBMX                 EM   727
      IF(TlMe.LT.TMSTA8(ISTBMX))  GO TO 10                              EM   728
5     IST»H s KSTA8LCIST8MX)                                            EH   729
      DTNExr a 1000000.                                                 EM   730
      RETU«M                                                            EM   731
10    CONTINUE                                                          EM   732
      IM»X s ISTBMX - 1                                                 EM   733
      00 15 I s l.IMAX                                                  EM   734
      IP * 1 * 1                                                        EM   735
      IF( (TIME.GE.TMSTAB(D) .AND. (TIME.LT.TMSTAB (IP)))   60 TO 20     EM   736
15    CONTINUE                                                          EM   737
      60 TO 5                                                           EM   738
20    ISTAB « KSTABL(I)                                                 EM   739
      NXSTAB • KSTABL(IP)                                                EM   740
      OTNEXT * TMSTAB(IP)  • TIME                                        EM   741
      RETURN                                                            EM   742
      END                                                               EM   T43
                                     C-91

-------
      SUBROUTINE GRIOIT (LUGRID.KOK)                                     EM   744
C                                                                       EM   745
C        *GRIDIT* READS THE RAPS/ST.LOUIS EMISSIONS GRID                EM   746
c                 OISCRIPTION FILE FROM LUGRIO.                         EM   747
C                 IT STORES ONLY THE GRID SQUARE  DtNTlFIERS AND        EM   748
C                 CORRESPONDING AREAS FOR USE IN «AR£AEM*.              EM   749
C                                                                       EM   750
C     RAPS FILE DESCRIPTION                                             EM   751
C           NGRIO                                                       EM   752
c           10  IAREA  UTMH  UTMV  STATE  COUNTY  HITE  RO              EM   753
C           ID ... REPEATED NGRID TIMES                                 EM   754
C                                                                       EM   755
C                                                                       EM   756
      DIMENSION   IWORK(16000),   lAREA(aOOO)                           EM   757
      COf-MUN /ANSWER/  YES,RNE6,    IYES.NO,        SMALL               EM   758
      COMMON /OEGRIO/  10(2000),    AREA(2000),     NGRIO               EM   759
      COMMON /WORKER/  IOATE,    NG,   IHR,  W)RK(22440)                EM   760
      EQUIVALENCE(IWORK.WORK)                                           EM   761
      EQUIVALENCE(IAREA,WORK(16001))                                    EM   762
      DATA NUMREC, NUPREC. NVAR /32,510, 8/                             EM   763
      DATA ALL, LOUT /4HALL , 6/                                        EM   764
      DEBUG a RNEG                                                      EM   765
      IREC s 1                                                          EM   766
      Kl 3 0                                                            EM   767
      K2 = N«P«EC - 1                                                   EM   768
C                                                                       EM   769
C       Of. THE UNIVAC REPLACE BUFFER IN AND IF UNIT WITH                EM   770
C     READ(LUGRIO,ERR=220,END=210) IHR,(WORK(JJ),JJ»1,K2)               EM   771
C                                                                       EM   772
      BUFFEH IN (LUGRIO,1) (IHR.WORK(K2))                               EM   773
1?0   IF(UMTUUGRID))    130,   210,   220                             EM   774
130   JMGRIl) = IHR                                                       EM   775
      IF(DE8UG.NE.ALL)  GO TO 140                                       EM   776
      *»IT£(LOUT,5} NGRIO                                               EM   777
      A
-------
180


190


210


220
               NGRIO
               UDCJ), IAREA(J), J»l,NGRIO)
                                                 JOB ABORTED  ,18)
                                                •  JOS ABORTED   ,18)
ARE*(J) s FLOATUAREA(J))
Kl = Kl + NVAR
K8 = K2 » NVAR
CONTINUE
IF( (DEBUG.EO.YES),OR.(DEBUG.EG.ALL) )  GO TO 190
RtTUHN
iXITEUOUT.S)
«R11E(LOUT,7)
RETURN
KOK s 9
*RITE(LOUT,4) KOK
RETURN
KOK s 99
*«ITEUOUT,3) KOK
RETUSM
FORMAT (44H1PARITY ERROR ON GRID FILE
FORMAT (16H1UNEXPECTEO EOF IN GRID FILE
FORMAT UH0.10H    NGRIO*  ,16)
FORMAT (1H ,3(815,3X))
FORMAT (1H ,10(214,4X))
END
      SUBROUTINE LOCATE(IPT,XP,YP.PD 1ST,TPASS,KFLAG,ISTAB)

          LOCATE DETERMINES WHETHER OR NOT A POINT SOURCE
          IS PASSED ON A TRAJECTORY SEGMENT AND WHETHER OR
          NOT THE POINT SOURCE IS CLUSE ENOUGH TO BE CONSIDERED.

            IPT   «   TRAJECTORY NODE INDEX
            XP    *   X COORDINATE OF POINT SOURCE IN KM
            YP    s   Y COORDINATE OF POINT SOURCE IN KM
            POIST s   PERPENDICULAR DISTANCE TO POINT SOURCE IN KM
            TPASS s   TIME SOURCE IS PASSED
            KFLAG *   FLAG WHICH IS POSITIVE IF SOURCE MEETS ALL
                      CRITERIA FOR CONSIDERATION ON TRAJECTORY SEGMENT IEM
            ISTAB •   STABILITY CLASS

      DIMENSION DX(2), OY(2), DIST(2), ALFA(2), BETA(S)
COMMON  /«VIMD/
COMMON /LINKS/
COMMUM  /THAJ/
COMMON /ANGLES/ GAMAK100),
DATA HIE20 /6.283185307/
                      TUOO),  VflOO),  TH(IOO),  NPTS
                      SEGLEN(IOO),  RAOISQ(IOO),  RADMUL, PDISMXC6)
                                   GAMA2C100),  ETAK100),  ETA2C100)
10
DX(1) = XP - P(1,IPT)
DY(1) = YP . P(2,IPT)
DISTSQ = DX(1)*«2  *  OY(1)**2
    CHECK DISTANCE TO POINT SOURCE RELATIVE TO RADMUL*SEGMENT LENGEM
IF(DISTSQ.LE.RADISQdPT))  GO TO 10
KFLAG a -1
RETURN
BETA(l) s ATAN2(DY(1),OX(1))
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
!EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
IEM
EM
EM
EM
EM
799
800
801
802
803
804
SOS
806
807
608
609
610
811
612
611
8ia
815
816
817
618
619
820
621
822
621
824
62S
826
827
828
829
630
631
832
833
834
835
636
837
838
83<>
8UO
641
842
643
644
645
646
847
846
649
650

-------






c



20

C








C

C
40


50

60


70
too








C
C
C
C
C
C
c
c
c
c
IF(HF.TA(1).IT, 0.0) BETA(l) a BETA(l) * PJE20
ALF«(1) » BETA(l) « TH(IPT)
IF(ALFA(1).LT. O.n) ALFA(l) a ALFA(l) » P1E30
IF(ALFA(1).GT. PUaO) ALFAC1) « ALFA(l) - PJE20
OISTC1) s SUR1COISTSO)
POIST a DIST(l)*SIf«ALFA(l))
CHECK PERPENDICULAR DISTANCE
IFCAHSCPDIST).LT.POISMX(ISTAB)) GO TO 20
KFLAG B « I
RETUKN
CONTINUE
Id a IPT + 1
CHECK BISECTOR ANGLES
DX(2) e XP « P(l, IP1)
D»(?) a YP • P(2, IP1)
BETAC2) a ATAN2CDY(2),DXC2))
IF(BETA(2).LT. 0.00) BETA(2) • 8ETA(2) + PIE20
AUFA(8) a BETA(2) - TH(IPT)
IF(AI_M(2) ,LT, 0.00) ALFA(2) * ALFAC2) » PIE20
IF(ALFA(2) ,GT. PIE20) ALFA(2) » ALFAC2) • PIE20
KFLAG = « 1

IF(ETAKIPT) ,GE. QAMAl(IPT)) SO TO 60

IF(POIST ,LT. 0.00) GO TO 50
IFUALFACn.LE.GAMAlUPT)) .AND. (ALFA (2) .GT.ETA1 (IPT) ) ) KFLAG »
GO TO 100
lF((»LFA(n.GE.GAMA2(IPT)) .AND. ( ALF A (2) .tT.ET A8 (IPT ) ) ) KFLAB«
GO 10 100
IF(POJST ,GE. 0.00) GO TO 70
IF((ALFA(1).GE.GAMA2(IPT)) .AND. (ALFA (2) .LT.ETA2 (IPT ) ) ) KFLAG »
GO 10 100
IF((ALFA(1).LE.GAMA1(IPT)) .AND. (ALFA (2) .ST.ETA1 (IPT) ) ) KFLAG »
IF(KFLAG.LT.O) RETURN
OAXIAL = OIST(t)*COS(ALFA(t))
TPASS a T(IPT) * OAXIAL/V(IPT)
TPASS = AMAX1 (T(IPT)rTPASS)
TPASS a AMINHT(IPl), TPASS)
RETURN
END
SUBROUTINE PARTIT(X,HT,HTINVH,HT1NTF,NOSTAT,ISTAB,TALL»PENTFR
1 .VFRACT)

•PARTIT* PERFORMS THE VERTICAL INTEGRATION OF THE GAUSSIAN
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
1EM
EM
2EM
EM
EM
3tM
EM
«EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
DISTRIBUTION OVER VERTICAL CELLS DEFINED BY HT1NTF. IT ASSUMES EM
A REFLECTION AT THE SURFACE AND AT THE INVERSION BASE.
THE MAXIMUM VALUE OF THE INTEGRAL HAS BEEN NORMALIZED TO
ONE MINUS THE INVERSION PENETRATION FRACTION.

INPUTS
X a DOWNWIND DISTANCE (KM)
MT a SOURCE EFFECTIVE HEIGTH (METERS)
EM
EM
EM
EM
EM
EM
EM
851
853
853
85«
855
856
857
858
859
860
661
862
863
864
865
Bfcb
867
866
6bt
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
896
699
900
901
902
C-94

-------
10
15
20
C

C
as
30
        MTINVR
        HT IMF
        NOSTAT a
        ISTAB s
        TALL  «
        PENTFR «
    OUTPUT
        VFRACT »
          * HEIGHT OF INVEHSION (METERS)
          * HEIGHTS OF CELL INTERFACES  (METERS)
          a NUMBER OF CELLS
            STABILTY (1-6 CORRESPONDING TO A-F)
            TALL STACK INDICATOR (EQUALS  YES OR  NO)
            INVEHSION PENETHATION FRACTION (o TO  n
            VECTOR OF FRACTIONS OF NORMAL DISTRIBUTION
            IN EACH CELL (DEFINED BY HTINTF)
«0
50
 DIMENSION  ZE(6)r   HTINTF(l),     VFRACT(l)
 COMHJN /SIGMAS/  NDY,   XOY(4),   SIGYO(4,6),  NDZ,  XDZ(12),
1                 SIGZD(12,6),     NCAT
 COMMON /SIGTAL/ ATALL(fc),  STALL(6),  CTAUL(6)r OTALL(fc)
 DATA SOHT2 /I.414213562/
 DATA YES, RNEG, DZINV /4HYES ,4HNO  ilO,/

 00 10 I x 1,NOSTAT
 VFRACT(I) * 0.000
 COMINUE
 CPt'wTR a 1.000 " PENTFR
 NSP1 s NOSTAT + t
 S s -1.00
 IF(HT.GE.HTINTF(NSP1))  60 TO 200

 IF(TALL.EQ.YES)  GO TO 5
 SIHZ z TRPLOG(X,XQZ,3IGZOU,ISTAB),NDZ,1)
 SO TO 6
 SIGZ a CTALL(ISTAB)*X*»DTALL(ISTAB)
 SIGZ? = SIGZ»SQRT2
 00 J5 I a 2,NSP1
 IF(HTJNV«.LT.HTINTF(I))  60 TO 20
 CONTINUE
 IMAX s I - I
 IF(HTIUVR - HT) 120,120,25
 IF(PENTFR.GT. 0.99) GO TO  120
 ........ SOURCE HEIGHT BELOW INVERSION HEIGHT
 00  70 MP s 1,2
 •vSELOW a 0
 DO 30 J » 1.N3P1
 ZE(J) * HTINTF(J) + HT*8
 IF(ZE(J).LT.O.OO)   NBELOA • NBELOW * 1
 CONTINUE
 HTLMT a HTINVR t HT»S
 I * I
 IF(NBELOW.LT.l)  GO TO 50
 DO 40 I a 1,NBELOW
 ZF a ABS(ZE(I)/SIGZ2)
 ZN = ZE(I*1)/SIGZ2
 ZN s AMINKZN,0.0000)
 ZN a ABS(ZN)
 VFHACT(I) a VFRACT(I) * .5*(ERF(ZP)  - ERF(ZN))
 k«.RBE10W
 CONTINUE
 00 60 J • I,NOSTAT
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
90)
904
905
906
90T
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
923
929
930
9M
932
933
934
935
936
937
938
939
940
9
-------
      ZN  a  ZE(J)/SIGZa                                                  EM    958
      ZN  a  AMAXl(ZN,0.000)                                              EH    959
      ZF  a  ZE(J«1)                                                      EM    960
      If  (ZF.LT.HTLMT)   60  TO 55                                        EM    961
      *F  a  lOQOO.                                                      EM    <">2
      VFR4CUK)  s  VFkACT(|O  * ,5*
-------
80

90
C
C
C
100
      SUBROUTINE PLUMAS(IPT,TPASS,POIST,PLUMFR,1STAH,DXFREZ,TALL.KPLAG) EM

        •PLUMAS* PERFORMS THE LATERAL INTERGRATION OF THE GUASSIAN
        tISTRlBUTION TO DETERMINE THE PORTION OF THE PLUME'S MASS
        REMAINING IN THE LAGKANGIAN AIR PARCEL AFTER DTFHEZ MINUTES.

                   TRAJECTORY NODE INDEX
                        AT WHICH POINT SOURCE WAS PASSED
                   PERPENDICULAR DISTANCE TO SOURCE
                   RELATIVE PORTION OF PLUHE'S MASS REMAINING IN PARCEL
                      0.« PLUMFR < 1.0  )
                   STABILITY  (1»6 CORRESPONDING TO A-F) RETURNED
                   DOWNWIND DISTANCE TRAVELLLO IN DTFREZ CORRECTED
                   FOR STABILITY CLASS CHANGES.
                        STACK (GT 100 METERS) FLAG * YES OR NO
                           LATERAL DIFFUSION OUT OF PARCEL IS DOMINANT
                           LATERAL DIFFUSION INTO PARCEL IS DOMINANT
                           PLUME'S LATERAL SPREAD IS TOO SLOW TO REACH
IPT
TPA3S
PDIST
PLUMFH
ISTAb
OXFREZ
TALL
KPLAG
KPLAG
KPLAG
B
S
a
s
B
s
*
a
8
•
TR
TI
PE
REI
ST
00
en
r u
TA
1
2
-1
                           PARCEL
                                  SOURCE SHOULD BE IGNORED ENTIRELEM
      COI'MOM /SIGHAS/  NOY,  XDY(4),  SIGYD(4,fc),  NDZ,  XDZU2),
     1                 SIGZD(12,6),  NCAT
                       YES, RNEG, IYES, NO, SMALL
                       ATALLC6), BTALL(6), CTALLC6), OTALL(6)
                      PWIOTH, HPWIDT, PLENTH, PAREA, OTFREZ, SISED6,
     1                ZEE(S), MTINTF(fc),  NOSTAT,  ROAIR
      DATA SQRTJ,   SMALL   /I.414213562,  .020/
COMMON /ANSWER/
COMMON /SIGTAL/
COMMON /PARCEL/
KPLAG s . 1
IP! = IPT » 1
POIST s ABS(POIST)
TFHfcEZ s TPASS «• OTFREZ
DXFHEZ r DISTANUPT, TPASS, TFREEZ)
VBAW a OXFHF.Z/OTFREZ
CALL GESTAb (TPASS, I STAB, OTSTCH,NXSTAB)
IFCOTSTCH.GT.OTFREZ-50GO TO 100

  AUJUST OXFREZ TO ACCOUNT FOR STABILITY CLASS CHANGE

TSTCH » TPASS + OTSTCH
OXSTCH s OISTANCIPT, TPASS, TSTCH)
IF(TALL.EQ.YES)   GO TO 80
SItSCH s TMPLOG(OXSTCH,XOY,SIGYO(1,ISTAB),NOY,1)
OXVIWT a T»PLOG(S1GSCH,SIGYO(1,NXSTAB),XOY,NOY,1)
60 TO 90
SIGSCH s
DXVIRT =
OXOIFF B
OXFREZ B
ISTAB *
         ATALL(ISTAB)*(DXSTCH**BTALL(ISTAB))
         (SIG3CH/ATALL(NXSTAB))»*C1,/BTALL(NXSTA8))
         DXSTCH - DXVIRT
         OXF«EZ - OXOIFF
        NXSTAS
  INTEGRATE PLUMES FROH SOURCES WITHIN PARCEL WIDTH
      CONTINUE
      IF(TALL.EO.YES)
                 60 TO 110
EM
EH
EH
EH
EM
EH
EM
EM
EM
EM
EH
EM
EM
EM
EM
EM
EM
EM
.EM
EM
EM
EM
EM
EM
EM
EH
EM
EH
EM
EH
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EH
1QOU
1U05
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1016
1019
1020
1021
1022
1025
1024
1025
1026
1027
loan
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
104S
1046
1047
1048
1049
1050
1051
1052
1053
loss
toss
1056
1057
1058
                                     C-97

-------
no
us
c
c
c
c
c
c
120
125
1 JO
140
 SIi;r  =  TRPLOG(DXFREZ(XDY,SIGYD(1,ISTAB),NDY,1)
 GO  TO 115
 SIGY  s  ATALL(ISTAft)*{DXFPEZo*BTALL(I3TAB))
 3IGYSP  = SIGY*SORT2

 IF(PDIST.GT.HPrtlDT)   GO  TO  120

 01  =  (HPWIOT  -  POISTJ/SIGYSP
 02  =  (HPV.IOT  *  PDI3T)/SIGY3P
 PLUMFR  = 0.50»(ERF<01) +  £RF(D2))
 KPLAG = 1
   If«TfcGRATE  PLUMES  FROM  SOURCES OUTSIDE  PARCEL  WIDTH
   AND  ADJUST TPASS  TO  ACCOUNT  FOR  THE  TIME  DELAY  BEFORE
   INTERSECTION OF THE  PLUME.

 CONTINUE
 IF'POIST.LT. HPWIOT +  SHALL)   GO TO  1«0
 SIGY2  =  (POIST - HPWIDTJ/SIGEDG
 IF(TALL.EQ.YES)   GO TO 125
 OXEOG  =  TRPLOG(3I6Y2,3IGYO(1,I3TA8),XDY,NOY,1>
 GU TO  130
 OXEDG  »  CSIGY2/ATALLUSTAB))**(1./BTALUISTAB))
 IF(0
-------
 COMMON /TRAJ/
 COMMON /WIND/
1
 COSMOS /LINKS/

 COMMON /PARCEL/
 COMMON /TEMPS/
 coi«MOn /MXHITE/
 COMMON /PSOAT/
        /ORIGIN/
 COMMON /ANSLES/
i
 COMMON /3IRMA3/
RADISQ(IOO),  RAOM'JL,

HPW10T,       PLENTH,
DTFHEZ,       SIGEOG,
HTINTF(6),    NUSTAT,

T£MP3F(25),   NTEMP.ITEMP
HTMIXL(25),   NMIXL,IMIXL
PSRAr<7,505), PSTEMPC505),
P3HITE(505),  NPS
UTMYOR
GAMA2C100),   ETAl(lOO),
              SIGYO(4,fe),
              SIGZO(12,6),NCAT
                  pca.iooj
                  T(100),         V(IOO),        TH(IOO),
                  NPTS
                  SEGLENUOO),
                  po:swxc6)
                  Pft'IDTH,
                  PAHEA,
                  ZEEC5),
                  ROAIR
                  TMTEMP(25),
                  TMXHIT(25),
                  PSXY(2,505),
                  PSFLOW(505>,
                  UTMXOR,
                  GAMAK100),
                  ETA2C100)
                  NDV,           XOYC4),
1                  NOZ,           XOZ(12),
 EQUIVALENCEfIWORK,WORK(1))
 EUUIV»LEUCE(WORK 1,WORK(201))
 EQUI VALENCE (MORK2,l«ORK (401))
 EOUIVALENCE(WORK4,MORK(140iJ)
 EOUIVALENCE(FULRAT,WORK(2S01))
 DATA  VOXFRC, KPSMAX  /0.3333,   ZOO/
 DATA  LOUT,  LPUNCH /6,I/

 DERUG = RNEG
 KOK  : 100
 ig."l  £ NPT3  - 1
 
-------
70
75
90
95
100
C
120
130
      C»LL LOCATE(IL,PSXY(1,JS),PSXY(2,JS),PDIST,TPASIT,KFLAG,I3TAB)

      IF(KFLAG.LT.O)   60 TO 100
     1 *R1TE(LOUT,21) JS,PSXY(1,JS),PSXYC2,JS),PO  ST, TPASIT, I3TAB.KFl.AG

      TALL = RNEG
      HTPS = PSHITECJS)
      IF(HTPS.GE.100.)  TALL " YES
      CALL PLUHAS(IL,TPA3IT,POIST,PMFRAC,ISTAB,DXFREZ,TAU,KPI.A6)

      IF(KPLAG.LT.O)   60 TO 100
     1 "HUE (LOIIT, 21 )JS,TPA3IT,PniST,PMFRAC,DXFREZ,ISTAB,KPLAG
      DO 70 JR = l.NFXOUT
      IF(PSRATtJR.JS).GT.O.O)  GO TO 75
                          GO TO 510
GO TO 100
KPS = KPS * 1
IF(KHS.GT.KPSMAX)
TPASS(KPS) = TPA3IT
PMFR(KPS) = PMFRAC
PSPD(KPS) * PDIST
F = PSFLOW(JS)
T3 = PSTEMP(JS)
OH = 0.0
1FOS.LE.TA)  GO TO
                          90
                            90
IF(F.LT. SMALL)  GO TO
U = V(IL)»16.fcf>67
CALL OHPLUM(TA,TS,U, ISTAB,F,HTV,HTPS,OH,PF,OTOZ)
IF (LltBUG.EQ.YE3) Wl TE (LOUT, 21) J3 , HTEFF , MTP3, HTV
HTEFF s OH * HTPS
OXFHflZ = VOXFRC*DXFREZ

CALL PARTIT(OXFR£ZfMTEFF,HTViHTINTF,N03T»Tf I3TAB,T»LL»PFi VFRACT)

IF(OEBHG.EQ.YES) WRI TE (LOUT, 20)  KPS,  VFRACT
CALL XMIT (NOSTAT, VFRACT, VFR(1, KPS))
00 95 K s J.NFXOUT
FULRAT(K,KPS) = PSRAT(K.JS)
P3M»SS(K,KP3) = PMFRAC*HRFRAC*PSRAT(K,J3)
COM1NIJE
IF(IN.EO.NPTS)  GO TO 210
JF(JTEMP.GE.NTEMP)  GO TO 120
IF(T(IN).LT.TMTEMP(ITEMP*1)-3MALL)  GO  TO  120
ITE"P = ITEMP + 1
CONTINUE
IF(IMJXL.GE.NMIXL) GO TO 130
IF(T(IN).LT.TMXHIT(IMIXL+1)"SMALL)  GO  TO  130
I"1XL = IMIXL + 1
CONTINUE
CALL STACKS (T(IN),LUPONT,KOK,.IWAS,NOSUM3)
EM
EM
EM
EM
tM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
6M
EM
EM
EM
EM
EM
EM
EM
•1166
lib?
1168
1169
1170
1171
lira
H7J
U7«
1175
1176
1177
1178
1179
1180
1181
use
1183
1184
lies
1166
1187
lias
1189
1190
1191
1192
U93
1194
1195
1196
1197
1198
1199
1300
1201
1203
1203
1200
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
                                      C-100

-------
200
C
210

C
C
C
220
230
C
240
C
250
260
C
C
C
C
C
 IF«OK .LT. 0)  GO TO 210
 CONTINUE

 CONTIMJE
 IFtKPS ,L£. 0)  GO TO 520

    OROEK PASSING ARRAYS CHRONOLOGICALLY

 00 220 N s l.KPS
 lAOPKCi) a N
 CONTINUE
 00 230 N s 1,KPS
 M s *PS * 1 - N
 CALL FMINF(TPASS(N),M,FMIN,NMIN)
 NMI* x MMIN * N • 1
 J * I*ORK(N)
 I*ORK(!|) = IWORK(NMIN)
 Iwf)RK{NMIN) > J
 XX = TP4S3(N)
 TPASS('J) = FMIN
 TPAS3((VMIN) z XX
 CONTIMUE

 CALL XMITCKPS, PMFB, WORKl)
 N a 5*KPS
 CALL XMIT(N,VFR,WORK2)
 00 2110 N a 1,KP3
 J s I».ORK(M)
 PMF(*(N) a *ORK1 (J)
 00 240 K a l.NOSTAT
 VFR(K,N) 9 HORK2(K,J)
 CONTINUE

 CALL X»*IT(-NFXOUT,0.0,WORK1)
 M s 7*nPS
 CALL X«I7(M,PSMASS,WORK4)
 00 250 N 9 1,KPS
 J s JnO«K(N)
 00 250 K s l.NFXOUT
 PSV*SS(K,N) s rtORK4(K,J)
 «ORK1(K) r WORKl(K) » P3MAS9(K,N)
 CONTINUE
 CALL XMITCKPS,PSPO.SEGLEN)
 CALL XMIT(M,FULRAT,t»ORK4)
 DO 260 M s l.KPS
 J a IAO»K(N)
 PSPD(N) s SEGLEN(J)
 00 2*0 K s J,NFXOUT
 FUL^AT (K,N) a WOHK4(K,J)
 CONTINUE

 OUTPUTS
1. ACTUAL SOURCE RATES, FRACTION INCLUDED, AND PERPENDICULAR
2. ABSOLUTE MASS (MOLES) AND VERTICAL DISTRIBUTION
3. MOLE FRACTION-METER OF PARCEL AIR
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
OISTANEM
EM
EM
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1216
1237
1239
1239
1240
12«1
1242
1243
124«
1245
1246
1247
1240
1249
1250
1251
1252
1251
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
                                           C-101

-------
300
310
320

330

C




340
 CALL  N£rtPAG(TITLE.O,JOATE)
 J»RITE(LOUr,5)   (NAMOUT(K),Ksl,NFXOUT)
 00  310  J  s  1,KPS
 IF(MOO(J,25).NE.O)   GO TO 300
 CALL  ME.VPAG(TITLE.O.IOATE)
 rtRITEUOUT.5)   (NAMOUT (K) , Ksl, NFXOUT)
 WRITE (LOUT,6)  TPASS(J),PMFR(J),PSPD(J),(FULRAT(K,J),K«1,NFXOUT)
 CONTINUE
 CALL  (vErtPAG(TITLE,0,JOATE)
 UNITE(LOUT,7)   (NAMOUT(K),Ksl,NFXOUT)
 *HITE(LOUT,B)   (HTINTF (K),HTINTF (K-M) »K«1, N03TAT)
 00  330  J  *  !,KPS
 IFC-OCHJ, 18) .NE.O)   GO TO 320
 CALL  NE«PAG(TITLE,0,JDATE)
 WRITE(LOUT,7)   (NAMOUT(K),K=l,NFXOUT)
 ARITt(LOUT,8)   (HTINTFCK),HTlNTF(K+l),K*t,NOSTAT)
 *RIT£(LOUT,9)   TPASS(J), (P3MA33(K,J),K»t,NFXOUT)
 *RITE(LOUT,10)  (VFR(K,J),Ksl,NOSTAT)
 CONTINUE
 1RITE(LOUT,11)  (WORK!(K),K=t,NFXOUT)
 COf.VERT TO  MOLE FRACTION-METER OF AIR PARCEL
 A  = 28.97/(ROAIR*PAREA*l.E6)
 00  3UO  J  *  1,KP5
 00  3«0  K  a  1,NFXOUT
 PSMASS(K,J)  s  A*PSMASS(K,J)
 CONTINUE
 CALL  N£wPAG(TITLE,0,JDATE)
 rtrtITE(LOUr,12)   (NAMOUT(K),K»1,NFXOUT)
 00  360  J  a  l,KP3
 IF(MOO(J,25).NE.O)   GO TO 350
 CALL  NEWPAG(TITLE,0,JOATE)
 «RITE(LOUT,12)   (NAMOUT(K),K=1,NFXOUT)
 «*'*ITE(LOUT,9)   TPASS(J),  (PSMASS (K ,J) ,K = 1, NFXOUT)
 IF(IPUNCH.NE.IYES)   GO TO 360
 WRITE(LPUNCH,14)  j, TP*3S(J), (P3MASS(K,J)»K»1,NFXOUT)
 «WITE(LPUNCH,l5)  J, (VFR(K,J),Ksl,NOSTAT)
 CONTI'JUE
 RETURN

 V*RITE(LOUT,22)
 KOK a -100
350
360
370
C
510
520   *.i»IT£(LOUT,23)
C
5

6
7

8
9
10
11
 FORMAT(fl7HOPOINT SOURCE EMISSION RATES
1 //,5X,5HTIM£ ,5X,20HFRACTION    DISTANCE
                                               MOLES/HOUR    ,
                                               ,7(5X,A4,3X))

 FORMAT(66HOPOINT SOURCE EMISSIONS   »•   MOLES AND VERTICAL  DISTRIEM
13UTION       ,//,8X,7HSPECIES,6X,7(5X,A4,3X))
 FORMAT(1H ,7X,10HELEVATIONS,4X,5(F5.0,1H«,F4.0,2X),/,5X,4HTIME)
 FORMAT(1HO,F10.2,10X,7E12.4)
 FORM«T(1H ,16X»7F12.4)
 FQRMATdH ,20X,7 (2X, 10H--.---•—- )//, 5X, 12HTOTAL MOLES IX, 7E12.4) EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM
EM'
EM
[EM
EM
EM
EM
EM
I EM
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
1312
1311
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
132?
1328
1329
1330
                                          C-102

-------
12    FORMAT (
-------
100
C
150
C
200
 IF(GAM*1(I).GF.O.O)   GO TO 90
 SAMA1(1)  = GAHAl(l)  + PltlO
 G»»*Aa(J)  = r,AMA2(H  + PIE10
 IF(ETA1(I).LT.PIEaO)  GO TO lOO
 ETA1U)  = ETAKI)  .  PIE10
 ETA2(I)  s ETA2(I)  •  PIE10
 CONTINUE

 DXMAX  a  VMAX*OTFREZ
 00 150 I  » 1,6
 SIGY s T«PLOG(DXMAX,XOY,SIGYD(l,n,NDY,l)
 POISMX(I) s SIGY«SIGEOG
 POISMX(l) a AMAX1(HPMIDT,PDISMX(I))
 CONTINUE

 IF(OEBUG.NE.YES) RETURN
         1)
 DEG s IrtO./PIElO
 00 200 I = l.NMl
 A s TH(I)«DEG
 H s HTH(I)*DEG
 C a HTH(I+1)«DEG
 0 » GAMA1(I)»DEG
 E s G»M»2(I)«OEG
 F = ETA1(I)*OEG
 G s ETA,>(I)*OEG
 rtR!TE(6,2) I,A,B,C,0,E,F,6
 CONTINUE
 4RITE(6,3) (I,PDI3MX(I
 RETURN
 FOVWAT(1MO,12H ANGLES A-G      )
 FORMATtlM ,I5,7F10.aj
 FORMAT(IIHOMAXIHUM PERPENDICULAR DISTANCE CRITERIA
1  ,37HOSTABILITY CLASS    DISTANCE . (KM)
3  b(//10X,Il,iOX,F6.3))
 END
EM  1385
EM  1364
EM  138b
EM  1386
EM  1387
EM  1388
EM  1369
EM  13-90
EM  1391
EM  1393
EM  1393
EM  139
-------
           RAPS FILE DESCRIPTION

               IOAT NSTACKS UTMX UTMY HITE OIAM TEMP FLOW PART
                            SOX  NOX  THC  CO   NRMC PARF OLEF
                            AROM ALOE STACKIO
                            UTMX UTMY HITE 	
                            ......... STACKIO
                            (REPEATED NSTACK TIMES PER HOUR)
 DIMENSION ISOURC(17,505)
 COKMON /ANSWER/  YES,RNEG,
 COMMON /INPUTS/  TITLE(20),
 CO''«ON /OHIG1N/  UTMXOR,
 COMMON /LABLIN/  NAMIN(ll),
 COMMON /  WORKER/  IOAT,NSTACK,
1                 RSUM(IOO),
 COMMON /PSOAT/   PSXY(2,505),
1                 PSFUOWC505),
 EQUIVALENCE USOURC.WORK)
 DATA r.vAR,  N*PREC /17, 510/
 DEBUG s »NE6
 N*PHM2 s NwPREC - 2
 1NOEX = IFIXtTIME + SMALD/60
 IF (I'^AS.LE.O)  LINOEX a •!
 IF(HOEX.GT.LINOEX) GO TO 50
 IF(lNDEX.eQ.LINOFX) RETURN
 KUK  a
IYES,NO,    SMALL
JOATE(IO),  NCA3E
UTMYOR
NFLXIN, WT(ll), ADJUST(ll)
  SUM(510),  WORK(8585),
  INORK(13246)
PSHAT(7,505),    PSTEMP(505),
P8HITE(505),     NP8
      kETUHN
50    CONTIMIE
CUNIVAC      KE;AD(LUP,ERRs5aOrEND*5|0) IOAT, NSTACKi (SUM(I), I«t .NHPRM2)
      BUFF6K INCUUP.l) (IOAT,SUM(NlNPRMa))
      IFfUNIT(LUP))  60,510,520
60    irR s IOAT/100000
      IDAY = IUAT/100 • IYR*lOOO
      IHR s IOAT - IY»«100000 • IDAY*100
      Nft^R s NST«CK«NVAR
      N"LFT s NWHR «
      NMLKS =
      IF CMOOfN,'LFT,Nf.PREC).NE.O) NBLK3 * NBLKS * 1
      IF(DEBUG.EQ.YES)  WRITE(6,Z) 1YR, 10AY, IHR, NSTACK
C     IF(OFBUG.EQ.YES) W»ITE(b,U) (SUM(IJK), I JK»1 ,NWPfiM2)
11    FOKMiTCtH ,100(1TF7.3,/,1X))
      IF(IHW.EQ. INDEX)  GO TO 100
      00 80 I = 1,NBLKS
      REAO(LUP)
80    CONTINUE
      SO TO 50
100   CONTINUE
      CALL XMIHNWPRM2, SUM, WORK)
      Kl 3 -1
      K2 a NtPAM?
      DO 120 I s 1,NBLKS
      Kl a Kl + NlftPREC
                                       1438
                                                                            1
-------
CUNIVAC  fJF.AO(LUP,ERR = 5JO,ENOs510)   (3UM( J), Jll, NWPR.EC)
      BIjFFE* IN (LUP,1) (3UM(1), SUM(MWPREC))
      IF(UN!T(LUP))     115,   510,   530
      CALL XMI TCNfcPREC, SUM, WORK (Kl) J
      IFd.EU.) .AND.O£4UG.£Q.rES)WR!TE(6,ll) (SUM ( IJK ;,, I JKsl , NWPREC)
      CONTINUE
                                                                             1«>0
                                                                             1<*91
110
115
C
120
c
      DO 150 K = l.NSTACK
      N = (K-l)»NVAM
      P3XY(1,K) = WOHK(1+N) • UTMXOR
      PSXY(?,K) s vsOW**(3 + N) • UTMYOR
        NO»,PAHF,nLEF,ArtOM,»LDE,CO,SOX
                   WO«K(9»N)«AOJUST(3)
                   «0«K(IS+N)*ADJUST(8)
      PSRAT(3,K)
      P3RAT(U,K)
      PSRAT(5,K) = WORKfl6+N)«AOJU3T(ll)
      PS«AT(b,K) = WORK(11+N)*AOJUST(5)
      PSHATU ,




150
C
C
C
C
C155
C
PSHAT(7,K)
PSHITE(K) 3
PST£MP(K) *
PSFLOA(K) s
CONTINUE
00 155 KS 1
iHKITE (6,14)
COLJMATflrtl
rU""AI (lul
n«ITC (')»)£)
1 PSFUU*«)
CONTINUE

a WORK(6*N)*ADJUST(2)
FLOAT(ISOURC(3,R))
FLOAT(ISOUHC(5,K))
V.ORK (b+N)

,5
ITEMPR(K), IHITE(K)
FOXY(liK),PaXY(£iK)i (PaRAT(I9fK),I9-l,T)i
, PSTEMP(K), P8MJTEIK)
' "

160
170
C
180
C
      NPS = TJSTACK
      LINDEX = INUEX
      IF(HDSUMS.NE.IYES)

        REGIONAL SUMS
                            RETURN
        (NOTE
            s NFLXIN »  1
      CALL XMITC-NINM1,0.0,RSUM)
      DC) 170 K = l.NPS
      N s  (K-1)*NVAH »  6
      DO 160 J = 1,NINMJ
      RSy-CJ) s S3UM(J) » WORK(J»N)
      CONTINUE
      CONTINUE

      DO 180 J s 1.NINM1
      N =  J
      IF(J.GE.fc)  N = N + 1
      SSUM(J) s R8UM(J)*AOJUST(N)
      CONTINUE
EM
EM
EM
EM
EM  1492
EM
EM
EM  1«95
EM  1496
EM  1497
EM  149A
EM  1199
£M  1500
EM  1501
EM  1502
EM  1503
EM  1504
EM  150S
EM  1506
EM  1507
EM  1508
EM  1509
EM  1510
EM  1511
EM  1512
EM  1513
EM  1514
EM  1515
CM  1516
EM  1517
EM  1518
EM
EM
EM  1521
EM
EM
EM
    1533
    1534
EM  1525
EM
EM
EM
                                                                             1526
                                                                             1527
                                                                             1528
                                                                         EM  152«
                                                                         EM  1530
                                                                         EM  1531
                                                                             1532
                                                                             1533
               T.O) 60 TO 1"»0
      CALL K'ErtPAG(TITLE,0,JO*TE)
EM  1534
EM  1535
EM  1556
EM  1537
EM  1538
EM  1539
EM  1540
EM  1541
EM  1542
EM  1543
EM  1544
                                          C-106

-------
      xRITE(6,3)  (NAMIN(I),I91,5),(NAMINCl),I«T,in
190   *RITE(6,4)  TIME,   (RSUM(I),!«!rNINMl)
      RETURN
510   KOK = 8
520
 RETURN
 KOK s 8A
 w«IT£(6,6)
 RETURN

 FOHMAT(a8HOTRAJECTORY NOT  CHRONOLOGICAL   ••   JOB  ABORTED     )
 FOWMAT(UHO    YEAR s  ,16, 7H   DAY  *  ,14, BH   HOUR *  ,14,
1  25H  NO.  OF POINT SOURCES  s   .15)
 FORMAT(1HO,35H*EGIONAL POINT SOURCE EMISSION  SUMS ,
1  30X,12H(KOLES/HOUR)  ,//,8H    TIME   ,6X, 1 1 (A4,7X) )
 FO«MATUHQ,FT.l,2X,ilE11.3)
 FORMATC50HOUNEXPECTEO EOF  ENCOUNTERED IN  POINT  SOURCE FILE
1       ,30H       --        JOB ABORTED  )
 FOR*AT(50MOPARITY  EKROR IN POINT SOURCE FILE  •  JOB ABORTED   )
 END
                                                                        EH   1545
                                                                        EM   1546
                                                                        EM   1547
                                                                        EM   1548
                                                                        EM   1549
                                                                        EM   1550
                                                                        EM   1551
                                                                        EM   1552
                                                                        EM   1553
                                                                        EM   1554
                                                                        EM   1555
                                                                        EH   1556
                                                                        EM   1557
                                                                        EM   1556
                                                                        EM   1559
                                                                        EM   1560
                                                                        EM   1561
                                                                        EM   1563
                                                                        EM   1563
                                                                        EM   1S64
1

80



100

no


130

130

140
c
 FUNCTION TRPLOG(X,XS,FS,NXF,NF)

    LOG-LOG INTERPOLATOR  FOR  TABULAR  FUNCTIONS
    (ASSUMES LINEAR EXTENSIONS  OF  END SEGMENTS  ON LOG-LOG
    GRAPH TO CALCULATE  BEYOND RANGE OF XS.)

 DIMENSION XS(NXF),  FSCNF.NXF)

 IFtX.GT.0.0)    60  TO 80
 *RITE(6tl) X
 FOSiMATUHO, IOHTRPLOG X*    ,E12.4)
 STOP
 CONTINUE
 XLH& s  4LOG(X)
 NUt-'Hl s MXF - 1
 IF( XS(NXF) - XS(1)  )    100,  120,   120
 00 110  K s 2.NXFM1
 IF(X -  XS(K))    110,  110,   140
 CONTINUE
 K s NXF
 GO TO 140
 00 130  K s 2.NXFMI
 IF(XS(K) - X)   130,  130,  140
 CONTINUE
 K = NXF
 KL * K  - i

 FA s ALOG(FS(1,K))
 F8 » ALOG(FS(1,KL)1
 XA a ALOG(XSCK))
 XB • ALOG(XSCKL))
 FLOG a  F8 + (XLOG  -  XB)*(FA  - FB)/(XA . XB)
                                                                       EM   1565
                                                                       EM   1566
                                                                       EM   1567
                                                                       EM   1568
                                                                       EM   1569
                                                                       EM   1570
                                                                       EM   1571
                                                                       EM   1572
                                                                       EM   1573
                                                                       EM   1574
                                                                       EM   1575
                                                                       EM   1576
                                                                       EM   1577
                                                                       EM   1578
                                                                       EM   1579
                                                                       EM   1580
                                                                       EM   1581
                                                                       EM   1582
                                                                       EM   1583
                                                                       EM   1584
                                                                       EM   1585
                                                                       EM   15A6
                                                                       EM   1587
                                                                       EM   1588
                                                                       EM   1589
                                                                       EM   1590
                                                                       EM   1591
                                                                       EM   1592
                                                                       EM   1593
                                                                       EM   1594
                                                                       EM   1595
                                                                       EM   1596
                                     C-107

-------
 TRPLUG = EXP(FLOG)
 RETURN
 END
                                                                  EM   1597
                                                                  EM   1598
                                                                  EM   1599
 SLOCK DAT*
     TABULAR DATA FOR HORIZONTAL(Y)  AND VERTICAL(Z)  3I6MA3 AS
     FUNCTIONS OF oorfNrtiND DISTANCE  FROM TURNERS WORKBOOK.

     AMD TALL STACK SIGMAS FROM ASME,
 COMMON /SIGMAS/
I
                  NDY,
                  NOZ,
XDY(4),   SIGYO(4,6),
XOZU2),  3IGZO(12,6),   NCAT
 COMMON /SIGTAL/ ATALL(6).STALL(6),CTALL(6),OT»LL(6)
     HORIZONTAL IN KILOMETERS
     VERTICAL IN METERS
DATA NDY,   NOZ,   NCAT
 4, 12, 6/
 DATA XDY /.to,  1.00,  10.00,  80.OO/
 DATA SIGYD
.0270,
.0190,
.0135,
.0080,
.0060,
.0040,
.212,
.157,
.104,
.068,
.050,
.034,
1.570,
1.190,
.840,
.555,
.410,
.273,
9.000,
6.800,
5.050,
3.350,
2.510,
1.680/
A
8
C
D
E
F
 DATA XOZ /  .100,.200,.300,.500,1.00,2.00,3.00,5,00,
1             10.0,20.0,50.0,100. /
 DATA SIGZO/
A            14.,29.5,48.0,105.,450,,1950.,4600.,13562.,
A            58818.,255084.,1774 117.,769407 I,,
6            10.8,go.3,30.2,51.0,110.,233.,365.,640.,
8            1350.,2900.,7968,,17117.,
C            7. 4,13,9, 20.1,32.0,61., U6., 169., 267.,
C            500.,950.,2170.,4000.,
0            4.6,8.5,12.1,18.6,31.5,50.0,64.5,09.0,
0            137.,202.,328.,455.,
E            3.5,6.38,8.8,13.0,21.3,33.7,43.7,56.0,
E            79.0,110.,153.,183.,
F            2.3,4.05,5.6,8.5,14.0,21.5,26.5,34,0,
F            06.5,60.0,79,0,93.O/
 DATA ATALL /.«0,.36,.32,.32,.31,,31/
 DATA STALL /.91»,a6,.78,.76,.7l,.71/
 DATA CTALL /.40,.33,.22,.22,.06,.06/
 DATA OTALL /.91,.66,.78,.78,.71, ,7l/

 END
                                                                       1614
                                                                       1615
                                                                       1616
EM  1600
EM  1601
EM  1602
EM  1603
EM  1604
EM  1605
EM  1606
EM  1607
EM  1608
EM  1609
EM  1610
EM  1611
EM  1612
EM  1613
EM
EM
EM
EM  1617
EM  1618
EM  1619
EM  1620
EM  1621
EM  1622
EM  1623
EM  1624
EM  1625
EM  1626
EM  1627
EM  1628
EM  1629
EM  1630
EM  1631
EM  1632
EM
EM
EM
EM  1636
EM  1637
EM  1638
EM  1639
EM  1640
EM  1641
EM  1642
EM  1643
EM  1644
EM  1645
EM  1646
EM  1647
                                                                      1633
                                                                      1634
                                                                      1635
                                 C-108

-------
3.   Chemical-Diffusion Module Listing


c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c













c
100
c




c
c
c







165
PROGRAM XEMOD (INPUT, OUTPUT, TAPE5»INPUT, TAPEfcsQUTPUTr
1 TAPE!, TAPE3, TAPE4, TARE1Q, TAPEH)

K£MOO IS THE DRIVER FOR THE CHEMICAL/DIFFUSION MODULE.

SUBROUTINES REQUIRED
KEfODa DIFFUN RATES UPRAT2 UPFLX1 PREOAT
OIFCOF SKEOUL PEOERV RATEMI ISTATE STEADY
JACOB soLaea UPFLXI MATMUL PHOTOD SOLAR
TEHPR xi'IT MUATE SECOND NEWPAG MCHAR
StTPLT COPLOT FMAX SCALE TIMEX UNMIXR
DRIVE INTER? TSTfcP C08ET PSET BIKSOl.
SOL BLKOEC DEC ADJUST CHECKY UPSORC
ITHOUR PHODUK

PERIPHERALS REQUIRED
TAPEI s PUNCHED OUTPUT OF SURFACE CONCENTRATIONS
TAPE3 s INTERMEDIATE I/O FOR PREOAT TO COPY INPUT
TAPE* s SCRATCH FILE FOR PLOTTING ROUTINE
TAPES s INPUT
TAPE6 * OUTPUT
TAPE10 » VERIFICATION OF FLUX SCHEDULE UPDATES
TAPElt a VERIFICATION OF Kl SCHEDULE UPDATES

REAL INTIM
CO"MON/INPUTS/TITLE(aO), IDATE(IO), NCURV
CO«*O'./*LUXES/FLXIN( 7,200), FLXTIMUOO), NFLUX
COMMO* /PS1/ TPA3S(aOO), PS(r,5,7S), FRACT(3),
1 NPTSR, NPSFLX, LOCP8P(7)
COM«0>j/EPCOM6/P«(fl500)
OI-tE^SIQN AF(lt), VFR(5,ZOO), PTSR(7,aOO)
E8LIIVALF.NCE (RNEG, NE6) , (YES, IES) , (RMOR, MORE)
EQUIVALENCE (VFR,P«) , (PTSH,PW(100l ) )
DATA VF.S, "EG, MORE, END/3HYE8>2HNO,4HMORE,3HENO/
0»TA FrtACT /.50,.50,0.0/
DATA LIN, LOUT n, f>/
TEKM s END

CALL PWEO»T

CALL MDATEUDATE)
REAO(LIN,i?b) TITLE
RE»D(LIN,a9) GOAHEO
REAO(Ll'J,29) FLXIJNT

READ »WEA SOURCE EMISSION FLUXES

REAO(LIN.aa) NUHFLX
DO 170 isl.aoi
READ(LIN,30) A, (AF(N), N»l,NUMFLX)
IF(A .LT. 0.0) GO TO 180
FLXTJMCI) a A
DO 165 J*1,NUMFLX
FLXIN(J.I) = AF(J)
CONTINUE
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
1
2
3
4
S
6
7
8
9
10
11
12
13
14
15
16
17
18
!•»
ao
21
22
23
24
as
26
27
28
29
30
31
32
33
34
35
36
37
36
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
                                  C-109

-------
170


160


C
C
C









390

400


150
C
500
c

C

C
600



23

2«
25
29
30
36
37


CONTINUE
».RITE(LQ'JT,23)
50 TO 600
HFLUX s ]»1
INTJM i FLXTIM(l)
TSTOP = FUXTIM(NFLUX)

READ POINT SOURCE EMISSION FLUXES

K'PTSR = 0
W£»Q(lIN,2
GO TO 600
NPTSR = K - t

CONTINUE

IF (GOAHEU.EQ.RNEG) GO TO 600

CALL KEM002 (INTIM, TSTOP, NUMFLX.FLXUNT)

READ(LIN,25) TERM
IF (TERM.EQ.RMQW) GO TO 100
IF (TERM. NE. END) GO TO 600
STOP
FORMAT (1H1,10X,^7HTOO MANY »REA SOURCE FLUXES INPUT.
1 2SH --• JOB ABORTED. )
FORMAr(aOX,I10)
FORMAT (20A
-------
      DIMENSION Y(NO, 6)                                                KM   106
C                                                                       KM   109
      COMMON /EPCOM1/ T,H,HMIN,HMAX,EPS,SS»UROUNO,NiMF,KFL*G»JSTART     KM   110
      COMMON /EPCM10/ TAUC13),ELU3),TQ(5)»L»UX,METH,NO,L»NOINDX        KM   111
C(l                                                                     KM   112
      DATA OME /1.000/t ZERO /O.OOO/                                    KM   113
      IF (N3 .EJ. 2) RETURN                                             KM   11 4
      NQM1 s YQ - 1                                                     KM   115
      NQM2 s NO - 2                                                     KM   116
      GO TO (ioo, 200), METH                                            KM   117
C                                                                       KM   us
 100  DO 110 J - l.LM»X                                                 KM   U9
 110    EL(J)  = ZERO                                                    KM   120
      EL 12) a  ONE                                                       KM   121
      HSUM = ZE«0                                                       KM   123
      DO 130 J = 1.NQM2                                                 KM   125
C CONSTRUCT COEFFICIENTS OF X*(X*XI (1) )•...* (X*XI (J) ). •.••••••••—•••••KM   124
        HSU" s HSUM * TAU(J)                                            KM   125
        XI s HSUM/H                                                     KM   126
        JP1 =  J + 1                                                     KM   127
        00 120 IBACK a 1,JP1                                            KM   128
          I »  (J » 3) • IBACK                                           KM   129
 120      EL(I) s EL(I)*XI » ELU«U                                    KM   130
 130    CONTINUE                                                        KM   131
C CONSTRUCT COEFFICIENTS OF INTEGRATED  POLYNOMIAL. ••••••••••.•••••••—.KM   132
      00 1. .—•••———KM   l«3
        HSIJM a HSUM + TAU(J)                                            KM   144
        XI 3 HSUM/H                                                     KM   145
        JP1 =  J + 1                                                     KM   146
        DO 2?0 IBACK 3 ItJPl                                            KM   147
          I =  (J » 4) - IBACK                                           KM   148
 220      El(I) * ELU)*XI + ELCI-1)                                    KM   149
 230    CONTINUE                                                        KM   150
C                                                                       KM   151
C SUBTRACT CORRECTION TERMS FROM Y ARRAY. ———————-KM   152
 300  DO 320 J • 3,NO                                                   KM   153
        DO 310 I c 1,N                                                  KM   154
 310      Y(I,J) t Y(I,J) • YCI,L)*EL(J)                                 KM   155
 330    CONTINUE                                                        KM   156
      RETURN                                                            KM   157
C.......................  END OF SUBROUTINE ADJUST  ....................KM   158
      END                                                               KM   159
                                     C-lll

-------
      SUBROUTINE BI.KOEC f08,NN.KK,IP,4,C,Tl,W,NOGO,BCFLA6)               KM    160
C                                                                       KM    161
C     PERFORMS LU DECOMPOSITION ON  THE MATRIX Q                         KM    162
C     rtHtHE 0 IS BLOCK TRIDIAGONAL  AS  FOLLOWS                           KM    163
C             B(l)  C(t)   0 	 0                                KM    164
C             Ml)  8.(2)   C(2)  0	0                                KM    165
C     Qs     0     A(2)   8(3)   C(3)  0..0                                KM    166
C                          .                                             KM    167
C                           .                                            KM    168
C                            .                                           KM    169
C                      ACKK-2)   B(KK.l)  C(KK-l)                         KM    170
C                               A(KK-l)  8(KK)                           KM    171
C                                                                       KM    172
C     THE MATRICES *,B,C  ARE  SQUARE MATRICES OF ORDER NN AND  0 IS  OF     KM    173
c     BLOCK.O*OEH KK,                                                   KM    174
C     IN OUR PKC8LEM. THE MATRICES  A(I) AND CU)  ARE SCALED IDENTITY     KM    175
C     MATRICES, HENCE WE  ONLY  STORE ONE SCALE FACTOR PER MATRIX.         KM    176
C     THUS A AM) C AXE VECTORS  OF  LENGTH (KK-1).                         KM    177
C                                                                       KM    178
C     IP IS A 2-OIMENSIONAL ARRAY  OF  ORDER (NN*KK)  USED FOR STORING PIVOKM    179
C     INFORMATION IN THE  LU DECOMPOSITION  OF THE  DIAGONAL 3UBMATSICES B(KM    180
C                                                                       KM    18!
C     in PRACTICE, THE MATRIX  08 IS A  3-DIMENSIONAL ARRAY WHICH CONTAINSKM    183
C     ONLY THE DIAGONAL 8 SUBMATRICE3.                                  KM    163
C                                                                       KM    184
C     TL IS A 3-OIMENSIONAL ARRAY  USED USED TO STORE THE LOWER TRIANGULAKM    165
C     ELEMENTS OF Q.                                                    KM    186
C                                                                       KM    187
C     * IS A «0*K VECTOR  OF LENGTH  NN.                                  KM    188
C                                                                       KM    189
C     BCFLAi; IS A BOUNDARY CONDITION  CODE  VECTOR  -  SEE KEM002 FOR        KM    190
C     A COMPLETE DISCRETION.                                            KM    191
C                                                                       KM    192
C     NOGO = 0 IF SOLUTION IS  SUCCESSFUL.                                KM    193
C     NOGO = 1 IF SINGULAR MATRIX  IS  ENCOUNTERED.                       KM    194
C                                                                       KM    195
      DIMENSION     g9(NN,NN,KK),A(l),C(l),IP(NN,KK),TLCNN,NN,l),W(U   KM    196
      INTEGER SCFLAGUJ                                                 KM    197
C                                                                       KM    198
C     BEGIN LU DECOMPOSITION OF MATRIX 0.   THE UPPER TRIANGULAR EUEMENTSKM    199
C     U, WILL P£ STORED IN OB.  THE  LOWER TRIANGULAR ELEMENTS* L,  MILL BEKM    200
C     STORED IN TL.                                                     KM    201
C                                                                       KM    202
C     FIND LU-1) FROM L(l-l)»U(I«n  * »(!•!) AND U(I) PROM             KM    203
C     UU) = B(I) • LU-l)*C(I-l).                                       KM    aO«
C     TO START, »E HAVE Utl)  s  8(1).                                     KM    205
C                                                                       KM    206
C     CHECK BOUNDARY CONOION CODE  (BCFLAG)                              KM    207
      00 100 1=1,NN                                                     KM    208
      IF{BCFLAtm.NE.2)   GO TO 100                                     KM   209
C     ADJUST b(l) FOR CONSTAT CONCENTRATION SURFACE BOUNDARY CONDITION  KM   210
      00 90 J=1,NN                                                      KM    211
      QB(I,J,1) * 0.0                                                   KM   212
  90  CONTINUE                                                          KM   213
      08(1,1,1) al.O                                                    KM   214
                                        C-112

-------
  100 CONTINUE                                                         KM   815
C                                                                      KM   316
      M3GO =0                                                         KM   217
      00 300 I a 2.KK                                                  KM   218
       IMI a I . 1                                                      KM   219
       C*LL DEC(NN,NN,QBU,1,IM1),IPO.IM1).IER)                        KM   220
       1FUEH.NE.O) 60 TO 420                                          KM   221
C                                                                      KM   222
c     FIND L(i-n.  INVERT un-i)  BY REPEATED  CALLS  TO  SOL.              KM   223
C                                                                      KM   224
       SF = A(IM1)                                                      KM   225
        00 200 J 9  1,NN                                                KM   226
         CALL XMIT(.NN,0.,K)                                            KM   227
         ft(J) = 1.0                                                    KM   228
         CALL SOL(NN,NN.OBU.l»IMi),W,IPU,lMn)                        KM   229
          DO 190 K  * I,UN                                              KM   230
           TL(K,J,IMl) 3 SF*W(K)                                        KM   231
  190     CONTINUE                                                      KM   232
  200   CONTINUE                                                       KM   233
C                                                                      KM   230
C     FIND UCD.                                                       KM   235
C                                                                      KM   236
       SF = C(IMl)                                                      KM   237
      IF(IHl.NE.l)   60 TO 210                                          KM   238
C                                                                      KM   239
      00 220 J31.NN                                                    KM   210
C     DECOUPLE  EQUATIONS FOR CONSTANT CONCENTRATION BCFLA6             KM   241
      IFt6CFLAG(j).E0.2)  GO TO 220                                    KM   242
      00 210 K=1,NN                                                    KM   243
      08(K,J,n a 08(K,J,I) -SF*TL(K,J,IM1)                             KM   244
  210 CQNTI 4UE                                                         KM   245
  220 CONTINUE                                                         KM   246
      GO TO 300                                                        KM   247
C                                                                      KM   248
  240 CONTINUE                          .                               KM   249
        00 250 J 3  I,UN                                                KM   250
        00 250 K 3  ],NN                                                KM   251
         OB(K.J,I)  B OB(K,J,I) . 3F*TL(K,J,IM1)                         KM   252
  250   COiy.TIf.UE                                                       KM   255
  300 CONTINUE                                                         KM   254
C                                                                      KM   255
C     PERFORM LU DECOMPOSITION ON U(KK).   THIS IS REQUIRED FOR  THE      KM   256
C     8*CK SUBSTITUTION LATER ON.                                      KM   257
C                                                                      KM   258
      CALL OEC(NN,NN,OH(1,1,KK),IP(1.KK),IER)                          KM   259
      IMI s KK                                                         KM   260
      IF(IER.IwE.O)  GO TO 420                                           KM   261
      »ETU»N                                                           KM   262
C                                                                      KM   263
C     MATRIX IS SINGULAR.  JOB IS ABORTED.                              KM   264
C                                                                      KM   265
 420  CONTINUE                                                         KM   266
      NOGO a 1                                     'KM   267
      •HfUTE(6.1)  IMI                                                  KM   268
    1 FORMATUHO.SX, ^SINGULAR MATRIX NO.  »,I2,«.  J08 ABORTED.*)       KM   269
                                        C-113

-------
RETURN                                                        KM   270
tMD                                                          KM   271

c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
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 BLKSOL CQB.NN, KK.RHS, IP, A,C» TL, W,BCFL»G) KM
KM
SOLVES A SYSTEM OF LINEAR EQUATIONS 0*X » rtHS AFTER KM
LU DECOMPOSITION HAS BEEN PERFORMED ON 0 AND KM
*H£R£ Q IS SLOCK TfilOIAGONAL AS FOLLOWS KM

A(t) 8(2) C(2) 0....... 0 KM
Qs 0 A(2) 8(3) CC3) 0..0 KM
. KM
, KM
. KM
A(KK-2) B(KK«1) CCKK-1) KM
A(KK-l) B(KK) KM
KM
THE MATRICES A,B,C ARE SQUARE MATRICES OF ORDER NN AND 0 IS OF KM
BLOCK-ORDER KK. RHS IS THE RIGHT-HAND SIDE OF THE EQUATION AND ISKM
A VECTOR OF LENGTH (NN*KK), THE SOLUTION IS RETURNED IN RHS. KM
IN OUR PROBLEM, THE MATRICES A(I) AND C(I) ARE SCALED IDENTITY KM
MATRICES, HENCE ME ONLY STORE ONE SCALE FACTOR PER MATRIX* KM
THUS A ANO C ARE VECTORS OF LENGTH (KK-l). KM
KM
IP IS A 2-OIMENSIONAL ARRAY OF ORDER (NN*KK) USED FOR STORING PJVOKM
INFORMATION in THE LU DECOMPOSITION OF THE DIAGONAL SUBMATRICES B(KM
KM
IN PRACTICE, THE MATRIX QB IS A 3-DIMENSIONAL ARRAY WHICH CONTAINSKM
THE DIAGONAL B SUHMATRICES. KM
KM
TL IS A i-OIMENSIONAL ARRAY USED USED TO STORE THE LOWER TRJANGULAKM
ELEMENTS OF 0. . KM
KM
* IS A rtORK VECTOR OF LENGTH NN. KM
KM
KM
BCFLAG is A BOUNDARY CONDITION CODE VECTOR * SEE KEMODS FOR KM
A COMPLETE OISCRIPTION, KM
KM
DIMENSION QB(NN.NN,KK),A(l),C(l),IP(NN,KK),RHS(NNrKK), KM
1 TUNN.NN, 1),W(1) KM
INTEGER eCFLAG(t) KM
KM
KM
FRONT SUBSTITUTION. KM
INITIALLY, Yd) s RHS(l). THE RHS VECTOR 18 DESTROYED IN THIS KM
OPERATION. KM
KM
00 350 I = 2.KK KM
IM1 s I . 1 KM
CALL MATMUL(TL(1,1, IMl),RHS(l,lMl)rH»NN,NN,U KM
DO 340 J a 1>NN KM
RWS(J.I) = RHS(J,I) - W(J) KM
272
273
274
275
276
277
278
279
aao
281
282
283
264
285
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
315
316
317
318
319
320
321
                            C-114

-------
  340   CONUNUE                                                        KM    3£2
  J50 CONTINUE                                                          KM    3i>3
C                                                                       KM    324
C     BACK SUSSTITUTtON.                                                KM    325
C     THE VICTOR RH9 PREVIOUSLY COMPUTED  IN LOOP 350 13 ONCE AGAIN THE  KM    336
C     HIGhT-HAND SIDE.  THE SOLUTION VECTOR IS AGAIN STORED IN RHS.     KM    32?
C     RECALL THAT THE U MATRICES  IN Qb HAVE ALREADY UNDERGONE LU OECOMPOKM    328
C     AND THE PIVOT INFORMATION IS STORED IN IP.                        KM    329
C                                                                       KM    330
      CALL SOL(HN,NN,OB(1.1,KK),HHSU.KK),1P(1,KK))                     KM    331
      N s KK • 2                                                        KM    332
      00 40" I * 1,N                                                    KM    333
       K a KK • I                                                       KM    334
       J = K » J                                                        KM    335
       3F = C(K)                                                        KM    336
        DO 390 M s 1,NM                                                 KM    337
         (rHS(M,K) « RH3(M,K) • 3F*RHS(M,J)                              KM    338
  390   CONTINUE                                                        KM    339
       CALL 30L(NN,NN,QBU,l,K),RHS(l,K)tIP
-------
      00 30 K s 1,N                                                     KM   3/4
      IF(Y(K).GT.Y.MIN)  60 TO 30                                        KM   375
      KNTER s K'lTtH + t                                                 KM   376
      XSftC s Ml)P(K,NK)                                                 KM   377
C     ni«ITE(8,l) T.KSPEC, Y(K), YO(K)                                   KM   378
      Y(K) s AMAX1(Y(K),YOIK))                                          KM   379
30    CONTINUE                                                          KM   380
      IFCKMER ,GT. 5)  KflK » -100           •                           KM   381
      RETURN                                                            KM   382
t     FORMATOH 5X.6HTIME a,F8.2,13H   SPEC NO. »   ,13,3X,             KM   38J
     I 20HOLD CONCENTRATION s,E13.4,3X.22HRESET CONCENTRATION «,E13.4)  KM   384
      END                                                               KM   385
      SUBROUTINE COPLOT(SDPT)                                           KM   386
C                                                                       KM   387
C         COPLOT GENERATES A PRINTER-PLOT OF GROUND CONCENTRATIONS      KM   368
C         VERSUS TIME FOR UP TO FIVE SPECIES                            KM   389
C                                                                       KM   390
      COMMON/PRPLOT/     KPSC 5),       KSYM( 5),      GRCONlSi100),    KM   391
     1                   TOUT(IOO),     VALMAXC5)                       KM   392
      COMMON /INPUTS/  TITLE(BO),       IDATE(IO),     NCURV            KM   393
      DIMENSION KNAM(5)                                                 KM   394
      DATA KNSM /1HN,1H3,1HO,IHSrIHa/                                   KM   395
      DATA ZPLUS/1.E-30/                                                KM   396
      DATA LOUT /fc/                                                     KM   397
C                                                                       KM   396
      GO TO 30                                                          KM   399
C                                                                       KM   400
      ENTRY JPLOT                                                       KM   <101
      CALL XMI1(NCURV,KNAM,KSYM)                                        KM   A02
      C»LL XMIT(-HCORV,0.,VALMAX)                                       KM   403
      RETURN                                                            KM   <4ou
C                                                                       KM   405
   30 CONTINUE                                                          KM   406
C     Tl = TOUT(l) » ZPLUS                                              KM   807
C     CALL SC»LEU1,TOUT(NOPT),XO.XR)                                   KM   «08
c     —,,  FIX HORIZONTAL SCALE FOR ALL DAY  •••••                    KM   409
      IF(TOUT(NOPT)-TOUT(1) ,GT. 750.)  60 TO 35                        KM   410
      XO s TOUT(l)                                                      KM   411
      XR a XO + 750.                                                    KM   412
   35 CONTINUE                                                          KM   413
      CALL FMAX(VALMAX,NCURV,A)                                         KM   414
      CALL SC^LECZPLUS.A.YS.YT)                                         KM   415
      lF(2.«A.Lr.YT)  YT s ,5*YT                                        KM   416
      CALL SETPLT(XO.XR,YB,YT)                                          KM   417
      00 50 I=1,NDPT                                                    KM   416
      UO aO Ksl,KCURV                                                   KM   419
      CALL PLTPNT(TOUT(I),GRCON(K,I),KSYMCK))                           KM   420
   40 CONTINUE                                                          KM   421
   50 CONTINUE                                                          KM  ' 422
      CALL PLTOUTCLOUT)                                                 KM   423
      *RITE(LOUT,1000)                                                  KM   424
      *RITE(LOUT,1001) TITLE                                            KM   425
                                      C-116

-------

c
1000
toot



RETURN

FORM»T(1H ,60X,16HTIME (MINUTES) )
FORMAT (1 HO, 39X.40HLEGEND
1 20H S > 302 C « .l*CO //,30X,20A4 )
END
SUBROUTINE COSET
C COSET IS CALLEO BY TSTEP AND SETS COEFFICIENTS FOK USE THERE.




C


Cf2



C(Z




1

C
2

C
too







110



IIS





C(l

INTEGER JSTAPT, KFLAG, LI LMAX, METH, MF, MI NO, NOINDX
INTEGER I, IbACK, J, JP1, JSTART, KFLAG. L, LMAX, MAXDER,
t I-'ETH, MF,N, NO, NOINOX, NOM1
DI^^SIO'J EM(13)

COMMON /EPCOM1/ T,H,HMIN,HMAX,EPSrSS.UROUNO.N,MF,KFLAG»J5TART
COMMON /EPCN-10/ TAU(13),EL(13),TQ(5), LMAX, METH, NO, L, NOINDX

DATA CORTES /0.100/
DATA O^E /l.OEO/, SIX /6.0EO/, TWO /2.0EO/, ZERO /O.OEO/
AhOSS = ONE

IF OS ."E. ZERO) AHOSS « A8S(H)/SS
FLOTL * FLOATCD
NOMl = NO - 1
so TO (i, 2), METH
MAXDER = \Z
60 TO 100

WiXDEfi = <•>
GO TO aon

IF (NQ ,NE. 1) GO TO 110
Et(l) = ONE
EL (2) = ONE
TQ(t) » ONE
TQC2) : T10«AHDSS
T0(3) a SIX*TQ(2)
T0(5) = UNE
GO TO 300
HSUM S H
EM(|) = ONE
FLOTNO = FLOTL • ONE
00 US I s 2,1
EM(I) s ZERO
DO ISO J - IrNQMl
IF ((J .NE. NQM1) ,OR. (NQINDX ,NE. 1)) 60 TO 130
S = ONF
CSUM * ZERO
DO 120 I * 1.NQM1

CSUM s CSUM * S*EM(I)/ FLOAT(I»1)
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
rtM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
426
«27
426
429
430
431
432
433
434
433
43b
437
43B
439
440
441
442
443
444
445
446
447
448
449
4SO
451
452
453
454
455
456
457
458
45<»
460
461
462
4b3
464
465
466
467
46S
469
470
471
472
473
474
475
476
47T
C-117

-------
 120      S s .3                                                        KM    = AHDSS*EM(NQM1)/(FLOTNQ*CSUM)                             KM   479
 130    RXI s H/HSUM                                                    KM   160
        DO 1<40 IBACK = 1,J                                              KM   4fll
          I = CJ + a) • I9ACK                                           KM   482
 1«0      EMCI) 3 EM(I) * EM(I-n*RXI                                    KM   483
 150    HSUM = H3UM * TAU(J)                                             KM   484
C COMPUTE INTEGRAL FROM • ! TO 0 OF  POLYNOMIAL AND OF X  TIMES  IT.  •••••-•KM   485
      S = ONE                                                           KM   466
      EMO * ZERO                                                        KM   487
      CSuM * ZERO                                                       KM   488
      00 160 I a l,Hb                                                   KM   489
C(l                                                                     KM   490
        FUOTI =  FLOAT(I)                                               KM   491
        EMfl = ENO * 3«£M(I)/FLOTI                                       KM   492
        CSU" = CSUM + S*EM(I)/(FLOTI*1)                                  KM   493
 160    S = -S                                                          KM   494
C IN F.L, FO»M COEFFICIENTS OF NORMALIZED INTEGRATED POLYNOMIAL.  ••••••••KM   495
      3 a ONE/EMO                                                       KM   496
      EL(1) = ONE                                                       KM   497
      00 170 I s l,NQ                                                   KM   498
CU                                                                     KM   499
  170   ELU»i) = s«EM(iv FLOATCI)                                     KM   soo
      XI s H3UM/M                                                       KM   501
      T0(2) = AHOSS»XI*EMO/CSUM                                         KM   502
      TQ(5) = XI/EL(L)                                                  KM   503
      IF (NuINDX .NE. 1) 60 TO 300                                       KM   504
C FOR HIGHEK ORDER CONTROL CONSTANT,  MULTIPLY POLYNOMIAL BY 1+X/XHO).  »KM   505
      RXI s ONE/XI                                                      KM   506
      DO IMi I8ACK a 1, NQ                                               KM   507
        I = (U » 1) • IBACK                                             KM   508
 160    EM(I) » EM(I) + EM(I«n*RXI                                     KM   509
C COMPUTE INTEGRAL OF POLYNOMIAL. —••••—•••••••••••••••••••••••••-•••KM   510
      S 3 Of,£                                                           KM   5J1
      CSUM = Z£«0                                                       KM   512
      00 190 I » 1,L                                                    KM   513
C(l                                                                     KM   514
      CSUM = CSUM + S*EM(I)/ FLOAT(I»1)                                  KM   515
 190    S = -S                                                          KM   516
      TQ(3) * AHD3S»FLOTL*EMO/CSUM                                      KM   517
      GO TO 300                                                         KM   518
C                                                                       KM   519
 200  DO 210 I a 3,L                                                    -KM   520
 210    ELU) = ZERO                                                    KM   521
      ELC1) » ONE                                                       KM   522
      EL(2) s ONE                                                       KM   523
      HSUM s H                                                          KM   52«
      MSUMI : ZERO                                                      KM'  525
      PROO 3 ONE                                                    .    KM   526
      RXI = ONE                                                         KM   527
      IF (NO ,EO. 1) GO TO 240                                          KM   528
      DO 230 J a 1,NQM1                                                 KM   529
C IN EL, CONSTRUCT COEFFICIENTS OF (1+X/XI (1) )*...*( 1+X/XI (J + l)). ———KM   530
        HSUM s HSUM » TAU(J)                                             KM   531
                HSU"i + TAU(J)                                          KM   532
                                   C-118

-------
PROD = PROO*(HSUM/H8UMt)
HXJ » M/HSUM
JP1 » J t 1
DO 220 IBACK s I,JPI
I a (J + 3) - IBACK
250 EL(I) * EL(1) + ELCI-t)*RXl
230 CONTINUE
290 T0(e) = AHOSS*EL(2)*(ONE * PROD)
T0(5) a (ONE «• PROD)/ELU)
IF (NOIHOX .NE. 1) 60 TO 300
CNQM1 s RXI/ELCL)
ELP s EL(2) - RXI
TQ(1) * AHUSS*ELP/CNOM1
HSUM c HSUM t TAU(NQ)
RXI s H/HSUM
ELP » EL(2) + RXI
fO(3) s AHDSS*ELP*RXI*(ONE * PROD) * (FUOTU * ONE)
300 T0(4) * CORTES»TO(2)
UMAX > MAXOER + 1
RETURN
END
SUBROUTINE DEC (N, NQtH, A« IP, IER)
C MATRIX TRIANGULARIZATION BY GAUSSIAN ELIMINATION.
C INPUT.,
C N s ORDER OF MATRIX.
C NOIH e DECLARED DIMENSION OF ARR*> A .
C A = MATRIX TO BE TRIANGULARIZEO.
C OUTPUT,,
C MI,J), I.LE.J = UPPER TRIANSULAR FACTOR, U .
C A(1,J), I.GT.J s MULTIPLIERS s LOWER TRIANGULAR FACTOR, I - U.
C IP(K), K.LT.N s INDEX OF K.TH PIVOT ROW.
C IP(N) s («t)**(NUM8ER OF INTERCHANGES) OR 0 .
C IER a 0 IF A MONSINGULAR, OR K IF A FOUND TO BE
C SINGULAR AT STAGE K.
C USE SOL TO OBTAIN SOLUTION OF LINEAR SYSTEM.
C OETENM(A) » IP(N)*A(l,t)*A(2,a)*,.,*A(N,N).
C IF IP(N)=0, A IS SINGULAR, SOL WILL DIVIDE BY ZERO,
C INTERCHANGES FINISHED IN U , ONLY PARTLY IN L .
C
C REFERENCE.,
c c. B. MOLER, ALGORITHM «23, LINEAR EQUATION SOLVER,
C COMM. 4SSOC. COMPUT. MACH,, 15 U972), P. H*.
INTEGER IER, IP, N, NOIM
INTEGER i, J, K, KPI, H, NMI
DIMENSION A(NOIM,N),IP(N)
C(l
DATA ONE /l.OOO/, ZERO /O.OOO/
IER c 0
IP(N) * I
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KH
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
53J
53«
535
536
5Sf
536
5J9
Sao
5«t
saa
5<»J
S44
505
546
547
548
S49
550
551
S53
ec *
J J 3
554
555
CSK
3 JO
557
558
559
5hO
561
5b3
563
5b«
565
566
567
568
569
570
571
572
573
574
575
576
C77
j f f
578
579
580
581
5A2
583
584
C-119

-------






10






20


so






40
50
«>0
70


80




C
C
C
C
C






C
C




IF (N .EO. 1) GO TO TO
M»l * N » 1
DO f>0 K a 1.NM1
KP1 = K + 1
M s K
DO 10 I = KP1,N
IF ( ABS(A(I,K)) .GT. AB3(*(M,K)J) M a I
IP(K) = M
T = A(M,K)
IF (M ,FQ, K) GO TO 30
JP(tg) a -IP(N)
A(M,K) = A(K,K)
A(K,K) « T
IF (T ,EO. ZERO) 60 TO 80
T e OME/T
00 JO I = KP1,N
A(I,K) = -A(I,K)*T
DO 50 J » KP1,N
T « A(f*,J)
A(M,J) s A(K,J)
A(K,J) s T
IF (T .EO. ZERO) GO TO SO
00 ao I s KP1.N
ACI.J) s ACI.J) + A(I,K)*T
CONTINUE
CONTINUE
K = N
IF (A(N,N) .EO. ZERO) 60 TO BO
HETURN
IEK = K
IP(M) = 0
RETURN
END
SUBROUTINE OIFCOF(NOSTAT)

THIS SUBROUTINE CALCULATES THE SCALED OIFFUSIVITY
COEFFICIENTS FROM OFINIT
VARIABLE MESH VERSION CODE 7.6.77

INTEGER BCFLAG
CO"«t
592
593
590
595
S96
597
598
599
600
601
603
603
604
605
606
607
608
609
610
611
613
613
614
615
616
t • 7
Ol f
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
C-120

-------
      OCOF(I) 3{OFIN!T(I)*DFIMTUtn)/HTCEUm/HTCEU.(n               KM   637
      SCALOMI-1) * OCOF(I)                                             KM   638
C                                                                       KM   639
C          COEFFICIENTS FOR INTERMIOI»TE EUUATIONS                      KM   640
C                                                                       KM   641
      NOSTM1 a NOSTAT • 1                                               KM   648
      00 IQO I=2,NOSTM1                                                 KM   643
      8CALO*(I»l) « OFINIT(I)/OELZCI-U/HTC£LL(I)                        KM   644
      SCALOPU) * DFINIT(m)/0ELZU)/HTCEt.l.(n                         KM   645
      OCOF(I) 3 SCALOW(I-l) * SCALUP(I)                                  KM   646
  100 CONTINUE                                                          KM   647
      RETURN                                                            KM   648
      END                                                               KM   649
      SUBROUTINE DIFFUN (N,T,Y,YOOT)                                     KM   6SO
C                                                                       KM   651
C     ......       DIFFUN DEFINES THE DIFFERENTIAL EflUATIONS  • •••«•-••*«   652
C                                                                       KM   653
C                        YDOT • F(Y,T)                                  KM   654
C                                                                       KM   655
      INTEGER BCFLA6                                                    KM   656
      COMMON/CHEM1/ NU3TAT,             N03TM1,              NOREAC,      KM   657
     I              NOSPEC,             NSTDY,              NK          KM   658
      COMMON/CHEM3/ CONIN(40,5),        WTMOLEC40),         RATKON(55)f  KM   659
     t              RATEFFC55),         »*7£V(a,5),         ORATE,       KM   660
     3              NVHATE,             LOCVRTC2)                        KM   661
      COMMON/CHEM3/ ZEEC5),             DELZ(  PSR2(30,5),TLA8T,UPDINT    KM   667
      COMMON /CHEM5/  RtACT(20,55),SPEC(40),UOCFLXC10),                  KM   668
     1                NASFLX,FLXWl(30),FUXWa(30)                        KM   66<>
      COMMON /PSI/   TP*SS(200), P3(7.5,75), FR*CT(3).                   KM   670
     1               NPTSR,NPSFLX,LOCP8F(7)                             KM   671
      OIMEM9ION  Y(N),     YDOT(N),      SINK(30)                        KM   672
C                                                                       KM   673
      CALL XMIT (-NK, 0.0, SINK)                                        KM   674
C                                                                       KM   675
      CALL RATES(Y,YOOT)                                                KM   676
C                                                                       KM   677
      IF(NDPFLX.LT.l)  SO TO 50                                         KM   678
C     ....    UPDATE FLUXES OF DEPOSITING SPECIES                        KM   679
      DO 00 K=1,NOPFL*                                                  KM   680
      10 = LOCOPF(K)                                                    KM   681
      IF(V(IO).UT.1.E-16)  60 TO 40                                      KM   682
      SU-K (10) * - DPRATE(K)*(Y(ID)**DEPOMR(K))                          KM   683
  40  CONTINUE                                                          KM.   684
  50  CONTINUE                                                          KM   685
C                                                                       KM   686
C       INTERPOLATE EMISSION FLUXES.TO THE CURRENT TIME                  KM   687
C                                                                       KM   688
                                      C-121

-------
60
70
75
C
FI3FLT s (T • TUSn/UPDINT
DO 60 I s l.NASFLX
K s LOCFLXCIJ
FLX^*U(K) s FLXWl(K) + (FLXW2(K)-FLXW1(K))»FDELT
CONTINUE
K = 7
FLX^4L(K) = FLXWl(K) t (FUXW2 (K) -FIXW1 (K ) ) *i CELT
*. - Z
FLX.vAL(K) » FLXKIICK) » (FUXW2 (K) »FLX*(1 (K) ) »F{ iLT
DO 75 J =1.NOSTAT
DO 70 I al.NPSFLX
K SLOCP3FCI)
PSRATE(K,J) a PSR1(K,J) » (P3R2(K,J)-P3R1(K,J))*FDELT
CONTINUE
K a 2
PSRATE(K,J) a P3RKK.J) + (P3R2CK, J)-P3R1 (K, J) ) *FDELT
K = 7
PSR*TE(K,J) = PSRl(K.J) + (P3R2(K,J)-PSR1(K,J))*FDEtT
CONTINUE

NM1 • NKtNOSTMl
NM2 * NK»(NOSTAT-2)
....... EQUATIONS FOR SURFACE AND TOP EDGE  MESH POINTS
DO 100  1=1,NK
      YOOT(I) « DCOFCl)*CYfI+NK)-Y(I)) »  YOOT(I)
     1                +  TDElZ(n*(FLX*ALCl)+3INK(I))  * PSRATE(J,1)
      IF(BCFLAGd) .EQ. 2)  YDOT(I) * 0.0
      YOOT(R) a DCOF(NOSTAT)*(Y(I»NM2)«t(IU)  » YOOTCID
     1                        *  PSRATE(I.NOSTAT)
  100 CONTINUE
      	 EQUATIONS FOR INTERMEDIATE  MESH POINTS
      00 ?00 J=a,NOSTMl
      NM|s (J-2)*NK
      NN = (J-1)*NK
      NP| = J*NK
      JM1 * J. 1
      00 150 I a 1,N,;
      UN = I * NN
      YOOT(LN) x SCALOw(JMn*Y(I+NMl) • DCOF (J) *Y (LN)  +
     1           SC»LUP(J)*Y(ItNPl) * YOOT(LN)  » PSRATE(I,J)
  150 CONTINUE
  200 CONTINUE
      RETURN
      END
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
6»9
690
691
692
693
694
695
696
697
69f)
699
TOO
701
702
703
704
705
706
707
708
709
710
711
712
7U
711
715
716
717
718
719
720
721
722
72J
72«
725
726
727
728
729
730
731
T32
733
                                      C-122

-------

c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
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 DRIVE(N,TO,HO,YO,TCUT,EPS,IERROR,MF , INDEX, BIGSTP, KOK)

THIS IS » SPECIAL VERSION OF EPISODE (ERT CODE DATE 7.8,77)
FOR SOLVING * BLOCK TRI-DIASONAL SYSTEM OF OOE*S FOR KEMOD2.
THIS VERSION OF EPISODE SHOULD ONLY BE USED WITH MF * 21
MODIFICATIONS BY F.rt. LURMANN (7,8,77).

THIS IS BASICALLY THE JUNE 2«, 1975 VERSION OF
EPISODE.. EXPERIMENTAL PACKAGE FOR IMTEGRATION OF
SYSTEMS OF ORDINARY DIFFERENTIAL EQUATIONS,
OY/OT a F(Y,T), Y = 
-------
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c










IERROR *
1
z

3



MF 9





























INDEX =

1
0

-1

  OF THE VECTOR R,  I.E.
          N
  SORT ( SUM ( R(I)«*2 )/N )  .LT. EP;i.
         1 = 1
  THE VECTOR Y^AX 13 COMPUTED IN OHIV" *S DESCRIBED
  UNDER IERROR BELOvi,
  IF ERROR CONTROL  PER S3 UNITS OF T IS DESIREDi SET 8S
  TO A POSITIVE NUMBER AFTER  STATEMENT 10 (WHERE IT 13
  NOW SET TO ZERO), AND UPDATE IT AFTER STATEMENT 60.
  SEE ALSO THE COMMENTS ON S3 AND YM»X BELOW.
THE ERROR FLAG WITH VALUES AND MEANINGS AS FOLLOW.
  ABSOLUTE EWROR IS CONTROLLED.  YMAX(I) = 1,0,
  ERROR RELATIVE TO ABS(Y) IS CONTROLLED.  IF Y(I) » 0.0
  A DIVIDE ERROR HILL OCCUR.   YMAX(I) t ABS(YU)).
  ERROR RELATIVE TO THE LARGEST VALUE OF ABS(Y(I)) SEEN
  30 FAR IS CONTROLLED.  IF THE INITIAL VALUE OF Ytl) IS
  0.0, THEN YMAX(I) IS SET TO 1.0 INITIALLY AND REMAINS
  AT LEAST 1.0.
THE METHOD FLAG (USED ONLY ON FIRST CALL, UNLESS
  INDEX = -1),  ALLOrttU VALUES ARE 10, 11, IS, 13,
  2«, 51, 22, 23.  up is AN INTEGER H-ITH TWO DECIMAL
  DIGITS, METH AND  MITER (MF  » IO*METH + MITER).  (MF
  CAN BE THOUGHT OF AS THE ORDERED PAIR (METH,MITER).)
  METH 13 THE 8A31C METHOD INDICATOR,
    METH i 1 INDICATES VARIABLE-STEP SIZE, VAHIABLE-
             OSDER  ADAMS METHOD, SUITABLE FOR NON-
             STIFF  PROBLEMS,
    METH « z INDICATES VARIABLE-STEP SIZE, VARIABLE-
             ORDER  BACKWARD DIFFERENTIATION METHOD,
             SUITABLE FOR 3TIFF PROBLEMS.
  MITER INDICATES THE METHOD OF ITERATIVE CORRECTION
    (NONLINEAR SYSTEM SOLUTION).
    MITER = o INDICATES FUNCTIONAL ITERATION  (NO
              PARTIAL DERIVATIVES NEEDED).
    MITtR a t INDICATES A CHORD OR SEMI-STATIONARY
              NEwTON METHOD *ITH CLOSED FORM  (EXACT)
              JACOBIAN, WHICH IS COMPUTED IN THE
              USER  SUPPLIED SUBROUTINE
              PEOEHV(N,1,Y,PD,NO) DESCRIBED BELOW.
    MITER « a INDICATES A CHORD  OR SEMI-STATIONARY
              NEKTON METHOD WITH AN INTERNALLY
              COMPUTED FINITE DIFFERENCE APPROXIMATION
              TO THE JACOBIAN,
    MITER * 3 INDICATES A CHORD OR SEMI-STATIONARY
              NEWTON METHOD WITH AN INTERNALLY
              COMPUTED DIAGONAL MATRIX APPROXIMATION
              TO THE JACOBIAN, BASED ON A DIRECTIONAL
              DERIVATIVE.
INTEGER USED ON INPUT TO INDICATE TYPE OF CAUL,
  WITH THE FOLLOWING VALUES AND MEANINGS..
  THIS IS THE FIRST CALL FOR THIS PROBLEM.
  THIS IS NOT THE FIRST CALL FOR THIS PROBLEM,
  AND INTEGRATION IS TO CONTINUE.
  THIS 13 NOT THE FIRST CALL FOR THE PROBLEM,
  AND THE USER HAS RESET N, EPS, AND/OR MF,
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM '
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
789
790
791
792
793
79(1
795
796
797
798
799
800
801
802
80)
80«
805
806
807
808
809
810
811
aia
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
8?8
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
                           r-124

-------
c
c
c
c
c
c
c
c
c
c
c





C(6
c/»4


c





















c

C<3




C)3




a SAME A3 0 EXCEPT THAT TOUT IS TO BE HIT
EXACTLY (NO INTERPOLATION IS DONE).
ASSUMES TOUT ,GE. THE CURRENT T.
J SAME AS 0 EXCfcPT CONTROL RETURNS TO CALLING
PROGRAM AFTER ONE STEP. TOUT IS IGNORED.
SINCE THE NORMAL OUTPUT VALUE OF INDEX IS 0,
IT NEED NOT BE XESET FOR NOUMAL CONTINUATION.

8IGSTP s MAXIMUM STEP SIZE ALLOWED (J.R. MASTINBZ «- 6.15.77)


INTEGER IERROR, INDEX, MF, N
INTEGER IPIV, JSTART, KFLAG, MFC, NC, NFEi NJE,
1 SOUSED, NSQ, NSTEP
INTEGER I, KGO, NHCUT, NO
INTEGER LOUT


DIMENSION Y(150,6)
OHENSIOr, YO(M

COMMON /E PCOM 1 / T, H , HM I N,HMAX,EPSC, 33. UROUND.NC, MFC, KFLAG, JSTART
COMMON /tPCU"2/ YMAX(150)
COMMON /EPCHMJ/ ERRORU50)
COMMON /EPCOM«/ SAVE1U50)
COMMON /EPCPV5/ SAVE2(150)
COMMON /EPCOM6/ Pw(4500)
COMMON /EPCOMT/ IPIV(ISO)
COMMOI. /EPCOM8/ EPSJ,NSO
COMMON /EPCOM9/ HUSEO.NQUSEO, NSTEP, NFE, NJE
COMMON /EPCM12/ P«L(3600), WORKR(JO), OUPPER(4), DLOMER(4)
INTEGER BCFLAG
COMMOM/CHEMl/ NOSTAT, N09TM1, NOREAC,
1 NOSPEC, NSTOY, NK
COMMON/CHEM2/ CONIN(aO,5), WTMOLE(IO), RATKON(55),
1 RATEFF(55), RATEVCZ.S), ORATE»
2 NVRATE, LOCVRTC2)
COMMON/CHEM3/ ZEE(5), DELZ(«), HTCELLC6),
1 TOELZ(2) , DFINIT(6), SCALOW(a),
3 BCFLAG(aO), DPRATE(IO), DEPOWR(IO),
Z OCOF(S), FLXWAL(aO), FLX06E(«0),
4 LOCDPF(tO), NDPFLX , SCALUP(O)

DATA LOUT /6/

DATA HCUT /O.IOO/
DATA FOUR /a.OOO/, HUNDRD /1.0E3/, ONE /l.OOO/,
1 TEN /1.0E1/, ZERO /O.OOO/
DATA ERLIMT , KKKER /l.OE-2, O/

IF CINOEX .EQ. 0) GO TO 20
IF (INDEX .EQ. 2) GO TO 25
IF (INDEX .EQ. -1) SO TO 30
IF (INDEX .EQ. 3) 60 TO 40
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
644
845
846
847
648
849
850
651
852
853
BC>I
O J*t
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
074
«75
676
877
678
879
680
681
882
983
884
S85
886
887
888
889
890
891
892
893
894
895
896
897
898
C-125

-------





c
c
c
c
c
c
c
c
c
c
c
c
c
c
c


















c









c


IF UNUEX .ME. 1) GO TO 430
IF (EPS .Lt. ZERO) GO TO 400
IF (f. .Lfc. 0) GO TO 410
IF (M .GT.150) GO TO 440
IF ((TO-TOUT)*HO ,GE. ZERO) GO TO 420
IF INITIAL VALUES FOR YMAX OTHER THAN THOSE BEU'.W ARE DESIRED,
THEY SHOULD «E SF1 HERE. ALL YMAX(I) MUST BE POSITIVE. IF
VALUES co» HMIN OR HMAX, THE BOUNDS ON THE ABSOLUTE VALUE OF H,
OTHER THA», THOSE RELOw, ARE OtSIREO, THEY ALSO SHOULD Bt SET HERE.
IF ERRtiR PER SS UNITS OF T IS TO BE CONTROLLED. S3 SHOULD BE SET
TO A POSITIVE VALUE BELOW. ERROR PER UNIT STEP is CONTROLLED
WHEN S3 s 1. THE DEFAULT VALUE FOR SS IS 0 AND YIELDS CONTROL
OF ERROR PER STEP,
SET UROUNO, THE MACHINE ROUNDOFF CONSTANT, HERE.
USE STATEMENT BELOW FOR SHORT PRECISION ON IBM 360 OR S70,
UROUNO * 9.53674E-7
USE STATEMENT BELO* FOR SINGLE PRECISION ON CDC 7600 OR 6600.
UROUMD = 7.105427406E-15
USE STATEMENT BELOW FOR SHORT PRECISION ON UNIVAC 1110.
UROUM) s 1.490116112E-8
UROUND=7,105427«06E»15
00 10 I = l.N
GO TO (5, 6, 7), IERROR
5 Y'-'AX(I) = ONE
GO TO 10
b YMAX(I) = ABSCYOU))
GO TO 10
7 YI'AX(I) ^ ABS(YO(I))
YMAX(I) * AMAXH YMAX(I) , ERLIMT)
IF fYMAX(I) .EQ. ZERO) YMAX(I) a ONE
10 YU,1) » YO(I)
NC = N
T = TO
H s HO
IF ((T+H) ,EO. T) WRITE(LOUT,15) T
15 FORWAT(/4«,H--. MESSAGE FROM SUBROUTINE DRIVE IN EPISODE,,
1 24H THE O.D.E. SOLVER. ---/22H WARNING.. T + H * T «,
2 E18.8,18H IN THE NEXT STEP./)
(2
HMJfv r ABS(HO)
HMAX i ABS(TO • TOUT)*TEN
HMAX=6IG3TP
EPSC = EPS
MFC - MF
JSTART 3 0
SS = ZERO
NO = N
NSO = NO*NO
(1
EPSJ i SQRT(UROUND)
NHCUT - 0
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
899
900
901
902
903
QAM
7 y **
90S
906
907
908
909
910
911
912
9ia
915
916
917
918
919
920
Q 3 1
TC 1
922
933
924
ape
T C J
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
C-126

-------
60 TO 50
C(3
20 HMAX s ABSCTOUT • TOP)*TEN
KMAXsBIGbTP
GO 10 80
25 prtAX s ABSITOUT - TOP)«T£N
Mi1AX»9I(.STP
c
IF ((T-TOUT)*H .GE. ZERO) 60 TO 460
SO TO «5
C
30 If C(T-TOUT)»H .66. ZERO) 60 TO 450
IF (MF .ME. MFC) JSTART « -1
NC » N
EPSC = EPS
MFC * MF
GO TO 45
C
40 HMAX : HO
C
45 IF UT»H) .£0. T) WRITE (LOUT, 15) T
C
50 CALL TSTEP (Y, NO)
C
KGO s 1 • KFLAG
GO TO (611, 100, 200, 300), KGO
C
60 CONTINUE
C NORMAL RETUHN FHOM TSTEP.
C
C THE ."EIGHTS YMAX(I) AWE UPDATED. IF DIFFERENT VALUES ARE DESIRED,
c THEY SHOULD BE SET HERE. IF 33 is TO BE UPDATED FOR CONTROL OF
c EHSQR PE* ss UNITS OF T, IT SHOULD ALSO BE DONE HERE. A TEST is
C "AOE TO DETERMINE IF EPS IS TOO SMALL FOR MACHINE PRECISION,
C
C ANY OTHEB TESTS OR CALCULATIONS THAT ARE REQUIRED AFTER EACH STEP
c SHOULD RE INSERTED HEHE.
c
C IF r.riFX s 3, YO IS SET TO THE CURRENT Y VALUES ON RETURN.
C IF IM)6« s 2, H IS CONTROLLED TO HIT TOUT (WITHIN ROUNDOFF
C ER»OR), ANO THEN THE CURRENT Y VALUES ARE PUT IN YO ON
C OETUhN. FOR ANY OTHER VALUE OF INDEX, CONTROL RETURNS TO
C THE iNTEGRATOk UNLESS TOUT HAS BEE* REACHED. THEN
C INTERPOLATED VALUES OF Y ARE COMPUTED AND STORED IN YO ON
C RETUR'J.
c IF INTERPOLATION is NOT DESIRED, THE CALL TO INTERP SHOULD
C HE DELETED ANO CONTROL TRANSFERRED TO STATEMENT 500 INSTEAD
C OF 520,

CALL CHECKY(T,Y,YO,N,KOK)
IF(KOK .LT. 0) RETURN
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
951
QCC
T J 1
956
957
9b8
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
900
OA 1
"O 1
962
983
Q A U
7O M
965
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
t A AC
1 UU J
1006
1007
1008
C-127

-------

C«LL STEAOY(Y.'J)
KKKEf = KKKEfi » t
0 I JtRO
DO 70 I s l.N
»YI = AflS(Y(I, 1))
GO TO (70, 66, 67), IERROR
66 YMAXfl) = *ri
60 TO 70
67 YMAX(I) = AM4X1 (YMAX(I), AYI)
IF(KKKEH.LT.20) 60 TO 70

KKKE4 - 0
YMAX(I) = AMAXJ(AYI,ERLIMT)
70 0 - 0 * (AYI/YMAX(I))**2
D * 0«(IJHOUNO/EPS)«*2
IF (0 .ST. FLOAT(N)) 60 TO 250
IF CIMOEX ,EO. 3) 60 TO 500
IF (INDEX .£0. 2) SO TO 85
80 IF ((T-TOUT)*H ,LT. ZERO) 60 TO «5
CALL INTERP (TOUT, Y, NO, TO)
TO s TOUT
GO TO 520
85 IF U(T»H)«TOUT)*H ,LE. ZERO) GO TO «5
C(l
IF ( A8SCT-TOUT) .LE. HUNDRD*UROUNO*HMAX) GO TO 500
IF UT-TOUT)«H .GE. ZERO) 60 TO 500
H = (TOUT » T)*(ONE • FOUR*UROUNO)
JSTART a «1
SO TO «5
C ON AN ErthOH RtTURN FROM TSTEP, AN IMMEDIATE RETURN OCCURS IF
C KFL»G = •?, A,nO RECOVERY ATTEMPTS ARE MADE OTHERWISE.
C TO RECnvEP, H AND HMIN ARE REDUCED 8Y A FACTOR OF .1 UP TO 10
C TIMES BEFORE GIVING UP.
100 .-.RITE (LOUT, 101)
101 FOWC-AT (/06H... MESSAGE FROM SUBROUTINE DRIVE IN EPISODE,,
I 21H THE 0.0. E. SOLVER. •••/)
*R1TE(LOUT,105) T.HMIN
105 FORMA|(//3SH KFLAG = •» FROM INTEGRATOR AT T * ,E18.8/
1 UOH ERROR TEST FAILED WITH ABS(H) • HMIN *,E18.8/)
110 IF (NhCUT .60. 10) GO TO 150
NHCUT » NHCUT + 1
HMJN r HCUT»HMIN
H = HCUT*H
WHITE (LOUT, 115) H
115 FOKMATC24H H HAS BEEN REDUCED TO ,E16.8,
1 26H AND STEP WILL BE RETRIED//)
JSTART = •!
GO TO «5
C
150 ftRITE (LOUT, 155)
155 FORMAT (//tan PROBLEM APPEARS UNSOLVABLE WITH GIVEN INPUT//)
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
1 009
1010
1011
ioie
1013
1014
1015
1 ft t fk
1 W 1 0
1017
1018
1019
1020
1021
1022
1023
1024
1025
10?b
1027
1028
1029
1030
1011
1052
1033
1034
1035
1036
1037
1038
1039
4 A /i A
1 V ** U
1041
1042
1003
1044
1 ftil^
4 V H J
1046
1047
1048
1049
1050
1051
1052
1053
10-J4
10b5
10*16
10S7
1058
1059
1060
1061
1062
1063
n-128

-------
     GO TO 500
200
205
250

255
jOO

305
«00
405
«)0  »»nt (LOUT, 101)
     *<»m (lOUT»«»5) N
«!5  FC1P"»H//?1H ILLEGAL INPUT.. N ,LE . 0. N s ,IB//)
     IMiEX s -«
     RETMR'i
           (LfUT.lfM)
           (LOUT, 20",) T.H.EPS
     FP
-------
c
«so «RITE (LOUT.IOI)
*RIT£ (LOUT.055) T,TOUT,H
45S FORMM (//«6H INDEX a •! ON INPUT **ITH (T • TOUT)«H ,GE. O./
1 44H INTERPOLATION WAS DONE AS ON NORMAL RETURN./
2 fllH DESIRED PARAMETER CHANGES WERE NOT M^OE./
3 «H T 3,E18.8,7H TOUT a,£l8,8,4H H «,E18.e//)
CALL IN1ERP (TOUT, Y, NO, YO)
TO s TOUT
ItdDEX = -5
RETURN
C
4bO *RIT6 (LOUT, 101)
*RIU (LOUT, 465) T,TOUT,H
465 FORM»r(//15H INDEX a Z ON INPUT WITH (T • TOIJT)*H ,6E, O,/
1 an T =,£!«. 8, 7H TOUT =,E18,8,«H H »,E18.8//)
INOE* s -b
RETURN
c
500 TO = T
00 510 I = 1 ,N
510 YOU) = Y(I,1)
580 INDEX a KFLAG
TOP - TO
HO s hUSEO
IF (KFI.AG ,NE. 0) HO * H
RETURN
ENO
SUBROUTINE FHAX(A,N,B)
C
DIMENSION A(l)
C
C S A(l)
00 10 I a 2,N
C = AMAXltC.Ad))
10 COmTIMjc
8 = C
hETUftN
END
SUBROUTINE INTERP (TOUT, Y. NO, YO)
c SUBROUTINE INTERP COMPUTES INTERPOLATED VALUES OF THE DEPENDENT
C VARIABLE Y AND STORES THEM IN YO. THE INTERPOLATION IS TO THE
C POINT T a TOUT AND USES THE NOROSIECK HISTORY ARRAY Y AS FOLLOWS..
C NO
C YOU) a SUM Y(I,J + 1)*S**J ,
C J = 0
C WHERE S = «(T-TOUT)/H.
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
11 H
1180
nei
1122
1133
1121
nas
1136
U27
1126
1129
1130
1131
1132
1133
1131
1135
1136
1137
1138
1139
n«o
1141
1142
1143
ilia
114S
It At*
1 *IO
1147
1148
1149
1150
1151
1152
1153
U54
1155
1156
1157
1156
1159
1 1 fcfl
I I ou
161
163
J63
164
165
166
1167
C-130

-------




c

cu


to






20
30


INTtGF.* NO
INTFaEU JSTARTr KFLAG. MF, N
INTtGEH I, J, L
DIMENSION YO(NO),Y(NO, 6)

COMMON /EPCOM1/ TtH,HMIN,HMAX,EPS,3S.UROUNO»N,MF,KFLA6,JSTART

DAT* DUE /l.OOO/
00 10 I s 1,N
YOU) * Y(I,1)
L » JSTART * 1
S = (TOUT - T)/H
SI s 0-»E
00 30 J « 2,L
SI s S1»S
00 20 I a 1,N
YO(I) » YO(I) » S1«Y(1,J)
CONTINUE
RETURN
END
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
1 100
1169
1170
1171
lira
U73
1174
1175
1176
1177
1178
1179
1180
1101
lisa
1183
1164
1185
1166
1187
4 4 Qft
1 1 OO
1189
SUBROUTINE ISTATE

.-«- SUBROUTINE ISTATE CALCULATES THE INITIAL CONCENTRATIONS
OF THE FOLLOWING SPECIES USING THE OUASI-8TEADT STATE
APPROXIMATION. THIS VERSION OF ISTATE IS TO BE USED
ONLY FOR THE ERT 30 SPECIES X 51 REACTION MODEL OF 4.1.78.

MONO N02 0 N03 N20S ARQH
AHCO A02 PA32 ARO AO PAN
RC03 HQ2 PAD HN04 0

COMMOM/CHEMl/ NOSTAT, NOSTM1, NOREAC,
1 NOSPEC, NSTOY, NK
COMMCN/CHEMJ/ COM^(aO,5), WTMOIEC40), RATKON(55),
1 R»TEFF{55), RATEV(2»5), ORATE,
2 NVHATE, LOCVRTC2)
DIMENSION C(4Q), R(55), A(2,2), 8(2)
EQUIVALENCE (RATEFF, R)
DATA YES XJHYES/

00 200 K«1,NOSTAT

CALL XMIT(MOSPEC,CONIN(1,K),C)
IF (ORATE. EO. YES) CALL RATEHI(K)
CALL UNMIXR(K)
•»•*•* N02 »»«•»•
C(2) « CU)*C(3)«RU)/R(3>
««»••••• Q •«••*•
C(25) a R(l)*C(2)/( R(2) * K(24)*C(S) )
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
tf |J
n w
KM
M U
IVW
KM
1190
1191
1192
1193
1194
1195
1196
1197
1196
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
• 3 • *
1C 1 0
1217
1 3 1 A
1 c lo
1219

-------
 ......    MONO   .«.••••••
 AA  =  ?.*R(5)
 8S  -  «(6)
 CC  -  -  2.*R(4)*C(1)*C(2)*C(30)  • R(7)*C(1)«C(24)
 C(4)  =  (-8B *(8B«88 -4.*AA*CC)**.5)/2./»A
 ......    o    ......
 C(19)  = (,5*R(22)*C(3)*C(8))/(R(23)»C(2)
 	   N03 + N205   ......
 A(l,l)  s «(14)*C(1) * R(15) «C(2)
 »(1,2)  s -R(17J
 A(2,l)  = .R(15)*C(2)
 A(2,2)  = R(16)*C(30) + R(17)
                                                 R(25)*C(1))
      8(3) : 0.0
      CALL 50L382 (A,BJ
      C(27) s 8(2)
      ......    AROH    ,...».
      C(22) = R(41)*C(13)/R(42)
      ......    ARCO    ......
      C(M) a R(42)*C(22)*C(24)/(R(43)*C(D)
      ......    *02    ......
      C(17) a R(16)*C(8)«C(24)/(R(19)*C(1))
      ......     PA1J2
      C(18) = R(2b)*C(9)*C(24)/((R(27) + R(26))*C(1)>
      ......   HNoa ......
                ARO    ......
            s R(«a)«C(13)*C(24)/(R(45)*C(D)
      ......    »0    •«.«••
      C(23) x R(1'J)*C(1)«C(17)/R(20)
      ......    p»u * RC03    .....
      A(l,l) 3 FU37)
      A(t,2) = -«(54)*C(2)
      8(1} s 0.0
      A(2,l) r - R(37)
      A(2,2) = R(35)*C(1) + R(36)*C(2)
      6(2) = ,25«»(22)*C(3)»C(8) + R(33)«C(7)*C(24)
      CALL SOL2B2(A,B)
      C(12) * B(l)
      C(lfc) = B(2)
      ......   Rog + p»Q    ......
      A(l,l) : RC30)*C(1) » R(40)*C(11)
200
 8(1)  a .
-------
    END
                                                                KM  1275
10
FUNCTION ITHOUR(TMIN)

CONVERTS TIME IN MINUTES FROM MIDNIGHT TO HOURS ON 24-HOUR CLOCK

IA s IFIX(TMIN/.600 » l.E-04)
IB = IA/100
IM s IFIX(TMIN»1.E-04) • 60«IB
IFdX.lT.60) GO TO 10
IM : IM - 60
IB * IB + 1
ITHOUH « IB*100 * IM
RETURN
END
SUBROUTINE JACOB(A,C,R,N)

JACOB COMPUTES THE JACOBIAN OF THE CHEMICAL RATE EQUATIONS.

E-H PHOTOCHEMICAL MECHANISM (4.1.79) (30 SPECIES X 51 REACTIONS)

DIMENSION A(N,N), CC1). R(l)

ZERO THE A ARRAY
N.J2 s N*N
CALL xwiT(-NN2«o.o,A)

A( 1, 1) s - R( 3)«C( 3) • R( 4)*C( 2)*C( 30) - R( T)
* «C( ?4) - R( 10)*C( 11) • R( lfl)*C( 10) • R( 19)»C( 17) •
* R( 25)»C( 19) - R( 27)*C( 18) • R( 26)*C( 18) • R( SO)*C( 15)
* - R( 35)»C( 16) - R( 43)«C( 1«) • R( 45)«C( 31)
A( 1. 2) s * K( 1) . R( 4)*C( 1)*C( 30)
A( 1. 3) = • R( 3)*C( 1)
A( 1, 4) = » 2.00»R( 5)*C( a) + R( 6)
*( 1, 10) = HC 1«)*C( 1)
A( l,ll)i R( 10)*C( 1)
A( 1, 1«) = R( 03)*C( 1)
AC 1, 15) a R( JO)*C( 1)
A( ], 16) s R( 3S)*C( 1)
At 1, 17) r R( J9)«C( 1)
A( 1, 18) a R( 27)*C( 1) - R( 28)«C( 1)
A( 1, 19) » R( 25)«C( 1)
A( 1, 21) a R( 4S)*C( 1)
A( 1, 24) = H( 7)*C( 1)
A( 1, 30) = R( 4)*C( 1)*C( 2)
A( i, 1) s * KC 3)*C( 3) - R( 4)*C( 2)*C( 30) * R( 10)
* *C( 11) + 2.00*R( 14)*C( 10) + R( 19)*C( 17) » R( 25)
» *C( 19} * R( 27)*C( 18) t R( 30)«C( IS) * R( 43)*C( 14) +
• R( 45)*C( 21)
A( Z, 2) s . R( 1) • R( 4)*C( 1)*C( 30) - R( 8)«C( 24) -
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
12H6
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1.500
1301
1-502
1303
1304
1505
1306
1307
1306
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
                                ^-13 3

-------
RC lt)*C(
11)
• RC 13)*CC 3)
- RC 32)*CC 26) - R(
AC
AC
AC
AC
AC
AC
AC
AC
A C
AC
AC
AC
AC
AC
A C
AC
AC
AC
AC
AC
AC
AC
AC
AC
2
2
2
2
2
2
2
2
2
S
2
2
2
2
2
2
2
1
3
3
3
3
4
4
,
r
»
r
r
I
i
*
r
,
i
9
9
9
9
9
t
9
9
9
9
9
9
9
«cc
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
4
4
4
4
5
5
5
5
6
6
6
6
6
6
6
6
6
7
7
7
7
7
7
7
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
we
AC
AC
AC
7
7
9
9
7,
3)
")
10)
111
12)
14)
15)
1 *>)
17)
18)
19)
20)
21)
20)
26)
27)
30)
1)
2)
3)
8)
25)
1)
2)
26)
")
24)
26)
30)
5)
M
7)
24)
1)
2)
3)
6)
8)
19)
23)
24)
26)
1)
2)
3)
7)
8)
I")
19)
= 4
3 t
3 t
3 4
3 4
3 4
3 4
3 V
= 4
3 *
3 -
S «
3 4
S •
3 «
3 +
Z «
3 -
S «
3 •
3 •
5 *
3 4
S 4

: -
a 4
3 4
3 4
3 -
3 4
3 4
3 i*
3 4
3 *
3 +
3 •
3 4
a 4
3 4
3 .
3 4
3 4
3 4
3 4
3 •
3 4
3 4
3 4
49)*CC
23)
24)
25)
3 4
2 •
a 4
R C


RC
R (
RC
RC
RC
RC
RC
R (
RC
RC
RC
RC
RC
RC
R(
RC
RC
RC
RC




RC


RC
R(
RC
RC



RC


RC
RC




RC

RC

28)
RC
RC

3)»C(
2.00*R(
2.00*HC
10)*CC
37)
43)*CC
30)*CC
36)*CC
19)*CC
27)*CC
23) *C (
21)
45)*CC
8>*C(
32)*CC
17)
4)*CC
3)*C(
13)»CC
3)*CC
22)*CC
2)
2.00*R(
2.00«R(

4.00»R(
7)«CC
0.15*RC
2.00*RC
36). CC
1) • RC
5)*CC
1«)*CC
1) " RC

1)
1)
2)
t)
1)
2) 4 RC

n
2)
2)

- NC 15)*C( 10) • R( 23)*CC 19) KM
16)
13)«CC £)
4)
1) • RC 15)*CC 2)
11)*CC 25






2S)*CC 1)





1)»CC 2)
3)
3)
1) - RC
3)

4)«CC
4)*CC

5)*C(
1)
32)*CC
4)*CC


13)*CC 2) * RC 22)«CC 8)


2)*C( 30) t RC 7)«CC 24)
1)*C( 30) 4 0.15«RC 32)

4) • RC 6)

2)
1)*CC 2)
9)*CC 24)
38) 4 RC
34)
9)*CC
0.50*RC
0.50*R(
0.50KRC
3B) - R(
0.50*RC
0.50*R C
20)
39)*CC
0.50«RC
0.50*RC
0.50*RC
0.50*RC
33)*C( 2
0.50*R(
43)*CC
0.50'RC

20)
33)»CC
0.30.RC
39)*CC

5) 4 R(
25) *C C
23)*CC
22)«CC
39)*CC
22) »C (
23)*CC

6)
29)
25)«CC
23)*CC
22)*CC
«) • RC
22)*CC
1)
23)«CC


7)
24)*CC
24)

39)*C( i)
19)
19)
S)
24)
3)
2) * 0.50*RC 25)*CC 1)



19) 4 RC 43)*CC 14)
19) 4 0.15*RC 32)*C( 26)
8)
34)
3) t 0.30*RC 24)«C( 25)

a) + 0.50*RC 25)*CC 1) +



S)
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
1324
1325
1J26
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1368
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
13b8
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
C-134

-------
t (
7
9
« «C(
AC
A (
AC
AC
AC
AC
AC
AC
A C
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
*
AC
AC
AC
At
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
*
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
7
8
A
8
8
9
9
10
10
10
10
10
10
11
11
11
11
11
11
11
11
*
11
11
11
11
11
11
11
11
11
12
12
12
13
13
14
14
14
11
15
t
1
t
t
1
t
t
9
9
9
t
r
r
t
t
t
9
9
9
t
t
CC
9
t
9
9
9
9
9
t
9
t
,
,
t
9
9
9
9
,
9
«CC
15
15
15
15
15
15
15
15
15
16
16
9
9
9
9
f
9
9
9
t
9
9
26)
2)
28)
3)
8)
24)
25)
9)
24)
1)
2)
3)
10)
19)
27)
1)
2)
3)
5)
ft)
7)
S)
11)
11)
13)
15)
20)
21)
23)
24)
25)
26)
28)
2)
12)
16)
13)
24)
1)
14)
22)
24)
1)
16)
7)
ft)
11)
15)
16)
18)
25)
26)
28)
1)
2)
B

B
:
s
B
C
S
S
S
a
s
s
s
s
B
s
s
E
a
:
a
s

s
r
s
n
s
s
s
B
s
3
r
s
E
s
s
s
s
8
s

B
E
S
3
S
S
B
B
S
a
•
+

+ RC
- RC
• RC
• H C
• R(
- RC
• RC
• R C
» RC
+ RC
- HC
+ RC
+ RC
• RC
• RC
*
+ RC
t
» RC
*
- RC
• RC
+ RC
• RC
+ RC
+ RC
* RC
* RC
»
* HC
- RC
» RC
RC
RC
RC
RC
RC
- RC
» HC
«• RC
+

* RC
*
• RC
• RC
* RC
*
+
« RC
• RC
- RC
• RC
0.50*R(

49)»CC
22)*CC
18)*C(
16)*CC
2«)*CC
26)*CC
26)*CC
14)*C(
13)«CC
13)*CC
14) »C C
23)*CC
17)
10)*CC
in*cc
0.25.RC
9)»CC
0.67*RC
34)
0.25*RC
10)*CC
29) «•

19)
8)
24) . RC
e)
6)
24)
9)
10)
3) . RC
2)
1) - RC
2)

11) t RC
11)
22)»CC
24)
0,!0*R( 31) * 0,15*R( 32)



22)*CC 3) • RC 24)*C( 25)





15)*CC 10) * R( 23)*CC 19)

1S)*C( 2)


45).«CC 21)

8)

38) * RC 39)*CC 24)

22)*CC
1) - RC
40)*Cl 15) • RC
41 )*C C
40)*CC
21)
45)*CC
20)
9)*CC
0.40.RC
31)
48) «C C
36)«CC
37)
36)«CC
4!)*CC
41 ) *C (
43)*CC
43)*CC
«2)*CC
42)»CC
0.15»RC

34)
0.40.RC
40)*CC
30)«CC
35)*CC
0.1b*RC
0.40*RC
29)
50)*CC
35)«CC
36)*C(
24)
11)

1)

5) » RC
24)»CC

11)
16)

2)
24) - RC
13) - RC
14)
1)
24)
22)
27)«CC


24)*CC
15)
1) - R(
1)
27)*CC
24)*CC
'
15)
16)
16)

3) * 0.40»RC 24)*C( 25)
11)»CC 2) • 4.00*RC 12)
48)»CC 28)





39)*CC 6) * RC 41)«CC 13)
8)





44). CC 24)
44). CC 13)




18) • RC 30)*CC 15) + RC 35)


25)

40)*CC 11) • RC 50)*CC 28)

1)
B)




KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
1379
1380
1381
1362
13K3
1364
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
1416
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
C-135

-------
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
A{
A(
AC
AC
A (
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC
A(
AC
AC
AC
AC
AC
A(
AC
AC
A(
A(
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC



AC
AC
AC
AC
16,
16,
16,
16,
16,
IT,
17,
17,
17,
17,
18,
18,
18,
18,
19,
19,
19,
19,
19,
19,
2",
20,
20,
21,
21,
21,
21,
22,
22,
22,
23,
23,
23,
23,
2",
24,
2«,
24,
24,
2U,
24,
24,
2 1
20,
24,
24,
24,
HC
-
*cc
24,
25,
25,
25,
3)
7)
8)
12)
16)
24)
1)
8)
17)
24)
28)
1)
9)
18)
24)
1)
2)
3)
8)
19)
28)
2)
11)
20)
1)
13)
21)
24)
13)
22)
24)
1)
17)
23)
28)
1)
2)
3)
4)
5)
6)
7)
8)
9)
11)
13)
22)
24)
3 *
a +
3 4
3 +
S •
S »
3 »
3 +
3 v
S +
3 «
= •
5 +
S m
3 »
S •
S •
S +
s +
a -
a •
= *
3 *
3 -
* •
3 +
5 «
3 +
3 »
3 -
3 +
3 +
5 »
S •
S »
3 *
r .
3 +
3 *
S .
3 -
3 •
3 •
3 -
3 +
* m
3 -
3 •
18)»CC
RC
RC
RC
HC
RC
RC
RC
RC
Rl
RC
RC
RC
R t
R(
RC
R(


RC
R(
RC
R(
RC
R(
R{
R(
RC
RC
RC
R(
RC
RC
RC
R(
RC
R(

RC
RC
R(
RC
RC
RC
RC
RC
RC
MC
8)
41)*CC
0.25*R(
33)*CC
0.2"5»RC
37)
35)*CC
33)*CC
19)*CC
18)«CC
19) *C (
18)«CC
51 ) *C (
27)*CC
26)*CC
27) *C C
26)*CC
25)*C(
23)*CC
0.50«RC
0.50«R(
23)«CC
49)*CC
11)*C(
H)*CC
21)
45)*CC
44) *C C
45)*CC
44)*C(
41)*C(
42)*CC
41)*C(
19)«CC
19)*C(
20)
51)»C (
7)*CC
8)*CC
0.50*«C
6)
9)*CC
39)*CC
33)*C(
18)«CC
26)*C(
10)«CC
41 ) *C (
42)*CC
7)*CC
22)«CC
24)
22)*CC

1) -
7)
17)
24)
n •
8)
17)
18) .
24)
1) «
9)
19)
19)

R(



RC


RC

RC



22)*CC
22)*CC
2) •
19)
11)
2)

21)
24)
1)
13)
24)
24)
13) -
17)
1) *

17)
24) *
24)
RC










RC

RC


RC

22)«CC

24)
24)
24)
24) *
24)
1) »
24) .
24)
1) -






RC
RC

RC
• RC 26)*CC 9)
13) - RC
42)*CC
8)
3)

36)»CC



51)*C(


28)*C(

aa)*cc



8)
3)
25)*CC










42) *C C

51)*CC

,
10)»CC

8)




O.SO«RC

«8)*CC
44)*CC

8)*C(


11



28)


18)

1)





1) • RC 49)«CC 26)










22)

26)


11)






22)*CC 3)

28)
24)

2) - RC 9)*CC 5) •
- RC 33>*CC 7) • RC 39)«C( 6)
22) - RC
44)*CC 13) • RC «7)
28)
28)
2)
6)
25)
a -
3 *
3 •
a •
RC
RC
R (
RC
47)*C(
1)
24)«CC
24) *

25)
RC


2) • RC 2«)*CC
«8)*CC


11)


8) • RC 46)*CC 28)
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
1434
1435
1436
1437
1436
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
»457
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
1483
1484
1485
i486
1487
1468
C-136

-------
A( ?5, 28)
AC 26, 1)
AC 2b, 2)
AC26,15) s
AC 2b, 18)
AC 26, 26)
AC26,28) s
AC 27, 2)


C















AC
AC
A (
AC
AC
AC
A(
AC
AC
AC
*
AC
AC
AC
AC
AC
AC
AC
27,
27,
27,
21,
28,
26,
ft
28,
26,
28,
RC
29,
29,
29,
29,
29,
29,
29,
10)
27)
30)
11)
15)
17)
19)
24)
25)
28)
« ' RC 46)*CC 25)
2 + 0,85«RC 27)«CC 18) * RC 30)*CC 15)
s - R( 32)*C( 26)
RC30)*CC1) + RC50)*CC28)
» 0.85*RC 27)*C( 1)
- RC 29) * R( 31) - R( 32)»C( 2)
(50)*CC15)
* RC 15)*C( 10)


s
s
s
s
3
S
C
a
49)*C(
11)
15)
17)
19)
24)
25)
28)
s
X
5
s
*
a
a
* P( 49)*C(
C
C
C
c
c
c
c
c
c
c
c
AC
AC
AC
A(
AC
AC
AC
AC
*
AC
AC
30,
30,
3'i,
3U,
3P,
30,
30,
30,
1)
2)
t)
6)
7)
9)
13)
24)
c
a
a
a
s
s
a
a
H( 44)»CC
30,
31,
27)
30)
3
a
« RC
RC
HC
RC
RC
RC
RC
RC
RC
RC
19)
» RC
* RC
» RC
+ RC
» R C
* RC
* RC
19)
- RC
- RC
»
» RC
* RC
» RC
» RC
* RC
13)
• RC
• RC
15)*CC
16)*CC
16)*CC
48)*CC
50)*CC
51)*CC
49)«C(
47)«CC
46)*CC
46)*CC
2)
30) •
27)
28)
28)
28)
28)
28)
28)
25) -

RC







RC
- RC 50)*C( 13)
48)«CC
50)*CC
51)«CC
49)*CC
47)*C(
46)*C(
4«)*CC
28)
28)
26)
28)
26)
28)
25) +






RC
» RC 50)*CC 15)
4)*CC
4)*CC
2.00«R(
39)*CC
33)*CC
26)*CC
44)*CC
26)*CC

16) »C (
«)«CC
2)*CC
1)«CC

17)







47)*CC 24) - RC 48)«CC 11) -
• RC 51)*CC 17)






47)*CC 24) + RC 48)«CC 11) »
* RC 51)«C( 17)
30)
30)
5)«CC
24)
24)
24)
24)
9) *

30)
1)«CC




"(



4)




33)«CC 7) » RC 39)*C( 6) +


2) - RC 16)*CC 27)
RETUWS

EhO








KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
M99
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
15U1
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1S21
1522
1523
1524
1525
1526
15.27
1528
SUBROUTINE KEM002(INTIN,T3TOP,NUMFLX,FLXUNT)
KEMOD2 IS THE SECONDARY DRIVER FOR THE  CHEMICAL/
DIFFUSION MODULE OF THE ERT TRAJECTORY  MODEL.
KEMQ02 CONTROLS ALL I/O EXCEPT INITIAL  EMISSION  INPUTS.
KEMOD2 CONTROLS THE UPDATING PROCESSES.
FEATURES OF KEMOD2
    INTEGRATION BY EPISODE PACKAGE
    VARIABLE SIZE VERTICAL MESH
    GENERALIZED BOUNDARY CONDITIONS
                                                                 KM  1529
                                                                 KM  1530
                                                                 KM  1531
                                                                 KM  1532
                                                                 KM  1533
                                                                 KM  J534
                                                                 KM  1535
                                                                 KM  1536
                                                                 KM  1537
                                                                 KM  1538
                                                                 KM  1539
                                                                 KM  S540
                               C-137

-------
c
c
c
c





















TIME » HEIGHT DEPENDENT PHOTOOIS30CIATION RATES,
rtlTH SKY CLEARNESS RATIOS
TEMPERATURE DEPENDENT REACTION RATE

REAL INTIM
INTEGF.H BCFLAG
COMMOK/CHEMl/ N03TAT, NOSTM1,
1 NOSPEC, N3TDY,
COMMQN/CHEM2/ CONIN(40,5), WTKOLE(40),
1 R»TEFF(55), RATEV{2,5),
2 NVHATE, LOCVRM2)
COMMON/CHEM3/ ZEE(5), DELZ(4),
1 TOELZ(2) , DFINITC6),
2 OCOF(5), FLXWAL(40),
3 flCFLAG(40), DPHATE(IO),
a LOCOPFUO), NDPFLX ,
COMMO*/CH£M4/ RATK1 (100,5) , HA TK2 ( 1 00, 5) ,
1 RLONG, TMZONE,
2 HIRATE, JOATE,
COMMON /CHEM5/ REACT(20,55),SPEC(40),LOCFLX(10)
1 NASFLX,FLXW1 (30) , FLXH2 (30 )
COMtiON / I MPUTS/ TITLE (20), IQATF(tO),
co«»o I/FLUXES/FLXINC 7,200), FLXTiM(aoo),
COMMON /PSl/ TPASS(200), P3(7,5,75),
1 NPTSR, NPSFLX,

CONSTANTS



NOREAC,
NK
RATKON(55),
QNATE,

HTCELL(6),
SCALOW(I),
FLXOGE(40),
DEPOWR(IO),
SCALUPC4)
RLAT,
SUNTIM,
NRATE
,

NCURV
NFLUX
FRACTC3),
LOCP8FC7)
COMMON /PS2/ PSRATE(30,5), PSR1(30,5), PSR2(30,5) ,TLAST,UPOINT









C



C





C
C







COMMQ\/EPCOM(i/PW(«500)
COMMON/PRPLOT/KPS(5) , K3YM(5),
t , TOUT(IOO), VALMAX(5)
COMMOf
-------










c









c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c





200
sEAoaiN.29) HIRME
R£*DCLIN,29) OCLOUO
READ(LIN,29) VTEMP
«EAD(L1N,29) SPUMCH
»E40UIN,31) NUMSTP
»EAD(LIN,31) NOREAC
REAO(UIN,3l) NOSPfcC
f»E»D(l.IN,31) N3TDY
REAO(LIN,31) NOSTAT
REAO(LIN,30) (ZEE(I), I«l, NOSTAT)

NK * NOSPEC -NSTOf
NPIJMCH : NK
SUMTIM s UPDINT
KDCHEM s YES
OHATE * YES
F s YES
TSTUP2 = TSTOP
KOK s 100
NASFLX « NUMFLX

NOSPEC IS THE TOTAL NUMBER OF SPECIE (MAX • 40)
N.3TOY IS THE NUMBER OF SPECIE HELD CONSTANT OR IN STEADY STA
NK IS THE NUM8EH OF SPECIE INTEGRATED (MAXNK * 30)
NOSTAT IS THE NUMBER OF VERTICAL STATIONS (KIN»«.MAX«5)
-LOCFLX IS LOCATION INDEX FOR AREA SOURCE EMISSION FLUXES
-NUMFLX is NUMBER OF AREA SOURCE EMISSION FLUXES
•LOCPSF IS LOCATION INDEX OF POINT SOURCE EMISSION FLUXES
•NPSFLX IS NUMBER OF POINT SOURCE EMMI3ION FLUXES
- --LOCOPF IS LOCATION INDEX FOR DEPOSITING FLUXES
. ...NOPFLX IS NUMBER OF DEPOSITING FLUXES


1CFLAG s 0 DC/OZ " PHI/KZ WHERE PHI a 0. (OEFtULT CASE)
OR PHI * AREA SOURCE EMISSION
AND KZ * DIFFUSION COEFFICIENT

8CFLA6 s 1 DC/DZ • -DPRATE* (PPM*»DEPOWR)/KZ DEPOSITING SPECIE
____ _(*_lCQC
• «••« »Wnt Kt
,,.,,0P,?ATE(I) IS THE DEPOSITION VELOCITY OF THE I»TH SPECIE
.....IN METERS/MINUTE/ (ppM«*(OEPow«-u)
.....IVPUT AS POSITIVE QUANTITY FOR UPTAKE AT MLL

BCFLAS = 2 C s INITIAL CONCENTRATION FOR ALL TIME

• •••«•» 7f on PPM iQR&v 4un ruvric UK &un unftT&T T MCIUT A
• •»••• CC™1) r "<*» pnn*T *HU vHC wn Ttn f*nv rfV9 11*1 liirUlw
NRC s MAXMSH»NROw
CALL X"IT (•NRC,0.(CONIN)
IF(NOSTAT.GE.fl) GO TO 200
w»ITe(LOUT,7T) NOSTAT
GO TO 800
CONTINUE
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
TKM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
FKM
KM
KM
KM
U (y|
KM
KM
KM
KM
KM
KM
KM
KM
K M
R R
KM
KM
KM
KM
KM
KM
1596
1597
1598
1599
1690
1601
1602
1603
160a
160S
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1 f»9fl
1 DcO
1629
1630
1631
1632
1633
1634
1 i. C *5
1 O JO
1656
16J7
1636
1639
1640
1641
1 i /i 3
1 CMC
1643
1 f*a&
1 O***l
1645
1646
1647
1648
1649
1650
C-139

-------
     1
  210





  215



     ]
  219


220



222
224
C
230
C

C
C
C
C
C
C
C
C
IF(\K.LE.MAXNK)  GO TO 310
*RUEUOUT,76) NOSPEC ,NSTDY, NK
GO Tf *00
CONTINUE
IF(90CHEM,NE.YES)  GO TO Z19
NOPFLX = 0
DO ?15  IM,NOSPEC
READ(LIN,51)  SPEC(I),WTMOLE(I),BCFLAG(I)
IF(BCFI.AQ(I) ,EQ. ])  NDPFLX » NOPFLX » 1
CONTINUE
IF(NU"FLX,GT.O; READ(LIN,31) (LOCFLX(I),Is!,NUMFLX)
IF(NPSFLX.GT.O) READ(LIN,31) (LOCPSF(I),I«l.NPSFLX)
IF(NDPFLX.GT.O) READ(LIN,53) (LOCOPF(I),DPRATE(I),DEPOWR(I),
  I = l,:jOPFLX)
CONTINUE
DO 220 I * I,NOSPEC
REAn(LIN,«l) (PPMCI,J),J«t,NOSTAT)

IF(ROCHEM.NE.YES)  GO TO 230
00 222 I'l.NOREAC
*EAn(LIN,30) RATKON(I)
CONTINUE
DO 224 Jsl.NOREAC
REAO(LIN,40) (REACT(I,J),1»1,20)
CONTINUE

CONTINUE

TIME = INTIM
               READ OR GENERATE THE PHOTODISSOCIATION RATES
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
                                                                        KM
      ....... THE PHCTODISSOCIATION RATES ARE GENERATED IF SUMGEN'TES   KM
      ....... THE PHOTOOISSOCIATION RATES VARY WITH HEIGHT IF HIR»TE»YESKM
      ....... UOCVRT 13 THE SPECIES INDEX FOR THE RATES (INPUT)         KM
                                                                        KM
      READU!N,30) SLAT                                                 KM
      REAn(LIN,30) RLONG                                                KM
      «EAOUIN,30) TMZONE                                               KM
      REAQ(LIN,3n JOATE                                                KM
                    NVRATE                                              KM
      READCLIN, Jl)
      HEAD (1. IN, 31) (LOCVRTC I), I«l, NVRATE)

      IF(SUMGEN.EO.YES)  GO TO 2«a
      DO ?43 KKsl, NVRATE
  236
      IFtHJRATE.EO.RNEG)  NHTsl
      00 24u  1=1,101
      IF(KK.r.T.l)  GO TO 236
      RE AD (LIN, 54) (»ATK1(I,IZ),IZ»1,NHT)
      IF(RATK1(I,1) .LT.  0.0)  GO TO 243
      GO TO 3«0
      IF(KK.GT.a)  GO TO 242
      READ {L IN, 54) (RATK2 (I , IZ) , IZ*1 , NHT)
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
1651
1652
16S3
1654
165S
1656
1657
1658
1659
1660
1661
1662
1663
1664
1663
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
16fll
1682
1663
1684
1665
1686
1687
1668
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
                                      C-140

-------
                          0.0)  GO TO 243
      IF(HAT<2(I,1) ,LT.
  240 CO JTIMJE
  242 *RMt(LOUT,15)
      GO TO 800
  243 CONTINUE
      •NUATE = I • 1
      GO TO ?45
  244 CONTINUE
C
      JSTA«T z ITHOURC  INTIM  )
      J3TOP  » ITHOUR(  FLXTIM(NFLUX)  )
      CALL HHOTOO (J3TART,JSTOP,NOSTAT,ZEE)
  245 CONTINUE
      IK1 : 1
C
      IF(tJCLOUD,EO.RNEG)  GO  TO 249
C     ....... INPUT SKY COVER FACTORS AND  TIMES
C     	 LAST SKY  COVER  UPDATE TIME  (CLOUDT) MUST BE  A  NEGATIVE
      00 246  1st.26
      REAOUIN.59)  A,  B
      IF(A.LT.O.O)  GO  TO 248
      IMI.GT.25)  GO TO 247
      CLOUDTU) » A
      CLOl'OF(I) « B
      NCLOUO = I
  246 CONTI\UE
      GO TU 24fl
  247 ^RITE{LOUT.57)
      GO TO 800
  248 CONTINUE
      ICLOUO = I
      CLOUDY a CLOUOFU)
  249 IF(QCLOIJO.en.RNEG)  CLOUDY"  1.0
C     ......       THIS CALL  TO UPMAT2 INITIALIZES  THE VARIABLE  RATES
      CALL IIP9AT2(TIME, IK 1,RATEV»NOSTAT,NVRATE,CLOUDY)
      CALL hATEHld)
      CONTINUE

      • --	— READ TEMPERATURES  IF VTEMP «  YES
      ITEMP = 1
      NTE^P = 1
      TEMPO ) = 298.2
      IF(VTEMp.NE.YES)  GO TO 265
      DO 2M I =  1.26
      REA(1(LIN,59)  A,  B
      IFCI.GT.2S)   GO  TO 262
      IFCA.LT.O.)  GO TO 26S
      TMTEMP(I) = A
      TEMCCI) « B + J73.2
      NT£"P = I
  261 CONTINUE
  262 CONTINUE
      «f»ITE(LOUT,79)
      GO TO 600
  265 CONTINUE
260
C
C
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
17 Ob
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
17
-------
270
280
290
C
C
C
  293
  295
  297
  299
CALL TfcMPH (ITEMP,INTIM,1EMP)

--	READ TABLE OF OIFFUSIVITY UPDATE TIMES, MIXING HEIGHTS,
         AND DIFFUSIVITY COEFFICIENTS.
         MIXING HEIGHT INFORMATION IS OPTIONAL.
K s MOSTAT+3
no ??f) I = 1,101
«EAf)(LIN,
-------
300

C
C
C
C
C
C
C
C
302
303
305
CALL  XMJT(-NPMX,0,0,PSR1)
CALL  X*IT(«NPMX,0,0,PSR2)
CALL  XMIT(-M»XNK,0.0,FLXW1)
CALL  XMIT(-MAXNK,0.0,FLXK2)
CALL X*IT(-NROW,0.,FLXML)
CALL XMIT(-NROW,0.,FLXOG£)
CALL UPFLXHTIME,IFLXTN)

.....   GENERATE VERTICAL MESH PARAMETERS

NOSTMl * NOSTAT . 1
DELZU) * ZEEC2) - ZEE(l)
HTCELL(l) * 0£LZ{1)
00 300 K = 2, NOSTMl
OELZ(K) s ZEECKfl) - ZEE(K)
HTCELL(K) s ,5*(OELZ(K) * DELZ(K-l))
CONTIMUE
HTCELL(NOSTAT) * DELZ(NOSTMl)

 ..... CONVERT POINT SOURCE EMISSIONS FROM ABSOLUTE MASS
       OR MOLES TO RATES ON A REGULAR UPDATE SCHEDULE.

 ..... POINT SOURCE MASS IS BLED IN OVER (UP TO) THREE
       UPDATE INTERVALS. THE FRACTION IN EACH INTERVAL
       IS SET BY THE FRACT ARRAY (SEC KEMOO DATA STATEMENT),

IF(NPSFLX.LE.O)  60 TO 307
CALL x*IT(-2625,0.0,PS)
A s l.t6/UPDINT
IF(rLXUNT.EO.RMOLE)  GO TO 303
00 iOi K * t,NPSFLX
10 =LOCPSF(K)
*OHK(K) a 28,97/WTMOLEdO)
CONTI »i;E
CONTINUE
8 s IMriM - 0,«99*UPOINT
K4 : 0
00 305 K < 1,NPTSR
Kl = 1FIX( (TP*S3(K).8)/UPDINT) * 1
K2 s Kl * 1
K3 s Kl + 2
K4 s MAXO(K4,K3)
DO 305 J a 1, NOSTAT
VF = **VFR(J,K)/HTCELL(J)
IFU.EQ.l  .OR.  J.EO. NOSTAT)  VF * 2,*VF
00 3U5 1 a 1,NPSFLX
C a VF«PTSR(I,K)
IFCFLXUNT.NE.RMOLE) C
PSCI.J.K1)
P3(I,J,K2)
P3(I,J,K3) a PS(I,J,K3)
CONTINUE
NPTSR - K4
TPASS(l) » INTIM
00 306 K * 2,NPTSR
                              C*WORKU)
                   PS(I.J.Kl) » FRACT(1)*C
                   PSCI»J,K2) * FRACT(2)*C
                                FRACT(3)*C
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KKM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
1616
1817
1918
1819
isao
1821
1822
1923
1824
162S
1826
1827
1626
1829
1830
1831
1812
1833
1834
1835
1836
1637
1836
1839
1840
1841
1842
1843
1844
1815
1846
1847
1848
1849
1850
1851
1852
1853
1859
1859
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1666
1867
1868
1869
1970
                                        C-143

-------
306
307

C
C
C
308
309

3tO
311
31?
TP*SS(K) = TPA9SCK-1) + UPOINT
CONTINUE
N s MAXNKKNOSTAT
C»LL XMIT(-N,0.0,PSRATE)
CAUL XMIT(-?UOO,0.0,PW)
IPS = 1
CALL UPSORC(TIME,IPS,N03T»T,SPEC)
        PRINT INPUTS
313
314
317
C
319
320
 325
  330
CALL NErtPAG(TITLE,0,IOATE)
WRITE (LOUT. 1 6) INTIM, TSTOP,OELT,BIGSTPr NOREAC. NOSPEC, N8TOY,NOSTAT  KM
IF(NUMFLX.EO.O)  GO TO 3tl
00 308 1= 1,NUMFUX
ID - LOCFLX(I)
*OKK(I) = SPECCID)
CONTINUE
CALL NEWPAG(TITLE,0,10ATE)
«*ITE(LOUT,68)  (WORKU) , I=1,NUMFLX)
00 310  J a 1, NFLUX
IF(MOO(J,'jO).NE.O)  GO TO 309
CALL NEWPAG (TITLE, 0,IOATE)
rtWIIE (LODT.68)  (KORKU). Isl.NUMFLX)
*«m(LOUT,*>9) FLXTIM(J), (FLXJN(I,J), I«1,NUMFUX)
FLXTIM(J+1)=FLXTIM(J) + UPDINT
COUTINUt
CONTINUE
IF(NPSFLX.EQ.O)  GO TO 317
00 312  K=1,NP3FLX
ID = LOCPSF(K)
«0»K(K) f SPECCID)
CONTINUE
CALL *Er
-------
              SCHfDUUE AND INIHALIZE OIFFU31VIT1E8
350
355

360
370
C
410
415
    IF(NHT.EO.l)   60 TO 360
    K = fvQ!>TAT + 3
    TSTOP = HTINV(NMT,1)
    CALL »«IT (NHT. HTINV( 1,1), WORK U»
    DO 350 J »2,K
    CALL 3KEOUL(HTINV(1,J),WORK,NHT,NINT,UPDINT,INTIM,TSTOP,-l.,F,l)
    IF(F.tQ.rES)  GO TO 800
    CONTINUE
    MHT « MINT
    MlIl»Vll,l) « INT1M
    00 355 I =a,NHT
    HTIWV(I.l) = HTINVU-1,1) » UPOINT
    COMIMJE
    TSTOP s T3TOP2
    CONTINUE
    K « NOSTAT + 1
    00 370 I 31,K
    J = 1 + 2
    OFINITU) a HTINV(l.J)
    CONTI'IUE
    CALL OIFCOF(NOSTAT)
     ----    INITIALIZE RATEFF
    CALL X4IT(NOREAC,RATKON«RATEFF)

    IPHOD = NX*NUSTAT
    TOtL2(l) = 2./HTCELLC1)
    TOELZ(?) s 2./H1CELL(NOSTAT)
    CALL utAPACCTITLE.O.IOATE)
    WHITE(LOUT,t«)
    HTCELL(l) • HTCELL(t)/2.
    MTCELL(NOSTAT) a HTCELU(NOSTAT)/2,
    I = 1
    •MUTE (LOUT, 44) I,ZEE(I),OFINIT(I),HTCELL(I)
    00 «?0 I s 2,NOSTAT
    .VKITE(LOUT,43) OFIMT(I), DELZ(I-l)
    IFU.Fi).NOSTAT)  60 TO 415
    *HITE(LnuT,42)  I» ZEE(I), HTCELL(I)
    GO TO u?0
    «RITE(LOUT,94) I,ZEE(I).DFINIT(I),HTCELL(I)
0   CONTINUE
    HTCELL(l) = HTCELL(1)*2.
    MTCELL(NOSTAT) = HTCELL(N08T»T)*2.

    ..... INITIALIZE INTERNALLY COMPUTED CONCENTRATIONS
    CALL I3TATE
    ---	—  INITIALIZE YO VECTOR OF CONCENTRATIONS FOR DRIVE
    DO 425 1=1,NOSTAT
    Ks M*(I-I)  + 1
    CALL xMlT(NK,CONIN(l,I),rO(K))
425 CONTINUE
    CALL NE*PAG(TITL£,0,IOATE)
    ITIM = ITHOUR(TIME)
    *KITE(LOUT,9T)   INTIM, ITIM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
    1926
    1928
    1929
    1<»30
    1931
    1932
    1953
    1934
    1935
    1936
    1937
    1938
    1939
    1940
    1941
    1942
    1943
    1944
    J945
    1946
    1947
    1946
    1949
    1950
    1951
    1952
    1953
    1954
    1955
    1956
    1957
    1958
    1959
KM  19bO
KM  1961
KM  1962
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
    1963
    1964
    1965
    1966
    1967
    1968
    1969
    1970
    1971
    1972
    1973
    1974
    1975
    1976
    1977
    1978
    1979
    1980
                                    C-145

-------
450
C
453
454
456
  455

  459
      WHITE (U)UT, 16)  CSPEC(J),J31,NOSPEC)
      00 150 K = l,Nr>STAT
      rtRmaouT.32)  ZEE(K), ( PPM(J,K)
      CONTINUE
IF (SPUNCH.NF.YES)  GO TO 454
......  rtRITE I.e. ON TAPE LUP FOR PUNCH OR FILE STORAGE
WWITE(LUP,80) TITLE
**ITECLI)P,B1) TIME,  (ZEE(K),Ksl,N03TAT)
NOELV a 1
00 453 K=l, NOELV
*RITE(LUP,81) C PPM(J,K),J«1,NPUNCH)
CONTINUE
CONTINUE
IFtNCU9V.EO.OJ GO TO 459
KT * 1
00 455 I : l.NCURV
J 3 KP3CI)
IFCJ.NE.5)  60 TO 456
SC*LE CO FOR PLOTTING
GRCUNU.KT) * .10*PPM(J,1)
IF(GRCUN(I,KT).GT.VALMAX(I)) VALMAX ( 1)»SRCON(I , KT)
GO TO 455
CONTINUE
GUCON(I.KT) » PPMCJ.l)
IF(PPM(J,1).GT.VALMAX(D) VALMAX(I) * PPM(J,1)
CONTINUE
TOOT(KT) a INTIM
CONTINUE
             INITIALIZE ADDITIONAL PARAMETERS FOR INTEGRATION
NSTEC = 0
N s IPBOD
KNTEH = 0
TPR1NT = INTIM » PRNTIN »,01
RECALL * TE3
UP04 = UPOINT/4.0
  460
  470
C
C
C

C
C
                    THE INTEGRATION TIME CYCLE BEGINS HERE
CALL TI^IEX(O,A,B)
CONTINUE
OLDTI* = TIME
IF(RECALL ,NE. YES)  GO TO 470
INDEX s J
TOUTEP 3 OLOTIM + UPDINT/10.
IF(KNTe« .GT.l)   06LT a ,flj
IF(NSTEP .GT. NUMSTP)  GO TO 800
TLAST = TIME

              INTEGRATE BY EPISODE

CALL DKIVE(N,TIME,DELT,YO,TOUTEP,EPS,IERROR.MF,INDEX,BIGSTP.KOK)


IF(KOK.GE.O)  CO TO 475
KM
KM
KM
KM
KM
KM
AGE KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
EQUATION KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
BIGSTP.KOK) KM
KM
KM
KM
19flt
19«2
1983
19fl4
1985
1986
1987
1968
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
3002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
a A * a
C V 1 O
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035

-------
      ISTOP s IF.S
      WHITE(LOUT|60)
      GO TO 460
«75   IFCIMOF.X .LT. 0)  00 TO 800
      INOcX = 2
      KNTEk s KNTER + 1
      1F(KFC«LL.NE. YES)   60 TO 060
C     MAKE SHOST CALL TO EPISODE (DRIVE) If RECALL EQUALS TE3
C     THEN rtESET TOUTEP TO ACTUAL TOUT ON NEXT CALL
      TOUTEP * OLDTIM * UPDINT
      RECALL * RNEG
      GO TO 470
480   TOUTEP a OLOTIM « 2.*UPOINT
C     ............ UNPACK YO FOR CHECKINS AND OUTPUT
      DO 500 Isl.NOSTAT
      K i NK»(I-1) + 1
      CALL XMlTtKK,WK),CONlt»(i»l>  )
500   CONTINUE-
                                                                        KM
                                                                        KM
    2036
    3037
                                                                        KM  2038
                                                                        KM  2039
                                                                        KM  2040
                                                                        KM  2011
                                                                        KM  8042
                                                                        KM  2043
                                                                        KM  2044
                                                                        KM  2045
                                                                        KM  2046
                                                                        KM  204?
                                                                        KM  2048
                                                                        KM  2049
                                                                        KM  2050
                                                                        KM  2051
                                                                        KM  2052
                                                                        KM  2053
6?0
 650
C
C
C
      CONTINUE
      CALL ^RODUK(UPOINT)

      IF(Tl-iE.LT.TPRW)  GO TO 694
      TPRIM a TPRINT * PRNTIN
      CO^r2^UE
              OUTPUT
      CALL i^*P»G(TITLE,0,IOATE)
      IFtNOPKLX. EO. 0)  GO TO 682
      00 fiFl Jsl.NDPFLX
      1= LOCDPF(J)
      SDK =- OPBATE(J) *(PPM(I,1)*«DEPOHR(J))
  68t KRITE(lO,9f<)  SPECCI),  SINK
  682
655
656
660
661
           = ITHOUR(TIME)
           (LOUT.qi)  TIME, ITIM, RAIEVfl,!), OFINITU)
      IF(NUMFLX,LE.O)  GO TO 656
      00 655 I B l.NUMFLX
      x s LOCFLXCI1
      <*OKK(1) s SPEC(K)
      AOHH(I+10) = FLX»AL(K)»TDELI(1>
      CONTINUE
      IF(NPSFLX.LE.O)  GO TO 661
      DO 660 I = l.NPSFLX
      K s LOCPSF(I)
                 a 3PEC(K)
                 • PSRATE(K,1)
      CONTINUE
      CONTINUE
      NMX a M»XO(NUMFLX,NPSFLX)
      NMV a NMX * 1
KM  2058
KM  2059
KM  2060
KM  2061
KM  2062
KM  2063
KM  2064
KM  20t>5
    2066
    2067
                                                                        KM
                                                                        KM
                                                                        KM  2068
                                                                        KM  2069
                                                                        KM
                                                                        KM
                                                                        KM
                                                                        KM
    2070
    2071
    2072
    2073
KM  2074
KM  2075
KM  2076
KM  2077
KM  2078
KM  2079
KM  2080
KM  20A1
KM  20B2
KM  2093
KM  2084
KM  2085
KM  2086
KM  2087
KM  2088
KM  2089
KM  2P90
                                      C-147

-------
668
      NHX a NMX + 2
      K = 2
      DO t>t>s i * NMV,NMX
      wORKd) s SPEC(K)
      AO&K U-MO) = FLX«AL(K)*TDEUZ(1)
      .vOR*(J + 20) a SPECCK)
      *OHK(I»30) = PSRATE(K,1)
      K » 7
      COMTIVJE
    ftRITECLOUT,93)  (WORK(I),WORK(1*10)
   1 i              ttORKCI+20), WORK(I+JO),!•
    wRITECLOUT.94)
    WRITE(LOUT,9) (SPEC(J),J»l.N08PEC)
    DO  690 K = l.NOSTAT
    ARITE(LOUT,38) ZEE(K) , (PPM(J,K),Jsl,N03PEC)
690 CONTINUE
    IF  (Tl'iOUT.NE.YES)  60 TO 691
    «R1TC(LOUT,66)  1NOEX,HUSED,NOU3ED,NSTEP,NFE,NJE
    NTSTP = NSTEP
    CALL IIMEX(NTSTP,A,B)
691 CONTINUE
    IF(SPIACH.NE.YES)  GO TO 694
    •	  URITE OUTPUT ON TAPE UUP FOR PUNCH OR FILE STORAGE
    «RITE(LUP,81) TIME
    DO  693 K=1,NOELV
    *flIT£ft.UP,81) (PPM(J,K)» J*1,NPUNCM)
693 CONTINUE
&94 CONTINUE

    IF(NCU^V.EO.O) 60 TO 700
    KT  = KT +  1
    IF(KT.GT.KTMAX) 60 TO 700
    00  695 I s l.NCo'RV
696
    IFU.NE.5)  GO TO 696
    SCALt CO FOR PLOTTIN6
    GRCUN(I.KT) = ,10«PPM(J,1)
    IF(r,RCOi4(l,KT).GT.VALMAX(I)) VALMAX ( I ) »GRCON (I, KT)
    GO TO 695
    CONTINUE
    GftCON(IfKT) s PPM(J,1)
    IF(PPMJil).6T.VALMAX(IJ) VALMAXCI) » PPM(J,1)
695 CONTINUE
    lOUT(KT) x TIME
    CONTINUE
    IFCTIMF,GE.(T3TOP-.01)) ISTOP » IE8
    IFCISTOP.EQ. IE3)  GO TO 800

    ..	.... UPDATE EMISSION FLUXES
    IFLXTN-  = IFLXTM + 1
    IF (IFLXTM.GT.NFLUX) IFLXTM » NFLUX
    CALL UPFLXKTIME,IFLXTM)
    IPS » IPS * 1
    CALL UPSORC(TIME,IPS,N03TAT,SPEC)
  700
                                                                        KM
                                                                         KM
                                                                         KM
                                                                         KM
KM  3091
KM  2092
KM  8093
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
    8095
    8096
    8097
    8098
    2099
    2100
    8101
    8102
    2103
    2104
    2105
KM  8106
    2107
    8108
    2109
KM
KM
KM
KM  2110
KM  8111
KM
KM
KM
KM
                                                                             8112
                                                                             8113
                                                                             8114
                                                                             2115
                                                                             2116
                                                                        KM   2117
                                                                        KM   8118
                                                                        KM   8119
                                                                        KM   2180
                                                                        KM   8131
                                                                        KM
                                                                        KM
    8122
    2123
KM
KM  2125
KM  8126
KM  8187
KM  2128
KM  8189
KM  8130
KM  2131
KM  2132
KM  2133
KM  2134
KM  2135
KM  2136
KM  2137
KM  2138
    2139
    2140
    2141
KM  2142
KM  2143
KM  8144
KM  2145
                                         T-148

-------
720
C
C
785
C
C
C
750
C
C
C
750
770
C
C
780
C

C
C
c
800
CONTJMJE

....... UPD*TE SKY COVER FACTOR
IF CJRATE.EQ.RNEG) GO TO 730
IFOiCLO'.'O.EU.HNEG)  GO TO 725
IF(ICLOUO.GE.NCLOUD)  GO TO 725
83* CLOUDT(ICLOUDtl)  « UPOfl
IFCUME.LT. 6B)  GO TO 725
ICLOUO * ICLOUO * 1
CLOUDY » CLOUOF(ICLOUO)
*
-------
805
C
C
C
B
9

13
ia


15

Ife
17

18
20
21
22

26

27
28

29
30
31
32
33

37
 IF(F.EQ.YES)   RETURN
 IF(INOEX.LT.O)  WRITE(LOUT,74)  TIME,  INDEX
 iF(NCu«v.EO.o) GO TO eos
 IFtKT.GT.KTMAX) KT » KTMAX
 CAl L COPUOT(KT)
 CONTINUE
 IF(NSTEP .GT. NUMSTP)  WRITE (LOUT,2t»J
 RETURN

 FORMATS

 FORMAT (1H ,5X,A4,8H FLUX * ,2X,G15.8)
 FORMAT (lHO,4x,9HHEISHT-M.,3X,A4,7(JlX,A4)/,6X,8(HX,Aa),/,
   fcX,B(llX,A4),/,faX,8(llX,A4),/,6X,a(UX,A4),/,f>X,8(llX,A4),/
                                                                   KM
                                                                   KM
                                                                   KM
                                                                   KM
                                                                   KM
                                                                   KM
                                                                   KM
                                                                   KM
                                                                   KM
                                                                   KM
                                                                   KM
                                                                   KM
                                                                   KM
                                                                   KM
 FORMAT (1HO,  /,  30X,48HCONCENTRATION PROFILES-PARTS PER MILLION KM
1        //45X,5HTIME=,E12.5,8H MINUTES//1 OX,20HliROUND OIFFUSIVITY KM
2=,G15.B,10X, 1MK,I1,3H s ,612.4,1 OX,IHK,12,3H * ,612.4)           KM
 FORMAT (1HO,10X,30HINITIAL DIFFUSION COEFFICIENTS//tOX,52HV»LUES SKM
1HO/.N A
-------
38    FOW"AT(1H ,3X,I3,2H.  ,20A4,8X,E12,4)
39    FOW-IAT C11X, AJ,5X,11HAT STATION , 13,5X, 25HNEGATIVE OR ZERO AT TIMEKM
     1 ,E10,3,5X,1BHCONCENTRATION IS  ,£10.3r5X,8HOELT IS ,E10.3)
40    FOH"AT (20A1)
41    FORMAT (20X,5F.10,«)
42    FO*MAT(1HO,10X,I5,15X,F10.2,55X»F10.2)
43    FO*MAT(|hO,50X,G15.8,10X,F10.2)
44    FO«MATUHO,10X,I5,15X,F10.2,IOX,G15.8,30X,F1Q.2)
45    FQRMA1 (1H1,IOX,57HTOO MANY INVERSION HEIGHT ENTRIES IN TABLE.
     IB ABORTED.)
46    FORMAT UHO.IOX.SOHINVERSION HEIGHT AND DIFFUSIVITY UPDATED »T TIMKM
     IE ,F10.2,5X,14HUPDATE TIME * ,F10.2,5X,9HINV HT s ,F10.8)
47    FORMAT(1HO,10X,I5,15X,F10.2,10X»G15.8)
51    FORMAT (40X,A4,6X,F10.2,I10)
52    FOrtMAU20X,5(I2,8X)/20X,5U2,BX))
53    FORMAT («ox,no,2Fio.o)
54    FO»M»T (20X.5E12.4)
55    FORMAT (20X,10F6.2)
57    FORMAT (1H1,|OX,45HTOO MANY CLOUD COVER ENTRIES  ••  JOB ABORTED)
58    FORMAT(10(/),1 OX,73HDEPLETION OF  NO  HAS CAUSED FAILURE OF CHEMICKM
     IAL MOUEL.  CASE TERMINATED. )
59    FORMAT (40X,2F10.0)
60    FOKMATUH1,/////,20X.41HJOB TERMINATED -- NEGATIVE CONCENTRATIONS KM
     1   30H OR DEPLETION OF NITRIC OXIDE       )
66    FU»5X,9HINDEX >   ,12,
     1  36H  INTEGRATION TERMINATED BY EPISODE   )
75    FORMAT C1HO,10X,33HCLEARNESS RATIO UPOATEO AT TIME *   ,FB.2,5X,
     I    20HSKY COVER FACTOR  »   , F8.4)
76    FORMAT(1H1,9X,41HJ08 ABORTED BECAUSE OF TOO MANY SPECIES  , //
     1/,9H nOSPEC s  ,I3,5X,9H  NSTOY*   ,I3,5X,5H NKs   ,JJ)
77    FORMATC1H1,5SHJDH ABORTED BECAUSE OF TOO FEW VERTICAL STATIONS
     I//, lOX.AHf.OSrAT - i 12)
79    FORMAT (07HO  TOO MANY TEMPERATURES INPUT •• JOB ABORTED       )
80    FORMAT (20A4)
81    FOR"AT (  7(6E12.4,/)J
63    FORMAT (IHO.sx.SOHPOINT SOURCE EMISSION RATES BY VERTICAL CELL
     1    10X,10H(PPM/MIN)  ,//,6X,4HTIME,2X,B(8X,A4))
84    FORMAT (1HO.F9.1,4X,8E12.3)
85    FORMAT (1H .I3X,8E12.3)
88    FO«MAT(1H ,5X,A4,«H SINK * ,2X,G15.9)
91    FORMAT(1HO,/,40X,6HTIME =,F8.2,1«H MINUTES     ( ,  14,
     1 17H UN aaOO-CLOCK)   //,40X,24HSURFACE CELL PARAMETERS
     2 40X,30HN02 PHOTODISSOCIATION RATE  B   ,F8.3,10H   (/MIN)  ,/,
     3 40X,30HDIFFUSIVITY COEFFICIENT     «   ,F8.1,13H   (M**2/MIN))
92    FOKMAT(lHO,39X,12HAReA SOURCES,2X,9H(PPM/MIN)3X,13HPOINT SOURCES
     1  2X,9H(PPM/MIN) )
93    FORMATf  IO(/,43X,A4,3H • ,E11,J,8X,A4.3H • ,E11.3))
KM
KM
MEKM
KM
KM
KM
KM
KM
KM
JOKM
KM
IMKM
KM
KM
KM
KM
KM
KM
KM
') KM
IICKM
KM
KM
IS KM
KM
KM
, KM
IF KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
,/KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
2256
Z257
2258
2259
2360
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
22«6
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2306
2309
2310
                                       r-isi

-------
94    FOH"*H1H ,//,40X,43HCONCENTRATION PROFILES IN PARTS PER MILLION
96    FOHt'ATClH ,10X,6F15.2)
97    FOR"*T(1HO,/»40X,6HTIME »,F8.2,1«H MINUTES     (
     1 17H ON 2400-CLOCK)   //,
     i/,40x,5iHiNiTi»L CONCENTRATION PROFILES IN PARTS PER MILLION/)
99    FOR»i»T(ll (//),57X,24HTHE ERT TRAJECTORY MODE!. ,/57X6(4H
     1  ,//,59X,20H(CODE DATE   4.1.78) ////63X12HOEVELOPEO BY
     1  48X.11HENVIRONMENTAL RESEARCH J TECHNOLOGY, INC.
     1  58»,22HSANTA BARBARA DIVISION   )
      END
      SUBROUTINE MATMUL (A,B,(J, N,M,L)
      DIMENSION A(n,B(n,R(t)

      IR s 0
      IK = -M
      DO 10 K=1,L
       IK s IK + M
        DO 10 J=1,N
         IR = IR » 1
         JI s J-N
         IB » IK
         H(IR) s 0.
          DO 10 I * l,M
           JI - JI+N
           Ib » IB » 1
           R(IR) * R(IR) t A(JI)»B(IB)
   10 CONTINUE
      RETURN
      END
      SUBROUTINE PEDERV(NOrY,0,NKM)

            THIS SUBROUTINE CALCULATES THE BLOCK DIAGONAL
            MATRACIES BY CALLING JACOB FOR EACH STATION
 INTEGER BCFLAG
 COMMOW/CHEMl/ NOSTAT,
1              NOSPEC,
 COMMON/CHEM2/ CONlN(40.5)i
1              RATEFF(55),
2              NVRATE,
 COMMON/CHEM3/ ZEE(5),
1              TDELZC2) ,
2              OCOFC5),
3              BCFLAGC40),
4              LOCDPF(IO),
 DIMENSION     Y(NO.l),
 DATA YES /3HYE3/
 00 20 I * l.NOSTAT
 KS
                                        NOSTM1,
                                        N3TOY,
                                        LOCVRTC2)
                                        OELZ(«),
                                        OFINITC6),
                                        FLXWAL(IO),
                                        DPRATE(IO),
                                        NOPFLX  ,
                                        Q(NKM,NKM,1)
PER MILLION

i»t

MILLION/)
(4H-"«),
D BY ,11
It























JAC08IAN



NOREAC,
NK
»ATKON(55)
ORATE,

HTCELLC6),
SCALOW(a),
FLXOGEC40)
DEPOWR(IO)
SCALUP(4)




)KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
, KM
KM
KM
KM
KM
, KM
, KM
KM
KM
KM
KM
KM
am
2312
2313
2314
2315
2316
2317
2319
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
23J7
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
235J
2352
2353
2354
2355
2356
2357
2358
2359
                                     C-152

-------
1FCSHATE ,EQ. YES) CALL RATEHI(I)
C»LL XMIT(NK,Y(KS,1), CONINU,!))
CALL UNMIXR(l)
CALL JACOB(nOil.I) , COMN(1,I), RATEFF, NK )
00 10 J=1,NK
QCJ.J.I) « Q(JrJrl) • DCOFCI)
10 CONTINUE
IFU .ME. 1) GO TO 20
IF(WUPFLX.LT.l) 60 TO 20
00 15 Ksl.NOPFLX
IP - LOCOPF(K)
IF(DEHO*R(K).LT. .99) GO TO 12
IF(OEPOwR(K).GT.l,OU 60 TO 12
0(10.10,1) s 0(10,10,1) •TDELZ(1)*OPHATE(K)
60 10 15
12 0(10,10,1) * 0(10, ID, 1) "TOELZ(1)*DPRATE(K)*DEPOWR(K)*
1 (YUO)*«{OEPOWRCK)-1.))
15 CONTINUE
20 CONTINUE
RETURN
END
SUBROUTINE PHOTODUSTART.JSTOP.NOSTAT.ZEE)

PHOTOO GENERATES THE PHOTOOISSOC IATION RATES OF 1402 AND HCHO
AS A FUNCTION Of TIME AND HEIGHT.

DIMENSION ZINPUO), HTINP(ll), ZEE(l), HTO(6), NAM(2),
1 RA(li,lO), RBC11.10)
COMMON /INPUTS/ T1TLE120), IDATE(IO), NCURV
COMMON /CHEM4/ RATK1 (100,5) , RATK8 (100, 5) , RL*T,
1 RLONG, TMZONE, 3UNTIM,
2 HIRATE, JDATE, NRATE
EQUIVALENCE (KYES.YES)

DATA ZINP /O. ,10. ,20. ,30. ,40. ,50. ,60. ,70. ,78,, 86. /
OATA HTINP /O., ISO. ,360. ,640. ,980. ,1380. ,1840. ,2350. ,2910.,
1 3530., 4210. /

RA CONTAINS SURFACE AND ELEVATED N02 CLEAR-SKY NORMAL
AEROSOL PHOTOUISSOCIATION RATES

DATA RA /. 57 9,. 6 14,. 645,. 675, .703,. 739, .752,. 772, .790, .808,. 824,
1 .57 4,. 609,. 640,, 67 1,. 7 00,. 725,, 7 48,, 768,. 7 67,. 805,. 821,
2 .560,.596,.628,.659,.688,.715,.737,.758,.777,.795,.812,
3 . 535,. 572,. 60S,. fc37,. 667,. 694,. 7 17,. 7 38,. 7 58,. 7 76,. 794,
4 . 496,. 531,. 568,. 601,. 631,. 659,. 683,, 704,, 725,, 745,. 764,
5 . 438,. 477,. 51 2,. 5«5,. 576,. 604,. 628,. 650,. 673,. 694,. 71 3,
6 . 352,, 391,. 426,. 459,. 490,. 51 7,, 501,. 564,. 583, .608,. 631,
7 .231 p. 264,. 295,. 325,. 353,. 378,. 400,. 421,. 443,. 466,. 489,
8 .114,.!33,.153,.l74,.194,.212t.229,.246,.26«,.283,.303,
9 .025,. 027,. 030,. 034,. 037,. 040,. 043,. 046,. 050,. 055,. 060/

KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
2360
2361
23b2
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2396
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
C-153

-------
 RU CONTAINS THE SURFACE HCHO KATES AMD THE PERCENTAGE CHANGE
    ABOVE THE. SURFACE RATES AS A FUNCTION OF ELEVATION.
0, 51 .R ,
3,52.2,
9, 54.0,
6,57.2,
8, 62.1,
1,69. 6,
8, 81.1,
6, 98. 6,
2, 107.,
9,77.6,
 DATA KB /2.1fl,8.00,15,8,23.7,3t .6, 38. 3, 46.
1         2.15,8.00,15.9,23.9,31.7,38.5,16.
I         2. 05, 8. 30, 16, a ,24. 6, 32. 6,39. 8 ,47,
3         1.86,8.80,17.4,26.1,34.6,42.0,50.
4         1.64 ,9. 50 ,18. 8, 28. 2, 37. 5,15.5,54.
5         1.32, 10. 2, 20, 9, 31. 3, 41. 1 , 50. 7,61,
6         .931, 12. 0,23. 8, 35. 9, 47. 9,58.5,70.
7         .507, 13. 6, 27. 4, XI 1.7, 56. 3, 69. 5, 80,
8         . 21 1, 1 3. 5, 27, 7, <»2. 8, 58. 7, 7 3. 3 ,90,
9         .040,11.6,22.7,34.1,45.6.59.5,66.
 DATA NHTI /!!/
 DATA NZINP /10/
 OATA NAM /4HN02 , 4HHCHO /
 DATA KYES /4HYES /

 SPECIFY THE RA & R8 MULTIPLIERS

 DATA KADJ5T, RBEXP /0.950, .00285X
 DATA NV /5/
 IINC = IFIX(SUNTIM)
 TIME r FLOAT(JSTART)
 NT'JSTP = (JSTOP - JSTART)*6/10/IINC » I
 JY = JDATE/10000
 IM s JOATE/100 - IY*100
 ID > JOATE - 1Y*10000 • IM«100
 IY « IY « 1900
 IUITE = NV
 N3TAT s NOSTAT
 CALL XMIT(N3TAT,ZEE,HTO)
 IFCHIWATE.ME.YES)  NSTAT • 1
 00 5 K =1,10
 H8(1,K) a RB(!,K)*RBEXP
 RA(1,K) x RAOJST*RA(1,K)
 00 5 J =2,11
       ) = Re(l,K)*(l.Q + 0.01*RB(J,K))
       ) : HADJST*RA(J,K)
 CONTINUE

 00 50 IS = l.NTMSTP
 CALL SOLAR(»LAT,RLONG,TMZONE,IY,IM,IO,TIME,D,NV)
 ZEN = 90. • 0
 IF(ZEN.LE.ZINPd))  60 TO 30
 IFCZtN'.GE.ZINP(MZINP))  GO TO 30
    FIND NEIGHBORING ZENITH ANGLE INOICIES
 00 10 I s 1,NZIHP
 IF(ZINPCI).LT.ZEN)   GO TO 10
 Zl * ZlNP(I-l)
 Z2 * ZINP(I)
 II « I - 1
 12 « I
3*58.3,
3«58.7,
3*60.8,
3*64.5,
3*70.2,
3*78.9,
3*92.5,
1*126.,
3*89. 3/
KM  2412
KM  2413
KM  2414
KM  2415
KM  2
-------
10
15
18
20
30
35
40
45
50
55
GO TO 15
CONTINUE
CONTINUE
   INTERPOLATE ON ZENITH ANGLE THEN ELEVATION
                                  RA(J,IU)
                                  RACK, ID)
                                          HTINP(J))
00 20 JJ * 1,NSTAT
P = (ZEN - Zl)/(*a - 71)
K a J + I
Rl - RACJ,I1) + P*(RACJ,12)
R2 - »A(K, II) + P*(RA(K,I2)
PH s (HTD(JJ) - HTINPCJ))/CHTINP(K)
HATKl(IS.JJ) a Rl » PM*(R3 « Rl)
Rl s R8(J,I1) * P*(R8(J.I2) • RBCJ.lin
R2 * N8(K,I1) * P*(RB(K,12) • RB(K,ID)
R4TK2US.JJ) a Rl » PH*(RZ • Rl)
IF(JJ.eu.NSTAT)   GO TO 20
00 Id KK s 1,5
IF tHTO(JJ*l) ,6T, HT1NP(J*D)  J » J + 1
CONTINUE
IF(J.LE.NHTI)  GO TO 80
J = NHTI
HTO(JJ*l) » HTINP(NHTI)
CONTINUE

GO TO 10
CONTINUE
00 3b JJ a l.NSTAT
RATKl (IS.JJ) s 5.E-03
«ATK2(I3,JJ) a l.E-05
CO-VTI.MUE
CONTINUE

   UPDATE TIME ON 2400 HR CLOCK

IHR = TIME/100
MIN = TIME • IHRMOO
MM = MIN « JINC
IFtNM.LT.60)  GO TO 05
NM = NM - 60
IHH = IHS » 1
TIME a IHRMOO + NM
CONTINUE

  WHITE PHOTOOISSOCIATION RATE ARRAYS  (IF IRITE EQUALS YES)

IFCIRITE.NE.KYES)  GO TO 80
K = 1
CONTINUE
1HR s JSTART/100
MIN 3 JSTART - iHR»iOO
TIME a FLOATC IHR*60 * MIN )
CALL NEWPAGCTITLE.O, IOATE)
»(RlTEl6,ieO)  NAM(K) ,  (HTO (I) , I«l ,NSTAT)
KM  2467
KM  2469
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
                                                                      KM
    <>469
    2470
    2471
    2472
    2473
    2474
    2475
    2476
    2477
    2478
    2479
KM  3480
KM  2481
KM
KM
KM
KM
KM
KM  2487
KM  2488
KM
KM
KM
KM  2492
KM  2493
KM  2494
KM  2495
KM
KM
KM
                                                                          2482
                                                                          2483
                                                                          2484
                                                                          2485
                                                                          2486
    2489
    2490
    2491
                                                                          2502
                                                                          2503
                                                                          2504
                                                                          2505
                                                                          2506
                                                                          2507
    2496
    2497
    2498
    2499
KM  2500
KM  2501
KM
KM
KM
KM
KM
KM
KM  2508
KM  2509
KM  2510
KM  251»
KM
KM
KM
KM
KM
KM
KM
KM
KM
                                                                  KM
    2512
    2513
    2514
    2515
    2516
    2517
    2518
    2519
    2520
    2521
                                    C-1.55

-------













c





c
c
c
c



c
c



c
c
c
c
c
c




c



00 70 J s 1,NTMSTP
IF{MOD(J,50) ,NE. 0) GO TO 60
C»LL NE«PAGCTITUE,0,IDATE)
wRnE(6,120) N»M(K) , (HTDU),Isl,NSTAT)
60 CONTINUE
IF(K.EO.l) «RITEC6,130) TIME, (R»TK1(J,I),I«1,N3TAT)
IFU.EQ.2) WRITE(6,130) TIME, CRATK2( J, I) • I«t ,NSTAT)
T1'*E = TIME » 3UNTIM
70 CONTINUE
K = K + 1
IFCK.LE.2) GO TO 55
80 NRATE s NTMSTP
RETURN

UO FORMAT (1HO,A4,1X,24HPHOTODIS30CIATION RATES ,20X, IOHELEVATIONS,
1 //,(.», «HTIME,10X,5(F10.1,2H M) ,/)
130 FORMAT (1H ,4X,F5.0, 10X.5F12.5)
END
SUBROUTINE PROOUK(UPOINT)

«PROOUK* CAN BE MODIFIED TO CALCULATE
APPROXIMATE PRODUCT SPECIES CONCENTRATIONS

COMMON/CHEM1/ N03TAT,NOSTM1,NOREAC,NOSPEC,NSTDY,NK
COMMON/CHEM2/ COVIN(40,5),WTMOLE{40),RATKONC55),RATEFF(55),
1 RATEV(2,5),QRATE,NVI»ATE,LOCVRTC2)
_____ r IIDQFMTI v *DonniiK * T • A DUMMY 4iittomiTTMF •••«
mm * • * UUHKtPIILT "rHUyuR™ 13 * UUW™T 9UDKUUIillC ww»»
RETURN
END
SUBROUTINE P3ET ( Y, NO,CONf MI TER, IER)
THIS VERSION OF P3ET 13 DESIGNED FOR A BLOCK TRI'DIACONAL
SYSTEM OF ODE*S AND IS ONLY TO BE USfcD WITH MITER a 1.
MODIFICATIONS BY F,W, LURMANN (7,8.77).
PSET IS CALLED BY TSTEP TO COMPUTE AND TO PROCESS THE MATRIX
P = T - (H/EL(2))*J, WHERE J IS AN APPROXIMATION TO THE
JACOBIAN. J IS COMPUTED BY THE USER SUPPLIED SUBROUTINE PEOERV.
iNiEuEH IEH, MITER, NO
INTEGER IPIV, JSTART, KFLAG, MF, N, NSQ
INTEGER i, IER, j, ji> N
DIMENSION Y(NO.J)

COMMON /EPCOMl/ T, H,HMIN,HMAX, EPS, 93, UROUND,N,MF, KFLAG, JSTART
COMMON /EPCOMZ/ YHAX(l)
COMMON /EPCOMA/ SAVEK1)
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
I\R
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
2522
8523
2524
2525
2526
2527
2528
2529
2530
2531
2532
3533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
>CAQ
C J1* T
2550
2551
2552
2553
>cen
C 3 J *•
2555
2556
2557
3CC;a
C J JO
2559
2560
2561
3C1. 3
C JOC
2563
2564
2565
2566
2567
2568
2569
2570
n-156

-------


















CYff
If
c



5
C







6
C



7
COMMON/ /EPCOM5/ SAVE2U)
COMMpis /EPCQM6/ P"<(1)
CO"Mim /EPCOM7/ IPIV(I)
COMMON /EPCOM8/ EPSJ.NSO
COMMO., /EPCM12/ PWLU600), WORKR(SO), OUPPER(«)r OLOWER(i = NK*UK*NOSTAT
DO 5 I51.NK2N
P«(I) s PW(I)*CON
CONTINUE
ADD IDENTITY MATRIX TO Q MATRICES
NKP1 s NK + 1
NK? = NK*NK
DO 6 I31,NOSTAT
K : ( I-I ) *NK2 + 1
00 f> J*l ,NK
Pn«O s P*(K) + ONE
K = < + NKP1
CONTIMUE
SCALE UPPEK AND LOWER OFF.QIAGONAL VECTORS BY CON
DO 7 K=1,NOSTM1
DUPPE*(K) s SCALUPCK)*CON
OLOrttRfK) s SCALOW(K)*CON
CONTJMUE
KM 2571
KM 2572
KM 2573
KM 2b74
KM 2575
KM 2576
KM 2577
KM 2578
KM 2579
KM 2580
KM 2581
KM 2582
KM 2583
KM 2581
KM 2585
KM 2586
KM 2587
KM 2588
KM 2589
M3CQ ft
C J™ U
KM 2591
KM 2593
KM 2593
KM 2594
KM 2595
KM 2596
KM 2597
KM 2598
KM 2599
KM 2600
KM 2601
KM 2602
KN 2603
KM 2604
KM 2605
KM 2606
KM 2607
KM 2608
KM 2609
KM 2610
CALL BLKD£C(PW,NK,NOSTAT,IPIV»DLOKER,DUPPEH,PWL.WORKR,NOGO»8CFLAG)KM 2611
C
C


9
20
21


22

\0n TL AND 0 CONTAIN THE LOWER AND UPPER COMPOSITION OF 0
AW JPIV CONTAINS THE PIVOTING INFORMATION FOR BLKSOL
IE n = NOGO
i^ETU^N
CONTINUE
««ITfc(6,21)
FORMAT (1H0.90H THIS VERSION OF P3ET 19 RESTRICTED TO MITER • 1
1 -•- JOB ABORTED )
STOP
RETURN
END
KM 2612
KM 2613
KM 2614
KM 2615
KM 2616
KM 2617
KM 2618
KM 2619
KM 2620
KM 2621
•KM 2&d9
•HW COCK
KM 2623
C-157

-------
 SUBROUTINE  RATEHI(K)
          THIS  SUBROUTINE  TRANSFERS THE VARIABLE RATE
          CONSTANTS AT  HIRHtR  ELEVATIONS  IN  THE ARRAY
          RATF.V TO RATKON  AND  RATEFF
          PHOTODISSOCIATION  RATES WHICH ARE PRPORTIONAL
          TO RAT£V(1,N) OR  RATEV(a,N)ARE ASSIGNED
          HOMO  AND RCHO PHOTOLYSIS RATES ARE ASSUMED
          PROPORTIONAL  TO  N02  AND HCHO.
          THIS  ROUTINE  IS  SPECFIC TO THE ERT
          30 SPECIE X  51 REACTION MECHANISM «.1.78
 COMKDN/CHEM2/ CONIN(40,5),
1              RAT£FF(55),
2              NVRATE,
 11 = LOCVRTtl)
 RATKOMIl) a RATEVC 1,K)
 RATEFF (II)
 RATKUNC 6)
 RATtFF( 6)
 IF (NVRATE. LT.
 12 = LOCVRT(a)
 RATKnN(I2)  a RATEV(8,K)
 RATEFF(ia)  a  RATKONCI2)
 ALDEHYDE PHOTOLYSIS CORRECTION
 HATKON(34) « RATKON(12)/S.O
 RATEFF(Sa) s RATKON(Sa)
                                   WTMOLE(AO),
                                   RATEVU.5),
                                   LOCVRU2)
              RATKONU1)
              ,280*RATKON(I1)
              RATKONt  6)
               2)   RETURN
 EN0



 SUBROUTINE  RATESCY,YDOT)

      CALCULATION OF CHEMICAL RATES
 INTEGER BCFLAG
 COMMON/CHEM1/ NOSTAT,
1              NOSPfcC,
              RATEFF(SS),
:              NVRATE,
COMM<)i»/CHEM3/ ZEE (5),
              TDELZC2)  ,
              DCOF(5),
              BCFLAG(40),
I              LOCOPF(IO),
DIMENSION  Y(l),  YUOT(l)   ,
EQUIVALENCE  (R,RATEFF)
DATA   YES  /3HYES/
NKP1  = NK  »  1
DO  130 K a 1,NOSTAT

DO  90  1=1,NK
cm  = Ycms)
                                   NOSTMi,
                                   NSTOY,
                                   WTMOLt(«0)»
                                   RATEV(2,5),
                                   LOCVRTC2)
                                   UELZ(a),
                                   DFINIT(6)»
                                   FLXWAL(
-------
90



100
tos
c


c
c
c
c
c









































CONTINUE KM
IF(NSTDr.EO.O) 60 TO 105 KM
oo 100 ISNKPJ.NOSPEC KM
C(I) a CUNISU.K) KM
CONTINUE KM
CONTINUE KM
KM
IFCORATE.trj.YES) CALL R*TEHI(K) KM
CALL UNMIXWCK) KM
KM
EXPLICIT CHEMICAL RATE EQUATIONS FOR KM
KM
ERT PHOTOCHEMICAL MECHANISM C4.1.T8) C30 SPECIES X 5J REACTIONS) KM
KM
RATE( 1) s * RC J)*C( a) • RC J)*C( i)*C( 3) - RC 4)*CC 1)KM
* *C( 2)»C( 30) * R( 5)*CC 4)** 2 + R( 6)«CC 4) • R( 7) KM
* *C( 1)*C( 24) « R( 10)*C( 1)*C( 11) • R( 14)*CC 1)*C( 10) KM
» «•»( 19)«CC 1)*C( 17) - R( 25)*CC 1)*C( 19) • R( 27)*CC 1)KM
* *CC IS) • R( 28)«CC 1)*CC 18) - R( 30)*C( 1)»C( 15) « R( 35)KM
* »CC 1)»C( 16) - R( 43)*CC 1)*CC 14) - R( 45)»CC 1)»C( 21) KM
RATE( 2) = • »C 1)*C( 2) » R( 3)*CC 1)*C( 3) • RC 4)*CC 1)KM
* *C( 2)*C( 30) + RC 5)*C( 4)0* 2 • R( 8)*C( 2)*C( 24) * KM
• KC 10)«C( 1)*C( 11) • R( 11)«CC 2)«CC 11) • R( 13)*CC 2) KM
* »c( 3) » a.oo«RC u)*c( n*c( io> « RC is)*cc 2)*cc 10) + KM
* R( I7)«CC 27) + R( 19)»CC 1)*CC 17) t RC 21)*CC 20) « RC 83) KM
• *Cf 2)*CC 19) * RC 25)*CC 1)*CC 19) » RC 27)*CC 1)*CC 18) KM
* » K( 30)«C( 1)*C( IS) - RC 32)*C( 2)*CC 26) - RC 36)*CC 2)KM
* «C( 16) « RC 3/)*CC 12) t R( 43)«CC 1)*CC 14) » R( «5)*CC 1)KM
* *C{ 21) KM
RATEC 3) » » »C S)»CC 2S) • RC 3)*CC 1)*C( 3) • RC 13)»C( 2)KM
• *C( 3) • RC 22)*CC 3)*CC 8) KM
RATEC «) » * 2.00*R( 4)*CC 1)»CC 2)*CC 30) • 2,00«RC S) KM
• «C( 4)** 2 • R( 6)»CC 4) + RC 7)*CC 1)*C( 24) + KM
* 0.15»«( 32)*CC 2)*C( 26) KM
BATEC 5) » . S( <»*C( 5)*CC 24) + RC 34)«CC 7) * RC 38)*C( 6)KM
• + *C 39)*CC 6)*CC 24) KM
RATE( 6) = + R( 20)«C( 23) » 0.50*R( 22)*CC 3)*CC 6) * KM
• 0.5U*RC 23)*CC 2)*CC 19) » O.SO*RC 25)»CC 1)»CC 19) * KM
* 0.50«H( ?9)*C( 26) - RC 38)*CC 6) - Rt 39)*CC 6)*CC 24) KM
RATE( 7) s * RC 20)*CC 23) t 0.50*RC 22)*CC 3)«CC 8) * KM
* O.So*R( 23)»CC 2)*CC 19) t 0.30*R( 24)*C( 8)»CC 25) * KM
* O.SO»R( 2S)*CC 1)*CC 19) » 0.50*RC 29)*C( 26} + KM
* 0.50*RC 31)*CC 26) » 0.15*RC 32)*CC 2)*CC 26) - »C 33) KM
* *C( 7)*CC 24) ~ RC 34)*C( 7) * RC 43)*C( 1)*CC 14) » RC 49)KM
* »Ct 19)*CC 2fl) KM
RATE( 8) = . R( 18)*CC 8)«CC 24) • RC 22)*CC 3)*CC «) - RC 24)KM
* «CC 8)*C( 25) KM
RATEC 9) a - R( 26}*CC 9)*C( 24) KM
RATEC 10) = + RC 13)»CC 2)«CC 3) • RC 14)*CC 1)*CC 10) - RC 15)KM
* *CC 2)*CC 10) + RC 17)*CC 27) * RC 83)*C( 2)*CC 19) KM
RATEC 11) - » RC 9)*CC 5)*CC 24) - R( 10)*CC 1)«C( 11) - RC 11)KM
* *C( 2)*CC 11) - 2.00*RC U)«C( 11)** 2 t RC 20)*C( 23) + KM
* RC 21)*CC 20) » 0.25*RC 22)»CC 3)*C( 8) * 0.40*RC 24) KM
* «CC 8)*CC 25) » RC 31)*CC 26) + R( 34)*CC 7) » 0.67*RC S8) KM
* *C( 6) + RC 39)*CC 6)*C( 24) • RC 40)*CC 11)*C( IS) t RC 41)KM
2676
2677
2678
2679
2680
2661
2662
26H3
2684
268<>
2686
2687
2688
2669
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2703
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
C-159

-------
»2o
c
130
          «C(  H)*C(  24)  »  HC  45)*CC
                = * R(  36)*CC   2)*C(
      KATEC  H)  s . R{  41)»CC  13)*C(
      RATtC  la)  a * (J(  42)*C(  22)*CC
      RATE(  15)  = +   0.40*KC  24)*CC
     *    *CC  18) + B(  29)»C(  26)  -
     *     + R(  3"5)»CC
     •    *C(  28)
      RATEC  16)  = +   0.25*RC  22)*C(
     •    RC 35)«CC   1)*C(  16) -  «(
      HATEC  17)  = » «(  18)*C<   8)*C(
     *    *CC  17)*C{  28)
      HATEC  18)  a » R(  26)*C(   9)«CC
     •    »C(   1)*C(  18)
      R»TE(  19)  3 »   0.50*R(  22)*C(
     •    «( 25)*C(   1)*C(  19) -  «(
 1)*C( 21)  • RC 48)*CC  ll)*Cl  28)
16)  • R( 37)*C( 12)
24)  - RC 44)»CC 13)*CC  24)
24)  • RC 43)*CC  1)*CC  1«)
          +  0.15*R(  27)*CC  1)
          1)*CC 15)
                                8)*CC
                               R(  30)*C(
                                               KM
                                               KM
                                               KM
                                               KM
                                               KM
                                              7)KM
1)*C(  16)  -  RC  40)*C(  11)*CC  15)  •  RC  SO)*CC  1S)KM
                                               KM
             3)*C(   8)  *  RC  33)*CC   7)*CC  24)  • KM
            36)*CC   2)*C(  16)  + RC  37)*CC  12)   KM
             24)  -  RC  19)»CC   1)*CC  17)  •  RC  51)KM
                                               KM
             24)  «  R(  27)*C(   1)*CC  18)  •  R(  28)KM
                                               KM
             3)*CC   8)  -  RC  23)*C(   2)*C(  t9)  • KM
            49)*C(  J9)*C(  28)
             11)  -  RC  21)*C(  20)
                   RC  45)*C(   1)«CC  21)
                      42)*C(  22)*C(  24)
                                     24)
                                     24)
 RATEC 20)  = * RC  11)«CC   2)*C(
 RATEC 21)  s + RC  44)*CC  13)*CC
 RATEC 2?)  = + RC  «t)*CC  13)*C(
 RATEC 2J)  a * R(  19)*CC   1)*CC  17)  -  RC  20)*CC  23) »  RC 51)«C(
*    *CC 28)
 RATEC 24)  s
     *CC 24)
RC
RC
                        6)«CC
          *CC  fl)*CC
                          4)
                          5)*CC
                       0.50*RC
     «CC 24)  - RC  33)*CC   7)*C(
     *CC 13)*CC 24)  - R(  42)*CC
      - RC 47)*C{  24)»CC  28)  »
 RATE( 25) =  + RC   1 ) *C (   2)  -
*     - H( 46)»CC  25)*C(  28)
 RATEC 26) a  t  0.85«RC 27)*CC
*    «CC  1)*C( IS)  - RC  31)*CC
»    »R{ 50)»C( 25)*Cf 28)
 RATEt 27) =  * R(  15)«CC   2)*C(
*    *CC 27)
 RATEC 2fl) a  - RC  46)«CC  25)*C{
*    *CC 11)*C( 28)  - RC  49)*C(
*     - »( 51)*CC  17)*CC  28)
 RATEC 29) a  t R(  46)«CC  25)*C(
*    *CC ll)«CC 28)  + RC  «9)*C(
*     » R( 51)»CC  17)*C(  28)
 RATEC 30) «  • R(   4)*C(   J)*C(
*    RC 16)»C( 27)»CC 30)  *  RC
*    *CC 24)  » H(  39)*C(

 00 120 J * 1,NK
 YOOTCJ*KS) = RATECJ)
 CONTINUE

 CONTINUE
 RETURN
 END
          1)*C{ 24)  . RC  8)*CC
   KM
   KM
   KM
   KM
17)KM
   KM
 2)KM
                                                      1)»C(  11)  - R(  18)KM
            RC   7)*CC
             24)  » RC  10)«C(
            22)*CC  3)»C(   8)  -  RC  26)»C(   9)   KM
             24)  - RC  39)*CC   6)*C( 2«)  .  RC 41)KM
             22)*CC 24)  -  R(  44)»C( 13)«C( 24)  KM
            RC  48)*CC  11)»C(  28)                KM
            RC   2)*C(  25)  - RC 24)*CC   8)*C( 25}KM
                                               KM
             1)»CC 18)  • RC 29)*CC  26)  » R( 30) KM
             26)  - RC  32)*C(   2)*C( 26)         KM
                                               KM
             10)  - RC  16)*C(  27)*CC 30)  -  RC 17)KM
                                               KM
             28)  • RC  47)*C(  24)*C( 28)  •  RC 48)KM
             19)«C( 28)  -  RC  SO)*C( 15)*Cf 28}  KM
                                               KM
             28)  » RC  47)*C(  24)*C( 28)  +  RC 48)KM
                                     19)*CC  28)  +  RC  SO)*C(  1S)*C(  28)

                                      2)*CC  30)  •»  RC   S)*C(   «)•* 2 -
                                    26)*C(   9)*C(  24)  *  R{ 33)*C(   7)
                               6)*C( 24)  *  RC  44)»C(  13)«CC  24)
                                   KM
                                   KM
                                   KM
                                   KM
                                   KM
                                   KM
                                   KM
                                   KM
                                   KM
                                   KM
                                   KM
                                   KM
                                   KM
2731
2H2
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750

-------
      SUBROUTINE 3CALE(Y1,Y2»YB,YT)                                     KM  2782
C                                                                      KM  2783
C         ESTABLISH MINIMUM AND MAXIMUM VALUES  FOR  PRINTER-PLOT  Y  AXISKM  3764
C                                                                      KM  2765
      DIMENSION YCa)                                                   KM  3786
      0*T» ONE,TEN/1.,10,/                                              KM  3787
C                                                                      KM  2768
      HOT s Yl                                                         KM  27«9
      TOP a Y2                                                         KM  2790
      IFCYI.LT.Y2)  60 TO 10                                            KM  3791
      TOP s Yl                                                         KM  2793
      BOT = Y3                                                         KM  2793
   10 CONTINUE                                                         KM  2794
      LA a 0                                                           KM  2795
      Y(l) = TOP                                                       KM  2796
      Y(2) s BOT                                                       KM  2797
      I a TOP                                                          KM  2796
      00 50 Isl,2                                                      KM  2799
      IFCZ.EQ.O.) 60 TO 45                                              KM  2«00
      SN = SIGNfONE.Z)                                                 KM  2601
      A s ABSCZ)                                                       KM  2602
      LA a 1FIX(ALOGIO(A))                                              KM  2803
      IF{SN.LT.O.)  60 TO 30                                            KM  2804
   20 00 25 N=2,10                                                      KM  3805
      XN 5 FLOAT(M)                                                    KM  2606
      YT 3 SN*XN«TEN*«LA                                               KM  2807
      IF(Z.LT.YT) 60 TO 40                                              KM  2808
   25 CONTIMIE                                                         KM  2809
      60 TO 00                                                         KM  2810
   30 00 35 Nal,9                                                      KM  2811
      XN s TE* • FLOAT(N)                                              KM  2812
      YT a SN*XN*TEN**LA                                               KM  2813
      IF(Z.LT.YT) 60 TO 40                                              KM  2814
   35 CONTINUE                                                         KM  2815
   40 Y(I) * YT                                                        KM  2816
   45 IFd.EQ.2) 60 TO SO                                              KM  2817
      Z ' BOT                                                          KM  2616
   50 CONTINUE                                                         KM  2819
      YT = Yd)                                                        KM  2630
      YB a Y(2) • TEN»*LA                                              KM  2821
C                                                                      KM  2822
      RETURN                                                           KM  2623
      END                                                              KM  2824
      SUBROUTINE SKEDUL(X,T,NX,NlNT,UPOELT,INTIM,TSTOP,DELTIN,lrAIL»INTP)KM  2825
C                                                                       KM  2636
C     SUBROUTINE SKEOUL CALCULATES MEAN VALUES FOR A REGULAR  UPDATE     KM  2827
C     SCHEDULE  FROM AN IRREGULAR SCHEDULE OR DIFFERENT  INTERVAL  SCHEOULKM  2838
C                                                                       KM  2829
C     X IS AN INPUT STEP FUNCTION WITH ARB1TARY UPDATE INTERVALS         KM  2830
C     X IS RETURNED AS A STEP FUNCTION WITH A FIXED UPDATE INTERVAL     KM  2831
C     T IS THE TIME SCHEDULE ASSOCIATED WITH X ON INPUT                  KM  2832
c       IF T is AVAILABLE SET DELTIN EQUAL TO A NEGATIVE NUMBER         KM
                                      C-161

-------
C       IT MUST tit MONOTONICALLY INCREASING
C    NX IS THE NUfBEK OF X V»LUES INPUT
C  NI-JT IS THE NUMBER OF UPDATE INTERVALS OF THE RETURNED FUNCTION X
C UPOELT IS THE DESIRED UPDATE INTERVAL INPUT
C INTIM IS THF INITIAL TIME TO START UPDATING
c TSTOP is THE FINAL TIME
C DELTIN IS A FIXED UPDATE INTERVAL OF X INPUT  CDELTIN ,NE. UPOELT
         IS USED WHEN T IS NOT AVAILABLE
   FAIL IS RETURN AS 'YES' IF T IS NOT MONOTONICALLY  INCREASING
   IMTP is A FLAG POSITIVE FOR INTERPOLATION, NEGATIVE FOR STEP-WISE
              INTEGRATION
  10
  15
  50
  60
  70
                            XOC200), TOC200)
REAL INTIM
DIMENSION X(l), TCI),
DATA  YES  /JHYES/
DATA  HUES  /2HNO/
FAIL = »NEG
IFCINTP.GT.O)   GO TO 330
INITIALIZE T IF NOT INPUT
IFCDtLTlN.LT.0.0)  GO TO 10
TCI) = INTIM
DO % 132,NX
TCI) » TCI-1) * DELTIN
CONTINUE
INITIALIZE TIME OUT SCHEDULE
     = CT3TOP+ .01 -INTIM)/UPDELT + 1
      = INTIM
      M M T + 1
      sINTIM + UPOELT/2.
00 15 1=3,NPl
TO(I) = TOCI-1) » UPDELT
CONTINUE
CHECK FDR FIRST T
IFCTC1) ,GE. TOCI))
DO 50 J=2,NX
IFCT(J) .LT.
KL - J-l
GO TO 70
CONTINUE
K r «,x ,\
GO TO 320
      TOCi)
      NPl =
      T0(?)
  80
                           GO TO 60
                   TO(J)J  60 TO 50
T(KL) = TOCI)
TCNX+1) a TOCNP1) + .01
IF(IMTP.GT.O)  GO TO 330
3 = 0.0
FORWARD INTEGRATION LOOP TO DETERMINE MEAN VALUES OF NEW  INTERVAL**
00 300 t=l,NINT
JFCI.EC.1)  GO TO 80
IF(T(KL).GE.TO(I + D)  GO TO 280
IFCKL.GT.l)  3BXCKL-U*CTCKD- TOCI))
oo 200 K=KL,NX
IF(TCK+1).LT.T(K))  GO TO 320
IFCTCK + 1).GE.TOU + 1))  GO TO 160
S = S » XCK)«(TCK»1)»TCK))

KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
.KM
KM
KM
KM
KM
KM
KM
KM
KM
•
2634
2835
2836
2637
2838
2839
2840
2841
2642
2843
2844
2845
2846
2847
2848
2649
2650
2851
2852
2853
2854
2855
2856
2857
285B
2859
2860
2861
2862
2863
2664
2865
2866
2867
2868
2869
2670
2871
SS7S
2873
2874
2875
2876
2877
3878
2879
2680
2881
2862
2663
2864
2685
2666
2687
2888
                                       C-162

-------
      GO TO 200
  160 S s S » X(K)»(TO(I+1)»T(K))
      GO TO 250
  200 CONTINUE

  250 XO(I) s S/UPDELT
      KL = K * J
      60 TO 300
  280 XO(I) * *(K)
  300 CONTINUE

      C»LL XMIT(NINT,XO.X)
      RETIJPN
                           INTIM + SMALL)/UPOELT)  »  1
340
130 CONTINUE
    SMALL = l.E-3
    TOtn » INTIM
    HINT = IFIXUTSTOP
    NP1  s MINT * I
    KL « I
    KLP  = 2
    00 340 I a 2,NP1
    T0(l) = TO(IM)  »  UPOELT
    CONTINUE
    XlNX+1) s X(NX)
    oo 150 i a I,NINT
    THX  s T(KLP) •  SMALL
    IFUU(I).GT.TMX)   KL " KL
    KLP  = KL + 1
    SLOPE = (XCKLP)-X(KL)) /  (T(KLP)-T (KL) )
    XO(I) a X(KL) *  SLOPE*(TO(I)-T(KL))
350 CONTINUE
    CALL XM1T(NINT,XO,X)
    RETURN
                                * 1
  3?0 *RITE(6.I)
  t   FORMAT(1H|,3«HRE3CHEOULING  FAILED  AT  TIME  EQUAL
      FAIL a YES
      RETURN
      END
                                                     .F6.2)
KM  28H9
KM  2690
KM  2691
KM  2992
KM  £893
KM  2890
KM  2895
KM  2S96
KM  2647
KM  2A98
KM  2899
KM  2900
KM  2901
KM  2902
KM  2903
KM  2904
                                                                       KM
                                                                       KM
    2905
    2906
KM  290T
KM  2908
KM  2909
KM  2910
    2911
    2912
    2913
KM
KM
KM
KM  2914
KM
KM
KM
    2915
    2916
    2917
KM  2918
    2919
    2920
KM
KM
KM  2921
KM  2922
KM
KM
KM
KM
KM
KM
    2923
    2984
    2925
    2926
    2927
    2928

C
C
C
C
C
C
C
C
C
C
SUBROUTINE SOL (N, NOIM, A, 8, IP)
SOLUTION OF LINEAR SYSTEM, A*X a a .
INPUT..
N a OBDER OF MATRIX.
NOIM s DECLARED DIMENSION OF ARRAY A .
A s TRIANGOLAR1ZEO MATRIX OBTAINED FROM DEC.
8 * RIGHT HAND SIDE VECTOR.
IP a PIVOT VECTOR OBTAINED FROM DEC.
00 NOT USE IF DEC HAS SET IER .NE. 0.
OUTPUT,.
B a SOLUTION VECTOR, X .
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
2929
;»QTft
C" 3 V
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
                                        C-163

-------



c









10
20






30
40
50



C








INTERtfi IP, N, NDIM
INTEGER I, K, KB, KMl, Kfl, M, NM1
DIMENSION A(NDIM, N), B(N), IP(N)

IF (N .EQ. 1) 60 TO 90
NM1 s N • 1 o
DO 20 K a I.NM1
KPI s K + 1
M = IP(K)
T = B(M)
B(M) a 8(K)
B(K) a T
DO 10 I s KP1.N
8(1) = B(I) «• A(I,K)*T
CONTINUE
DO 40 KB * 1,NM1
KMl = N • KB
K a KM) 4 ]
BOO a B(K)/A(K,K)
T s -B(K)
00 30 I a 1,KM1
R(I) s B(I) t A(I,K)«T
CONTINUE
8(1) s B(1)/A(1,1)
RETURN
END
SUBROUTINE SOt282(A,B) •
THIS SUHHOUTINE SOLVES A SYSTEM OF Z LINEAR EQUATIONS
DIMENSION M3, 2), 8(2), X(2)
OET = A(1,U»A(2,2) - A(l,2)**(2,l)
X(l) a ( A(2,2)*B(1) - A(1,2)*B(2) )/DET
X(8) a (-A(2,1)*B(1) * A(l,l)»8(2) )/OET
B(t) s X(l)
8(2) s X(2)
RETURN
END
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
etui
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
pat 7
C TO f
2966
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
SUBROUTINE STEADY (Y,N)

    H20 IS TREATED AT  A  CONSTANT USING NSTDY * 1
    THERE ARE NO STEADY  STATE  APPROXIMATIONS INCLUDED
    IN THIS VERSION OF STEADY.

RETURN
END
KM  2979
KM  2980
KM  29B1
KM  2962
KM  2983
KM  2984
KM  2965
KM  2986
                             C-164

-------

c
c
c





c


c




I






c
c
c
c
c
c






tl

c







SUBROUTINE TEMPR(IT,TIME,T)

0£TE«'UNE3 TEMPERATURE DEPENDENT REACTION RATES

DI*iF\3lON T(tl
COrnnN/CHEMa/ CONIN(«0,5), WTMOLEC40), R*TKON{55)»
1 RATEFFC55), RATEV(2,5), ORATE,
8 NtfRATE, LOCVRTC2)
RI s 1.9S6»T(IT)
MNfia DISSOCIATION RATE
RATKfm(21) » 7. DEIS « EXP(»20TOO./I»T)
RATEFK21) > RAfKON(2l)
PAN DISSOCIATION RATE .
RATKON(37) » 1,17617 * EXPC-26910./RT) (
RATEFF(37) « RATKON(37)
WHITEUO.t) TIME, T(IT), RATKON(Zl), RATKON(37) ,
REW
Pd«M»T(lH010X,40HTEMPE»ATUR£ DEPENDENT RATES' TIME * , '
I ,F*.a,5X,6HTEMP a,F8.?,5X,7HRATES • ,2Et3.3)
END
SUBROUTINE TIMEX
RETUWN
END
SUBROUTINE TSTEP (V, NO)

THIS VERSION Of TSTEP SOLVES A BLOCK TRI-DIAGONAL SYSTEM OF ODE*S
ANO IS UNSIGNED FOR MF a 21 ONir
MODIFICATIONS 8V F.W. LUHMANN (7.8,77),
TSTEP PERFORM3 ONE STEP OF THE INTEGRATION OF AN INITIAL VALUE
PROBLEM Fllrf * SVSTEM OF ORDINARY DIFFERENTIAL EQUATIONS.
INTEGER NO
INTEGER IPIV, JSTART, KFLAG, L, (.MAX, METH, MF, N, NFE, NJE.
1 NO, NQINDX, NOUSED, NSTEP
INTEGkR I, I8ACK, I£R, IREDO, J, Jl, Ji, M, MFOLO, MIO,
t MITER, M1TER1, NEt»J, NSTEPJ
INTEGER ISTEPJ, HfC, KFH, MAXCOR
'it
DIMENSION Y(NO, 6)

COMMON /EPCOM1/ T, H,HMIN,HMAX, EPS, S3, UROUND,N,MF, KFLAG, JSTART
COMMON /EPCOM3X YMAX(l)
COMMON /EPCOM3/ ERROR(I)
COMMON /EPCOMfl/ SAVEl(l)
COMMON /EPCOMS/ SAVE2(1)
COMMON /EPCOM6/ Prt(l)
COMMON /EPCOM7/ IPIV(l)
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
2987
8986
a
-------














c

c











c
c
c
c
c
c
c
c

















COMMON /6PCOM9/ HUSEO, MOUSED, NSTEP.NFE.NJt
COMMON /EPCM10/ TAU(13),ELC13),TQ(5),LMAX,K;:TH,NIJ,l.,NQINOX
COMMON /EPCK12/ P*L(3600)f WOBKR(JO), DUPPl '*(«)» OLOWER(4)
INTEGER 8CFLAG
COMMO'VCHEMl/ NOSTAT, NOSTM1, NOREAC»
1 NOSPEC, N3TDY, NK
COMMON/CHEM2/ CONIN(40,5), WTMOLE(40), RATKON(5S),
1 RATEFFC55), RATEV(2,5), ORATE,
2 NVRATE, LOCVRTC2)
COMMON/CHEM3/ ZEE(S), OELZC4), HTCELL(6),
1 TDfcLZC2) , DFINIH6), SCAUO«(«),
2 OCOF(S), FLXWAL(40), FLXOGE(40),
3 8CFLAGC40), DPHATE(IO), DEPOMR(IO),
4 UOCDPF(IO), NOPFLX , 3CALUPC4)

DATA ISTEPJ /20/, KFC /-3/, KFH /"7/, MAXCOR /3/
(6
DATA AODON /l.OE-6/, BIA31 /S.5E1/, BIAS2 /a.SEl/,
1 BIAS3 /I.OE2/, CROOWN /0.1EO/, OELRC /0.3EO/,
2 ETACF /0.25EO/, ETAMIN /0.1EO/, ETAMXF /0.2EOX,
3 ETAMX1 /1.0E4/, ETAMX2 /l.OEl/i ETAMX3 /1.5EO/,
4 ONEPSM /I.OOOOIEO/, SHORT /o.iEO/, THRESH /I.SEO/
DATA ONE /l.OEO/, PT5 /0.5EO/, ZERO /O.OEO/
KFLAG s 0
TOLD = T
FLOTN a FLOATCN)
IF (JSTART .6T. 0) GO TO 200
IF (JSTART ,NE. 0) GO TO ISO
ON THE FIRST CALL, THE ORDER 13 SET TO t AND THE INITIAL
DERIVATIVES ARE CALCULATED, ETAMAX 13 THE MAXIMUM RATIO 8Y
WHICH H CAN BE INCREASED IN A SINGLE STEP. IT IS l.EOU FOR THE
FIRST STtP TO COMPENSATE FOR THE SMALL INITIAL H, THEN 10 FOR
THE NEXT 10 STEPS, AND THEN 1.5 THEREAFTER. IF A FAILURE
OCCURS (IN CORRECTOR CONVERGENCE OR ERROR TEST), ETAMAX IS SET AT 1
FOR THF. NEXT INCREASE. ETAMIN * .1 IS THE MINIMUM RATIO BY WHICH
H CAN BE REDUCED ON ANY RETRY OF A STEP.
CALL OIFFUN (N, T, Y, SAVED
DO 110 I - 1,N
110 Y(I, 2) s H*SAVE1(I)
METH s MF/tO
MITER - MF - 10»METH
MITER] - MITER + 1
MFOLU = MF
NO 3 t
L 3 2
TAU(l) s H
PRLl = ONE
RC * ZERO
ETAMAX s ETAMX1
NOINOX s 2
N3TEP = 0
N3TEPJ s 0
NFE * 1
KM
KM
KM
KM
KM
KM
KM
XM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
3036
3037
3038
3039
30HO
3041
3042
30«3
3044
3015
3046
30«7
3048
3049
3050
3051
3052
3053
3054
30bS
3056
3057
3056
3059
3060
30hl
3062
3063
3064
306S
3066
3067
3068
3069
3070
3071
3072
•* r\7 f
3U I 3
3074
3075
30/6
3077
307S
3079
3080
3081
3082
3083
3044
3085
3006
30fl7
3068
3089
3090
r-166

-------
H3\ * 0
GO TO 200
C IF THE USER HAS CHANGED HI THEN 1 MUST BE RESCALEO. IF THE
C USER HAS CHANGED MITER, THEN NE«J IS SET TO MITER TO FORCE
C THE PARTIAL DERIVATIVES TO BE UPDATED, IF THEY ARE BEING USED.
150 IF (MF .EO. MFOLD) GO TO 170
MID = MITER
MtTH = MF/10
MITER s MF • IO*METH
MFOLO * MF
IF (MITER .EO. HIO) 60 TO 170
NE«J = MITER
MITERl * MITER » I
170 U (H .EO. HOLD) 60 TO 200
ETA s H/HOLD
H s HOLO
IREOO a 3
GO TO 165
CC2
1«0 ETA * AMAXKETA.HMIN/ ABS (H) ,ET»MIN)
185 ETA s AMINKETA.HMAX/ ABS(H) ,ETAMAX)
RJ s ONE
00 190 J * 2,1
Rl a RJ*ETA
00 190 I a l,N
190 V(IfJ) • Y(I,J)*R1
H s H*ETA
RC - RC»ETA
IF (IREDO .EO. 0) GO TO 690
C THIS SfcCTION COMPUTES THE PREDICTED VALUES BY EFFECTIVELY
C MULTIPLYING THE Y ARRAY BY THE PASCAL TRIANGLE MATRIX. THEN
C COSET IS CALLED TO OBTAIN EL, THE VECTOR OF COEFFICIENTS OF
C LENGTH NO + 1. RC IS THE RATIO OF NEW TO OLD VALUES OF THE
C COEFFICIENT H/ELt2). WHEN RC DIFFERS FROM 1 BY MORE THAN
C DELRC, \E«J IS SET TO MITER TO FORCE THE PARTIAL DERIVATIVES
C TO BE UPDATED, IF USED. OELRC IS 0.3. IN ANY CASE, THE PARTIAL
C DERIVATIVES ARE UPDATED AT LEAST EVERY 20-TH STEP.
200 T s T + H
00 210 Jl a 1,NO
DO 210 J2 s J1,NQ
J a ( JO » Jl) • J2
no aio i s I,N
210 Y(I,J) s Y(I,J) * Y(I,J+1)
CALL COSET
BND = FLOTN»(TQ(«)*EPS)**2
RL1 a ONE/£L(2)
RC = RC*(RL1/PRL1)
PRLl a RL1
IF (NSTEP .GE. N8TEPJ*ISTEPJ) NEWJ • MITBR
C(l
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
3091
30<)2
t AU 1
3U*r j
3094
3095
3096
T rtQ T
•5U" /
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
Tt PP
J 1 CC
3123
3124
3125
3126
3127
3128
3129
3130
» 1 »•
•31-31
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
1144
DRC «   ABS(RC-ONE)
KM  3145
                            C-167

-------
IF (OBC .LE. OELRCJ 60 TO 215
NE"j * MITER
CRATE s ONE
RC s ONE
SO TO 230
215 IF ((VITEU .NE. 0) .AND, (DRC ,NE, ZERO)) CKATE s ONE
C OP TO 3 CORRECTOR ITERATIONS ARE TAKEN. A CONVERGENCE TEST IS MADE
C ON THE ROOT MEAN SQUARE NORM OF EACH CORRECTION, USING BND, WHICH
C IS DEPENDENT ON EPS. THE SUM OF THE CORRECTIONS IS ACCUMULATED IN
C THE VECTOR ERROR. THE Y ARRAY IS NOT ALTERED IN THE CORRECTOR
C LOOP, TlE UPDATED Y VECTOR IS STORED TEMPORARILY IN SAVE1.
220 00 230 I = 1,N
230 ERWORd) * ZERO
M s 0
CALL DIFFUN (N, T, Y, SAVE2)
NFE s NFE + 1
IF (NE*J ,LE. 0) 60 TO 210
C IF INDICATED, THE MATRIX P » I • h*RLl*J IS REEVALUATED BEFORE
C STARTING THE CORRECTOR ITERATION. NEWJ IS SET TO 0 AS AN
C INDICATOR THAT THIS HAS BEEN DONE, IF MITEK • 1- OR 2, P IS
C COMPUTED AND PROCESSED IN PSET. IF MITER * 3, THE MATRIX IS
C P = I - N*RL1»D, WHERE D IS A DIAGONAL MATRIX. «L1 19 1/EL(2).
NE*J a 0
RC = ONE
NJE = NJE * 1
•ISTEPJ * N3TEP
GO TO (2SO, 200, 260), MITER
240 NFE = NFE * N
250 CON * -H*RL1
CALL PSET(Y, NO, CON, MITER, IER)
IF (IER .NE. 0) 60 TO 420
GO TO 350
260 R E «L1*SHORT
00 270 I • 1,N
270 Prt(I) * Yd,l) + R«(H«SAVE2d) • Yd, 2))
CAIL DIFFUNCN, T, PW, SAVED
NFE s NFE + 1
HRLJ f M*RL1
DO 280 I s 1,N
Rd s H*SAVE2(I) " Yd, 2)
PW(I) a ONE
D s SHORT*RO • H*(SAVEid) • SAVE2U))
SAVE1 (1) » ZERO
C(2
IF ( ABS(RO) ,LT. UROUND*YMAX(I)) 60 TO 260
IF ( ABS(D) ,EQ. ZERO) GO TO 420
Prtd) s SHORT*RO/D
SAVE1 (I) * PW(I)*RL1*RO
280 CONTINUE
60 TO 370
290 GO TO (295, 350, 350, 310), MITER1
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
3146
3147
3148
J149
3150
3151
X I C>
J I JC.
3153
3154
3155
3156
3157
» • CA
•31 7O
3159
3160
3161
3162
3163
3164
•» t f. C
j 1 O J
3166
3167
3168
3169
3170
1171
Jlii
3172
3173
3174
3175
3176
3177
3176
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3169
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
C-168

-------
c IN THE C«SE OF FUNCTIONAL ITERATION, r is UPDATED DIRECTLY FROM
C THE RESULT OF THE LAST OIFFUN CALL.
295 0 * ZEWO
DO 300 I s 1,N
R = RL1*(H*SAVE2(I) - Yd, 2))
0 = 0 * ((R - ERROR(I))/YMAX(I))**2
SAVE1U) » Y(I»1) » R
300 ERKGRU) = R
GO TO aoo
C IN THE C*SE OF A CHORD METHOD, THE RESIDUAL -GCY SUB N(M)>
C IS COMPUTED AND THE LINEAR SYSTEM WITH THAT AS RIGHT-HAND SIDE
C AND P AS COEFFICIENT MATRIX IS SOLVED, USING THE LU DECOMPOSITION
C OF P IF NITER = 1 OR 2. IF MITER • 3 THE SCALAR H4RLI IS UPDATED.
3JO PHRLI - HRL1
HRLI ' H*HLl
IF (HRLI .EG. PHRLI) GO TO 330
R * HRLI/PHRL1
DO 3?0 I B 1,N
0 s ONE « R*(ONE • ONESPH(I))
C(t
IF ( ABS(D) .EO. ZERO) GO TO 440
CH
CS IF (A8S(0) .EO. ZERO) GO TO 440
C/4
320 Prt(l) 3 ONE/0
330 00 340 I s 1,N
340 SAVEHI) f PW(I)*(RLi»H*SAVE2(I) - (RL1*Y(I,2) * ERROR (I)))
GO TO 370
390 00 360 I s I,N
360 SAvflU) * RLl*H*8AVE2(I) • (RL1*Y(I,2) « CRROR(I))
KM 3
-------
C THE CORRECTOR ITERATION FAILED TO CONVERGE IN S TRIES. IF PARTIAL
C DERIVATIVES ARE INVOLVED BUT ARE NOT UP TO DATE, THEY ARE
C REEVALU*UD FUR THE NEXT TRY. OTHERWISE THE Y ARRAY IS RESTORED
C TO ITS V»LUES BEFORE PREDICTION, AND H IS REDUCED,
C IF POSSIBLE. IF NOT, A NO'CONVERGENCE EXIT 13 TAKEN.
410 NFE = NFE + MAXCOR • 1
IF (NEWJ ,EO. -1) GO TO 440
420 T s IOLO
ETAMftx a ONE
DO 430 Jl a 1,NQ
DO 430 J2 • Jl.NQ
J = (NO * Jl) • J2
00 430 I « 1,N
430 Y(I,J) a Y(I,J) - Y(I,J+1)
CC1
IF ( A9SCH) ,LE. HMJN*ONEPSM) GO TO 680
ETA = ETACF
IREDO = 1
60 TO 180
040 NE«J = MITER
GO TO 220
C THE CORRECTOR HAS CONVERGED. NEWJ 13 SET TO -1 IF PARTIAL
C DERIVATIVES *ERE USED, TO SIGNAL THAT THEY MAY NEED UPDATING ON
C SUriSEUUfcMT STEPS. THE ERROR TEST IS HADE AND CONTROL PASSES TO
C STATEMENT 500 IF IT FAILS.
450 IF (MITER .NE. 0) NEWJ « -1
NFE B NFE » M
D t ZERO
DO 460 I a l,N
460 0=0* (ERROR(I)/YMAX(I))**2
E = FLOTN*(TQC2)*EPS)*«2
IF (0 .Gt. E) GO TO 500
C AFTER A SUCCESSFUL STEP, THE Y ARRAY, TAU, NSTEP, AND NQINDX ARE
C UPDATED, AND A NEW VALUE OF H AT ORDER NQ IS COMPUTED.
C THE VECTOR TAU CONTAINS THE NQ + 1 MOST RECENT VALUES OF H.
C A CHANGE 1H NQ UP OB DOWN BY 1 IS CONSIDERED IF NQINDX a 0.
C IF NQINOX a 1 AND NO ,LT. MAXDER, THEN ERROR IS SAVED
C FOR USE I>\ A POSSIBLE ORDER INCREASE ON THE NEXT STEP.
C A CHANGE IN H OR NQ IS MADE ONLY OF THE INCREASE IN H
C IS BY A FACTOR OF AT LEAST 1.3.
C IF NOT, NQINDX IS SET TO 2 TO PKEVENT TESTING FOR THAT MANY
C STEPS. IF NQ IS CHANGED, NQINDX IS SET TO NO + 1 (NEW VALUE).
KFLAG a 0
IREOO » 0
NSTEP = NSTEP » I
HUSEO a H
NQUSED a NQ
DO 470 IBACX a 1,NO
1 « L - IBACK
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
Jd3b
3257
3858
3359
3460
3361
•tata
jcoe
3863
3264
3365
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
Tp7Q
3C f T
3280
3281
3282
3283
tpfla
Jc 01
3285
3286
3287
3288
3289
3290
3291
* pQa
3c *c
3293
3294
3295
3296
3297
3298
3299
3500
3301
3302
Y^r\«
j jv j
3304
3305
3306
3307
3308
3309
3310
C-170

-------
470 TAUCltl) s TAU(I)
TAU(l) « H
DO 400 J s l,L
00 490 I * 1,N
««0 Y(1,J) s V(I,J) * ERROR(I)«ELCJ)
NOINOX s NOU'OX - 1
IF ((I. .EQ. UMAX) .OR. (NOINOX .NE. 1)) 60 TO 495
DO 490 I * 1,N
490 Y(l.LMAX) 8 ERROR(I)
CONP s TQ(5)
495 If (ETAMAX ,Nf. ONE) 60 TO 520
IF (V)INOX ,LT. 2) NOINOX s 8
GO TO 690
C THE ERROR TEST FAILED, KFLAG KEEPS TRACK OF MULTIPLE FAILURES.
C T AND THE Y ARRAY ARE RESTORED TO THEIR PREVIOUS VALUES, A NEW
C M FOR A RETRY OF THE STEP IS COMPUTED, THE ORDER IS KEPT FIXED,
500 KFLAG * KFLAG » 1
T s TOLD
DO 510 Jl * 1,NO
00 510 J2 8 Jl.NO
J = (NO » Jl) • J2
00 510 I * t,N
510 Y(I,J) s Y(I,J) • YU,J + 1)
NEfcJ = MITER
ETAMAX s ONE
C(l
IF ( *BS(H) .LE. HMIN*ONEPSM) GO TO 660
IF (KFLAG .LE. KFC) 60 TO 630
IWEDO s 2
C(l
5ZO FLOTl * FLOAT(L)
ETAO s ONE/U91ASa«D/E)*«(PT5/FLOTL) t ADDON)
IF ((NOINUX .NE. 0) .OR. (KFLAG .NE. 0)) GO TO 560
ETAfjMl s ZERO
IF (Ml .EQ. 1) GO TO 540
C COMPUTE AATIQ OF MEM H TO CURRENT H AT THE CURRENT ORDER LESS ONE.
0 = ZEKO
DO 530 I 8 1,N
530 0 a D + (Y(I,L)/YMAX(I))»*2
EON = FLOTN*(TO(l)*EPS)**a
ETAQM1 > ONE/((BIAS1*D/EDN)**(PTS/(FLOTL • ONE)) + ADDON)
540 ETAQP1 * ZEHO
IF (L ,EO. LMAX) GO TO 560
CrnMPtiTF UATrn nF fuF^ H TH riiBPFiuT M AT TIIORFMT fioftFo PI im nuf •••!
UU^~"lt n»i4u ur "(tn n |u uunncinl n HI I^Unncrtl Unil&n "tvo WMt, ww^>
CNQUOT » (TO(5)/CONP)*(H/TAU(a))»*L
D 8 ZERO
00 550 I a l,N
550 0 8 0 + ((ERROR(I) • CNQUOT*Y (I,LMAX) ) /YMAX (I) ) **2
EUP s FLOTN«(TO(3)*EPS)**2
ETAOP1 * ONE/((BIAS3»D/£UP)*«(PT5/(FLOTL + ONE)) + *ODON)
560 NDJNDK 8 2
IF (ETAQ ,GE. ETAOPI) GO TO 570
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
• •-KM
KM
KM
KM
KM
KM
KM
KM

KM
KM
KM
KM
KM
KM
KM
KM
33tl
JM2
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
•» J 3 »
J JC*f
3325
3326
3327
llpa
3 3 C O
3329
3330
3331
3332
3333
3334
3335
3336
3JJ7
3338
3339
3340
33ai
•» t « 3
J> J **e
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
33-i5
3356
•J-IC7
j j J f
3358
3359
3360
3361
3362
3363
3364
336S
C-171

-------
IF (fTHOPl .ST. eTAOMl) 80 TO 600
GO TU 590
5TO IF (ETAD .tT, ETAOM1) 60 TO 590
580 IF UETAQ ,LT. THRESH) .AND. CKFLAG ,EQ. 0)) GO TO 690
ETA = ETAQ
IF ((KfLAG ,LE. -2) .AND. (ETA .ST. CTAMXF)) ETA « ETAMXP
GO TO IflO
590 IF (ETAU*1 .UT. THRESH) 60 TO 690
CALL AdJUST (Y, NO)
L s NO
NO = MQ « I
ETA = ETAQM1
NOINOX = L
GO TO 180
600 IF (ETAUP1 ,LT. THRESH) 60 TO 690
HO * L
ETA i ETAOP1
L « L + 1
DO 610 T * 1,N
610 Y(1,U » ZERO
NQINOX = L
GO TO 180
C tOMTHOL REACHES THIS SECTION If 3 OR MORE CONSECUTIVE FAILURES
C HAVE OCCUSKEO. IT IS ASSUMED THAT THE ELEMENTS OF THE Y ARRAY
C HAVE ACCUMULATED ERRORS OF THE WRONG ORDER. THE ORDER IS REDUCED
C BY OJE, If POSSIBLE. THEN H IS REDUCED BY A FACTOR OF 0.1 AND
C THE STEP IS KETRIEO. AFTER A TOTAL OF 7 CONSECUTIVE FAILURES.
C AN EXIT IS TAKEN WITH KFLAG * -2.
630 IF (KFLAG .EQ. KFH) GO TO 670
IF (NO .EQ. 1) GO TO 640
ETA s ETAMIN
CALL ADJUST (Y, NO)
L = NS
NO = H'i ' I
iMQINOX * L
GO TO ISO
C(l
640 ETA - AM«X1 (ETAMIN, HMIN/ ABS(H))
H s H»ETA
CALL nlFFUN (N. T. Y. SAVED
MFE » NFE + 1
00 650 I s 1,N
650 Yd. 3) * H«SAVE1(I)
NQINDX = 10
GO TO 200
C ALL KETUKMS ARE MAOE THROUGH THIS SECTION. H IS SAVED IN HOLD
C TO ALLOW THE CALLER TO CHANGE H ON THE NEXT STEP.
660 KFLAG s -1
GO TO 700
670 KFLAG » -z
GO TO 700
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
•• iaa
JJOa
3389
3390
3391
3392
3393
339
-------
 660  KFLAG - -3
      GO TO 700
 690  ETAMAX = ETAMX3
      IF (NSTEP .LE. 10) ETAMAX * ETAMXZ
 700  HOLD s H
      JSTART 9 NO
      RETURN
                          END OF SUBROUTINE TSTEP
too
c
c
c
      END
      SUBROUTINE UNM1XR
      RETU
      ENO
 SUBROUTINE UPFLXl(TIMEfJ)

    »UPFLX|* UPDATES AREA SOURCE EMISSION FLUXES

     THIS ROUTINE HAS BEEN MODIFIED TO PARTITION A
     ALDEHYDE FLUX INTO 6ox HCHO AND 4ox RCHO.

 COMMON/FLUXES/FLXINC 7,200),  FLXTIMCSOO),   NFLUX
 COMM(n
-------
200
           0.90*FLXw2(l)
oo eoo i * i,r.'ASFLx
K * LOCFLXU)
wRITEUO.2) SPEC(K),FLXW1(K)
CONTINUE
K s T
».RITEUO,2) SPEC(K),FLXW1 CK)
K = 2
WRITfc(10,2) SPEC{K),FLXW1CK)
FOHMAT(IHO,10X,38HAR£A SOURCE FLUXES UPDATED AT TIME
FORHATUH ,10X,A4,3H B .2E15.S)
RETURN
END
      SUBROUTINE UPRAT2 CT,IK1,RATEV,NOSTAT,NVRATE,CLOUDY)
                                                             »FJO.2)
               UPDATES THE ARRAY OF VARIABLE RATE CONSTANTS  (RATEV)
               FROM RATK1 » RATK2
               IT INITIALIZES UPPER ELEVATION RATH CONSTANTS  TO
               THE RATE CONSTANT AT THE SURFACE IF HIRATE « NO
      DIMENSION   RATEV(2,5)
      COMK.N/CHEM4/RATK1UOO,5).       RATK2(100|5),      RLATi
     1             RLONG,              TMZONE,            SUNTIM,
     2             HIRATE,             JOATE,             NRATE
      DATA YES,NEG,MORE,ENO/3HYES,2HNO,4HMORE»3HEND/
      IF(HIRATE.EO.YES)  60 TO 5
      DO 3 JS2,NOSTAT
      RATXHIKl.J) s RATK1(IK1,1)
      IF(NV«ATE.LT.2)  60 TO 3
      RATK£(IK1,J) s RATK2(IKl,l)
  3   COUTINUE

  5   00 10 J31,NOSTAT
      RATEVU.J) = RATK1(IK1,J)«CLOUOY
      IF(NVHATE.LT.2)  GO TO 10
      «ATtV(8,J) » RATK2(IK1,J)«CLOUDY
  10  COMTIMUE
      WRIT£(10,20) T  ,   t(RATEV(I,J),J«1,N03TAT),I cl.NVRATE)
  20  FORMAT (1HO,10X,41HVARIABLE RATE CONSTANTS UPDATED  AT  TIME  ,F6.1,
     . /.lU,3HKl*,7X,5S12.4,/,llX,8HK(HCHO)«,2X,5Gia.fl)
      RETURN
      END
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3465
3486
3487
3489
3489
3490
349)
3493
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
                                      C-174

-------
5

10
20
C
C
C
30
C
C
C
«0
 SUBROUTINE UPSJ»C(TIME,IPS,NOSTAT,SPEC)

     UPDATES POINT SOURCE EMISSION RATES

 DIMENSION SPEC(l)
 COMMON /PS1/   TPASS(ZOO),     PS(7,5,75),     FRACT(3),
1               NPTSR,           NPSFLX,         LOCP3F(7)
 COMMON /PS2/  PSRATE(30,5),  PSRH30,5),  P3Ra(30,5),TL*8T»UPOlNT

 IF(MPSFLX.LE.O)   60 TO 5
 IFUPS.Lfc.NPTSR)   00 TO 10
 CALL X*IT(-150,0.0,P3RATE)
 RETURN
 CONTINUE
 IPSP1  a M1NOUPS*!,NPTSR)
 00 20  J a 1,NOSTAT
 00 20  I s 1,NPSFLX
 K s LOCPSF(I)
 PSRUK.J) * PS(I,J,IPS)
 PSR2CK.J) a PS(I,J,IP3P1)
 CONTIMlE

    SPLIT ALDEHYDES AND NOX
      DO 30 J =
      PSR1(7,J)

      PSHUb,J)
      PSHK2.J)
      PSRIU.J)
      PSR2U,J)
      CONmUE
                1,NOSTAT
                a 0.40*PSR1{6,J)
                a 0.40*P3R2(6,J)
                > 0.60*PSR1(6,J)
                s 0.60»PSR2(6,J)
                a 0.10*PSRl(l,J)
                s 0.10*PSR2C1,J)
                a 0.90«PSR1(1,J)
                3 0.90*PSR2(1,J)
   nRITE  UPDATES ON TAPE10

 *RITE(10,1)   TIME
 DO 40 K  a 1,NPSFLX
 10 =  LOCPSF(K)
 WRmilD,?)  SPEC (ID), (PSR1 (ID, J),J«1, NOSTAT)
 CONTINUE
 10 =  ?
 WRITE(10,2)  SPEC(ID),(PSR1(ID,J),J«1,NOSTAT)
 in =  7
 WRITE (10,2)  SPEC(ID),(PSR1(ID,J),J»1,NOSTAT)
 RETURN
 FORM4T(1HO,10X.37HPOJNT  SOURCE  RATES  UPDATED  AT  TIME  •
 FOHMATUH ,10X,A4,4H •     ,5612.3)
 END
                                                                        KM
                                                                        KM
                                                                        KM
                                                                        KM
                                                                        KM
                                                                        KM
                                                                        KM
                                                                        KM
                                                                        KM
                                                                        KM
                                                                            3512
                                                                            3513
                                                                            3514
                                                                            3515
                                                                            3516
                                                                            3517
                                                                            3516
                                                                            3519
                                                                            3520
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM
KM  3525
KM  3526
KM  3527
KM  3526
KM  3529
    3530
    3531
    3532
    3533
    3534
                                                                            3522
                                                                            3523
                                                                            3524
                                                                            3535
KM
KM
KM
KM
KM
KM
KM  3556
KM  3537
KM  3536
KM  3539
KM  3540
KM  3541
KM
KM
KM
KM
KM
KM
    3542
    3543
    3544
    3545
    3546
    3547
KM  354S
KM  3549
KM  3550
KM  3551
    3552
    3553
    3554
    3555
    3556
    3557
    3558
    3559
    3560
    3561
                                          C-175

-------
4.   Utility Library Listing
           SUBROUTINE FMINF(F,NF,FMIN,NMIN)                                  UL     1
     C                                                                       UL     a
     C        FMINF LOCATES THE MINIMUM VALUE AMONG NF CONSECUTIVE           UL     3
     c        MEMBERS OF THE f ARRAY AND RETURNS BOTH THE VALUE FMIN         UL     4
     C        AND ITS ARRAY INDEX NMIN.                                      UL     5
     C                                                                       UL     6
           DIMENSION F(NF)                                                   UL     7
     c                                                                       UL     e
           A = F(l)                                                          UL     9
           DO 100 Ns2,NF                                                     UL    10
           A = »MIN1(F(N),A)                                                 UL    11
        100 CONTINUE                                                          UL    12
           00 110 nlsl.NF                                                     UL    13
           IF(*»F(NM 110,120,120                                            UL    14
        110 CONTINUE                                                          UL    15
           N = NF                                                            UL    16
        120 NMIN » N                                                          UL    17
           FMIN x A                                                          UL    18
           RETURN                                                            UL    19
     C                                                                       UL    20
           END                                                               UL    21
            SUBROUTINE MCHAR  (IFC,FROM,ITC,TO,NCHR)                           UL    22
      C                                                                       UL    23
      C      MCHAR MOVES A STRING OF CHARACTERS FROM ONE WORD TO ANOTHER.      UL    24
      C                                                                       UL    25
      C       IFC  a POSITION  OF CHARACTER TO MOVE                             UL    26
      C       FROM = SOURCE KORD                                               UL    27
      C       ITC  a  POSITION OF CHARACTER TO MOVE TO                         UL    28
      C       TO   s DESTINATION WORD                                          UL    29
      C       NCHR = NUMBtR OF CHARACTERS TO MOVE                              UL    30
      C                                   .                                   UL    31
      C      NOTE THAT FROM AND TO ARE EITHER 1 OR 4-CHARACTER WORDS           UL    32
      C                                                                       UL    33
            DIMENSION  CHARF(4),  CHART(4)                                    UL    34
            DATA CHARF, CHART /8*1H   /                                       UL    35
      C      TEMPORARY LOGICAL UNIT DEFINED                                    UL    36
            LU'i = 4                                                           UL    37
      C      READ CONTENTS OF  SOURCE WORD FROM TO TEMPORARY ARRAY              UL    38
            *R1TEUUN,1)  FROM                                                UL    39
         1   FOW.AT (A4)                                                        UL    40
            BACKSPACE LUN                                                     UL    41
            kE*0(LUN,2) CHARF                                                UL    42
         2   FOW*AT(4U)                                                       UL    43
            BACKSPACE LUN                                                     UL    44
            *RITE(LUN,1)  TO                                                  UL    45
            BACKSPACE LUN                                                     UL    46
            READ(LUN,2)  (CHAHT(I),I"1, 1,NCHR                        '                        UL    49
            CH»»TUTC+I-n »  CHARFCIFC + I-1)                                   UL    50
        10   CONTINUE                                                          UL    51
            BACKSPACE LUN                                                     UL    52
                                           C-176

-------
      wniTEtLUN.Z) (CHARTtl),!»!,«)                                      UL     S3
      BACKSPACE LlIN                                                      UL     5«
      REAOauN,!}  TO                                                    UL     55
      RETURN                                                             UL     *6
      END                                                                UL     57
      SUBROUTINE MOATE(I)                                               UL     58
      DIMENSION 1(1)                                                    UL     59
      DATA I3LK /4H    /                                                UL     60
      1(1) * IBLK                                                       UL     61
      1(2) = IBLK                                                       UL     62
      RETURN                                                            UL     63
      END                                                               UL     64
      SUBROUTINE NEWPAG  (TITLE,LSKIP,IDATE)                             UL     65
      DIMENSION     TITLE(20),          lOATE(l)                        UL     66
      DATA NPAGE,  LOUT/0,  6/                                          UL     67
      rtRITE(LOUT,l)                                                     UL     68
      IF  (LSKIP.EO.O) GO TO 110                                         UL     69
      oo  too i*i,L3KiP                                                  UL     70
      n»IT£(H)'JT,2)                                                     UL     71
  100 CHNTIN.UF                                                          UL     72
  110 >iPAGE = >>'PAGE*l                                                     UL     73
      CALL SECOND  (A)                                                   UL     74
      MUTE (LOUT, 3)  TITLE,  A,  IDATE(l),  NPA6E                       UL     75
      RETURN                                                            UL     76
                                                                        UL     77
    1 FORMAT (IH1)                                                      UL     78
    2 FORMAT (1H )                      .                                UL     79
    3 FORMAT (1H ,1X,20«4,1X,9HCP TIME «,F8.2,2X,5HDATE  ,2X,A10,2X,5HPAGUL     80
     IE   ,14)                                                          UL     At
      END                                                               UL     82
      SUBROUTINE PREOAT                                                 UL     83
C                                                                       UL     84
C        *PR£OAT*  TRANSFERS DATA-CARO-IMAGES FROM INPUT(TAPES)         UL     65
C        TO T»PE3 AND OUTPUT(TAPE6).                                    UL     86
C        PKEDAT RETURNS WHEN IT READS THE WORD *MORE* IN COL. 1-4       UL     87
C        OR AHEN IT FINOS AN EOF.                                       UL     08
C                                                                       UL     69
      DIMENSION IMAGE(20)                                               UL     90
      DATA LOT,LOUT,ARO/3,6,1H+/                                        UL     91
      DATA LIN /5/                                                      UL     92
      DATA  MQHE/4HMORE/                                                UL     93
      REMIND LOT                                                        UL     94
      L*N so                                                           UL     95
100   CONTINUE                                                          UL     96
C    «****»* REMOVE THE NEXT TWO CARDS FOR UNIVAC/IBM *******           UL     97
      READ uiN.i) IMAGE                                                UL     98
                                        C-177

-------
      IF (Ei t (UN)) iao,uo                                             UL    vs
C    *•«*»» INSERT THE NEXT CARD INSTEAD *****                          UL   100
C                                                                       UL   101
c     REAu(uiN,i,END»i20) IMAGE                                         UL   102
110   CONTINUE                                                          UL   10J
      IF (WOO(LYN,«0),EQ.O) WRITE (LOUT,2)                              UL   104
      IF (Mi,D(LrN, JO),EO.O) WRITE (LOUT,3) (K,K«1,«0,10) , (ARO,K«1,6)    UL   103
      LTN » LYN + 1                                                       UL   106
      WHITE (LOUT,4) LYN,IMAGE                                          UL   10?
      rfRITE (LOT,!) IMAGE                                               UL   108
      IF U»»GE(l).NE.MORE) GO TO 100                                   UL   109
120   CONTINUE                                                          UL   110
      RErfINO LOT                                                        UL   111
      WRITE (LOUT,5)                                                    UL   113
      RETURN                                                            UL   US
1     FORMAT (20A4)                                                     UL   114
2     FOHMJkT UHl,BX,aOHIMACES OF DATA-CARDS)                           UL   ItS
3     FORMAT (1H010X8I10/14X6HCARD  Al,fl(9H.........Al))                UL   116
H     FOKHAT (I18,2X,20A4)                                              UL   117
5     FORMAT (IHl)                                                      UL   118
      END                                                               UL   119
      SUBROUTINE SECOND(A)                                              UL    120
      A = 0.0                                                           UL    121
      RETURN                                                            UL    122
      END                                                               UL    12J
      SUBROUTINE 3ETPLT(A,B,C,D)                                        UL    121
C                                       .                                UL    125
C     GENERAL-PURPOSE PRINTER-PLOT ROUTINE                              UL    126
C                                                                       UL    127
      CQMMOM /IM«C/ IMAGE                                               UL    128
      DIMENSION  IMAGE(26,51),                LABX (5,6) ,LA8EL(5)        UL    129
      EQUIVALENCE  (IC.CI)                                              UL    130
      LOGICAL CONFR^                                                    UL    151
      DATA          MAXX,MAXY,ARO/i04,51,lH«/                           UL    1 <2
      DATA          IBLNK.IDA3H     /4H     ,4H—•/                    UL    133
C                                                                       UL    134
C     NCHAR JS THE NUMBER OF CHARACTERS PER WORD                        UL    135
      DATA          NCHAR/4/                                            UL    136
C                                                                       UL    137
C                                                                       UL    138
C                                                                       UL    139
C---.-FOR THIS ENTRYt CAUL SETPLOT (X-LOW,                              UL    140
C                                   X-HIGH,                             UL    111
C                                   Y-LOW,                              UL    142
C                                   Y-HIGH)                             UL    143
C         THIS 19 THE INITIALIZING CALL • THE ARGUMENTS DEFINE THE      UL    144
C              ENDS OF THE AXES TO BE PLOTTED                           UL    145
C                                                                       UL    146
C     ENTRY SETPLOT                                                     UL    147
                                       C-178

-------
      CONFHM s .FALSE.                                                  UL   148
100   00 110 J * 1,51                                                   UL   149
      DO 110 I s 1,26                                                   UL   IbO
      IMAGEU.J) s IBLNK                                                UL   151
110   CONTINUE                                                          UL   152
      DO 120 I a 1,26                                                   UL   153
120   IMAGE(I,1) = IOASH                                                UL   154
      00 130 J = 1,MAXY                                                 UL   155
      CALL MCHAR(1,1HI,1,IMA6EU,J),1)                                  UL   156
130   COnTIMiE                                                          UL   157
      DX s (H-AJ/100.                                                   UL   15S
      0V • (O-CJ/CMAXY-1)                                               UL   159
      XORG z A                                                          UL   160
      YOm, = C                                                          UL   161
      IF (.NOT.CONFRH) GO TO 1«0                                        UL   162
      IF (Dx.LT..6*DY) DX * .6*DY                                       UL   163
      IF (Or.LT.5./3.*OX) DY • 5./3.*DX                                 UL   164
140   KVAL = I8LNK                                                      UL   165
      KGO * 19                                                          UL   166
      00 160 J * 1,6                                                    UL   167
      VAL * XORG»OX*20»(J-1)                                            UL   168
      GO TO 230                                                         UL   169
150   LABXU.J) s LABEL(l)                                              UL   170
      LABX(2,J) s LABEL (2)                                              UL   171
      LA8X(3,J) * LA8EL(3)                                              UL   172
      L»BX«.J) * LABEL14)                                              UL   173
160   L»«»Ci,J) * LABEL(S)                                              UL   174
      RETURN                                                            UL   179
C                                                                       UL   176
C                                                                       UL   177
C——.THIS EUTRY IS IDENTICAL TO SETPLOT, EXCEPT IT 18 U8EO FOR         UL   178
C                   PLOTTING X AND Y TO SAME SCALE                      UL   179
C                   (A COMPUTED CIRCLE IS PLOTTED AS A CIRCLE)          UL   180
C                                                                       UL   181
C     ENTRY ISOPLT(A,B,C,0)   FOR UNIVAC OR IBM .                        UL   182
      ENTRY 1SOPLT                                                      UL   183
      CONFKM s .TRUE.                                                   UL   184
      CO TO 100                                                         UL   185
C                                                                       UL   186
C                                                                       UL   187
C.-.-.FOR THIS ENTRY, CALL 6ETOXOY (DX,                                 UL   188
C                                   DY)                                 UL   189
C         USE THIS ENTRY IF YOU NEED TO KNON THE X* AND Y-INCREMENTS    UL   190
C              WHICH HAVE.BEEN COMPUTED BY ISOPLOT                      UL   191
C                                                                       UL   192
C     ENTRY 6TOXOY (A,B)   FOR THE UNIVAC OR IBM                        UL   193
      ENTRY GTDXOY                                                      UL   194
      A s OX                                                            UL   195
      B s DY                                                            UL   196
      BETURM                                                            UL   197
C                                                                       UL   198
C                                                 .                      UL   199
C.....FOR THIS ENTRY, CALL PLOTPNT (X-COORD,                            UL   200
C                                   Y'COORD,                            UL   201
C                                   CHARACTER)                          UL   202
                                      C-170

-------
C          CHARACTER MUST BE THE FIRST ONE IN THE WORD, E.G.f 1HA.      UL   303
C         THIS IS THE ENTRY WHICH ENTERS A POINT IN THE PLOT            UL   204
C                                                                       UL   205
C     ENTWY PLTPNT(A,8,C)   FOR THE UNIVAC OR IBM                       UL   206
      ENTRY PLTPNT                                                      UL   207
      HGO = 1                                                           UL   208
      CI = C                                                            UL   209
170   JX = (A-XORG)/DX*1.5                                              UL   2tO
      JY = (B-YORG)/DY»l.b                                              UL   211
      IF (JX.GT.MAXX.OR.JX.LE.O.OR.JY.GT.MAXY.OR.J'.LE.O) RETURN        UL   212
      I» = JX/NCHAR+1                                                   UL   213
      JZ = MOOCJX,NCHAR)                                                UL   214
      IF (JZ.GT.O) GO TO 180                                            UL   21S
      IR » IR-J                                                         UL   216
      JZ = NCHAR                                                        UL   217
ISO   CONTINUE                                                          UL   218
      IF (MGO.E0.2) GO TO 190                                           UL   219
      CALL MCHAR{1,CI.JZ.IMAGE(IR,JY),1)                                UL   220
      RETURN                                                            UL   221
C                                                                       UL   222
C                                                                       UL   223
C—..FOR THIS ENTRY, CALL GETPNT (X-COORO,                             UL   224
C                                  Y-COORO,                             UL   225
C                                   CHARACTER)                          UL   226
C          CHARACTER IS RETURNED IN THE FIRST POSITION OF VARIABLE -C-. UL   227
C                  USE THIS ENTRY TO FIND OUT THE CHARACTER             UL   228
C                  NOW AT (X,Y)                                         UL   229
C                                                                       UL   230
C     ENTRY GETPNT(A,8,C)   FOR THE UNIVAC OR IBM                       UL   231
      ENTRY GETPNT                                                      UL   232
      MGO a 2                                                           UL   233
      C = 0.                                                            UL   234
      GO TO 170                                                         UU   235
190   CALL MCHAHUZ,IMAGECIR,JY).1,C,1)                                 UL   236
      RETURN                                                            UL   237
C                                                                       UL   236
C                                                                       UL   239
O——FOR THIS ENTRY, CALL PLOTXP1 (CHARACTER)                          UL   210
C          CHARACTER MUST BE THE FIRST ONE IN THE WORD, E.G., 1HA.      UL   241
C         USE  THIS ENTRY TO ADO A CHARACTER TO THE RIGHT OF             UL   242
C              THE LAST MARK ENTERED                                    UL   243
C                                                                       UL   244
C     ENTRY PLTPXl(A)   FOR THE UNIVAC OR IBM                           UL   24S
      ENTRY PLTPX1                                                      UL   246
      JX « JX»1                                                         UL   247
      IF (JX.GT.MAXX) RETURN                                            UL   248
      CI = A                                                            UL   249
      IW : JX/NCHAR+1                                                   UL   250
      JZ = MOOUX,NCHAR)                                                UL   251
      IF (JZ.GT.O) GO TO 200                                            UL   252
      I* = IR-1                                                         UL   253
      JZ s NCHAR                                                        UL   254
200   CONTINUE                                                          UL   255
      CALL MCHAR(1,CI,JZ,IMAGE(IR,JV),1)                                UL   256
      RETURN                                                            UL   257
                                       C-180

-------
C                                                                       UL   258
C                                                                       UL   259
C——FOK THIS ENTRY. CALL PLOTYM1  (CHARACTER)                          UL   260
C          CHARACTER MUST BE THE FIRST ONE IN THE MORD, E.G.t 1HA.      UL   261
C         USE THIS ENTRY TO ADD A CHARACTER BELOW                       UL   262
C              THE LAST MARK ENTERED                                    UL   263
C                                                                       UL   264
C     ENTRY PLTYHl(A)   FOR THE UNIVAC OR IBM                           UL   265
      EkTRY PLTYMJ                                                      UL   266
      JY a JY-1                                                         UL   267
      IF (JY.LE.O) RETURN                                               UL   268
      CI a A                                                            UL   269
      CALL MCHAR(1,CI,JZ,IMA6EUR,4Y)ri)                                UL   270
      RETURN                                                            UL   271
C                                                                       UL   272
C                                                                       UL   273
c         YOU MUST CALL PLOTOUT TO GET PLOT PRINTED                     UL   274
C—... FOR THIS ENTRY* CALL PLOTOUT  (PRINT-TAPE)                         UL   275
C                                                                       UL   276
C     ENT«Y PLTOUT(A)     FOR THE UNIVAC OR IBM                         UL   277
      ENTRY PLTOUT                                                      UL   278
      CI = A                                                            UL   279
      IF (IC.LF.O.OR.IC.6T.49) 1C * 6                                   UL   280
      *
-------
3     FORMAT (20X.A1, 5(1<»X, Al)/8X,30»4/)
«     FOUMAT (F17.4,2X,A1)
5     FOWMAT (E17.4,2X,A1)
6     FOHMAT (5»«)
      £NO
      SUBROUTINE SOLAR (SLA.SLO.TZrIY,IM,ID,TIME,D,NV)
C***
C*««     SLA...  LATITUDE (DEC)  SOUTH a MINUS
C***     SLO...  LONGITUDE (DEC)  EAST 9 MINUS
C***     TZ...  TIME ZONE
C*«*            ALSO INCLUDES FRACTION IF LOCAL TIME 13 NOT
C*«*             STANDAPO MERIDIAN TIME.  E.G. POONA, INDIA 5.5
C»**     IT..  YEAR
C**»     IM..  MONTH
C*»*     ID..  DAY
C***     TIME.. LOCAL STANDARD TIME IN HOURS AND MINUTES.
C***            I 30 PM s 1330  ** STANDARD TIME **
C***     0,.  RETURNED VALUE
C***     NV..  VALUE TO BE RETURNED, SELECTED AS FOLLOWS....
C***           1.    DECLINATION (DEG.)
C«»*           2.    EQUATION OF TIME ADJUSTMENT (HRS.)
C**«           3.    TRUE SOLAR TIME (HRS.)
C**«           4.    HOUR ANGLE (DEG.)
C***           S.    SOLAR ELEVATION (DEG.)
C*«*           6.    OPTICAL AIRMASS
C***     0 ) NV ) 7.  OTHERWISE, 0 » 9999.
C***
      DIMENSION MD(ll)
      DATA MO/31,29,31,30,31,30,2*31,30,31, SO/
      DATA A,B,C,SIGA/0.15,3.8I>5,1.253,279.9348/
      RAD*572957,7S913E-4
      SDECs39784.9B8432E»5
      HE = 1,
      IF(SLO.LT.O.) REs-1.
      KZ=TZ
      TC=fTZ-KZ)*RE
      TZZ=KZ*RE
      SL8=SLA/RAO
      K = ID
      TIMHSTIME/100.
      I=TIMH
      TIMLOCa(TIMH.I)/0.«»*I»TC
      IMC»IM-I
      IFdMC.LT.J) GOT02
      0011=1,IMC
    1 KSK+MD(I)
    2 LEAPal
      NL=MOO(IY,4)
      IF(NL.LT.I) LEAP=2
      SMERsTZZ*lS.
      TKs((SM£R-3LO)*4.)/60.
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
UL
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
                                     C-182

-------
       IF(K.f,E.fel,AND.L£AP.LT,2)  KR»2                                     UL   365
       DAD=(TIMLOC+TZZ)/24.                                               (11   366
       DAO=D«D«K-KR                                                       UL   367
       DFsD»0*S60./365.2«2                                                UL   368
       OEsOF/RAO                                                          UL   3h9
       OESINzSINtOE)                                                      UL   370
       OECOSzCOS(DE)                                                      UL   371
       OESIS2i3IN(DE«2.)                                                  UL   372
       OECOSa=COS(De*2.)                                                  UL   373
       3IG=S!&A»OF»1.914827»OESIN-0.079S25*DEC03«0.019938*0£SIN2-0.00162*UL   374
      SDECUS2                                                             UL   375
       SIGSSIG/RAD                                                        UL   376
       DECSIN=SOEC«3IN(SIG)                                               UL   377
       EFFOEC3  ASIN(OECSIN)                                               UL   378
       IF(i.V.NE.l) 60TOIO                                                 UL   379
       DsEFFDEORAD                                                       UL   380
       RETURN                                                             UL   361
   to  £QTs0.12357*OE8I''l-0,0042e<»*OECOS»0.153BO<»*OESIN2+0.060Te3*OECOS2   UL   382
       IFCNV.NE.2) GOTOtl                                                 UL   3B3
       OsEUT                                                              UL   384
       NETIRM                                                             UL   385
   11  TSTsTK+TIMLOC-EOT                                                  UL   386
       IF(NV.NE,3) 60T013                                                 UL   387
       0=TST                                                              UL   388
       IF(O.LT.O.) 0*0*24.                                                UL   389
       IFCD.GE.24.) 0=0-24.                                               UL   390
       HETURM                                                             UL   391
   12  H4A»GL3ABS(TST-12.)*I5.                                            UL   392
       IF(NV.N€.4) 60T013                                                 UL   393
       D*HRt\'GL                                                           UL   394
       RETURM                                                             UL   395
   13  HhANRL-HHANGL/RAO                                                  UL   396
       SOLSI\=CECSIN*SIM(SI.B)+COS(EFFOEC)*C08(SLB)*COS(HRANGL)            UL   397
       SOLEL: ASIN(SOL3IN)»RAO                                            UL   398
       IF(NV.NE.S) 60T014                                                 UL   399
       OaSULEL                                                            UL   400
       RETUM'.                                                             UL   401
   14  IF(NV.NE.b) GOT08                                                  UL   402
       IF(SOLEL.LE.O.) GOT08                                              UL   403
       TKiSOLEL*8                                                         UL   404
       E=l./TH**C                                                         UL   405
       0=i./(»«E»SOL8IN)                                                  UL   406
       RETURN                                                             UL   407
    8  0*9499.                                                            UL   40a
       RETURN                                                             UL   409
       END                                                                UL   410


       SUBROUTINE XMIT(N,A,B)                                             UL   411
C                                                                        UL   412
C         IF  N  POSITIVE. TRANSMITS  N  WORDS FROM  A  TO  B            UL   413
C         IF  N  NEGATIVE, TRANSMITS  A  TO  N  WOR08 OF  B              UL   414
C                                                                        UL   415
       DIMENSION A(2),B(2)                                                UL   416
C                                                                        UL   417
       IF (N) 100(120(120                                                 UL   418
100    K * IABS(N)                                                        UL   419
       00 110 I • 1(K                                                     UL   420
       9(1) a A(l)                                                        UL   421
110    CONTINUE                                                           UL   422
       RETURN                                                             UL   423
C                                                                        UL   424
120    DO 130 I * 1,N                                                     UL   425
       fit!) * A(I)                                                        UL   426
130    CONTINUE                                                           UL   427
      RETURN                                                             UL    42B
C                                                                        UL    «2<>
      'END                                                                UL    «JO
                                       C-183

-------
                              APPENDIX D
            AN IMPROVED PHOTOCHEMICAL MECHANISM AND RELATED
            MODIFICATIONS FOR THE CHEMICAL-DIFFUSION MODULE

1.   Description of Chemical Mechanism and Related Modifications

     Concurrent with this study, an improved chemical mechanism was
developed by ERT for use in the trajectory model.   This appendix describes
the new mechanism and related changes in the chemical-diffusion module
for its use.  Changes in the FORTRAN source code and data sets for the
KEMOD program are included.
     The chemical reactions and chemical species included in the improved
mechanism are listed in Tables D-l and D-2.  The major differences
between it and the mechanism described in previous sections are as
follows:

     1)   A distinction is made between ethylene and higher olefinic
          hydrocarbon compounds to account for their differences in
          reactivity.

     2)   The ozone-olefin mechanism reflects the formation of more
          stable products and fewer radical species.

     3)   The aromatic hydrocarbon photooxidation mechanism is more
          reliable.

The development of this mechanism and the results for its evaluation
relative to smog chamber data are described in Lloyd et al. 1979.
     In adapting this mechanism to the atmosphere, new kinetic data and
new assumptions have been employed in determining certain chemical
reaction rate constants.  The rate constants for photolysis of nitrogen
dioxide, nitrous acid, formaldehyde, and higher aldehydes by solar
ultraviolet radiation have been updated using new solar actinic flux,
quantum yield, and absorption cross-section data (Dermerjian et al.
1979, Moortgat et al. 1978).  The new clear-sky photolysis rates are
shown in Tables D-3 through D-6 as a function of solar zenith angle and
elevation.
                                   D-l

-------
                              TABLE D-l
                 THE  PHOTOCHEMICAL REACTION
        Reactions
 1    N02 + HV  =   0 + NO
 2    0+02+M  =03+M
 3    03 + NO  =  N02  + 02
 4    NO + N02 + N20  =  2HONO
 5    2HONO  =  NO + N02 + H20
 6    HONO + HV =  OH + NO
 7    OH + NO + M   =  HONO + M
 8    OH + N02 + M = HN03 + M
 9    OH + CO  =  H02  + C02
10    H02 + NO  =   N02  + OH
11    H02 + N02 =  HN04
12    2H02  =  H202 •»•  02
13    N02 + 03  =   N03 + 02
14    N03 + NO  =   2N02
15    N03 + N02 =  N205
16    N205 + H20  =  2HN03
17    N205  =  N03 + N02
18    OH + ALKE =  A02
19    OH + C2H4 =  A02
20    A02 + NO  =   N02 + AO
21    AO + 02  =  .5RCHO + 1.5HCHO +  H02
22    HN04  =  H02 + N02
23    0 + ALKE  =   .3EPOX + .3RCHO
                    + .4H02 +  .4R02
24    0 + C2H4  =   .3EPOX + .3RCHO
                    + .4H02 +  .4R02  +  .4CO
25    03 + ALKE  =  .5HCHO + .4RCHO
                    + .4HD + .4RD +  .1R02
26    03 + C2H4  =  HCHO + .8HD + .4H02
                    + .2C02
27    HD + NO  =  HCHO + N02
MECHANISM
    Rate Constant
 Radiation Dependent
      4.12E+06
      2.50E+01
      2.20E-09
      1.40E-03
 Radiation Dependent
      1.44E+04
      1.44E+04
      4.40E+02
      1.20E+04
      1.71E+03
      3.61E+03
      5.00E-02
      2.70E+04
      9.30E+02
      l.OOE-06
 Temperature Dependent
 Elevation Dependent
 Elevation Dependent
      2.90E+04
      4.10E+05
 Temperature Dependent

 Elevation Dependent

 Elevation Dependent

 Elevation Dependent

 Elevation Dependent
      2.90E+04
                                  D-2

-------
                         TABLE D-l (Continued)
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
58
        Reactions
RD + NO  =  RCHO + N02
HD + N02  =  HCHO + N03
RD + N02  =  RCHO + N03
HD + HCHO  =  OZID
HD + RCHO  =  OZID
RD + HCHO  =  OZID
RD + RCHO  =  OZID
OH + PA  =  H20 + PA02
PA02 + NO  =  N02 + .85PAO + .15R02
PA02 + NO  =  NTRA
PAO  =  R02 + .5HCHO + .5RCHO
R02 + NO  =  N02 + PAO
PAO + 02  =  RCHO + H02
PAO + N02  =

OH + RCHO  =
RCHO + HV  =
RC03 + NO  =
RC03 + N02  =
PAN  =  RC03
 .85NTRA +  .15RCHO
   +  .15HONO
 RC03  +  H20
 R02 + H02  + CO
 C02 + N02  + R02
  PAN
i- N02
HCHO + HV  = H02 + CO
HCHO + OH  =  H20 + H02 + CO
R02 + H02  =  R02H + 02
OH + AR  =  H02 + AC
OH + AR  =  ARO
OH + AC  =  ARP + H02
ARO + NO  =  N02 + ARIN
ARO + N02  =  AN02
ARO + H02  =  AC + H202
ARIN  =  R02 + OH
AR + OH  =  H20 + ABO
ABO + NO  =  N02 + H02 + ACHO
  Rate Constant
     2.90E+04
     1.90E+04
     1.90E+04
     l.OOE+01
     l.OOE+01
     l.OOE+01
     l.OOE+01
     3.80E+03
     2.90E+04
     2.60E+03
     1.40E+05
     2.90E+04
     6.70E+04
     2.30E+03

     2.20E+04
Radiation Dependent
     2.90E+04
     1.70E+04
Temperature Dependent
Radiation Dependent
     1.60E+04
     4.20E+03
     1.67E+04
     3.33E+03
     4.90E+04
     2.90E+04
     1.90E+04
     1.80E+03
     l.OOE-01
     5.00E+03
     2.90E+04
                                  D-3

-------
                         TABLE D-l  (Continued)

          Reactions                                Rate Constant
59   S02 + OH  ->  S04                                1.76E+03
60   S02 + H02  -»•  S04 OH                            3.00E-02
61   S02 + HD  ->  S04 + HCHO                         2.90E+03
62   S02 + RD  -»•  S04 + RCHO                         2.90E+03
63   S02 + R02  ->•  S04 + PAO                         8.00E+00
64   S00 + A00  ->  SO. + AO                          8.00E+00
                                   D-4

-------
Species

  AO


  A02


  AR

  AC


  ARO


  ARP


  ABO



  ARIN


  ACHO
  AROH

  CO

  co2

  HD

  RD

  EPOX

  HCHO

  MONO

  HNO,
               TABLE D-2

    CHEMICAL SPECIES SYMBOL DEFINITIONS


           Symbol Designation

Alkoxy radical equivalent of AO-

Product of OH addition to olefin in the
presence of 0™

Aromatic hydrocarbons

Product of OH addition to aromatic hydrocarbon
followed by H atom abstraction by 0-.

Product of addition of OH to a cresol in the
presence of 02

Product of OH addition to AC followed by H
atom abstraction by 0?.

Product of H-abstraction from side chain alkyl
group of benzene ring followed by addition of
02 to radical formed

Intermediate formed from reaction of ARO with
NO, forming N0_

Aromatic aldehyde

Aromatic nitro compound

Cresol

Carbon monoxide

Carbon dioxide

Criegee intermediate (HCHO-)

Criegee intermediate (RCH02)

Epoxide formed from 0 atom addition to olefin

Formaldehyde

Nitrous acid

Nitric acid
Species No.

     17


     18

     12


     14


     13
     16


     15

     39

     38
     25

     26



      6

      4

     34
                                  D-5

-------
Species
  HN0
  H2°2
  HV
  M
  NO

  N02
  N03

  N2°5
  NTRA
  0

  °2
  °3
  OH
  OZID
  C2H4
  ALKE
  PA
  PAN
  PAO
  PA02


  R
  RCHO
  RCO,
          TABLE D-2 (Continued)
           Symbol Designation                  Species No.
Pernitric acid, H02H02                             20
Hydroperoxyl radical                               22
Water                                              33
Hydrogen peroxide                                  36
Photon
Any third body, such as N2 or 02
Nitric oxide                                        1
Nitrogen dioxide                                    2
Nitrate radical                                    19
Dinitrogen pentoxide                               21
Organic nitrate                                    37
Oxygen atom (ground state)                         32
Oxygen
Ozone                                               3
Hydroxyl radical                                   31
Ozonides                                           35
Ethene                                              9
Alkenes other than ethene                           8
Alkanes  (paraffinic hydrocarbons)                  10
Peroxyacetyl Nitrate                               11
Alkoxy radical formed by PA                        27
Alkyl peroxy radical from the 0,., addition          28
to the radical formed by H-abstraction
from a paraffinic hydrocarbon
Generalized alkyl group  (e.g., C2H5, C_H7, etc.)
Aldehydes other than formaldehyde                   7
Acyl peroxy radical                                24
                                   D-6

-------
                         TABLE D-2 (Continued)

Species                   Symbol Designation                  Species No.

  RO           Alkoxyl radical

  RO-          Alkyl peroxy radical                               23

  R02H         Product of disproportionation between HO-
               and R02

  S02          Sulfur dioxide                                     29

  S04          Sulfate                                            30
                                  D-7

-------
to
 I
a

PJ

CQ

£
      UJ
      Z
      I—t
      2

      oi
      PJ
      a,
       %
       u
       oi
       o   in
       UH   Oi
            UJ
       in   H
       PJ   UJ
       H   2
Z
o   in
I-H   Z
H   O
<£   HH
hH   H
       CO   UJ

       h-l   PJ
       Q
       O

       g
       oi
       UJ

       a,
       en
       o


o
•
o
1— (
CM
•st



o
•
o
^-
00



o
•
0
00
to


o
•
o
00
Oi



0
•
o
^f
"°

o

0

to




o
•
o
LO
1— (





o
*
o

0>
w
^
•^
•H
0
Nl
to
0
1
PJ
CM
oo
to
•
CM
to
o
j
PJ
\Q
^-
o
CM
to
0
1
UJ

^"
01
I— 1
to
0
1
PJ
vO
to
oo
to
o
1
PJ

1— 1
r~-
to
o
1
PJ
CM
o
v£>
I— 1
to
o
1
PJ
•*
Ol
*sf
r- 1
to
o
1
PJ
o
oo
to
1— 1


o
o



to
o
1
PJ
00
LO
to
•
CM
to
0
1
PJ
CM
o
CM
CM
to
o
1
PJ

1— 1
01
1— 1
to
o
1
PJ
"O
o
00
to
o
1
PJ
00
Ol
\0
to
o
1
PJ

00
LO
t— 1
to
o
1
UJ

^s.
•*
I-l
to
o
1
UJ
CM
vD
to
1— 1


o
o
I— 1


to
o
1
PJ

1^,
CM
•
CM
to
o
1
PJ
00
to
Ol
r— 1
to
0
1
UJ
CM
^-
oo
1— 1
to
0
1
PJ
r^1
to
^
to
o
1
UJ
o
CM
vO
to
o
1
UJ
CM
I— 1
LO
1— 1
to
0
1
PJ

0
"*
1— 1
to
0
1
PJ
\Q
Ol
CM
1— 1


o
o
CM


to
o
1
UJ
o
to
1— 1
•
CM
IO
o
1
PJ
0
0
00
1— 1
to
o
1
UJ

o
t^
1— 1
to
o
1
UJ
CM
o
*°.
to
0
1
UJ

Ol
^
to
o
1
UJ

00
to
1— 1
to
o
1
PJ
n-
00
CM
1— 1
to
o
1
PJ
vO

1— 1
^


0
o
to


to
0
1
PJ
0
CM
Ol
•
1—1
to
o
1
PJ

Ol
LO
r-t
to
o
1
PJ

o
LO
rH
to
o
1
PJ
o
i-H
^
to
0
1
PJ
00
0
to
to
o
1
UJ
CM
1— 1
CM
1— 1
to
o
1
PJ

.—1
1— 1
1— 1
to
o
1
PJ
^J*
1— 1
0
1—1


o
o
•*


to
0
1
UJ

1— 1
vO
•
I— 1
IO
o
1
UJ

1— 1
to
r-l
to
0
1
PJ

to
CM
1— 1
to
0
1
PJ
vO
^«
1—1
to
o
1
PJ
CM
vD
o
Tf
o
1
PJ
o
CM
I"»
oi

0
1
UJ
o
CM
00
00
•sT
o
1
PJ
0
*_J*
0
oo


o
o
LO


^j-
o
1
PJ
CM
1— 1
CM
•
1—1
^
0
1
PJ
o

LO
Ol

o
1
PJ
o
CM
00
00
^
o
1
PJ
o

1—1

0
1
UJ
o
o
LO
t"***
o
1
UJ
0
n-
00
vo'

o
1
UJ
o
00
r— I
NO*
^.
o
1
PJ
o
CM
LO
LO


0
o
\o


Tj-
o
1
UJ
o
oo
0
•
h"
^
o
1
UJ
o
00
CM
LO

o
1
PJ
o
vO
oo
^
^
o
1
PJ
o
^-
"*.

o
1
UJ
0
CM
o

o
1
PJ
0
o
vO
to
•st
o
1
UJ
o
^3-
CM
to
^
o
1
PJ
0
CM
oo
CM


o
o
^


.3-
0
1
UJ
o
0
o
•
to
•si"
o
1
UJ
0
0
1— 1
CM

0
1
UJ
o
CM
Ol
1— 1

o
1
UJ
o
^-
^
r~ ^
o
1
UJ
0
vO
LO
•st
o
1
UJ
o
00
to
1—1

0
1
PJ
o
vO
CM
i-H
•t
0
1
UJ
o
^sf
1— 1
1— 1


o
00
t^


LO
o
1
PJ
o
o
vO
•
to
LO
0

PJ
o
o
o
to
LO
o
1
UJ
o
o
0
to
LO
o
1
UJ
0
o
0
LO
0
1
UJ
o
o
"*.
LO
o
1
UJ
0
o
•*
CM
LO
0
1
PJ
o
o
^t
CM
LO
o
1
UJ
o
0
00
r— 1


o
vD
00


                                                        D-8

-------
 i
Q
UJ
i-J
CQ
       OJ



       2
       OJ
       o.
CM
O



g
tu

CO
UJ
H
O
            UJ
     OO
       H   O
       <   I-H
       I-H   H

       8   g
       CO   OJ
       CO   J
       I— I   UJ
       Q
       O
       £

       u
       t—t
       OH
       UJ

       a.
       co
       O

o

o
i-H
CM


O
•
O
^*
00
1— (


o
.
0
00
to
i-H

o
o
00


1


o
o
to

0
o
LO





0
•
o

0>
00
c
4:
•H
c
0
1
UJ
0
oo
LO
^
r— 1
0
1
UJ
o
i-H
CTl
vO
i-H
o
1
OJ
o
1— I
r~-

0
1
UJ
0
oo
"*
"
0
1
UJ
o
i-H
CM
vo
o
1
UJ
0
CT>
LO
0
1
UJ
o
LO
vO
LO
i-H
o
1
OJ
0
<=!•
to
LO



0
o

0
1
OJ
0
LO
LO
•"•
i—H
o
1
UJ
o
oo
00
vO
f— f
o
1
OJ
o
OO
vo

0
1
OJ
0
"*

o
1
OJ
o
1— 1
"
0
1
OJ
o
CTi
oo
LO
0
1
UJ
o
1— 1
vD
LO
1— 1
o
1
OJ
o
O">
CM
LO



0
o
1— 1
0
1
OJ
0
vO
tt
f~-
r-H
0
1
OJ
0
00

vO
1— (
o
1
OJ
o
^.
LO

o
1
OJ
0
to
to

0
1
UJ
o
o
*
0
1
UJ
o
O)
f^
LO
o
UJ
o
O)
•<*
LO
I— 1
o
1
UJ
o
vO
1— 1
LO



o
o
CM
o
1
OJ
o
o
CM
^
i-H
o
1
OJ
o
o
LO
vO
I— 1
0
1
UJ
0
00
to

o
1
UJ
o
r-H
vO
o
1
OJ
0
00
LO
o
1
UJ
o
LO
LO
o
1
OJ
o
CM
LO
i-H
o
1
OJ
o
to
°i
*



0
o
to
0
1
OJ
o
to
0
f-
i-H
0
1
OJ
0
o^
CM
VO
i-H
o
1
OJ
0
^
o

o
1
UJ
o
CM
oo
LO
o
1
OJ
0
to
LA
LO*
o
1
UJ
o
to
CM
LO
o
1
UJ
o
CM
o>
*
i-H
o
]
OJ
o
^
LO
*



o
o
^f
o
1
UJ
0

LO
vO
i-H
0
1
UJ
o
CTi
r--
LO
i-H
o
1
UJ
0
vO
LO
LO
- -.f
o
1
UJ
0
i-H
to
LO
0
1
UJ
0
to
o
LO
0
1
UJ
0
CM
t--
, -1
o
UJ
o
en
to
*•
__!
o
1
UJ
o
Tj"
0
^'



o
0
LO
o
1
UJ
o
i-H
00
LO
i-H
o
1
UJ
o
Ol
Ol
^
1— 1
0
1
UJ
0
vO
f^
'
o
1
UJ
o
.—1
LO

o
1
OJ
0
to
CM
'
o
1
UJ
o
CM
CT>
to
o
1
UJ
o
o
vO
to
1— 1
o
1
OJ
o
LO
CM
to



o
o
vO
o
1
OJ
o
i-H
LO
"*
1— 1
o
1
OJ
o
CT^
vO
to
r-H
0
1
OJ
o
oo
•*
to
r! t
o
1
OJ
o
vO
CM
to
o
1
UJ
0
o
0
to
o
1
UJ
o
CM
r^
CM
o
1
UJ
0
to
•^f
CM
i-H
o
1
OJ
o
^f
1— 1
CM



o
o
I--
0
1
UJ
o
o
00
CM
r-H
o
1
UJ
o
r— 4
i-H
CM
r-H
o
1
UJ
o
vO
CTi
r— 1
o
OJ
o
Ol
t^
i-H
o
1
OJ
o
o

1— 1
o
I
UJ
o
I— 1
"*
1— 1
o
1
UJ
o
to
CM
i-H
i-H
o
1
UJ
0
LO
o
i-H



o
00
f-.
CM
o
1
UJ
o
o
o
LO
CM
o
1
UJ
o
o
0
*
CM
o
1
UJ
0
o
f-
to
o
1
UJ
0
o
••*
to
CM
0
1
UJ
0
o
I— 1
to
0
1
OJ
o
0
00
CM
CM
o
UJ
o
o
LO
CM
CM
o
1
UJ
o
0
to
CM



0
vD
00
                      M
                                                         D-9

-------
LO
 I
Q
UJ

CQ
      PJ
      H
      UJ
      CL,
      *
      O


      I
      o
      Ci,

      co
      UJ
      H
       U
       O
       co
       Q
       O

       O

       o,
       u
       hH
       Oi
       PJ

       o.
       co
       o
     co
     a.
     UJ
     H
     UJ
     •s.
Z   CO
O   2
t-H   O
           UJ

           UJ
CM
O
O
•
0
1 — t
CM
]
UJ
o
CM
o
1— 1
to
o
•
o
^J-
00
I-H
o
1
UJ
0
vO
00
00
to
o
•
o
00
to
1— 1
o
1
UJ
0
vO
•*
00
to
o
0
•
o
00
0>
1
PJ
o
CM
0
00
to
0
1
o
•
0
•*fr
UJ
0

LO
^
to
o
o
•
0

to
1
PJ
o
Ol
0
^
to
o
1
o
.
o
LO
PJ
0
CM
vO
vO
to
o
1
PJ
0

o
o
T^-
i-H
^
M
c
"^
•p
•H
c
0)
M


o
o




CM
o
1
UJ
o
i-H
o
1 — t
to
o
1
PJ
0
OO
P-.
00
to
o
1
UJ
o
00
to
00
to
o
1
PJ
o
T^-
01
^
to
0
1
UJ
o
[^
•*
^
to
o
1
UJ
o
0
o
^
to
o
1
UJ
o

LO
vo'
to
o
1
UJ
0

0
vO


o
o
1— 1



to
o
1
UJ
o
LO
00
O>
to
o
1
UJ
0
o
LO
00
to
o
1
UJ
o
o
I — 1
00
to
0
1
UJ
o
t~^
^
^
to
o
1
UJ
0
1— 1
CM
^
to
o
1
UJ
o
LO
p^
vo'
to
o
\
UJ
o
Ol
CM
vo'
to
o
1
PJ
0
1— 1
00
LO


0
0
CM



to
o
1
PJ
o
[^
to
Ol
to
o
1
PJ
o
I-H
o
00
to
o
1
UJ
o
CM
vO
^
to
0
1
UJ
0
o^
i-H
^
to
o
1
PJ
o
LO
p^
vO*
to
o
1
PJ
0
Ol
CM
vo'
to
0
1
PJ
o
^J-
00
LO'
to
o
1
UJ
o
00
to
LO


o
o
to



to
o
1
UJ
o
I-H
vO
00
to
o
1
PJ
0
\o
CM
^
to
o
1
UJ
0
CTi
OO
VO
to
o
1
UJ
o
OO
••*
vO
to
o
1
UJ
0
LO
0
vo'
to
o
1
UJ
o
CM
vO
LO
to
0
1
UJ
0
Ol
t— 1
LO
to
o
1
PJ
o
^j-
p-
^


o
0
^-



to
o
1
PJ
o
o
LO
r"
to
o
1
UJ
o
0
CM
vO
to
o
1
UJ
0
LO
00
LO
to
o
1
PJ
o
t*^
•*
LO
to
0
1
PJ
0
oo
o
LO
to
o
1
UJ
o
Ol
vO
^'
to
o
1
PJ
o
00
CM
*
to
o
1
PJ
0
00
00
to


o
0
LO



to
o
1
UJ
o
*^J-
o>
LO
to
0
1
UJ
o
•s!"

•*
to
o
1
UJ
o
^«
^
"*
to
o
1
UJ
0
CM
I— 1
^
to
o
1
PJ
o
0)

to
to
o
1
PJ
o
vO

to
to
o
1
PJ
0
to
I— 1
to
to
o
1
PJ
o
o
00
CM


o
0
vO



to
o
1
UJ
o
1— 1
00
to
to
o
1
UJ
o
00
00
CM
to
0
1
UJ
o
^o
^^o
CM
to
o
1
UJ
0
^J-
rs-
CM
to
0
1
UJ
o
CM
CM
CM
to
o
1
UJ
0
01

1-1
to
0
1
UJ
0
00
p^
I— 1
to
o
1
PJ
o
vO
LO
r-{


o
o
[^



to
o
1
PJ
o
i-H
00
^
to
0
1
PJ
o
00
CM
1— 1
to
o
1
UJ
0
f^
r— 1
t— 1
to
o
1
UJ
o
[^
o
I— 1
Tt-
0
1
UJ
0
o
v^
CTl

o
1
UJ
o
o
vO
00
^
o
1
UJ
o
o
vO
r-
•sf
o
1
PJ
o
o
r^
vO


0
00
f-^



T^-
o
1
PJ
0
o
01
CM

0
1
UJ
0
0
CM
CM
^
o
1
UJ
0
0
i-H
CM

o
1
UJ
o
o
01
i-H

0
1
UJ
0
0
00
r— 1
"*
o
1
UJ
o
0
vO
I— 1

0
1
UJ
o
o
LO
.-H
Tfr
o
1
PJ
o
0
to
i-H


o
vO
00



                                                                                                  o
                                                                                                  o
                                                                                                  rt
                                                                                                  a>
                                                                                                  §
                                                                                                  •H
                                                                                                  
-------
 i
Q
UJ


03
      UJ
      Oi
      UJ
      (X
      §

      g

      oi
      O   CO
      PU   ei
           UJ

      PJ   UJ
      H   ^
§
    CO

    o
      CO   UJ
      CO   i-J
      rH   UJ
      Q
      O

      %
      u
      1—I
      oi
      PJ

      a.
      co
      o

o
.
o
rH
CN

O
•
0

00
rH


O
•
0
oo
to
rH



0

O
00
01




o
.
o

0



0
•
o
vO
to




0

o
LO





o

o

o
1
UJ
o
o
^

o
1
UJ
o
t^^
CN


0
1
UJ
o
to
CN
I— 1
rH
o
1
UJ
o
00
rH
1— (
rH
o
1
UJ
0
to
rH
•
rH
rH
0
1
UJ
o
00
o
1— 1
i— 1
o
1
UJ
0
CN
o
rH
CN
o
1
UJ
0
00
LO
Ol
o
1
UJ
o
o
"*.

o
1
UJ
o
\Q
CN


o
1
UJ
o
CN
CN
rH
rH
0
1
PJ
o
p^
rH
rH
rH
o
1
UJ
o
CN
1 — 1
•
rH
rH
O
1
UJ
0
f-^
o
tH
rH
0
1
UJ
0
rH
O
rH
CN
O
1
UJ
0
o
LO
Ol
o
1
PJ
o
oo
to

o
1
UJ
o
^>
CN


o
1
UJ
o
0
CN
rH
rH
o
1
UJ
o
LO
rH
rH
rH
O
1
UJ
o
o
rH
•
rH
rH
O
1
UJ
o
10
o
rH
CN
0
1
UJ
o
f-^
00
oi
CN
o
1
UJ
0
LO
CN
01
o
1
PJ
o
LO
to

o
1
PJ
0
rH
CN


o
1
UJ
o
vO
rH
rH
rH
O
1
UJ
o
CN
rH
rH
rH
O
1
UJ
o
vo
o
•
rH
rH
O
1
UJ
0
o
o
1— t
CN
O
1
UJ
0
LO
-*
01
CN
o
1
UJ
0
TH
00
00
o
1
UJ
0
C31
CN

o
1
UJ
0
LO
-*


o
1
PJ
o
o
1— 1
rH
rH
0
1
UJ
o
LO
o
rH
CN
o
1
UJ
o
vO
01
•
Ol
CN
o
1
PJ
0
00
to
Ol
CN
0
1
UJ
0
p^.
t~~
00
CN
o
1
UJ
o
CN
rH
00
o
1
PJ
0
o
CN

0
1
UJ
0
^*
0


o
1
UJ
o
0
o
rH
CN
0
1
UJ
0
rH
LO
oi
CN
o
1
PJ
0
LO
Oi
•
00
CN
0
1
UJ
0
f-s.
to
oo
CN
0
1
PJ
0
f-^
f^
^
CN
o
1
UJ
0
o
rH
tv!
CN
0
1
UJ
0
LO
o

0
1
UJ
o
vD
oo


0
1
UJ
o
to
*fr
00
CN
o
1
UJ
o
LO
Ol
^
CN
o
1
UJ
0
r-l
rj"
•
^
CN
o
1
UJ
o
LO
00
vO
CN
o
1
UJ
o
vO
CN
vO
CN
o
1
UJ
o
to
vO
LO
CN
o
1
UJ
0
«3"
Ol

o
1
PJ
o
^J-
to


0
1
UJ
o
\,Q
01
LO
CN
o
1
UJ
o
^*
LO
LO
CN
o
1
UJ
0
00
o
•
LO
CN
o
1
UJ
0
0
vQ
^
CN
o
1
PJ
o
rH
TH
*
CN
0
1
UJ
0
1— 1
vO
to
CN
0
1
UJ
0
00
VO

0
1
UJ
o
^1-



0
1
UJ
o
fs^
rH
to
CN
0
1
UJ
o
01
00
CN
CN
o
1
UJ
o
o
vO
•
CN
CN
o
1
UJ
o
01
CN
CN
CN
o
1
UJ
0
0
o
CN
CN
0
1
UJ
0
•<*

rH
CN
o
1
HJ
o
00
^

o
1
w
o
vO
LO

to
o
1
UJ
o
o
rH
VO
to
o
1
va
o
o
f^
in
to
o
1
UJ
0
0
CN
•
IO
to
o
1
UJ
0
o
00
*'
to
0
1
UJ
o
0
to
"*•
to
0
1
UJ
o
o
Ol
to

JZ
•p
•H
c
NI
O
*
o



o
•
0
rH


O
•
0
CN


o
•
0
to


o
•
o
^J-


o
•
o
LO


o
•
o
vO


0
•
o
f-^


o
•
oo
r-.


o
•
*sD
oo


                                                    D-ll

-------
     New assumptions concerning the typical reactivity of individual
hydrocarbon groups in the atmosphere are employed.   The rate constants
for reactions involving alkanes (PA) assume that the atmospheric alkane
mixture is as reactive as pure n-butane.  The atmospheric mixture of
aromatic hydrocarbons (AR) is assumed to be as reactive as a 50 percent
o-xylene/50 percent m-xylene mixture.  For the reactions involving
higher olefins (alkenes excluding ethylene) the reactivity of the ruixture
is assumed to decrease with elevation.  It is believed that the most
reactive olefins  (double bonded C.'s, C 's, and C6's), which are emitted
near the surface, react so quickly that few are in fact available for
diffusion to the higher elevations.  In other words, their reaction time
scale is significantly shorter than their diffusion time scale.  The
elevation dependent rate constants for reactions involving higher olefins
(ALKE) are shown in Table D-7.  In the lowest two cells of the air
parcel (typically 0 to 150 meters), the higher olefin mixture is assumed
to be as reactive as a 50 percent propene/50 percent cis-2-butene mixture.
In the third and fourth vertical cells, the mixture is assumed to react
as if it were composed of 75 percent propene/25 percent cis-2-butene.
Above the fourth cell, the rate constants for pure propene are assumed.
     In this mechanism, the temperature dependence of the dinitrogen
pentoxide (N205) dissociation rate constant is included.  The rate
constant for this reaction step is determined from the expression
          R-  = 3.42 x 1016 exp (-10,600/T) (min"1"1
           lo
where  T is temperature in degrees Kelvin  (Baulch et al. 1973).
     In order to utilize the two olefin class mechanism with the RAPS
emission inventory, the RAPS single olefin emission rates are uniformly
partitioned into  ethylene and higher olefin emission rates.  The single
olefin emission rates are partitioned assuming a 50/50 split on a molar
basis.  This assumes that olefins  emissions are approximately 35 percent
ethylene and 65 percent  higher olefins by weight which is typical of
vehicle olefin emissions.
     Two additional features have been implemented in the chemical
diffusion module  for computing certain species concentrations.  The
concentrations of oxygen atoms  (0) and hydroxyl radicals  (OH) are
computed using algebraic expressions based on the steady-state or
chemical equilibrium assumption.

                                  D-12

-------
                               TABLE D-7
                 HIGHER OLEFIN REACTION RATE CONSTANTS
         Reaction
           25
          Rate Constants
Cells 1$2    Cells 3$4    Cell 5
03 + ALKE  +  .5HCHO + .5RCHO +    4.58E-2
          .4HD +  0.4RD +  . 1R02

          k!8
OH + ALKE  -»•   A02                 5.80E+4
          k23
0 + ALKE  •*   .3EPOX + . 3RCHO +    1. 46E+4
          .4H02 + .4R02
              2.37E-2    1.60E-3
              4.75E+4    3.70E+4

              9.90E+3    5.20E+3
Both species react so quickly that the assumption is appropriate.   By
computing their concentrations via explicit algebraic equations instead
of numerical integration, the numerical stiffness of the system of
differential equations is reduced.  This results in computer time savings.
Second, the concentrations of six "product only" species (not reactants)
are computed in an approximate manner.  These species include nitric
acid, organic nitrates, aromatic nitrates, aromatic aldehydes, hydrogen
peroxide, and ozonides.  These predicted concentrations are probably
accurate within an order of magnitude and may be of interest to researchers.
     Lastly, the manner in which the phenomenon of surface deposition is
simulated in the model has been reformulated.  The deposition term in
the model's equation has been modified so that it is calculated assuming
only the concentrations in a ten meter thick surface layer are effected
by the phenomenon.  Formerly, the effects of surface deposition may have
been exaggerated by assuming the concentrations in the lowest 30 to 100
meters of the air parcel were subject to deposition.
                                   D-13

-------
2.   KEMOD Input Data Modifications

     Numerous changes in the KEMOD input deck are required for simulations
with the improved chemical mechanism.   A listing of the revised portion
of the input deck for the sample problem is shown in Figure D-l.   This
figure includes all the data cards positioned after the emission rate
cards, even though only some of the cards differ from that described in
Section 5.  The general sequence in which the cards are read is,  of
course, identical to that described in Section 5.
     The changes in the data deck are summarized as follows:

     1)   The number of reaction equals 64.
     2)   The number of species equals 39.
     3)   The number of species not formally integrated is 9.
     4)   There is a 39 card species list.
     5)   There are some different emission species indices.
     6)   N02 is specified as a species with surface deposition.
     7)   There are different indices for S02 and S04 on the deposition
          cards.
     8)   There are 39 cards for initial concentration  (see Table
          D-8 for delineation of user specified and internally computed
          species initial concentrations).
     9)   There are 64 chemical rate constant cards.
    10)   There are 64 chemical reaction cards.
    11)   There are 4 time-varying photolyic reactions  and 4 cards indicating
          their reaction numbers.
                                    D-14

-------
                              TABLE  D-8




    USER SPECIFIED AND INTERNALLY COMPUTED  INITIAL  CONCENTRATIONS
    User Specified Species




           NO




           03




           CO




           HCHO




           RCHO




           ALKE




           C2H4




           PA




           AR




           H02




           S02




           S04




           OH




           H20




           HN03*




           OZID*




           H202*




           NTRA*




           AN02*




           ACHO*
Internally Computed Species




          NO 2




          HONO




          PAN




          ARO




          AC




          ARIN




          ABO




          AO




          A02




          N03




          HN04




          N205




          R02




          RC03




          HD




          RD




          PAO




          PA02




          0
*"Products Only" Species
                                  D-15

-------
3.   KEMOD FORTRAN Source Code Modifications

     In order to accommodate the changes related to use of the improved
mechanism, many KEMOD subroutines have been modified.  In four subroutines
(DRIVE, PEDERV, PSET, and TSTEP) the user must change the array sizes in
common block CHEM2 so that it appears as follows:

     COMMON/CHEM2/  CONIN (40, 5), WTMOLE (40), RATKON (65), RATEFF (65),
     1              RATEV (4, 5), QRATE, NVRATE, LOCVRT (4)

This is the only change in these four routines.  A new subroutine named
PHOTOR has been added to replace the tasks formerly performed by sub-
routines PHOTOD and UPRAT2.  The names of subroutines with significant
changes are shown below.  Complete listings of these subroutines appear on
the following pages.
                         DIFFUN
                         ISTATE
                         JACOB
                         KEMOD2
                         PHOTOR
                         PRODUK
                         RATEHI
RATES
STEADY
TEMPR
UNMIXR
UPFLX1
UPSORC
                                    D-16

-------
IMAGES
OrtTA-CAPOS
p ft pr»
\jf*~ J
3M
323
323
321*
325
326
327
328
329
330

CARD
311
332
333
33i»
335
336
337
339
339
3UO

CAPO
3<»1
3b2
3i*J
31* '»
3<»5
31*6
3i»7
3<»8
3U9
350

CARD
351
35?
353
35<»
355
356
3? 7
358
359
360
1 11 21 31 M
POINT SOURCES 1*6 733.35 .ocoo
.(jcoo
<*& .5037*000 .9812-001
POINT SOURCES <»7 733.8i» .9919-038
.711*1-011
1*7 .3779-001 ,5!*20*OCO
POINT SOURCES 1*8 735.«i» .75<»1-008
.coca
i»8 .525.0*600 .1023*000
POINT SOURCES <»9 736.08 .8620-008
1 11 21 31 >«l

.0000
i»9 .52<«9*OCO .1023*000
POINT SOURCES 50 736.22 .7189-038
.UCOO
50 .52&5*flOi) .1326*003
POINT SOURCES 51 7<«2. 7<» .1731-008
.1503-011
51 .i»C26-OOl .5771*003
POINT SOURCES 52 7<*2.7<» .1731-008
.1503-311
1 11 21 31 M

52 .4.126-D01 .5771*003
POINT SOURCES 53 7i»2. 87 .&20!>-OC8
.3005-011
53 .l»12t>-001 .5893*000
POINT SOURCES 5U 752.32 .6287-039
.<»527-012
5!» .5265*000 .1026*000
POINT SOURCES 33 -18.00 ,11008
.0000
INITIAL INTEGRATION TIME STEP SIZE 1.
1 11 21 31 '41

MAXIMUM INTEGRATION TUE STEP SIZE 6.0
iNTF-annoN TRROR CONTROL CRITERIA i.
UPnATE INTERVAL 15.0
POINT IHT^RVAL 3U.C
"0 HE OUTPUT INTEGRATION PA*A1ETERS< TES
00 WE 3ENEPAT£ PHOTOOI SSOCIA T ION RATES< Y£S
SHOULD THE* V4RY WITH ELf.V4TION< Y£S
00 HE HAVE SKY CLEARNESS RATIOS INPUT< Y£S
00 WF. HAVE TEMPERATURES INPJT< YES
SHOULD WE PUN;H GROUND CONC£NTRATIONS< NO
31
. 3910-008
.ac-jo
,157Q*COO
.711*1-011
.120'»-003
.1515*003
.0000
.3C03
.1635*000
.coca
51

.3003
.1635*000
.0003
.0003
. 1641*003
.15UJ-C11
.2086-009
.1610*000
.1503-011
.2085-009
51

.1610*000
.3006-011
.3215-009
.16<»S»DQO
.<»527-012
.7635-010
.161*1*000
.000)
.0003
OE-Ui»
51


OE-03








61
.0000
.0003
.21*12*000
.7l«.l-Gll
.1660-010
.2687*CCO
.0000
.COOO
.2392»(
-------
IMAGES OF DflTA-CAROS

361
362
363
36!»
3C-5
365
^67
365
369
370

CARD
371
372
777
37k
375
376
377
378
379
3^0

CARQ
381
38?
383
31if
385
386
3»7
388
389
390

CARD
391
392
393
39U
395
396
397
398
399
<»00
1 11 21 31 i
•HXIM'JM NlJHOt^ OF INTEGRATION STEPS
NU1RE* OF CHEMICAL REACTIONS
NUM.If R OF SPE3IES
NUMPF.? OF SPE3IES NOT INTEGRATED
MlHSfR OF VERTICAL MESH POINTS
FLFVATION OF FIRST VERTICAL IESH POINT
FLEVATION OF StCOVO VERTICAL MESH POINT
ELEVATION OF THHD VERTICAL 4ESH POIHT
ELEVATION OF FOURTH VERTICAL MESH POINT
ELEVATION OF FIFTH VERTICAL ItSH POINT
1 11 21 31

S"ECHS NAMEt MOLE HT, AND BOUND CONO
2
1
/4
5
6
7
3
9
10
1 11 21 31

11
12
13
Ik
15
16
17
18
19
20
1 11 21 31

21
22
23
2k.
25
26
27
28
29
3C
1»1





a.o
120. 0
3UO. 3
600.0
120Q.
kl

no
N02
03
MONO
C3
HCMO
RCHO
ALKE
C2Hl»
PA
l»l

PAN
AR
ARO
AC
ARIN
A30
AO
A32
N03
HNOI»
kl

N205
H32
^02
>^C03
HJ
13
PAO
PA02
S02
SOk
51 61 71
1003
6!»
33
9
5
•METERS ABOVE SURFACEI



0
51 61 71

3C.
1(6. 1
1*8. 1
W.
28.
30.
58.
<»9.
28.
58.
51 , 61 71

121.
92.
123.
ICO.
100.
100.
58.
7U.
62.
79.
51 61 71

108.
33.
89.
1C 3.
7*« .
73.
73.
89.
&<*.
96.
                              Figure D-l  (Continued)
                                        D-18

-------
IMAGES  OF DATA-CARDS
CARD
1*01
U02
U33
<*0<.
i»?5
t.36
U07
t.04
1.09
MO

CARD

'.I?
1.13
kl^t
1.15
1.15
1.17
1.18
1*19
1.20

CARD
U21
1.22
<»23
<.2<»
1.25
(.26
1.27
1.28
<»29
i»30

CARD
Ml
*»32
1.33
1.31.
«»35
1*1 f>
U37
(.38
1.39
«.<»o
1 11 21 51 1.1
31 OH
32 0
33 H20
3 1» HN03
55 07.10
36 H202
37 NTRA
38 AN02
39 ACHO
SPECIE INDEX FOR AJEA SOURCE FLUX NO. i
1 11 21 31 <»1

SPECIE INDEX FOR AREA SOURCE FLUX NO. 2
SPECIE INDEX FOR AREA SOURCE FLUX NO. 3
SPECIE INDEX FOR AREA SOURCE FLUX NO. l»
SPECIE INDEX FOR AREA SOURCE FLUX NO. 5
SPECIE INDEX FOR AREA SOURCE FLUX NO. 6
SPECIE INDEX FOR AREA SOURCE FLUX NO. 7
SPECIE INDEX FOR POINT SOURCE FLUX NO. i
SPECIE INDEX FOR POINT SOURCE FLUX NO. 2
SPECIE INDEX FOR POINT SOURCE FLUX NO. 3
SPECIE INDtX FOR POINT SOURCE FLUX NO. l»
1 11 21 31 "»1

SPECIE INDEX FOR POINT SOURCE FLUX no. 5
SPECIE INDEX FOR PCINT SOURCE FLUX NO. 6
SPECIE INOEX FOR POINT SOURCE FLUX NO. 7
DEPOSITION SPECIE INDEX .VELOCITY , EXP.
OPPOSITION 3P-CIE INDEX, VELOCITY, EXP.
DEPOSITION SPECIE INDEX, VELOCITY, EXP.
DEPOSITION SPECIE INDEX, VELOCITY, EXP.
NO 1C 1 3.CE-03 2.5E-03 1
NO? 2 COMMUTED
03 1C 3 .029 .01.3 .058
1 11 21 31 1.1

HOMO I. COMMUTED
CO 1C 5 .133 .110 .066
MflMO 1C 6 '..OE-OI* S.'.E'O'. 2
"CHO 1C 7 2.CE-OI. 1.7E-OI. 1
ALKF. ic a 2.ot.-o'» i.7E-o<» i
C2i-". 1C 9 U.OE-01* 3.I.E-01* 2
PA 1C 10 3.CE-03 2.51.E-03 1
PAN 11 COHPUTED
AR 1C 12 6.CE-0". 5.10E-0*. 3
ARO 13 COMPUTED
51
17.
16.
Ifl.
63.
SC.
3k.
eo.
ICQ.
70.
1
51

13
1
12
5
5
29
1
13
3
!*
51

3
5
29
2
3
29
33
.5E-03 1

.055
31


.06S
.OE-OI. 2
.CE-0!» 1
• OE-Gif 1
.OE-CI. 2
.5E-03 1

.DE-OS. 3

61 71










61 71











61 71




0.60 1.0
0.30 1.0
0.60 1.0
0.18 1.3
.5E-03 1.5E-03

.o&e
61 71


.366
.OE-OI. 2.0E-C<»
. JE-OI. i.o t-*)1.
.OE-0<» l.OE-Ci*
.OF-0'. 2.0t-C«>
.5E-03 1.5E-C3

.OE-QI. 3.0E-OI.

                                 Figure D-l  (Continued)
                                          D-19

-------
IMAGES
                   11
21
                                      31
1*1
51
61
                                                                            71
Cft"0
i*i»8
i*i*9
i«50
CARD
i«51
U52
<»53
i*5i«
1*55
i»56
1*57
1*58
U59
I*SO

GIRO
1*61
1*62
U63
i*6U
<»85
1*66
1.67
1*66
1*69
1*70
CARD

i»72
<»73
U7I*
1*75
!»76
<»77
i* 78
1*79
t»no
AC
ftPJN
fiO
AO?
N03
HNOl*
N?05
HO?
P02
1

HT
*<*E«-0!»
1. i*UE^O'4
U . i» OE *G 2
1.20E*Ol»
1.71E»03
3.61F*U3
5.00E-02
2. 70£.»0'4
















                               Figure D-l (Continued)
                                       D-20

-------
IMAGES  OF  OATA-C4ROS
                    11
31
61
71
HI
kfiZ
<*83
«.8<*
1.85
MS
l»i»7
<*40
I.S9
«.9C
1
1.91
«.92
".93
1.94
1.95
••Ifc
i»97
1.98
••99
500
1

531
502
53.1
50<«
505
506
507
508
509
510
1
511
512
513
5U
515
516
517
516
519
520
KEA3TION NO.
REACTION MO.
REACTION NO.
REACTION NO.
REACTION NO.
REACTION NO.
PEA3TION NO.
REACTION HO.
REACTION NO.
FEA2TION NC.
11 21
REACTION NO.
PEA3TION NO.
REA3TION NO.
REACTION NO.
REACTION NO.
REACTION NO.
REACTION NO.
REACTION NO.
REACTION NO.
REACTION NO.
11 21

REACTION NO.
REAGTION NO.
REACTION NO.
REACTION NO.
REACTION NO.
REACTION NO.
REACTION NO.
REACTION NO.
PEA3TION NO.
REACTION NO.
11 21
REACTION NO.
REACTION NO.
REACTION NO.
REACTION NO.
REACTION NO.
REACTION NO.
REACTION NO.
REACTION NO.
REACTION NO.
REACTION MO.
15
16
17
IB
19
20
21
2£
23
2<«
31
25
26
27
28
29
30
31
32
33
31.
31

35
36
37
38
39
<»0

-------
IMAGES or

521
522
5?3
?2"»
525
526
527
52B
529
530
p A D o
O UL *\ \f
531
53?
533
53U
535
536
537
53fl
539
5UO
PA on
o« n.u
5<»2
5i*3
?i»<»
5
-------
Revised FORTRAN Subroutines for KEMOD

set
563
563
56?
566
567
56*
570
CARD
571
573
573
575
576
577
578
579
580

CARD
F81
513
583
581*
5*5
556
587
59*
589
590

CAPO
591
593
59?
59V
595
59*
597
598
599
600
1
l.HD
1.R3
1.R7
l.OH
1.PH33
1.PA33
l.PAD
1.R02
l.PftD
1
1.P4D
1.R033
It H5HO
1.H3HO
l.RO?
l.OH
1

l.OH
l.OH
1.8*3
1.4*3
l.flRD
1,A*IN
I.A*
1.A93
1.S03
1.S03
1

1.S32
1.SD3
1.S32
l.SO?
LATITUDE
tONGTTJOE
TIME ZONF
OATF
11
f
*
t
»
t
4-
4-
»
»
11
»
t
4-
*
»
f
*
11

4-
V
t
*
4-

4-
f
f
+
11

t
4-
»
4-




1
1
1
1
1
1
1
1
1
1
1
1

1
1
1


1
1
1
1
1

1
1
1
1


1
1
1
1

,


*
*
*
*
*
*
•
•
•
*
t
•

•
•
•


•
t
•
•
•

•
%
»
•


•
t
•
•



31
H;HO
RCHO
HCHO
RCHO
pa
HO
MO
MO
03
31
N02
RCHO
HV
MO
H03 »
HV
OH
H02
AP
31

AR
AC
NO
N02
H02

OH
NO
OH
H02
31

HO
RO
R02
802



31
r
31
s
=
s
'S.
~
31


s
s
•s
f
•a
s
s
t
s
31


s
*
f




1.
1.
1.
1.
1.
kl
OZIO
OZIO
OZIO
OZIO
H?0 »
N02 f
NTRA
R32 »
N02 *
RCHO *
,85NTRA »
l.RCO? »
1.R02 »
CO? »
1.P4M
I.RC03 »
1.
1.

1.


1.

1.

1.
1.
1.
1.
1.
*•


1.
1.
1.
1.



H03 «•
H30 *
R02H »
AC »
"4l

ARO
ARP f
N02 *
RM02
A; »
R02 *
H30 »
N32 »
S0
-------
IMAGES Of DATft-CA'DS
                    11
                                        31
51
                                                                      61
71
601
60?
60 3
60<*
675
60S
6C7
60^
609
610

CARO
611
612
613
Sli*
615
616
617
61B
619
620

CARO
621
6?2
623
62<*
625
626
627
628
629
6^0
p ft o n
\j >\ » i )
631
63?
f-33
634
635
636
637
638
639
6U3
REACTION MUMPER OF
REACTION MUMPER OF
REACTION NUMBER OF
CLEARNESS RATIOS
CLEARNESS RATIOS
CLEARNESS RATIOS
CLEARNESS RflTIOS
CLEARNESS RATIOS
CLEARNESS RflTIOS
CLEA^ESS RATIOS
1 11

CLEARNESS RATIOS
CLEARNESS RATIOS
CLEARNESS RATIOS
CLEARNESS RATIOS
CLEARNESS RATIOS
CLEARNESS RATIOS
TEMPERATURE t CEG
TEMP-PATURE (OEG
TEMPERATURE (OE5
TEMPERATURE (OEG
1 11

TEMPERATURE (OtG
TEMPERATURE (DEG
TEMPERATU°E (OEG
TEMPERATURE (OEG
TEMPERATURE (OEG
TEMPERATURE (OEG
TEMPERATURE (OEG
TEMPERATURE (OE3
TEMPERATURE «0e&
niFFjsivmrs i
i 11

tllFTUSIVITIES 2

OIFFJSIVITI-15 3

DIFFUSIVITICS !*

DIFFUSIVITIES 5

OIFFUSIVTTIES 6
2ND PHOTOLYTIC RATE
3RO PHOTOLYTIC RATE
<»TH PHOTOLYTIC RATE







21 31 lit







C)
C)
C)
Cl
21 31 i»l

C)
C)
C)
C)
C)
0)
ct
C)
C)
360. 0
21 31 Ui
20.1 8.8
!*2C . li
15.7 S.I
1*80 . 3
27.5 33.0
5<*o . a
27.8 36.1*
SOt.J
1823. fl 9.0
660 . d
5
<«3
<*7
360. COO
<*20. oao
<*80.003
5UO.OOO
600. CO)
660. COO
720.003
51

780.000
8<*G.039
900.009
960.000
1020.01)3
-10.009
360.009
<*20.000
1*80. COO
5<*0. OCJ
51

600.009
660. 000
720.000
780.009
81*0.009
900.003
360. QUO
1020.009
-10.000
52.3
51
B.8
7i*. 5
6.1
2<*C.2
33.3
1331.3
36. !»
1621.3
9.9
1U6.S
MONO » HV
RCHO » HV
HCHO t HV
.51*7
.702
.757
.72
-------
IMAGES OF OATA-CftROS

CAPO
6<»1
6<»2
6<»3
6<»!»
6<»5
6<»6
6<»7
6<»8
6U9
650

CARD
651
65?
653
65U
655
656
1 11


niFF'JSIVITir.3 7

OIFFJSIVITIES 8

OIFFU5IVITIFS 9

OIFF'JSIVITIESIO

OIFF'JSIVIMF.311
1 11


DIFFUSIVITIES11

OIFFUSIVITIF.S11

FNO
21 31

290.9
7^C.O
"*9ic.r
710.0
5702.1
e<«o.o
b39!».2
900.0
3369. J
960.0
21 31

1091.7
1020.0
1091.7
-ID. U
.0

<«1

8.2

106.3

tt38.<»

290.0

191.9

"»1

39.1

39.1

.0

51

5.2
2827.9
106.3
2019.3
«.38.'«
1729.5
290. 3
1<»2I«.3
191.9
1U39.3
51

39.1
1U39.5
39.1
• )
.9

61


2827.8

2019.0

1729.5

1<»2<».5

1<»39.5
61


1<»39.5

.0


71


75i«3.1

6310. U

5118.5

<»121.3

2183. 3
71


2183.3

.0


                                      D-25

-------

c


c
c
c


















c

c

c





<»0
50
C
c
c




60










70



SUBROUTINE DIFFUN (NfTtY,rOOTI




YOOT = FtY.TI

INTEGER BCFLAC
CCMMON/CHEM1/ NOSTAT, NOSTH1, NOREACt
1 NOSPECt NSTOY, NK
COHHON/CHEM2/ CONINf»0,5) t MTMOLEUBI, RATKON(65)t
1 RATEFF(65I, RATEV(«»,5>, ORATE,
2 NVRATEt LOCVRTHI
COMMON/CHEH3/ ZEE<5I, DELZCfl, HTCELLC6I,
1 TOELZ<2I t DFINIT16I, SCALOMdtl,
Z DCOFt5l, FLXMALK»Olt FLXOGEUOI,
3 BCFLAGUOI, OPRATEdfll, OEPOHRU8I,
if LOCOPFUOIt NOPFLX , SCALUPUI
COMMON /PS2/ PSRATEI30,5I, PSRH30,5I» PS<*2<3» ,5) ,TLAST,UPDINT
COMMON /CHEM5/ REACT (28,651 , SPECUOI ,LOCFlXdBI ,
1 NASFLX,FLXHK30I,FLXH2UOI
COMMON /PS1/ TPASStZOOIt PS<7,5.75I, FRACTI3I,
I NPTSRtNPSFLX,LOCPSF(7>
DIMENSION Y(N), YOOT(N), SINKI30I
DATA SINK X30*O.OOOOS

CALL RATESIY.YDOTI

IFCNOPFLX.LT. 11 GO TO 50
	 UPDATE FLUXES OF OEPOSITIN5 SPECIES
DO 
-------



75
C
























C
C
C
C
C
C
C
C
C
C
C








C




PSRATEtK.J) = PSR1IK.JI » »
65
t £
DO
67
68
69
70
71
72
73
7k
«e
75
76
77
79
79
80
81
82
83
8t
85
85
87
88
89
90
91
92
93
9«»
95
96
97
98
99
100
101
102
1C3
104
105
106
107
108
109
110
111
112
113
D-27

-------
C
C

C

C
C


C


C
C

C

C

C

C

C

C

C
              - - - N02 - - -
 C( 2) = C( 1I»C( 3I'R( 3I/R< II
              ---  0..-
 C(32) = Rl 1)"C< 2I/»
              - - - N03 AND N205 - - -
 A(l,l» = RUM'Ct II  * Rtl5)»C< 21
 fttl»ei = -R(17I
 A12.1I = R(15I»C« 2>
 A(2»21 = - = R(57J*C(12I»C(311/(R(58I*C( 111
 CC18) «  (R(18»»CI  8l*C(31l  »  R119I »Cl  91 *C(3ll I /IKI 201 »C (
              ---  AO  -- -
 C(17» *  R(29I»C(  1I»C(18I^R<21I
              ---  PA02 - - -
 C(28) =  R(35I»C(10I»C(31IMR(35>»C(  II  *  R(37I»C<  111
              ---  HNOI» ---
 C(20I =  R(11»»C(  2I»C<22)/R(22I
              ---  PAN AND  RC03  -  -  -
 Ad.ll = -RU6I
 A(1.2I = R(«»5I»C(  21
 A(2,l) = »R(«»6I
 A(2,21 = -RC^I'Ct  II - R(«»5I»C« 21
 B( II =  0.0
 B( 21 =  -R(«»2I»CI  7I»C«31I
 CALL SOL2B2(A,BI
 Cllil =  BUI
 C(2M =  8(21
              -  --  R02 AND  PAD - - -
 A(ltl) = R(39I»C(  II  * R(^9I*C(22I
 All, 21 = -R(38I
 A(2,ll = -R(39I'C(  II
 A(2,2I = R(38t  *  R((»0l V  R(U1I»C(  21
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKN
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKH
NKH
NKM
NKM
NKN
NKM
NKM
KKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
UKM
                                      115
                                      115
                                      117
                                      118
                                      119
                                      120
                                      123
                                      12<»
                                      125
                                      126
                                      1271
                                      128
                                      12^
                                      131?
                                      131
                                      132
                                      133
                                       135
                                       136
                                       13ft
                                       139
                                       1«»0
                                       11.3
                                       Ikk
                                       Iii5
                                       1U7
                                       H»8
                                       U9
                                       150
                                       151
                                       152
                                       153
                                       15l»
                                       155
                                       156
                                       157
                                       158
                                       159
                                       160
                                       161
                                       162
                                       163
                                       16l|
                                       165
                                       165
                                       167
                                       168
                                       169
                                       173
                                       171
D-28

-------
      Btll  = .i»0»Rt23l»Ct 8)»Ct32>  »
     1       Ct 1)»C128> * RU3)»Ct
     2  + O.I»*R12«»I »C19)*CI32)
      Bt2)  = ,85»Rl36)»Ct 1)»C128)
      CALL  SDL2B21A,B)
      Ct23) = Btl)
      Ct27) = BI2)
      CALL  XMIMNOSPECtCtCONINtltKM
200   CONTINUE
      RETURN
      ENO
 .10»Rl25)»Ct
fl
3)*Ct 81 » ,15»Rt 36)»NKM  172
1)»CI2»») » R156)»CU5)NKM  173
                      NKM  17

JACOBIAN OF THE ERT PHOTOCHEMICAL MECHANISM t39X6<») 1.31.79

At It 1) * - Rl 3)*Ct 3) - Rl «»)»Ct 2)*Ct 33) - Rt 7)
» *Ct 31) - Rt 10)'Cl 22) - Rt ll»)'Ct 19) - Rt 20)»Ct 18) -
» Rt 27)»Ct 25) - Rl 28)*Cl 26) - Rt 36)»CI 28) - Rt 37)»CI 28)
» - Rl 39)»Ct 23) - Rt «*
»Cl 13)
Al 2t 3) = t Rl 3l*Cl 1) - Rl 13)»Cl 2)
At 2t "•) = * 2.00*RI 5)*CI l»)
At 2t 111 = * Rl "»6»
Al 2t 13) = » Rt 53)»CI 1) - Rl 5M»Ct 2)
At 2t 16) = » Rt 58)*C( 1)
A( 2t 18) = » Rt 20)*CI 11
NKH
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKH
NKM
MKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
183
185
186
187
188
189
190
191
192
193
19if
195
195
197
198
199
200
201
202
203
20 U
205
206
20 T
208
209
210
211
212
213
21<»
215
216
217
218
219
220
221
222
223
22i»
225
225
      D-29

-------
Al
Al
At
At
At
Al
At
At
Al
At
At
A t
At
»
At
t
t
t
*
(
t
I
t
1
1
t
1
1
Al
*
Al
Al
At
Al
*
Al
Al
Al
Al
Al
Al
»
Al
Al
Al
Al
Al
*
Al
Al
Al
At
A f
Al
At
Al
At
Al
2.
2,
2,
2,
2,
2.
2.
2.
2,
3,
3,
3,
R <
3,
3,
4,
4,
•Cl
4,
4,
5,
5,
5,
5,
6,
6,
6.
6,
•Cl
6.
6,
6,
6,
Rt
6,
6,
7,
7,
7,
7,
Rl
7,
ft
r.
7,
7,
Rl
7,
8,
8,
9,
9,
10.
11,
11,
11.
12,
19)
20)
21)
22)
23)
24)
25)
26)
27)
28)
1)
2)
3)
26)»
8)
9)
1)
21
27)
4)
27)
5)
6)
7)
9)
1)
2)
3)
6)
31)
8)
9)
17)
251
61) *
26)
27)
1)
2)
3)
7)
43)
8)
9)
17)
25)
26)
62) »
27)
3)
8)
3)
9)
10)
2)
11)
24)
12)
E
e
s
=
a
2
S
r
£
£
r
=
s
Cl
£
r
£
s

r
£
£
s
£
£
s
£
r
£

S
S
s
s
Cl
s
=
s
£
-
£

£
£
£
s
X
Cl
5
a
=
=
*
a
s
=
=
S
* Rl
4 Rt
» Rt
4 Rl
t Rl
4 Rl
4 Rt
- Rl
» Rl
- Rl
- Rt
- R(
9)
- Rl
- Rl
t
*

-
4
- Rl
4 Rl
4 Rl
4
» Rl
« Rl
4
- Rl

4
4 Rl
4
4 Rl
29)
- Rl
4
4 Rl
4 Rl
4
- Rl

4
4
4
- Rl
4 Rl
29)
4
- Rl
- Rl
- Rl
- Rl
- Rl
4 Rl
- Rl
4 Rl
- Rl
2.00»R<
22)
17)
10)*Cl
39)»Ct
44) *Ct
27)»CI
28)»CI
41) *CI
36)»Ct
3)*Ct
13) *C(
3)»C»

25)»CI
26) 'Cl
2.00»RI
2>OB*R(

4.00 *RI
0.15»RI
9)*CI
47) 4 R
43)
0.40»RI
27)»CI
29)»Ct
0.5Q*Rt
31) »CI

0.50'RC
26)»C<
1.50'RI
27)»Ct

33)»C<
tUSO'RI
28)»Ct
30)»Ct
0.50'RI
32) »Ct

0.30*RI
0.30"R(
0.50»RI
32)»Ct
28)»CI

0.50*R(
25)»Ct
18)*Ct
26)»CI
19) »CI
35) 'Cl
45) »CI
46)
45) *CI
50)'CI
14)

1)
1)
1)
1)
1)
2)
1)
3)
3)
1)

3)
3)
4)
4)

5)
41)
31)
( 48

24)
25)
25)
25)
25)

25»
3)
21)
1)

6)
38)
26)
26)
25)
25)

231
24)
21)
7)
1)

38)
8)
31)
9»
311
31)
24)

2)
31)
»3t

- R<

- Rl
- Rl
- Rl




- RC



•Cl
•SI

•Cl
•Cl

)»C(

•Cl


•ct
- Rl

»CC


* Rl




4
•31
- Rl

•Cl
•Cl


4 Rl

4 R

- Rl

- R(




- Rt
1) - R

11) *CI

45) 'Cl
29)»CI
30)»CI




13) 'CI



2)"CI
l)»Cf

4) - R
2)

31)

32)


8) 4 R
33I»C(

3)


29>'Ct




0.15»R
8)


32) »
32)


39>*CI

1 40) 4

23)*CI

24) *CI




51)»Ct
1 15)»Ct 2)

21

J)
2)
2)




?) - Rf 25)»Ct 81 -



33) 4 R| 7)»CI 31)
33) 4 0.15*31 41)

1 6)







( 26l»Ct 9)
25) - Rl 47) - Rt 48)




2) - Rl 31)»CI 6) »




1 41)»3I 27)

25) - Rl 42)»CI 31) -

0.50»R( 25>»CI 3)



21 - Rl 34I»CI 7) 4

0»15*R( 41)*CI 2)

32) - Rl 25>'Ct 3)

32> - Rl 26)»CI 3)




3D - R( 57)»CI 31)
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKN
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
227
228
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
279
271
272
273
274
275
276
277
278
279
280
281
282
283
284
D-30

-------
 At 13,  1)  = - Rt 53)"Ct 13)                                       NKH  285
 At 13t  2)  = - Rt 5«i)»CI 13»                                       NKM  256
 at 13, 121  « * Rt 51)»Ct 31)                                       NKH  287
 • I 13, 13)  = - Rl 53)»Ct  1)  - R< 5M»CI  21 - Rt 55)»CI 22)      NKM  288
 At 13, 22)  = - Rl 55)*Ct 13)                                       NKM  289
 at 1«», 12)  * + Rl 50)»Ct 31)                                       NKM  290
 at 1<», 13)  = » Rl 55)»CI 22)                                       NKM  291
 at i                                              NKM  3<*2
                                    D-31

-------
C
C
C
C









A
A
A
A
A
A
A
A
A
A
A
A
*
A
A
A
A
A
A
A
*





A
A
A
23,
23,
23,
23,
23,
23,
23,
23,
24,
2<»,
2<»,
2«»,
2<»,
25,
25,
25,
25,
25,
1 25,
I 25,
1 25,
Rl
I 26,
I 26,
1 26,
I 26,
26,
26,
26,
Rt
27,
27,
27,
27,
27,
( 26,
1 26,
( 28,
8)
91
15)
22)
23)
2<4>
27)
26)
11
2)
71
11)
2H)
1)
2)
3)
6)
7)
9)
9)
25)
32)
1)
2)
3)
6)
7)
8)
26)
3<»)
1)
2)
23)
27)
28)
1)
10)
28)
3
s
s
3
3
X
s
3
«
r
e
£
2
s
s
s
3
s
s
s
s
•ci
s
s
3
3
C
S
•
•Cl
X
s
s
s
s
=
s
3
*
»
»
-
-
»
»
»
-
-
»
*
-
-
-
t
-
-
t
*
-

-
-
*
-
-
»
-

»
-
»
-
»
-
»
-
      IFtN.LE.28)
                               31)

                                II
                               251
                               25)
                         - Rt <»5)»CI  2)
                              8) »
                                                0.80*Rf 26)»C«  9)
           23)*Ct 32) *    0.10»RI 25)»Ct  3)
   0.«»0»RI 2V)»Ct 32)
Rl 56)
Rt »CI 29)
Rt «»«»)»CI  1)
Rl 38)
   0.15»RI 36)»CI  1)
Rt <»<»)«CI 2<»)
Rl i»5)»Ct
Rl «»2l»Ct
Rl "»6»
Rt i«if)»CI
Rl 27)»CI
Rl 29)»CI
   O.VO'RI 25)»CI
Rl 31)»CI 25)
Rl 32)»CI 25)
   0.»GI 28)
Rl Ul)»CI 27)
Rl 39)»Ct  1) » Rt 63)»Ct 29)
Rt 38) - Rl ifO) - Rl M)*CI  2)
   0.85*RI 36)»Ct  1)
Rl 361»CI 28) - Rl 37)*CI 28)
Rt 35)»Ct 31)
Rt 36)»CI  1) - Rl 37)»C(  1)

RETURN
                                        3)
                                        30)'Ct
                                      2) - Rt 33)*CI  6) -
                                           * Rt 39>'5t 23)
ELEMENTS OF THE JACOBIAN FOR S02 AND SOV R-ACTIONS
Al
At
Af
Al
Al
Af
Al
Al
Al
Af
Al
Al
Al
At
6,
7,
17,
18,
22,
23,
2?,
26.
27,
29,
29,
29,
29,
29,
29)
29)
29)
29)
29)
29)
29)
29)
29)
18)
22)
23)
25)
26)
3
=
3
S
3
S
3
3
3
a
3
s
3
3
f
f
*
-
-
-
-
-
»
-
-
-
-
-
Rt
Rl
Rt
Rl
Rl
Rf
Rl
Rl
Rl
Rt
Rt
Rt
Rl
Rl
61)
62)
&<»)
6<» )
60)
63)
61)
62)
63)
6
-------
      AC 39, 29) * - R( 59>"Ct  31) - Rt  60)"Of  32)  -  Rl  61)»Ct  35)  -    NKH  1.01
     »    Rt 62)»Ct 861 - R( 63)»Ct 231  - Rt  6M»C<  181                  NKM  «.03
      AC 30, 18)
      At 30, 33)
      At 30, 33)
      At 30, 3?)
      At 30, 26)
      At 30, 29)
* Rt 6*) »Cl 29)                                       NKM  «»03
* Rt 60)*Ct 29)                                       NKM  40<»
» Rt 63>»Ct 29)                                       NKM  «»05
» Rt 51)*Ct 29)                                       NKM  (»06
» Rt 63) »C( 29)                                       NKM  «»07
* Rt 59)*Ct 31) » Rt 60)»CI 22) » Rt 61)»Ct  25)  *     NKM  i»08
     *    Rt 52)»Ct 26) » Rt 63)»Ct  23)  +  Rt  6M*CI  18)                  NKM  , NKH  
-------
     Z              CLOUDT(25»,         CLOUDF(25»         ,VFR(5.200), NKM
     3              PTSR(7,200»                                         NKM  457
C                                                                       NKM  459
      EQUIVALENCE «YES,IES»,   (RNEG,NEG»                                NKM  459
      EQUIVALENCE (PPM ,CONIN>                                          NKM  460
      EQUIVALENCE (VFR,PH»,  {PTSR.PH (1001» I                            NKM  461
C                                                                       NKH  462
      DATA LUP, LIN, LOUT, YES, RNEG  /I, 3, 6, JHYES, 2HNO/            NKM  463
      DATA KSYH /1HN, 1H2, 1HO, 1HS, 1HC  /                             NKM  464
      DATA RMOLE AHMOLE/                                               NKM  465
      DATA N*OH,MAXR,MAXMSH,MAXNK,NRHT,KTMAX /40,55,5,30,100,100/       NKM  466
      DATA MF.IERROR /21,3/                                             NKM  467
C                                                                       NKM  468
C	READ INPUTS FOR  COMPUTING POLLUTANT CONCENTRATIONS        NKM  469
C                                                                       NKM  470
      READ(LIN,30) DELT                                                 NKM  471
      REAO(HN,30) BIGSTP                                               NKM  472
      REAO(LIN,30> EPS                                                  NKM  473
      REAO(LIN,30) UPDINT                                               NKM  474
      READ(LIN,30J PRNTIN                                               NKM  475
      REAO(LIN,29» TIMOUT                                               NKM  476
      REAO(LIN,Z9) SUNGEN                                               NKM  477
      READ(LIN,29) HIRATE                                               NKM  V78
      REAOCHN,29) OCLOUO                                               NKH  479
      READ(LIN,29» VTEMP                                                NKM  480
      REAOUIN,29> SPUNCH                                               NKM  481
      READILIN.31) NUMSTP                                               NKM  48Z
      R£ADCLIN,31) NOREAC                                               NKM  483
      READ(LtN.31l NOSPEC                                               NKM  484
      REAO(LIN,31) NSTOT                                                NKM  485
      REAOUIN.31) NOSTAT                                               NKM  486
      REAO(LIN,30) (ZEE(I>* I«l,NOSTAT}                                 NKM  487
C                                                                       NKM  488
      NK = NOSPEC -NSTOY                                                NKM  489
      NPUNCH = NK                                                       NKM  490
      SUNTIM = UPOINT                                                   NKM  491
      RDCHEM = YES                                                      NKM  492
      ORATE * YES                                                       NKM  493
      F s YES                                                           NKM  49V
      TSTOP2 a TSTOP                                                    NKM  495
      KOK = 100                                                         NKM  496
      NASFLX * NUMFLX                                                   NKM  497
C                                                                       NKM  498
c     —— NOSPEC is THE TOTAL NUMBER OF SPECIE     IMAX = 401           NKM  499
C     	 NSTDY IS THE NUMBER OF SPECIE H£LO  CONSTANT OR IN STEADY  STATNKM  500
C     	 NK IS THE NUMBER OF SPECIE INTEGRATED     IMAXNK * 30»        NKM  501
C     	 NOSTAT IS THE NUMBER OF  VERTICAL  STATIONS  (MIN=4,MAX=5>      NKM  502
C     	LOCFLX IS LOCATION  INDEX FOR AREA  SOURCE  EMISSION  FLUXES   NKM  503
C     	NUMFLX IS NUMBER OF AREA SOURCE EMISSION FLUXES              NKM  504
C     	L3CPSF IS LOCATION  INDEX OF POINT  SO'JRCE  EMISSION  FLUXES   NKM  505
C     	NPSFLX IS KUMBER OF POINT SOURCE  EHMISION  FLUXES             NKM  506
C     	LOCOPF IS LOCATION  INDEX FOR DEPOSITING FLUXES              NKM  507
C     	NDPFLX IS NUMBER OF DEPOSITING FLUXES                        NKM  508
C                                                                       NKM  509
C     	BOUNDARY CONDITION CODE  FOR HALL	NKM  510
C                                                                       NKM  511
C     BCFLAG = 0   DC/02 =  PHI/KZ   HHERE    PHI = 0.   (DEFAULT CASEJ    NKM  512
C                                   OR       PHI = AREA SOURCE  EMISSION  FNKM  513
                                        D-34

-------
C                                   AMD     KZ  = DIFFUSION COEFFICIENT NKM  51*
C                                                                       NKM  515
C     9CFLAG = 1   DC/OZ » -OPRATE*(PPM»»0£POHR)/KZ  DEPOSITING SPECIE  NKM  515
C     	WHERE                                                        NKM  517
C     	DPRATEJI) IS THE DEPOSITION VELOCITY OF THE I"TH  SPECIE     NKM  518
C     	IN METERS/MINUTE/(PPM»MOEPOHR-1)I                           NKN  519
C     	INPUT ftS POSITIVE QUANTITY FOR UPTAKE AT WALL                NKM  528
C                                                                       NKM  531
C     BCFLAG * 2    C = INITIAL CONCENTRATION FOR ALL TIME              NKM  522
C                                                                       NKM  523
C     	NKM  52*
C                                                                       NKM  525
C     	  ZERO PPM ARRAY  AND CHECK NK AND NOSTAT INPUTS            NKM  525
      NRC = MAXMSH'NROH                                                 NKM  527
      CALL XHIT (-NRCfO.,COMIN>                                         NKM  528
      IFtNOSTAT.GE.*)  GO TO 200                                        NKM  523
      MRITE(LOUT,77) NOSTAT                                             NKM  530
      GO TO 800                                                         NKM  531
  20B CONTINUE                                                          NKM  532
      IFCNK.LE.MAXNK)  GO TO 210                                        NKM  533
      HRITE«LOUTt76) NOSPEC ,NSTDY, NK                                  NKM  53*
      GO TO SOO                                                         NKH  535
  210 CONTINUE                                                          NKH  536
      IF(ROCHEM.NEtYES)  GO TO 219                                      NKM  537
      NDPFLX = 0                                                        NKM  538
      00 215  I=liNCSPEC                                                NKM  539
      R£AOaiN,51)  SPECtI),HTHOLEm .BCFLAGm                         NKM  5*0
      IFIBCFLAGIII .EQ. 1)  NOPFLX = NDPFLK » 1                         NKM  51.1
  21$ CONTINJE                                                          NKM  5*2
      IFtNUMFLX.GT.0) REAO(LIN,3i> (LOCFLXCI»«I=1,NUMFLX»               NKM  5*3
      IFCNPSFLX.GT.O) READtLIN,31> tLOCPSFIII,I=l,NPSFLX)               NKM  5**
      IF(NOPFLX.GT.O) REftDUIN,53) .OEPOHR(I),      NKM  5*5
     1  I=1»NDPFLXI                                                     NKM  5*6
      IF(NDPFLX.LE.01  GO TO 219                                        NKH  5d7
C     	 ADJUST DEPOSITION VELOCITIES SO AS TO EFFECT 10 METER LAYERNKM  5*8
      A = .5»tZEE«2»-ZEEtl»»                                            NKM  5*9
      A = 10.f&                                                         NKM  55D
      00 218 I = 1,NDPFLX                                               NKM  551
218   DPRATEIIJ = A'OPRATEeil                                           NKM  552
  219 CONTINUE                                                          NKM  553
      00 220 I = 1,NOSPEC                                               NKM  55*
      REAO(LIN,*1) IPPM(I,J),J=1,NOSTATI                                NKM  555
220   CONTINUE                                                          NKH  556
      IFIROCHEM.NE.YES)  GO TO 230                                      NKM  557
      00 222 I=1,NOREAC                                                 NKM  558
      REAO(LIN,30) RATKON(I)                                            NKH  559
222   CONTINUE                                                          NKM  560
      00 22* J=1,NOREAC                                                 NKM  561
      REAO(LIN,*OI (REACT(I,J>,I=lt201                                   NKM  562
22*   CONTINJE                                                          NKM  563
C                                                                       NKM  56*
230   CONTINUE                                                          NKM  56?
C                                                                       NKH  566
      TIME = INTIH                                                      NKM  567
C                                                                       NKM  568
C     	 THE PHOTODISSOCIATION RATES VARY WITH HEIGHT IF HIRATE*YESNKM  569
C     	 LOCVRT IS THE SPECIES INDEX FOR THi RATES (INPUT)          NKM  570
C                                                                       NKH  571
                                     D-35

-------
      READUIN,30)  RLAT                                                 NKM  572
      READ»LIN,30>  RLONG                                                NKM  573
      READ(LIN,30»  TMZONE                                               NKM  57l»
      READ  (LOCVRTCI),1=1,NVRATE)                                NKH  577
                                                                        NKM  578
      IFCSUNGEN.EO. YES)  GO JO 24<»                                      NKM  579
      HRITE(LOUT,22I                                                     NKM  58D
      STOP                                                              NKM  581
      CONTINUE                                                          NKH  582
C                                                                       NKM  583
      IFJQCLOUO.EO.RNEGI  GO TO 2V9                                     NKM  58V
C     	INPUT SKY COVER FACTORS AMD TIMES                         NKM  585
C     -	LAST SKY COVER UPDATE TIME ICLOUOTI  MUST BE A NEGATIVE    NKM  585
      00 2V6  1=1,26                                                    NKM  587
      R£AO
-------
270
260
290
C
C
C
00 2/0 I = 1,101
REAO(LlNti»ll »,B,»HTINim,J),J«3,KI
IF (A.LT.O.) GO TO 280
HTINVU.l) = A
HTINV(I,2» = 6
CONTINUE
PRINT i»5
GO TO 800
NHT = 1-1
IHT = I
KHT = 1
CONTINUE

INITIALIZE PLOT PARAMETERS
 FOR
KPSU) « 1
KPSJ2I
KPSI3)
KPSU)
KPS<5)
NCURV
             = 2
             = 3
             = 29
             » 5
              5
C
C
C

C
C
  293
  295
  297
  299
CALL XMITt-NCURV,0.0,VALMAXI

 BANNER PAGE

WRITE
CONTINUE
CALL SKEOUL(HORK,FLXTIM,NFLUX,NUPOAT,UPOINT,INTIM, TSTOP,-l. ,F ,-!»
IFfF.Ea. YES)  GO TO 800
-----   CONVERT FLUXES FROM MASS OR MOLE FRACTION TO PPM
10 = LOCFLXm
MT « 1.E5
IFtFLXUNT.NE.RNOLEI   MT * 28.97E6 /MTMOLE(IO)
DO 295 J=liNUPOAT
FLXINU.J) s HORKUJ'HT
CONTINUE
CONTINUE
-----------  THE NEW SCHEDULE OF FLUXES IS STORED IN FLXIN
NFLUX x NUPOAT
IFLXTM = 1
CONTINUE
------- INITIALIZE FLUXES
NPMX = 5'MAXNK
      XHITt-NPMX,0.0,PSRll
      XMIT!-NPMX,0.0,PSR2>
      XMIT(-MAXNK.O.OtFLXHl)
      XMIT(-MAXNK,0.0,FLXH2)
      CALL
      CALL
      CALL
      CALL
C
C
CALL XMIT(-NROH«0.«FLXMAL>
CALL XMIT(-NROH,0.,FLXDGE)
CALL UPFLXHTIME.IFLXTH)

-----   GENERATE VERTICAL MESH PARAMETERS
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKH
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKH
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
630
631
632
633
63 1«
635
636
637
638
639
                                                                             6V 5
61*7
6<»8
6<»9
650
651
652
653
65 1»
655
656
657
658
659
660
661
662
663
661*
665
666
667
668
669
670
671
672
673
675
676
677
678
679
680
681
682
683
68 k
685
686
687
                                       D-37

-------
c                                                                        UKM   sea
      NOSTfll = MOST/IT - i                                                NKM   689
      OELZdl = ZEE12) - ZEEU)                                          NKM   690
      HTCELLI1) = OELZI1I                                                NKM   691
      00 300 K = 2tNOSTMl                                                NKM   692
      OELZCKI = ZEEtK*!) - ZEEW                                        NKM   693
      HTCELUK) = .5MDELZW » OELZ  GO TO 307                                         NKM   70S
      CALL X*IT(-2625.0.0.PS»                                            NKM   706
      A = 1.E6/UPOINT                                                    NKM   707
      IF(FLXUNT.EQ.RMOLE)  GO TO 383                                     NKM   708
      00 302 K = ItNPSFLX                                                NKM   709
      10 =L03PSF(KI                                                      NKM   710
      HORKW = 28.97/HTMOLEtIOI                                         NKM   711
302   CONTINUE                                                           NKM   712
303   CONTINUE                                                           NKM   713
      8 * INTIM - 0.»>99*UPDINT                                           NKM   7U
      K«f = 0                                                             NKM   715
      00 305 K s 1,NPTSR                                                 NKM   71S
      Kl = IFIX1 ITFASSK2t » FRACT12>»C                               NKM   728
      PS(I,J,K3) = PS                                            NKM   738
307   IPS *  I                                                            NKM   739
      CALL UPSORC«TIME.IPS.NOSTAT,SPEC»                                  NKM   7<>fl
C                                                                        NKM   7«il
C     	PRINT  INPUTS                                               NKM   7i»2
C                                                                        NKM   7«»3
      CALL NEHPAG(TITLEtOtlDATE)                                         NKM   MI»
      HRITE(LOUT.16)  INTIM,TSTOP.OELT,8I5STP,NOREAC,NOSPEC.NSTOY.NOSTAT NKM   7<»5
                                       D-38

-------
      IFtNUMFLX.EQ.01  GO TO 311                                         NKM  7*6
      00 308 I* 1,NUMFLX                                                 NKH  7*7
      10 = LOCFLXm                                                     NKM  7*8
      HORKm = SPEC(IO)                                                 NKM  7*9
308   CONTINUE                                                           NKM  750
      CALL NtHPAGfTITLE.O.IDATEl                                         NKM  751
      HRITE  IHORK IK)tK=l,NPSFLXJ                               NKM  767
      00 31«» K = l.NPTSR                                                 NKM  768
      IF(HOO(K,0I.NE.O>  GO TO  313                                       NKM  769
      CALL NEMPAG(TITLEfOflOATE)                                         NKM  770
      HRITE(LOUT,83I  (MORKJKK»tKK=liNPSFLXI                             NKM  771
313   HRITE(LOUT,8i»)  TPASSJKI, (PS (1,1, Kl, I=.1,NPSFLX)                   NKM  772
      00 31* J »2,NOSTAT                                                 NKM  773
      «RITE  (PS(I,J,KI,I=1«NPSFLX)                             NKM  77*
31*   CONTINUE                                                           NKM  775
317   CONTINUE                                                           NKM  776
C                                                                        NKM  777
      CALL XMITtNOREACtRATKONtRATEFFI                                    NKM  778
      CALL UNMIXR(l)                                                     NKM  779
      CALL NEHPAG(TITLE,0,IOATEI                                         NKM  780
      MRITE(LOUT,37I                                                     NKM  781
      00 320 I*1,NOREAC                                                  NKM  782
      IFIMODUtW.NE.OJ  GO TO 319                                      NKM  783
      CALL NEHPAG(TITLE.OflOATE)                                         MKM  781»
      MRITEJLOUT.37I                                                     NKM  785
319   MRITE(LOUT,38> I, (REACT(J,II,J=1,20J,  RATEFF(I)                   NKM  786
320   CONTINUE                                                           NKM  787
      CALL NEHPAG(TITLEtOtlOATE)                                         NKM  788
      KRITE»LOUT,28»                                                     NKM  789
      00 330 J s l.NOSPEC                                                NKM  790
 325  MRITE(LOUT,27)  J,  SPECUJ, HTMOLEIJIt 8CFLA6IJ)                  NKM  791
  330 CONTINUE                                                           NKM  792
C  ,                                                                      NKM  793
C     	  SCHEDULE AND INITIALIZE DIFFUSIVITIES                      NKM  79*
C                                                                        NKM  795
      IF(NHT.EQ.l)   GO TO 360                                           NKM  796
      K = NOSTAT » 3                                                     NKM  797
      TSTOP = HTINWCNHT.il                                               NKH  798
      CALL XMIT (NHT,HTINV(1,1I,MORK(1II                                 NKM  799
      00 350 J =2.K                                                      NKM  800
      CALL SKEOULIHTINV(l.JI,HORK,NHT,NINT.UPDINT,INTIM,TSTOP,-l.,F,il   NKM  801
      IFCF.EO.TESI  GO TO 800                                            NKM  802
3?0   CONTINUE                                                           NKM  803
                                          D-39

-------
      NHT = MINT                                                         NKM  80   I, ZEE(I), HTCELL(I)                               NKM  833
      GO TO V30                               .                           NKM  833
M5   HRITEtLOUT,«»i|| I ,ZEE( I) , OFINI T (I) .HTCELL (I»                        NKM  83i»
*30   CONTINUE                                                           NKM  835
      HTCELLtU = HTCtLL(l)'3.                                           NKM  836
      HTCELUNOSTAT) = HTCELUNOSTA T) »2.                                 NKM  837
C                                                                        NKM  838
C     	 INITIALIZE INTERNALLY COMPUTED CONCENTRATIONS               NKH  839
      CALL ISTATE                                                        NKM  8«i8
C     	   INITIALIZE YO VECTOR OF CONCENTRATIONS FOR DRIVE     NKM  8M
      00 «»35  I=ltNOSTAT                                                  NKH  8<»3
      K= NKMI-ll *  1                                                    NKM  8l»3
      CALL XHIT(NK,CONIN(1,I),YO(K»                                     NKM  8«.i»
  «»35 CONTINUE                                                           NKH  fll»5
      CALL NEHPAG(TITLE,OfIOATE>                                         NKM  8<»6
      ITIM =  ITtlOURCTIMEl                                                NKM  8«i7
      HRITEtLOUT,97l   INTIM, ITIM                                       NKM  8«»8
      WRITE(LOUT,18)   (SPECUl«J=l,NOSPEC)                              NKM  849
      DO l»50  K = 1,NOSTAT                                                  NKH  859
      HRITE(LOUT,33I   ZEEIK), ( PPM»J,K),J=l,NOSPEC)                    NKM  851
«»50   CONTINUE                                                           NKM  852
C                                                                        NKM  853
      IFtSPUNCH.NE. YES)  GO TO «»5ff                                       NKM  851|
C     	   URITE  I.C. ON TAPE LUP  FOR PUNCH OR FILE STORAGE          NKM  855
      HRITEILUP.BO)  TITLE                                                NKM  856
      HRITE(tUP,81)  TIME,   tZEEW,K=1,NOSTAT»                          NKM  857
      NOELV =  1                                                          NKM  858
      00 t53  K=1,NOELV                                                  NKM  859
      HRITE(UUP,81»  (  PPM«J,K»,J=1,NPUNCHI                              NKM  860
i»53   CONTINUE                                                           NKH  861
                                       D-40

-------
«»5«»   CONTINUE                                                          NKM   862
      IFINCURV.EQ.O) GO TO «»59                                          NKM   863
      KT = 1                                                            NKM   86*
      DO US5 I * l.NCURV                                                NKH   865
      J * KPSUI                                                        NKM   866
      IFIJ.NE.5)  GO TO *56                                             NKM   867
C     SCALE CO FOR PLOTTING                                             NKM   868
      GRCON VALHAXU) "GRCONI I,KTI                NKM   870
      GO TO i»55                                                         NKM   871
l»56   CONTINUE                                                          NKM   872
      GRCON(ItKT) « PPMU.l)                                            NKH   873
      IF(PPHtJ,l).GT.VALMAXm) VALMAXII) * PPM(J,1)                    NKM   87*
  V5S CONTINUE                                                          NKM   875
      TOUTIKT! = INTIM                                                  NKM   876
  *59 CONTINUE                                                          NKM   877
c     	   INITIALIZE ADDITIONAL PARAMETERS FOR INTEGRATION     NKN   878
      NSTEP » 0                                                         NKH   879
      N » IPROO                                                         NKM   880
      KNTER * 0                                                         NKM   881
      TPRINT * INTIM » PRNTIN -.01                                      NKM   882
      RECALL = YES                                                      NKM   883
      UPO<» * UPOINT/lf.O                                                 NKM   8870                                    NKM   891
      INDEX * 1                                                         NKM   892
      TOUTEP = OLDTIM » UPDINT/10.                                      NKM   893
      IFJKNTER .GT.II   OELT * .01                                      NKM   89*
  %7> IFINSTEP .9T. NUMSTPI  GO TO 800                                  NKM   895
      TLAST = TIME                                                      NKM   896
C                                                                       NKM   897
C                   INTEGRATE BY EPISODE                                NKM   898
C                                                                       NKM   899
      CALL 0*IVEtNtTIH£»OELTtYOtTOUTEP.EPSfIERROK.MF,INOEX,8IGSTP.KOK)  NKM   900
C                                                                       NKM   901
C                                                                       NKM   902
      IFIKOK.GE.O)  GO TO H75                                           NKM   903
      ISTOP = IES                                                       NKM   90
-------
      CALL XHITINK,VO(K),CONINt1,I»  »                                   NKM  920
500   CONTINUE                                                           NKM  921
630   CONTINUE                                                           NKH  922
      CALL PRODUKtUPOINTf                                                NKM  923
C                                                                        NKM  92"»
      IFUIHE.LT.TPRINTI  GO TO 69«»                                      NKM  935
      TPRINT = TPRINT » PRNTIN                                           NKM  926
 650  CONTINUE                                                           NKM  927
C                                                                        NKM  925
C     	OUTPUT                                                     NKM  929
C                                                                        NKM  930
      CALL N£HPAG(T1TLE,D,IOATE)                                         NKM  931
      IFtNOPFLX. Ed.  0»  GO TO 682                                       NKM  932
      00 681 J=1,NOPFLX                                                  NKM  933
      1= LOCDPFU)                                                       NKM  93"»
      SINK =- DPRATE(J)MPPMtI,l)»»OEPOHR»
655   CONTINUE                                                           NKM  9^5
656   IFINPSFuX.LE. 0>  GO TO 661                                         NKM  9<»6
      00 660 I = 1,NPSFLX                                                NKM  9«»7
      K = LOCPSFtll                                                      NKH  9<»8
      HOSKa»20) = SPEC«K»                                               NKN  9<»9
      HORKJI»30» » PSRATEIK.ll                                           NKM  950
660   CONTINUE                                                           NKM  951
661   CONTINUE                                                           NKM  952
      NHX =  MAXOINUMFLX,NPSFLX)                                          NKM  953
      NMV =  NHX *  1                                                      NKM  95*
      NMX =  NMX *  3                                                      NKM  955
      00 662 I - NMV.NMX                                                 NKM  956
      IF(I.E(J.8) K=2                                                     NKM  957
      IFU.E3.9) K=7                                                     NKM  958
      IFd.ea.lOl  K=9                                                   NKM  959
      MORK(I) = SPECIKI                                                  NKM  960
      HORKUHO) = FLXHftL(K)*TOELZ«l)                                    NKM  961
      HORK»I»20> = SPECtK)                                               NKM  962
      HORKII»30» = PSRATEtK.l)                                           NKM  963
662   CONTINUE                                                           NKM  96<»
      «RITE
-------
      IFtSPUNCH.NE.YES)  GO TO 69"»                                       NKM  978
C     	  HRITE OUTPUT ON TAPE LUP FOR PUNCH OR FILE  STORAGE         NKM  979
      HR1TEUUP,81> TIME                                                 NKM  980
      00 693 K=1,NOELV                                                   NKM  981
      MRITE                                             NKM  997
      IFtPPMU.D.GT.VALMAXttM VALMAXII) *  PPHO.l)                     NKM  998
  695 CONTINUE                                                           NKM  999
      TOUT(KT) = TIME                                                    NKM 1000
  700 CONTINUE                                                           NKM 1001
      IFITIME.GE.(TSTOP-.01I) ISTOP » IES                                NKM 1003
      IFIISTOP.EQ.  IES)  GO TO 808                                       NKM 1003
C                                                                        NKM 100f»
c     	  UPDATE EMISSION FLUXES                                NKM 1005
      IFLXTM = IFLXTM»1                                                  NKM 1006
      IF tIFLXTM.GT.NFLUXI IFLXTM = NFLUX                                NKM 1007
      CALL UPFLXHTIME, IFLXTM)                                           NKM 1008
      IPS » IPS » 1                                                      NKM 1009
      CALL Uf»SORCCTIMEtIPS,NOSTAT,SPEC»                                  NKM 1010
720   CONTINUE                                                           NKM 1011
C                                                                        NKM 101Z
c     	UPDATE SKY COVER FACTOR                                    NKM 1013
      IF IQRftTE.EQ.RNEG) GO TO 730                                       NKM 101k
      IFtQCLOUD.EtKRNEG)  GO TO 725                                      NKM 1015
      IF(ICLOUD.GE.NCLOUO)  GO TO 72$                                    NKM 1016
      88* CLOUOTUCLOUOM)  - UPOH                                       NKM 1017
      IFUIME.LT. BB)  GO TO 725                                         NKM 1018
      ICLOUC = ICLOUO  * 1                                                NKM 1019
      CLOUDY a CLOUOFIICLOUD)                                            NKM 10ZJ
      HRITEtlO.75)  TIME .  CLOUDY                                       NKM 1021
7Z5   CONTINUE                                                           NKM 1022
C                                                                        NKM 1023
C     	   UPDATE THE VARIABLE PHOTOOISSOCIATION RATE CONSTANTS NKM 102<»
C                                                                        NKM 1025
      ROLOK1 = RATEVtltl)                                                NKM 1026
      CALL PHOTORITIME.NOSTAT,ZEE,CLOUDY,RATEV)                          NKM 1027
      IF IRATEV11,1).LT..2»ROLOK1.OR,RATEVCl.D.GT,5.»ROLOK1)RECALL=YES  NKM 1028
730   CONTINUE                                                           NKM 1029
C                                                                        NKM 1030
C     	          UPDATE DIFFUSION COEFFICIENTS                         NKM 1031
C                                                                        NKM 1032
      IFCNHT.E0..1)  GO TO 770                                            NKM 1033
      AA= HTINV«IHT,1) - UPQI»                                            NKM 103«t
      IF(TIHE.LT.AA)   GO TO 770                                          NKM 1035
                                     D-43

-------
      IF1KHT.GE.NHT)  GO TO 770                                         NKM  1036
      IHT = IHT » 1                                                     NKM  1037
      KHT = KHT » 1                                                     NKM  1038
      HRITEUlt^e) TIME                                                 NKH  1039
      K » NOSTATfl                                                      NKM  10«»0
      DO 750 I = ItK                                                    NKM  10M
      OFINIT(I) = HTINVUHT,I*Z>                                        NKM  10*»Z
750   CONTINUE                                                          NKH
      HRIT£U1,96) 
-------
     SIN STEADY STATE IS,I<»,                                             NKM 109V
     5               //8X.33MNUM8ER OF VERTICAL  HESH  POINTS  IS,I7,i»X,33HNKM 1095
     7IKCLUOING THE GROUND AND  THE EDGE  )                                NKM 1096
17    FORMAT (lHQ,//13X,8(6X,Ait> ,6X,13HRATE  CONSTANT,                                                 NKM 1131,
57    FORMAT (1H1,10X,<*5HTOO MANY CLOUD  COVER ENTRIES   —  JOB ABORTED) NKM 1135
58    FORMAT(10(/),10X,73HOEPLETION OF   NO   HAS  CAUSED FAILURE OF  CHEMICNKM 1136
     1AL MOCEL.  CASE TERMINATED. )                                      NKM 1137
59    FORMAT (<»OX,2F10.0I                                                NKH 1138
60    FORMAT(1H1,/////,20X,«,1HJOB TERMINATED —  NEGATIVE CONCENTRATIONS NKM 1139
     1   30H OR DEPLETION OF NITRIC OXIDE        I                        NKM 1U5
66    FORMATdHO,9X,20HINTEGRATION INDEX =  , I«»,10X, 18HLAST  STEP SIZE =  NKM ll«»l
     1   £10.3.20X.17HLAST ORDER USED *  ,13,/,10X,18HNUMBER  OF STEPS * ,NKM
     2 I6,10<,33HNUMBER OF FUNCTION EVALUATIONS  *  , !<>« 10X, 3«,H NUMOER OF NKM
     3JACOBIAN EVALUATIONS = ,!«,)                                        NKM
66    FORHATdHO, 5X.70HREVISED AREA  SOURCE  FLUX SCHEDULE      —      NKM
     1    PPtt-METERS/MINUTE  t//»6X ,
-------
76    FORNAT«1H1,9X,<»IHJOB ABORTED BECAUSE OF  TOO MANY SPECIES   ,  //     NKM 1152
     1/.9H NOSPEC =  ,I3,5X,9H  NSTDY=    ,I3,5X,5H NK =    ,13)            NKM 1153
77    FORMATC1H1,58HJ08 ABORTED BECAUSE OF TOO FEM VERTICAL  STATIONS   ,/NKM 115<»
     1S/.10X,8HNOSTAT = , 121                                            NKM 1155
79    FORMAT (i»7HO  TOO MANY TEHPERATURES INPUT — JOB ABORTED        >   NKH 1156
80    FORMAT 120AM                                                      NKH 1157
81    FORMAT < 7<6E12,«»,/))                                              NKM 1158
83    FORMAT UHO,5X,50HPOINT SOURCE EMISSION  RATES  BY VERTICAL  CELL     NKM 1159
     1    10X,10H»tl>*ZEE(l>
  DIMENSION ZINP(1Q>*HTINPI8),R<8,10,<»)
  DIMENSION RN02(8,10)tRHONO(8,10l, RRCHO«8,10>, RHCHOI8.10)
  DIMENSION RHIMM, REXP(%), NAH«»t

  COMMON /CHEMU/  P.LAT, RLONG, THZONE, HIRATE, JOATE

  EQUIVALENCE! RN02(l,lt,Rt1,1,1M
NKM
NKH
NKM
NKM
NKM
NKM
NKM
NKM
NKH
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKM
NKH
NKM
NKM
NKM
NKM
NKM
1181
1182
1183
1185
1186
1187
1188
1189
1190
1191
1192
1193
1195
1196
1197
1198
1199
1200
1201
1202
1203
120
-------
 EQUI V ALENCEIRHONOU.l I, R« 1,1,21)
 EQUI VALENCE »5, 1.0 0,1. 06,1
5. 812, .877, .938*. 996,1
6. 710, .777,. 837, .895,.
7. 563,. 626,. 685,. 7m,.
8.361,,Hll,.ii60,.508,.
9.17«>,.200,.229,.260,.
1.039,.0'l3,.0^8,.052,.
 DATA  RRCHO /
1.230,.Z'»9,.267,.286,.
                       .179,.196..211,.280,
                       .03*,.037,.0*0,.050/

                       .18,1.23,1.27,l.*0,
                       .17,1.22,1.26,l.*0.
                       .12,1.16,1.21,1*35,
                       931,1.08,1.9<»tl.20.
                       795,.8*3,.885,1.05,
                       55*,.596,.63*,.79*.
                       289,.317,.3**,.*68,
                       057,.061,.656,.878/

                       306,.32*,.3*1,.397,
3. 21 6,.
<«.196,.
5. 169,.
6.13«.,.
7. 092,.
S.O<»7..
9. 019,.
1.003,.
 DATA
X ,61if,
1 . 606,
2 .561,
3 . 538,
<» .'»7"»,
5 . 388,
6 .280,
7 . 156,
7 .067,
8 .013,
231... 252.. 270,.
21<.,.231,.2«»9,.
186,. 20 2,. 218,.
1<.7,.162,.177,.
103,. 11*.,. 125,.
05<,,.060,.067,.
821,. 02 3,. 026, .
00<»,.00i4,.00i»,.
RHCHO /
. 662,. 7 09,. 75 6,
.65"*,. 7 00,. 7i»7,
. 629,. 675,. 721,
,58i»,. 629, .675,
.519,.562,.605,
.«»28, ,i»69,.508,
.313,.3«i6,.379,
. 178,. 199,. 222,
. 076,. 086,. 096,
. 015,. 016, .01 8,
289,.
257,.
2 35,.
191,.
1 36,.
07i»,.
029,.
005,.
                            307,.
                            28i,,.
                            251,,
                            2D6,.
                            1<»7,.
                            081,.
                            032,.
                            005,.
                       . 80 2,
                       . 79<»,. 83 8,
                       . 767,. 810
                       . 719,. 762,
                       .6'»8,.689,
                       . 5>t7 ,.585,
                       .m2,.'»i*i»,
                       . 2*f«.,. 266,
                       . 107,. 117,
                       . 019, .021,
                                 323,. 379,
                                 300,.355,
                                 266,. 320,
                                 219,.269,
                                 159,. 202,
                                 OeB,.118,
                                 035,. 050,
                                 005,.006/

                                 . 8 86, 1.02,
                                 . 878, 1.01,
                                 .850,. 985,
                                 . 801,. 937,
                                 .726,.e61,
                                 .620 ». 750 ,
                                 .<>7if,.59'>,
                                 . 283, .381,
                                 . 128, .181,
                                 . 022, .029X
 STIME » ITHOUR1TIHE)
 IT a JDATE/10000
NKM 1207
NKM 12P8
NKH 1209
NKM 1210
NKM 1211
NKM 1212
NKM 1213
NKM 121H
NKM 1215
NKM 1216
NKN 1217
NKM 1218
NKM 1219
NKM 1220
NKM 1221
NKM 1222
NKM 1223
NKM 122*
NKH 1225
NKM 1226
NKM 1227
NKM 1228
NKM 1229
NKM 1230
NKM 1231
NKM 1232
NKM 1233
MKM 123d
NKM 1235
NKM 1236
NKM 1237
NKM 1238
NKM 1239
NKM 12«»0
NKM 12«il
NKM 12*2
NKM 12*3
NKM 12<»
-------
20
c
60
80
 IM a J3ATE/100 - IY*100
 10 = JOATE - IYMOOOO - IM'100
 IY = IY » 1900
RETRIEVE SOUR ZENITH ANGLE ZEN
 CALL SOLARlRLAT,RLONStTMZONEtIY,IM,IOiSTIME,0,5l
 ZEN = 90. - 0
 IFUZEM.GE.ZINPUM .AND. IZEN. LE. ZINPtNZINPI 1 1 GO TO <»0

 00 20 K = 1 ,NOSTAT
 00 20 J = l.NR
 RATEV(JiK) = RMINU)
 CONTINUE
 GO TO 200

 00 60 I = l.NZINP
 IF(ZIKP(I).LT.ZENI  CO TO 60
 II  =1-1
 12 = I
 Zl = ZINPtin
 Z2 = ZINPtI2»
 GO TO 80
 CONTINUE
 PZ = (ZEN-ZimZ2-Zl)
 J = 1
 DO 90 KJ  =  l.NHTI
 IF(ZEE(JJ*l».GT.HTINP
NKM  1315
NKM  1316
NKM  1317
NKM  1318
NKM  1319
NKM  1320
 NKM  1321
 NKM 1322
                                        D-48

-------
     1  15HZENITH ANGLE
      END
                          ,F7.2I
                                                                    NKM  1323
                                                                    NKM  132%
C
C
C
C
C
C
C
10
 SUBROUTINE PROOUMOTI

     COMPUTES APPROXIMATE PRODUCT SPECIES CONCENTRATIONS

     HN03  OZIO  H202  NTRA  AN02  ACHO

     THIS ROUTINE IS SPECIFIC TO THE ERT PHOTOCHEMICAL  MECHANISM
                                it.1.78
                                   MOSTM1,
                                   NSTOY,
                                   WTMOLEI«»0»,
                                   RATEVU,?),
                                   LOCVRT(d)
39 SPECIES  X  6«» REACTIONS
 CONMON/CHEM1S MOSTAT,
1              NOSPECt
 COMMON/CHEM2/ CONINUO*5>,
1              RATEFF<65),
2              NVRATE.
 DO 10 K = l.NOSTAT
     	  HN03    	
 RATE = RATEFFI8)»CONINl2tK»*CONINt31,M
1 «CONINI33,KI
 CONIN(3<»,KI  = CONIN(3l»,K> * OT'RATE
     	  OZIO  	
 RATE * RATEFFI31)»CONIN<6,KI»CONINI25,KI
                       NKM
                       NKM
                       NKM
                       NKM
                       NKM
                       NKM
                       NKM
                       NKM
           NOREAC,     NKM
           NK          NKM
           RATKONI65), NKM
           O.RATE,      NKM
                       NKM
                       NKM
                       NKM
 RATEFFI16I*CONIN(21,K)NKH
                       NKM
                       NKM
                       NKM
RATEFFI32)»CONIN(7,K»» NKM
1325
1326
1327
1328
1329
1331
1331
1332
1333
133i»
1335
1336
1337
1338
1339
13<»0
                                                                             13*2
                                                                             13«»3
1  CONIN(25,K) * RATEFF(33)*CONIN(6,KI*CONIM(26,K)  »  RATEFF(3«»)»    NKM
2  CONIN(7,KI*CONIN(26,K)                                           NKM
 CONINJ35.K) « CONIN<35tKI » RATE»OT                                NKM
     	  H202  	                                  NKM
 RATE = (CONIN(22,K)»»2)»RATEFF(12) » CONIN»22tK»'CONIN«13,K»»      NKM
1                                                       RATEFFI55)   NKM
 CONIN(36,K) s CONINI36.K) »• RATE*OT                                NKM
     	  NTRA	                                  NKM
 RATE = CONINI1,K»»CONIN(28,K)»RATEFF«3T» » CONINC2,KI»CONIN(27,KI  NKM
1                                              »RATEFFU1)».85      NKM
 CONIN»37,K) = CONINI37,KI » RATE»OT                                NKM
     	  ftNOZ  	                                  NKM
 RATE = CONIN<2,K»»CONINtl3fKI»RATEFFt5l>>                           NKM
 CONIN(38«KI = CONIN(38«K) + RATE^OT                                NKM
     	  ACHO  	                                  NKM
 RATE = CONIN(l,K)»CONINU6,K)»RATEFF<58>                           NKM
 CONINI39,K) * CONIN«39,K) * RATE»OT                                NKM
 CONTINUE                                                           NKM
 RETURN                                                             NKM
 END                                                                NKM
                                                                             13«»5
                                                                             13*7
                                                                             13««8
                                                                             13<»9
                                                                             1350
                                                                             1351
                                                                             1352
                                                                             1353
                                                                        1355
                                                                        1356
                                                                        1357
                                                                        135B
                                                                        1359
                                                                        1360
                                                                        1361
                                                                        1362
                                                                        1363
                                                                        136<»
C
C
C
 SUBROUTINE RATEHKKI

   RETRIEVES PHOTODISSOCIATION RATES FOR THE KTH MESH  POINT

 COMMON /CHEM2/ CONINI l>0« 51 ,  HTHOLEUOIt
1               RATEFF(65),  RATEV«»,5>,

 00 10 I = 1,NVRATE
 J = LOCVRT(I)
 DATI/nklf II •» DATrtffT l/k
                                                                    NKM  1365
                                                                    NKM  1366
                                                                    NKM  1367
                                                                    NKM  1368
                                           RATKON165J,              NKM  1369
                                          ORATE, NVRATE, LOCVRTU)  NKM  1370
                                                                    NKM  1371
                                                                    NKM  1372
                                                                    NKM  1373
                                                                    UISU  4 IT I*
                                       D-49

-------

10



C
C
C














90



100
105
C


C
C
C
C
C

RATEFFU) = RATEVII,K>
CONTINUE
RETURN
ENO
SUBROUTINE RATES IY,YDOT)

CALCULATION OF CHEMICAL RATES

INTEGER BCFLAG
COMMON/CHEM1/ NOSTAT, NOSTM1,
1 NOSPEC, NSTOY,
COMMON/CHEM2/' CONINI<»0|5) , MTMOLEUB),
1 RATEFFl65)t RATEVHnS),
2 NVRATE, LOCVRTU)
DIMENSION YU), YOOTU) * RATEltOI* CUB)*
EQUIVALENCE IR.RATEFF)
DATA YES /3HYES/
NKP1 = NK * 1
00 130 K = 1, NOSTAT
KS = NK»IK-1)
00 90 1=1, NK
cm = Yii»KS)
CONTINUE
IFINSTOY.EQ.O) GO TO 105
00 100 I=NKP1,NOSPEC
ClI) = CONINlItK)
CONTINUE
CONTINUE

IFIQRATE.EQ.YES) CALL RATEHI IK)
CALL UNMIXRIK)

EXPLICIT CHEMICAL RATE EQUATIONS

RATES FOR THE ERT PHOTOCHEMICAL MECHANISM

RATEl 1) = * Rl i)»CI 2) - Rl 3)»CI D'Cl
NKM 1375
NKM 1376
NKM 1377
NKM 1378
NKM 1379
NKM 1380
NKM 1381
NKM 1382
NKM 1383
NOREAC, NKM 138«i
NK NKM 1385
RATKONl65)t NKM 1386
QRATE» NKM 1387
NKM 1388
R165I NKM 1389
NKM 1390
NKM 1391
NKM 1392
NKM 1393
NKM 139l»
NKM 1395
NKM 1396
NKM 1397
NKM 1398
NKM 1399
NKM moo
NKM 1MU
NKH 11.02
NKM 11.03
NKM 11.01.
NKM I) - Rl 7) NKM li»12









•Cl l)»Cl 31) - Rl 10)»Cl D'Cl 22) - Rl
- Rl 20)»Cl 1>*C( 18) - Rl 27)»Ct l)»Cl
•Cl 26) - Rl 36)»Cl D'Cl 28) - Rl 37)»Cl
•Cl D'Cl 23) - Rl i»i»)'Cl D»Cl 2M - Rl
- Rl 58) »Cl l)»Cl 15)
RATEl 2) = - Rl l)»Cl 2) * Rl 3)»Cl l)»Cl
•Cl 2)'Cl 33) * Rl 5)»Cl «»)•• 2 - Rl 8)
Rl 10)»Cl D»CI 22) - Rl 11>»GI 2)»Cl 22)
•Cl 3) * 2.00'Rl 1»»CI D'Cl 19) - Rl i
l«»)»Cl D'Cl 19) NKM i«il3
25) - Rl 28)»Cl DNKM l«ili»
D'Cl 28) - Rl 39)NKM 1«»15
53)'Cl D'Cl 13) NKM 1«»16
NKM i«»17
3) - Rl "i)'Cl DNKM IMS
•Cl 2)»Cl 3D » NKM 11.19
- Rl 13)»C| 2) NKM H2B
5)»CI 2)»CI 19) » NKM 1M21
Rl 17)»Cl 21) » Rl 20)»Cl D'Cl 18) «• Rl 22l»Cl 20) * Rl 27) NKM H22







•Cl D'Cl 25) » Rl 26)»CI D»Cl 26) - Rl
- Rl 30)»CI 2I»CI 26) » Rl 36)»Cl ll»Cl
•Cl 23) - Rl «.l)»Cl 2)»Cl 27) » Rl «»M»Cl
•Cl 2)»Cl 2»»> » Rl <»6)»Cl 11) » Rl 53)»Cl
•Cl 2)'Cl 13) » Rl 58)»Cl l)»Cl 16)
RATEl 3) = + Rl 2)»CI 32) - Rl 3)»Cl l)»Cl
• »Cl 3) - Rl 25)»Cl 3)»CI 8) - Rl 26)»Cl
29)»Cl 2)»Cl 25) NKM 1«»23
28) » Rl 39)»CI DNKM l«.2l»
1)»CI 2i») - Rl i»5)NKM 1«»25
D»C1 13) - Rl 5<»)NKM 1«»26
NKM l«»27
3) - Rl 13)»Cl 2INKM 1«»28
3)»Cl 9) NKM 1U29
D-50

-------
 RATEJ  4) » +  2.00»RC  4)»CC  D'CC  2)'CC 33) -  2.00'RC
'    »CC  4)" 2 - RC  6)'CC  4) * RC  7)'CC  D'CC 31) «•
'     0.15'RC 4D'CC  2)'CC 27)
                                                            5)
 RATEC  5) s -
     RC 43)»CC
 RATEC  6) » »
     RC 26)*CC
     'CC 25) -
      0.50'RC
  RC  9)*CC  5)'CC 31)
   7) » RC 47)'CC  6) '
   1.50*RC 2D»CC 17) *
   3)'CC  9) * RC 27)'CC
  RC 31)»CC  6)'CC 25) -
 38)'CC 27) - RC 47)'CC
    »  0.40»RC 24)'CC  9)'CC
     RC 48)»CC  6)»CC 31)
      0.50'RC 25)'CC  3)'CC
       D'CC 25) » RC 29)'CC
      RC 33)'CC  6)»CC 26) »
                                                            32)

                                                            8) *
                                                             2)
                                                              NKM
                                                              NKM
                                                              NKN
                                                            » NKM
                                                              NKM
1439
f.31
1<«32
                                 6) - RC I|8)*CC  6)»CC 31) *•
    RC 6t)»CC 25)'CC 29)
RATEC  7) = »  0.50'RC 2D'CC 17)
     0.30»RC 24)*CC  9)'CC 32) *
                              »  0.30»*C 23)'CC  8)»CC 32) +
                              8.50'RC 25)»Ct  3)«CC  8) *
     RC 28)'CC
     'CC 25) -
     »CC 27) »
     RC 43)*CC
 RATEC  8)
     »CC  3)'CC  8)
 RATEC  9) = - RC 19)'CC
     »CC  3)»CC  9)
 RATEC 10) - - RC 35>»CC
 RATEC ID * * RC 45)'CC
 RATEC 12) « - RC 50)»CC
     'CC 12)'CC 3D
 RATEC 13) = * RC 51)'CC
     'CC  2)»CC 13) - RC
 RATEC 14) = * RC 50)'CC
     •CC 13)'CC 22)
               D'CC 26) » RC 30)»C(
              RC 3«»)»CC  D'CC 25) *
               0.15*RC <»1)»CC  2)*CC
               7) » RC 62)»CC 26)*CI
            - RC 18)»CC  8)*CC 31) -
                             NKM
                             NKM
                             NKM
                             NKM
                             NKM
                             NKM
                32)'CC  7)   NKM
                27) » RC 40) NKM
                                  2)«CC 26) - RC
                                  0,50»RC 38)»CC
                                 27) - RC *2)»CC  7)»CC 31) -
                                 29)
                                 RC 23)»CC  8)»CC 32) - RC
                     9)»CC 3D - RC 24)'CC  9)'CC 32) - RC
            10)'CC
             2)»CC
            12)'CC

            12)»CC
            55)»CC
            12)'CC
31)

3D  -
RC
RC
                                        1.6) »C(
                                        5D*CC
                                           11)
                                           12)»CC
              3D - RC
                           3D - RC 53I'CC  D'CC 13) - RC
                           13)»CC 22)
                               3D  - RC 52)»CC
          RC
          RC
          RC
                 53)'CC
                 57)'CC
                 20)*CC
 RATEC 15) =
 RATEC 16) *
 RATEC 17) «
'    'CC 29)
 RATEC 181 = * RC 18)'CC
»    'CC  D'CC 18) - RC
 RATEC 19) = » RC 13)'CC
»    'CC  2)»CC 19) * RC
'    *CC  2)»CC 26)
 RATEC 20) « » RC ID'CC
 RATEC 21) = t RC 15)»CC
•    'CC 21)
 RATEC 22) = * RC  9)'CC  5)»CC 3D  -
•    »CC  2)'CC 22) -  2.00'RC 12)'CC
»    RC 22)'CC 20) »  0.4fl'RC 23)'CC
•    »CC  9)»CC 32) »  0.40'RC 26)'CC
     RC 43)»CC  7) »       RC 47)'CC
     RC 49)'CC 22)'CC 23) * RC 50)'CC
     'CC 3D - RC 55)»CC 13)*CC 22)  »
     »CC 22)'CC 29)
 RATEC 23) = *  0.40'RC 23)»CC  8)'CC
     •CC 32) +  0.10'RC 25)'CC  3)*CC
             D'CC
            12)'CC
             D'CC

             8)»CC
            64)*CC
             2)'CC
            17)'CC

             2)'CC
             2)'CC
13)
3D
16)
RC
RC
RC
56)»CC
58>'C«
21)'CC
                                                  31) * RC
15)
 D'CC 16)
17)  » HC 64)'CC
                           3D  * RC 19)*CC  9)'CC 31) - RC
                           18)'CC 29)
                            3)
                           21)

                           22)
                           19)
                                     RC
                                     RC

                                     RC
                                     RC
         14)'CC
         29)'CC

         22)'CC
         16)»CC
           D'CC
           2)'CC

          20)
          2D'CC
              19)
              25)
             RC
             RC
              33) - RC
                                 RC 10)'CC
                                 22)" 2 »
                                 8)'CC 32)
                                  3)'CC  9)
                                 6) «• RC
                                 12)'CC 3D
                                 RC 58)'CC
                                                D'CC 22) - RC
                                               RC 2D'CC 17) »
                                               »  0.40*RC 24)
                                                * RC 40)'CC 27)
                                                     6)'CC 3D
                                                * RC 52)»CC 14)
                                                D'CC 16) - RC
                                 32)
                                  8)
        » RC
    'CC 28)
     * RC
     - RC 63)'CC
RATEC 24) = » RC
    'CC  2)'CC 2
RATEC 25) =
    »CC  9)
                                  39)»CC
                                  49)*CC
     38)*CC 27) - RC
      D'CC 24) - RC
     23)'CC 29)
     42)'CC  7)'CC 3D -
   24) * RC 46)'CC ID
*  0.40»RC 25)'CC  3)'CC
- RC 27)»CC  D'CC 25) -
          *  0.40'RC 24)'CC  9)
          »  0.15'RC 36)'CC  1)
          D'CC 23)  *• RC 43)'CC
         22)'CC 23)  * RC 56)*CC

                 D'CC 24)  - RC
                                 RC
                                  8) *  0.80'RC 26)«CC  3)
                                 RC 29)»CC  2)'CC 25)  - RC
   NKM
   NKH
25)NKM
   NKM
26)NKM
   NKM
   NKM
   NKM
57)NKM
   NKM
54)NKM
   NKM
55INKH
   NKM
   NKH
   NKM
18)NKM
   NKM
20)NKM
   NKM
15)NKM
30)NKM
   NKM
   NKM
17)NKM
   NKM
1DNKM
   NKM
   NKM
 * NKM
-  NKM
   NKM
60)NKM
   NKM
   NKM
   NKM
 7)NKM
15)NKM
   NKM
45INKH
   NKM
   NKM
3DNKM
»CC  6)'CC 25) - RC 32)»CC  7) *CC  25)  - RC 6D'CC 25)*CC 29)   NKM
1«.35
ll>36
1«»37
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
145 B
1451
1452
1453
1454
1455
1456
1457
1458
1459
146t
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
                                D-51

-------




RATE* 26) = «• 0.«»0»Rt 25)»Cl 3»*CI 8) - R» 28»»Ct 1)»C« 26) -
• Rl 30)»C« 2)»C( 251 - Rl 33I*CI 6)»Cl 26) - R« 3^)»C« 7}
* »Ct 26) - R( 62)»CI 26)»C< 29)
RftTE< 27) - * 0.«5'RC 36)»CI 1)»CI 28) - R( 38)»C< 27) » Rl 39)
NKM 1««88
NKM li»89
NKM 1«»90
NKM I«i91
• »CI 1)»CI 23) - Rl «»0)*CI 271 - R« «il>»Cl 2>*C< 27) » Rl 63)NKM 1<»92

• »CI 23)»CI 29)
NKM I«i93
RATEI 38) = » Rt 35)»CI 10)»Cl 3i» - R( 36)»Cl 1)»CI 28) - Rl 37)NKM 1<»9<»

C

C
C
C
* »CI 1)»CI 28)

IFINK.LE.28) GO TO 110

RATES FOR S02 AND SOd

NKM 1V3?
NKM 1«»96
NKM 1«»97
NKM 1«>98
NKM 1«»99
NKM 1500
RATEI 29) s - RC 59)»Cl 29)»CI 311 - R( 60)»Cl 22)»CI 29) - Rl 6i)NKM 1501


» »C« 25)»CI 29) - Rl 62)*CI 26)»CI 29) - Rl 63)»CI 23)»CI 29)
» - Rl 6H)»CI 18)»CI 29)
NKM 1502
NKM 1503
RATE! 30) * f Rl 59)»CI 29)*CI 3t> » Rl 601'CI 22>»CI 291 » Rt 61)NKM 1504


C
110


120
C
130



C
C
C
C






C











50

» »CI 25)»CI 29) * Rl 62)»CI 26)»CI 29) > Rl 63)»CI 23)»CI 29)
» » Rl 6i»)»CI 1»)»CI 29)

CONTINUE
00 120 J * l.NK
YOOT(J»KS) = RATEIJ)
CONTINUE

CONTINUE
RETURN
END
SUBROUTINE STEAOYIY.N)

THIS VERSION OF STEADY COMPUTES THE STEADY STATE CONCENTRATIONS
OF 0 AND OH FOR THE ERT PHOTOCHEMICAL MECHANISN I39X6«») 1.31.79

COMMON /CHEM1/ HOST AT, HOSTH1, NOREAC, NOSPEC* NSTDY, NK
COMMON/CHEM2/ CONINIV0.5). MTMOLE UO > t RATKONI65)»
1 R(65» t RATEVt%,?)v QRATE,
2 NVRATE. LOCVRTId)
DIMENSION Yll)
DATA YES /3MYES /

00 50 K » ItNOSTAT
IFIQRATE.EQ.VES) CALt RATEHIK)
J - IK-l)»NK
FORM = RI1)*YI2*J)
OSTROY = RI2) » RI23)*YI8»J) » RI2«»)» V I9»J)
CONINI32.K) = FORM/OSTROY
^_._ _^_ f\U «»••••.••«
™*'" — ^— i/rf ••^•••w
FORM * RI6)*YU*J» » RI10) "Yl 1> J)»YI22»J) *RIS5) »YI15* J)
DSTROY = RI7)»YI1»J) + RI8)»YI2»J) * RI9)*Y15»J) » RI18) »Y I8» J) .
1 »RI19)'YI9+J» * RI35)*YI10»J) » RU2)»Yir *J) » Rl«t8) »Y 16* J)
2 » RI52)*VI1I,»J) * IRI50)»RI51)»RI57))»VI12*J)
CONINI31,K) * FORM/OSTROY
CONTINUE
RETURN
NKM 1505
NKM 1506
NKM 1507
NKM 1508
NKM 1509
NKM 151JO
NKM 15li
NKM 1512
NKM 1513
NKM ism
NKK 1515
NKM 1516
NKM 1517
NKM 1518
NKM 1519
NKM 1520
NKM 1521
NKM 1522
NKM 1523
NKM 152<»
NKM 1525
NKM 1526
NKM 1527
NKM 1528
NKM 1529
NKM 1530
utf M 1 (ST4
n^ n JL 70 JL
NKM 1532
NKM 1533
NKM 153«t
11 If 14 4 CVC
fiisn l!?or>
NKM 1536
NKM 1537
NKM 1538
NKM 1539
NKM 15
-------
C
c
c
        toe
 c


 c


 c
., • ••«','.«•;;".'„••-"         "-•
^Usgs~—	       s



I€N°            -fs«^lHl>
           f t,e^noH «*stt

 =-5S^,2J2=----

  JSSS*-
                   SI
  c
  c
  c
  c
  c
  c
  c

   c

   c
                    N
   10
   c
    20

    C
             D-

-------
    c
    c
    c
    c
    c
    c
   c
          *""
            ""'*
                UPFU1
1595
1596
109
C

C
C
                                             sf
                                              1
                                              ;
                                              ISf f

 C
 C
 c

    tin
c
c
c








                                         I
                  D-S4

-------
1
2
                                                          NKM 1**'
                                                          NKM
                                                          NKM
                                                           »**
  C
  C
  C
                                 wt.
                                                              MKM
              .^ct i
              /PS*/
                                                               HKM 1670
                                                               MKH
    10
                                                                     ,t
                                                                   l*
20
C
C
C
           « »/; vK-asiv.!1.


             ps«i«9'J  - .**f>SR2l>
                                                                1**'
                                                                1***
                                                                 1W1
                                                              HKM
                                                              NKM
                                                              NKM
30
C
C
C
                      . i

                                                               MKH 16
                                                               NKM 16
                                                               NKM 1<
                                                               NKM 1'
                                                               NKM 1
                                                               NKM 1
                                                                NKM 1
                                                                NKM  1

-------

1
^
                                           ,r
                                              rtw
              0-S6

-------
                                   TECHNICAL REPORT DATA
                            (Please read Instructions on the reverse before completing)
1. REPORT NO.
  EPA-600/8-79-015b
                                                           3. RECIPIENT'S ACCESSION>NO.
4. TITLE AND SUBTITLE
 A LAGRANGIAN PHOTOCHEMICAL AIR  QUALITY SIMULATION MODEL
 Adaptation  to the St. Louis - RAPS  Data Base
 Volume  II.   User's Manual	....
                                                           5. REPORT DATE
                                                             June 1979
                               6. PERFORMING ORGANIZATION CODE
7. AUTHOR(S)
 Fred  Lurmann,  Daniel Godden, Alan  C.  Lloyd and
 Richard A.  Nordsieck
                                                           8. PERFORMING ORGANIZATION REPORT NO.
9. PERFORMING ORGANIZATION NAME AND ADDRESS
  Environmental  Research and Technology,  Inc.
  2625  Townsgate Road
  Westlake Village, CA  91361
                               10. PROGRAM ELEMENT NO.

                                 1AA6Q3A AA-Q45  (FY-  79)
                               11. CONTRACT/GRANT NO.
                                                            68-02-2765
12. SPONSORING AGENCY NAME AND ADDRESS
  Environmental  Sciences Research  Laboratory - RTP, NC
  Office  of Research and Development
  U.S.  Environmental Protection Agency
  Research  Triangle Park, NC  27711
                                                           13. TYPE OF REPORT AND PERIOD COVERED
                                 Final
                                14. SPONSORING AGENCY CODE


                                 EPA/600/09
15. SUPPLEMENTARY NOTES
  Volume I. Model  Formulation — EPA-600/8-79-015a,  June 1979
16. ABSTRACT
     A  set of instructions have  been compiled for use of a  Lagrangian photochemical
 air quality simulation model  adapted to the St. Louis, Missouri/Illinois metropoli-
 tan region and the Regional Air Pollution Study (RAPS) data  base.   The computer
 model,  developed by Environmental  Research and Technology,  Inc.,  consists of a set
 of computer programs for the  simulation of atmospheric transport,  turbulent
 diffusion, and chemical kinetics of photochemical pollutants.   The model is used to
 predict atmospheric concentrations of ozone, nitrogen dioxide,  carbon monoxide,
 sulfur dioxide, and sulfate within an air column moving at the  mean wind speed.

     Descriptions of the meteorological, source emissions,  and air quality data
 requirements, as well as sample input and output files, are  provided.  The computa-
 tional  procedures for using the model and a listing of the computer code are
 included.
                                KEY WORDS AND DOCUMENT ANALYSIS
                  DESCRIPTORS
                                              b.lDENTlFIERS/OPEN ENDED TERMS
                                             c. COSATI Field/Group
  * Air pollution
  * Hydrocarbons
  * Nitrogen oxides
  * Ozone
   Data
  * Adaptation
  * Mathematical models
* Photochemical
    reactions
* Manuals
   13B
   07C
   07B
   12A
   07E
   05B
18. DISTRIBUTION STATEMENT

  RELEASE TO PUBLIC
                  19. SECURITY CLASS (This Report)

                     UNCLASSIFIED
21. NO. OF PAGES

    454
                                              20. SECURITY CLASS (Thispage)

                                                UNCLASSIFTFD
                                             22. PRICE
EPA Form 2220-1 (9-73)

-------
          Q   s  x  a>  x
          ^§0^0
          ft)   5.  C  O  C
PI
0
o
  3-  =;
                 O  ft)  to
             ~  =3  „.  <1
                     s
                         »
                     Y>  Q)
                     .<"  3
                        
r

O
PPORTU
Z
H
<
m
£
T)
H
0
<
m
"D
m
Z
>
r
H
/
***
Tl
0
TJ
TJ
TJ
<
>
H
m
C
W
m
(/)
CO
o
o



0
Tl
Tl
O
>
r
CD
C
CO
z
m
CO
CO




o
—
n
Ci
3
u
£D
0
zr
5
^
en
M
CD
00


m
^
^

o
•^
B
CD
^
Q)
1 Researcl
	 )
Z3
O
i
o>
o
=J
O
CD
3
0
I?-
o
ft)
o

Jj
esearch
0)
Z)
Q.
O
CD
<

5"
TD
3
CD
^s
m
<
13
O

z.
ENTAL P
JD
O
— I
m
o
H
O
>
CD
                                                                                                                             CD
                                                                                                                             c
                                                                                                                             01
                                                                                                                             m
                                                                                                                             Z
                                                                                                                             o   o
                                                                                                                                  >
                                                                                                                                  O
                                                                                                                        >
                                                                                                                        CJ
                                                                                                                             >    >
                                                                                                                             r~    Z
                                                                                                                             TJ    O
                                                                                                                             X    -„
                                                                                                                             O    m
                                                                                                                                  >
                                                                                                                                  6
                                                                                                                             G)
                                                                                                                             m
                                                                                                                             Z
                                                                                                                             n

-------

vvEPA
           United States
           Environmental Protection
           Agency
           Environmental Sciences Research  EPA-600/8-79-01 5b
           Laboratory    .     June 1979
           Research Triangle Park NC 27711
           Research and Development
A Lagrangian
Photochemical Air
Quality Simulation
Model

Adaptation to the
St. Louis—RAPS
Data Base
Volume II.
User's Manual
                                   ff^~
                                     OF

-------
                 RESEARCH REPORTING SERIES


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

     1.  Environmental Health Effects Research

     2.  Environmental Protection Technology

     3.  Ecological Research

     4.  Environmental Monitoring

     5.  Socioeconomic  Environmental Studies

     6.  Scientific and Technical Assessment Reports (STAR)

     7.  Interagency Energy-Environment Research and Development

     8.  "Special" Reports

     9.  Miscellaneous Reports

This report has been assigned to the SPECIAL REPORTS series. This series is
reserved for reports which are intended to meet the technical information needs
of specifically targeted user groups. Reports in this series include Problem Orient-
ed Reports, Research Application Reports, and Executive Summary Documents.
Typical of these reports include state-of-the-art analyses, technology assess-
ments, reports on the results of major research and development efforts, design
manuals, and user manuals.
This document is available to the public through the National Technical Informa-
tion Service, Springfield, Virginia 22161.

-------
                                                      EPA-600/8-79-015b
                                                      June 1979
     A LAGRANGIAN PHOTOCHEMICAL AIR QUALITY SIMULATION MODEL

          Adaptation to the St. Louis - RAPS Data Base

                    Volume II. User's Manual
                                by

Fred Lurmann, Daniel Godden, Alan C. Lloyd, Richard A. Nordsieck
           Environmental Research and Technology, Inc.
                 Environmental Analysis Division
                       2625 Townsgate Road
               Westlake Village, California  91361
                     Contract No. 68-02-2765
                         Project Officer

                        Jack H. Shreffler
               Meteorology and Assessment Division
           Environmental Sciences Research Laboratory
                Research Triangle Park, NC  27711
           ENVIRONMENTAL SCIENCES RESEARCH LABORATORY
               OFFICE OF RESEARCH AND DEVELOPMENT
              U.S. ENVIRONMENTAL PROTECTION AGENCY
                RESEARCH TRIANGLE PARK, NC  27711

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

         Dr.  Shreffler,  the Project  Officer,  is  on assignment  to  the
    Meteorology and Assessment Division,  Environmental  Sciences Research
    Laboratory, from the National Oceanic and Atmospheric Administration,
    U.S.  Department of Commerce.
                                     ii

-------
                                 ABSTRACT
     A set of instructions have been compiled for use of a Lagrangian
photochemical air quality simulation model adapted to the St. Louis,
Missouri/Illinois metropolitan region and the Regional Air Pollution Study
(RAPS) data base.  The computer model, developed by Environmental Research
and Technology, Inc., consists of a set of computer programs for the
simulation of atmospheric transport, turbulent diffusion, and chemical
kenetics of photochemical pollutants.  The model is used to predict
atmospheric concentrations of ozone, nitrogen dioxide, carbon monoxide,
sulfur dioxide, and sulfate within an air column moving at the mean
wind speed.
     Descriptions of the meteorological, source emissions, and air quality
data requirements, as well as sample input and output files, are provided.
The computational procedures for using the model and a listing of the
computer code are included.
                                    iii

-------
                                CONTENTS
ABSTRACT                                                         ii:L
LIST OF ILLUSTRATIONS                                             viii
LIST OF TABLES                                                     x
 1.  INTRODUCTION                                                 1-1
 2.  COMMON FEATURES OF THE CODE MODULES                          2-1
     2.1   Reading the Data Cards                                 2-1
     2.2   Systems of Units and Time-Date Conventions             2-1
     2.3   Specification of Locations                             2-4
 3.  THE METEOROLOGICAL MODULE                '                    3-1
     3.1   Raw Data Requirements                                  3-1
     3.2   Control Parameters and Input Data                      3-2
     3.3   Specification of the Station Measurement Data          3-17
     3.4   Modeling Region and Emissions Grid                     3-20
     3.5   Selection of the Vertical Mesh Point Elevations        3-24
     3.6   Description of the Output                              3-24
     3.7   Internally Specified Data                              3-39
     3.8   Surface Roughness Length                               3-39
     3.9   Printer-plot Boundaries                                3-43
     3.10  Computational Procedures                               3-44
           3.10.1  Calculation of Air Parcel Trajectories         3-44
           3.10.2  Interpolation of Other Atmospheric Parameters
                   Along the Trajectory                           3-48
           3.10.3  Calculation of Eddy Diffusivity Coefficients   3-48
     3.11  Program Modifications                                  3-49
           3.11.1  Changing the Number of Measurement Stations    3-49
           3.11.2  Changing the Azimuth Exclusion Sector          3-50
 4.  THE EMISSIONS MODULE                                         4-1
     4.1   Control Parameters and the Input Deck                  4-1
           4.1.1  General Inputs                                  4-11
           4.1.2  Area Source Emissions Control Inputs            4-12
           4.1.3  Point Source Emissions Control Inputs           4-12
     4.2   Description of the RAPS Input Files                    4-13
           4.2.1  Emissions Grid File                             4-13

-------
                      CONTENTS (CONTINUED)

      4.2.2  Area Source Emissions File                     4-14
      4.2.3  Point Source Emissions File                    4-15
4.3   Description of the Outputs                             4-16
      4.3.1  Area Source Emissions Outputs                  4-16
      4.3.2  Point Source Emissions Outputs                 4-20
      4.3.3  Punched Outputs                                4-27
4.4   Computational Procedures                              4-27
      4.4.1  Area Source Emissions Tabulations              4-27
      4.4.2  Point Source Emissions Tabulations             4-29
4.5   Internally Specified Data                             4-36
4.6   Program Modifications                                 4-36
THE CHEMICAL-DIFFUSION MODULE                               5-1
5.1   Control Parameters and Input Data                     5^1
      5.1.1  Source Emissions Data                          5-25
      5.1.2  Control Parameters and the Vertical Mesh       5-26
      5.1.3  Chemical Species List    .                      5-28
      5.1.4  Emission Species and Surface Deposition
             Species                                        5-28
      5.1.5  Initial Concentrations                         5-29
      5.1.6  Chemical Reaction Mechanism Inputs             5-29
      5.1.7  Photodissociation Rate Input Parameters        5-31
      5.1.8  Sky Clearness, Temperature, and Diffusivity
             Schedules                                      5-32
5.2   ERT Photochemical Mechanism                           5-33
5.3   Photodissociation Rates                               5-33
5.4   Description of the Outputs                            5-39
5.5   Computational Procedures                              5-54
5.6   Program Modifications                                 5-56
      5.6.1  Changing the Chemical Mechanism                5-56
      5.6.2  Changing the Partitioning of Emissions
             Input Data                                     5-59
      5.6.3  Increasing the Number of Species with
             Emission Inputs                                5-60
      5.6.4  Changing the Plot Species                      5-60
                               VI

-------
                           CONTENTS  (CONTINUED)
6.  REFERENCES                                                  6-1
APPENDIX A   CODE COMMON BLOCK LOCATIONS
             1.  Meteorological Module Common Blocks
             2.  Emissions Module Common Blocks
             3.  Chemical-Diffusion Module Common Blocks
APPENDIX B   CODE SUBROUTINE DESCRIPTIONS
             1.  Meteorological Module Subroutines and Their Use
             2.  Emissions Module Subroutines and Their Use
             3.  Chemical-Diffusion Module Subroutines and Their Use
             4.  Utility Library Subroutines and Their Use
APPENDIX C   CODE FORTRAN SOURCE LISTINGS
             1.  Meteorological Module Listings
             2.  Emissions Module Listings
             3.  Chemical-Diffusion Module Listing
             4.  Utility Library Listing
APPENDIX D   AN  IMRPOVED PHOTOCHEMICAL MbCHANISM AND  RELATED
             MODIFICATIONS TO  THE CHEMICAL-DIFFUSION  MODULE
             1.  Description of Chemical Mechanism and Related
                 Modifications
             2.  KEMOD  Input Data Modifications
             3.  KEMOD  FORTRAN Source Code Modifications
                                    vii

-------
                     LIST OF ILLUSTRATIONS






Figure                                                          Page




1-1       Physical Concept of the Trajectory Model               1-2




1-2       Data Processing Flow Chart                             1-4




2-1       Process for Reading Data Cards                         2-S




3-1       Meteorological Module Sample Problem Input Listing     3-8




3-2       METMOD Input Variable Sequence and Options             3-13




3-3       The IVG Array                                          3-23




3-4       Meteorological Module Sample Output                    3-26




3-5       Meteorological Module Sample Output                    3-27




3-6       Meteorological Module Sample Output                    3-28




3-7       Meteorological Module Sample Output                    3-29




3-8       Meteorological Module Sample Output                    3-30




3-9       Meteorological Module Sample Output                    3-31




3-10      Meteorological Module Sample Output                    3-33




3-11      Meteorological Module Sample Output                    3-34




3-12      Meteorological Module Sample Output                    3-35




3-13      Meteorological Module Sample Output                    3-36




3-14      Meteorological Module Sample Output                    3-37




3-15      Meteorological Module Sample Output                    3-38




3-16      Surface Roughness  Length  Profile                       3-42




3-17      Reverse Trajectory Development                         3-47




4-1       Emissions Module Sample Problem Input  Listing          4-5




4-2       EMMOD  Input Variable Sequence and  Options              4-10




4-3       Emissions Module Sample Output                         4-17




4-4       Emissions Module Sample Output                         4-18




4-5       Emissions Module Sample Output                         4-19
                                  viii

-------
               LIST OF ILLUSTRATIONS (CONTINUED)


Figure                                                        Page

4-6      Emissions Module Sample Output                       4-21

4-7      Emissions Module Sample Output                       4-22

4-8      Emissions Module Sample Output                       4-23

4-9      Emissions Module Sample Output                       4-24

4-10     Emissions Module Sample Output                       4-25

4-11     Emissions Module Sample Output                       4-26

4-12     Emissions Module Sample Output                       4-28

4-13     Plume Entrainment in a Lagrangian Air Parcel         4-31

4-14     Lateral Spreading of Plumes Into and Out of
         Moving Air Parcels                                   4-32

4-15     Vertical Distribution of Emission Below
         Inversion Base                                       4-33

5-1      Chemical-Diffusion Module Sample Problem Input
         Listing                                              5-7

5-2      KEMOD Input Variable Sequence and Options            5-24

5-3      Chemical-Diffusion Module Sample Output              5-42

5-4      Chemical-Diffusion Module Sample Output              5-43

5-5      Chemical-Diffusion Module Sample Output              5-44

5-6      Chemical-Diffusion Module Sample Output              5-46

5-7      Chemical-Diffusion Module Sample Output              5-47

5-8      Chemical-Diffusion Module Sample Output              5-48

5-9      Chemical-Diffusion Module Sample Output              5-49

5-10     Chemical-Diffusion Module Sample Output              5-50

5-11     Chemical-Diffusion Module Sample Output              5-52

5-12     Original and Revised Area Source Flux Schedules      5-53
                                  IX

-------
                        LIST OF TABLES


Table                                                       Page

2-1      Code Utility Subroutine Library                     2-2

2-2      Modeling Units                                      2-2

2-3      Equivalent Clock Times                              2-3

3-1      Meteorological Module Input Variable
         Description                                         3-3

3-2      The Digital Wind Azimuth System                     3-18

3-3      The Station-measured Parameters in the
         St. Louis Input File                                3-18

3-4      Variables Stored in the CON Array                   3-21

3-5      Meteorological Module Internally Specified
         Data                                                3-40

4-1      Emissions Module Input Variable Description         4-2

4-2      Emissions Module Internally Specified Data          4-38

4-3      Plume Dispersion Coefficients For Non-Tall
         Stacks                                              4-40

4-4      Plume Dispersion Coefficients For Tall Stacks       4-41

5-1      Chemical-Diffusion Module Input Variable
         Description                                         5-2

5-2      User Specified and Internally Computed
         Initial Concentrations                              5-30

5-3      The ERT Photochemical Reaction Mechanism            5-34

5-4      Chemical Species Symbol Designations                5-37

5-5      NO  Photodissociation Rates                         5-40

5-6      HCHO Photodissociation Rates                        5-41
                                   x

-------
                            1.    INTRODUCTION

     This manual contains instructions for using the Lagrangian trajec-
tory model developed by Environmental Research and Technology, Inc.
(ERT).   The model consists of a set of computer programs for simulation
of Lagrangian transport and atmospheric reactivity of photochemical
pollutants.  These instructions describe features of the code which a
user must understand in order to successfully utilize the model.  The
manual describes the code as adapted to the St. Louis, Missouri region
and the Regional Air Pollution Study (RAPS) data base.  Suggestions are
provided for adapting the model to regions with different data base
structures.
     The Lagrangian trajectory code is written in the FORTRAN IV comput-
er language in the single precision mode.  The code has 3 main programs,
82 subroutines, 11 functions and block data programs.  The maximum
storage requirement of any one program is 51,000 words for execution.
     A diagram of the physical concept of the model is shown in Figure
1-1.  An air parcel is advected along a path (trajectory) determined by
the local prevailing wind speed and direction.  The air parcel is divid-
ed into a mesh of variably spaced points in the vertical direction.  As
the air parcel moves along a trajectory, it receives primary pollutant
emissions from surface and elevated sources.  The pollutants within the
air parcel undergo chemical reactions and vertical diffusion, with
photolysis by ultraviolet radiation driving several of the chemical
transformations that occur.  At each mesh point in the parcel, concen-
trations of 30 chemical species are computed.  These species include
ozone, oxides of nitrogen and sulfur, hydrocarbons, carbon monoxide and
radical intermediates of known importance in the formation of photo-
chemical smog.  The output of the model consists of these calculated
concentrations as functions of time and height along the trajectory.
     The model is designed with a modular structure corresponding to the
three data processing tasks required to compute atmospheric pollutant
concentrations.  The first task consists of processing meteorological
data to determine air trajectories and characterize atmospheric condi-
tions along the trajectories.  This task is performed by the meteoro-
logical module of the code, program METHOD.  The second task involves
processing area source and point source emissions data to assemble
                                   1-1

-------
                                                        o
                                                        13
                                                         JH
                                                         O
                                                        -(->
                                                         U
                                                         0)
                                                        •r-i
                                                         rt
                                                         OH
                                                         0)
                                                         O

                                                        i
                                                         oj
                                                         O
                                                        •H
                                                         a
                                  HI UJ
1-2

-------
emission rate schedules for the various pollutants along the trajec-
tories.  This task is performed by the emission module,  program EMMOD.
The last task is the computation of the solution to the diffusion
equation, with simultaneous chemistry, for the species concentrations
along the trajectory.  This task is performed by the chemical-diffusion
module of the code, program KEMOD.
     The data processing activities proceed in the sequence of the tasks
described above, as schematically illustrated in Figure 1-2.  The user
assembles wind, temperature, and ultraviolet radiation data for a single
day in the modeling region.  A start location, vertical mesh point
elevations, and several program control parameters are selected.  This
data is used by the meteorological module to determine temporal schedules
of wind speed and direction, atmospheric mixing coefficients (K ) and
                                                               Lt
stability, surface temperature, and sky clearness.  The trajectory start
location, wind speed and direction, surface temperature, and atmospheric
stability outputs are transferred to the emissions module input stream.
This data is used in addition to the gridded area source emission rates,
point source locations, emission rates, and stack parameters, and a
schedule of mixing heights by EMMOD to generate the emission source
schedule for the trajectory.  This emission schedule is then transferred
to the chemical-diffusion module input stream along with the temperature,
sky clearness, and mixing coefficients output from METMOD.  The chemical-
diffusion module-s input stream is complete upon user specification of
initial pollutant concentrations, chemical reaction rates, and several
control parameters.  The data processing activities are concluded by
running the chemical-diffusion module, which outputs the computed
concentration profiles.
     It should be noted that the meteorological and emissions modules
have been equipped with input data retrieval software, which is specific
to the RAPS data tape format.  Much of the input data is retrieved from
the RAPS tapes, not the card-image input stream.  Modification of this
software is required for application of the model in regions other than
St. Louis.  The chemical diffusion module input stream is read entirely
from the card reader and thus does not bear this restriction.  However,
it has several subroutines which are specific to the ERT photochemical
mechanism.
                                   1-3

-------
(U
1
a.

3
P-i
3
O

f— i
rt
C
•rt
U,











0
^H
a.

{^
o
•P
o
a?
•i— i
rt

H
A
(fl
•P
P-
C
h^
(rt
P
3
p.

j3
o

•H
13

O
•H
rt
^i
to 4J
0) C
• H 0)
O O
d> C
PH O
CO U
j>




w

^
3
p
rt

 Cfl -P
C a) -H
•H fn IH
to 3 -H
(rt P rO
o rt rt
H H -P
u a> co
o 6 o
X f-l 4) -H
fn rt H H
03 0)
P 0- 0) X
O CO O PH
o rt (rt
•i— i TJ ^W O
rt -H f-i S
fn H 3 -P
H U CO <



Q
r
S
^

1
y









W)
-p
3

C
HH
H
ttJ
S
•H
£^
a,












rt rt
H -P
a> rt
O. C^)
pr
(U A
H 0
•H
13 P
o> rt
+J -H
rt ^
> rt
o B£
r-*
U +•>
rt w!T i— 1
P O
rt 
C 't?
O H
•H H
(/)
trt (1)
•H ^3
e ts

XK




Q
^2
*^- n



























\
f























<,


























Q
^ «. C
W t
^ *•
\

/




^^
J^
•p
(D
6
o
CJ

X
trt
£

i-H
rt
o
•H
P
H
0)






















(rt
0) 

o a, ob a> OH -H S M 3 ^ -rt "O >< H H O C -H 0) < cu rt S > <. ^^ H 4-> (D S 8 W (rt U 0) (3 •H O X O -H W tt) P 0) PH rt S CO H P r-H •-i C rt rt o> o • H O -H P C 4-> •rf O H C O CM I •H PH 1-4


-------
     The sections of this manual that follow describe the operation of
the three modules of the code.  Appendix A lists the common block loca-
tions in the code.  Appendix B includes a description of the programs,
subroutines, and functions used by the code.   Appendix C contains the
FORTRAN source listing of the complete code as run on Control Data
Corporation computers.  Appendix D describes an alternate chemical
mechanism and related modifications for its use.
                                   1-5

-------
                2.   COMMON FEATURES OF THE CODE MODULES

     Tne three modules of the code have certain common features and use
subroutines from a common utility program library.   This section de-
scribes the common card reading process, system of units,  time-date
conventions, and coordinate systems used by the code.   In addition, a
list of utility library subroutines is provided in Table 2-1.

2.1  Reading the Data Cards

     The process of reading the input cards is illustrated in Figure 2-
1.  The data cards are read by subroutine PREDAT from the card reader,
which is referred to as logical unit 5  [e.g., READ (5,NJ LIST].  PREDAT
reads the data until it detects an end-of-file mark or a card with the
word "MORE" in columns 1-4.  It then produces a listing of the data deck
on the line printer, which is designated as logical unit 6 [e.g., WRITE
(6,N) LIST].  Examples of the output produced by PKEDAT are contained in
Sections 3, 4 and b.  The subroutine also writes the data on a scratch
peripheral disk file designated as logical unit number 3.   After writing
the data on unit 3, the subroutine rewinds unit 3,  and the data are then
ready to be read by the program.  Each module of the code calls PREDAT
at the beginning of the main program.

2.2  Systems of Units and Time-Date Conventions

     The model performs its calculations in metric units.   Table 2-2
lists the units used by the code.  Clock-time is expressed on two
different clocks.  The model uses the 0-2400 hours military clock and a
0-1440 minutes from midnight clock.  Table 2-3 lists some equivalent
times on the two clocks.  Dates are generally expressed on a year-month-
day basis (e.g., YRMODA = 760613 is June 13, 19/6).  In situations where
dates are specified on a Julian basis, leap year corrections are included.
                                   2-1

-------
                       TABLE  2-1




            CODE  UTILITY SUBROUTINE  LIBRARY
                                 Module  Requirements
Subroutine
FMINF
MCHAR
MDATE
NEWPAG
PREDAT
SECOND
SETPLT
SOLAR
XMIT


Quantity
METHOD EMMOD
X X
X
X X
X X
X X
X X
X
X
X X
TABLE 2-2
MODELING UNITS
Units
KEMOD

X
X
X
X
X
X
X
X



Length - vertical




Length - horizontal




Time




Mass




Concentration




Temperature




Luminous intensity
meters



kilometers



minutes and hours




kilograms



parts per million



degrees Celsius



Langleys per minute
                          2-2

-------
   Time




   6 AM




   7 AM




   8 AM




   9 AM




  10 AM




  11 AM




  12 PM




   1 PM




   2 PM




   3 PM




   4 PM




   5 PM




   6 PM




6:59 PM
       TABLE 2-3




EQUIVALENT CLOCK TIMES






   0-2400 Hour Clock




          600.




          700.




          800.




          900.




         1000.




         1100.




         1200.




         1300.




         1400.




         1500.




         1600.




         1700.




         1800.




         1859.
0-1440 Minutes Clock




        360.




        420.




        480.




        540.




        600.




        660.




        720.




        780.




        840.




        900.




        960.




       1020.




       1080.




       1139.
                             2-3

-------
2.3  Specifications of Locations

     The program uses both a global and local coordinate system.  Since
the convention in air pollution modeling is to use the Universal Trans-
verse Mercator (UTM) coordinate system, the program uses the label U'l'M
for all global coordinate system data.  All user specified location
coordinates are input in the global coordinate system.  The user also
specifies an origin for a local coordinate system used internally by
the programs.
                                    2-4

-------
  UNIT 6
L
LINE
PRINTER
OUTPUT
                             DATA
                             CARDS
                      z
               CARD READER
                 UNIT 5
SUBROUTINE
  PREDAT
             SCRATCH DISK
                UNIT 3
\
r
PROGRAM READS
DATA FROM
UNIT 3
READS FROM UNIT 5

WRITES ON UNIT 3

AND UNIT 6.  UNIT 3

IS THEN REWOUND
          Figure 2-1   Process for Reading Data Cards
                              2-:

-------
                  3.   THE METEOROLOGICAL MODULE

     This section describes procedures for using the program METMOD.
METHOD generates air parcel trajectories and characterizes atmospheric
conditions along the trajectories from basic meteorological data.   Raw
data requirements, input control parameters, input structures, optional
modes of operation, output, and the basic computational procedures are
described.  Listings of the input and output for a sample problem are
included.  Since this program requires internal specification of data,
which is characteristic of a particular modeling region, the user is
encouraged to examine the FORTRAN source listing in Appendix C if he/she
is adapting the model for applications to a region other than St.  Louis.

3.1  Raw Data Requirements

     The meteorological module requires a minimum input data base con-
sisting of the following information:

     •    Hourly wind speeds and directions (from a network of
          monitoring stations)
     •    Hourly surface temperatures (regionally representative)
     •    Early morning and afternoon vertical temperature pro-
          files (regionally representative).

     The fidelity of the modeling is enhanced by using a data base
with maximum spatial and temporal resolution.  The program has the
capability to utilize a data base, which includes the following data
from a network of aerometric measurement stations:

     •    Hourly surface winds
     •    Hourly surface temperatures
     •    Vertical temperature profiles (three per day)
     •    Ultraviolet radiation data
     •    Ground-level pollutant concentrations
                                    3-1

-------
     The optional ultraviolet radiation data are important to the model-
ing when the user intends to simulate days with unclear sky conditions.
The pollutant concentrations, on the other hand, are input to the pro-
gram more as a convenience to the user.  They are interpolated along the
trajectory in a manner similar to the wind data to approximate the meas-
ured concentrations in the Lagrangian reference frame.  This computation
is, of course, optional but quite useful when the user selects initial
pollutant concentrations for the chemical-diffusion module.

3.2  Control Parameters and Input Data

     The input parameters of the program will be discussed in the
general order in which they are read by the code.  The reader should
refer to Figure 3-1, which contains a copy of the listing produced by
PREDAT, to obtain a better picture of the actual structure of the data
deck.  Table 3-1 shows a list of the program inputs, along with a
description of the function of each input variable, the name of the
variable used in the code, and the format.  In addition, Figure 3-2
contains a flow chart illustrating the sequence in which the variables
are read under the different modes of operation.
     It is important for the user to recognize that the selection of
trajectories is often an iterative process.  The user will usually
desire the trajectories to start or end at a particular station or
subregion of the modeling region and to have as  long a duration as
possible.  Satisfying these requirements usually requires  generation of
several trajectories for different start times and/or start  locations.
The METHOD program is designed with a multiple-case feature, which
allows generation of multiple trajectories in a  single computer run.
     Several modes of operation of the code are  available  to the user.
The variables, which control the selection of these operational modes,
are read immediately following the output page  label  (TITLE) in the
input deck.  When the user wishes the  trajectory to be generated from
wind data, he/she sets the input parameter TRAJEX equal to NO.  This is
the code's most  common mode  of operation.  Alternatively,  the user has
the option to input a trajectory which has been  externally computed.   In
this case, the user sets TRAJEX = YES  and inputs a  trajectory start
location  (input  23) and  a  schedule of  times, wind speeds,  and directions
 (input  24).   In  either of  these cases, the user  can request  or suppress
                                    3-2

-------
CN
        
E-
OH
2
rH

UJ
J
D
Q
0
•S:

r— 3
•^
U
rH
CJ
O
,-J
o
OS
O
UJ
UJ
2






























to

rH
Cti
B

OS















^
< P
OH rt
OS ^
O 0
f T | [J^















(1) f^
rH O
XI -H
rt P
•H 0
rH C
rt 3
> u.





to
CD
2 0
u

rH f^
rO r— 1
rt
•H ""Cj
rH CD
rt to
P CD
3 r*"**
ft B
C 3
rH 2

(0
p
C
u

C
o
U

rH
CD
to
3

XO
pi oo
rt i
i— i
Pi

rt PI
P B
C 3
O rH
U O
O
X
.1.5








/— \
^
0
V 	 '








MH
o

CD
bo
rt
ft

x:
o
rt
CD

fa
O
t4H •
P
rH 3
CD ft
XI P
rt 3
J O





UJ
_J
H
rH
H


t— H





 2

rC ^
P O
•H
rH CO
CD UJ
rH >H
i-H
o to
3C rH
rt
rt 3
cr
to CD
•H
r^
to u
• H -H
M






/• — N
rt
<:
x.
o
^ — '






p 1
3 E
ft o
C O
•H
rH
to o
•H
,— ^
XCO
rH UJ
O >*
i i *~ _->
O
0 X
•T-H-H
rt I-H
rH rt
P C
•o 
tfj rH
-P n3
•H -P




















•
/— ^
o
2,


X
i-H
rH
rt
g
CD
P
C
•H
TJ
CD
P
ft

















^
(D
^fi


C

•p
3
OH
C
•H

^
o
M-(

t/l
•P
C
O
£
g
o
o

CD
CD
co






t — \
^>
•
V 	 '
rH
0) t)
XJ CD
p x:

rH 3
O PH •
t(-j /— ^
(/) O
•p a; 2;
pj rH v™-/
ft 3
P T3 P
ao o
B Pi




a
2
rH
^
OH
^


to




rH
4)
X)
B
3
C

P
3
ft
C
•H

£^
O
^4H

to
P
P!
CD
G
§
o
o

CD
CD
CO






/— ^
^J"
<
X
o
^-^




•
Uit ^~N
•H O
2
rt to > — '
rH rH
P CD P
X P O
0 CD pi
B
«4H rt rH
O rH O
rt

o c/?
•H 0 UJ
P -H >H
rt (H v — '
i — t CD
O JS TJ
ft ft CD
rH 10 rH
CD O -H
P S tO
C P CD
rH rt T3




o-

Q
UJ
UJ
2


rt




rH
CD
XI
B
3
Pi

P
3
ft
Pi
•H

rH
O
t4_|

to
P
C •

E to
€ '
O VO
O CN

CD *O
CD P!
co rt






,— ^
^t
•<
x"
0
rt




1 •
3 *~~^
4-i O

-i
•H O v— '
P 0
rt T3
rH X CD
3 P rn
O -H -H
rH > t/)
rt -H 0
CJ IO T3




NI

Q
UJ
U4
2


LO














•
to
-d

rt
0

rH
O
t4H

to

(O
i-H
rt
3
0*






f — \
CN
rH
x"
o






«
CD
i-H
 rH

3 0
C
CD
•P tO
3 rt
ft 0
C
•H 4-1
10
V rH
CD -H
CO <4H






^— ^
"^j-
<;
><
o
v_^/




ro
l C
rt rt •
CD ^
B to O
CD 2
CD B
Xi « rH
P C O

tp, Pi CO
O O UJ
•H >H
P P ^
to rt
•H P tO
•— 1 tO CD
•P
rt P rt
c c
P CD -H
3 B TJ
ft CD fn
P rH 0
3 3 O
O to u




H

C_,
CO

|s^


t~^



c
T3 0
CD -iH
rH P
•H O
3 CD
crco
CD
OS CD
CD
CO
• V 	 '
CN

rH •
CD X
XI rH
B C
3 0
Pi
CD
P to
3 rt
ft 0
Pi
•H P
IO f-\
CD rH 1^
CD -H •
CO <4H to






^— ^
rt
•<
X*
0
V 	 /




X
rH
O P
P O
0 C
CD
•r™\ j.
rt o
rH
P <-^
CO
rt UJ
rH >-
1 i V^^ /
X
CD rt
p
CD rt
X! 13
P
P
P 3 •
C ft/-^
•H P O
rH 3 2
O, O v— '





^J*
OH
H
X



00








•
X
rH
Pi
O

CD
to
rt
0

P
to
rH
•H
tp

*T^
CD
rH
•H
3
cr
CD
OS




o"
•
o
rH
t-L,
X
0
X 	 /





1
Pi
o o
O P

O IO
•P T)
CD
T3 CD
CD PL,

CD
CD T3
C C
• H
rH S
CD
-H CD
rH *C
ftp •
•H fa
•P P Xi
rH fa \
^ CD S




c_,
OS

py
O
u


CT)



           3-3

-------




































/-~\
•S
3
C
•H
P
C
0
u


rH
1
to

uJ
*~~*
CQ
E-





































V
( i
H


J~
M-t










5?
S trt
S C£
fc"^ e
CM H
O O
P-I rT i














CD C
Variabl
Functic






CD
B CD
cd 13
z o
C_J
0
i— I C
pO *H
cd
•H *O
cd 
> p
rH
P CD
3 X)
e 3
rH Z




•
X
i— i
C
o

CD
tfl
cd
0

p
(/)
rH
•H
(4-1

"8
!H
•H
3
cr
CD
OS
/ 	 N
O
•
o
rH
PH
CM
*
X
o
•s±





(/)
o
4J
cd

•H 13
-d -H
rH rH
O W)
o
°s
x o
•H
13 W
*is
x S c-

rH CD C
Cd XI -H
X> P> t>0
O *H
rH <4H JH
C3 O O




•> OS
OS 0
o >*
X S

L*^ nD
3



O
rH





•
X
rH
C
O

CD
(/)
cd
CJ

p
t/j
£_i
•H
M-l

•8
rH
•H
r^
cr
CD
OS
/ — \
o
•
o
rH
U,
CM
•\
X
o
S





1
o
CD 0
tsl f-i
•H -H
I/) 13

CD X
rH
cd 13
3 C
a" cd
X
•H CD
OO -P
B C
3 -H •
B ">
•H ^ C
C B 0
• H ^! -H
2 '-' P





•s
X >-

UJ UJ
Q Q



rH
rH





•
X
rH
C
O

CD
t/)
cd
o

P
(/)
rH
•H
tP

"CD
f_i
•H
3

CD
OS

f—^
O
rH
rH
CM
*
X
0
•si"






t5
H
•
C/) l/l
CD P!
rH O
cd -H
3 +->
cr o
(ft CD
rH
'O *H
•rH *X3
H
00 X
O C
cd

0 X
x>

Z P







•I
X >-
z z




•
o
rH
PH
CM
•S
X
O
S





•
/— V,
g

s»^/
o
rc^ Q}
e p 6
3 CD
B C X!
•H >H O
 p
•H -H p!
2 Q rH





rt
Z X
1—1 ^
2 r^i
OS OS



(•O
rH

r-^
13 O II
C
cd X
• w
tfl r* >-5
•H O ^
C/l O fX
CC rH H
,0 o
<4_l
< O *H
Q 0
O ^" ""O
S CM cd
OS 1 CD
>- 0 rH

CD CD t/^
X X! -H
4J 4-)
0
C C P
O O cd
PO
CD 0
P S 0 CO
cd -H X! tU
O P -P X1

x"

* / — \
\o o
rH •
** ^*
X P-,
0
* — 1





p
5-i
cd
p
t/1

0
^r*l
p
X
cd o
P
0 O
B 0
P cd
rH
-O P

cd 0
rC
cd P
P
cd  J

f^H ^!l
P 0
•H
5-H 5-1
0 O
rH
rH Z
0 <
K H
co
cd
0
t/) p
•H
rH
in cd
•H 3
eg1



^ — ^
^1-

»,
X
O
V 	 J





a
OS

Q

^^
H
CO
C"
0 0
B S
•H -H
P P
P E-
cd C3
P rH
^-(
0 <
rC Q
P
t/i C
rH Cd





tu
^^
rH
H
CO



LO
rH


C
0
•H
P
cd
p
I/)

cri •
(A
XI 0
P P
o cd
X^ £*
•H
X T3
MH 5H
•H O
U O
0 O
PH
C
P Cd
O
C 0
B
O cd
Q PI
x"
CM f~ N
-O
^- •
< 0
CM rH
- PH
X CM
0
^ — 1






rH
0
4j^
4-J 4J
C -H

o
PH C
cd
P O
rH
cd ^
P O
t/> -H
rH
0 C
P 0
O -H
0 P
•r-» Cd
cd a
H rH







*» *v
Q CO
rH X



VO
rH










































.
I/)
O
CD 

rH cd cd Xi o 0 rH X) 00 CO / — \ O o rH PH •t X o V 1 G O •H +-> cd rH 3 X rH O P O 0 a? rH P nj ^^\ 0 W 5-i 5-( •H 3 w o 0 rC Q '-' j ^ E™1 o H E- r^. i— i r" P MH O • rH 0 Cd rH > PH rH •H 0 P P rH C 3 -H B cd PI P 0 cd > 13 0 p PI C cd 0 0 0 XI rH 3 p t/) t/) cd .3 «> i cd u> rH PI P O •H C -P 0 cd 0 rH S 3 P O • CD rH /— ^ X> cd w 0 SH rH 3 cd 13 O > C rC 5-1 -H ^ 0 3 P 5-1 W O rH 0 C O N O t/) P 'H P O 5-1 P 3 0 O cd PH > rH C in 0 •H 13 ,x a, P; c o rH -H Cd Cd IS rH rH C CQ Ctf O rH B •H Cd rH P -H • O PH P PI C O -H O Pi -H (/) 0 .H P 13 !/) Cd rH 0 0 rH 0 X! rC 3 -H H P CJ X o • 0 rH PH », X 0 v — / O /-N B +-> rH 0 rC rH rH ^. •

10 Pn*H 0 O 13 0 rH O C rH O rH -H 0 0 > 13 0 rH ^ > 13 Cd C -H rC O Cd P P P -H 3 /-v PI B P 13 -H N Cd -H


-------
0

g
•H
4-J

O
U
 I
tO

tu
_1
CO

gs
.












tfl

fH
ca
S
0
OS









 U,







ifl
S 0
rt 'O
z o
U
0
fi C
fl HH
OS
•H T>
fH 0
OS ifl
> 3
fH
4-1 0
i3 r^
ft S
C 3
. i *-»
•^ f-H
o
z

^
o

co
w

X
PJ
^*
c2
f— t

f*
4-1
•H
3

T3
fa
•H
3
cy
0
on


CM CM
HH 1— 1
* *
X X
0 O
V 	 ' > 	 '
^ 3
1 O r3 4H

G ,0 -H
0 CUN
W) fn 3 OS
O ^
0 4-> i-H
X3 /-N • C
fl 0 0 fH
Q .4. C SO
^ ^ ~4J £ ,-,
(/) *x3 3 I-H
•H fn c « o^

X 3 0
fH fH /— > S t4H
O O i-H -H
4-> <4H 1 C
0 ^ 0 OS
0 tJ -H \ .
• r-% 0 'Q 4-* i-H /— \
OS 4-> fH CS CM
fH OS 0) 4-1 W O
H fH 3 CO OS ^








r^ n^
H OS
hH hH




O i-H
CN CM


X
tu

^*
ctf
f_l

f-J
4->
•H

"0
^
•H
3
cr

SH •
o
to Z

V |fH
o

Z CO

V |#^
rH II


/— x
(N
hH
•\
x
o
\ 	 /

1 fH
0 O
fH IP.
3
t/) 13
oS 0
0 fH
6 -H
tn
X 0
fH
Oj Ifl
0 C
C O
•H
^4H 4-)
O cS

fn 
R)

t/1

^4H
o
c
o
•H
4.)
OS

O
ft
fH •
 <4_>
C OS
•H 13


















CO
UJ
^4
P
n 3
ft
x F
OJ -H
•-5

S +->
H -H
X fH
4-> O
•H ^H
3
CM
X 1
ft IO
C
O 0
fH •
TS 3 C
0 bO O
fH T-t -H
•H U, +J
3 -H
CT 0 tfl
0 0 O
OS CO ft
O*
O
f-H
CM
^
X
0
*»— /

(D 3
4-> ft
OS 4J P!
C fH -H
•H oJ
T> 4-> X
fH Ifl rH
O ft
O X OS
O fH C •
O fH /— x
x 4J 0 e
O 4-> ,i 0 0
t*H 4->
I-H 0 (J
OS X 4-» 0
fi •»-> C -ft
O -H OS
fl «4H O fH
0 0 ft 4->




•V
/ — V 1 — \
i-H i-H

i-H CM
V — / V — /
OH OH




to
CM


CO
fU 4->
>-> 3
ft TS
II C fH
•H 0 OS
X X 0
tU CD 4-1
h^ tfl 4->
^C 0 C ifi
H 4J ° rH
tfl
X fH -H 0
P O X
•H ^4H 0 H
3 S
CM -H
X 1 E- •
i-H tO tfl
C -rl
O0 • Ifl
(H W cS
TJ 3 C X
0 bO O
fH -H 'H O
•H PL, 4-> O
3 -H •<*
CT 0 Ifl CM
0 0 O 1
OS CO ftO
o"
CD
i-H
P-
to
•i
X
o
V 	 1

a
X 0
i— 1 * TS fn
i-H tfl C <4H
OS 0 -H
C 6 3 S
fH -H U
0 4-> TS U
4-> C
X X OS Ifl
0 fH 0
O •> 0
0 P X fH
X O 4-> (SO
4-> 0 -H 0
•fi O TS
14H OS 0 ^
O fH fl

en > 4->
X4-> 3
ol 3 T) S
fH ft C -H
fH C -H «
< -H 3 cj









H > H




rj-
CM




C
•H I+H
O
X
fH S
4-> 3
C E
0 -H
0 BS
•H
4-1 ^
OS
bO
0 •
C 0
LO
OS 1
I— 1
0 rj-
tfl
T! C
fi S
3 3
O rH
X O
tn o












TS
C
•H
3

0
X
4-1
i-H
0
rH
i-H
OS
fH •
oS t — ^
ft fH
O
4-> 4J
Ifl O
nS 0
0 >


























•
4->
a
C
•H

0
^O

x
OS
6

Ifl
fH
OS
O

0
0
i-H



























































tn
OS
tfl
0
OS
C
•H
TS
fH
O
O
O

i-H
CS
O
O
i-H

C
fl
t — \
o
o
i-H
tu
^~
*,
X
O
to
N 	 /


TS
C
OJ

•v
S
0
4->
^J
o
fs

A
4->

00
•H
fH

•V
-P
t^_j
O
J








•i
X




in
CN







•
o
I— 1
•
to
C
O
•H
4.)
O
0
CO

C
•H

TJ
0
•H
fH
0
to
0













0
r"
•P
•
fi i
O S

0
•H 4->
fH O
OS i-H

fi 1

o &
rO 4-*
S
P-/ "H
O fH
+•* Pi








** **
_j oa H
X >H >H








t— i
OS
3
cr
(U

+->
(/)
3
fs

CN

5-t
CD
^Q
6
3
C

4-»
ft
C
•H

0
0
CO


^
^^
*
X
0
^



4->
3
ft
fi
•H

<4H
O
-P

tfl

^
0
C

nS

13
05

OH





H

Q
NI
Z




vD
CM




N
fc*i

pC
+->
•H
^

0 .
tfl T)
0
CS fH
4-> -H
OS Ifl
•T3 0
TS
+->
Cfl fi
fH 0
•H - 0










1 ,— N
3 CO

OS -H fn
T3 W o


















                                                     3-5

-------
E-
§
U
to
U4
CQ












l/J
f^
f-l
cd
S
0
OS













21
^L -4_>
o: cd
H S
Di fn
O 0
U, U,











0 Pl
r-l O

cd 4-1
•H O
f-l Pl
cd 3
> &,





t/)
0
S 0
cd 13
2 0
U

1-1 Pl
rO r-l
cd
•H 13
fH 0
cd 10
> 3
fH
4-> 0
3 rQ

r-l 2
C
0
•H
4-1
O
0
co

13
Pi
cd

(NJ

rH
0
i-Q


C
-P
^
ft
c
•H
•
0 t~^
0 •
CO to



t — \
^}-
 fH
*j 3 /^-\
0 O CO
> X «

Kt f"^ * — '
^ o
cd 4J
i3 0 3
0 ft
r-H fH -P
•H 0 3
cd 4n O
0 in cd /— •»
13 0 f-l O
rH 4J 2
4-1 -H X ^
Pl 4H 0
•HO 4->
p., Oi i . 5^ pj





X
E-
0,
a,
Nl






f-^
CN



d)
rH
^C"| <(H
O O ^H
& oj O
-P CD rH
Q.
P! W
O 0 0
T3 fH
003
SOP
•H 0 cd
i) Cj C i
ft 0
X ft
4-> AS S
•H U 0
SOP
i— I
13 CJ r-H
rH Ctf
cd o o •
0 0 -H 4->
t 4-> 3
0 CN) fH ft
PI 1 0 PI
O 0 > -H

c?
•
O
r-l
U,
»v
X
0

> — '






r-H •
cd 0
CJ r-H
•H -H
4-) 4H
fH O
0 fH
> ft

0 0
ff ^H
+J 3
4->
4H cd
0 fH
0 ft
e s
• H 0
H 4J





a
CO

12,
rH
H





oo
CM


1
cd
£»
0
r— 1
0

0
C
o

w
Pl
•H
cd
4->
C
o
o
-a

cd
o

f|
o
cd

^
•
O
i-H
t^4
CN
*\
X
o
rj-
\—S






t/)
Pl
o
•H
P
cd
>
0
r— i
0

4H
O

(O
X
cd
f_(
<




•t
Q
co
>
(_!]
PJ






01
CN



O 0
rC LO fH
o cd
cd o
OJ P to
0
ft — i
• 3 -H
0 4H
fH C 0
3 -H fH
p cd ft
cd 4J
fH C tO
0 O
ft o o
S 4-^
0 X
P Cd.ft

C 0
Cd i-H •
•H to
pl 4n 13
O O fH
•H fn cd
+-> ft 0











bo
Pi •

^CJ CJ
Pl
0 W
ft  4->
ifl cd
fH fH
0 0
'p ft
0 e
S 0





Q
co
OH
S

H










X

•P U
P; cd
0 0

0 fn
> 0
•H 4->
IJ t-j -1
cd cd
GiQ
0 0
C LO
1
Cd r— 1
'^J-
r"|
4-> tO
•H g

2
m I-H
P O
3 o
ft
PI C
•H -H





















































0
^ •
•H 0
4-> r-H
cd -r-i
0 O
C rH
ft
cd
fH P
4-J t/)
XI cd
0 r-l

PI 0
cd .c:
P
13
PI fH
cd 0
4->

0" cd
r— i
•H X
4H fH
O 4->
rH £H
P4 CD





















































& 
Q (/)
OH 3
4H
i — i t/}
0

• 3
CN P
c«
S-1 "H
i; o
I_Q rv
S 3
3 J
PI P
P 0
3 X
ftp
PI
•H -
O
0 2
0
CO II



^-^
^J-
<1^
*\
X
o
^H-
^ — ^



13
0
•H
4H
•H 0
CJ 0
0 cd
ft4H

3
X t/)
•—i
r-H 4-1
cd o
rH 0
0 r-l
P 3
X T)
0 0
t~*
S °


2^

•H
4->
0 O
fH Cd
3
4-> fH
cd o
0 r^
ftco
S rri
0 >r
4-J V— /



















0

tM E— '
CJ
O fn
0-^4?

O cd T3
o o 0
•3" -H
CN fH 4H
1 0 'i-l
o ft cj
0
4-1

fH X
• H bO
4-i 3
0 f-i

4-> P

bO 0
Pl S
•H -H

O
0 0 ftr-H 0

4-> 3
4-> 0
PI cd 43
O fH
0 4-*
0 O i (/)
S B^ 3
•H 0 S
P 4->
cd
0 13 4->
C C cd
O cd 13
/ — \
O
•
o
i-H
a,
CN
*«
X
o

< — '



13

cd
13 t/5
W 0 0
0 -H fH
S 4H 3
•H -H 4->
P O Cd
0 fH
4H OH 0
O I/) ft
s
0X0
1-H r-H 4->
3 r-H
13 cd 0
2 F'^
,C fH Cd
O 0 4n
t/) 4-> fn
X 3
•< 0 to





UH
CO

^?
•> w
<; H





r-i
to

i— 1 tO
o cd
4H 0
i-H
fH 0
3 fH
O
X 0
i-H
X-H
fH 4H
0 O
> fH
0 pi.

























•
t — ^
U

0
0
fH
bO
0
13



















• X
0 fH
S 4-i
•H Pl
4-> 0
0 0
13 >
O -H
Pl P
cd
X bO
fH 0
O Pl •
4-1 0
cj cd LO
0 i
•l-» (/) r-H
cd cd ^~
fH X
p J -H





















































                                                  3-6

-------


























,_
1
cs
S g
yj UH
o
U
^— '
i-H
1
to
0}
03
s .
rH
crt
•H
cd






to
CD
Z

I— 1
•H

cd
>
4_l
3

C
(-H












w
jj
frt
S
OS










4->
cd
g
0
PL,





1
1 1
Q
PL,







CD
O
U
£

0)
t/>

CD

g
^


•a •
CD LO
T3
C to
CD -H

1 U)
O 4->
O C
0) -H
^ O
n3 i/5
C X •
cd t/) to
3 S 0
S «*-( -H
•H O 4->
x o
rt (H 
PH

O
•H
4J
cd
>

i— <
(D

O
<§
o"
O
i— 1
PL,
•V
X
O
V 	 /


T3
c
0
t-t
0)
O
XI
cd

ions
4->
c8

O
^^
W



00
§
tq
U



10
to

4)
tu
w


•
I/)
C
0
•H
4->
cd
>
a>
rH
0)
w>
c
•H

S

0
to
0)

>>







to
C
•H
O
a,
s

i— i
rt
o
•H
4-1
^i
CD


*-M
o




























*
LO
to

p^
o
•H
4.)
O
(0









i— i
ctf

^
o


[U
OS
o


1— 1
cd
3
a-
0)
i— i
3
O
rd
(/)

2
S
H



/ — s
V 	 1



1— 1





c
•H

4-»

V)

cd
4->
cd
t3
^
cd
t— t

CD
X
4->

4->
3








to










•
(/)
3


CD
cd
o

CD
rH
p
•H
4->
i— I
1









OOr- 1
C aJ



•
/^^
^_l
0)

a>
e














•H

rt
f-i
O
<4H
TJ
cd
O

4->
V)
cd
i-J




g
g
H



^f
to

g-
CD
0
•H

CD
to

cd
4->
cd
•a














•
Q
U
O

tu
OS

s













3-7

-------

CARD
1
2
3
4
5
6
7
9
9
10

CARD
11
12
13
14
15
16
17
18
19
20

CARD
21
22
23
24
25
26
27
28
29
30

CARD
31
32
33
34
35
36
37
38
39
40
1 11 21 31 41

ERT METEORELOGICAL MODULE • - ST. LOUIS
IS TRAJECTORY INPUT EXTERNALLY NO
DO WE XANT THE OUTPUTS PUNCHED YES
00 WE WANT THE AIR QUALITY DATA YES
DO WE WANT DIFFUSIVITIES YES
LOGICAL UNIT OF MET-DATA PfcRIPHERRAL 21
PRINT STATION COORDS YES
00 WE WANT EXTRA TRAJECTORY OUTPUT NO
WIND SPEED CONVERSION FACTOR 3.6
UTM COORDINATES OF GRID ORIGIN (KM) 680.00
1 11 21 31 41

UNIFORM GRID SIZE (OX, DY IN KM) 1.0
NUMBER OF UNIFORM GRID SQUARES (NX, NY) 10
MINIMUM AND MAXIMUM INTERP RADIUS (KM) 1.0
DATE AND TIME (YRMODA, 2400 HR CLOCK) 760629
IS LOCAL TIME STANDARD OR DAYLIGHT STANDARD
START LOCATION (STATION ID OR UTM X,Y)
TRAJECTORY DURATION (HOURS) 11,0
TRAJECTORY SEGMENT LENGTH (HOURS) 1.0
STARTING AZIMUTH AND VELOCITY (OPTIONAL)
DIRECTION FLAG (P03»FR«IRD, NEGaBKWRD) 1
1 11 21 31 41

DISTANCE WEIGHTING FACTOR (1/R** ) 02
NUMBER OF CLOSE STATIONS TO USE 03
PRINT » PLOT BOUNDARIES (KM) -15.0 156.4
DO WE NEED VERT. TEMP PROFILES YES
00 WE WANT EXTRA KZ OUTPUT YES
RELEASE TIME (CST) 76-06-29 348.
VERTICAL TEMPERATURE PROFILE 76-06-29 179.0
76-06-29 200.0
76-06-29 215.6
76-06-29 250,7
1 11 21 31 41
+ + * * • .
76-06-29 295.1
76*06*29 300.0
76*06*29 313.0
76-06*29 400.0
76*06*29 448, 5
76-06-29 465.0
' , . , T6*0*»«9 500.0
• ' *ffc-«6*29 §«*.#
76*06*29 600.0
76-06-29 670.1
51

•I •*







(M/S
4230.00
51

1.0
0
75.0
600

680.444




51


(MAX
-16.0



18.9
19.1
19.1
20.2
51

23.3
23.4
23.8
23.2
22.9
23.8
23.8
23. •
23.6
23.3
61 71

6/2r '7fc







TO KM/HR)

61 71


100



4224.050




61 71


* 3)
115.0


UAN 142
UAN 142
UAN 142
UAN 142
UAN 142
61 71
+ +
UAN 142
UAN 142
UAN 142
UAN 142
UAN 142
U*N 142
U*K 142
• --^;«M» 1<2
UAN 142
UAN 142
Figure 3-1   Meteorological Module Sample Problem Input Listing
                               3-8

-------
1
CARD *
41
42
43
44
45
46
47
48
49
50
1

51
52
53
54
55
56
57
58
59
60
1
CARD t,.
61
62
63
64
65
66
67
68
69
70
1
CARD +.,
71
72
73
74
75
76
77
78
79
80
11 21 31 41 51
*>* + + +
76-06-29 700.0
76-06-29 800.0
76-06-29 801.5
76-06-29 877.3
76-06-29 900,0
76-06-29 982.4
76-06-29 1000.0
76-06*29 1078,8
76*06*29 1100,0
76*06-29 1200,0
11 21 31 41 51

76-06-29 1300,0
76-06-29 1362,6
76-06-29 1400.0
76-06-29 1500,0
76-06-29 1522.3
76*06-29 1582.8
76*06-29 1600,0
76-06*29 1700.0
76*06*29 1766.1
76*06*29 1800.0
11 21 31 41 51
•>•> + *> +
76-06-29 1900.0
76-06*29 1973.7
76-06-29 2000.0
76-06-29 2078.9
76-06-29 2100.0
76*06-29 2200.0
76*06*29 2300.0
76*06*29 2400.0
76*06-29 2423.0
76*06*29 2500.0
11 21 31 41 51
*>*> + + A
• ••••••^••••••••^•••••••••"•••'••^•••"•••••••••™l
76*06*29 2600.0
76*06*29 2632.6
76*06*29 2688.4
76*06*29 2700.0
76*06*29 2800.0
Tfc-O.-M 2846.2
f**o**i« mo.o
76-06-29 3040.0
76*06*29 3064.2 ,
76*06*29 3100.0


1 • • 9 9 • 1
23.0
22.0
22.0
21.5
21.4
21.1
20.9
20.0
19.8
18.9


18.0
17.5
17.4
17.3
17.3
16.9
16.7
16.0
15.4
15.2


14.4
13.9
13.7
13.1
12.9
12.1
11.3
10.5
10.3
9.6


• ••••01
8.7
8.5
8.1
8.0
7.3
7.0
*.*
5.6
5.3
5.1
61
j,
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
61

UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
61

UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
61
*
>••"••••#!
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
71
(•••^••••••••t
142
142
142
142
142
142
142
142
142
142
71

142
142
142
142
142
142
142
142
142
142
71

142
142
142
142
142
142
142
142
142
142
71
A
!•••"•••••••••
142
142
142
l«2
142
142
142
142
142
142
Figure 3-1 (Continued)
         3-9

-------

CARD
81
62
83
84
65
86
87
88
89
90

CARD
91
92
93
94
95
96
97
98
99
100

101
102
103
104
105
106
107
108
109
110

CARD
111
112
113
114
115
116
117
110
119
120
1 11 21 31 41 51

76-06-29 3145.6
- 10.0
RELEASE TIME (CST) 76-06-29 9459
VERTICAL TEMPERATURE PROFILE 76-06-29 1*9.0
76-06-29 ltiel
76-06-29 2C3.0
76-06-29 288.7
76*06-29 300.0
76-06-29 351.9
76-06-29 379.1
1 11 21 31 41 51

76-06-29 400.0
76-06-29 451.6
76-06-29 500.0
76-06-29 600.0
76-06-29 616.1
76-06-29 700.0
76-06-29 783.3
76-06-29 800.0
76-06-29 900.0
76-06*29 1000.0
1 11 21 31 41 51
76*06-29 1001.6
76*06*29 1100.0
76*06-29 1195.5
76-06-29 1200.0
76*06*29 1283.9
76-06-29 1300,0
76*06-29 1400.0
76-06-29 1453,1
76*06-29 1500,0
76*06*29 1523,7
1 11 21 31 41 51
+ + + + + ^*
* 	 •*•••••• ••^•«.... J600»»
76*06-29 1700.0
76*06*29 1799,7
76*06*29 1800.0
76*06-29 1900.0
76*06*29 2$GO.O
-< ?4j|!$fc«29 feijPrO
76*06*J9 '£fw5*7
76*06*29 2200.0
76*06*29 2300.0


4.8


27,6
26.7
26.5
26.0
25.8
25.3
23.9


23.6
23.0
22.5
21.6
21.4
21.5
21.7
21,7
21.7
21.7

21.7
20.9
20,1
20.2
20.4
20.3
19.8
19.5
19.1
18.9


18.2
17.3
16.4
16*4
15,6
15.2
14*6
14.5
13.7
12.7
61 71

UAN 142

UAN 141
UAN 141
UAN 141
. UAN 141
UAN 141
UAN 141
UAN 141
UAN 141
61 71

UAN 141
UAN 141
UAN 141
UAN 141
UAN 141
UAN 141
UAN 141
UAN 141
UAN 141
UAN 141
61 71
UAN 141
UAN 141
UAN 141
UAN 141
UAN 141
UAN 141
UAN 141
UAN 141
UAN 141
UAN 141
61 71

UAN 141
UAN 141
UAN 141
UAN 141
UAN 141
UAN 141
UAN 141
UAN i«i
UAN 141
UAN 141
Figure 3-1 (Continued)
         3-10

-------
11
21
31
41
51
61
71
CARD
121
122
123
124
125
126
127
128
129
130
CARD
131
132
133
1 3*
135
136
137
133
139
140

CARD
141
142
143
144
145
146
147
148
149
150

CARD
151
152
153
154
If 5
196
I §7
ISA
159
160
* + + + + *>
76-06*29 2395.8
76-06-29 2400.0
76-06-29 2500.0
76-06-29 2527.7
76-06-29 2600.0
76-06*29 2700.0
76-06-29 2800.0
76*06*29 2676.3
76*06*29 2900.0
76*06*29 2966.1
1 11 21 31 41 51
76-06*29 3000.0
76*06*29 3100.0
76*06*29 3153.9
• 10.0
RELEASE TIME (CST) 76*06*29 1553.
VERTICAL TEMPERATURE PROFILE 76-06*29 149.0
76*06*29 200.0
76*06*29 276.1
76*06*29 300.0
76*06*29 379.1
1 11 21 31 41 51

76*06*29 400.0
76*06*29 480.4
76*06*29 500.0
76*06*29 554.5
76-06-29 600.0
76*06*29 610.3
76*06*29 700.0
76*06*29 703.9
76*06*29 600.0
76*06*29 607.6
1 11 21 31 41 51
* A + + •> +
76*06*29 654.9
76*06*29 900,0
76*06*29 912,1
76*06*29 1000.0
76*06^*29 1017,6
' ' ' *iWM'Wli|HI 'IM5«9
76-06-29 J 100.0
76*06*29 1200.0
76*06*29 1300.0
76*06*29 1310.5

11.8
11.8
11.4
11.2
10.7
9.9
9.1
8.5
8.2
7.3

7.1
6.7
6.4


29.5
29.6
30.3
29.6
27.6


27.4
25.7
25.6
25.2
24.5
24.3
23.4
23.4
22.2
22.1


'2U4*'
21.2
21.2
20.7
20.6
ao.i
19.6
19.0
18.1
16.0

UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
61
UAN
UAN
UAN

UAN
UAN
UAN
UAN
UAN
UAN
61

UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
61
^
"UAN
UAN
UAN
UAN
UAN
UAN
I/AN
UAN
UAN
UAN

141
141
141
141
141
141
141
141
141
141
71
141
141
141

141
141
141
141
141
141
71

141
141
141
141
141
141
141
141
141
141
71
^
,...
141
141
141
141
141
141
141
141
141
                 Figure 3-1 (Continued)
                          3-11

-------
1


162
163
1 64
165
166
167
16(4
1 69
170
1

in
172
173
174
175
176
177
178
179
1BO
1

181
1 %2
183
184
1R5
186
187
188
189
190
11 21 31 41

76-06-29 1400.0
76-06-29 1499.9
76-06-29 1500.0
76-06-29 1560.4
76-06-29 1600.0
76-06-29 1700.0
76-06-29 1800.0
76-06-29 1900.0
76-06-29 1972.9
76-06-29 2000.0
11 21 31 41

76-06*29 2004.5
76*06-29 2100.0
76-06-29 2200.0
76-06-29 2300.0
76-06-29 2358.5
76-06-29 2400.0
76-06-29 2500.0
76-06-29 2567,7
76-06-29 2600,0
76-06-29 2700.0
11 21 31 41

76-06-29 2713.5
76-06-29 2781,6
76-06-29 2800,0
76-06-29 2872.9
76-06-29 2895.9
76-06-29 2900.0
76-06-29 2930.5
76-06-29 3000.0
76-06-29 3000.2
76-06-29 3100.0
51

17.4
16.6
16.6
16.4
16.2
15.6
14.9
14.3
13.9
13.9
51

13.9
13.2
12.5
11.8
11.4
11.2
10.6
10.1
10.1
10.0
51

10.0
9,6
9.5
8.9
9.2
9.3
9.4
9.1
9.1
6.2
61

UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
61

UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
61

UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
UAN
71

141
141
141
141
141
141
141
141
141
141
71

141
141
141
141
141
141
141
141
141
141
71

141
Ul
141
141
141
141
141
141
141
141
CARD
191
192
193
194
195
196
197
198
199
200
CARD
201
1 11 21 31
76-06-29
LAST DUMMY NEGATIVE
SECOND LAST DUMMY NEGATIVE
DO WE WANT EXTERNALLY INPUT SURF. TEMP,
NUMBER OF KEMOD VERTICAL MESH POINTS
MESH POINT ELEVATIONS (ABOVE SURFACE)
2
3 ,•<
4
5
1 11 21 31
END
41 51 61 71
3129.0 8.0 UAN 141
- 10,0
• 10,0
NO
OS
0,0 (METERS)
120.0
300. 0
600.0
1200.0
41 51 61 71

Figure 3-1 (Continued)
         3-12

-------
*For \'on-St. Louis Application*; where wind data is read from card
 Figure 3-2    METMOD  Input  Variable Sequence and Options
                                3-13

-------
the generation of eddy-diffusivity (K ) coefficients by specifying
NEEDKZ equal to YES or NO, respectively.  If the user has supplied the
surface temperature and air quality data by measurement station, the
user sets NEEDAQ equal to YES for the program to interpolate the data
along the trajectory.  In addition, the user has the option to have
the program produce the punched cards containing the METHOD outputs
which are used as inputs to other modules of the code.  This option is
in effect when the user sets KPWIND equal to YES in the data deck.  The
use of this option is strongly recommended for error free data transfer.
     The user next specifies the logical unit number of the peripheral
device (LTAPE) where the wind data resides.  If the wind data is read
from cards, the user specifies LTAPE =  3.  For St. Louis applications
where the wind, temperature, radiation, and air quality data are re-
trieved from a tape, the user specifies LTAPE equal to the unit number
assigned to the tape.
     The program next reads a sequence  of variables related to the
code's initialization process.  These variables are read only for the
first case of a run with multiple  case  inputs.  The first variable read
in this series of cards is KPSTAT, which is set to YES when the user
desires a printed listing of the measurement station names  (stored
internally).  See Section 3.6 for  a description of this output.
     The program next reads an "extra"  output parameter, KXTRA.  When
KXTRA equals YES, the output includes a listing of which station data
are used in the interpolation of wind,  temperature, and air quality
data.  A description of this extra output is included in Section 3.6.
     The program next reads the wind speed conversion factor, CONVRT.
The user must specify this factor, which is used to convert the user's
wind data to the units of kilometers/hour used by the code.   In the
sample problem, this parameter has a value of 3.6 for conversion of the
St. Louis wind data  from meters/second  to kilometers/hour.  If  the pro-
gram reads a negative or  zero value for CONVRT, it  assumes  a  value of
one.
     The next three  cards in the  first-case-only series  contain the grid
origin coordinates  (UTMXOR, UTMYOR), the minimum grid square  sizes  (DX,
DY), and the number  of minimum size grid squares  (NX, NY)  in  the  x and  y
directions.  The reader is referred to  Section  3.4  for  an  explanation of
these parameters.
                                   3-14

-------
     The next card read contains the minimum and maximum distances (RMIN
and RMAX) used in the interpolation algorithm to screen data from sta-
tions very near to and very remote from a trajectory node.  See Section
3.10 for a description of these parameters.
     At this point the program completes the first-case-only initializa-
tion by either reading the wind data from cards or retrieving the winds,
surface temperatures, radiation, and pollutant concentrations from tape.
See Section 3.3 for a description of these inputs and the user's options.
     The program next reads a series of cards with information concern-
ing a specific trajectory.  The first card in the series contains the
date (IDT) and the start time (XLCL) of the trajectory.  The date is
specified using the year-month-day (YRMODA) convention.  This card is
followed by one indicating whether the start time is specified in day-
light or standard time.  Next, the program reads the start location.
The user may specify either a station name (ID) or global x and y coor-
dinates (XS, YS) to define this location.  This card is followed by
cards specifying the trajectory duration (TTOTAL) and the time interval
between trajectory nodes  (DTSEG) in hours.  Next, the program reads a
variable  (ITF), which indicates whether the trajectory is to be generat-
ed in the forward or backward direction from the start location.  This
card is followed by one specifying whether the station measurements are
to be weighted by reciprocal distances or by the squares of the recip-
rocal distances in the interpolation formula.  The program next reads
the number of close stations  (up to 3) to be used in the interpolation
of station data.  The last card in this section specifies the printer-
plot boundaries in local  coordinates to be used in the trajectory plot.
The reader is referred to Section 3.9 for instructions on proper selec-
tion of these boundary values.
     When these cards have been read and the station measurements
retrieved (from cards or  tape), the program computes and plots the
trajectory.
     Following the trajectory generation and interpolation computations,
the program calls the eddy diffusivity submodule (when NEEDKZ = YES).
The submodule reads the remainder of the input data.  The first card
read here indicates whether or not the eddy diffusivity input cards
should be read.  This variable  (NKZDAT) must equal YES in a first case
data set and may equal NO in subsequent data sets where the same vertical
                                   3-15

-------
temperature profiles and mesh point elevations are to be used.  When the
user specifies NKZDAT equal to YES, the program reads a flag for optional
K  output which determines whether or not the detailed (internal) eddy
diffusivity profiles are to be printed.  See Section 3.6 for a descrip-
tion of this output.
     The eddy diffusivity submodule next reads up to three radiosonde
release times and vertical temperature profiles.  The input data is
structured with one release time card followed by a set of cards with
the elevations and temperatures from the sounding.  These cards are
ordered by ascending elevations until a negative elevation is read.  One
or two subsequent vertical temperature profiles may be similarly input
in chronological order.  A negative release time is specified after the
final profile to terminate this operation.  The user may specify the
elevations as either height-above-ground or height-above-sea-level since
the program subtracts the first elevation from all elevations prior to
using the data.
     Next, the program reads a variable  (RDTEMP) that determines whether
the hourly surface temperatures are to be read.  This variable is set
equal to NO when the user has supplied temperature data for the measure-
ment stations, and the program has interpolated this data along the
trajectory.  When the network data has not been interpolated, or when
the user wishes to override the interpolated temperatures, this flag is
set to YES, and temperatures are read in as follows.  The program reads
a set of cards, each of which contains a time on the 0-2400 clock and
the corresponding surface temperature.  These cards are input in chrono-
logical order followed by a negative input for  the time.
     The last set of cards in the input deck specifies the number of
vertical mesh points (NOHTS) and their elevations above ground  (CELHTS).
The program reads NOHTS elevation cards in order by ascending elevation.
These vertical mesh parameters are used by all  three modules of the code
and require careful selection.  Instructions are provided in Section 3.5
for their specification.
     Finally, the program reads a variable  (TERM) equal to MORE or END.
When the user has stacked multiple data  sets together for multiple
trajectory generations, the user specifies MORE as the  last card in each
data set, except the last set where END  is specified.
                                   3-16

-------
3.3  Specification of the Station Measurement Data

     The manner in which the station measurement data is read by the
code depends on the types of information available.  In applications
where the user has only wind data, the code reads the data from the card
reader.  In applications for locations such as St. Louis, where each
station measures many useful parameters, the program reads the data from
a tape.  The data format, differs significantly for the two cases.
     When the wind data is read from the card reader, the code reads a
pair of cards for each combination of station and date.  The first card
in the pair contains the date, station name, and the wind direction data.
Columns 1-6 contain the date on the year-month-day basis.  Columns 8-15
contain the station name.  Columns 29-30 contain the number of compass
sectors (4 £n_< 90) utilized in the meteorological wind data reporting
system under which the program interprets the azimuth data on the re-
mainder of the card.  Table 3-2 shows examples of the correspondence
between these digitized wind azimuths and their polar angles.  The
twenty-four wind azimuths are specified in columns 33-80.  The second
card of the pair contains the digitized wind speed data in columns 33-
80.  The program assumes the wind data are hourly averages, with the
first entry being for the 0000-0100 time period, the next for 0100-0200,
etc.  Blanks or negative values in the azimuth and speed fields are
interpreted as being missing data.  The program reads and stores the
wind data for the stations for up to ten different dates.  The reading
of the data is terminated by reading one card with 999999 in columns 1-
6.
     In cases where a more extensive and disaggregated meteorological
data base exists, different retrieval software is used to read, edit,
and store the data.  Since these types of data bases are rarely struc-
tured similarly, the user is encouraged to modify subroutine METIN to
suit his/her application, using the St. Louis version as an example.
     In the St. Louis application, the station data input file contains
measured data for the parameters listed in Table 3-3.  As indicated in
the table, the program utilizes the wind, temperature, temperature
gradient, solar radiation, and pollutant concentration measurements.
     The input file is structured with a header record at the beginning
of each hour which contains the year, Julian day, and hour (0-23).  The
program converts the user-specified date in the input data deck to the
                                   3-17

-------
           TABLE 3-2




THE DIGITAL WIND AZIMUTH SYSTEM

North
Compass Heading of Wind Vector 0°
Point
Point


No.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
No. (16 pt. system) 8
No. (90 pt. system) 45
TABLE
THE STATION-MEASURED PARAMETERS

Wind Speed
Wind Direction
Temperature
Dew Point
Barometric Pressure
Temperature Gradient (30m- 5m)
Solar Radiation, All(l)
Solar Radiation, X>3950A
Solar Radiation, X>6950A
Solar Radiation, All (2)
Ozone
Carbon Monoxide
Methane
Total Hydrocarbons
Nitric Oxide
Nitrogen Dioxide
Nitrogen Oxides
Total Sulfur
Hydrogen Sulfide
Sulfur Dioxide
Light Scattering, BSCAT (1)
Light Scattering, BSCAT (2)
East South West
90° 180° 270°
12
67
3-3
IN THE ST. LOUIS
Units
m/sec
degrees
degrees C
degrees C
mb
AT/ 25m
Langleys/min
Langleys/min
Langleys/min
Langleys/min
ppm
ppm
ppm
ppmc
ppm
ppm
ppm
ppm
ppm
ppm


16 4
90 22

INPUT FILE
Utilized
YES
YES
YES
NO
NO
YES
YES
YES
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
NO
              3-18

-------
Julian basis and proceeds if there is a match between it and the Julian
day read from tape.  Each hour's data are structured with all the sta-
tion values for the first parameters, followed by all the station values
for the second parameters, etc., with the parameters ordered as shown in
Table 3-2.  The program reads individual station values for all 22 para-
meters for the first hour, then proceeds to edit and store the data it
needs, then repeats this cycle until all the required data are stored.
It is important to note that the program assumes that the station values
are input in the order in which the station names are internally stored
in subroutine SETIN.
     The wind data are stored in the two-dimensional array AWDATA as
described below.

     AWDATA (1, Station Index)      =  Date (YRMODA)
     AWDATA (2-3, Station Index)    =  Station Names
     AWDATA (4, Station Index)      =  Number of wind sectors used in
                                       azimuth reporting system.
     AWDATA (5-28, Station Index)   =  24 hours of wind azimuths
     AWDATA (29-52, Station Index)  =  24 hours of wind speeds

These data are edited by placing a -1 in the array where missing data are
indicated by very large values in the St. Louis input file.  Also, the
program makes a special adjustment to the St. Louis wind speed data from
nine stations with short measurement towers.  The program uses the
regional average temperature gradient to infer atmospheric stability and
adjusts the ten meter wind speeds to their thirty meter equivalents, using
a stability dependent power-law vertical wind profile.
     The program obtains the ultraviolet radiation by subtracting the
solar radiation for wavelengths greater than 3950A from the total solar
radiation data.  In this application, the regional hourly average ultra-
violet radiation is computed and stored in the array UV.  The ultra-
violet radiation data are not interpolated along the trajectory since
only one-quarter of the stations measure this data.
     The surface temperatures and pollutant concentrations are edited
for missing data and stored in the array CON.  This array is three-
dimensional with its indices described as follows:
                                    3-19

-------
     CON (I, J, K)
     1=1 thru 24 corresponding to hours 0 thru 23
     J  =  station index corresponding to the order in which the
           stations are specified in subroutine SETIN and read in
     K  =  parameter index

For the St. Louis application, the parameter index corresponds to one of
the ten types of data listed in Table 3-4.  The user specifies the
number of parameters (NOSPEC) stored in CON and an array of the para-
meter names (CONAM) in data statements described in Section 3.7.
     The user can store any data in this array which he/she wants inter-
polated along the trajectory.  The most important data to store in the
array are the surface temperature data, which should always be the first
parameter  (K=l).

3.4  Modeling Region and Emissions Grid

     The user determines the geographic extent of the region being
modeled.  The region should be chosen large enough to allow for 8 to 12
hour trajectories for moderate wind speeds within its boundaries.  It
must extend far enough to include the major emission sources which
affect air quality along the modeled trajectories.
     Area source emissions data are compiled and allocated to a recti-
linear grid, as described in Section 4.  The meteorological module of
the code determines a schedule of grid square crossing times and grid
indices from the air parcel trajectories, so that the emission module
can generate a schedule of emission fluxes along the trajectory.  In
order to do this, the program must be supplied with the x and y coordi-
nates of the grid origin (UTMXOR, UTMYOR), the number (NX, NY) of fixed-
size grid squares in the x and y directions, and the grid square size
(DX, DY).   In  the sample problem, the origin is specified as follows:

          UTMXOR  =  680.(km)           UTMYOR  =  4230.(km)
               DX  =    1.(km)               DY  =     1.(km)
               NX  =  100                    NY  =   100
                                   3-20

-------
                            TABLE 3-4




             VARIABLES STORED IN THE CON ARRAY




K Index                                Parameters             Names




   1                                Temperature                (TEMP)




   2                                Ozone                      (03)




   3                                Carbon Monoxide            (CO)




   4                                Methane                    (CH4)




   5                                Total Hydrocarbons         (THC)




   6                                Nitric Oxide               (NO)




   7                                Nitric Dioxide             (N02)




   8                                Nitrogen  Oxides            (NOX)




   9                                Total Sulfur               (TS)




  10                                Sulfur Dioxide             (S02)
                              3-21

-------
Thus, the area source emissions grid is a 100 x 100 kilometer region
with its southwest corner located at UTM coordinates 680., 4230.
     The area source emissions grid usually extends over the entire
modeling region, but the program allows it to be a subregion within the
modeling region.  In other words, if the geographic distribution of
significant area source emissions is of limited extent, the user is not
constrained to specify an unnecessarily larga grid.  The user can inter-
nally specify (in subroutine EDGE) the width of a buffer zone which is
added to all sides of the emission grid.  Thus, the modeling region is
defined by the area within the boundaries of the emissions grid plus the
buffer zone.  The program allows trajectories, monitoring stations, and
emission point sources to be located anywhere within the modeling region.
Nevertheless, the program uses the origin of the emissions grid as the
origin of its local coordinate system.
     The program has an additional feature that provides the capability
of using area source emissions data allocated to variable size grid
squares.  In this situation, each grid square has a single identifier
instead of the usual I and J indices on a fixed grid-square-size grid.
This feature of the program is utilized in the St. Louis application
where the area source emissions  data has been allocated to grid squares
ranging in size from 1 x  1 to  10 x 10 kilometers.
     When this option is  required, the user sets the variable  ITGRID
equal to YES in a data statement in the block data program.  Then, the
program calculates the schedule  of grid square crossing times  and single
identifiers using its schedule of crossing times and  (I, J)  indices plus
the  IVG array.  The  IVG array  contains  the variable-size  grid  square
identifiers for each  (I,  J) grid square in the emissions  grid.  As a
preprocessing activity, the user must  allocate the variable-size grid
identifier  to a grid with the  minimum  size squares.  This  information  is
then stored in  a block data program for use in the code.   Figure 3-3
shows an  example of  the correspondence  between the variable-size grid
square  identifiers and the elements of the  IVG array.   Note  that when
there is  no grid square identifier  (i.e., no  area  source  data)  for a
particular  grid square, the  corresponding element  of  the  IVG array is
set  equal to  zero.
                                    3-22

-------
                                                    DY
  23
97
J = 3
  19
  14
           84
                      J = 2
                      J = 1
                           DX
                                      1=1    1=2   1=3
      IVG(I,J)  =  identifier of grid square I,J
IVG(1,3)  =  23
IVG(1,2)  =  19
IVG(1,1)  =  14
            IVG(2,3)  =  97
            IVG(2,2)  =  84
            IVG(2,1)  =  84
           IVG(3,3)
           IVG(3,2)
           IVG(3,1)
 0
84
84
              Figure 3-3    The IVG Array
                         3-23

-------
3.5  Selection of the Vertical Mesh Point Elevations

     The vertical mesh point elevations (above ground)  are selected on
the basis of the meteorology of a particular day being  modeled.   The
user must obtain or estimate the maximum mixing height  along the trajectory.
If this data is not explicitly reported by the meteorological monitoring
network, the user should examine the afternoon vertical temperature
profile(s) to find the elevation at which the potential temperature
equals the surface potential temperature, and use this  elevation as the
maximum mixing height (Z   ).  Typically, the maximum mixing height
                        max
ranges from 500 to 2000 meters.
     The recommended formulae for calcualting the mesh  point elevations
are provided below.
zl
Z2

Z3

Z4
= 0,0
. . _ j 60 meters
= minimum of < i r>* 7
' max
. . . (200 meters
= minimum of < -c* 7
* ' max
. . ,, (700 meters
= minimum of < crHt -
1 . bU* L
1 TTT1Q -V
                           - (2000 meters
                         of < 7
           D                I Zi
                            * max
Using these formulae will  ensure maximum resolution in the lower portion
of the air parcel where vertical concentration gradients are most
important.
     It should be point out that the vertical mesh point elevations
used in the sample problem for the second and third mesh points are higher
than those calculated from the formulas.  This occurrence was an oversight
on the part of the modulers and should not be construed as the recommended
procedures.

3.6  Description of the Output

     This section describes the normal and optional outputs from the
meteorological module.  In addition to the listing of the input deck
produced  by PREDAT, the METHOD program generates the normal outputs
shown in  Figures 3-4 through 3-11, and the optional outputs shown in
Figures 3-12  through 3-15.

                                   3-24

-------
     Figure 3-4 shows the listing for verification of air trajectory
calculation inputs.  These include the date,  start time and location,
the trajectory direction, duration, time increment, and the interpola-
tion parameters discussed in Section 3.2.  On the same page,  the program
prints the area source grid description and start point in both global
(UTM) and local coordinates.  It should be pointed out that the LOCATION
OF THE INITIAL POINT will differ from that listed as the START POINT
when the program is used to generate backward trajectories.  This occurs
because backward trajectory nodes are computed and put in chronological
order between the two printings.
     The trajectory data output by the program is shown in Figure 3-5.
Each line of the output describes a trajectory node's time, (I, J)
indices on the grid, local coordinates, and the wind velocity and direc-
tion used to reach the next trajectory node.   The wind velocity is
listed in the code's units of kilometers per hour.  The direction is
indicated by the polar angle (THETA) of the wind vector, measured in
degrees counterclockwise from the x-axis.  It should be pointed out that
this convention for wind vector direction must be used when the user
inputs an externally computed trajectory.  Each trajectory node in
Figure 3-5 has an alphabetic symbol associated with it.  These symbols
are used in the printer-plot of the trajectory, as shown in Figure 3-6.
The nodes are plotted in the local coordinate system with the chronology
of the nodes indicated by the alphabetic sequence of the symbols.
     Next, the program lists (for several pages) the schedule of grid
square crossing times, locations, and (I, J)  indices on the fixed-size-
grid-square grid.  A sample of this output is shown in Figure 3-7.  When
the variable-size grid square option is used, a schedule of crossing
times, locations, and single grid square identifiers is printed, as
shown in Figure 3-8.  It should be noted that the crossing time is the
time at which the air parcel enters the grid square listed.  Also, it is
worth noting that the sample problem's trajectory is one which starts
and ends outside of the emissions grid.
     The next page of output contains regional averages of several mete-
orological parameters calculated for the St.  Louis application of the
model.  Figure 3-9 shows the listing which includes the averaging times,
the ultraviolet radiation data, temperature,  temperature gradient in the
                                  3-25

-------
                             z
                             o
                             CO
                      Ui
                      ar
               UJ
               5.
               UI
               or
               3
               co
               «
               'jj
               Z
                                                            I
                                                            to
                                                            UI
                                                            3C
                                                            ru
                                                            *
                      o
                      Of
                       »-    o
                       to    z
 a-
 nt
                      CO
                      or
                      I

                      o
                      o
                      •4)
                       •A
                       O
               in
               in
                i
                                               (O
                                               z
                                               o
                                                             co
                                  CO     CO    CO
                                  a:     at    ui
                            o    x     x    co
                            ae                 o
                            4    O     O    _J
                            z      •      •    
o
 at
 o
 Ui
 x

 »—
 IX
o

z
o
u
_J
«r

                                    3    O
                                                Z
                                                c
                             O
                             a.
                              »-    a
                            ce     a:
                            o     o
                            *-     o
                                   o:
                                   O
                                               UJ
                                               x
                                               u
                                               CO

                                         X    Z
                                         H-    O
                                         Cfl    •-»
                                         z    »-
                                         Ui    •<
                                                                                 co
                                                                                 UI
                                                                                               O
                                                                                               oc
                                                                                               o
                                                                                               o       o
                                                                                           o
                                                                                           «>
                                                                                                       o
                                                                                                       o
                                                                                                                    in
                                                                                                                    o
                                                                                                               o
                                                                                                               Ifl
                                                                                                               O
                                                                                                               o
                                                                                                               o
                                                                                                               CO
                                                                                                       009
                                                                                                       m    *t    ni
                                                                                                       -
CO
                      o
                      UI
                Z    CD
                O    !•<
                i-»    cr
                *-    u
                <    CO
                o    ui
                o    ac.
                _»    a.
                                          u
                                          o
o
1-4    O
I-    UI
u    at
ui    «-«
oc    co
i—l    UI
o    o
                                                       z
                                                       UI
                                                       (3
                                                       uj
                                                       co
                                         at
                                         o
                                               o
                                               a.
                                               at
                                               UI
z
U)
z
UI
cr
z>
CO
•a.
ui
u    oc.
Z    UJ
UI    »-
at    ui
UI    Z
u.    o
UI    -J
                            O
                            •^
                            a:
                                                                                           z
                                                                                           oc
                                                                                           o
                                                                                           u
                                                                                                        CO
                                                                                                        UI
                ac
                o
                z
                                                  oc    ae    ac
                                                  UI    UI    U4
                                                  z    z    2:
                                                  cr    at    ac
                                                  o    o    o
                                                  u    u    o
co
4C
UI

X
H-
ac
o
                                                                                              CO    CO     1-1
                                                                                              «t    UI     O
                                                                                              ui    at     a.
                                                                                                                    O
                                                                                                                    CO
>-    or
=>    «
O    I-
•>    CO
                                                                 3-26

-------
ERT METEORELOGICAL MODULE
ST
. LOUIS
mm
6/29/76
TRAJECTORY DATA
SYMBOL
A
B
C
0
E
F
6
H
I
J
K
T(MIN)
360.00
420.00
480.00
5«0.00
600.00
660.00
720.00
760,00
840.00
900.00
960.00
I
1
5
q
21
37
51
64
80
93
no
129
J
-4
5
12
24
31
38
45
59
72
82
93
X(KW)
.««
4.91
8.81
20.58
36.56
50.03
63.97
79.97
92.43
109,40
128.35
Y(KM)
-5.95
4.21
11.67
23.84
30.15
37.63
44.13
58.67
71.91
81.89
92,09
V(KM/HR)
11.09
8.42
16.93
17.18
15.40
15.38
21.63
18.18
19.68
21.53
24.82
THETA
66.27
62.38
45.98
21.53
29.04
25.01
42.26
46.72
30.47
28,28
15.54
Figure 3-5
     3-27

-------
O
O
o
 •
in
o
o
                          CO
                          tc
•«•



o
o
o
•£>
 m
(V
O
o
o
O
O
O
                                                                                                                                     O
                                                                                                                                     o
                                                                                                                                     o
                                                                                                                                     »
                                                                                                                                   *  •
                                                                                                                                     o
                                                                                                                                     o
                                                                                                                                   »  •

                                                                                                                                     «
                                                                                                                                         \o
                                                                                                                                        •H

                                                                                                                                        PU
                                                                                                                                   *  »
                                                                                                      ^itiS1''
                                                                                                     • ^4 "-- %•'*>.,
                                                                                                      Jf ' ' '«!. ,-'«
                                                                                                         ,^#,

-------
EffT MfcTEORELOGICAL  MODULE      -•      ST. LOUIS
'C(MIN)
360.00
367.47
371.52
380.91
383.34
394.35
395.15
401.06
406.97
407.79
412.88
418.79
421.40
426.39
434.42
436.77
442.46
450.50
452.13
458.54
466.58
467.50
474.61
480.95
461.63
UTM
XC(KM)
680.44
681 .00
681.30
682.00
682.18
683.00
683.06
683.50
683.94
684.00
684.38
684.82
685.00
685.32
685.85
686.00
686.37
686.89
687.00
687.42
687.94
688.00
688.46
689.00
689.13
UTM
YC(KM)
4224.05
4225.31
4226.00
4227.59
4229.00
4229.86
4230.00
4231.00
4232.00
4232.14
4233.00
4234.00
4234.38
4235.00
4236.00
4236.29
4237.00
4238.00
4238.20
4239.00
4240.00
4240.11
4241.00
4241.86
4242.00
1C
1
2
2
3
3
4
4
4
4
5
5
5
6
6
6
7
7
7
8
8
8
9
9
10
10
JC
• 4
-3
-2
• 1
0
1
1
2
3
3
4
5
5
6
7
7
8
9
9
10
11
11
12
12
13
                       Figure 3-7
                           3-29

-------
ERT METEORELOGICAL
TIME (MIN)
360.00
394.35
421.40
426.39
486.05
496.41
511.56
521.06
537.06
951.01
556.60
564.11
570.03
571.62
579.12
586.63
589.06
594.14
598.58
601.95
610.86
614.85
619.77
628.68
690.89
WODULE
UTM-X
680.44
683.00
6P5.00
685.32
690.00
692.03
695.00
696.86
700.00
703.51
705.00
707.00
708.58
709.00
711,00
713,00
713.65
715.00
716.18
717.00
719.00
719,89
721.00
723.00
723.50
99
UTM-Y
4224.05
4229.86
4234.38
4235,00
4242.90
4245.00
4248.07
4250.00
4253.25
4255.00
4255,59
4256.38
4257,00
4257, 17
4257.96
4258.74
4259.00
4259.53
4260.00
4260.39
4261.50
4262.00
4262.61
4263.72
4864.00
ST. LOUIS •«
GRID SQUARE 10
0
64
72
65
81
82
99
2028
129
130
2039
2048
2049
2058
2066
2076
2077
2093
2094
2115
2137
2138
2159
2178
2179
Figure 3-8
     3-3C

-------
                 Ul        ••»••••••••••••••••••••

                 Z       «••    ~«    ^4    w«   v«    «»«                                            ~*                w*               V«V«V«**

                 IK
                 UJ .->
                 « at
                 o u
                                    <\i    «    iv    <-<
                    •V    O    -,    -.    O    OOfUfUKlKIWKlK)     9KimKim«HO
                 UJ U    OC    OOOOGOOOOOOOOOOOOO
                 tt        .....«......••..»•«»
                 3(9                            tillllltllllllt»
                 »- UJ
                 •< o
                 at ~
                 UJ
•x
o-
                 ut
                 at r*
                  a.
                  z
                  tu
                                                                                                                                                    O   O    O
      CO
co    -i
                  «t I                                 oooooooooooooo
                  a: -^                                  iiii'iiitiiiivt




 t           oocs     ••••••••••••••••••••

      ««>••<                                  i    *"                                                              —«-
            UJ    •« _t
      at    >    oe -'
      «*•«»—
UJ    UJ          _l
_1    >-    >-    3

O          Ct
o          o
zr          o

_ico                  a-»a-O'C7-cr'O»'CTio»»o'tT'(>trcr    t>'  o   t>    9    a>   ^    0>
-H    _i            tnininininuiminininininininmtnintnmmmvtvim
o    ^    •«                  «->f\jKiai/i^)r-tDcy'o    —    fuKiamjjr-ajo-G    —   nJto
«    O    Z                                                                      x^M^^4M^o^
-------
surface layer, and the sky clearness ratios.  The clearness ratios are
computed as the ratio of the measured ultraviolet radiation to the
expected clear-sky ultraviolet radiation for that day and hour.
     The next section of output lists the interpolated values of the
parameters which have been interpolated along the trajectory.  An
example of this output for the sample problem is illustrated in Figure 3-10.
This output format is repeated for several pages with data for all
trajectory node times.
     The last page of the normal output, as shown in Figure 3-11, is
generated by the eddy diffusivity submodule.  It lists the vertical mesh
point elevations and the temporal schedules of surface temperature,
atmospheric stability class, and average diffusion coefficients as a
function of height.  The program outputs the stability class data, using
the values 1 through 6, which correspond to the Pasquill-Gifford classes
A (unstable) through F (very stable).
     If the user has specified KPSTAT equal to YES in the input data
deck, the program lists the station names and coordinates as shown in
Figure 3-12.  The x and y coordinates are listed in the local coordinate
system even though the user has internally specified them (in SETIN) in
global coordinates.
     When the user elects the option for extra trajectory output (KXTRA
= YES), the program provides a listing of which the station's data are
used in the interpolation of wind, temperature, and air quality data
along the trajectory.  Figure 3-13 shows the extra output from the wind
interpolation section of the program.  It lists the time, location,
interpolated wind speed and azimuth, and the names of the stations from
which data were used.  When this option is selected, the normal output
of temperature and air quality data is superceded by that shown in
Figure 3-14.  For each trajectory node, the listing includes the quali-
fying station names and corresponding distances to the stations from the
node.  Then, for each parameter, the station data and names  (in paren-
theses) are listed, as well as the interpolated value of the parameter.
Note that the program substitutes NONE for the station name when there
are no stations with valid data.
     If the user selects the option for extra output from the eddy
diffusivity submodule (KZPRTX = YES), a listing similar to Figure 3-15
                                   3-32

-------
ERT METEORELOGICAL MODULE     -«      ST. LOUIS



   TIME = 1000     DATE = 760629




   VARIABLE     INTERPOLATED VALUE




      TEMP            2.7672E+OI




      03              4.3641E-02




      CO              2.1552E-01




      CH«             l.«50aE+00




      THC             l.«733E+00




      NO              3.3
-------
























•o
r-
•^
o-
—
a:
o
u.
tn
^i
t>M
O
t-4
U.
u.
a. (/}
G o
•»*
;? H-
O <•
>^t >
CO Ui
w _l
u. u
u.
t-l r-
0 2
M
01 O
t£J 0.
^
Cc X
LU (O
> OJ
^ "E"






«O tfif-fc^f^-r^KI^C^fKICOO
rsi -cin'fiKi(T'(\j
x x in.nr-Kti~-i— ccmin
r> J) O O O fU
*4 «-« x4

in «o^f^-r*-rfc-po*O5j>Kicoo
p^ (V'uofVj^tCLn^&foofvi
^ <-i j-. in»-Kif-.r~o o o o (\i
•-• «-4 X4

^ r^otVif^tniO'^wo^o*
fsl fXJ994?^C^OCCfVJ «^ O
^ pri*-icccoco^t>tntnoin
x-» tr^COCVKVJOf-
? «4 x4 «^l »4
*•*
z
•**
m
m« >O.C(7-C MCOKI7IKIOIO
^^ 2 r*n ^ co i/^ o f^ c^ lO y tfi
sc ^-^ (Vi^-H^oiPfXif^ •HNCKity1 **i
,0 -^ r^ r» IP tn
*H



^U ^ ^** ^- %O ^U l^- Cy* ^ *^ JO <3" ^*^
f*i sJcDCOeOKl^COOOO *™^
^ ^^r^-^o— «r*^-* *
*-4 ~-« P*1 <\J — * •-• ^O


•H
^^ C^ *~* ^- ^ *Xl P1* O* ^' ^" f'O -9 Eld
?^ s* ff> f\J
X -J
< o
H-
tr,

jj
^
LU ^
ui— inaj-jit^tr. Ln^sjfOi^
2S — x=»vC'i^xf(cca-0'1
— UJ^U'VJ'Xt'VAJfU'V^XjAJ'VrfCXi
r; o.
 x
UJ
^*



uJ coooooooooo
T C^OCOOOCC^OO
>-* -X!r^ccc^c^*f\i»^^m^



3-34

-------
ERT METEORELOGICAL  MODULE      ••      ST. LOUIS






         STATIONS  AND  COOWDINATES
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
RAMS
101
102
103
104
105
106
107
106
109
110
111
112
113
lia
115
116
117
118
119
120
121
122
123
124
125
64.183
62.518
67,588
67.312
63.706
58.660
60.179
68.407
75.802
67.209
58.812
53.938
57.738
64.320
77.111
82.777
8a.560
63.065
49.759
43.079
52.414
61.631
97.320
69.275
17.445
49.862
56.045
52.467
47,304
46,453
47.566
52.610
61.102
49,886
42.826
42.479
50.913
59.820
67.456
67,799
60.083
42.818
33.256
40.547
55.909
72.376
99.223
56.378
6.537
52.240
                    Figure 3-12
                         3-35

-------
OLO TIME - DATE
                                  TIi*E  -  DATE
                                                              VELOCITY  AZIMUTH
                                        STATIONS
   600
   700
   800
   900
  1000
  1100
  1200
  1300
  1400
  1500
  1600
760629
760629
760659
76P629
760*29
760629
760629
760629
760629
760629
760629
.44
4.91
B.HI
20.58
36.56
50.03
*>3.97
79.97
92.43
K)9.aO
I2H.35
-5.95
a. 21
1 1.67
23.84
30.15
37.63
44.13
5H.67
71.91
81.89
92.09
, 600
 700
 600
 900
1000
1100
120C
1300
1400
1500
1600
760629
7bOb29
760629
760629
760629
760629
760629
760629
760629
760629
760629
11.09
 6.02
16.93
17.18
15.40
15.38
21.63
16.18
19.68
21.53
24.82
66.27
62.38
45.98
21.53
29.04
25.01
42.26
46.72
30.47
28.28
15.54
125
125
125
125
119
119
105
116
116
123
123
119
119
119
119
111
111
110
115
115
116
116
124
120
120
120
120
106
104
109
123
115
115
                                         Figure  3-13
                                              3-36

-------
                                              UIOOOOOOOOOO                                           UJOOOOOOOOOO
                                              a.
                                              ce
                                              UJ
       AJI o K>  ^        oc t** i\i &*        *-*                                     fu o <^ tn       in *#  ^" ^-»        »—«
>o     »-i *-« o  *-«        o w* f\j F^         i                                      «-*r\jofu       co in  »n f**        •
ft*     «-< «-t «-•  v-l         •••*        X                                     ^H ••*••* ^*        ••••        X
"v.                         ^ K> co tn  '                                                                KI o^  co in
O*                         f\J Kl K» ^                                                                  ~« «^«  — O  O O O O O O O O UJ     CO «^ K} *•• K^    in «"*  ^ KI f^-     ^— •


                           ^D ^u ^D tfi  ^&    to                              y                        f^ oo  fi ^y cs     oo
 •     f\io*-*o«-i    Lnx^^r^       oooooooooo     ooo«-*«-*    -* ~-« a* o in        oc»oooooooo
 I     ^^ «F-» *^  *^ »^      •  *  •   •  •    ^ +S   t^+fi^   §+•     ^ «^ «^*  ^ *^     *   •  •  •  •     M +•§  &+•+•£!  4§^
                          ^) *-^ >^ ^* tP    X tij  UJ UJ UJ UJ UJ UJ UJ UJ UJ                        tt CO fU tO O     9C Ikl tfcj UJ bJ IfcJ UJ UJ IftJ bj IcJ


       •-'Ln^O'^D    ^ *^ •-• c         •*••*•••••     —i o i\i  f^» ^>    KI in m ^ ^^         •••*•»
       «—" f\J O  O •**    9 ?V AJ O*  O       i\J  -^ m v1* ^^ (\3 CT" «-* <\J *"     *•* «r^ O  «^ v^    O Qh f\l (?• p*^        (\1 9 f\| v< ^^ (\l «

cc                        tn (^ in KI  m                                                              o f** ru o ^
*-*                        (\i ai KI ^  in                                                              ~* —i cu KI KI
_j     ^-« o o  cu —*    ec^<^K>tn    <«-i«-i«-<*4«-iv4«-«^^o     «-ioooaj    a* (\* co co tn     <«-»^»vH»«^*^*>«»4«^«-4z
       «^*-4*-«»-*»^      »  •  •   •  •    ^.«^v^^H«^^^^^v^«-«v^^4     *«• ^4 «f ••«•-«     *   •  •  *  *     ^.••(lv4»^t^t
LU^                  O                  4«^«-4«-4v^«-4«-4«*t«-4v^fVI^                 O                  4
_jO                  ^                  »_^^^,^^.^<«^,^.^c:                 ,2                  h-
O     >-i                  «                  CO                                     i-<                 o                  UJ                                     •-••£>                  uj
C                        1^                  _|                                                        t-                  _J
UJ                                            eo                                                                            OD
•-     M                  it                  •< a.                                  it                  it                  «  a.
uj                                            t-i£:ru(\jx(\i                                            M  z       ^- o    fu x     ru
ZUJ                  UJ                  XUJfOOXXCOOtOOUJ                  LU                  (TUJKtOXXOOOtOO

»-«-•«>                                     M                  •«                  >
a:     »-                  o                                                         >-                  o
UJ
                                                                 Figure  3-14
                                                                        3-37

-------
                     oooooooooooooooooooooooooooooo
                M     •  ••••••••••••••••••••••••»»•»•
                X   OOGGGOOOOOOGOOOOOOGGOGOOeoGGOO


                uj   ru<\)(\i'vruru<\i(Mru(unji\]f\ir\texi(vtivnjfxirvjnj«wr\)n)njrunj«<->COGOOOOOOOOOOOOOOO
                INI     •  •••••••••••••••••••••••••••••
                X.   >C.C>.£>.OxC>C*Or-~r->cr-£>-C^O>C>0-£>D'C>OsC-O-£>OxO<£>O^4>            9       fl
                                              ru —                                                               M       of\i«t4>too<\)«r.oa>oru9*e*                                                                                                       o
•&                                                                                                       »-•
                                                                                                         03
                      OOOOOOOOOOOGOOOOOOOOOOOOOGOOOO    3
                »sl     ••••••••••••••••^••••••••.•••*    u.
                ^    4;,r>^x>>C>C>CCC>O^>>O>OO«-C<£-C-A-C>CI>OxOrCO    U.       (V       •«
                                                                                                         »-i       isl       K)
 i                                                                                                        o       *:       -•
 »                                                                                                        X.               (U
                                                                                                         _l
                                                                                                         «
                »-                                                                                       o
                X    OOOOOOOOOOOOOOOOOOOOOOOOGOOGOG    t-l
                C9    fU5t^3aOO«\l^-C«CCO«>»C>    21
                >-<    njf\)fv)a)i*iK-KifOK)=j-a-=T^rainmtnir>in^5>o^>>c>oi^»^»--r^h--         9tn^9O^O-<-<9OgO9t^9'>-i'4(XJir-t''4«-itnf*i9oo4>«o^>o>oa-r^»-'—