EPA-450/3-78-009
March 1978
 COMPUTER ASSISTED AREA
SOURCE EMISSIONS (CAASE)
     GRIDDING PROCEDURE
                    (REVISED)
                  IBM 370/OS
   VERSION USER'S MANUAL
 U.S. ENVIRONMENTAL PROTECTION AGENCY
    Office of Air and Waste Management
  Office of Air Quality Planning and Standards
 Research Triangle Park, North Carolina 27711

-------
                                 EPA-450/3-78-009
        COMPUTER ASSISTED
AREA SOURCE EMISSIONS (CAASE)
       GRIDDING PROCEDURE
               (REVISED)

              IBM 370/OS
     VERSION USER'S MANUAL
                    by

            Richard C. Haws and J.W. Dunn, III

              Research Triangle Institute
          Research Triangle Park, North Carolina 27709



               Contract No. 68-02-2501

            EPA Project Officer: Jerome B. Mersch
                 Prepared for

         U.S. ENVIRONMENTAL PROTECTION AGENCY
            Office of Air and Waste Management
          Office of Air Quality Planning and Standards
          Research Triangle Park, North Carolina 27711

                 March 1978

-------
This report is issued by the Environmental Protection Agency to report
technical data of interest to a limited number of readers.  Copies are
available free of charge to Federal employees, current contractors and
grantees, and nonprofit organizations - in limited quantities - from the
Library Services Office (MD-35) , U.S. Environmental Protection Agency,
Research Triangle Park, North Carolina 27711; or,  for a fee, from the
National Technical Information Service, 5285 Port Royal Road, Springfield,
Virginia 22161.
This report was furnished to the Environmental Protection Agency by
the Research Triangle Institute, Research Triangle Park,  North
Carolina 27709, in fulfillment of Contract No. 68-02-2501.  The  contents
of this report are reproduced herein as received from the  Research
Triangle Institute.  The opinions, findings, and conclusions expressed
are those of the author and not necessarily those of the Environmental
Protection Agency. Mention of  company or product names is not to be
considered as an endorsement by the Environmental Protection  Agency.
                     Publication No.  EPA-450/3-78-009
                                11

-------
                               ACKNOWLEDGEMENT









     This revision to the manual was prepared by the Research Triangle




Institute, Research Triangle Park, North Carolina, for the Environmental




Protection Agency under Contract 68-02-2501.  The research is under the




direction of personnel in the Source Receptor Analysis Branch (SRAB).




     The work has been carried out under the direction of Mr. Jerome B.




Mersch, who is the EPA Project Officer for the contract.




     RTI staff members principally participating in developing the system and




applying it are as follows:




          E. L. Hill, Laboratory Supervisor




          R. C. Haws, Project Leader




          H. L. Hamilton, Jr., Consultant and Co-developer




               of the earlier CAASE methods




          D. H. Abbott, Programmer




          S. K. Burt, Programmer




          J. W. Dunn III, Mathematician




          R. E. Paddock, Systems Analyst
                                       111

-------
iv

-------
                              TABLE OF CONTENTS






                                                                  Page Number




ACKNOWLEDGEMENT 	     iii




FIGURES	      ix




TABLES	     xii




1.0  INTRODUCTION 	       1




     1.1  General Background	       1




     1.2  Purpose	       6




     1.3  The CAASE Method	       8




2.0  CAASE1 PROGRAM	      19




     2.1  Program Description 	      19




     2.2  Input Information 	      22




     2.3  Output Information  	      26




     2.4  Job Control Language (JCL) and Deck Setup	      31




     2.5  Warnings and Limitations	      34




3.0  CAASE2 PROGRAM	      35




     3.1  Program Description 	      35




     3.2  Input Information 	      38




     3.3  Output Information  	      43




     3.4  Job Control Language (JCL) and Deck Setup	      49




     3.5  Warnings and Limitations	      53




4.0  CAASE3 PROGRAM	      59




     4.1  Program Description 	      59




     4.2  Input Information 	      60




     4.3  Output Information  	      60




     4.4  Job Control Language (JCL) and Deck Setup	      66




     4.5  Warnings and Limitations	      66

-------
                        TABLE OF CONTENTS (CONTINUED)






                                                                  Page Number




5.0  CAASE4 PROGRAM	      71




     5.1  Program Description 	      71




     5.2  Input Information 	      73




     5.3  Output Information  	      77




     5.4  Job Control Language (JCL) and Deck Setup	      82




     5.5  Warnings and Limitations	      85




6.0  CAASE5 PROGRAM	      87




     6.1  Program Description 	      87




     6.2  Input Information	      90




     6.3  Output Information  	      92




     6.4  Job Control Language (JCL) and Deck Setup	     119




     6.5  Warnings and Limitations	     121




7.0  SUBROUTINE DESCRIPTIONS  	     125




     7.1   CED009 Subroutine  	     125




     7.2   GTGR Subroutine	     126




     7.3   INBOUN Subroutine  	     127




     7.4   TRACKR Subroutine  	     128




     7.5   REORDR Subroutine  	     129




     7.6   SIDEIT Subroutine  	     129




     7.7   WRAPUP Subroutine  	     I30




     7.8   NETBAL Subroutine  	     13°




     7.9   DECIDE Subroutine  	     131




     7.10  NTRIOR and FINAL Subroutines  	     I35
                                       VI

-------
                   TABLE OF  CONTENTS  (CONTINUED)






                                                            Page Number




7.11  PROXPR Subroutine  	     136




7.12  INPOP Subroutine 	     136




7.13  PROXML Subroutine  	     136




7.14  SEARCH and SETLGO Subroutines   	     137




7. 15  TIEBRK Subroutine	     137




7.16  GRIDIT Subroutine  	     137




7.17  ADJUST Subroutine  	     138




7.18  SQROFF Subroutine  	     138




7.19  OUTPUT Subroutine  	     139




7.20  PARTIT Subroutine  	     139




7.21  DELETE Subroutine  	     139




7.22  INTEGR Subroutine  	     139




7.23  ASTORE and NSTORE Subroutines   	     139




7.24  YOFX and XOFY Subroutines	     140




7.25  FAREA Subroutine 	     141




7.26  SORT Subroutine	     141




7.27  POPBOX Subroutine	     141




7.28  EDPLOT Subroutine  	     142




7.29  COOUT Subroutine 	     142




7.30  READ1 Subroutine 	     142




7.31  OUTPT1 Subroutine	     143




7.32  OUTPT2 Subroutine  	     143




7.33  OUTPT3 Subroutine  	     143
                                 vii

-------
                        TABLE OF CONTENTS  (CONTINUED)


                                                                  Page Number
8.0  OBJECTIVE APPORTIONING FACTORS AND SUBJECTIVE
     OVERRIDING WEIGHTING FACTORS
     APPENDIX A:   LOGICAL FLOWCHARTS AND FORTRAN SOURCE
                  CODE LISTINGS - CAASEl
                  (and Subroutines)
     APPENDIX B:   LOGICAL FLOWCHARTS AND FORTRAN SOURCE
                  CODE LISTINGS - CAASE2
                  (and Subroutines)
     APPENDIX C:   LOGICAL FLOWCHARTS AND FORTRAN SOURCE
                  CODE LISTINGS - CAASE3
                  (and Subroutines). .  .
     APPENDIX D:   LOGICAL FLOWCHARTS AND FORTRAN SOURCE
                  CODE LISTINGS - CAASE4
                  (and Subroutines)
     APPENDIX E:   LOGICAL FLOWCHARTS AND FORTRAN SOURCE
                  CODE LISTINGS - CAASE5
                  (and Subroutines)
     APPENDIX F:  GTGR TABLES AND FORTRAN SOURCE CODE
                  LISTINGS - DIRECT ACCESS FILE CREATION
                  PROGRAM .....................     F-l
                                      viii

-------
                                   FIGURES






Number                                                            Page Number




   1     Flowchart of the Overall CAASE System 	      9




   2     System Flowchart of CAASE1 Program  	     23




   3     Input Deck Configuration for CAASEl Program 	     27




   4     Example of Printed Output from CAASEl 	     29




   5     JCL and Input Data Cards for CAASEl	     33




   6     System Flowchart of CAASE2 Program  	     39




   7     Input Deck Configuration for CAASE2 Program 	     41




   8     Example of Printed Output from CAASE2 	     44




   9     JCL and Input Data Cards for CAASE2	     51




  10     System Flowchart of CAASE3 Program  	     60




  11     Input Deck Configuration for CAASE3 Program 	     63




  12     Example of Plotter Output from CAASE3 	     65




  13     Example of Printed Output from CAASE3 	     67




  14     JCL and Input Data Cards for CAASE3	     68




  15     System Flowchart of CAASE4 Program  	     75




  16     Input Deck Configuration for CAASE4 Program 	     78




  17     Example of Printed Output from CAASE4 	     80




  18     Example of Optional Detailed Printout of




           Apportioning Factors, Etc., from CAASE4 	     81




  19     JCL and Input Data Cards for CAASE4	     84




  20     System Flowchart of CAASE5 Program  	     91




  21     NEDS Area Source Input Form for Washington




           County, Ohio (1972)	     93




  22     Scaled Area Source Emission Factors Used as




           Input to CAASE5 for the CAASE Examples	     94
                                      ix

-------
                                   FIGURES






Number                                                            Page Number




  23     Input Deck Configuration for CAASE5 Program 	    96




  24     Example Printout of Area Source Input  Data,  CAASE5   .  .  .   100




  25     Example of CAASE5 Output Table 1,  Allocated Fuels  ....   102




  26     Example of CAASE5 Output Table 2,  Allocated Fuels  ....   103




  27     Example of CAASE5 Output Table 3,  Allocated Fuels  ....   104




  28     Example of CAASE5 Output Table 4,  Allocated Fuels  ....   105




  29     Example of CAASE5 Output Table 5,  Allocated Fuels  ....   106




  30     Example of CAASE5 Output Table 1,  Allocated




           Emissions, Particulates 	   107




  31     Example of CAASE5 Output Table 2,  Allocated




           Emissions, Particulates 	   108




  32     Example of CAASE5 Output Table 3,  Allocated




           Emissions, Particulates 	   1°9




  33     Example of CAASE5 Output Table 4,  Allocated




           Emissions, Particulates	   H°




  34     Example of CAASE5 Output Table 5.,  Allocated




           Emissions, Particulates 	  	   HI




  35     Example Printout of County Total Emissions for All




           Source Category and Pollutant Combinations,  CAASE5  .  .   H2




  36     Example Printout of Dispersion Model Input Card




           Images, CAASE5, IPP Model	   113




  37     JCL and Input Card Example for CAASE5	   120




  38     Cell (i»j), Portions of the Adjoining  Cells, and the Eight




           Combinations of Ax,Ay for Exiting Side Number 1  ....
                                       x

-------
                                   FIGURES







Number                                                            Page Number




  39     Area Under a Line Segment	   141




  40     Examples of Overriding Weighting Factors Assignments




           for Railway Locomotive Operations




             -A  Example of Railway Locomotive Weighting Factor




                 of 1.0 (2 Km X 2 Km Grid Square)	   153




             -B  Example of Railway Locomotive Weighting Factor




                 of 2.0	   153




             -C  Example of Railway Locomotive Weighting Factor




                 of 1.0 (4 Km X 4 Km Grid Square)	   154




             -D  Example of Railway Locomotive Weighting Factor




                 of 0.5	   154




             -E  Example of Railway Locomotive Weighting Factor




                 of 3.21	   154
                                       xi

-------
                                   TABLES




Number                                                           Page Number




   1     Input Card Layout,  CAASEl 	     24




   2     Record Layout for MED-X Census  File	     28




   3     Record Layout for Edited MED-X  File	     32




   4     Input Card Layout,  CAASE2 	     40




   5     CAASE2 County Outline File Record  Layout   	     42




   6     Format of Card Image Records  Output from  CAASE2  	     47




   7     Definitions for Variables Output from CAASE2




           as Card Images	     48




   8     Record Layout for CAASE2 Optional  County  Outlines




           Output File	     50




   9     Variables Defined in CAASE2 Main Calling  Program  ....     55




  10     Input Card Layout,  CAASE3	     62




  11     CAASE3 County Outline File Record  Layout   	     64




  12     Area Source Emissions Category  Numbers  	     74




  13     Input Card Layout,  CAASE4	     76




  14     Output Record Layout for Apportioning Factor




           File, CAASE4	     83




  15     Input Card Layout,  CAASE5	     97




  16     Output Tape Record  Layout for CAASE5	    114




  17     Definitions of CAASE5 Output  Tape  Variables  	    116




  18     Increment Matrix




           -a  i-Increment,  Exit Side  1	    132




           -b  j-Increment,  Exit Side  1	,  .  .  .  .    132




  19     Entry Side of Cell;  Exit Side 1	    134
                                      xii

-------
                                   TABLES




Number                                                           Page Number




  20     Summary of Cell Index Increment Matrices  and  Entry




           Side Matrices to be Used Under Conditions of




           Single Side Exit or Corner Exit for Specified




           Sides or Corners	    135




  21     "New" Area Source Emissions Category Numbers  and




           Their Objective Apportioning Factor 	    147
                                     xiii

-------
1.0  INTRODUCTION




1.1  General Background




     The attainment and maintenance of acceptable air quality within an Air




Quality Control Region (AQCR) or an Air Quality Maintenance Area (AQMA)




requires the implementation of appropriate strategies to control the emission




of pollutants from individual sources or classes of sources.  The probable




success of candidate control strategies can be evaluated through the use of




computer simulation models.  These models manipulate source characteristics




and meteorological conditions to produce a distribution of ambient air




pollutant concentrations over the region being considered.




     Simulation models frequently used are based on Gaussian plume formations




and accept as input point and/or area sources.  Point sources are individually




identifiable stacks, process vents, etc., emitting more than some arbitrarily




specified mass of pollutant each year.  Area sources, however, include the




more ubiquitous, individually small sources which cannot be specifically




located.




     The objective of the Computer Assisted Area Source Emissions (CAASE)




gridding method is to improve the characterization of area sources.   Basic




data for the determination of area source emissions are rarely available for




geographic or political units or areas smaller than the county.  Such basic




data are in the form of annual fuel consumption by fuel type for residential,




commercial, institutional, and industrial heating; acreage burned by forest




wildfires; landing-takeoff cycles for military, commercial, and civil




aircraft; gasoline or diesel fuel consumed by light, heavy, and off-highway




vehicles, or vehicle miles traveled by road classification, etc.  These data




can be converted to pollutant emissions by the application of appropriate




emission factors.

-------
     The geographic size of a county, however, is too large for practical use




in simulation models for AQCR's or AQMA's.  Logical procedures are required to




distribute the county totals of basic data or derived emissions data to




smaller areas.  Further constraints imposed by simulation models require that




these small areas be squares, although they need not be of uniform size.




Various criteria have been proposed for the selection of sizes and the




distribution of emission area squares.  Urbanization, land use, housing




counts, and population have all been used subjectively to grid AQCR's and




AQMA's into emission area squares (hereafter called grid squares) and




subsequently to allocate county totals of pollutant emissions into each grid




square.  In general, the philosophy followed has required that urbanized or




industrialized portions of a county or study area be gridded into small




squares to provide for detailed representation of pollution sources.




Conversely, rural areas with few pollution sources are adequately represented




by larger grid squares.  Essentially, application of this philosophy results




in apportioning county total emissions to grid squares according to subjective




estimates of the distribution of population.  Since air pollution derives from




human activity, this procedure provides a reasonable approach to developing




area source emission distributions.




     The development of the CAASE programs began as an effort to reduce the




subjectivity inherent in distributing population into preselected grid




squares.  Success in this effort would reduce the time and effort required to




complete the area source emission distribution.




     The Bureau of the Census of the U.S. Department of Commerce has prepared




a modified Master Enumeration District List (MEDList) which includes, in




addition to the district identification,  population count, housing count,




etc., the geographic coordinates of the center of area of each of the




enumeration districts.

-------
     The procedures described in this manual have evolved from a feasibility

study (Contract CPA 70-147) in which three AQCR's,  145 (Lancaster,  Gage,  and

Jefferson Counties, Nebraska), 99 (South Central, Kansas),  and 130

(Metropolitan Fargo-Moorehead) were gridded.  In this study,  the ambient  air

quality indicated by the Air Quality Display Model (AQDM) simulation model,

based on a previously prepared (by another EPA contractor)  source emissions

grid and a corresponding simulation based on the CAASE grid were compared.

Because smaller grid squares were used by the CAASE method for central urban

areas - where the plotted population data showed concentrations of  people -

higher peak values of ambient pollutant concentrations were shown for the

cities, and sharper gradients of pollutant concentrations appeared  in the

urban-to-rural transition zone.  In rural areas, ambient pollutant

concentrations did not differ with the change in the grid system.

     Subsequent to the demonstration of feasibility of the CAASE method,  15

AQCR's containing 193 counties were gridded, and area source  fuels  and

emissions were determined for each grid square (Contract 68-02-1014).  This

resulted in the writing of a User's Manual.*  The programs, together with the

User's Manual, were then made available by EPA to air pollution control

agencies and contractors engaged in dispersion modeling.

     In the earlier CAASE method, i.e., before this major revision, a computer

drawn plot of the population centers was used in conjunction  with the U.S.

Geological Survey (USGS) maps to construct a study area grid  square system.

For each population center, a circle, with its radius proportional  to

population count, was drawn.  Each grid square was assigned to only one county

for subsequent emissions apportioning purposes; the user had  to take this into
* Computer Assisted Area Source Emissions Gridding Procedure (CAASE)  User's
  Manual, EPA-450/3-74-034, January 1974.

-------
consideration when constructing grid squares near county borders.  A




description of the resulting grid network was then used by CAASE in subsequent




steps.  Procedurally, the Universal Transverse Mercator (UTM)  coordinates of




the lower left hand corner of each grid, square, its side length, a sequential




identification number, state name, and county name were entered on keypunch




load sheets.  These data were then keypunched and verified.  In subsequent




steps, all population and housing counts for an enumeration district (ED) were




assigned to the grid square in which the geographic coordinates of the center




of the ED were located.  This was done because the contained area and




configuration of each ED was not available for computer use.  Therefore, some




grid squares did not have census count data assigned to them and, accordingly,




no fuels or emissions were apportioned to these "empty" grid squares.




Although the dispersion modeling results using these data were similar to




those using data processed by more tedious, subjective, and time-consuming




methods, some potential CAASE users were concerned about the "empty" grid




squares and were hesitant to use CAASE.




     As stated above, each grid square was assigned to only one county.  The




assignment of apportioning factors by C.AASE4 and the allocation of fuels and




emissions by CAASE5 was done on a county-by-county basis.  The grid squares




assigned to a county were the only grid squares used when processing that




county.  This procedure resulted in some of the population and housing counts




not being used after the grid square network had been constructed.  The




apportioning factor program (CAASE4) read a census enumeration district record




and searched the array of grid squares assigned to the county to determine the




grid square containing the enumeration district's location coordinates.  When




the grid square was found, the population and housing counts were added to the




sums for that grid square.  In some cases, no grid square was found that

-------
contained the enumeration district's coordinates because the grid square




containing them had been subjectively assigned to another county.  (Population




and area were used along with the location of county boundaries when a grid




square was assigned to a county.)




     Although the apportioning factor program (CAASE4) permitted the user to




input subjectively derived weighting factors to modify the objective ones




calculated by the program, it still involved a large amount of data




preparation time.  An entry had to be prepared for each grid-square-source-




category combination that the user wanted overridden.




     The early CAASE method did not contain a technique for including




projected population changes directly.




     Since the earlier CAASE method was developed, a computerized data base*




has been made available that includes the geographic coordinates of straight




line segments approximating the county boundaries for all counties in the




contiguous United States.  This data base made it possible to objectively




determine the location of a grid square in relation to a county.  For




instance, is it entirely within one county or do county borders transect it,




and if it is located on a border or borders, what fraction of its area is




located in each county?




     The new CAASE methods and algorithms described in this manual incorporate




the optional projection of population and housing count data.  The new




algorithms also include the objective (automatic) computer gridding of the




study area including the assignment of population and housing counts to grid




squares from each county census in proportion to the area of the grid square
* U.S. Bureau of the Census, DIME County Outline File (DIMECO).

-------
within each county.  Since a proximal mapping technique is used (see Section




3), housing and population are assigned to all grid squares in the resulting




grid system; i.e., there are no "empty" squares.




     In the earlier CAASE method, census data was plotted by CAASE2 to assist




in the manual development of the grid square network.  The new CAASE2 program




uses mathematical techniques to automatically develop the grid square network.




The earlier version of the CAASE3 program used a line drawing plotter to draw




the grid square network.  All line drawing plotter functions have been




incorporated within the revised CAASE3 program which is optional.   CAASE3




will now optionally plot the census data and the county boundaries in addition




to drawing the grid.




1.2 Purpose




     Emissions inventory data for all designated primary pollutants are




collected for the entire United States..  These data are archived by the




agencies compiling the inventory and are also sent to the Environmental




Protection Agency (EPA) for inclusion in the National Emissions Data System




(NEDS).  For dispersion modeling, the emissions inventory data must be in a




suitable format for the model selected..  Atmospheric dispersion models




(computer programs) are used for displaying air quality, evaluating state




implementation plans (SIPs), and Air Quality Maintenance Area (AQMA) planning




and analysis.  Key atmospheric dispersion models include the Air Quality




Display Model (AQDM),  the Implementation Planning Program (IPP), and the




Climatalogical Dispersion Model (CDM).




     Point source emissions present few difficulties with regard to formatting




the data for use with AQDM, IPP, or CDM.  Area source emissions, however,




present problems.  The smallest geographic unit for which accurate primary




data (e.g., annual residential fuel consumption)  are available is usually the




county.  Such data must be disaggregated and appropriately allocated (as

-------
emissions) to smaller areas to provide an adequately detailed input to

dispersion models*

     The CAASE programs (CAASEl through CAASE5), with associated subroutines

and data bases, provide an objective method for the selection of a set of

non-uniform sized grid squares and the subsequent allocation of county-level

data*

     The automatic gridding features of the revised CAASE method use objective

factors of population density, housing density, and political (county)

geographic boundaries for selecting a grid-square network.

     The revised CAASE method described in this manual provides for the

optional manipulation of the Bureau of the Census data for projected changes

in population and housing since the last census count (and into the future).

The CAASE user can describe a population and/or housing change area by the

input of geographic location coordinates of a rectangle (of any size) and

growth coefficients, one for population counts and one for housing counts.

These coefficients are applied directly to any enumeration district centers

that are located within the rectangle.  A 0.8 coefficient would indicate a 20%

reduction whereas a 1.2 coefficient would indicate a 20% increase.  The user

can input up to 100 rectangles with associated coordinates and growth

coefficients.

     The CAASE user can optionally define up to 100 pseudo-enumeration

districts* and associated population and housing counts where development is

planned or has taken place since the last general census.
 xhis term is used herein in the context that the user inputs housing and
population counts and associated location data (coordinates, state and county
identification) for a place that is not the center of a true Bureau of the
Census enumeration district.  CAASE deals with these pseudo EDs as if they
were true EDs.

-------
     These two census manipulation features, when combined with a projection of




fuels used within a county, provide a valuable tool to the user in applying




simulation modeling to prepare or evaluate Air Quality Maintenance Plans.  Such




plans can span from the present time to up to ten (or more) years in the future.




1.3  The CAASE Method




     CAASE is a computerized technique for processing county-level primary fuels




and emissions data from area source emission categories.  CAASE automatically




developes a set of non-uniform sized sub-county grid squares for a geographic




study area.  CAASE then allocates fuels data to the grid squares.  CAASE




calculates emission totals, by county, and allocates emissions to the grid




squares automatically, using either totally objective apportioning factors, or a




combination of objective and user-provided overriding weighting factors.  CAASE




produces tables of allocated fuels, allocated emissions for the five primary




pollutants (TSP, SC^* NOX, HC, and CO), and atmospheric dispersion model input




card images,  in a user-selected format, for one of three dispersion models.  The




tabular output includes data for every grid square, pollutant, and source




category combination.  Dispersion model input card formats produced by CAASE are




formatted for input to the Air Quality Display Model (AQDM), the Implementation




Planning Program (IPP), or the Climatalogical Dispersion Model (COM).




     CAASE consists of five major computer programs including various subroutines




called by these programs.  For convenience, the programs have been numbered




CAASEl through CAASE5.  The programs and their use are discussed in Sections 2




through 6; subroutines are discussed separately in Section 7.




     Figure 1 is a flowchart of the overall CAASE system.  Sections 2 through 6




contain system flowcharts for each of the major programs.  Detailed flowcharts




and source language listings for all CAAS2 programs and subroutines are included




in the Appendixes.

-------
                                                  CAASE1 PROGRAM*
                                       DETAIL LISTING
                                  -*4  OF EDITED  MED-X
                                       CENSUS FILE
                GRID
              FILE WITH
           I  DESCRIPTIVE \
           I   DATA FOR   f
           \ EACH GRID/
            \SOUARES
                                                  CAASE2 PROGRAM*
                                                                                      EDITED
                                                                                       x CENSUS
                                                                                   FILE WITH  UTM
                                                                                    COORDINAIES
                                                                                     APPENDED
               'PROGRAM
               I CONTROL
                SPECIFICATIONS
                                                  CAASE3 PROGRAM*
                                       COMPUTER DRAWN
                                       GRID OF THE STUDY
                                       AREA
               COMPUTER DRAWN
               PLOT OF THE
               ENUMERATION
               DISTRICT CENTROIDS
     ALLOCATED
   FUELS, EMIS-
   SIONS, & IPP,
   CDM.  OR AQDM
    CARD IMAGES
      FILE
                                                  CAASE4 PROGRAM*
                                       COMPUTER DRAWN
                                       PLOT OF COUNTY
                                       OUTLINE
                                     DETAIL LISTING OF
                                     APPORTIONING FACTORS
                                     FOR EACH GRID
                                     SQUARE
                                            ' FILE OF
                                            APPORTIONING
                                             FACTORS FOR
                                              EACH GRID
                                            SQUARE IN THE
                                             STUDY AREA
IPP OR CDM OR
AQDM CARD DECK
                    TABLES OF ALLOC.
                    FUELS, EMISSIONS,
                    & IPP, CDM,  OR
                    AQDM
                    IMAGES
CAASE5 PROGRAM*
                                  PROGRAM
                                  CONTROL
                                  SPECIFICATIONS
                                            NEDS  FUELS/
                                            THROUGHPUT DATA
                                            (AREA SOURCE CARDS
  *Error  messages are output when appropriate; also see output  examples for each program.
  	 Optional
                       FIGURE  1.    FLOWCHART  OF  THE  OVERALL  CAASE  SYSTEM

-------
     In addition to maps for the study area,  the CAASE user needs the following

data*

     A.  U.  S.  Bureau of the Census MED-X (Master Enumeration District Listing

         extended to include latitude and longitude coordinates ) tape.

     B.  U.  S.  Bureau of the Census DIME County Outline File (DIMECO). as

         reformatted by EPA.

     C.  Conversion tables (used by the GTGR  subroutine) to convert,  when

         necessary, Universal Transverse Mercator (UTM)  location coordinates

         from one UTM zone to another.  (A listing of these tables is included

         in  Appendix F.)

     D.  Area Source Data for the counties being processed.  The required format

         is  the same as for cards Al through  A5 on NEDS  Area Source Input Form

         [EPA (DUR) 219 3/72].

     E.  Current stationary source and mobile source emission factors for area

         source categories.

     F.  (Optional.) If population and housing data are to be projected (i.e.,

         modified), the user must provide growth factors and location coordi-

         nates  for new housing development areas.  (The CAASE method  for using

         these  data is described in detail in Section 2, CAASE1 Program.)

     G.  (Optional.)  The user can optionally read in a set of sub-county grid

         squares developed independently of CAASE or developed during an earlier

         CAASE  computer run.  (The procedures for formatting and inputting a

         user-supplied set of grid squares are described in Section 3, CAASE2

         Program.)
 xhese coordinates are for the centroid of the enumeration district,  the area of
 the enumeration district is not available on this tape.
                                       10

-------
     H.  (Optional.)  The user can optionally override any of the sub-county




         apportioning factors calculated by CAASE.  These overriding weighting




         factors are input on cards.  (Section 8 discusses procedures to follow




         for the assignment of overriding weighting factors; Section 5 details




         their input formats and their position in the card input stream.)




     The following paragraphs present an overview of the functions performed by




each of the CAASE programs.




     The CAASEl program processes the census data.  State and county selector




cards are used to select a subset of the census data for the geographic area




being processed.




     The user can optionally define areas of population and housing growth.




Each growth area is described by the lower left hand coordinates and the side




lengths of a rectangle.  A growth factor coefficient for housing contained in




the rectangle and also a growth factor coefficient for population are provided




by the user.  Any census enumeration district centroids located within a growth




rectangle will have the associated coefficients applied.  For example, a housing




count coefficient of 1.25 would represent a 25% increase in housing count since




the date of the housing count included on the MED-X tape.




     The program also permits the user to include pseudo-enumeration districts




for more localized growth areas.  For CAASE purposes, a pseudo-enumeration




district is defined herein as user-provided inputs of housing and population




counts and associated location data (coordinates, state and county identifi-




cation) for a place that is not the center of a true Bureau of the Census




enumeration district.  A new housing development, for example, could be treated




as a pseudo-enumeration district.




     CAASEl flags each enumeration district record as being unmodified, growth




factor applied, or a pseudo-enumeration district.  These flags are later used by




CAASE3 for plotting symbol selection if the data are to be plotted.





                                       11

-------
     CAASEl also converts the latitude and longitude coordinates of each




selected enumeration district (from the MED-X tape) to UTM coordinates.  If the




study area includes data from more than one UTM zone,* CAASEl converts the UTM




coordinates to the primary zone selected by the user.




     CAASE2 is the automatic gridding program.  It computes a system of grid




squares over a collection of contiguous counties making up the study area.  The




grid squares are not necessarily of uniform size but are selected such that each




grid square contains approximately the same number of people.  Population and




housing contained in each grid square is given by the integral of the entire




population and housing density surfaces that are contained in the grid square.




     For those grid squares that contain area from more than one county, the




grid square is assigned to each county that contains a portion of the area of




the grid square.  Each of the grid squares containing area from more than one




county are processed so that a unique sequential identification number,




contained area, population, housing, and the state and county FIPS numbers are




assigned for each of the counties; for example, a grid square containing area




from three counties would be output by CAASE2 as three grid squares where the




coordinates of the lower left hand corner of the grid squares and their side




lengths would be common - all other attributes would have different numerical




values.




     The CAASE2 program permits the user the option to input a grid square




network.  These user-supplied grid squares are then assigned population and




housing counts from the CAASE2 population and housing density surfaces.  These




grid squares may have been developed independently of CAASE.  A more obvious




use of the user-supplied grid option is when several CAASE runs are being made
 tach UTM zone spans six degrees of longitude in the east-west direction.
                                       12

-------
for an Air Quality Maintenance Area plan spanning several years.  If a grid




square network had been developed by CAASE2 with "base-year" census data, then




there are advantages in using the same grid square network for all years in




the study.  The CAASE user can project the census data to subsequent years




using CAASE1 options, and CAASE2 will assign housing and population counts to




a user-provided grid square network.  Conversely, if census data is projected




using CAASE1 options and a user-supplied grid is not input to CAASE2, the grid




square network will probably be redefined based on the projected population




and housing density surfaces.




     CAASE2 optionally outputs a subset of the county outline file in the same




format as the input county outline file for efficiency in future runs.  CAASE2




also optionally outputs a subset of the county outline file in a format




suitable for line drawing plotting using the CAASE3 program.




     The CAASE2 computed grid square network is used directly as input by the




CAASE4 apportioning factor assignment program.  It is also used by the




optional CAASE3 program for plotting a scaled grid square network with a line




drawing plotter, e.g., a CALCOMP plotter.




     The CAASE3 program produces a scaled off-line plotter display of the grid




square network output from CAASE2.  It will also optionally draw outlines of




the county(ies) and/or plot a symbol at the geographic center of each census




enumeration district.




     The use of CAASE3 is optional but is highly recommended if the user has




plotter facilities available.  Plotting scale is user-controlled with




1:250,000 having been used in applications thus far.  This scale is




convenient for using the CAASE3 generated plot as a direct overlay on USGS




maps of the study area.




     The CAASE4 program calculates apportioning factors for each area source




emissions category for each grid square in the study area.  (The factors are






                                       13

-------
used by CAASE5 which does the apportioning.)  The calculated apportioning




factors are the same for both the fuels (throughput) and the emissions.  For




example, housing counts for each grid square are used to calculate the




apportioning factor for both distillate oil marketed for use as residential




fuel and the emissions produced by its combustion.




     CAASE4 uses census based data and grid square size to calculate appor-




tioning factors for each area source emissions category and grid square




combination*  This is a totally objective technique that the user may




optionally modify.  CAASE4 will use overriding factors at the user's option.




Most of the area source categories can be apportioned effectively by CAASE4




without user intervention.  For a few categories, the user will probably have




access to data that is not directly available to CAASE, for example, the




locations of airports, waterways, and railroads; for these categories, the




user can prepare and input overriding factors.




     A detailed description of the CAASE4 method for calculating apportioning




factors (with or without user assistance) is included in Sections 5 and 8 of




this manual.  It is important for the CAASE user to fully understand a basic




concept in the calculation of apportioning factors.  All of the apportioning




factors output from CAASE4 are "weighted apportioning factors."  Each one is




the product of an objective apportioning factor - for example, grid square




contained population - and a weighting factor.  The weighting factor is 1.0




unless overridden by the user.  The CAASE user does not replace the objective




apportioning factors when he uses the overriding option; he modifies the 1.0




(default) weighting factor coefficients of the objective apportioning




factors.




     The CAASE5 program performs the functions of calculating the emissions




and allocating fuels and emissions to each grid square and source category




combination.






                                       14

-------
     CAASE5 reads area source fuels (throughput) data for each county in the




study area in the same format as the first five cards (Al through A5) from the




NEDS Area Source Input Form [EPA (DUR) 219, 3/72].




     Current area source emission factors are input by the user.  The factors




can be the national emissions factors published by EPA or those developed by




state or local agencies.  Emission factors for highway motor vehicles are




input directly; those for stationary sources and off-highway mobile sources




are scaled for input.  The scaling of the emission factor takes into account




the scaling of the fuels data and units conversion.  (A detailed discussion of




how to provide emission factors to CAASE5 and an example of a complete input




set are included in Section 6.)




     CAASE5 uses the fuels (throughput) totals and the emission factors to




calculate county-total emissions in the same way as the NEDS programs.




     The county totals for fuels and emissions are allocated to each grid




square and source category combination using the apportioning factors




calculated by CAASE4.  The apportioning factor file output from the CAASE4




program is used as direct input to CAASE5.




     CAASE5 completely processes one county in the study area before




proceeding to the next county.




     For each county, CAASE5 produces the following output:




     A.  Tables of allocated fuels for each grid square and source category




         combination.




     B.  Tables of emission totals for the county for each pollutant and




         source category combination.




     C.  Tables of allocated emissions for each grid square, pollutant, and




         source category combination.




     D.  The county total emissions for each pollutant, i.e., the sum of all




         area source categories.





                                       15

-------
     E.  An atmospheric dispersion model area source input card for each grid




         square.  The required units, scaling, and format for one of three




         models (IPP, AQDM, or COM) is selected by the user with an input




         variable.




     F.  A formatted tape file containing the above output data elements.




         (This is not a "print tape"; It is provided as a computer readable




         data base for those users who may want to process CAASE output in




         ways other than dispersion modeling.  A "print tape" can also be




         produced easily by changing the definition of the printer in the Job




         Control Language (JCL) stream..)




     The potential CAASE user may decide that CAASE would be helpful for




allocating fuels and emissions for most: of the source categories, but for one




or more of the source categories, CAASE will not provide appropriate




allocations.  If also, the use of overriding weighting factors will not yield




desired results, then there is another way to let CAASE do most of the work.




This can be done by manipulating input data to either CAASE4 or CAASE5.  In




running CAASE4, the user can select a source category to be overridden,




initialize all grid squares to zero, arid then simply not assign a non-zero




value to any of the grid squares for the selected source category.  CAASE5




will, therefore, have zero apportioning factors for the source category and




will not allocate fuels or calculated emissions.  The user can also let CAASE4




routinely calculate apportioning factors for the selected source category.




The user can then set the fuels (throughput) total for the selected source




category to zero on the NEDS area source input card when CAASE5 is run; the




result is that CAASE5 has zero fuels and emissions to allocate for the source




category.  Any source category fuels arid emissions not allocated to grid




squares by CAASE could then be allocated manually.  For dispersion modeling,
                                       16

-------
any manually allocated emissions would have to be added to the totals output




by CAASE5 on the dispersion model input cards.
                                       17

-------
18

-------
2.0  CAASE1 PROGRAM




2.1  Program Description




     This program processes the census data.  It performs several functions:  the




selection of a data subfile, the conversion of the geographic coordinates of  the




center of area of each census enumeration district (ED) from latitude and




longitude to the Universal Transverse Mercator (UTM)  northing and easting




system, the optional application of housing and population growth factors, and




the optional introduction of pseudo (new) enumeration districts with projected




housing and population counts.  In those cases where the study area includes




data from two UTM zones, one of the zones is designated "primary" on an input




card; the UTM coordinates are then converted when necessary to the primary zone.




Subsequent CAASE processing of the census data, therefore, uses coordinates




expressed relative to only the primary UTM zone.




     A description of input information is included in the next subsection.




However, the introduction of census growth factors and/or pseudo-enumeration




districts, and the selection of a primary UTM zone for those study areas




spanning two UTM zones is critical and requires a detailed discussion.




     The concept of applying growth coefficients (increase or decrease) over  a




general area is quite different from the concept of adding a pseudo-enumeration




district.  In the case of growth coefficients, a rectangle is defined.  Any




enumeration district having its center of area located within the rectangle will




have the user-supplied coefficients of housing and population growth applied  to




it.  A rectangle of growth is defined to CAASE1 by the UTM coordinates of its




lower left hand corner and its side lengths.  A growth rectangle can be of any




size, representing a subsection of the study area or even spanning the entire




study area.  It would most probably be used in a case where there was general




growth in an area.






                                       19

-------
     Conversely, the concept of a pseudo-enumeration district is associated with




a more localized growth area.  The input of a pseudo-enumeration district could




be used, for example, to include a new residential housing development either




constructed since the last general census count or planned to be developed prior




to the projected study year.




     In the optional introduction of census data modifications, all location




coordinates are expressed in kilometers in the UTM system.  (Latitude and




longitude coordinates will yield erroneous and unpredictable results.) Because




the maps being used would have true UTM zone numbers and coordinates, CAASE1 is




programmed to receive true coordinates and zone numbers as user-furnished input.




The conversion of coordinates to the primary zone, when necessary, is performed




automatically by the program.  In those cases where a rectangle of growth




straddles a zone boundary, the user should input the coordinates and zone number




of the lower left hand corner of the rectangle and the X and Y side lengths in




kilometers.  One corner and the side lengths are used because a true rectangle




(four right angle corners) would not b« developed if all four corners were not




expressed relative to the same UTM zone*  The UTM northing (Y) axis in one zone




is not parallel to one in a neighboring zone.




     The user is cautioned that when applying growth coefficients, a coefficient




for both population and housing is required.  The CAASE1 program expects two




coefficients for each rectangle of growth.  If only the housing count or only




the population count is to be modified, the user must input a coefficient of 1.0




for the count that is not to be modified.  If the coefficient of growth for a




rectangle is left blank for either housing or population, the CAASEl program




will interpret the coefficient as being equal to zero and will eliminate the




count for enumeration districts located within the rectangle.  By using a growth




coefficient of zero, CAASEl does facilitate the removal of a housing area, for




example, through urban renewal projects.






                                       20

-------
     In the case of adding pseudo-enumeration districts to the MED-X census




data, all parameters that are used by the CAASE2 program must be included; an




output record similar to an original MED-X input record is written.  All




parameters needed by CAASE2 appear in the same positions in each record as




though they were actual enumeration districts.  The record written for each




pseudo-enumeration district has blanks for those data fields of no interest to




the CAASE method, for example, congressional district codes.  For each




pseudo-enumeration district, the required information includes: state and




county FIPS codes, UTM zone number, X and Y (easting and northing) UTM




coordinates of the center of area, housing count, and population count.




Because of the order of processing in CAASEl, pseudo-enumeration districts do




not have coefficients of growth applied to them even if they are located




inside a growth rectangle.




     The MED-X census data is used directly as input to CAASEl.  The MED-X




data organization is such that all data for each state appears as a separate




file.  Twenty-six (26) states and the District of Columbia are on one tape




reel (volume) and twenty-four (24) states are on the second tape reel.  Within




each file, all records for one county are grouped together followed by the




records for the next county and so forth.  The order of counties within each




state is alphabetical by county name.  Because of program coding, the selected




states must be requested by FIPS code in ascending order; the requested




counties within each state also must be in FIPS code ascending order.  (EPA




and other users have obtained MED-X data tapes from DUALabs. )




     In designating a primary UTM zone for a study area that includes data




from two neighboring UTM zones, care must be taken.  In selecting the primary
*National Data Use and Access Laboratories, Arlington, Virginia.
                                       21

-------
UTM zone, the user would normally select the zone containing the highest




percentage of included area of the total study area.   There is some distortion




introduced in converting location coordinates from one UTM zone to another.




This can be minimized by selecting the primary zone causing the least amount




of zone-to-zone conversion.  These considerations notwithstanding, the user  is




cautioned that decisions made in using CAASE1 can yield undesirable results  in




other CAASE programs.  For example, in CAASE5,  the input cards for the




dispersion models are produced.  In the case of the Implementation Planning




Program (IPP), the "X" location coordinates cannot exceed 999.9 km because of




the field width; also, no provision is made for a signed value.  The user,




therefore, should designate a primary zone that will not cause "pseudo"




negative UTM coordinates or easting (X) coordinates greater than 999.9 km in




the conversion process.




     The program uses the subroutine GTGR (grid-to-grid) for zone-to-zone




conversion of coordinates.  GTGR uses an 8 by 8 by 61 set of tables for the




conversion algorithm.  These tables are stored on a Fortran-defined direct




access file.  These tables and a simple Fortran program for creating a direct




access disk file for input to the GTGR subroutine are included in Appendix F.




     CAASEl uses the CED009 subroutine for converting coordinates from




geographic latitude and longitude to the UTM easting  and northing system.




     These subroutines are described in Section 7.  Logical flowcharts and




source language listings for CAASEl and its subroutines are included in




Appendix A.




     Figure 2 is a system flowchart of the CAASEl program.




2.2  Input Information




     A description of the punched card variables input in the runstream appears




in Table 1.  The card input includes:  the name of the study area, the number of






                                       22

-------
   GTGR
  TABLES
PROJECTED
GROWTH
FACTOR
CARDS
PSEUDO-
ENUMERATION
DISTRICT CARDS
                                PROGRAM CONTROL
                                SPECIFICATIONS
                                       i
   PROGRAM CAASE1

SELECTS APPROPRIATE
RECORDS FROM THE MED-X
CENSUS FILES AND CON-
VERTS COORDINATES FROM
LONG. & LAT. TO UTM
COORDINATES OF PRIMARY
ZONE, OPTIONALLY ALLOWS
THE USER TO PROJECT
POPULATION AND HOUSING
GROWTH AND ADD PSEUDO-
ENUMERATION DISTRICTS
(EDs)
                                                                       EDITED
                                                                    MED-X CENSUS
                                                                     FILE WITH
                                                                  lUTM COORDINATES/
                                                                      APPENDED
                                     DETAIL LISTING
                                     OF EDITED MED-X
                                     FILE
        Optional
                  FIGURE 2.  SYSTEM FLOWCHART OF CAASE1 PROGRAM
                                        23

-------
                                    TABLE  1.   INPUT CARD LAYOUT, CAASEl
Card Type

STUDY AREA CARD
GROWTH/PSEUDO ED OPTION
  CARD
PROJECTED GROWTH CARDS
  (MAXIMUM =100)
Card
1
5
25
1
6
1
11
21
31
41
46
Columns
- 4
- 24
- 28
- 5
- 10
- 10
- 20
- 30
- 40
- 45
- 55
Format
14
5A4
14
15
15
15
F10.0
F10.0
F10.0
15
F10. 0
Variable Name
NSTAT
AQCR
KZONE
IGROTH
I EDS
X
Y
XL
YL
JZONE
HCOEF
GROWTH DELIMITER CARD
                            56 - 65
1 - 80
              F10.0
SOX
               PCOEF
     Prescription

Number of states in selected
study area

Name of selected study area

Primary UTM zone of selected
study area (required even if
entire study area is located in
one zone)

Projected growth factor option
switch (non-zero for option)

Pseudo ED's option switch
(non-zero for option)

X-coordinate (UTM easting)*

Y-coordinate (UTM northing)*

Length of X axis in kilometers

Length of Y axis in kilometers

UTM zone*

Coefficient for calculating
housing count growth

Coefficient for calculating
population count growth

Blank - signals end of projected
growth factor cards
 Of lower left hand corner of rectangle,  true  zone number, CAASEl will convert to primary zone if necessary.

-------
                                    TABLE 1.  INPUT CARD LAYOUT, CAASEl (CONTINUED)
NJ
Ln
      Card Type

      PSEUDO ED CARDS
         (MAXIMUM  =100)
                          Card Columns
Format
Variable Name
     Description
PSEUDO ED DELIMITER
  CARD

STATE CARD
      COUNTY CARDS
1
11
21
26
31
36
46
1
1
5
25
- 10
- 20
- 25
- 30
- 35
- 45
- 55
- 80
- 4
- 24
- 28
F10.0
F10.0
15
15
15
F10.0
F10.0
SOX
14
5A4
14
XX
YY
KZONE
ISTAT
KOUNTY
HCOUNT
PCOUNT
—
NCNTY
STATE
KSTATE
X coordinate (UTM easting)
Y coordinate (UTM northing)
UTM zone*
FIPS state code
FIPS county code
Housing count (unsealed)
Population count (unsealed)
Blank - signals end of pseud o ED
cards
Number of counties in selected
state (maximum = 30)
Name of selected state
FIPS state code number of
                            1 -  4
                                  5-24
14
                                            5A4
  ICNTY
               CNTY
selected state

FIPS county code number of
selected county

Name of selected county
       *True  zone number, CAASEl will convert to primary zone if necessary.

-------
states in the study area, the name of each state, the number of selected




counties in each of the selected states, the Federal (FIPS) county and state




code numbers, and the name of each county.  Also included is the primary UTM




zone number and program control variables indicating whether areas (rectangles)




of growth and/or pseudo-enumeration districts are to be input.




     Figure 3 shows the input order and the deck configuration for the various




card types.




     The MED-X census data tapes are read directly by CAASEl.  The record layout




for the MED-X tapes appears in Table 2.  As discussed above, each state appears




as a separate file and the total data set requires two reels of tape.  Each




state requires a set of Job Control Language (JCL) data definition (DD) cards.




An example is included in Section 2.5




     Conversion tables are used for converting UTM coordinates to the primary




UTM zone when necessary.  These tables must be written to a Fortran-defined




direct access file before using the CAASEl program.  CAASEl automatically reads




the tables when a zone-to-zone conversion is necessary.




2.3  Output Information




     Printed output from the program includes the names of the study area,




state(s), and county(ies) being processed.  Also printed are the input variables




describing all rectangles of growth, pseudo-enumeration districts, and the total




number of each (optionally input) for the entire study area*  When all records




for a county of interest have been processed, the county name, its number, and




the number of records written on magnetic tape are printed.  Figure 4 is an




example of printed output from CAASEl.  For each county, the first 25 records of




the edited MED-X data are printed.  These records are not shown in Figure 4.




The number 25 was arbitrarily chosen when the CAASEl source code was written;




the user can easily change the number if desired.
                                       26

-------
                    REPEATED FOR EACH
                      STATE IN THE
                       STUDY AREA
REPEATED FOR
EACH COUNTY
IN THE STATE
                                                                      COUNTY  CARD(S)
                                                               STATE  CARD
                                                         BLANK
                                              PSEUDO ED
                                                CARDS
                                             (MAXIMUM=100)
                                        BLANK
                             PROJECTED
                            GROWTH CARDS
                            (MAXIMUM=100)
                     GROWTH/
                    PSEUDO ED
                   OPTION CARD
            STUDY AREA
               CARD
 JOB CARD, JCL
AND OBJECT DECK
            OPTIONAL,
          1 REQUIRED
          / ONLY IF
            IGROTH ^ 0
                                                         ;
                              OPTIONAL,
                              REQUIRED
                              ONLY IF
                              IEDS ± 0
             FIGURE 3.  INPUT DECK CONFIGURATION FOR CAASE1 PROGRAM
                                       27

-------
                TABLE 2.   RECORD LAYOUT FOR MED-X CENSUS FILE
  Position

  1 -   4

  5 -   7


  8-93


 94 - 100

101 - 108

109 - 118



119 - 128
Format

A4

13


21A4.A2


F7.0

F8.0

F10.4



F10.4
Variable Name

  XDATA

  JCNTY


  XDATA


  XHOUS

  XPOP

  XLONG



  XLAT
       Definition

1970 and 1960 state codes

Federal standard (FIPS) county
code

Not applicable to CAASE
programs

Housing count

Population count

Longitude, in degrees, of
centroid of enumeration
district (ED)*

Latitude, in degrees, of
centroid of enumeration
district (ED)*
 If  longitude and latitude are both zeroes,  the record is  a summary count  for
 several enumeration districts (CAASE1  therefore skips the record).
                                      28

-------
CAASE1

STUDY AREA IS PARKERSBURG-MARIETTA
     NO. OF STATES INCLUDED IS 2
PRIMARY UTM ZONE IS 17
               9ATHENS

             105MEIGS

             115MORGAN

             16 WASHINGTON

     THE STATE OF OHIO              HAS


     THE STATE OF OHIO          CODE NO.
       COUNTY NAME

          ATHENS                    9

          MEIGS                   105

          MORGAN                  115

          WASHINGTON              167


             35JACKSON

             73PLEASANTS

             95TYLER

            103WETZEL

            107WOOD

     THE STATE OF WEST VIRGINIA     HAS
    4 COUNTY(IES)


       NO. OF RECORDS
       WRITTEN ON TAPE

              55

              28

              21

              64
    5 COUNTY (IES)
              FIGURE 4.  EXAMPLE OF PRINTED OUTPUT FROM CAASEl
                                       29

-------
THE STATE OF WEST VIRGINIA          CODE NO.           NO OF RECORDS
       COUNTY NAME                                    WRITTEN ON TAPE

         JACKSON                       35                    24

         PLEASANTS                     73                    12

         TYLER                         95                    15

         WETZEL                       103                    28

         WOOD                         107                   131


GOOD FINISH
          FIGURE 4.  EXAMPLE OF PRINTED OUTPUT FROM CAASE1 (CONT.)
                                       30

-------
     A magnetic tape is written where the first records for each county are the




optional pseudo-enumeration districts.  In addition to the data fields read from




the MED-X tape, each record on the output tape (i.e., the edited MED-X data)




includes the primary UTM zone number, UTM easting and northing coordinates, and




a code number.  The code number indicates whether the housing and population




counts have been modified for the enumeration district or if it identifies a




pseudo-enumeration district.  A record layout for the edited MED-X tape appears




in Table 3.




     No growth areas or pseudo-enumeration districts were introduced to CAASE1




in the Parkersburg-Marietta AQCR study area used as an example in this manual.




     Self-explanatory error messages are printed when appropriate, and, if the




error is fatal, the program operation is terminated.




2.4  Job Control Language (JCL) and Deck Setup




     An example of a deck setup configuration is illustrated in Figure 3.   Using




the Parkersburg-Marietta AQCR (#179) as an example study area, the associated




JCL and input data cards are illustrated in Figure 5 and describe the following:




     A.  The program is in object deck form.




     B.  The edited MED-X census data file will be written on tape as Fortran




         unit number 4.  It will be labeled "AQCR179.EDITED.MEDX. CENSUS".   The




         volume and serial name is "AAAAAA".




     C.  The grid-to-grid conversion tables file is on disk as Fortran unit




         number 5.  It is labeled "GRDTB66".  The volume and serial name is




         "BBBBBB".




     D.  The MED-X census data for Ohio is on tape as Fortran unit number 6 and




         physical file number 21.  It is labeled "OHIO".  The volume and serial




         name is "CCCCCC".
                                       31

-------
                TABLE 3.   RECORD  LAYOUT  FOR  EDITED MED-X FILE
  Position

  1 -   4

  5 -   8


  9-94

 95 - 101

102 - 109

110 - 134


135 - 159


160 - 164

165 - 179


180 - 194


195 - 198
Format

A4

14


21A4.A2

F7.0

F8. 0

D25.16


D25.16


15

F15.2


F15. 2


14
Variable Name

   XDATA

   JCNTY


   XDATA

   XHOUS

   XPOP

   XLONG


   XLAT


   KZONE

   XOUT


   YOUT


   KODE
       Definition

1970 and 1960 state code

Federal standard (FIPS) county
code

Not applicable to CAASE programs

Housing count

Population count

Longitude, in degrees of centroid
of enumeration district (ED)

Latitude, in degrees of centroid
of enumeration district (ED)

Primary UTM zone

UTM coordinate (easting) for this
enumeration district

UTM coordinate (northing) for
this enumeration district

Describes type of record, where:

1  Denotes housing and population
   counts unchanged

2  Denotes modification of
   housing and/or population
   count in record by a growth
   coefficient
                                             3  Denotes record is a pseudo-
                                               enumeration district
 A pseudo-enumeration district  is  one  optionally provided by the CAASE user to
 represent housing and population  growth  since  the  census year represented by
 the MED-X input  data.
                                      32

-------
//CAASE1 JOB RTI.C44.P01303,'BURT, PKB-MAR',MSGLEVEL=1 ,PRTY=0,T=5
// EXEC FTGLGD
//L.SYSIN DD *
                         —PROGRAM OBJECT DECK(S)—
/*
//*  FT04 IS THE OUTPUT OF CAASEl CONTAINING THE EDITED SUBSET OF
//*  THE CENSUS DATA FROM THE MED-X TAPE PLUS ANY USER-DEFINED
//*  CHANGES, ALL WITH UTM COORDINATES APPENDED.  USED BY
//*  CAASE2 AND (OPTIONALLY) CAASE3.
//G.FT04F001 DD DSNAME=AQCRl79.EDITED.MEDX.CENSUS,UNIT =TAPE,
//             LABEL-(01,SL),DISP-(NEW,KEEP),
//             DCB- (RECFM=FB, BLKSIZE-2 970,LRECL=1 98,DEN-2), RING=IN,
//             VOLUME=SER*AAAAAA
//*
//*  GRID-TO-GRID CONVERSION TABLES, BASED ON THE CLARKE
//*  1866 SPHEROID.  MUST BE ON DASD, AS CREATED BY
//*  PROGRAM AND TABLES INCLUDED IN APPENDIX F.
//G.FT05F001 DD DSNAME«<;RDTB66,UNIT^)ISK,
//             DCB=(RECFM-FB,BLKSIZE-512,LRECL-512),SPACE=(TRK, (5, 1)),
//             DISP-(OLD, KEEP), VOLUME-SER^BBBBB
//*
//*  FOLLOWING ARE THE DD CARDS FOR THE MED-X CENSUS
//*  DATA FILES FOR THE STATE(S) IN THE STUDY AREA.  NOTE
//*  THAT EACH FILE MUST HAVE A SEPARATE FORTRAN UNIT
//*  NUMBER BEGINNING WITH FT06F001 (CONCATENATION IS NOT ALLOWED),
//*  AND THAT THE NUMBERS MUST BE IN ASCENDING SEQUENCE TO MATCH
//*  THE CONTROL CARD SEQUENCE.
//G.FT06F001 DD DSNAMEOHIO, UNIT «T APE, LABEL-(21, SL),DISP-(OLD, KEEP),
//             DCB= (RECFM=FB ,BLKS LZE-1980, LRECL=1 32, DEN=2),
//             VOLUME"SER*CCCCCC
//G.FT07F001 DD DSNAME*WVA,UNIT-TAPE,LABEL=(24, SL),DISP-(OLD,KEEP),
//             DCB=(RECFM»FB,BLKSIZE-1980,LRECL-132,DEN-2),
//             VOLUME-SER*:CCCCC
//G.SYSIN DD *
   2PARKERSBURG-MARIETTA  17
    0    0
   40HIO
 009ATHENS
 105MEIGS
 115MORGAN
 16 WASHINGTON
   5WEST VIRGINIA
 035JACKSON
 073PLEASANTS
 095TYLER
 103WETZEL
 107WOOD
/*
               FIGURE 5.  JCL AND INPUT DATA CARDS FOR CAASEl
                                        33

-------
     E.  The MED-X census data for West Virginia is on tape as Fortran unit




         number 7 and physical file number 24.   It is labeled "WVA".  The




         volume and serial name is "CCCCCC".  (Ohio and West Virginia are on




         the same tape reel.  For one state, the Fortran unit number expected




         is 6; the unit number is increased by  1 for each additional state.)




     F.  The state and county select cards are  on the installation dependent




         standard card input device.  The study area includes data from two




         states and the primary UTM zone is 17.  Four Ohio counties and five




         West Virginia counties are to be selected.  No growth area or pseudo-




         enumeration district cards are to be read.




     G.  The printer is the installation dependent standard device number.




     [At the installation where CAASE was developed, the catalogued procedure




"FTGLGD" that will be executed (Fortran G, Link-Edit and Go - object decks are




to be input) assigns Fortran I/O device numbers 1, 2, and 3 to the card




reader, card punch, and printer respectively.]




2.5  Warnings and Limitations




     For study areas including data from two UTM zones, the Importance of




selecting the primary zone was discussed above.  If the user simply makes an




error on assigning the primary UTM zone number, e.g., a keypunch error (or




omission), the results will be unpredictable and erroneous.




     CAASE1 dimensions have been written to accept up to 100 rectangles of




growth and up to 100 pseudo-enumeration districts; this should prove adequate,




but the user can easily increase the dimensions if necessary.
                                       34

-------
3.0  CAASE2 PROGRAM




3.1  Program Description




     CAASE2 computes a system of grid squares over a user-defined collection




of counties (the study area) on the basis of the population contained within




the study area.  The objective is to produce a grid system such that each grid




square contains approximately the same number of people.   This means, in




application, that regions of high population density are  partitioned into a




large number of small squares and regions of low population density are




partitioned into a small number of large squares.  The population contained in




any grid square is given by the integral of that portion  of the entire




population density surface that is contained in the square.  The partition is




such that the population is approximately the same from square to square.




     In developing a grid system by hand, census tract maps showing the




populations and outlines of the various census tracts in  the study area are




used with transparent overlays on which the grid squares  are drawn.  (This




procedure is described in the EPA publication "Guide for  Compiling a




Comprehensive Emission Inventory," APTD 1135, pp. 7-5 through 7-10.)  The




population within a given census tract is assumed to be uniformly distributed.




The population in the fractional area of a census tract that falls within a




grid square is assigned to that grid square; therefore, the final total




population of a grid square is the sum of all such fractional contributions




from one or more census tracts.




     Unfortunately, data for the census tract boundaries  do not exist in




machine readable (computerized) form.  To have an automated gridding system,




it is necessary to approximate in some manner the outlines of the census




tracts.  CAASE2 employs the method of proximal map construction to estimate




the previously unknown census tract boundaries.  After the approximate
                                       35

-------
boundaries are established, the previous assumption of uniform population




distribution is made and grid squares are constructed on the resulting




population density distribution (surface).




     Several steps in CAASE2 leading to the construction of the grid square




system, deal with (1) the definition of the study area in terms of numerical




county outline data, (2) the creation of a proximal map and a population




density surface, and (3) the gridding procedure.  Ignoring the details of step




(1), and, assuming a defined study area of 1 km by 1 km unit cells, the




construction of the proximal map and the population density surface takes




place as follows.  Each unit cell has an assigned value of 1 km^ if it is




interior to the boundary, 0 km^ if it is exterior to the boundary, and a value




betweeen 0 and 1 km^ if it is on, or transected by, the boundary.  Essen-




tially, this is the operative definition of the study area.  Also, associated




with each cell are the census enumeration districts (ED's) whose centroid




coordinates fall within that cell.  There may be none, one, or more such ED's




for a cell.  Unit cells with one or more ED's assigned to them are called




control cells analagous to the cartographer's phraseology of control points




(data) in topographic map construction.  The proximal map is constructed by




assigning to each non-control cell the value of the control cell nearest it. A




random number decides ties.  Thus, for each control cell there is a collection




of non-control cells, namely those closer to it than to other control cells.




Collectively, these cells approximate the original census tract (at least down




to the resolution afforded by 1 km by 1 km grid cells).  The cell areas are




summed to obtain the total ED area.  The ED population divided by this area is




the population density, i.e., the population per square kilometer, throughout




the collection of cells.  Since all the cell sizes are 1 km^, the value of




population density assigned to each cell is simply the population in that
                                       36

-------
cell.  While the discussion has been limited to population,  the same applies




to housing and housing density.




     The above process is applied to every control cell.   Eventually, the




entire study area has values of population (and housing)  assigned to all unit




cells.  This set of values is the population density surface.




     The gridding procedure attempts to overlay grid squares on the proximal




map so that each square contains approximately the same population.  (The




population of any grid square is simply the sum of the populations of the unit




cells in that square.) Somewhere there is at least one unit  cell of maximum




population, and this unit cell will be the smallest grid  square.  This maximum




value of population is approximately the population which all other squares




are to contain in the partitioning.  Thus, the grid system with the study area




centered within it is initially a set of squares of equal size that are




probably "too large." "Too large" a square means that the total population in




the square exceeds the maximum population previously mentioned.  The square is




then partitioned into 4 smaller squares (daughters) by dividing its side




length by 2.  The daughters are added to the list of squares in the system.




The daughters are then tested for being "too large." Any  time the "too large"




condition occurs, the square is partitioned down to the next smallest size,




until the partitioning reaches the unit cell size, if necessary.  If the "too




large" condition does not occur, inspection passes to the next square in the




list.  If there are no more squares in the list, the procedure is completed.




     The program uses four types of input data: (1) the edited census data




file for each county created by CAASEl, (2) a tape file of county boundary




coordinates, (3) punched cards specifying the control variables for the




counties processed, and (4) the direct access file used also in CAASEl for




converting county boundary coordinates from one UTM zone  to  another when




necessary.  Outputs include a subset file of the particular  county boundary
                                       37

-------
coordinates, various diagnostic and error messages as appropriate, and the




grid square file consisting of one record (punched card or card image) of




information for each grid square.




     CAASE2 uses several subroutines that are described in Section 7.  Logical




flowcharts and source language listings for CAASE2 and its subroutines are




included in Appendix B.




     Figure 6 is a system flowchart for the CAASE2 program.




3.2 Input Information




     A description and layout of the punched card input variables in the




runstrearn appears in Table 4.  Included are the name of the study area, the




number of states in the study area, the name of each state, the number of




counties in each state, the FIPS county and state code numbers, the name of




each county, and the primary UTM zone.  The input deck configuration is shown




in Figure 7.  The county outline input file is described in Table 5.  The




output tape of edited census data from CAASEl is directly used as input to




CAASE2.  The same direct access file used by the GTGR subroutine in CAASEl to




convert enumeration district coordinates from one UTM zone to another is




required in CAASE2 for GTGR conversion of county outline coordinates when




necessary.




     Punched card input to CAASE2 is identical to the Study Area, State, and




County card types for CAASEl (see Table 4) except for the variables NOUT3 and




NPLOT on the Study Area card.  A non-zero value for NOUT3 signifies that the




user wishes to have the coordinates of the outlines of the counties in the




study area written to output device NOUT3.  This is appropriate when the user




anticipates repeated processing of these outlines and needs to avoid possibly




long, time-consuming tape I/O of the total county outline file.  A non-zero




value for NPLOT signifies that the user wants a county outline file written




for input to CAASE3.  (NOUT3 and NPLOT are formatted differently.)
                                       38

-------
   EDITED
 MED-X CENSUS
  FILE WITH
 UTM COORDS.
    FENDED
    COUNTY
    OUTLINE
     FILE
USER PROVIDED
GRID SQUARES
                            PROGRAM CONTROL
                            SPECIFICATIONS
   PROGRAM CAASE2

CONSTRUCTS GRID
SQUARE SYSTEM BASED
ON EDITED MED-X
CENSUS DATA & COUNTY
OUTLINES DATA AND
MAKES POPULATION &
HOUSING ASSIGNMENTS
TO EACH GRID SQUARE
   GRID
 FILE WITH
DESCRIPTIVE
 DATA FOR
 .EACH GRID.
    .SQUARE
                                                                   SUBSET*
                                                                 OF  COUNTY
                                                                   OUTLINE
                                                                   FILE
                                         CAASE3+
                                         COUNTY
                                         OUTLINE
                                          FILE
	 = Optional

*Can be used to optimize any additional CAASE2 runs for same study area or
 portions of it.

+Needed only if CAASE3 with county outlines will be run.
               FIGURE 6.  SYSTEM FLOWCHART OF CAASE2 PROGRAM

                                     39

-------
                                   TABLE  4.  INPUT CARD LAYOUT, CAASE2
Card Type

STUDY AREA CARD
Card Columns

   1 -  4


   5-24

  25 - 28



  29 - 32
                             33 -  36
STATE CARD
COUNTY CARD
   1 -  4


   5-24

  25 - 28


   1 -  4


   5-24
Format

14


5A4

14



14
                 14
14


5A4

14


14


5A4
Variable Name

   NSTAT


   AQCR

   MTUZ



   NOUT3
                NPLOT
   NCNTY


   STATE

   ICODE


   IDCO


   CNTY
      Definition

Number of states in study area
(maximum = 10)

Name of study area

Primary UTM zone (required even if
entire study area is located in
one zone)

Tape device number to write county
outlines subset for future CAASE2
runs of same study area.  If zero,
no writing will occur; hence, no
tape is necessary*

Tape device number to write county
outlines for CAASE3 input.  If
zero, no writing will occur;
hence, no tape is necessary.

Number of counties in selected
state (maximum =15)

Name of selected state

FIPS state code number of selected
county

FIPS county code number of
selected county

Name of selected county
USER GRID CARDS
   [SEE THE GRID SQUARE RECORD FORMAT (COLUMNS 1-45 ONLY),  TABLE 6]

-------
                                                  ~7
                                  USER GRID  CARDS
                            COUNTY  CARD
                    STATE CARD
           STUDY AREA
              CARD
JOB CARD, JCL,
AND OBJECT DECK
         OPTIONAL, NEEDED
         ONLY IF THERE IS A
         USER-SUPPLIED GRID
REPEAT FOR
EACH COUNTY   _
TO BE PROCESSED
                      REPEAT FOR
                     >EACH STATE
                      TO BE PRO-
                      CESSED
        FIGURE  7.   INPUT  DECK CONFIGURATION FOR CAASE2  PROGRAM
                                    41

-------
              TABLE 5.   CAASE2 COUNTY OUTLINE FILE RECORD LAYOUT
                       (FORTRAN UNITS "NIN1," "NOUT3"*)
Variable
  ID
  IFE
  IFN
  ITE
  ITN
  MZONE
Format

  15

  12X

  15


  15


  2X

  15


  15


  12
Columns

 1 -  5

 6-17

18 - 22


23 - 27


28 - 29

30 - 34


35 - 39


40 - 41
       Comments

State-county code (FIPS)

Not used by CAASE

Starting node easting (UTM
coordinates, km)

Starting node northing (UTM
coordinates, km)

Not used by CAASE

Ending node easting (UTM
coordinates, km)

Ending node northing (UTM
coordinates, km)

UTM zone
*"NOUT3" contains a copy of "NIN1" for the study area counties  only.   "NOUT3"
 is created only if the variable NOUT3 is greater than zero  on  the "Study  Area"
 input card (see Table 4).
                                      42

-------
     If a user-provided grid is to be read in, the cards should be placed in

the card input stream immediately following the last of the county cards

described in Table 4 of this section.  The content and format of the user-

provided grid cards are identical* to the format of the punched card (or card

image) output records produced by CAASE2 and described in Table 6 of this

section.

3.3  Output Information

     Printed output from CAASE2 includes the names of the study area (the AQCR

name, for example), state(s) and county(ies); counts and/or totals of

population, housing, Census Enumeration Districts (ED's), and county outline

segments; computed county areas; a printer plotted map of each county showing

the boundary and interior region; identification of any ED's whose coordi-

nates place them outside their county of assignment; and a listing of the grid

square records that are produced as punched card output or as card image

records on other storage devices.  Figure 8 is an example of parts of a

printed output from CAASE2.

     The format of the card image output for the grid square file is given in

Table 6.  A description of the contained variables appears in Table 7.

     Two magnetic work tape output files are required.  Two other files are

optional.  The two required files are necessary as temporary data storage to

reduce computer core storage requirements.  The first optional file (NOUT3)

contains a subset of county outline coordinates that is pertinent to the study

area.  It is in the same format (see Table 5) as the input file.  This option

is provided for the user who anticipates running CAA.SE2 more than once.  The

second optional file (NPLOT) is created for use by CAASE3, if plotting the
 CAASE2 will assign housing and population counts; the user must provide the
remaining data for each grid square.
                                        43

-------
AIR QUALITY CONTROL REGION IS PARKERSBURG-MARIETTA




     NO. OF STATE(S) INCLUDED IS    2          PRIMARY UTM ZONE IS   17
     THE STATE OF OHIO




COUNTY ATHENS




COUNTY MEIGS




COUNTY MORGAN




COUNTY WASHINGTON
          HAS   4 COUNTIES IN THE STUDY AREA   39




HAS STATE-CNTY CODE(FIPS)   39009




HAS STATE-CNTY CODE(FIPS)   39105




HAS STATE-CNTY CODE(FIPS)   39115




HAS STATE-CNTY CODE(FIPS)   39167
     THE STATE OF WEST VIRGINIA
          HAS   5 COUNTIES IN THE STUDY AREA   54
COUNTY JACKSON

COUNTY PLEASANTS
COUNTY TYLER
COUNTY WETZEL
COUNTY WOOD
39009















388.5
399.6
390.7
389.6
388.5
391.4
390.3
435.3
436.8
437.4
430.5
430.0
428.5
HAS STATE-CNTY CODE(FIPS)
HAS STATE-CNTY CODE(FIPS)
HAS STATE-CNTY CODE(FIPS)
HAS STATE-CNTY CODE(FIPS)
HAS STATE-CNTY CODE(FIPS)
4338.0 437.4 4380.3
4370.8 390.7 4371.6
4371.6 389.6 4361.4
4361.4 388.5 4351.3
4351.3 391.4 4350.6
4350.6 390.3 4341.0
4341.0 435.3 4338.0
4338.0 436.8 4341.8
4341.8 437.4 4348.8
4348.8 430.5 4349.5
4349.5 430.0 4352.7
4352.7 428.5
4352.7 (ETC.)
54035
54073
54095
54103
54107













                             FIGURE 8.  EXAMPLE OF PRINTED OUTPUT FROM CAASE2

-------
      STATECODE  /  COUNTY CODE / COUNTY NAME
   4        59       167  WASHINGTON

TRACKER COMPUTES TOTAL AREA OF WASHINGTON          COUNTY  AS  t  0.1660E OU
            1111t1111122222222223333J333334«4444fl44«5555555555666666666677777777778ee88e888e9999999999
   123456769*123(156789*123456769*123456789*123456769*123456709*123456789*123456789*123456769*123456789*
136                                 ***
135                                 *I*
134                                 *!****
133                                 *IIII*
132                                 *IIII****
131                                 *HIIIII***     ****
130                                 *IIIIIIIII*«**  *II*
129             **********************IIIIIIIIIIII****II*
128             *IIIIIimiimmimiimiIIIimiIIII****«*****«*********
127
126
125
124
123             **IIIIIIIIII11IIII IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII*
122             **imimiimmmimiimmiiimmmiiimimii"*
121             Miiiimmiimmmiimmimimmmimmmi**
120    ***       *m mi 11 mi m i mmi minimum minimum**
us    *i********mmmmmmmiimmmmmmmmmm**
118    *i mi iii*iiiii ii iniii 11 ii iiiiiiiiiiiiiiiiniiiiiiiiiniiiiiii*
117    *mmimmmmmmmmiimmmiimmmmimi**
ii6    *imi mi i minium ii iiiiiiiiimiiiimiiiiiiiiiii mm**
us   **mmiiiimmmmmiimiiiimmmimiimmmi**
ii4  **mmimmmiiiiiiiiimimiimmmmmmiimi***
113  *mmmmminimmnmmiimimiimiimmm**
112  *miimimiiimmimmmmimiimimmmmi**
m  *i ii ii u mi m mi 11 ii i m minim i nun ii Him ii i ii**
no  *iimimmmmmimmmmiimmmmmim**
109  *miiimiiiiiimmmmiiiii**iimimmmim***
toe  *iimmmmmiiimmiiii******mimiimmi**
107  *miimmimmiimiimi**    **mmimmi**
106  *iimmmimmmiiiim**      **immm****
IDS  *mmmmmmmiimi**        *imm****
104  *mmmmmmmmi***         **im**»
103  *immmiiimmimi**            ******
102  *immmmmmimi*               *
101  *mimimiimmim**
100  **immimimiiiim*
 99   *iiimimiimimm*
 9a   ***nmmimmiiii**
 97     *immimmmn*
 96     *imiimmmiiii*
 95     o*****!!!!!!!!!!!!!**
 94          ***HI*********
 93           »II*«
 92           *!**
 91           *I*
 90           **I*
 89           *II*
 88           ****
 87           **
 86
 85

                  FIGURE 8.   EXAMPLE  OF PRINTED OUTPUT FROM  CAASE2 (CONTINUED)

-------
       STATECODE / COUNTY CODE / COUNTY NAME
   4         39       167  WASHINGTON

         AQCR POPULATION DATA,PARKERSBURG-MARIETTA
TOTAL  # RECORDS       READ:       169
 NUMBER OF RECORDS FOR THIS COUNTY:        64
SUBROUTINE PROXIMAL,  CELL #    1, I,J COORDINATES
ITS POPULATION AND HOUSING COUNTS ARE:     1225.
SUBROUTINE PROXIMAL.  CELL #    5, I, J COORDINATES
ITS POPULATION AND HOUSING COUNTS ARE:      990.
93  79,  IS OUTSIDE THE BOUNDARY OF THIS COUNTY.
 447.
94  79,  IS OUTSIDE THE BOUNDARY OF THIS COUNTY.
 357.
                     (Example of grid square printout.)
3.4255. 565.4415.
1 58132
2 71958
3 72368
4 1469
5 7095
6 99076
7100000
8100000
9100000
10100000
11100000
12100000
13100000
14 42463
15100000

39
39
39
39
39
39
39
39
39
39
39
39
39
39
39

9
9
9
9
9
9
9
9
9
9
9
9
9
9
9

17
17
17
17
17
17
17
17
17
17
17
17
17
17
17

17
389.
405.
421.
437.
385.
389.
397.
401.
403.
404.
405.
409.
413.
421.
403.


000004335.
000004335.
000004335.
000004343.
000004351.
000004351.
000004351.
000004351.
000004351.
000004351.
000004351.
000004351.
000004351.
000004351.
000004352.
(ETC

00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
.)

16
16
16
8
4
8
4
2
1
1
4
4
8
16
1


0. 15976E
0. 10835E
0. 94466E
0. 11773E
0. 17940E
0.6541 IE
0. 75746E
0. 20334E
0. 10471E
0. 18818E
0. 12478E
0. 98451E
0. 24993E
0.31156E
0. 49400E


04
04
03
02
02
03
03
03
02
02
04
02
03
03
03


0.42 84 2E
0. 29485E
0.29529E
0. 37331E
0. 49096E
0. 18590E
0. 20306E
0. 51805E
0. 24824E
0. 53500E
0. 49495E
0.2486 IE
0. 67291E
0. 86567E
0. 50680E


04
04
04
02
02
04
04
03
02
02
04
03
03
03
04

 SUBROUTINE GRIDDIT,   FMAX = 0.50680E 04

  FINISH CAASE2
                         FIGURE 8.  EXAMPLE OF PRINTED OUTPUT FROM CAASE2  (CONT.)

-------
          TABLE 6.   FORMAT OF CARD IMAGE RECORDS  OUTPUT  FROM  CAASE2
Record Type

SUMMARY RECORD
GRID SQUARE RECORD
Columns

 1 -  5
 6-10
11 - 15
16 - 20
21 - 25
1
6
12
15
20
23
33
43
46
59
- 5
- 11
- 14
- 19
- 22
- 32
- 42
- 45
- 58
- 71
Format

F5. 0
F5. 0
F5. 0
F5. 0
15

15
16
13
15
13
F10. 5
F10. 5
13
E13.5
E13.5
Variable Name

   XQRIG
   YORIG
   XEND
   YEND
   MTUZ

   MM
   IFRAC
   ISTATE
   ICOUNT
   MTUZ
   XX
   YY
   SL
   HOUSIN
   POPULA
NOTES:
     The Summary Record occurs once as the first card In the file and  serves
     as Input to plotting routines In CAASE3.

     The Grid Square Record occurs once for each of the grid squares that  has
     been constructed.

     See definitions of variables in Table 7.
                                      47

-------
    TABLE 7.  DEFINITIONS FOR VARIABLES OUTPUT FROM CAASE2 AS CARD IMAGES
Variable Name

   XORIG


   YORIG


   XEND


   TEND


   MTUZ


   MM


   IFRAC


   ISTATE

   ICOUNT


   MTUZ

   XX


   YY


   SL

   HOUSIN


   POPULA
                 Definition

UTM Easting coordinate of the origin of the study
area

UTM Northing coordinate of the origin of the study
area

The UTM Easting coordinate of the terminus of the
study area

The UTM Northing coordinate of the terminus of the
study area

The primary UTM zone of the study area as specified
in CAASEl by the user

MM = 1,2,..., number of grid squares; the grid
square number
Fractional area
county ICOUNT
                     of the grid square that is in
FIPS number of state containing this grid square

FIPS number of the county in state ISTATE
containing this grid square

The primary UTM zone assigned to the study area

UTM Easting coordinate of the southwest corner of
the grid square

UTM Northing coordinate of the southwest corner of
the grid square

Side length in kilometers of the grid square

The housing from county ICOUNT that has been
assigned to this grid square

The population from county ICOUNT that has been
assigned to this grid square
                                       48

-------
county boundaries by CAASE3 is desired-  The layout and format of the optional




subset county outline output file (NPLOT) for CAASE3 is given in Table 8.




3.4  Job Control Language (JCL) and Deck Setup




     An example of a deck setup configuration is illustrated in Figure 7.




Using the Parkersburg-Marietta AQCR (#179) as an example study area,  the




associated JCL and input data cards are illustrated in Figure 9 and describe




the following:




     A.  The program is in object deck form.




     B.  The edited MED-X census data file (output from CAASE1) is on tape as




         Fortran unit number 7.  It is labeled "AQCR179.EDITED.MEDX.CENSUS".




         The volume and serial name is "AAAAAA".




     C.  The grid-to-grid conversion tables file is on disk as Fortran unit




         number 5.  It is labeled "GRDTB66".  The volume and serial name is




         "BBBBBB".




     D.  The county outline data file is on tape as Fortran unit number 6.  It




         is unlabeled.  The volume and serial name is "EEEEEE".




     E.  A scratch (or work) tape is on Fortran unit number 8.  It is labeled




         "&&POPULA".  The volume and serial name is "FFFFFF".




     F.  A second scratch (or work) tape is on Fortran unit number 9.  It  is




         labeled "&&AREA".  The volume and serial name is "GGGGGG".




     G.  The grid squares file will be written on tape as Fortran unit number




         2.  It will be labeled "AQCR179.GRID".  The volume and serial name is




         "DDDDDD".




     H.  A subset of the county outline file for the study area (for any




         further CAASE2 runs) will be written on tape as Fortran unit number




         12.  It will be labeled "COUNTY.OUTLINES".  The volume and serial




         name is "HHHHHH".
                                      49

-------
   TABLE 8.  RECORD LAYOUT FOR CAASE2 OPTIONAL COUNTY OUTLINES OUTPUT FILE*
                            (FOR INPUT TO CAASE3)
RECORD TYPE 1:  COUNTY HEADER RECORD

Variable      Format           Columns

IDPREV
110
 1 - 10
XL, YL     F10. 1, F10. 1    11 - 20, 21 - 30
XH, YH     F10. 1, F10. 1    31 - 40, 41 - 50
      Comments

County ID (in this card type
only) identifies this as header
record

"Lower left-hand corner" of
county (easting, northing)

"Upper right-hand corner" of
county (easting, northing)
RECORD TYPE 2:  BOUNDARY LINE SEGMENT RECORD

Variable      Format           Columns
SMX(2,I)

SMX(3,I),
SMX(4,I)
10X

F10. 1,
F10. 1

F10. 1,
F10. 1
 1 - 10

11 - 20,
21 - 30

31 - 40,
41 - 50
                                     Comments
Start of line segment (easting,
northing)

End of line segment (easting,
northing)
 Output When the input variable "NPLOT" is greater than zero.  Used by CAASE3
 to plot county outlines on study area plot.

"^1-ISTART, IEND for number of line segments for the county outline.
                                       50

-------
      //CAASE2 JOB RTI.C44.P01303,JWD,M=1,PRTY=0,T«2
      //*
      //*  SAMPLE CAASE2 JCL.
      //*
      //*  TO LINKEDIT AND EXECUTE CAASE2 OBJECT DECKS
      //*  FOR IBM 370/165
      //*
      //SI EXEC FTHLGD,R.G.=460K
      //L. SYS IN DD *
      //*
      //*    * * * * PROGRAM OBJECT DECKS GO HERE * * * *
      //*
      //*
      //*  NP IS THE OUTPUT DEVICE FOR THE GRID SQUARES FILE, WHICH IS INPUT
      //*     TO CAASE3 AND CAASE4.
      //*  NP = 2 IN THE MAIN CALLING PROGRAM.
      //G.FT02F001 DD DSN-AQCR179. GRID,UNIT-TAPE, VOL-SER=DDDDDD,
      // DISP-(NEW,KEEP),LABEL-(1,SL),RING=IN,
      // DCB-(RECFM=FB,LRECL-80,BLKSIZE=12960,BUFNO-1)
      //*
i-1     //*  DEVICE FT05F001 CONTAINS THE UTM COORDINATE GRID-TO-GRID
      //*  CONVERSION DATA TABLES, BASED ON THE CLARKE 1866 SPHEROID.
      //*  THE DEVICE NUMBER, 5, HAS BEEN SET IN THE "BLOCK DATA" SUBROUTINE.
      //FT05F001 DD DSN-€RDTB66,UNIT=DISK,
      // DCB-(RECFM=FB,BLKSIZE=512,LRECL=512),
      // DISP-OLD,VOL=SER«°BBBBBB
      //*
      //*  NIN1  IS THE INPUT DEVICE CONTAINING THE COUNTY OUTLINE DATA FILE.
      //*  NIN1 = 6 IN THE MAIN CALLING PROGRAM:
      //FT06F001 DD DISP=OLD,UNIT=TAPE, VOL«SER=£EEEEE,LABEL=(1,NL),
      // DCB=(RECFM=FB,LRECL-41,BLKSIZE=2050,BUFNO«1)
      //*
      //*  NIN2 IS THE INPUT DEVICE CONTAINING THE CAASE1 EDITED MED-X
      //*  CENSUS DATA FILE.
      //*  NIN2 - 7 IN THE MAIN CALLING PROGRAM:
      //FT07F001 DD DISP=OLD,DCB=BUFNO=l,DSN«ri.QCRl 79. EDITED. MEDX. CENSUS,
      // UNIT^TAPE,VOL-SER"AAAAAA,LABEL=(1,SL)
                                    FIGURE 9.  JCL AND INPUT DATA CARDS FOR CAASE2

-------
      //*
      //*  NOUT1 IS A SCRATCH TAPE OUTPUT FILE.
      //*  NOUT1 - 8 IN THE MAIN CALLING PROGRAM.
      //FT08F001 DD DSN-&&POPULA,UNIT'TAPE, VOL-SER-FFFFFF,DISP-(,PASS),
      // LABEL-(.NL),RING-IN,
      // DCB-(RECFM=VBS,LRECL-1028, BLKSIZE-13000, BUFNO-1)
      //*
      //*  NOUT2 IS A SCRATCH TAPE OUTPUT FILE
      //*  NOUT2 - 9 IN THE MAIN CALLING PROGRAM.
      //FT09F001 DD DSN-&&AREA,UNIT-TAPE, VOL^ER«GGGGGG,DISP-(,PASS) ,
      // LABEL=(,NL),RING-IN,
      // DCB-(RECFM-VBS,LRECL-1028,BLKSIZE-13000, BUFNO-1)
      //*
      //*  NOUT3 IS THE OUTPUT DEVICE TO CONTAIN THE OPTIONAL SUBSET
      //*  COUNTY OUTLINES FILE IN NIN1 FORMAT.
      //*  NOUT3 - 12 ON THE FIRST CARD IN THE G.SYS IN INPUT STREAM.
      //FT12F001 DD DSN-COUNTY.OUTLINES,UNIT-TAPE, TOL-SER=flHHHHH,
      // LABEL=(,SL),DISP=(NEW,KEEP),RING-IN,
      // DCB = (RECFM-FB,LRECL«41,BLKSIZE=12997, BUFNO-1)
      //*
M     //*  NPLOT IS THE OPTIONAL SUBSET COUNTY OUTLINE FILE IN NOUT1 FORMAT.
      //*  IT IS (OPTIONALLY) USED BY CAASE3.  NPLOT-15 ON THE FIRST
      //*  CARD IN THE G.SYS IN INPUT STREAM.
      //G.FT15F001 DD DSN=CNTY.PLOT,UNIT'=TAPE, VOL=SER-IIIIII,
      // LABEL=(,SL),DISP=(NEW,KEEP),RING-IN,
      // DCB-(RECFM-FB,LRECL-50,BLKSIZE=2000,BUFNO-1)
      //*
      //*  SYSTEM INPUT DEVICE, SYS IN:
      //G.SYSIN DD *
         2PARKERSBURG-MARIETTA  17  12  15
         40HIO                  39
         9ATHENS
       105MEIGS
       115MORGAN
       167WASHINGTON
         5WEST VIRGINIA         54
        35JACKSON
        73PLEASANTS
        95TYLER
       103WETZEL
       107WOOD
      /*
                                FIGURE 9.  JCL AND INPUT DATA CARDS FOR CAASE2  (CONT.)

-------
     I.  A subset of the county outline file for the study area (for CAASE3




         plotting) will be written on tape as Fortran unit number 15.   It  will




         be labeled "CNTY.PLOT".  The volume and serial name is "IIIIII".




     J.  The state and county selector cards are on the installation dependent




         standard card input device.   The study area includes data for two




         states, and the primary UTM  zone is 17.  Four Ohio counties and  five




         West Virginia counties are to be selected.  Two subsets of the county




         outline file are requested,  one for further CAASE2 processing (unit -




         12) and the other for CAASE3 plotting (unit =15).




     K.  The printer is the installation dependent standard device number.




     [At the installation where CAASE was developed, the catalogued procedure




"FTHLGD" that will be executed (Fortran H, Link-Edit and Go - object decks are




to be input) assigns Fortran I/O device numbers 1,  2, and 3 to the card




reader, card punch, and printer, respectively.  The assignment of a tape  to




Fortran I/O unit number 2 (labeled "AQCR.GRID" on volume "DDDDDD") overrides




the procedure's assignment of the card punch to Fortran I/O unit number 2.




Card images will, therefore, be written on tape volume "DDDDDD".]




3.5  Warnings and Limitations




     Many of the considerations involved in executing CAASE2 are the same as




those previously described for CAASEl.  CAASE2 relies on careful consideration




of the inputs to CAASEl for a properly edited census data file.  There are




additional considerations for CAASE2  which pertain mainly to FORTRAN DIMENSION




limitations; those will be discussed  later in this section.  The modified DIME




county outline file has not yet been  completely subjected to application  and




may have data errors for some counties on the file that have not been accessed




during the development and testing of CAASE2.
                                      53

-------
     To simplify the card input and enhance compatibility with CAASE1,  many




variables are set in the main calling program instead of being read in.  They




are grouped together in the source listing for ease in identification and may




be changed as circumstances warrant.  A list of these variables appears in




Table 9.




     The extreme points (farthest north, farthest east,  etc.)  of the study




area are determined by the county outlines.  CAASE2 computes a rectangle that




will contain the extreme points.  The side lengths of the rectangle are the




integer multiples of LTWO (see Table 9) that will just cover the study  area




centered in the rectangle.  The southwest corner of the  rectangle becomes the




origin of the study area, and its coordinates are integers.   The side lengths




of the rectangle must not exceed DIMENY in the north-south direction or DIMENX




in the east-west direction.   It is advisable to actually measure the maximum




extents of the study area before running CAASE2 to ensure that the array




dimensions DIMENY and DIMENX are sufficiently large.   The default value of 256




(km) should be sufficient for most applications.  Smaller dimensions may be




used and would result in more efficient computer utilization.




     A major step in the program is to track the county  outlines through the




grid array of unit cells.  This step, applied to each county,  determines which




cells within the total grid cell array are peculiar to that county, i.e.,




which cells are on the boundary, which cells are exterior, and which are




interior to the county.  Errors, if any, in the county outline data may




produce unpredictable results; therefore, it is advisable to compare the




computer printer version of the county map with an actual map.  If errors




exist, the user will have to make the necessary corrections to the county




outline data.




     The outline tracking procedure solves the equations for determining the




intersection of two lines.  In this procedure, the variable EPS (see Table 9)
                                      54

-------
         TABLE 9.  VARIABLES DEFINED IN CAASE2 MAIN CALLING PROGRAM
Variable

 NR

 NP

 N PUNCH



 NIN1

 NIN2


 NOUT1


 NOUT2


 LTWO
 DIMENY



 DIMENX


 UNITAR


 ISHIFT



 EPS

 MAXSQR

 MAXTRY
Default
Value
  1

  3

  2



  6

  7
 32
256



256


 1.


 216



 .0001

 1800

   3
                    Definition

The card reader device number

The printer device number

Device number for output of card images
containing header and grid square variables (see
Tables 6 and 7)

Device number for county outline file

Device number for the edited census data file
from CAASEl

Device number for temporary data storage device
1; contains population and housing data maps

Device number for temporary data storage device
2; contains area data maps

The maximum permissible grid square side length,
where the units are irrelevant but kilometers
are assumed; however, the length must be some
power of 2, i.e., 2n

A dimension value; it must be jc the minimum
integer multiple of LTWO, i.e., > the
north-south extent of the study area.

Same as DIMENY but for the east-west extent of
the study area

Value of the basic unit area and the minimum
size grid square, 1 Km

A numeric shift multiplier for packing 2 numeric
values in a single word where one value occupies
bit positions 16 on up to word size

 If |a-b|
-------
is used as zero when testing for equality.  Erroneous results were obtained

using too small a value, .00001, on the 32-bit word IBM 370/165.   The value

.0001 corrected the problems.

     Having established the unit, cells belonging to a specific county, the

program checks the census data to ensure that the ED census coordinates will

fall within either a boundary cell or an interior cell.  If the ED coordinates

fall in an exterior cell,* a message is printed and the program continues.

The population and housing of the ED are retained in the totals for the

county, but the ED itself is no longer used (as a control cell) by the

program.

     The limitation of 1800 grid squares has placed a somewhat arbitrary limit

on other variables which, for economy of computer core memory, share the same

common storage as the grid square variables.  These variables are the

population and housing counts, the coordinates and area of the control cells,

that is, those cells in the total grid cell array that contain population.

There are five vectors used to store these variables.  They are dimensioned

2520 each so that their total storage of 12,600 words equals the storage for

the 7 grid square variables.  One cannot predict in advance the number of

control cells there will be in a particular study area; it is necessary to run

CAASE2 to determine this.  As previously mentioned, CAASE2 will restart if the

number of grid squares being created exceeds 1800.  However, if the 2520

storage limit on control cells is exceeded, a message is printed and the

program stops.  It would then be necessary to increase the dimensions of those

variables which are in the COMMON block named VECFO.
*This condition occasionally occurs because of data errors or the differences
in the degree of resolution in the MED-X coordinates as compared to the county
outline line segments.
                                      56

-------
     Grid squares that are transected by the outermost boundary of the study




area may have an excessive amount of their area exterior to the study area.




Such squares are partitioned if the interior area is less than 50 percent of




the square's area.  There is a minimum side length below which grid squares




are not tested for contained area; this value has been set in ENTRY ADJUST, in




subroutine GRIDIT, as 4*UNITAR.




     If the user supplies a set of grid squares and any square(s) contain




area for more than one county, only one description of the square should be




input.  For those grid squares containing area from more than one county, it




is immaterial which county's square is used.  In the CAASE2 processing, the




selection of a grid square network for the entire study area will be bypassed.




However, in later processing by CAASE2, the "shared area" test is made in




subroutine SQROFF and a grid square is produced for each county sharing the




grid square's area.  Therefore, if the grid square network was produced by an




earlier CAASE2 run, the user must remove grid squares that have duplicate




location coordinates but different county assignments.  Failure to do so will




result in having redundant grid squares output.
                                       57

-------
58

-------
4.0  CAASE3 PROGRAM




4.1  Program Description




     The CAASE3 program is optional,  but its use is recommended if  plotting




facilities are available.  When used, it provides the user with an  off-line




plotter display of area source grid squares as defined by CAASE2.   In




addition, the user may optionally specify that CAASE3 plots county  boundaries




and/or enumeration districts for the  study area.  All input data except




control card information is produced  by either CAASE1 or CAASE2. Control  card




information specifies the desired scale, whether the user desires enumeration




districts and/or county outlines to appear on the plot, and the name (label)




the user wishes to appear on the plot.




     CAASE3 reads the control cards from the input stream.  The minimum  and




maximum study area information is read from the grid square file output  from




CAASE2.  Scaling is computed, and an  error message followed by a run abort




occurs if the 29" (assumed) paper width would be exceeded.  The output of  grid




squares from CAASE2 is read, and a run abort occurs if the maximum  number  of




grid squares is exceeded.




     Subroutines are called by CAASE3 to actually drive the plotter.  POPBOX,




EDPLOT, and COOUT subroutines plot the grid, enumeration districts  and county




outlines, respectively.  They are described in Sections 7.27 through 7.29.




     The standard plotting scale is 1:250,000; this usually requires wide




(29") plotting paper for a significant study area.  The user must arrange  for




appropriate plotter paper either through JCL or direct contact with the




operator.




     Logical flowcharts and source language listings for CAASE3 and its




subroutines are included in Appendix  C.




     Figure 10 is a system flowchart  of the CAASE3 program.
                                      59

-------
                          (USE IS OPTIONAL)
     GRID
     FILE
   (CAASE2
   DUTPUT)
    CAASE3
    COUNTY
'OUTLINE FILE
   (CAASE2
   OUTPUT)
    EDITED
  MED-X  FILE
    WITH
   PRIMARY
  UTM  COORDS
   APPENDED
                          PROGRAM CONTROL
                          SPECIFICATIONS
                      r
                        ....I	
                           PROGRAM CAASE3
 DRAWS AREA SOURCE GRID
j SQUARES FOR THE ENTIRE
'STUDY AREA, OPTIONALLY
IPLOTS A FIXED CHARACTER
JFOR EACH ENUMERATION
 DISTRICT IN THE STUDY
 AREA, AND OPTIONALLY
 PLOTS COUNTY BOUNDARIES.
 ALL ARE OVERLAID ON THE
 BASIC STUDY AREA GRID
 COMPUTER DRAWN
  GRID OF THE
   STUDY AREA
                                     COMPUTER DRAWN
                                     PLOT OF COUNTY
                                        OUTLINES
                         _____
 COMPUTER DRAWN
     PLOT OF
   ENUMERATION
DISTRICT GENTROIDE

          Optional
             FIGURE 10.  SYSTEM FLOWCHART OF  CAASE3 PROGRAM
                                   60

-------
4.2  Input Information




     A description of the punched card variables input in the runstream




appears in Table 10.  The card input includes:   a scaling factor multiplier,




plot request parameters for the enumeration district and county outline




plotting options, and a title of up to 20 characters for labeling the plot.




     Figure 11 shows the input order and deck configuration.




     The grid square file output from CAASE2 is used as direct input to




CAASE3.  The record layouts and descriptions for this file are contained in




Tables 6 and 7.




     If the plotting of enumeration districts is requested, the edited MED-X




file output from CAASEl is used as direct input to CAASE3.  The record layout




and description of the file are shown in Table 3.




     If county outlines are to be plotted, the subset of the county outline




file output from CAASE2 is used as direct input to CAASE3.  The record layout




and description of the file are shown in Table 11.




4.3  Output Information




     The CAASE3 computer-driven line plotter output contains as minimum output




a frame with tick marks representing every 5-km on each axis, labels, a title,




a scale legend, and the entire study area grid.  County outlines and/or




enumeration districts are included only at the user's request.  All are




plotted to the scale selected by the user.  Figure 12 is an example of plotter




output for the Parkersburg-Marietta AQCR (#179) example study area; the




plotter output includes the grid array, enumeration districts, and county




outlines.




     A printer listing of all grid squares as read from the input file is




provided.   This listing also includes a display of the study area name for




identification purposes, statements of user request of enumeration district
                                      61

-------
                                  TABLE 10.   INPUT CARD LAYOUT, CAASE3
Card Type

PROGRAM CONTROL CARD
Card Columns
  1 - 12
Format
F12.0
Variable Name

  SCALEX
                           13 - 24
                          25 - 36
                  112
                  112
              IXER
              ICO
    Description
                   Scale factor multiplier  to
                   convert kilometer  distances  to
                   plotter Inches

                   Enumeration district  plot request
                   parameter

                   County outline  plot request
                   parameter
STUDY AREA CARD
  1-20
5A4
  AQCR
Name of study area

-------
                         STUDY AREA
                            CARD
                   PROGRAM
                   CONTROL
                    CARD
      JOB CARD, JCL
     AND OBJECT DECK
FIGURE 11.  INPUT DECK CONFIGURATION FOR CAASE3 PROGRAM
                           63

-------
             TABLE 11.  CAASE3 COUNTY OUTLINE FILE* RECORD LAYOUT
                               (FORTRAN UNIT 12)
Variable
1ST, THY
 Format
 17, 13
   Columns
1-7,   8-10
FROM(l), FROM(2)  F10. 1,  F10. 1   11 - 20,  21 - 30
     , T0(2)
F10. 1,  F10. 1   31 - 40,  41 - 50
      Comments

State and county ID.  Non-
zero values identify this
as header record (skipped)

Start of line segment
(easting, northing)

End of line segment
(easting, northing)
*0ptional CAASE2 output.
                                       64

-------
                                          (optically reduced)
                       IOHlHlaON I UW
FIGURE 12.   EXAMPLE OF PLOTTER OUTPUT  FROM CAASE3
                        65

-------
and/or county outline plotting, the minimum and maximum easting and northing




(in the primary UTM zone) of the grid itself, and a statement of the actual




size of the plot in inches.  Figure 13 is an example of the printed output for




the Parkersburg-Marietta AQCR (#179) example study area.




4.4  Job Control Language (JCL) and Deck Setup




     An example of a deck setup configuration is illustrated in Figure 11.




Using the Parkersburg-Marietta AQCR (#179) as an example study area, the




associated JCL and input data cards are illustrated in Figure 14 and describe




the following:




     A.  The program is in object deck form.




     B.  The grid squares file (output from CAASE2) is on tape as Fortran unit




         number 20.  It is labeled "AQCR179.GRID".  The volume and serial name




         is "DDDDDD".




     C.  The edited MED-X census data (output from CAASE1) is on tape as




         Fortran unit number 10.  It is labeled "AQCR179. EDITED.MEDX.CENSUS".




         The volume and serial name is "AAAAAA".




     D.  The subset of the county outline file (output from CAASE2) is on tape




         as Fortran unit number 12.  It is labeled "CNTY.PLOT".  The volume




         and serial name is "IIIIII".




     E.  The scaling factor, plot option variables, and study area name are on




         the installation dependent standard card input device.  The standard




         1:250,000 scale has been selected.  Plotting of enumeration districts




         and county outlines is requested.




     F.  The printer and plotter are the installation dependent standard




         device numbers.




4.5  Warnings and Limitations




     The user should check the size of the study area on a USGS map to




determine whether the requested map scale will fit on twenty-nine (29) inch
                                      66

-------
                              CAASE3

STUDY AREA IS PARKERSBDRG-MARIETTA

ENUMERATION DISTRICTS TO BE PLOTTED

COUNTY OUTLINES TO BE PLOTTED
          EASTING   NORTHING
MINIMUM

MAXIMUM
373.

565.
4255.

4415.
PLOT WILL COVER 16.1 X 13.8 INCHES
          BOX
      XPOINT
       YPOINT
SIDE
                               (ETC.)
378 TOTAL ENUMERATION DISTRICTS PLOTTED
378 CENSUS ENUMERATION DISTRICTS
  0 SCALED ENUMERATION DISTRICTS
  0 USER ENUMERATION DISTRICTS
  9 COUNTIES' OUTLINES PLOTTED.
STATE
COUNTY
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
389.0
405.0
421.0
437.0
385.0
389.0
397.0
401.0
403.0
404.0
405.0
409.0
413.0
421.0
403.0
4335.0
4335.0
4335.0
4343.0
4351.0
4351.0
4351.0
4351.0
4351.0
4351.0
4351.0
4351.0
4351.0
4351.0
4352.0
16.0
16.0
16.0
8.0
4.0
8.0
4.0
2.0
1.0
1.0
4.0
4.0
8.0
16.0
1.0
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
273
274
275
276
277
278
279
449.0
453.0
457.0
461.0
465.0
459.0
461.0
4355.0
4359.0
4359.0
4359.0
4359.0
4363.0
4363.0
4.0
4.0
4.0
4.0
4.0
2.0
2.0
54
54
54
54
54
54
54
107
107
107
107
107
107
107
              FIGURE 13.  EXAMPLE OF PRINTED OUTPUT FROM CAASE3
                                       67

-------
//CAASE3 JOB RTI.C44.P01303,PADDOCK,T=2,PRTY=0,PLOTS-10000
// EXEC FTGLGD
//L.SYS IN DD *
                       	 PROGRAM OBJECT DECK(S) 	
/*
//*
//*  NAQ IS THE INPUT DEVICE FOR THE GRID PRODUCED BY CAASE2
//*  (REQUIRED).  NAQ-20 IN CAASE3.
//G.FT20F001 DD DSN«AQCR179.GRID,UNIT*TAPE,VOL-SER=ODDDDD,
//              D ISP-(OLD, KEEP),LABEL-(1,SL)
//*
//*  IEDFIL IS THE INPUT DEVICE CONTAINING (OPTIONAL) CENSUS
//*  ENUMERATION DISTRICT DATA FOR PLOTTING.  IEDFIL-10 IN
//*  CAASE3.  OPTION IS SELECTED BY IXERX) IN THE G. SYS IN
//*  INPUT STREAM.
//G.FT10F001 DD DSN-AQCR179.EDITED.MEDX.CENSUS,UNIT-TAPE,
//              VOL-SER^AAAAA,DISP-(OLD, KEEP),LABEL-(1,SL)
//*
//*  ICOFIL IS THE INPUT DEVICE CONTAINING (OPTIONAL) COUNTY
//*  OUTLINE DATA FOR PLOTTING.  ICOFIL-12 IN CAASE3.  OPTION IS
//*  SELECTED BY ICOX) IN THE G.SYSIN INPUT STREAM.
//G.FT12F001 DD DSN«CNTY.PLOT,UNITJTAPE,LABEL-(1, SL) ,
                VOL-SER=IIIIII,DISP-(OLD, KEEP)
//*
//*  DDNAME UNCPLOT IS THE PLOTTER OUTPUT DEVICE.
//*  PLOTTER DDNAME IS INSTALLATION DEPENDENT.
//G.UNCPLOT DD SYSOUT-C
//*  CONTROL CARDS FOLLOW
//G.SYSIN DD *
         1.0           1           1
PARKERSBURG-MARIETTA
/*
               FIGURE 14.  JCL AND INPUT DATA CARDS FOR CAASE3
                                      68

-------
wide plotter paper.  The scaling factor, SCALEX,  is divided into the constant




250,000 in the program to compute the map scale.   A SCALEX equal to 1.0 yields




a map scale of 1:250,000; 2.0 yields 1:125,000;  etc.  The program computes




the plotting space needed and aborts with an error message if the plot will




not fit on 29" wide paper.  For this case a new scale is selected, e.g.,




1:500,000, and the job resubmitted.
                                       69

-------
70

-------
5.0  CAASE4 PROGRAM




5.1  Program Description




     This program calculates apportioning factors for each area source




emissions category for each grid square in the study area.  The primary, but




not limiting, objective of apportioning area source emissions to a sub-county




grid is to provide better spatial resolution of area source emissions data for




dispersion modeling analyses.  (CAASE5, described in Section 6, uses the




calculated apportioning factors to develop fractional coefficients used to




allocate a portion of a county's total fuels and emissions to each source




category-grid square combination.)




     Fuels and emissions are allocated with the same apportioning factors.




For example, housing counts for each grid square are used to calculate the




apportioning factor for both distillate oil marketed for use as residential




fuel and the emissions produced by its combustion.




     CAASE4 is structured such that a main program, with only a few lines of




source code, is used to set the dimensions of the arrays for the variables




used.  (This is done to conserve computer core storage requirements.) The main




program needs to be recompiled only if array sizes are to be increased.  After




defining the variable dimensions, the main program calls the subroutine




CAASE4, which does all of the work; the CAASE4 subroutine does not call any




additional subroutines.




     The program uses the grid square file output from the CAASE2 gridding




program as direct input.  Each county in the study area being processed is




completely processed, in turn, before proceeding to the next county.




     CAASE4 uses census based data and grid square size to calculate




apportioning factors.  This is a totally objective technique that the user can




optionally modify.  Objective factors used include, for each grid square:  the




fractional area of the grid square that is located in the county being
                                       71

-------
processed (1.0 unless a county border transects the grid square), the size and




location of the grid square, and housing and population counts assigned to it




for that county.  From these data, population density and its inverse are




calculated and also used for apportioning.




     CAASE4 will use overriding weighting factors at the user's option.  Most




of the area source emissions categories can be effectively apportioned by




CAASEA without user intervention.  For a few categories, the user will




probably have data not directly available to CAASE, for example, the locations




of airports, waterways, and railroads; for these categories (and any others),




the user can prepare and input overriding weighting factors.




     A detailed discussion of the objective apportioning factors, user-




supplied overriding weighting factors, their rationale, and how to apply them,




are included in Section 8.  The method of introducing overriding weighting




factors is discussed in Section 5.2, Input Information.




     It is important for the CAASE user to fully understand a basic concept in




the calculation of apportioning factors.  All of the apportioning factors




output from CAASE4 are "weighted apportioning factors."  Each one is the




product of an objective apportioning factor - for example, grid square




contained population - and a weighting factor.  The weighting factor is 1.0




unless overridden by the user.  The CAASE user does not replace the objective




apportioning factors when he uses the overriding option; he modifies the 1.0




(default) weighting factor coefficients of the objective apportioning




factors.




     For convenience, the fields of fuels (throughput) data on the NEDS Area




Source Input Form [EPA (DUR) 219, 3/72] have been sequentially numbered by




source category.  Major category classifications (for example, residential




fuel) and associated minor category classifications (for example, distillate
                                       72

-------
oil) have been assigned a sequential category number.  Table 12 relates the




assigned sequential number to its major and minor classifications.




     In the CAASE4 program, objective apportioning factors have been assigned




to all area source categories.  The tons per acre coefficients reported for




forest wildfires, managed burning, and agricultural field burning are used to




calculate total county fuels (throughput) for those source categories.  They




are, therefore, not subject to apportioning; their numeric values are included




in CAASE4 outputs for use by CAASE5.  The number of days orchard heaters are




fired for frost control is also output without change for use by CAASE5.




     The selection of array dimensions in the main program is based on the




maximum count of grid squares included in any of the counties currently being




processed and on the maximum number of source categories to be overridden by




user-supplied weighting factors in any of those counties.




     Figure 15 is a system flowchart of the CAASE4 program.  Logical




flowcharts and source language listings for CAA.SE4 are included in Appendix D.




5.2  Input Information




     The input card variables, their layout, and descriptions are contained in




Table 13.  The county selector card contains the state and county FTPS code




and name, the number of source categories to be overridden (if any), and a




print switch option variable used to control the printing of computed




apportioning factors.  If source categories are to be overridden, then the




source category number and its initialization constant are input for each of




them.  (This initializes those grid squares; overriding values need not be




read in for every grid square if only one or a few are to receive apportioned




fuels and emissions.  For example, if all grid squares were initialized to




zero for emissions from aircraft operations, the user would read in an




overriding weighting factor for only those grid squares affected by aircraft
                                       73

-------
    TABLE  12.   AREA SOURCE EMISSIONS  CATEGORY  NUMBERS
CATEGORY
 NUMBER
   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
COMM'L &
COMM'L &
      MAJOR
  CLASSIFICATION
RESIDENTIAL FUEL
RESIDENTIAL FUEL
RESIDENTIAL FUEL
RESIDENTIAL FUEL
RESIDENTIAL FUEL
RESIDENTIAL FUEL
COMM'L & INSTITL FUEL
         INSTITL FUEL
         INSTITL FUEL
COMM'L & INSTITL FUEL
COMM'L & INSTITL FUEL
COMM'L & INSTITL FUEL
INDUSTRIAL FUEL
INDUSTRIAL FUEL
INDUSTRIAL FUEL
INDUSTRIAL FUEL
INDUSTRIAL FUEL
INDUSTRIAL FUEL
INDUSTRIAL FUEL
INDUSTRIAL FUEL
ON-SITE INCINERATION
ON-SITE INCINERATION
ON-SITE INCINERATION
OPEN BURNING
OPEN BURNING
OPEN BURNING
GASOLINE FUEL
GASOLINE FUEL
GASOLINE FUEL
GASOLINE FUEL
DIESEL FUEL
DIESEL FUEL
DIESEL FUEL
AIRCRAFT
AIRCRAFT
AIRCRAFT
VESSELS
VESSELS
VESSELS
VESSELS
EVAPORATION
EVAPORATION
MEASURED VEH MILES
MEASURED VEH MILES
MEASURED VEH MILES
MEASURED VEH MILES
DIRT RDS TRAVELED
DIRT AIRSTRIPS
CONSTRUCTION ACRES
MISC. WIND EROSION
LAND TILLING
FOREST WILDFIRES*
MANAGED BURNING*
AGRI. FIELD BURNING*
FROST CONTROL**
STRUCTURE FIRES
    MINOR
CLASSIFICATION
  ANTH.  COAL
  BITUM. COAL
  DIST.  OIL
  RESID. OIL
  NAT. GAS
  WOOD
  ANTH.  COAL
  BITUM. COAL
  DIST.  OIL
  RESID. OIL
  NAT. GAS
  WOOD
  ANTH.  COAL
  BITUM. COAL
  COKE
  DIST.  OIL
  RESID. OIL
  NAT. GAS
  WOOD
  PROCESS GAS
  RESIDENTIAL
  INDUSTRIAL
  COMM'L & INSTITL
  RESIDENTIAL
  INDUSTRIAL
  COMM'L & INSTITL
  LIGHT VEHICLE
  LIGHT TRUCK
  HEAVY VEHICLE
  OFF HIGHWAY
  HEAVY VEHICLE
  OFF HIGHWAY
  RAIL LOCOMOTIVE
  MILITARY
  CIVIL
  COMMERCIAL
  COAL
  DIESEL OIL
  RESID. OIL
  GASOLINE
  SOLVENT PURCHASED
  GASOLINE MARKETED
  LIMITED ACCESS RDS
  RURAL ROADS
  SUBURBAN RDS
  URBAN ROADS
                                    AREA-ACRES
                                    AREA-ACRES
                                    AREA-ACRES
                                    ORCHARD HEATERS
                                    NO.  PER YEAR
*Tons/acra also reported;  **Days  fired/year also reported.
                                 74

-------
     PROGRAM
     CONTROL
 SPECIFICATIONS
                              CAASE4 MAIN PROGRAM

                          SETS DIMENSIONS AND CALLS
                          SUBROUTINE CAASE4 (RECOMPILE
                          ONLY IF DIMENSIONS NEED TO
                          BE CHANGED)
/GRID  FILE
  (CAASE2
  OUTPUT).
 OVERRIDING
 WEIGHTING
 FACTOR CARDS
   SUBROUTINE CAASE4*

ASSIGNS APPORTIONING
FACTORS TO EACH OF THE
GRID SQUARES FOR EACH
SOURCE CATEGORY
APPORTIONING
   FACTOR
    FILE
                                          DETAIL
                                          LISTING
     *This  is  "effectively"  the  main program;  the  main (driver)  CAASE4
     Program  is used  only to  set  dimensions and call  this  subroutine.
           =  Optional
               FIGURE  15.   SYSTEM  FLOWCHART  OF  CAASE4 PROGRAM
                                      75

-------
Card Type

COUNTY SELECTOR CARD
          TABLE 13.   INPUT CARD LAYOUT, CAASE4

Card Columns      Format      Variable Name
1
6
11
31
36
41
61
- 5
- 10
- 30
- 35
- 40
- 60
- 65
15
5X
5A4
15
5X
5A4
15
KOUNTY
—
CNAME
KSTATE
—
SNAME
IOVER
SOURCE CATEGORY OVERRIDE
OPTION CARD
OVERRIDE FACTOR CARD
 66 - 70



  1 -  5


  6-10


  1 - 10


 11 - 20


 21 - 30
15



15


F5.0


110


110


F10.0
                                                         ITEST
ICAT
                                                         XI NIT
IDNUM
                                                         KAT
                                                         WEIGHT
     Description

FIPS county code of selected
county

Blank

Name of selected county

FIPS state code of selected state

Blank

Name of selected state

Number of source categories to be
overridden

Option switch to print computed
apportioning factors (ITEST*O
suppresses printing)

Source category number for
overriding weighting factor

Initializing constant for
weighting factor

Area source grid square to be
overridden

Source category number to be
overridden

Overriding weighting factor
OVERRIDE FACTOR
DELIMITER CARD

RUN DELIMITER CARD
  1 - 80
  1 - 80
SOX
SOX
                Blank - no more overriding
                weighting factors

                Blank - no more counties to be
                processed

-------
operations*)  An override factor card for each grid square and source category

combination to be overridden is necessary.  Each card contains the grid square

ID number, the source category number, and the desired overriding weighting

factor.

     The grid square file output from CAASE2 is used directly as input to

CAASE4.  These data include for each grid square in the county being

processed:  the ID number, the fractional area of the grid square contained

in "this county," the state and county FIPS number, the UTM zone number, the

UTM northing and easting coordinates of the southwest corner of the grid

square, the "effective side length"* in kilometers of the grid square, and the

housing and population assigned to the grid square in "this county."  The

record layouts and description for the grid square file output from CAA.SE2 are

contained in Tables 6 and 7 (the summary record is output for CAASE3 but is

not used by CAASE4).

     Figure 16 shows the input order and deck configuration for the various

card types.

5.3  Output Information

     Error messages, diagnostic messages, information necessary to control the

CAASE5 program, and a formatted magnetic tape with grid square descriptions

and their weighted apportioning factors are output.  Printed output varies

according to the options selected.  If overriding weighting factors and

initializing coefficients for the overridden source categories are input, they

will also be printed.  If a detailed listing is requested (i.e., the variable

ITEST is non-zero), identifying information and calculated apportioning
 If the fractional area of the grid square in "this county" is less than  1.0,
 the "effective side length" is the square root of the area contained in  "this
 county."
                                       77

-------
                                               BLANK CARD
                                       BLANK CARD
                           OVERRIDE FACTOR
                                CARDS
                 SOURCE CATEGORY
                 OVERRIDE OPTION
                      CARDS
         COUNTY SELECTOR
              CARD
    CARD, JCL,
OBJECT DECK &
OPTIONALLY THE
 MAIN PROGRAM
 SOURCE DECK
 REQUIRED
y)NLY IF
 IOVER 1 0
 REPEATED
 FOR EACH
.COUNTY
'TO BE
 PROCESSED
       FIGURE 16.  INPUT DECK CONFIGURATION FOR CAASEA PROGRAM
                                78

-------
factors for each grid square and source category combination will be printed.

The state and county names and the number of grid squares* read in for the

county are printed*  Figure 17 is an example of CAASE4 printer output.  (Note

that no source categories were overridden.)  Figure 18 is an example of a

requested detailed listing for grid squares located in Washington County,

Ohio.  The detailed listing is printed in the same order as the grid squares

are processed, which is generally by sequential ID numbers.

     Figure 18 was prepared with printed output for two grid squares for

purposes of the following discussion.  Grid square number 97 is an 8 by 8

kilometer square containing 64 square kilometers of area; the variable FRAC

(fraction) is 1.0 indicating that the entire grid square is located in

Washington County; therefore, the "effective side length" is the same as the

grid square side length.  However, grid square number 98 is a 4 by 4 kilometer

square containing 16 square kilometers of area; in this case, FRAC is 0.88633.

Therefore, only 14.18 square kilometers of area are located within Washington

County.  The remaining area is located in one or more neighboring counties and

could, in fact, be outside the study area of interest.  In the case of grid

square 98, the remaining 1.82 square kilometers are in Wood County, West

Virginia, a neighboring county within the same AQCR.  The "effective side

length" for grid square number 98 is 3.7658.  The calculated apportioning

factors are printed (by row) in the same order as the source categories are

reported (see Table 12).  Again, referring to the values printed in Figure 18,

note that the contained housing assigned to grid square number 97 is 488

(rounded to an integer); note that this number appears for the first five

factors in the printout because the first five area source categories are
*The number of grid squares for each county is used to determine dimension
 requirements in the CAASE5 program.
                                       79

-------
CO
o
STATE AND COUNTY


        0  SOURCE


STATE AND COUNTY


        0  SOURCE


STATE AND COUNTY


        0  SOURCE


STATE AND COUNTY


        0  SOURCE


STATE AND COUNTY


        0  SOURCE






GOOD FINISH
                        OHIO                     ATHENS


                        CATEGORIES WERE OVERRIDDEN


                        OHIO                     MEIGS


                        CATEGORIES WERE OVERRIDDEN


                        OHIO                     MORGAN


                        CATEGORIES WERE OVERRIDDEN


                        OHIO                     WASHINGTON


                        CATEGORIES WERE OVERRIDDEN


                        WEST  VIRGINIA            JACKSON


                        CATEGORIES WERE OVERRIDDEN


                                                      (ETC.)
HAD
HAD
HAD
HAD
HAD
32 GRID SQUARES
28 GRID SQUARES
17 GRID SQUARES
58 GRID SQUARES
26 GRID SQUARES
                                    FIGURE  17.  EXAMPLE OF PRINTED OUTPUT FROM CAASE4

-------
00
     FOR ID,FRAC,STATE,COUNTY,ZONE,X,Y,SIDE,AND AREA-




       97   1.00000   390HIO                  167 WASHINGTON




    FACTORS-
                                      17
              445.
        4359.
           8.00
         64.00
0. 48796E
0. 16823E
0. 16823E
0. 16823E
0. 80000E
0. 16823E
0. 64000E
03
04
04
04
01
04
02
0.48796E
0. 16823E
0. 16823E
0. 16823E
0. 64000E
0. 16823E
0. 24348E
03
04
04
04
02
04
01
0. 48796E 03
0. 16823E 04
0. 16823E 04
0. 16823E 04
0. 64000E 02
0. 24348E 01
0. 24348E 01
0.48796E 03
0. 16823E 04
0. 16823E 04
0. 16823E 04
0.64000E 02
0. 24348E 01
0.24348E 01
0. 48796E 03
0. 16823E 04
0.48796E 03
0. 16823E 04
0.80000E 01
0. 16823E 04
0. 24348E 01
0. 48796E
0. 16823E
0. 16823E
0. 24348E
0. 80000E
0. 16823E
0.24348E
03
04
04
01
01
04
01
0. 16823E
0. 16823E
0. 16823E
0. 16823E
0. 80000E
0. 24348E
0. 24348E
04
04
04
04
01
01
01
0. 16823E 04
0. 16823E 04
0.48796E 03
0.24348E 01
0. 80000E 01
0.24348E 01
0. 16823E 04
    CONTAINED POPULATION -     1682.    CONTAINED HOUSING -




    SQUARE ROOT OF AREA (EFFECTIVE SIDE LENGTH) =    8.0000







     FOR ID,FRAC,STATE,COUNTY,ZONE,X,Y,SIDE,AND AREA-
                                488.    AREA WEIGHTED INVERSE POPULATION DENSITY =  0.24348E 01
       98   0.88633   390HIO
              167 WASHINGTON
      17
453.
4359.
4.00
14.18
    FACTORS5
0. 23781E
0. 79521E
0. 79521E
0. 79521E
0.37658E
0. 79521E
0. 14181E
03
03
03
03
01
03
02
0.23781E 03
0.79521E 03
0. 79521E 03
0. 79521E 03
0. 14181E 02
0. 79521E 03
0. 25290E 00
0. 23781E
0.7952 IE
0.7952 IE
0.7952 IE
0. 14181E
0. 25290E
0. 25290E
03
03
03
03
02
00
00
0. 23781E 03
0. 79521E 03
0. 79521E 03
0.79521E 03
0. 14181E 02
0. 25290E 00
0.25290E 00
0.23781E
0. 79521E
0. 23781E
0. 79521E
0.37658E
0.79521E
0.25290E
03
03
03
03
01
03
00
0.23781E
0. 79521E
0. 79521E
0. 25290E
0. 37658E
0. 79521E
0. 25290E
03
03
03
00
01
03
00
0. 79521E 03
0. 79521E 03
0. 79521E 03
0. 79521E 03
0.37658E 01
0. 25290E 00
0. 25290E 00
0. 79521E 03
0. 79521E 03
0.23781E 03
0.25290E 00
0.37658E 01
0. 25290E 00
0.79521E 03
    CONTAINED POPULATION
795.    CONTAINED HOUSING -
238.    AREA WEIGHTED INVERSE POPULATION DENSITY =  0.25290E 00
    SQUARE ROOT OF AREA (EFFECTIVE SIDE LENGTH)
                     3.7658
                   FIGURE 18.   EXAMPLE OF OPTIONAL DETAILED PRINTOUT OF APPORTIONING FACTORS,  ETC., FROM CAASE4

-------
residential fuel and have an objective apportioning factor of housing count




(see Section 8).  The remaining 51 apportioning factors for grid square number




97 are for source categories 6 through 56 and include the objective




apportioning factors of housing, population, area, side length, and area-




weighted inverse population density.  Table 14 contains the record layout and




a description of all variables included in the apportioning factor file output




by CAASE4.




5.4  Job Control Language (JCL) and Deck Setup




     An example of a. deck setup configuration is illustrated in Figure 16.




Using the Parkersburg-Marietta AQCR (#179) as an example study area, the




associated JCL and input data cards are illustrated in Figure 19 and describe




the following:




     A.  The main program is in source language form.  For illustration




         purposes, one set of variable dimensions has been set to 100




         (permitting the input of up to 99 grid squares per county for the




         counties being processed); the other set of variable dimensions has




         been set to 3 (permitting the input of overriding weighting factors




         for up to 3 source categories).




     B.  The CAASE4 subroutine (effectively the program that does all the




         work) is in object deck form.




     C.  The grid square file (output from CAASE2) is on tape as Fortran unit




         number 4.  It is labeled "AQCR179.GRID".  The volume and serial name




         is "DDDDDD".




     D.  The apportioning factor file will be written on tape as Fortran unit




         number 6.  It will be labeled "AQCR179.APPORT.FACT".  The volume and




         serial name is "JJJJJJ".




     E.  The county selector cards are on the installation dependent standard




         card input device.  The counties to be processed include four in the
                                       82

-------
    TABLE  14.   OUTPUT  RECORD  LAYOUT  FOR  APPORTIONING FACTOR  FILE,  CAASE4
 Position

  1  -   5

  6-11



 12  -  14


 15  -  34


 35  -  39


 40  -  59


 60  -  62


 63  -  72



 73  -  82



 83  -  92
 93 - 102


103 - 830
Format

15

F6.5



13


5A4


15


5A4


13


F10.0



F10.0



F10.2
F10.2
56E13.5
Variable Name

  ID

  FRAC
  ISTATE
  SNAME
  ICNTY
  CNAME
  IZONE
  SIDE
  AREA
  FACTOR
         Definition

Grid square sequence number

Fraction of total area of grid
square contained in this
county

FIPS state number for this
grid square

Name of state for this grid
square

FIPS county number for this
grid square

Name of county for this grid
square

UTM zone of grid square
coordinates (primary zone)

UTM easting coordinate of
lower left-hand corner of this
grid square

UTM northing coordinate of
lower left-hand corner of this
grid square

Effective side length of this
grid square for the area
located in this county, i.e.,
the square root of the area
contained in this county

Area of this grid square
contained in this county

Apportioning factors (includ-
ing any overriding factors)
for the 56 source categories
for this grid square
                                       83

-------
//CAASE4 JOB RTI.C44.P01303,BURT,M'=1,PRTY-0,T=1,P=100
//  EXEC FTGCLG
//C.SYSIN DD *
C
C     PROGRAM NAME: CAASE4 DRIVER
C
C     DRIVER FOR CAASE4 TO SET DIMENSIONS MUST BE RECOMPILED ANYTIME IT
C        IS NECESSARY TO SET DIMENSIONS
      DIMENSION SUMH(IOO), SUMP (100), X(100),Y(100), SIDE (100), FRAC( 100),
     1 STATE(100),COUNTY(100),UTZONE(100),WGTFCT(100,3),ID(100),
     2 ISTATE(100),ICNTY(100),IZONE(100),ICAT(3),XINIT(3)
C
C     NDIM MUST BE AT LEAST ONE GREATER THAN THE NUMBER OF GRID SQUARES
C        IN THE COUNTY WITH THE MOST GRID SQUARES IN THE SET OF
         COUNTIES BEING PROCESSED WITH THIS COMPUTER RUN.
C
C
C     KDIM IS THE NUMBER OF SOURCE CATEGORIES TO BE OVERRIDDEN WITH
C     OVERRIDING WEIGHTING FACTORS DURING THIS RUN.
C
      NDIM - 99
      KDIM - 3
      CALL CAASE4 (ID, SUMH, SUMP, X,Y,S IDE, FRAC, STATE, COUNTY, ISTATE, 1C NTY,
     1UTZONE, IZONE.WFTFCT, ICAT, XINIT, NDIM, KDIM)
      CALL EXIT
      END
/*
//L. SYS IN DD *
                        -- SUBROUTINE OBJECT DECK --
/*
//*
//*   UNIT 4 IS THE GRID PRODUCED BY CAASE2.
//G.FT04F001 DD DSNAME-AQCRl 79. GRID, UNIT "TAPE,
//  LABEL-(l,SL),DCB-(RECFM-FB,LRECL-80,BLKSIZE-800,DEN-3),
//  DISP- (OLD, KEEP ),VOLUME-SER-ODDDDD
//*
//*   UNIT 6 IS THE APPORTIONING FACTOR OUTPUT OF CAASE4.
//G.FT06F001 DD DSN-AQCRl 79. APPORT. FACT, UNIT-TAPE, LABEL-(1, SL) ,
//  DCB-(RECFM-FB,LRECL-830,BLKSIZE-8300,DEN«3),DISP- (NEW, KEEP),
//    RING-IN, VOL^ER-JJJJJJ
//G.SYSIN DD *
  009     ATHENS                 39     OHIO                    0    0
  105     MEIGS                  39     OHIO                    0    0
  115     MORGAN                 39     OHIO                    0    0
  167     WASHINGTON             39     OHIO                    0    1
  035     JACKSON                54     WEST VIRGINIA           0    0
  073     PLEASANTS              54     WEST VIRGINIA           0    0
  095     TYLER                  54     WEST VIRGINIA           0    0
  103     WETZEL                 54     WEST VIRGINIA           0    0
  107     WOOD                   54     WEST VIRGINIA           0    0
                             -- BLANK CARD --   '
/*
               FIGURE 19.  JCL AND INPUT DATA CARDS FOR CAASE4
                                      84

-------
         state of Ohio and five in the state of West Virginia.  No overriding




         weighting factors are to be input; therefore, no initializing factors




         are included in the input runstream.  The detailed print option has




         been selected for Washington County, Ohio.




     [At the installation where CAASE was developed, the catalogued procedure




"FTGCLG" that will be executed (Fortran G, Compile, Link-Edit and Go - some




object decks may be included in the input) assigns Fortran I/O devices 1, 2,




and 3 to the card reader, card punch, and printer, respectively.]




5.5  Warnings and Limitations




     The CAASE4 main program is used to set dimensions and to pass them to the




CAASE4 subroutine as "variable dimensions."  The variable NDIM is related to




the number of grid squares; it must be as large as the largest number of grid




squares in any county currently being processed.  NDIM is passed to the CAASEA




subroutine as a variable dimension.  The value assigned to the Fortran




Dimension statements in the main program must be at least one larger than the




value assigned to NDIM.  (This is necessary because whenever the CAASEA




subroutine reads the grid square file, the end of the set of grid squares for




one county is signaled by reading the first record of the next county, i.e.,




the county ID number changes.  The end-of-file condition signals the end of




the set of grid squares for the last county in the file.)




     Analagous to the discussion concerning the variable NDIM and the number




of grid squares, is the setting of the variable KDIM in the main program.




KDIM is the variable used to set the dimensions for the number of source




categories to be overridden.  It must be at least as large as the largest




number of categories to be overridden in any county currently being




processed.




     Selecting the detailed print option can produce a large number of printed




pages.  If this option is selected for a county, 2A lines (including vertical







                                       85

-------
spacing) are printed for each grid square; a sufficient output page estimate




must be included on the JCL "JOB" card.




     All of the counties in the study area do not have to be processed during




any particular CAASE4 run; however, those counties processed must be in the




same order as processed by CAASE1 and CAASE2.




     If source categories are to be overridden, a careful reading and a full




understanding of Section 8 cannot be overemphasized.
                                       86

-------
6.0  CAASE5 PROGRAM




6.1  Program Description




     The CAASE5 program performs the functions of calculating the emissions




and allocating fuels and emissions to each grid square and source category




combination'




     In order to perform these functions, CAASE5 requires:  the apportioning




factor file output from CAASE4,  current area source emission factors  for the




five primary pollutants, and the NEDS Area Source fuels (throughput)  data (for




each county to be processed).  These data must be in the same format  as the




first five cards (Al through A5) from the NEDS Area Source Input  Form [EPA




(DUR) 219, 3/72].




     CAASE5 is structured such that a main program, with only a few lines of




source code, is used to set the dimensions of the arrays for the  variables




used.  (This is done to conserve computer core storage requirements.)   The




main program needs to be recompiled only if array sizes are to be increased.




After defining the variable dimensions, the main program calls the subroutine




CAASE5, which does all the work; CAASE5 calls other subroutines and passes  the




variable dimensions to them as necessary.




     CAASE5 uses the fuels (throughput) totals and the emission factors to




calculate county-total area source emissions in the same way as the NEDS




programs.




     Current area source emission factors are input by the user.   The factors




can be the national emission factors published by EPA or those developed by




state or local agencies.  Emission factors for highly motor vehicles are




input directly; those for stationary sources and off-highway mobile sources




are scaled for input.  The scaling of the emission factor takes into  account




the scaling of the fuels data and units conversion.  Emission factors are read




in for each of the primary pollutants (TSP, S02, NOX, HC, and CO) and area




source category combinations.






                                       87

-------
     Except in the case of highway motor vehicle emission factors, the factors




are scaled and units are converted off-line.  For example,  if the emission




factor is 20 pounds of TSP produced for each ton of bituminous coal burned for




home heating, and the total tons burned is expressed in tens of tons on the




NEDS area source form, then the factor read in should be 0.10 (10 scaling




factor x 20 Ibs/ton burned/2000 Ibs/ton).  The program subsequently multiplies




the fuel total reported on the area source input form by the 0.10 factor




yielding TSP emissions in tons.  For those source-category/pollutant




combinations where percent ash or sulfur content is used, the program




automatically applies them during the on-line calculation.   For those




categories involving acres burned, the tons per acre reported is used in the




calculation of emissions.  (An example of a complete set of emission factors




for input to CAASE5 is included in Section 6.2.)




     A complete discussion of input, output, deck setup, and formats is




included in Sections 6.2 through 6.4.




     It is important to understand the sequence of steps performed by CAASE5




and the algorithms used; they are described as follows, and the steps are




repeated for each county being processed.  Initially, identification




information for the state, county, study area, and the number of grid squares




in the county are read in from cards.  A card with labeling information is




then read in and the subroutine READ1, which is described in Section 7.30, is




called to read the county "fuels" totals from cards.  These cards are coded




in the same format as the first five cards on the NEDS Area Source Input Form




[EPA (DUR) 219, 3/72].  If READ1 does not return an error condition,




processing continues.  The apportioning factor file output from the CAASE4




program is then read.




     At this point in the processing, the apportioning factors are not




fractions that can be used as coefficients for the county totals of fuels and
                                      88

-------
emissions; that is, each is a calculated value, one for each grid square and




source category combination*  Using any one source category and county as an




example of the procedure, and supposing that the county contained 50 grid




squares, then the steps are as follows: the apportioning factors for all 50




grid squares for this source category are summed; (this becomes the




denominator of a fraction).  CAASE5 then allocates to the first grid square a




fractional portion of the county total fuels for this source category; the




fraction is the apportioning factor for the first grid square divided by the




sum of the 50 apportioning factors for this source category for this county.




The processing proceeds until an allocation has been made (for this source




category) to each of the 50 grid squares.




     In a sense, the apportioning factors output from CAASE4 appear dimension-




less to CAASE5.   Regardless of the numeric range of the apportioning factors




for a source category, fractions are calculated by CAASE5.  A summation of




these fractions for a source category and for all grid squares in a county




will yield unity.  (After calculating county totals of emissions for each




pollutant and source category combination, CAASE5 allocates them to the grid




squares in the same manner as was done with the fuels.)




     After the fuels have been allocated for all categories, the subroutine




OUTPTl is called which causes the printing of tables.  (ODTPT1 is described




in Section 7.31.)  The CAASE5 program then calculates total emissions for each




of the five primary pollutants (TSP, S02» NOX,  HC, and CO) for each of the




fuel categories.  The CAASE5 program handles the highway motor vehicle source




categories in the same manner as the AEROS-NADB program for the NEDS system.




Measured vehicle miles by vehicle class is used, if available, and the ratios




for vehicle classes are calculated using estimates of miles per gallon of fuel




used for each of the different vehicle classes.  The emissions are then
                                       89

-------
allocated one pollutant at a time to limit the computer core storage




requirements.  The emissions for all area source emission categories for the




county are summed and printed for comparison with the total emissions




calculated by the NEDS system for area sources.  The TSP, SC>2, NOX, HC, and CO




emissions for all source categories are summed for each grid square and saved




for the dispersion modeling input cards to be output later using the OUTPT3




subroutine.  (OUTPT3 is described in Section 7.33.) The allocated emissions




are printed in tabular form using the OUTPT2 subroutine.  (OUTPT2 is described




in Section 7.32.)  After allocated emissions are output for all five




pollutants, the dispersion modeling input card images are produced by calling




the OUTPT3 subroutine.  A formatted tape is written containing all table




entries and is described, in detail, in Section 6.3.




     Logical flowcharts and source language listings for CAASE5 and its




subroutines are included in Appendix E.




     Figure 20 is a system flowchart of the CAASE5 program.




6.2  Input Information




     Emission factors and a dispersion model selector card are read; they will




be used for all counties to be processed.  For each county to be processed, a




county selector card, a heading card for labeling output, and county-total




area source fuels (throughput) data are read.  The fuels (throughput) data is




input in the same format as the first five cards (Al through A5) on the NEDS




Area Source Input Form [EPA (DDR) 219, 3/72].  Subroutine READl performs the




function of reading the area source fuels (throughput) cards.  READl also




calculates the "light truck, gasoline fuel" fuels total for the county.  (See




Section 7.30 for the alogrithm used.) This source category is not directly




reported on the area source form; the algorithm used by READl was obtained




from EPA/NADB.
                                       90

-------
  PROGRAM CONTROL
  SPECIFICATIONS
                                CAASE5 MAIN PROGRAM

                             SETS DIMENSIONS AND CALLS
                             SUBROUTINE CAASE5
                             (RECOMPILE ONLY IF
                             DIMENSIONS NEED TO BE
                             CHANGED)
    APPORTIONING
     FACTOR FILE
       (CAASE4
        OUTPUT)
   SCALED EMISSION
     FACTOR DATA
   NEDS FUELS
 (THROUGHPUT) DATA
   (NEDS AREA
  SOURCE CARDS)
  SUBROUTINE CAASE5*

ALLOCATES "FUELS,"
CALCULATES AND
ALLOCATES EMISSIONS
INTO INDIVIDUAL GRID
SQUARES
 ''ALLOCATED
    FUELS,
EMISSIONS AND
IPP, CDM, OR
 AQDM CARD
 IMAGES FILE
                                                                      TABLES OF
                                                                  ALLOCATED FUELS,
                                                                  EMISSIONS, IPP, OR
                                                                     CDM, OR AQDM
                                                                      CARD IMAGES
                                                                    IPP, CDM, OR
                                                                   AQDM CARD DECK
*This is "effectively" the main program; the main (driver) CAASE5 program is
 used only to set dimensions and call this subroutine.

	 = Optional
                 FIGURE 20.  SYSTEM FLOWCHART OF CAASE5 PROGRAM
                                        91

-------
     Figure 21 is an example of a completed NEDS Area Source Form.  The data

values entered on the form are the Washington County, Ohio inventory for 1972

as reported to EPA/NADB for inclusion in the NEDS data base.  The data, as

shown in Figure 21, wer-? used with CAASE5 for the output examples included in

Section 6. 3.

     Figure 22 illustrates the scaled emission factors* input to CAASE5 for

the examples in this manual.  Emission factors for highway vehicles fuels are

scaled within CAASE5.  (The user is cautioned to make sure that the most

current emission factors are used.)  For highway vehicles, there are 16

emission factors for each pollutant; there are four vehicle classes and four

highway classes with an emission factor assigned to each combination.

     Figure 23 shows the input order and the deck configuration for the

various card types.

     Table 15 contains a description of the card types input in the runstream,

their formats, and definitions of the variables.

     The apportioning factor file output from CAASE4 is used as direct input

to CAASE5.  The record layout and description for this file are contained in

Table 14 (in Section 5.3).

6.3  Output Information

     Output from the CAASE5 program includes diagnostic and error messages,

tables of allocated fuels, and tables of allocated emissions for each of the

five primary pollutants.  A card deck (or card images) is produced in the

input format for the IPP, CDM, or AQDM dispersion models.  A formatted tape is

written containing table entries, and the card Images are also written on this
*The CAASE5 program logic automatically takes into account the ash and sulfur
 content for the appropriate source categories.
                                      92

-------
 Slale
      County
        iU
        Ql<2
AQCR
                                                    NATIONAL EMISSIONS DATA SYSTEM (NEDS)
                                                     ENVIRONMENTAL PROTECTION AGENCY
                                                          OFFICE OF AIR PROGRAMS
                                                                                                 AREA SOURCE
                                                                                                 Input Foim
                                                                                                      Dale __
FORM APPROVED
OMB NO IUROM5
                                                                                       Name ol Peison
                                                                                       Complelini For*
Year
ol
lecord
10
/
11
2,


Particular*
12

13

14

IS

16

SIP EMISSION ESTIMATES (IB* twn/rrl

MO,
17

18

19

32^22
I
23

24


HC
25

26

27

28

29



CO
30

31

32

33

34

SULFUR CONTENT (%)
Antk.lBilim.
CoJl I Coil
35J36P7
fk
38
,y
Disl. Resid
Oil | Oil
39
al
4o)ll|42
,/Wr
ASH CONTENT <%l
AnOi.
Coil
43J44
r
IS

Bitm.
Cojl
46
/
47
ti
48
f

Ant*. CM!
Ill !•«
49

SO

51

5253
)l
RESIDENTIAL FUEL

11* lorn
54

5!

56

57
2
5959
3U-
Oisl. Oil
M4Gal.
60

61

62
/
63
a
64
t
ResM. Oil
10* Gal.
65

66

67

68
0

Nil. Gis
10' lt.3
69

70

71
JL
7?
7
73
I

Wood
10? Ions
74

75

76

77
f

»
3
78




79
4


cd
DO
|
Anth.
10' tons
10

11

12

13

14
0
COM!
Bilumin.
10 ' Ions
15

ON SIT
Residential
10 ' Ions
19
11
12
13
5
14
a
15
9
16

17
t»
18
9
19
£
ERCIAL AND INS
Oisl. Oil
U4 Gals.
20

• INCINERATION
Industrial
U?lons
16
17
18
19
7
Q
21

22
J
23
£
24
4
Conrn. Irnl.
10? Ions
21
22
23
24
7
TITUTIONAL FUE
Resid Oil
10* Gals.
25l

26

27

28

29
0
. .
Nal Has
10' Ft3
30

Residential
10? Ions
25
26
27J28
"T
29
3
30
f
31

3?
3
3:
y
Wood
10?ton;
34

35
0
Anlh. Coal
I0l Ions
36

OPEN BURNING
Industrial
10? Ions
31
32
33
34
35
3
36
5"
37

38

39

40

4'
0
Conn' 1- Instill.
ID? Ions
\I
38
39
4°
41
B
Bill!" Coal
10.1 Ions
42

43

44
J.
45
4
46
O
47
if.
Code
10 1 tons
48

Li|hl Vehicle
101 Gals.
42
43
44
3.
45
O
46
47
7
48
g
49

50

51
0
INDUSTRIAL FU
Oisl Oil
104 Gals.
52

53

54

GASOLINE FUEL
Heavy Vehicle
I03 Gals.
49
50
51
52
O
S3
J
54
d°
55
£/
sr
7
:L
Resid. Oil
10* Gals.
57

50
OH Hiway
I03 Gals.
55
56
57
58
7
S9

60


59
V
60
7
61
\OL

62

Nal. Gas
10' Ft 3
631

64

65
4
6f
t
DIE
Heavy Vehicle
103 Gals.
6J
fijfi
64
/
65
66
Wood
10? Ions
67

SS
69
C
Process Gas
ID7 It 3
70

71

SEL FUEL
Oil Hiway
I04 Gals.
67
68
69
J
70
7
71
72

73
O

71

/5

76

Rail Locomotive
I04 Gals
72
73
11
I*
76
1
i
s
1"
S
S.
77
i
78

A
79
A
cd
(Si
cd
80
3
AIRCRAFT
Military
LTD CYC 10?
10

11

12

13
0
Civil
LTOCYC 10 1
14

15

16

17
V
18
5
19
2,
Comncfcial
LTD CYC 10 1
20

21

22

23

24
d
VESSELS
CM!
10' tons
25

26

27

28
O
Diesel Oil
104 Gals.
29

30
v
31
4
32
\
Resid. Oil
I04 Gals.
33

34

35

36


37
O

Gasoline
103 Gals
38

39

40
i.
41
9
EVAPORATIj
Solvent RKChased
Ions yi
42

43

44

45
?
46
O
47
?
IN
Gasoline Mat ketod
10$ Gals.
48

49

SO
3.
51
7
52
O

Limited Access Road
ID4 Miks
53

54

55

56

57

58
C
MEASURED VEHICLE MILES
Rwal Roads
10< Miles
59

60

61

62

63

64
C
Subuiban Roads
I04 Miles
65

66

67

68

69

70
6
Urban Roads
10< Miles
71

72

73

74

75

76

77
6

0
i
78




79
A

1
60
4I
FROST CnNTRni

Dill Raids
Tintled
I05 Vthick imlet
10

11

12

13

14

15

16
6
Di'l
Air Strips
LTD CYCLES
17

18

19

20

21
0

Comlfuelion
Acit*
22

23

24

25

26

27
O
FOHEStWHOFIRFS MANAGED IURNING AGRICULTURAL FIELD ,,2 STRUCTURE
MHtelliiifOus
Wind Eimon
1|) Acm
28

29

30

31

32
O
{.mi TJIm,
1|3 Acm
33

34

35

36

37
C
ISIish/PtnuilH* iuinini) BURNING
Acm Binned
38

39

40

41

42

43

44
0
Tom/Kin
BniKtd
45

46

47
0
IToni/Acifi
AcmBmiwd | BuiMd
48

49

SO 51

52

5354
o|
5E

5C
0
Acm Buincd
57

58

59

60

61

62
O
Tens/Acm
Burned
63

64

65
fl
Oicluid
Hritrii
Op>i>lin|
66

67

68

69
O

Oiyt/Fnrd
D4yi/v»i
70

71

72
o

Fiifs/Vi'
73

74

75
.4
76
Q.
77
f
,.
Tj
<
78



79
A

cd
80
5
COMMENTS
10

11

lit

'3

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

r2

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

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

|
^j
<
78


79
A
cd
80
6
EPA • DllH
  V72
                     FIGURE  21.   NEDS AREA SOURCE  INPUT FORM FOR WASHINGTON  COUNTY, OHIO  (1972)

-------
vo
.05
.075
.115
.8
.125
0.
0.
.184
.72
.795
.05
.285
0.
0.
.015
.3
.3
.3
1.85
0.
0.
0125
.015
.015
1.5
.47
1.
0.
.10
.115
.05
.8
.995
0.
0.
.19
.795
.003
.05
.19
0.
0.
.015
.3
.9
.3
. 478
0.
0.
.1
.015
.015
1.5
2.315
1.1
0.
.05
.05
1.25
0.
.002845
0.
0.
.72
.003
.075
0.
.000565
0.
0.
.06
.6
.5
0.
.00257
0.
0.
.015
.04
1.
0.
.0126
0.
0.
.115
1.25
.1
0.
.00895
0.
.0085
.795
.075
.01
0.
.0128
0.
0.
.2
.5
1.15
0.
.126
0.
.002
.015
1.
.15
0.
.1655
0.
.012
.05
.01
.16
0.
.1
0.
.0085
.003
.1925
.0025
0.
.25
0.
0.
.4
.075
.005
0.
.015
0.
.001
.04
.001
.45
0.
.1
0.
.01
1.25
.065
.4
.00535
.12
0.
.0085
.075
.19
.125
.0028
.15
0.
0.
.5
.075
.15
.061
1.12
0.
.001
1.
.005
.25
.172
.294
0.
.01
.01
.001
.4
0.
.0965
0.
.0001
.1925
.019
.125
0.
1.43
0.
.00005
.05
.005
.15
0.
.209
0.
0.
.001
.0001
.25
0.
.0145
0.
.0215
.029
.075
.8
.1665
0.
0.
.054
.19
.76
.05
.149
.00315
0.
.0001
.046
.3
.3
1.845
.0137
0.
.0047
.01
.015
1.5
.202
.4655
0.
.014
                                                                                                           TSP
                                                                                                           S02
                                                                                                           NOX
                                                                                                           HC
        *0rder  of  scaled  factor  is by  row and  column  in  the  same order  as  in Table  12.   Zero  fillers  are  used  when
         the  emission factor  has not been determined  e.g., category  48, or is  not directly  applicable,  e.g.,
         categories  43 through 46.
              FIGURE  22.   SCALED AREA  SOURCE  EMISSION  FACTORS USED AS  INPUT  TO  CAASE5  FOR  THE CAASE EXAMPLES.

-------
.45
.02
.02
4.25
.65
0.
0.
.54
.54
.13
.13
4.9
4.6
5.8
6.2
30.7
37.3
.45
.02
.085
4.25
2.485
0.
0.
.54
.54
.18
.18
5.8
5.5
9.3
10.
38.3
46.1
.025
.1
1.
0.
.072
0.
0.
1.2
1.2
.36
.36
12.5
11.7
18.6
20.6
136.7
159.4
.02
1.
0.
0.
3415
0.
.07
2.2
2.2
2.8
2.8
28.3
26.7
2.3
2.8
8.9
15.
.1
.01
1.35
0.
.45
0.
.03
.54
.54
.13
.13
4.9
4.1
5.8
8.3
30.7
64.1
1.
.01
.575
1.95
.392
0.
.05
.54
.54
.18
.18
5.8
4.9
9.3
13.1
38.3
78.
.03
.0025
.575
0.
.007
0.
.011
1.2
1.2
.36
.36
12.5
10.5
18.6
29.1
136.7
254.2
.036 ^
.02
4.25
.52
1.48
0.


CO


.122 J
2.2 1
2.2 j TSP+
2.8 1
2.8 J S02
27.9 \
22.3 J NOX
2.4 "\
4. J HC
10.5 1
31.1 / C0
01
        +0rder of factors is by row and column for vehicle class and highway class respectively.
          FIGURE 22.  SCALED AREA SOURCE EMISSION FACTORS USED AS INPUT TO CAASE5 FOR THE CAASE EXAMPLES (CONT.)

-------
                                                                 BLANK CARD
                                                         NEDS AREA
                                                       SOURCE FUELS/
                                                     [THROUGHPUT CARDS
                                                         (Al - A5)
                                               HEADING CARD
                                      COUNTY SELECTOR
                                           CARD
                             DISPERSION MODEL
                             FORMAT SELECTOR
                                  CARD
                    MOBILE SOURCES
                    EMISSION FACTOR
                        CARDS
            SCALED AREA
          SOURCE EMISSION
           FACTOR CARDS
' JOB CARD,  JCL,
 OBJECT DECK &
 OPTIONALLY  THE
  MAIN PROGRAM '
  SOURCE DECK
 REPEAT FOR
 EACH COUNTY
)TO BE
 PROCESSED
                  FIGURE 23.   INPUT DECK CONFIGURATION FOR CAASE5 PROGRAM
                                             96

-------
VO
        Card Type
        SCALED EMISSION FACTOR CARD
        MOBILE SOURCES  EMISSION
        FACTOR CARD
        DISPERSION MODEL  FORMAT
        SELECTOR CARD
      TABLE 15.  INPUT CARD LAYOUT,  CAASE5

Card Columns  Format  Variable Name       Description
        COUNTY SELECTOR CARD
  1 - 80
  1-80
  1 -  5
  1 - 10

 11 - 20

 21 - 30

 31 - 40

 41 - 46

 47 - 50

 51 - 55

 56 - 60

 61 - 69

 70
8F10.0  EMFAC1-EMFAC5  8 emission factors  per  card  for 56  source
                       categories,  7 cards per pollutant,  5
                       pollutants
8F10.0  EFHV
15
                                                  A4

                                                  15

                                                  15

                                                  9X

                                                  Al
IWANT
F10.0   XSTATE

110     ICNTY

F10.0   XAQCR

110     NAREAS

6X

        CNTY

        KOUNTY
        KSTATE
        IPOLIT
8 emission factors per card for 4 vehicle
classes, 4 road types, 2 cards per
pollutant, 5 pollutants

Code denoting subroutine OUTPT3 output
format
  IWANT -= 1 IPP
        - 2 CDM
        - 3 AQDM

FIPS state code of selected state

FIPS county code of selected county

Numeric code number of selected study area

Number of grid squares in selected county

Blank

Name of selected county

NEDS county code of selected county

NEDS state code of selected state

Blank

Political subdivision of selected study
area
         For the processing  of more  than  one  county, repeat card setup from this card type through card type
         fuels (throughput)  totals.

-------
                                      TABLE 15.   INPUT CARD LAYOUT,  CAASE5 (CONT.)
       Card Type


       COUNTY SELECTOR CARD

       (CONT.)
       HEADING CARD
       FUELS (THROUGHPUT) CARD
Card
71
78
1
1



Columns
- 77
- 80
- 80
- 80



Format
7X
A3
20A4
See NEDS
AREA
SOURCE
INPUT
FORMAT
Variable Name Description
Blank
IREGN Alpha code number of selected study area
HDG Output page heading including name of
selected county, state and any other
pertinent identifying information
NEDS area source fuels (throughput) cards
Al - A5



       RUN DELIMITER CARD
1 - 80
SOX
Blank - No more counties to be processed
vO
oo

-------
tape.  County totals, by source category and pollutant combination, are both




printed and written on tape*  Fuel totals from the area source input cards




are printed for convenience and visual checking.  Figure 24 is an example




of a printout of the NEDS area source fuels (throughput) data read in for




Washington County, Ohio.




     The OUTPT1 subroutine outputs tables of allocated fuels (throughput) for




each source category and grid square combination; Figures 25 through 29 are




examples of output Tables 1 through 5 of allocated fuels for Washington




County, Ohio.




     The OUTPT2 subroutine outputs tables of allocated emissions for each




source category and grid square combination.  The OUTPT2 subroutine is called




five times for each county, that is, once for each pollutant.  Figures 30




through 34 are examples of output Tables 1 through 5 of allocated emissions




(particulates) for Washington County, Ohio.  Allocated emissions for the other




four pollutants are output in the same format as the particulates.




     Figure 35 is an example printout of county-total emissions for all source




category and pollutant combinations for Washington County, Ohio.  The county




emissions totals calculated by CAASE5 for each pollutant is also printed.




     Figure 36 is an example printout produced by the OUTPT3 subroutine.  In




this example, dispersion modeling input card images are in the IFF format.




Cards are also punched, and the card images are written on the formatted




CAASE5 output tape.  (The OUTPT3 subroutine is described in Section 7.33.)




     The formats of the CAASE5 output tape records are contained in Table 16;




a description of the contained variables is given in Table 17.  Tables 16 and




17 also include the sources of each of the various record types.  OUTPT1 and




OUTPT2 write a header record each time the subroutines are called; each header




record is followed by detailed records containing allocated fuels or allocated
                                       99

-------
       WASHINGTON COUNTY, OHIO  (PARKERSBURG-MARIETTA AQCR - NEDS 1972) TEST 1/78




       FUEL TOTALS READ IN FOLLOW - (NOTE THAT READ1 ROUTINE CALCULATED THE LGT TRUCKS CATEGORY (NO.28) BY

       APPORTIONING FROM LGT DUTY GAS (NO.  27) AND HVY DUTY GAS TRUCKS (NO. 29))



         36.0     335.0    128.0        0.0     274.0        4.0          0.0        686.0       383.0      0.0
33.0
509.0
2121.0
309.0
0.0
0.0
70.0
376.0
270.0
0.0
0.0
17.0
7.0
0.0
0.0
2404.0
39.0
0.0
0.0
0.0
0.0
35.0
432.0
0.0
0.0
47.0
13.0
0.0
0.0
229.0
0.0
17716.3
0.0
0.0

48.0
3564. 1
443.0
0.0

0.0
2935.6
0.0
0.0

0.0
1747.0
60.0
0.0

       FOOTNOTE:  CATEGORIES BY ROW IN SAME ORDER AS AREA SOURCE NEDS FORM AND OUTPUT TABLES
o
o
                             FIGURE 24.  EXAMPLE PRINTOUT OF AREA SOURCE INPUT DATA, CAASE5

-------
WASHINGTON COUNTY, OHIO  (PARKERSBURG-MARIETTA AQCR - NEDS 1972)  TEST 1/78

                 COUNTY-WIDE AREA SOURCE DATA USED IN CALCULATING EMISSIONS  BY SOURCE  CATEGORY FOR APPORTIONING
                                  SULFUR CONTENT:
                                            ANTHRACITE COAL
                                            BITUMINOUS COAL
                                            DISTILLATE OIL
                                            RESIDUAL OIL
 0.0 PERCENT
 4.4 PERCENT
 0.1 PERCENT
 0.9 PERCENT
                                  ASH CONTENT:
                                            ANTHRACITE COAL
                                            BITUMINOUS COAL
 0.0 PERCENT
18.4 PERCENT
                                  FOREST WILDFIRES

                                  MANAGED BURNING

                                  AGRICUL. FIELD BURNING

                                  FROST CONTROL
 0.0 TONS PER ACRE

 0.0 TONS PER ACRE

 0. 0 TONS PER ACRE

 0.0 TONS PER ACRE
                                                         POPULATION CODE
                     FIGURE 24.   EXAMPLE PRINTOUT OF AREA SOURCE INPUT  DATA,  CAASE5  (CONT. )

-------
           WASHINGTON  COUNTY, (JM10  (PARKE3SBURG-MARIETTA AQCR - NEDS 1972)  TEST  1/76)
              APPORTIONED  FUELS,  TABLE   1,  PAGE   1
o
N3
SOURCE
NUMBER
/8
79
BO
81
82
83
84
85
66
87
as
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
116
119
120
121
l^^

HEGIl
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
                                    POLIT
COORDINATES
:OUNTY
NASH
MASH
MASH
MASH
HASH
WASH
MASH
NASH
MASH
MASH
NASH
MASH
MASH
MASH
MASH
MASH
MASH
MASH
MASH
MASH
NASH
MASH
MASH
NASH
MASH
WASH
MASH
MASH
NASH
WASH
WASH
MASH
WASH
MASH
NASH
MASH
WASH
WASH
WASH
MASH
WASH
MASH
WASH
WASH
NASH
X(KM)
421.0
437.0
437.0
445.0
449.0
421.0
437.0
445.0
449.0
453.0
461.0
469.0
485.0
451.0
449.0
451.0
445.0
449.0
437.0
445.0
453.0
457.0
461.0
465.0
469.0
477.0
453.0
457.0
459.0
461.0
463.0
465.0
457.0
459.0
461.0
463.0
421.0
447.0
445.0
453.0
461.0
469.0
485.0
493.0
437.0
YCKM)
4335.0
4335.0
4343.0
4347.0
4347.0
4351.0
4351.0
4351.0
4351.0
4351.0
4351.0
4351.0
4351.0
4352.0
4353.0
4353.0
4355.0
4355.0
4359.0
4359.0
4359.0
4359.0
4359.0
4359.0
4359.0
4359.0
4363.0
4363.0
4363.0
4363.0 .
4363.0
4363.0
4365.0
4365.0
4365.0
4365.0
4367.0
4367.0
4367.0
4367.0
4367.0
4367.0
4367.0
4367.0
4375.0
(SO. KM)
12.30
1.16
35.39
10.65
2.49
147.29
64.00
16.00
3.74
1.98
4.95
4.30
1.00
0.18
4.00
1.19
16.00
14.44
64.00
64.00
14.18
3.04
3.75
15.15
61.71
35.86
16.00
4.00
3.95
3.68
4.00
16.00
4.00
4.00
4.00
4.00
55.10
60.69
64.00
64.00
64.00
254.55
47.13
1.53
53.42
ANTH
10E1
0.1
0.0
0.6
2.6
0.7
1.1
1.2
0.3
0.0
0.0
0.4
0.2
0.0
0.0
0.1
0.0
0.3
0.2
0.4
1.0
0.5
1.3
1.1
0.7
0.9
0.6
0.6
0.6
3.1
2.1
0.4
0.4
0.7
0.5
0.9
0.1
0.2
0.8
0.9
2.0
1.2
1.3
0.4
0.0
• 0.9
***************** RESIDENTIAL FUEL  *****************
        BITUM.    DIST.OIL   RES.OIL   NAT.GAS    HOOD
        10E1T    10E4GALS  10E4GALS   10E7FTS   10E2T
          1.
          0.
          7.
         24.
          6.
          9.
         11.5
          2.7
          0.5
          0.3
          4.1
          1.9
          0.1
          0.0
          0.5
          0.1
          3.1
          2.3
          3.9
          9.0
          4.4
         12.2
         10.5
          6.7
          8.2
          5.4
          5.6
          6.0
         26.8
         19.6
          3.4
          3.7
          6.1
          4.9
          8.7
          1.1
          1.9
          7.6
          8.4
         18.7
         11.4
         12.1
          3.7
          0.2
          8.7
 0.5
 0.1
 3.0
 9.3
 2.4
 3.8
 4.4
 1.1
 0.2
 0.1
 1.6
 0.7
 0.0
 0.0
 0.2
 0.1
 1.2
 0.9
 1.5
 3.4
 1.7
 4.7
 4.0
 2.6
 3.2
 2.1
 2.1
 2.3
11.0
 7.5
 1.3
 1.4
 2.J
 1.9
 3.3
 0.4
 0.7
 2.9
 3.2
 7.2
 4.3
 4.6
 1.4
 0.1
 3.3
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
1.1
0.2
6.4
20.0
5.2
8.1
9.4
2.2
0.4
0.3
3.4
1.5
0.0
0.0
0.4
0.1
2.5
1.8
3.2
7.3
3.6
10.0
6.6
5.5
6.7
4.5
4.6
4.9
23.6
16.0
2.7
3.1
5.0
4,0
7.1
0.9
1.5
6.3
6.9
15.3
9.3
9.9
3.0
0.2
7.1
0.0
0.0
0.1
0.3
0.1
0.1
0.1
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.3
0.2
0.0
0.0
0.1
0.1
0.1
0.0
0.0
0.1
0.1
0.2
0.1
0.1
0.0
0.0
0.1
                                FIGURE 25.   EXAMPLE OF  CAASE5 OUTPUT TABLE 1,  ALLOCATED  FUELS

-------
WASHI\GTUN COUNTY, OHIU  (PARKERSBURG-MARIETTA AQCR  • NEDS  1972)  TEST  1/76)
                                                         APPORTIONED FUELS, TABLE  2, PAGE  1
SOURCE
NUM8EH
78
rt
80
81
82
83 •
84
85
86
87
88
89
90
91
92
93
94
95
9b
97
98
99
too
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122

CJUN
WASH
WASH
*ASH
.•(ASH
MASH
MASH
MASH
WASH
AASH
nASH
MASH
MASH
WASH
WASH
MASH
WASH
MASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
MASn
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
                ****** COMMERCIAL AND INSTITUTIONAL  FUEL  *******   ********************** INDUSTRIAL FUEL ************************
                A.NfH.  BTTUM.  DIST.OIL  RES.OIL  NAT.GAS  WOOD    ANTH,  BITU«.  COKE   DIST.OIL  RES.OIL  NAT.GAS  WOOD  PROC.GAJ
                10E1T  10E1T   10E4GALS  10L4GALS 10E7FT3  10E2T   10E1T  10E1T   10E1T   lOEaGALS  10E4GALS 10E7FT3  10E2T   10E7FTJ
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
 2.9
 0.6
17.1
51.2
13.0
20.0
25.0
 6.1
 1.0
 0.7
 9.0
 «.l
 0.1
 0.0
 1.1
 0.3
 6.8
 5.1
 8.6
21.0
 9.9
26.1
18.0
14.a
17.3
10.5
12.8
11.8
48.6
47.9
 6.2
 8.3
10.6
 9.0
15.7
 2.3
 4.0
16.9
18.9
39.8
24.1
24.7
 6.8
 0.3
17.4
 1.6
 0.3
 9.5
28.6
 7.3
11.2
14.0
 3.4
 0.6
 0.4
 5.0
 2.3
 0.1
 0.0
 0.6
 0.2
 3.8
 2.8
 4.8
11.7
 5.5
14.6
10.1
 8.0
 9.7
 5.8
 7.1
 6.6
27.1
26.8
 3.5
 4.6
 5.9
 5.0
 8.7
 1.3
 2.2
 9.4
10.6
22.2
13.5
13.8
 3.8
 0.2
 9.7
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.1
0.0
0.8
2.5
0.6
1.0
1.2
0.3
0.0
0.0
0.4
0.2
0.0
0.0
0.1
0.0
0.3
0.2
0.4
1.0
0.5
1.3
0.9
0.7
0.8
0.5
0.6
0.6
2.3
2.3
0.3
0.4
0.5
0.4
0.6
0.1
0.2
0.6
0.9
1.9
1.2
1.2
0.3
0.0
0.8
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
10.0
2.1
59.6
179.6
45.5
70.1
87.7
21.4
3.6
2.5
31.4
14.3
0.3
0.2
3.8
1.1
23.7
17.6
30.1
73,6
34.8
91.4
63,2
50.5
60.6
36.7
44.7
41. S
170.2
168.0
21.8
28.9
37.0
31.
54.
8.
14.
59.
66.
139.
64.
86.
23.8
1.1
61.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.2
0.0
1.2
3.5
0.9
1.4
1.7
0.4
0.1
0.0
0.6
0.3
0.0
0.0
0.1
0.0
0.5
0.3
0.6
1.4
0.7
1.8
1.2
i.o
1.2
0.7
0.9
o.a
3.3
3.3
0.4
0.6
0.7
0.6
1.1
0.2
0.3
1.2
1.3
2.7
1.7
1.7
0.5
0.0
1*2
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0,0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.2
0.0
1.2
3.6
0.9
1.4
l.B
0.4
0.1
0.1
0.6
0.3
0.0
0.0
0.1
0.0
0.5
0.4
0.6
1.5
0.7
l.B
1.3
1.0
1.2
0.7
0.9
o.a
3.4
3.4
0.4
0.6
0.7
0.6
1.1
0.2
0.3
1.2
1.3
2.8
1.7
1.7
0.5
0.0
1.2
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
o'.o
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0*0.
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
                               FIGURE 26.  EXAMPLE OF CAASE5 OUTPUT  TABLE 2,  ALLOCATED  FUELS

-------
WASHINGTON COUNTY,  OHIO   (PAHKEKSHUHG-MARItTTA AQCR " NEDS 1972)  TEST  1/78)
                                                                        APPORTIONED  FUELS. TABLE  3, PAGE  1
SOURCE
NUMBER
COUNTY
* ON SITE  INCINERATION *  ***** OPEN BURNING ****  ********** GASOLINE  FUEL  **********  ******** DIESEL FUELI ******
 RESID.   INDUST.   C-INST.  RESID.  INDUST.  C-INST.  LT.VEH.   LT.TRUK   HV.VEH.   OFF HINY  HV.VEH.  OFF HIMY  R.LOCO
 10E1T    10E1T     10E1T   10E1T    10E1T   10E1T    10E3GAL   10E3GAL   10E3GAL   10E3GAL   10E3GAL  10E3GALI   10E3GA
78
79
SO
bl
82
83
84
85
86
87
88
89
90
91
92
93
9«
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
lib
117
118
119
120
121
U2
WASH
.VASH
AASH
MASH
AASH
MASn
WASH
MASH
WASH
MASH
MASH
MASH
MASH
rtASH
A- ASH
WASH
MASH
MASH
HASH
WASH
WASH
MASH
NASH
MASH
NASH
MASH
WASH
MASH
WASH
MASH
MASH
MASH
WASH
WASH
WASH
MASH
WASH
MASH
AASH
MASH
WASH
AASH
MASH
MASH
WASH
2.1
0.4
11.9
37.1
9.6
15.0
17.5
4.2
0.7
0.5
b.2
2.9
0.1
0.0
0.7
0.2
4.7
3.4
5.9
13.6
6.7
18.5
15.9
10.2
12.5
8.3
8.5
, 9.1
43.8
29.7
5.1
5.7
9.3
7.4
13.1
1.7
2.6
11.6
12.8
28.5
17.3
18.3
5.6
0.3
13.2
0.3
0.1
1.7
5.2
1.3
2.0
2.6
0.6
0.1
0.1
0.9
0.4
0.0
0.0
0.1
0.0
0.7
0.5
0.9
2.1
1.0
2.7
J.B
1.5
1.8
1.1
1.3
1.2
5.0
4.9
0.6
0.8
1.1
0.9
1.6
0.2
0.4
1.7
1.9
4.1
2.5
2.5
0.7
0.0
1.8
0.1
0.0
0.4
1.3
0.3
0.5
0.6
0.2
0.0
0.0
0.2
0.1
0.0
0.0
0.0
0.0
0.2
0.1
0.2
0.5
0.2
0.6
0.4
0.4
0.4
0.3
0.3
0.3
1.2
1.2
0.2
0.2
0.3
0.2
0.4
0.1
0.1
0.4
0.5
1.0
0.6
0.6
0.2
0.0
0,4
0.2
0.0
0.9
2.8
0.7
1.1
1.3
0.3
0.1
0.0
0.5
0.2
0.0
0.0
0.1
0.0
0.4
0.3
0.5
1.0
0.5
1.4
1.2
0.8
1.0
0.6
0.7
0.7
3.4
2.3
0.4
0.4
0.7
0.6
1.0
0.1
0.2
0.9
1.0
2.2
1.3
1.4
0.4
0.0
1.0
0.1
0.0
0.9
2.6
0.7
1.0
1.3
0.3
0.1
0.0
0.5
0.2
0.0
0.0
0.1
0.0
0.3
0.3
0.4
1.1
0.5
1.3
0.9
0.7
0.9
0.5
0.7
O.b
2.5
2.4
0.3
0.4
0.5
0.5
0.8
0.1
0.2
0.9
1.0
2.0
1.2
1.3
0.3
0.0
0.9
0.1
0.0
0.3
1.0
0.2
0.4
0.5
0.1
0.0
0.0
0.2
0.1
0.0
0.0
0.0
0.0
0.1
0.1
0.2
0.4
0.2
0.5
0.3
0.3
0.3
0.2
0.2
0.2
0.9
0.9
0.1
0.2
0.2
0.2
0.3
0.0
0.1
0.3
0.4
0.8
0.5
0.5
0.1
0.0
0.3
73.8
15.1
440.5
1323.5
335.5
516.6
646.6
158.0
26.5
18.7
231.5
105.7
2.5
1.3
28.3
8.4
174.5
131.5
221.7
542.4
256.4
673.6
466.0
372.0
448.0
270.3
329.5
305.8
1254.5
1237.8
160.7
213.3
272.7
231.7
404.7
60.6
102.9
435.3
488.4
1027.2
623.6
636.8
175.7
8.4
449.7
14.9
3.0
88.6
266.3
67.5
103.9
130.1
31.8
5.3
3.8
46.6
21.3
0.5
0.3
5.7
1.7
35.1
26.5
44.6
109.1
51.6
135.5
93.7
74.8
90.1
54.4
66.3
61.5
252.4
249.0
32.3
42.9
54.9
46.6
81.4
12.2
20.7
87.6
98.3
206.7
125.5
128.1
35.3
1.7
90.5
12.2
2.5
73.0
219.3
55.6
85.6
107.1
26.2
4.4
3.1
38.4
17.5
0.4
0.2
4.7
1.4
28.9
21.8
36.7
69.9
42.5
111.6
77.2
61.6
74.2
44.8
54.6
50.7
207.9
205.1
26.6
35.3
45.2
38.4
67.1
10.0
17.0
72.1
80.9
170.2
103.3
105.5
29.1
1.4
74.5
9.9
0.4
13.7
0.4
0.1
203.0
30.6
7.8
2.6
1.0
0.5
0.8
1.9
0.1
2.7
0.8
7.1
7.7
89.3
36.5
3.8
0.1
0.1
3.0
41.1
23.0
3.8
0.3
0.1
0.1
0.5
5.8
0.3
0.3
0.2
1.3
142.6
40.9
40. 5
19.3
51. 8
491.9
61.1
1.4
• 30.7
8.8
1.8
52.7
1S8.4
40.2
61.8
77.4
18.9
3.2
2.2
27.7
12.7
0.3
0.1
3.4
1.0
20.9
15.7
26.5
64.9
30.7
80.6
55.8
44.5
53.6
32.4
39.4
36.6
150.2
148.2
19.2
25. 5
32.6
27.7
48.4
7.3
12.3
52.1
58.5
123.0
74.7
76.2
21.0
1.0
53.8
2.1
0.1
3.0
0.1
0.0
43.7
6.6
1.7
0.6
0.2
0.1
0.2
0.4
0.0
0.6
0.2
1.5
1.6
19.2
7.9
o.e
0.0
0.0
0.6
8. 8
4.9
0.8
O.I
0.0
0.0
0.1
1.2
0.1
0.1
0.0
0.3
30.7
8.8
8.7
4.
6.
105.
13.
0.
6.
                                                                                                                            0.1
                                                                                                                            0.0
                                                                                                                            0.2
                                                                                                                            0.1
                                                                                                                            0.0
                                                                                                                            &. 3
                                                                                                                            0.2
                                                                                                                            0.1
                                                                                                                            0.1
                                                                                                                            0.0
                                                                                                                            0.1
                                                                                                                            0.1
                                                                                                                            0.0
                                                                                                                            0.0
                                                                                                                            0.1
                                                                                                                            0.0
                                                                                                                            0.1
                                                                                                                            0.1
                                                                                                                            0.2
                                                                                                                            0.2
                                                                                                                            0.1
                                                                                                                            0.0
                                                                                                                            0.1
                                                                                                                            O.t
                                                                                                                            0.2
                                                                                                                            0.2
                                                                                                                            0.
                                                                                                                            0.
                                                                                                                            0.
                                                                                                                            0.
                                                                                                                            0.
                                                                                                                            0.
                                                                                                                            0.
                                                                                                                            0.
                                                                                                                            0.
                                                                                                                            0.
                                                                                                                            0.2
                                                                                                                            0.2
                                                                                                                            0.2
                                                                                                                            0.2
                                                                                                                            0.2
                                                                                                                            0.4
                                                                                                                            0.2
                                                                                                                            0.0
                                                                                                                            0.2
                           FIGURE 27.  EXAMPLE OF CAASE5  OUTPUT TABLE 3, ALLOCATED FUELS

-------
WASHINGTON CUUNTY,  OHIO  (PARKE3SBURG-MARIETTA AQCR - NEDS 1972) TEST 1/78)
                                                                        APPORTIONED FUELS,  TABLE  Or  PAGE   1
SOURCE
NUMBER
COU.-FY
****** AIRCRAFT ******  **********  VESSELS **********  *** EVAPORATION »**  ******* MEASURED VEHICLE  MILES  ******
miT.  CIVIL  COMM'L,  BITUM.  OE.  OIL  RES.OIL  GAS   SOL.PUR.  GAS.MKTD.  LTD.ACC.  RUR.RDS.   SUB.RDS.  UR8.RDS.
LC10E2  LC10E1  LC1UE1    10E1T   10E4GAL  10E4GAL 10E3GAL  TONS/YR  10E5GALS    10E4MI    10E4MI    10E4MI
78
79
80
61
82
83
ea
85
86
87
88
89
90
91
93
93
94
9S
96
97
98
99
too
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
MASH
MASH
WASH
/•ASH
MASH
*ASH
MASH
MASH .
rtASH
WASH
MASH
MASH
MASH
WASH
MASH
WASH
rtASH
nASH
MASH
MASH
MASH
MASH
MASH
MASH
MASH
NASH
MASH
NASH
WASH
NASH
.HASH
hASH
WASH
MASH
MASH
WASH
WASH
WASH
MASH
MASH
MASH
WASH
MASH
WASH
MASH
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
3.2
0.3
9.1
2.7
0.6
37.9
16.5
4.1 •
1.0
0.5
1.3
1.1
0.3
0.0
1.0
0.3
4.1
3.7
16.5
16.5
3.6
0.8
1.0
3.9
15.9
9.2
4.1
.0
.0
.0
.0
.1
.0
.0
.0
.0
14.2
15.6
16.5
16.5
16.5
65.4
12.1
0.4
13.7
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0 .
0.0
0.0
0.0
0,0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
6.1
1.9
10.4
5.7
2.8
21.2
14.0
7.0
3.4
2.5
3.9
3.6
1.7
0.7
3.5
1.9
7.0
6.6
14.0
14.0
6.6
3.0
3.4
6.8
13.7
10.5
7.0
3.5
3.5
3.4
3.5
7.0
3.5
3.5
3.5
3.5
13.0
13.6
14.0
14.0
14.0
27.9
12.0
2.2
12.8
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.8
0.3
1.4
0.8
0.4
2.9
1.9
0.9
0.5
0.3
0.5
0.5
0.2
0.1
0.5
0.3
0.9
0.9
1.9
1.9
0.9
0.4
0.5
0.9
1.9
1.4
0.9
0.5
0.5
0.5
0.5
0.9
0.5
0.5
0.5
0.5
1.8
1.8
1.9
1.9
1.9
3.8
1.6
0.3
1.7
1.3
0.3
7,7
23.1
5.9
9.0
11.3
2.8
0.5
0.3
4.0
1.8
0.0
0.0
0,5
0.1
3.0
2.3
3.9
9.5
4.5
11.7
8.1
6.5
7.8
4.7
5.7
5.3
21.9
21.6
2.8
3.7
4.8
4.0
7.1
1.1
1.8
7.6
8.5
17.9
10.9
11.1
3.1
0.1
7.8
1.1
0.2
6.7
20.2
5.1
7.9
9.9
2.4
0.4
0.3
3.5
1.6
0.0
0.0
0.4
0.1
2.7
2.0
3.4
8.3
3.9
10.3
7.1
5.7
6.8
4.1
5.0
4.7
19.1
18.9
2.4
3.3
1.2
3.5
6.2
0.9
1.6
6.6
7.4
15.7
9.5
9.7
2.7
0.1
6.9
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0,0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                             0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               O.Q
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                               0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 .0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
                                                                                                 0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
                          FIGURE 28.   EXAMPLE OF CAASE5 OUTPUT TABLE  4,  ALLOCATED FUELS

-------
           CUUNIY,  UHIO  (PAMKERSSURG-MARIETTA  AOCR  • NEDS  1972)  TEST  1/78)
                                                                         APPORTIONED  FUELSr  TABLE   5,  PAGE  i
              DIRT ROS
/iASh
rtASH
MASH
MASH
rtASH
WASH
*ASH
MASH
MASH
WASH
WASH
MASH
SUUHCt
NUMBE8 COUNTY
  78
  79
  80
  81
  82
  63
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 US
 116
 117
 118
 119
 120
 121
 122
MASH
MASH
MASH
MASH
MASH
MASH
WASH
HASH
MASH
MASH
WASH
WASH
NASH
WASH
WASH
WASH
WASH
WASH
MASH
WASH
WASH
WASH
MASH
WASH
WASH
WASH
HASH
MASH
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0,0
0.0
0.0
0,0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
IRT
IR
RIPS
CYC
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0

CONSTK.
ACRES
10E3ACH
0.0
0.0
0.0
0.0
0.0
0.0
0.0
. 0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
MISC.
WIND
EROSIUN

0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0

LAND
TILLING

0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
                                                                                     AGRICULTURAL
                                                 FOREST  MILD  FIRES   MANAGED  BURNING   FIELD  BURNING
                                                 ACR BURN   QUANT.  AC!)  BURN    QUANT  ACR  BURN  QUANT
                                                           T/ACR              T/ACR           T/ACR
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
FROST
ORCH.
BURN.

0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0.
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
o.o
0.0
0.0
0.0
0.0
0.0
0.0
0.0
CONTROL
DAYS
FIRED
DY/YR
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
. 0.0

STRUC.
FIRES
«/YR
1.0
0.2
5.7
17.1
4.J-
6.7
8. a
2.0
0.3
0.2
3.0
1.4
0.0
0.0
0.4
0.1
2.3
1.7
2.9
7.0
3.3
8.7
6.0
1.8
5.B
3.5
4.3
4.0
16.2
16.0
2.1
2.8
3.5
3.0
5.2
0.8
1.3
5.6
6.3
13.3
8.1
S.2
2.3
0.1
5.8
                            FIGURE 29.   EXAMPLE OF CAASE5 OUTPUT TABLE 5, ALLOCATED FUELS

-------
WASHINGTON COUNTY,  OHIO   (PARKEKSBURG-MAR1ETTA AQCR • NEDS 1972) TEST 1/78)
                                                              APPORTIONED EMISSIONS*  TABLE   1,  PAGE   1
                                                                                           (PARTICIPATE)
                                                                                           (TONS PER YEAR)
          SOURCE
        POL IT             COORDINATES             ***************** RESIDENTIAL FUEL  *****************
REGION  JURIS   COUNTY    X(KM)    Y(KM)   (SO.KM)   ANTH.   BITUM.   DIST.OIL   RES.OIL   NAT.GAS    MOOD
78
79
80
81
82
83
84
8b
80
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
1/9
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
179
WASH
MASH
NASH
MASH
WASH
MASH
WASH
WASH
MASH
MASH
MASH
WASH
NASH
WASH
WASH
WASH
WASH
NASH
WASH
WASH
NASH
WASH
WASH
NASH
NASH
WASH
WASH
WASH
MASH
WASH
WASH
WASH
NASH
WASH
MASH
NASH
MASH
NASH
WASH
NASH
WASH
HASH
MASH
WASH
MASH
421.0
437.0
437.0
445.0
449.0
421.0
437.0
445.0
449.0
453.0
461.0
469.0
485.0
451.0
449.0
451.0
445.0
449.0
437.0
445.0
453.0
457.0
461.0
465.0
469.0
477.0
453.0
457.0
459.0
461.0
463.0
465.0
457.0
459.0
461.0
463.0
421.0
437.0
445.0
453.0
461.0
469.0
485.0
493.0
437.0
4335.0
4335.0
4343.0
4347.0
4347.0
4351.0
4351.0
4351.0
4351.0
4351.0
4351.0
4351.0
4351.0
4352.0
4353.0
4353.0
4355.0
4355.0
4359.0
4359.0
4359.0
4359.0
4359.0
4359.0
4359.0
4359.0
4363.0
4363.0
4363.0
4363.0
4363.0
4363.0
4365.0
4365.0
4365.0
4365.0
4367.0
4367.0
4367.0
4367.0
4367.0
4367.0
4367.0
4367.0
4375.0
12.30
1.16
35.39
10.65
2.49
147.29
64.00
16.00
3.74
1.98
4.95
4.30
1.00
0.18
4.00
1.19
16.00
14.44
64.00
64.00
14.18
3.04
3.75
15.15
61.71
35.86
16.00
4.00
3.95
3.68
4.00
16.00
4.00
4.00
4.00
4.00
55.10
60*69
64,00
64.00
64.00
254.55
47.13
1.53
53.42
0.0
0.0
0.0
0.1
0.0
0.1
0.1
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.1
0.1
0.0
0.0
0.0
0.0
0.0
0.2
0.1
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.1
0.1
0.1
0.0
0.0
0.0
0.1
0.0
o.a
2.4
0.6
1.0
1.2
0.3
0.0
0.0
0.4
0.2
0.0
0.0
0.0
0.0
0.3
0.2
0.4
0.9
0.4
1.2
1.0
0.7
0.8
0.5
0.6
0.6
2.9
2.0
0.3
0.4
0.6
0.5
0.9
0.1
0.2
0.8
0.8
1.9
1.1
1.2
o.a
0.0
0.9
                                                                                      0.0
                                                                                      0.0
                                                                                      0.2
                                                                                      0.5
                                                                                      0.1
                                                                                      0.2
                                                                                      0.2
                                                                                      0.1
                                                                                      0.0
                                                                                      0.0
                                                                                      0.1
                                                                                      0.0
                                                                                      0.0
                                                                                      0.0
                                                                                      0.0
                                                                                      0.0
                                                                                      o.t
                                                                                      0.0
                                                                                      0.1
                                                                                      0.2
                                                                                      0.1
                                                                                      0.2
                                                                                      0.2
                                                                                      0.1
                                                                                      0.2
                                                                                      0.1
                                                                                      O.t
                                                                                      0.1
                                                                                      0.6
                                                                                      0.4
                                                                                      O.I
                                                                                      0.1
                                                                                      0.1
                                                                                      0.1
                                                                                      0.2
                                                                                      0.0
                                                                                      0.0
                                                                                      O.t
                                                                                      0.2
                                                                                      0.4
                                                                                      0.2
                                                                                      0.2
                                                                                      0.1
                                                                                      0.0
                                                                                      0.2
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
                                                                              0.0
0.1
0.0
0.3
1.0
0.3
0.4
0.5
0.1
0.0
0.0
0.2
0.1
0.0
0.0
0.0
0.0
0.1
0.1
0.2
0.4
0.2
O.S
0.4
0.3
0.3
0.2
0.2
0.2
1.2
0.8
0.1
0.2
0.2
0.2
0.4
0.0
O.t
0.3
0.3
o.a
0.5
O.S
0.1
0.0
o.a
0.0
o.o
0.1
0.4
0.1
o.t
0.2
0.0
0.0
0.0
o.t
0.0
0.0
0.0
0.0
0.0
0.0
o.o
0.1
0.1
o.t
0.2
0.2
0.1
o.t
o.t
0.1
o.t
0.4
0.3
O.t
o.t
o.t
o.t
o.t
0.0
0.0
o.t
o.t
0.3
0.2
0.2
O.t
0.0
O.t
                      FIGURE  30.   EXAMPLE OF CAASE5  OUTPUT TABLE 1, ALLOCATED EMISSIONS, PARTICULATES

-------
WASHINGTON UJtWY,  JHIU   (PARKERSBURG-MARIETTA AQCR • NEDS 1972) TEST 1/78)
                                                         APPORTIONED EMISSIONS. TABLE  2, PAGE   1
                                                                                           (PARTICIPATE)
                                                                                           (TONS PER YEAR)
SUUHCt
NUMBt*
78
79
80
81
82
as
8U
S5
6b
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
lib
117
118
119
120
121
122

CUUn
.vASri
MASH
nASn
wASH
rtASrl
rtASH
AiASH
WASH
WASH
NASH
MASH
WASH
rtAStt
WASH
MASH
WASH
MASH
nASH
rtASH
MASH
nASH
WASH
nASH
MASH
nASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
HASH
HASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
                ******  COMMERCIAL  AND  INSTITUTIONAL FUEL *******  *********************** INDUSTRIAL FUEL ************************
                ANTH.   BITIIM.   OIST.OIL  RES.UIL  NAT.GAS  WOOD   ANTH.  BITLM.  COKE   OIST.OIL  RES.OIL  NAT.CAS  MOOD  PROC.GAS
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
                 0.0
 1.5
 0.3
 9.1
27.3
 6.9
10.7
13.4
 3.3
 0.5
 0.4
 4.8
 2.2
 0.1
 0.0
 0.6
 0.2
 3.6
 2.7
 4.6
U.2
 5.3
13.9
 9.6
 7.7
 9.3
 5.6
 6.a
 6.3
25.9
25.6
 3.3
 4.4
 5.6
 4.6
 8.4
 1.3
 2.1
 9.0
10.1
21.2
12.9
13.2
 3.6
 0.2
 9.3
0.1
0.0
0.7
2.1
0.5
0.8
1.0
0.3
0.0
0.0
0.4
0.2
0.0
0.0
0.0
0.0
0.3
0.2
0.4
0.9
0.4
1.1
0.8
0.6
0.7
0.4
0.5
0.5
2.0
2.0
0.3
0.3
0.4
0.4
0.7
0.1
0.2
0.7
0.8
1.7
1.0
1.0
0.3
0.0
0.7
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0 .
0.0
0.0
0.0
0.0
0.0
0.1
0.0
0.0
0.1
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.1
0.0
0.1
0.0
0.0
0.0
0.0
0.0
0.0
0.1
0.1
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.1
O.I
0.1
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0,0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
o.o
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
12.0
2.5
71. 5
214.8
54.4
83.8
104.9
25.6
4.3
3.0
37.6
17.2
0.4
0.2
4.6
1.4
28.3
21.3
36.0
68.0
41.6
109.3
75.6
60.4
72.7
43.9
53. S
49.6
203.6
200.9
26.1
34.6
44.3
37.6
65.7
9.8
16.7
70.6
79.3
166.7
101.2
103.4
28.5
1.4
73.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0,0
0.0
0.1
0.3
0.1
0.1
0.1
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.2
0.2
0.0
0.0
0.1
0.0
0.1
0.0
0.0
0.1
0.1
0.2
o.r
0.1
0.0
0.0
0.1
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0,0
0.1
0.2
0.0
0.1
0.1
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.1
0.0
0.1
0.1
0.1
0.1
0.0
0.0
0.0
0.2
0.2
0.0
0.0
0.0
0.0
0.1
0.0
0.0
0.1
0.1
0.1
0.1
0.1
0.0
0.0
0.1
0.0
0.0
0.0
o.o
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
o.o
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
o.o
0.0
0.0
o.o
o.o
0.0
0.0
0.0
0.0
0.0
o.o
0.0
0.0
0.0
0.0
0.0
o.o
0.0
0.0
0.0
0.0
0.0
o.o
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0,0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
o.o
0.0
0.0
0.0
o.o
o.o
0.0
0.0
0.0
0.0
0.0
0.0
                     FIGURE 31.  EXAMPLE OF CAASE5 OUTPUT TABLE 2,  ALLOCATED  EMISSIONS,  PARTICULATES

-------
WASHINGTON COUNTY,  OHIO   (PARKERS8URG-MARIETTA AQCR • NEDS 1972)  TEST  1/78)
                                      APPORTIONED EMISSIONS*  TABLE   3,  PAGE   1
                                                                                          (PARTICIPATE)
                                                                                          (TONS PER YEAR)
                *  ON  SITE  INCINERATION *
                HESID.   INOUST.  C-INST.
***** OPEN BURNING  ****   ********** GASOLINE FUEL **********  ********  DIESEL  FUEL *****
RESID.  INDUST.   C-INST.  LT.VEH.  LT.TRUK  HV.VEH.  OFF HINY   HV.VEH.   OFF HIMY  R.LOCC
78
79
80
81
62
83
84
85
66
B7
68
89
90
91
92
93
94
95
9t>
97
98
99
too
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
rtASH
MASH
«ASH
MASH
r.ASH
*ASH
WASH
NASH
hASH
MASH
MASH
MASH
WASH
MASH
MASH
MASH
MASH
MASH
MASH
MASH
WASH
MASH
MASH
MASH
WASH
MASH
WASH
WASH
MASH
MASH
MASH
WASH
WASH
MASH
WASH
WASH
NASH
WASH
WASH
WASH
MASH
MASH
MASH
MASH
MASH
0.3
0.1
1.9
5.9
1.5
2.4
2.8
0.7
0.1
0.1
1.0
0.5
0.0
0.0
0.1
0.0
0.8
0.5
0.9
2.2
1.1
3.0
2.5
1.6
2.0
1.3
1.4
1.5
7.0
4.6
0.8
0.9
1.5
1.2
2.1
0.3
0.5
1.9
2.0
4.6
2.6
2.9
0.9
0.1
2.1
0.1
0.0
0.7
2.1
0.5
0.8
1.0
0.2
0.0
0.0
0.4
0.2
0.0
0.0
0.0
0.0
0.3
0.2
0.4
0.9
0.4
1.1
0.7
0.6
0.7
0.4
0.5
0.5
2.0
2.0
0.3
0.3
0.4
0.4
0.6
0.1
0.2
0.7
0.8
1.6
1.0
1.0
0.3
0.0
0.7
0.0
0.0
0.2
0.5
0.1
0.2
0.2
0.1
0.0
0.0
0.1
0.0
0.0
0.0
0.0
0.0
0.1
0.1
0.1
0.2
0.1
0.3
0.2
0.1
0.2
0.1
0.1
0.1
0.5
0.5
O.I
0.1
0.1
0.1
0.2
0.0
0.0
0.2
0.2
0.4
0.2
0.2
0.1
0.0
0.2
0.1
0.0
0.7
2.3
0.6
0.9
1.1
0.3
0.0
0.0
0.4
0.2
0.0
0.0
0.0
0.0
0.3
0.2
0.4
0.8
0.4
1.1
1.0
0.6
0.8
O.b
0.5
0.6
2.7
1.8
0.3
0.3
0.6
0.5
0.8
0.1
0.2
0.7
0.8
1.7
1.1
1.1
0.3
0.0
o.a
O.I
0.0
0.7
2.1
0.5
0.8
1.0
0.2
0.0
0.0
0.4
0.2
0.0
0.0
0.0
0.0
0.3
0.2
0.4
0.9
0.4
1.1
0.7
0.6
0.7
0.4
0.5
0.5
2.0
2.0
0.3
0.3
0.4
0.4
0.6
0.1
0.2
0.7
O.B
1.6
1.0
1.0
0.3
0.0
0.7
0.0
0.0
0.3
0.8
0.2
0.3
0.4
0.1
0.0
0.0
0.1
0.1
0.0
0.0
0.0
0.0
0.1
0.1
0.1
0.3
0.2
0.4
0.3
0.2
0.3
0.2
0.2
0.2
0.7
0.7
0.1
0.1
0.2
0.1
0.2
0.0
0.1
0.3
0.3
0.6
0.4
0.4
0.1
0.0
0.3
0.0
0.0
0,0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0,0
0.0
0.0
0,0
0.0
0,0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0,0
0.0
0.0
0.0
o.o
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0,0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0,0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
o.o
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.1
0.0
0.1
0.0
0.0
1.1
0.2
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
o.s
0.2
0.0
0.0
0.0
0.0
0.2
0.1
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
o.a
0.2
0.2
0.1
0.2
2.6
0.3
0.0
0.2
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
o.o
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
o.o
o.a
0.0
0.5
0.0
0.0
7.3
1.1
0.3
0.1
0.0
0.0
0.0
0.1
0.0
0.1
0.0
0.3
0.3
3.2
1.3
0.1
0.0
0.0
0.1
1.5
0.8
0.1
0.0
0.0
0.0
0.0
0.2
0.0
0.0
0.0
0.0
5.1
1.5
1.5
0.7
1.1
17. b
2.2
0.0
l.l
0.0
0.0
0.0
o.a
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
o.o
0.0
0.0
0.0
0.0
0.0
o.o
0.0
0.0
0.0
0.0
0.0
0.1
0.0
o.o
0.0
                      FIGURE 32.   EXAMPLE OF  CAASE5 OUTPUT TABLE 3,  ALLOCATED EMISSIONS, PARTICULATES

-------
COUNTY,  UH10  (PARKEHSBURG-MARItTTA AQCR - NEOS 1972) TEST 1/76)
APPORTIONED EMISSIONS,  TABLE   4,  PAGE   1
                                                                                (PARTICIPATE)
                                                                                (TONS PER YEAR)
     ****** AIRCRAFT  ******  ********** VESSELS **********  ***  EVAPORATION  ***   ******* MEASURED VEHICLE MILES ******'
     MILIT.  CIVIL  COMM'L.  BITUM. DE. OIL  RES.OIL  GAS   SOL.PUR.   GAS.MKTO.   LTD.ACC.  RUR.RDS.  SU8.RDS.  URB.RDS
/8
79
80
ai
82
SJ
84
as
8b
87
88
89
90
91
92
93
9«
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
NASH
WASH
WASH
WASH
wASH
WASH
.v ASH
WASH
nASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
MASH
WASH
WASH
WASH
WASH
WASH
MASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
WASH
MASH
WASH
WASH
WASH
WASH
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.1
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.2
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
o.o
0.0
o.o
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.7
0.2
1.2
0.7
0.3
2.5
1.7
0.8
0.4
0.3
0.5
0.4
0.2
0.1
0,4
0.2
0.8
0.8
1.7
1.7
0.8
0.4
0.4
0.8
1.6
1.3
0.8
0.4
0.4
0.4
0.4
0.8
0.4.
0.4
0.4
0.4
1.6
1.6
1.7
1.7
1.7
3.3
1.4
0.3
1.5
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.8
0.0
1.1
0.0
0.0
15.5
2.3
0.6
0.2
0.1
0.0
0.1
0.1
0.0
0.2
0.1
0.5
0.6
6.6
2. a
0.3
0.0
0.0
0.2
3.1
1.8
0.3
0.0
0.0
0.0
0.0
0.1
0.0
0.0
0.0
0.1
10.9
3.1
3.1
1.5
2.4
37.6
4.7
0.1
2.3
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                                                                                    0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
                                          0.0
         FIGURE 33.  EXAMPLE OF CAASE5 OUTPUT TABLE 4, ALLOCATED EMISSIONS, PARTICULATES

-------
WASHINGTON COUNTY,  OHIO   (PARKERSBURG-MARIETTA AQCR • NEDS 1972)  TEST  1/78)
APPORTIONED EMISSIONS*  TABLE   5, PAGE   1

           (PARTICIPATE)
           (TONS  PER  YEAR)
                        DIRT            MISC.                                               AGRICULTURAL   FROST CONTROL
SOURCE        DIRT  R03   AIR    CONSTR.  WIND     LAND    FOREST  MILD  FIRES   MANAGED BURNING  FIELD BURNING  ORCH.    DAYS    STRUC.
NU«BtR CUUNTr  IRAVELtU  STRIPS   ACRtS  EROSION  TILLING  ACR BURN   QUANT.  ACS BURN   QUANT ACR BURN QUANT  BURN.    FIRED  FIRES
76
79
80
«1
82
83
64
85
86
87
as
89
90
9t
92
9J
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
,1ASH
WASH
WASH
rtASn
WASH
MASH
MASH
,lASH
WASH
WASH
WASH
MASH
f:A3H
MSH
MASH
MASH
HASH
MASH
MASH
MASH
MASH
WASH
WASH
MASrl
WASH
MASH
WASH
WASH
WASH
MASH
MASH
MASH
WASH
MASH
WASH
MASH
WASH
WASH
WASH
MASH
WASH
MASH
WASH
HASH
NASH
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0,0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0,0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0,0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0,0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0 .
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
o.o
0.0
o.o
0.0
o.o
0.0
0.0
o.o
0.0
0.0
o.o
0.0
0.0
0.0
o.o
0.0
0.0
0.0
0.0
0.0
0.0
o.o
0.0
0.0
0.0
0.0
0.0
0.0
o.o
0.0
0.0
o.o
0.0
0.0
0.0
o.o
0.0
0.0
o.o
0.0
0.0
0.0
0.0
0.0
0.0
0.1
o.o
0.3
0.9
0.2
o.u
0.5
0.1
0.0
0.0
0.2
0.1
0.0
0.0
0.0
0.0
0.1
0.1
0.2
0.4
0.2
0.5
o.s
0.3
0.3
0.2
0.2
0.2
0.9
0.9
0.1
O.I
0.2
0.2
0.3
o.o
O.I
0.3
0.3
0.7
0.4
0.4
o.t
o.o
0.3
                     FIGURE 34.  EXAMPLE OF CAASE5 OUTPUT TABLE 5, ALLOCATED EMISSIONS, PARTICULATES

-------
WASHINGTON COUNTY,  OHIO   (PARKERSBURG-MARIETTA AOCR  •  NEDS  1972) TEST 1/78)
TOTALS BY SOURCE CATEGORY FOR POLLUTANT  SP  (TONS/.YR)
1.800 Si. 500 6.400 0.0
l.bbO 0.0 0.0 2875.183
81.440 IB. 000 6.800 31.200
0.0 62.604 0.875 0.0
O.U 0.0 0.0 133.494
0.0 0.0 0.0 0.0
FOR POLLUTANT SP TOTAL EMISSIONS*
TOTALS BY SOUKCE CATEGORY FOR POLLUTANT
0.0 280.060 9.216 0.0
0.099 0.0 0.0 2009.743
1.272 e.7SO 2.125 1.950
0.0 56.024 1.995 0.0
0.0 0.0 0.0 51.097
0.0 0.0 0.0 0.0
FOR POLLUTANT S02 TOTAL EMISSIONS*
TOTALS BY SOURCE CATEGORY FOR POLLUTANT
0.540 5.025 7.660 0.0
19.000 0.0 0.0 180.300
2.505 10.500 2.550 11.700
0.0 693.720 12.950 0.0
0.0 0.0 0.0 1317.095
0.0 0.0 0.0 0.0
FOR POLLUTANT NOX TOTAL EMISSIONS*
TOTALS BY SOURCE CATEGORY FOR POLLUTANT
0.450 33.500 1.920 0.0
1.320 0.0 0.0 12.020
229.050 17.500 4.250 58.500
0.0 75.952 3.290 0.0
309.000 297.000 0.0 1457.260
0.0 0.0 0.0 0.0
FOR POLLUTANT HC TOTAL EMISSIONS*
TOTALS BY SOURCE CATEGORY FOR POLLUTANT
16.200 150.750 3.200 0.0
3.300 0.0 0.0 24.040
687.150 40.250 9.775 165.750
0.0 19S.520 4.550 0.0
0.0 0.0 0.0 7935.555
0.0 0.0 0.0 0.0
13.700 5.000
0.0 3.525
28.000 10.400
1.229 0.0
0.0 0.0
0.0 12.366
3796.844
S02 (TONS/YR)
0.822 0.300
0.0 3.572
1.750 0.650
0.244 0.0
0.0 0.0
0.0 0.023
3102.436
NOX (TONS/VR)
109.600 2.000
0.0 14.100
10.500 3.900
1.110 0.0
0.0 0.0
0.0 1.076
3199.894
HC (TONS/YR)
10.960 4.000
0.0 0.705
52.500 19.500
5.443 0.0
0.0 0.0
0.0 3.206
3069.306
CO (TONS/.YR)
27,400 4.000
0,0 0.940
148.750 55.250
31.104, 0.0
0.0 10759.125
0,0 27.938
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                                                              0.0
                              366.019
                                a.400
                                0.0
                               53.160
                                0.0
                              573.496
                                0.144
                                0.0
                               66.450
                                0.0
                               31.556
                               43.ZOO
                                0.0
                              496.160
                                0.0
                                6.860
                                0.730
                                0.0
                              130.242
                                0.0
                               24.696
                                4.080
                                0.0
                              173.656
                                0.0
 28.72S
  0.0
  0.0
  0.0
  0.0
 27.576
  0.0
  0.0
  0.0
  0.0
114.900
  0.0
  0.0
  0.0
  0.0
  5.745
  0.0
  0,0
  0.0
  0.0
  7.660
  0.0
  0.0
  0.0
  0.0
   0.0
   0.0
   9.346
   0.0
   0.0
   0.0
   0.0
   4.892
   0.189
   0.0
   0.0
   0.0
 106.567
   0.822
   0.0
   0.0
   0,0
 300.484
  27.930
   0.0
   0.0
   0.0
3406.650
  88,800
   0.0
FOR POLLUTANT  CO  TOTAL EMISSIONS*
23996.070
FOOTNOTE:   CATEGORIES BY  ROW IN SAME ORDER AS AREA  SOURCE NEDS  INPUT FORM AND CAASE5 OUTPUT TABLES
   FIGURE  35.   EXAMPLE  PRINTOUT OF COUNTY TOTAL EMISSIONS FOR ALL SOURCE CATEGORY
                           AND POLLUTANT  COMBINATIONS,  CAASE5

-------
        «ASMI*G10hi CUUMTY,  OHIO   (PA«KE«SBUKG-MAHIETTA AQCR - NfcDS 1972)  TEST 1/78)
IPP INPUT CARD IMAGES
U)
1799999
1799999
1799099
1 799999
1799999
1799999
1799999
1 799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
1799999
7H042104S350
7904370.14350
H004 3/043430
H104-45043470
82044904 J470
123
12
354
106
25
B30421U4S5101473
84043/043510
H50445043510
8o04490U$510
870453043510
8b04el0435lO
890469043510
900485043510
910451043520
920449043530
930451043530
9404450U3550
950449043550
96043704 S590
970445043590
980453043590
990457043590
1000461043590
1010465043590
1020469043590
1030477043590
1040453043630
1050457043630
1060459043630
1070461043630
1080463043630
1090465043630
1100457043650
1110459043650
1120461043650
1130463043650
1140421043670
1150437043670
1160445043670
1170453043670
1 180461043670
640
160
37
20
49
43
10
2
40
12
160
144
640
640
142
30
3«
151
617
359
160
40
39
39
40
160
40
40
40
40
551
607
640
640
640
1 1904690436702545
1200465043670
1210493043670
1220437043750
1230445045750
1240453043750
1250461043750
1260465043750
471
15
534
640
640
640
600
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
33
0.038
0.008
0.205
0.599
0.153
0.278
0.302
0.075
0.014
0.010
0.106
0.049
0.002
0.001
0.015
0.005
0.083
0.063
0.121
0.254
0.118
0.304
0.216
0.171
0.215
0.131
0.151
0.140
0.581
0.551
0.075
0.100
0.127
0.107
0.187
0.029
0.077
0.208
0.232
0.472
0.292
0.386
0.096
0.005
0.214
0.238
0.1H8
0.139
0.173
0.046
0.009
0.248
0.725
0.184
0.355
0.367
0,091
0.016
0.011
0.126
0.059
0.003
0.001
0.017
0.005
0.100
0.076
0.154
0.311
0.143
0.369
0.258
0.206
0.263
0.159
0.183
0.169
0.694
0.673
0.090
0.120
0.152
0.129
0.224
0.035
0.107
0.255
0.284
0.572
0.355
0.517
0.120
0.006
0.260
0.2B9
0.230
0.173
0.212
0.059
0.009
0.117
0.136
0.039
0.787
0.202
0.062
0.021
0.013
0.034
0.023
0.012
0.003
0.023
0.009
0.061
0.058
0.360
0.212
0.056
0.069
0.054
0.064
0.219
0.134
0.063
0.039
0.128
0.116
0.027
0.060
0.037
0.033
0.049
0.021
0.524
0.217
0.221
0.198
0.204
1.776
0.257
0.012
0.182
0.221
0.251
0.317
0.240
0.047
0.006
0.122
0.224
0.058
0.692
0.208
0.055
0.015
0.008
0.043
C.023
0.008
0.001
0.016
0.006
0.056
0.050
0.307
0.206
0.059
0.113
0.085
0.076
0.206
0.122
0.071
0.055
0.225
0.198
0.032
0.058
0.052
0.044
0.070
0.017
0.440
0.202
0.210
0.238
0.208
1.550
0.218
0.008
0.176
0.213
0.228
0.275
0.216
0.329
0.039
1.092
2.501
0.637
4.689
1.791
0.449
0.102
0.057
0.449
0.219
0.042
0.006
0.108
0.034
0.467
0.396
2.057
1.696
0.558
1.268
0.899
0.763
1.610
0.946
0.694
0.588
2.410
2.301
0.320
0.516
0.532
0.452
0.779
0.143
2.798
1.579
1.671
2.301
1.770
10.158
1.462
0.044
1.426
1.686
1.688
1.884
1.588
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
i9
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
39
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100
7100



































A
A
A
A
A
A








                   FIGURE 36.  EXAMPLE  PRINTOUT OF DISPERSION MODEL INPUT  CARD IMAGES, CAASE5,  IPP MODEL

-------
               TABLE 16.   OUTPUT TAPE RECORD LAYOUT FOR CAASE5

              OUTPUT FROM OUTPT1 SUBROUTINE (ALLOCATED FUELS)
(HEADER RECORD)
Record Position

2
6
19
29
39
49
62
75
88
1
- 5
- 18
- 28
- 38
- 48
- 61
- 74
- 87
- 100
Format

IX
A4
E13.5
110
110
no
El 3. 5
E13.5
E13.5
E13.5
                                                  Variable Name

                                                  CARRIAGE CONTROL  (FILLER)
                                                  IREGN
                                                  STATE
                                                  KDUNTY
                                                  NAREAS
                                                  IPUT
                                                  TONSFW
                                                  TONSMB
                                                  TONSAF
                                                  DAYSF
(FOR EACH GRID SQUARE (SUBSCRIPTED  ON  I)  FOR THIS COUNTY, NAREAS IN NUMBER)

                                                   ID (I)
    1 -  10
   11 -  23
   24 -  36
   37 -  49
   50 - 777
110
E13. 5
E13.5
E13. 5
56E13.5
                                                  AREA  (I)
                                                  APFUEL  (J,I)+
            OUTPUT FROM OUTPT2 SUBROUTINE (ALLOCATED EMISSIONS.
                    REPEATED FOR EACH OF THE POLLUTANTS).
(HEADER RECORD)

Record Position

2 -
6 -
19 -
29 -
39 -
49 -
62 -
75 -
88 -
1
5
18
28
38
48
61
74
87
100
Format

IX
A4
E13. 5
110
110
110
El 3. 5
E13.5
E13.5
E13. 5
                                                  Variable Name

                                                  CARRIAGE CONTROL  (FILLER)
                                                  IREGN
                                                  STATE
                                                  KDUNTY
                                                  NAREAS
                                                  IPUT
                                                  XK
                                                  DUM
                                                  DUM
                                                  DUM
  (FOR EACH GRID SQUARE FOR THIS COUNTY,  NAREAS IN NUMBER)

  (SAME AS OUTPUT FROM OUTPT1 SUBROUTINE,  EXCEPT THAT POSITIONS 50-777 CONTAIN
  ALLOCATED EMISSIONS INSTEAD OF ALLOCATED FUELS.)
  *Repeated for each county being processed.

  "^Source category subscripted on J.
                                         114

-------
            TABLE 16. OUTPUT TAPE RECORD LAYOUT FOR CAASE5 (CONT.)


COUNTY TOTALS OF EMISSIONS FOR THIS POLLUTANT BY SOURCE CATEGORY

Record Position               Format                Variable Name

   1 - 728                    56E13.5               POLTOT (J,K)*

      OUTPUT FROM OUTPT3 SUBROUTINE (DISPERSION MODEL INPUT CARD IMAGES)

(FOR EACH GRID SQUARE FOR THIS COUNTY, NAREAS IN NUMBER)


Record Position               Format                Variable Name

   1-80                      +                          +
*Source category subscripted on J; pollutant subscripted on K.

~*See Area Source Input Card format in user's manuals for the IPP, COM, and AQDM
 dispersion models*
                                         115

-------
            TABLE 17.   DEFINITIONS OF CAASE5 OUTPUT TAPE  VARIABLES
Variable Name
   IREGN

   STATE

   KOUNTY

   NAREAS


   IPUT
   TONSFW

   TONSMB

   TONSAF


   DAYSF
   ID (I)
   AREA(I)


   APFUEL(J,I)
Source

HEADER RECORD, OUTPTl
SUBROUTINE
Definition
                  DETAIL RECORDS,  OUTPTl
                  SUBROUTINE
                         Code number of selected study area

                         State number (FIPS)  for this county

                         County number (EPA)  for this county

                         Number of grid squares for this
                         county

                         (Type of output)  Code number for
                         source of following  records where:
                           IPUT-1 OUTPTl
                               -2 OUTPT2
                               -3 OUTPT3

                         Tons/acre burned, forest wildfires

                         Tons/acre burned, managed burning

                         Tons/acre burned, agriculture field
                         burning

                         Frost control, orchard heaters,
                         days/fired, days/year
                         Grid square sequence number

                         UTM Easting coordinate of the lower
                         left hand corner of this grid square

                         UTM Northing coordinate of the lower
                         left hand corner of this grid square

                         Area of this grid square contained in
                         this county

                         Allocated fuels to this grid
                         square-source category combination
                         where J is source category number
                         (fuels are in the same units as on
                         the Area Source Input cards, see
                         Figure 14)
                                       116

-------
        TABLE 17.   DEFINITIONS OF CAASE5 OUTPUT TAPE  VARIABLES  (CONT. )
Variable Name
   IREGN

   STATE

   KOUNTY

   NAREAS

   IPUT

   XK
   DIM
   ID a)
   AREA(I)

   APFUEL(J,I)
Source

HEADER RECORD*,
OUTPT2 SUBROUTINE
Definition
                  DETAIL RECORDS,
                  OUTPT2 SUBROUTINE
                       As before

                       As before

                       As before

                       As before

                       As before

                       Code number for which of the five
                       pollutants follow,  where:
                         XK-1.0 (TSP)
                           =2.0 (S02)
                           =3.0 (NOX)
                           =4.0 (HC)
                           =5.0 (CO)

                       Filler to make header records
                       compatible
                       As before

                       As before

                       As before

                       As before

                       As before,  except array contains
                       allocated emissions,  pollutant
                       determined  by value of XK (see above)
     header record, detail records, and county total records as a set are
 repeated in sequence for the 5 pollutants.
                                       117

-------
        TABLE 17.   DEFINITIONS OF CAASE5 OUTPUT TAPE VARIABLES (CONT.)


Variable Name     Source                 Definition

                  ADDITIONAL RECORDS,
                  OUTPT2 SUBROUTINE
                  (FOLLOWING EACH OF
                  THE 5 POLLUTANTS)

POLTOT (J,K)                             County totals of  emissions for this
                                         pollutant (K) for each source  category
                                         (J)

                  RECORDS OUTPUT FROM
                  OUTPT3 SUBROUTINE

(CARD IMAGES)                            See dispersion model area source card
                                         formats in IPP, AQDM, or COM User's
                                         Manuals
                                       118

-------
emissions*  The header records define which subroutine has been called,




identify the detailed records that follow, and define the number of them.




OUTPT3 writes dispersion model card images.




6.4  Job Control Language (JCL) and Deck Setup




     An example of a deck setup configuration is illustrated in Figure 23.




Using the Parkersburg-Marietta AQCR (#179) as an example study area, and




Washington County, Ohio as an example county, the associated JCL and input data




cards are illustrated in Figure 37.  They describe the following:




     A.  The main program is in source language form.  For illustration




         purposes, the set of variable dimensions has been set to 61 and the




         variable NDIM has been set to 60  (permitting up to 60 grid squares per




         county being processed).  [The CAASE4 output (see Figure 17) for




         Washington County has a grid square count of 58; therefore, these




         dimensions are adequate.]




     B.  The CAASE5 subroutine, and the subroutines it calls, are in object




         deck form.




     C.  The allocated fuels, emissions, and dispersion model card Images will




         be written on tape as Fortran unit number 5.  It will be labeled




         "AQCR179.APPORT.EMISS".  The volume and serial name is "KKKKKK".




     D.  The apportioning factor file (output from CAASE4) is on tape as




         Fortran unit number 6.  It is labeled "AQCR179.APPORT.FACT".  The




         volume and serial name is "JJJJJJ".




     E.  Dispersion model input cards will be punched on the installation




         dependent standard card punch device.




     F.  The emission factor cards, dispersion model selection card, county




         selector card, heading card, and NEDS Area Source fuels (throughput)




         cards are on the installation dependent standard card input device.




         IPP card images are requested.  Washington County, Ohio is to be
                                      119

-------
//CAASE5 JOB RTI.C44.PO1303,HAWS,PRTY-0,M-l,T-l,REGION=100K,PAGES-200,
// CARDS-100
// EXEC FTGCLG
//*
//*   C.SYSIN IS FOR THE CAASE5 DRIVER PROGRAM WHICH IS COMPILED FOR EACH
//*   RUN WHEN IT IS NECESSARY TO REDEFINE DIMENSIONS.
//C.SYSIN DD *
C     DRIVER FOR CAASE5 TO SET DIMENSIONS
C     MUST BE RECOMPILED ANYTIME IT IS NECESSARY TO SET DIMENSIONS
      DIMENSION APPORT(56, 61) .OUTIPP (61, 5) ,ID(61) ,X(61),Y(61) ,
     1AREA(61).APFUEL(56, 61)
C
C***  NDIM HAS TO BE AT LEAST AS LARGE AS THE LARGEST NUMBER OF
C     GRID SQUARES IN ANY OF THE COUNTIES BEING PROCESSED DURING
C     THIS RUN...THE ACTUAL DIMENSIONS MUST BE ONE GREATER THAN NDIM
C
      NDIM- 60
      CALL CAASE5 (APPORT,OUTIPP,APFUEL,ID,X,Y,AREA,NDIM)
      CALL EXIT
      END
/*
//L.SYSIN DD *
                             (OBJECT DECKS GO HERE)
/*
//*   UNIT 5 IS THE TAPE OUTPUT OF APPORTIONED EMISSIONS AND FUELS.
//G.FT05F001 DD DSN«AQCRl 79. APPORT. EMISS,UNIT-TAPE,
//  LABEL-(l,SL),DCB-(RECFM^B,LRECL-777,BLKSIZE-1554,DEN-3),
//  DISP-(NEW,KEEP),RING-IN, VOL"«ER-KKKKKK
//*
//*   UNIT 6 IS THE TAPE INPUT OF APPORTIONING FACTORS
//*   PRODUCED BY CAASE4.
//G.FT06F001 DD DSN-AQCR179. APPORT. FACT,UNIT-TAPE,
//  LABEL-(l,SL),DCB-(RECFM-FB,LRECL-830,BLKSIZE-8300,DEN-3),
//  DISP-(OLD,KEEP),VOL-€ER^JJJJJJ
//*
//*   G.SYSPUNCH IS THE UNIT RECEIVING PUNCHED CARD IMAGES
//*   FOR THE DISPERSION MODEL INPUT FORMAT SELECTED BY THE USER.
//G.SYSPUNCH DD SYSOUT-B
//G.SYSIN DD *
                    (EMISSION FACTORS GO HERE,  SEE FIGURE 22)
    1
         39       167       179        58      WASH 7100   36         PKB-MAR179
   WASHINGTON COUNTY,  OHIO (PARKERSBURG-MARIETTA AQCR - NEDS 1972) TEST 1/78
                           (NEDS AREA SOURCE CARDS A1-A5 FOR THIS  COUNTY FOLLOW)
36710017972                         440190   184   36   335  128   0  274   4 Al
36710017972  0  686  383   0  33  0     0  2404   0   47    0   48  0   0     A2
36710017972 509   70  17   39     35   13  20178  4038  1747  2121  376    74 A3
36710017972 0   432    00 443     0  60   309  270     0     0     0      0 A4
36710017972    0000     0      00     00     0000  229 A5
                    (BLANK CARD INDICATING NO MORE COUNTIES)

   (IF MORE COUNTIES WERE TO BE PROCESSED, THEN THE REQUEST CARD,  HEADER CARD,
             AND NEDS A1-A5 CARD SETS WOULD FOLLOW FOR  EACH COUNTY.)

                FIGURE 37.  JCL AND INPUT CARD EXAMPLE  FOR CAASE5
                                         120

-------
         processed; it contains 58 grid squares.   NEDS  Area Source cards  Al




         through A5 for the Washington County,  Ohio emissions  inventory are  to




         be used*




      [At the installation where CAASE was developed,  the cataloged procedure




"FTGCLG" that will be executed (Fortran G,  Compile, Link-Edit,  and Go  - some




object decks may be included in the input)  assigns Fortran I/O  devices 1,  2,




and 3 to the card reader, card punch, and printer, respectively.]




6.5  Warnings and Limitations




     The CAASE5 main program is used to set dimensions  and to  pass them to the




CAASE5 subroutine (which does most of the work) as "variable dimensions." The




variable NDIM is related to the number of grid  squares; it must be as  large  as




the largest number of grid squares in any county currently being processed.




NDIM is passed to the CAASE5 subroutine as a variable dimension; CAASE5 passes




NDIM to the subroutines it calls.  The value assigned to the Fortran Dimension




statements in the main program must be at least one larger than the value




assigned to NDIM.  (This is necessary because whenever  the CAASE5  subroutine




reads the grid square file, the end of the set  of grid  squares for one county




is signaled by reading the first record of the  next county; i.e.,  the  county ID




number changes.  The end-of-file condition signals the  end of  the  set  of  grid




squares for the last county in the file.)  Setting the  dimensions  higher  than




necessary would increase computer core storage  requirements and, if




significantly higher, could be reflected in higher computer facility charges.




     In order to estimate the number of pages of printed output to expect from




a CAASE5 run, keep in mind that 30 pages of tables are  printed for every  set of




45 grid squares in each county.




     The EPA/NADB algorithm for calculating emissions from highway motor




vehicles (in the NEDS system) is used by CAASE5.   It  calculates estimated
                                       121

-------
vehicle miles traveled  (VMT) by vehicle class and average miles per gallon




using fuels marketed data*  It then distributes these VMT values  to road




classes (urban, rural,  suburban, and limited access) proportional to the




measured vehicle miles  reported on the NEDS Area Source Input form.  However,




if measured vehicle miles are missing for all road categories (numbers 43




through 46 in Table 12), then an alternative method, even though  less desir-




able, must be used.  In this case, the estimated degree of urbanization of  the




county can be used; this number is recorded in column number 77 of the NEDS




Area Source Input card  "A3" as "Pop.Code" (population code).  Because the value




represents urbanization only, the algorithm does not attempt to estimate




vehicle miles traveled  on suburban or limited access roads.  For example, an




urbanization code of 3 would indicate 30% urbanization; the algorithm would




assign 30% of the VMTs  to the urban road class and 70% to the rural road class.




If the urbanization code is also missing, the algorithm uses 90% urbanization




to approximate the "worst case." Measured vehicle miles should be entered if




available.  If this is not possible, the user should estimate and enter a




population code when it is missing.




     Although all counties do not have to be processed during a computer run,




those processed must be in the same order as the CAASE4 apportioning factor




output file.  Also, the NEDS Area Source cards must be in the same order, by




counties,  as the county selector cards; if the cards are out of order, an error




message is printed and processing is terminated.




     In some cases, a state or local agency may want to use emission factors




that are different from the national ones.  These present no problems because




emission factors are read in by CAASE5 at program execution time.  However,




because CAASE5 reads emission factor data only once for a CAASE5 run, counties




with local emission factors will have to be processed in separate runs if their




emission factors are different from those of another county.
                                       122

-------
     In the output tables, zero entries can be caused in several different




ways.  If no fuels were reported, or if an emission factor was not available,




then obviously the output would be zero.  If an overriding weighting factor was




used, the user could selectively cause zeroes in some of the grid squares.  If




the amount allocated to a grid square is less than .05 units, rounding to the




nearest .1 units for output printing would cause a zero to be printed.  These




small fractions are retained in the storage arrays in their original precision




for any additional CAASE5 calculations.




     If the percentages of ash and sulfur content are left blank on the area




source input cards, their default value will be zero.  Emissions from those




source categories and pollutant combinations requiring ash or sulfur content




will, therefore, be calculated as being zero.
                                       123

-------
124

-------
7.0  SUBROUTINE DESCRIPTIONS




     This section contains a description of all subroutines used in the CAASE




system of programs.  Flowcharts are included in the Appendixes with the




appropriate CAASE calling program.




7.1  CED009 Subroutine




     The CED009 subroutine is used by CAASE1 for the conversion of coordinates




expressed in latitude and longitude to Universal Transverse Mercator (UTM)




coordinates.  The subroutine was obtained from the Mathematics and Computation




Laboratory, National Resource Evaluation Center.  It is described in NREC




Technical Manual No. 187, dated July 1966.  The subroutine will convert




coordinates worldwide.  CED009, as originally received, used five spheroid




models which were: (1) International; (2) Clarke, 1866; (3) Clarke, 1880; (4)




Everest; and (5) Bessel.  Tables of coefficients necessary for the conversion




equations are contained in a FORTRAN BLOCK DATA Subroutine.  To minimize




computer core storage requirements, the subroutine has been modified to deal




only with the Clarke 1866 spheroid (the standard spheroid used in the United




States for dispersion modeling).  The BLOCK DATA Subroutine was modified to




remove all tables of coefficients which were not related to the Clarke 1866




spheroid.  The routine will convert geographic latitudes from 80° south of the




Equator to 80° north of the Equator, with those south of the Equator being




considered negative.  The routine will convert any longitude from 180° west to




180° east of Greenwich, with those west of Greenwich being considered




negative.  As a result, the CAASE1 program sets the longitudes from the MED-X




census data tapes to a negative value because all of the locations within the




contiguous United Sates have west longitudes.  Input variables to this




subroutine are communicated through the subroutine call argument list except




for the tables of coefficients.  Those are communicated through FORTRAN




labeled COMMON and are set in the BLOCK DATA Subroutine.
                                       125

-------
     CED009 permits the entry of the geodetic location in radians or seconds




with two different scaling factors for each.  For consistency, CAASE1 calls




CED009 with latitude and longitude in seconds scaled by 105.




     An error condition indicator is returned to the calling program.  CAASE1




checks the error condition and prints an error message if necessary.




7.2  GTGR Subroutine




     The GTGR (grid-to-grid) subroutine converts UTM location coordinates from




one UTM zone to another.  It is used by CAASE1 and CAASE2 when a study area




straddles a UTM zone boundary.




     It is necessary in order to construct a grid made up of contiguous




squares of unequal size for a common origin to be established for the entire




study area. The subroutine permits the grid-to-grid conversion from east to




west, or from west to east; for example, in any two neighboring zones, one can




express the coordinates in the eastern zone as points relative to the western




zone or, conversely, can express the points in the western zone as coordinates




relative to the eastern zone.




     The subroutine was developed by EPA.  The mathematical formulae to




convert coordinates from one UTM zone to another are those contained in the




Department of the Army Technical Manual TM-5-241-8, entitled "Universal




Transverse Mercator Grid" (July 1958), Chapter 5, Section 31.  Tables used in




the GTGR subroutine are from the Department of the Army Technical Manual




TM-5-241-2.  Calculations are carried out in FORTRAN DOUBLE PRECISION




arithmetic, and the tables for making the conversion are in a FORTRAN DEFINE




FILE statement and reside on disk.  To minimize computer storage requirements,




only the necessary portion of the tables are read in to central core for each




point to be converted.
                                       126

-------
     The FORTRAN source code for a program to create the file of GTGR tables




is contained in Appendix F.  A listing of the card images containing the GTGR




tables is also included in Appendix F.




     The CAASE system will permit either UTM zone to be declared the "primary"




zone, but the user is cautioned that when selecting the eastern zone it is




possible to generate negative easting (east-west) UTM coordinates.  Negative




coordinates are not compatible with the input requirements of the IPP, AQDM,




and CDM dispersion models.  For the CAASE applications thus far, the western




zone has been declared the "primary" zone with few exceptions.  However,




since a distortion error is introduced when converting from one zone to




another, and is directly proportional to the distance the point is from




outside of the "primary" zone, the user should be aware that if most of a




study area lies in the eastern zone, less distortion will be introduced by




making the eastern zone the "primary" zone.  The introduction of negative




easting coordinates must still be avoided.




     GTGR is used by CAASE1 for the conversion of location coordinates for




census data (from the MED-X file) from one zone to another.  When necessary




it is used in the same manner by CAASE2 for the conversion of location




coordinates describing the county outline segments.




7.3  INBOUN Subroutine




     Subroutine INBOUN (used by CAASE2) reads control cards and the county




boundary data.  It converts the county boundary coordinates from one UTM zone




to another, if required, using subroutine GTGR in the same manner as




conversion of census data coordinates in CAASE1.  The converted coordinates




are written to I/O device NOUTl for later processing by the program.  At the




user's option, INBOUN also writes the county boundary data to I/O device




NOUT3.  INBOUN determines the coordinates of the extreme north, south, east,




and west points of the study area boundary.  It initializes the list of grid
                                       127

-------
squares by computing the number and locations of initial grid squares of




maximum size needed to cover the entire study area.




7.4  TRACKR Subroutine




     Subroutine TRACKR (used by CAASE2) determines whiv.li unit cells are




interior, exterior, or boundary cells for a county.  Since the techniques




employed assume that the county boundary segments are oriented counterclock-




wise, the orientation of the segment coordinates is first tested and the




segments are re-ordered if necessary.




     Beginning with the first segment in the list, the points of intersection




of the segments and the unit cells are computed.  The unit cells intersected




by the boundary are called the boundary cells.  The county area contained in a




boundary cell is computed.  This value will be greater than zero and less than




or equal to the unit cell area, in this case, 1 km .   The distinction between




interior cells and boundary cells is made on the basis of area assigned to the




cell with the interior cells having the value of the unit area.  In the rare




event the area of a boundary cell equals unit area, its value is replaced with




.999 times the unit area to permit numerical distinction.




     When a boundary segment departs from a unit cell, the next cell and its




entry side must be found.  The next cell must be one of the eight contiguous




cells.  As entry/departure from one boundary cell to the next occurs, the cell




indices (i.e., the cell's row and column position within the grid cell array)




change by + 1 or zero.  The change in indices is the key to which cells are




interior to the current boundary cell.  For example,  if the row index changes




by + 1, the next cell is upward, or north of the current cell and the unit




cells on the same row and to the left of the current boundary cell are




interior cells.  (In counterclockwise travel, the interior region is to the




left of direction of travel.)
                                       128

-------
7.5  REORDR Subroutine




     REORDR is called by Subroutine TRACKR (in CAASE2) to reorder the set of




county outline coordinates in counterclockwise order if necessary.  This is




accomplished by reversing both the order of the coordinate pairs of each




segment and the order of the segments.




7.6  SIDEIT Subroutine




     SIDEIT is called by subroutine TRACKR (in CAASE2) to compute the point of




intersection of a given county boundary segment with a given cell.  The




situation is illustrated in the following figure.
                            yp
                            ym
                                   xm
                                           xp
     The unit cell is bounded by x=xm, x=xp, y=ym and y"yp.  The segment is



defined by the coordinates of its end points and is directed from  (xj^yj) to



(X2,y2)«  Assuming that point A (the intersection on side y-ym) is known, the



problem is to find coordinates of B, the point of intersection on x=xp.  B is



called the departure (or exit) node.



     The general "two-point" form of the equation of a straight line,




                     y - yi        72 ~ yi
                     x -
is used to find the points of intersection on the cell sides.
                                      129

-------
7.7  WRAPUP Subroutine




     After a county boundary segment departs from a boundary cell, WRAPUP is




called by subroutine TRACKR (in CAASE2) to finish computing the area of the




interior county region.  This region is enclosed by the county boundary




segment and the sides of the boundary cell from the departure node to the




entry node (see description of subroutine SIDEIT for definition of terms)•




7.8  NETBAL Subroutine




     NETBAL is called by subroutine TRACER (in CAASE2) whenever the computed




area contained in a boundary cell exceeds the unit area.  The following figure




shows the conditions which cause the computed contained area to exceed the




unit area.
                    f
                        II
                                /  I
     The area contained by the first transect, I, includes some area excluded




by the second transect, II, namely the northwest corner of the cell.  The




second transect contains some area excluded by I, the southeast corner.  Some




of the area contained by I alone is also contained by II.  The sum of the




separately computed areas contained by I and II will exceed the total area of




the cell by the amount of the overlapping common area.  Thus, the sum of the




areas must be reduced by the amount of the total area of the cell until the




reduced sum is less than or equal to the total area of the cell.
                                       130

-------
Or in other words:

               Contained Area = Summed  Area  (modulo unit area)

NETBAL performs the modulo function.

7.9  DECIDE Subroutine

     DECIDE is called by subroutine TRACKR  (in CAASE2) to determine the next

boundary cell when a segment of the county boundary intersects the side of the

current boundary cell and departs  from  it.

     Figure 38 shows the eight combinations  of AX and Ay possible for a

transect exiting side 1 of cell (i,j).
            (i+l.J-1)   |     (i+l,j)
                  !   U+l.J+1)
          U,J-1)
                       * S.
                    ,NI/
                     /\
*    (1,J)
            (1-l.J-l)
  (i-i.j)
         FIGURE 38.   CELL (i,j),  PORTIONS  OF  THE ADJOINING CELLS, AND
         THE EIGHT COMBINATIONS OF AX, Ay FOR  EXITING SIDE NUMBER 1.
     These eight combinations are possible at  each  of  the four sides and the

four corners of cell (i,j).  Therefore,  there  are 64 possible combinations of

exit side and direction of departure of  the county  boundary from any given

boundary cell.  The unique outcome (that is, the next  boundary cell and its

entry side) for any of the 64 combinations may be described by the value of an

element in two of six 3x3 matrices. Elements in  two of the matrices are the

increments that must be added to the (i,j) indices  of  the current cell to
                                       131

-------
obtain the indices of the next cell.  Elements in the other four matrices are

the entry sides of the next cell.   (Two of these latter four matrices are used

for exits from a single side; the other two are used for exits from a corner.)

The subscripts of the elements in the matrices are computed from tests on the

combination of exit side and the signs of Ax and Ay of the exiting segment.

     The matrices were derived by developing all 64 combinations explicitly,

analyzing the results, and observing repeated patterns in the outcomes which

led to groupings and simplifications.  Only one example will be given to

illustrate the development process.

     Note in Figure 38 that the only possible increments to the indices of

the current cell (i,j) are 0 for i and either 0 or -1 for j.  Therefore, the

two index increment tables that summarize the outcomes under the eight

possible combinations of AX and Ay for side 1 are as follows:


<0

-0
>0

0
0

0
0


<0
Ax
-0
>0

<0
-1

0
0
Ay
-0
-1

00
0

>0
-1

-1
0
          TABLE 18-a.  i-INCREMENT,
              EXIT SIDE 1.
TABLE 18-b.  j-INCREMENT,
    EXIT SIDE 1.
     The symbol °° means that both AX and Ay are not simultaneously zero.


     TABLE 18-b is rewritten in matrix form as

                            I    -1    -1

                            0     »    -1

                            000
                        MATRIX OF j-INCREMENTS,
                              EXIT SIDE 1.
                                       132

-------
The row and column subscripts of the elements in the matrix are determined by




the algebraic signs of Ax and Ay.  For example, Ax < 0 and Ay > 0 correspond




to row/column subscripts (1,3).  The value of element (1,3) is -1.  Thus, when




the exit side is number 1, and Ax < 0, Ay > 0, the j index of the next




boundary cell is j-1 where j is the value of the current boundary cell.




     After complete expansion of the eight combinations of Ax and Ay applied




to all four sides and all four corners, two Increment Matrices are found to be




adequate:
               -1    0\                /-I    -1




                                                           -  I-
            INCREMENT MATRIX 1            INCREMENT MATRIX 2






     All other Increment Matrices may be expressed as functions of Ij or l£ or




the zero matrix.  Thus, for exit side 3 the j-increment matrix is
            (j-inc3)
or






           (j-inc3)  -  I2 + 1




where 1 is a 3 x 3 matrix of 1's,




The i-increment matrix for side 3 is




           (i-inc3)  =  0.
                                       133

-------
     The entry side table associated with an exit from side 1 is:

                                   Ay

<0
=0
>0
<0
3
1
1
=0
3
00
1
>0
3
3
1
                Ax
                       TABLE 19.   ENTRY SIDE OF
                         CELL; EXIT SIDE 1.

The entries in Table 19 were deduced from Figure 38.   For example,  in exiting

side 1 with Ax < 0 and Ay > 0, the entry into the next cell is through side

number 3.  If Ax > 0 and Ay < 0,  the entry side is number 1.

     Complete expansion and analysis of all 64 combinations result in four

Entry Side Matrices.  For single-side exit,  i.e., not exiting via a corner,

the following two Entry Side Matrices are sufficient:
     The elements in £3 are the entry sides when the exit side is 1 or 3.   The

elements in E^ are the entry sides when the exit side is 2 or 4.

     For corner exits, the Entry Side Matrices are:
                                    E2
     The elements in Ej are the entry sides when the exit is through the

corners formed by sides 1 and 2 or sides 1 and 4.  The elements in E2 are the

entry sides when the exit is through the corners formed by sides 2 and 3 or

sides 3 and 4.
                                       134

-------
     The use of the Index Increment and Entry Side Matrices is summarized as

follows:  determination of the next cell in tracking involves selection of a

cell index increment matrix and an entry side matrix according to the side,  or

sides, of exit from the current cell.  Determination of the appropriate

element in the matrices selected depends on the algebraic signs of Ax and Ay.

Table 20 summarizes the use of the Index Increment and Entry Side Matrices:
Single Exit
Exit Through
Side No.
1
2
3
4
Use:
i-inc j-inc
matrix matrix
0 I2
II °
0 ^2+1
T n
Side
entry side
matrix
E3
E4
E3
E4
Corner Exit
Exit Through
Side
1 & 2
2 & 3
3 & 4
4 & 1
Use:
i-inc j-inc entry side
matrix matrix matrix
II X2 El
IT T7
1 I2+l E2
1 "f"! 2+1 2
IT 17
1+1 L2 El
     TABLE 20.  SUMMARY OF CELL INDEX INCREMENT MATRICES AND ENTRY SIDE
             MATRICES TO BE USED UNDER CONDITIONS OF SINGLE SIDE
             EXIT OR CORNER EXIT FOR SPECIFIED SIDES OR CORNERS.
7.10 NTRIOR and FINAL Subroutines

     NTRIOR and FINAL are called by subroutine TRACKR (in CAASE2) to determine

the cells interior to the county boundary.

     The determination of the interior and exterior cells comprises two

phases.  The first is the flagging, on a cell-by-cell basis as tracking

proceeds, of interior/exterior cells on the same row and column of the current

boundary cell.  This phase will "catch" the exterior cells that occur as

interior pockets contained by highly convoluted figures.  The second phase,

applied after the figure defined by the boundary is established, will

determine those cells generally exterior to the envelope (of cells) of the

figure.  Subroutine NTRIOR accomplishes the first phase.  Subroutine FINAL

accomplishes the second phase.
                                       135

-------
     FINAL returns the entire grid cell array flagged with values to indicate




interior, exterior,  or boundary cells.  These values will be used in PROXFR to




print the county map and in PROXML to construct the proximal map.




7.11 PROXPR Subroutine




     PROXPR is used by CAASE2.  It prints a map of a county showing exterior




cells as blank characters, boundary cells as asterisks,  and interior cells as




the character I.  (See Figure 8 in Section 3.3.)




7.12 INPOP Subroutine




     INPOP (used by CAASE2) reads the edited MED-X census data tape created by




CAASEl, computes the total county population and housing, and determines the




indices of the control cells from the Census Enumeration District (ED)




coordinates.




7.13 PROXML Subroutine




     Subroutine PROXML (used by CAASE2) computes the proximal map of a county




based on the edited MED-X census data tape.  A proximal map is based on the




so-called "nearest neighbor" method of interpolation.  A control cell is a




unit grid cell that contains centroid coordinates of one or more Census




Enumeration Districts (ED's).  An empty grid cell contains no ED centroids.




For each empty cell, there is a control cell nearer to it than any other




control cell with the occurrence of ties (equally distant control cells) being




resolved by a random selection.  This nearest control cell is the nearest




neighbor of the empty cell.  Conversely, associated with each control cell,




there is a collection of empty grid cells having it as their nearest neighbor.




For any control cell, the associated collection of empty grid cells represents




an approximation of the region of the ED's whose centroids are in that control




cell.  The sum of the cell areas is taken as the approximate area of the




original ED's.  Population and housing densities are computed from this




approximate area and the control cell's population and housing.  These






                                       136

-------
densities are assumed to be uniformly distributed over the approximating area




and are therefore assigned equally to each associated unit cell.  Conse-




quently, every grid cell in the county is assigned a population/housing count




based on the population and housing of the ED's nearest it.




     PROXML determines the nearest neighbors and computes the population and




housing densities.




7.14 SEARCH and SETLGO Subroutines




     SEARCH is called by subroutine PROXML (in CAASE2) to find the nearest




neighbor control cell (see subroutine PROXML description) of each grid cell in




a county.  It employs a search technique that is based on the assumption that




the most likely nearest neighbor control cell of the cell having row/column




indices (i,j) is the nearest neighbor of the previous cell with indices (i,




j-1).  The distance from cell (i,j) to the nearest neighbor of cell (i,j-l) is




used to place upper and lower limits on the indices of the rows and columns




searched for a nearer neighbor to cell (i,j).  Subroutine SETLGO is used in




conjunction with SEARCH to determine the index of the non-empty row nearest




each row of grid cells.




7.15 TIEBRK Subroutine




     TIEBRK is called by subroutine SEARCH (in CAASE2) when the distances from




a grid cell to two different control cells are equal.  TIEBRK resolves the




choice of which is nearer by calling a random number generator subroutine to




provide a uniformly distributed random number between 0 and 1.  If the number




is greater than 0.5, the return to SEARCH will cause one of the control cells




to be chosen; otherwise, the other control cell is chosen.




7.16 GRIDIT Subroutine




     GRIDIT (used by CAASE2) constructs a grid square system based on a given




population density surface.  GRIDIT will attempt to read user-provided grid




square records from the card input stream to the end of file.  A count is kept






                                       137

-------
on the number of cards read.  If no user grid cards are provided, the count




will be zero and GRIDIT will construct a grid.  If cards are provided, the




count will be non-zero and GRIDIT will not construct a grid.




7.17 ADJUST Subroutine




     ADJUST (used by CAASE2) partitions boundary squares having only a small




portion of their contained area within the outline of the total study area




until the contained area is a greater percentage of the square's area.  Any




empty squares resulting from the partitioning will be deleted from the list of




grid squares.




7.18 SQROFF Subroutine




     SQROFF (used by CAASE2) determines which grid squares belong to which




counties.  If a square shares its area with a county, it is assigned that




county's FIPS code number.




     SQROFF reads in the population proximal map of a county and compares it




to the entire list of grid squares.  (The values stored in the cells making up




the proximal map are population.  There are two other proximal maps that




contain housing and area values.)  A zero value of population in a grid cell




means the cell is not in the county.  For a given grid square, if the sum of




values of all cells within the square is zero, the grid square is totally




outside the county.  If the sum is not zero, the grid square and county share




common area and the grid square is therefore assigned the county FIPS




identification number.  In addition, the summations of population, housing,




and contained area in the grid cells shared by the grid square with the three




proximal maps are assigned to the square.




     A square may overlap more than one county.  In this case, the square will




receive multiple county assignments.  Separate card image records of the grid




square will be output for each county to which the square belongs with the




records differing in the county code, fractional area contained, contained






                                       138

-------
population and contained housing.  The side lengths and southwest corner




coordinates of squares having multiple records are equal.




7.19 OUTPUT Subroutine




     OUTPUT is used by CAASE2 to output the card images and print the grid




square records.




7.20 PARTIT Subroutine




     PARTIT is called in CAASE2 by subroutines GRIDIT and ADJUST to partition




a specified grid square into four smaller squares of equal size by dividing




its side length by two.  The coordinates of the southwest corners of the new




squares are one-half the side lengths from the origin of the original square.




The list of grid squares is updated by adding the side lengths and coordinates




of the new squares to the appropriate vector storage arrays.  The total number




of squares is increased by three.  A test of the number of squares versus the




maximum  permissible governs the return to the calling program.  A test to




prevent partitioning of squares to less than unit area is included.




7.21 DELETE Subroutine




     DELETE is called in CAASE2 by subroutines GRIDIT and ADJUST to remove




empty grid squares from the list of grid squares.




7.22 INTEGR Subroutine




     INTEGR is called in CAASE2 by subroutines GRIDIT, ADJUST, and SQROFF to




compute the integral of either population, housing, or area in a grid square




specified by the calling program.




7.23 ASTORE and NSTORE Subroutines




     The purpose of subroutines ASTORE and NSTORE  (used by CAASE2) is to




eliminate repetitive coding of FORTRAN IF - GO TO statements followed by




non-computational equations.  Their functioning is apparent from their simple
 1800 in applications thus far.
                                        139

-------
coding.  The difference between them is that the arguments of ASTORE


are floating point variables, and those of NSTORE are integers.   NSTORE is an


ENTRY in ASTORE.  Other entries in ASTORE are subroutines YOFX and  XOFY.


ASTORE is called by subroutines TRACKR and WRAPUP,  NSTORE by DECIDE and


SIDEIT.


7.24 YOFX and XOFY Subroutines


     YOFX AND XOFY are entries in subroutine ASTORE used by CAASE2.   They are


called by subroutine SIDEIT to compute the intersections of the  county


boundary segments with the grid cells.


     The two point equation of a straight line is given by




                      7 - 71       72 ~ 71
                      x -
For specified (x^.yj), (X2>y2)» and x, YOFX computes
                                   72 - 71
                      y - (x - xj) _ + yx


                                   x2 - Xl



For specified (xpyj), (x2»y2)» a°d y, XOFY computes
                          (y -
                                   (72 "
Both subroutines test for denominators less than the variable,  "EPS"  (a very


small number specified in the main program) in absolute value;  this is  a test


for zero divisor.  If such should occur,  the solution is set to a large


value.



                                      140

-------
7.25 FAREA Subroutine




     FAREA (used by CAASE2) computes the area A under the line segment in




Figure 39 by the formula:




                         (72 + 7i>
                                          X2
                   FIGURE 39.  AREA UNDER A LINE SEGMENT.






7.26 SORT Subroutine




     SORT is used by CAASE2 to sort the grid squares in ascending order by




state, county, UTM Northing, and UTM Easting.




7.27 POPBOX Subroutine




     POPBOX is used by CAASE3.  It creates the plotter file for drawing a




scaled map of the study area.  POPBOX causes a message to be issued to the




operator to mount 30-inch wide plotter paper.  The axes and tick-marks are




drawn and labeled.




     POPBOX also draws the grid square network.  It is given the coordinates




of the lower left-hand corner of each grid square and its side length.  It
                                       141

-------
calculates the coordinates for the other three corners.  Lines are then drawn




through the five points (the lower-left hand corner being both the starting




and ending point).  A grid can be drawn to any scale, the only limitation




being the physical size of the available plotter space.  In the CAASE




applications thus far, the scale 1:250,000 has been used.  The scale factor




is an input variable to the CAASE3 main program.




7.28 EDPLOT Subroutine




     EDPLOT is used by CAASE3 to optionally plot the enumeration districts and




psuedo-enumeration districts as processed by CAASE1.  A control parameter read




by CAASE3 determines whether EDPLOT is used.




     As discussed in the CAASE1 program description (Section 2), there are




three types of enumeration districts output by CAASE1.  A unique mark from the




CALCOMP plotter subroutine MARK is used for each of the three types of




enumeration  districts.  Type 1 uses mark #1, type 2 uses mark #5, and type 3




uses mark #9.




7.29 COOUT Subroutine




     COOUT is optionally used by CAASE3 to draw county outlines on the study




area map.  A control parameter read by CAASE3 determines whether COOUT is




used.




7.30 READ1 Subroutine




     RE ADI is used by CAASE5 to read the fuels (throughput) totals for the




county being processed.  The format is the same as the first five cards on the




NEDS Area Source Form [EPA (DUR) 219 3/72].  The routine also calculates the




gasoline fuel use for light trucks using fractions of the reported fuels for




light vehicles (gasoline) and heavy vehicles (gasoline).  The algorithm




currently used by the EPA National Air Data Branch (NADB) for the National




Emissions Data System (NEDS) area sources is used*
                                       142

-------
     The following calculations are used:




          Light Truck Fuel Total - .122 x Light Vehicle Fuel Total




               + .273 x Heavy Vehicle Fuel Total.




     Light vehicle and heavy vehicle fuels are reduced accordingly, that is:




          Modified Light Vehicle Fuel Total = Reported Light Vehicle




               Fuel Total x .878.




          Modified Heavy Vehicle Fuel Total - Reported Heavy Vehicle




               Fuel Total x .727.




7.31 OUTPT1 Subroutine




     OUTPTl is used by CAASE5.  It formats and prints a tabular listing of the




allocated county fuels (throughput) totals for all area source categories




identified on the NEDS Area Source Form  [EPA (DUR) 219 3/72].




     OUTPTl also writes a formatted tape (see Tables 16 and 17 for a descrip-




tion of the record layout and contents).




7.32 OUTPT2 Subroutine




     OUTPT2 is used by CAASE5.  It formats and prints the allocated emissions




for each source category identified on the NEDS Area Source Form [EPA (DUR)




219 3/72].




     As a county is being processed by CAASE5, OUTPT2 is called five times,




once for each pollutant (TSP, S02, NOX, HC, and CO).




     OUTPT2 also writes a formatted tape (see Tables 16 and 17 for a descrip-




tion of the record layout and contents).




     With the exception of formatting and labeling, OUTPT2 is very similiar to




OUTPTl.




7.33 OUTPT3 Subroutine




     This routine is called by the CAASE5 program and outputs allocated area




source emissions as cards (or card images) for direct input to one of three
                                      143

-------
atmospheric dispersion models.  The three models are the Implementation




Planning Program (IPP), the Air Quality Display Model (AQDM),  and the




Climatological Dispersion Model (CDM).   The selection of the format is




controlled by an input variable.




     As each county is processed, one emissions total is output for each grid




square for each pollutant.  That is, the calculated emissions  for all area




source categories allocated to a grid square are summed.  Units conversions




are made if necessary.  A constant value of 10 meters or 33 feet is assigned




as the stack height.




     OUTPT3 also writes a formatted tape (see Tables 16 and 17 for a




description of the record layout and contents).
                                      144

-------
8.0  OBJECTIVE APPORTIONING FACTORS AND SUBJECTIVE OVERRIDING WEIGHTING
     FACTORS

     This section discusses the procedures for introducing user-provided

overriding weighting factors for allocating fuels and emissions to the

sub-county grid square network.  The assignment of overriding weighting

factors and their effect on the objective apportioning factors are discussed

in detail in this section-  The program input formats and descriptions are

included in the discussion of the CAASE4 program in Section 5.

     A basic concept in the development of the CAASE procedures was to use

objective techniques, where possible, to select a grid.  Also, objective

methods were to be used, when possible, for allocating fuels  (throughput) and

emissions from county totals for each source category into each grid square.

It was recognized that many of the source categories were amenable to

apportioning as functions of the distribution of population and housing

within counties.  Ideally, objective methods could be used throughout the

processing of area source data using computer processable data sources

already available in computer compatible data bases.  Certain categories of

usable data are available for some counties while not always available for

others; further, much of the data exist only in source document or tabular

form, e.g., land use maps, traffic counts, airport operations activity, etc.

Much effort would be necessary to assemble and incorporate these data into a

computer processable data base for objective apportioning.  Such an effort,

practical or not, was beyond the scope of the CAASE project.  It appeared,

however, that area source emissions for most categories were amenable to

distribution by objective techniques to the grid squares of a county.

     For convenience, the fields of fuels (throughput) data on the NEDS Area

Source Input Form [EPA  (DUR) 219 3/72] have been sequentially numbered.

Table 12 relates the assigned category number to its major and minor
                                       145

-------
classifications.  (Category number 28, Gasoline Fuel, Light Truck is a

derived number calculated by taking a portion of categories 27 and 29 fuels.)

     The majority of the categories can be apportioned using functions of

area, population, and housing.  However, provisions are made in the CAASE4

program to override any or all source categories for each grid square if

available information indicates that the objective factors used by CAASE4

will not yield acceptable results.  To facilitate the use of any additional

available data for apportioning, the apportioning factor program (CAASE4)

logic has been written to optionally accept user-provided weighting factors

for any area source category for any grid square.  As discussed in more

detail in later paragraphs, the "effective" apportioning factor is the

product of the user-provided weighting factor multiplied times the assigned

objective factor.  The default user-provided weighting factor is 1.0.

     An objective apportioning factor has been assigned to each area source

emission category reported on the NEDS Area Source Form [EPA (DUR) 219 3/72].

Table 21 shows the objective apportioning factor assigned for each source

category.  Candidate objective apportioning factors available on the Bureau

of the Census MED-X  tapes include population, housing counts, and an urban-

rural classification.  After the grid is established, each grid square's

contained population, housing, area, and side length"1" are available.

     When available apportioning factors were being selected and assigned to

the source categories, it was concluded that some categories were quite
faster Enumeration District Listing (MEDList) extended to include geographic
 coordinates.

"*"If the contained area for a grid square is shared by two or more counties,
 an "effective side length" for each county is calculated by computing the
 square root of the contained area within that county.
                                      146

-------
TABLE 21.   "NEW"  AREA  SOURCE  EMISSIONS CATEGORY NUMBERS
         AND THEIR OBJECTIVE APPORTIONING  FACTOR
CATEGORY
NUMBER
1
2
3
4
5
6
7
8
9
10
11
12
13
U
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
MAJOR
CLASSIFICATION
RESIDENTIAL FUEL
RESIDENTIAL FUEL
RESIDENTIAL FUEL
RESIDENTIAL FUEL
RESIDENTIAL FUEL
RESIDENTIAL FUEL
COMM'L & INSTITL FUEL
CCMM'L & INSTITL FUEL
CCMM'L & INSTITL FUEL
COMM'L & INSTITL FUEL
COMM'L & INSTITL FUEL
COMM'L & INSTITL FUEL
INDUSTRIAL FUEL
INDUSTRIAL FUEL
INDUSTRIAL FUEL
INDUSTRIAL FUEL
INDUSTRIAL FUEL
INDUSTRIAL FUEL
INDUSTRIAL FUEL
INDUSTRIAL FUEL
ON-SITE INCINERATION
ON-SITE INCINERATION
ON-SITE INCINERATION
OPEN BURNING
OPEN BURNING
OPEN BURNING
GASOLINE FUEL
GASOLINE FUEL
GASOLINE FUEL
GASOLINE FUEL
DIESEL FUEL
DIESEL FUEL
DIESEL FUEL
AIRCRAFT
AIRCRAFT
AIRCRAFT
VESSELS
VESSELS
VESSELS
VESSELS
EVAPORATION
EVAPORATION
MEASURED VEH MILES
MEASURED VEH MILES
MEASURED VEH MILES
MEASURED VEH MILES
DIRT RDS TRAVELED
DIRT AIRSTRIPS
CONSTRUCT LAND AREA
MISC. WIND EROSION
LAND TILLING
FOREST WILDFIRES
MANAGED BURNING
AGRI. FIELD BURNING
FROST CONTROL
STRUCTURE FIRES
MINOR
CLASSIFICATION
ANTE. COAL
BITflM. COAL
DIST. OIL
RESID. OIL
NAT. GAS
WOOD
ANTE. COAL
BITUM. COAL
DIST. OIL
RESID. OIL
NAT. GAS
WOOD
ANTH. COAL
BITUM. COAL
COKE
DIST. OIL
RESID. OIL
NAT. GAS
WOOD
PROCESS GAS
RESIDENTIAL
INDUSTRIAL
CCMM'L & INSTITL
RESIDENTIAL
INDUSTRIAL
COMM'L S INSTITL
LIGHT VEHICLE
LIGHT TRUCK
HEAVY VEHICLE
OFF HIGHWAY
HEAVY VEHICLE
OFF HIGHWAY
RAIL LOCOMOTIVE
MILITARY
CIVIL
COMMERCIAL
COAL
DIESEL OIL
RESID. OIL
GASOLINE
SOLVENT PURCHASED
GASOLINE MARKETED
LIMITED ACCESS RDS
RURAL ROADS
SUBURBAN RDS
URBAN ROADS
• • »
• • •
• * •
• • •
• • *
AREA-ACRES
AREA-ACRES
AREA-ACRES
ORCHARD HEATERS
NO. PER YEAR
OBJECTIVE
APPORTIONING FACTOR*
HOUSING UNITS
HOUSING UNITS
ROUSING UNITS
ROUSING UNITS
HOUSING UNITS
HOUSING UNITS
POPULATION
POPULATION
POPULATION
POPULATION
POPULATION
POPULATION
POPULATION
POPULATION
POPULATION
POPULATION
POPULATION
POPULATION
POPULATION
POPULATION
HOUSING UNITS
POPULATION
POPULATION
ROUSING UNITS
POPULATION
POPULATION
POPULATION
POPULATION
POPULATION
1 /POPULATION DENSITY
POPULATION
1 /POPULATION DENSITY
GRID SQ. SIDE LENGTH
AREA
AREA
AREA
GRID SQ. SIDE LENGTH
GRID SQ. SIDE LENGTH
GRID SQ. SIDE LENGTH
GRID SQ. SIDE LENGTH
POPULATION
POPULATION
I /POPULATION DENSITY
1 /POPULATION DENSITY
POPULATION
POPULATION
I /POPULATION DENSITY
1 /POPULATION DENSITY
AREA
1 /POPULATION DENSITY
1 /POPULATION DENSITY
1 /POPULATION DENSITY
1 /POPULATION DENSITY
1 /POPULATION DENSITY
1 /POPULATION DENSITY
POPULATION
 "Each of the above apportioning  factors is multiplied by a weighting factor
  initialized as  1.0 for all grid squares.  These  Initial weighting factors can
  be overridden with input data if desired.
                                 147

-------
amenable to apportioning using objective factors whereas others are not.  For




example, the housing count in each grid square is a good choice for allo-




cating residential heating source categories.  However, source categories




associated with aircraft operations affect only portions of a county and




should be overridden in most cases.




     Although the CAASE system permits overriding weighting factors to be




assigned for any source category, they should be limited to those categories




where acceptable objective data (in a computer processable form) are not




available.  To allocate emissions from airport operations over the entire




county as a function of the area of each grid square (see Table 21) might




introduce only a small error.  However, it can easily be determined which




grid squares in a county contain airports, or are affected by the airports.




On the other hand, much time could be spent in preparing overriding weighting




factors for railroad operations.  To allow CAASE4 to use the objective factor




(i.e., grid square side length) to assign apportioning factors to all grid




squares in an urban county containing a large number of grid squares and




heavy railroad activity (e.g., St. Clair County, Illinois) may yield




comparable results.  The percentage errors may be acceptable.




     One suggested approach, before deciding to override a source category,




is to run the CAASE4 program without overriding the objective apportioning




factors for the category; then to run the CAASE5 program with those assigned




apportioning factors.  Two outputs from CAASE5 are the county totals of




emissions by pollutant and a table of county totals by source category and




pollutant (see Figure 35 in Section 6).  Each source category's contribution




to the county total area source emissions can be readily determined.  For




example, from data in Figure 35, Washington County, Ohio railroad activity




(category 33) contributed .875 tons/year of TSP to the county total of 3796.8
                                       1A8

-------
tons/year and therefore represents only .023% of the total.  NOX for railroad




activity is .405% of the Washington County total.




     An important point to keep in mind when assigning overriding weighting




factors is that the calculated apportioning factors are normalized in the




CAASE5 program.  That is, each apportioning factor is developed by dividing




the weight assigned to the particular grid square (for a particular source




category) by the sum of the weights assigned to all grid squares (for that




category) in the county.  The total fuels or emissions apportioned to the




individual grid squares in the county will not be modified whether the total




refers to housing counts, area, population, or a combination of these and/or




other factors.  For each source category, the apportioning factors represent




each grid square's proportion of the county total.  This apportioning factor




is the numerator for the fraction of total fuels (or emissions) which will be




apportioned to that particular grid square for that particular source




category.  To sum all of the fractions for a particular source category




associated with each individual grid square within the county will yield




unity.




     As discussed earlier, the effective apportioning factor is calculated by_




multiplying an objective apportioning factor (see Table 21) by a_ weighting




factor.  The apportioning algorithm in CAASE4 assumes a^ weighting factor of




1.0.  If the default weighting factor of 1.0 is used, the apportioning is




totally controlled by the assigned objective apportioning factor, e.g.,




housing units.  The following paragraphs discuss how to override the default




1.0 weighting factor.  When a^ source category is to be overridden, a_ card is




read by CAASE4 with the source category number and an initialization constant




(generally 0.0 or 1.0).  Cards are then read for each grid square that is to
                                       149

-------
be overridden with a^ different weighting factor than the initialized factor for




that source category.




     An example of source category weighting factors that generally should be




overridden are those for airport operations (source categories 34, 35, and 36).




If no airports are located within the county or if LTO  (Landing-Take-Off) cycles




are not included in the area source inventory, no airport weighting factor




overriding action is necessary.  For airport operations categories the




initializing constants (read by CAASE4) should be zero because fewer grid




squares will be allocated fuels and emissions than those that will not.  These




user-initialized zero weighting factor assignments mean that no aircraft




landing-take-off cycles, or emissions associated with them, will be allocated to




a grid square unless the user assigns a non-zero weighting factor to that grid




square.  For aircraft LTOs and associated emissions the assigned objective




apportioning factor is area.  A grid square which has a large area would




therefore be allocated more LTOs and associated emissions than a grid square




which has a smaller area (if the weighting factors are equal).  If a grid square




is affected by aircraft operations, the user can, for example, assign a 1.0




weighting factor.  (This is done after initializing all grid squares to zero for




the aircraft categories.)  The CAASE4 program would then assign apportioning




factors strictly as a function of area for only those grid squares affected;




that is, a grid square of one square kilometer would be assigned an apportioning




factor only one twenty-fifth (l/25th) of the apportioning factor assigned to a




five-by-five kilometer grid square representing 25 square kilometers.  The user




would normally want to assign higher weights to grid squares near an airport




than to those farther away.  To do this the user can, for example, assign an




overriding weighting factor of 3.0 to the grid squares nearest an airport, 2.0




to grid squares farther away but still affected, and 1.0 to the furthermost




affected grid squares.






                                        150

-------
This would cause both the area of the affected grid squares and their




proximity to the airport (and aircraft operations areas) to be determining




factors in allocating LTOs and associated emissions within the county.  The




values 3.0, 2.0, and 1.0 were used for illustration.  The user can assign any




value on any scale.  The procedure is more complex in a county containing




more than one active airport.  In this case, the user must keep in mind that




the weighting factors apply to the county totals.  If data are available for




the relative operational activity at the two or more airports in the county,




these data should be used in assigning overriding weighting factors.




Referring back to the example above, where proximity to the airport was also




taken into consideration, and supposing the county had two airports, then let




the above example be for Airport A.  Let the second airport be called Airport




B.  If Airports A and B had equal operational activity, i.e., LTOs for a




source category, then 3.0, 2.0, and 1.0 weighting factors could be assigned




to grid squares affected by Airport B LTOs according to their proximity to




Airport B in the same manner as was done with Airport A.  The next degree of




complexity for the two-airport example is encountered when their relative




activities for a source category are not equal.  To modify the above two-




airport example, for illustration, suppose Airport B had twice the activity




as Airport A (i.e., two-thirds of the LTOs were at Airport B and one-third at




Airport A); then, the nearest grid square to Airport B could be assigned an




overriding weighting factor of 6.0 whereas a 3.0 had been assigned to the




nearest grid square for Airport A, etc.  The overriding weighting factors




assigned to other affected grid squares must reflect both the relative




airport activity and each affected grid square's proximity to the airports.




     The above examples for aircraft activity were given to illustrate the




overriding of source categories where the area of the grid square is the
                                      151

-------
objective factor.  Although conceptually similar, other source categories are




treated differently.




     Area source categories such as railway locomotives and waterborne




vessels are also assigned apportioning factors as a function of the size of




the grid square.  However, in these cases the distance across a grid square




and how the waterway or railroad tracks cross it are used in assigning an




overriding weighting factor.  The longest distance across a grid square is




diagonally through opposite corners (e.g., northwest corner to southeast




corner).  This distance is directly proportional to the grid square side




length.  The ratio of the diagonal to the side length is a constant (y2 to




1).  This constant would drop out in the CAASE5 apportioning factor




normalizing calculations.  The grid square side length is therefore used




directly for these source categories.  The discussion and examples following




will be limited to the railway locomotive category, but the approach




suggested is equally applicable to the waterborne vessel categories.




     If the railway locomotive source category is to be assigned overriding




weighting factors, then there are several things to consider when assigning




an overriding factor to a grid square.  To simplify the examples, no attempt




is made to incorporate the number of trains passing across a grid square in a




given time frame, nor is the average number of locomotive units per train




considered.  These data probably will seldom be directly available to the




CAASE user.  The number of pairs of tracks crossing the grid square is




directly available from USGS (U.S. Geological Survey) maps.  These maps can




be used with a grid square network plotted by CAASE3 as an overlay, or where




the grid squares have been drawn directly on the map.  For each pair of




tracks, the user can visually estimate the distance in crossing the grid




square as compared to the maximum distance possible across the grid square.
                                       152

-------
Then the overriding weighting factor for a grid square is a combination of


the number of tracks crossing it and the relative length of the crossing


distance for each.  Recall that the effective apportioning factor is the


product of the weighting factor and the assigned objective apportioning


factor, in this case, grid square side length.  Because the overriding


weighting factor that should be assigned to a grid square includes both the
                                    *

number of tracks and the relative length of each, it is suggested that the


user establish an arbitrary scale to include both terms.  For example, a


scale of 0.0 to 10.0 could be used.  One pair of tracks, crossing the grid


square along the maximum length path,  would be assigned a 1.0, two pairs of


tracks along the same path a 2. 0 etc.   For tracks across the grid square


along some path less than the maximum distance, each pair of tracks can be


assigned a fraction of 1.0.  On a scale of 0.0 to 10.0, the following figures


are examples of the suggested procedure where -I I I I I  I  will denote a single
pair of tracks and  [I  II — [I  II II  will denote a double pair of tracks
     FIGURE 40-A.  EXAMPLE OF RAILWAY LOCOMOTIVE WEIGHTING FACTOR OF 1.0

                          (2 KM X 2 KM GRID SQUARE)
                                          2 KM
    FIGURE 40-B.
               2 KM

EXAMPLE OF RAILWAY LOCOMOTIVE WEIGHTING FACTOR OF 2.0
                                        153

-------
    FIGURE 40-C.  EXAMPLE OF RAILWAY LOCOMOTIVE WEIGHTING FACTOR OF 1.0
                          (4 KM X 4 KM GRID SQUARE)
                                               2 KM
                                      2 KM
    FIGURE 40-D.  EXAMPLE OF RAILWAY LOCOMOTIVE WEIGHTING FACTOR OF 0.5
                                        (0.5)
                                              (2.0)
                                      2 KM
    FIGURE 40-E.  EXAMPLE OF RAILWAY LOCOMOTIVE WEIGHTING FACTOR OF 3.21
     The examples in Figures 40-A through 40-E illustrate that the count of

tracks and how they cross the grid squares make up the user-supplied

overriding weighting factors input to CAASE4.  The 1.0 weighting factor in

Figure 40-A, (a 2 km by 2 km grid square) and Figure 40-C (a 4 km by 4 km

grid square) will be multiplied by the grid square side length by the CAASE4

program.  This will cause the grid square represented by Figure 40-C to

receive an allocation of twice the amount of fuels and associated emissions

as the grid square represented by Figure 40-A.

     If the CAASE user does have relative traffic data for the track seg-

ments, it can be incorporated into the weighting factor procedure.
                                       154

-------
     For those source categories using assigned population or housing counts,




the user-provided overriding weighting factors are handled by CAASE4 in the




same manner as the examples above.  The effective apportioning factor for




each grid-square-source-category combination is the product of the user-




provided overriding weighting factor (or the default value of 1.0) times the




assigned objective apportioning factor.  It is fairly straightforward to use




maps to locate airports, waterways and railroads.  However, population and




housing distribution maps are not as readily available.  The CAASE user can




refer to the CAASE2 output for these housing and population counts for each




grid square (or portion thereof) for each county.




     The CAASE4 program reads the grid file output from the CAASE2 program.




This file contains the fractional area, contained housing, and contained




population, for that portion of each grid square within the county, in




addition to location coordinates and county identificaion.  The assigned




housing and population counts are included in the CAASE2 printout (see Figure




8).




     Using the allocation of distillate oil used for residential fuel (and




its associated emissions) as an example, the user is probably very limited in




providing any overriding weighting factors. The user probably does not have




enough detailed information on the distribution of residences using




distillate oil (as compared to other fuels) to improve on the CAASE default




method of allocating solely on total housing distribution.  However, the user




may, for example, be able to estimate that the percentage of residences using




distillate oil and located in the grid squares in one part of the county is




twice that in the remainder of the county.  In this case, the CAASE user




could initialize the source category (number 3 in Table 21) to 1.0.




Overriding weighting factors of 2.0 could then be input for the grid squares




that had twice the percentage of residences using distillate oil.






                                       155

-------
     If the CAASE user does not want CAASE4 to assign apportioning factors




for a source category, then there are two easy ways to do this:




     1.  In running the CAASE4 program, the source category can be




         initialized to 0.0 and then no user-provided weighting factors are




         input.  The zero coefficient for apportioning will effectively




         eliminate the source category.




     2.  In running the CAASE5 program, the source category fuels (throughput)




         on the Area Source Input card can be set to zero.  In this case, no




         overriding action is necessary in running CAASE4.




     In either case above, the CAASE5 output tables would display a zero for




all grid squares for the source category so excluded.  Also, emissions for




the source category would not be included in the grid square totals output on




the dispersion model card images.  The emissions for the source category




could be calculated by another method and allocated manually by the user.




These emissions could then be added, as appropriate, to the totals on the




dispersion model card images output by CAASE5.
                                       156

-------
                    APPENDIX A
LOGICAL FLOWCHARTS AND FORTRAN SOURCE CODE LISTINGS
             CAASE1  (and Subroutines)
                          A-l

-------
A-2

-------
                                                                  CAASE1
                             C   START    J
                     SET FORTRAN INPUT-OUTPUT
                     UNIT NUMBERS FOR COMPUTER
                     SYSTEM BEING USED. IND1=4
                     FOR CED009 ICNT=1 FOR NUMBER
                     OF STATES IN AQCR.
                                 REWIND
                                 OUTPUT
                                  TAPE
    NSTAT
    AQCR
    KZONE
                     FREAD NUMBER OF  STATES
                     IN  AQCR,  AQCR NAME AND
                     PRIMARY UTM ZONE.
r
IGROTH
 IEDS
                          fPRINT PAGE HEADING
                           FOR PRINTED  OUTPUT.
                                                     NSTAT
                                                     AQCR
                                                     KZONE
READ GROWTH RATE
AND NEW ENUMERA-
TION DISTRICT
INDICATOR.
                                    A-3

-------
                                                                           CAASE1, p.2
   X & Y COORDINATES
   LENGTH OF X & Y
   ZONE
   STATE
   COUNTY
                             ARE THERE PROJECTED FACTORS TO B
                             APPLIED TO ENUMERATION DISTRICT
                                  POPULATION AND HOUSING
                                       FOR THE AQCR
                       LOOP  ON 100  - MAXIMUM
                NUMBER OF GROWTH FACTORS
READ INFORMATION PERTINENT
IN DECIDING THE HOUSING AND.
POPULATION GROWTH OF AN
ENUMERATION DISTRICT.
HOUSING COEFFICIENT
POPULATION COEFFICIENT
                             220
                                     HAS LAST GROWTH
                                     RATE CARD BEEN
                                     READ
                           SET SUBSCRIPT FOR
                           NUMBER OF GROWTH
                           RATE CARDS READ
                                              NO
;                             PRINT  INFORMATION  FOR HOUSING
                             AND POPULATION GROWTH OF AN
                             ENUMERATION  DISTRICT
                                           A-4

-------
     S THE ZONE
   OF THIS GROWTH
   RATE THE PRIMARYX'
      UTM ZONE
       IS THIS
       ZONE EAST
       OF THE
       PRIMARY
       ZONE
                                        CAASE1, p.3
SET EW=1 FOR
MOVING FROM
WEST TO EAST
IN SUBROUTINE
GTGR
 SET EW=0 FOR MOVING
.FROM EAST TO WEST  IN
 SUBROUTINE GTGR
 260
   INITIALIZE ERROR
   MESSAGE VARIABLE
   TO ZERO FOR  SUB-
   ROUTINE GTGR
  'CONVERT X & Y
   COORDINATES TO
   DOUBLE PRECISION
         i
 CALL  SUBROUTINE  GTGR
 FOR ZONE  TO ZONE
 CONVERSION

-------
                      WAS ERROR
                      RETURNED
                      FROM SUB-
                      ROUTINE
                         GTGR
                 SET X & Y COORDINATES
                -TO SINGLE PRECISION
                  CALCULATE RECTANGLE
                      OF GROWTH
                                                          CAASE1,  p.4
                          PRINT  ERROR
                          MESSAGE AND
                           TERMINATE
                          EXECUTION
340
END OFr LOOP
                                                         I
                                                         I
                          i
               PRINT ERROR MESSAGE THAT
               RECTANGLES OF GROWTH EXCEEDED,
               MAXIMUM STORAGE ALLOCATED
                   ARE  THERE  ANY  NEW
                   ENUMERATION  DISTRICTS
                   PROJECTED
                          NO
                          A-6

-------
                                                                        CAASE1,  p.5
                  LOOPJDNJ.OO -_MAXIMUM
                  (LOOP ENDS AT 500)
/ X & Y COORDINATES
   ZONE
   STATE
   COUNTY
   HOUSING COUNT
   POPULATION COUNT
              NUMBER OF PROJECTED ED's
READ INFORMATION PERTINENT
IN PLACING PROJECTED ENUMERA-
TION DISTRICT.
                 I 500
                               HAS LAST PROJECTED
                                 ED BEEN READ
                                     SET SUBSCRIPT
                                       FOR NUMBER
                                     OF PROJECTED
                                      ED's READ
END OF LOOP
 I
J
                            PRINT ERROR MESSAGE THAT NUMBER
                            OF PSEUDO ENUMERATION DISTRICTS
                            EXCEEDED MAXIMUM STORAGE ALLOCATED
                                520
                                     CONTINUE
                              INITIALIZE END-OF-FILE

                              VARIABLE (IEND=0)
             NCNTY
             STATE
       READ NUMBER OF
       COUNTIES  IN
       STATE AND
       STATE NAME
                                        A-7

-------
                                                            CAASE1,  p. 6
ICNTY (N)
CNTY (M,N)
READ FEDERAL COUNTY
CODE AND NAME OF EACH
COUNTY IN THE STATE
                       PRINT STATE NAME
                       AND NUMBER OF
                       COUNTIES FOR
                       THIS STATE
       	LOOP__ON_NUMBER_pF f COUNTIES INSTATE
      |  (LOOP ENDS AT 620)
                      INITIALIZE RECORD
                      COUNTER TO ZERO
                      FOR EACH COUNTY
                      (IREC=0)
      I   620
  END OF
LOOP
                     INITIALIZE  NUMBER OF
                    COUNTY  VARIABLE TO ONE
                             (1=1)
                   SET VARIABLE  IWHER=1
                   DENOTING RECORD MUST BE
                   READ FROM MED-X TAPE.
                      640
                           CONTINUE
                             A-8

-------
                                                      CAASE1, p.7
             INITIALIZE VARIABLE MTCH
             TO ZERO.  WILL BE SET TO
             1 WHEN COUNTY MATCH IS MADE
                      PRINT NAME
                      OF  COUNTY
                   HAS FIRST RECORD
                   OF COUNTY BEEN
                       READ
MED -
  TAPE
(ITAP2)
  READ CENSUS TAPE
                                               SET END-OF-FILE VARIABLE
                                               TO 1 INDICATING ALL
                                               COUNTIES FOR THIS STATE
                                               HAVE BEEN PROCESSED
 HAS AN END-OF-FILE
 BEEN ENCOUNTERED
               DOES  COUNTY CODE ON TAPE
               EQUAL COUNTY CODE READ IN
                                               SET
                                                 MTCH=1
IS MTCH=1 INDICATING
 COUNTY MATCH MADE

-------
                                      WERE THERE  ^s^ NO
                                    PROJECTED ED's
                    	LOOP  ON NUMBER "~~| OF PROJECTED ED_'s	
                      (LOOP ENDS AT 900)
                                 DOES THIS  PROJECTED  ED
                                 BELONG  IN  THE  COUNTY
                                 OF THIS RECORD
                                  IS THE ZONE OF THIS
                                  ED THE PRIMARY ZONE
SET EW=1 FOR MOVING
FROM WEST TO EAST
IN SUBROUTINE GTGR
IS THE ZONE EAST
OF THE PRIMARY ZONE
                                                                            CAASE1,  p.3
                                     SET EW=0 FOR
                                     MOVING FROM
                                     EAST TO WEST
                                     IN SUBROUTINE
                                     GTGR
                             800
        1
                               INITIALIZE ERROR MESSAGE
                               VARIABLE TO ZERO FOR
                               SUBROUTINE GTGR
                                          A-10

-------
                                                    CAASE1,  p.9
            CONVERT X & Y COORDINATES
            TO  DOUBLE PRECISION
                 CALL SUBROUTINE
                 GTGR FOR ZONE TO
                 ZONE CONVERSION
               WAS ERROR RETURNED
               FROM SUBROUTINE
                      GTGR
PRINT ERROR MESSAGE
AND TERMINATE EXECUTION
            840
              SET X & Y COORDINATES
              TO SINGLE PRECISION
G>
               860
                    CONTINUE
        SET CONSTANT VALUE FOR UNKNOWN
        LATITUDINAL & LONGITUDINAL POINTS
        FOR PSEUDO ENUMERATION DISTRICTS
                     A-ll

-------
                                                                   CAASE1, p.10
                      SET CODE FOR THIS
                      RECORD TO 3 INDICATING
                      RECORD OF PSETJDO ED
                          WRITE ACCEPTED
                          RECORD ON OUTPUT
                          TAPE
1
r
INCREMENT COUNTY
RECORD COUNTER BY
1
EDITED FILES
WITH UTM
COORDS.
 APPENDED
EDITED
FILE
IMAGES
                           IS NUMBER OF
                           RECORDS  GT. 25
                                                          4
             i_900_ 	J	ENDjfrOF^LOOP	JT	j
                       BACKSPACE ONE RECORD
                       ON MED-X TAPE IN ORDER
                       TO CAPTURE FIRST RECORD
                                 A-12

-------
                                   ARE THERE LAT.
                                 & LONG. COORDINATES
                                 FOR THIS DISTRICT
                                                                         CAASE1,  p.11
                         NO
                        SUMMARY  DATA,
                        DO  NOT INCLUDE
                                    CONVERT LAT.
                                    TO SECONDS
                              CONVERT LONG. TO  SECONDS
                              AND NEGATE  FOR WESTERN
                              HEMISPHERE
                               CALL SUBROUTINE CED009
                               FOR LAT/LONG TO UTM
                               CONVERSION
960
   ERROR WITH INDICATOR
  VARIABLE GT 4 OR LT 0
 PRINT INDICATOR NUMBER
AND TERMINATE EXECUTION
                                 WAS THERE AN ERROR
                                 RETURNED FROM SUB-
                                 ROUTINE CED009
WHAT IS THE
ERROR NUMBER
LATITUDE >80°
PRINT LATITUDE
AND TERMINATE
EXECUTION
                               LONGITUDE >180° PRINT
                               LONGITUDE AND TERMINATE
                                     EXECUTION
                                               A-13

-------
                                     o
                                          CAASE1,  p. 12
                             1080
SET EW=1 FOR MOVING
FROM WEST TO EAST IN
SUBROUTINE GTGR
                               CONVERT X COORDINATE
                               FROM METERS TO KILO-
                               METERS EASTING
                               CONVERT Y  COORDINATE
                               FROM METERS  TO KILO-
                               METERS NORTHING
                                IS THIS DISTRICT
                                LOCATED IN PRIMARY
                                      ZONE
IS THE ZONE EAST
OF THE PRIMARY ZON
                             1100
                               SET  EW=0  FOR MOVING
                               FROM EAST T,0 WEST IN
                               SUBROUTINE GTGR
                            INITIALIZE ERROR MESSAGE
                            VARIABLE TO ZERO FOR SUB-
                            ROUTINE GTGR
                          1120
                            CONVERT X & Y COORDINATES
                            TO DOUBLE PRECISION
                                      e
                                       A-14

-------
                                            CAASE1, p.13
    CALL  SUBROUTINE  GTGR
    FOR ZONE TO ZONE
    CONVERSION
     IS THERE AN ERROR
     RETURN FROM THE
     SUBROUTINE
PRINT ERROR MESSAGE
AND TERMINATE EXECUTION
 1160
         CONTINUE
   SET  X &  Y  COORDINATES
   TO SINGLE  PRECISION
ARE THERE PROJECTED GROWTH
FACTORS FOR THIS DISTRICT
   NO
            A-15

-------
	   J.OOP_pN_NUtffiER^ OF jr_PROJECTED_GROWTH_ FACTORS
1   (ENDS AT 1220)      JL                          \
              IS THIS GROWTH FACTOR
                FOR THIS COUNTY
              IS THIS GROWTH FACTOR
              TO BE APPLIED TO THIS
                     DISTRICT
                                                       CAASE1, p. 14
1220
             CALCULATE THE PROJECTED
             HOUSING COUNT
             .CALCULATE THE PROJECTED
             POPULATION COUNT
             SET CODE FOR RECORD TO
             2 INDICATING RECORD OF
             MODIFIED HOUSING &
             POPULATION COUNT
                   ENDOF LOOP
                                                  t
                      A-16

-------
                   G>
EDITED FILE
   IMAGES
                         1240
                          SET CODE FOR THIS
                          RECORD TO 1  INDICATING
                          UNCHANGED CENSUS RECORD
                            1260
                                 CONTINUE
                            WRITE ACCEPTED
                            RECORD ON OUTPUT
                            TAPE
                              INCREMENT COUNTY
                              RECORD COUNTER
                              BY 1
7
PRINT THIS
  RECORD
                                                                  CAASE1, p.15
                                     EDITED FILES
                                      WITH  UTM
                              IS NUMBER OF
                              RECORDS GT. 25
                                   A-17

-------
                                            CAASE1, p.16
       CONTINUE
   PRINT  COUNTY NAME,
   ZONE #, MINIMUM &
   MAXIMUM X & Y
   COORDINATES AND
   MINIMUM X & Y AXES.
       'WAS AN
     END OF FILE
   ENCOUNTERED FOR
     THIS STATE
    INCREMENT COUNTY
    COUNTER BY 1.
          HAS
    DESIRED NUMBER OF
COUNTIES FOR THIS STATE
   BEEN COMPLETED
         A-18

-------
         1400
                                                    CAASE1, p. 17
            SET "IWHER" = 2
            DENOTING FIRST
            RECORD OF THIS
            COUNTY HAS ALREADY
            BEEN READ
              1460  >'
              PRINT HEADING FOR
              SUMMARY OF STATE
              COMPLETED
                                  STATE, COUNTY NAME,
                                  COUNTY CODE, NUMBER
                                  OF RECORDS WRITTEN
                                  ON TAPE.
_       P NUMBER OF
|   (ENDS  AT  1520)
             COUNTIES IN THIS STATE
 RINT COUNTY NAME, COUNTY
CODE, AND NUMBER OF RECORDSt
WRITTEN FOR THIS COUNTY.
                                               CNTY, ICNTY,
                                                   IREC
I  1520
    END
OF LOOP
              INCREMENT STATE
              COUNTER BY 1.
                     A-19

-------
                                                       CAASE1,  p.18
HAVE ALL STATES BEEN
COMPLETED FOR THIS AQCR
                                 1560
   ALL ACCEPTABLE RECORDS
   HAVE BEEN WRITTEN-PRINT
   "GOOD FINISH" MESSAGE
                                 1600
                                WRITE  EOF  &
                                REWIND  INPUT/
                                  TAPE
                                  REWIND
                                  OUTPUT
                                  TAPE
  INCREMENT  INPUT  TAPE
  UNIT NUMBER BY 1 TO
  OBTAIN NEXT STATE OF
  INTEREST
C    END    J
                        A-20

-------
                                                                 CAASE1
                                                                 SUBROUTINE CED009
                         c
            SUBROUTINE
              CED009
                        INPUT THROUGH LIST
                   INCLUDES LONGITUDE, LATITUDE,
                     AND THEIR UNITS.  OUTPUT
                   THROUGH LIST INCLUDES UTM
                      ZONE, METERS NORTHING,
                       METERS EASTING, AND
                         ERROR INDICATOR.
                                I
                          INITIALIZE UNITS
                          ERROR CONDITION
                          VARIABLE TO ZERO.
                                IS
                              UNITS
                            INDICATOR
                            POSITIVE?
                                 IS
                               UNITS
                             INDICATOR
                             LESS  THAN
                                5?
                                        SET ERROR
                                        CONDITION
                                        VARIABLE
                                          TO I.
                                                            I
                                        RETURN TO
                                         CALLING
                                         PROGRAM
                          COMPUTED "GO TO"
                            DEPENDING ON
                         VALUE OF LONGITUDE
                         AND LATITUDE UNITS
                              VARIABLE.
       1
NOT APPLICABLE
   TO CAASE.
       t
       1
                                1
NOT APPLICABLE
   TO CAASE.
       I
       I
NOT APPLICABLE
   TO CAASE.
   1
UNITS USED
 IN CAASE
   IS 4.
                       J
                                        A-21

-------
 NORTHERN
HEMISPHERE?
                                                 SET LATITUDE
                                                 SIGN POSITIVE
  ACCEPT
 LATITUDE
 AS SIGNED
     IS
 LATITUDE
  WITHIN
  RANGE?
  SET  ERROR
  CONDITION
  VARIABLE
   TO 2
     IS
 LONGITUDE
  SIGNED
 POSITIVE?
   RETURN TO
CALLING PROGRAM
                                               SET LONGITUDE
                                               SIGN POSITIVE
   ACCEPT
 LONGITUDE
 AS SIGNED
                           SET ERROR
                           CONDITION
                           VARIABLE
                             TO 3
                               IS
                         LONG.| < 180
COMPUTE
UTM ZONE
 NUMBER
                                  CAASE1
                                  SUBROUTINE CED009
                                  P.2
   A-22

-------
                                                    CAASE1
                                                    SUBROUTINE CED009
                                                    p.3
    STATEMENTS 25 I THROUGH 220(-1)
            SELECT LATITUDE
               GROUP AND
              CALUCULATE
            VARIABLE TERMS
STATEMENTS 220(-1)
THROUGH 225(-1)
              CALCULATE
             UTM EASTING
             AND NORTHING
                  WAS
               LATITUDE
             IN NORTHERN
             HEMISPHERE?
                   SET NORTHING
                   FOR SOUTHERN
                    HEMISPHERE
                ACCEPT
               NORTHING
                  UTM
               RETURN TO
            CALLING PROGRAM
                     A-23

-------
            (SUBROUTINE^
               GTGR   }
            INITIALIZE
             CONSTANTS
             FOR THESE
            COORDINATES
     LOOP ON NO.
'(END AT 40)
OF TABLES (61)
           FIND NORTHING
           BLOCK NUMBERS
             IN TABLES
       _ __END	OF _LOOP	|
           SET ERROR
         FLAG INDICATOR
              TO 1
         50
              SET DISK
              DATA  SET
               RECORD
               NUMBER
               WANTED
                                                CAASE1
                                                SUBROUTINE GTGR*
                        *OBTAINED FROM EPA WITHOUT DOCUMENTATION
               A-24

-------
                                                         CAASE1
                                                         SUBROUTINE GTGR
                                                         0.2
MAGNETIC
  DISK
READ TABLES
  FOR THIS
   BLOCK
                       IS
                  DIRECTION
                  CONVERSION
                  FROM EAST
                  TO WEST
                      7
                  CALCULATE
                 COORDINATES
                 RELATIVE  TO
                 NEW UTM ZONE
                  CONVERT TO
                  KILOMETERS
                  90
              c
  RETURN TO
   CALLING
   PROGRAM
                     A-25

-------
         C****PRUGRAM  NAME;  CAASE1                                                       1
         C****  THIS  PROGRAM  IS  DESIGNED  TO  EXTRACT  ALL  THE  ENUMERATION  DISTRICTS         2
         C      FOK  THE COUNTIES THAT  BELONG TO  THE  SAME  STUDY  AREA.   IT THEN             3
         C      WHITES  AND  EDITED  MED-X  TAPE FOR  THIS  AREA WHERE  EACH  RECORD
         C      CONTAINS ALL  THE INFORMATION FROM  THE  MED-X  TAPE  AND  ALSO THE             5
         C      ZONE  NUMBER AND  UTM  COORDINATES.                                          b
         C                                                                               7
         C       THE  USER CAN OPTIONALLY  DEFINE  PSEUDO ENUMERATION  DISTRICTS FOR
         C        GROWTH SINCE  THE  LAST  GENERAL  CENSUS  AND  CAN ALSO  OPTIONALLY
         C        DEFINE GENERAL  AREAS  OF GROWTH  BY THE  LOCATION COORDINATES  OF
         C        EACH RECTANGLE  AND  THE POPULATION COUNT AND  HOUSING COUNT
         C        COEFFICIENTS  RESPECTIVELY.
         C                                                                              15
         C       SEE  THE CAASE USER'S  MANUAL (COMPUTER ASSISTED AREA  SOURCE
         C        GRIDDING PROCEDURE  (CAASE)  USER'S MANUAL,  EPA-450/3-74-035
         C        AS REVISED) FOR A COMPLETE  DESCRIPTION OF  INPUT, OUTPUT,  AND
         C        RUNNING  INSTRUCTIONS.
         C
>        C****   THESE  DIMENSIONS  ASSUME  NO  MORE  THAN  30  COUNTIES FROM ANY ONE          21
M        C    STATE  IN THE STUDY  AREA,  NO MORE  THAN 100  PSEUDO (NEW)  ENUMERATION        22
w        C    DISTRICTS IN THE  STUDY  AREA AND NO MORE THAN  100 RECTANGLES OF            23
         C    GKOwTH (POSITIVE  OR NEGATIVE) IN  THE  STUDY AREA.                          24
         C                                                                              25
               DIMENSION XDATA(25),ICNTY(30),CNTY(5,30),AQCR(5),IREC(30),3TATE(5)       26
              1,X(100),YUOO),XL(100),YL(100),JZON(100),HCOEF(100),PCOEF(100),
             2XKH(100J,YTP(100),XX(100),YYUOO),K2QN(100),ISTAT(100),
             3KOUNTY(100),HCOUNT(100),PCOUNT(100)
               KtAL*8  XLAT,XLONG,XXLAT,XXLONG,FMNOR,FMtAS                               30
               REAL*B  DYOUT,DXOUT                                                      31
         C
         C          ASSIGN  READER  UNIT NUMbER
               IREAD=1                                                                 33
         C
         C          ASSIGN  PRINTER UNIT  NUMBER
               IPRINT33                                                                35
         C
         C          ASSIGN  MED-X TAPE  UNIT NUMBER

-------
>
C
C
               ITAP1S6

                   ASSIGN CAASE1 OUTPUT UNIT NUMBER
               ITAP2*4
               ICNTal
                      ITAP2
C******READ INPUT CARD
C          PRIMARY UTM
C
C******CAUTI ON *********
                                DATA,
                                ZONE
                             NUMBER OF STATES, STUDY AREA NAME, AND
         C
         C
         C
         C
         C
           100
120
        STATES MUST BE REQUESTED IN THEIR ORDER ON THE MED-X TAPE
        UNLESS USING DUALABS TAPES WHERE EACH STATE IS A SEPARATE FILE
        IN WHICH CASE JCL WOULD CORRECTLEY POSITION EACH FILE , BUT
        STATES BEING REQUESTED OUT OF ORDER WOULD BE INEFFICIENT.

      READ (I«EAD,100) NSTAT , AQCR, KZONE
      FORMAT (ia,5A4,I4)
      WRITE (IPRINT,120) AQCR, NSTAT, KZONE
      FORMAT C1STUDY AREA IS ' , 5A4/6X, 'NO.
                                                     OF STATES INCLUDED IS ',I<4,1
              10X,' PRIMARY UTM ZONE IS ',I4///)
         C*****KEAD IN PROJECTED FACTORS TO BE APPLIED TO ENUMERATION
C
C
         C
         C
                   DISTRICT POPULATION (RECTANGLES OF GROWTH)
           140
      RtAU (IHEAD,140)
      FORMAT (215)
                                IGROTH,IEDS
                                      N0 = 0
                                                      ***
    IliKOTH— GROWTH FACTORS?  YES = 1,
    IF (IGROTH.EQ.O)  GO TO 380
    WRITE (IPRINT,160)
160 FORMAT (///' ******** UTM(KM)
   ICOtFFICIENT ***'/5X,'X',9X,'Y',6X, 'X LENGTH  Y
   2'   HOUSING  POPULATION'//)
    DO 340 JJ=1/100
    READ (IREAD,180)  X ( J J) , Y ( JJ) , XL ( JJ ) , YL ( JJ) , JZON ( JJ) ,HCOEF ( JJ ) ,
                                                     **   UTM',13X,
                                                     LENGTH ZONE ',
                                                                              **
                                                                              37
                                                                              39
                                                                              40
                                                                              ai
                                                                              42
                                                                              45
                                                                              46
                                                                              47
                                                                              48
                                                                              49
                                                                              50
                                                                              bl
                                                                              52
                                                                              53
                                                                              56
                                                                              57
                                                                              58
                                                                              59
                                                                              60
                                                                              61
                                                                              62

                                                                              64

-------
               IPCOEF(JJ)
            180 FORMAT  (4F10.0, 15, 2F 10. 0 )
         C
         C     LAST CARD  TEST
               IF  (X(JJ).NE.O.) GO  TO 220                                               66
               IPROJcjj-1                                                               69
               WRITE  (IPRINT,200) IPHOJ                                                 70
            200 FORMAT  CO',' NUMBER OF  RECTANGLES OF  GROWTH  a  ',14)                     71
               GO  TO  380                                                                72
            220 WRITE CIPRINT, 180) X(JJ),Y(JJ), XL (JJ) , YL( JJ) , JZONC JJ) ,HCOEF ( JJ) ,           73
               IPCOEF(JJ)
         C                                                                              75
         C*****PLACE  RECTANGLES OF  GROWTH  INTO PROPER ZONE                              76
         C                                                                              77
         C     ALREADY  PRIMARY ZONE ?
               IF  (JZON(JJ).EQ.KZONE) GO TO  320                                         76

         C     DETERMINE  DIRECTION  OF CONVERSION
               IF  (JZON(JJ).GT.KZONE) GO TO  240                                         79
               Ert=1.0                                                                   80
°°              GO  TO  260                                                                81
            240 EA=O.O                                                                   82
            260 IbAO=0                                                                   83
               OXOUTsX(JJ)                                                              84
               DYUUTsY(JJ)                                                              85
               CALL GTGR(DYOUT,DXOUT,EW,I8AD)                                           86
               IF  (IBAD.EQ.O)  GO TO 300                                                 87
               WHITE  (IPRINT,280) Y(JJ),X(JJ)                                           86
            280 FORMAT  (///,' ERROR  IN PLACING  RECTANGLE  OF, GROWTH INTO PROPER  UTM      89
               1  ZONE,  Y,  X   =  ',2F15.2)                                                 90
               GO  TO  1600                                                              91
         C
         C     CALCULATE  TOP RIGHT  HAND CORNER OF RECTANGLE  IN PRIMARY ZONE,
         C         I.E., NEED ONLY MIN AND  MAX  X  AND Y
         C
            300 X(JJ)sDXOUT                                                              92
               YUJ)=DYOUT                                                              93


-------
           320 XRH(JJ)=X(JJ)tXL(JJ)                                                    94
               Y1P(JJ)=Y(JJ)+YL(JJ)                                                    95
           340 CONTINUE                                                                96
               WRITE (IPRINT,360)                                                      97
           360 FORMAT (//' RECTANGLES OF GROWTH EXCEEDED MAXIMUM STORAGE ALLOCATE      98
              ID')                                                                     99
               GO TO 1600                                                             100
         C                                                                            101
         C*****READ IN COORDINATES AND POPULATION FOR PROJECTED ENUMERATION           102
         C        DISTRICTS IF THERE ARE ANY                                          103
         C                                                                            104
         C     IEDS—PROJECTED ENUMERATION DISTRICTS (ED'S)?  YES=1, NQsQ
           380 IF (IEDS.EG.0) GO TO 520                                               105
               WRITE (IPRINT,400)                                                     106
           400 FORMAT (//38X,'** COEFFICIENT **'/' UTM X(KM) UTM Y(KM) ZONE STATE     107
              1 CNTY  HOUSING POPULATION'//)                                          108
               DO 460 KKsl,100                                                        109
               READ (IREAD,420) XX(KK),YY(KK),KZON(KK),ISTAT(KK),KOUNTY(KK),HCOUN     110
              1T(KK),PCOUNT(KK)                                                       111
           420 FORMAT (2F10.0,315,2F10.0)                                             112
i               IF (XX(KK).NE.O.) GO TO 460                                            113
£              NEWEDSsKK-1                                                            114
               WRITE (IPRINT/440)  NEWEDS                                              115
           440 FORMAT CO',' NUMBER OF NEW ENUMERATION DISTRICTS =  ',14)              116
               GO TO 520                                                              117
           460 WRITE (IPRINT/420)  XX(KK),YY(KK),KZQN(KK),1ST AT(KK),KOUNTY(KK),HCO     118
              1UNT(KK),PCQUNT(KK)                                                     119
           480 CONTINUE                                                               120
               WRITE (IPRINT,500)                         >•                            121
           500 FORMAT (//' NUMBER  OF PSEUDO ENUMERATION DISTRICTS EXCEEDS MAXIMUM     122
              1 STORAGE ALLOCATED'//)                                                 123
           520 CONTINUE                                                               124
         C
         C     INITIALIZE FILE COUNTER
               lENDsO                                                                 125
         C                                                '                            126
         C**** READ IN STATE NAME  AND FIPS CODE AND NUMBER OF COUNTIES IN THE

-------
         C     STATE AND THEIR FJPS CODE NUMBERS AND NAMES
         C                                                                             128
               READ  (IREAD,100) NCNTY, STATE, KSTATE
               HEAD  (IREAD,560) ( ICNT Y (N) , (CNTY (M, N) ,M=1 ,5) , N*l ,NCNT Y)                 130
           560 FORMAT  (I4,5A4)                                                         131
               WRITE           640 CONTINUE                                                                146
               MTCHsQ                                                                  147
                   E  (IPRINT,660)  (CNTYCJ,I),J=1,5)                                    148
           660 FORMAT  (///,5X, 'COUNT Y ',5A4)                                           149
         C
         C     HAS THE FIRST RECORD OF A NEW COUNTY ALREADY BEEN READ WHILE
         C       PROCESSING ANOTHER COUNTY ?
         C
               GO TO  (680,720),IWHER                                                   150
         C                                                '<•                             151
         C*****READ MED-X TAPE AND SELECT ALL ENUMERATION DISTRICTS THAT LIE  IN        152
         C     THE REQUIRED COUNTIES.                                                  153
         C                                                                             154
           680 READ (irAPl,700,END=1420) LSTATfc , XDATA ( 1 ) , JCNT Y , (XDAT A (L ) , L=2, 23) ,
              1XHOUS,XPOP,XLONG,XLAT
           700 FORMATU2,A2,I3,21A4,A2rF7.0,F8.0,2F10.4)
               IKLSTATE.NE. KSTATE) GO TO 680
           720 IF (JCNTY-ICNTY(I))  680,740,1320                                       158

-------
         C                                                                            159
         C**** HAVE FOUND A COUNTY MATCH.
           740 U (MTCH.EQ.l) GO TO 920                                               162
               MTCHsl                                                                 163
         C                                                                            16a
         C**** ADD NEW ENUMERATION DISTRICTS TO OUTPUT TAPE IF THERE ARE ANY
         C       FOR THIS COUNTY
         C                                                                            166
               IF (IEDS.EQ.O) GO TO 920                                               167
               DO 900 LM,NErtEDS                                                      168
         C
         C     COUNTY MATCH ?
               IF (KOUNTY(L)-JCNTY)  900,760,900                                      169
         C
         C      COORDINATES PRIMARY ZONE ?
           760 IF (KZON(L).EQ.KZONE) GO TO 860                                        170
         C
         C     DETERMINE DIRECTION OF CONVERSION
               IF (KZON(L).GT.KZONE) GO TO 780                                        171
,.               EW=1.0                                                                 172
T              GO TO 800                                                              173
M          780 EW=0.0                                                                 17U
           800 IBADsQ                                                                 175
               DXOUT=XX(L)                                                            176
               UYOUT=YY(L)                                                            177
               CALL GTGR(DYOUT,DXOUT,EW,IBAD)                                         178
               IF (ItJAD.EQ.O) GO TO 840                                               179
               WRITE UPRINT,820) YYU),XX(L)                                         180
           820 FORMAT (///,' ERROR IN PLACING NEW ENUMERATION DISTRICT IN PROPER
              1UTM ZONE, Y, X a ',2F15.2)
               GO TO 1600                                                             183
           840 XX(L)=OXOUT                                                            184
               YY(L)=DYOUT                                                            185
           860 CONTINUE                                                               186
         C                                                                            187
         C***** WRITE GOOD PSEUDO ENUMERATION DISTRICT RECORD ON OUTPUT TAPE
         C      WITH DUMMY LATITUDE AND LONGITUDE FOR RECORD PADDING

-------
C                                                                            190
      XLONGsl.OE+10                                                          191
      XLATsl.OE+10                                                           192
C                                                                            193
C******  SET CODE INDICATING PSEUDO ENUMERATION DISTRICT RECORD
C                                                                            195
      KODEsi                                                                 196
      WKITE(ITAP2,870) ISTATCU,KOUNTY(L),HCOUNT(L)rPCOUNT(L),XLONG,         197
     1XLAT,KZONE,XX(L),YY(L),KODE
  670 FURMAT(I2,2X,I4,86X,F7.0,F8.0,2D25.16,I5,2F15,2,I4)                    200
      WRITE (IPRINT,880) ISTAT(L),KOUNTY(L),HCQUNT(L),PCOUNT(L), XLONG,XL     201
     1AT,KZONE»XX(L),YY(L),KODE                                               202
  880 FORMAT ( '0 ', 12,3X, I3,86X,F7.0,F8.0, /, 3X, 2D25.16,15, 2F 15.2, 14, //)       203
      IKEC(I)sIREC(I)+l                                                      20^
  900 CONTINUE                                    -                           20S
C                                                                            206
C*** FINISHED WITH PSEUDO ED'S BEING ADDED.                                   207
C                                                                            211
C***** NOW PROCESS EXISTING ENUMERATION DISTRICTS, FIRST RECORD WAS
C      ALREADY READ AT STATEMENT 680
C
C     NOrt FIND THE UTM COORDINATES FOR THIS  DISTRICT AND ADD TO
C      AN OUTPUT TAPE.
C
C      IF LATITUDE AND LONGITUDE ARE ZERO, THEN  THE RECORD IS A
C      SUMMARY RECORD, DON'T PROCESS IT.
  920 IF (XLONG+XLAT.EG.O.) GO TO 680                                        213
      XXLATsXLAT*3.6D8                                                       214
C
C     CONVERT COORDINATES OF LATITUDE AND LONGITUDE TO UTM
C**** FOR CE0009, WEST LONGITUDES ARE NEGATIVE, WE ARE ALWAYS DEALING        215
C     rtilH WEST.                                                             216
      XXLONG=-XLONG*3.6D8                                                    217
      CALL CED009(XXLONG,XXLAT,IND1,MZON,FMNOR,FMEAS,MERR)                   218
C     ANY NON-ZERO ERROR CODES RETURNED FROM CED009?                         219
      IF (MEKR)  940,1080,940                                                220
  940 GO TO (960,1000,1040),MERR                                             221

-------
           960 WRITE (IPR1NT,980) IND1                                                222
           980 FORMAT (3X,'CALLED CED009 WITH IND1 GT 4 OR IND1 LT 0,  IND1= ',13)     223
              1                                                                       224
               GO TO 1600                                                             225
          1000 WRITE (IPRINT,1020) XLAT                                               226
          1020 FORMAT (3X,'LAT EXCEEDS 80 DEG, LAT= ',D25.16)                         227
               GO TO 1600                                                             228
          1040 WRITE (IPRINT,1060) XLONG                                              229
          1060 FORMAT (3X,'ABS(LONG) GT 180 DEG, LONG= ',D25.16)                      230
               GO TO 1600                                                             231
         C                                                                            232
         C   CONVERT METERS TO KILOMETERS                                             233
         C                                                                            234
          1080 XOUTsFMEAS/1000.                                                       235
               YOuT=FMNOR/1000.                            <                           236
         C                                                                            237
         C*****IS THIS DISTRICT LOCATED IN THE PRIMARY UTM ZONE                       238
         C                                                                            239
               IF (MZON.EQ.KZONE) GO TO 1180                                          240
P>        C                                                                            241
i        C   NEED TO CONVERT TO PRIMARY ZONE, DETERMINE EAST-WEST DIRECTION OF        242
w        C   CONVERSION                                                               243
               IF (MZON.GT.KZONE) GO TO 1100                                          244
               EW=1.0                                                                 245
               GO TO 1120                                                             246
          1100 EW=0.0                                                                 247
          1120 IbAD=0                                                                 248
               DYOUT=YOUT                                                             249
               DXUUT=XOUT                                 ;                            250
               CALL GTGR(DYOUT,DXOUT,EW,IBAD)                                         251
               IF (IBAD.EQ.O) GO TO 1160                                              252
               WKITE (IPHINT,1140) YOUT,XOUT                                          253
          1140 FORMAT (///,' ERROR IN CONVERTING COORDINATES TO PRIMARY UTM ZONE,     254
              1 Y, X = ',2F15.2)                                                      255
               GO TO 1600                                                             256
          1160 CONTINUE                                   '                            257
               XOUT=DXOUT                                                             258

-------
               YOUTsOYOUT                                                             259
         C                                                                            260
         C***** AKt THERE PROJECTED FACTORS FOR  THIS ED,  I.E.,  IS IT WITHIN A
         C     RECTANGLE OF GROWTH.
         C      (CHECK RECTANGLES OF GROWTH)                                           262
         C                                                                            263
         C     ANY RECTANGLES TO CHECK ?
          1180 IP (IGHOTH.EQ.O)  GO TO 1240                                             264
               DO 1220 M=1,IPRQJ                                                      £65
         C
         C     CHECK RECTANGLE SIDES
          1200 If- (X(M).GT.XOUT.OR.XRH(M).LT.XOUT)  GO TO  1220                         267
               IF (Y(M),GT.YOUT.OR.YTP(M).LT.YOUT)  GO TO  1220                         268
         C
         C     APPLY COEFFICIENTS
               XHOUS*XHQUS*HCOEF(M)                                                   269
               XPOPsXPOP*PCOEF(M)                                                     270
         C
         C     SET RECORD TYPE CODE TO INDICATE  MODIFICATION MADE TO RECORD
>              KODE=2                                                                 271
w              GO TO 1260                                                             272
          1220 CONTINUE                                                               273
         C
         c     NO HOUSING OR POPULATION MODIFICATION  SET RECORD TYPE.
          1240 KODE=1                                                                 274
          1260 CONTINUE                                                               275
         C                                                                            276
         C*****wRITE GOOD RECORD ON OUTPUT  TAPE.                                      277
         C
               WRITE (ITAP2,1280) LSTATE,  XDATA(1),JCNTY,(XDATAU),L=2,23),XMOUS,
              lXPOP,XLUNG,XLAT,KZONEfXUUT,YOUT,KODE
          1280 FOHMAT(I2,A2,I4,21A4,A2,F7.0,F6.0,2D25.16,I5,2F15.2,I4)
         C                                                                            281
         C***** THIS SECTION PRINTS THE FIRST 25 RECORDS  (INCLUDING THE  ADDED
         C     ENUMERATION DISTRICTS) FUK  EACH COUNTY.
         C     CAN dE DELETED OR MODIFIED  TO PRINT  ALL RECORDS  IF DESIRED,            283
         C                                                                            284

-------
      IREC(I)3IRECU) + 1                                                      285
      IF (IREC(I).GT,25) GO TO 680                                           286
      wRlT£(IPRINT,1300)LSTATE,XOATA(l),JCNTY,(XDATAa)rLs2,23),XHOUS,
     1XPOP,XLONG,XLAT,KZONE,XOUT,YOUT,KQDE
 1300 FORMAT('0',1X,I2,A2,I3,21A4,A2,F7.0,F8.0,/,3X,2D25.16,I5,2F15.2,
     lia,//)
      GO TO 680                                                              291
C                                                                            292
C*****HAVE FOUND ALL ENUMERATIONS DISTRICTS FOR ONE COUNTY* LOOK FOR         293
C     ANOTHER COUNTY.                                                        294
C
 1320 CONTINUE                                                               295
      WRITE (IPRINT,1360) (CNTYCJ,I),J=l,5),KZONE                            296
 1360 FORMAT ('0',5X,'FOR COUNTY ',5A4,5X,'  ZONE NO.',I10//)                297
C
C*****TIME TO BEGIN A NEW COUNTY, IF THERE IS ONE.                           298
      IF (IEND.EQ.1) GO TO 1160                                              299
      IM + 1                                                                  300
      IF (I-NCNTY)  1400,1400,1460                                           301
 1400 IWHERs2                                                                302
      GO TO 640                                                              303
C                                                                            304
C*****HAVE REACHED AN EOF ON THE INPUT FILE—SO, A STATE HAS BEEN ENDED.     305
 1420 lENDsl                                                                 306
      WRITE (IPRINT,1440)                                                    307
 1440 FORMAT ('0','  HIT END OF FILE ON TAPE')                               308
      GO TO 1320                                 -                            309
 1460 WRITE 
-------
      IF(NSTAT-ICNT) 1560,520,520
C
C*****ALL DESIRED RECORDS HAVE BEEN WRITTEN.                                 32a
 1560 WRITE (IPRINT,1580)                                                    325
 1580 FORMAT (///,3X,'GOOD FINISH')                                          326
 1600 KEWIND ITAP1                                                           327
      tNDFILE ITAP2                                                          328
      REWIND ITAP2                                                           329
      CALL EXIT                                                              330
      END                                                                    331

-------
      SUBROUTINE CED009(XLNG,XLAT,IND1,     MZON,FMNOR,FMEAS,MERR)
C     MODIFIED BY HAWS, RTI, 12/72 FOR ONLY 1 SPHEROID,I.E. WHERE IND2=2
C     GEODETIC POSITION TO UNIVERSAL TRANSVERSE MERCATOR COORDINATES
C     DECH/COMPUTER CONCEPTS
      COMMON/CORD/COORD
      REAL*8 COORD(16,7)  ,FMPHI,FDELTA
      HEAL*8 DELTA,ALPHA,DELTAQ,DELTAL,BETA
      KtAL*tt GAMMA,DDELTA,FTERM
      REAL*8  FIMLAT,FIMLNG,FILNG,FILAT,FMN,FMEAS
      REAL*8 FMNOR,FMEAS,XLNG,XLAT
      MERR=0
    1 M£RK=1
      RtTURN
    2 IF(liMDl-5)3,l,l
    3 GO TO C5,6,7,b),INDl
    S FILNG=XLNG*78683.7792DO
      FILAT=XLAT*78683.779200
      bU TO 13
    6 FILNG=XLNG *.381469726b6DO
      FILAT = XLAT *.381t<697265600
      GU 10 13
            XLNG*2. 062648062DO
           = XLAT*2.0626«8062DO
      GU TO 13
    8 FILNG = XLNG
      FILAT = XLAT
   13 IF(FlLATM4,15,lb
   14 FIMLAT=-FILAT
      GU TO 16
   15 eiMLAT=FILAT
   16 CUNTINUt
      IF(FlMLAT-2.88010) 18,18,17
   17 MEKR=2
      HtTUKN
   18 IMFILNG)19,20,20
   19

-------
                 GU  FU 21
              20 UMLNG=FILNG
              21 CUNTINUE
                 IF(FIMLNG-6.48D10)  24,23,22
              22 MtKK=3
                 KETUKN
              23 MZUN=1
                 GU  TO 25
              24 MZUN =  (FILNGf6.696D10)/2.16D9
              2S CUNTINUE
              600 CUNTINUE
                 if-(FIMLAT-72.D8)  201,202,601
              601 CUNTINUE
                 IF(FIMLAT-1<44.D8)  202,203,602
              602 CUNTINUE
                 .IF(HMLAT-198.D8)  203,204,603
              603 CUNTINUE
                 1F(FIMLAT-234.D8)  204,20b,604
              604 CUNTINUE
                 IFCFIMLAT-262.8D8)  205,206,605
T             605 CUNUNUt
a                IF(MMLAT-277.2U8)  206,207,207
              201 J=l
                 FMPMI = 360.D7
                 GU  TU 210
              202 J=2
                 FMPHI = 108.D8
                 GU  FU 210
              203 J = 3
                 f-MHHI = 180.08
                 UU  TU 210
              204 J=4
                 PMPH1 = 216.1)8
                 GU  TU 210
              205 J=5
                 F^IPHI = 252.D8
                 Gu  1U 210

-------
 206 J=6
     FMPHI  s 270.08
     GU TO  210
 207 J=7
     FMPHI  = 282.608
 210 DELTA  = (FIMLAT-FMPHI)*. 0000100
     1 = 6
     ALPHA=COORD(7,J)   fCOORD(8,J)   *DELTA
 211 ALPHA=CUORD(I,J)   +ALPHA*DELTA
     1 = 1-1
     IF(I)213,213,211
 213 UELTAU=DELTA*ALPHA
     F TtKM  = MZON-31
     UELIAL=(216.D7* FTERM   +108.07)-FILNG
     Ufc.LTALsDtLTAL*4848 1368 11. 0-20
     ALPHA=COURD(lb,J)   +CUORDC 16, J)   *DELTAQ
     BtTA=CUURD(l6»J)   ADELTAL
     l = ia
 215 GAMMA=COORD(I,J)   tALPHA*DELTAQ-BETA*DELT AL
     UDELTAsALPHA*OELTALtBETA*DELTAQ
     ALPHA=CUORD(I-1,J)  +GAMMA*DELTAQ-DOELTA*OELTAL
     dtTA=GAMMA*DELTALtDDELTA*OELTAQ
     1 = 1-2
     IF(I-10)220,220,215
 220 GAMMA=CUORD(10,J)   +ALPHA*DELTAQ-DELTAL*BETA
     DDELTA=ALPHA*DELTAL+BETA*DELTAQ
     PMM =  COORO(9,J)   fGAMMA*DELTAQ-DDELTA*DELTAL
     FMEAS  = 5.0D5 -(GAMMA*DELTALfDDELTA*DELTAQ)
5000 FUKMAT(2D25.16)
 225 KMNUR = 1.0D7-FMN
     UU TO 227
 22« FMNUR = FMN
 227 HtTURM

-------
 BLUCK DATA
 CUMMJN / CORD/COORD
 HtAL*8 COORDU6,7)
 R£AL*d CORD12(16),CORD22(16),CORD32(16),CORD42(16),CORD52(16),
1    CURD62(16),CORD72U6)
 EQUIVALENCE
1    (COORDU,!)  , CORD12C1)) ,(COURDU,2)  ,CORD22(i)),
2    (CUORD<1,3)  , CORD32U)) ,
-------
37765697.7,.2187148430L 07, -, 1027623620E 07, .0279208157E 07,
4-.0025458841E 07, -.0018513695E 07 , .0012S62355E 07,
5-.OU04359447E 07/
 DATA CORD62/ 1.8723215513E-05, 1.6953882434E-10,
1 2.1175151210E-15, 2.9398158655E-20, 4.3557493117E-25,
26.7218060066E-30, 10.6695415012E-35, 17,2886054901E-40,
38323452.6,.1655376293E 07, -.0799485147E 07, .0238924408E 07,
4-.0039827738E 07, -,0003223536t 07, .0005528952E 07,
5-.0002522388L 07/
 UATA COHD72/ 2.4310955817E-05, 2.8981418519E-10,
1 4.6980991563E-15, 8.S098855196E-20, 16.4479412680E-25,
233.1014282702E-30, 68.5329893109E-35,  144.8462561026E-40,
3 6714033.i,.1275252086E 07, -.0624825325E 07, .0195643581E 07,
4-.0039646076L 07, .0002575786E 07, ,0002080265t 07,
5-.0001257142E 07/

-------
-c-
      SUBROUTINE GTGR (CN,CE,EW,IBAD)
C*****TH1S PROGRAM CONVERTS POINTS FROM ONE ZONE INTO ANOTHER ZONE.
c     IT REQUIRES Y,X COORDINATES.
C     NEEDS EW=0 GOING FROM EAST  TO WEST.  EW=1  GOING FROM WEST TO EAST.
C     IBAD=1 INDICATES AN ERROR.
      DIMENSION B1(8,8),NR(61)
      KEAL*8 BlrAl,RN,RE,CNP,CEP,A,B,C,D,CN,CE,Vl
      DEHNE FILE 5(61,512,L, UK)
      DATA NR/20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,
              39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,
              58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,
              77,78,79,80/
      CN = CN*1000.0
      CE s CE*1000.0
      Al = CN/100000.0
      IN = Al f .5
      RN = IN * 100000
      Al = CE/100000.0
      IE = Al t .5
      HE = IE * 100000
      CNP = (CN-RN)*.00001
      CEP = (CE-RE)*.00001
      DO 40 1=1,61
      IF (NR(I).EQ.IN) GO TO 50
      CONTINUE
      1BAD=1
      GU 10 90
      IbLUCK = I
      NtAD(S'IBLOCK)  bl
      IF (trt.EQ.l.)  GO TO 60
      iF lErt.EQ.O.)  GO TO 70
      IE = 10 - IE
      GU 10 80
      VI = -1.0
      bl(lE,2) = B1(IE,2) * VI
      B1(I£,4) = Q1(1E,4) * VI
      bl(lt,6) = B1(IE,6) * VI
              60
              70
00000020
00000030
00000040
00000050
00000060
00000070
00000080
00000090
00000100
00000110
00000120
00000130
00000140
000001SO
00000160
00000170
00000160
00000190
00000200
00000210
                                                                                   00000220
00000260
00000270
00000280
00000290
00000300
00000310

-------
                 Bl(It,8) = BHIE.,8) * VI                                          00000520
              80 A =(bl(IE,5)t((CNP*Bl(IE,7))-CCEP*Bl(IE,8))))                     00000330
                 B =lbl(lE»6)+((CNP*bl(IE»8))t(CEP*Bl(IE»7))))                     00000340
                 C =(dl(IE,3)+((CNP*A)-(CEP*B)))                                   00000350
                 U = (BlUE,4) + ((CNP*B)t(CEP*A)))                                   00000360
                 CN s(BKiE,l) + ((CNP*C)-(CEP*D)))                                  00000370
                 C£ =(bOOOOO.OtBl(IE/2)t((CNP*D)-KCEP*C)))                         00000380
                 CM = CN/1000.0                                                    00000390
                 CE s cE/iooo.o                                                    oooooaoo
              90 HtlURN
                 tNU                                                               00000^20
JN
OJ

-------
                     APPENDIX B


LOGICAL FLOWCHARTS AND FORTRAN SOURCE CODE LISTINGS
             CAASE2  (and Subroutines)
                           B-l

-------
B-2

-------
                                                 CAASE2
          c
START
>
f
SET I/O UNIT
NUMBERS FOR
COMPUTER SYSTEM
BEING USED
                 I
         INITIALIZE X AND Y
        DIMENSION VARIABLES,
        BASIC UNIT AREA, AND
           NUMERIC SHIFT
             MULTIPLIER
           CALL SUBROUTINE
               INBOUN
           TO READ CONTROL
          CARDS AND COUNTY
            OUTLINE FILE
 _LOOP_ON_ NUMBER _J
T(LOOP ENDS AT 31)
      OF COUNTIES
         CALL  SUBROUTINE
             TRACKR
         TO DETERMINE  UNIT
         CELLS  INTERIOR,
          EXTERIOR AND ON
           THE  BOUNDARY
           OF THE COUNTY
          CALL SUBROUTINE
             PROXPRNT
          TO DRAW COMPUTER
           PRINTER MAP OF
             THE COUNTY
          31 END  ^ '  OF LOOP
                ©
                B-3

-------
                                                  CAASE2,  p.2
   LOOP_ _ON_NUMBER_
J~(LOOP ENDS  AT 34),
OF COUNTIES
            CALL SUBROUTINE
                 INPOP
            TO READ CAASE1
             OUTPUT TAPE-
              CENSUS DATA
              "I
               t
           CALL SUBROUTINE
               PROXML
                     COUNTY
              COMPUTE THE
            POPULATION AND
           HOUSING FOR EACH
             CELL IN THIS
                COUNTY
I	34_i5L_
              200
                 >W
                       OFLOOP
              REWIND
               TAPE
              NOUT1
            INITIALIZE GRID
              CELL ARRAY
                                        WRITE NUMBER
                                        OF CONTROL
                                        CELLS
                                          STOP
                            )
                J
                  B-4

-------
                                     CAASE2,  p. 3
        0
        READ IN
     PROXIMAL MAPS
          FOR
     ALL COUNTIES
    CALL SUBROUTINE
        GRIDIT
     TO PARTITION
    MATRIX OF UNIT
    AREA GRIDS INTO
        SQUARES
         WERE
        MAXIMUM
    NUMBER OF GRIDS
       EXCEEDED
YES
              NO
    CALL SUBROUTINE
        ADJUST
    TO DELETE EMPTY
   GRID SQUARES FROM
THE LIST AND PARTITION
   BOUNDARY SQUARES
           B-5

-------
            WERE
          MAXIMUM
          ER OF GRIDS
          XCEEDED
                                            CAASE2, p. 4
        37
       'REWIND
      'NOUTl AND
         NOUT2
            I
      CALL SUBROUTINE
          SQROFF
    TO COMPUTE SEPARATE
  fLNTEGRALS OF CONTAINED
   POPULATION & HOUSING
       FOR EACH GRID
       IN THE COUNTY
           WERE
          MAXIMUM
      NUMBER OF GRIDS
         EXCEEDED
     CALL SUBROUTINE
           SORT
 TO SORT THE GRIDS BY STATE,
BY COUNTY, BY NORTHING, BY
EASTING
       CALL SUBROUTINE
           OUTPUT
       TO WRITE  RECORD
       FOR  EACH  GRID
     SQUARE IN THIS  LIST
             B-6

-------
                                                       CAASE2,  p. 5
                  ITE MESSAGE
                "GOOD FINISH"
                 TO INDICATE
               SUCCESSFUL RUN/
                 C
STOP
   10
     INCREASE
   PARTITIONING
    THRESHOLD
      VALUE
    INCREMENT
    NUMBER OF
    ATTEMPTS
        IS
     NUMBER OF'
ATTEMPTS LESS
         ATTEMPTS^
     .ALLOWED.

          ,NO

       STOP
     YES
                    B-7

-------
             c
SUBROUTINE
  INBOUN
                               CAASE2
                               SUBROUTINE  INBOUN
                 READ IN
                 CONTROL
                  CARD
     LOOP ON NUMBER " OF STATES
(LOOP ENDS AT 10)
                 "1

                  t
                READ NUMBER
                OF  COUNTIES
              IN STATE,  STATE
                NAME, STUDY
                AREA CODE.
     LOOP_ON_ NUMBER j
    ((LOOP ENDS~AT 20)
OF COUNTIES
               READ IN COUNTY
                  NAME AND
                 COUNTY CODE
                   WANT
                  COUNTY
                 OUTLINES
                  PLOTTED
                 WRITE
                COUNTY
                TO TAPE
                  COMPUTE
                 COMPOSITE
               STATE-COUNTY
                 FIPS CODE
                    IS
                   THIS
                 THE FIRST
                  COUNTY

-------
 PRINT ERROR
 MESSAGE "STATE
 COUNTY CODES
 OUT-OF-ORDER"


/'""^STOP\
C  • ™    J
      IS THIS
     COUNTY IN
NUMERICAL SEQUENCE
    (ASCENDING)
                       21
               f
                 10
          YES
                               INCREMENT
                               NUMBER OF
                               COUNTIES
    END
                                      OF LOOP
                              INITIALIZE
                               SUMMARY
                               VARIABLES
                              GEOGRAPHIC
                              COORDS, NO.
                             RECORDS, ETC.

-------
       IS
      THIS
     RECORD
  THE STARTING
     RECORD
^MESSAGE GIVING
    COUNTY CODE
  WRITE RECORD
    OF NOUT3
  IF NOUT >  0.
                                          CAASE2
                                          SUBROUTINE INBOUN
                                          p.3
      IS
    THIS A
  NEW COUNTY
PROCESS HEADER
    RECORD
     THIS
   THE FIRST
     COUNTY
    OUTPUT
   PREVIOUS
   COUNTY'S
     INFO
     WANT
    COUNTY
   OUTLINES
    PLOTTED
   WRITE
   LINE
  SEGMENT
  TO  TAPE
1010
INITIALIZE
FOR
NEW
COUNTY


             B-10

-------
                             INCREMENT #
                           OF SEGMENTS FOR
                             THIS COUNTY
                                                    WRITE ERROR
                                                      MESSAGE
                                                      "ZONE BAD"
CALL SUBROUTINE
GTGR TO CONVERT
  POINTS TO
 PRIMARY ZONE
                              CALCULATE
                             COORDS, FOR
                             STARTING &
                            ENDING NODES
                            FOR THIS NODE
 WRITE ERROR
MESSAGE "BAD
 CONVERSION"
                                 STORE
                            COORDINATES  IN
                             STORAGE ARRAY
                             READ IN A
                             NEW  RECORD
                                                              CAASE2
                                                              SUBROUTINE  INBOUN
                                                              p.4
                              B-ll

-------
        HAS
      END OF
    TAPE BEEN
   ENCOUNTERED
      DIVIDE
    COORDINATES
    VALUES BY 10
        IS
       THIS
     SEGMENT A
       POINT
      IS THIS
   LAST COUNTY &
LAST RECORD OF THIS
      COUNTY
      IS THIS
     RECORD FOR
   PRESENT COUNTY
      OR NEXT
      COUNTY
         IS
        ID OF
  THIS RECORD <
       OF NEXT
       COUNTY
                                           CAASE2
                                           SUBROUTINE INBOUN
                                           p.5
  WRITE ERROR
MESSAGE "STATE-
 COUNTY NOT IN
 OUTLINE FILE
                                      STOP
                                       28
       B-12

-------
                    4000
                        CONTINUE
                      END OF COUNTY
                     OUTPUT CURRENT
                        COUNTY'S
                       INFORMATION
                       SEARCH FOR
                      MINIMUM AND
                       MAXIMUM X &
                      Y COORDINATES
                       FOR ENTIRE
                       STUDY AREA
     WRITE
     ERROR
    MESSAGE
C
STOP
 31
  WRITE
 SUMMARY
 RECORD
 FOR THIS
COORDINATE
                         WRITE
                      COORDINATES
                        FOR THIS
                        SEGMENT
                                                         CAASE2
                                                         SUBROUTINE INBOUN
                                                         p.6
                          WANT
                         COUNTY
                        OUTLINES
                         PLOTTED
                                            WRITE
                                            LINE
                                            SEGMENT
                                            TO TAPE

-------
                                                       CAASE2
                                                       SUBROUTINE INBOUN
                                                       P-7
           IS
       COUNTY ID
    ON RECORD JUST
        READ IN
         ORDER
                               WRITE MESSAGE
                               STATE COUNTY
                               CODE NOT IN
                               OUTLINE FILE
             YES
   CALCULATE ORIGIN
    OF STUDY AREA,
 INITIAL GRID SQUARE
BASED ON EXTREME COORDS
    OF STUDY AREA.
  Q
                                   (STOPA
                                    29    J
   RETURN TO   ^
.CALLING PROGRAM
                        B-14

-------
c
SUBROUTINE
  TRACKR
        I
CAASE2
SUBROUTINE TRACKR
   'READ IN
   COUNTY
   OUTLINE
 COORDINATES
  1070
   I
   SET MINIMUM
   AND MAXIMUM
  X AND Y POINTS
        I
    DETERMINE
   MINIMUM AND
   MAXIMUM I &
   J SUBSCRIPTS
        IS
    IRECTION  OF
 SEGMENTS COUNTER
     CLOCKWISE
  CALL SUBROUTINE
      REORDR
 TO REORDER COUNTY
 OUTLINE SEGMENTS
     DETERMINE
      CELL TO
      TRACK-
    INITIALIZE
     INCREMENT
      SEGMENT
      COUNTER
       B-15

-------
                 ARE
            ALL SEGMENTS
               COMPLETE
                                                 CAASE2
                                                 SUBROUTINE TRACKR
                                                 p.2
                   NO
             INITIALIZE
              FOR NEXT
              SEGMENT
            SET  COORDINATES
            OF THE  SIDES  OF
            THE NEXT  CELL
                  I
           CALL SUBROUTINE
               SIDEIT
             TO COMPUTE
           INTERSECTION OF
           COUNTY OUTLINE
            SEGMENT WITH
           GRID CELL SIDE
         8
    I
             COMPUTE THE
             AREA IN THE
           CELL CONTAINED
          BY THE END POINTS
            OF THE SEGMENT
NO
   WERE
 ANY SIDES
INTERSECTED
               SET  EXIT
              SIDE  EQUAL
            TO INTERSECTED
                 SIDE

-------
                                             CAASE2
                                             SUBROUTINE  TRACKR
                                             o.3
      CALL SUBROUTINE
          WRAPUP
    TO COMPUTE CONTAINED
         AREA IN A
       BOUNDARY CELL
             I
      CALL SUBROUTINE
          NETBAL
     TO REDUCE COMPUTED
     CONTAINED AREA OF A
      BOUNDARY CELL TO
       LE UNIT AREA
    FLAG BOUNDARY CELLS
 WITH CONTAINED AREA EQUAL
UNIT AREA TO DISTINGUISH
BOUNDARY CELLS FROM INTERIOR
CELLS
          HAVE ALL
        SEGMENTS BEEN
          EXAMINED
  YES,
          DETERMINE
          NEXT  CELL
          TO TRACK
          NUMBER 0
        SEGMENTS BEEN
            CEEDE
YES
CALL SUBROUTINE
  ASTORE TO
INITIALIZE WITH
COORDINATES OF
 FIRST SEGMENT
       CALL SUBROUTINE
          ASTORE TO
       INITIALIZE WITH
        NEXT SEGMENT
             B-17

-------
        0
                CAASE2
                SUBROUTINE TRACKR
                p. 4
 CALL SUBROUTINE
      DECIDE
 TO DETERMINE THE
NEXT BOUNDARY CELL
ALONG BOUNDARY LINE
           IS
       THIS THE
       SAME CELL
YES
  CALL SUBROUTINE
       NTRIOR
    TO DETERMINE
   INTERIOR CELLS
   ON A SINGLE ROW
     AND COLUMN
  20
   INITIALIZE FOR
     NEXT CELL
         1
     INITIALIZE
     DEPARTURE
      AND ENTRY
        SIDES
     'SEGMENT
     COUNT LE
  NUMBER OF SEGMENTS
   DO BE EXAMINED
     YES
         IS
     SEGMENT
   COUNTER GT
NUMBER OF SEGMENTS
   0 BE EXAMINED
  YES   _
               -"1 0

-------
                                         CAASE2
                                         SUBROUTINE TRACKR
                                         t>.5
100
  CALL SUBROUTINE
       FINAL
   TO MAKE FINAL
 DETERMINATION OF
 CELLS EXTERIOR TO
 BOUNDARY CELLS AND
  CONVERT NEGATIVE
  AREA TO POSITIVE
  r   RETURN  TO
  CALLING  PROGRAM
         B-19

-------
          C
                                                 CAASE2
                                                 SUBROUTINE REORDR
SUBROUTINE
  REORDR
           DETERMINE INDEX
            OF THE MIDDLE
               SEGMENT
          MID=(NUMSEG+l)/2
           INITIALIZE FIRST
           SEGMENT  (1-1)  AND
            EACH SEGMENT
              (J=NUMSEG)
LOOT _ON ja&LF_THE_
1(LOOP ENDS AT 1)
       NUMBERJ3F_ SEGMENTS
          SWAP Ith SEGMENT
        WITH THE Jth SEGMENT
         AND THE START NODE
         WITH THE END NODE
            COORDINATES
             INCREMENT I
               TO NEXT
             SEGMENT IN
           ASCENDING ORDER
j__END_OF_
            INCREMENT J
              TO NEXT
            SEGMENT IN
          DESCENDING ORDER
                       I
               _LOOP_ J
G              RETURN TO
            1ALLING PROGRAM
            LM)
                B-20

-------
                                                   CAASE2
                                                   SUBROUTINE SIDEIT
               (SUBROUTINE
                 SIDEIT
               SELECT MIN
                AND MAX
                X AND Y
          INITIALIZE  COORDINATES
          OF  INTERSECTION,  SIDE
          NUMBER  OF INTERSECTION
          AND THE NUMBER  OF SIDES
           INTERSECTED TO ZERO
                    IS
                 TERMINAL
                NODE INSIDE
                 THE CELL
                       RETURN TO
                    CALLING PROGRAM
J>
             INITIALIZE X FOR
               INTERSECTION
                OF SIDE 1.
                 XB - XM
   LOOP ON VERTICAL
I, (LOOP ENDS AT 5)
SIDES OF CELL
             ASSUME INITIALLY
             THAT THIS SIDE IS
             NOT INTERSECTED
            SIDE(KSIDE)=.FALSE.
             CALL SUBROUTINE
              YOFX TO SOLVE
            FOR Y IN TERMS OF X.
                   B-21

-------
                                                       SET "TRUTH FLAG"
                                                        DENOTING CELL
                                                        INTERSECTED ON
                                                          THIS SIDE.
 THIS SIDE
OF THE CELL
   ERSECTE
SET "FALSE FLAG"
DENOTING CELL NOT
INTERSECTED ON
THIS SIDE.
     IS
  POINT OF
INTERSECTION
 THE ENTRY
   POINT
                                     WAS
                                     SIDE
                                 INTERSECTED
                                  SET SIDE OF
                                  DEPARTURE,
                                   Y AND X
                                 COORDINATES.
                               INCREMENT NUMBER
                                   OF SIDES
                              INTERSECTED BY  1.
                                 INITIALIZE X
                               FOR INTERSECTION
                                  OF SIDE 3.
                                                                      CAASE2
                                                                      SUBROUTINE  SIDEIT
                                                                      p.2
                                                        OF LOOP   |
                                     B-22

-------
                                                                  CAASE2
                                                                  SUBROUTINE SIDEIT
                                                                  p.3 -
                             INITIALIZE Y
                           FOR INTERSECTION
                              OF SIDE 2
              LOOP ON HORIZONTAL   "  SIDES OF CELL
              I   (LOOP  ENDS AT 6)
              t
                           I
                           t
                           ASSUME INITIALLY
                            THAT THIS SIDE
                          IS NOT INTERSECTED
                            CALL SUBROUTINE
                             XOFY TO SOLVE
                          FOR X IN TERMS OF Y
  SET "FALSE FLAG"
   DENOTING CELL
 NOT INTERSECTED ON
     THIS SIDE
SIDE(KSIDE)-.FALSE.
     IS
  POINT OF
INTERSECTION
 THE ENTRY
    OINT
                                                    SET "TRUTH FLAG"
                                                     DENOTING CELL
                                                    INTERSECTED ON
                                                      THIS SIDE.
                                 B-23

-------
                                     WAS
                                     SIDE
                                 INTERSECTED
                                 SET SIDE OF
                                  DEPARTURE
                                   Y AND X
                                 COORDINATES
                                 INCREMENT
                                 NUMBER OF
                                SIDES INTER-
                                 SECTED BY 1
                              INITIALYZE Y FOR
                              INTERSECTION OF
                                 SIDE 4.
                                      AS
                                   THERE AN
                                 INTERSECTED
                                    SIDE
   RETURN TO
CALLING PROGRAM
                                     WAS
                                   SEGMENT
                               - COINCIDENTAL
                               TO THE VERTICAL
                                    SIDES
   SET "TRUTH
 FLAG" DENOTING
  THAT SEGMENT
WAS COINCIDENTAL
   TO SIDE 1.
                                                                   CAASE2
                                                                   SUBROUTINE  SIDEIT
                                                                   p.4

-------
       WAS
   IT SIDE 1
      THAT
    OINCIDED
 CALL SUBROUTINE
 NSTORE TO STORE
  THE MULTIPLE
INTEGER VARIABLE
                           SET "TRUTH FLAG"
                           DENOTING THAT
                             SEGMENT WAS
                           COINCIDENTAL TO
                              '%SIDE 3
        AS
     IT SIDE
     3 THAT
     OINCIDE
 CALL SUBROUTINE
 NSTORE TO STORE
  THE MULTIPLE
INTEGER VARIABLE
        WAS
      SEGMENT
  COINCIDENTAL
    HORIZONTAL
       SIDE
   RETURN TO
CALLING PROGRAM
                                         CAASE2
                                         SUBROUTINE SIDEIT
                                         P.5
      B-25

-------
                            COINCIDED
                         CALL SUBROUTINE
                         NSTORE TO STORE
                          THE MULTIPLE
                        INTEGER VARIABLES
 SET "TRUTH FLAG"
  DENOTING THAT
   SEGMENT WAS
COINCIDENTAL TO
    SIDE 4
  WAS
IT SIDE
   4
                               WAS
                             IT SIDE
                             4 THAT
                            COINCIDED
                         CALL SUBROUTINE
                         NSTORE TO STORE
                          THE MULTIPLE
                        INTEGER VARIABLES
                             RETURN TO
                          CALLING PROGRAM
                                                              CAASE2
                                                              SUBROUTINE SIDEIT
                                                              p.6
                              B-26

-------
                                        CAASE2
                                        SUBROUTINE WRAPUP
C
SUBROUTINE
  WRAPUP
      IS THIS
  THE FIRST CELL
       TO BE
      WRAPPED
 STORE INFORMATION
 ON THIS CELL UNTIL
   FINAL SEGMENT
   ENCOUNTERED
 f    RETURN TO
 (  CALLING PROGRAM
 ^	^
       IS THIS
     THE LAST
  SEGMENT TO BE
     WRAPPED
   RETRIEVE FIRST
  CELL INFORMATION
 PREVIOUSLY STORED
     INITIALIZE
    CURRENT SIDE
    TO EXIT SIDE
     SET FINISH
    FLAG TO FALSE
     INDICATING
     INCOMPLETE
       WRAPUP.
              3-27

-------
                                                                  CAASE2
                                                                  SUBROUTINE WRAPUP
                                                                  p.2
CALL SUBROUTINE
ASTORE TO STORE
COORDINATES OF
  POINTS TO
 COMPUTE AREA
CALL SUBROUTINE
ASTORE TO STORE
COORDINATES OF
 POINTS TO
 COMPUTE AREA
                                  IS THE
                                EXIT SIDE
                                AND ENTRY
                                 SIDE THE
                                   SAME
                                                         CALL SUBROUTINE
                                                         AS IORE TO STORE
                                                         COORDINATES OF
                                                           POINTS TO
                                                         COMPUTE AREA
                                                         CALL SUBROUTINE
                                                         ASTORE TO STORE
                                                         COORDINATES OF
                                                           POINTS TO
                                                          COMPUTE AREA
                                    B-28

-------
                                                                    CAASE2
                                                                    SUBROUTINE WRAPUP
                                                                    p.3
                             COMPUTED "GO TO"
                               DEPENDING ON
                               SIDE OF CELL
SIDE 1
SIDE 2
                       SIDE 3
                                                                        SIDE 4
                          ''is
                    YES /X-COORD
                        GREATER THAN
                           ENTRY
                           POINT
                                                     IS
                                                  X-COORD
                                                 LESS THAN
                                                   ENTRY
                                                    OINT
     IS
  Y-COORD
BELOW ENTRY
   POINT
                       ABOVE ENTRY
 RETURN TO
  CALLING
  PROGRAM
                          RETURN TO
                           CALLING
                           PROGRAM
CONTAINED
                                                                         CONTAINED
                       SET  "TRUTH  FLAG"
                        FOR FINISH
                       INDICATING  END
                        OF WRAPUP
                                               SET  "TRUTH  FLAG"
                                                 FOR FINISH
                                               INDICATING  END
                                                 OF WRAPUP
                                    B-29

-------
                                                                            CAASE2
                                                                            SUBROUTINE  WRAPUP
                                                                            p.4
                                 10
                                      COMPUTED
                                       "GO TO"
                                    DEPENDING ON
                                    SIDE OF CELL
         SIDE 1
                   SIDE 2
                              SIDE 3
                         SIDE  4
11
i
12
CALL SUBROUTINE
ASTORE TO STORE
COORDINATES OF
POINTS TO COM-
PUTE AREA










CALL SUBROUTINE
ASTORE TO STORE
COORDINATES OF
POINTS TO COM-
PUTE
i
AREA
	 W
13
i
                                              14
CALL SUBROUTINE
ASTORE TO STORE
COORDINATES OF
POINTS TO COM-
PUTE AREA
1
%
CALL SUBROUTINE
ASTORE TO STORE
COORDINATES OF
POINTS TO COM-
PUTE AREA
                               19
                                   COMPUTE AREA
                                   CONTAINED BY
                                   THE  SEGMENTS
                                                                          J
                                        B-30

-------
20
                                        CAASE2
                                        SUBROUTINE WRAPUP
                                        p.5
  ADD  AREA CONTAINED BY
    SEGMENT  TO  AREA
  CONTAINED IN CURRENT
          CELL
   21
        CONTINUE
          i
      OUTPUT COMPUTED
     CONTAINED AREA
    FOR CURRENT
          CELL
          HAS
      WRAPUP BEEN
        COMPLETED
       ADVANCE TO
        NEXT SIDE
    SET "TRUTH FLAG"
       TO INDICATE
     WRAPUP COMPLETE
    CALL SUBROUTINE
    ASTORE TO STORE
    COORDINATES OF
       POINTS TO
     COMPUTE AREA
I   RETURN TO
CALLING PROGRAM
           IS
       THE  CURRENT
        SIDE THE
         ENTRY
         SIDE
                  B-31

-------
                                        CAASE2
                                        SUBROUTINE NETBAL
   SUBROUTINE
     NETBAL
 CONTAINED AREA
  OF BOUNDARY
     CELL BE
     REDUCED
REDUCE CONTAINED
    AREA OF
 BOUNDARY CELL
NO
   RETURN TO
CALLING PROGRAM
         B-32

-------
                         c
SUBROUTINE
  DECIDE
CAASE2
SUBROUTINE DECIDE
>

INITIALIZE
INCREMENTS TO
CELL' INDICES
I & J TO ZERO
   SET FIRST
  SUBSCRIPT OF
CELL INDEX TO 1
                         SET FIRST
                        SUBSCRIPT OF
                      CELL INDEX TO 2
                                SET FIRST
                             ' SUBSCRIPT OF
                             CELL INDEX TO 3
   SET SECOND
  SUBSCRIPT OF
CELL INDEX TO 1
                          SET  SECOND
                         SUBSCRIPT  OF
                       CELL  INDEX TO 2
                              SET SECOND
                             SUBSCRIPT OF
                           CELL INDEX TO 3
                                 ONE
                                 SIDE
                             INTERSECTED
                             SET INCREMENT
                               TO I INDEX
                                 B-33

-------
                                         CAASE2
                                         SUBROUTINE  DECIDE
                                         p.2
                                INCREASE THE
                                I-INCREMENT
                                BY 1.
     SET INCREMENT
       TO J INDEX
       SET VALUE
        OF NEXT
       ENTRY SIDE
                                RETURN TO
                             CALLING PROGRAM,/
c
INCREASE THE
J-INCREMENT
BY 1.
l
r
SET VALUE OF
NEXT ENTRY SIDE
FROM SECOND TABLE.
\
r
   RETURN TO
CALLING PROGRAM
          B-34

-------
                                             CAASE2
                                             SUBROUTINE  DECIDE
                                             p.3
 10
THE EXIT WAS NOT THROUGH
A CORNER.  SET THE I- AND
 J- INCREMENTS AND NEXT
ENTRY SIDE ACCORDING TO
THE I AND J POSITIONS IN
       THE TABLES.
  C
   RETURN TO
CALLING PROGRAM
         B-35

-------
                                         CAASE2
                                         SUBROUTINE  NTRIOR
      SUBROUTINE
        NTRIOR
>
r
INITIALIZE
DIRECTION OF
COLUMN
MOVEMENT
(RIGHT- 0, LEFT =

1)
 ALGEBRAIC SIGN OF
   COLUMN INDEX
   INCREMENT IS
OPPOSITE THE SIGN OF
CHANGE IN ROW INDEX.
    MOVE TO NEXT
  CELL ON THIS  ROW
       IS THIS
     CELL WITHIN
CONTAINING RECTANGLE
      FOR THIS
       COUNTY
THE
EXTE
NO
i
^\ -
CELI/X. YES
RIOR/^
SET CELL
INTERIOR
•
r
         B-36

-------
                                       CAASE2
                                       SUBROUTINE NTRIOR
                                       p.2
      MOVE TO
     BEGINNING
    POINT ON ROW
       MOVE TO
     /NEXT CELL
     ON THIS ROW
       IS THIS
     CELL WITHIN
CONTAINING RECTANGLE
      FOR THIS
       COUNTY
          IS
      THIS CELL
      INTERIOR
 SET CELL
 EXTERIOR
          IS
        CELL  A
      BOUNDARY
         CELL
      NEXT CELL
     ON THE SAME
       COLUMN
   RETURN TO
CALLING PROGRAM
         B-37

-------
                                                        CMSE2
                                                        SUBROUTINE NTRIOP.
                                                        0.3
              THE ALGEBRAIC SIGN OF
              ROW INDEX INCREMENT
               IS SAME AS SIGN OF
             CHANGE IN COLUMN INDEX
                     MOVE TO
                    NEXT CELL
                     ON THIS
                     COLUMN
                     IS THIS
                   CELL WITHIN
              CONTAINING RECTANGLE
                    FOR THIS
                     COUNTY
SET CELL
INTERIOR
   IS
  CELL
EXTERIOR
                        IS
                       CELL
                     BOUNDARY
                15
MOVE
TO
BEGINNING
POINT ON
COLUMN


                       B-38

-------
                                        CAASE2
                                        SUBROUTINE NTRIOR
                                        p.4
    MOVE TO NEXT
    CELL ON THIS
       COLUMN
       IS THIS
     CELL WITHIN
CONTAINING RECTANGLE
      FOR THIS
       COUNTY
          IS
         CELL
       INTERIOR
SET CELL
EXTERIOR
          IS
         CELL
       BOUNDARY
                                              RETURN TO
                                           CALLING PROGRAM
 fRETURN TO
 VCALLING PROGRAM J
         B-39

-------
                                               CAASE2
                                               SUBROUTINE FINAL
        c
                    SUBROUTINE
                       FINAL
          INITIALIZE
           LIMITS OF
          LOOP INDEX
LOOP ON ROW OF
!(LOOP ENDS AT 30)

  	LOOP ON COLUMNJDF | CONTAINING RECTANGLE
I~LOOP ENDS AT 30)

f
                          CONTAINING RECTANGLE
                                       t
                                       I
              IS
           THIS CELL
          BOUNDARY OR
           INTERIOR
              ARE
          ANY  OF THE
        4  ADJOINING CELLS
           INTERIOR
                                                  SET THIS
                                                    CELL
                                                  INTERIOR
             B-40

-------
I (LOOP  ENDS  AT
       LOOP  ON COLUMN OF
      t
            ENDS AT 2)
                          CONTAINING  RECTANGLE
     CONTAINING RECTANGLE
                                           I
                       IS
                     CELL A
                    BOUNDARY
                      CELL
                YES
      t
      |	END_
SET CELL
EXTERIOR
            OF  LOOP  |
                    MOVE TO
                 OPPOSITE  SIDE
                 OF RECTANGLE
        ___
       ~
                          COLUMN  OF   CONTAINED ARRAY
      I
                       IS
                     CELL A
                    BOUNDARY
                      CELL
                    SET CELL
                    EXTERIOR
                     CHANGE
                     COLUMN
                      INDEX
                                                t
                                                            CAASE2
                                                            SUBROUTINE FINAL
                                                            p.2
                           B-41

-------
	LOOP_ ON_ COLUMNS
I(LOOP ENDS. AT 9)
I
           LOOP  ON  ROWS
      | (LOOP ENDS AT  5)
      T
                                                       CAASE2
                                                       SUBROUTINE FINAL
                                                       p.3
                          OF CELLS
                          OF  CELLS
                                                *
      4
                        IS
                      CELL A
                     BOUNDARY
                       CELL
                        9
                     CELL IS
                    EXTERIOR.
                  SET ITS AREA
                    TO ZERO.
                    REVERSE THE
                 DIRECTION OF THE
                   I (ROW) LOOP
      _ _L.2?
      [(LOOP ENDS AT 7)
                        IS
                      CELL  A
                     BOUNDARY
                       CELL
                         9
                                       YES
                          NO
                     CELL IS
                    EXTERIOR.
                  SET ITS AREA
                    TO ZERO.
t
      I      END
                 DECREASE I (ROW)
                 INDEX-NEXT ROW
I   9
                    END  ' '  OF  LOP
                                   OF  LOOP   |
                      B-4?

-------
                                                      CAASE2
                                                      SUBROUTINE FINAL
                                                      p.4
      LOOP ON COLUMN
 (LOOP ENDS AT 20)
  	LOOP_pN_ROWS
["(LOOP  ENDS  AT 20)
OF CELLS
                     t  OF  CELLS
                   t
                   I
             REVERSE  ALGEBRAIC
                   SIGN  OF
              NEGATIVE  AREAS
I
1_20	END OF JjT	LOOP	|
             /"  RETURN TO^\
             ^CALLING PROGRAM^
                   B-43

-------
                                      CAASE2
                                      SUBROUTINE PROXPR
   SUBROUTINE
     PROXPR
   INITIALIZE
    LIMITS OF
   THE J LOOP
    CALCULATE
    NUMBER OF
  CHARACTERS PER
   LINE TO 100
   ARBITRARILY
  OES CHARACTER
 COUNT EXCEED
NUMBER OF GRID
SQUARES IN A ROW
  F THIS COUN
EQUALIZE
THE TWO
   WRITE COLUMN
   NUMBERS FOR
     OUTPUT
 INITIALIZE GRID
   CELL INDEX
EQUAL TO TOP ROW
       B-44

-------
                                                     CAASE2
                                                     SUBROUTINE PROXPR
                                                     p.2
    LOOP ON ROWS OF
llLOOP ENDS AT 5)
                                 .COUNTY .GRID.CELLS
              INITIALIZE THE
               INDEX OF THE
               OUTPUT VECTOR
                  TO ZERO
          LOO_P_ON_ELEMENTS _OF
            I (LOOP ENDS AT 1)"
            t
                       _ROW__OF GRID_CELLS
                 INCREMENT
              SUBSCRIPT, SET
               LINE OF PRINT
               TO ASTERISKS
                                        SET  ELEMENT
                                        OF PRINT  TO
                                         BLANK'S
                              IS
                           THE CELL
                          EXTERIOR TO
                            COUNTY
                    IS
                 THE CELL
              EXTERIOR TO THE
                  COUNTY
SET ELEMENT
OF PRINT
TO I'S
                    B-45

-------
t,
                                                         CAASE2
                                                         SUBROUTINE PROXPR
                                                         p.3
                     OUTPUT
                     LINE OF
                     PRINT.
                    INCREMENT
                   TO NEXT ROW
                    DECREASING
                   END
OF LOOP
                    INCREMENT
                  CHARACTER PER
                  PAGE COUNTER
                      BY 1
                   ID CHARACTER
                 COUNTER EXPAND
                   BEYOND THE
                   OTTED RECTANGLE
                 /" RETURN  TO
                 CALLING PROG:
                       B-46

-------
       ( SUBROUTINE
       V     INPOP
                                     CAASE2
                                     SUBROUTINE INPOP
NO
      IS
THIS THE FIRST
    COUNTY
         SET VARIABLE
      SIGNIFYING  FIRST
      COUNTY PROCESSED
             1
        INITIALIZE
        I/O DEVICES
              i
    WRITE COORDINATES
   OF EXTREME INDICES
     FOR STUDY AREA
     INITIALIZE,  FOR THIS
     COUNTY  THE POPULATION
     ARRAY,  AND TOTALS  OF
     POPULATION & HOUSING
              B-47

-------
                                           CAASE2
                                           SUBROUTINE INPOP
                                           p.2
      200
       READ A
       CAASE1
       CENSUS
       RECORD /
           HAS
        AN END OF
        FILE BEEN
         COUNTERED
YES
      SET NECESSARY
      VARIBLES FOR
     PROCESSING THIS
         COUNTY
    INCREMENT RECORD
    COUNT,  POPULATION
        & HOUSING
           HAS
     STATE OR CO
         CHANGED
YES
   INCREMENT NUMBER OF
RECORDS, CUMULATING SUMS
  POPULATION & HOUSING
   AND COMPUTE I, & J
   SUBSCRIPTS OF THE
  ENUMERATION DISTRICT
        CENTROID
          B-48

-------
      IS SID
    I, J INSIDE
       OUNTY
                                        CAASE2
                                        SUBROUTINE INPOP
                                        p.3
  STORE POPULATION
AND HOUSING VALUES
  FOR THIS CENSUS
  ED IN THE RIGHT
   CENSUS CELL.
INCREMENT THE
COUNTY COUNT
>
t
                        WRITE THE
                      ''COUNTY INFO.,
                  PLACE POPULATION, HOUSING
                  DATA INTO VECTOR STORAGE
                   RANK ORDERED ON X-COORD
                   (PRIMARY), AND Y-COORD
                       (SECONDARY) BOTH
                          INCREASING
                       /"  RETURN TO  >v
                       CALLING PROGRAM)
        E-49

-------
                        SUBROUTINE
                          PROXML
                              CAASE2
                              SUBROUTINE PROXI1L
   	LOOP _ON_NUMBER
    (LOOP ENDS AT 20)
OF CONTROL CELLS
                     INITIALIZE  INDEX
                       FOR RETAINED
                       CONTROL CELLS
                            ARE
                        COORDINATES
                      FOR  THIS CELL
                         OUTSIDE
                         BOUNDARY
                YES
   'PRINT MES-
    SAGE STAT-
7ING SAME
                          INCREMENT
                        CELL COUNTER
                        COMPRESS  LIST
                     OF CONTROL  CELLS
A
I	
                              ER OF GRID CELLS
        (LOOP ENDS AT 5)
                            IS
                        GRID CELL
                        POPULATED
                        NEGATE CELL TO
                        IDENTIFY AS A
                        CONTROL CELL
                       SET  TRAILER
                      RECORD  FOR AREA
                       TO  ZERO  TO
                     INDICATE END OF
                   LIST  IN SUBROUTINES
                           B-50

-------
                                         CAASE2
                                         SUBROUTINE PROXML
                                         p.2
   CALL SUBROUTINE
       SETLGO
   TO LOCATE INDEX
  OF THE NON-EMPTY
  ROW NEAREST EACH
      EMPTY ROW
   CALL SUBROUTINE
       SEARCH
     TO FIND THE
CONTROL CELL NEAREST
  EACH NON-CONTROL
     CELL (I,J)
 COMPUTE THE DENSITY
 FOR EACH CELL BASED
  ON TOTAL AREA OF
  NEAREST NEIGHBOR
 c
   RETURN TO
CALLING PROGRAM
         B-51

-------
               C
SUBROUTINE
  SEARCH
                                                          CAASE2
                                                          SUBROUTINE  SEARCH
                    INITIALIZE
                     MINIMUM
                     DISTANCE
                 SET INDEX OF
                PREVIOUS NEAREST
               CONTROL  CELL TO  1
       LOOP  ON I  INDICES
JTLOOP  ENDS  AT 10)      "~
       OF RECTANGLE (ROW)
                             1
                              t
                  SET SQUARE OF
                  THE DISTANCE
                  FROM CELL I,J
                  TO CONTROL
                  CELL LSAV1
      LOOP_ON J_ INDICES
   f(LOOP  ENDS AT  8)
       OJ1  RECTANGLE (COLUMN)
                           1
                       IS
                      GRID
                     CELL A
                     CONTROL
                      CELL
                    CALCULATE
                    SQUARE  ROOT
                   SET  LIMITS  ON
                   I  &  J  INDICES
                 TO CONTROL RADIUS
                   OF,SEARCH FOR
                  NEAREST CONTROL
                       CELL
                       B-52

-------
         ARE
    SEARCH LIMITS
     PERMISSIBLE
                                   ADJUST TO LIMITS
                                   OF CONTAINING
                                   RECTANGLE
   INITIALIZE  INDEX
 OF  THE  CONTROL  CELL
 TO  COMMENCE  SEARCH
  INITIALIZE MINIMUM
   DISTANCE BETWEEN
    CONTROL CELL
            CELL INDICES
      ROW INDE
   OF CONTROL CELL
    WITHIN MAXIMUM
       SEARCH
          IUS
         IS
       COLUMN
INDEX OF CONTROL CELL
WITHIN MAXIMUM SEARCH
       RADIUS
                                        CAASE2
                                        SUBROUTINE SEARCH
                                        p.2
LQp_P_pN_CONTROL_:>
f?LOOP  ENDS  AT  7)
 DIFFERENCE BETWEEN
ROW & COLUMN INDICES
  OF CELL I, J AND
   CONTROL CELL L
         ±
   COMPUTE DISTANCE
     SQUARED FROM
     CELL I, J TO
    CONTROL CELL L

-------
                     DISTANCE = MINIMUM
                          DISTANCE
0
                       CALL SUBROUTINE
                       TIEBRK TO BREAK
                           THE TIE
                             WAS
                    CURRENT CONTROL CELL
                          CHOSEN AS
                           NEAREST
                       SET NEW MINIMUM
                          DISTANCE

                         SAVE  INDEX
                         OF CURRENT
                        CONTROL CELL
                                                SAVE THIS
                                                CONTROL
                                                INDEX FOR
                                                NEXT ROW
            L __.   _-__

                                                             CAASE2
                                                             SUBROUTINE SEARCH
                                                             P-3
                           B-54

-------
                   77
                    CONTROL CELL LSAV
                   IS NEAREST CONTROL
                      CELL (I, J).
                   ADD AREA OF (I, J)
                    TO TOTAL OF LSAV1
                           I
                      STORE INDEX OF
                      NEAREST CONTROL
                      CELL IN (I, J)
G>
                   COMPUTE THE DISTANCE
                   FROM THE CONTROL CELL
                   FOUND NEAREST TO THE
                       ADJACENT CELL
        10
ENDJ)*'.

END OF
        LOOP_

        LOOP
                                                           CAASE2
                                                           SUBROUTINE  SEARCH
                                                           p.4
                   C
   RETURN TO
CALLING PROGRAM
                          B-55

-------
                        C
SUBROUTINE
  SETLGO
                                       CAASE2
                                       SUBROUTINE SETLGO
                      INITIALIZE LOWER ROW
                      INDEX FOR THIS COUNTY
                    INITIALIZE INDEX OF FIRST
                  CONTROL CELL ON A ROW TO ZERO.
         	LOOP _ON_NUMBER
         I (LOOP ENDS AT 2)
             OF CONTROL CELLS
                                IS
                             CELL THE
                             FIRST ONE
                              ON THE
                               ROW
                      SAVE THE  ROW  INDEX OF
                      THE FIRST CONTROL CELL
                       ON THIS  ROW  AND SAVE
                          THE CELL  INDEX
                      LOOP FROM
                 (LOOP ENDS AT 1)
              I      1
              I
               1  .END
            ^REVIOUS_ROW_TO>THIS ROW
                             I
                             t
  STORE INDEX OF THE
   CONTROL CELL IN
VECTOR INDEXED BY ROWS.
G>
                      I
                    OF '  LOOP
     INDEX OF THIS
    ROW BECOMES THE
  NEXT "PREVIOUS" ROW
                         END  OF
                (LOOP ENDS AT 3)
                  3	
              END
             LOOP
                   BALANCE OF VECTOR INDEXED  BY
                   ROWS IS FILLED WITH VALUE  OF
                      LAST SAVED CONTROL  CELL.
                     C
                           _
                           .OF I  LOOP
       RETURN TO
    CALLING PROGRAM
                               B-56

-------
                                          CAASE2
                                          SUBROUTINE TIEBRK
   (SUBROUTINE A
     TIEBRK   J
  CALL SYSTEM
SUBROUTINE RANDU
  FOR RANDOM
NUMBER GENERATOR
       IS
     RANDOM
     NUMBER
     GREATER
      THAN
       .5?
 ' RETURN 1 TO
CALLING PROGRAM
   RETURN 2 TO
 CALLING PROGRAM
      B-57

-------
 C
                                          CAASE2
                                          SUBROUTINE GRIDIT
SUBROUTINE
  GRIDIT
         IS
        THIS
      THE FIRST
        GRID
                  NO
   INITIALIZE  UNIT
    AREA,  INITIAL
   SQUARE  SIZE AND
FIND MAX  POPULATION
1195
 INITIALIZE SQUARES,
    POPULATION &
   HOUSING TO ZERO
    INITIALIZE
    GRID SQUARE
    COUNTER TO
       ZERO
      40
       READ USER
     SUPPLIED GRID/
        SQUARES
        B-58

-------
YES

SET NUMBER
OF SQUARES
READ
>


   INCREMENT
  GRID SQUARE
    COUNTER
SET SIDE LENGTH,
    X AND Y
  COORDINATES
f  RETURN 1
[CALLING PROGRAM
                                 41
                                      RE
                                 GRID SQUARE
                                  CARDS
                           COMPUTE COORDINATES
                             OF THE-INITIAL
                                 SQUARES
                             INITIALIZE THE
                             SQUARE COUNTER
                                 INCREMENT THE
                                SQUARE COUNTER
                                     HAS
                                 LAST SQUARE
                              IN THE LIST BEEN
                                  PROCESSED
                                     HAS
                                  THE SQUARE
                               COUNTER EXCEEDED
                                THE MAX.  NO
                                   SQUARE
                                                                    CAASE2
                                                                    SUBROUTINE GRIDIT
                                                                    p.2
                                                              RETURN  1  TO\
                                                          VCALLING PROGRAM^/
                                CALL SUBROUTINE
                               INTEGR TO COMPUTE
                                THE  INTEGRAL OF
                               F(y,x)  OVER THIS
                                  GRID SQUARE
                                    B-59

-------
ASSIGN THIS
POPULATION TO
THIS SQUARE
THEN PROCESS
NEXT SQUARE
f  RETURN 1 TO  \.<
CALLING PROGRAM)^
                                 IS THE
                                CONTAINED
                               POPULATION
                                  ZERO
                                 IS THE
                                CONTAINED
                             POPULATION  LESS
                              THAN OR EQUAL
                                 TO THE
                                  MAX
                                    S
                                  THIS
                              CELL THE SIZE
                               OF THE UNIT
                                  AREA
                             CALL SUBROUTINE
                           PARTIT TO PARTITION
                           THE SQUARE AND ADD
                            DAUGHTERS TO THE
                          LIST OF GRID SQUARES
                                   HAS
                                NUMBER  OF
                           SQUARES  FROM PARTIT
                                EXCEEDED
                                MAXIMUM
                                   HAS
                                 NUMBER
                               OF SQUARES
                                EXCEEDED
                                 MAXIMUM
                                                                  CAASE2
                                                                  SUBROUTINE GRIDIT
                                                                  P.3
                                                          THIS SQUARE  IS
                                                          OUTSIDE THE  COUNTIES
                                                          CALL SUBROUTINE DELETE
                                                          TO ELIMINATE THIS
                                                          SQUARE FROM  THE LIST

-------
                                       CAASE2
                                       SUBROUTINE GRIDIT
                                       p.4
   WRITE MESSAGE THAT/
 ALL SQUARES  IN LIST/
WE BEEN PROCESSED /
        I
    CORRECT TOTAL
   POPULATION FOR
  ROUND OFF ERRORS
      RETURN TO
   CALLING PROGRAM
         B-61

-------
  SUBROUTINE
    ADJUST
 DETERMINE MIN.
  SQUARE  SIZE.
INITIALIZE SQUARE
 COUNTER TO ZERO
 INCREMENT  SQUARE
   COUNTER  BY 1
       HAS
     COUNTER
 EXCEEDED NUMBER
  OF SQUARES IN
      LIST
C                                                        RETURN TO
                                                      ALLING PROGRAM
                                          (FINISHED)
       IS
      THIS
     SQUARE
   UNPOPULATED
CALL SUBROUTINE
DELETE TO DELETE
THIS SQUARE FROM
THE LIST
        IS
       THIS
 SQUARE <_ MINIMUM
      SQUARE
       SIZE
                              CALL  SUBROUTINE
                              PARTIT  TO  PARTI-
                              TION  THE SQUARE AND
                              ADD DAUGHTER TO THE
                              LIST  OF GRID SQUARES
                                 ES
                            THIS  SQU
                         CONTAIN  AN EMPTY
                               UNIT
                                 L
                                 IS
                             MAXIMUM NO
                               SQUARES
                              EXCEEDED
                                                                     CAASE2
                                                                     SUBROUTINE ADJUS
 1
                                                                           RETURN TO
                                                                        CALLING PROG
3)
     B-62

-------
                                         CAASE2
                                         SUBROUTINE ADJUST
                                         p.2
     0
 CALL SUBROUTINE
 INTEGR TO TOTAL
POPULATION OF THE
UNIT CELLS IN THE
     SQUARE
      ASSIGN
 TOTAL POPULATION
  TO THIS SQUARE
 CALL SUBROUTINE
 INTEGR TO COM-
 PUTE TOTAL POP-
 ULATION FOR
 DAUGHTERS	
       B-63

-------
(
                                                SUBROUTINE
                                                • ' SOROFF
 LOOP JDN _MAXIMUM
       AT 1)
                                                      NUMBER_pF_GRIp SQUARES

                                                                            t
                                         INITIALIZE POPULATION,
                                       HOUSING, AREA, AND FRACTION
                                            INTEGRALS TO ZERO
                            I
END
                                                INITIALIZE
                                                 COUNTY TO
                                                   ZERO
OF LOOP
                                         I
                                           INITIALIZE NUMBER
                                          OF RECORDS OF SQUARES
                                          TO NUMBER OF SQUARES
                             	LOOP ON Y NUMBER OF COUNTIES
                              (LOOP ENDS AT  9)
                                  KK:	P_OPULATION_, _
                                  I,(LOOP ENDS AT 9)
                                  TLOOP ONDIMENSIONS1
                                  '(LOOP ENDS AT 8)~
                                           8
                                  1
                                  J  END
                     HOUSING,  AREA
                    OF X AND Y
     "I
     Y
        INITIALIZE THE GRID
           SQUARE ARRAY
              TO ZERO
                                               CAASE2
                                               SUBROUTINE SOROFF
                                          B-64

-------
                                                         CAASE2
                                                         SUBROUTINE SQROFF
                                                         p.2
I
    LOOP ON MIN. & MAX. y INDICES FOR RECTANGLE CONTAINING THIS  COUNTY
 r(JUOOP ENDS AT  2)~~ ~
 j	ENDJDF^
                    READ DATA FROM
                   THE  INPUT DE-
                 VICE  INTO THE
                 GRID CELL  ARRAY
                A
                 I
         ILOOPENDS AT 3}
 LOOP^^ON NUMBER OF
 I(LOOP
                        WAS
                   INPUT DEVICE
                     FOR AREA
                          YES
                          DUPLICATE AREA ARRAYS
                      SKIP  PAST
                     DUPLICATE
                    AREA ARRAYS
                   ON INPUT
                  DEVICES
                        IS
                     THIS THE
                    FIRST PASS
                   THROUGH THIS
                        LIST
                 INITIALIZE  TOTAL
                 NUMBER  OF SQUARES
                 TO TOTAL NUMBER
                 DETERMINED  IN  SUB
                 ROUTINE GRIDIT
GRID SQUARES
                   ASSUME INDEX OF
                 GRID SQUARE RECORD
                  EQUALS INDEX OF
                    GRID SQUARE:
                     M = MPRIME
                        B-65

-------
                      DOES
                  SQUARE SHARE
              ANY COMMON AREA WITH
                 RECTANGLE THAT
                  CONTAINS THIS
                     COUNTY
                      DOES
                  SQUARE SHARE
                 ANY COMMON AREA
                   WITH COUNTY
                                                        CAASE2
                                                        SUBROUTINE SOROFF
                                                        p.3

CALL SUBROUTINE
INTEGR TO TEST
THE RESULT OF
THAT INTEGRATION

                       IS
                    THIS THE
                 FIRST COUNTY TO
                  HAVE CONTENTS
                     IN THIS
                     SQUARE
                                 YES
            MAKE A DUPLICATE  RECORD
              AND CHANGE THE  INDEX
                 OF THE SQUARE
              INITIALIZE RECORD FOR
               A DUPLICATE SQUARE
0
           ASSIGN THIS COUNTY
            TO CURRENT SQUARE
END OF
                       I
           ACCORDING TO THE LOOP INDEX
             THE RESULT OF THE INTE-
            GRATION IS POPULATION
               HOUSING OR AREA
                                        LOOP
                             B-66

-------
                                              CAASE2
                                              SUBROUTINE SOROFF
                                              p.4
UPDATE THE NUMBER OF
 SQUARES IN THE LIST
  AS RESULT OF THE
  DUPLICATE SQUARES
  r   RETURN TO   >
   CALLING PROGRAM
        B-67

-------
                                  1  — PRINT
                 OUTPUT DEVICES   ,    mmrH
             — ^— — —  — — — ^  L  — rUlNLitl
  PUNCH SUMMARY
 RECORD FOR
THE STUDY AREA
	LOOPJ3N_2_
I   (LOOP ENDS AT 295
       IS
   THIS FOR
PRINTED OUTPUT
                                           SET OUTPUT
                                           DEVICE FOR
                                           PRINTER
      IS
   THIS GRID
     OPULATE
                                       CAASE2
                                       SUBROUTINE OUTPUT
CALCULATE COUNTY,
STATE, FRACTION
AND COORDINATES
i
r
      B-68

-------
0
 OUTPUT TO
PRINTER OR
   PUNCH
        29 END
              OF LOOP
                                                      CAASE2
                                                      SUBROUTINE OUTPUT
                                                      p.2
          f    RETURN TO
          CALLING PROGRAM
                 B-69

-------
                                       SUBROUTINE
                                         PARTIT
                                                                           CAASE2
                                                                           SUBROUTINE PARTIT
                                     COMPUTE  1/2  SIDE
                                     LENGTH OF  SQUARE
                                         COMPUTED
                                        SIDE LENGTH
                                      LESS THAN UNIT
                                        SIDE LENGTH
                                                                  RETURN TO CALLING
                                                                PROGRAM WITH NO ERRORS
                                COMPUTE  INDICES OF THREE
                                 NEW SQUARES  TO BE ADDED
                                     TO  THE LIST
G
 RETURN TO CALLING
PROGRAM WITH ERROR
   IS
 MAXIMUM
NUMBER OF
 SQUARES
 EXCEEDED
                                        STORE  SIDE
                                        LENGTHS  OF
                                        NEW SQUARES
                                     STORE SOUTHWEST
                                    CORNER COORDINATES
                                      OF NEW SQUARES
                                            i
                                     INCREMENT NUMBER
                                        OF  SQUARES
                                        IN  THE LIST
                                C
                                   RETURN TO CALLING
                                 PROGRAM WITH NO ERRORS
                                          B-70

-------
                                                        CAASE2
                                                        SUBROUTINE DELETE
                    SUBROUTINE
                      DELETE
>
r
REDUCE NUMBER
OF SQUARES IN
THE LIST
LOOP ON NUMBER OF SQUARES
I(LOOP ENDS AT 401)

I             ,401
                                SQUARE
                  TO BE DELETED
                  STORE VALUE OF
                  NEXT SQUARE IN
                 THE LOCATION FOR
                 COORDINATES, SIDE
               'LENGTH, AREA, COUNTY,
               POPULATION, FRACTION.
4
 i
END OF  i'
                c
LOOP
    RETURN TO
 CALLING PROGRAM
                        B-71

-------
                                                     CAASE2
                                                     SUBROUTINE INTEGR
            C
                SUBROUTINE
                  INTEGR
               CALCULATE THE
              .INDICES FOR THE
              ROW AND COLUMN
              OF THE CELLS  IN
              THE GRID SQUARE
              INITIALIZE THE
               SUM VARIABLE
                  TO  ZERO
'(LOOP ENDS AT 1)
*
L._END_°.F_
      __ _LOOP ON THE jr ROW OF CELLS
     '(LOOP ENDS AT 1)

        LOOP  ON THE " COLUMN OF CELLS
                ADD TO  THE
              SUM VARIABLE THE
              QUANTITY  OF F.
              ^   RETURN TO   ^
               CALLING PROGRAM
                                          "I
                                          t
                                 LOOP
                   B-72

-------
                                           CAASE2
                                           SUBROUTINE ASTORE
c
SUBROUTINE
  ASTORE
  STORE MULTIPLE
  FLOATING POINT
      VALUES
f  RETURN TO^\
UALLING PROGRAM/
       B-73

-------
                                           CAASE2
                                           SUBROUTINE NSTORI
C
SUBROUTINE
  NSTORE
  STORE MULTIPLE
   INTEGER POINT
      VALUES
/" RETURN TO
(^CALLING PROGRAM
           «y
       B-74

-------
                                               CAASE2
                                               SUBROUTINE YOFX
         IS
   THIS  SEGMENT
     VERTICAL
RETURN TO
CALLING
 PROGRAM
   CALCULATE THE
  INTERSECTION OF
    Y SEGMENT AND
     CELL SIDES
/"RETURN TO
I CALLING PROGRAM
      B-75

-------
                                              CAASE2
                                              SUBROUTINE XOFY
c
SUBROUTINE
   XOFY
INITIALIZE
X
        IS
   THIS SEGMENT
    HORIZONTAL
                         RETURN TO
                          CALLING
                          PROGRAM
   CALCULATE THE
  INTERSECTION OF
   X SEGMENT AND
    CELL SIDES
C
RETURN TO
 CALLING
 PROGRAM
       B-76

-------
                                            CAASE2
                                            SUBROUTINE FAREA
C    SUBROUTINE
       FAREA
COMPUTE THE AREA
UNDER THE SEGMENT
DIRECTED FROM ONE
NODE TO THE NEXT
/"RETURN TO
\CALLING PROGRAM
WU
         B-77

-------
                                                          CAASE2
                                                          SUBROUTINE SORT
                     SUBROUTINE
                        SORT
         LOOP ON  2ND  TO
1  (LOOP ENDS AT 20)
r
  LAST .GRID .SQUARE.
                  SET INDEX FOR
                •PREVIOUS VARIABLE
          LOOP
              ^^
      |~(LOOP ENDS  AT  10)
      t
LAST GRID SQUARE
      T
 	LOqP_ SEVEN
 I(LOOP ENDS AT  20)
                  10 ^ is
                     THIS THE
                      LEAST
                      VALUE
                     IN LIST
                    SAVE ITS
                     INDEX
                  STORE PERTINENT
                 '   INFORMATION
                 .ASSOCIATED WITH
                  MINIMUM VALUE
                  (7 PARAMETERS)
                  REPLACE MINIMUM
                    VALUE WITH
                    NEXT VALUE
                20
        END OF
                   SWAP  CURRENT
                   WITH  MINIMUM
                   VALUE FOR ALL
                   7  PARAMETERS
         LOOP
                      RETURN TO   >
                   CALLING PROGRAM-
                       B-78

-------
BJ
           c
           c
   INVOKE CAASE-2 PROCESSING ROUTINES AS SUBROUTINES.

      INTEGER DIMENY,DIMENX
      DIMENSION F(256,256), LGO(256), KF(256,256),  AREAIJC256)
      EQUIVALENCE (F(l),KF(i)), (LGOU ), AREAIJ( 1) )
                 1
      COMMON /VECFO/ AQCR<5), STATE(5,10),  CNTY(5,15),  IDCOU5),
            NRECO(15),IY(2520),JX(2520),POP(2520),HOUS(2520),AREA(2520)
                 COMMON /LINFO/ NSTATEf NUMCO, NRECT, NX, NY, LTWO,
                 1 GYMIN, GYMAX, XORIG, YORIG, MTZU,  ID, YASSOC
                                                         GXMIN,  GXMAX,
C
C**** FILE DEVICE NUMBERS
C      NR     READER
C      NP     PRINTER
C      NPUNCH PUNCH
C      NIN1   COUNTY OUTLINES
C      NIN2   CENSUS DATA FROM CAASE 1.
C      NOUT1  SCRATCH OUTPUT TAPE THAT WILL CONTAIN POPULATION
C             HOUSING.
      COMMON /IOFILE/ NR, NP, NPUNCH, NIN1, NIN2,  NOUT1,  NOUT2
c*****  MISCELLANEOUS PARAMETERS
      COMMON /IPARM/ UNITAR, ISHIFT, XMAXD, YMAXD, EPS,  MAXSQR
      NR a i
      NP = 3
      NPUNCH a 2
      NIN1 =
                                                                          AND
                  NIN2 =

                  NOUTi :
                  NOUT2 :

                  DIMENY
                  DIMENX

                  LTwO =
                  UNITAR
6
7
              8
              9
               256
               256
               1.
ooooooao
00000050
00000060
00000070
00000080
00000090
00000100
00000110
00000120
00000130
00000140
00000150
00000160
00000170
00000180
00000190
00000200
00000210
00000220
00000230
00000240
00000250
00000260
00000270
00000280
00000290
00000300
00000310
00000320
00000330
00000340
00000350
00000360
00000370
00000380
00000390
00000400

-------
W
00
o
            c
            c
            c
            c
c
c
c
            c
            c
            c
            c
            c
            c
            c
            c
            c
            c
            c
                                           CONVERT  TO UTM PRIMARY ZONE
    ISHIFT  9  2*M6
    XMAXD a DIMENX
    YMAXO a OIMENY
    EPS  a .0001
    MAXSUR  =  1800

    MAXTRY  a  3
    NTRYS s 0

 READ COUNTY  OUTLINES  FROM  DEVICE  NIN1.
 AND WRITE  THE  RESULTS ON NOUT1.

    CALL INBOUN
    REWIND  NIN1
    REWIND  NOUT1

 PROCESS L=1,2,,..,NUMCO COUNTIES.

    DO 31 L»1,NUMCO
    ISTATE  s  IDCOCD/1000
    ICOUNT  s  IDCO(L)"ISTATE*1000
    WRITE(NP,102) Lr  ISTATE,  ICOUNT,  (CNTY(N,L)tN = l,5)
102 FORMATC5X'  STATECOOE /  COUNTY  CODE  /  COUNTY  NAME'15,3110,5A4)
103 FURMAH//'  NUMBER  OF CENSUS CONTROL CELLS  =',16,' EXCEEDS  2520
   1ENSIONAL  STORAGE.   CAASE2 TERMINATED  AFTER * *CALL  INPOP*  *')
   READ IN COORDINATES OF COUNTY OUTLINE  SEGMENTS

   TRACK THE BOUNDARY OF EACH COUNTY  THROUGH THE  UNIT  CELL  GRID MATRIX
   DETERMINE WHICH UNIT CELLS ARE INTERIOR  TO,  EXTERIOR TO,  AND ON THE
   COUNTY OUTLINE BOUNDARY WITHIN THE CONTAINING  RECTANGLE  WHICH GOES
   FROM IGO TO IKWIT, JGO TO JKWIT.)

      CALL TRACKR(F,DIMENY,DIMENX,NUMSEG,-UNITAR,IGO,IKWIT,JGO,JKWIT,L)

   AFTER TRACKER, ARRAY F(I,J) CONTAINS VALUES  OF AREAS
           =0          IF UNIT CELL  IS OUTSIDE THE BOUNDARY.
  00000410
  00000a20
  00000430
  00000440
  00000450
  00000460
  00000470
  00000480
  00000490
  00000500
  00000510
  00000520
  00000530
  00000540
  00000550
  00000560
  00000570
  00000580
  00000590
  00000600
  00000610
  00000620
  00000630
IM00000640
  00000650
  00000660
  00000670
  00000680
  00000690
  00000700
  00000710
  00000720
  00000730
  00000740
  00000750
  00000760
  00000770

-------
I
00
          C
          C
          C
          C
          C
          C
          L
          C
          C
          C
          C
          C
          C
          C
          C
          C
          C
        .Lh. UN I TAR
         = UN I TAR
If- UiMlT  CfcLL  IS  ON THfc.  BOUNDARY.
If- UNIT  CtLL  IS  Cl>IPLtULY INTERIOR  JO  bOUNDAR
PRINI  Iht PROXIMAL MAP  CIF THt  COUNTY  ON iHt  PRINH'R

   CALL PKUXPR   (F , DlMtivY,DIMtNX, 1GO, iKn IT , JGO, JKi'd T , 0 . , 0 . S , UNI 1 AH )
   rtKiftCNUUia)  L, IDCOU), IGO,IK,JlT, JGO, JK.vIT
   UO  31 t\*=l,4
   DU  31 l=IGO,lKnIT
31 k\Kilt(NUUT2)  (F (I , J), J = JGLi, JKIfil D
        iJU I\|OUT1

   iHJ  Ji4 L=l i (JU

KtAU  Iht. CLNSUb  POPULATION DA1A LXIRACTtD MY  CAASh  1  Iivilll  1 Ht;  iNT
AKK'AY  KPCY/X).   INPOP  ^ILL SOKT TMh  NlON-ZhKO  VALUL3  llh  KF(Y,X)  MY
        ivlt, COLUMNS by ROivS AND  PLACL  IN Vt.CTOR STORAGE.
                 ISlAfL  = IULU(l.)/1000
                 ICuUi-li  = lUCOd.) -  ISTATt*1000
                 ..Kl ILdJPf lOc4)  LL, ID,  11, 0/  IM:IT, JGO,
                           ^)  LI,  ID,  ibO, IK^ITf  JGO,
                 CALL  1NPOP(M ,Ul*-ibNY,UlfitNX, IGO, IK^IT, JGO, JK;. 1 I , 101 POP, 101HOS,
                1  N.-1CU1L, IS1 A IK ,  ICOUN1 )
    i^ UMLNIL.L. ! .
    v»Hi IL(HP, 1 O^J
    blOH
                                      GO  TD
AFTLK  'liMPuP'  ARRAY  MY,X) CONTAINS  VALlJLS OF  POPUL A 1 1 Hfi .
= PUPULA HUN(Y,XJ *d**16 4 ltijUSlNG( Y,X)  H  1 Ht  UN 11  CtLL Ct.N Ft ht I.)
( YfONi I AK/V,  XtbMl FAh/^) CUiJlAlNS ANY  Cf:l,5US  t roij'll.k A I 1 1 IN iJlSlKjC
Cb i'J I KUllJ 3,
= 001 MLRr, iSh .
0 0 0 0 0 / 8 0
v) 0 U 0 0 7 4 0
() 0 0 0 0 H 0 0
l> 0 U 0 U H 1 0
                                                      0 0 0 0 0 H s 0
                                                      0 0 0 0 0 H a ()
                                                      OOOOOH50
                                                      0 0 t; 0 0 H 6 0
                                                      0 0 0 0 0 b / 0
                                                      0 0 0 0 0 b 8 0
                                                      00000890
                                                      0 0 U 0 0 9 0 0
                                                      00000910
                                                      00000920
                                                    . n 0 0 0 0 0 9 4 0
                                                      o o o u o 9 a u
                                                      00000950
                                                      0 0 0 0 u 9 6 0
                                                      0 000097 0
                                                      000009MO
                                                      ()000099u
                                                      0 U 0 U I 0 0 0
                                                      0 0 0 0 1 0 1 0
                                                      U 0 0 0 1 0 2 u
                                                      0 0 0 0 1 0 3 0
                                                      00l)0 1040
                                                      0 (j 0 O 1 u S 0
                                                      u 0 0 0 1 0 6 0
                                                      0 0 0 u 1 0 7 u
                                                      00001060
                                                      DO 00 1 091)
                                                      UUUO 1 1 Ou
                                                      0 0 0 0 I 1 I 0
                                                      00001120
                                                      0 0 0 0 1 1 .S I)
                                                      0 0 0 0 1 1 '4 0

-------
C  CREAlL ThL PKUXIMAL MAP  F UK THIS  COUNTY                                  00001150
C                                                                               0 0 0 U 1 1 o 0
    b  LUHl JNUL                                                                 0000 1 1 70
       Kh = l                                                                      00 00 11 80
       IHJ  3d I=I&0, iKi'ilT                                                       00001 ISO
   3d  KtAU(NJljT2)  (Kit J), J=JGU, jKlfJl I)                                       00001*200
C                                                                               0 0 0 0 1 c] 1 0
       CALL  PKOXML(F , D I vitNY , DIMt NX , IGCl, iKrtl T , Jl>0, JKtt I T , LGO, NMCN TL )         0000l 0
C  PKOXiML HtlUKiMS  MY,X)  S(l  [HAT  FUk  A  lilVtN  (Y,X), K=  TML  iNDtx  Dp  THt.  00001^^0
C  (MtAHLbl  tlJIMfKUL  CtLU.                                                      OOOO
C                                                                               OOOO
c  i«JkiTL  AKKAVS  UF  ami AINU;  PUPULAT niw AIMD HOUSING UN  DEVICL  MIUTI.     uoooi^/o
                   )  L, JOCl)(L)r  ICiUr  IK^H, JUU,  JKWII                      OUOOl^^O
       UU 34 KK = 2, i                                                             UOOO 1 500
       IAJ 34 l = I(iU,lK^IT                                                       00001310
       Kt.AUt (MOUT2)  (AKLAI J ( J) , J = JbU, JK.'jlT )                                  OU001320
       Uu 33 J=Jl>U, JKAl T                                                       00001330
       LL = F ( i, J)                                                              00001 540
       IF (LL.tU.O)Gil lu 33                                                     U00013ljO
       IFC^K.tU.^)  AKLAIJ(J)  =  PUP(LL)*Ah;LAIJ(J)                             Ooooiibo
       IF IKK. LU. 3)  ARtAU(J)  =  HUUS(LL)*AKh.AU(J)                            00001370
   33  LUulliwUt                                                                 OOU013BO
   3'4  HKi ftd-JUUri )  (AKt AIJ(J ), J = Jl,0, JK.';IT)                                  000013^0
C                                                                               00 00 14 (Ml
C.  HAkllllUu  IHL  flAlKlX UF  Ul^ir AHLA  GRID CtLL.S  INTO S'JUAK'LS:             OunOl^^i!
L                                                                               d u i) \j 1 '4 3 u
C      iuillALl/F:  bKlU CLLU  ARKAr                                             L 0 0 0 1 4 4 o
       UU 31} J = l»L>IMt(jX                                                        OOt)Ol4bU
       iJu 3b 1 = 1 »Ulf'ilivY                                                        00001460
   3b  F (1, J J=o.                                                                (100014/0
C                                                                               000014MO
C      KtAu  |Hh  PKOAl'iAU MAPS  F nK All  LUUiJTILii  INTO IMF.  GH ] u CtLL  AHrfAY.  O00ol490
       uu /  L=l ,r-aji-;cu                                                          ooooiboo
                 1 J  LL, 1UL»  1GU, iK^ITr  JGl), jKivIT                           OOOOlMo

-------
       LHJ  b 1=IGO, IKk'il 1                                                        OOOOl5Y  EA311NG:            »u;00 h.SO
       L^LL SOKT ( NUMSi^R )                                                      00 00 840
C                                                                              00 On 1 tt5u
C  u-jRIlL  1ML GRI!1  SuOAP-E RECORDS                                            OuOOlbbO
C                                                                              0 a o 0 1 H 7 0
C                                                                              OlMiO 1
       ».Rl IE (IMP, 105)                                                           ouOO 1
  105  H..lKMA|( //'   Pll'.lSh C.AASEt.")                                          oOut.
       blUP                                                                    000019 MO
C                                                                              0000 19 50
C  #10  i'-J  CAbL  NUMSUR t'XCEEDij  MAXSUk,  INCREASE PAR 1 11 1 iji i [ ! n,  ThKtSHlJLP    000019M)

-------
        C  f-MAx  MUD THY  AGAIN,                                                        000019/0
        C                                                                               0()001'/6U
           10  IN AX = MAX*!.'>                                                         OOOOJ990
               U' INlrtYti.LT .MAAlkY^'klTt (NP, 106)  NUMSUK , MAXS^K , TMAA,f MAX            0000^0 00
          106  fUK!V(AT(//'  VHt  fJUMhtk  Uh (,RID  SUUARtS, ' , I 6f ' ,  MfJrt tXCP.tl'S THt  Mrt X I OOlM)r!0 t 0
             It-UM HLMMlSSlBLt»',Ib,'.'/' WILL  PAKTIllUN AUA1M  rtlTH Mt«  f-NAX,',   OO
             ? Ll«J.b,'»  t(jUAL 1 ,b*PHe VKJUS FMAX, ' , 11 ^ . cj )                           Ou
               i;FKiii = NTRYS + 1                                                       0000UP                                                                     OOOO^Onfl
00

-------
Cd
I
c»
Ul
c
c
c

c
c
c
c
L
I.
C*
c
c
L
L
r,
c
L
         C
         r;
         L
         c.
         i.
                SUrtKUU I if'Jf- IfibOUU

                U Ju  FHL  LOUhlY UUTLJhfrS.
   NOIJI3

   fiPLUI
             UK'
             f-iP
                    *tf  DFL,UF U,I)U. ,DTN
                    -  THL SUbSIT  OF  THE'. TUTAL  CUUNTY OUTLINE FILL CLMf'KISlNG  THIS
                        STUDY MkLA  IN DIME FORMAT.   (OPTIONAL)
                    -  THt SUtiStT  OF  THt TOTAL  LUUMY UUILlNE PILE F UK  CAA3F.3
                       (UUPLICATL  UF  NOUTl)  (OPTIONAL)
       ;  COKiTK'OL CAKUS
       HUM /VECFO/  AUCK(b), S T ATfc. (5 , 1 0 ) ,  CNTY(b,lb),
            hKLCU(lb) , SMXU,31bO)
       •>UN /L1UFU/  ESTATE, IMUMCO, IJKE.CT,  NX,  NY, LT^O,  GXMM,
            GXi-'AA,  GY'IIM, GYMAX,  XORIG,  YUKIG, MTOZ,  ID,  YASSOC
       M.JU /IUFILL/  UK1,  r-jp, NPUUCH, N1 TM 1 ,  rjirg2, NOUT1,
               RtADtK
r.im

iJl'HI I 1
MOO 12
            1 01
                . J K i
 - CAKu  PUUCM
 - CuU.MTY  OUTLlNtS;  INPUT DATA
 - LAAStl  CFr,SilS  DATA FILL?  IUPOT DATA
 - LuUhTY  OOTLlioL  i.OUES; OUTPUT  FILL
 - oCKATLH UUTt'UT  FILL
b(i<«,101)  IJSTATt,  AljCK, ^TO/,  HOU13, "JPLOF
luPLOT.GF.O) uKl Tt (UPl.UT , 101 )|>JS1 A I t , AUCR,  M|U/, uOUT3,  NPLOT

(L (up, 102) MUCK,  fJSfATL", i-iTOZ
t-'AF('lAH<  iJuALITY  CiiliTKCiL KEGIOu  IS ' , b A4 , // , 6 * ,
     '"-0.  OF  SFATt(S)  I".CLOnfc.U  13  ' , 1'», 1 0-X ,
     'PKMAKY UTfi  ZUut  IS ',ia,///)
                                                                          F1LF
  *KtAU   lig STAIt  bY  SI AH.
I hf  Luuulr  OUFLIMr.S  dAN I (• I •,  A  SUIiSE T OF  FhF.  TOTAL COUrjlY LUJ F
,  CA,   t-L  SAVLD  It)  iih\/lAFt  »->t«Ul'J(. F KUN  THL  TOTAL FILL  IfJ Th[
!:-Y oPLL IF r Ir.r, ObTPUl  I'LVJCh  UOUT3 r-.l .il-i-^tKu.   'MfMlU.J'  ,-JLl  t"RlH.  IKE.
                                                                           OOOOOObO
                                                                           00000030
                                                                           00000040
                                                                           00000010
                                                                           00000060
                                                                           00000190
                                                                           00000200
                                                                               OOOOOiJOb
                                                                               00000210
                                                                               000002«»0
                                                                               00000070
                                                                               0 0 0 0 0 0 8 U
                                                                               00000090
                                                                               00000100
                                                                               0 U 0 0 0 1 1 0
                                                                               00000120
                                                                               00000130
                                                                               o o o o o i a o
                                                                               00000150
                                                                               0 0 0 0 0 1 b 0
                                                                               00000170
                                                                               00000180
                                                                               00000240
                                                                               000002bO
                                                                               000002t>0
                                                                               000002/0
                                                                               00000200
                                                                               00000290
                                                                               0 0 000500
                                                                               0 0 0 0 0310
                                                                               OU000320
                                                                               00000. iiO
                                                                               000003--IO
                                                                               000003*30
                                                                               00000360

-------
 uLULlWtS TU
                                            I-JUUT3.
                 UU lu K=l , hSl Aft
                 HtAUdviW* 101 )  UCul Y, (STATE (L»K) , L = l ,5) , 1C OOP
                 i
  KtALXUK, 103) 1DUK1), (CM1Y(M,1),M=1, b)
    IP (igPLIll ,bl .0)  .iKITF-CNPLtlT* 103)  ll)CU(I) , CCUl Y(M» I ) »M=1»S)
  10LUI I ) = li;CU(I )  +  1000*lCUDfc
  »'. K I T t ( riP , 1 0 b )  ( C fj T V I M , I ) , Ms 1 , b ) , i DC IJ ( 1 )
  F-OiVMAl ( '0', 'CUUl-.TY  ',bAa,'   HAS  SlAU'-CNTI  CUUE ( F IPS )  ',!/)
  IF (I .F.U, 1 )  GO  ll! 20
  ]>(lDt(l(i).liT.IUCU(l-l) ) GU  T(j  <:>(;
 *KKKUK  txn
  k.Kilt (nP/ lUb)
  MJKMAJC  *****tKK(Jlv***** STATt-CfjTY CODES  IMDI IN  Aiilt NO I NG '
          '  ( 00600
0 0 0 0 0 6 1 0
00000620
00000630
00000640
00000650
00000o60
00000670
00000680
00000690
00000/00
00000710
OU000720
00000730

-------
Cb
I
oo
          C*****ot AKCh  f UK SIAKIIMG  KLCUHD
           1030 KLAUdgiiMl , 701 ,t >Jb = 40(>0  )  ID, IF t , 1FN , 1 Tt , I To,,
                Ft  =  IFt/lO.
                 It  -
                          10.
          f.
  /OJ Fi'KMAf (Ib',12X,2Ib,2X,i>I5,12)
      1M JtJ.L I . IDCO(l)  )  00 TU 1030
      IF (iO.M.UCUU ))  bO lu 1000
     *LKKU*  tX IT
      ».*i ltlnPr2ll)  lUCU(l)
      SIul-  24
t
f. *****i»irt I N  LUUP
C.    *U,iMvF.RI UTi-i ZLHiE  IF  UELE3SARY
 1 000 LlJU I i NUt.
C  i.WIlt  fu  DEVICE IHIUI3  IF .GT. 0 1U  (JbVIAlL FUTURE  TAPL REAU-IMi
      U UMUUIi.Gl .OJI-.K1TL (fiUUT3,701) I D, IFb , IF I,, 11 L, nw,M/
C.
C.    *
  IF  i,Lv» LOUfJlY  PKUCtSS HEADER  K'EC  , UIHtRnlSE  REGULAR  KtC
  IF ( iu.tu.1UPKEV )  GU 1U 2000

 •KtxuttliS COUMIV  MLAUEK Kf.CORD
  U  FlKSF CtJU.-Jl Y,3KiP PRUCESSlNb OF PREVIOUS  COUNTY
  IF(iuPKEV.LU.O)  GU TO lolO
      *nU!PUT  PREVIOUS COUNfY'S K'FO
       uiUCLKl
                , I'E.O) ^hlTECI-Pf 30/) IDPKF.V
'       FuK-iAlC  OulLluL StGNEi-MS  NuT CHAl^
       IF (LPRUb.f.E.O) SI OP  31
 *!nt.  FOLLOW I r-'b  blX CARDS SHUULO  REALLY hi
  IF (.XI..Ll .T.XMIuJ  t,XMJI;=XL
  if- *. TL.L I .btf  I O  l.Yi5i;-i=YL
  if ( A i,. (, \ . (, A , i A X )  lj X f-: A X = X H
                                                     FUN
                                                            l,jf)h
                                                                       = ', 1 10)
                                                              >U!
00000740
00000750
00000760
00000770
00000780
00000790
OOOOOflOO
0 0 0 0 0 M 0
000008^0
00000830
oooooeao
00000850
OOOOObbO
00000870
00000880
00000890
00000900
00000910
000009^0
00000930
000009^0
00000950
00000960
0 000097 0
0 000098 0
OUOQ0990
000010 0 0
0 0 i) 0101 0
00001020
00001050
o (.:• o o i a n o
0 0 0 0 1 0 b 0
U 0001060
00001070
0 0 u 0 1 0 8 0

00001100

-------
'•
                  (Yri.Uf .GYNAX) GYMAX=YH                                              00001110
                '•Hi IbCUUUl l,BOl)  lUPKtV, XL, YL,XH, YH                                  00001120
                "-H! lt(.MP,801 ) H)PHhV,XL, YL,XH, YH                                      00001130
                1H  UPLUT.GT.O) /jRlU(lJPl.(JT,ttOl)IDPK£ V,XL, YL,Xh, YH                  00001140
            flOl       HIK^'AT (110, 4F 10.1 )                                                00001150
                                        ((SMX(J, I),J=1,4) , 1 = ISTAK1 , UNO)              00001 160
                                        ((SMXlJ»I)f J=l,4),I = ISTART,IfcNl»              00001170
                     If-  (NPLOI.lfT.O)  KRlTtUjPLUl ,802) ((SHX(J, I), J = l ,4, 1 = ISTAKT,    00001180
               *     itt»0)                                                              OuOOllbl
            HOc'      HljKMAT(lOX,aF 10. 1 )                                                00001190
          C     *1MI14LIZI  f-UK I'itvi  CUUI'JTY                                             00001^00
           1010 1UHKLV=1D                                                              00001210
                                                                                        00001220
                                                                                        00001230
                LHKUb=0                                                                 000012^0
                                                                                        00001250
                                                                                        00001260
                                                                                        00001270
w                                                                                       00001260
^               Ah=-y.9^tt23                                                           00001290
oo               >h = -v.^9L + 23                                                           00001300
                OH  lu  .iOOO                                                              00001310
          c                                                                              00001320
          C   ***HKuLtb;j  KLL.ULAK UUTLir-;t  KtCUWOS                                       00001330
           200^ ^uJi'-ibHj = iMiJi"'StL»*l                                                        00001 340
                1 :>l ix = MHfcC T tNi.li-lStk                                                      0000 1 350
                .-i I UP lX=Ml UZ-MZLiut                                                      00001 360
                IMiAoSr-UUHX) .LF-. 1)  i;t« Tu  lOia                                      00001370
          <-          *ti-i
-------
                / F i < = u n L t ( F i -4)
                CALL G I bN (UF M, UF t, X Oh , L t RK i
                L«LL bib*
                Ft = i>UGL(L)F£,
                IF(LtHK.EU.O)  GU !U 1011
306
                     i-KlTfc (NP,306) 10
                     FuKi-'ATC  UTH CUNVtHSIDN
                     5 TOP  ?o
                                   FOK ST ATt-CiMTY = ', I 10)
           1011  CuMli
i
oo
IF IFL.GT.XH)  XH = FE

II- lFiM.LT.YL)  YL=FH
IF IFi-j.Uf . YH)  YH = F(M
IF I I h . tf'J. XL . Ai>iD . T t . L T . L.XMI N )
bi--ix( 1 , ISMX J=Ft
Si-'A (2, 13MX)=FN
                       I- UK  HLAL' TU TAIL MATCH
               *ivLbLl HKLV1UUS vALUF. b

                1 U p K t V = 1 U

                P I L = ! t
C  ***KL«U  A  ijLu

 Si'00 KLAL- (K 1'vl , 7ul

      f L  =  1F t / 1 0 .

      Fu  =  iFu/10.
      I t  =  1 IE/1".
                         10, 1FL ,
                                                    f 1 It, 1 TlM,MZOfMt
0000
0000
0000
0000
0000
0000
oooo
0000
0000
oooo
oooo
oooo
oooo
oooo
oooo
oooo
oooo
oooo
oooo
oooo
oooo
oooo
oooo
0 0 0 0
oooo
oooo
oooo
oooo
oooo
oooo
oooo
oooo
oooo
oooo
oooo
oooo
oooo
                                                                          1470
                                                                          1480
                                                                          1490
                                                                          1SOO
                                                                          IblO
                                                                          1S20
                                                                          Ib30
                                                                          Ib40
                                                                          IbbO
                                                                          1560
                                                                          1S70
                                                                          IbtiO
                                                                              1600
                                                                              1610
                                                                              1620
                                                                              1650
                                                                              1640
                                                                              I6b0
                                                                              1660
                                                                              1670
                                                                              1680
                                                                              1690
                                                                              1 700
                                                                              1 7 1 0
                                                                              1 720
                                                                              1730
                                                                              1 MO
                                                                              J 7bO
                                                                              1760
                                                                              1770
                                                                              1780
                                                                              1790
                                                                              1800
                                                                              1810
                                                                              1820
                                                                              18 30

-------
                11* = i r.M/io.
                IF (FK . tu. TE .AiSiL'.F U.EU. TN) GU  TO  3000
                IF I iiMXLU.Eul.NUHCO.AMJ. ID.Ut. IDPKEV) GO  TO  4000
                IF dU.hU. 10PkEV.UR.ID.Lu'.IDCOdl"XCOtl )) GO TO  1000
                IF UU.Lf . IL*UHIiJXCOil) ) GO  TO 3000
          C     *lt OF  REQUESTED  COUNTIES ACTION
           4000  CUM I lnUL
          f          *OUrPUT  PHE.VIUUS COUNTY'S iKiR.)
                     i^ktCU ClNXCU)  =NUMSEG
                     lSTAkl=NKECT +1
                     ukFCT=f>;HELT t ku
*£>
O
              IF (XL.LT.GXNlivi)  GXMIfJ=XL
              IF (YL.LT.GYMI.'O  GYi-!l^ = YL
              IF(XH.GT.GXMAX)  bXHAX=Xh
              IF(Yh.GT.GYMAX)  GYMAX=YH
      IKLPNUU.UL.O) f.KITE(NP,307) lUPKt.V
      IF(LPKUb.NE.O) SIOP 31
      i.tf 1 1E(NOUT 1 ,801 ) !DPkLV,XL, YL,xH, Yh
      .--KiTE dJP,8(/l )  K>PkLV,XL , YL,XH, YH
    U.PLOT.GT.O)  v-h'ITt (fjpLOT ,802) IDPHEV, XL. YL,XH, YH
                               J,1),J = 1»4J,1 = 1STAHT,II iJU)
                               J, U, J = l ,4) , l = Ibl AKT, I EMU)
 U  d^'L.jl .(.T.UJ  ..R1TF K,PLOT,802) ( ( S.VX ( J , I ) , J = 1 , 4 ) , 1 = I S ) AP I ,1ENU)
*L» UD.l f . inCUd^XLlJ) ) nKI lEdvP, 21 1)
 II- t ii'.L I . IbCO(I;'JXCO) ) SIOP  29
             * **LAL CuLAH.  «  LT.ui bLOCKS tlC
                A b H »<:; = (., t, i"< A X - L. X r, J11
                1 oPA,-j = GYi-:AX-l»Yf' I'j
                •xA = ]r ix(XSPAi:/FLi)AT 111 «Jl.)  ) tl
00001840
00001850
00001860
0 0 0 0 1 ft 7 0
00001680
00001890
00001900
00001910
000019^0
00001930
00001940
00001950
00001960
000019/0
00001980
00001990
0000^000
00002010
00002020
00002030
00002040
00002050
00002060
0 0002070
00002080
00002090
00002100
00002110
0 0002120
00002130
00002140
00002150
01002160
00002170
00002180
0 0002190
00002200

-------
                      Ulr.U)  ) + 1                                          0000
-------
I
VO
NJ
          c
          c
          c
          c
          c
          c
          c
          c
          c
          c
          c
          c
          c
          c
          c
          c
          c
          c
          c
          c
   SUBROUTINE TRACKR(AREA,DIMENY,DIMENX,NUMSEG,UNITAR,IGO, IKWIT,JGO,
  1 JKWIT,LM)
RT I. C41.PO1403.TRACKER.FORT

TRACK THE BOUNDARY OF THE LM-TH.  COUNTY THROUGH THE GRID CELLS IN
ARRAY AREA(1,J).
COMPUTE THE  CONTAINED AREA OF THE BOUNDARY CELLS.
DETERMINE THE INTERIOR CELLS,
BASIC ASSUMPTION is THAT TRAVEL is DIRECTED COUNTER CLOCKWISE.
COMPUTE THE  TOTAL ENCLOSED AREA.   IF IT IS NOT NEGATIVE, DIRECTION I
CLOCKWISE AND NODES MUST BE REORDERED.

NODE COORDINATES (XI,Yl), (X2,Y2) ARE ADJUSTED TO  ORIGIN BY
CALLING PROGRAM.

UNIT AREA, "UNITAR",  IS PASSED AS A NEGATIVE UN1TAR.
LM JS COUNTY INDEX.

   INTEGER DIMENX,DIMENY
   LOGICAL SIDEU), FIRSTM
   DIMENSION AREA(DIMENYrDlMENX)
   COMMON /VECFO/ AQCR(5), STATE(5,10), CNTY(5,15), IDCOU5),
  1               NRECOU5), X1(3150),X2(3150),Y1(3150),Y2(3150)

   COMMON /LINFO/ NSTATE, NUMCO,  NRECT, NX, NY, LTWO,  GXMIN, GXMAX,
  1               GYMIN, GYMAX, XORIG,  YORIG, MTUZ, ID, YASSOC
   COMMON /10FILE/ NR, NP, NPUNCH, NIN1, NIN2, NOUT1,  NOUT2
   COMMON /IPARM/DUMM,ISHIFT,XMAXD,YMAXD, EPS,,MAXSQR
    WRITE(NP,101) LM, XORIG, YORIG

READ IN THE  COUNTY OUTLINE COORDINATES.

   RtAU(NOUTl,101)LD,XMIN,YMIN,XMAX,YMAX
   XMIN = XMIN-XORIG
   XMAX = XMAX-XORIG
   YMIN = YMIN - YORIG
   YMAX = YMAX - YORIG
 00000010
 00000020
 00000030
 00000040
 00000050
 00000060
 00000070
 00000080
 00000090
soooooioo
 00000110
 00000120
 00000130
 00000140
 00000150
 00000160
 00000170
 00000180
 00000190
 00000200
 00000210
 00000220
 00000230
 00000240
 00000250
 00000260
 00000270
 00000280
 00000290
 00000300
 00000310
 00000320
 00000330
 00000340
 00000350
 00000360
 00000370

-------
w
CO
      wR!TE(NP,101)LD,XMIN,YMIN,XMAX,YMAX
     NUMSEG  =  NRECO(LM)
     DU  5  M=l,NUMSEG
     READ(NOUT1,102)X1(M),Y1(M),X2(M),Y2(M)
     X1(M) 5 X1(M)  -  XORIG
     YHM) = YUM)  -  YORIG
     X2(M) = X2(M)  -  XORIG
     Y2(M) = Y2(M)  -  YORIG
    5 WRITE(NP,101)M,  X1(M),Y1(M),X2(M),Y2(M)
   5 CONTINUE
     1GO = YMIN  -  1
     IF(IGO.LE.O)IGO=1
     IKWlT ~ YMAX  t  1
     IFUKrtir.GT.DIMENY)IKWlT=DIMENY
     JliO = XMIN  -  1
     IF(JGO.LE.O)JGO=1
     JKWlT = XMAX  *  1
     IFCJKWIT.GT,DIMENX)JKWIT=DIMENX
     DO  6  J=JGO,JKrtIT
     DO  6  I=IGQ,IKNIT
   6 AKEA(I,J)  = 0.
 101 FORMATU10,4F10.1)
 102 FOHMAT(lOXaFlO.l)
         C
         C
         C
  TEST  DIRECTIONALITY:

     TAKEA = 0,
     DO 1  L=1,NUMSLG
     T = FAREA(X1(L),Y1 (L)»X2(L)»Y2CD)
   1  TAREA = TAREA t T
     WRI1E(NP,1023)(CNTY(MM,LM),MM=l,b),  [AREA
1023  FORMAU/'  TRACKER  COMPUTES  TOTAL  AREA  OF  '
          C
          C
          C
          C
    1)

  IF SIGN OF
  CLOCKWISE,
AREA IS NOT NEGATIVE,   I.E.  IF DIRECTION
REORDER THE SEGMENTS AND NODES:
                 00000380
                 00000390
                 00000400
                 00000410
                 00000420
                 00000430
                 00000440
                 00000450
                 00000460
                 00000470
                 00000480
                 00000490
                 OOOOObOO
                 00000510
                 00000520
                 00000530
                 00000540
                 00000550
                 00000560
                 00000570
                 00000580
                 00000590
                 00000600
                 00000610
                 00000620
                 00000630
                 00000640
                 00000650
                 00000660
                 00000690
                 00000700
          ',£12.400000710
                 00000720
                 00000730
IS NOT  COUNTER-  00000740
                 00000750
                 00000760
                                                          5A4, 'COUNTY AS

-------
00
i
            Ill
             10

         C   INI
         C
         C
         C
*L'

 2
           1000
              3
IF(TAREA.LT.O.)GO TO 10
CALL REORDR(NUMSEG,X1,Y1,X2,Y2)
TAREA=0.
t>0 HI L=1,NUMSEG
 TsFAREA(Xl(L),YlU),X2(L),Y2(D)
TAREA s TAREA + T
«RITE(NP,1023)  (CNTY(MM,LM),MM=1,5),TAREA

XENTER = 2.*XMAXD
YENTER = 2,*YMAXD
TIALIZE COUNTERS

IS1DE=0
IEXIT=0
1ENTER=0
FIRSTMs.TRUE.

 COUNTS SEGMENTS
L = 0
L = Ltl
IF(L.GT.NUWSEG) GO TO 9
XXsXl(L)
YY=Y1(L)
Jl = XUL) t 1.0
II = YKL) + 1.0
OELX = X2(L)-X1(L)
UELY = Y2CD-YKL)
 PRINT !000,L,Il,Jl,DELX,DfLY
f-URMAH/'  2 L II Jl OELX DELY'/313,2F10.4)
                YP = I1
         C      PRINT  1001,L, Jl, XM, XP, II, YM, YP
           1001  FORMATC/' 3 L ' ,15,2(15,2F10.2))
         C
         C   TEST SEGMENT FROM (XX,YY) TO (X2(L),Y2(L)) FOR INTERSECTION  (X,Y)
00000770
00000780
00000790
00000800
00000810
00000820
00000830
00000840
00000850
00000860
00000870
00000880
00000890
00000900
00000910
00000920
00000930
00000940
00000950
00000960
00000970
00000980
00000990
00001000
00001010
00001020
00001030
00001040
00001050
00001060
00001070
00001080
00001090
00001 100
00001110
00001120
00001130

-------
 I
vO
Oi
c
c
c
c

c
c
c

c
1

c
c


c
c

c
c
c




c
c
c

c
c
c

c
c
c
WITH SIDES OF CELL (11, Jl).
IF THE TERMINUS OF THE SEGMENT IS INSIDE THE CELL, (X,Y) WILL BE
RETURNED EQUAL TO (X2(L) , Y2 (L) ) .

4 CALL S1DEIT(XM,XP,YM,YP,XX,YY,X2(L),Y2(L),X,Y,IS1DE,NUM,SIDE)

COMPUTE THE AREA IN CELL (11, Jl) CONTAINED BY THE SEGMENT FROM
(XX, YY) TO (X,Y)
8 AREA(II,J1)=AREA(I1,J1)+FAREA(XX,YY,X,Y)
PRINT1010,L,I1,J1,IENTER,XENTER,YENTER,IEXIT,XX,YY,X,Y,AREA(I
010 FORMAH ' L 11 Jl IENTER XENTER YENTER IEXIT XX YY X Y'/
1 4I4,2F6.2,I4,5F6.2)

CURRENT TERMINUS IS NEXT ORIGIN
XX = X
YY = Y

IF NO SIDE WAS INTERSECTED, INCREMENT TO THE NEXT SEGMENT.
1F(NUM.EQ.O)GO TO 2

COMPUTE [HE ENCLOSED AREA FROM EXIT NODE TO ENTRY NODE:

9 IEXIT = ISIDE
CALL WRAPUPU SI DE,X,Y,1ENTER, XENTER, YENTER, XM, YM, XP, YP, ARE A ( 11
1)
IFUENTER.NE.OKALL NETBAL ( ARE A ( I 1 , Jl ) , UNIT AR)

A TRICK TO FLAG BOUNDARY CELLS WITH CONTAINED AREA EQUAL TO
UNITAR TO DISTINGUISH BOUNDARY CELLS FROM INTERIOR CELLS.
IF(AREA(I1,J1).EQ,UNITAR)AREA(I1,J1)=.999*UNITAR
PRINT 1 01 0, L, 1 1, Jl, IENTER, XENTER, YENTER, IEX I T,XX,YY,X,Y, AREA (I

HAVE ALL COUNTY OUTLINE SEGMENTS BEEN PROCESSED?
IF(L.GT.NUMSEG)GO TO 100

DETERMINE NEXT CELL TO TRACK TO.

00001140
00001150
00001 160
00001170
00001180
00001190
00001200
00001210
00001220
1, J100001230
00001240
00001250
00001260
00001270
00001280
00001290
00001300
00001310
00001320
00001330
00001340
00001350
00001360
,J1)00001370
00001380
00001390
00001400
00001410
00001420
00001430
1, J100001440
00001450
00001460
00001470
00001480
00001490
00001500

-------
w
I
      XENTERaX                                                          00001510
      YENTERaY                                                          00001520
C      PRINT 1003,L,II,Jl,IENTER,IEXIT                                  00001530
 1003 FURMAT(/' 9 WRAPUP L, II,Jl,IENTER,IEXIT',515)                      00001540
C                                                                       00001550
C  TEST FOR PROCESSING NEXT  SEGMENT  * COINCIDENCE OF TERMINAL NODE      00001560
C  AND EXIT NODE = WITHIN EPS OF  EACH OTHER.                             00001570
      IF(ABSCX2(L)-XJ.LT.EPS.AND.ABS(Y2(L)-Y).LT.EPS)L=L+1              00001580
C                                                                       00001590
      IKl.LE.NUMSEOCALL ASTORE U15, DELX , X2(L ) -X , DELY , Y2 (L) -Y , D,D, D,D) 00001600
      IFU.GT.NUMSEGKALL ASTOREU15,DELX,X2(1)-X,DELY,Y2(1)-Y,D,D,D,D) 00001610
   15 CALL DECIDE(NUM,SIDE,DELX,DELY,JDEL,IDEL,IENTER)                  000016^0
      JNfcXTsJl+JDEL                                                     00001630
      INtXTsIl+IDEL                                                     00001640
C      PRINT 1005,L,INEXT,JNEXT,IENTER,IEXIT                             00001650
 1005 FORMAH/ ' L 1NEXT JNEXT  IENTER IEXITV5I4)                       00001660
C                                                                       00001670
C  DETERMINE CELLS INTERIOR  AND EXTERIOR  TO (11,Jl)--(INEXT,JNEXT)      00001680
C  ON CELL ROrt 11,                                                      00001690
C                                                                       00001700
      1F(JDEL.EQ.O,AND.IDEL.EQ,0)GO  TO 20                               00001710
      CALL NTRIOR(AREA,DIMENY,DIMENX,11,J1,1DEL,JDEL»JGO,JKWIT          00001720
     If UNITARr IGOr IKWlT)                                              00001730
      FIRSTMs.TRUE.                                                     00001740
C      PRINT 1106,II,Jl,(AREA(Il,KJ),KJ=JGO,JKrtIT)                      00001750
      IF(AREA(I1»J1).GT.UNITAR.AND.AREA(I1,J1).LT.O.)FIRSTM=.FALSE.     00001760
   
-------
         C   100 s HAVE FINISHED  TRACK FOR  THIS COUNTY.                            00001880
         C                                                                        00001890
         C   MAKE FINAL DETERMINATION OF CELLS EXTERIOR TO BOUNDARY CELLS AND      00001900
         C   CONVERT NEGATIVE AREA VALUES TO POSITIVE.                             00001910
            100  CALL FINAL(AREA,DIMENY,DIMENX,UNITAR,IGG,IKWIT,JGU,JKWIT)         00001920
         C                                                                        00001950
               RETURN                                                             000019/40
                                                                                  000019bO
VO

-------
                SUBROUTINE RtORDR(NUMStG,X1,Y1,X2,Y2)                             00002530
                DIMENSION X1(20),Y1(20),X2(20),Y2(20)                             00002540
                MID=(NUMSEGH)/2                                                  00002550
                1 = 1                                                               00002560
                J=NUMSEG                                                          00002570
                DO 1 L=1»MID                                                      00002580
                S1»X1(I)                                                          00002590
                S2=Y1(I)                                                          00002600
                S3=X2(I)                                                          00002610
                S4=Y2(I)                                                          00002620
                X1(I)=X2(J)                                                       00002630
                Yl(I)sY2(J)                                                       00002640
                X2(I)5X1(J)                                                       00002650
                Y2CI)svi(J)                                                       00002660
                X2(J)=Si                                                          00002670
                Y2(J)=S2                                                          00002680
                X1(J)=S3                                                          00002690
f               Yl(J)ssa                                                          00002700
g               1=1+1                                                             00002710
              1 J=J-1                                                             00002720
                RETURN                                                            00002730
                END                                                               00002740

-------
      SUBROUTINE S1DEIT(XM,XP,YM,YP,X1,Y1,X2,Y2,X,Y,ISIDE,NUM,SIDE)
C
C  'SIDE1T' IS CALLED BY 'TRACKR' TO FIND INTERSECTIONS OF SEGMENTS
C  AND CELL SIDES TO DETERMINE COORDINATES OF THE POINT WHERE THE
COUNTY BOUNDARY LEAVES THE CELL.
C  SUBRUUIINES USED:
        SUBROUTINE YOFX
        SUBROUTINE XOFY
        SUBROUTINE NSTORE
C
C
C
C
C
C
       LOGICAL SIDE(a)
             /IPARM/UNITAR, ISHIF T, XMAXD, YMAXD,EPS
      XMIN=AMIN1(X1,X2)
      XMAX=AMAX1(X1,X2)
                (Yl, Y2)
                (Y1,Y2)
   TEST SEGMENT L FOR INTERSECTION WITH SIDES OF CELL (II,Jl)
      INITIALIZE COORDINATES OF INTERSECTION, THE SIDE NUMBER AND
      THE NUMBER Oh SIDES INTERSECTED.  TflO SIDES INTERSECTED MtANS
      LEAVING THE CELL THROUGH A CORNER.
      IS1DE=0
C  TEST  hUK TERMINAL NODE (X2,Y2) THIS SEGMENT BEING STRICTLY
C  INTtRlUK TO THIS CELL AND THEREFORE NO INTERSECTION.
      IF (X2.GT.XM.ANb.X2.LT.XP.AND.Y2,GT,YM.AiMD.Y2.LT,YP)
     1  HE 1 URN
C
C  TESI  (-OK INTERSECTIONS WITH SIDES 1 & 5.  SOLVE f-OR Y nITH X = XM
        ftiTH X=XP.
0000
0000
0000
0000
0000
0000
0000
0000
ocoo
0000
oouo
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
                                                                            1470
                                                                            1490
                                                                            IbOO
                                                                            IblO
                                                                            1520
                                                                            Ib30
1550
1560
1570
1580
1590
1600
1610
1620
1650
1640
1650
1660
1670
1680
1690
1700
1710
1 /20
1730
1740
1750
1760
1770
1/80
1790
IfiOO
1010
1820
1830

-------
O
o
          c
          C
          C
          C

          C
          C
          C
          C
          C
          C
          c
          c
          c
          c
      DO b KSIDE=1,3,2
      siDh(Ksii>E) = . FALSE.

   FIND Y COORDINATE OF INTERSECTION OF  SEGMENT AND THE SIDE NUMBER
   'KSIDE'.

      CALL YOFX(XB,X1,Y1,X2, Y2,YB)

   IS THE Y-CUORDINATE OF  INTERSECTION ON THE SIDES OF THE CELL?

      IF (YB.LE.YP.AND.YB.GE.YM.AND.XB.GE.XMIN.AND.XB.LE.XMAX)
     1       SIDE(KSIDE)=.TRUE.
   THE  ENTRY NODE  IS AN UNWANTED POSSIBLE SOLUTION.

   IS iHt POINT OF INTERSECTION THE ENTRY POINT?

      if- ( ABb ( XB-X 1 ). LT. EPS. AND. ABS( YB-YD.LT.EPS)
     1       SIDE(KSIDE)=. FALSE.
      IF (.NOT.SIDE(K31DE))GO  TO 5

   GO FU NEXT  SIDE AND TEST  IT  FOR  INTERSECTION.

      1SIUE=KSIDE
              5 xd=XP
                                        SIDES 2 AND a.   SOLVE FOR x WITH Y=YM
c  TESI  FUH INTERSECTION m
c  Y=YP.
c
      Y A = Y M
      UU 6 KSIDE=2,«,2
      i>lDE(KS10E) = .FALSE.
      L«LL XOFY(YA,X1,Y1,X2,Y2,XA)
      IF UA.LE.XP.AND.XA.GE.XNi.AND.YA.GE.YMIN.AND.YA.LE.YMAX)
     1      31DE(KS1UL)=.TRUE.
    ooooibao
    000018SO
    00001860
    00001870
    00001880
    00001890
    00001900
    00001910
    00001920
    00001930
    000019«0
    000019bO
    00001960
    000019/0
    00001980
    00001990
    00002000
    00002010
    00002020
    00002030
    00002040
    000020bO
    00002060
    00002070
    00002080
    00002090
    00002100
    00002110
THEN00002120
    00002130
    00002140
    00002150
    00002160
    00002170
    00002180
    00002190
    00002200

-------
I
M
O
          C
          C
          C
          C
          C
          C
          C
          C
          C
          C
          C
          C
          C
          C
THE ENTRY NODE IS AN UNWANTED POSSIBLE
   II- (AbS(XA-Xl).LT.EPS.AND.ABS(YA-YU
  1      3IDE(KS1DE)=. FALSE.
   IF(.NUT.SIDE(KS1DE))GO TO 6
   ISiDEsKSIDE
   X = XA
   Y5YA
                                                    SOLUTION.
                                                    LT.EPS)
 6 YA = YP

   IF(NUM.GT.O)RETURN
IF NU INTERSECTIONS THE SEGMENT (XlrYl) TO (X2,Y2)
COINCIDENT «ITH A SIDE OF THE CELL AND (X2,Y2) MAY
SIDt.
                                                   MAY BE
                                                   BE ON A
ARE WE ON A VERTICAL SIDE?

   lFCAdS(X2-Xl).GT.EPS)GO TO 9
   IF (X2.EQ.XM.AND.(Y2.LE.YP.AND.Y2.GE.YM))SIDE(1)=.TRUE
   IF (SIUE(D)CALL NSTORE U8, I SIDE/ 1 , NUM, NUM + 1)
 H IF(X2.tU.XP.AND.(Y2.LE.YP.AND.Y2.GE.YM))SIDE(3)=.TRUE
   IF (SIDE (3)) CALL NSTORE U9, IS IDE, 3, NUM, NUM+1 )
ARE rtE ON A HORIZONTAL SIDE?

 9 IF (ALJS(Y
-------
              IF CbIDE(2))CALL IMSTORE (K, 12, ISIDt ,2, MUM, NUM+ 1)                      00002517
           12  UlABS(Xl-XM).LT.EPS)  SIDt(l) « .THUfc.                             00002bl8
              Ir'(SlDt(D)CALL !MSTURt(til3,ISIOt,l,NUM,NUM*l)                      00002bl9
           13  IKUUrt.EU.O)  RETURN                                                00002520
              X  = XI                                                              00002521
              Y  = Yl                                                              00002522
              HtTURN                                                              00002523
              tuU                                                                0000252^
o
KJ

-------
                SUBROUTINE
               1 AREA)
o
OJ
c
C
C
C
C
c
c
c
c
c
c
c
t
c
c
c
c
c
c
          c
          c
          c
               WRAPUP (IUU1, XOUT, YOUT,IENTER, XENTERr VENTER,XM,YM,XP,YP, 000000 10
                                                                      00000020
                                                                      00000030
                                                         UNDER  THEM
                                                         EXIT  NUDE  ON
             'WRAPUP' COMPUTES THE SEGMENTS AND THE TRAPEZOIDAL AREA
             GOING COUNTER CLOCKWISE ON THE SIDES OF A CELL FROM THE
             SIDE IOUT TO THE ENTRY NODE ON SIDE IENTER.
             THE INDIVIDUAL AREAS, TMPARE* ARE ADDED TO THE CUMULATIVE
             CONTAINED AREA OF THE CURRENT CELL.
                                                           SUM  OF  THE
             XENTER AND VENTER ARE THE COORDINATES OF THE ENTRY NODE.
             XM, YM, XP, YP ARE THE CORNER COORDINATES OF THE CELL.
             SIDE NUMBER 1 IS THE 'WESTERN' SIDE OF THE CELL.  THE OTHER
             NUMBERED SEQUENTIALLY COUNTER-CLOCKWISE FROM SIDE 1.
                                                             SIDES
 THE CELL TRANSECTED BY THE FIRST SEGMENT IN THE  LIST CAN NOT  BE
 TRAPPED UP UNTIL THE LAST SEGMENT IN THE LIST IS ENCOUNTERED.

    LOGICAL FINISH

 FIRST SEGMENT  IN THE BOUNDARY

    IF(IENTER.NE.O)GO 10 100
    XSAVE = XOUT
    YSAVE = YOUT
    ISAVE = IOUT
    RETURN
100 1F(IOUT.NE.O)GO TU 101

 FINAL SEGMENT  IN THE BOUNDARY.

    XUUT=XSAVE
    YOUT=YSAVE
    IOUT=1SAVE
101 ISIDE=10UT
    H'MISHs. FALSE.
   000000«0
   ooooooso
   OOOOOObO
   00000070
   00000080
   00000090
   00000100
   00000110
ARE00000120
   00000130
   00000140
   00000150
   00000160
   00000170
   00000180
   00000190
   00000200
   00000210
   00000220
   00000230
   00000240
   000002bO
   00000260
   00000270
   00000280
   00000290
   00000300
   00000310
   00000320
   00000330
   00000340
   000003SO
   00000360
   00000370

-------
I
h-1
O
C
C
C

C

C
C
C
C

C
C
C
C
C
C
C
C
C
C
BEGIN AT THE EXIT NODE:

INITIALIZE (XI,X2), (Y1,Y2) FOR EXIT ON SIDE 1
   IFdSIDE.EQ.DCALL ASTORE U9, X 1, XOUT , Yl, YOUT , X2, XM, Y2, YM)
INITIALIZE (XI,X2), (Y1,Y2) FOR EXIT ON SIDE 3
   IF(ISIDE.E«.3)CALL ASTORE U9, X 1, XOUT , Y 1, YOUT , X2, XP, Y2, YP)
INITIALIZE (XI,X2), (Y1,Y2) FOR EXIT ON SIDE 2
   1F(ISIDE.EQ.2)CALL ASTOREU9,X1,XOUT,Y1,YOUT,X2,XP,Y2,YM)
INITIALIZE (XI,X2), (Y1,Y2) FOR EXIT ON SIDE a
   IF(ISIOE,EQ.4)CALL AST OREU9,X1,XOUT,Y1,YOUT,X2,XM,Y2,YP)

EXIT SIDE AND ENTRY SIDE MAY BE THE  SAME SIDE.

 9 IF(IENTER.NE.10UT)GO TO 19

ENTRY AND EXIT SIDES AHE THE SAME SIDE.

THE AREA UNDER SEGMENTS ON SIDES 1 OR 3 IS ZERO? RETURN  TO CALLING
PROGRAM WITHOUT ADDING TO CUMULATIVE AREA OF THE CURRENT CELL,

   GO TO (1,2,3,4),IS1DE
 1 IF(YOUT.LT.YENTER)GO TO 19
   RETURN
 2 IF(XOUT.GT.XENTER)GO TO 19
   FINISH=.TRUE.
   TMPARE =FAREA(XOUT,YOUT,XENTER,YENTER)
   GO TO 20
 3 IF(YOUT.GT.YENTER)GU TO 19
   RETURN
 a IF(XOUT.LT.XENTER)GO TO 19
   TMPARE=FAREA(XOUT,YOUT,XENTER,YENTER)
   FIN1SH=.TRUE.
   GO Til 20
TRAVEL TO THE NEXT SlOt AMER ISIDE HAS
TnE AREA UNDER SEGMtNlS OIM SIDES 1 OR 3
                                                     BEEN  INCREMENTED 1.
                                                     IS  ZERO.   BRANCH PAST
THE
00000300
00000390
00000400
00000^10
00000420
00000430
00000440
000004bO
00000460
00000470
00000480
00000490
00000500
OOOOOblO
00000b20
00000530
00000540
00000550
00000560
00000570
000005BO
OOOU0590
00000600
00000610
00000620
00000630
00000640
00000650
00000660
00000670
00000680
00000690
00000700
OU000710
UOOOO/20
00000/30
00000740

-------
c
c
I
M
O
C
c
c
c
c
c
c
c
c
c
c
c
c
 CUMULATIVE  SUM AT  STATEMENT  20

 10  GO TO (11,12,13,14),ISIDE
 11  CALL ASTORE(&21,X1, X2,Y1,Y2,X2,XM,Y2,YM)
 12  CALL ASTORE(U9,X1,X2,Y1,Y2/X2,XP,Y2,YM)
 13  CALL ASTOREU21,X1,X2,Y1,Y2,X2,XP,Y2,YP)
 14  CALL ASTOREU19,X1,X2, Y1,Y2,X2,XM,Y2, YP)

 19  = COMPUTE AREA  CONTAINED  BY  SEGMENT  FROM  (XI,Yl)  TO (X2,Y2)

 19  TMPARE=FAREA(X1,Y1,X2,Y2)

 ADD AREA CONTAINED BY SEGMENT TO AREA  CONTAINED IN THIS CELL:

 20  AREA=AREA+TMPARE
 21  CONTINUE
     PRINT 1000,1 SIDE*X1,Y1,X2,Y2,TMPARE,ARE A
1000 FORMAT(1 OX I 3,5F10.2,F10.4)
    If- (FINISH)RETURN

 ADVANCE TO  NEXT  SIDE:

    ISIDE = MOD(ISIDE,4m
    IF(ISIDE.NE.IENTEK)GO TO  10
    FINISH=.TRUE.
    CALL AS TORE(8,19,X 1,X2,Y1,Y2,X2,XENTER,Y2,YENTER)

 NET BALANCE COMPOTAT ION ON  CONTAINED AREA  OF CELL.
    ENTRY NET6AL(AREA,UNITAR)
 30  IF(AREA.GE.UNITARJRETUKN
    AREA = AREA-UNITAK
    GO TO 30
    END
000007bO
00000760
00000770
00000760
00000790
00000800
00000810
00000820
00000830
00000840
000008bO
00000860
00000870
00000880
00000890
00000900
00000910
00000920
00000930
00000940
000009bO
00000960
00000970
00000980
00000990
00001000
00001010
00001020
00001030
00001040
000010SO
00001060
00001070

-------
           c
           c
           c
           c
           c
           c
           c
Dd
I
   SUBROUTINE DECIDE(NUM,SIDE,DELX,DELY,JDEL,IDEL,I ENTER)

'DECIDE' THE INCREMENTS IDEL AND JDEL TO  THE CURRENT
CELL INDICES II,  Jl, AND THE ENTRY SIDE OF THE NEXT CELL.

   LOGICAL SIDE(O)
   DIMENSION IINC(3,3), JINC(3,3)
   INTEGER ENTER1(3,3), ENTER2(3,3),  ENTER3(3,3), ENTER4(3,3)
   DATA 11 igC/-1, -!,-!,-!, 999, 0,0,0,0/,
  1      JINC/-1,0,0,-1,999,0,-1,-1,0/,
  2      ENTERl/4,1,1,4,999,1,2,2,1/,
  3      ENTER2/3,4,4,3,999,2,3,3,27,
  4      ENTER3/3,1,1,3,999,1,3,3,1/,
DETERMINE THE 1 AND J SUBSCRIPTS TO ENTER THE TABLES WITH.

   JDEL=0
   IDEL=0
                 1 = 1
                 GU TO
               2 i = <
                 GU TO 4
                 1 = 3
                 U(DELY)5,6, 1

                 GU TO 8
               6 J = 2
                 bU lU tt
               7 J = 3
               8 if- (NUM.EU.l)GO TO 10
                 IuEL=IiUC(I,J)
                 U((SIDE(l).OR.SIDE(3)).AND.SIDE(4))IDEL=IDELf1
                 JUEL=J1NC(I,JJ
                 ItMtHsENTFKl (I,J)
                 1H C.iMOT.((SIDE(2).OR.SIDE(4)).AND,SIDE(3)))RETURN
00002750
00002760
00002770
00002780
00002790
00002800
00002810
00002820
00002830
00002840
00002850
00002860
00002870
00002680
00002890
00002900
00002910
00002920
00002930
00002940
00002950
00002960
00002970
00002980
00002990
00003000
00003010
00003020
00003030
00003040
00003050
00003060
00003070
00003080
00003090
00003100
00003110

-------
                10
11
JUEL=JUELtl
IENTER=ENTER2(1,J)
HE I URN
1F(SIUE(1))CALL
IF(blUE(2))CALL
IF(SIDE(3))CALL
                   NSTUREU11,JDEU JINC (I ^ J) , IENTER, ENTER3( I, J))
                   NSTORE(&n,IDEL,IlNC(I,J),IENTER,ENTERa(I,J))
                   NSTORE(&U,JOEL,JINC(I,J)tl,IENTER,ENTER3(I,J))
                   NSTOREU11,IDEL,1INC(I,J)
-------
w
i
o
00
            c
            c
            c
            c
            c
            c
            c
            c
c
c
            c
            c
    SUbHOUTINE NTRIORCAREA,DIMENY,DIMENX,II,Jl,IDEL,JDEL,JGO,JKWIT,
  1 UNITAR, IGO, IKWIT)

•NTRIOR' IS CALLED BY SUBR. TRACKER AFTER THE FIRST WRAP-UP OF A
BOUNDARY CELL TO DETERMINE THE CELLS INTERIOR AND EXTERIOR TO
IT AND THE NEXT BOUNDARY CELL IF THE NEXT CELL IS NOT THE CURRENT
CELL.

   INTEGER DIMENY, DIMENX
   DIMENSION AREA(DIMENY,DIMENX)

INITIALIZE THE J-INCREMENTl
   J1NC=0
   1F(IDEL.EQ.O)GO TO 13
   J1NC = -ISIGN(1,IDEL)
   JJ=J1

DETERMINE THE INTERIOR CELLS ON ROW II;
10 JJsJJ+JINC
   IF(JJ.LT.JGO.OR.JJ.GT.JKWIT)GO TO 11
   IF(AREA(Il,JJ).EQ.O.)AREA(Il,JJ)sUNITAR
   IF(AREA(I1,JJ).EQ.UNITAR)GO TO 10

DETERMINE THE EXTERIOR CELLS ON ROW II:
11 J1NC=-J1NC
   JJ = J1
12 JJ=JjtJINC
   IFUJ.LT.JGO.OR.JJ.GT.JKWIT)GO TO 13
   IF(AREA(I1,JJ).EQ.UNITAR)AREAU1,JJ)=0.
   IF(AMEA(I1,JJ).EQ.O.)GO TO l^
13 IF(JUEL.EQ.O)RETURN
   IINC = ISIGN(1,JDEL)
DETERMINE THE INTERIOR CELLS IN COLUMN Jit
   11 = 11
14 II = II + IINC
   IF(n.LT.IGO.OH.II.GT.IKWIT)GO TO 15
   IF (AKtACIIf J1).EU.O.)AREA(H,J1) = UNITAR
00000030
00000040
OOOOOOSO
00000060
00000070
00000080
00000090
00000100
00000110
00000120
00000130
00000140
00000150
00000160
00000170
00000180
00000190
00000200
00000210
00000220
00000230
00000240
00000250
00000260
00000270
00000280
00000290
00000300
00000310
00000320
00000330
00000340
00000350
00000360
00000370
00000380
00000390

-------
I
M
O
C
c
C
c
c
c
c
c
c
c
c
c
   IF(AREA(II,J1).EQ.UNITAR) GO TO 14
15 IINC s -IINC
   II = II
16 II = IltllNC
   IF(II.LT.IGO.OR.II.GT.IKWIT)RETURN
   IF(AREA(IIfJ1).EQ.UNITAR) AREA(II,J1) = 0.
   IF (AREA(II,J1).EQ.O.)GO TO 16
   RETURN

   ENTRY FINAL(AREA,DIMENY,DIMENX,UNITAR,IGO,IKWIT,JGU,JKWIT)
   INTEGER DIMENY,DIMENX
   DIMENSION AREA(DIMENY,DIMENX)

'FINAL' IS CALLED BY 'TRACKER' AFTER THE TRACK OF A COUNTY BOUNDARY
THROUGH THE GRID CELL ARRAY IS COMPLETED.  'FINAL' MAKES THE FINAL
DETERMINATION OF CELLS EXTERIOR TO THE BOUNDARY CELLS.
THE PRINCIPLE IS THAT ALL CELLS ON A GIVEN ROW (OR COLUMN) BETWEEN
THE ENCLOSING RECTANGLE AND THE FIRST OCCURRENCE OF A BOUNDARY CELL
ON THAT ROrt (OR COLUMN) ARE EXTERIOR TO THE BOUNDARY.

FIRST FINISH DETERMINATION OF INTERIOR CELLS.

   IU1 a IGO+1
   JG1 s JGOtl
   IKW = IKWIT-1
        : JKWIT - 1
      30 IsIGl
      30 J?JG1
DO
DO
IF(AREA(I,J).NE.O.)GO TO 30
                 ,.UNITAR)AREA(I,J)=UNITAR
      IF(AREA(I,J-1).
      IF(AREA(I-1,J).
                                EO,
                                EQ,
   30
                    ,.UNITAR)AREA(I,J)=UN1TAR
   IF (ARtA(I,J + l).EG.UNITAR)AREA(I,J)=UMTAR
   1F(AREA(1-U,J).EQ.UNITAR)AREA(I, J)=UMTAR
   CONTINUE
    PRINT 66,IGOrlKWIT,JGO,JKWIT
 bb FGRMAH/'  SUBROUTINE FINAL.  IGQ, IK^I T , JGQ, JK^I T  ='
   L>0  1  I = IGO»IKWIT
oooooaoo
oooooaio
oooooaoo
00000^30
oooooaao
oooooaso
00000460
oooooayo
00000«80
00000490
OOOOObOO
OOOOOblO
OOOOOS20
00000530
00000540
00000550
OOOOOS60
00000570
00000580
00000590
00000600
00000610
00000620
00000630
00000640
00000650
00000660
00000670
00000680
00000690
00000700
00000710
00000720

00000730
00000740
00000750

-------
td
I
      DU 2 J=JGO,JKWIT
      IF(AREA(I,J).GT.UNITAR.AND.AREA(I,J).LT.O,)GO TO 3
    2 AREA(I,J)=0.
    3 J=JKwIT
      DO a JJ=JGO,JKWIT
      IF(AREA(I,J).GT.UNITAR.AND.AREA(I,J).LT.O.)GO TO 1
      AREA(I,J)=0.
    H J=J-1
    1 CONTINUE
C
C  WORK FROM VERTICAL SIDES JGO AND JKWIT.
      DO 9 JsJGO,JKWIT
      DO 5 I=lGOfIKWlT
      IF(AREA(I,J).GT.UNITAR.AND.AREA(I,J).LT.O.)GO TO 6
    5 AREA(I,J)=0.
    6 I=lKwIT
      DO 7 IlsIGO/IKWIT
      JF(AREA(I»J).GT.UNITAK.AND.AREA(I,J).LT.O.)GO TO 9
      AREA(1,J)=0,
    7 1=1-1
    9
          C  CONVERT NEGATIVE AREA VALUE TO POSITIVE AND RESET BOUNDARY
          C  CELLS WITH AREA .999 (TRICK VALUE)  TO 1.0
                DU 20 1=IGO/IKWIT

                IF(AREA(1,J),EU..999)AREA(I,J)=UNITAR
             20 IF(AKEA(I,J),LT.O)AREA(I,J)=-AREA(I,J)
                KLTURlM
                END
00000760
00000770
00000780
00000790
00000800
00000810
00000820
00000830
00000840
00000850
00000860
00000870
00000860
00000890
00000900
00000910
00000920
00000930
ooooo9ao
000009SO
00000960
00000970
00000980
00000990
00001000
00001010
00001020
00001030
00001040
OOOOlObO

-------
c
c
c
c
C
c
   SUBROUTINE PROXPR  (F , DIMENY, DIMENX , IGO, IKWIT , JGO, JKKI T, A, B, C )

TO PH1NT SYMBOLS FOR NUMERICAL VALUES TO SHOW COUNTY OUTLINES  AND
INTERIORS.

   LOGICAL LINEUOO),  BLANK/'    '/,  ASTER/ '**** '/,  ONE/'IIII'/
   INTEGER DIMENY,DIMENX
   DIMENSION F(DIMENY,DIMENX)
   COMMON/ IOFILE/NR,NP,NPUNCH,NIN1,NIN2,NOUT1,NOUT2

   JG = JGO
10 JK = JG + 100
   IF(JK.Gf,JKrtIT)JK=JKKIT
   L = l
   KRITE(NP,«)((L,M=1,10),L=1,9)
 /I FURMAT(13X100I1)
   NRITE(NP,3) C(L,L=1»10),M=1,10)
 3 FURMAT(MXIOOII)
   1 = IKWIT
   DO S IIsIGUiIKWlT
   L = 0
   DO 1 J=JG,JK
   L = L + 1
   L1NE(L) = ASTER
   IK(F(I,J).tQ.A) LINE(L) = BLANK
 1 IF(F(I,J).GE.C) LINE(L) = ONE
USAGE (EXAMPLE) A B C  = EXTERIOR  BOUNDARY INTERIOR = BLANK * I
      WRITE(NP,2) I, (LINE(L),L=lfM)
    2 FUKMAT(I«» 100A1)
    5 1=1-1
      JG = JK + 1
      IF(JG.LE.JKWIT)GO TO 10
      RETURN
      END
00000060
00000010
00000030
00000040
00000050
00000070
00000080
00000090
00000100
00000110
00000120
00000130
oooooiao
OOOOOlbO
00000160
00000170
00000180
00000190
00000200
00000210
00000220
00000230
ooooo2ao
00000250
00000260
00000270
000002BO
00000290
00000300
00000310
00000320
00000330
00000340
00000350
00000360
00000370

-------
I
M
tvJ
            U j 1 JL Ii-JPUP(F ,UlMLhYfDIMENX, 1 GU, IKu IT , JGU, Jr\-N 11 , TUIPUP, TU1HOSOOOO0090
     1  ,U»liMTL,  ISTATt, ICUUM)                                            00000100
      1MLGE.K  F, uIMLfJY/DJMEI;X                                             00000110
C * * * * *                                                                      00000010
C
C
C
C
r:
c

C
c
c
I
i;
   THUS PKUGRAM  RtAOS THE. E-XTRACTtU  AUCR-TAPL, CONTAINING UTM-CUORDS,00000030
   FKUn CAAShl.                                                          000000*40
THfc  Ji/'LuSIOnS UF  ARRAY KF MOST  BE,  Rt\/EKSlD FROM  THOSE  UF ARRAY F  IN  00000050
THE  CALLING  PKUGRAI-I TCI PLKMII CUINCIDE.NT VARIATION  btT^LEfi THE. FIRST  oooooubo
                                                                         00000070
                                                                         00000080
S(.i*bLKiPT  A!iU  THE.  X-CUORDIMATt

           ill F (UIMtiMX , DIMttJY)
10
        ZL  CUMULATIVL SUMS FUR  ALL  CUUUlltS:
        IFST/0/,  KKLC/0/, 1F1LL/0/,  SUMPUP/0./,  SUMHUS/0./
          /VECFU/
                            STAlfc(5,10Jf
                                                          10UH1S),
   Cui'ii.iJ|.j
                   ESTATE., hUrtO,
                  GYMAX, XOK1G,  YUKIG,  MTUZ>
                                                      LT^Ll, UXMIN,
                                                      YASSllC
          ' .UN/ [PAKM/  UijlTAK,  IGHIFT*  XfiAXO, YMAXD,  UPS

               4 . u JGU ro ^
   it- UF ;>i .
   IFyi =  i
    "Kl I L (u
       1 K L »•'. u = J *
       m-: I i, i =uP

       i I
              1 05) I GU, lKi-1! , JGU, JM 0
000001/0
0 0 0 0 0 1 8 0
0 0 0 0 0190
00000200
00000210
                                                                            00000230
                                                                                      00 300260
                                                                                      00000270
                                                                                      000002PO
                                                                                      00000290
                                                                                      0000 0300
                                                                                      00000310
                                                                                      00000320
                                                                                      00000330
                                                                                      00000.540
                                                                                      00000350
                                                                                      OOOU03oO
                                                                                      00000370
                                                                                      00000380

-------
I-                                                                            00000390
C  H.'ITI ALl/lfc KUK THIS  1  COUNTY.                                           00000400
C                                                                            00000410
    2 UU  )  I = li>U, IhaJlT                                                      00000420
      UU  1  J = JGO,JK,ai                                                      00000430
    1 h U, 1 J=U                                                              00000440
      NKtC  =  0                                                              00000450
      HfilNlL  = 0                                                            00000460
      lOTPuP  = 0.                                                           00000470
      UjJHUb  = 0.                                                           00000480
      iULt  = JULL  +  1                                                     00000490
      U (iFlLfc.tU.l)GO  1U 200                                              00000500
      bU  IU  M'(1 rAPl,bOjSO,l Nl' = t>UO)KSl AT,KLNT Y, 1HOUS, fPOP, TXOUT,THIUT         00000620
C                                                                            OOOOObSO
C  HJTALS  FIJK ALL COiJT.'Tlfb                                                 OOOOOb'40
      KKLL  =  KRt.C + 1                                                         00000650
      oUriKijt-  = SUr-'KOH  +  I POP                                               00000660
      bbnhuS  = bU^hOi)  t  THUDS                                              00000670
  201 IKKSlM I .iJL.ISTATL.OR.KCUTY.I^E.ICOljrn ')GO  TO.bOu                     00000680
1.       HKl.^i  ibl /,»\SI«I , C«CNT Y, 1HOUS, TPUPrTXUtiT, TYUDF                      00000690
f  1M7  F OH 'i A [12110,^20.5)                                                 00000/00
      J 0 IM|  = K SI A]                                                         00000710
      JU'-ilY  = rfJi'ilY                                                         00000720
      AHU'j;>  = THUUS                                                         00000730
      AHuP  =  I POP                                                           00000740
      MM.JI  =  IXOuf                                                          00000750

-------
I
I-1
M
*-
            = TYOUT
       NKtL  = MREC+1
       luH'UP = TUT POP  +  XPUP
       10 I hub = TuTHUS  +  XHOUS
       A  -  XIUIT-XURIG
       r  =  YUUT-YURIG

       J = A
       IF U.U . JGU)GO  10  200
       IF 11 .bl .IK.Jll )(,IJ  TO 200
       !(• (J.L I .JGUJGO  TO  200
       IF U .G | . JKv.'l T )liU  TO 200
       IPuP  = XPUP
       IhiJUb =  XHUU3
C      HKlNF Jblb»KKtC» I,J,IPCJPf IHOUS
 lolb  FuKHAT(bl10)
C  STORt  Iht POPULAT1UIJ  ANU HuUSJMG  VALUhS FOR  THIS  Ct-jSUS L. L».  IN THfc
C  LK'iSLlb  CtLL (J/l), J  Alif; 1 CORRESPOND]^ Ml  TRUNCATED COORD 1 iM A TF. S
C  > AuD  r  ,JF  THE CtN3US E.D.
       HJriJ = (!POP*lSi(iF T + IHOUS)  t  F'(J,I)
            NtACriLU tub  OF  CUUiJlY #  'ICOUUT'
                                                             AN  tOK ON T Ht  INPUT TAPF,
            6<»0
                  ML  CiJU.'jTY HAb  BLf ix.  CU.'iPLt Tt.D.

                 -r, VECTOR  STilRAGL KAuK-URUERE U C3URTF.D)  ON
          L  X-CnUhi.Murtlt. (PRli-iAKt),  Y-CUOROIfJATt(SECl)M[)ARY)  BuTH J NCRt AS 1 rJi'i.
          C  C.RII1CAL  H..IK bUbSEuUE^T  (Hh'LCT SEARCH  U5EI' TU  CONSTRUCT PROXIMAL MAP

                l,i>  2u  l = lU(j, Jhi.IT
                                                                                        00000760
                                                                                        00000770
                                                                                        000007WO
                                                                                        000007^0
                                                                                        00000800
                                                                                        00000810
                                                                                        00000820
                                                                                        OOOOOH30
                                                                                        oooooaao
 OOOOOboO
 00000870
 00000880
 00000890
 00000900
 00000910
 00000920
 00000950
 00000940
 00000950
 00000960
 00000970
,00000980
 00000990
 00001000
 00001010
 00001020
 00001030
 0000 1040
 00001050
 OuOOlObO
 00001070
 00001080
 00001090
 0 0 0 0 I 1 0 0
 00001110
 000(11120

-------
      II- (t- U» 1 ) .Lt.OH'U TU dO                                             00001130
      L = LU                                                                0000 11 40
      Pi)P(L)  =  F (J, 1 )/!ShJFT                                              00001150
           =  POP(L)  t  O.rj                                                 00001 IbO
             )  =  KJf n-JPUPMSHIFT                                        00001170
t:                                                                          00001160
C  THIb  bltP  utTtKHilJLS TOTAL POPULATION  ANU  rUJUSIUG AbSJClATtO vVlTh  TH&00001190
C  l.-Th. ChUSUS  CLLL.   IHt AKtA ASSUCIAltD  wlTH I ML L-TH. CtLL WILL B£   00001200
C  DtTtKi-ilKftO  F HUM  IHL PROXIMAL MAP.                                      00001^10
C                                                                          000012«>0
      1YCLJ=I                                                            00001230
      JXiuj  =  J                                                            000012'40
              lblO,LfI»JrPOP(L)fHOUS(L)                                    000012^0
              (i!b,iJtl2.b)                                                 OOOOl^bO
                                                                           00001270
 1000 iji-.LNTL  =  L                                                           00001280
      KLfUH.j                                                               000012^0
      1.1 i I'                                                                  00001300

-------
c
c
      SUBROUTINE PROXML(F,DIMENY,DIMENX,IGO,IKWIT,JGO,JKWIT,LGO,NMCNTL)
      INTEGER DIMENY, DIMENX
      DIMENSION F(DIMENY,DIMENX),  LGO(DIMENY)
      CUMMON /VECFO/ AQCRC5),  STATE(5,10),  CNTY(5,15),  IDCOU5),
     1         NRECO(15),ICNTL(3520),JCNTL(2520),POP(2520),HQUS(2530)
     2         , AREAC2520)
      COMMON /LINFO/ NSTATE, NUMCO, NRECT,  NX,  NY,  LTWO,  GXMIN,
     1       GXMAX, GYMIN,  GYMAX,  XORIG,  YORIGr MTUZ,  ID,  YASSOC
      COMMON /IOFILE/ NR, NP,  NPUNCH,  NIN1,  NIN2,  NOUT1,  NOUT2
      COMMON/IPARM/  UNITAR, ISHIFT, XMAXO,  YMAXO,  EPS,  MAXSQR
 1401
    PRINT 1401,  NMCNTL
   FORMATC/' PROXIMAL.
                           NMCNTL CELLSl
C  IDENTIFY AND FLAG CONTROL CELLS IN THE
            ',110)
            GRID CELL
                                                    ARRAY F(I,J)
C
C

C
C
IS
DO 20 LL*1,NMCNTL
I=ICNTL(LL)
J=JCNTL(LL)

THt LL-TH. CONTROL
IFCFCI,J).NE.O.)GO
                         CELL
                         TO 4
INSIDE THE  COUNTY BOUNDARY?
   CONTROL CELL * LL IS OUTSIDE THE COUNTY.   REMOVE IT FROM THE LIST.
      w*ITE(NP,1601)LL,I,J, POPCLL), HOUSCLL)
 1601 FORMATC' SUBROUTINE PROXIMAL.  CELL *  ',14,', I,J COORDINATES '
     14,', IS OUTSIDE THE BOUNDARY OF THIS COUNTY.'/' ITS POPULATION
     1 HOUSING COUNTS ARfc:',2F10.0)
      GU TO 20
    4 L=L+1
      ICNTLCL) * ICNTLCLL)
      JCML(L) = JCNTLCLL)
      AHtACL) « F(I,J)
      POPCL) = POPCLL)
      HOU3CL) a HOUSCLL)
      FC1,J) * -L
   20 CONTINUE
      NMCNTL » L
   00000030
   00000040
   00000050
   00000060
   00000070
   00000080
   00000090
   00000100
   00000110
   00000120
   00000130
   00000140
   00000150
   00000160
   00000170
   00000160
   00000190
   00000200
   00000210
   00000220
   00000230
   00000240
   00000250
   00000260
,2100000270
AND00000260
   00000290
   00000300
   00000310
   00000320
   00000330
   00000340
   00000350
   00000360
   00000370
   00000360
   00000390

-------
I
M
M
^J
          c
          c
                DO 5 J=JGO,JKWIT
                DO 5 I5IGO,IKWIT
              5 IF(FU,J).NEtO.)F(I,J)«-F(I,J)
                AREA(NMCNTLtl)aO
                CALL SETLGO(IGO,IKWIT,NMCNTL,LGO)
C  FIND THE CONTROL CELL NEAREST EACH NON-CONTROL CELL (I,J).
C  STORE THE INDEX OF THE NEAREST CONTROL CELL IN FCI,J).
C
      CALL SEARCH(F,DIMENY,DIMENX,IGO,IKWIT,JGO,JKWIT,LGO,  NMQNTL)
C
C  COMPUTE DENSITY FOR EACH CONTROL CELL BASED ON TOTAL AREA OF  NEAREST
C  NEIGHBORS ASSOCIATED WITH IT.
C
      DO 22 LSI,NMCNTL
C      PRINT 1615, L, AREAU),  POP(L),  HOUS(L)
 1615 FORMAT(I5,3E12.5)
      IF(AREA(L).EQ.O.)GO TO 22
      POPU) s POP(L)/AREA(L)
      HOUS(L) a HOUSCD/AREAU)
C      PRINT 1616, POP(L),  HOUS(L)
 1616 FORMAT
   22 CONTINUE
C
      RETURN
      END
00000400
00000410
00000420
00000430
00000440
00000450
00000460
00000470
00000480
00000490
00000500
00000510
00000520
00000530
00000540
00000550
00000560
00000570
00000560
00000590
00000600
00000610
00000620
00000630
00000640
00000650
00000660
00000670

-------
I
M
h-1
CO
          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  SEARCH(F,DIMENY,DIMENX,IGO,IKWIT,JGO,JKWIT,LGO,NMCNTL)

 RTI.Caa.PUl303.jHD.SEARCH.FOKT
 CONSJRUCT  THE  PROXIMAL  MAP OF  F(I,J)
 GIVEN THE   ARRAY  F(I,J)  AND BOUNDARIES WITHIN  F,
 F  IS DEFINED AT  VARIOUS  CONTROL  CELLS.  SEARCH  FROM  NON  CONTROL
 CELL  (I,J)  TO FIND NEAREST CONTROL  CELL,

 THE SEANCH ABUUT  (I,J)  IS CONSTRAINED  TO THE RECTANGLE DEFINED BY
 RS, THE DISTANCE  FROM (I,J) TO  THE CONTROL CELL  NEAREST  1 HE ADJACENT
 CELL, (I,J-1).

 THE L-TH.  CONTROL CELL  HAS COORDINATES 1YCL),  JX(L).

 ARRAY F(I,J) WILL BE RETURNED  CONTAINING VALUES  OF  CONTROL CELL
 INDICES:   F(I,J)  = L =  THE INDEX OF  THE CONTROL  CELL NEAREST (I,J).


    INTEGER DIMENY, DIMENX
    DIMENSION F(DIMENY,D1MENX),  LGU(DIMENY)
    COMMON  /VECFO/ AQCRC5), STATEC5,10), CNTY(5,15),  IDCOU5),
   1       NRECCH15), 1Y(2520),  JX(2520), POP(2520),  HUUS(2520)
   2       ,  AREA(2520)
    COMMON  /L1NFU/ NSTATE, NUMCO, NRECT, NX, NY,  LTWO,  GXM1N,
   I       GXMAX,  GYMIN,  &YMAX,  XORIG,  YOklG, MTUZ,  ID, YASbOC
    COMMON  /IOFILE/ NR,  NP, NPUNCH, NIN1, N1N2,  NOUT1,  NOUlt?
    COMMON/IPARM/UNI TAR,ISHIFT,XMAXD,YMAXD,EPS,MAXSUR
** **

 BEGIN SEARCH FUR  NEAREST NEIGHBORS

    MAXK =  XMAXD**^ f YMAXD**
-------
Cd
I
         c
         c
         c
         c
         c
         c
         c
         c
         c
200 FORMAT(/' SEARCH.  I  LSAVl',215)
    RS = (I-lYUSAVl))**2t(JGO-JX(LSAVl))**2
      PRINT 199, IYCLSAV1), JX(LSAVl), RS
199 FORMAT(/' lY(LSAVl)  JX(LSAVl)  RS',215,E12.5)
    UO 8 J=JGO,JKwIT

 (I,J) MAY BE OUTSIDE BOUNDARIES:  F(I,J)=0
       MAY BE A CONTROL CELL:  F(I,J) GT 0  (INDEX
       MAY BE UNASSIGNED:  FU,J) LT 0.

      PRINT 201,I,J,F(1,J)
201 FORMAH/' I  J  F (I, J) ' , 215, E 1 2.5)
    IF(F(I,J).GE.O.)GO TO 8
    KS = SURT(RS)

 INDICES OF THE RECTANGLE CONTAINING THE MAXIMUM SEARCH RADIUS, RS

    JRMAX = JfRS* 1
    JRMIN = J-(RS-M)
    IKMAX = ItRS-H
    IKMIN=I-RS-1
     If- (IRNIiN.LT.IGO)IRMIN = IGO
    IF(JRMIN.LT.JGO)JRM1N=JGO
    IF (IKMAX.GT,IK*.IT)IRMAX = 1KWIT
    IF URMAX.GT.jKrtll ) JKMAX = JKMT
    LLGO = LGOURM1N)
    KSUMIN = MAXR
      PRINT 202,IHMAX,1RMIN,JRMAX,JRMIN,LLGO
202 FORMA((/' 1RMAX  IRMIN  JRMAX  JRMIN LLGO',bib)
    UU 7 L = LLGO,IMMCNTL
      PRINT 203,L,IY(L),JX(L)
203 I-OKMAT (/'  L  IY(L)  Jx(D',3i5)
     IKIY(L).GT.IRMAX) GO TO 77
    IF (JX(D.GT.JRMAX)GO TO 7
    IKJX(L) .LT.JRM1N)GO 10 7
         C
         C
 CONIR(JL CELL L IS IN   If IRMAX , I-IRM1N, Jf JRMAX , J-JRM1N
                    00000265
                    00000270
                    00000272
                    00000273
                    00000280
                    00000290
                    00000300
OF THE CONTROL CELL)00000310
                    00000320
                    00000330
                    00000332
                    00000333
                    00000340
                    000003bO
                    00000352
                    00000353
                    00000354
                    00000360
                    00000370
                    00000380
                    00000390
                    00000400
                    00000401
                    00000402
                    00000403
                    00000410
                    00000420
                    00000422
                    00000423
                    00000430
                    00000432
                    00000433
                    00000440
                    00000450
                    00000460
                    00000470
                    00000480

-------
w
I
K)
O
           204

            11
            12
  205
    7
C
C
C
C
C
         C
         C
         C
         C
         C
         C
         C
         C
      IDEL=1-IY(L)
      JDEL = J-JX(L)
      RSUUAR=1DEL*IDEL+JDEL*JDEL
        PRINT  204,  IDEL, JDEL,  RSQUAR, RSQMIN
      FURMAT(/'  IDEL  JDEL  RS&IUAR  RSOMIN', 215,2E 12.5)
      IF (RSUUAR-RSQM1NH2, 11,7
      CALL TIEbRK(RS(JUAR,RSQMIN,U2,&,7)
               LSAV=L
               II- (J.EQ.JGO)LSAVl = LSAV
                  PRINT 205, RSGlMIN, LSAV,
               FORMAU/' 12  RSUMIN  LSAV
               CONTINUE
LSAV1,
 LSAV1
                                       F(1,J)',E12.5,2I5,E12,5)
            F(I,J) CONTAINS NEGATIVE VALUE OF AREA OF
            THE ALGEBRAIC SIGN OF F(I,J)  IS NEGATIVE.
                                           CELL (I,J)
                                            -F IS + .
      PRINT 206, 1,J,LSAV,F(I,J)
206 FORMAT(/'  I,J  LSAV  F ( I,J)',315,E12.5)
 77 CONTINUE
    AKEA(LSAV)=AREA(LSAV) - F(I,J)
    F(I,J) = LSAV

 COMPUTE THE DISTANCE FROM THE  CONTROL CELL FOUND NEAREST (I,J) TO
 THE NEXT CELL ADJACENT, (I,Jfl).  THERE IS NO NEED TO SEARCH OVER
 CONTROL CELLS GREAIER THAN THIS DISTANCE AWAY FROM (I,J+1).

    RS = RSUMIN t  2.*(J-JX(LSAVm 1.
  8 CONTINUE
 10 CONTINUE
    RtTURu
    EiMlRY SETLGOCIGO, IK Wj T , NMCNTL, LGO)
    DIMtiMSiUN LGO(l)
 SETLGO COMPUTES VALUES FOR ARRAY LGO(I),I=IGO . . ,, 1KWIT.
 SETLbO DETERMINES WHICH CONTROL CELL 13 THE FIRST TO OCCUR ON A
 OF Y = CU»MSTAiMT.  THE INDEX OF THAT CONTROL CELL, L, IS STORED IN
                                                                   LINE
00000490
00000500
00000510
00000520
00000522
00000523
00000530
00000540
00000550
00000560
00000570
00000572
00000573
00000580
00000565
00000590
00000600
00000602
00000603
U0000604
00000609
00000610
00000620
00000630
00000640
00000650
00000660
00000b70
00000680
00000682
00000690
00000700
00000710
00000712
00000720
00000730
00000740

-------
I
I-1
N3
C  ARRAY LGU(I) WHERE 1 = INTEGER OF Y=CONSTANT.
C  FOR ALL VALUES OF I GREATER THAN Y UP TO THE NEXT LINE Y CONTAINING
C  A CONTROL CELL/ LGO IS SET EQUAL TO L.
C  THE VALUES OF ARRAY LGO ARE USED IN SUBROUTINE 'SEARCH'.
      PRliMT110,IGOf IMVIT/NMCNTL
  110
  111
                FORMAH/'  SUBR. SETLGO.   IGO,  IKrtIT, NMCNTL =',3110)
                1G=IGO
                IYLAST=0
                UO 2 L=l,NMCNTL
                  PRINTlllfL,IY(L),IYLAST,IK
                FORMATC  L  IY(L)  IYLAST  IK',4110)
                IF (lY(D.EU.IYLAST)GO TO 2
                1YLAST=IY(L)
                IK=IYLAST
                DO 1 I=IG,IK
                  PKINT112,I, L
      FOkMAT(lOX'LGO(
      LGO(I)=L
      IG=iKtl
      CONTINUE
                                 13
    3 LGU(IJ=IYLAST
      RE I URN
000007bO
00000760
00000770
00000780
0000078S
00000786
00000790
00000800
00000810
00000812
00000813
00000820
00000830
00000840
00000850
00000852
00000853
00000860
00000870
00000880
00000890
00000900
00000910
00000920

-------
O)
NJ
NJ
                 SUBROUTINE  TIEBRK(A,B»*r*)                                          00000930
                 IMPLICIT  INTEGER  (A-Z)                                              000009*40
                 HEAL  22                                                             00000950
                 DATA  NNN/123321/                                                    00000960
                 LALL  RANDU(NNN,NNN,22)                                              00000970
                 IF (22.GT.O.b)KETURN  I                                               00000980
                 HETURN 2                                                            00000990
                 EIML>                                                                 00001000

-------
                              GRJblT (*,K , DIMt>IY,l>ir.e.hX , FMAX, 1C HUM I , 1 ill K'uP, HUMUS,
Cd
K>
          c
          c
          c
          c
          L
          L
          C
          C
          f
          C
          L
RT I .L<4^.Ptjl303.JKD.GRlDDI T.KURT
PARUIiljN  IiMlTlAL GRID  SQUARL SYSTEM UK  SUUARLS uK  Sl/t  MH|_  INTO
SMALLLK SiJUARES  IP  TMK  CimTALUD  POPULATION  (INTLl.RAL OK  K ( 1 , J )
TMfc  SuUAKt)  fcXCLEf'S PMAX.
   DMA 1KIR5T/0/
             SUX,  SUY,  SL, OlMtNY,
            UN P (OlrihuY ,UIMt NX)
            /VtCP
   XLI-.lj  = LTv.U
   (• i''i MX z  U »
                                                             CliUMTY
                                      (b),  STA[t(b,10),  CM! Y ( S, 1 S ) , J DCl.l( 1 b )
   UU I'^l  1 = 1 ,
   iHKi,J).(il.FliAX)FMAX = F(I,J)
                    l^hLO( Ib) ,STJX( lbOO),SUY ( 1000) ,Sl_( lb(.>0) ,RiP(JLA( 1600)
                   f hUUSlfjC IhOO) ,FRAC ( 1800) ,LOUU1 H 180U)
                  V  uSTATt., r.uMClJ,  inb

   IlALlZt.   KI^'D  ''iAX  F  If*  Ml,J).
                      I  = UMI T^R
                      bl  =  1
                      t(uP»31 )  FMAx
                     iAK/'  buMRijUT INt  (»R1I»UIF.   KMAX = ' , M f . ':> )
Ot'UUUO 1 (>
OUI'O UUcfd
0 0 o 0 0 u 3 D
(TO U u 0 U 4 0
0 o U 0 0 0 b 0
0 0 0 0 0 0 b 0
0 000 i) 0/0
oooooobo
0 0 0 0 0 0 9 0
0 0 0 U 0 1 0 U
0 0 0 0 0 1 1 0
00 000 1^0
0 0 0 0 u 1 3 0
ooooo 1 4i;
OOOOl'c'^0
0000 (*. 50 f
0 o C! i) o 3 1 o
0 0 0 0 0 .5 d 0
0 u (' 0 u 3 3 0
0 0 0 0 ii 1 b 0
0 0 0 0 0160
0 1 1 0 0 0 1 7 U
0 0 u 0 u 1 Mi
0 0 0 0 U 1 9 U
UiiUOl'cMM)
iHIOOOr! 1 0
OiKM) Oct?0
t'OO (J(> c! 30
Go OuUt'bO
i' (i (i o (J 3') i'
          c
          L
rne;
i 'i; Oi.i (.' 3r>u
i'ii UIMI 3 / u

-------
              1 195 UU
I
I-1
N3
c
c:
c;
c
c.
c
c
               199
                M=l ,t*1AXSuh
        PUPULA(i'i)  =  0
        MUUblu(rl)  =  (i
        ijLd"i)=u
        1-1 =• 0
        UU  194  1=1, NY
        iY  =  (1-1)*LT«(J
        UU  194  J=1,UX
        i> U A ( H J  =  J X
        bun IH)  =  IY
   194  bL(>'i) =  LTi'H)
         k.Hi FL(NPf 3r?j  l-iUMSOK, U'i,SrtX(M) , iJUY (M) , 3L(M) ,
    3  M :
196  L»-LL  IIM ft ,GK(i'i,f ,  la'^tf.Y,  UH't^X,  XJMU

     L(" UiUf .f-U.d. JCALL  UK LI-  rL((il96,!>-i,i>iur'.Si,JK J

        HKliiT  3br'-., AIM ,PUFJULA( •'. ) , SUX ( ^) , b'j Y I -) , bL C"
 35  H.JM'i^|(/'   I ALL  iMltLh.    .M,  XlM  =', 14, t:t It?. --I,
 If-  bivuttKL  *»•''  LUUlMli.S  Mf)Ht   iHAu  (-  iAX  PuPUL A T H.);.i ,
 IK  iJUl,  i,U  HJ  -.fcxr  SO
                       (MM .Lfc .
                                                                               )
                                                                               SI '4)
                                                                                         u  II;
                           JfMiPULA(;-.)  = XlM
C 0 0 0
0 0 0 0
0 0 0 U
U U 0 U
I) DUO
u o o u
0 U 0 0
000(1
01'00
00 OU
0 0 0 U
o o i11;
U 0 0 0
0 0 0 U
0 0 U 0
0 0 0 0
U 0 0 U
(j i; 0 o
On OH
0 o 0 0
0 0 0 0
(• 0 0 0
('• 0 (> (1
ouoo
0000
00 00
u o (i u
(i U (< 0
u u u u
0 0 0 U
oooo
0 0 0 (1
'i D 0 U
00 o u
IK-00
oo IM)
00 UO
                                                                                              u 5 ti o
                                                                                              03^0
                                                                                              i) 4 0 0
                                                                                              0410
                                                                                              04C-0
                                                                                              o a 3 0
                                                                                              G'440
                                                                                              o a 5 0
                                                                                              0 4 b 0
                                                                                              U'470
                                                                                              0 <4 ^ U
                                                                                              1/490
                                                                                              0 5 O u
                                                                                              0510
                                                                                              05^0
                                                                                              0530
                                                                                              U5-40
                                                                                              0550
0 5 7 (•
0 5 tf 0
U 590
0 o 0 0
0 o 1 0
0 6 ^ 0
u o 3 o
l' o " 0
0 ( ) "> 0
o nt>o
0 h / 0
U p h (^
ut^O
t .' 7 o u
o/l 0
0 / £* 0
o /.so
U 7 '4 0

-------
       U
                           I .Lt.MiAX) GU  IU  19'j
K5
Ul
C   STOP  PAKUTlUNIuG CLLL  »l, i>, uUMbUR ,1
L
C   ADJUbl  CUHT«Ir-tl> PUpULAI ION  .
C
  210 U luUMbliK.Gr .MAxSUR J  Kt I UKN 1

    33 HJKh^K/' ^10.   M  GRLAlt.K  THAN  MJiMijUK . ' , 2 1'
       ij U M (- z 0
       UU  301  H= 1 »l-iUl'.SlJf'
C        Ph'iijf  38,(-1,P(JPUl.A(M)f blji-lf-

  301    bUiviK  = SUHf- +  Pt)PULA(M)
                    U =
                39  I-UKMAU/'  A h  L  =',3tl(M> OH 1 u
                                                                                       li u 11 0 Ohc! i.»
                                                                                       00 UO OH 30
                                                                                       000 OObJ \i
                                                                                                    0 o 0 0 Go ou
                                                                                                    oo o j n j< / u
                                                                                                    COOOOHHO
                                                                                                    00 00 o'VO 0
                                                                                       00 00
                                                                                       00 00 n 9 io
                                                                                       (1000 o9a 0
0(i(H<
0000
Oil (id
0 0 i; u
Oo Oo
OuOO
oo oo
0 il (i O
II 0 0
Uli 00
t; 0 i1 o

-------
I
M
KJ
C
(.
t
(.
t.
i;
C
c
c
i
       14  = 4.*UN11AK
       i-i = U
    Id MSH-H
    11 iMM.bf .NUhSURJKL IDHli
       U IPUHULA(M) .Lu.G. KALI.  ULLtTLUl 1 , M,
    DO uui  HAklITiUl-i  SUUAKK3  LLSb  THAI1) UK  LuUAL  10  14  I'M Slit,
       It- lbL(MJ .LL.I4.)bU  (U 10
       ib'l.  = SL(M)
               PARIiliuiJ  bUDAKLb  (HAT Aful;j(i  OlJt   1 I.' T K A-\Slr.L 1 :
                        J.M [fc bK IM,P  ,L .•]'('••[ ..NY ,1' lr't i^X, X1U) J
                           -i) =  XL il
                                                   I./, > Ii, f )
       L^LL l^II-.bh (L»t /I
       t"i,HuLAUJ  =  X l>,r
       bi,  hj  11
0000
oooo
0 U 0 0
0 0 0 0
0000
0 0 0 0
0000
0 0 0 0
oooo
0 0 i) 0
OoOo
GOO 0
0 u 0 0
oooo
oooo
oooo
OOOO
Go oO
0 C. 0 0
o u o o
00 00
00 00
0 0 0 0
0 0 0 0
00 1)0
uo 00
Oo i1 0
01)00
oouo
0000
Oo On
Oli 00
OU (1 0
00 I' 0
ouiiO
0 000
00 OC
120
130
140
IbO
IbO
11/0
1 1 80
1 I'M)
1200
1210
122H
1230
1240
12 bo
12*0
12/o
12m)
1290
i 3oo
) ill'
1 32 o
1 S30
1340
13cjO
1 3M>
1370
1 >ho
1390
1 4 o o
1 M 1 0
1-420
I 430
1 '44 0
14bO
1 4 (.; 0
14/0
1 4rto

-------
1.   LKKUK  ktl'UKU  <>b U  ^AA MiMnFK Pfc Kl>, I bS 1BLL  SUUAKLb  tXCLLDtf).             OoOOl'-i^u
     b  wKl It(UP,lOlb)  uUi-.b'QW                                                          OOOOlboO
        *L lUKfj  1                                                                           OOOolMO
        t-UlNf bUP-UF F (*,HUfibUh)                                                         uOOOlbSO
C                                                                                           0 0 0 0 1 b 6 0
C.   CUMPijft  bLPAkAlt  l.jTLGRALS flF PuPULAT I Ll.J,  HIJIJSIUG,  Ai-lD  AKtA  DVtK>  t ALHOUiH'1 b/O
C   GRIu  bUUAKt  FUP KACH  COUNTY  THt  (.KID SUUAKfc  (JVLKLAYS.                     0000 IbHO
L                                                                                           00001b9u
C                                                                                           0000 If)00
        UU  1  H=1,,I1AXSUP                                                                  OOOOlolO
                ll^OsO                                                                       00 Ou 16^0
                (i-i)=0                                                                       uuOOloiO
        f- K A L ( M J = 0                                                                         0 U 0 u 11> i4 0
     1  U.JUM r (M) =0                                                                       (>0(>(> 1 6bO
C                                                                                           00001ooO
C   PhCH-Lbb  LACH  CUUNFY                                                                000u]6/0
L                                                                                           u00 fibMI
        WKbuK =  MUMbuK                                                                   GOOulo^O
        UU  S»  L=lfN'.^it(i                                                                   OOUOl/lKi
C                                                                                           0 O u 01/1 0
(.   PRfiLtbb  KJK  fcAth  uF-  TMfc:  i  IMLUKALb, P(jPUL«l lUu> ilUUblr.U,  AKLA:        OOOL-1/c'i)
C                                                                                           0000 1 /.So
C   PUPUL" I 1UU  AI-JJ;  HUUoIiiG Aiit.2JkF-At.'(^l)lj ULL , 10, ICiL), iKul 1 , Jull, JK.-v] I                          OOOul hc'U
        UU  d.  I=.ib(.i, IK;. I T                                                                uOuO
     ?  nLAU(!\iUUT) (F ( i,.J) , J=JG(i, JM-IT )                                              0000
        If IAK . uh.. 3 Ji'.u  II)  <4                                                              00 in;
        UU  i  Ii\=f',^                                                                       oOOO 1 tU.jli
        uu  ^  i i = H>(/» IK.. I T                                                               (MiCi. i f> /o

-------
                                                                                                       1)000
                                                                                                       0 U U 0
C                                                                                           0 0 0 U 1 b 9 0
C   PkULLbb  Inh  bklU  SUHAkLS,  M= 1 ,1, . . . , .•'UJMb'UK.                                  D000190U
     4  IFlKK.F-tJ.n  KSUK =  r-jON;S(jK                                                     U 0001910
        HLi\t\.bf.l)  KSuK =  fjkSOK                                                      OOOd


C
C
        UO  V  HPKlKt-  =  1,KSUK                                                           U00('193u
                                                                                                   9 HO
                                                                                                   9'jO
                                                                                                   9oO
C   bOLb buijAKt  M  SHAPF. ANY COMMON ARF A  -j 1 T H  RF_CTAN(,LL  IHAT  COMMITS  fH i SuOou 1 9 / u
C   COlJlvlY?                                                                                000019WO
C                                                                                           00001990
        iF toijY (U) .C.T . iKldT )bO  TO  9                                                    OOOOt'OOO
        iF (SuX (i'i) .b f. JKuIT )bO  TO  9                                                    oOoO  fht.  FlKSf  COUNTY  TO  HAVF  COrUtUIS  IN  SUUAKt  M.?                    000ii 0 0,; 1 b 0
          L                                                                                            o 0 0 0 c 1 b 0
          C   ^'fJ^J-/.Ll  H)K  3UUAPL wl-iF'K 1'  it..                                          DOOOt^lO
          C                                                                                            0 0 0 1; d tV 0
                                                                                                            c.J C1 '4 0
               THF  .-AAiKoii  nU'iK'th  ItF  S(jMAKhS  IS LMlTtli  L)Y IM '-ll..i -ivs 1 ij. IS  I u  ',-, A >.b' i./i<' .

-------
I
M
to
c
c
c:
c
c
i.
c

c,
L
C
          (.UK3U.K.GT.MAXSUK)
          I jhy UK
               INJHALUt  DUPLICATE. KtC(JhL) HW bUUAK'fc «M.
        5'uY CMJ  =  SUY(M»-'K JME J
        bLU'i)  =  31 (Ml- PI HE )
     6  LUUNTY(l'i)   =  LMIvJUlO  +  bUY (NO* HMI9
                7  U (M\.LU. i ) = X J u I / S L ( M ) * * 2
                    H H 1 U I 1 O 0 6 , L , K K , hPK I h L , M , NK SQK , NUf'ib'.JK , bU X ( M ) , S J Y ( f ! ) , bl. ( '-I )
                                  f'j(M)f HOF'ULA(M) ,FKAC(M)
        Kt. I UKN
                       Hr UUTPUI

                       KLLuHl.* HlK KACH  GRIl'
                       IL
                        +  nY*Llnti
                       , ] Ocj)  XliHlU, YfllVlb, XL i-)U, TLrJUr!-ilU/
          nKlTL(lJP» lOb)  XliKli,, YUK'iG, xfc.Ui), Yh.Ji-
   ] OS  PUK.'IA f (4F b.O, ib)
   10/4  KjK!--i«T I [lj/ ib, i-i, IS, 1-WH O.b, I .S,2£ li.b
        i> Li   3 0 U
                                                                                                       0 (i 0 0 c' 3 1 0
                                                                                            OUQ02 SSu
                                                                                            (J 0 U 0 d S « 0
                                                                                            (J 000^57 U
l»0 (H)cj 590
(i 0 0 0 t' 4 0 U
00 DO,? Ml U
0 U 0 0 £ a i 0
0 0 0 0 1 b 4 0
u o u o t a u u
OOOUe.'4bO
0 U U 0 ? u b 0
0 0 0 0 c 'J / 0
u U 0 0 c! '4 8 u
0 (.> (J 0 r> b 1 U
        ^O
        SO
        H IKfS.cU.^J  ilir'  =
        Uu  ^9 h=l , JvUilbiJt
        if IPUPULA (:'i) .Lu.l* . )C,l.i  In
                                                                                            oo
                                                                                                       ii 0 i) u 
-------
U)
o
                  L  =  CUUNTY (Mj/1 TMJ1 fc                                                     Gl'
                  iolAft =  luLl»(L)/luOU                                                    00 0 I'd b SO
                  iUJUiMl =  lUCU(L)  -  1S1AFL*1000                                          OOoOdb'JU
                  i^KAC = FRAC(HJ *1 .LS                                                     UUUU^b'jU
                  rY  = bur (MJ + YOK 1C.                                                         OOOOc'boO
                              lOajMM, IFhAC, ISTATL, ICUUWI , MTU/, XX, YY,SL(M) »               UUUUc'bbO
                              »HUHULA(>i)                                                     O

-------
c
c
c
c
c
c
c
c
COLLECTION OF AUXILIARY SUBROUTINES USED IN GRIPPING.

   SUBROUTINE INTEGR(M,F, DIMENY/  DIMENX, XINT)
   INTEGER SQX,SQY,SL, DIMENY, DIMENX, COUNTY
   DIMENSION F(DIMENY, DIMENX)
   COMMOIM/VECFO/ AQCR(5), STATE (5, 1 0) ,CNTY (5, 15), IDCUC15),
  1              NRECO(15),SQX(1800),SQY(1800),SL(1800),
  2              POPULAU800), HOUSINU800), FRACU800),  COUNTY
   COMMON /IPARM/ UNITAR,ISHIFT,XMAXD,YMAXD,EPS,MAXSQR

COMPUTE INTEGRAL (XINT) OF ARRAY  F(Y,X)=F(I,J) OVER SQUARE  #M.

   ISLM = SL(M)
   IG = SOY(M)-»-l
   IK=IG f ISLM - 1
   JG = SUXCMm
   JK = JG * ISLM - 1
   XINT = 0.
   UO 1 I=IG,1K
   DO 1 J=JG»JK
 1 XINT = XINT t F(I,J)
   RETURN
   ENTRY DELETE(*,M,NUMSQR)

COMPRESS THE LIST OF SQUARES AS RESULT OF DELETING SQUARE #M
   NUMSUR=NUMSUR-1
   DU aoi L=M,NUMSQR
   LP1 = L+l
   S(JX(L)=SQX(LP1)
   SUY(L)=SQYILP1)
   SL(L)=SL(LP1)
   FRAC(L) = FRAC(LPl)
   COUNTY(L) = COUNTY(LPl)
   HUUSINU) = HOUSIN(LPl)
Ol PUPULA(L) = POPULA(LPl)
   RETURN 1
      00000030
      00000040
      00000050
      00000060
      00000070
      00000060
      00000090
      00000100
(1800)00000110
      00000120
      00000130
      00000140
      00000150
      00000160
      00000170
      00000180
      00000190
      00000200
      00000210
      00000220
      00000230
      00000240
      00000250
      00000260
      00000270
      00000280
      00000290
      00000300
      00000310
      00000320
      00000330
      00000340
      00000350
      00000360
      00000370
      00000380
      00000390

-------
OJ
to
      ENTRY PARTIT(*,*,M,NUMSQR)                                         00000400
C                                                                       00000410
C  THE FIRST RETURN * IS ERROR RETURN  IN  CASE  NUMBER  OF  SQUARES EXCEEDS 00000420
C  THE MAXIMUM BECAUSE OF  PARTITIONING.                                  00000430
C  THE SECOND RETURN * IS  NORMAL  RETURN  TO CALLING  PROGRAM.              00000440
      ISLM s SL(M)/2                                                    00000450
      SLM = ISLM                                                        00000460
      1F(SLM.LT.UNITAR)RETURN 2                                         00000470
      L=NUMSQR                                                          00000480
      LP1 = L + l                                                         00000490
      LP2 = L+2                                                         00000500
      LP3 = L+3                                                         00000510
      IFUPi.GT.MAXSQRJRETURN 1                                         00000520
      SL(M)sISLM                                                        00000530
      SL(LP1)=ISLM                                                      00000540
      SL(LP2)=ISLM                                                      00000550
      SL(LP3)=ISLM                                                      00000560
      SUX(LP1)=SQX(M) t ISLM                                            00000570
      SUY(LP1)=SQY(M)                                                   00000580
      SUX(LP2)=SUX(LP1)                                                 00000590
      SUY(LP2)=SQY(M) t ISLM                                            00000600
      SQY(LP3) = SQYCLP2)                                                00000610
      SQX(LP3)sSQX(M)                                                   00000620
      NUMSQR = NUMSQRt3                                                 00000630
      RETURN 2                                                          00000640
      END                                                               00000650

-------
I
M
OJ
           C
           C
           C
           C
           C
   SUBROUTINE ASTORE(*,A,B,C,D,E,F,G,H)
'ASTURE' IS CALLED BY SUBROUTINE WRAPUP TO SET SPECIFIED EQUALIT
AND BRANCH TO THE STATEMENT NUMBER '*' IN WRAP-UP.

   A = B

   E = F

   RETURN 1
   ENTRY NSTORE(*,I,J,K,L)
'NSTURE' IS CALLED BY SUBR. DECIDE AND SIDEIT TO SET SPECIFIC
EQUALITIES AND RETURN TO STATEMENT NUMBER '*' IN CALLING PROGRAM,
                                                                   IES
      RETURN 1
      ENIRY YOFX(X,X1,Y1,X2,Y2,Y)
C
C  SUBROUTINES YOFX AND XOFY SOLVE FOR Y AND X IN TERMS OF X AND Y.
C  CALLED BY SUBROUTINE SIDEIT TO FIND INTERSECTIONS OF SEGMENT AND
C  SIDES.
C
       CUMMUN/IPARM/UNITAR,ISHIFT,XMAXD,YMAXD,EPS,MAXSQR
      Y=2.*YMAXD
      IF (ABS(X2-XD.LT.EPS)RETURN
      Y = (Y2-Y1)/(X2-X1)*(X-X1) + Yl
      RETURN
      ENTRY XOFY(Y,X1,Y1,X2,Y2,X)
                                   XI
                 IF (ABS(Y2-Y1) .LT. EPS) RE TURN
                 X  =  (X2«X1)/(Y2*Y1)*(Y-Y1)
                 RETURN
                 E'MD
    0000
    0000
    0000
    0000
    0000
    0000
    0000
    0000
    0000
    0000
    0000
    0000
    0000
    0000
    0000
    0000
    0000
    0000
CELLOOOO
    0000
    oooo
    0000
    0000
    0000
    0000
    0000
    0000
    oooo
    0000
    oooo
    oooo
    oooo
1080
1090
1100
1110
1120
1130
1140
1150
1 160
1170
1180
1190
1200
1210
1220
1230
1240
12bO
1260
1270
1280
1290
1300
1310
1320
1330
1340
13bO
1360
1370
1380
1390

-------
               FUNCTION  FAREA(X1,Y1,X2,Y2)                                        OOOOiaOO
         C                                                                        00001MO
         C   'FAREA'  COMPUTES  THE  AREA UNDER  THE SEGMENT  DIRECTED  FROM  NODE        OOOOH20
         C   (XI,Yl)  TO NODE(X2,Y2).                                               OOOOH30
               FAREA*(X2-Xl)*(Yl+Y2)/2.                                           0000jaaO
               HtTUHN                                                             00001450
                                                                                  00001160
to
I
OJ

-------
                 SUBROUTINE SORT(NUMSQR)                                           00000020
           C                                                                       00000050
           C  SUBROUTINE SORT SORTS THE LIST OF GRID SQUARES  INTO ASCENDING        00000060
           C  ORDER OF  THE ARRAY OF COMPOSITE NUMBERS* COUNTY(M), M*i,2,...,       00000070
           C  NUMSQR.   COUNTY(M)»L(M)*2**18 * SQY(M)*2**9 + SQX(M) AND IS          00000080
           C  COMPUTED  IN SUBROUTINE SQROFF.                                       00000090
           C                                                                       00000100
                 INTEGER COUNTYU800)                                              00000110
                 COMMON/VECFO/ DUMMYU60), LIST(1800,7)                            00000120
                 EQUIVALENCE (COUNTY(1),LIST(10801))                               00000130
                 DO 20  1=2,NUMSQR                                                  00000140
                 Ksl-l                                                             00000150
                 DO 10  Jal,NUMSQR                                                  00000160
              10 IFCCOUNTY(J),LT.COUNTY(K))K«J                                     00000170
           C                                                                       00000180
           C  RE-ORDER  THE OTHER VARIABLES ASSOCIATED WITH SQUARES K AND 1-1.      00000190
           C                                                                       00000200
F                DO 20  M=l,7                                                       00000210
G                ISAVE  a LIST(I-lfM)                                               00000220
01                LIST(I-1,M) = LIST(K,M)                                           00000230
              20 LIST(K,M) *ISAVE                                                  000002^0
                 RETURN                                                           00000250
                 END                                                               00000260

-------
                     APPENDIX C

LOGICAL FLOWCHARTS AND FORTRAN SOURCE CODE LISTINGS
             CAASE3  (and Subroutines)
                          C-l

-------
C-2

-------
                                                         CAASE3
                c
         START
                  SET I/O  UNIT
                  NUMBERS  FOR
                COMPUTER SYSTEM
                   BEING USED.
0
                  SET  TICKMARK
                 INCREMENT  AND
                 INCH/KILOMETER
               CONVERSION FACTOR
100
              RZAD  SCALE  FACTOR,
              ED PLOT  CONTROL
            VARIABLE,  AND  COUNTY
                OUTLINE  PLOT
              CONTROL  VARIABLE
                     HAVE
                ALL  COUNTIES
               BEEN COMPLETED?
               READ NAME OF STUDY
                AREA OF INTEREST
              PRINT NAME  OF STUDY
                AREA  OF INTEREST
                     C-3

-------
                                                     PRINT MESSAGE
                                                     STATING ED'S
                                                     TO BE PLOTTED
   ARE THERE ED'S
   TO BE PLOTTED
PRINT MESSAGE
STATING COUNTY
OUTLINES TO BE
  PLOTTED
ARE COUNTY OUTLINES
   TO BE PLOTTED
                       APPLY USER REQUESTED
                        SCALE TO KILOMETER
                        CONVERSION FACTOR
                           READ SIZE OF
                            STUDY AREA
                        CALCULATE PLOTTER
                        SPACE REQUIRED AND
                        NUMBER OF X AND Y
                            TICKMARKS
                                                                   CAASE3, p. 2
                           PRINT SIZE OF STUDY
                            AREA IN KILOMETER
                              AND INCHES OF
                              PLOTTER SPACE
                                  C-4

-------
                                                                      CAASE3, p.3
                               '  PRINT COLUMN
                              HEADINGS FOR GRID
                            SQUARE IDENTIFICATION
         LOOP _1800 JTIMES__
         '"(LOOP ENDS AT 200j
  CAASE 2
OUTPUT TAPE
   (NAO)
               (MAXIMUM NUMBER OF GRID SQUARE ALLOWED
                                           'I
                                            I
    READ GRID SQUARE ID
  NUMBER, STATE AND COUNTY
  CODES, UTM ZONE, X AND Y
COORDINATES, AND SIDE LENGTH
                                HAVE ALL GRID
                            IDENTIFIERS BEEN READ
                                SET NUMBER OF
                             GRID SQUARE VARIABLE
                             STORE GRID ID, X, Y
                            COORDINATES IN PLOTTER
                            INCHES AND SIDE LENGTH
                           PRINT GRID SQUARE ID, X, Y
                           COORDINATES, SIDE LENGTH,
                             STATE & COUNTY CODES
             200
        END_
OF LOOP

-------
 READ GRID SQUARE
    ID NUMBER
   IS  RECORD AN
   END OF FILE
 CALL SUBROUTINE
 POPBOX TO PLOT
    GRID MAP.
 ARE ENUMERATION
 DISTRICTS TO BE
     PLOTTED
CALL SUBORDINATE ED
   PLOT TO PLOT
   ENUMERATION
    DISTRICTS
                                         CAASE3,  p.4
       C-6

-------
                                                                            CAASE3, p.5
                                 ARE COUNTY OUTLINES
                                   TO BE PLOTTED
CALL SUBROUTINE
COOUT TO PLOT
COUNTY OUTLINES


i
•* 	
        0
2030
:     PRINT ERROR
MESSAGE - MORE GRID
    SQUARES THAN
 STORAGE ALLOCATED
                                1000
PRINT "GOOD FINISH"
 MESSAGE INDICATING
 SUCCESSFUL RUN OF
      PROGRAM
                                CALL SYSTEM SUBROUTINE
                                    PLOT TO CLOSE
                                    PLOT PICTURE
                                     1500 t

                                    (    END       J
                                          C-7

-------
   c
SUBROUTINE
  POPBOX
CAASE3
SUBROUTINE POPBOX
   COMPUTE  TICK MARK
   INCREMENT, X & Y
   MAXIMUM  VALUE IN
PLOTTER INCHES, SCALE
   LEGEND TO REFLECT
    USER REQUEST
      CALL SYSTEM
      SUBROUTINE
     PLOT TO OPEN
     PLOTTER UNIT
      CALL  SYSTEM
      SUBROUTINE
      PLOT  TO  SET
      ORIGIN AND
       MARGINS
       SET AXIS
        SWITCH
        TO ZERO
    RINT  HEADING
    FOR PLOTTER
  INCHES  DISPLAY
OF GRID SQUARES
    26
      SET X-AXIS
        LENGTH
        C-8

-------
                                 WHICH
                            X-AXIS IS BEING
                                 DRAWN
                                                                  CAASE3
                                                                  SUBROUTINE  POPBOX
                                                                  p.2
                                                         30
                  SOUTHERN
 SET DISTANCE
PEN MOVES IN Y
 DIRECTION AT
  BOTTOM OF
 PLOT TO ZERO
                                    NORTHERN
                           SET DISTANCE PEN
                           MOVES IN Y DI-
                           RECTION AT TOP
                           OF PLOT TO ZERO
                           32
                              CALL SYSTEM
                              SUBROUTINE
                                 PLOT
                                TO DRAW
                              THE X-AXIS
40
 SET DISTANCE
 PEN MOVES IN
 X DIRECTION
 AT LEFT HAND
 SIDE OF PLOT
 TQZERQ
     WHICH
Y-AXIS IS BEING
     DRAWN
                            SET DISTANCE
                           PEN MOVES IN X
                            DIRECTION AT
                           RIGHT HAND SIDE
                           OF PLOT TO ZERO
                          42
                             CALL SYSTEM
                             SUBROUTINE
                                PLOT
                             TO DRAW THE
                               Y-AXIS
                                  C-9

-------
                                                   CAASE3
                                                   SUBROUTINE POPBOX
                                                   p.3
                INITIALIZE  X
                  TICK MARK
                   TO ZERO
                   WHICH
               AXIS IS BEING
                   TICKED
                                        SET TICK-MARK
                                         LENGTH AND
                                        POSITION FOR
                                        LOWER X-AXIS
               SET  TICK MARK
                LENGTH AND
               POSITION FOR
               UPPER X-AXIS
              47
                CALL SYSTEM
                SUBROUTINE
                   PLOT
              TO DRAW FIRST
               X-AXIS TICK
_LOOP_ON_NUMBER _OF
 (LOOP ENDS AT  50)~
                      TICK MARKS FOR X-AXIS
                 INCREMENT
                X-AXIS TICK
                 POSITION
A
I	
                CALL SYSTEM
                SUBROUTINE
                   PLOT
              TO DRAW X-AXIS
                TICK MARK
            50 END OF LOOP
                     C-10

-------
                                               CAASE3
                                               SUBROUTINE POPBOX
                                               p.4
         INITIALIZE Y-TICK
           MARK TO ZERO
               WHICH
           AXIS IS BEING
               DRAWN
                     SET TICK MARK
                      LENGTH AND
                     POSITION FOR
                     LEFT HAND AXIS
           SET TICK MARK
            LENGTH AND
           POSITION FOR
          RIGHT HAND AXIS
         57
            CALL SYSTEM
         SUBROUTINE PLOT
           TO DRAW FIRST
            Y-AXIS TICK
  LOOF_ON_ NUMBER
{(LOOP ENDS AT
* 100)
OF_TICK MARKS FOR Y-AXIS

               t
             INCREMENT
            Y-AXIS TICK
             POSITION
           CALL SYSTEM
           SUBROUTINE
              PLOT
             TO DRAW
            TICK MARK
 '100 END OF LOOP
                C-ll

-------
      IS THIS
  THE RIGHT HAND
     AND UPPER
       AXIS
          YES
 105
   SET STARTING
   POSITION FOR
   X-AXIS LABEL
   CALL SYSTEM
   SUBROUTINE
     SYMBOL
  TO DRAW LABEL
  "KM(EASTING)"
   SET STARTING
   POSITION FOR
   Y-AXIS LABEL
    CALL SYSTEM
    SUBROUTINE
      SYMBOL
  TO  DRAW LABEL
  "KM(NORTHING)"
   SET STARTING
POSITION FOR TITLE
                                       CAASE3
                                       SUBROUTINE POPB07
                                       P.5
NO
SET INDICATOR!
FOR UPPER ANDi
RIGHT HAND
AXES
   CALL SYSTEM
   SUBROUTINE
     SYMBOL
  TO DRAW TITLE
       (Q)

-------
 SET  STARTING
   POSITION
  FOR LEGEND
  CALL SYSTEM
  SUBROUTINE
    SYMBOL
TO DRAW LEGEND
  CALL SYSTEM
  SUBROUTINE
    NUMBER
    TO DRAW
 SCALE FACTOR
SET POSITION
FOR TICK
MARK LABEL
i
i
CALL SYSTEM
SUBROUTINE
NUMBER
TO DRAW
TICK MARK LABEL
i

SET VALUE
OF MAXIMUM X & Y
AXES TICKS SET
POSITION OF TICK
MARK LABEL
1
r
CALL SYSTEM
SUBROUTINE
NUMBER
TO DRAW TICK
MARK LABEL
^
t
                                     CAASE3
                                     SUBROUTINE POPBOX
                                     p.6
              C-13

-------
                                                      CAASE3
                                                      SUBROUTINE POP30X
                                                      p.7
I	/7^
LOOP_ON_NUMBER_OF_ | GRID SQUARES IN _COUNTY
(LOOP ENDS AT 300)"
                CALCULATE AND
                 STORE X & Y
               COORDINATES OF
                 CORNERS OF
                 GRID SQUARE
                  CALL SYSTEM
                  SUBROUTINE
                     PLOT
                TO POSITION PEN
              AT LOWER LEFT HAND
                CORNER OF GRID
        _LOpP_ON_GRID^| SQUARE _SI?_ES_
      f(LOOP ENDS AT
      T 200)
                 CALL SYSTEM
                 SUBROUTINE
                    PLOT
                TO DRAW GRID
                 SQUARE SIDE
              200 END - OF LOOP
                                 	1
              WRITE PLOTTER
               POINT LINE
             FOR GRID SQUARE
               300 END'-  OF  LOOP
                  (RETURN TO "\
                  CALLING     )
                  PROGRAM   J
                    C-14

-------
                                    CAASE3
                                    SUBROUTINE EDPLOT
   (SUBROUTINE A
     EDPLOT   J
    INITIALIZE
    ENUMERATION
 DISTRICT COUNTER
      TO ZERO
  10
     READ UTM
    COORDINATES
   AND TYPE OF
  ENUMERATION
    DISTRICT
       HAS
     AN END
  OF FILE BEEN
   ENCOUNTERS
                                1000
CONVERT COORDINATES
  FROM KILOMETERS
 TO PLOTTER INCHES
  AND SET SYMBOL
    TO BE USED
      PRINT NUMBER OF
     ENUMERATION DIS-
    TRICTS PLOTTED,
   AND THE COUNT
  FOR THE DIF-
 FERENT TYPES OF
ED's PLOTTED
    RETURN TO
 CALLING PROGRAM
    CALL SYSTEM
    SUBROUTINE
    SYMBOL TO
  PLACE ED SYMBOL
  IN POSITION ON
        MAP
     INCREMENT
    ENUMERATION
  DISTRICT COUNT
       BY 1
         C-15

-------
C                SUBROUTINE A
                   COOUT    J
                                CAASE3
                                SUBROUTINE COOU1
            INITIALIZE  STATE
            AND COUNTY  CODES
                 TO ZERO
       50
         CALL SYSTEM SUBROUTINE
          NEWPEN TO CHANGE PEN
        COLOR FOR COUNTY OUTLINE
             INITIALIZE COUNTY
             COUNTER VARIABLE
                  TO ZERO
              READ NUMBER OF
             STATES TO BE
            PROCESSED
	LOOP^ ON	
"(LOOP ENDS AT 10)
  STATE  COUNT  (IX)
               READ NUMBER OF/
              COUNTIES IN
                 STATE
	JLOOP_ON	
 (LOOP ENDS  AT  10)
   COUNTY COUNT  (IY)
                     '1
                      Y
                   READ
                 COUNTY
                   ID's
      10 END
	OF_LOOP	|
                             C-16

-------
                                           CAASE3
                                           SUBROUTINE COOUT
                                           p.2
  60
    READ STATE AND COUNTY
   CODE, LOWER LEFT-HAND
  & UPPER RIGHT-HAND
 CORNER OF AREA CON-
TAINING COUNTY
            HAS
        LAST RECORD
       ON TAPE BEEN
          COUNTERE
            IS
           THIS
         RECORD A
          HEADER
          RECORD
y
INCREMENT COUNTY
COUNTER BY 1

90 >
r

   READ STATE AND COUNTY
  CODE, BEGINNING AND
 ENDING OF LINE SEG-
MENT FOR COUNTY
            HAS
        LAST RECORD
       ON TAPE BEEN
          COUNTERE
           C-17

-------
                                   IS
                                 THIS  A
                              LINE SEGMENT
                                 RECORD
                                                                    CAASE3
                                                                    SUBROUTINE  COOUT
                                                                    D.3
                          CONVERT BEGINNING &
                            ENDING OF LINE
                           SEGMENT TO SINGLE
                        PRECISION FOR PLOTTING
                                ROUTINE
                         160
1
                         CONVERT LINE SEGMENTS
                          FROM KILOMETERS TO
                          PLOTTER INCHES AND
                          TRANSLATE ORIGIN TO
                            PROPER POSITION
                             CALL SYSTEM
                           SUBROUTINE PLOT
                         TO PLOT LINE SEGMENT
   PRINT NUMBER
  OF COUNTIES
 PLOTTED
      I
  (RETURN TO
CALLING PROGRAM
                                   C-18

-------
             C****PROGRAM NAME:  CAASE3                                                  6.
             C*****THIS PROGRAM  IS DESIGNED TO DRAW AREA SOURCE  BOXES FOR ANY  GIVEN     7.
             C      AUCR,    USING A SET OF  DATA CARDS THAT DEFINE THE  COORDINATES OF     8.
             C      THE LOWER-LEFT HAND CORNER OF  THE BOX AND THE LENGTH OF THE SIDE.     9.
                   DIMENSION AQCR(5),  XRAYU800),  YRAYU800),  SIDEU800), 10(1800)      10.
                   DIMENSION CNTY(2)                                                    11.
                   CUMMON/BOXES/ XZERO,  YZERO, SCALEX,  AQCR, XRAY,  YRAY,  SIDE,         12.
                  1               N,  XLONG,  YLONG,  IXTIC, IYTIC,  TICINC, IPRINT,         13.
                  2               JRZONE,  SCALEF                                        la,
                   COMMON /ED/ 1EDFIL                                                   15.
                   COMMON /CO/ ICOFILf FROM,  TO
                   KEAL*8 FROM(2), T0(2)                                                17.
                   INTEGER CNTY                                                         18.
                   1KEAD=5                                                             19.
                   IPKINT=6                                                            20.
                   ItUFlL=10                                                           21.
                   ICOFIL=12                                                           22,
?                  NAU=20                                                              23.
S            C                                                                          25.
             C*****INPUT                                                                26.
             C      SCALEX—SCALING FACTOR  TO CONVERT KILOMETER DISTANCES  TO PLOTTER    27.
             C              INCHES                                                      28.
             C      IXER-—VARIABLE  TO REQUEST PLOTTING OF STUDY AREA ENUMERATION      29.
             C              DISTRICTS.                                                   30,
             C      ICO---—VARIABLE  TO REQUEST PLOTTING OF COUNTY BOUNDARIES FOR       31.
             C              THE STUDY  AREA                                               32.
             C      IBUX — -AREA  SOURCE GRID SQUARE NUMBER                              33.
             C      XFT	LOWER LEFT-HAND  X COORDINATE FOR -THE  GRID  SQUARE            34.
             C      YPT- ——LOWER LEFT-HAND  Y COORDINATE FOR THE  GRID  SQUARE            35,
             C      S	----LENGTH OF  THE  SIDE OF  THE GRID SQUARE                       36.
             C      CHlY	-FIPS  STATE  AND  COUNTY  CODES                                  37.
             C      IKZOIME—REFERENCE  (PRIMARY) UTM ZONE FOR THE  RUN                    38.
             C*****UUTHUT—A COMPUTER-DRAWN PLOT  PICTURE OF THE  GRID  SQUARES FOR THE    39.
             c              ENTIRE AQCR;  PLOTTING  OF THE COUNTY BOUNDARIES AND           
-------
     TICINC=5.0
 100 HEAD (1READ,5000,END=1000)
5000 FORMAT (F12.0,2112)
     KEAD (IREAD,5010) AQCR
5010 FORMAT (5A4)
     wRIIE (IPRINT, 5015) AUCR
5015 FORMAT ('!', 10X, 'STUDY AREA IS ',
                                             SCALEX, IXER, ICO
                                          5A4
                                                               )
o
ro
o
      IP (IXER.GT.O) WRITE ( IPRINT, 5001 )
 5001 FOKMATCOENUMERATION DISTRICTS TO BE PLOTTED')
      IF (ICO.GT.O) rtRITE (IPRINT,5002)
 5003 FUKMATCOCOUNTY OUTLINES TO BE PLOTTED')
      SCALEF=SCALEX
      SCALEX=T/SCALEF
      KEAD (NAQ/5005,END=1000) FROM, TO
 5005 FOHMAT(aFb.O)
      ll=FHOM(l)/5.
      XZEKO=IT*5.
      IT=FKUM(2)/5.
                  XLUNG=IT*b.
                  IF UXZERO-FROM(1)).GE.O.) XZERO=XZERO-5.
                  If- ((YZERO"FROM(2)),GE.O.) YZERO=YZERO-5.
                  IF UXLONG-TO(1)).LE.O.) XLONG=XLONGf5.
                  IF ((YLONG-TO(2)).LE.O.) YLONG=YLONG+5.
                  IXUC = (XLONG-XZERO)/TICINC* 1
                  IYTIC=(YLONG-YZERO)/TICINC+1
                  T1=IXT1C*T1CINC/SCALEX
                                                                      Tl, T2
      "KITE (IPRINT,5018) FROM(l), FROM(2),
 5018 FORMA!(/,11X,'EASTING  NORTHING',//,'
     *2F10.0,//,' MAXIMUM',2F10.0,//,' PLOT
     *Fb.i,' INCHES')
C*****KEAD IIM CARDS WITH BOX NO., X, Y-COORDINATES OF LLH, AND SIDE
C     LENGTH UNTIL A BLANK CARD IS REACHED.
T0(l), T0(2),
MINIMUM',
WILL COVER',F5.1,'
                                                                         51.
                                                                         52.
                                                                         53.
                                                                         54.
                                                                         55.
                                                                         56.

                                                                         58.
                                                                         59.
                                                                         60.
                                                                         61.
                                                                         62.
                                                                         63.
                                                                         64.
                                                                         65.
                                                                         66.
                                                                         67.
                                                                         68.
                                                                         69.
                                                                         70.
                                                                         71.
                                                                         72.
                                                                         73.
                                                                         74.
                                                                         75.
                                                                         76.
                                                                         77.
                                                                         78.
                                                                         79.
                                                                         80.

-------
      ARITE (IPRINT,5016)                                                 81,
 5016 FORMAT(                                                             62.
     I'O', 7X, 'BOX    XPOINT    YPOINT      SIDE    STATE  COUNTY',/)    83.
      DO 200 1=1,1800                                                     84.
      READ (NAQ,5020,END=250) IBOX, (CNTY(J),J=l,2), IRZONE, XPT, YPT, S  85.
 5020 FORMAT(15,6X,13,15,13,2F10.5,F3.0)                                  86.
      IF (IBOX.LE.O) GU TO 250                                            87.
      N=I                                                                 88.
      IL>(I) = IBOX                                                           89.
      XKAY(I)= (XPT-XZERO) / SCALEX                                       90.
      YHAY(l)s (YPT-YZERO) / SCALEX                                       91.
      S1DE(I)= S/SCALEX                                                   92.
      WHITE (1PRINT,5025) IBOX, XPT, YPT, S, (CNTY(J), J=l,2)             93.
 5025 FORMAT (IX, 19, 3F10.1, 2X, 14, 15)                                 94.
  200 CONTINUE
C                                                                        106.
C*****MAY HAVE EXCEEDED MAXIMUM NUMBER OF BOXES                          107.
      HEAD (IMAO,5020,£ND = 250) IBOX
      IF (IBOX) 250,250,2030                                             109.
C                                                                        110.
C*****HAVE FILLED XRAY AND YRAY FOR THIS AREA.  TIME TO PLOT BOXES.      111.
  250 CONTINUE                                                           112.
      CALL POPBOX                                                        117.
C*****UHTIUNAL PLOT OF ENUMERATION DISTRICTS.                            118.
      IF (IXEH.GT.O) CALL EDPLOT                                         119.
C*****OPTIUNAL PLOT OF COUNTY OUTLINES.                                  120.
      IF (1CU.GT.O) CALL COOUT                                           121.
      GO TU 100                                .                          122.
C                                                                        123.
 1000 *KITE(IPR1NT,5040)                                                 124.
 5040 FUKMATC1GOOD FINISH')                                             125.
C*****TUCC PLOTTING FORM                                                 126.
C     CALL PiCSIZ(0.,0.)                                                 127.
C***** bENERAL PLOTTING FORM                                             128.
      XLuNG=(XLOiMG-XZERO)/SCALEX-«-3.0                                     129.
      CALL PLUMXLUNb, 1.0*999)                                           130.
 1500 bfUP                                                               131.

-------
            2030 KRUE (IPRINT,S035)                                                 137.
            S035 FORMATCTHERE ARE MORE BOXES THAN STORAGE ALLOCATED. END  JOB')      138.
                 l»0 TU 1500                                                          139.
n

NJ
Is)

-------
                SUBROUTINE  POPBOX                                                   141 •
                DIMENSION AQCRC5),  XRAYU800),  YRAYU800),  SIDEU800)
                DIMENSION XX(2),  YY(2),  X(5),  Y(5)                                  143.
                COMMON/BOXES/  XZERO,  YZEROr  SCALEX,  AQCR,  XRAY,  YRAYr  SIDE,         144.
               1               N,  XLONG,  YLONG,  IXTIC,  IYTIC,  TICINC,  IPRINT,        H5.
               2               JRZONE,  SCALEF                                        146.
          C*****SET  CONSTANTS  NEEDED  FOR PLOTTER  USING INPUT  VALUES.                147.
          C*****XLUNG=  TICINC  *  XMAX  t 2 INCHES,  YLONG=  TICINC  *  YMAX  t  3  INCHES.   148.
                XTIC=IXTIC                                                          149.
                YTIC=IYTIC                                                          IbO.
                TIC1NC=FICINC/SCALEX                                                151.
                XMAX=XTIC * TICINC                                                  152.
                YMAX=YTIC * TICINC                                                  153.
                SCALE=250000/SCALEF                                                 154.
                J=29                                                               163.
                1=29                                                               164.
                CALL PLUTS(I,J,14)                                                  165.
                CALL HLOT(0.,-30.,-3)
_               CALL PLOT(3.0,0.75,-3)
^               llMUUO                                                              167.
w         C                                                                         171.
          C*****DKAw THE  X-AXIS.      .                                              172.
             26 XX(l) = 0.0                                                        173.
                XXC2)=  XMAX                                                        174.
                IF  (IND1  ,LE,  0)  GO  TO 30                                          175.
                YYC1)=  YMAX                                                        176.
                YV(2)=  YMAX                                                        177.
                GU  10 32                                                            178.
             30 YY(1) = 0.0                                                        179.
                YYC2) = 0.0                             -                          180.
             32 CALL PLOTUX(U,YY(1),3)                                           184,
                CALL PLUT(XX(2),YY(2),2)                                           185.
          C*****UHAA THt  Y-AXIS.                                                    186.
                It-  UlMDl  ,LE.  0)  GO  TO 40                                          187.
                Xx(l)=  XMAX                                                        188,
                YY(2)=0.                                                            189.
                bU  TU 42                                                            190.

-------
   00 XX(2) = 0.0                                                        191.
      YH2) = YMAX                                                        192.
   42 CALL PLOT(XX(1),YY(1),3)                                            196.
      CALL PLOUXX(2),YY(2),2)                                            197.
C*****PLOT TIC MARKS ON X-AXIS                                            198.
      XX(l) = 0.0                                                        199.
      U UN01 .LE. 0) GO TO a5                                          200,
      YY(1)= YMAX                                                        201.
      YY(2)= YMAX + 0.1*SCALEF
      GU TO 47                                                           203.
   45 YY(1) = 0.0                                                        20<4.
      YY(2) = -0.1*SCALEF
   ^7 XX(2) = XX(1)
      CALL PLOT(XX(1),YY(1),3)
      CALL PLOT(XX(2),YY(2),2)
      UU bO IDO=1»IXTIC
      XX(1)= XX(1) * TICINC                                              207.
      XX(2) = XX(1)                                                      208,
      CALL PLOT(XX(1),YY(1),3)                                            213.
      CALL PLOT(XX(2),YY(2),2)                                            2H.
   50 CONTINUE                                                           215.
C*****PLOT TIC MARKS ON Y-AXIS                                            216,
      YYU) = 0,0                                                        217,
      U CIND1 .LE. 0) GO TO 55                                          218.
      AX(1)= XMAX                                                        219.
      XX(2)= XMAX + 0.1*SCALEF
      bU TO 57                                                           221,
   55 XX(1) = 0.0                                                        222,
      XX12) = -0.1*SCALtF
   57 YY(2)=YY(1)
      CALL PLUT(XX(1),YY(1)»3)
      CALL PLOT(XX(2),YY(2),2)
      UO 100 IDO=1»1YTIC
      YY(1)= YYU) t TICINC                                              225.
      YY(2) = YY(1)                                                      226.
      CALL PLOT(XX(1),YY(1),3)                                            2il.
      CALL PLOT(XX(2),YY(2),2)                                            232.

-------
              100 CONTINUE                                                            233.
                 IK  CIMD1  ,EQ.  1)  GO  TO  105                                          234.
                 1ND1=1                                                              235.
                 GO  TU 26                                                            236.
           C                                                                         237.
           C*****1IMt TO PRINT  LABELS,                                               238,
              105 S?AHT=  (XMAX-1.6*SCALEF) / 2.0
                 XX(1)=  START
                 YYU) = -0.34*SCALEF
                 CALL SYMBOL(XXU),YY(1),0.15*SCALEF,'KM   (EASTING)',0.0,13)
                 STAKT=  (YMAX-1,7*SCALEF) / 2.0
                 YY(1)=  START
                 XXC1) = -0.14*SCALEF
                 CALL 8YMBOL(XX(1),YY(1),0.15*SCALEF,'KM   (NORTHING)',90.0,14)
           C*****TO  CENTER  THE  TITLE,  USE LENGTH OF  2ND.  HEADG  (3,2)  AND  OF          253.
           C     THE MAJOR  HEADG  (4.6).                                              254.
                 XSTART= (XMAX-7.8*SCALEF)  /  2.0
                 YSTART= (YMAX  +  0.3*SCALEF)
                 CALL SYMBOL(XSTART,YSTART»0.20*SCALEF,'AREA:   ',0.0,7)
9                CALL SYMBOL(999.,999.,0.2*SCALEF,AQCR,0.0,20)
g                XSIART= (XMAX-3,2*SCALEF)
                 CALL SYMBOL(XSTART,YSTART,0.15*SCALEF,'SCALE:   1  KM:',0.0,13)
                 CALL NUMBER(999.,999.,0.15*SCALEF,SCALE,0.0,-1)
                 CALL SYMBOL(999.,999.,0.15*SCALEF,'  KM',0.0,3)
                 XX(1) = -0.6*SCALEF
                 YYU) = -0.3*SCALEF
                 CALL NUMBER(XX(1),YY(1),0.15*SCALEF,XZERO,0.0,4)
                 Xx(l)=-l.5*SCALEF
                 YY(1)=-0.0/5*SCALEF
                 CALL NUMBER (XX (1), Y Y (1 ), 0, 15*SCALEF , YZERCX, 0. 0, 4 )
                 LPNs (S.  *  XTIC)  + XZERO                                            285.
                 FPN= (b.  *  YTIC)  * YZERO                                            286.
                 YY(1)=  (YMAX-0.075*SCALEF)
                 CALL NUMBER(XX(1),YY(1),0.15*SCALEF,FPN,0,0,4)
                 XX(U=  (XMAX-0.6*SCALEF)
                 YY(1)=  -0,3*SCALEF
                 CALL i\iUMBER(XX(l),YY(l),0,15*SCALEF,EPN,0.0,4)

-------
C                                                                        292.
C*****IIME TU DRAW BOXES.                                                293.
C                                                                        294.
      DO 300 K=1,N                                                       295.
      Xd) = XRAY(K)                                                      296.
      X(2)= X(l)                                                         297.
      X(3) = XRAY(K) + SIDE(K)                                            298.
      X(4) = X(3)                                                         299.
      X(S)= X(l)                                                         300.
      Y(1J= YRAYCK)                                                      301.
      Y(2)= YRAY(K) t SIDE(K)                                            302.
      Y(3)= Y(2)                                                         303,
      YU)= Yd)                                                         30^4.
      YCS)= Yd)                                                         305.
C***** GENERAL PLOTTING FORM                                             309.
      CALL PLUT(XU)fY(l)»3)                                             310.
      UO 200 100=2,5                                                     311.
      CALL PLOTCX(IDO),YdDO),2)                                         312.
  200 CONTINUE                                                           313.
  250 CONTINUE                                                           3ia.
  300 CONTINUE                                                           317.
      RETURN                                                             318.
      END                                                                319.

-------
                  SUBROUTINE  EDPLOT                                                   320.
                  COMMON  /BOXtS/  XZERO,  YZERO,  SCALEX,  DUMMYH5),  DUMMY2(1800),       321.
                 1        DUMMY3U800),  DUMMY4U800),  IDUM,  XLONG,  YLONG,             322.
                 2        UUM1,  DUM2,  DUM3,  IPRINT,  JRZONE,  SCALEF                     323.
                  COMMON  /ED/IEDFIL                                                   324.
            C*****THIS SUBROUTINE READS THE CAASE1  ED FILE  AND PLOTS SYMBOLS AT  ED   325.
            C      LOCATIONS.   SYMBOL  1  IS USED  FOR  ACTUAL BUREAU OF  THE CENSUS  ED'S,  326.
            C      SYMBOL  5 FOR  ED'S  SCALED  BY CAASE1  ACCORDING TO  USER REQUEST,  SYM-  327.
            C      BOL 9 FOR ED'S  ENTERED SPECIFICALLY 8Y THE USER.                   328.
                  DIMENSION MAARKC3),  ICNTED(3)
                  DATA MAARK/1,5,9/,  ICNTED/0,0,O/
                  ICOUNT=0                                                           331.
               10 HEAD (IEDFIL,5000,END=1000) EAST,  ZNORTH,  IMARK                     332.
             5000 FURMAT(164X,2F15.2,I4)
                  M = MAAKK(IMARK)                                                    334.
                  Y = (ZNORTH - YZERO)  / SCALEX                                       335.
                  X = (EAST - XZERO)  /  SCALEX                                        336.
            C*****  GENERAL PLOTTING  CALL                                             337.
                  CALL SYMBOLU,  Y,  0.05, M,  0.0,  -1)                                338.
?                 1COUNT=ICOUNT-U                                                    339,
S                 ICiMTED( IMARK ) = ICNTED( IMARK ) + l
                  GO TO 10                                                           343,
            O****F 1NISHED                                                           344,
             1000 ntUTE (IPRINT,5005)  ICOUNT, ICNTED
             5005 FUKMATU5,' TOTAL  ENUMERATION  DISTRICTS PLOTTED',/,
                 *        15,' CENSUS  ENUMERATION  DISTRICTS',/,
                 *        15,' SCALED  ENUMERATION  DISTRICTS',/,
                 *        15,' USER  ENUMERATION  DISTRICTS')
                  KtfUKN                                                              347,
                                                          .                          348,

-------
                  SUBROUTINE COOUT                                                    349.
                  CUMMJiM /CO/ ICUFIU FROM, TO
                  COMMON /BOXLS/ XZERO, YZERO, SCALEX, DUMMYH5),  DUMMY211800),       351.
                 1     DUrtMY3(1800),DUMMY4(1800),  IDUM,  XLONG,  YLONG,                 352.
                 2     UUM1, DUM2, DUM3, IPRINT, JRZUNE,  SCALEF                       353.
                  DIMENSION FROMPC2), TOP (2) ,FROM(2) r  T0(2)                           354.
                  KtAL*8 FROM, TO
                  131=0                                                               355.
                  1C1Y=0                                                              356.
            C*****PLOT bOUNDARIES OF EACH COUNTY.  FIRST,  CHANGE  PEN  TO  BLUE.         357.
            C     FUR  GENERAL,                                                       358.
               50 CALL *trtPEN(3)                                                      359.
            C*****btGIlM COUNTY-BY-COUNTY LOOP.                                        362.
                  ICUUl\ll=0                                                            363.
            t*****FIi\U BEGINNING COUNTY RECORD ON  TAPE.                               365.
            C*****FIK3T SKIP HEADER RECORDS.
                  HEAD (ICOFIL/5001) IX
             5001 t-URMAT(14)
n                 UU 10 1=1,IX
^                 KtAU (ICOFIL,5001) IY
00                 UU 10 J = l,IY
                  KLAD (ICOF1L,5001) IZ
               10 LUAiTInUE
               60 HEAD (ICOF1L,5005,END=1000) 1ST, ICTY,  FROM,  TO                    367.
             5005 HJKi'iAT(l7,I3,<4F10.1)                                                368.
                  IF CIST,EiJ.O.OR.ICTY,EQ.O)  GO  TO 60
            C*****LUUNTY HEADER FOR COUNTY  I  FOUND.                                   370.
               70 ICUUi»T = ICOUNT + l                                                     371.
            C*****PLJT COUNTY.                                                        372.
               90 KC«U (ICUFIL,5005,END=1000J 1ST, ICTY,  FRUM,  TO                    373.
            C*****LHLLK FOR NEW COUNTY.                                               374.
                  1F( 1ST.NE.O) GO TO 70
               120 I-HUMH(U=FROM (1)                                                   376.
                  hKUMp(^)=FRQM (2)                                                   377.
                  IUP(1)=?U (1)                                                       378,
                  IuPl2J=TO (2)                                                       379.
            C*****PLUI LINE SEGMENT                                                   380.

-------
              160  KKUMP(U = (FRUMp(l)-XZERO)/SCALEX                                   381.
                  F HUMP (<>) = (FROMP(£)-YZERO)/SCALEX                                   382.
                  ruPU) = ( TOP(1)-XZERO)/SCALEX                                        383.
                  TUP(2)=(TGP(2)-YZERO)/SCALEX                                        384.
            C***** UEUERAL  CALLS.                                                     385.
                  CALL  PLOT(FRUMP(1),FROMP(2),3)                                      386.
                  CALL  PLOTCTOP(1),TOP(2),  3)                                         387.
            C*****oU  GET  NEXT  RECORD                                                 391,
                  bo  !(J  90                                                            39<».
            C*****ALL COUNTIES FINISHED                                              395.
             1000  >^ift  (IPR1NT/5050)  ICOUNT                                          396.
             5050  FORMAT(I5^'  COUfMTlES"  OUTLINES PLOTTED')                           397.
                  KtlURN                                                              398.
n
ho

-------
                    APPENDIX D

LOGICAL FLOWCHARTS AND FORTRAN SOURCE CODE LISTINGS
             CAASE4  (and Subroutines)
                        D-l

-------
D-2

-------
                                            CAASE4
                                           (DRIVER)
     (    START     )
  SET NDIM AT LEAST ONE
GREATER THAN THE NUMBER OF
GRID SQUARES IN THE COUNTY
WITH THE LARGEST NUMBER OF
GRID SQUARES IN THE SET OF
 COUNTIES BEING PROCESSED.
  SET KDIM TO NUMBER OF
 SOURCE CATEGORIES TO BE
 OVERRIDDEN DURING THIS
  RUN WITH OVERRIDING
  APPORTIONING FACTORS
           CALL
        SUBROUTINE
          CAASE4
      C    END     J
             D-3

-------
                                       SUBROUTINE
                                          CAASE4
                                                                      CAASE4
                                                                      SUBROUTINE CAASE4
                                     ASSIGN I/O UNIT
                                   NUMBERS FOR COMPUTER
                                    SYSTEM BEING USED.

KOUNTY
CNAME
KSTATE
SNAME
IOVER
ITEST
—r
INPUT
                                      1DUMP  1ST
                                      RECORD ON
                                     CAASE2  OUTPUT
                                    TAPE—USED
                                   BY CAASE3 ONLY
                         10
READ COUNTY NUMBER & NAME,
STATE NUMBER & NAME, NUMBER
OF CATEGORIES TO OVERRIDE,
AND PRINT OPTION VARIABLE
                                          HAS
                                       AQCR  BEEN
                                       COMPLETED
                   CAASE2
                    OUTPUT
                     TAPE
                              READ STATE AND
                               COUNTY FROM
                               CAASE2 OUTPUT
                                           HAS
                                         END OF
                                        FILE ON
                                       TAPE BEEN
                                        COUNTERED
                                                          PRINT MESSAGE  THAT
                                                          END OF FILE WAS
                                                          ENCOUNTERED WHILE
                                                          LOOKING FOR COUNTY
                                          D-4

-------
                              NO
     IS
 THIS THE
COUNTY OF
 INTEREST
     9
                                                                           CAASE4
                                                                           SUBROUTINE CAASE-
                                                                           P.2
                                              YES
                                      BACKSPACE  INPUT
                                      TAPE  TO  RESTORE
                                         RECORD
                    LOOP ON MAXIMUM NUMBER OF'
                       LOOP ENDS AT 200)
       AREA SOURCE GRIDS IN COUNTY
                                 READ GRID SQUARE NUMBER,
                                FRACTION OF GRID IN COUNTY,
                                STATE, COUNTY, UTM ZONE, UTM
                                 COORDINATE, SIDE LENGTH OF
                                GRID, SUM OF HOUSES AND SUM
                                OF POPULATION IN GRID SQUARE.
SET NUMBER-
OF GRIDS-
PROCESSED
VARIABLE
                                             HAS
                                           END OF
                                         FILE BEEN
                                        ENCOUNTERED
                              REWIND
                              INPUT
                               TAPE
      IS
 THIS STILL
 COUNTY  OF
   INTEREST
SET NUMBER
OF-GRIDS-
PROCESSED
VARIABLE
BACKSPACE
INPUT TAPE
TO RESTORE
RECORD
                                            P-3      D-5

-------
                                                     CAASEi
                                                     SUBROUTINE  CAASE4
                                                     p.3
  /PRINT ERROR MESSAGE
 /INDICATING DIMENSIONS
/  EXCEEDED

i
               ERROR
               MESSAGE
     REWIND INPUT TAPE
   END FILE OUTPUT TAPE
    REWIND OUTPUT TAPE
                     D-6

-------
ERROR
MESSAGE
I PRINT ERROR
MESSAGE
INDICATING
SAME
                                         ARE
                                        THERE
                                    ANY SOURCE
                                    CATEGORIES TO
                                      OVERRIDE
                                      FOR THIS
                                      COUNTY
   WAS
 ENOUGH
 STORAGE
ASSIGNED
                                                                   CAASE4
                                                                   SUBROUTINE CAASE4
                                                                   p.4
              P • 107  — —°— °2L NUMBER	]
                     '.(LOOP  ENDS AT  230)
                    t
                                           YES
                           _OF_ OVERRIDING^ FACTORS

                                               t
| I CAT
XINIT
1
/READ C
NUMBE
*-/ 1N1T1A
/ CONS
.230 END >
ATEGORY /
R AND /
XIZING /
TANT. /
' OF LO
                        LOOP_ON_NUMBER _
                     j~(LOOP ENDS AT 250)
                           OF  OVERRIDING  FACTORS
                           • —	r
LOOP ON NUMBER 01
' (LOOP ENDS '
t

1
l_ 250 E
" AREA
AT 250)
i
SOURCE
f
INITIALIZE THE
WEIGHTING
FACTOR ARRAY
ND
>
.^m
GRIDS IN COUNTY
_ 	 T
t


*
	 OF_LQOP 	 |
f
                                          D-7

-------
                           300
                                 SET MAXIMUM NUMBER
                               OF OVERRIDE  CARDS  EQUAL
                               TO OVERRIDING FACTORS
                               TIMES AREA SOURCE  GRID
                               PLUS ONE, TO RECOGNIZE
                             THE BLANK SIGNAL CARD  USED.
                        LOOP ON MAXIMUM
                       (LOOP  ENDS  AT 400)
                                                                  CAASE4
                                                                  SUBROUTINE CAASE4
                                                                  p.5
                                       NUMBER  OF OVERRIDE CARDS
r
IDNUM
KAT
WEIGHT
  READ OVERRIDE FACTOR
 CARDS CONTAINING GRID
   SQUARE ID NUMBER,
SOURCE CATEGORY NUMBER,
  AND WEIGHTING FACTOR
                                         LAST
                                       OVERRIDE
                                      CARD BEEN
                                     ENCOUNTERED
             _LOOP_ON_NUMBER_OF	
             TLOOP ENDS AT 350)
             _LOOP_ON__NUMBER_ 0_F_ AREA]
             (LOOP ENDS AT 350)
                                                OVERRIDING FACTORS
                                           	,

                                            SOURCE GRIDS IN COUNTY
                                       THIS  THE
                                       CATEGORY
                                         TO  BE
                                       VERRIDEN
                                            "YES
                                          IS
                                      THIS THE
                                     GRID SQUARE
                                     OF INTEREST
                                          7
                                       POST THE
                                       WEIGHTING
                                        FACTOR
                   13501	
                                         P.6 J    D-
                                                            A
                                                       	I

-------
                                                                   CAASE4
                                                                   SUBROUTINE  CAASE4
                                                                   p.6
                      PRINT ERROR MESSAGE
                      THAT CATEGORY OR  ID
                   NUMBER THAT WAS ENCOUNTERED
                       WAS NOT IN THE ARRAY
                            ERROR
                           MESSAGE
                                Y
                               p.io;
              END   OF LOOP
                         ,410	J	
                              CONTINUE
	LOOP_ON_ NUMBER_J)F_AREA
I  (LOOP ENDS AT 2000)
SOURCE GRIDS IN COUNTY
                             CALCULATE
                              AREA OF
                            GRID SQUARE
                           SET CONTAINED
                              HOUSES &
                             POPULATION
                            VARIABLE FOR
                             THIS GRID
                                 IS
                             CONTAINED
                             POPULATION
                              EQUAL  TO
                               ZERO?
                  SET INVERSE
                  POPULATION
                    TO ZERO
                             CALCULATE
                              INVERSE
                             POPULATION
                               DENSITY
                         420
                          SET SIDE EQUAL
                          SQUARE ROOT  OF
                               AREA
                                         D-9

-------
                                                                 CAASE4
                                                                 SUBROUTINE CAASE4
                                                                 p.7
       LOOP__ON_ NUMBER OF
     HLOOP  ENDS
     I
                                   SOURCE CATEGORIES
                          INITIALIZE  CATEGORY
                           SUBSCRIPT  TO  ZERO
                                  ARE
                                 THERE
                               OVERRIDE
                                FACTORS
                 LOOP_ ON _NUMBER_OF f  OVERRIDE FACTORS
                 (LOOP ENDS AT 500)
                                   IS
                             THIS CATEGORY
                            TO BE OVERRIDEN
                                WITH A
                              WEIGHTING
                                ACTOR?
                                             SET WEIGHTING
                                             FACTOR SUBSCRIPT
                                             TO CATEGORY
                                             NUMBER
                              SELECT TYPE
                              OF OVERRIDE
                              PROCESS TO
                                BE USED.
                            COMPUTED "GO TO"
                             FOR APPROPRIATE
                             OVERRIDE TYPE
HOUSING
POPULATION     INVERSE'' 'POP DENSITY    AREA     GRID SQUARE SIDE
                   E
                  P.8
                                   D-10

-------
                                                                        CAASE4
                                                                        SUBROUTINE CAASE-i
                                                                        p.3
         IS
        THIS
      CATEGORY
        TO BE
     OVERRIDDEN
                                                                 700
                                                                              	1
                                                                |     CONTINUE     i
                                                                I	—	1
                          610
                710
SET FACTOR
 EQUAL TO
 HOUSING
  COUNT
     CALCULATE *.
    APPORTIONING
    FACTOR BASED
     ON HOUSING
SET FACTOR
 EQUAL TO
POPULATION
  COUNT
    IS
   THIS
 CATEGORY
  TO BE
OVERRIDDEN
                                                                          YES
                                         CALCULATE *
                                       APPORTIONING
                                       FACTOR BASED
                                       ON POPULATION
 I     CONTINUE
          IS
         THIS
       CATEGORY
         TO  BE
     OVERRIDDEN
                          810
                910
     CALCULATE *
    APPORTIONING
    FACTOR BASED
    ON INVERSE
    POPULATION
    DENSITY
SET FACTOR
 EQUAL TO
 INVERSE
POPULATION
 DENSITY
SET FACTOR
 EQUAL TO
   AREA
    IS
   THIS
 CATEGORY
  TO BE
OVERRIDDEN
                                         CALCULATE *
                                        APPORTIONING
                                        FACTOR BASED
                                          ON AREA
USE OVERRIDING FACTOR
                                         D-ll

-------
                                                                     CAASE4
                                                                     SUBROUTINE  CAASE^
                            1000
                            I	'	1
                            i     CONTINUE    '
     1010
      SET FACTOR
       EQUAL TO
      GRID SQUARE
      SIDE LENGTH
    IS
   THIS
 CATEGORY
  TO BE
OVERRIDDEN
                                CALCULATE *
                              APPORTIONING
                              FACTOR  BASED
                             ON GRID  SQUARE
                              SIDE LENGTH.
              1900 END
                                    >
           OF  LOOP
                                                              	|
                                WRITE OUTPUT
                                 TAPE WITH
                                APPORTIONING
                                FACTORS AND
                               BASIC INFO  FOR
                              THIS GRID SQUARE
                     NO
                             PRINT APPORTIONING
                               FACTORS AND
                           IDENTIFICATION DATA,
                     2000 END
             OF LOOP
                               PRINT SUMMARY
                                ABOUT THIS
                                  COUNTY
USE OVERRIDING FACTOR
                                  D-12

-------
                                                        CAASE4
                                                        SUBROUTINE CAASE4
                                                        p. 10
r~(LOOP ENDS AT 2500)
                             OVERRIDING FACTORS
                                                I
                PRINT WEIGHTING
                  FACTORS FOR
                  OVERRIDDEN
                   CATEGORIES
       2500 END
                3000
             OF LOOP
                                                I
                         _ _ __ _^c_^xU£         |
                    GET NEXT
                    COUNTY IF
                   THERE IS ONE
                 7000
               rPRINT  ''GOOD FINISH"
               MESSAGE  INDICATING
                  SUCCESSFUL RUN
                    OF PROGRAM
               7005
   i
               PUT  END  OF  FILE ON
                  OUTPUT TAPE,
               REWIND OUTPUT  TAPE,
               REWIND INPUT TAPE
                  7010"
                r
   ±
RETURN TO
                V CALLING PROGRAM
                ^^^        	    ^
                       D-13

-------
            c
            C      HHUGRAM NAMt:  CAASE1 DRIVER
            C
            C      DRIVER PROGRAM FUR CAASE4 TO SET DIMENSIONS
            C
            C      ND1M MUST BE AT LEAST ONE GREATER THAN THE NUMBER OF GRID SQUARES
            C         IN THE COUNTY WITH THE MOST  GRID SQUARES IN THE SET OF COUNTIES
            C         BEING PROCESSED WITH THIS COMPUTER RUN.
            C
            C      KDIM IS THE NUMBER OF SOURCE CATEGORIES TO BE OVERRIDEN DURING
            C      IMIS RUN WITH  OVERRIDING APPORTIION1NG FACTORS.
            C
            C      OBJECTIVE 1ERMS WILL BE USED EXCLUSIVELY FOR APPORTIONING IF NO
            C      UVEKRIDES ARE  REQUESTED
            C
            C      THESE DIMENSIONS MUST BE SPECIFIED AND THE DRIVER RECOMPILED
            C      ANYI1ME ND1M AND/OR KDIM ARE INCREASED. THEY DO NOT NEED TO BE
            C      CHANGED If-  DIMENSIONS ARE LARGER THAN NECESSARY EXCEPT FOR
            C      COMPUTER STORAGE EFFICIENCY.
o           C
M           C      KD1H SETS DIMENSIONS FOR 1CAT,  XINIT, AND THE SECOND SUBSCRIPT
*"           C      UF wGFFCT,  ALL OTHERS ARE SET BY NDIM
            C
                  DIMENSION SUMH(100),SUMP(100),X(100),Y(100),SIDE(100),FRAC<100),
                 1 3lAIt(100),COUNTY(100),UT2UNE(100),wGTFCT(100,5 ),ID(100),
                 ?lblATEUOO),ICiMTY(100),UONE(100),lCAT( 3),XINIT( 4)
            C
                  l>iL
-------
      SUBKOUTINE CAASE4
     1            (ID,SUMH,SUMP,X,Y,SIDE,FRAC,STATE,COUNTY,1STATE,ICNTY,
     2UTZONE,IZONE,WGTFCT,ICAT,XINIT»NDIM,KDIM)
C**** ROUTINE READS TAPE WRITTEN BY CAASE2 WHICH INCLUDES:
C         GRID SQUARE ID NUMBERS (ID)
C         UTM COORDINATES (EASTING AND NORTHING) OF LOWER LEFT HAND
C              CORNER FOR EACH GRID SQUARE (X AND Y)
C         UTM ZONE FOR EACH GRID SQUARE (UTZONE)
C         SIDE LENGTH IN KILOMETERS FOR EACH GRID SQUARE (SIDE)
C         FRACTION (FRAC) OF EACH GRID SQUARE IN COUNTY, ASSIGNED GT
C              ZERO,  LE TO 1.0
C         STATE & COUNTY ASSOCIATED WITH EACH GRID SQUARE (STATE AND
C         COUNTY) FIPS CODE
      DIMENSION SUMH(NDIM),SUMP(NDIM),ID(NDIM),X(NDIM),Y(NDIM),
     1  FRAC(NDIM),SIDE(NDIM),ISTATE(NDIM),ICNTY(NDIM),IZONE(NDIM),
     2 rtGIFCT(NDIM,KDIM),CNAME(S),SNAME(5),lCAT(KDIM),XINIT(KDIM),
     3 FACTOR(56),NAPORT(b6)
C**** ALSO PASSED TO ROUTINE ARE THE DIMENSIONS FOR THE RUN WHERE:
C         ND1M=NUMBER OF GRID SQUARES IN THE COUNTY WITH THE LARGEST
C               NUMBER OF SQUARES FOR THIS RUN (PLUS ONE)
C         KDIM=NUMBER OF SOURCE CATEGORIES TO BE OVERRIDEN
C
C         ITEST = WHETHER OR NOT TO PRINT THE FACTORS COMPUTED - IF NOT
C         ZEKU, PRINTING WILL OCCUR.
C****     WEIGHT FACTORS ARE ASSUMED TO BE EQUAL TO 1.0 EXCEPT FOR
C         THUSE CATEGORIES TO BE OVERRIDDEN,
C
C         FOK THOSE SOURCE CATEGORIES TO BE OVERRIDDEN, READ IN THE
C         SOURCE CATEGORY NUMBER AND EITHER A ZERO OR A 1.0 FOR
C         INITIALIZATION, E.G. IF AIRPORT OPERATIONS ARE TO BE
C         OVERRIDDEN AND EMISSIONS APPORTIONED TO ONLY THOSE GRID
C         SQUARES INDICATED, THEN READ IN A CARD WITH EACH APPLICABLE
C         CATEGORY NUMBER (33,34, OR35) AND A 0.0 TO CAUSE THE
C         INITIALIZATION OF THE WEIGHTING FACTOR FOR EACH GRID SQUARE
C         Nj BE SET TO ZERO...
C
C**** AN INPUT CARD TO OVERRIDE AN OBJECTIVE WEIGHTING FACTOR

-------
C     REQUIRES THE GRID SQUARE ID NUMBER,  THE SOURCE CATEGORY NUMBER,
C     AhD THE WEIGHT ASSIGNED- WEIGHTS OF  0 TO 10 OR 0.0 TO 1,0 ARE
C     SUGGESTED
C
C     SET GO TO BRANCHES AS A FUNCTION OF  SOURCE CATEGORY
C
      DATA NAPORT /6* 1 , 14*2, 1 ,2*3, 1 , 5*2, 3, 2, 3,5, 3*4,4*5, 2*2, 2*3, 2*2,
     1 2*3, 4, 6*3, 2/
C
C**** DIMENSIONS ARE A  FUNCTION OF  THE NUMBER OF GRID SQUARES IN THE
C     COUNTY BEING PROCESSED (NDIM)  AND THE NUMBER OF SOURCE CATEGORIES
C     FU bE OVERRIDDEN  (KDIM).  THE  USER  IS CAUTIONED TO PROVIDE AN
C     ADEQUATE NUMBER , E.G., IF THE LARGEST NUMBER OF SQUARES  IN ANY
C     COUNTY BEING PROCESSED IS 50,  THEN  DIMENSIONS SHOULD BE NO LESS
c     THAN 51, AND THE  VARIABLE 'NDIM* SHOULD BE SET TO so
c
c
C     ASSIGN I/O UNIT NUMBERS
C
      IHEADRsl
c
C      INPUT TAPE (FROM CAASE2)
C
      ITAPEN=a
C
C     OUTPUT TAPE (INPUT TO CAASE5)
C
      ITAPEO=b
      IHKlNTsi
C
C**** DUMP F1KST RECORD ON CAASE2 OUTPUT TAPE— IT IS USED BY CAASE3
C           U'MLY.
C
      KEAD(ITAPEN,<4990) DUM,DUM,DUM
 4990 f-UHMAT(3A4)
C

-------
            C      START  PROCESSING  A  COUNTY
            C
            C      HEAD COUNTY  AND STATt  NAME  AND  NUMBER  (FIPS-CENSUS),  NUMBER  OF
            C      CATEGORIES  TO  OVERRIDE,  AND WHETHER  PRINTER  OUTPUT  IS WANTED,
            C
               10  KEAD(IREADR,bOOO,END=7000)  KOUNTY,CNAME,KSTATE,SNAME,IOVER,I TEST
            5000  FURMATU5,5X,5A4,I5,5X,5Aa,2I5)
            C
            C      STOP ON  BLANK  CARD  FOR COUNTY  (END OF  RUN  SIGNAL)
            C
                  IF  (KOUNTY.EQ.O)  GO TO 7000
            C
            C      READ IN  CAASE2 OUTPUT  DATA  FOR  COUNTY  BEING  PROCESSED.  SHOULD
            C      BE  IN  ORDER, I.E. COUNTIES  IN ORDER  AND  ALL  RECORDS  FOR EACH
            C      CUUNTY IN SEQUENTIAL RECORDS, INSURE THAT  NEXT  RECORD IS COUNTY
            C      WANTED
            C         SUMH=SUM OF HOUSES IN EACH  GRID  SQUARE
            C         SUMP=SUM OF POPULATION  IN EACH GRID  SQUARE
a             100  CONTINUE
M                 K£AU(ITAPEN,5010,END=6950)  JSTATE,JKNTY
            5010  FUHMAT(11X,I3,I5)
                  IFUSTATE.NE.KSTATE.OR.JKNTY.NE.KOUNTY)  GO TO  100
            C      FUUND  COUNTY WANTED
                  BACKSPACE ITAPEN
            C
            C      HEAD DATA FOR  THIS  COUNTY,MAXIMUM WILL BE  NDIM  IN NUMBER
            C
                  UU  200 I=1,NDIMP1
                  KtAU(lTAPEN,5020,END=175) ID(I),FRAC(I),1ST ATE(I),ICNTY(I),
                 1UUNEU), X(l), Yd),  SIDE(I),  SUMH(l),  SUMPCI)
            5020  FURMATU5,Fb.5,I3,I5,I3,2F10.0,F3.0,2E13.5)
                  IFCICNTY(I).EQ.KOUNTY.AND,ISTATE(I).EQ.KSTATE)  GO TO  200
            C
            C      tlTHEK END  OF  FILE  ENCOUNTERED  OR ENCOUNTERED  A  DIFFERENT COUNTY
            C
              150  bACKSPACE ITAPEN

-------
             C      NAKEAS IS NUMBER  UF  GRID SQUARES  THIS COUNTY
             C
                   NAREAS=I-1
                   GO TO 210
               175 REnli^D ITAPEN
                   NAREAS=I-1
                   GO TU 210
               200 CONTINUE
             C
             C      ERROR, EXCEEDING  DIMEMSIONS REQUESTED, ERROR OFF
             C
                   WRITE(1PRINT,5030)  KOUNTY,CNAME, KSTATE, SNAME, NDIM, NDIMP1
              5030 FUKMATC1NUMBER OF  GRID SQUARES CONTAINED IN* , 3X, 15, 5X,bA4, ' COUNT
                  1Y IN THE STATE OF ' , 3X, IS,5X, 5A4/ 'OEXCEEDS DIMENSIONS SPECIFIED', bX
                  2,'NOIM=',I5,5X,'AND',I5,'  GRID SQUARES  HAVE BEEN  READ WITHOUT ENC
                  3UUIM1ER1NG EITHER'/'OANOTHER COUNTY OR AN END OF FILE, CORRECT NDIM
                  a AMD KESUBMIT JOB')
                          ITAPEN
V                  E.MU FILE ITAPEO
                          ITAPEO
                   GU TU 7000
               210 CONTINUE
             C
             C     AKE THERE ANY SOURCE CATEGORIES TO OVERRIDE FOR THIS COUNTY
             C
                   II- HOVER. EG. 0) GO TO aiO
             C
             C     HEAD THE CATEGORY NUMBER AND THE INITIALIZING CONSTANT (I.E. 1.0
             C         OK 0.0)  FUR EACH.
             C
             C
             C         CHECK FIRST ON ENOUGH STORAGE ASSIGNED
             C
                   U (10VER.LE.KDIM) GO TO 225
                   »»KITEUPRINT,5035) IOVER,KDIM
              5035 I-URMATCONUT ENOUGH STORAGE ALLOCATED FOR OVERRIDE FACTORS, IOVER =
                  l',I5,'  AND  KUIM=',I5,/'0 INCREASE KDIM AND RESUBMIT RUN')

-------
I
M
VO
  235

 5040
  230
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
GO TO /005
DO 230 i=l,IOVER
KtAD (IREADR,5040)
FORMAT (I5,F5.0)
CONTINUE
  250
  300
 5050
C
C
                                     ICAT(I), XINITCI)
INITIALIZE THE WEIGHTING FACTOR ARRAY, CAN BE USED TO SET ALL
GRID SQUARES FOR A PARTICULAR SOURCE CATEGORY TO 0. AND THEN PUT
IN OVERRIDE FACTORS FOR ONLY THOSE GRID SQUARES TO APPORTION THE
SOURCE CATEGORY INTO

DO 250 J=1,10VER
DO 250 1=1,NAREAS
WGTFCT(I,J)=XINIT(J)
CONTINUE

OVERRIDE FACTORS FOLLOW WHERE EACH CARD CONTAINS THE GRID SQUARE
10 NUMBER, THE SOURCE CATEGORY NUMBER, AND THE ASSIGNED WEIGHTING
(•ACTOR NUMBER

A BLANK CARD, I.E., A BLANK GRID SQUARE NUMBER SIGNALS THE END
OK OVERRIDE CARDS. THE MAXIMUM NUMBER OF OVERRIDE CARDS FOR A
COUNTY IS (OBVIOUSLY) IOVER (NUMBER OF CATEGORIES TO OVERRIDE)
TIMES NAREAS (NUMBER OF GRID SQUARES IN THE COUNTY BEING
PROCESSED) PLUS 1 TO RECOGNIZE THE BLANK SIGNAL CARD USED,

 LUUP=NAREAS*IOVER+1
DO 400 L=l, LOOP
HEAD (IREADR,5050) IDNUM,KAT,WEIGHT
FuRMAT(2I10,F10.0)
IF(IDNUM.EQ.O) GO TO 410
DO 350 J=l,IOVER
Ou 350 1=1,NAREAS
IFUCAT(J).NE.KAT) GO TO 350
IKIONUM.NE.IDU)) GO TO 350

      THE GRID SQUARE AND CATEGORY, POST THE WEIGHTING FACTOR

-------
C
c
C
c
c
c
c
c
     GU TU 400
 350 CUNlINUt

     COULD ONLY FALL THROUGH IF A CATEGORY OR ID NUMBER WAS ENCOUNTERED
         WHICH WAS NOT IN THE ARRAYS.  PROBABLE KEYPUNCH ERROR.

     wRITE(IPRINT,5060)  IDNUM,KAT,WEIGHT
5060 FORMAT COTROUBLE WITH WEIGHTING FACTORS - TRIED TO OVERRIDE WITH G
    IrtlU SQUARE NUMBER,  CATEGORY NUMBER, AND WEIGHTING FACTOR NUMBER*'/
    22110,F10.2/'OCHECK  FOR KEYPUNCH ERRORS AND RESUBMIT JOB'//)
     GO TO 7005
 400 CONTINUE

     CUULD ONLY FALL THROUGH IF TOO MANY OVERRIDE CARDS ARE BEING
     SUBMITTED FOR THE DIMENSIONS KDIM,  NDIM — ERROR OFF
      WRITE (IPRINT,5065) LOOP
 5065 FOKMArCOTROUBLE WITH WEIGHTING — ONLY ALLOWED FOR', 110,
     110KID SQUARE-SOURCE CATEGORY COMBINAT IONS) V'OCHECK KDIM,
     20 OVERRIDE CARDS — FATAL ERROR THIS RUN')
      GO TO 7005
                                                               '  CARDS
                                                               NDIM, AM
C
C
C

C
C
C
C
C

C
C
         READY TO ASSIGN APPORTIONING FACTORS

 410 CONTINUE

      AHtA

     UU 2000 I=1,NAREAS
     AKtA= SIDE(I)*SIDE(I)*FRAC(I)
     CUNT A 1 NED HOUSES

     SUMlsSUMH(I)

     CONTAINED POPULATION

-------
            c
                  SUM2  s  SUMPCI)
            C
            C****  INVERSE  POPULATION  DENSITY  WEIGHTED  BY  GRID  SQUARE  SIZE  AND
            C      FRACTION OF  GRID  SQUARE  IN  COUNTY  IF NOT  TOTALLY  INSIDE  A  COUNTY
            C
                  II- (SUM2.NE.O.)  GO TO  415
                  GO  TO  «20
              415  SUM3=(AREA/SUM2)*AREA
            C
            C      EFFECTIVE  SIDE  LENGTH  OF  AREA  WITHIN  THIS  COUNTY
            C
              420  SiDELN=  SQRT(AREA)
            C
            C      LOOP  THROUGH  THE  SOURCE CATEGORIES
            C
                  UO  1900  J=l,56
            C
a           C****  IS  THIS  CATEGORY  TO  BE OVERRIDDEN WITH  A WEIGHTING  FACTOR?
N>           C
M                 ISUb=0
                  IFUOVER.EQ.O)  GO TO 510
            C
            C      f-INU  WEIGHT FACTOR FOR THIS  CATEGORY
            C
            C
                  UO  bOO K=1,IOVEK
                  lFC!CAr(K).NE,J)  GO  TO 500
                  UU  TO  510
              500  CONTINUE
              510  CUNllHUt
            C
            C      btLECT TYPE  OF  OVERRIDE  TO  USE  WHERE:
            C
            C      ITYPE  = 1    HOUSING

-------
N>
NJ
C           = 2   POPULATION
C           =3   INVERSE POPULATION DENSITY
C           = 4   AREA
C           =5   GRID SQUARE SIDE LENGTH
C
C
C     bKANCH ACCORDING TO WHICH CATEGORY ON THIS ITERATION
C
      ITYPE = NAPORT (J)
      GO TO (600,700,800,900,1000) , ITYPE
  600 CONTINUE
C
C     HOUSING
C
      IF (ISUB.EQ.O) GO TO 610
      FACTOR(J) = SUMl*rtGTFCT(I,ISUB)
      GO TO 1900
  610 FACTOR(J)= SUM1
      GO TO 1900
  700 CUN1INOE

C     POPULATION
C
      II- (ISUB.EQ.O) GO TO 710
      FACIOK(J) s SUM2*rtGTFCT(l,ISUB)
      GO TO 1900
  710 FAITUR(J) = SUM2
      GO Tu 1900
  800 CONTINUE
t
C     INVERSE POPULATION DENSITY
C
      if- (ISUri.EU.O) GO TO 810
      FACTOR(J) = SUM3*WGTFCT(I,ISUB)
      t»U TO 1900
  810 FACTOR(J) = SUM3
      GO TO 1900

-------
              900 CONTINUE
            C
            C     AREA
            C
                  IFUSUB.EU.O) GO TO 910
                  FACTUR(J)= AREA*WGTFCT(I,ISUB)
                  GO TO 1900
              910 FACTOR(J) = AREA
                  GO TO 1900
             1000 CONTINUE
            C
            C     GRID SUUARE SIDE LENGTH
            C
                  IF (ISUB.EQ.O) GO TO 1010
                  FACTOR(J)=SIDELN*WGTFCT(IrISUB)
                  bO TO 1900
             1010 FACTOR(J) = SIDELN
             1900 CONTINUE
            C
0           C**** UUTPUT TAPE WITH APPORTIONING FACTORS AND BASIC INFO FOR THIS GRID
N>           C     SUUARE ( FOR INPUT TO CAASE5 )
            C
                  nRITEUTAPEO,5100) ID( I) ,FRAC (I ) , I STATE (I), SNAME, ICNT Y (I ) ,CNAME,
                 1UONEU),X(I),Y(I),SIDE(I),AREA,FACTOR
             5100 FOKMAT(I5,F6.5,I3,5A4,15,5A4,I3,2F10.0,2F10.2,56E13.5)
            C
            c**** IF PKIN? SWITCH CITEST) is ON, PRINT FACTORS AND IDENTIFICATION
            C     DATA
            C
                  IF(1TEST.EU.O) GO TO 2000
                  HRirE(IPRINT,5200) IDC I),FRAC(I),1ST ATE(I),SNAME,ICNTY(I),
                 lCiMAME,IZONE(n,X(I),Y(I),SIDE(I),AREA,FACTOR
             5200 FORMA[(/////'0 FOR ID,FRAC,STATE,COUNTY,ZONE,X,Y,SIDE,AND AREA='/
                 l'U',Ib,F10.5,I5,5A4,I5,SA4,I3,2F10.0,2F10.2/'OFACTORS='//

                  wRllE(IPRINT,5205) SUM2,SUM1,SUM3,SIDELN
             S205 FUKMATCOV CONTAINED POPULATION =',F10.0,3X,'CONTAINED HOUSING =

-------
                 1',F10.0,3X,'AREA WEIGHTED INVERSE POPULATION DENSITY =',E13,S/
                 2'OSQUARE ROOT  OF AREA (EFFECTIVE  SIDE LENGTH) =',F10.4)
             2000 CONIINUE
                  WHITE IIPRINT,5210) SNAME,CNAME,NAREAS,IOVER
             5210 FOKMATCOSTATE AND COUNTY  ' ,5A4,5X,5A4,' HAD',110,'  GRID SQUARES
                 I'/     110,'   SOURCE CATEGORIES WERE OVERRIDDEN' )
                  IF(IOVER.EQ.O) GO TO 3000
            C
            C**** OUTPUT  WEIGHTING FACTORS FOR OVERRIDDEN CATEGORIES
            C
                  UO 2500 J=l,IOVER
                  «KITE(IPRINT,5220) ICAT(J),XINIT(J)
             5220 FOHMATC1 CATEGORY', 15,'  WAS INITIALIZED WITH',  F10.0,2X,
                 1  'FOR ALL GRID SQUARES IN THIS  COUNTY'/'OTHE FOLLOWING ARE ID ANO
                 2  WEIGHTING FACTOR PAIRS FOR  THIS  CATEGORY'///)
                  «RITE(I PR INT,5330) (ID(I),WGTFCT(I,J),1 = 1,NAREAS)
             5330 f-ORMAT(I10,F10.2,I10,F10.2,IiO,Fi0.2,I10,F10.2,I10,F10.2,I10,
                 1  F10.2)
             2500 CONTINUE

7            5400 FUKMAT('l')
£           C
            C**** bET NEXT COUNTY IF THERE IS  ONE
            C
                  GU lu 10
             6950 nKITE(IPRINT,5340) SNAME,CNAME
             5340 FUKiiAK'OENCOUNTERED END OF  FILE  ON INPUT TAPE WHEN LOOKING FOR f,
                 15X,5A4,5X,5A4)
                  GO Tu 7005

             5350 (-UKMA1 ('1GOOD FINISH')
             7005 END FILE ITAPEO
                         ITAPEO
                         ITAPEN
             7010 KE1UKN
                  LwU

-------
                    APPENDIX E

LOGICAL FLOWCHARTS AND FORTRAN SOURCE CODE LISTINGS
             CAASE5  (and Subroutines)
                       E-l

-------
E-2

-------
(   START    J
 SET DIMENSIONS
 FOR THIS RUN
CALL  SUBROUTINE
    CAASE  5
(    END     J
                                         CAASE5
                                        (DRIVER)
     E-3

-------
      c
                                              CAASE5
                                              SUBROUTINE CAASE5
SUBROUTINE
  CAASE5
      (INPUT) DIMENSIONS
      DOUBLE PRECISION
      SPECIFICATIONS
       ASSIGN  I/O UNIT
       NUMBERS  FOR
       COMPUTER SYSTEM
       BEING USED
    ADD  1  TO MAXIMUM NO.
    GRIDS  TO HANDLE
    BLANK  CARD  SIGNALING
    END  OF COUNTY
  SET  CONSTANT  TO  BE USED
  WITH HIGHWAY  MOTOR VEHICLE
  ALGORITHMS
1READ IN THE EMISSION FACTOR
TABLES FOR THE 5 POLLUTANTS
AND THE HIGHWAY MOTOR VEHICLE
SOURCE CATEGORIES
 READ IN VARIABLE DENOTING
 OUTPUT CHOICE FOR SUBROUTINE
 OUTPUT 3
             E-4

-------
140
                                               CAASE5
                                               SUBROUTINE CAASE5
                                               p.2
  READ EPA STATE CODE, FTPS
  COUNTY CODE, NO. OF GRID
  SQUARES, COUNTY NAME, EPA
  COUNTY CODE, POLITICAL
  SUBDIVISION, STUDY AREA CODE.
        HAS STUDY AREA
        BEEN COMPLETED
                               YES
                NO
         READ IN PAGE
         HEADING FOR
         OUTPUT  TABLES
       INITIALIZE ERROR
       FLAG VARIABLE FOR
       SUBROUTINE READ1
       TO ZERO
     CALL  SUBROUTINE  READ1
     TO  READ  "FUELS"  TOTALS
     FOR COUNTY  OF  INTEREST
             E-5

-------
                                                                 CAASE5
                                                                 SUBROUTINE CAASE5
                                                                 p.3
                       WAS THERE AN ERRO
                       RETURNED FROM THE
                       SUBROUTINE
                        DISPLAY FUELS
                        INPUT DATA FROM
                        READ1 SUBROUTINE
CAASE4
OUTPUT
TAPE
LOCATE STATE AND
COUNTY OF INTEREST
                       HAS AN END-OF-FILE
                       BEEN ENCOUNTERED
                     IS THIS THE STATE
                     AND COUNTY OF INTEREST
                             E-6

-------
                                                     CAASE5
                                                     SUBROUTINE CAASE5
                                                     p.4
            STATE AND COUNTY
            OF INTEREST HAVE
            BEEN FOUND BACK-
            SPACE 1 RECORD.
LOOP ON DIMENSIONS
(LOOP ENDS AT 480)
SET IN DRIVER
          READ IN WEIGHTED
          APPORTIONING FACTORS
           HAS AN END-OF-FILE
           BEEN ENCOUNTERED
             HAS ANOTHER
             STATE OR COUNTY
             BEEN ENCOUNTERED
                                    YES
                                         4
                                         I
          DIMENSIONS WERE NOT
          ADEQUATE PRINT ERROR
          MESSAGE STATING SAME
                 E-7

-------
                                                      CAASE5
                                                      SUBROUTINE CAASE5
                                                      D. 5
               BACKSPACE INPUT
               TAPE ONE RECORD
 O
            460
              SET TOTAL  GRID
              SQUARES VARIABLE
               520   "
                  CONTINUE
         LOOP ON 56
j(LOOP ENDS AT 560)
t
        CATEGORIES
                                          •
           INITIALIZE APPORTIONING
           TOTAL ARRAY TO ZERO
           FOR CATEGORY OF INTEREST
   LOOP  ON NUMBER OF
               AT *

    I 540
       'GRID SQUARES THIS  COUNTY
                        ,

                       t
           CALCULATE APPORTIONING
           FACTOR SUMS OF THIS
           CATEGORY FOR THIS GRID
           SQUARE
 END

END
•  560           r-WL)  y     L,uur
OF LOOP

OF LOOP
                                       4
                    E-8

-------
                                                      CAASE5
                                                      SUBROUTINE  CAASE5
                                                      p.6
          LOOP ON 56 v CATEGORIES
r(LOOP~ENDS AT 600)
                        GRID SQUARES THIS " COUNTY
                       	1
                                          Y
                                     YES
          DOES APPORTIONING
          TOTAL FOR THIS
          CATEGORY EQUAL ZERO
4
LJ
             APPORTION FUEL FOR
             THIS CATEGORY AND
             AREA SOURCE GRID
             SQUARE
         580
           SET APPORTIONED FUEL
           FOR THIS CATEGORY AND
           AREA SOURCE GRID SQUARE
           TO ZERO
,, 600
END
OF LOOP

           CALL SUBROUTINE OUTPT1
           TO FORMAT OUTPUT FOR
           APPORTIONED FUELS
           THROUGHPUT
                    E-9

-------
                                                      CAASE5
                                                      SUBROUTINE CAASE!
                                                      p.7
       	LOpP_ON_ 5J ' ^POLLUTANTS	
.^wv,, 'ENDS-AT 680)      "         "      1

  	LpOP_pN_lst J> >'CATEGpRIES_OF_RESIDENTIAL FUEL
'"(LOOP ENDS"AT 680)  ""                  ~~[
i         	L	        *

          COMPUTE  TOTAL EMISSIONS
          FOR THIS POLLUTANT FOR
          THIS CATEGORY


|_680	END_ i _ OF LOOP	J


	^LOOP _ON .lst_4j rCATEGORIES_OF_RESIDENTIAL FUEL
|(LOOP ENDS AT 700) "1                    '


           MODIFY FOR THE SULFUR
           CONTENT TERM OF S02
           CALCULATIONS FOR THIS
           CATEGORY

I
|  700           ' END | OF LOOP

                    _  POLLUTANTS
        ENDS  AT 720)


LOOP _QN^6^CATEGORIES_|£F_COMM'_L&_INSTIL FUEL  (7-12)
f(LpOP ENDS AT 720)                       '
I

          COMPUTE TOTAL EMISSIONS
          FOR THIS POLLUTANT, FOR
          THIS CATEGORY


j_720	    END | OF LOOP	J
                    E-10

-------
                                                   CAASE5
                                                   SUBROUTINE  CAASE5
                                                   p.3
OP ON 1st 2 CATE^
)OP
2 —
ENDS AT 740)
1
rGORIES OF COMM'L -
r
SET SUBSCRIPT FOR ASH
AND SULFUR CONTENT
COEFFICIENT
i
r
MODIFY FOR THE ASH
CONTENT TERM FOR TSP
CALCULATIONS FOR
THIS CATEGORY
1
t
MODIFY FOR THE SULFUR
CONTENT TERM FOR S02
CALCULATIONS FOR
THIS CATEGORY
— — _END J
r_ o?_ LOOP 	
>
[(LOOP ENDS AT 760)
I
     LOOP ON  2nd^ 2  ^CATEGORIES OF COMM''L-INST'L FUEL  (9-10)
                       T
                       I
           SET  SUBSCRIPT  FOR
           SULFUR CONTENT
           COEFFICIENT
          MODIFY FOR THE SULFUR
          CONTENT TERM FOR S02
          CALCULATIONS FOR
          THIS CATEGORY
  760
END <' OF LOOP

-------
                                                        CAASE5
                                                        SUBROUTINE CAASE5
                                                        P.9
LOOP ON 1st 2 CATEGORIES'1 OF INDUST. FUEL  (13-14)
 I(LOOP ENDS AT 780)
              SET SUBSCRIPT FOR
              ASH AND SULFUR CONTENT
              COEFFICIENT
            MODIFY FOR THE ASH CONTENT
            TERM FOR TSP CALCULATIONS
            FOR THIS CATEGORY
              MODIFY FOR THE SULFUR
              CONTENT TERM FOS"S02
              CALCULATIONS FOR THIS
              CATEGORY
 	_LpOP_qN_LAST
 I (LOOP ENDS AT 780)
t
t
                       ' POLLUTANTS
             COMPUTE TOTAL EMISSIONS
             FOR THIS POLLUTANT FOR
             THIS CATEGORY
780
                     ENiroFLp
               MODIFY FOR THE ASH
               CONTENT TERM FOR SP
               CALCULATIONS FOR
               CATEGORY 15 (COKE)
                      E-12

-------
                                                      CAASE5
                                                      SUBROUTINE  CAASE5
                                                      p. 10
               MODIFY FOR THE SULFUR
               CONTENT TERM FOR S02
               CALCULATIONS FOR
               CATEGORY 15
  	LOOPJDN
 I (LOOP  ENDS  AT 800)
3 >' POLLUTANTS


| 800
COMPUTE TOTAL EMISSIONS
FOR THIS POLLUTANT FOR
CATEGORY 15.
END i
' OF LOOP


1
	 I
LOOP W_LAST JTTJATEGORIES
  RLOOP ENDS  AT 820)

  	_LOOP_ON
  I(LOOP ENDS  AT 820)
  t
  '- OF  INDUST.  FUEL _(16-20)


   POLLUTANTS
                           j,

                          t
              COMPUTE  TOTAL EMISSIONS
              FOR THIS POLLUTANT FOR
              THIS CATEGORY
  JJ32£	JND <'  OF LOOP
                          4
                    	i
             MODIFY FOR THE SULFUR
             CONTENT TERM FOR S02
             CALCULATIONS FOR CATEGORY
             16.
                        E-13

-------
                                                      CAASE5
                                                      SUBROUTINE CAASE5
                                                      p. 11
                MODIFY FOR THE SULFUR
                CONTENT TERM FOR SO-
                CALCULATIONS FOR
                CATEGORY 17
      LOOP ON CATEGORY OF
             ENDS  AT 840).
        ___ LOQP_ on. 5_^
      "(LOOP ENDS  AT 840)
     ON-SITE-INCIN^ &_OPEN BURN (21-26)


      POLLUTANTS
                          ,

                         t
               COMPUTE TOTAL EMISSIONS
               FOR THIS POLLUTANT, FOR
               THIS CATEGORY.
       840
END ' '  OF LOOP
   _____ LOOP_ON_5
I"~(LOOP ENDS AT 900)
I
         LOOP ^O  ^
            ENDS AT  860)
     t
      POLLUTANTS
      27-29
              SET TOTAL EMISSION FOR
              THIS POLLUTANT, THIS
              CATEGORY TO ZERO-HANDLED
              IN SEPARATE ALGORITHM
     U360	END < MDF JLOOP	|
               SET TOTAL EMISSION FOR
               THIS POLLUTANT FOR
               CATEGORY 31 TO ZERO
                         E-14

-------
       	 LOOP ON CATEGORIES
     7LO~0~ENDS~AT~88ol
                                                       CAASE5
                                                       SUBROUTINE CAASE5
                                                       p.12
                          43-46
              SET TOTAL EMISSIONS
              FOR THIS POLLUTANT
              FOR THIS CAT. TO ZERO
|_880	END i ^_OF_LOOP_	j
|_90_0	 	   END

	LOOP ON  5
I   (LOOP ENDS AT  960)
                                                f
                                                     t
                          OFLOOP
                          POLLUTANTS
             COMPUTE TOTAL EMISSIONS
             FOR THIS POLLUTANT FOR
             CATEGORY 30 (OFF HIGHWAY
             GAS)
	LOOPJ)N_CAT. 1 32-42
I~(LOOP ENDS AT 920)
             COMPUTE TOTAL EMISSIONS
                   FOR THIS
           POLLUTANT FOR THIS CATEGORY
I  920	END ' _OF_LOOP	|
     	LpqP_ON_CATEGORY_i 47-51
     I (LOOP ENDS AT 940)
                                                t
             COMPUTE TOTAL EMISSIONS
             FOR THIS POLLUTANT,  FOR
             THIS CATEGORY
  940
                        END
                                              "I
                                                I
                       t
_OF _LOOP	j
                      E-15

-------
t
                                                           CAASE5
                                                           SUBROUTINE CAASE5
                                                           0.13
1
r
COMPUTE TOTAL EMISSIONS
FOR THIS POLLUTANT FOR
FOREST WILDFIRES (52)
*
1
r
COMPUTE TOTAL EMISSIONS
FOR THIS POLLUTANT FOR
MANAGED BURN. (53)
^
t
COMPUTE TOTAL EMISSIONS
FOR THIS POLLUTANT FOR
AGRI. FIELD BURN. (54)
             COMPUTE TOTAL EMISSIONS
             FOR THIS POLLUTANT FOR
             FROST CONTROL (55)
             COMPUTE TOTAL EMISSIONS
             FOR THIS POLLUTANT FOR
             STRUCTURE FIRES (56)
^960     _ _    _ E8D_ > r  OF_ LOOP	j
\
             COMPUTE MILES TRAVELED
             FOR LIGHT VEHICLE GAS
                      E-16

-------
                                     CAASE5
                                     SUBROUTINE CAASE5
                                     p. 14
COMPUTE MILES
TRAVELED FOR
LIGHT TRUCK GAS
i
r
COMPUTE MILES TRAV-
ELED FOR HEAVY
VEHICLE GAS
i
r
COMPUTE MILES TRAV-
ELED FOR HEAVY
VEHICLE DIESEL
i
r
SUM MILEAGE FOR
HIGHWAY MOTOR
VEHICLE SOURCES
i
t
COMPUTE RATIO FOR
LIGHT DUTY GAS CLASS
OF VEHICLES
i
t
COMPUTE RATIO FOR
, LIGHT DUTY TRUCKS
CLASS OF VEHICLES
E-17

-------
                                                         CAASE5
                                                         SUBROUTINE CAASE5
                                                         p.15
               COMPUTE RATIO FOR
               HEAVY DUTY GAS CLASS
               OF VEHICLES
              COMPUTE RATIO FOR
              HEAVY DUTY DIESEL
              OIL CLASS OF VEHICLES
              INITIALIZE MEASURED
              VEHICLE MILES  VARIABLE
              TO  ZERO
	LOOP_ON UrfJ
I (LOOP ENDS AT 980)
OF MEASURED VEH. MILES (43-46)

                      t
              SUM THE TOTALS OF THE
              CATEGORIES OF MEASURED
              VEHICLE MILES

 980
                IS  SUM EQUAL ZERO,
                I.E.,  VEHICLE MILES
                MISSING
                      YES
                       E-18

-------
                                                    CAASE5
                                                    SUBROUTINE  CAASE5
                                                    p. 16
	ON 5
F(LOOP ENDS AT 1000~

	LOOP_ON_4 CAT
f(LOOP ENDS AT 1000)'
                       POLLUTANTS

                       OF MEAS. VEH. MILES  (43-46)
           SET SUBSCRIPT FOR
           CATEGORY OF INTEREST
          COMPUTE TOTAL EMISSIONS
          FOR THIS POLLUTANT  FOR
          THIS CATEGORY
I
  1000
                END
r_OF __	|
                    E-19

-------
                    0
1020 i
r
CONTINUE
                                                         CAASE5
                                                         SUBROUTINE CAASE5
                                                         p. 17
       LOOP 11 POSSIBLE
f~( LOOP" ENDS" AT" loso"
I
                        DENSITY CODES
             IS DENSITY CODE EQUAL
             TO THIS POSSIBILITY
           IS  IT THE  1st  POSSIBILITY
           I.E., IS IT  BLANK
                        YES
            SET COUNTY DENSITY CODE
            EQUAL TO WORST CASE - 9
            (90% URBANIZATION)
             PRINT MESSAGE THAT
             COUNTY DENSITY CODE
             WAS  MISSING
        1060
           SET NUMERIC COUNTY
           DENSITY CODE VARIABLE
1080
                     END OF LOOP
        1100
t
            COMPUTE FRACTION OF
            COUNTY WHICH IS URBAN
                           E-20

-------
                                                         CAASE5
                                                         SUBROUTINE CAASE5
                                                         p.18
             COMPUTE FRACTION OF
             COUNTY WHICH IS RURAL
             COMPUTE TOTAL MILES BY
             SUMMING VEHICLE CATEGORY
             TOTALS
 	LOOP ON 5_f POLLUTANTS
 | (LOOP  ENDS  AT  1120)
             SET EMISSIONS TOTALS
             FOR THIS POLLUTANT FOR
             CATEGORY 43 TO ZERO
               SET EMISSIONS TOTALS
               FOR THIS POLLUTANT
               FOR CATEGORY 45 TO
               ZERO
           COMPUTE TOTAL EMISSIONS FOR
           THIS  POLLUTANT FOR CATEGORY
           44  BASED ON ESTIMATED RURAL
           MILES
           COMPUTE  TOTAL EMISSIONS  FOR
           THIS  POLLUTANT FOR CATEGORY
           46  BASED ON ESTIMATED URBAN
           MILES
4
   1120
END '' OF LOOP
                      E-21

-------
                      (P-19
                      ^^ ^j
                 1140
                    CONTINUE
	 LOOP_ON_5
J  (LOOP  ENDS  AT  1180)
    " POLLUTANTS
                                                t
           INITIALIZE TOTAL EMISSIONS
           VARIABLE FOR THIS POLLUTANT
           TO ZERO
    	 LOOP ON 56
    (LOOP ENDS AT 1160 ~
      CATEGORIES
                    CALCULATE
                    POLLUTION
                    TOTALS
     1160
END >' OF LOOP
   1180
                      t
Jf OF_LOOP__	_J
               PRINT PAGE HEADING
               FOR PRINTED OUTPUT
                                      CAASE5
                                      SUBROUTINE CAASE:
                                      p.19
              .LOOP ON 5 i POLLUTANTS
     (LOOP ENDSTT  1240 f
F              PRINT  TOTALS  BY SOURCE
              CATEGORIES  FOR THIS
              POLLUTANT
   I   1240
END i - OF LOOP
                      E-22

-------
                                                      CAASE5
                                                      SUBROUTINE CAASE5
                                                      p.20
               LOOP ON 5
(LOOT*END?"AT 1380)    ~~

     	,LOOP_ON_56
     | (LOOP ENDS AT 1300)"
                            POLLUTANTS
                             CATEGORIES
               STORE POLLUTANT  TOTAL
               INTO WORKING  STORAGE
               ARRAY
     _ LOOP ON NUMBER OF
     I (LOOP ENDS AT 1300)
                            AREA SOURCE  GRID  SQUARES
                            	1

                                                I
                                              1280
                 DOES APPORTIONING
                 FACTOR EQUAL ZERO
                                               SET APPORTIONED
                                               FUELS TO ZERO
     I
     I
                    CALCULATE
                    APPORTIONED
                    FUELS
                  1300 END
        LOOP  ON NUMBER OF
r"(LOOP~~ENDS Af 1340T" ~" '
OF LOOP
                         | AREA SOURCE GRID  SQUARES
                    INITIALIZE
                   EMISSION SUM
                     TO ZERO
                 _LOOP_ °!L
       (LOOP ENDS AT 1320)
                          » 56 CATEGORIES-
                 SUM POLLUTANT TOTALS
                 FOR THIS GRID SQUARE
       1320
                       END
OF LOOP
                               E-23

-------
                                                        CAASE5
                                                        SUBROUTINE CAASE5
                                                        p.21
   t
                      STORE  TOTAL
                      FOR IPP  CARDS
                               t
                            '_OFJLpOP_	l
              CALL SUBROUTINE OUTPT2
              TO FORMAT & PRINT TABLES
              OF EMISSIONS BY SOURCE
              CATEGORY FOR THIS POLLUTANT
1380
ENDir  OF LOOP
                 CALL SUBROUTINE OUTPT3
                 TO FORMAT, PRINT, AND
                 PUNCH DISPERSION MODEL
                 INPUT DATA
                          E-24

-------
 1400
                                         CAASE5
                                         SUBROUTINE  CAASE5
                                         p.22
 PRINT ERROR MESSAGE
 THAT WRONG COUNTY
 ENCOUNTERED
        0
 1440
PRINT ERROR MESSAGE
THAT END OF FILE
ENCOUNTERED ON
INPUT TAPE
                       7
        0
1480
 PRINT MESSAGE THAT
 LAST COUNTY HAS
 BEEN COMPLETED
      1520 ''
                                     0
         REWIND
         INPUT
         TAPE
;   PLACE AND END-
   OF-FILE MARK ON/
   HE OUTPUT TAPE
          E-25

-------
                                           CAASE5
                                           SUBROUTINE  CAASE5
                                           p.23
   REWIND THE
   OUTPUT TAPE
C
  RETURN TO
CALLING PROGRAM
        E-26

-------
                                                                        CAASE5
                                                                        SUBROUTINE READ1
                                      SUBROUTINE
                                         READ1
                                       SET ERROR
                                    FLAG TO ZERO
                                       READ INPUT
                                      RECORD OF
                                        FUELS
                                       TOTALS
      OF CARDS PER RECORD
                                  - _NUMBER
                       (LOOP ENDS AT 100)
     SET  ERROR
     FLAG TO  1.
 ERROR ENCOUNTERED
        SPRINT
       ERROR
      ESSAGE
   THIS
THE COUNTY
    OF
 INTERES
   RETURN TO
CALLING PROGRAM
                                       SET ERROR
                                       FLAG TO 1
                                   ERROR ENCOUNTERED
                                         PRINT
                                        ERROR
                                      MESSAGE
                                  f    RETURN TO
                                  V^CALLING PROGRAM
7000
                                                                       CONTINUE
                              CALCULATE PROPER
                              FUELS TOTALS FOR
                                MOTOR VEHICLE
                                 CATEGORIES
                                                                        RETURN TO
                                                                     CALLING PROGRAM
                                         E-27

-------
                                                                       CAASE5
                                                                       SUBROUTINE OUTPT1
                                    (SUBROUTINE^
                                      OUTPT1    J
                                    INITIALIZE
                                     TONSTANTS
                               50
                0
                                  SET VALUES  FOR
                                 STARTING,  ENDING,
                                 PAGE COUNT,  AND
                                     TABLE  NO.
                                   75
                                      PRINT
                                       PAGE
                                     HEADING
                                        I
                                                     HDG
                                                     ITABLE
                                                     IP AGE
                                 COMPUTED "GO TO"
                                   OUTPUT GRID
                                 IDENTIFIERS AND
                                   APPROPRIATE
                                    CATEGORIES
100
I
200
 PRINT GRID
 NUMBER AND
  1ST  SIX
 CATEGORIES
I
              RINT GRID
             NUMBER AND
             CATEGORIES,
                7-20
       I
                   I
300
                  RINT GRID /
                 NUMBER AND/
                 CATEGORIES/
                   21-33 /   /
400
I
500
r                             PRINT GRID
                             NUMBER AND
                             CATEGORIES
                               34-46
1
                   PRINT GRID
                   NUMBER AND
                   CATEGORIES
                     47-56
                             600
                                  INCREMENT TABLE
                                  NO.  FOR THIS SET
                                   OF GRID SQUARES
                                        HAVE
                                      5 TABLES
                                        BEEN
                                     COMPLETED
                                         7
                                              E-28

-------
         HAVE
      ALL  GRID
     SQUARES BEEN
         DONE
                                APPORTIONED
                                   FUELS
                                   TOTALS
                                          CAASE5
                                          SUBROUTINE OUTPT1
                                          p.2
WRITE APPORTIONED
  FUELS TOTALS
 FOR THIS COUNTY
c
    RETURN TO
     CALLING
     PROGRAM
          E-29

-------
                                 f SUBROUTINE
                                 I   OUTPT2
                                                                    CAASE5
                                                                    SUBROUTINE OUTPT2
                                       i
                                   INITIALIZE
                                    CONSTANTS
                               50
                                  I
                                  SET VALUES FOR
                                 STARTING, ENDING,
                                  AND PAGE COUNT,
                                   AND TABLE NO.
                                  75
                                  1
                                     PRINT
                                      PAGE
                                    HEADING
                                         7
                                             HDG
                                             ITABLE
                                             IPAGE
                                 COMPUTED "GO TO"
                                   OUTPUT GRID
                                   IDENTIFIERS
                                 AND APPROPRIATE
                                   CATEGORIES
100
1
200
?RINT GRID
NUMBER AND
  1ST SIX
CATEGORIES,
1
:              PRINT GRID
              NUMBER AND
              CATEGORIES
                 7-20
400
                    PRINT  GRID
                    NUMBER AND
                    CATEGORIES
                      21-33
                         I
i
500
                                PRINT GRID /
                                NUMBER AND /
                                CATEGORIES/
                                  34-46  /  /
1
F                  PRINT GRID
                  NUMBER AND
                  CATEGORIES,
                    47-56
                                                         I
                              600
                                 INCREMENT TABLE
                                   NO. FOR THIS
                                   SET OF GRID
                                     SQUARES
                                       HAVE
                                     5  TABLES
                                  BEEN  COMPLETED
                                                  NO
                                        E-30

-------
  WRITE  APPORTIONED
    EMISSIONS  FOR
     THIS COUNTY
                                   CAASE5
                                   SUBROUTINE OUTPT2
                                   p.2
        HAVE
      ALL GRIDS
      BEEN DONE
                         APPORTIONED
                           EMISSIONS
c
RETURN TO
 CALLING
 PROGRAM
             E-31

-------
                                                                      CAASE5
                                                                      SUBROUTINE OUTPT3
                             C
  SUBROUTINE
    OUTPT3
                                SET NUMERIC
                                 CODE FOR
                                 STATE OF
                                 INTEREST
                            COMPUTED "GO TO"
                            DEPENDING ON TYPE
                            OF  OUTPUT DESIRED
                                    "  2
|  IPP  CARD  IMAGES
CDM CARD IMAGES
AQDM CARD IMAGES
                                  E-32

-------
                        1000
                                                             CAASE5
                                                             SUBROUTINE OUTPT3
                                                             0.2
                           SET STACK
                           HEIGHT TO
                             FEET
I                          PRINT HEADING
                         TO IDENTIFY
                         'RINTED OUTPUT
              LOOP  ON NUMBER OF
        •
             (LOOP ENDS AT 100)
                     J>QUARES_ IN.
                        SET COORDINATES
                          AND AREA TO
                           INTEGERS
                            CONVERT
                         EMISSIONS FROM
                           TONS/YR TO
                            TONS/DAY
  SET FORMAT
   FOR THREE
LEADING ZEROES
        10
              HOW
             MANY
          DIGITS ARE
            IN GRID
             ID N
                           SET FORMAT
                             FOR NO
                         LEADING ZEROES
            SET FORMAT
              FOR TWO
          LEADING ZEROES
                        SET FORMAT
                          FOR ONE
                       LEADING ZERO
        t
         100
END
   OUTPUT IPP
  CARD IMAGE
 TO CARD,
PRINTER,
    TAPE      / OF
LOOP'
                                      E-33

-------
             2000
                                                      CAASE5
                                                      SUBROUTINE OUTPT3
                                                      p.3
                 SET  STACK
                 HEIGHT TO
                  METERS
                 SET FACTOR
               FOR CONVERTING
                 TONS/YR TO
                  GRAMS/SEC
     LOOP  ON
                   PRINT
                  HEADING TO
                 IDENTIFY
                PRINTED
                 OUTPUT
RLOOP "ENDS" AT Tool
t
 'NUMBER OF -GRID SQUARES IN COUNTY
              SET  COORDINATES
              AND  GRID  SQUARE
              SIDE LENGTH  TO
              INTEGER METERS
                      \
                 CONVERT  S02
                AND TSP FROM
                 TONS/YR TO
                  GRAMS/SEC
t
|_200_
                  OUTPUT CDM
                 CARD  IMAGE
                TO CARD,
               PRINTERS
              AND TAPE
END OF LOOP
                   E-34

-------
                          3000
                                                               CAASE5
                                                               SUBROUTINE  OUTPT3
                                                               p.4
                              SET STACK
                              HEIGHT TO
                                FEET
                            PRINT HEADING TO,
                                 IDENTIFY
                                PRINTED
                               OUTPUT
                                PUNCH
                              FIRST CARD
                             OF AQDM
                               DECK
                             CONVERT 1ST
                           S02 & TSP VALUES
                           FROM TONS/YR TO
                              TONS/DAY
                           PUNCH  & PRINT AND
                            OUTPUT TO TAPE
                            NAME  LIST CARD
                              FOR DECK
            _   LOOP ON^REMAINING
           llLOOP~ENDS "AT 30"0")
          t
        GRIDS FOR COUNTY
                            CONVERT S02
                            AND TSP VALUES
                            FROM TONS/YR
                            TO TONS/DAY
          t
   OUTPUT AQDM
  CARD IMAGES
 TO CARD
PRINTER
    TAPE
e>
           1 300
END  OF u
              LOOP
                          (RETURN TO   ^
                          VCALLING PROGRAM
                               E-35

-------
           C****PHUGRAM NAME:  CAASE5
           C
           C    DRIVER FUR CAASE5 TU SET  DIMENSIONS
           C    MUST  BE RECOMPILED ANYTIME  IT  IS  NECESSARY  TO CHANGE THE DIMENSIONS
           C
                 DIMENSION APPORT(b6,bl),OUTIPP(61,5),ID(61),X(6U,Y(6l),
                1AREA(61),APFUEL(56,61)
           C
           C*** NDIM IS THE NUMBER OF  GRID SQUARES  IN  A  COUNTY  — IT SHOULD
           C    BE SET DEPENDENT  ON THE COUNTY (BEING PROCESSED  DURING A
           C    COMPUTER RUN)  WITH THE  LARGEST NUMBER OF  GRID SQUARES.
           C
                 NDIM s 60
                 CALL CAASE5  (APPURT,OUTIPP,APFUEL, ID,X,Y,AREA,NDIM)
                 CALL EXIT
                 END
M
I
U>

-------
                SUBROUTINE CAASE5(APPORT,OUTIPP,APFUEL,1D,X,Y,AREA,NDIM)                 1
          C                                                                              2
          C***CAASEb USES THE APPORTIONING FACTORS DEVELOPED BY CAASE4 FOR THE           3
          C  GRID SQUARES DEVELOPED IN CAASE2 AND THE FUELS/THROUGHPUT FUR EACH          4
          C  AREA SOURCE INPUT FORM (EPA(DUR)219) FOR EACH COUNTY IN THE STUDY           b
          C  AREA,  EMISSION FACTORS FOR EACH SOURCE CATEGORY ARE READ FUR EACH OF       6
          C  THE PRIMARY POLLUTANTS (TSP,S02,NOX,HC,CU).  FUELS/THROUGHPUT ARE           7
          C  APPORTIONED TO EACH GRID SQUARE FOR EACH SOURCE CATEGORY.  APPLYING         8
          C  EMISSION FACTORS, EMISSIONS ARE CALCULATED FOR EACH SOURCE CATEGORY         9
          C  POLLUTANT AND THEN APPORTIONED TO EACH GRID SQUARE ON A COUNTY BY          10
          C  COUNTY BASIS.  TABLES ARE PRINTED AND THE USER HAS THE OPTION OF           11
          C  PRODUCING AREA SOURCE FORMATTED INPUT CARDS FOR ANY ONE OF THE THREE       12
          C  DISPERSION MODELS--AUDM, IPP, OR CDM.  EMISSION FACTORS ARE READ IN        13
          C  FOR EACH POLLUTANT/SOURCE CATEGORY COMBINATION.  EXCEPT IN THE CASE         4
          C  OF HIGHWAY MOTOR VEHICLE SOURCE EMISSION FACTORS, THE FACTORS ARE           b
          C  SCALED AND UNITS ARE CONVERTED OFF-LINE, l.E, IF THE EMISSION FACTOR        6
          C  FOR EXAMPLE, IS 20 POUNDS OF  TSP PRODUCED FOR EACH TON OF BITUMINOUS        7
          C  COAL BURNED FOR HOME HEATING  AND THE TOTAL TONS BURNED IS EXPRESSED         B
w         C  IN TENS OF TONS ON THE NEDS AREA SOURCE FORM, THEN THE FACTOR READ         19
w         C  IN IS 0.10 (10 SCALING TIMES  20 LBS PER TON BURNED DIVIDED BY 2000         20
          C  LBS PER TUN) AND THE PROGRAM  MULTIPLIES THE FUEL REPORTED ON THE FORM      21
          C  BY THE 0.10 FACTOR YIELDING EMISSIONS IN TONS.  FOR THOSE SOURCE           22
          C  CATEGORY/POLLUTANT COMBINATIONS WHERE PERCENT ASH OR SULFUK CONTENT        23
          C  IS USED, THE PROGRAM AUTOMATICALLY APPLIES THEM DURING THE UN-LINE         24
          C***CALLULATION.                                                              2b
          C                                                                             26
          C**** UATA STATEMENT FOR LABELS  FOR EACH POLLUTANT TABLE IS INCLUDED IN       27
          C     OUTPUT ROUTINE                             .                             28
          C     DIMENSIONS ASSUME ND1M IS  MAX NUMBER UF GRIDS PER CUUN1Y                29
          C                                                                             30
                DIMENS1UN TUES(ll)                                                      31
                REAL*^ RLD,KLDT»RHDG,RHDD,VLGTG,TLGTG,VHVYG,VHVYD,SUHM,TUTMI,CUNVH      32
                KEAL*tt PU,PR                                                            33
                DATA TOES/'    ','0   ','1   ','2   ','3   ','4   ','b   ','6   ',      34
               I'/   ','8   ','9   '/                                                   3b
                DIMENSION APPURT(5b,NDlM), APTOT (bb ), (JUT IPP (NDIM, b), EMF AC T (bb,b) ,AP      36
               lPUEL(bo,.'JDIM)                                                           37

-------
          C                                                                              38
          C     APFUEL ARRAY CONTAINS APPORTIONfcD FUELS tARLY IN THt PROGRAM AND         39
          C     LATtR CONTAINS APPORTIONED EMMISIONS FOR EACH OF THE FIVE PRIMARY        40
          C     POLLUTANTS IN TURN.                                                      41
          C                                                                              42
                COMMON /WH1CH/XSTATE,ICNTY,XAQCR,CNTY,NAREAS,HDR(20),IPOLIT, IREGN        4.4
                COMMON /FUELS/KSTATE,KUUNTY,AUCR,YR,SC(4),AC(2),FLTOTS(56),CTYDEN,       44
               UONSFn, rONSMB,TONSAF ,DAYSF                                               45
                COMMON /IOUNIT/IREADR,ITAPET,ITAPEN,ITAP£U,IPUNCH,1PRINT,IERR            46
                DIMENSION X(NUIM),Y(NDIM),AREA(NDIM),ID(NDIM)                            47
                COMMON /TOTPOL/POLTOT(56,5)                                              48
          C**** STRUCTURE IS VEHICLE CLASS,ROAD TYPE, POLLUTANT                          49
                DIMENSION EFHV(4,4,5),POLHDG(5)                                          50
                DIMENSION SUMKK(5)                                                       bl
                DATA POLHDG/' SP ','SO
-------
M
I
C****PRIUTER
C
      1PRINT=3
      ND1MP1=NDIM+1
C
C**** CONSTANT TO USE WITH HIGHWAY MOTOR VEHICLE ALGORITHM
C
C***10UOU MILES PEN UNIT DIVIDED bY 453.6 GRAMS/POUND AND
C                 CONVERT TO TONS
C
      CUNVEH=5.0/4.536D2
C
C**** READ IN THE EMISSION FACTOR TAULES FOR THE 5 PQLLOTANTS
C     AUU THE HIGHWAY MOTOR VEHICLE SOURCE CATEGORIES
C     ORDER IS THE SAME AS ON NEDS AREA SOURCE FORM WHERE ZEKOES ARE
C   USED AS FILLERS FOR HIGHWAY MOTOR VEHICLE CATEGORIES AND MEASURED
C   VEHICLE MILES CATEGORIES.
C
C
C****  TSP
C
      READ (1READR,100) EMFAC1
C
C***** Sue?
C
      HEAD (IREADR,100) EMFAC2
C
C***** N 0 X
C
      KLAU (IREADR,100) EMFAC3
C
C***** hC
C
      KLAD UHEADR,100) EMFAC4
C
c***** to
C
 75
 76
 77
 78
 79
 80
 81
 82
 83
 8<4
 85
 8b
 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

-------
M

-P-
O
          c
          c
          c
          c
          c
          c
          c
          c
           c
           c
           c
           c
    READ  (IREADR,100) EMFAC5

  THE FOLLOWING ARRAY CONTAINS EMISSION FACTORS  IN  GRAMS  PER  VEHICLE
  MILE TRAVELLED  (VMT) BASED ON VEHICLE CLASS  AND ROAD  CLASS.   THESE
   ARE READ FROM  CARDS IN THE FOLLOWING ORDER  U,J,K)
                            I = 1,4    (VEHICLE  CLASS),
                            J = 1,4    (ROAD  TYPE),
                            K = 1,5    (POLLUTANT)

    READ  (1READR,100) EFHV
 100 FORMAT  (8F10.0)

r*** IrtAlMf « SUBROUTINE OUTPT3 OUTPUT CHOICE
             1 -- IPP INPUT CARDS OR
             2 « CDM INPUT CARDS OR
             3 -- AQDM INPUT CARDS

    READ  (IREADR,120) IKANT
 120 I-ORMAT  (15)

    READ  IM STATE AND COUNTY OF INTEREST  ,  NUMERIC  STUDY  AREA,  TOTAL
   NUMBER OF GRID SUUARES,  IN THE COUNTY, POLITICAL SUBDIVISION (TO
   INCLUDE  UN  IPP CARDS)  AND ALPHANUMERIC REGION NUMBER.
C
C
C
C
C
C
C***** SEE USERS MANUAL FOR DEFINITION OF THESE VARIABLES
C
  1UO READ (IREADR,160) XSTATE,ICNTY,XAQCR,NARtAS*CNTY,KOUNTY,KSTATE,IPO
     1L1T,IREGN
  160 f-URMAT (F10.0, 110, HO. 0,110, 6X , A4,215,9X,A 1,7X,A3)
      IP  (hiAREAS.EQ.O) GO TO 1480
C
C**** READ lij HEADER f-OR OUTPUT  TABLES
C
      HEAD (IREADR,180) HDR
  180 f-URMAI
      ItRR=0
112
113
114
115
116
117
118
119
120
121
122
123
124
12b
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148

-------
          C                                                                            149
          C**** RIAL) IN COUNTY TOTALS FOK EACH CATEGORY                                150
          C                                                                            151
                CALL READ1                                                             152
                IF UERR.EU.O) GO TO 200                                               153
          C                                                                            154
          C**** HAU A PROBLEM IN READ1, GET OFF WITH DIAGNOSTIC MESSAGE                155
          C                                                                            156
                GO TO 1400                                                             157
            200 CONTINUE                                                               158
                WRITE (3,220) HDR                                                      159
            220 FORMAT ('!'////,20A4)                                                  160
          C                                                                            161
          C    DISPLAY FUELS INPUT DATA FROM SUBROUTINE READ1                          162
          C                                                                            163
                MITE (3,240) (FLTOTS(I),I=1,56)                                       164
            240 FUKMAT COFUEL TOTALS READ IN FOLLOrt - (NOTE THAT READ1 ROUTINE CA     165
               1LCULATED THE LGT TRUCKS CATEGORY (NO.28)  BY APPORTIONING'/' FROM L     166
               1GT DUTY GAS (NO. 27) AND HVY DUTY GAS TRUCKS (NO.29))'//(1 OF 12.1))     167
w              1                                                                        168
*-               WRITE (IPRINT,1260)                                                    169
M               WRITE (IPRINT,220) HDR                                                 170
                WHITE (IPRINT,260)                                                     171
            260 FORMAT CO',17X, 'COUNTY-WIDE AREA SOURCE  DATA USED IN CALCULATING      172
               1LM1S31UNS BY SOURCE CATEGORY FOR APPURT 10NINGV///35X ,'bULF UR CUNT     173
               1ENT:'//)                                                               174
                WRITE (IPRINT,280) SC                                                  175
            280 FORMAT (45X,'ANTHRAC1TE COAL',1 OX, ' = ',F10.U ' PERCENT'/45X,'BITUMI     176
               1NUUS COAL',10X,'=',F10.1,' PERCENT'/45X,'DISTILLATE OIL',11X, ' = ' ,F     1/7
               110.1,' PERCENT/45X, 'RESIDUAL OIL',13X,' = ',F10.1,' PERCENT'////)       178
                WRITE (1PRINT/300) AC                                                  179
            300 FOKMAT (36X,'ASH CONTENT:'//45X,'ANTHRAC1TE COAL ' ,1 OX, '=',F10,1, '      180
               1PERLENTV45X,'HITUMINOUS CUAL ' / 1 OX , ' = ' , F 1 0 . I, ' PERCENT'///)            181
                NKITE (1 PRINT,320)                                                     182
            320 FOKMAf (31X *******************************************************     183
               I*******'//)                                                            164
                WRITE (!PRliMT,340) TONSFw,TONSMb,TONSAF,DAYSF                          185

-------
           340 FORMAT (36X,'FOREST WILDFIKES',\3X,'=',F9.1,'  TONS  PER  ACRE'//,36X      186
              1,'MANAGED BURNING',14X,'=',F9.1,' TONS PER  ACRE '//, 36X, ' AGRI GUL.  F      187
              HELD BURNING',7X,'=',F9.1,' TONS PER  ACRE'//,36X 'FROST  CONTROL',16      188
              1X,'=',F9.1,' DAYS PER YEAR'///)                                         189
               WRITE (IPRINT,320)                                                      190
               WRITE (1PRINT,360) CTYDEN                                               191
           360 FORMAT (blX,'POPULATION CODE =  ',A1)                                   192
         C                                                                             193
         C     READ IN WEIGHTED APPORTIONING FACTORS  OUTPUT  FROM CAASE4                194
         C     ON FORMATTED TAPE.                                                      19b
         C                                                                             197
         C    COUNTIES SHOULD BE IN ORDER BUT ALL  DO  NOT  NECESSARILY  HAVE  TO BE        198
         C    PROCESSED DURING A GIVEN RUN,    FIND  THIS  COUNTY                        199
         C                                                                             200
           400 READ (ITAPEN,420, END=1440) STATE,JCNTY                                 201
           420 FURMAl (11 X,F3 .0,20X,1b)                                                202
               II- (STATE.NE.XSTATE.OR.ICNTY.NE.JCNTY) GO  TO  400                        203
         C                                                                             204
w        C   FOUND COUNTY  WANTED                                                       20b
^        C                                                                             206
110              bACKSPACE ITAPEN                                                        207
         C                                                                             208
         C    READ IN DATA FOR ALL GRID SQUARES THIS  COUNTY                            209
         C                                                                             210
               00 480 I=1,ND1MP1                                                       211
               READ (ITAPEh,440, END = 460) ID(1),STATE,JCNTY,X(I),Y(1),ARE A(I),(AP      212
              1PURT(J,1),J=1,56)                                                       213
           440 FORl-iAT (lb,6X,F3.0,20X, Ib, 23X , 2P 1 0 . 0 , 10X, F UO .2, bbE 1 3. S )                 214
               IF (STATE.EH.XSTATE.AND.JCNTY.EQ.ICNTY) GO TO  480                       215
         C                                                                             216
         c     ENCOUNTERED NEXT COUNTY                                                 217
         C                                                                             218
               bACrvSPACE ITAPEN                                                        219
         C                                                                             220
         C   TOTAL GRID SQUARES                                                        221
         C                                                                             222
           460 NAREAS=1-1                                                              223

-------
      GO TU 520                                                              224
  480 CONTINUE                                                               225
C                                                                            226
C     IF FELL THROUGH LUUP THtN DIMENSIONS WERE NOT ADEQUATE                 227
C                                                                            228
      KKITE (IPRINT,500) NDIM,STATE,JCNTY                                    229
  500 FORMAT ClNDIM WAS SET TO',15,5X,'BUT MORE GRID SUUAKLS FOR STATE      230
     1AND COUNTY=',F10.0,110,5X,'bERE ENCOUNTERED'/'OINCREASE ND1M AND R     231
     1ESUBMIT JOB')                                                          232
      EwDFlLE ITAPEO                                                         233
      GO TO 1520                                                             234
  520 CONTINUE                                                               235
C                                                                            23o
C     DEVELOP THE APPORTIONING FACTOR SUMS FOR EACH EMISSION CATEGORY        237
C   THESE SUMS ARE USED AS THE DENOMINATORS FOR RATIOS TO APPORTION          238
C    FUELS AND EMISSIONS INTO EACH GRID SQUARE/SOURCE CATEGORY COMB.         239
C                                                                            240
      DO 560 J=l/56                                                          241
      APTOHJ) = 0.                                                            242
      DO 540 I=1,NAREAS                                                      243
      APTOT(j;> = APTOT(J)+APPORT(J,I)                                          244
  540 CONTINUE                                                               245
  560 CONTINUE                                                               246
C                                                                            247
C     APPORTION THE FUELS AND OUTPUT  TO TABLES                               248
C     CALCULATE RATIO OF TOTAL FOR COUNTY IN EACH GRID SUUARE                249
C                                                                            250
      DO 000 J=l,56                              .                            251
      DO 600 I = l»NAREAii                                                      252
      IF (APTOT(J).EU.O.) GO TO 580                                          253
      APFUELU, I)=APPORT(J,I)/APTUT (J ) *FL TOT S (J )                             254
      bU TO 600                                                              255
  580 APFUEL(J,I)=0.                                                         256
  600 CONTINUE                                                               257
C                                                                            258
C     OUTPT1 ROUTINE FORMATS OUTPUT                                          259
C                                                                            260

-------
               CALL  OUTPT1(APFUEL,ID,X,Y,AREA,NDIM)                                    261
           620  FORMAT  ('!')                                                            262
           640  FORMAT  (10F10.2)                                                        263
           660  FORMAT  CO')                                                            264
         C                                                                             265
         C      NOW COMPUTE  TOTAL  EMISSIONS  FOR  THE  COUNTY  FOR EACH POLLUTANT,  FOR     266
         C      EACH  CA1EGURY,  KILL  APPORTION  LATER  (STORE  IN POLFOT  ARRAY)             267
         C                                                                             268
         C                                                                             269
         C****  RESIDENTIAL  FUEL                                                        270
         C                                                                             271
               DO 680  K=l,5                                                            272
               UO 680  J=l,6                                                            273
               POLroT(J,K)=EMFACT(J,K)*FLTOTS(J)                                       274
           680  CONTINUE                                                                275
         C                                                                             276
         C      HAL) ADDITIONAL  COEFFICIENTS  FOR  SOME  COMBINATIONS (SULPHUR CONTENT     277
PI        C      FOR CALCULATION OF  S02)                                                 278
*>        C                                                                             279
*"        C      RESIDENTIAL  FUEL                                                        280
         C                                                                             281
               UO 700  J=l»4                                                            282
               POLTOT(J,2)=POLTOT(J,2)*SC(J)                                           283
           700  CONTINUE                                                                284
         C                                                                             285
         C****  COMMERCIAL AND  INSTITUTIONAL FUEL                                       286
         C                                                                             287
               DO  Jao  K=l»5                                .                            288
               UO  720  J=7,12                                                           289
               POLTOf(J,K)=EMFACT(J,K)*FLTOTS(J)                                       290
           720  CUNTINUE                                                                291
         C                                                                             292
         C****  TAKE  CARE OF  ASH  COMEKF  AND SULFUR  CONTENT CASES                      293
         C                                                                             294
         C      ASH FOR COMMERCIAL  AND  INSTITUTIONAL  (CM)  COAL                        295
         C                                                                             296
         C    SULFUR  FOR  C&I  FUELS                                                      297

-------
         C               .                                                             298
               OU 740 J = 7,8                                                           £99
               K=J-b                                                                  300
               PULTUT(J,1)=POLTOT(J,U*AC(K)                                          301
               PULTur(J,2)=PGLTOT(J,2)*SC(K)                                          302
           740 CONTINUE                                                               303
               DU 760 J=9,10                                                          30/4
               K=J-6                                                                  30b
               POLTUT(J,2)=PULTOT(J,2)*SC(K)                                          306
           760 CONTINUE                                                               307
         C                                                                            308
         C**** INDUSTRIAL FUEL                                                        309
         C                                                                            310
         C     INCLUDE ASH & SULFUR KHERE REQUIRED                                    311
         C                                                                            312
               DU 760 J=13,14                                                         313
               L=J-12                                                                 31M
               PULfUT(J/l)=EMFACT(J,l)*FLTOTS(J)*AC(L)                                31b
^              PULTUT(J»2)=EMPACT(J,2J*FLTU7S(J)*SC(L)                                316
^              DU 780 K=3,5                                                           317
               PULruT(J,K)=EMFACT(J,K)*FLTOTS(J)                                      318
           780 tUNTINUE                                                               319
         C                                                                            320
         C**** FACTOR FUR COhE                                                        321
         C                                                                            322
               PULlUT(lb,l)=EMFACT(15,l)*FLT(JTS(lS)*AC(2)                             323
               PUL!OT(l5,2)=EMFACT(lb,2)*FLTOTS(15)*SC(2)                             32U
               DU 800 K=3rb                               .                            325
               PULTOT(l5,K)=tMFACT(l5,K)*FLTOTS(15)                                   326
           800 CONTINUE                                                               327
               DU 620 J=16,20                                                         328
               DU 820 Kslib                                                           329
               PULFUf(J,K)=EMFACT(J,K)*FLTUTS(J)                                      330
           620 CONTINUE                                                               331
         C                                                                            332
         C***** NEED TU ACCOUNT FOR SULFUR CUNFENT    '                                333
               PULTur(l6,2)=PULTOT(l6,2)*SC(3)

-------
      POLTOT(17,2)=POLTOT(17,2)*SC(4)                                         335
C                                                                             336
C**** ON-S1TE INCINERATION AND OPEN BURNING                                   337
C                                                                             338
      DO 840 J=21,26                                                          339
      DO 840 K=l,5                                                            340
      POLTOT(J,K)=EMFACT(J,K)*FLTUTS(J)                                       341
  840 CONTINUE                                                                342
C***** THE FOLLOWING HAVE ZERO (OR UNDEFINED) EMISSION FACTORS                343
C                                                                             344
C     THE FOLLOWING CATEGORIES ARE HANDLED IN A SEPARATE ALGORITHM
C  COMBINING FUEL SALES, MILES PER GALLON, TYPE VEHICLE, A,>lD ROAD CLASS.      346
C     SET VALUE TO ZERO HERE                                                  347
      DO 900 K=l,5                                                            348
      UU 860 J=27,29                                                          349
      HOLTOTU, K)=0.                                                          350
  860 CONTINUE                                                                351
      POLTOT(31,K)=0.                                                         352
      DO 880 J = 43,46                                                          353
      POLTOT(J,K) = 0.                                                          354
  880 CONTINUE                                                                355
  900 CONTINUE                                                                356
      DO 960 K=l,5                                                            357
C                                                                             358
C     OFF HIGHWAY GAS                                                         359
C                                                                             360
      POLTOT(.30,K)=EMFACT(30,K)*FLTOTS(30)                                    361
C                                                .                             362
C     DIESEL OFF-HIGHWAY (32), DIESEL RAIL (33), AIRCRAFT  (34,35,36),         364
C     VESSELS (37,38,39,40), EVAPORATION (41,42)                              366
C                                                                             367
      DO 920 J=32,42                                                          368
      POL TOT(J,K)=EMFACT(J,K)*FLTOTS(J)                                       369
  920 CONTINUE                                                                370
C                                                                             371
C      FUGITIVE DUST CATEGORIES                                               372
C                                                                             373

-------
                OU 940 J=47,bl                                                          374
                POLTOT(J,K)=FLTOTS(J)*EMFACT(J,K)                                       375
            940 CONTINUE                                                               376
          C                                                                             377
          C**** FOREST WILDFIRES                                                       378
          C                                                                             379
          C      REQUIRES TONS/ACRE  CALCULATION                                         380
          C                                                                             381
                POLTOT(b2,K)=FLTOTS(52)*TQNSFW*EMFACT(52,K)                             382
          C                                                                             383
          C**** MANAGL-D BURNING                                                        38/4
          C                                                                             385
                POLTOT(53,K)=FLTOTS(53)*TONSMB*EMFACT(b3,K)                             386
          c                                                                             387
          C**** AGRICULTURAL  FIELD  BURNING                                             388
          C                                                                             389
                POLrUT(54,K)=FLTOTS(54)*TONSAMEMFACT(54,K)                             390
          C                                                                             391
^         C**** f-ROST  CONTROL                                                          392
-j         C                                                                             393
                PULTQT(b5,K)=FLTOTS(55)*DAYSF*EMFACT(55,K)                              394
          C                                                                             395
          C**** STRUCTURED  FIRES                                                       396
          C                                                                             397
                POLTOT(56,K)=FLTOTS(b6)*EMFACT(56,K)                                    398
            960 CONTINUE                                                               399
          C                                                                             400
          C**** NOW DEAL WITH HIGHWAY  MOTOR  VEHICLE  SOURCES.                            401
          C      THESE  CALCULATIONS  FOLLOW  THE  EPA/NAUh METHOD,  I.E.,  FULL  SALES        «02
          C     AND VEHICLE  CLASS MPG  ARE USED  TO DEVELOP  TOTAL  VEHICLE  MILES            403
          C    TRAVELLED BY  VEHICLE  CLASS.   THE MEASURED VEHICLE  MILES KEPUHTEU ON
          C    THE  NEDS AREA SOURCE  FORM  ARE  ONLY USED  TO  DETERMINE  KAT1US  bY  ROAD
          C    CLASS FOK THE VMT CALCULATED USING SALES K  MPG,                           40b
          C                                                                             <407
          C      CONSTANT USED IN CALCULATIONS                                           408
          C          10000/C453.b*2000)   '*HERE  10000  CONVERTS  INPUT  DATA TO MILES        409
          C                                    453.b  CONVERTS  GRAMS  TO POUNDS            410

-------
C                                   2000  CONVERTS POUNDS TU TONS            all
C  CUNVEH = .011023 WAS SET AT START                                         412
C**** ObTAIN RATIO FOR EACH VEHICLE CLASS.                                   413
C**** LGT VEH GAS — 13.5 MPG                                                414
C                                                                            415
C     FULLS REPORTED IN THOUSANDS OF GALLONS                                 416
C                                                                            417
c                                                                            418
      VLGTG=FLTOTS(27)M.35D4                                                419
C                                                                            420
C**** LGT TRUCK GAS -- 11.8 MPG                                              421
C                                                                            422
      TLGTG=FLTOTS(28)*1.18D4                                                423
C                                                                            4^4
C**** HVY VEH GAS -- 7,3 MPG                                                 42b
c                                                                            426
      VHVYG=FLTOTS(29)*7.3D3                                                 427
C                                                                            426
C**** HVY VEH DIESEL — 5.2 MPG                                              429
c                                                                            430
      VHVYD=FLTOTS(31)*5.2D3                                                 431
C**** NEED RATIO OF EACH   RLU = LGT DUTY GAS,  RLDT = LGT DUTY TRUCKS,       432
C                  RHDG = HVY DUTY GAS,  RHDD =  HVY DUTY DIESEL               433
      SUMM=VLGTG+TLGTGfVHVYG+VHVYD                                           434
      KLD=VLGTG/SUMM                                                         435
      KLDT=TLGTG/SUMM                                                        q36
      HHDG=VHVYG/SUMM                                                        437
      KHUD=VHVYD/SUMM                            .                            4i8
C                                                                            439
c**** IF MEASURED VEHICLE MILES ARE AVAILABLE  USE THEM...IF NOT USE         440
C     DENSITY CODE TO ESTIMATE.                                              441
C                                                                            14142
C**** TOTAL MILES = SUM OF MEASURED VEHICLE MILES                            443
C                                                                            444
      TUTMI=0.                                                               44b
      DU 980 1=43,46                                                         446
      TUTMI=TOTMltFLTUTS(I)                                                  447

-------
  980 CONTINUE                                                               448
                                                                             449
                                                                             450
                                                                             451
                                                                             452
                                                                             453
                                                   MEASURED VEHICLE
C
C
C

C
C****
C
C
C


IF TOTAL IS ZERO THEN USE ALTERNATE METHOD.

U (TOTMI.EQ.O.) GO TO 1020

CALCULATE EMISSIONS FOR EACH POLLUTANT,
MILES CLASS
POLLUTANT LOOP

DO 1000 K=l,5
DO 1000 J=l,4



EACH





                                                                             455
                                                                             456
                                                                             457
                                                                             458
C                                                                            459
C     SUBSCRIPTS FUR MEASURED VEHICLE MILES ARE 43,44,45,46                  460
C     EMISSION FACTORS ARE IN THE ARRAY EFHV WHERE SUBSCRIPTS ARE--          461
C               VEHICLE CLASS,  ROAD IYPE,   POLLUTANT                       462
C                                                                            463
      JJ=J+42                                                                464
      POLTOT(JJ,K)=CONVEH*FLTOTS(JJ)*(RLD*EFHV(1,J,K)+RLDT*EFHV(2,J,K)fR     465
     lHDG*EPHV(3,J,K)fRHDD*EFHV(4,J,K))                                      466
 1000 CONTINUE                                                               467
      GO TO 1140                                                             468
 1020 CONTINUE                                                               469
C    ALTERNATE METHOD — MEASURED VEHICLE MILES ARE MISSING                  470
C    ESTIMATE WILL BE FOR RURAL AND URBAN ONLY BASED ON CUUNIY DENSITY       471
C  (URBANIZATION ) CODE.  IT TOO MAY BE MISSING, IF SO USE WORST CASE        472
C    THAT CAN BE REPORTED, 1,1., 9 INDICATING 90 PERCENT URBAN IZATION.       473
C                                                -                            474
C                                                                            475
C                                                                            476
C     BECAUSE OF AMBIGUITY Of HLANK AND ZERO READ rilTH NUMERIC FORMAT IN     477
C    FORTRAN, CTYDEN WAS READ AS ALPHANUMERIC -- DETERMINE BLANK, ZERO       478
C    THROUGH NINE.                                                           479
C                                                                            480
      DO 1060 ITOE=1,11                                                      481
      IF (CTYDEN.NE.TOES(ITOE)) GO TO 1080                                   482
      If- (ITOE.NE.l) GO TO 1060                                              483

-------
               CTYDEN=9.                                                               484
               WHITE (IPRINT/1040)                                                     485
          1040 FORMAT Cl MISSING COUNTY DENSITY CODE, USED 9')                        486
               GO TO 1100                                                              487
          1060 CTYDEN=ITOE-2                                                           488
               GO TO 1100                                                              489
          1080 CONTINUE                                                                490
          1100 CONTINUE                                                                491
         C                                                                             492
         C   PU IS FRACTION URBAN,  PR IS FRACTION RURAL                               493
         C                                                                             494
               PU=CTYDEN/1.0D1                                                         495
               PR=1.0-PU                                                               496
         C                                                                             497
         C      453.6 * 2000 = 907200   CONVERTS GRAMS TO TONS                         498
         c      USE MILES FROM MPG CALCOLATIONS                                        499
         c                                                                             500
               TOTMI=VLGTG+TLGTG+VHVYG+VHVYD                                           501
"              DO 1120 K=l,5                                                           502
g              PULTOT(43,K)=0.                                                         503
               POLTOT(45,K)=0.                                                         504
               PULTOT(44,K) = TOTMI*PR*(EFHV(l,2,K)*RLD + LFHV(2,2,K)*RLimtFHV(3,2,K      505
              U*RHDGfEFHV(4,2,K)*RHDD)/9.072D5                                        506
               POLTOT(46,5)=TOTM1*PU*(EFHV(1,4,K)*RLIUEFHV(2,4,*)*KLDT+EFHV(3,4,K      507
              1)*RHDG+EFHV(4,4,K)*RHDD)/9.072D5                                        508
          1120 CONTINUE                                                                509
          1140 CONTINUE                                                                510
         C                                                .                             511
         C*** OUTPUT THE COUNTY EMISSION TOTALS FOR EACH SOURCE CATF.GUKY  AND
         C   POLLUTANT                                                                 513
         C                                                                             514
               DO 1180 K=l,5                                                           515
               SUMKK(KJ=0,0                                                            516
               DO 1160 J=l,56                                                          517
               SUMKK(KJ=SUMRK(K)+POLTOT(J,K)                                           518
          1160 CONTINUE                                                                519
          1180 CONTINUE                                                                520

-------
               WRITE (IPRINT,620)                                                     521
               WRITE (IPRINT,180) HDR                                                 522
               DO 1240 K = l,5                                                          523
               WHITE (IPRINT,1200) POLHDG(K),(POLTOT(J,K),J=1,56)                      524
          1200 FORMAT ('OTOTALS BY SOURCE CATEGORY FOR POLLUTANT ',A4,' (TONS/YR)     525
              1 '/(10F10.3))                                                          526
               WRITE (IPRINT/1220) POLHDG(K),SUMKK(K)                                  527
          1220 FORMAT ('OFOR POLLUTANT ',A4,'  TOTAL EMISSIONS=',F15.3)                 528
          1240 CONTINUE                                                               529
               WRITE (IPRINT,1260)                                                    530
          1260 FORMAT (///' FOOTNOTE: CATEGORIES BY ROw  JN  SAME ORDER AS AREA SOU     531
              1RCE NEDS FORM AND OUTPUT TABLES')                                      532
         C                                                                            533
         C****  NOW APPORTION THE EMISSIONS TO EACH GRID SQUARE IN THE  COUNTY         534
         C    ACCORDING TO APPORTIONING FACTORS CALCULATED  BY  CAASE4                   535
         C                                                                            536
         C                                                                            537
         C     5 POLLUTANTS BY 56 CATEGORIES  X NUMBER  OF GRID  SQUARES THIS COUNTY     538
         C                                                                            539
               DO 13bO K=l,5                                                          540
i               DO 1300 J=l,56                                                         541
M              PTUTAL=POLTOT(J,K)                                                     542
               DO 1300 I=1»NAREAS                                                     543
               IF (APTOT(J).EQ.O.) GO TO 1280                                          544
         C                                                                            545
         C     FRACTION BY CATEGORY AND POLLUTANT PER  GRID  SQUARE  CALCULATION         546
         C                                                                            547
               APFUEL(J,1)=PTOTAL*APPORT(J,I)/APTOT(J)    .                            548
               GO TO 1300                                                             549
          1280 APPUEL(J,1)=0.                                                         550
          1300 CUNJINUE                                                               551
         C                                                                            552
         C****  NEED TO SAVE FOR IPP, OR COM,  OR AQDM                                  553
         C                                                                            554
               DO 1340 I=1,NAREAS                                                     555
         C                                                                            556
         C    SUM ALL CATEGORIES FUR EACH GRID SQUARE  FUR  EACH  POLLUTANT FOR          557

-------
C    DISPERSION MODEL AREA SOURCE FORMAT                                     558
C                                                                            559
      SUM=0.                                                                 560
      DO 1320 J=l,56                                                         561
      SUM=SUM+APFUEL(J,1)                                                    563
 1320 CONTINUE                                                               563
      OUTIPP(I,K)=SUM                                                        564
 1340 CONTINUE                                                               565
      CONTINUE                                                               566
C                                                                            567
C     NOW OUTPUT APPORTIONED EMISSIONS, LABEL ACCORDING TO POLLUTANT         568
C                                                                            569
C     ROUflNE OUTPT2 FORMATS AND PRINTS TABLES OF EMISSIONS hY SOURCE        570
C   CATEGORY AND GRID SQUARE.   CALLED ONCE FOR EACH POLLUTANT               571
C                                                                            572
      CALL OUTPT2U, APFUEL,ID,X,Y,AREA,NDIM)                                 573
 1380 CONTINUE                                                               574
C                                                                            575
C**** NOW OUTPUT IPP, OR CDM, OR AQDM CARD IMAGES                            576
C                                                                            577
C                                                                            578
C     ROUTINE OUTPT3 FORMATS, PRINTS, AND PUNCHES DISPERSION MODEL           579
C     AREA SOURCE INPUT DATA.                                                580
C                                                                            581
      CALL UUTPT3(OUT1PP, 1D,X, Y, AREA,NDIM,IWAMT)                             582
C                                                                            583
C**** DO WE HAVE ANOTHER COUNTY                                              584
C                                                -                            585
      GO TO 140                                                              586
 1400 «HITE (IPRINT,1420) ICNTY,JCNTY                                        587
 1420 FORMAT C1TROUBLE WITH COUNTY, WANTED ',15,'  BUT GOT',I5/'OGET OF     588
     IF')                                                                    589
      GO TO 1520                                                             590
 1440 CGNIINUE                                                               591
      WRITE (IPRINT,1460) XSTATE,1CNTY                                       592
 1460 FORMAT ('OJUST HIT tNU OF FILE ON CAASE4 OUTPUT  TAPE WHILE  TRYING      593
     110 PROCESS FIPS STATE AND COUNTY NUMBER',F10 . 0,I 1 0 )                    594

-------
              GO TO 1520                                                              595
         1480 WHITE (IPRINT,1500)                                                     596
         1500 FORMAT  C1NO MOKE COUNTIES')                                            597
         1520 CONTINUE                                                                598
              REWIND  ITAPEN                                                           599
              ENDFILE ITAPEO                                                          600
              KEwlND  ITAPEO                                                           601
              KEFUKN                                                                  60«?
              END                                                                     603
Ui
CO

-------
               SUbKUUTINE REAU1
         C
         C***** ROUflNE READS FUEL TOTALS FROM JOB INPUT STREAM CARDS  IN  NEDS
         C    AREA SOURCE FORMAT FOP COUNTY, STATE, STUDY AREA  (AQCR,  AQMA,  ETC)
         C       OF INTEREST.
         C
         C****CARDS Al THROUGH Ab ONLY ARE TO BE INPUT
         C     RETURNS IERR =0 FOR SUCCESSFUL READ
         C             IERR=1 FOR PROBLEMS.
         C
               COMMON/WHICH/XSTATE,ICNTY,XAOCR,CNTY,NAREAS,HDR(20),IPOLIT,IREGN
               COMMON /FUELS/KSTATE,KOUNTY,AQCR,YR,SC(<4),AC(2),FLTOTS(
-------
I
Ul
                1  TO  7000
           C
           c****
           C
           c
     DID NUT OBTAIN DATA
     SET ERROR CONDITION,
FOR CORRECT COUNTY, CARDS
 PRINT DIAGNOSTIC MESSAGE,
             OUT OF URULR,
              AND RETURN
     1ERR=1
     WRITE(I PR I NT,5010) STATE,XSTATE,KOUNTY,LCNTY,AQCR, XAQCR
5010 FURMATC1PROBLEM IN READ1, STATE =',2F4.0/' COUNTY =',2;
    1=',2F5.0)
     RETURN
                                                                               AOCR
           C
           C
           C
    ERROR Ii\l SEQUENCE ORDER OF FUELS TOTALS CARDS, PRINT MESSAGE, QUIT
 200 ERR = 1
     v.RITE (IPRINT,5000)
5000 FORMAT('1PROBLEM IN
    t IS ',212)
     RETURN
7000 CONTINUE
     FLTUTS(28)
     FLTOTSC27)
     FLTUTS(29)
     RETURN
     t.NU
                                     (ICARD(I),1=1,5)
                                     READ1,  FUELS CARDS
                   OUT OF SEQUENCEV50X, 'ORDER
                              FLTOTSC27)
                              FLTOTS(27)
                              FLTOTS(29)
      .122
      .878
      .727
FLTOTS(29) * .273

-------
               SUBROUTINE nuTPTl (APPUEL,ID,X,Y,AREA,NUJM)
         C
         C     CAASE5 OUTPUT SUBROUTINE UUTPT1- OUTPUTS APPORTIONED FUEL  TOTALS
         C     FROM APPORTIONING OF COUNTY TOTALS TO SUB-COUNTY GRID  SQUARES
         C
         C**** PLACE 45 GRID SQUARES ON EACH PAGE FOR EACH OF THE 5 TABLES
         L     THE FIVE TABLES ARE REQUIRED TO ACCOMMODATE THE COLUMNS NECESSARY
         C     FUR ALL SOURCE CATEGORIES ASSOCIATED WITH EACH GRID SQUARE
         C
               COMMON/WHICH/XSTATE,1CNTY,XAQCR,CNTY,NAREAS,        HDR(20)
              1,IPULIT,IREGN
               COMMON /FUELS/KSTATE,KOUNTY,AQCR,YR,SC(4),AC(2),FLTOTS(56),CTYDEN,
              1TUiMSFrt,TONSMB,TUNSAF,DAYSF
               CUMMUN/IUUNIT/IREADR,1TAPET,ITAP£N,ITAPEO,IPUNCH,IPRIN1, IERR
               DIMENSION APFUEL(56,NDIM)
               DIMENSION X(NDIM),Y(NDIM),AREA(NDIM),ID(NDIM)
               IPAGE = 0
               1TABLE=1
7        C
£        C     IPUT IS FLAG FOR HEADER RECORD ON OUTPUT TO INDICATE THAT
         C     APPORTIONED FUELS FOLLOW.
         C
               IPUT = 1
               IEND=0
         C
         C     IS1ART TO IEND BRINGS THE ARRAY OUT IN SETS OF 4b GRID SQUARES
         C     EACH
         C
            50 ISTART = IEND-H
               IEHU=ISTART-»-44
         C
         C     MAY NUT BE 45 REMAINING—CHECK IT
         C
               1ENU= MINO(IEND,NAREAS)
               IPAbE=IPAGF+l
            75 wKUfc(IPRIUT,bOOO) HDR,1 TABLE,IPAGE
          5000 f-URMAT('l',^OA4,^X,'APPORTIONED FUELS, TABLE  ',12,', PAGE  ',

-------
         c
         C     TAbLfc HEADINGS AND FORMATS DEPENDENT UN WHICH SOURCE CATEGORIES
         C       FOR THIS TABLE
         C
               GO TO (100,200,300,400,500), ITAHLE
           100 CONTINUE
         C
         C**** UUTPUF GRID SQUARE IDENTIFIERS AND FIRST 6 SOURCE CATEGORIES
         C
               URITE (IPRINT,5100)
               DO 125 I=ISTART,IEND
               KRITE (IPRINT,5110)  ID(I), IREGN, IPULIT, CNTY, X(I),Y(I),ARE A(I)
              If UPFUEUJ,I),J=lfb)
          5110 FURMATU1X,
              1   Io,ax,A3»bX,Al,5X,Aa,F9.1fF8.1,F«».2,F7.1fF9.U2F10.1»Fll.l,
              2  Hti.l)
           125 CONTINUE
w              GO TO 600
u          200 CONTINUE
         c
         C***** OUTPUT GRID SOUARE NUMBERS AND SOURCE CATEGORIES 7 THROUGH 20
         C
               WR1TE(IPRINT,5200)
               DO 225 I=ISTART,IEND
               i*KHEUPRINT,5210)  ID(I), CNTY, (APF UEL (J, I) , J = 7, 20 )
          5210 FURMAT(lfa,4X,A4,f-8.1,F7.1,F9.1,F10.1,F9.1,Ffl.l,F7.1,F7.1,
              1 F7.1,F10.1,F11.1,F9.1,2F7.1)
           225 CONTINUE
               1.0 10 600
           300 CONTINUE
         C
         C***** UUTPUf GRID SQUARE NUMBERS AND SOURCfc CATEGORIES 21 THROUGH  33
         C
                UO 325 I=ISTART/IEND
               NRIIE(IPR1NT,5310) 10(1), CNTY,  (APFUEL(J,I),J=21,33)

-------
            325 CONTINUE
                GO TO 600
            400 CONTINUE
          C
          C***** OUTPUT GRID SQUARE NUMBERS AND SOURCE CATEGORIES  34  THROUGH  46
          C
                WRITE (IPRINT,5400)
                DO 425 I=ISTART,IEND
                tvRITE UPRINT,5410) ID(I), CNTY,  ( APFUEL ( J, I ) , J = 34, 46)
            425 CONTINUE
                GO 10 600
            500 CONTINUE
          C
          C***** OUTPUT GRID SQUARE NUMBERS AND SOURCE CATEGORIES  47  THROUGH  56
          C
                KR1TE (IPRINT,5500)
                DO 525 I=ISTART,1END
                k\RlTE (IPR1NT»5510) ID(I), CNTY,  ( APP UEL ( J, I ) , J = 47, 52 ) , TONSFW,
               lAPPUEL(53»I)f TONSMB, APFUEL (54 , I ),  TONSAF,  APFUEL (55, I ),  DAYSF,
o.              2APFUEL(56,I)
            525 CONTINUE
            600 CONTINUE
          C
          C***** UPDATE  TABLE NUMBER OP  THIS SET  (45 OR  LESS)  OF  GRID  SQUARES
          C
                1TABLE=  ITABLE  +1
                IF  HTAhLE.LE.5)  GO TO  75
          C
          C***** UPDATE  WHICH SET OF GRID SQUARES  TO OUTPUT,  QUIT U  DONE
          C
                11A«LE=  1
                If  (UARtAS.EQ.IEND)  GO  TO  700
                GU  IU  50
            700 CUNT INUE
          C
          C**** OUTPUT FORMATTED  TAPE, WHERE:
          c    ALL  ALPHANUMEHICS  ARE A4

-------
c
C
C
C
C
C
C
C
C
C
C
C
C
    ALL INTEGERS ARE no
    ALL REAL*4 AKt E13.5

     FORMATTED TAPE CONTAINS UNLY DATA, I.E., IT IS NUT A 'PRINT' TAPE

     MITE HtADtR RECORD ON OUTPUT:
                  NAREAS INDICATES HOW MANY RECORDS FOLLOW
                  IPUT INDICATES TYPE OF DATA, I.E., APPORTIONED
                       FUELS = 1, APPORTIONED EMISSIONS = 2

     NRIJE(ITAPEO,5050) I REGN, STATE ,KOUNTY, NAREAS, IPUT , TONSF U, TONSMb,
    1 TONSAF,DAYSF
5050 FURMAT(1X,A4,E13.5,3I10,4E13.5)
     DO 750 1=1, NAREAS

     WRITE RECORD ON OUTPUT TAPE FOR EACH GRID SQUARE
rtOOD'/ 1 2X , 'NUMBER
  10E1T    10E1T
                                                           REGION  JURIS
                                                           10E4GALS  10E
     KR1TE(ITAPEO,5060) ID( I ) , X ( I ) , Y ( I ) , AREA ( I ) , ( APFUEL ( J , I) , J=l , 56}
50bO FURMAT(I10,59E13.5)
 750 CONTINUE
 800 RETURN
5100 FURMAT( '0',68X, ****************** RESIDENTIAL FUEL ***************
    1**'/12X, 'SOURCE', 10X, 'POLIT', 12X, 'COORDINATES', 13X, 'ANTH.   BITUM.
    2   DIST.OIL   RES. OIL   NAT. GAS
    3  COUNTY   X(KM)    Y(KM)  (SO. KM)
    44GALS   10E7FT3  10E2T'//)
5200 FURMATCO', 17X, ******* COMMERCIAL
    I * ** *********** * A****** INDUSTRIAL
    2X, 'SOURCE', 10X,'ANTH.  BITUM.  DIST.OIL  RES. OIL  NAT. GAS  WOOD
    3ANTH.  BITUM.  COKE   DIST.OIL  RES. OIL  NAT. GAS  WOOD  PROC.GAS'/
    42x, 'NUMHER  COUNTY  10E1T  10E1T   lOE^GALS   10E4GAL3 10E7FT3  10E
    52T  10E1T  10E1T   10E1T   10E^4GALS  10E4GALS 10E7F13  10E2T  10E7F
    6T3'//)
5300 FORMATCO',
                                        AND INSTITUTIONAL FUEL *******
                                        FUEL ****.******************** */2
    1       16X,'* ON SITE
    1******* GASOLINE FUEL
    2, 'SOURCE', 10X, 'HESID.
                            INCINERATION *  ***** OPEN BURNING ****  ***
                            **********  ******** DIESEL FUEL ******'/, 2X
                             1NDUST.  C-INST.  RESID.  1NDUST.  C-INST.
                                                                           5100
                                                                           5100
                                                                           5100
                                                                           5100

                                                                           5200
                                                                           5200
                                                                           5200
                                                                           5200
                                                                           5200
                                                                           5200

                                                                        OUTPT1
                                                                        OUTPT1
                                                                        OUTPT1

-------
    3 LT.VEH.  LT.TRUK  HV.VEH.   OFF HIWY  HV.VEH.  OFF HIvvY  R.LOCO',
    t\/id*, 'NUMBER  COUNTY  10E1T    10E1T    10E1T   10E1T    10E1T   1
    50E1!    10E3GAL  10E3GAL  10E3GAL  10E3GAL   10E3GAL  10E3GAL   10
    6E3GAL'//)
5310 FOkMAT(I6,«X,A4,F9.1,2F8.1,F10,l,F8.1,5F9.1,F8.1,Fll.l,F10.1)
5«00 FOHMATCO', 17X, ******* AIRCRAFT ******  ********** VESSELS *******
    1***  *** EVAPORATION ***  ******* MEASURED VEHICLE MILES ******'/2
    2X, 'SOURCE', 10X, 'MIL1T.  CIVIL  COMM"L,  DITUM. DE,
    3GAS   SOL. PUR.  GAS.MKTD.  LTD.ACC.   RUR.RDS.  SUd,
    H/dX, 'NUMBER  COUNTY  LC10E2  LC10E1  LC10E1   10E1T
    5L 10E3GAL   TONS/YR  10E5GALS
                                                                  , UIL  RES.OIL
                                                                  ,RDS.  URB.RDS.'
                                                                   10E4GAL 10E4GA
                                                                   10E4MI
I
CT\
O
5aiO FUHMAT(I6,aX,Aa,aK8.1,F7.1,F10.1,F7.1,F9.1,5F10.1)
5500 f-UKMAT(*0',25X, 'DIRT', 12X, 'MISC. ',a8X, 'AGRICULTURAL   FROST CONTRO
    1L'/16X, 'DIRT RDS  AIR    CONSTR.  rtINO     LAND    FOREST WILD FIR
    ?ES  MANAGED BURNING  FIELD BURNING  ORCH.    DAYS   STRUC,'/'  SOU
    3RCE',8X, 'TRAVELED STRIPS   ACRES  EROSION  TILLING  ACR BURN   QUA
    «NT. ACK BURN   (JUANT ACR BURN QUANT  bURN.    FIRED  HRES'/'  NUM
    5bER COUNTY  10E3MI LTD CYC  10E3ACR', 30X, 'T/ACR', 13X, ' T/ACH', 10X,
    6'T/ACK',11X,'DY/YR   #/YR'//)
5510 FUKMAT(16,4X,A«,F8.1,3F8.1,F10.1,F8.1,2F10.1,2F8.1,F7.1,F8.1,F7.1,
    1F9.U
     tNU
                                                                                  OUTPT1
                                                                                  OUTPT1
                                                                                  OUTPT1
                                                                                  OUTPT1
   saoo
   baoo
   5aoo
   saoo
   5«00

OP15500
OP1S500
OP15500
OP15500
OP15500
OP15500
OP15500

-------
c
C     CAASE5 OUTPUT SUBROUTINE OUTPT2 OUTPUTS APPORTIONED EMISSIONS
C     FROM APPORTIONING OF COUNTY TOTALS TO SUB-COUNTY GRID SQUARES.
C    K IN THE CALL LIST DETERMINES MICH OF THE FIVE POLLUTANTS IS TO BE
C     OUTPUT
C**** PLACE 45 GRID SQUARES ON EACH PAGE FOR EACH OF THE b TABLES
C    THE FIVE TABLES ARE REQUIRED TO ACCOMMODATE THE COLUMNS NECESSARY
C     FUH ALL SOURCE CATEGORIES ASSOCIATED WITH EACH GRID SQUARE
C
      SUBROUTINE OUTPT2 (K, APFUEL, ID, X , Y , AREA, NDIM)
      CUMMON/wHICH/XSTATEr ICNTY,XAQCR,CNTY,NAREAS,        HDR(20)
     1,1POL1 T,IREGN
      COMMON /FUELS/KSTATE,KUUNTY,AQCR,YR,SC(4),AC(2) ,FLTOTS(bb),CTYDEN,
     1TONSFW,TONSMB,TONSAF,DAYSF
      COMMON/IOUNIT/IREADR,ITAPET,ITAPEN,ITAPEU,IPUNCH, IPRINT, I ERR
      DIMENSION APFUEL(S6,NDIM)
      COMMON /TOTPOL/POLTOT(56,5)
      DIMENSION X ( ND I M),Y( NDIM), AREA (NDIM), ID (NDIM)
      DIMENSION POLL(25)
..
C
C     PULL ARRAY CONTAINS LABELS FOR THE FIVE POLLUTANTS.
C
      DA1A PULL/'   C,'PART'»'ICUL'»'ATE)'»'    ','   ( S' , 'ULPH' , 'UR D',
     1'IOXI','DE) ','(OXI','UES ','OF N' , ' I TRO' , 'GEN) ' , '   ( ' , 'HYDR' , 'OC
     2AH','bUNS'»'J   '/'  (C'r 'ARBO'f 'N MO' , 'NOX I ' , 'DE ) '/
      IPAGE = 0
C
C     1PUT USED IN OUTPUT TAPE HEADER RECORD TO INDICATE TYPE OF
c     DAfA FOLLOWING.
c
c
C     DUMMY VARIABLE TO FILL RtCORD LENGTH UN OUTPUT TAPE HEADER RECORD
C
      DUH=0.
      ITAbLE = 1

-------
M
cr>
NJ
              IEND = 0
        C
        C**** SEI PROPER POLLUTANT HEADING
        C
              KJ = K*5
              KK = KJ-4
        C
        C    ISTART TO IEND BRINGS THE ARRAY OUT  IN SETS  OF  45  GRID  SQUARES EACH
        C
           50 ISTAK? = IEND t 1
              IEND = [START t«4
        C
        C     MAY NUT BE 45 REMAINING,  CHECK  IT.
        C
              1EIMD = MINO(IEND,NAREAS)
              IPAbE = IPAGE * 1
           75 nKIIEUPKINTrSOOO) HDH, I TABLE t IPAGE
         5000 FORMAT('l'r20Ay,2X, 'APPORTIONED  EMISSIONS,  TABLE  ',12,',  PAGE ',
        C     rtHHE POLLUTANT LABEL
        C
              ftKnt(IPHINT»S001)  (PULL(1K),IK =
         5001
         500? FURMAT(94X,'(TUNS PER  YEAR)'/'0')
        C
        C    TAHLE HEADINGS AND FORMATS DEPENDENT  ON  «MICH  SOURCE  CATEGORIES
        C     FOR  THIS  TAbLE
        C
              GU  TO  (100, 200, 300, aoO, 500), ITABLE
           100 CONTINUE
        c
        C**** OUTPUt GRID SQUARE IDENTIFIERS  AND  FIRST  b  SOURCE  CATEGORIES
        C
              ftNITE  dPKlNTfblOO)
         5100 FORMAT CO', 11X, 'SOURCE', 10X, 'POL IT ', 12X, 'COORDINATES', 15X, ******** OP25100

-------
    1********** RESIDENTIAL FUEL *****************'/12X,'NUMBER  REGION
    2  JURIS  COUNTY   X(hM)   Y(KM)  (SQ.KM)   ANTH.   BITUM.   DIST.O
    3IL   RES.OIL   NAT.GAS   HlOOD'//)
     DU 125 I=ISTART,IEND
     WRITE(I PRINT,5110) ID(I),IREGN,IPOLIT,CNTY,X(I),Y(I),ARE A(I)
    1,CAPFUEL(J,I),J=1,6)
5110 FURMAT(11X,I6,'4X,A3,6X,A1,
    1 5X,A4,F9.1,F8.1,F9.2,F7.1,F9.1,2F10.1,F11.1,F8.1)
 125 CONTINUE
     GO TO 600
     CONTINUE
             200
           C
           C* ***
           C

            5200
I
cr>
UJ
 OUfPUF GRID SUUARE NUMBERS AND SOURCE CATEGORIES 7 THROUGH 20

 «R1TE(IPRINT,5200)
 FURMATCO',  ' SOURCE',10X,******* COMMERCIAL AND INSTITUTIONAL FU
2EL *******  *********************** INDUSTRIAL FUEL **************
2**********'/2X,'NUMBER  COUNTY  ANTH.  BITUM.  DIST.OIL  RES.OIL
3NAT.GAS  NOOD   ANTH.  BITUM.  COKE   DIST.OIL  RES.OIL  NAT.GAS
awoou  PROC.GAS'//)
 UU 225 I=ISTART,IEND
 ARITE(IPRINT,5210) ID(I), CNTY, (APFUEL U, I ) ,
 FURMAT(I6,4X,A4,F8.1,F7.1,F9.1,F10.1,F9.1,F8,
1  F7.1,F10.1,F11.1,F9.1,2F7.1)
 CONTINUE
 GO TO e>00
 CONTINUE
                                                  J=7, 20 )
                                                  1,F7.1,r7.1,
            5210

             225

             300
           C
           C****
           C
                 wNlTt(IPRINT,b300)
            5300 FOKMATCO',' SOURCE', 10X,
                1            '* ON SITE  INCINERATION *   ***** OPEN HURNLJG  ****   ***
                1******* GASOLINE FUEL  **********  ******** DIESEL FUEL ******'/, 2X
                3, 'NUMBER  COUNTY  RESID.   INDUST.  C-INST.  RESIO.   1NDUST.  C-INS
                al.  LT.VEH.  LT.TRUK   HV.VEH.  OFF HlWY  MV.VF.H.  OFF HI^Y  R.LOCO
     OUTPUT GRID SQUARE NUMBERS AND SOURCE CATEGORIES 21 THROUGH 33
                                                                                     OP25100
                                                                                     OP25100
                                                                                     OP25100
                                                                        OP25200
                                                                        OP25200
                                                                        OP25200
                                                                        OP25200
                                                                        OP25200
                                                                        OUTPT2
                                                                        OUTPT2
                                                                        OUTPT2
                                                                        OUTPT2
                                                                        OUTPT2
                                                                        OUTPT2

-------
I
ON
-P-
               DO 325 I=ISTART,IEND
               ARITE(IPRINT,5310) ID(1), CNTY,  (APFUEL (J, I) , J = 21 , 33)
               FORMAT(I6,4X,A4,F9.1,2F6.1,F10.1,F8.1,5F9.1,F8.1,F11.1,F10.1)
               CONTINUE
               GO TO 600
               CONTINUE

               OUTPUT GRID SQUARE NUMBERS AND SOURCE CATEGORIES  34  THROUGH  46
 5310
  325

  400
C
c****
c
      wRITE(IPRINT,5400)
 5400 FUKMATCO',  ' SOURCE',1 OX,'****** AIRCRAFT ******  ********** VES
     1SELS **********  *** EVAPORATION ***  ******* MEASURED VEHICLE MIL
     2ES *******'/'  NUMBER  COUNTY  MILIT.  CIVIL  COMM"L.  B1TUM. DE.
     A ',
     301L  RES.OIL  GAS   SOL.PUR.  GAS.MKTD.  LTD.ACC.  RUR.RDS.  SUB.R
     4US.  URB.RDS.'//)
      UU 425 I=ISTART,IEND
      ARITE(IPRINT,5410) ID(I), CNTY, (APFUEL(J,I),J=34,46)
 5410 FURMAT(I6,4X,A4,4F8.1,F7.1,F10.1,F7.1,F9,1,F10.1,F9.1,.SF10,1)
  425 CONTINUE
      GO TO 600
      CONTINUE
  500
C
C* * **
C
      wKIltCIPRI 	
 5500 FURMAT('0',25X,'DIRT',12X,'M1SC,',48X,'AGRICULTURAL
     1L'/'  SOURCE',WX,'DIRT RDS  AIR    CONSTR. .WIND
     2T rtlLD FIRES  MANAGED BURNING  HELD BURNING  ORCH.
     4L.'/'  NUMBER COUNTY TRAVELED STRIPS   ACRES  EROSION
     5R BURN   QUANT. ACR BURN   QUANT ACR BURN QUANT  BURN
     6IRES'//)
      UU 525 1=1START,1END
      hRllE(IPRINT,5510)  ID(1), CNTY, (APFIJEL (J, 1 ) , J = 47 , 52)
               UUIPur GRID SQUARE NUMBERS AND SOURCE CATEGORIES 47  THROUGH  56
                                                            FROST CONTRO
                                                           LAND    FORES
                                                             DAYS   STRU
                                                             TILLING  AC
                                                                FIRED  F
                                                                       Tf.lNSFW
              1APFUEL(53,I), TUNSMB, APFUEL(54,1), TONSAF, APFUEL(55, I ),  DAYSF,
              2APFUEL(56,I)
          5510 F OKMA T(I6,4X,A4,F 8.1,3F H.1,F10.1,F 8.1 , 2F10 . 1 , 2F 8.1,F 7.1,F8.1,F 7.1,
                                                                                   OP25400
                                                                                   OP25400
                                                                                   OP25400
                                                                                   OP25400
                                                                                   OP25500
                                                                                   OP25500
                                                                                   OP25500
                                                                                   OP25500
                                                                                   OP25500
                                                                                   OP25500

-------
     1F9.1)
  525 CONTINUE
  600 CONTINUE
C
C**** UPDATE TABLE NUMBER FOR THIS SET (45 UK LESS) UF GRID SQUARES
C
      ITAbLE = ITABLE t 1
      IFUTABLE.LE.5 ) GO TO 75
C
C**** UPDATE WHICH SET OF GRID SQUARES TO OUTPUT,  QUIT IF DONE
C
      ITAtiLE = 1
      IFlNAKEAS.EU.IEND) GO TO 700
      GO TO 50
  700 CONTINUE
C
C**** OUTPUT FORMATTED TAPE, WHERE:
c    ALL ALPHANUMERICS ARE A4
C    ALL INTEGERS ARE 110
C    ALL REAL*4 ARE E13.5
r
V.
c     FORMATTED TAPE CONTAINS ONLY DATA, I.E., n  is NUT A 'PRINT' TAPE
c
C     URITE HEADER RECORD ON OUTPUT TAPE:
C                  NAREAS INDICATES HOW MANY RECORDS FOLLOu;
C                  IPUT INDICATES  TYPE OF DATA,  I.E., APPORTIONED
C                       FUELS =  1, APPORTIONED EMISSIONS = ^
C
      rtRi!E(ITAPEO,5050) IRE G(i, STATE, KUUNT Y , NAREAS, IPU T , XK , DUM, DOM, DUM
 505n FORMAT (!X,Aa,f;U.5,3I10,aE13.5)
      DO 750 I=1,NAREAS
C
C     HRI1E RECORD UN OUTPUT TAPE  FOR EACH GRID  SQUAKE
C
      KKiTt(ITAPhU,5U60) ID(I),X(I),Y(1), AREA(l),CAPFUEL(J,l),J=l,5b)
 50bO FURMAT(I10,5yE13.5)
  750 CONTINUE

-------
     AK1TE(ITAPEO,5070)
    1              (PULTOT(J,K),J=1,S6)
5070 f-UKMAT (56E13.5)
 800 CONTINUE
     KfcTUHN
     tlMU

-------
      SUURUUTINE OUTPT3 (OUT IPP, ID, X, Y, AREA, NDIM, I WANT )
C
C     RUUUNE OUTPUTS THE IPP ARtA SOURCE  INPUT CARDS, ONE FDR EACH
C     GRID bUX, S02,SP,NOX,HC,AND CO  SUMMED THROUGH ALL CATEGORIES
C     FUR EACH GRID SQUARE OR COM AREA SOURCE INPUT CARD, ONE FOR  EACH
C     GRID SUUARE, S02 AND SP, OR AQDM AREA SOURCE INPUT CARDS, ONE  FOR
C     EACH GRID SQUARE, S02 AND SP
C
C*****  CONVERT TONS/YR TO TONS/DAY
C
      DIMENSION OUTIPP(NDIM,b)
      COMMUN/WHICH/XSTATE,ICNTY,XAQCR,CNTY,NAREAS,        HDR(20)
     1,IPUL1T,IREGN
      COMMON /FUELS/KSTATE,KOUNTY,AQCR,YR,SC(4),AC(2),FLTUTS(b6),CTYDEN,
     1TUNSFw,TONSMB,TONSAF,DAYSF
      COMMON/IOUNIT/IREADR,ITAPET,ITAPEN,ITAPEO,IPUNCH,IPRINT, I ERR
      DIMENSION X(NDIM),Y(NDIM),AREA(NDIM),ID(NDIM)
      DIMENSION FMH18)
      DATA FMT/'(A3,',"'999','9", ','    ','    ','    ',',"0"',
     l',I4,','Ib,I','<4, 1',
     2              'X,A1', ',ia,','SF7.','3,2I','b,2X',
     3',"A"',')   '/
      DATA ZER01  /
     l'"0" '/,ZER02/'"00"'/,ZER031/'"000' /,ZER03«?/'"   '/,
     IbLANK/'    ' /
      DATA XI3/',I3,'/,XI
-------
          5000  FORMAH'l  VALUE  UF  IWANT  UUT  OF  GO  TU  RANGE,  IWANT  =
               RETURN
         C
         C****  OUTPUT  IPP CARD  IMAGES
         C
         C      SET  STACK  HL1GHT TO 33FT.  ( APPROXIMATE Y  10  METERS)
         C
          1000  iSTACK  =  33
               v>«RITE(IPRINT,b006)  HDR
          5006  FURMAT('1',20A<4,5X,'IPP  INPUT CARD  IMAGES'///)
               UU  100  I=1,NAREAS
         C
         C      SLf  COURDINATF.S  AND AREA  TO  INTtGERS
         C
               IXsX(I)*10.+.5
               IY=Y(I)*10.+.5
               lAREA = ARtA(I)*10.f .5
         C
w        C      CUUVtRT EMISSIONS FROM  TONS/YR TO TONS/DAY
*        C
               SH=UUTIPP(I, 1 J/365.
               XNO=OUT1PP(I,3)/36S.
               HC  =OU1 IPPCI,«)/365.
               CD  =OUT1PP(I,5)/36S.
               IUD=ID(I)
         C
         C****  CONSTRUCT  FORMAT  FUR  LEADING ZEROFS (REQUIRED IN IPH DISPERSION
         C      MUUtLJ
         C****  HOSF  WILL  BE  THRCE  DIGIT
         C
             S  U (IUD.GE. 100. AND. 1DD.LT. 1000)  GO TO 30
               IF (lDD.bF.1000)  GO  TO 40
               IF (IDD.GT.9)  GO  TO  10
         C

-------
C***  LESS THAN 10 (1 DIGIT)
C
      FKTU) = 2ER031
      FMT(5) = ZEKU32
      FMT(6) = XII
      GU TU 50
C
C***  btTWEEN 10 AND 100  ( 2 DIGITS)

   10 CONTINUE
      M-iT(4J = ZERU2
      FMT(5) = BLANK
      FMT(b) = XI2
      GU TU 50
                      1000  (  3 DIGITS)
C
c* * **
c
30



C
c** *
c
40
BET

FMT
FNiT
f-MT
GU

WEEN

(
C
(

4
5
b
TO


1000

CUN

f

I

) =
) =
) =
50

UR

NUE
100

11
AND

RU1
BLANK
XI


GRt


3


ATER


                          DIGITS)
      FMU) = BLANK
      Hif(5) = BLANK
      PMT(6) = Xia
   50 CUNFIfvUE
      «KirEClPiJNCH,FrtT  )  1 HEGNf ID (I) , I X, I Y , I ARE A, IPUL I T , I ST ACK ,
     lSU,SP,XNU»HC,LU,lSTATEfKOUNTY
      «K1TE(1PHINT,5005)  IREGfM» ID( 1) » IX, 1 Y , I ARE A, I POL 1 T , IS T ACK ,
     13U,SP,XIMO,HC,CU, ISTATL/KOUNTY
 5005 FORMAT (IX, A3, "*
-------
   99 nRITE(ITAPEQ,FMT)  IREGN, ID ( I ) , 1 X , I Y , I AREA, IPOL1 T , I ST ACh ,
     1SU,SP,XI\|0,HC,CO,ISTATE,KOONTY
  100 CONTINUE
      GO TO 110
C

C**** UUfPUF CDM INPUT CARD IMAGES
C
C
C     SET STACK HEIGHT TO 10 METERS
C
 2000 SfAK = 10.0
      CUNV = 10.5
      >vRITE(IPRINT,b011) HDR
 SOU FURMAT('l',20A4,bX,'CDM  INPUT  CARD IMAGES'///)
      DO 200 i=l,NAREAS
C
C     t>E f COORDINATES AND SIDE LENGTH TO INTEGER  METERS
C
      IXCORD = XCI) * 1000. +  .5
      IYCOKD = Y(I) * 1000. t  .5
      IrtUH = SORT(AREAd)) *  1000.  t .b
C
C     CONVERT TONS/YR TO GRAMS/SECOMD
C
      SP = OUT IPP(If l)/3fab. *  CONV
      SO = OUTlPP(l^)/565. *  CONV
      wKl TE(IPUUCH,50^0) IXCORD, I YCOKD, I wl THf SP, SJ) f ST AK
 5020 PUKMAT(16r2I7r<2fB.5»F 7.1)
      ^HlTE(IPRINT,50tfl) IXCORD»IYCOHDf JrtITH,SP,SO»STAK
 50? 1 FORMAT(1X,I6,2I7,2F6.5,F7,1)
C
c     ^kiTE CARD IMAGE TO TAPE
c
      V«N1 IE (I rAPE(l,5020) iXCOKDf IYCORD,1WITH,SP,SO,S1 AK
      GO  fU  110

-------
         c
         C**** UUTPUT AQDM INPUT CARD IMAGtS
         C
         C     SET STACK HtlGHT TO 33FT (APPROXIMATELY 10 METERS)
         C
          3000 STACK = 33.0
               MKlTE(IPRlNT,b029) HDR
          5029 FORMAT( ' 1 ' ,20A4,5X,'AQDM INPUT CARD IMAGES'///)
               nRITEUPUNCH,5b) NAREAS
            55 FOKMATC NSCORD=  ',19,',')
         C
         C     CONVERT TONS/YR TO TONS/DAY
         C
               SP = OUTIPPU, l)/36b.
               30 = OUTIPP(l,2)/3b5.
         C
         C     FIRST CARD NEEDS 'SORCE=' FOR NAME LIST
         C
n              hRlTE (IPUNCH,60) X (1) , Y ( U , AREA (1 ) , SO, SP, STACK
^           60 FORMATC SORCE=   ' , F9 .1 , ' , ',F9.1, ' , ' ,F9.2,',',F9.3,',',F9.3,',',
M             lF9.i,',',F9.1,',')
               WRilE(IPRINT,5030) X(1)/Y(1),AREA(1),SO,SPiSTACK
         C
         C     ^RITt CARD IMAGE TO TAPE
         C
               hKITE(ITAPEU»b030) X (1 ), Y( 1) ,AREA  ( 1 ),SU/SP,STACK
         C
         C     OUTPUT REMAINDER OF CARD
         C
               DO 300 I=2,NAREAS
               SP = OUTIPP(l,l)/365.
               SO = UUTIPP(l»2)/36b.
               ^RITE(lPUNCH,b030) X(I),Yd),AREA(I),SO,SP»STACK
          5030 FOR'UI(10X,F9.1,',',F9.1,',',F9.2,',%F9.3,',',F9.3,',',F9.1,',')
               «KlTt(lPRINT,5030) X(I), Yd), AREA(I),SO,SP, STACK
         C
         C     AR1TE CARD IMAGE TO TAPE

-------
          c
                KK1 rt(ITAPtU,b040) X(I),Y(I), AREA(I),SO,SP,STACK
           ' 300 CONTINUE
            110 CONTINUE
                KETUKN
                END
ra
i

-------
                 APPENDIX F

GTGR TABLES AND FORTRAN SOURCE CODE LISTINGS
     DIRECT ACCESS FILE CREATION PROGRAM
                       F-l

-------
F-2

-------
00 -00 COO  000 000 000 000 GOO GOO CQO'.OOO 000 300 000 000  '
2+2030571788-335175649+09 ;°74767 + 3251093-0389^+78420-0054-0141
3+2003826922-435228892+100131775+3259317-04326+78591-0067-0143
4+2007090708-535439319 + 100289144+326839' -04757+78782-0 "67-0145
5+2010364010-635807315 + 100446917+3278350-C5194+789 >4-0074-0146
6+2013647701-73633 302+100605135+3289179-05636+79227-0081-0148
7+2016942664-837017747+100763838+330 897-06084+79480-0OS8-0150
8+2020249795-93786115l' + 10^923070+3313517-06537 + 7975'.-0 95-0152
00000 000 COO COO .00 0000 000 :00: 000 "00  00 'GO  JQ-^0"  :0
2+2100542603-331846280+099^66809+3407502-04058+77986-0052-0148
3+2103954311-431891128+10^122943+3416063-04505+78152-0 59-0150
4+2107375029-532092284+10J279430+3425523-04956+783;8-0"65-0151
5+2110805660-632450119+100436309+34358^2-05413+78545-0072-0153
6+2114247119-732965047+100593622+3447180-5876+78771-0079-0155
7+2117700331-833637521 + 100751409 + 3459400-116345+79019-0186-0157
8+2121'66233-934468037 + 100909712+3472563-06819+7928 i-0093-0159
000 COO  00 .00  00' COO 000 000 000  00/30 COO 0000 OO 3000
2+2200505302-328360942 + 099°<58538+3563023-04212+77532-0 '50-0155
3+2204072691-428397064 + 100113760 + 3571912-046x78+77693-0 57-0156
4+2207649438-5285M.-1576 + 100269323+3581738-05150+77874-0 064-0158
5+2211236484-628935838+10'425268+3592514-05627+78074-0070-0160
6+2214834786-729439253+100581635+3604250-06110+78295-0 C-77-0162
7+2218445310-830099261 + 100738464 +361695c">-06oO 0+78537-0 034-0164
8+2222069033-930916347+102395796+3630653-07095+78799-0^91-0166
oooo"ooo"coo" 000:000 ooo r:oo'ooo coo "oo :oo :ioo"00ooooooc/"oo
2+2300459578-324720543+099949965+3717617-04360+77059-0049-0161
3+2304181717-424747618+100104235+3726821-04346+77214-0051-0163
4+2307913548-524929124+100258835+3737005-053"7+77389-0062-0165
5+2311656056-625265411+100413805+3748176-05335+77584-0068-0167
6+2315410234-725756870+100569185+3760348-06338+77 9O-0075-0169
7+2319177090-826403931+100725015+3773534-06848+78034-0082-0171
8+2322957644-927207063+100881335+3787746-07365+78290-0-89-0173
0000 000 000 000 ..OOO'OOO "000000000000 CO" COO -00 000 TOO  ;;00
2+2400405135-320926030+099941102+3871245-04503+76566-0047-0168
3+2404281051-420943746+100 94380+383075:)-05008+76716-0053-0169
4+2408166985-521114896+100247977+3891282-05519+76885-0060-0171
5+2412063958-621439820+100401933+3902837-06037+77074-0060-0173
6+2415973006-721918894 + 100556285+3915433-06560+77282-0 '73-0176
7+2419895175-822552536+100711075+3929082-07090+77511-0080-0178
8+2423831526-923341203+100866342+394379—07627+77760-0 86-0180
OOO^HOO COO 000 000 QOO"000:"OOOOnOOO-COOOCOOJ COO '00 COQ :CO  ,
2+2500341688-316978388+099931958+4023868-04640+76054-0045-0174
3+2504370371-4169864^6+100084206+4033672-05165+76198-0051-0176
4+2508409384-517146902+100236762+4044531-05695+76361-0058-0178
5+2512459789-617460084+100389663+4056457-06232+76543-0064-0180
6+2516522659-717926356+100542948+4069464-06776+76745-0071-0182
7+252059^081-818546122+100696658+4083564-07326+76967-0077-0185
8+2524690156-919319826+100850831+4098771-07883+77209-0084-0187
000- COC -000000'COO ;iOO"000 GOO '00  ^QP CCO ' 'OO'in T-n -• C ."0 C  'CO
2+2600268961-312878641+09^^22546+4175448-04771+75523-0043-0180
                                F-3

-------
3+2604449362-412876753 + 100073726-1-4185- 34-05315 +75661-0049-0182
4+2608640393-513026190 + 10022520° +4196712-05865 +75817-0055-0184
5+2612843155-613327265 +10037? 008+42089^>7-0642l+759(>3-0 062-0187
6 +2617058761-713780330 + 10 0529187+421: ..402-06984 + 76189-0 068-0189
7+2621283336-814385777 + 100681777+4236939-075:34 + 76404-0075-0191
8+2625533021-915144034+100834816+4252623-08131+76639-0082-0194
oooo coo'oco-ooo ooo'.oco ooo  on "oo  "oo :. oo"o';o-orooo-~onnoo-
2+2700186693-308627851+09'- n2877+4325947-04397+ 74973-0041-0186
3+2704517724-408615743+100062951+4336302-05459+75104-0047-0189
4+2708.a59674-508753846 + 100213306+4347788-06028+7525b-Or53-0191
5+2713213681-609042462+100363982+4360418-06o04+75424-006--0193
6+2717580896-709481930+1OP515016+4374207-07186+75613-0 66-0195
7+2721962485-810072627+1006oo446+4389167-07775+75821-0073-0198
8+2726359625-910814968 + 100818312+4'i 05313-08372 + 76048-0 079-020r
oo ooo oooo"ooooooooooo;conrcoo. ;^oo :oo nco "oo ~oo ooo roo;oo
2+2800094633-3042:^7120+099902963+4475327-05016+74'! 04-0039-0193
3+2804575169-404204527+100^51893+4485938-05 97+74529-0045-0195
4+280906^90 -5043309°6+100201093+4497719-06185+74673-0051-0197
5+2813571030-604606814+100350598+4510681-067>9+74836-0057-0190
6+2818088661-705032308+100500448+4524840-07381+75017-0064-0202
7+2822621084-805607838+100650680+4540209-07989+75218-0070-0204
8+2827169486-906333803+100801333+4556802-08606+75438-0077-0207
O00'"000. 000°0000000000000000 COO . 000  '=100000 000 OOO^OOO  CO •:
2+289^992543-299677583+099892818+4623551-05129+73817-0037-0199
3+2904621421-399644256+100040567+4634 06-05728+73936-0043-0201
4+2909261757-499758803+100188573+46464&8-06334+74073-0049-0203
5+2913914763-600021498+100336871+4659749-06948+74228-0055-0206
6+2918581665-700432654+100485498+4674263-07568+74403-0061-02°8
7+2923263705-800992618+100634494+4690026-08196+74596-0068-0211
8+2927962138-901701777+100783895+4707051-08831+74808-0074-0213
00000^00000000000000000000 0000000 COO 000 000 000 000 ncov,00
2+2999880196-294980416+099882453+4770582-05235+73211-0034-0205
3+3004656218-394936116+100^28985+4781669-05853+73324-0040-0207
4+3009443947-495038467+100175760+4793997-0647 '+73454-0046-0209
5+3014244632-595287728+100322813+4807582-07109+73602-0053-0212
6+3019059535-695684198+100470181+4822438-07748+73769-0059-0214
7+3023889936-796228208+100617902+4838579-08395+73955-0065-0217
8+3028737128-896920132+100766013+4856022-09049+74159-0071-0219
ooo "oooeooooooocrooooooo oooooononooooon^ooo ooo ooo noo roo  •
2+3099757380-290136828+099871883+4916385-05335+72588-0032-0211
3+3104679311-390081333+100017161+4927689-05970+72693-0038-0213
4+3109613183-490171227 + 1001626- 8+4940271-06613+72817-00^4-0215
5+3114560283-590406757+100308440+4954146-07263+72958-0050-0218
6+3119521911-690788206+100454512+4969328-07920+73117-0056-0220
7+3124499380-791315893+10060 '921+4985832-08505+73295-0062-0223
8+3129494021-891990172 + 10' 747704+5003675-09259+73491-0 68-0226
ooooooooooooooo ooo cooocoo 000,000^000 oon  on ooo ooo  "-o :o
2+3199623897-285148068+099861119+5060923-05428+71947-0030-0217
3+3204690464-385081165+1000 5108+5072430-06081+72045-0036-0219
4+3209769195-485458356+100149312+5085252-06742+72161-0042-0221
                            F-4

-------
5+3214861410-585379873+10029376o+509O402-07410+72295-0048-0224
6+3219968446-685745983+100438505+5114895-08085+72447-0 054-0226
7+3225091654-786256990+100583560+5131747-08768+72617-0^60-0229
8+3230232399-886913233+100728984+5149^74-09460+72805-0066-0232
00000 000 000 COO 000 000» " OO'OOOOOCOrK 000 ,OC30COa^GOO"..CO ") "00
2+3299479559-280015417+099850176+5204161-05bl4+7128^-0023-0222
3+3304689456-379936910+09°992841+5215858-06185+71380-OQ33-0225
4+3309911724-480001166 + 100135706+5228905-06863+7148: -0039-0227
5+3315147720-580208401+100278806+5243315-07549+71615-0045-0230
6+3320398813-680558869+100422177+5259104-08242+71759-0051-0232
7+332566,392-781052856+100565853+5276287-08943+71920-0357-0235
8+3330951858-881690688+100709870+5294832-09653+72100-0063-0238
ooooo'" :oo "cooocoooooooooooooo" coo 'ooo-oocooo '-on -OOOOCOT-OH
2+3399324194-274740192+099839068+5346064-05593+70612-0025-0228
3+3404676080-37464989c»+0999a0374+5357937-06281+70696-0 031-0231
4+3410040529-474701002+100121865+5371194-06977+70798-0037-0233
5+3415418933-574893703+100263577+5385849-07680+70917-0042-0236
6+3420812698-675228240+100405543+5401918-08391+71053-0048-0238
7+3426223245-775704885+100547799+5419417-09110+71206-0 54-0241
8+3431652014-876323946+100690379+5438362-09837+71377-0060-0244
000:0000000 "oo ooo r-oo "'ooo oooooooooomooo  oo ^oooroo:jOo;-o
2+3499157644-269323745+099827809+5486598-05665+69919-0023-0234
3+3504650142-369221497+099967721+5498632-06370+699r'6-0 028-0236
4+3510155382-469259245+100107805+5512084-07083+70090-0034-0239
5+3515674788-569437175+100248093+5526969-07803+70201-0040-0241
6+3521209803-669755510+100388620+5543302-08531+70329-0046-0244
7+3526761881-770214505+100529420+5561100-09268+70474-0051-0247
8+3532332496-870814452+100670528+5580379-10013+70637-0057-0250
ooo:"ooo^000:000 coo ooo ooo":ooooooo"?oo "ooo rcoooooooooooooono
2+3598979766-263767463+099816412+5625730-05730+69209-0 20-0239
3+3604611465-363653106+099Q54898+5637910-06452+69279-0026-0242
4+3610256070-463677310+10Q093539+5651542-07181+69365-0032-0244
5+3615915039-563840248+100232370+56o6641-07919+69468-0037-0247
6+3621589846-664142124+100371423+5683222-08664+69588-0043-0250
7+3627281982-764583180+100510733+5701302-09417+69725-0048-0253
8+3632992955-865163688+100650334+5720897-10180+69879-0 '54-0256
000000COO0000000000000 COO00000000^00000000000• POO .000'.'000 ^00
2+3698790428-258072765+099804893+5763425-05788+68483-0018-0245
3+3704559886-357946160+099941918+5775737-06526+68545-0023-0247
4+3710342397-457956649+100079084+5789534-07272+68624-0029-0250
5+3716139454-558104387+100216424+5804831-08026+68719-0034-0253
6+3721952564-658389565+100353970+5821643-08788+68630-0040-0255
7+3727783251-758812407+100491756+5839988-09558+68959-0046-0258
8+3733633056-859373169+100629816+5859832-10337+69104-0051-0261
oooooooooo.ooo ooo ooo-00000000000:000 ooo:ooo"3oo coo oooo oo
2+3798589516-252241104+099793266+5899650-05838+67740-0016-0250
3+3804495255-352102127+099928798+5912080-06593+67795-0021-0253
4+3810414181-452098742 + 10': 064456+5926026-07355+67866-0026-0255
5+3816347818-552231091+100200272+5941505-08125+67953-0032-0258
6+3822297707-652499349+100336277+5958532-08904+68056-0037-0261
                                F-5

-------
7+3828265404-752903721+100472506+5977125-096^0+68176-0043-0264
8+3834252483-8534444M6+100608990+5997300-10486+68312-0048-0267
OOOOOOOOCOOOCCOO .000 " OCOOOQO ; OQO-COOOOCCO^r cr-00  'T0-? "'00 -o -1  i
2+3898376928-246273965+090781545+6034375-05881+66981-0013-0256
3+3904^174 iO-34612i:506 + 099Q155 3+6046906-06552+67029-0 18-0258
4+3910471256-446105107+100049670+6060986-07430+67091-0024-0261
5+3916539934-546221893+100183929+6076630-08216+67170-0029-0263
6+3922625044-646473023+100318362+6093856-09011+67265-0034-0266
7+3928728178-746858686+100453000+6112679-09814+67376-0040-026Q
8+3934850940-847379103+100587877+6133117-10626+67503-0045-0272
0000 000  00 COO  GO  ?0 000'  OOOOOOOOOOOnOO' OOC  '"/nn-oQ,-:-;-n-'
2+3998152580-240172866+099769747+6167566-05916+66207-0011-0261
3+4004326324-340008831+099Q02197+6180183-06703+6r246-0016-0263
4+4010513474-439Q77292+100034742+6194381-07497+66301-0021-0266
5+4016715618-540 ^78357 + 100167413+6210175-03299+66372-0026-0269
6+4022934362-640312170+100300241+62C7582-09109+66458-0031-0272
7+4029171325-740678901 + 10^433257+6246618-09928+66560-0 137-0275
8+4035428147-841178756+100566493+6267301-10756+66678-0042-0278
0000 000 00 00 ' 0000000000 OCOOOC 00000000000 "000 30000 000 0 00 00 n 00.: CO
2+4097916401-233939355+099757885+6299192-05944+65417-00 8-0266
3+4104221803-3337626o6+09988:'747+6311881-06746+65449-0013-0269
4+4110540699-433716877 + 100019689+6326181-0755')+65496-0018-0271
5+4116874707-533802080+10"150740+6342108-08373+65558-0023-0274
6+4123225462-634018403+100281931+6359678-0919^+65636-0029-0277
7+4129594617-734365999+100413293+6378910-10034+65729-0034-0280
8+4135983842-834845056+100544857+6399820-10878+65838-0039-0283
0000 00 000 "000 "COO'OOOCOOOOCOO"1:0000000 00 00000 "00^0 000 0000 0000
2+4197668334-227575014+099745975+6429223-05965+64611-0005-0271
3+4204103792-327385607+099875219+6441967-06781+64635-0011-0274
4+4210552815-427325473+100004526+6456353-07606+64674-0016-0276
5+4217017051-527394690+100133926+6472397-08439+64728-0021-0279
6+4223498166-627593367+100263450+6490114-09280+64798-0026-0282
7+4229997843-727921641+100393127+6509523-10130+64832-0)31-0285
8+4236517783-828379682+100522988+6530642-109^0+64982-0036-0288
oooooooooooocooooooooooo coorooo coo cor 300 -oooooocooi ooooo
2+4297408339-221081452+099734032+6557627-05977+63791-0003-0276
3+4303972220-320879279+099861627+6570412-06809+63807-0008-0279
4+4310549720-420804723+099989270+6584868-07648+63838-0013-0281
5+4317142519-520857845+100116990+6601011-08496+63884-0018-0284
6+4323752311-621038738+100244816+6618859-09353+63944-0023-0287
7+4330380810-721347522+100372777+6638428-10218+64020-0028-0290
8+4337029747-821784348+100500905+6659736-11092+64110-0033-0293
OOC'OOOCOOO OOOCOOO OOOCCOOCOOO COOOOOO '0000000'C'OO ''00 000  000
2+4397136391-214460311+099722071+6684377-05982+62956-0000-0281
3+4403827032-314245340+099847989+6697186-06828+62964-0005-0283
4+4410531330-414156299+099^73938+6711696-07683+62987-0010-0286
5+4417250995-514193235+100099^47+6727922-08545+63024-0015-0289
6+4H23987752-614356223+100226045+6745882-09416+63076-0020-0292
7+4430743343-714645365+10C352262+6765593-10296+63143-0025-0295
8+4437519527-815060796+100478626+6787073-11185+63224-0029-0298
                               F-6

-------
00000 "COO .000 COO.000 :.GOOOCO JOO GOO  '"J.3000000 OOO'COO "CO
2+4496852481-207713260+099710108+6809442-05979+62106+0002-0286
3+4503668188-307485474+099834319+6822 59-06840+62107-0003-0288
4+4510497576-407381904+099°58545+6336807-07709+62122-0007-0291
5+4517342383-507402579+100082315+6853099-08585+62150-0012-0294
6+4524204362-607547558+100207157+6871154-09471+62194-0017-0297
7+4531085285-707816926+100331599+6890989-10365+62251-0022-030C
8+4537986940-808210798+100456170+6912622-11269+62323-0026-0303
oooooooooooooocoo:  coooooooooo coo:oc  oo.'ooooccorcco: :"::rco"
2+4596556613-20084199^+099698159+6932793-05969+61243+0005-0290
3+4603495665-300601397+099820634+6945604-06344+61235+0"00-0293
4+4610448406-400483268+099' 43109+6960172-07726+61242-0005-0296
5+4617416601-500487624+100065611+6976514-08617+61262-0009-0298
6+4624402032-600614507+100188167+6994647-09517+61297-0014-0301
7+4631406498-700863986+100310807+7014588-10425+61345-0018-0304
8+4638431816-801236158+100433557+7036354-11343+61408-0023-0307
ooooo oooooooooooooo ",0000000000:-.00:000 "  ;c:oco"ccG'  rooocooo
oooooooo ooooooo coo ooooooooooo COOCGOOOOQCOOQQOCCC^OCO  "oo";
3+4703309457-293594852+099806950+7067191-06839+60350+0003-0297
4+4710383785-393462150+099927646+7081764-07736+60348-0002-0300
5+4717473586-493450147+100048352+7098139-08640+60360-0006-0303
6+4724580669-593558866+100169095+7116332-09554+60386-0011-0306
7+4731706862-693788359+100289904+7136360-10476+60425-0015-0309
OOOOO-COO'COOOCOO 000"OOOOOOOCOOOC:CGOOOO  x:OCC3C3^0:0- ~00"-000"
ooooooooooooocoocoooc cooooo: 0000000:000000: ccjoco G:C  ;coc:
000000' 000^000 .OOOCOOOOOOO.'COOOOOOCOOO OOOCCOOOCOO COOOCOCCOOO
3+4803109572-286467610+099793283+7186993-06827+59450+0005-0302
4+4810303694-386320339+099912172+7201555-07737+59441+0001-0305
5+4817513292-486291952+100031055+7217946-08655+59444-0003-0308
6+4824740201-586382456+100149958+7236181-09582+59461-0008-0310
7+4831986275-686591884+100268909+7256279-10518+59492-0012-0313
00:000.-ooo.;000:000cooooooo"ooooooooooolooo cooooocoooccoooooo
oooooo^ooo';:ooooooo:oo0000000000ooo 'Ooo.oooocooooooooooo  ooooo
000 OOOOOOOHOOOJOOOOOOOOOOO0000'^OOOOOOO:000 -000000000000000000
3+4902896035-279221469+099779649+7304984-06806+58538+00^8-0306
4+4910208131-379059649+099896704+7319518-07730+58520+0004-0309
5+4917535689-479014871+100013737+7335907-08661+58515-0001-0312
6+4924830570-579087125+100130773+7354168-09601+58523-0005-0315
7+4932244654-679276428+100247839+7374318-10550+58545-0009-0318
OOOOOOO 000 3 000? OOOC 000- G 000 000 0 COO 000 C OOOOOOO CO 001:0 000 GOO: 000
oooc-ooo:'ooo:000000000000000:00000000000:0000000000000oo ooo oo
00000000000000 000000000000000. 000000000000000^0OOOOOOOCOOOOOC
3+5002668886-271858256+099766064+7421136-06778+57612+0011-0311
4+5010097111-371681921+099881259+7435626-07714+57586+0007-0313
5+5017540765-471620761+0999^6416+7451997-08659+57573+00^2-0316
6+5025001738-571674749+100111559+7470266-09612+57572-0002-0319
7+5032481935-6718438C4+100226714+7490449-10573+57585-00:6-0322
ooooooooooorooo:oooroo ooo ooo  oooooo -0003000 ccoocco ooo co
0000,000 000 000.3000 OOOJOOOOOOO 000 COOOOOOOOOO30000000  -TOOCO
00r OOOOOOO "00000000000^-.0000000 COOOOOO C003000:OOGOOOCjJOO :OGO
                              F-7

-------
3+5102428183-264379820+099752543+7535423-06741+56673+0013-0315
4+5109970663-364189024+099865854+7549854-07690+56039+0009-0318
5+5117528526-464111509+099979109+7566190-08647+56 18+0005-0320
6+5125103684-564147231+100092333+7584449-09613+56609+00 1-0323
7+5132698071-664296173+100205552+7604648-10587+56612-00:3-0326
00000 000^000000000000000,000 aOO:300:OCO:003%000 3000GCOOOO •
OQOOi.000 OOOOOOOOOOOOOOOCOOOOOOOOOO :OOOr"jOOOOOOPOOOO~00 OOOOCO
0000^000 :00~QQO, 000 -000 000 OOOjOOOOOOO OCO 000 000 CGCOOOO 0
3+5202173999-256788039+099739103+7647821-06697+55722+0016-0319
4+5209828837-356582849+099850503+7662175-07658+55680+0012-0322
5+5217498993-456489022+099961832+7678460-08628+55650+0008-0325
6+5225186406-556506498+100073113+7696692-09606+55633+00 4-0327
7+5232893033-656635240+100184370+7716889-10592+55627-0000-0330
000000'0000000000000000000000"COO  000000  OOCOOO'OOO  CO"COO.
ooooooooo" oooooo* :oooooQ:300300o:ooo"ooo  oo ooo'ooo coo coo
OOOOOOOOOOOCOOOOOOO COOOOOO GOO ;000 000JOOO/OOO '000 COO 000000
3+5301906421-249084816+099725759+7758304-06645+54759+0019-0323
4+5309671694-348865317+099835225+7772566-07618+54709+0015-0326
5+5317452206-448755237+099944603+7788783-086'00+54671 + 0011-0329
6+5325249918-548754501+100 53916+7806971-09590+54644+0007-0331
7+5333066811-648863055+100163188+7827148-10588+54630+00 3-0334
oooooooooooooooooooooooo;ooooooocooonooooooooooo^ooonooo coo o
ooooo :oo ooor:ooocooo:ooo  ooo 000:000 ooo ooo coo oooaoooooooo
oooo 'Ooo:ooo'ooooooo "ooooooo ooooooo.Qoooooo 00000000000:000:0
3+540162555b-241272077+099712528+7866849-06585+53784+0021-0327
4+5409499317-341038368+099820036+7881003-07570+53726+0317-0330
5+5417388220-440912133+09^927438+7897135-08563+53679+0014-0332
6+5425294252-540893218+100034760+7915262-09565+53644+0010-0335
7+5433219414-640981613+100142023+7935401-10575+53621+0006-0338
OOOOOOOOOOOOUOOOOOOOCOOOC0000000OOOOOOO00OOOOO00 0000000000000
oooooooooooooooooooo ooc ooooooo^oooooooooo: oooooooooo^ooo oo
000000"000,:000; 000COOO 000 000jOOO 3000000:0000000000000000000
3+5501331520-233351772+099699425+7973431-06517+52797+0024-0331
4+5509311800-333103970+099804950+7987461-07514+52731+0020-0334
5+5517307109-432961632+099910355+8003492-08519+52676+0016-0336
6+5525319457-532924648+100015662+8021541-09532+52633+0013-0339
7+5533350869-6329«2930+100120893+8041624-10553+52600+0009-0342
0000000000000000000000000000000 OOOOOO^OOOGOOOOOCOC 00 OOODOOO
000000000000001000:00000000000000000000000300000000000000:0000
oooooooo -ooooooo-ooo.;ooooooo:;ooo ooo-ooooooocooocooo:oooo000:0
3+5601024453-225325876+099686465+8078028-064^2+51798+0026-0335
4+5609109257-325064113+099789986+8091918-07449+51724+0023-0337
5+5617208963-424905802+099893370+8107831-08465+51662+0019-0340
6+5625325600-524850815+0999 6639+8125785-09490+51610+0 15-0343
7+5633461218-624899049+100099816+8145795-10522+51569+0012-0346
ooooo .0000000000 oooo 000000^000:000 • ;ooo:oo) .00^ooo ooo :oo::
oooooooooo ooo:ooocooooooo ooooooo ooooooooooooooo ooooooo ooo
ooo-oooooo:ooooooo~ooooooo:ooo 0000:00  ooo ooo :oo ooo 000:000
3+5700704503-217196385+099673664+8180617-06358+50789+0029-0338
4+5708891817-316920810+099775158+8194351-07377+50707+0025-0341
                                F-8

-------
5+5717093887-416746650+099876499+8210131-08404+50636+0022-0344
6+5725312766-516673764+099977709+8227972-09439+50576+0018-0346
7+5733550524-616702031+100-78810+8247892-10482+50526+0015-0349
00000 0000000':000 OOOOOOOOOOOOOOOOOOOOOOOCOOOOOOOOOOOOOOOOOOOO
oooooooooooooooooocQoooooon:oo ooo  00:000:000 000:000 :oo ooo
00000000 00000000000 000.00000000000000"0000CO0.000"000 OOOCOO
3+5800371839-208965319+099661037+8281175-06267+49768+0032-0342
4+5808659624-308676094+099760482+8294738-07297+49679+0028-0345
5+5816962004-408486227+099859759+8310368-08335+49600+0025-0347
6+5825281055-508395563+099958889+8328082-09380+49532+0021-0350
7+5833618867-608403963+10P057892+8347894-10434+49474+0018-0353
00000000 000 000 OOOOOOO 000-0000000000000000000 0000000000000
00000000000000000"OOOCOOr 00000000000 0000000 ,0000000 000 GOO,0
0000000007'000000000000000GOOOO000 • 000000OC00000000000000'..',0000
3+5900026641-200634719+099648599+8379682-06169+48737+0034-0345
4+5908412837-300332022+099745975+8393059-07209+48640+0031-0348
5+5916813454-400126607+099843166+8408523-08257+485^3+0027-0351
6+5925230585-500018300 + 099940195+8426092-093,13+48477 + 0024-0353
7+5933666344-600006949+100037080+8445779-10377+48410+0021-0356
00000JOOOOOOO^00000000000000000000000 000000000000000000000000
OOOCOOOOOOO 000000000000000 0000000000000000000000 000 : OOOOOO
00000000000000000.0000000000:000'ooooooo :oooooooooooooo .000:0
3+5999669105-192206647+09963636<:.+8476116-06063+47696 + 0 036-0349
4+6008151634-291890672+099731651+8489291-07114+47591+0033-0351
5+6016648391-391669882+099826737+8504575-08171+47497+0030-0354
6+6025161492-491544086+099921644+8521982-09237+47412+0027-0357
7+6033693068-591513116+100016391+8541529-10311+47337+0023-0359
OOOOCOOOOOOO' 0000000 00000000000000000000000~00 '0000000OOOOOO
oooocooooooooooo00000000:0000000 ooooooooooooooooooooooocooooo
0000000000000 OOOOOO'  0000000000 000 ;000 00000000000 1000000000
3+6099299445-183683185+099624351+8570457-05950+46644+0039-0352
4+6107876205-283354142+099717526+8583416-07010+46532+0036-0355
5+6116466987-383118165+099810486+8598503-08078+46430+0032-0357
6+6125073926-482975049+099903252+8615733-09153+46337+0029-0360
7+6133699173-582924610+099995842+8635122-10237+46254+0026-0363
ooocoootjoooi'000000000000000,-oooooooo000:0000ooo 00000000000:00
OOOOOO iOOOOOOO:'000 00000000000000000000000 OOOOOOOOOOOOOO: :00
oooooooooooooooooo oooooooooooooooooo^ oooooooooo ooo :oo.ooo
3+6198917885-175066437+099612570+8662685-05830+45583+0041-0355
4+6207586756-274724549+099703614+8675414-06900+45464+0038-0358
5+6216269428-374473589+099794430+8690289-07977+45354+0035-0360
6+6224968055-474313339+099885036+8707326-09061+45254+0032-0363
7+6233684805-574243598+099975450+8726540-10154+45162+0029-0366
000000000000000000000000000000.0000000 OOOOOO OOOOOOO 000  0000
OOOOGOO~000'. 0000000000000000000300000000000 OOOOOOO ,000000  00
00000000000000000 J00000000000OOOOOOO -,0000000000000000000 0000 0
3+6298524667-166358525+09^601036+8752782-05703+44512+0044-0358
4+6307283510-266004030+099689932+8765265-06782+44386+0041-0361
5+6316055918-365738308+099778585+8779913-07868+44269+0038-0363
6+6324844062-465561124+099867012+8796741-08962+44160+0035-0366
                               F-9

-------
7+6333650131-565472262+099955232+8815764-10063+44061+0032-0369
0000000 O00'~ 000000000000000 000';000 00000000000000000000 000000^0
00000000000000000?OOO^Opt)OOOOGOOOOOOOOOOOOOOOOOO::000 ^000000000
0000000OOOOOOOPPOOO»;OOOCUOOOOOOOOOOOOOO:00 )0000000 '000^0000000
3+6398120044-157561590+099589764+8840727-05568+43432+0046-0362
4+6406966701-257194741+099676493+8852950-06656+43299+0043-0364
5+6415826673-356914490+099762964+8867357-07751+43174+0040-0366
6+6424702148-456720589+099849195+8883961-08854+43058+0037-0369
7+6433595332-556612806+099935203+8902778-09964+42951+0034-0371
oooojooooooooooooooooooonooooooooooooooooooo000:00000000000000
000000000000000000OOOOOOOOCOOOCOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO^
ooooooooooooooo ooroooeooo'iooocooooooo ooooooooooooooooooooooo
3+6497704286-148677793+099578768+8926504-05427+42343+0048-0364
4+6506636582-248298857+099663312+8938453-06524+42203+0045-0367
5+6515581926-348004326+099747584+8952603-07628+42071+0042-0369
6+6524542527-447793940+099831601+8968968-08739+41948+0040-0372
7+6533520606-547667450+099915380+8987563-09857+41833+0037-0374
000000000000H OOOOOOOOOOOOOOOOOOOOOOOOOOCOOOOOOJOOOOOOO "000000
oooooooooooooooooooooooooo^ooooooooooooooooocr 00000000000:0000
ooooooooooooooooo.ooooooiooooooocoooooooooooooooooo^oooooooooo
3+6597277676-139709312+099568061+9010093-05279+41245+0050-0367
4+6606293416-239318568+099650403+9021755-06384+41098+0048-0370
5+6615321926-339010022+099732459+9035635-07496+40959+0045-0372
6+6624365430-438783396+099814245+9051746-08616+40829+0042-0374
7+6633426166-538638429+099895779+9070103-09743+40706+0040-0377
00000000000000000000000000000°00000010000000000000000000000000
ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
000000000000000030000000000000000000 0000000000000000000000000
3+6696840508-130658342+099557656+9091479-05124+40139+0053-0370
4+6705937482-230256085+099637779+9102840-06238+39985+0050-0372
5+6715046933-329933800+099717603+9116435-07358+39840+0047-0375
6+6724171102-429691196+099797143+9132278-08486+39702+0045-0377
7+6733312243-529527997+099876415+9150382-09620+39572+0042-0379
ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo:
OOOOOOOOOOOOOOO0000000000000000000000000000000000C00000000000"
OOOOOOOCOOOOOOOOOOOOOOQOOOOOOOCOOOOOOOi'OOOOOOO" OOOOOOOOOOOOOOO
3+6796393093-121527094+099547567+9170644-04963+39025+0055-0373
4+6805569074-221113632+099625455+9181691-06085+38864+0052-0375
5+6814757226-320777901+099703030+9194988-07213+38712+0050-0377
6+6823959804-420519594+099780308+9210548-08348+38567+0047-0380
7+6833179081-520338423+099857304+9228385-09490+38430+0045-0382
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOC000000000000000000000000000
00000000000000000000000000000000000000000000000000.^00000000000
OOOOOOJOOOOOOOOOOOOOOOOOOOOOO^OOOOOOOOOOOOOO'OOOOOOO 000000000
3+6895935753-112317799+099537807+9247572-04796+37902+0057-0375
4+6905188497-211893452+099613444+9258293-05925+37736+0054-0377
5+6914453093-311544578+099688755+9271278-07061+37577+0052-0380
6+6923731812-411270859+099763755+9286541-08203+37425+0049-0382
7+6933026939-511071990+099838459+9304096-09353+37280+0047-0384
00000000000000.0000000000000000000000.000000 OOOCOOO '0000000CO
                             F-10

-------
ooooo 'ooocooo j 000.^0003 ooooooo oooo oooooooo ooooooooooo000:000^0
ooooo;ooo"ooo 'ooooooo -ooooooo:ooooooo 000000000000000000000:0
3+6995468821-103032701+099528388+9322 48-04623+36772+0059-0378
4+7004796071-202597802+099601758+9332629-05759+36600+0056-0380
5+7014134839-302236104+099674791+9345290-06902+36434+0054-0382
6+7023487414-401947275+099747499+9360243-08052+36276+0052-0384
7+7032856093-501730999+099819897+9377502-09208+36124+0049-0387
OOOOOOOOOOO30000COOGOOOOOOOJOOOOOOOOOOOOOOOOOOO:00000000000000
OOOOOOOO'^OOOOOOO 000000000000000000 ^000000'0000 OOOOOOOO 0000 00
000000000000000000000-000000 '000-000 000'000 000 .0000000000000
00000-000. 0000000:OOOCOOOOOOO .OOOOOOO 00 .OOOOOOO •: 00000000000 30
4+7104392126-193228954+099590411+9404686-05587+35456+0058-0382
5+7113802782-292854763+099661150+9417009-06737+35284+0056-0384
6+7123226913-392551142+099731552+9431639-07893+35119+0054-0387
000000000000000-000:000 >300.000:00000000000:00000000000ooooooo
00000000000000000000000000000 "0000000000OOOOO'=000000: 000 OOOOO
0000-0000000:0000000000^0000000.000:000 ooooooooooooooooooooooo
OOOOOOOOOf0000000000000000000^000000000000000000^000 000 OOOOO
ooooooooooooooooooocooo"'oooooooooooooooooo :obo 000:000oooooooo
4+7203977009-183789195+099579414+9474<*49-05409+34306 + 0060-0385
5+7213457252-283402855+099647847+9486422-06565+34128+0058-0387
6+7222950627-383084772+099715929+9500715-07729+33956+0056-0389
0000000000000^0000000000000000000000 oooooooo •/ooooo ooo ooo oooo oo
00000000000000000000000000000000000000'OOOOOOO000 ;COOOOOOO0000
ooooaoooooooooooc:oooooooooooooooooo :ooo 0000000:0000000000000
ooooooooooooooonooooooooooooooocooooooo ooooooo oooooooooooooo
00000000000000000000000000000OOOOQO000000OOOOO00000000000 ;0000
4+7303551076-174280825+099568780+9541904-05224+33149+0062-0387
5+7313098592-273882692+099634892+9553515-06388+32965+0060-0389
6+7322658884-373550490+099700643+9567459-07557+32787+0058-0391
OOOOOOOOOOOOOOOOOOOOOOOOOCOOOOOOOOOOOOOOOOOOiQOOOOOOOOOOOOOOOO
OODOOOOOOOO000000000000000GOOOOOOOOOOOGOOOOOOOOOOO0000OOOOO000
0000000000000000000000000000000000000:000oooooooo1000000000000
00000000OOOOOOO00000000000000000000.1000 OOOOOOO OOOOOOOOOOOOOO
000000000000000000000OOOOOOOOOOOOOOOO 'OOOOOOO OOOOOOO OOOOOOOO
4+7403114695-164706160+099558521+9607039-05034+31985+0064-0389
5+7412727157-264296602+099622300+9618276-06204+31795+0062-0391
6+7422352028-363950635+099685705+9631858-07379+31611+0060-0393
000000000000000000000000000000000000000000000?00010000000.000
000000000^ OOOOOOO00000000000'-OOOOOOO 000 000'00000000000. OOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOL0003000-000 OOOGOOOO
00000000000000000000000003ooooooooooonoooooooooo:o00:000000000
000000000000000C000OOOOOOOO--00030000000 OOOOOOOOOOOOOO 000'000
4+7502668246-155067526+099548647+9669839-04839+30815+0066-0391
5+7512343316-254646922+099610080+9680692-06014+30620+0064-0393
6+7522030415-354287559+099671129+9693901-07196+30430+0062-0395
00000000000000000000030000000000' 000'OOOOOOO.000000000000000 0
000000000000000000OOOOOOOO'OOOOOOOOOOOOOO"OOOOOOO .000000000000
OOG000000000000000000000000000  OOOOOOOOOOOOOO 000 000 000 0000
OOOOO.'10000000 30000000''OOOOOOO00000000000000000000000 000 OOOOO
                               F-ll

-------
00000000 .'000000000000000000000000000003000 0000000000000000000
4+7602212121-145367263+099539170+9730294-04638+29639+0068-0393
5+7611947446-244936004+099598246+9740750-05819+29438+0066-0395
6+7621694411-344563623+099656926+9753575-07006+29243+0064-0397
OOOOOOOO'^OOO^OOOCOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO'OOO
OOOOOCOOOOOOOOOOOOOOiOOOC000000000000000000 ^000000000000000000
oooooooooooooooooonooooooooooooooooooooooooooooooooooooooooooo
oooooooooooooooooooooooooooooooooooooooooooooooonooo"ooooooo o
oooooooooooooooooopoooooonooooooocoooooooooooooooooooooo ooooo
4+7701746721-135607723+099530100+9788391-04432+28457+0070-0395
5+7711539940-235166211+099586807+9798441-05619+28251+0068-0397
6+7721344396-334781203+099643109+9810869-06811+28051+0066-0398
0000000000uOOOOOOOOOOOOOOOOOOCOOO0000COOOC00000000000OOOOO0000
OOOOOOOCOOOOOOOOOOOOOOOOOOOOOOJOOOOOOOOOOOOOOOOOOOOOO 00000000
ooooooooooooooooonooooooonoooooo:coooooo ;ooooooo ooooooooooooo
oooooooooooooooooooooooooooooooooooooooooooooooooocooooooooooo
0000000000000000000000000000000000000000000000000000000 '000300
4+7801272459-125791270+099521447+9844120-04220+27270+0071-0397
5+7811121197-225339916+099575775+9853752-05413+27059+0069-0398
6+7820980760-324942682+099629687+9865774-06610+26853+0068-0400
0000000000000000000000000000000000000000^000000000000000000000
00000000000000000000000000000000 :>000000 30000000000000000000000
0000000000000 OOOOOOOOOOOOOOOOOOGOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
000000OOOOQOOOOOOOOOO0000000000000000000000000000000^000000000
000000000000000000000000000000000000000000000r00000000000 0000
4+7900789757-115920277+099513221+9897469-04004+26078+0073-0398
5+7910691629-215459503+099565160+9906674-05202+25862+0071-0400
6+7920603906-315050455+099616672+9918279-06404+25651+0070-0402
00000000000000000000000000000000000000000000000000000000000000
OOOOOOOOOOOOOOOOOQOOOOOOOOOOOOOOOOOOOOOOOOOOCOOOOOOOOOOOOOOOOO
00000000000000000000000000000000000000100000000000 00000000000
OOOOQOOOOOOOOOOOOOOOGOOOOOOOOOOOOOOOOOOOOOOOOOOOOO '00000000000
oooooooooooooooooooooooooooooooooooooooooooocooooooooooooooooo
4+8000299047-105997129+099505432+9948428-03784+24880+0074-0400
5+8010251659-205527367+099554972+9957197-04986+24660+0073-0401
6+8020214244-305106927+099604075+9968375-06193+24444+0071-0403
OOOOOOOOOOOOOOOOQOOOOOOOOOOOOOOOOOOnOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOiJOOOOOOOOOOOOOOOOOO ^00030
                            F-12

-------
C      THIS PROGRAM WRITES UTM ZONE TO ZONE  TRANSFORMATION TABLES  TO
C      DISK USING THE FORTRAN DIRECT ACCESS  I/O METHOD.  THE TABLES
C      COVER UTM ZONES ON THE CLARKE 1866 SPHEROID  THAT  SPAN THE U.S.
C      THE TABLES ARE ACCESSED WHEN THE GTGR SUBROUTINE  IS CALLED  TO
C      TRANSFORM UTM COORDINATES FROM ONE ZONE TO AN ADJACENT ZONE.
C
       DIMENSION Bl(8, 8)
       REAL*8 Bl
       DEFINE FILE 3(61, 512,L, IJK)
C
C      TABLES ARE CARD INPUT AND WRITTEN ON  DISK.
C      CARD COLUMN ONE IS SKIPPED.
C
       DO 10 JBLOCK=1,61
       READ(5, 1000)  ((B1(I, J),J-l,8),1-1,8)
       WRITE(3'JBLOCK) Bl
    10 CONTINUE
       IJK-1
C
C      TABLES ARE READ FROM DISK AND PRINTED.
C
       DO 20 JBLOCK-1,61
       READ(3'JBLOCK) Bl
       WRITE(6,2000)  ((Bla,J),J-l,8),1-1,8)
    20 CONTINUE
  1000 FORMAT (IX, F11. 3, 2F10. 3,F8. 3, 2F6. 3, 2F5. 3)
  2000 FORMAT(IX, F12. 3, 2F11. 3, F9. 3, 2F7. 3, 2F6. 3)
       STOP
       END
                                 F-13

-------
                                   TECHNICAL REPORT DATA
                            (Please read Instructions on the reverse before completing)
 I. REPORT NO.
         EPA-450/3-78-009
                             2.
                                                           3. RECIPIENT'S ACCESSION-NO.
4. TITLE AND SUBTITLE
 Computer Assisted Area Source  Emissions (CAASE)
 Gridding Procedure (Revised)
 IBM  370/OS Version User's Manual
             5. REPORT DATE

              March 1978
             6. PERFORMING ORGANIZATION CODE
7. AUTHOR(S)
 Richard Haws
 J. W.  Dunn, III
                                                           3. PERFORMING ORGANIZATION REPORT NO.
9. PERFORMING ORGANIZATION NAME AND ADDRESS

 Research Triangle Institute
 Research Triangle Park, North  Carolina  27709
                                                           10. PROGRAM ELEMENT NO.
             11. CONTRACT/GRANT NO.
                                                             68-02-2501
12. SPONSORING AGENCY NAME AND ADDRESS
 Environmental Protection Agency
 Research  Triangle Park, North  Carolina  27711
                                                           13. TYPE OF REPORT AND PERIOD COVERED

                                                             Final Report  -  March 1Q78
             14. SPONSORING AGENCY CODE
                                                                  200/04
15. SUPPLEMENTARY NOTES
16. ABSTRACT
       Atmospheric dispersion modeling programs such as the  Climatological Dispersion
  Model (COM), Air Quality Display Model (AQDM), and Implementation Planning Program
  (IPP) are among the most basic tools used for evaluation of air quality and State
  Implementation Plans  (SIP's).  Since emissions data comprise the most important input
  information for these models, any factor affecting the availability and completeness
  of the emissions data has a significant impact on the results of the modeling pro-
  grams.  Procedures for  formatting emissions from point sources are well defined,
  however area source emission data present problems.  Usually the smallest geographic
  unit for which accurate primary data are available is the  county.  These data must be
  disaggregated and appropriately allocated to smaller areas to provide an adequately
  detailed input.

       The Computer Assisted Area Source Emissions gridding  programs with associated
  subroutines containing  automated gridding procedures provide an objective method for
  allocating^ county-level  data to grid squares selected on the basis of demographic
  features and sized to give appropriate detail for input to air quality modeling
  programs.
17.
                                KEY WORDS AND DOCUMENT ANALYSIS
                  DESCRIPTORS
b.lDENTIFIERS/OPEN ENDED TERMS  C. COSATI Field/Group
 Modeling
 Area Sources
 Emissions
 Gridding
13. DISTRIBUTION STATEMENT
 Release Unlimited
                                              19. SECURITY CLASS (This Report)
                           21. NO. OF PAGES
                                486
20. SECURITY CLASS (Thispage)

  Unclassified
                           22. PRICE
EPA Form 2220-1 (9-73)

-------