diff --git a/Snakefile b/Snakefile
index 4b8fa0b3..7678a401 100644
--- a/Snakefile
+++ b/Snakefile
@@ -160,7 +160,7 @@ if config['enable'].get('build_cutout', False):
if config['enable'].get('retrieve_cutout', True):
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"
run: move(input[0], output[0])
@@ -201,19 +201,19 @@ rule build_renewable_profiles:
benchmark: "benchmarks/build_renewable_profiles_{technology}"
threads: ATLITE_NPROCESSES
resources: mem_mb=ATLITE_NPROCESSES * 5000
+ wildcard_constraints: technology="(?!hydro).*" # Any technology other than hydro
script: "scripts/build_renewable_profiles.py"
-if 'hydro' in config['renewable'].keys():
- rule build_hydro_profile:
- input:
- country_shapes='resources/country_shapes.geojson',
- eia_hydro_generation='data/bundle/EIA_hydro_generation_2000_2014.csv',
- cutout="cutouts/" + config["renewable"]['hydro']['cutout'] + ".nc"
- output: 'resources/profile_hydro.nc'
- log: "logs/build_hydro_profile.log"
- resources: mem_mb=5000
- script: 'scripts/build_hydro_profile.py'
+rule build_hydro_profile:
+ input:
+ country_shapes='resources/country_shapes.geojson',
+ eia_hydro_generation='data/bundle/EIA_hydro_generation_2000_2014.csv',
+ 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'
+ log: "logs/build_hydro_profile.log"
+ resources: mem_mb=5000
+ script: 'scripts/build_hydro_profile.py'
rule add_electricity:
diff --git a/config.tutorial.yaml b/config.tutorial.yaml
index ea624727..225d8f78 100755
--- a/config.tutorial.yaml
+++ b/config.tutorial.yaml
@@ -17,7 +17,7 @@ scenario:
clusters: [5]
opts: [Co2L-24H]
-countries: ['DE']
+countries: ['BE']
clustering:
simplify:
@@ -58,7 +58,7 @@ electricity:
atlite:
nprocesses: 4
cutouts:
- europe-2013-era5-tutorial:
+ be-03-2013-era5:
module: era5
x: [4., 15.]
y: [46., 56.]
@@ -66,7 +66,7 @@ atlite:
renewable:
onwind:
- cutout: europe-2013-era5-tutorial
+ cutout: be-03-2013-era5
resource:
method: wind
turbine: Vestas_V112_3MW
@@ -83,7 +83,7 @@ renewable:
potential: simple # or conservative
clip_p_max_pu: 1.e-2
offwind-ac:
- cutout: europe-2013-era5-tutorial
+ cutout: be-03-2013-era5
resource:
method: wind
turbine: NREL_ReferenceTurbine_5MW_offshore
@@ -95,7 +95,7 @@ renewable:
potential: simple # or conservative
clip_p_max_pu: 1.e-2
offwind-dc:
- cutout: europe-2013-era5-tutorial
+ cutout: be-03-2013-era5
resource:
method: wind
turbine: NREL_ReferenceTurbine_5MW_offshore
@@ -108,7 +108,7 @@ renewable:
potential: simple # or conservative
clip_p_max_pu: 1.e-2
solar:
- cutout: europe-2013-era5-tutorial
+ cutout: be-03-2013-era5
resource:
method: pv
panel: CSi
diff --git a/doc/img/synchronisation.png b/doc/img/synchronisation.png
new file mode 100644
index 00000000..9029d900
Binary files /dev/null and b/doc/img/synchronisation.png differ
diff --git a/doc/release_notes.rst b/doc/release_notes.rst
index e70bc8ed..7965d022 100644
--- a/doc/release_notes.rst
+++ b/doc/release_notes.rst
@@ -7,6 +7,40 @@
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 `_. 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 `_.
+
+* existing power plants (incl. nuclear, coal, gas and hydro) from the `powerplantmatching `_ tool
+
+* country-level load time series from ENTSO-E through the `OPSD platform `_, 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 `_
+
+* a simplified calculation of wind and solar potentials based on the `Copernicus Land Cover dataset `_.
+
+* 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
================
@@ -28,6 +62,11 @@ Upcoming Release
* 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)
=====================================
@@ -70,7 +109,7 @@ PyPSA-Eur 0.4.0 (22th September 2021)
[`#261 `_].
* 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.
* The flag ``keep_all_available_areas`` in the configuration for renewable
diff --git a/scripts/build_renewable_profiles.py b/scripts/build_renewable_profiles.py
index 36845da5..a2b2eda6 100644
--- a/scripts/build_renewable_profiles.py
+++ b/scripts/build_renewable_profiles.py
@@ -202,7 +202,7 @@ if __name__ == '__main__':
configure_logging(snakemake)
pgb.streams.wrap_stderr()
- nprocesses = snakemake.config['atlite'].get('nprocesses')
+ nprocesses = int(snakemake.threads)
noprogress = not snakemake.config['atlite'].get('show_progress', True)
config = snakemake.config['renewable'][snakemake.wildcards.technology]
resource = config['resource'] # pv panel config / wind turbine config
diff --git a/scripts/cluster_network.py b/scripts/cluster_network.py
index 2c457bef..642db4da 100644
--- a/scripts/cluster_network.py
+++ b/scripts/cluster_network.py
@@ -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):
if potential_mode == 'simple':
- p_nom_max_strategy = np.sum
+ p_nom_max_strategy = pd.Series.sum
elif potential_mode == 'conservative':
- p_nom_max_strategy = np.min
+ p_nom_max_strategy = pd.Series.min
else:
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_one_ports=["Load", "StorageUnit"],
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)
if not n.links.empty:
diff --git a/scripts/solve_network.py b/scripts/solve_network.py
index b902f525..4704d179 100755
--- a/scripts/solve_network.py
+++ b/scripts/solve_network.py
@@ -254,7 +254,12 @@ def solve_network(n, config, opts='', **kwargs):
n.config = config
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,
extra_functionality=extra_functionality, **kwargs)
else:
diff --git a/test/config.test1.yaml b/test/config.test1.yaml
index 2986037b..a9ce1e50 100755
--- a/test/config.test1.yaml
+++ b/test/config.test1.yaml
@@ -16,7 +16,7 @@ scenario:
clusters: [5]
opts: [Co2L-24H]
-countries: ['DE']
+countries: ['BE']
clustering:
simplify:
@@ -57,7 +57,7 @@ electricity:
atlite:
nprocesses: 4
cutouts:
- europe-2013-era5-tutorial:
+ be-03-2013-era5:
module: era5
x: [4., 15.]
y: [46., 56.]
@@ -65,7 +65,7 @@ atlite:
renewable:
onwind:
- cutout: europe-2013-era5-tutorial
+ cutout: be-03-2013-era5
resource:
method: wind
turbine: Vestas_V112_3MW
@@ -82,7 +82,7 @@ renewable:
potential: simple # or conservative
clip_p_max_pu: 1.e-2
offwind-ac:
- cutout: europe-2013-era5-tutorial
+ cutout: be-03-2013-era5
resource:
method: wind
turbine: NREL_ReferenceTurbine_5MW_offshore
@@ -94,7 +94,7 @@ renewable:
potential: simple # or conservative
clip_p_max_pu: 1.e-2
offwind-dc:
- cutout: europe-2013-era5-tutorial
+ cutout: be-03-2013-era5
resource:
method: wind
turbine: NREL_ReferenceTurbine_5MW_offshore
@@ -107,7 +107,7 @@ renewable:
potential: simple # or conservative
clip_p_max_pu: 1.e-2
solar:
- cutout: europe-2013-era5-tutorial
+ cutout: be-03-2013-era5
resource:
method: pv
panel: CSi