Document ID: EPA-R09-OAR-2017-0537-0017
Agency: epa
Document Type: Supporting & Related Material
Title: 
Posted Date: 2018-02-16T05:00Z

Douglas 2016 SO2 Maintenance Plan docket -- modeling readme		2018-02-06
	See also the modeling TSD and MRLC_NED_files.txt.
	The actual NED files, and files used in creating maps, are available upon request.

Notes on AERSCREEN modeling and post-processing.

+--AERSCREEN
|  +--Fairview
|  +--Lhoist_k4
|  +--Lhoist_k5
|  +--MdC_B
|  \--MdC_K
+--maps
|  +--EGP_pieces
|  +--locns
|  \--shapes
+--NED
+--post-indiv
|  \--scripts
\--post-sums

------------------------------------------------------------
@ Top level files
@ Modeling File Naming -- Short Version
@ Modeling Files -- Details
@ AERSCREEN modeling input and output
@ Post-processing  (step numbers from the modeling TSD)
@ 1. Find the maximum concentration at each receptor point, regardless of season
@ 2. Interpolate concentrations to a common set of rectangular grid points
@ 3. Sum the concentrations for the emitting units within a facility
@ 4. Sum the facilities' concentrations at each point
@ 5. Scale the 1-hour concentrations to get 24-hour concentrations
@ 6. Extract concentrations for just the DMA
@ 7. Extract the overall maximum concentration
@ 8. Add maxima from ADEQ modeling of other sources, and monitored background concentration

############################################################

------------------------------------------------------------
@ Top level files

modeling_readme.txt       - this file, description of modeling
mapping_readme.txt        - description of mapping items in maps\
top_10_24hr_in_DMA.txt    - top 10 24-hour concentrations
EPA_Douglas_modeling.xlsx - source parameters, results tables, coordinates
MRLC_NED_files.txt for description of NED elevation files

Also, copies of the AERSCREEN input files from the respective facility subdirectories.
	Fairview_elev_aer.inp
	k4_32km.inp
	k5_32km.inp
	MdC_B_1b.inp
	MdC_K_1b.inp

############################################################

@ Modeling File Naming -- Short Version

Area subsets

DMA = Douglas Maintenance Area
_DMA = only points within the DMA per se
_DMAbox = points within box (rectangle) containing the DMA
_full = full AERSCREEN domain, different for each source; not limited to DMA

Note: All X,Y coordinates are UTM zone 12 easting and northing in km.  The DMA box is a UTM rectangle that contains the corners of the DMA after they were converted from longitude and latitude.

File extensions

.grd  Surfer binary grid format; values for regularly-spaced X,Y grid
.dat  space-delimited text X, Y, C, converted from Surfer .grd; 
	incl.: _DMA_xyc.dat DMA-only concentrations (non-DMA removed)
.txt  plain text or tab-delimited text

Facilities and units

Fairview  - APS Fairview turbine
Lhoist  - Lhoist Douglas Chemical Lime Plant
	Lhoist_k4  - Lhoist kiln 4
	Lhoist_k5  - Lhoist kiln 5
MdC  - Mexicana de Cobre chemical lime plant
	MdC_B  - MdC boilers
	MdC_K  - MdC kilns

Fairview_Lhoist  - sum of Fairview and Lhoist
F_L_M            - sum of Fairview, Lhoist, and MDC

------------------------------------------------------------
AERSCREEN modeling

AERSCREEN\
	and facility subdirectories

Input files
	Fairview_elev_aer.inp
	k4_32km.inp
	k5_32km.inp
	MdC_B_1b.inp
	MdC_K_1b.inp

Debug concentrations.txt output files, to extract from
	FAIRVIEW_ELEV_concentrations.txt
	Lhoist_K4_32km_concentrations.txt
	LHOIST_K5_32KM_concentrations.txt
	MDC_B_concentrations.txt
	MDC_K_concentrations.txt

------------------------------------------------------------
Post-processing for individual units
	extraction of concentrations (max over month/season/surface sector)
	interpolation to common grid within DMAbox using Surfer

post-indiv\
post-indiv\scripts\

_xyzc.txt     - extracted X,Y,Z,C: UTM X,Y, Z elevation, Concentration
_CRZAmet.txt  - extracted X,Y and Conc, Radius, Z, Angle and meteorology
_summ.txt     - extraction summary
_DMAbox.grd   - interpolated points within DMAbox (Surfer)

------------------------------------------------------------
Post-processing for sums of units and facilities
	sum units, and scale and sum facilities, using Surfer

post-sums\

concentrations within DMAbox
	_sum_DMAbox.grd    - sum over units or over facilities
	_sum24_DMAbox.grd  - sum scaled to 24-hour concentrations (mult. by 0.6)

concentrations within DMA
	_sum24_DMA.grd     - sum scaled, non-DMA "blanked" (set to 1.70141E+038)
	_sum24_DMA.dat     - text version of sum scaled, non-DMA "blanked"
	_sum_DMA_xyc.dat   - text of sum (not scaled), non-DMA deleted
	_sum24_DMA_xyc.dat - text version of sum scaled, non-DMA deleted

############################################################

@ Modeling Files -- Details

============================================================

@ AERSCREEN modeling input and output
AERSCREEN\

The spreadsheet EPA_Douglas_modeling.xlsx lists the facility emission rates and stack parameters, which were copied from ADEQ's work. Source coordinates from EPA’s 2014 National Emissions Inventory (NEI)  and Mexico’s 2008 Inventario Nacional de Emisiones de México (Mexican National Emissions Inventory, INEM ), as cited by ADEQ.  The minimum and maximum distances for AERSCREEN receptors, "Amb. dist." and "Probe", respectively, were determined from the distances between a facility location and DMA: distance to nearest DMA corner or edge, and to farthest DMA corner or edge.

Fairview ----------
Minimum/Ambient:       0 m, since Fairview is within the DMA (reset to 1 m within AERSCREEN)
Maximum/Probe:   14500.0 m, rounded up from 14.479 km distance to DMA NW corner

Lhoist ----------
Minimum/Ambient:  8038.491 m, copied from ADEQ (26,373 ft), since smaller than calculated 8345.9 m distance to DMA West edge
Maximum/Probe:   27950 m, rounded up from 27942.9 m distance to DMA SE corner

Mexicana de Cobre ----------
Minimum/Ambient:  9846.564 m, distance to DMA South edge (US-Mexico border), smaller than ADEQ's 10 km (32,822 ft)
Maximum/Probe:   24625.0 m, rounded up from 24619.4 m distance to DMA North edge

AERSCREEN input files
	Fairview_elev_aer.inp
	k4_32km.inp
	k5_32km.inp
	MdC_B_1b.inp
	MdC_K_1b.inp
Note: The above short .inp files were actually used as AERSCREEN input. The other, longer .inp files below are just the last AERSCREEN.INP generated during AERSCREEN processing.

AERSCREEN output files, in subdirectories for each facility unit  

Fairview\   --APS Fairview
	Fairview_elev_aer.inp
	FAIRVIEW_ELEV.inp
	FAIRVIEW_ELEV.OUT
	FAIRVIEW_ELEV_max_conc_distance.txt
	FAIRVIEW_ELEV_concentrations.txt

Lhoist_k4\   -- Lhoist kiln 4
	k4_32km.inp
	Lhoist_K4_32km.inp
	Lhoist_K4_32km.out
	Lhoist_K4_32km_max_conc_distance.txt
	Lhoist_K4_32km_concentrations.txt
Lhoist_k5\   -- Lhoist kiln 5
	k5_32km.inp
	LHOIST_K5_32KM.inp
	LHOIST_K5_32KM.OUT
	LHOIST_K5_32KM_max_conc_distance.txt
	LHOIST_K5_32KM_concentrations.txt

MdC_B\   -- Mexicana de Cobre boilers
	MdC_B_1b.inp
	MDC_B.inp
	MDC_B.OUT
	MDC_B_max_conc_distance.txt
	MDC_B_concentrations.txt
MdC_K\   -- Mexicana de Cobre kilns
	MdC_K_1b.inp
	MDC_K.inp
	MDC_K.OUT
	MDC_K_max_conc_distance.txt
	MDC_K_concentrations.txt

NED\   - (zipped) elevation files used by AERSCREEN
	MRLC_NED_files.txt - description of the NED files
	zipped USGS National Elevation Dataset (NED) files downloaded from MRLC:
		NED_43545157.zip - for Fairview
		NED_85588560.zip - for Lhoist
		NED_08392456.zip - for Mexicana de Cobre

============================================================

@ Post-processing  (step numbers from the modeling TSD)

post-indiv\  -- steps 1 & 2: extraction and gridding for individual units
	post-indiv\scripts\    -- scripts used in extraction
post-sums\   -- steps 3 - 7: sum units & facilities, scale to 24-hr average

------------------------------------------------------------
------------------------------------------------------------

Post-processing for individual units

------------------------------------------------------------
@ 1. Find the maximum concentration at each receptor point, regardless of season
post-indiv\
	xascr.pl output: *_xyzc.txt and *_summ.txt (and *_CRZAmet.txt)

Files with data extracted from the AERSCREEN debug concentrations.txt files. Extraction was done using the xascr.pl script to compute X, Y Cartesian coordinates (UTM) and to find the highest concentration for each receptor among the various meteorological conditions modeled in AERSCREEN. (I.e. the maximum over the combinations of month/season/surface sector; in this case, just the 4 seasons.)  

	  Full domain for source           DMA only
	Fairview_full_CRZAmet.txt        Fairview_DMA_CRZAmet.txt
	Fairview_full_summ.txt           Fairview_DMA_summ.txt
	Fairview_full_xyzc.txt           Fairview_DMA_xyzc.txt
	Lhoist_k4_full_CRZAmet.txt       Lhoist_k4_DMA_CRZAmet.txt
	Lhoist_k4_full_summ.txt          Lhoist_k4_DMA_summ.txt
	Lhoist_k4_full_xyzc.txt          Lhoist_k4_DMA_xyzc.txt
	Lhoist_k5_full_CRZAmet.txt       Lhoist_k5_DMA_CRZAmet.txt
	Lhoist_k5_full_summ.txt          Lhoist_k5_DMA_summ.txt
	Lhoist_k5_full_xyzc.txt          Lhoist_k5_DMA_xyzc.txt
	MdCB_full_summ.txt               MdCK_DMA_summ.txt
	MdCB_full_xyzc.txt               MdCK_DMA_xyzc.txt
	MdCK_full_summ.txt               MdCB_DMA_summ.txt
	MdCK_full_xyzc.txt               MdCB_DMA_xyzc.txt

No "CRZAmet" files were created for Mexicana de Cobre.
The DMA files were used only for the map of receptors.

Types of concentration files extracted using xascr.pl:

*_summ.txt  --------------------
	Summary file
Text summary of the extraction; includes tables of the maximum concentration at each distance and at each wind angle, with their corresponding meteorological data.

*_xyzc.txt  --------------------
	X,Y coordinates, Z elevation, Concentration
tab-delimited; UTM coordinates, elevation, concentration, distance, and angle
header line:
X	Y	Z	C	R	A

Note that elevation Z is relative to mean sea level, i.e. it adds the source elevation to the "Elevation" in the original concentration.txt (which has elevation is relative to the source at zero).

Note that the wind angles here and in AERSCREEN are flow directions, i.e. the direction wind is blowing *toward*, measured clockwise from north at zero degrees.

*_CRZAmet.txt  --------------------
	C R Z A met: Concentration, Radius, Angle, Z elevation, Meteorology
tab-delimited, UTM coordinates prepended to concentration.txt variables including meteorology.
header line:
easting	northing	Concentration	Distance	Elevation	Flow	Season/Month	Zo sector	Date	H0	U*	W*	DT/DZ	ZICNV	ZIMCH	M-O LEN	Z0	BOWEN	ALBEDO	REF WS	AnemH	REF TA	TempH

This has all the same fields as the original concentrations.txt; however they are tab-delimited, have UTM coordinates prepended, and the wind speed and temperature reference height headings are 'AnemH' and 'TempH' (instead of both 'HT'). Elevation Z remains *relative* to source's at zero.

post-indiv\scripts\    -- scripts used in extracting from AERSCREEN output
	xascr.pl       - Perl script to extract data from AERSCREEN output
	xascr.htm      - xascr.pl documentation (converted from POD within script)
	xascr_FLM.bat  - batch file for concentration extraction

"bounds" files for script
	srcz_Fairview.txt  - source coordinates and elevation
	srcz_Lhoist.txt
	srcz_MdCobre.txt
	DMA_bounds_2rect_Fairview.txt  - source coordinates, and DMA as two rectangles
	DMA_bounds_2rect_Lhoist.txt
	DMA_bounds_2rect_MdC.txt
		See 'MA_coords' sheet of EPA_Douglas_modeling.xlsx

------------------------------------------------------------
@ 2. Interpolate concentrations to a common set of rectangular grid points
post-indiv\
	Surfer output *.grd

Files interpolated to grid by Surfer 8, and limited to box containing the DMA
	Fairview_DMAbox.grd
	Lhoist_k4_DMAbox.grd
	Lhoist_k5_DMAbox.grd
	MdCB_DMAbox.grd
	MdCK_DMAbox.grd

The interpolation was 1/r^2.
Grid Size: 	100 rows x 131 columns
Grid Geometry
	X Minimum:	628547.275
	X Maximum:	648061.33
	X Spacing:	150.10811538461
	Y Minimum:	3467426.464
	Y Maximum:	3482230.307
	Y Spacing:	149.53376767677
(The corners of the box are also in the file "maps\shapes\Douglas_SO2_MA_box_UTM.bln")

------------------------------------------------------------
------------------------------------------------------------

Post-processing for sums of units and facilities

------------------------------------------------------------
@ 3. Sum the concentrations for the emitting units within a facility
post-sums\
	"_sum" <-- individual units

Individual facilities
	Fairview_DMAbox.grd
		no unit summing, since just one unit

	Lhoist_sum_DMAbox.grd
		sum of Lhoist_k4_DMAbox.grd and Lhoist_k5_DMAbox.grd

	MdC_sum_DMAbox.grd
		sum of MdCB_DMAbox.grd and MdCK_DMAbox.grd

------------------------------------------------------------
@ 4. Sum the facilities' concentrations at each point
post-sums\

Facility sums
	Fairview_Lhoist_sum_DMAbox.grd
		sum of Fairview_DMAbox.grd and Lhoist_sum_DMAbox.grd; intermediate sum

	F_L_M_sum_DMAbox.grd
		sum of Fairview_Lhoist_sum.grd and MdC_sum_DMAbox.grd; overall sum

------------------------------------------------------------
@ 5. Scale the 1-hour concentrations to get 24-hour concentrations
post-sums\
	"sum24" <-- "sum"
		scaled *_DMAbox.grd by 0.6 to give 24-hr concentrations

Individual facilities
	Fairview_sum24_DMAbox.grd
	Lhoist_sum24_DMAbox.grd
	MdC_sum24_DMAbox.grd

Facility sums
	Fairview_Lhoist_sum24_DMAbox.grd  (not used)
	F_L_M_sum24_DMAbox.grd

============================================================

** blanking file: 

"_sum" means sum over units or facilities
"_sum24" means sum scaled to a 24-hour value via multiplying by 0.6

------------------------------------------------------------
@ 6. Extract concentrations for just the DMA
post-sums\

---------------
- 6a. "Blank" values outside DMA
	"DMA" <-- "DMAbox"

applied "blanking" to give DMA-only receptors
For grid notes outside the DMA (Surfer blanking file: maps\shapes\Douglas_SO2_MA_UTM_blankout.bln), Surfer sets concentration to 1.70141E+038 to represent a blank that is not plotted.

Individual facilities; for plot DMA_conc_indiv.srf / DMA_conc_indiv.png
	Fairview_sum24_DMA.grd
	Lhoist_sum24_DMA.grd
	MdC_sum24_DMA.grd

Facility sum; for plot DMA_conc.srf / DMA_conc.png
	F_L_M_sum_DMA.grd  -- 1-hr value
	F_L_M_sum24_DMA.grd

---------------
- 6b. Convert to plain text
	"sum24_DMA.dat" <-- "sum24_DMA.grd"

Individual facilities
	Fairview_sum24_DMA.dat
	Lhoist_sum24_DMA.dat

( These files not available, were edited to _DMA_xyc.dat version:
	MdC_sum24_DMA.dat
	F_L_M_sum_DMA.dat
	F_L_M_sum24_DMA.dat   )

---------------
- 6c. Remove values outside DMA
	"sum24_DMA.dat_xyc" <-- "sum24_DMA.dat"
	deleted lines with "blanked" values (1.70141E+038), plain text

Individual facilities - used to find individual facility maxes
	Fairview_sum24_DMA_xyc.dat
	Lhoist_sum24_DMA_xyc.dat
	MdC_sum24_DMA_xyc.dat

Facility sums - used to find overall max
	F_L_M_sum_DMA_xyc.dat       1-hr
	F_L_M_sum24_DMA_xyc.dat    24-hr

------------------------------------------------------------
@ 7. Extract the overall maximum concentration
Sort the _sum24_DMA_xyc.dat text files in Excel to get top 10 24-hour concentrations

	top_10_24hr_in_DMA.txt

------------------------------------------------------------
@ 8. Add maxima from ADEQ modeling of other sources, and monitored background concentration
Excel add

 See EPA_Douglas_modeling.xlsx, 'modparms' sheet