EPA-600/4-77-049
                                       November 1977
   NON-DIVERGENT WIND ANALYSIS ALGORITHM
      FOR THE ST. LOUIS RAPS NETWORK
                    by

   Terry L. Clark and Robert E. Eskridge
    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

-------
                RESEARCH REPORTING SERIES

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

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

This report has been assigned to the ENVIRONMENTAL MONITORING series.
This series describes research conducted to develop new or improved methods
and instrumentation for the  identification and quantification of environmental
pollutants at the lowest conceivably significant concentrations.  It also includes
studies to determine the ambient concentrations of pollutants in the environment
and/or the variance of pollutants as a function of time or meteorological factors.
This document is available to the public through the National Technical Informa-
tion Service, Springfield, Virginia  22161.

-------
                              DISCLAIMER
     This report has been reviewed by the Environmental Sciences
Research Laboratory, U.S. Environmental Protection Agency, and ap-
proved for publication.  Mention of trade names or commercial pro-
ducts does not constitute endorsement or recommendation for use.
                         AUTHORS' AFFILIATION
     The authors are on assignment with the U.S. Environmental Protection
Agency from the National Oceanic and Atmospheric Administration, U.S.
Department of Commerce.

-------
                               ABSTRACT

     An objective wind analysis algorithm capable of producing non-
divergent wind fields at up to ten levels in the atmospheric boundary
layer for St. Louis, Missouri is described.   Wind data collected during
the St. Louis Regional Air Pollution Study (RAPS) and averaged over  15-
minute intervals were used to construct u and v wind component fields on
a 46 by 46 grid network with a grid spacing  of 1 km via a scan-radius
technique.  The divergence across grid squares was minimized by a non-
divergence algorithm.
     Several analyses produced by the algorithm are illustrated.   A
user's guide and computer program listing are included.

-------
                               CONTENTS

Abstract 	  i i i
Fi gures 	   vi
Tab! es 	  vi i
Acknowledgement 	 vi i i
   1.  Introduction 	    1
   2.  Modified CDC Objective Analysis Procedure 	    4
   3.  Modified Non-Divergent Wind Field Analysis Procedure ....   12
   4.  Analysis Fields 	   20
   5.  Summary and Conclusions 	   38
   6.  User's Guide 	   40
   7.  Listing of Computer Program Code 	   45
References 	   62

-------
                               FIGURES

Number                                                           Page
 1   Analysis domain considered from a portion of the Regional
         Air Pollution Study (RAPS) monitoring network at St.
         Louis, Missouri .......................................    4
 2   Analysis domain for the original CDC objective analysis
         technique .............................................    6
 3   Illustration of the four-point interpolation scheme used
                                   i,
         to interpolate the value I..  .    at a position on the
                                    ~"~"
         grid corresponding to the location of observation point
         'k1 [[[   8
 4   Scan circle centered at a station enclosing 29 grid points.   9
                                       I/
 5   Depiction of weighting function, W. .  .................... .  10
                                       i » J
 6   Analyzed wind field from the original  Liu and Goodin tech-
         nique .................................................  14
 7   Analyzed wind field from the modified  Liu and Goodin tech-
         nique .................................................  16
 8   Weighting of grid points and around a  station for the Liu
         and Goodin technique ..................................  17
 9   A portion of the computational grid showing the two inde-
         pendent subgrids ......................................  19
10   First-guess analysis for averaged data centered around 7:07
         A.M. (C.S.T.) for August 15, 1975, St. Louis (RAPS) ...  21
11   Non-divergent analysis for averaged data centered around 7:07
         A.M. (C.S.T.) for August 15, 1975, St. Louis (RAPS) ...  22
12   First-guess analysis for averaged data centered around 7:37
         A.M. (C.S.T.) for August 15, 1975, St. Louis (RAPS) ...  25
13   Non-divergent analysis for averaged data centered around 7:37

-------
Number                                                            Page
 14   First-guess analysis for averaged data centered around 8:22
          A.M. (C.S.T.) for August 15, 1975, St.  Louis (RAPS) ...  29
 15   Non-divergent analysis for averaged data centered around 8:22
          A.M. (C.S.T.) for August 15, 1975, St.  Louis (RAPS) ...  30
 16   First-guess analysis for averaged data centered around 11:37
          A.M. (C.S.T.) for August 14, 1975, St.  Louis (RAPS) ...  32
 17   Non-divergent analysis for averaged data centered around
          11:37 A.M. (C.S.T.) for August 14, 1975, St. Louis
          (RAPS) 	  33
 18   First-guess analysis for averaged data centered around 2:37
          P.M. (C.S.T.) for August 13, 1975, St.  Louis (RAPS) ...  34
 19   Non-divergent analysis for averaged data centered around 2:37
          P.M. (C.S.T.) for August 13, 1975, St.  Louis (RAPS) ...  35


                                 TABLES

Number                                                            Page
  1   Stations having average wind direction and  speeds out of the
          range 211 to 240° and 1.8 and 3.2 m/sec, respectively for
          the analysis illustrated by Figures 10  and 11 	  23
  2   Stations having average wind directions out of the 216 to
          249° range for the analysis illustrated by Figures 12
          and 13 	  26
  3   Stations having average wind directions out of the range 208
          to 257° for the analysis illustrated by Figures 14 and
          15 	  28
  4   Summary of data input to the non-divergent  wind field anal-
          ysis algorithm 	  41
                               vii  .

-------
                            ACKNOWLEDGEMENT







     The typing of the drafts and final versions of this manuscript



by Ms. Bess Flowers was greatly appreciated.
                                    viii

-------
                           1.  INTRODUCTION

     The non-divergent wind field analysis procedure presented in this
report utilizes modifications of techniques developed by Hovland et al.
(1976) of Control Data Corporation (CDC) and Liu and Goodin (1976).  The
CDC objective analysis procedure generates, via a weighted scan radius
technique, a horizontal wind field, which is not divergent-free.  The
Liu and Goodin procedure adjusts this field to produce a horizontal,
divergent-free wind analysis.  Divergent-free wind fields are required
in most Eulerian air pollution models; Shir and Shieh's (1975) sulfur
dioxide model and the Systems Applications, Inc. photochemical model
(Reynolds et al., 1973) are examples.
     These models treat the atmosphere as several vertically-stacked,
two-dimensional layers.  This implies, of course, that the vertical
velocity is zero everywhere.  If the two-dimensional  velocity field is
not divergent-free, or at least the divergence is small  (v2*v<10" sec" ),
the divergence will act as a source or sink term (depending on the sign
of the divergence) when the pollution species conservation equations are
solved by numerical techniques.
     The influence of the divergence on the calculated concentrations
can be explained by first examining the simplest conservation-of-species
equation

-------
               f
where c is the concentration of a pollutant and v the wind.  This
equation can be written as
                9C      -»•-»•     ->- ->
               _  =  -vvc  -cv-v
The first term on the right represents the change in the concentration
due to advection and the second term represents the change due to con-
fluence or difluence of the wind.  If  v-v  > 0  (difluence), pollutant
is lost from the system and if  v-v  < 0  (confluence), pollutant is
added.
     The non-divergent wind fields are constructed by first analyzing
the wind field using the technique developed by Hovland  et al.   This
objective analysis technique was originally developed for the St. Louis
RAPS network for a grid which was 21 by 21 grid points with a spacing of
5 km.  The technique was modified so that the procedure could be employed
to construct wind fields on a grid which was 46 by 46 grid points with a
spacing of 1 km.  The resulting wind fields are two-dimensional  and are
not divergent-free.
     The CDC wind fields (referred to as first-guess fields) are adjust-
ed to generate divergent-free, vertically-stacked fields in the boundary
layer by the technique developed by Liu and Goodin.  From Liu and Goodin's
routine, the computed winds at the grid points represent an average wind
and have no vertical structure.  Their published technique was modified
to produce smoother wind fields and a divergent-free wind field at any
level or levels  in the boundary layer specified by the user.
                                   2

-------
     The objective analysis techniques of Hovland  et al.  and Liu and
Goodin and the modifications made by the authors are described in
Sections 2 and 3, respectively.  Section 4 illustrates and discusses
several examples of the resultant wind fields  using 15-minute averaged
RAPS data.  Section 6 is a user's guide to the computer program.   The
final section contains a listing of the computer program.

-------
            2.  MODIFIED CDC OBJECTIVE ANALYSIS PROCEDURE
     The modified version of the Control  Data Corporation objective
analysis procedure attempts to describe the  u  and  v  wind fields
across an equally-spaced grid using time-averaged data from an unequally-
spaced data network with a high density of stations in the center (see
Fig. 1).  This is performed via an iterative process using a variable-
scan-radius technique.  The values computed at the grid points after m
                                                O"5
                                                 O117
 Figure 1.   Analysis domain considered from a  portion  of the Regional  Air
 Pollution  Study (RAPS) monitoring network at  St.  Louis, Missouri.   Winds
 at sites 108, 110, 114-118 were measured at the 10-meter level  and at
 the 30-meter level elsewhere.

-------
 iterations  (xT .)  are  based  upon the observations at K data points  (0  ),
              • >J
 which  lie within a circle of specified radius  (R), and a weighted cor-
 rection  factor.
     The original  CDC  procedure uses data from all 25 RAPS stations and
 a  21 by  21  grid with a 5 km  grid spacing.  The prescribed number of
 observation points and scan  radii  (measured in terms of grid points)
 used for the five  iterations were  4,12,12,25,25 and 20,14,7,4,1, respec-
 tively.  The number of the iterative step when data from the stations
 were first  incorporated into the analysis is given in Fig. 2.  This pro-
 cedure uses data from  the four outlying observation points (not within
 the grid domain illustrated  by Fig. 1) and a large scan radius for the
 first  iteration.   With each  subsequent iteration, data from additional
 observational  points and a smaller scan radius are employed.  Data from
.the inner-most observation points  are used only when the scan radii are
 small.
     The modified  version uses a 46 by 46 grid with a grid spacing of 1
 km.  The grid  domain does not include the four outer-most RAPS stations
 and the  data from  these stations are not used.  New sets of data points
 and scan radii used for each  iteration were established empirically.
 These  new sets are 7,12,21,21,21,  and 46,20,10,5,1, respectively.  The
 highest  numbered stations in Figure 1 are always used before the lower
 ones.
     A rejection scheme is included to ignore data thought to be in
 error.   Prior  to the first iterative step, the standard deviations of
 the  u and  v  components of  the data are calculated.  All components
 with values greater than ±4a from  the mean are labeled as incorrect and

-------
           21
r
                I   I  I  I  I   I  I  I   1 11  I  I   I  I  I   I  I
           19
           17 I-
           15

           13

           11

            9

            7
                    4 4 4
                    4   4
                                     11
                           13   15
17
19    21
Figure 2.  Analysis domain for the original CDC objective analysis
technique.  The numbers inside the grid boundary correspond to station
locations and represent the number of the iterative step when the data
value was used.
are ignored during the analysis procedure.  If one component of the wind
at a data point is ignored, the other component is likewise ignored.
     After the gross errors in the data have been removed, the analysis
begins with defining a first-guess field.  The original version of the
procedure used a field of zeroes, while the modified version defines the
field as a uniform field of values equal to the mean of the data.  In
theory, the analysis would converge faster when the first-guess field is
more comparable to the data.

-------
     The first-guess field is adjusted repeatedly until the values at



each grid point converge.  After five iterations, the values converge



(tolerance of 0.1 m sec" ).  the grid point values are adjusted by
                                     K



                   m    =  xm-l  +   k=l  M{ .  Ck'm               ,

                   i,j     Xi,j     -v - ^ -         '     U

                                           k
                                     E    W* .

                                     k=l   lfj
where  K  is the number of data points within the scan circle centered



at the grid point i,j;  W. .  is a weighting factor (described later);
                          •»J


and  C >m  is a correction factor determined at the m   iteration for



each of the non-rejected observations.



     The value of the correction factor (C >m) is determined by sub-

                                b

stracting from the data value (0 ) the interpolated value from the



previous iteration (I--l^~^,_) at a point corresponding to the location
                      i"*"p,J"t'q


of the station point
                   k,m     nk     Tk,m-l

                        "      "   i+P,J+q
where p and q are the distances along the x and y areas, respectively,



from the observation point to the grid point (i,j).  The four-point



interpolation scheme is illustrated in Fig. 3 and given by
                                                          ,.x,j   (3)

                                                pq

-------
               •_I	1                         I
                     p

Figure 3.   Illustrationkof the  four-point  interpolation scheme used to
interpolate the value C+   .+  at  a  position on the grid corresponding
to the location of      P'J  q  observation point  'k1 denoted by '*'.
     The correction factor determined  at  a station point is applied to

those grid points within a specified distance  (R) of the station point

(Fig. 4).  The actual  correction  applied  to  the grid point value of the
                                                               i,
previous iterative step is weighted as a  function of distance (r )

between the grid point and the station point.  The values at the station

points would have no direct influence  on  those values at grid points

                                 k             k
outside the circle of radius R (W.  . = 0  when  r  > R).  The weighting
                                 >»J

function, illustrated by Fig.  5,  is defined  as

-------
       •      •
       •     •
Figure 4.  Scan circle centered at a station (*) enclosing 29 grid
points.

-------
             1.0
             0.5   -
             0.0
Figure 5.  Depiction of weighting  function,  W.  .,  where R is the scan
radius and r is the distance  from  grid  point  'J  (i,j)  to station (k).
                                  10

-------
                               R2   (rk  '
                                  ~   i i'
                               R2 + (rk' '
                               R    (ri,r
v  -•  <  R
                                                  r? ,  >  R     (4)
     Since the data points are unevenly-spaced and concentrated in the
center of the grid, the number of observation points and/or the scan
radius are changed with each iteration.   If all the data were used in
each iteration with large scan radii, the gradients observed in the
center of the grid, where the density of observation points are high,
would be propagated outward.  Furthermore, if the scan radii were not
changed with each iteration, the radii would have to be large enough to
guarantee that every grid point was within R grid points of at least one
data point.  This would result in a very smooth, non-representative
analysis.
     The application of this technique requires the availability of
reliable data at the outer-most observation points, since the field
created using this set of data in the first iteration greatly influences
the final analysis.  Moreover, when data are missing or ignored from
several of the data points, the data configuration is altered.   For this
case, the chosen set of stations and radii may not yield an acceptable
analysis.
                                    11

-------
         3.  MODIFIED NON-DIVERGENT WIND FIELD ANALYSIS PROCEDURE

     The algorithm of Liu and Goodin adjusts the wind field (generated
by the technique discussed in Section II) in order to construct a diver-
gent-free wind field.  This adjustment process usually makes only small
changes in the value at any grid point.   Therefore, if the analysis to
be adjusted by the algorithm is poor, it will  most likely remain poor.
     The algorithm is based upon the uniform adjustment of values at
grid points (i-l,j), (i+l,j), (i,j-l), and (i,j+l) using the divergence
calculated at (i,j).  The grid is scanned repeatedly until the maximum
divergence meets an arbitrary value.
     The simplest approximation to the continuity equation in a non-
staggered grid (u,v defined at every point ) is
                                                  - Vi.M
                                                 2~Ay
Liu and Goodin define the following relationships (the equal signs
should be interpreted as replacement operations):
                                          Oi
            vi,j+l  "  vi,j+l  +   i,j+l  v.  .
                                            i > j
                                          v.
                                            • »j
                                     12

-------
where  f. .  is a weighting factor.  By substituting (7) into (6), Liu
         • »J
and Goodin find

     Liu and Goodin's procedure is as follows:   first, the divergence is
calculated by (6); second,  u. .  and  v. .   are calculated by (8) and
                              i »j        ' »j
then new values of  u  and  v  are calculated using (7).   This procedure
is repeated until D. .  is reduced to some desired level.   The results
                   i >J
depicted in Fig. 6 show a wind field that is somewhat irregular and not
very satisfactory.
     If one substitutes (7) into  (6) and collects terms,  this yields
from which (8) is derived.  However, a second formulation of u and v is
available.  If the formulation of u. • and v. •  given by Liu and Goodin
                                   •»J      i > j
for the eight point continuity equation is used, it can be reduced to a
four point form,
Substitution of (10) into (9) shows that (10)  is also a solution.
                                 13

-------
                /'////
                                                       I I I I I

                                                       I I I I /
                                                       7 / 7 / 7
                                                       A A A if/.

                                                       111
    ' :*s / ' / / '/  '' •'.
:>>_>'>>//X//>,
  ' '  '••''/ /   "'  '*'£  '   f  • .  ', '  '  ' * ' * ' '•  ' *'* s
  •••'/'.   ',  '-(/'    •    -  ' '  •  ' • f s s , ., * ,, '/
                                    > / x /• '
                f / T


                f ', 7 '
              .'f,, *,:•<•>?'
                 .        * '  < *
      * * ? * *

    f r ? , « -,

      * f f f 4

' .* » rV / ^ , „ V-
                                                        - -» - -^ »
Figure 6.  Analyzed wind field from the original  Liu and Goodin tech-

nique.
                              14

-------
     The procedure used in this modified technique is to first calculate
the divergence by (6), then u. . and v. - are calculated by (10).
                             i >j      ' »J
Finally, the new values of  u  and  v  are calculated using (7) after
u  and  v   are substituted for u  and  v.  The results of using this
variation of the algorithm are shown in Fig. 7.
     Fig. 7 clearly shows a smoother wind field to that of Fig. 6.   To
see the reason that (10) is a superior formulation it is necessary to
examine the grid point weighting technique used in this modified algori-
thm.  The grid point nearest the data point is treated as the station
and assigned a weight of .25.  The adjacent grid points are assigned
weights of .50 and all other points are given a weight of 1.00 (see Fig.
8).
     It is apparent from (10) and (8) that

at grid points nearest data points and
     u. .  =  -0.8D. .Ax   and   u. .   =  -0.61D. .Ax           (12)
       •»j          i>J            'jj            i>j
at grid points located one grid length from the grid points nearest the
data points.  Similar relationships hold for v  and  v .   At a point 2
grid points away from the station,
     u,  . = -0.6667 D.  . Ax   and   u. . = -0.57 D. .  Ax.        (13)
       •»j            i »j             '»j          i »J
                                15

-------
                                                                    f







                                                                 '  ' '
   >' f •' f

  '/'.'••>•
   / '': • • •'
  7 x'/',* •
   't if it ,
''-7
 f / t

 f ' r

 r
   r,
             •   < ///
             '/ 7//, '
                    A' '  -' '  '.'.'•'//////>
                    f f  ' -  '  •/,'.y;  .
'//'yy * **^?
'//' '/'/';* ' ' ' '<* *
 //-'A/ ^ ' ^ S'/ *
 •'/:/''/' f- >»>',,
                                   '  f'
                                   /'
                                                                      x-
Figure 7.  Analyzed wind field from the modified Liu and  Goodin  tech-
nique (using identical data to those  in Figure  6).
                                  16

-------
                                     1.00
                                      •
                            1.00
                              •
        .50
        1.00
                    1.00
.50
•
.25
.50
 •
1.00
                            1.00
                              •
        .50
        •
       1.00
        •
                                    1.00
                                     •
Figure  8.   Weighting of grid  points at and  around a station denoted
by  '*'  for the Liu  and Goodin  analysis procedure.
                                 17

-------
Now at a grid point 3 grid points away, it is found again  that
In effect, what occurs is that the correction at each  iteration  is
smaller in the modified algorithm that the one given by  Liu  and  Goodin
resulting in a smoother analysis.
     It should be noted that an iteration level  does not appear  in  the
above equations as it does in the equations in Liu  and Goodin's  paper.
In a recent paper by Eskridge (1977),  it has been shown  that new values
of  u  and  v  must be used as soon as they are calculated  instead  of
maintaining two separate iterative levels as the Liu and Goodin  paper
implies.
     In addition Eskridge (1977)  demonstrates that  the use of  a  four-
point continuity equation in a non-staggered grid results in the iteration
procedure acting as if there are  two separate grids (Fig. 9) which  do
not interact or affect neighboring points at anytime.  This  division  of
the grid into two independent subgrids will result  in  an analysis with
large oscillations of wavelength   2Ax  if incorrect boundary conditions
are used.
     An examination of the computer code used by Liu and Goodin  shows
that they minimized this problem by setting the gradient at  the  boundary
equal to zero.  In other words, they connected the  two independent  grids
at the boundary through common values.  One can still  expect to  see some
oscillation in the wind field analysis.  However, it has been  small and
does not appear to be much of a problem.

                                    18

-------
Figure 9.   A portion of the computational grid showing the two  inde-
pendent subgrids.
                                19

-------
                            4.  ANALYSIS FIELDS

     Both the first-guess and final wind analysis (i.e.  divergent and
divergent-free) fields from five different time periods  are illustrated
in this section.  The 46 by 46 grid point fields are composed of vectors
with points of origin corresponding to the grid points.   These vectors
point in the direction of the flow and have lengths proportional to the
wind speed at the grid point. (0.6 cm vector length represents a wind
speed of 1.0 m/sec).
     The data used in the analyses were sampled and averaged over a 15-
minute period at 20 of the 25 RAPS stations during selected periods in
August of 1975.  During this month station 111 was not operating.  Of
the periods selected, two involved cases where the wind  field was
relatively uniform.  These two cases are discussed first.
     The first-guess and final analysis fields for the first period are
illustrated by Figures 10 and 11, respectively.  The data used in these
analyses were averaged temporally over the 15-minute period centered
around 7:07 a.m. (C.S.T) of August 15.  Most of the average winds during
this period ranged in direction from 211 to 240° and in  speeds from 1.8
to 3.2 m/sec.  Those stations having average directions  and speeds out
of these ranges are listed in Table 1.  The average winds at station 102
were noticeably different than winds measured at adjacent stations
throughout the cases investigated.  Although questionable, they were not
rejected by the rejection criteria in the procedure.

                                     20

-------
                                     M \ \ \ \ \ V \ \ \\
                                  ni^m\\\^^\\\
/ / /////'/
 / / //////
 /;//////
                             r t t t f f f f f f r f
                            t t M f t t t t f I f f
                                1 1 tin 1 i i t
                             \\ \ \ \ \\\\\\\\ \
Figure 10.  First-guess analysis  for averaged data centered around 7:07
A.M. (C.S.T.) for August 15,  1975,  St.  Louis  (RAPS).
                                   21

-------
Figure 11.  Non-divergent analysis for averaged data centered around 7:07
A.M. (C.S.T.) for August 15, 1975, St. Louis (RAPS).
                                  22

-------
Table 1.  STATIONS HAVING AVERAGE WIND DIRECTIONS AND SPEEDS OUT OF
          THE RANGE 211 TO 240° AND 1.8 TO 3.2 M/SEC, RESPECTIVELY
          THE ANALYSIS ILLUSTRATED BY FIGURES 10 AND 11
Station Number      Average Wind Direction        Average Wind Speed
     102                      260°                     4.1 m/sec
     108                      199                      0.9
     114                      155                      0.8
     115                      173                      1.3
     118                      181                      1.0

     The wind values listed in Table 1 were likely indications of the
presence of mesoscale features of the atmosphere.  By averaging the data
over 15-minute periods, these features, which are significant in deter-
mining actual flow patterns, would not be ignored.
     The CDC analysis (Fig 10) shows the variability in the wind near
those stations listed above.  As can be readily seen, especially north
and northeast of St. Louis, the analysis is not divergent-free.  This
analysis was adjusted to minimize the divergence.  The final analysis,
illustrated by Figure 11, was generated by adjusting the u- and v-wind
components at every grid point so that the quantity

                    9u   +  9v
                    9x      9y

was minimized by the technique described in Section 3.
                                    23

-------
     The most noticeable adjustment occurred in the area near station
102 and 108.  The flow pattern here was made less chaotic.   Another
noticeable adjustment occurred near the middle of the top border where
the flow converged.  The wind speeds were greatly increased here and, to
a lesser extent, near station 114.  It should be noted, with the exception
of the area near station 102, that the large adjustment in the CDC
analysis occurred in areas outside the data network.  Moreover, the wind
determined at a grid point near a station will not always be exactly
what was observed.
     Figure 12 shows the first-guess field of the flow using 15-minute-
averaged data centered around 7:37 a.m. (C.S.T.) for August 15.  These
wind data were observed half an hour after the data used for the analysis
in Figures 10 and 11.
     All the stations, but one, had average wind speeds in the range of
1.4 to 3.4 m/sec.  Station 102 had an average wind speed of 4.3 m/sec.
Most of the stations had average wind directions falling into the 216 to
249° range.  Those stations having average wind directions out of this
range are listed in Table 2.
                                 24

-------
i*^
•*--*,
• 4
.V
',Vt-» t*^\
• • * 	 f
;:;:;:•;;}
••'"••//';
;;:::>;;;
w
in
j «
'
                         . t t * > r r r • ,, '.fi.>,I, I. it V /; '/ 7'/'/'' 7'/'/'''/J
                         <./.,,,,. .    ^'Jftf^^h''1' 7 /f 'I It I Jit if/A
                         ./,,,, 4    ^'L , h t i 't t'! ''it ! if if/f /! if h
                         ,;' ;. >. -. ^^uftf- /,£/;!f;''tfhmf\

                         -/A'. < •=^±rr^^//^^W
                               '  --...-r... ~~*i/s//j/'ir  nh i /1 / \
Figure 12.  First-guess analysis for averaged data centered around

7:37 A.M. (C.S.T.) for August 15, 1975, St. Louis (RAPS).
                              25

-------
Table 2.  STATIONS HAVING AVERAGE WIND DIRECTIONS OUT OF THE 216 TO
          249° RANGE FOR THE ANALYSIS ILLUSTRATED BY FIGURES 12  AND 13
     Station Number                          Average Wind  Direction
          102                                          265°
          108                                          204
          109                                          210
          115                                          174
          116                                          204
          118                                          199
          121                                          267

     The influence of the data on the analysis from the outlying stations
is illustrated in the upper-left corner of Figure 12.   Many  more grid
point values are affected by the outlying stations than the  inner stations.
The average wind direction at station 121 is different than  the others,
but the grid point values in the corner reflect the value  observed at
this single station.
     Figure 13 shows  the non-divergent analysis after the  winds were
adjusted.  Like the adjustment of the analysis of the previously mentioned
period, the wind speeds near the top of the border of the  grid were
increased to compensate for the extensive convergence pattern.  The
analysis in the area  near stations 102, 108, and 121 has been noticeably
adjusted resulting in a smoother, non-divergent flow.
     The next two analyses, illustrated by Figures 14 and  15, were
generated using data  averaged over the 15-minute period centered around
                                    26

-------
Figure 13.  Non-divergent analysis for averaged data centered around
7:37 A.M. (C.S.T.) for August 15, 1975, St.  Louis (RAPS).
                                  27

-------
8:22 a.m. (C.S.T) for August 15.   These data were observed 45 minutes
after the data analyzed in Figures 12 and 13 were observed.
     Except for station 111, the  set of data was  complete and contained
average wind directions which were more variable  in the urban area  than
in the other sets.  Most of the average wind directions ranged from 208
to 257° and the average wind speeds, with one exception,  ranged from 1.7
to 3.6 m/sec.  Station 102 had an average wind speed of 4.8 m/sec.
Stations with average wind directions not in this range are listed  in
Table 3.

Table 3.  STATIONS HAVING AVERAGE WIND DIRECTIONS OUT OF THE RANGE
          208 to 257°, FOR THE ANALYSIS ILLUSTRATED BY FIGURES 14 AND  15

Station Number                               Average Wind Direction
     102                                               286°
     105                                               189
     114                                               200
     121                                               273

     The first-guess wind field analysis (Fig. 14) depicts the large
variability in the wind direction.  The average wind direction near
stations 105 and 106 differed nearly by 60° and the average wind direc-
tion near station 102 differed by nearly 45° from the surrounding  area.
     The final analysis (Fig. 15) shows that the  major adjustments
occurred in the areas near stations 102, 108, and 106 and on the top
center of the grid.  The wind speeds were decreased slightly in the
lower-left
                                    28

-------
                             ,. t t t t t t t t t f t t t t t t  t fr,
                            'f't'f'f/f't'f'f >f It It It It It It hh/t/f/r/f/t
Figure  14.   First-guess  analysis for averaged data centered  around 8:22
A.M.  (C.S.T.)  for August 15,  1975, St.  Louis  (RAPS).
                                     29

-------
Figure 15.  Non-divergent analysis for averaged data centered around
8:22 A.M. (C.S.T.) for August 15, 1975, St. Louis (RAPS).
                                  30

-------
corner and increased near the upper segment of the right border.   As in
this case, significant changes in the u- and v- wind components usually
occurred outside the station network.
     Figure 16 illustrates another analysis using data which were not
uniform over the urban area.  Data from stations 111 and 114 were missing
during this period centered around 11:37 a.m. (C.S.T.) for August 14.
The average wind direction ranged from 136 to 183°, while most of the
average wind speeds fell in the 3.3 to 4.8 m/sec. range.  Stations 102
and 103 had average wind speeds of 6.6 and 5.7 m/sec., respectively.
     The CDC wind analysis outside the city was fairly uniform with the
winds from the south southeast at approximately 4 m/sec.  The wind near
stations 102, 103, 112 was more southerly at about the same speed.
Therefore, areas of convergence occurred over the city.
     The u- and v- components of the wind in these areas were adjusted
to minimize the divergence.   This non-divergent analysis, illustrated by
Figure 17, might not appear to be as smooth as the previously discussed
analyses.  Due to the higher wind speeds and gradual wind direction
changes near station 102, 103, 113, the longer vectors intersect  others
at angles, making the field appear chaotic.
     The last pair of figures (Figs 18 and 19) illustrates the analyses
for the 15-minute-averaged data centered around 2:37 p.m. (C.S.T.) for
August 13.  At this time, a squall line was moving through St.  Louis
from the northwest at approximately 20 km/hr.  The position of the
squall line during this time period can be located at grid points with
west winds.
                                31

-------
Figure 16.  First-guess analysis for averaged data centered around 11:37
A.M. (C.S.T.) for August 14, 1975, St. Louis (RAPS).
                                  32

-------
Figure 17.   Non-divergent analysis for averaged data centered around
11:37 A.M.  (C.S.T.) for August 14, 1975, St. Louis (RAPS).
                                  33

-------
                                     xV/x'x /^///// //MM
                          '^^^:
                                         x/^-//// / / / 1 t  M
                           /VV'//'-/
                           /•VX'*/'/
                                         •////// / / M 1  M
                                          -•///// / M  M  t M
                                          /////// / M T  I M
                                          ///////MM
n.n \i.uii i II11
mm An
  '              /
 h                 .      	
'.U.I, I. I I I I, /,/,/,///////// ^/ / • / / . /'//'///Ml
It, I. iJ.LI.lLl.U It I /;//?/?'/•>/ r /'/,>/// r n [
MM////////'///
Figure 18.   First-guess analysis for averaged data centered around 2:37
P.M.  (C.S.T.)  for August  13,  1975, St. Louis (RAPS).
                                   34

-------
Figure 19.  Non-divergent analysis for averaged data centered around
2:37 P.M. (C.S.T.) for August 13, 1975, St. Louis (RAPS).

-------
     During this period, all stations had data except for 111.  The wind
directions ranged from 188°  at station 117 to 333°  at station 120.
The wind speeds ranged from 0.9 m/sec. at station 117 to 4.2 m/sec. at
station 102.
     This case was included to show the results of the non-divergent
wind analysis routine starting from a first-guess field (Figure 18)
generated from data characterized by an extensive area of strong con-
vergence.  Large adjustments were made to the first-guess field to
minimize the convergence.  As can be seen by Figure 19, the final  analysis
in some areas of the field was drastically changed.
     Among the areas where changes were made, there were four areas
where the winds were adjusted noticeably.  These areas included the grid
points near stations 107, 116, and 119.  A col appeared on the final
analysis field near station 119.  To the left side of the col the wind
directions at the grid points changed 180°  .
     The wind speeds at the grid points near station 107 were sharply
decreased.  Also, the wind speeds near 110 and 118 were decreased and
the wind directions became westerly.  On the right side of the grid, the
wind speeds were increased sharply to minimize the convergence there.
     These five cases were chosen as examples to illustrate what adjust-
ments are made to the first-guess field by the non-divergent wind analy-
sis procedure.  The cases included data where the wind did and did not
vary greatly across the field so that the extent of the adjustments for
both types of cases would be known.
     The CDC procedure, which generated the first-guess fields, proved
to be adequate in analyzing the wind data over the St. Louis area.
                                 36

-------
Analyses proved to be very good when compared to the data at the station
points.
     The non-divergent wind analysis procedure used to generate the
final analyses would be useful to produce wind fields for Eulerian air
pollution models.  In most areas of individual cases, the first-guess
wind analysis is only slightly adjusted.  However, there are cases when
the adjustments are so extensive, that the final analyses are noticeably
different.
                                37

-------
                         5.  SUMMARY AND CONCLUSIONS

     An algorithm was created to analyze data from the RAPS network at
St. Louis, Missouri.  The algorithm is based on modified versions of an
objective analysis technique developed by Hovland, et.al. (1976) at
Control Data Corporation and a non-divergent wind analysis routine
developed by Liu and Goodin (1976).
     The algorithm was applied to five periods of 15-minute averaged
wind data during August of 1975.  The data from the first two periods
showed a rather uniform wind field, while the data from the last three
showed a more variable wind field.  The last period involved a case
where a squall line was passing through the St. Louis region.
     In every case, the calculated wind values at the grid points on the
first-guess field (modified CDC procedure) corresponding to station
locations agreed well with the observations.  It is uncertain how well
the actual wind field was depicted by this field in areas far from the
stations, particularly near the borders of the grid.
     The final analyses (modified Liu and Goodin procedure) were genera-
ted by adjusting the u- and v- wind components from the first-guess
analyses so that the divergence across grid squares was minimized.  The
wind was changed only slightly at most grid points.  However, in areas
of strong divergence, the wind speed and/or direction changed consider-
ably.  This type of analysis is desired for two-dimensional photochemical
modeling, since the divergence would act as a spurious source or sink
term.
                                     38

-------
     There were several problems with the data used in the analyses
presented in this report.  The wind direction and speed at station 102
were consistently different than the winds at adjacent stations.
Moreover, the winds were not measured at the same height at all  stations,
The wind at stations 108, 110, 114-118, and 121 were measured at 10
meters and at 30 meters at the remaining stations.   No normalization of
the winds was attempted in this algorithm.
                                 39

-------
                             6.   USER'S GUIDE

     The purpose of this section is to describe the format of the data
set used by the algorithm and to inform the user about the multi-level
capability of the algorithm.   With this information,  the user should  be
able to generate the non-divergent wind fields.
     The algorithm requires input of the data summarized in Table 4.
The grid parameters (number of grid points in the x and y directions  and
grid spacing) are defined in the context of the program, not the data
set.  This was done since the algorithm cannot be applied to a different
grid configuration by merely changing the values of these parameters.
The CDC technique, used to construct a first-guess field for the non-
divergent wind analysis, employs two sets of parameters determined
exclusively for a given grid configuration and data network.
                                   40

-------
Table 4.   SUMMARY OF DATA INPUT TO THE NON-DIVERGENT WIND  FIELD  ANALYSIS
          ALGORITHM
                                   Variable Name
Format
          Data card # 1
          Data card # 2
          Data cards # 3-23
          Data cards  # 24-45
          (u,v-component form)
          Data  cards  # 24-29
          (direction,speed form)
EPSI
IE
NPER
P
NLEV
ZK
NSTA
X
Y
*
I DAY
*
IHR
*
MIN
US \
VS /
MIN \
IHR \
E10.3
13
13
F5.2
13
10F5.0
13
F6.2
F6.2

13

13

13
F5.2,1X,F5.2

/ \
                                       I DAY
                                       WDIR
                                      WSPD
 typed on data card  # 24
                                   41

-------
     The value of "EPSI" is compared to the average value of the di-
vergence calculated over the grid after each iteration.   When EPSI is
greater than the maximum divergence value, the analysis  has converged to
a satisfactory degree.  At this point, the iterative process is terminated.
The value of 1.0 by 10~  proved to be adequate.
     Parameters "IE" and "NPER" refer to the wind data set.  The total
number of periods of data to be used is defined by "NPER".   "IE" serves
a dual purpose.  First, the value selects the desired 15-minute period
to use form a data set containing many periods.   This is especially
useful when the data is stored on a mass storeage file.   If the data
corresponding to the fourth period of a data set is desired, the value
of "IE" would be 3.  The program would then skip over the first 3 data
periods and start reading the data for the fourth period. '
     The value of "IE" also makes it possible for the program to accept
averaged-wind data in two different forms.  When "IE" is less than 100,
the program would read the data as u and v wind components.  When "IE"
is greater than 100, the program would read the data in  the form of wind
direction and speed.  In the latter case, 100 is subtracted from the
value to identify the desired period to use in the algorithm.
     The last two parameters on the first data card refer to the mulit-
level analysis section of the program.  The number of the levels where
wind fields are desired is defined by "NLEV", which should not exceed
10.  The height of these levels, in meters, are defined  on the second
data card and stored  into array "ZK".  If only the surface analysis is
desired, the value of "NLEV" would be 1 and the second card would contain
the number 20.
                                   42

-------
     The wind speeds at height z.  are determined by the power law equation

                I -*" 1     I ~*~  1  /  K \                                 /ir-\
                |vkl  =  Ivjl  (--)         ,                       (15)
where |^, |  and  |^. |  denote the wind speed (m/sec) at the level of data
measurement and level k respectively.  The wind direction, in meteoro-
logical  coordinates, at height z  (meters) is determined by
                  = ei+
     The value of the exponent, p, is dependent upon ground roughness
and lapse rate.  In general, the exponent is small during the day and
large at night (Munn, 1966).  A value of 0.4 was assumed for general
purposes.  This value can be changed by changing the parameter "p" in
the data set.
     Data cards 3 through 33 contain the station identification number
(101-121) and the x and y coordinates of the station relative to the
south west corner of the 46 by 46 km grid.   There is one data card for
each station.
     The averaged wind data are read last.   The user has an option to
use averaged wind data in the form of u-v components (m/sec) or in the
form of wind direction and speed (m/sec).  If the u-v component form is
used, a data card containing the day and time (IDAY,IHR,MIN) must pre-
cede the actual wind data card set.  The average u and v components for
each of the stations are listed on individual data cards according to
                                    43

-------
the format given in Table 4.
     If the direction and speed form of data is chosen, the time and day
(MIN,IHR,IDAY) are read from the first card containing averaged wind
data in the first 15 columns.  Each wind data card contains, wind direction
and speed for four stations, except the last card which contains data
for station #121.
     All of the data input is read by the MAIN subroutine computer code.
In addition, the MAIN subroutine  1) rejects wind data according to the
rejection scheme described in Section II;  2) calls subroutine UVCMP1,
if needed, to convert the average wind direction and speed (m/sec) input
to the u and v component form;  3) calls subroutine INITIL; and  4)
adjusts the wind fields generated by the modified CDC technique to
produce non-divergent wind fields.
     Subroutine INITIL defines the number of data points and the size of
the scan radius to use in each of the five iterations in the CDC techni-
que and calls subroutine GRID.  Subroutine GRID generates wind fields
from the averaged u and v -wind components at the 21 data points using
the modified version of the CDC technique.
                                  44

-------
                  7.  COMPUTER PROGRAM LISTING - FORTRAN

     This section contains the FORTRAN computer code for the non-divergent
wind field analysis algorithm.  The code consists of a MAIN subroutine
which calls subroutine UVCMP1, INITIL, and PRINT.  Subroutine INITIL
calls subroutine GRID.  The code does not include any UNIVAC 1110 system
routine.
                                    45

-------
1
1
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
4«
49
50
51
52
53
54
55
C
C
C
c
c
c
c
c
c
c
c
c
G
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
• c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c




c
c
c* *
DICTIONARY OF VARIABLES USED IN MAIN



AVGU AVERAGE VALUE OF U-COtlPONENTS
AVCV AVERAGE VALUE OF V-COIIPOHENTS
DIR THE DIRECTION OF THE WIND IN MET COORDINATES
DIV POINT VALUE OF THE DIVERGENCE
DIVR ARRAY CONTAINING THE DIVERGENCE VALUES
DMAX MAXIMUM ABSOLUTE VALUE OF DIVERGENCE ACROSS A FIELD
DX DISTANCE BETWEEN GRID POINTS IN THE X DIRECTION
DY DISTANCE BETWEEN GRID POINTS IN THE Y DIRECTION
DZ DISTANCE BETWEEN GRID POINTS IN THE Z DIRECTION
EPSI A CONVERGENCE PARAMETER SET TO MUCH LESS THAN 1.
IDAY JULIAN DAY OF DATA
IHR HOUR OF DAY OF UATA
IE NUMBER OF DATA SETS TO BE SKIPPED IN*lATA FILE
IEND NUMBER OF RECORDS TO BE SKIPPED IN DATA FILE
IOUT DEVICE UPON WHICH ARRAYS ARE STORED FOR VECTOR OUTPUT;
IF IOUT - 0 , NO DEVICE USED
(UN TEMPORAL MID-POINT OF DATA AVERAGING INTERVAL
HLEV NUMBER OF FIELDS TO BE ANALYZED IN THE VERTICAL
NRPTS NUMBER OF STATIONS TO BE USED IN ANALYSIS NOT GREATER THAN 25
NSKIP DUMMY VARIABLE USED IN SKIPPING DATA SETS
NSTA ARRAY CONTAINING STATION NUMBER
P THE VALUE OF THE EXPONENT IN THE POWER LAW FORMULA
SIGU 'STANDARD DEVIATION OF THE U-COMPONENTS
SICV STANDARD DEVIATION OF THE V-COtH'OHENTS
SPO ARRAY CONTAINING WIND SPEED
;su sun or THE SOUARES OF THE U-COMPOHENTS
SSV SUM OF THE SQUARES OF THE V-COMPONENTS
SUMU SUM OF THE U-COMPONENTS
SUMV SUM OF THE V-COM PONEN1 S
U ARRAY CONTAINING FINAL ANALYSIS
US ARRAY COHTINING U COMPONENT OF STATION REPORT
Ul ARRAY USED TO SAVE SURFACE STATION REPORTS OF U COMPONENT
V ARRAY CONTAINING FINAL ANALYSIS OF V VELOCITY FIELD
VS ARRAY CONTAINING V COMPONENT OF STATION REPORT
VI ARRAY USED TO SAVE SURFACE STATION REPORTS OF V COMPONENT
X ARRAY CONTAINING X COORDINATE OF STATION LOCATIONS
Y ARRAY CONTAINING Y COORDINATE OF STATION LOCATIONS
Z HEIGHT OF ANALYSIS LEVEL ABOVE SURFACE




DIMENSION i:STA(30),X(30),Y(30),US(30),VS(30),l.'UIR(25),»SPD(25)
DIMENSION U(46,46),V(46,46),OIR(25),SPD(25),U1(25),V1(25)
DIMENSION DIVR(46,46),F(46,46),ZK(10),UT(46,46),VT(46,46)
COMMON IDAY, IHR, MIN

THE ALGORITHM PARAMETERS ARE DEFINED

46

-------
 56      C
 57            DATA PMI/J.14 1 592654/.IOUT/8/,ALP/1./.BET/0./,KKMAX/250/
 58            DATA FC/1.0/,ltlAX/46/, JMAX/46/,Il/2/,Jl/2/,NRPTS/21/,
 59           *DX/1000./ ,I>Y/1000./
 60            FX-l.O-FC
 61            12-I'IAX-l
 62            J2-JMAX-1
 63            RKAD(5,6)  EPS I,1E,NPER,P,NLEV
 64            URITC(6,5)  NRPTS, I)X, DY, EPSI, IE, NPER, P, NLEV
 65          5 FOR;iAT(I3.2F6.0,E10.3,2I3,F5.2,I3)
 66          6 FORt1AT(E10.3.2I3,F5.2,I3)
 67            KEAD(5,7)  (ZK(I).1-1,NLEV)
 6»          7 FORHAT(10F5.0)
 69            DO 15 I"1,NR1'TS
 70            Ri:An(5,12)  NSTA(I) ,X(I) ,Y(I)
 71         12 FORHAT(I3,2F6.2)
 72         15 CONTINUE
 73      C
 ft,      c*******************************************************************************
 75      C     TI1K W1NB DATA  ARE  READ
 76      C
 77      C     IE>100 FOR  DATA  IN THE FORtI OF DIRECTION AND S1'EED(M/ S EC)
 78      C     IE<100 FOR  DATA  IN THE FORM OF U AND V  COMPONENTS(M/SEC)
 79      c*******************************************************************************
 80      C
 81            00 1000  N1'-1,NPER
 82            1F(IE .CE.  loo)  co TO 27
 83            IF(UP .GT.  1)  CO  TO 23
 84      C
 85      C     SKIP IE  NUMBER  OF  PERIODS OF DATA IN THE FORM  OF U AND V COMPONENTS.
 86      C     (THURE ARE  22  RECORDS PER PERIOD)
 87      C
 88            I END- IE*  22
 89            IF(IEHD  .F.Q.  0)  CO TO 23
 90            DO 22 I-l.IENI)
 91            RKAIH5.21)  NSKIP
 92         21 FOKllAT(Il)
 93         22 CONTINUE
 94         23 READ(5,24)  IDAY.IHK.HIN
 95         24 FORMATC  ',213,12)
 96            PRINT 24,  IDAV.IHR.HIN
 97            DO 26 K.-1,NRPTS
 98            RKATH3.25)  US(K),VS(K)
 99         25 FOR!IAT( F5. 2, 1X.F5.2)
100         26 CONTINUE
101            GO TO 34
102      C
10J      C     SKIP (IE-100)  NUMBER OF PERIODS OF  DATA IN  THE FORM OF DIRECTION AND  SPEED
104      C     (THEKE ARE  7  RECORDS PER PERIOD)
105      C
106.         27 COtlTINUF.
107            IF(NI' .CT.  1)  GO  TO 30
108            IEND - (1E-100)*7
109            IF(IEN»  .EQ.  0)  CO TO 30
110            DO 29 I-l.IEND
111            READ(5,28)  NSKIP
112         28 FORMAT(Il)
                                          47

-------
   113
   in
   115
   116
   117
   118
   119
   120
   121
!   122
   123
   124
!   125
   126
I   127
:   128
I   129
   130
I   131
   132
•   133
i   134
   135
   136
   137
   138
   139
   140
   141
   142
   143
   144
   145
   146
   147
   148
   149
   150
   151
   152
   15J
   154
   155
   156
   157
   158
   159
   160
   161
   162
   163 .
   164
   165
   166
   167
   168
   169
   29 CONTINUE
   30KEAI>(5,32) MI.M, IHK. IDAY.  ( WD1R( I ) , WSPO( I ) . 1-1 , 25)
   32 FORMAT(I3.5X,I2.2X,I3,7(T21,4(*X,2F5.1),/))
      U1UTE<6,24) IDAY,IHR,HIM
C
C     CONVERT DIRECTION  AND  WIND SPEED TO 0 AND V COMPONENTS
C
      DO 33 K-l .NRl'TS
      CALL l)VC:il'(US(K) ,VS(K),UDIR(K) ,WSPD(K))
   33 CONTINUE
   34 WR1TC(6,35)
   35 FORIIATC  '.lOX.'STA' , 1 5X.'X ' , 1 7X, ' Y ' , 1 7X, ' U', 17X,'V',//)
      DO 40 K-l.NRPTS
      WRITE(6,37) NSTA(K),X(K).Y(K).US(K).VS(K)
   37 FORIIATC  ',10X,I3,2(13X,F5.2) , 2( 1 2X, F6 . 2) )
   40 CONTINUE
C
C***************************************************************************
C     CALCULATE MEAN AND SIGMA  OF DATA SAMPLE.
C     REJECT DATA WHEN  VALUES ARE 4  SIGHA FROM MEAN OR GREATER  THAN  20
C***************************************************************************
C
      ssu-o.o
      ssv-o.o
      SUIIU - 0.
      su;iv - o.
      ICOUNT -  0
      DO 47 K-l.NRPTS
      IF(US(K)  .GT.  20.0  .OR.   VS(K)  .GT. 20.0) GO TO 47
      sunu - SUMU +  us(K)
      syitv - SUMV +  VS(K)
      ICOUNT -  ICOUNT  + 1
      SSU - SSU + US(K)*US(K)
      SSV - SSV + VS(K)*VS(K)
   47 CONTINUi:
      AVGU - SUMU/ICOUNT
      AVCV - SUMV/ICOUNT
      SKJU - SQRT(SSU/ICOUNT -  AVGU*AVGU)
      SIGV - SQRT(SSV/ICOUNT -  AVCV*AVGV)
      PRINT 50
   so FOR:IAT(*I',35x,'STATISTICS FROM ALL DATA LESS THAN  20 M/SEC',//)
      PRINT 65, AVGU,AVGV.SIGU,SIGV
      ssu-o.o
      ssv-o.o
      SUMU - 0.
      SUMV - 0.
      ICOUNT -  0
      DO 60 K-1,21
      IF(US(K)  .GT.  4*SIGU+AVCU .OR.  VS(K) .CT.  4*SICV+AVGV)
     *URITi:(6,57) K,US(K) ,VS(K)
      IF(US(K)  .GT.  4*SICU+AVGU .OR.  VS(K) ,CT.  4*SICV+AVCV)
     *US(K) • 99.0
      IF(US(K)  .GT.  4*SICU+AVGU .OR.  VS(K) .GT.  4*SIGV+AVGV)
     *VS(K) - 99.0
      IF(US(K)  .LT.  AVCU-4.*SICU .OR. VS(K)  .LT. AVGV-4.*SIGV)
     *«RITE(6,57) K.l)S(K) ,VS(K)
      IF(US(IC)  .LT.  AVGU-4.*SIGU .OR. VS(K)  .LT. AVGV-4. *SICV)
                                            48

-------
170            *US(K)  - 99.0
171             IF(US(K) .LT. AVGU-4.*SICU  .OK.  VS(K)  .LT. AVCV-4.*SIGV)
172            *VS(K)  - 99.0
173             IF(US(K) .CT. 4*S1CU+AVGU  .OR.  VS(K)  .GT. 4*SICV+AVGV)
174            *GO TO  60
175             IF(US(K) .LT. AVGU-4*SICU  .OR.  VS(K)  .LT. AVCV-**SIGV)
176            *GO TO  60
177          57 FORMATC ',2X,'THE  FOLLOWING DATA HAVE BEEN IGNORED  ',
178            *'  (EXCLUDING DATA FRO!!  STA  108-121)  —SIHCE THE  U AND/OR V '
179            *'EXCEDE AVG + OR -  2*SIG*.//,45X,13,5X,2F6.1)
180             SUMU - SUMU + US(K)
181             SUMV - SUMV -f- VS(K)
182             ICOUNT - ICOUHT + 1
183             SSU -  SSU + US(K)*US(K)
184             SSV -  SSV + VS(K)*VS(K)
185          60 CONTINUE
186             AVGU - SUMU/ICOUNT
187             AVGV - SUtlV/ICOUNT
188             SIGU - SQRT(SSU/ICOUMT  - AVGU*AVGU)
18'J             SIGV - SQRT(SSV/ICOUNT  - AVGV*AVGV)
190             PRINT  63
101          63 FORMAT(5(/),35X,'STATISTICS  FROM DATA  WITHIN 4*SIGHA  OF  MEAN*
192            *,//)
193             WRITE(6,65) AVGU,AVGV,SIGU,SICV
194          65 FORMATC ' , 6 ( /) , 45X , ' AVGU  - ' , F7 . 2 , 1 OX , ' A VG V -',F7.2,//,
195            *45X,'SIGU -',F7.2,lOX.'SICV  -*,F7,2)
196      C
^97      £*******************************************************************************
198      C      OBJECTIVE ANALYSIS  PROCEDURE FIRST  FINDS A FIRST  GUESS FIELD USING THE
199      C      CDC I'KOCEDURE (CALL  INITIL)  THEN USING THE LIU AND GOOD1N ALGORITHM
200      C      MINIMIZES THE DIVERGENCE

2(12      C
203             DO 500 LL-1,HLEV
204             DO 70  J-l.JMAX
205             DO 70  I-l.IMAX
206             F(I,J)-1.00
207          70 coriTiwur.
208             VKIT E(6,71)
209          71  FORtlAT('l')
210             CALL INITIL(X,Y,US,U, IMAX, JtlAX, NRl'T S, AVGU, SICU)
211             CALL INI riL(X,Y, VS,V, IIIAX, J11AX, NRI'TS, AVGV, SIGV)
212             CALL PRINTCU, V, IMAX, JMAX.IOUT, 1,ZK(LD)
213             IFd.L  .GE.  2) GO TO  75
214      C

216      C      THE GRID POINTS NEAREST THE  DATA STATIOHS ARE  IDENTIFIED

21H      C
21!)             UO 74  K-l.NRPTS
220             I-X(K)+.5
221             J-Y(K)+.5
222      C

224      C      STORE  SURFACE WIND  VALUES  FOR  POWER LAW EXTRAPOLATION
225      C  ******************************************************************************
226      C
                                          49

-------
in
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
26a
26')
270
271
272
273
274
275
276
277
278
279
2HO
281
282
283




C




C
C
C
C
C
C
C
C
C





C
C

U1(K)-U(I , J)
V1(K)-V(I, J)
74 CONTINUE
75 CONTINUE

110 80 K-l.NRPTS
I-X(K) +0.5
J-Y(K) + 0.5
IF(
-------
2H4            1            ) /(4.*I>X)+FC* (V(l, J+1)-V(I, J-O)/<2.*DY)+FX*(
235            2            V(I, J + 2)-V(I, J-2»/(4.*l>Y)
286            DIV-DIVK(I.J)
287            IF( AilS(UIV) .CT.DMAX)  UMAX-ARS(DIV)
288            UT(I, J)=-2.*DIVR(I,J)*DX/(F(I + 1,J)+F(I-1,J)+F
323            V(1,JI1AX)«.5*(V(2,J!IAX)+V(1,J2))
324            U(IMAX,l)=..5*(U(I2,n+U(iriAX,2))
325            V(IMAX,1)-.5*(V(I2,1)+V(IMAX,2))
326            U(IHAX,JMAX)-.5*(U(I2,JI1AX)+U(I:IAX,J2))
327            V(l:iAX, JIIAX)-.5*(V(I2, J!tAX)+V( I-IAX.J2))
328      C

3 JO      C     CHECK  TO SEE IF THE WIND  FIELD HAS CONVERGED

332      C
333            IF(I>MAX .LT.  EPSI) GO  TO 120
334        115 CONTINUE
335      C

337      C     PRINT THE U AND V  FIELDS ONTO COtll'UTER PAPER
338      c*******************************************************************************
339      C
340        120 CALL  PRINT (U , V, IHAX, JI1AX, IOUT, 2 , ZK( LL) )
                                          51

-------
341             PRINT  200
342         200  FUUMAT('l')
343             IF(HLKV .KQ. 1) GO TO  1000
344      C
345      £***** * ********ft* **** **** ******************************************** *** ********
346      C      SI'BCD  AND DIRECTION AT LEVELS  ABOVE THE SURFACE ARE  DETERMINED BY
347      C      ASSUMING THAT THE WIND TURNS  10 DECREES EVERY 304 METERS  AND USING
348      C      A  I'OUP.R LA1I PROFILE
349      C*******************************************************************************
350      C
351             Z-ZK(LL)                                                   '
352             PRINT  248,L1.,Z,P
353         248  FOK'1AT(20X, 'LEVEL NUMBER   ' , 12, 1 OX,' HEIGHT (M) -'.F7.2,
354           MOX.'P -'.F7.4)
355             DO  260 M-l.NKPTS
356             iF(usco .C;T. 20.0  .OR.   VS(M) ,C;T.  20.0) GO TO  26o
357             CALL UVCMPKUS(M) ,VS(M) ,OIR(M) ,SPD(M))
35'J             l)IR(M) -1) IK (II)-f 1*111*1 .82268883 1E-4*Z
359             Sl'l)(:i)-S«jRT(Ul(H)**2+Vl(M)**2)*(Z/20.)**P
360         260  CUMTINUE
361             PRINT  211
3f>2         211  FOR!1AT(3(/) ,20X,'STA* ,T34,'U',T45,'V ,T55,'UIR* ,T65,
363           *'S1'D',//)
364             UO 270 tl-l,NRPTS
365             IF(US(!1) .CT. 20.0  .OR.   VS(M) .GT.  20.0) GO TO  270
366             NST -  100+M
367             CALL UVCMP(USCM) ,VS(M) ,DIR(M) ,SPD(M) )
368             PRINT  215,NST,US(H),VS(M),DIR(M),SPD(M)
369         215  FOR;iAT(20X,I3,T32,F6.2.T42,F6.2,T53,F6.2,T64,F5.2)
370         270  CONTINUE
371         500  CONTINUE
372        1000  CONTINUE
373             STOP
T74             END
                                            52

-------
1
2
3
4
5
6
7
8
9
10
11
1 2
13
1 4
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

C
C
C
C
C
C
C
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 PRI NT ( U , V , IMAX , JM AX, IOUT , IN , Z)


THIS SUBROUTINE PRINTS THE ENTIRE 46 BY 46 ANALYSIS FIELD ONTO
FOUR SHEETS OF COMPUTER PAPER (FIRST : UPPER LEFT * SECOND :
LOWER LEFT * THIRD : UPHER RIGHT * FOURTH : LOWER RIGHT) AND
RECORDS THE U AND V ARRAYS ON A MASS STORAGE OR TAPE FILE




DICTIOHARY OF VARIABLES USED IN PRINT



1UAY THE JULIAN DAY OF THE YEAR OF THE DATA SET
IHR THE HOUR OF THE DAY OF THE DATA SET (0 - MIDNIGHT)
IHAX Till: NUMBER OF GRID POINTS IN THE X DIRECTION
IN VARIABLE USED IN TITLE OUTPUT
IOUT THE UIIIT NUMBER OF THE MASS STORAGE OR THE TAPE FILE.
IF NO MASS STORAGE OR TAPC FILE RECORDING IS DESIRED,
SET IOUT-0 IN THE DATA STATEMENT IN THE MAIN SUBROUTINE
JI1AX THE NUMBER OF GRID POINTS IN THE Y DIRECTION
K THE NUMBER OF THE PRINTED PAGE
HIN THE TEMPORAL MID-POINT OF THE 15 MINUTE AVERAGING INTERVAL
Z THE HEIGHT OF THE LEVEL AT WHICH WINDS WERE COMPUTED




DIMENSION U(46,46) ,V(46,46)
COMMON IDAY, IHR.MIN
K2-4
112 IFUMAX .LE. 20 .OR. JHAX .LE. 20) K2-1
DO 131 K-1.K2
II"!
IF-23
JI-1
JF-23
IF(K .El}. 2 .OR. K.Eq.4) JI-24
IF(K .EQ. 2 .OR. K.Eq.4) JF-JMAX
IF(K.EQ.3 .OR. K.Eq.4) 11-24
IF(K .Eg. 3 .OR. K.Eq.4) 1F-IMAX
W R I 1 E ( 6 , 1 1 )
11 FORMATC 1')
IF(IN .Eq. 1) WRITE(6.117) Z,K
IF(IN .Eq. 2) WRITE(6,118) Z,K
117 FORMATC ',10X, 'FIRST GUESS ' , 2 3X , F5 . 0 , ' -H U-FIELD ( H/ S EC ) ' , 30X ,
*'PAGE ' ,12,1 1)
118 FORMATC ',10X, 'FINAL ANALYS I S' , 20X , F5 . 0 , ' -H U-FIELD ( M/ S EC) ' , 30X ,
*'PAGE ',12,11)
WRITEC6.119) (1,1-11, IF)
119 FORMAT(5X, 2315, /)
53

-------
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
71
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
9!
92
93
94
95
96
97
    DO 130 JJ-JI.JF
    J-JMAX-JJ+l
    URITE(6,120) J,(U(I,J),1-11,IF)
120 FORHATC ' ,I3,3X,23F5.l,M
130 CONTINUE
131 CONTINUE
    IFUMAX .LE. 20  .OR.  JHAX
    DO 151 K-1.K2
    11 = 1
    IF-23
    JI-1
    JF-23
    IF(K .EQ. 2  .OR.   K  .EQ.
    IF(K .EQ. 2  .OR.   K  .EQ.
    IF(K .EQ. 3  .OR.   K  .EQ.
    IF(K .EQ. 3  .OK.   K  .EQ.
    WRITE(6,11)
    IF(IN .EQ.
                                  LE. 20) K2-1
                                 4)  JI-24
                                 4)  JF-JHAX
                               4)
                               4)
                                    11-24
                                    IF-IMAX
    IF(IN .EQ.
132 FORMATC '
   *'I'AOE ",12
133 FORMATC
   "'PAGE
                  1)  URITE(6,132)  Z,K
                  2)  WRITE(6,133)  Z,K
                  10X, 'FIRST  GUESS ' , 2 3X, F5 . 0 , ' -M V-FIELD  ( M/ SEC) ' , 30X,
                ',10X, 'FINAL ANALYS I S ' , 20X, F5 . 0, ' -M  V-FIELD ( M/ SEC) ' , 30X,
             ',I2,//)
      UKI1£(6, 119)  (I.I-II.IF)
      DO 150 JJ-JI.JF
      J-JMAX-J J+l
      WRITE(6,120)  J,(V(I,J) ,1-11, IF)
  150 CONTINUE
  151 CONTINUE
      1F(10UT  ,EQ.  0)  RETURN
C     RECORD ONTO  MASS  STORACE OR TAPE FILE
C ******4*************************»****»*******»******************
C
      WRITEdOUT, 180)  IDAY.IHR.MIN
  180 FORMAT (3 14)
      WRITE( IOUT, 190)  U
      WRITEdOUT, 190)  V
  190 FORMATUOF8.3)
      RETURN
      END
                                            54

-------
SUBROUTINE GR I B (N UATA , XCOORD , YCOORD, STNVAL,CRDVAL, SUMWT, SUHCO R ,
2
3
4
5
6
7
8
9
10
1 1
12
13
14
15
1 6
17
1 B
19
20
21
22
23
24
25
26
27
2H
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

C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
c
C
c
c
c
c
c
c
c
c
c




1 ISTART,IF.ND,JSTART,JEND,NSCANS,RSCAN,CR1T)


GKI1) IS A CUC SUBROUTINE CALLED BY SUBROUTINE INITIL.
GRID WILL TRANSFORM UNEQUALLY SPACED STATION DATA TO EQUALLY
SPACED GRID POINT UATA. WHEN GRID IS CALLED THERE MUST BE A
VALUE FOR EACH GRID POINT. THE FIRST GUESS FIELD HAY BE A
PREVIOUS ANALYSIS, A FORECAST, OR SIMPLY A CONSTANT. THE GRID
MUST BE ARRANGE!) SO THAT GKII) POINTS SURROUND EACH DATA POINT.





DICTIONARY OF VARIABLES USED IN GRID



CRIT CONVERGENCE CRITERION
ERROR SUM OF SQUARES OF THE 1) I FFKK ENC ES BETWEEN OBSERVATIONS
AT THE STATIONS AND INTERPOLATED VALUES ON THE FIELD.
USED IN THE CONVERGENCE TESTING.
GRDVAL ARRAY CONTAINING GKIU POINT VALUES
IEND NUMBER OF GRID POINTS IN THE X DIRECTION
INDEX1 I-VALUE OF GRID POINT ON SCAN CIRCLE AND TO LEFT OF STATION
INDEX2 I-VALUE OF GRID POINT ON SCAN CIRCLE AND TO RIGHT OF STATION
INDEX3 J-VALUE OF GRID POINT OH SCAN CIRCLE AND BELOW THE STATION
INDEX4 J-VALUE OF GRID POINT ON SCAN CIRCLE AND ABOVE THE STATION
JEND NUMBER OF GRID POINTS IN THE Y DIRECTION
NOATA NUMBEK OF STATIONS WITH UATA USED IN A PARTICULAR
ITERATION. EXACT NUtlBER DEFINED IN SUBROUTINE INITIL.
NPTS COUNTER USED IN THE CONVERGENCE TESTING
RSCAN RADIUS OF SCAN CIKCLE IN GRID UNITS. EXACT VALUE DEFINED
IN SUBROUTINE ItJITIL
RSQ SQUARE OF SCAN RADIUS
STNVAL ARRAY CONTAINING STATION OBSERVATIONS
SUMCOK TEMPORARY STORAGE ARRAY CONTAINING CUMULATIVE CORRECTIONS
AT EACH GRID POINT WITHIN A SCAN CIRCLE OF THE STATIONS
DURING AN ITERATION
SUMWT TEMPORARY STORAGE ARRAY CONTAINING CUMULATIVE WEIGHTINGS
Al EACH GRID POINT WITHIN A SCAN CIRCLE OF THE STATIONS
DURING AN ITERATION
XCOORD X-COORIHNATE OF A S1AIION
YCOORD Y-COORDINA1E OF A STATION




DIMENSION XCOORD(NDATA) , YCOORD ( NDATA) , STN VAL( NDATA)
DIMENSION GRDVAL (I END, JEND) , SUMWT ( I END, JEND) , SUMCOK ( I EN U, JEND)
DIMENSION SDIFF(25) , RSCAN ( NSC AN S)
DATA NPTS/0/ , ERROR/0/
                          55

-------
 56             R(5)- 1
 57       C
 5 a       £  **************************************************************************
 59       C      INVERT SOR.X1, AND Yl ARRAYS TO FORM S,X, AND Y ARRAYS.
 60       C      THIS IS  DONE SO THAT THE DATA FROM THE OUTER STATIONS WILL
 61       C      BE USED  FIRST.
 62       C  **************************************************************************
 63       C
 64             DO 10 J-l.NRPTS
 65             I-NRHTS  - J + 1
 66             S(I) - SOR(J)
 67             X(I) - X1(J)
 68             Y(I) - Y1(J)
 69       C      PRINT 2,I,X(I),Y(I),S(I)
 70       C    2 FORHAT(5X,15,3F10.1)
 71          10 COHTINUE
 72       C
 73       c  **************************************************************************
 74       C      USE A FIELD OF VALUES EQUAL TO AVG AS A FIRST GUESS FIELD
 75       C      FOR THE  CDC ANALYSIS
 76       C  **************************************************************************
 77       C
 78             DO 20 J-l.JF
 79             DO 20 I-l.IF
 80             C(I,J)-AVC
 81             W(I,J)-0
 82             C(I,J)-0
 83          20 COHTINUE
 84       C
 85       C  **************************************************************************
 86       C      ITERATE  ITMAX TIMES
 U7       c  **************************************************************************
 88       C
 89             PRINT 23
 90             DO 60 IT-L,ITMAX
 91       C      PRINT 23
 92          23 FORMAT('l')
 93             CALL GRIU(N( ID , X , Y , S , G , W , C , 1 , IF, 1, JF, 1, R(IT) .0)
 94             PRINT J5,N(IT)
 95          35 FURIlAK/l IX,'NUMBER OF  STATIONS -',I3//>
 96             UO TO 60
 97       C
 98       C      PRINT OUT  EVERY OTHLR GRID  VALUE
 99       C
100             PRIM 40, ( I, 1-1 , IF, 2)
101          40 FORMAK'O  '.3X.23I5,/)
102             DO 45 JJ-1,JF,2
103             J=JF-JJ
104             PRINT 50,  J.CGU.J) ,1-1,IF,2)
105          45 CONTINUE
106          50 FORMATC  ' , IX, 12, IX, 23F5. 1)
107          60 CONTINUE
108             RETURN
109             END
                                         56

-------
1
2
3
4
5
6
7
8
9
10
1 1
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
J6
37
38
39
40
41
4 2
43
44
45
46
47
48
49
30
51
52
53
54
55

C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
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 INITIL(X1,Y1,SOR,C, 1 F , J F , N KPT S, AVG , S IG)


THIS SUBROUTINE COMPUTES A WIND FIELD FROM 15-MINUTE AVERAGED RAPS WIND
DATA USING THE OBJECTIVE ANALYSIS PROCEDURE DEVELOPED BY CDC.
THE VALUES OF N AND R WERE BASED UPON EXPERIMENTATION AND
INFORMATION PROVIDED BY CDC.



DICTIONARY OF VARIABLES USED IN INIIIL
A*************************************************************************



AVG THE AVERAGE VALUE OF THE U OK V COMPONENTS FOR A GIVEN PERIOD
C ARRAY STORING THE CUMULATIVE CORRECTIONS FOR THE GRID VALUES
G AllRAY STORING THE CALCULATED GRID VALUES
IF NUMBER OF GRID POINTS IN Till: X DIRECTION
ITMAX NUMBER OF ITERATIONS TO BE P U RFORIIKI) FOR THE CDC PROCEDURE
JF NUI1BXR OF GRID POINTS IN THE Y DIRECTION
N ARRAY STORING NUMBER OF STATIONS TO BE USED IN EACH ITERATION
NRPTS MAXIMUM NUMBER OF STATIONS TO BE USED IN ANY ITERATION
R ARRAY STORING SIZE OF SCAN RADIUS TO BE USED IN EACH ITERATION
S ARRAY STORING STATION NUMBERS IN DESCENDING ORDER
SIC STANDARD DEVIATION OF U OR V COMPONENTS
SOR ARRAY STORING STATION NUMBERS IN ASCENDING ORDER
W ARRAY STOKING CUMULATIVE WEIGHTINGS FOR EACH GRID POINT
X ARRAY STORING X COORDINATES OF STATIONS IN DESCENDING ORDER
XI ARRAY STORING X COORDINATES OF STATIONS IN ASCENDING ORDER
Y ARRAY STORING Y . COORD INAT ES OF STATIONS IN DESCENDING ORDER
Yl ARRAY STORING Y COORDINATES OF STATIONS IN ASCENDING ORDER




DIMENSION X(25),Y(25),S(25),C(IF,JF),W(46,46),C(46,46),R(6),N(6)
*, SOR(25) ,X1(25) ,Y1(25)
DATA ITMAX/5/

DEFINE nit NUMBER OF STATIONS AND THE SIZE OF THE SCAN RADIUS
TO BE USED IN EACH ITERATION
**************************************************************************

N(l)-7
N( 2)-12
N( 3) -NRPTS
N(4) -NRPTS
N(5) -NRPTS
R(l)-46
R(2)-20
R(3)- 10
«(4>- 5
57

-------
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
7 4
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112




10

11





C
C
C
C
C
C



C
C
C


C
C
C


C
C
C
C
C








C
C
C
C


C
C
C



DO 10 I-ISTART, IEND
DO 10 J-JSTART, JEND
SUMUTCI, J)-0
SUllCORd, J)-0
ITER-0
ITER-ITER+1
IF( ITER.CT.NSCANS)GO TO 99
RSO.-RSCAN(ITER)*RSCAN( HER)
ERROR-U
Nl'TS-0
NRKJ-0

CALCULATE THE CORRECTIONS AT EACH GRID POINT WITHIN A SCAN
CIRCLE CENTERED AT THE STATIONS. THE CORRECTIONS ARE BASED
UPON THE WEIGHTED DIFFERENCES BETWEEN THE OBSERVATION AT THE
STATIONS AND THE INTERPOLATED VALUE ON THE FIELD.

DO 50 NDT-1 ,N1)ATA
SDIFF(6iDT)-99.
IF(STNVAL(NDT) . EQ. 99 . 0) CO TO 50

FIND INDICES OF NEAREST GRID POINT IN DIRECTION OF (1,1)

I-XCOORD(NDT)+ 1 .
J-YCOOR»(NDT)+1.

FIND X AND Y DISTANCE FROM GRID POINT (I,J)

P-XCOOKD(NDT)-d-l)
4-YCOORD(NDT)-(J-l)

USE FOUR POINT BILINEAR FORMULA TO INTERPOLATE A VALUE AT
THE STATION LOCATION FROM FOUR SURROUNDING GRID POINTS.
IF A VALUE CANNOT BE INTERPOLATED, THE STATION IS SKIPPED.

IF( I.LT. ISTARDGU TO 50
IF( 1+1 .Gl. I KND)CO TO 50
IF( J.LT. JSEAKT)GO TO 50
IF( J+l .OT. JEND) GO TO 50
STMINT-GRUVAL(I,J)*(1.-P)*(1.-Q)
1 +l,KI)VAL(I+l, J)*P*(l.-q)
2 +GRI)VAL( I, J+1)*Q*( 1 ,-P)
3 +GRI)VAL(I + 1 , J+l) *P*Q

FIND THE DIFFERENCE BETWEEN THE INTERPOLATED AND OBSERVED
VALUES AT THE STATIONS.

DIFF-STNVAL(NUT)-STNINT
SDIFF(NDT)-DIFF

THE MEAN SQUARED DIFFERENCE IS USED BELOW

ERROR-OIFF*UIFF+ERROR
tU'TS-NPTS+1
58

-------
113      C
114      C      A CORRECTION  IS  NOW  COMPU1CI) FOR EACH GRID  POINT WITHIN A CIRCLE
115      C      OF RADIUS RSCA(KU'ER)  CENTERED AT THE STATIONS.
1 16      C
117             INUEX1-XCOOR1)(NUT) + 1 .-KSCAK( ITEK)
118             1F(INUEX1.LT.ISTART)INUEX1-IS1ART
119             INDEX2-XCOORD(NDT)+1.+RSCAN(ITER)
120             IF(INDEX2.CT.IEND)INDEX2-IEND
121             INDEX3-YCOORD(NDT)+1.-RSCAN(ITER)
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
1 56
157
158
159
160
161
162
163
164
165
166
167
168
169






C
C
C



C
C
C
C






C
C
C
C


30
50
C
C
c





c
c
C * * i
c





IF< INDEX 3. LT. J START) I NDEX3- J START
INDEX4=-YCOOKD(NDT)+1.+RSCAN(ITER)
IF(INDCXA.GT.JCNU) INDEX4-JENU

00 30 tl-INDEXl, INDEX2
DO 30 N-INDEX3, INDEX4

FIND DISTANCE SQUARED FROM STATION TO GRID POINT (M,N).

DX-XCOORl>(NDT)-(H-l)
DY«YCOOR1)(NDT)-(N-1)
DSQ-DX*DX+DY*DY

GENKRATi: WEIGHT. IF XNUII IS NEGATIVE, GRID
POINT CI,N) IS OUTSIDE THE SCAN CIRCLE.

XNUM-RSg-USl)
IF(XNU:i.L1.0)GO TO 30
XI)EN = RSQ+l)S(j
WT-XNUM/XDEN
WT - WT * WT
WT - UT * WT

CORRECTIONS ARE NOT APPLIED NOW SINCE A GIVEN
GRID POINT MAY GET CORRECTIONS FROM SEVERAL DATA POINTS.

SUMUT(tl.N) -SUMWT(M,N)+VT
SUMCOR(M.N) -SUMCOR(M,N)+WT*DIFF
CONTINUE
CONTINUE

HMD OF LOOP FOR DATA POINTS.

R.'IS -0
COKIIAX -0
1101 -0
II1AX -0
JMAX "0

APPLY 1 ME CUMULATIVE CORRECTIONS TO THE GRID POINTS.

DO 70 M-ISTART, IENU
DO 70 II-JSTART, JEND
IF(SUMUT(tl,N) .EQ.O)GO TO 70
GRDVAL(M,N)-GRDVAL(M,N)+SUMCOR(H,N) /SUMWT(H.N)
COR-SUHCOR(M,N) /SUMWT(H,N)
                                             59

-------
170            RM
171            I10T-ITOT+1
172            IF(ABS(COR).LE.ABS(CORMAX))GO TO 69
173            CORtlAX-COR
174            IMAX-M
175            J11AX-N
176       69   CONTINUE
177            SUMUT(M,N)-0
178            SUMCOR(M,N)-0
179       70   CONTINUE
180      C
181      C     IF  THE MEAN SQUARED CORRECTION IS SMALL  ENOUGH,  STOP ITERATING.
182      C
183            ERROR-EKROR/Nl'TS
184            PRINT 75,ITER,ERROR,RSCAN(ITER)
185         75 FOR!IAT(5X,'       FOR ITERAT ION" , I 3 , ' THE MEAN  SQUARED'
186           1* DIFFERENCE AT  THE STATIONS IS',F8.2,5X,'SCAN CIRCLE',
187           2' RADIUS  -',F8.2)
188            IF(ITOT.CT.O)RMS-SQRT(RMS/ITOT)
189            PRINT 80.RHS.CORMAX,IHAX,JMAX
190         80 FOKMAT(/1IX.'RHS CHANCE AT GRID POINTS  IS',F8.3,5X,
191           I'tlAXIMUM  CHANGE  IS ' , F7 . 2,'• AT GRID POINT',215)
192            IF(ERROR.GT.CRIT)GO TO 11
193
194       99   RETURN
195            END
                                         60

-------
 1               SUBROUTINE UVCMP 1 ( U , V, I'UA , V.'S1>)
 2
 J
 4
 5
 6
 7
 H
 9
10
1 1
12
13
14
15
16





5

10

15

20
90
nr.G
ir(
I F(
IF(
IF(
U!)A
GO
I'D A
GO
VI) A
<;o
VUA
v s i'
•= 180. / 3,141592654
U .
U .
U .
U .
•
TO
*
TO
-
TO
-
m
LI:, o. .AND. v
IT. 0. .AND. V
CD. 0. .AND. V
GT. 0. .AM II. V
ATAN(U/V)*I)E<;
90
-ATAN(V/U)*I)EC
9(1
AT1N(U/V)*DKC ^
90
-ATANCV/U) *DEG
SQRT(U*U+V*V)
. 1. 1: .
. G I". .
.CT.
. 1. K .


+ 90.

i- 180.

+ 270

0.)
0.)
0.)
0.)






.

GO TO 5
GO TO 10
GO TO 15
Gil TO 20








RETURN
                                              61

-------
                                REFERENCES
Eskridge, R.E., 1977:  Mon.  Mea.  Rev.  Vol.  105, No.  8, August.

Hovland, D., D. Dartt, and K. Gage, 1976:  An Objective Analysis
     Technique for the Regional Air Pollution Study, Final Report, EPA
     Contract 68-02-1827.

Liu, C.Y. and W.R. Goodin, 1976:  An Iterative Algorithm for Objective
     Wind Field Analysis, Mon.  Wea.  Rev., Vol. 104, No. 6, June, pp.
     784-792.

Munn, R.E., 1966:  Descriptive Meteorology, Academic Press, New York.
     pp.  63-64.

Reynolds, Steven D., Philip M. Roth, and John H. Seinfeld, 1973:
     Mathematical Modeling of Photochemical Air Pollution I, Atm.  Env.,
     Vol. 7,  pp.  1033-1061.

Shir, C.C. and L.J. Shieh, 1975:  Development of An Urban Air Quality
     Simulation Model With Compatible RAPS Data, Final  Report, EPA
     Contract 68-02-1833.
                                 62

-------
                                   TECHNICAL REPORT DATA
                            (Please read Instructions on the reverse before completing)
1. RFPORT NO
   EPA-60Q/4-77-fU9_
                              2.
             |3. RECIPIENT'S ACCESSION1 NO.
4. TITLE AND SUBTITLE

  NON-DIVERGENT WIND ANALYSIS ALGORITHM
      FOR THE  ST.  LOUIS RAPS NETWORK
             5. REPORT DATE
                November 1977
             6. PERFORMING ORGANIZATION CODE
|7. AUTHOR(S)

  Terry  L.  Clark and Robert E.  Eskridge
                                                           8. PERFORMING ORGANIZATION REPORT NO.
,9. PERFORMING ORGANIZATION NAME AND ADDRESS
  Environmental  Sciences Research  Laboratory
  Office of  Research and Development
  U.S.  Environmental Protection  Agency
  Research Triangle Park, NC   27711	
                                                           10. PROGRAM ELEMENT NO.
                1AA603  AD-12   (FY-77)
             11. CONTRACT/GRANT NO.
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
                In-house	
             14. SPONSORING AGENCY CODE
                EPA/600/09
15. SUPPLEMENTARY NOTES
16. ABSTRACT
       An  objective wind analysis  algorithm capable   of producing non-divergent
  wind fields at up to ten  levels  in the atmospheric  boundary layer for  St.  Louis,
  Missouri  is described.  Wind  data collected during  the St. Louis Regional  Air
  Pollution Study (RAPS) and  averaged over 15-minute  intervals were used to construct
  u  and  v  wind component fields on a 46 by 46 grid network with a grid spacing of 1 km
  via a  s©an-radius ,techm'2jue.   The divergence across grid squares was minimized by a
  non-divergence algorithm.
       Several analyses produced by the algorithm are illustrated.  A user's guide and
  computer program listing  are  included.
17.
                                KEY WORDS AND DOCUMENT ANALYSIS
                  DESCRIPTORS
                                              b.lDENTIFIERS/OPEN ENDED TERMS
                           c. COSATI Field/Group
       Air Pollution
     * Algorithms
     * Wind (Meteorology)
       grids (coordinates)
     * Atmospheric models
   St.  Louis, MO
   Regional  Air Pollution!
   Study
        13B
        12A
        04B
        08B
        04A
18. DISTRIBUTION STATEMENT

       RELEASE TO PUBLIC
19. SECURITY CLASS (ThisReportj
    UNCLASSIFIED
                                              20 SECURITY CLASS (This page)

                                              	UNCLASSIFIED
21. NO. OF PAGES
                                                                         22. PRICE
EPA Form 2220-1 (9-73)
                                            63

-------
                                                       INSTRUCTIONS

  1.   REPORT NUMBER
      Insert the EPA report number as it appears on the cover of the publication.

  2.   LEAVE BLANK

  3.   RECIPIENTS ACCESSION NUMBER
      Reserved for use by each report recipient.

  4.   TITLE AND SUBTITLE
      Title should indicate clearly and briefly the subject coverage of the report, and be displayed prominently.  Set subtitle, if used, in smaller
      type or otherwise subordinate it to main title. When a report is prepared in more than one volume, repeat the primary title, add volume
      number and include subtitle for the specific title.

  5.   REPORT DATE
      Each report shall carry a date indicating at least month and year. Indicate the basis on which it was selected (e.g., date of issue, date of
      approval, date of preparation,  etc.j.

  6.   PERFORMING ORGANIZATION CODE
      Leave blank.

  7.   AUTHORS)
      Give name(s) in conventional order (John R. Doe, J. Robert Doe, etc.].  List author's affiliation if it differs from the performing organi-
      zation.

  8.   PERFORMING ORGANIZATION REPORT NUMBER
      Insert if performing organization wishes to assign this number.

  9.   PERFORMING ORGANIZATION NAME AND ADDRESS
      Give name, street, city, state, and ZIP code. List no more than two levels of an organizational hirearchy.

  10. PROGRAM ELEMENT NUMBER
      Use the program element number under which the report was prepared. Subordinate numbers may be included in parentheses.

  11. CONTRACT/GRANT NUMBER
      Insert contract or grant number under which report was prepared.

  12. SPONSORING AGENCY NAME AND ADDRESS
      Include ZIP code.

  13. TYPE OF  REPORT AND PERIOD COVERED
      Indicate interim final, etc., and if applicable,  dates covered.

  14. SPONSORING AGENCY CODE
      Leave blank.

  15. SUPPLEMENTARY  NOTES
      Enter information not included elsewhere but useful, such as:  Prepared in cooperation with, Translation of, Presented at conference of,
      To be published in, Supersedes, Supplements, etc.

  16. ABSTRACT
      Include a brief (200 words or less/ factual summary of the most significant information contained in the report. If the report contains a
      significant bibliography or literature survey, mention  it here.

  17. KEY WORDS AND DOCUMENT ANALYSIS
      (a) DESCRIPTORS - Select from the Thesaurus of Engineering and Scientific Terms the proper authorized terms that identify the major
      concept of the research and are sufficiently specific and precise to be used as index entries for cataloging.

      (b) IDENTIFIERS AND OPEN-ENDED TERMS - Use identifiers for project names, code names, equipment designators, etc.  Use open-
      ended terms written in descriptor form for those subjects for which no descriptor exists.

      (c) COSATI FIELD GROUP - Field and group assignments are to be taken from the 1965 COSATI Subject Category List. Since the ma-
      jority of documents are multidisciplinary in nature, the Primary Field/Group assignment(s) will be specific discipline, area of human
      endeavor, or type of physical object. The application(s) will be cross-referenced with secondary Field/Group assignments that will follow
      the primary posting(s).

  18. DISTRIBUTION STATEMENT
      Denote releasability to the public or limitation for reasons other than security for example "Release Unlimited."  Cite any availability to
      the public, with address and price.

  19. &20. SECURITY CLASSIFICATION
      DO NOT submit classified reports to the National Technical Information service.

  21. NUMBER OF PAGES
      Insert the  total number of pages, including this one and unnumbered page^>, but exclude distribution list, if any.

  22. PRICE
      Insert the  price set by the National Technical Information Service or the Government Printing Office, if known.
PA Form 2220-1 (9-73) (Reverse)

-------