You are welcome to visit a project webpage for a project overview, publications, media coverage, and more.
Welcome! This project explores the mechanisms, costs, and system-level impacts of 24/7 Carbon-Free Energy (CFE) procurement.
The project comprises five distinct studies, each examining unique aspects of 24/7 CFE. The studies vary in their focus, model formulations, scenarios, and more. Ultimately, we aim to make the entire scientific workflow, from data to final charts, fully reproducible for each study. This repository includes code for three research items linked to GitHub releases. Two other two research papers are hosted in dedicated GitHub repositories with their reproducible workflows.
A study published on Zenodo, October 2022
A research paper published in Energy Strategy Reviews, 2024
Published on Zenodo, July 2023
A research paper published in Advances in Applied Energy, 2025
A commentary paper published in Joule, 2025
First, clone this repository:
git clone https://github.com/PyPSA/247-cfe --branch <tag_name> --single-branch
-
--single-branch
option allows for cloning only git history leading to tip of the tag. This saves a lot of unnecessary code from being cloned.
Second, install the necessary dependencies using environment.yml
file. The following commands will do the job:
conda env create -f envs/environment.yml
conda activate 247-cfe
Third, to run all the scenarios from the study, run the snakemake worflow:
snakemake --cores <n>
where <n>
is the number of cores to use for the workflow.
-
Note that this call requires a high-performance computing environment.
-
It is also possible to run a smaller version of the model by adjusting the settings in
config.yaml
. For example, changing the config settingarea
from "EU" to "regions" reduces the regional coverage of the model, making the size of the problem feasible to solve on a private laptop with 8GB RAM.
Finally, when the workflow is complete, the results will be stored in results
directory. The directory will contain solved networks, plots, summary csvs and logs.
- At this point, you can also compile the LaTeX project to reproduce the study .pdf file.
These research works are maintained in dedicated repositories, each containing an instruction on how to reproduce the results.
- Clone the repository (the latest release):
git clone [email protected]:PyPSA/247-cfe.git
- Install the necessary dependencies using
environment.yaml
file. The following commands will do the job:
conda env create -f envs/environment.yaml
conda activate 247-env
- The results of the paper can be reproduced by running the snakemake workflow. The following commands will run the workflows for the paper:
snakemake --cores <n> --configfile config_247cfe
snakemake --cores <n> --configfile config_BackgroundSystem.yaml
where <n>
is the number of cores to use for the workflow.
NB It is possible to reproduce the results on a private laptop with 16GB RAM.
Model results will be stored in the results
directory. For each workflow, the directory will contain:
- solved networks (.nc) for individual optimization problems
- summary (.yaml) for individual optimization problems
- summary (.csv) for aggregated results
- log files (memory, python, solver)
- detailed plots (.pdf) of the results
- At this point, a curious reader can reproduce the dashboards from the paper with the jupyter notebooks in the
scripts/
directory. You can also compile the LaTeX project/manuscript/manuscript.tex
to reproduce the paper .pdf file.
Code uses pre-processed European electricity system data generated through PyPSA-Eur workflow using the myopic
configuration. The data represents brownfield network scenarios. For convenience, sample networks for 2025 and 2030 are provided in the input/
folder.
Technology data assumptions are automatically retrieved from technology-data repository for <year>
and <version>
, as specified in config.yaml
.
This research was supported by a grant from Google LLC.
This code is licensed under the open source MIT License. Different open licenses apply to LaTeX files and input data, see Specifications.