Merge branch 'PyPSA:master' into fix-plotnetworkrule

This commit is contained in:
Seth 2022-03-28 11:54:47 +02:00 committed by GitHub
commit 3c5212826e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 73 additions and 29 deletions

View File

@ -160,7 +160,7 @@ if config['enable'].get('build_cutout', False):
if config['enable'].get('retrieve_cutout', True): if config['enable'].get('retrieve_cutout', True):
rule retrieve_cutout: rule retrieve_cutout:
input: HTTP.remote("zenodo.org/record/4709858/files/{cutout}.nc", keep_local=True, static=True) input: HTTP.remote("zenodo.org/record/6382570/files/{cutout}.nc", keep_local=True, static=True)
output: "cutouts/{cutout}.nc" output: "cutouts/{cutout}.nc"
run: move(input[0], output[0]) run: move(input[0], output[0])
@ -201,15 +201,15 @@ rule build_renewable_profiles:
benchmark: "benchmarks/build_renewable_profiles_{technology}" benchmark: "benchmarks/build_renewable_profiles_{technology}"
threads: ATLITE_NPROCESSES threads: ATLITE_NPROCESSES
resources: mem_mb=ATLITE_NPROCESSES * 5000 resources: mem_mb=ATLITE_NPROCESSES * 5000
wildcard_constraints: technology="(?!hydro).*" # Any technology other than hydro
script: "scripts/build_renewable_profiles.py" script: "scripts/build_renewable_profiles.py"
if 'hydro' in config['renewable'].keys(): rule build_hydro_profile:
rule build_hydro_profile:
input: input:
country_shapes='resources/country_shapes.geojson', country_shapes='resources/country_shapes.geojson',
eia_hydro_generation='data/bundle/EIA_hydro_generation_2000_2014.csv', eia_hydro_generation='data/bundle/EIA_hydro_generation_2000_2014.csv',
cutout="cutouts/" + config["renewable"]['hydro']['cutout'] + ".nc" cutout=f"cutouts/{config['renewable']['hydro']['cutout']}.nc" if "hydro" in config["renewable"] else "config['renewable']['hydro']['cutout'] not configured",
output: 'resources/profile_hydro.nc' output: 'resources/profile_hydro.nc'
log: "logs/build_hydro_profile.log" log: "logs/build_hydro_profile.log"
resources: mem_mb=5000 resources: mem_mb=5000

View File

@ -17,7 +17,7 @@ scenario:
clusters: [5] clusters: [5]
opts: [Co2L-24H] opts: [Co2L-24H]
countries: ['DE'] countries: ['BE']
clustering: clustering:
simplify: simplify:
@ -58,7 +58,7 @@ electricity:
atlite: atlite:
nprocesses: 4 nprocesses: 4
cutouts: cutouts:
europe-2013-era5-tutorial: be-03-2013-era5:
module: era5 module: era5
x: [4., 15.] x: [4., 15.]
y: [46., 56.] y: [46., 56.]
@ -66,7 +66,7 @@ atlite:
renewable: renewable:
onwind: onwind:
cutout: europe-2013-era5-tutorial cutout: be-03-2013-era5
resource: resource:
method: wind method: wind
turbine: Vestas_V112_3MW turbine: Vestas_V112_3MW
@ -83,7 +83,7 @@ renewable:
potential: simple # or conservative potential: simple # or conservative
clip_p_max_pu: 1.e-2 clip_p_max_pu: 1.e-2
offwind-ac: offwind-ac:
cutout: europe-2013-era5-tutorial cutout: be-03-2013-era5
resource: resource:
method: wind method: wind
turbine: NREL_ReferenceTurbine_5MW_offshore turbine: NREL_ReferenceTurbine_5MW_offshore
@ -95,7 +95,7 @@ renewable:
potential: simple # or conservative potential: simple # or conservative
clip_p_max_pu: 1.e-2 clip_p_max_pu: 1.e-2
offwind-dc: offwind-dc:
cutout: europe-2013-era5-tutorial cutout: be-03-2013-era5
resource: resource:
method: wind method: wind
turbine: NREL_ReferenceTurbine_5MW_offshore turbine: NREL_ReferenceTurbine_5MW_offshore
@ -108,7 +108,7 @@ renewable:
potential: simple # or conservative potential: simple # or conservative
clip_p_max_pu: 1.e-2 clip_p_max_pu: 1.e-2
solar: solar:
cutout: europe-2013-era5-tutorial cutout: be-03-2013-era5
resource: resource:
method: pv method: pv
panel: CSi panel: CSi

BIN
doc/img/synchronisation.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 KiB

View File

@ -7,6 +7,40 @@
Release Notes Release Notes
########################################## ##########################################
Synchronisation Release - Ukraine and Moldova (17th March 2022)
===============================================================
On March 16, 2022, the transmission networks of Ukraine and Moldova have
successfully been `synchronised with the continental European grid <https://www.entsoe.eu/news/2022/03/16/continental-europe-successful-synchronisation-with-ukraine-and-moldova-power-systems/>`_. We have taken
this as an opportunity to add the power systems of Ukraine and Moldova to
PyPSA-Eur. This includes:
.. image:: img/synchronisation.png
:width: 500
* the transmission network topology from the `ENTSO-E interactive map <https://www.entsoe.eu/data/map/>`_.
* existing power plants (incl. nuclear, coal, gas and hydro) from the `powerplantmatching <https://github.com/fresna/powerplantmatching>`_ tool
* country-level load time series from ENTSO-E through the `OPSD platform <https://data.open-power-system-data.org/time_series/2020-10-06>`_, which are then distributed heuristically to substations by GDP and population density.
* wind and solar profiles based on ERA5 and SARAH-2 weather data
* hydro profiles based on historical `EIA generation data <https://www.eia.gov/international/data/world>`_
* a simplified calculation of wind and solar potentials based on the `Copernicus Land Cover dataset <https://land.copernicus.eu/global/products/lc>`_.
* electrical characteristics of 750 kV transmission lines
The Crimean power system is currently disconnected from the main Ukrainian grid and, hence, not included.
This release is not on the ``master`` branch. It can be used with
.. code-block:: bash
git clone https://github.com/pypsa/pypsa-eur
git checkout synchronisation-release
Upcoming Release Upcoming Release
================ ================
@ -28,6 +62,11 @@ Upcoming Release
* New network topology extracted from the ENTSO-E interactive map. * New network topology extracted from the ENTSO-E interactive map.
* Iterative solving with impedance updates is skipped if there are no expandable lines.
* Switch from Germany to Belgium for continuous integration and tutorial to save resources.
* Use updated SARAH-2 and ERA5 cutouts with slightly wider scope to east and additional variables.
PyPSA-Eur 0.4.0 (22th September 2021) PyPSA-Eur 0.4.0 (22th September 2021)
===================================== =====================================
@ -70,7 +109,7 @@ PyPSA-Eur 0.4.0 (22th September 2021)
[`#261 <https://github.com/PyPSA/pypsa-eur/pull/261>`_]. [`#261 <https://github.com/PyPSA/pypsa-eur/pull/261>`_].
* The tutorial cutout was renamed from ``cutouts/europe-2013-era5.nc`` to * The tutorial cutout was renamed from ``cutouts/europe-2013-era5.nc`` to
``cutouts/europe-2013-era5-tutorial.nc`` to accomodate tutorial and productive ``cutouts/be-03-2013-era5.nc`` to accomodate tutorial and productive
cutouts side-by-side. cutouts side-by-side.
* The flag ``keep_all_available_areas`` in the configuration for renewable * The flag ``keep_all_available_areas`` in the configuration for renewable

View File

@ -202,7 +202,7 @@ if __name__ == '__main__':
configure_logging(snakemake) configure_logging(snakemake)
pgb.streams.wrap_stderr() pgb.streams.wrap_stderr()
nprocesses = snakemake.config['atlite'].get('nprocesses') nprocesses = int(snakemake.threads)
noprogress = not snakemake.config['atlite'].get('show_progress', True) noprogress = not snakemake.config['atlite'].get('show_progress', True)
config = snakemake.config['renewable'][snakemake.wildcards.technology] config = snakemake.config['renewable'][snakemake.wildcards.technology]
resource = config['resource'] # pv panel config / wind turbine config resource = config['resource'] # pv panel config / wind turbine config

View File

@ -263,9 +263,9 @@ def clustering_for_n_clusters(n, n_clusters, custom_busmap=False, aggregate_carr
algorithm="kmeans", extended_link_costs=0, focus_weights=None): algorithm="kmeans", extended_link_costs=0, focus_weights=None):
if potential_mode == 'simple': if potential_mode == 'simple':
p_nom_max_strategy = np.sum p_nom_max_strategy = pd.Series.sum
elif potential_mode == 'conservative': elif potential_mode == 'conservative':
p_nom_max_strategy = np.min p_nom_max_strategy = pd.Series.min
else: else:
raise AttributeError(f"potential_mode should be one of 'simple' or 'conservative' but is '{potential_mode}'") raise AttributeError(f"potential_mode should be one of 'simple' or 'conservative' but is '{potential_mode}'")
@ -281,7 +281,7 @@ def clustering_for_n_clusters(n, n_clusters, custom_busmap=False, aggregate_carr
aggregate_generators_carriers=aggregate_carriers, aggregate_generators_carriers=aggregate_carriers,
aggregate_one_ports=["Load", "StorageUnit"], aggregate_one_ports=["Load", "StorageUnit"],
line_length_factor=line_length_factor, line_length_factor=line_length_factor,
generator_strategies={'p_nom_max': p_nom_max_strategy, 'p_nom_min': np.sum}, generator_strategies={'p_nom_max': p_nom_max_strategy, 'p_nom_min': pd.Series.sum},
scale_link_capital_costs=False) scale_link_capital_costs=False)
if not n.links.empty: if not n.links.empty:

View File

@ -254,7 +254,12 @@ def solve_network(n, config, opts='', **kwargs):
n.config = config n.config = config
n.opts = opts n.opts = opts
if cf_solving.get('skip_iterations', False): skip_iterations = cf_solving.get('skip_iterations', False)
if not n.lines.s_nom_extendable.any():
skip_iterations = True
logger.info("No expandable lines found. Skipping iterative solving.")
if skip_iterations:
network_lopf(n, solver_name=solver_name, solver_options=solver_options, network_lopf(n, solver_name=solver_name, solver_options=solver_options,
extra_functionality=extra_functionality, **kwargs) extra_functionality=extra_functionality, **kwargs)
else: else:

View File

@ -16,7 +16,7 @@ scenario:
clusters: [5] clusters: [5]
opts: [Co2L-24H] opts: [Co2L-24H]
countries: ['DE'] countries: ['BE']
clustering: clustering:
simplify: simplify:
@ -57,7 +57,7 @@ electricity:
atlite: atlite:
nprocesses: 4 nprocesses: 4
cutouts: cutouts:
europe-2013-era5-tutorial: be-03-2013-era5:
module: era5 module: era5
x: [4., 15.] x: [4., 15.]
y: [46., 56.] y: [46., 56.]
@ -65,7 +65,7 @@ atlite:
renewable: renewable:
onwind: onwind:
cutout: europe-2013-era5-tutorial cutout: be-03-2013-era5
resource: resource:
method: wind method: wind
turbine: Vestas_V112_3MW turbine: Vestas_V112_3MW
@ -82,7 +82,7 @@ renewable:
potential: simple # or conservative potential: simple # or conservative
clip_p_max_pu: 1.e-2 clip_p_max_pu: 1.e-2
offwind-ac: offwind-ac:
cutout: europe-2013-era5-tutorial cutout: be-03-2013-era5
resource: resource:
method: wind method: wind
turbine: NREL_ReferenceTurbine_5MW_offshore turbine: NREL_ReferenceTurbine_5MW_offshore
@ -94,7 +94,7 @@ renewable:
potential: simple # or conservative potential: simple # or conservative
clip_p_max_pu: 1.e-2 clip_p_max_pu: 1.e-2
offwind-dc: offwind-dc:
cutout: europe-2013-era5-tutorial cutout: be-03-2013-era5
resource: resource:
method: wind method: wind
turbine: NREL_ReferenceTurbine_5MW_offshore turbine: NREL_ReferenceTurbine_5MW_offshore
@ -107,7 +107,7 @@ renewable:
potential: simple # or conservative potential: simple # or conservative
clip_p_max_pu: 1.e-2 clip_p_max_pu: 1.e-2
solar: solar:
cutout: europe-2013-era5-tutorial cutout: be-03-2013-era5
resource: resource:
method: pv method: pv
panel: CSi panel: CSi