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/pypsa/pypsa-china

Category: Energy Systems
Sub Category: Global and Regional Energy System Models

Keywords

energy-system-model optimisation

Last synced: about 15 hours ago
JSON representation

Repository metadata

PyPSA-China: An Open Optimisation model of the Chinese Energy System

README.md

PyPSA-China:An Open-Source Optimisation model of the Chinese Energy System

License: MIT
Documentation
GitHub release

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 and extended by Xiaowei Zhou et al for their "Multi-energy system horizon planning: Early decarbonisation in China avoids stranded assets" paper. It is adapted from the Zhou version by the PIK RD3-ETL team, with the aim of coupling it to the REMIND integrated assessment model. A reference guide is available as part of the documentation.

Overview

PyPSA-China should be understood as a modelling worklow, using snakemake as workflow manager, around the PyPSA python power system analysis 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, 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.

License

The code is released under the MIT license, 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

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/<compute_profile>/config.yaml

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
type: software
title: "PyPSA-China (PIK): An Open-Source Optimisation Model of the Chinese Energy System"
authors:
  - name: "PIK RD3-ETL Team"
    affiliation: "Potsdam Institute for Climate Impact Research (PIK)"
repository-code: "https://github.com/pik-piam/PyPSA-China-PIK"
url: "https://pik-piam.github.io/PyPSA-China-PIK/"
license: MIT (code - data may differ)
version: 1.3.2
date-released: 2025-12-02
keywords:
  - energy system modeling
  - optimization
  - power systems
  - China
  - renewable energy
  - capacity expansion
  - PyPSA
abstract: >
  PyPSA-China (PIK) is an 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. This is the PIK implementation, adapted
  for coupling with the REMIND integrated assessment model.
references:
  - type: article
    title: "The role of hydro power, storage and transmission in the decarbonization of the Chinese power system"
    authors:
      - family-names: Liu
        given-names: Hailiang
      - family-names: Brown
        given-names: Tom
      - family-names: Andresen
        given-names: "Gorm Bruun"
      - family-names: Schlachtberger
        given-names: "David P"
      - family-names: Greiner
        given-names: Martin
    doi: "10.1016/j.apenergy.2019.02.009"
    journal: "Applied Energy"
    year: 2019
    volume: 239
    start: 1308
    end: 1321
  - type: article
    title: "Multi-energy system horizon planning: Early decarbonisation in China avoids stranded assets"
    authors:
      - family-names: Zhou
        given-names: Xiaowei
      - family-names: Kober
        given-names: Tom
      - family-names: McCollum
        given-names: David
      - family-names: Chen
        given-names: Shixiong
      - family-names: Luan
        given-names: Haoran
      - family-names: van Vliet
        given-names: Olivier
    doi: "10.1049/ein2.12011"
    journal: "IET Energy Systems Integration"
    year: 2022
    volume: 4
    number: 1
    start: 123
    end: 139
  - type: article
    title: "PyPSA: Python for Power System Analysis"
    authors:
      - family-names: Brown
        given-names: Tom
      - family-names: Hörsch
        given-names: Jonas
      - family-names: Schlachtberger
        given-names: David
    doi: "10.5334/jors.188"
    journal: "Journal of Open Research Software"
    year: 2018
    volume: 6
    number: 1

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 3 days ago

Total Commits: 995
Total Committers: 5
Avg Commits per committer: 199.0
Development Distribution Score (DDS): 0.198

Commits in past year: 251
Committers in past year: 3
Avg Commits per committer in past year: 83.667
Development Distribution Score (DDS) in past year: 0.355

Name Email Commits
irr-github i****z@p****e 798
beijingzyl 1****8@q****m 176
Xiaowei-Z j****w@s****n 14
pre-commit-ci[bot] 6****] 5
Songmin y****s@g****m 2

Committer domains:


Issue and Pull Request metadata

Last synced: 4 days ago

Total issues: 3
Total pull requests: 56
Average time to close issues: N/A
Average time to close pull requests: 10 days
Total issue authors: 1
Total pull request authors: 2
Average comments per issue: 0.0
Average comments per pull request: 0.07
Merged pull request: 55
Bot issues: 0
Bot pull requests: 0

Past year issues: 0
Past year pull requests: 14
Past year average time to close issues: N/A
Past year average time to close pull requests: 5 days
Past year issue authors: 0
Past year pull request authors: 2
Past year average comments per issue: 0
Past year average comments per pull request: 0.07
Past year merged pull request: 13
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/pypsa/pypsa-china

Top Issue Authors

  • irr-github (3)

Top Pull Request Authors

  • irr-github (43)
  • beijingzyl (13)

Top Issue Labels

  • enhancement (3)
  • Post-process (1)

Top Pull Request Labels

  • enhancement (28)
  • bug (16)
  • documentation (8)
  • Post-process (4)
  • invalid (3)
  • Remind-coupling (3)
  • data (1)

Score: 5.3706380281276624