Document the new time_aggregation rule
This commit is contained in:
parent
354fffe6f0
commit
f8f0b4cea0
Binary file not shown.
Before Width: | Height: | Size: 700 KiB After Width: | Height: | Size: 710 KiB |
@ -260,6 +260,8 @@ Upcoming Release
|
|||||||
|
|
||||||
* Fix gas network retrofitting in `add_brownfield`.
|
* Fix gas network retrofitting in `add_brownfield`.
|
||||||
|
|
||||||
|
* Time aggregation for sector-coupled networks have been split into its own rule. When using time step segmentation, time aggregation is constant over planning horizons of the same network.
|
||||||
|
|
||||||
PyPSA-Eur 0.10.0 (19th February 2024)
|
PyPSA-Eur 0.10.0 (19th February 2024)
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
|
@ -183,6 +183,11 @@ Rule ``cluster_gas_network``
|
|||||||
|
|
||||||
.. automodule:: cluster_gas_network
|
.. automodule:: cluster_gas_network
|
||||||
|
|
||||||
|
Rule ``time_aggregation``
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
.. automodule:: time_aggregation
|
||||||
|
|
||||||
Rule ``prepare_sector_network``
|
Rule ``prepare_sector_network``
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,40 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# SPDX-FileCopyrightText: : 2017-2024 The PyPSA-Eur Authors
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
"""
|
||||||
|
Defines the time aggregation to be used for sector-coupled network.
|
||||||
|
|
||||||
|
Relevant Settings
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
.. code:: yaml
|
||||||
|
|
||||||
|
clustering:
|
||||||
|
temporal:
|
||||||
|
resolution_sector:
|
||||||
|
|
||||||
|
enable:
|
||||||
|
drop_leap_day:
|
||||||
|
|
||||||
|
Inputs
|
||||||
|
------
|
||||||
|
|
||||||
|
- ``networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc``: the network whose snapshots are to be aggregated
|
||||||
|
- ``resources/hourly_heat_demand_total_elec_s{simpl}_{clusters}.nc``: the total hourly heat demand
|
||||||
|
- ``resources/solar_thermal_total_elec_s{simpl}_{clusters}.nc``: the total hourly solar thermal generation
|
||||||
|
|
||||||
|
Outputs
|
||||||
|
-------
|
||||||
|
|
||||||
|
- ``snapshot_weightings_elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.csv``
|
||||||
|
|
||||||
|
Description
|
||||||
|
-----------
|
||||||
|
Computes a time aggregation scheme for the given network, in the form of a CSV file with the snapshot weightings, indexed by the new subset of snapshots. This rule only computes said aggregation scheme; aggregation of time-varying network data is done in ``prepare_sector_network.py``.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@ -69,11 +105,13 @@ if __name__ == "__main__":
|
|||||||
for attr, pnl in c.pnl.items()
|
for attr, pnl in c.pnl.items()
|
||||||
if not pnl.empty and attr != "e_min_pu"
|
if not pnl.empty and attr != "e_min_pu"
|
||||||
]
|
]
|
||||||
|
if snakemake.input.hourly_heat_demand_total:
|
||||||
dfs.append(
|
dfs.append(
|
||||||
xr.open_dataset(snakemake.input.hourly_heat_demand_total)
|
xr.open_dataset(snakemake.input.hourly_heat_demand_total)
|
||||||
.to_dataframe()
|
.to_dataframe()
|
||||||
.unstack(level=1)
|
.unstack(level=1)
|
||||||
)
|
)
|
||||||
|
if snakemake.input.solar_thermal_total:
|
||||||
dfs.append(
|
dfs.append(
|
||||||
xr.open_dataset(snakemake.input.solar_thermal_total)
|
xr.open_dataset(snakemake.input.solar_thermal_total)
|
||||||
.to_dataframe()
|
.to_dataframe()
|
||||||
|
Loading…
Reference in New Issue
Block a user