This repository contains code and data relating to the petrochemical emissions model, principally related to the C-THRU project (https://www.c-thru.org/). This README describes how the model is structured.
The instructions in this section instead install everything needed to run the code etc on Windows.
Prerequisites:
-
Download the Visual Studio build tools for Python 3 (download, install instructions).
- Version 2017 recommended for compatibility with Python; if you already have used version 2019 and it works fine please update here.
-
Install git for Windows.
The simplest way is to install the necessary version of Python directly:
- Python 3.9
- When installing, select the option to "add to PATH"
- If installing Python this way, you can use any terminal to run the commands below (e.g. Powershell, or git-bash).
Alternatively, if you are already using Conda, you can use it to get the correct version of Python.
- If using Conda, all the commands below should be in the "miniconda prompt" or "anaconda prompt"
- Create a Conda environment with the correct version of Python:
Don't "activate" the environment now.
conda create -n py39 python==3.9.*
Either way, we then need to install Pipenv, which manages all the dependencies of the code to get the correct versions installed. The simplest way is to run pip install pipenv
.
Pipeline - data_extraction -> data_processing -> data_combination -> analysis -> analysis_outputs
-
Data extraction
Code for extracting data from ICIS, IHS, and LCA databases. -
Data processing
Code for transforming data into consistent units. -
Data combination
Code for assembling data sources
i. IHS material mass + LCA database conversion factors -> IHS material emissions
ii. IHS material emissions allocation -> IHS process emissions
iii. IHS process emissions + ICIS production -> ICIS emissions\ -
Data analysis
Code for generating outputs
i. Compare emissions for the same product via different IHS processes
ii. Calculate emissions saving potential for plant or range of plants
iii. Create a map of petrochemical emissions as an inventory
iv. Codes for generating all figures in the paper\