Skip to content

PyPSA/grid-builder

Repository files navigation

grid-builder

A modular Snakemake workflow for constructing and validating power grid models using OpenStreetMap data.

About

grid-builder is a modular snakemake workflow for constructing power grid models from OpenStreetMap data for use in energy system modelling. It can be imported directly into any snakemake workflow.

Starting from raw OpenStreetMap data, the workflow extracts high-voltage grid components, including substations, transmission lines, cables, transformers, and converters. Missing electrical parameters such as voltage levels and line counts are then inferred heuristically using region-specific assumptions on asset types and standards. The output is a model-ready power grid network compatible with PyPSA-Eur, PyPSA-Earth, and other energy system modelling frameworks.

This module follows the Modelblocks conventions (https://www.modelblocks.org). For more information, consult the integration example and the snakemake modularisation documentation.

Overview

Data processing steps:

  1. Download OSM power infrastructure data
  2. Clean and infer electrical network attributes
  3. Build connected network topology
  4. Validate network model

Configuration

Please consult the configuration README and the configuration example for a general overview on the configuration options of this module.

Input / output structure

Please consult the interface file for more information.

Development

We use pixi as our package manager for development. Once installed, run the following to clone this repository and install all dependencies.

git clone git@github.com:PyPSA/grid-builder.git
cd grid-builder
pixi install --all

For testing, simply run:

pixi run test-integration

To test a minimal example of a workflow using this module:

pixi shell                          # activate this project's environment
cd tests/integration/               # navigate to the integration example
snakemake --use-conda --cores 2     # run the workflow!

License

grid-builder is released as free software under the MIT license. Different licenses and terms of use may apply to input data, e.g. OpenStreetMap data is subject to the Open Database License.

References & related work

About

A modular Snakemake workflow for constructing and validating power grid models using OpenStreetMap data.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages