concentration_layer.py
The concentration_layer
object runs ISRM-based calculations using a single vertical layer of the ISRM grid. The object inputs an emissions object (from emissions.py
), the ISRM object (from isrm.py
), and the layer number corresponding to the vertical layer of the ISRM grid. The object then estimates concentrations at ground-level resulting from emissions at that vertical layer release range.
Inputs
emis_obj
: the emissions object, as defined byemissions.py
isrm_obj
: the ISRM object, as defined byisrm.py
layer
: the layer number (0, 1, or 2)output_dir
: a string pointing to the output directoryoutput_emis_flag
: a Boolean indicating whether ISRM-allocated emissions should be outputrun_parallel
: a Boolean indicating whether or not to run in parallelshp_path
: data variable file path for the borderoutput_region
: a geodataframe containing only the region of interestverbose
: a Boolean indicating whether the user wants to run in verbose modedebug_mode
: a Boolean indicating whether or not to output debug statements
Attributes
isrm_id
: a Series of all ISRM grid cell IDsreceptor_id
: a Series of all receptor IDsisrm_geom
: the geometry (geographic attributes) of the ISRM gridcrs
: the coordinate reference system associated with the ISRM gridname
: a string representing the run name preferred by the usercheck
: a Boolean indicating whether the program should run, or if it should just check the inputs (useful for debugging)
Calculated Attributes
PM25e
,NH3e
,VOCe
,NOXe
,SOXe
: geodataframes of the emissions (for each pollutant) from that layer re-allocated onto the ISRM gridpPM25
,pNH4
,pVOC
,pNO3
,pSO4
: geodataframes of the concentrations from each primary pollutant from the emissions of that pollutant in thatlayer
detailed_conc
: geodataframe containing columns for each primary pollutant’s contribution to the total ground-level PM2.5 concentrations
Simple Functions
allocate_emissions
: inputs the emissions layer and the ISRM geography, and re-allocates the emissions to the ISRM geography using an area-based allocation procedurecut_emissions
: inputs the pollutant geodataframe from the emissions object and slices it based on the minimum and maximum release heights (minimum inclusive, maximum exclusive) associated with the ISRM vertical layerprocess_emissions
: for each of the five primary pollutants, runsintersect_geometries
and thenallocate_emissions
to return the geodataframes of emissions of each primary pollutant released in thelayer
allocated to the ISRM gridvisualize_individual_emissions
: creates a 5-panel plot of total emissions for each individual pollutant and exports it as PNG filesave_allocated_emis
: outputs ISRM-allocated emissions to a shapefileget_concentration
: for a pollutant’s emission layer (POLe
), the ISRM matrix for that pollutant, and thelayer
ID, estimates the concentration at ground-level for the primary pollutant (pPOL
)combine_concentrations
: merges together all five of the primary pollutant concentration geodataframes (pPOL
) and adds them together to get total ground-level concentrations resulting from emissions released in thatlayer