{"cells":[{"metadata":{},"cell_type":"markdown","source":"<h1>Activities and GHG precursor gases</h1>\n<h2>Justification</h2>\nIn order to analize NOx emissions from Power Plants and remotely sensed, there are several aspects other than NOx emissions or electricity generation that may be worth analyzing:\n* There are other activities which generate NO2 and make difficult to know the Power Plants share; in fact, mobile fuel combustion (vehicles) usually is a larger NOx emitting source\n* I have not found any explicit baseline or emitting reference for NOx in Puerto Rico (this is why I made an estimation for NOx emissions in Power Plants in a separate Notebook: https://www.kaggle.com/ajulian/eia-923-validation-and-nox-emissions-reference ), specially for vehicles\n* Those activities generate other gases than NOx, and by studing their emission patterns in the U.S. we might be able to infer some conclusions for Puerto Rico\n\nTherefore, this Notebook intends to give an overview of:\n* main activities producing three GHG precursors: NOx, SO2 and CO\n* the emission distribution of those gases per activity\n* some numbers regarding passenger vehicle emissions in Puerto Rico\n\nWith this information, we will enumerate some ideas which might be applied to our case:\n- remotely sensed SO2 emissions may help delimit Power Plant NOx emissions in urban areas\n- also remotely sensed CO may help delimit which NO2 emissions are due to vehicles\n\n<h3>Finally, a rough estimate is made of annual NOx emissions due to vehicles in Puerto Rico, to be used as a baseline, and amounts to 31,261 NOx ton per year</h3>"},{"metadata":{},"cell_type":"markdown","source":"<h2>Activities emitting each GHG precursor</h2>\nAlthough the objective of the Kaggle competition is focused in remote sensing of the NOx emitted by generating electricity in Puerto Rico, it is convenient to give an overview of other activities and their emissions patterns. There is a [US report (on page 123)](#Ref1) <a href=\"#Ref1\">US report</a> with the GHG precursors measures (in thousands of tons) in the US for the main polluting activities."},{"metadata":{"_cell_guid":"","_uuid":"","trusted":true},"cell_type":"code","source":"import pandas as pd\nimport matplotlib.pyplot as plt\n\nghg_df = pd.read_csv(\"../input/us-ghg-inventory-2020/us-ghg-inventory-2020.csv\", sep=\";\")\nghg_df","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"First, we will plot the evolution for each gas, and the snapshot for 2018.\n<h3>Main NOx emitting activities in the U.S. (1995-2018)<h3>"},{"metadata":{"trusted":true},"cell_type":"code","source":"ghg_NOx = ghg_df[ghg_df[\"Gas\"]==\"NOx\"].set_index(\"Activity\")\nghg_NOx.T.drop([\"Gas\"]).plot.bar(stacked=True, title=\"Main NOx emitting activities in the U.S.\")","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"raw","source":"We can see there has been a continuous decreasing of NOx emissions; note, however, there are two gaps in the x-axis (years): 1990-2005, 2005-2014.\n\nNow let's plot the NOx share in 2018:"},{"metadata":{"trusted":true},"cell_type":"code","source":"ghg_NOx[\"Year 2018\"].plot.pie(title=\"Main NOx emitting activities in the U.S. (2018)\")","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"The pie chart shows Mobile Fossil Fuel combustion (road and non-road transport) was responsible for 53% of the NOx emissions in 2018, while Stationary combustion (whose main sub-activity is electric power generation) was responsible for a 31%. This can serve as a first view of how can be the NOx emissions share between vehicles and Power Plants in Puerto Rico. \n<h3>Main SO2 emitting activities in the U.S. (1995-2018)<h3>"},{"metadata":{"trusted":true},"cell_type":"code","source":"ghg_SO2 = ghg_df[ghg_df[\"Gas\"]==\"SO2\"].set_index(\"Activity\")\nghg_SO2.T.drop([\"Gas\"]).plot.bar(stacked=True, title=\"Main SO2 emitting activities in the U.S.\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"ghg_SO2[\"Year 2018\"].plot.pie(title=\"Main SO2 emitting activities in the U.S. (2018)\")","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"We can observe stationary sources (Power Plants and other fuel combustion industries) are responsible for more than 70% of SO2 emissions, and (almost) no share from transport. This suggests that when SO2 emissions are sensed, they can safely be attributed to Power Plants or industries. This is likely to be useful for Puerto Rico, where cars are gasoline powered (gasoline emits even less SO2 than diesel).\n<h3>Main CO emitting activities in the U.S. (1995-2018)<h3>"},{"metadata":{"trusted":true},"cell_type":"code","source":"ghg_CO = ghg_df[ghg_df[\"Gas\"]==\"CO\"].set_index(\"Activity\")\n# fig, ax1 = plt.figure(1, 3, (1, 2))\n# fig, ax2 = plt.figure(133)\nghg_CO.T.drop([\"Gas\"]).plot.bar(stacked=True, title=\"Main CO emitting activities in the U.S.\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"ghg_CO[\"Year 2018\"].plot.pie(title=\"Main CO emitting activities in the U.S. (2018)\")","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"We can observe vehicles generate much more CO emissions than stationary sources (7 times more); in this case, the \"Rest\" of the activities is quite big, due to forest fires and others.\n\nNow let's swap the data and see the gas share for each main activity.\n<h3>Gases emitted by Stationary Fossil Fuel combustion in 2018</h3>"},{"metadata":{"trusted":true},"cell_type":"code","source":"ghg_Statio = ghg_df[ghg_df[\"Activity\"]==\"Stationary Fossil Fuel combustion\"].set_index(\"Gas\")\nghg_Statio[\"Year 2018\"].plot.pie(title=\"Gases emitted by Stationary Fossil Fuel combustion in the U.S. (2018)\")","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"<h3>Gases emitted by Mobile Fossil Fuel combustion in 2018</h3>"},{"metadata":{"trusted":true},"cell_type":"code","source":"ghg_Mobile = ghg_df[ghg_df[\"Activity\"]==\"Mobile Fossil Fuel combustion\"].set_index(\"Gas\")\nghg_Mobile[\"Year 2018\"].plot.pie(title=\"Gases emitted by Mobile Fossil Fuel combustion in the U.S. (2018)\")","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"The pie chart shows there is no SO2 emitted by Mobile sources. This reinforces the idea of using SO2 emissions as an indicator of presence of Power Plants, since it discriminates well from vehicle emissions.\n\n<h2>Estimation of NOx mobile vehicle emissions in Puerto Rico</h2>\nThe NOx pie chart shown above demonstrates than in the U.S. the mobile sources emit more NOx than the stationary sources, and we may expect a similar proportion for Puerto Rico. Now we are going to estimate those NOx emissions coming from mobile sources and see how they compare to the Power Plant emissions estimated in the previous notebook: https://www.kaggle.com/ajulian/eia-923-validation-and-nox-emissions-reference.\n\nThere are studies showing that inferring emissions from fuel consumption ([[Dallmann, 2010]](#Ref_Dallmann_2010), [[McDonald, 2012]](#Ref_McDonald_2012)) might be more accurate than bottom-up approaches, where the number of vehicles is known for different types, the annual distance run is estimated and the average consumption and emission of each car is estimated per kilometer.\n\nRegarding Puerto Rico, I have found the following:\n(a) gasoline is by far the main vehicle fuel in Puerto Rico; page 49 in [[OEPPE, 2018]](#Ref_OEPPE_2018): the ratio [non-gasoline cars]/[gasoline cars] sold in 2017 was 440/83,640 = 0.5%)\n(b) also, the same report in page 51 says the gasoline consumed in 2017 was 950,920,454 gallons\n(c) on the other hand, in a 2006 report [[FUELPR, 2006]](#Ref_FUELPR_2006) there is an estimate of the annual NOx emission, 38.2 lb, and gasoline consumption, 581 gl, of a passenger car in Puerto Rico, which is an Emissions Factor of 0.0657 NOx lb/gl.\n\nBy multiplying the annual amount of gasoline gallons consumed in 2017 (950,920,454) by the Emissions Factor, we obtain an estimation of the amount of NOx emitted by cars in Puerto Rico, and is **62,521,792 lb = 31,261 ton (NOx)**."},{"metadata":{"trusted":true},"cell_type":"code","source":"gasoline_cars = 83640; non_gasoline_cars = 440; ratio = non_gasoline_cars / gasoline_cars\nprint(\"Ratio of [non-gasoline cars]/[gasoline cars] sold in 2017 in Puerto Rico was\", round(ratio, 4))\n\ngasoline_2017 = 950920454; # gallons\nnox_car_2006 = 38.2; # lb\ngasoline_car = 581; # gallons\ngasoline_ef = nox_car_2006 / gasoline_car # lb/gl\nprint(\"The estimated gasoline Emissions Factor in 2006 in Puerto Rico was\", round(gasoline_ef, 4))\nnox_2017 = gasoline_2017 * gasoline_ef\nprint(\"The estimated NOx emissions in 2017 were\", round(nox_2017), \"lb, or\", round(nox_2017/2000), \"ton\")\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Finally, let's compare with the annual amount of NOx emitted by the Power Plants that I estimated, which is 31,007 ton (NOx). They are almost the same, which is higher than the U.S. average but is roughly similar and can be considered reasonable."},{"metadata":{},"cell_type":"markdown","source":"<h2>Remarks for NOx remote sensing in Puerto Rico</h2>\nThe pie chart for SOx suggests it may be possible to use SOx to delimit Power Plant NOx emissions in urban areas, since vehicles in Puerto Rico are mainly gasoline powered and therefore emit almost no SO2. Also, SO2 lifetime is 1-2 days, comparable to NOx (which is hours, so the wind and others will affect both similarly. \n\nThe pie chart for Mobile Fossil Fuel combustion suggests CO could be used to infer the NOx emissions. There is at least a study with this approach [[van der Maas, 2019]](#Ref_Maas_2019). However, I'm not so confident in this idea since CO lifetime is of the order of weeks, even 1-2 months, much larger than NOx.\n\nFinally, based on fuel (gasoline) consumption records, we've got an estimate for annual NOx emissions due to vehicles of **31,262 ton (NOx)**."},{"metadata":{"_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","collapsed":true,"_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","trusted":false},"cell_type":"markdown","source":"<h2>References</h2>\n- <a name=\"Ref_USGHG_2020\"></a>[[USGHG, 2020] Inventory of U.S. Greenhouse Gas Emissions and Sinks 1990-2018 (draft 2020)](https://www.epa.gov/sites/production/files/2020-02/documents/us-ghg-inventory-2020-main-text.pdf)\n- <a name=\"Ref_FUELPR_2006\"></a>[[FUELPR, 2006] ESTIMADO ANUAL DE EMISIONES Y CONSUMO DE COMBUSTIBLE PARA VEHICULOS DE MOTOR EN PUERTO RICO PARA EL AÑO 2006](http://aceer.uprm.edu/pdfs/emisiones_vehiculos_pr.pdf) (in Spanish)\n- <a name=\"Ref_OEPPE_2018\"></a>[[OEPPE, 2018] Estado de Situación Energética De Puerto Rico - Informe anual 2017](https://static1.squarespace.com/static/5b6c67d071069910870c6820/t/5cbd046be5e5f0648a778456/1555891502310/%282018%29+Oeppe%2C+Estado+de+situación+energética+de+Puerto+Rico+%282017%29.pdf) (in Spanish) \n- <a name=\"Ref_Dallmann_2010\"></a>[[Dallman, 2010] Evaluation of mobile source emission trends in the United States](https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2010JD013862)\n- <a name=\"Ref_McDonald_2012\"></a>[[McDonald, 2012] Long-term trends in nitrogen oxide emissions from motor vehicles at national, state, and air basin scales](https://agupubs.onlinelibrary.wiley.com/doi/epdf/10.1029/2012JD018304)\n- <a name=\"Ref_Maas_2019\">[[van der Maas, 2019], Evaluating blast furnace emissions using high resolution TROPOMI CO and NOx measurements and emission inventory data](https://edepot.wur.nl/494875)"}],"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat":4,"nbformat_minor":4}