five

Interannual Electricity Demand Calculator

收藏
Zenodo2024-03-15 更新2026-05-25 收录
下载链接:
https://zenodo.org/doi/10.5281/zenodo.7070437
下载链接
链接失效反馈
官方服务:
资源简介:
Interannual Electricity Demand Calculator Large parts of this code were originally developed by Lieke van der Most (University of Groningen) in the EU renewable energy modelling framework and release under MIT license. The original version of the code can be found here and is referenced below as [1]. This model has been validated against historical electricity demand data reported on the ENTSO-E transparancy platform. We have made the following adjustments to the original version: generate hourly instead of daily electricity consumption profiles use snakemake for workflow management trim repository to demand-related code and data adjust code to accept cutouts from atlite for weather data Purpose Variations in weather conditions affect electricity demand patterns. This workflow generates country-level electricity consumption time series based on weather data using analysis by Lieke van der Most correlating historical electricity demand to temperature. This workflow first calculates a daily electricity demand based on the regression model developed in [1]. Subsequently, cumulative daily electricity demands are disaggregated using a hourly profile sampled from a random historical day (that is the same weekday) from the Open Power System Database. The resulting output/demand_hourly.csv file is compatible with the open-source electricity system model PyPSA-Eur. Holidays are treated like weekend days. Data on national holidays across Europe are obtained using another repository by Aleksander Grochowicz and others that similarly computes artificial electricity demand time series: github.com/aleks-g/multidecade-data. The holidays are stored at input_files/noworkday.csv. Installation and Usage Clone the Repository Download the demand_calculator repository using git. /some/other/path % cd /some/path/without/spaces /some/path/without/spaces % git clone https://github.com/martacki/demand_calculator.git Install Dependencies with conda/mamba Use conda or mamba to install the required packages listed in environment.yaml. The environment can be installed and activated using .../demand_calculator % conda env create -f environment.yaml .../demand_calculator % conda activate demand Retrieve Input Data The only required additional input files are ERA5 cutouts which can be recycled from the PyPSA-Eur weather data deposit on Zenodo. Place the file europe-2013-era5.nc in the following location (and rename!): ./input_files/cutouts/europe-era5-2013.nc Cutouts for other weather years than 2013 can be built using the build_cutout rule from the PyPSA-Eur repository. Run the Workflow This repository uses snakemake for workflow management. To run the complete workflow, execute: .../demand_calculator % snakemake -jall all After successfully running the workflow, the output files will be located in output/energy_demand named demand_hourly_{yr}.csv. The years to compute can be modified directly in the Snakefile. License The file demand_hourly.csv is released under CC-BY-4.0 license. The file src.zip is released under MIT license. Changelog 2024-03-15: Extended date range from 1941 to 2023.

# 年际电力需求计算器 本代码的大部分内容最初由莱克·范德莫斯特(Lieke van der Most)(格罗宁根大学)在欧盟可再生能源建模框架内开发,并以MIT许可证发布。该代码的原始版本可在此处获取,下文以[1]标注引用。本模型已根据ENTSO-E透明度平台(ENTSO-E Transparency Platform)公布的历史电力需求数据进行了验证。 我们对原始版本做出了如下调整: 1. 生成小时级而非日级电力消费曲线 2. 使用Snakemake进行工作流管理 3. 精简仓库,仅保留与电力需求相关的代码与数据 4. 调整代码以适配从atlite获取的气象数据切片 ## 研究目的 气象条件的变化会影响电力需求的分布模式。本工作流基于莱克·范德莫斯特的研究成果——将历史电力需求与气温建立关联——结合气象数据生成国家级电力消费时间序列。首先,本工作流将基于文献[1]中提出的回归模型计算日级电力需求;随后,通过从开放电力系统数据库(Open Power System Database)中随机选取一个与目标日期同为星期几的历史日,提取其小时级负荷曲线,对日级电力需求进行拆分。最终输出的`demand_hourly.csv`文件可兼容开源电力系统模型PyPSA-Eur。 节假日将被视为周末处理。欧洲各国的节假日数据取自Aleksander Grochowicz等人开发的另一项用于生成人工电力需求时间序列的仓库:github.com/aleks-g/multidecade-data。节假日数据存储于`input_files/noworkday.csv`中。 ## 安装与使用 ### 克隆仓库 通过Git下载`demand_calculator`仓库: /some/other/path % cd /some/path/without/spaces /some/path/without/spaces % git clone https://github.com/martacki/demand_calculator.git ### 依赖安装(Conda/Mamba) 使用Conda或Mamba安装`environment.yaml`中列出的依赖包。可通过以下命令创建并激活环境: .../demand_calculator % conda env create -f environment.yaml .../demand_calculator % conda activate demand ### 获取输入数据 唯一需要的额外输入文件为ERA5气象切片,可复用PyPSA-Eur在Zenodo上存储的气象数据。将`europe-2013-era5.nc`文件移动至如下路径并重命名: `./input_files/cutouts/europe-era5-2013.nc` 如需获取2013年以外其他年份的气象切片,可使用PyPSA-Eur仓库中的`build_cutout`规则进行构建。 ### 运行工作流 本仓库使用Snakemake进行工作流管理。如需运行完整工作流,执行如下命令: .../demand_calculator % snakemake -jall all 工作流运行成功后,输出文件将存储于`output/energy_demand`目录下,命名格式为`demand_hourly_{yr}.csv`。 如需修改待计算的年份,可直接编辑`Snakefile`文件。 ## 许可证 `demand_hourly.csv`文件采用CC-BY-4.0许可证发布。 `src.zip`文件采用MIT许可证发布。 ## 更新日志 2024-03-15:将日期范围从1941年扩展至2023年。
提供机构:
Zenodo
创建时间:
2022-09-12
二维码
社区交流群
二维码
科研交流群
商业服务