PyPSA-Earth-Status: validating any PyPSA network on Earth
May 29, 2026 ยท View on GitHub
Development Status: under development
Enabling accurate and reproducible energy system modelling for every region of the world
๐ก Any modeling is only as good as the underlying data and assumptions allow. For energy systems modelling it translates into the need to quantify accuracy of modelling inputs and validating optimisation outputs against real-world data.
PyPSA-Earth-Status is a collaborative project aims to make that process faster, easier, and more consistent across PyPSA-meets-Earth community. The workflow is designed to validate PyPSA networks against available energy system statistics in an automated way. It provides automated procedures to compare user-provided PyPSA networks with state-of-the-art databases from authoritative sources such as IRENA, IEA, and others.
By streamlining the validation process, PyPSA-Earth-Status helps modelers enhance the credibility, transparency, and quality of their modeling results saving time and allowing them to focus on what matters most: developing better energy system models.
Contributing
๐ค We warmly welcome contributions to expand the capabilities of PyPSA-Earth-Status and to build a shared foundation for model validation in open energy system research worldwide.
Regional and domain expertise is crucial for interpreting energy statistics and ensure reference validation procedures make sense. We are very interested in experience in energy system modelling and the use of openly available energy system data sources for countries worldwide.
Ways to contribute
- Flag existing validation needs by opening issues and joining discussions in PyPSA-meets-Earth Discord
- Suggest improvements by opening issues and pull requests to this repository
- Contribute non-code insights filling out this form
Functionality
๐ Automated validation covers the following points for which accurate representation is crucial to ensure energy system optimisation outputs are relevant:
- Installed capacities:
p_nomof generators and storage units - Optimized capacities:
p_nom_optof generators and storage units - Transmission capacities:
s_nomof power lines - Demand: comparison with real-world consumption data. Currently, electricity only is covered while in future we are planning to also include sector-coupled capabilities
Additionally, we are working to add validation of the energy mix modelled for a reference state of an energy system, such past years.
Features
- Automated validation of PyPSA networks against real-world data
- Creation of reference statistics from leading reference databases
- Generation of tables and visualizations for easy interpretation of results
... and we are aiming for more features with your help!
Currently, the following datasets are supported:
- Installed capacities from IRENA and IEA
- Cross-border line capacities from Global Transmission Database
- Comparison of network data with reference statistics
- Demand data from Our World in Data
The following repositories provide more reference data:
- Awesome-Electrical-Grid-Mapping on datasets and documents related to power grid topology, capacity and development plans
- Awesome-Electricity-Demand collects datasets on electricity demand in hourly resolution
Improving coverage with regionally focused datasets is of high interest for this project. If you see any datasets relevant for your study, feel free to open an issue to flag them, and we can develop an approach to accommodate it into PyPSA-Earth-Status together.
Installation
To install PyPSA-Earth-Status, simply clone the repository:
git clone https://github.com/pypsa-meets-earth/pypsa-earth-status
The Python dependencies required to run the scripts are defined in this repository. We recommend using the provided Conda environment file.
Create the environment as follows:
cd pypsa-earth-status
conda env create -f envs/environment.yaml
Tutorial
To validate a first PyPSA network, you can run the following command in your terminal from the pypsa-earth-status folder:
conda activate pypsa-earth
snakemake -j 1 visualize_data
This command will:
- Create the sample network scigrid_de from PyPSA
- Save it as
resources/example_DE.ncwith minimal changes - Execute the typical validation procedure to produre tables and visualizations in the folder
results/for easy inspection
Execute your first custom validation
If you want to validate your own PyPSA network, you can:
-
Open the file
config.yamlin thepypsa-earth-statusfolder -
Specify the path to the network you want to validate in the field
network_pathundernetwork_validation -
Adapt the list of countries you want to validate in the field
countriesundernetwork_validationusing 2-letter code naming convention; please keep at least two neighbouring countries in the list, e.g. ['DE', 'FR'] for the tutorial case for Germany. -
Execute:
snakemake -j 1 visualize_data -
Check the results in the
results/folder