PyPSA-China
A open-source model of the Chinese energy system covering electricity and heat that co-optimizes dispatch and investments under user-set constraints, such as limits to environmental impacts, to minimize costs.
https://github.com/pik-piam/pypsa-china-pik
Category: Energy Systems
Sub Category: Global and Regional Energy System Models
Keywords
energy-system-model optimisation
Last synced: about 10 hours ago
JSON representation
Repository metadata
PyPSA-China: An Open Optimisation model of the Chinese Energy System
- Host: GitHub
- URL: https://github.com/pik-piam/pypsa-china-pik
- Owner: pik-piam
- Fork: true (Xiaowei-Z/PyPSA-China)
- Created: 2024-11-06T16:00:45.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-05T09:28:38.000Z (20 days ago)
- Last Synced: 2025-12-09T11:53:01.660Z (16 days ago)
- Topics: energy-system-model, optimisation
- Language: Jupyter Notebook
- Homepage: https://pik-piam.github.io/PyPSA-China-PIK/
- Size: 171 MB
- Stars: 20
- Watchers: 0
- Forks: 4
- Open Issues: 6
- Releases: 0
https://github.com/pik-piam/PyPSA-China-PIK/blob/main/
# PyPSA-ChinaοΌAn Open-Source Optimisation model of the Chinese Energy System
[](https://opensource.org/licenses/MIT)
[](https://pik-piam.github.io/PyPSA-China-PIK/)
[](https://github.com/pik-piam/PyPSA-China-PIK/releases)
PyPSA-China (PIK) is a open-source model of the Chinese energy system covering electricity and heat. It co-optimizes dispatch and investments under user-set constraints, such as limits to environmental impacts, to minimize costs. The model works at provincial resolution and can simulate a full year at hourly resolution.
## PIK version
This is the PIK implementation of the PyPSA-China power model, first published by Hailiang Liu et al for their study of [hydro-power in china](https://doi.org/10.1016/j.apenergy.2019.02.009) and extended by Xiaowei Zhou et al for their ["Multi-energy system horizon planning: Early decarbonisation in China avoids stranded assets"](doi.org/10.1049/ein2.12011) paper. It is adapted from the Zhou version by the [PIK RD3-ETL team](https://www.pik-potsdam.de/en/institute/labs/energy-transition/energy-transition-lab), with the aim of coupling it to the [REMIND](https://www.pik-potsdam.de/en/institute/departments/transformation-pathways/models/remind) integrated assessment model. A reference guide is available as part of the [documentation](https://pik-piam.github.io/PyPSA-China-PIK/).
## Overview
PyPSA-China should be understood as a modelling worklow, using snakemake as workflow manager, around the [PyPSA python power system analysis](https://pypsa.org/) package. The workflow collects data, builds the power system network and plots the results. It is akin to its more mature sister project, [PyPSA-EUR](https://github.com/PyPSA/pypsa-eur), from which it is derived.
Unlike PyPSA-EUR, which simplifies high resolution electricity grid data to a user-defined network size, the PyPSA-China network is currently fixed to one node per province (with a 340 node version in the works). This is in large part due to data availability issues.
The PyPSA can perform a number of different study types (investment decision, operational decisions, simulate AC power flows). Currently only capacity expansion problems are explicitly implemented in PyPSA-China.
The PyPSA-CHINA-PIK is currently under development. Please contact us if you intend to use it for publications.
## Quick Links
- π [Documentation](https://pik-piam.github.io/PyPSA-China-PIK/)
- π [Changelog](CHANGELOG.md)
- π [Releases](https://github.com/pik-piam/PyPSA-China-PIK/releases)
- π€ [Contributing Guide](CONTRIBUTING.md)
- π [Release Guide](docs/release-guide.md) (for maintainers)
# License
The code is released under the [MIT license](https://github.com/irr-github/PyPSA-China-PIK/blob/main/LICENSES/MIT.txt), however some of the data used is more restrictive.
# Documentation
The documentation can be found at https://pik-piam.github.io/PyPSA-China-PIK/
# Getting started
## Installation
An installation guide is provided at https://pik-piam.github.io/PyPSA-China-PIK/
## Getting the data
You will need to enable data retrieval in the config
```yaml
enable:
build_cutout: false # if you want to build your own (requires ERA5 api access)
retrieve_cutout: true # if you want to download the pre-computed one from zenodo
retrieve_raster: true # get raster data
```
Some of the files are very large - expect a slow process!
- You can also download the data manually and copy it over to the correct folder. The source and target destinations are the input/output of the `fetch_` rules in `workflow/rules/fetch_data.smk`
- **PIK HPC users only** you can also copy the data from other users
## Usage
Detailed instructions in the documentation.
### local execution
- local execution can be started (once the environment is activated) with `snakemake`
- to customize the options, create `my_config.yaml` and launch `snakemake --configfile `my_config.yaml`. Configuration options are summarised in the documentation.
### Remote execution
This is relevant for slurm HPCs and other remotes with a submit job command
- The workflow can be launched with `snakemake --profile config/compute_profile`
- [PIK HPC users only] use `snakemake --profile config/pik_hpc_profile`
- If you are not running on the PIK hpc, you will need make a new profile for your machine under `config//config.yaml`
Owner metadata
- Name: Potsdam Integrated Assessment Modelling (PIAM)
- Login: pik-piam
- Email:
- Kind: organization
- Description: Tools developed for use with data and models related to PIK's research.
- Website: https://www.pik-potsdam.de/
- Location: Potsdam Institute for Climate Impact Research (PIK), Germany
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/29039634?v=4
- Repositories: 50
- Last ynced at: 2023-02-27T11:50:27.848Z
- Profile URL: https://github.com/pik-piam
GitHub Events
Total
- Create event: 7
- Issues event: 32
- Watch event: 19
- Delete event: 2
- Issue comment event: 9
- Member event: 3
- Push event: 70
- Pull request review comment event: 164
- Pull request review event: 186
- Pull request event: 84
- Fork event: 1
Last Year
- Issues event: 18
- Watch event: 19
- Delete event: 2
- Issue comment event: 7
- Push event: 69
- Pull request review comment event: 164
- Pull request review event: 185
- Pull request event: 83
- Create event: 7
Committers metadata
Last synced: 2 days ago
Total Commits: 992
Total Committers: 4
Avg Commits per committer: 248.0
Development Distribution Score (DDS): 0.197
Commits in past year: 856
Committers in past year: 2
Avg Commits per committer in past year: 428.0
Development Distribution Score (DDS) in past year: 0.206
| Name | Commits | |
|---|---|---|
| irr-github | i****z@p****e | 797 |
| beijingzyl | 1****8@q****m | 176 |
| Xiaowei-Z | j****w@s****n | 14 |
| pre-commit-ci[bot] | 6****] | 5 |
Committer domains:
- sjtu.edu.cn: 1
- qq.com: 1
- pik-potsdam.de: 1
Issue and Pull Request metadata
Last synced: 6 days ago
Total issues: 17
Total pull requests: 68
Average time to close issues: about 1 month
Average time to close pull requests: 10 days
Total issue authors: 3
Total pull request authors: 2
Average comments per issue: 0.0
Average comments per pull request: 0.06
Merged pull request: 47
Bot issues: 0
Bot pull requests: 0
Past year issues: 6
Past year pull requests: 67
Past year average time to close issues: about 1 month
Past year average time to close pull requests: 10 days
Past year issue authors: 3
Past year pull request authors: 2
Past year average comments per issue: 0.0
Past year average comments per pull request: 0.06
Past year merged pull request: 47
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- irr-github (15)
- 1june123 (1)
- gu-xiaoyang (1)
Top Pull Request Authors
- irr-github (54)
- beijingzyl (14)
Top Issue Labels
- enhancement (4)
- bug (2)
- documentation (2)
- question (2)
- invalid (2)
Top Pull Request Labels
- enhancement (28)
- bug (12)
- documentation (4)
- Remind-coupling (2)
- data (1)
- Post-process (1)
- invalid (1)
Score: 4.6443908991413725