This repository contains the chemicals decarbonization model, as created by SYSTEMIQ/University of Cambridge/University of Tokyo funded by the Mitsibishu Chemicals Corporation (MCC).
This README describes how to set up and use the model. A more detailed description about how the model works can be found in docs/
.
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"
- Navigate to
Pathways-Chemical-Industry
folder - Create a Conda environment with the correct version of Python:
Don't "activate" the environment now.
conda create -n Pathways-Chemical-Industry python=3.9
Either way, we then need to install virtualenv, which manages all the dependencies of the code to get the correct versions installed. The simplest way is to run pip install virtualenv
.
- Navigate to
Pathways-Chemical-Industry
folder - Then run
virtualenv Pathways-Chemical-Industry
- Open a terminal / git-bash
- Navigate to
Pathways-Chemical-Industry
folder and activate the environment If using Condaconda activate Pathways-Chemical-Industry
If usingvirtualenv Pathways-Chemical-Industry
- Install project requirements using
pip install -r requirements.txt
- Create a
data/
directory, and add the input data sheet (Master Template - python copy.xslx
) into it. - Make a copy of the
config_template.py
file and rename it toconfig.py
. Make changes only toconfig.py
. - Run the model using
python -m main
- Outputs are added in the
output/
directory
- Navigate to
chemicals-decarbonization
folder and activate the environment - Install project requirements using
pip install -r requirements.txt
- Create a
data/
directory, and add the input data sheet (Master Template - python copy.xslx
) into it. - Make a copy of the
config_template.py
file and rename it toconfig.py
. Make changes only toconfig.py
. - Run the model using
python -m main
- Outputs are added in the
output/
directory
Github offers a way to run software on their infrastructure: Codespaces. Setting up a codespace can be done directly from the repository, and can be accessed through the browser (or VSCode). The benefit of this is that you can use a bigger machine than you own (more cores / memory), to reduce workload on your own hardware. Be careful, this is not free!
The setup on codespaces is exactly the same as on your local machine.
Now, you can run the model with different configurations, by changing these values in config.py
:
RUN_PARALLEL
runs the model on multiple cores at the same time, speeding up computation by the number of cores you haveMODEL_SCOPE
allows running the model worldwide, or only for JapanCHEMICALS
defines the chemicals to run the model forrun_config
allows running parts of the model individuallyPATHWAYS
define the pathways that you run the model for, andSENSITIVITIES
the sensitivities. It will run all combinations; if you choose 2 pathways and 2 sensitivities, this results in 4 model runs.
There are more configuration options, a complete explanation is in config.py
.
Technical questions: [email protected]
Subject matter questions: [email protected], [email protected], [email protected] [email protected]