Skip to content

Commit

Permalink
Merged with master
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbyxng committed Jul 30, 2024
2 parents f671792 + e9e0a0d commit 5392e64
Show file tree
Hide file tree
Showing 29 changed files with 128 additions and 184 deletions.
41 changes: 16 additions & 25 deletions config/config.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ lines:
under_construction: 'keep' # 'zero': set capacity to zero, 'remove': remove, 'keep': with full capacity
dynamic_line_rating:
activate: false
cutout: europe-2013-era5
cutout: europe-2013-sarah3-era5
correction_factor: 0.95
max_voltage_difference: false
max_line_rating: false
Expand Down Expand Up @@ -171,35 +171,25 @@ electricity:

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#atlite
atlite:
default_cutout: europe-2013-era5
default_cutout: europe-2013-sarah3-era5
nprocesses: 4
show_progress: false
cutouts:
# use 'base' to determine geographical bounds and time span from config
# base:
# module: era5
europe-2013-era5:
module: era5 # in priority order
europe-2013-sarah3-era5:
module: [sarah, era5] # in priority order
x: [-12., 42.]
y: [33., 72]
y: [33., 72.]
dx: 0.3
dy: 0.3
time: ['2013', '2013']
europe-2013-sarah:
module: [sarah, era5] # in priority order
x: [-12., 42.]
y: [33., 65]
dx: 0.2
dy: 0.2
time: ['2013', '2013']
sarah_interpolate: false
sarah_dir:
features: [influx, temperature]

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#renewable
renewable:
onwind:
cutout: europe-2013-era5
cutout: europe-2013-sarah3-era5
resource:
method: wind
turbine: Vestas_V112_3MW
Expand All @@ -218,7 +208,7 @@ renewable:
excluder_resolution: 100
clip_p_max_pu: 1.e-2
offwind-ac:
cutout: europe-2013-era5
cutout: europe-2013-sarah3-era5
resource:
method: wind
turbine: NREL_ReferenceTurbine_2020ATB_5.5MW
Expand All @@ -234,7 +224,7 @@ renewable:
excluder_resolution: 200
clip_p_max_pu: 1.e-2
offwind-dc:
cutout: europe-2013-era5
cutout: europe-2013-sarah3-era5
resource:
method: wind
turbine: NREL_ReferenceTurbine_2020ATB_5.5MW
Expand All @@ -250,7 +240,7 @@ renewable:
excluder_resolution: 200
clip_p_max_pu: 1.e-2
offwind-float:
cutout: europe-2013-era5
cutout: europe-2013-sarah3-era5
resource:
method: wind
turbine: NREL_ReferenceTurbine_5MW_offshore
Expand All @@ -268,7 +258,7 @@ renewable:
max_depth: 1000
clip_p_max_pu: 1.e-2
solar:
cutout: europe-2013-sarah
cutout: europe-2013-sarah3-era5
resource:
method: pv
panel: CSi
Expand All @@ -283,7 +273,7 @@ renewable:
excluder_resolution: 100
clip_p_max_pu: 1.e-2
solar-hsat:
cutout: europe-2013-sarah
cutout: europe-2013-sarah3-era5
resource:
method: pv
panel: CSi
Expand All @@ -298,7 +288,7 @@ renewable:
excluder_resolution: 100
clip_p_max_pu: 1.e-2
hydro:
cutout: europe-2013-era5
cutout: europe-2013-sarah3-era5
carriers: [ror, PHS, hydro]
PHS_max_hours: 6
hydro_max_hours: "energy_capacity_totals_by_country" # one of energy_capacity_totals_by_country, estimate_by_large_installations or a float
Expand Down Expand Up @@ -788,6 +778,7 @@ solving:
options:
clip_p_max_pu: 1.e-2
load_shedding: false
curtailment_mode: false
noisy_costs: true
skip_iterations: true
rolling_horizon: false
Expand Down Expand Up @@ -832,7 +823,7 @@ solving:
solver_options:
highs-default:
# refer to https://ergo-code.github.io/HiGHS/dev/options/definitions/
threads: 4
threads: 1
solver: "ipm"
run_crossover: "off"
small_matrix_value: 1e-6
Expand All @@ -843,7 +834,7 @@ solving:
parallel: "on"
random_seed: 123
gurobi-default:
threads: 4
threads: 8
method: 2 # barrier
crossover: 0
BarConvTol: 1.e-6
Expand Down Expand Up @@ -1065,7 +1056,7 @@ plotting:
V2G: '#e5ffa8'
land transport EV: '#baf238'
land transport demand: '#38baf2'
Li ion: '#baf238'
EV battery: '#baf238'
# hot water storage
water tanks: '#e69487'
residential rural water tanks: '#f7b7a3'
Expand Down
2 changes: 1 addition & 1 deletion doc/configtables/atlite.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_cutout,--,str,"Defines a default cutout."
nprocesses,--,int,"Number of parallel processes in cutout preparation"
show_progress,bool,true/false,"Whether progressbar for atlite conversion processes should be shown. False saves time."
cutouts,,,
-- {name},--,"Convention is to name cutouts like ``<region>-<year>-<source>`` (e.g. ``europe-2013-era5``).","Name of the cutout netcdf file. The user may specify multiple cutouts under configuration ``atlite: cutouts:``. Reference is used in configuration ``renewable: {technology}: cutout:``. The cutout ``base`` may be used to automatically calculate temporal and spatial bounds of the network."
-- {name},--,"Convention is to name cutouts like ``<region>-<year>-<source>`` (e.g. ``europe-2013-sarah3-era5``).","Name of the cutout netcdf file. The user may specify multiple cutouts under configuration ``atlite: cutouts:``. Reference is used in configuration ``renewable: {technology}: cutout:``. The cutout ``base`` may be used to automatically calculate temporal and spatial bounds of the network."
-- -- module,--,"Subset of {'era5','sarah'}","Source of the reanalysis weather dataset (e.g. `ERA5 <https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era5>`_ or `SARAH-2 <https://wui.cmsaf.eu/safira/action/viewDoiDetails?acronym=SARAH_V002>`_)"
-- -- x,°,"Float interval within [-180, 180]","Range of longitudes to download weather data for. If not defined, it defaults to the spatial bounds of all bus shapes."
-- -- y,°,"Float interval within [-90, 90]","Range of latitudes to download weather data for. If not defined, it defaults to the spatial bounds of all bus shapes."
Expand Down
2 changes: 1 addition & 1 deletion doc/configtables/hydro.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
,Unit,Values,Description
cutout,--,Must be 'europe-2013-era5',Specifies the directory where the relevant weather data ist stored.
cutout,--,Must be 'europe-2013-sarah3-era5',Specifies the directory where the relevant weather data ist stored.
carriers,--,"Any subset of {'ror', 'PHS', 'hydro'}","Specifies the types of hydro power plants to build per-unit availability time series for. 'ror' stands for run-of-river plants, 'PHS' represents pumped-hydro storage, and 'hydro' stands for hydroelectric dams."
PHS_max_hours,h,float,Maximum state of charge capacity of the pumped-hydro storage (PHS) in terms of hours at full output capacity ``p_nom``. Cf. `PyPSA documentation <https://pypsa.readthedocs.io/en/latest/components.html#storage-unit>`_.
hydro_max_hours,h,"Any of {float, 'energy_capacity_totals_by_country', 'estimate_by_large_installations'}",Maximum state of charge capacity of the pumped-hydro storage (PHS) in terms of hours at full output capacity ``p_nom`` or heuristically determined. Cf. `PyPSA documentation <https://pypsa.readthedocs.io/en/latest/components.html#storage-unit>`_.
Expand Down
2 changes: 1 addition & 1 deletion doc/configtables/lines.csv
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ under_construction,--,"One of {'zero': set capacity to zero, 'remove': remove co
reconnect_crimea,--,"true or false","Whether to reconnect Crimea to the Ukrainian grid"
dynamic_line_rating,,,
-- activate,bool,"true or false","Whether to take dynamic line rating into account"
-- cutout,--,"Should be a folder listed in the configuration ``atlite: cutouts:`` (e.g. 'europe-2013-era5') or reference an existing folder in the directory ``cutouts``. Source module must be ERA5.","Specifies the directory where the relevant weather data ist stored."
-- cutout,--,"Should be a folder listed in the configuration ``atlite: cutouts:`` (e.g. 'europe-2013-sarah3-era5') or reference an existing folder in the directory ``cutouts``. Source module must be ERA5.","Specifies the directory where the relevant weather data ist stored."
-- correction_factor,--,"float","Factor to compensate for overestimation of wind speeds in hourly averaged wind data"
-- max_voltage_difference,deg,"float","Maximum voltage angle difference in degrees or 'false' to disable"
-- max_line_rating,--,"float","Maximum line rating relative to nominal capacity without DLR, e.g. 1.3 or 'false' to disable"
2 changes: 1 addition & 1 deletion doc/configtables/offwind-ac.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
,Unit,Values,Description
cutout,--,"Should be a folder listed in the configuration ``atlite: cutouts:`` (e.g. 'europe-2013-era5') or reference an existing folder in the directory ``cutouts``. Source module must be ERA5.","Specifies the directory where the relevant weather data ist stored."
cutout,--,"Should be a folder listed in the configuration ``atlite: cutouts:`` (e.g. 'europe-2013-sarah3-era5') or reference an existing folder in the directory ``cutouts``. Source module must be ERA5.","Specifies the directory where the relevant weather data ist stored."
resource,,,
-- method,--,"Must be 'wind'","A superordinate technology type."
-- turbine,--,"One of turbine types included in `atlite <https://github.com/PyPSA/atlite/tree/master/atlite/resources/windturbine>`_. Can be a string or a dictionary with years as keys which denote the year another turbine model becomes available.","Specifies the turbine type and its characteristic power curve."
Expand Down
2 changes: 1 addition & 1 deletion doc/configtables/offwind-dc.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
,Unit,Values,Description
cutout,--,"Should be a folder listed in the configuration ``atlite: cutouts:`` (e.g. 'europe-2013-era5') or reference an existing folder in the directory ``cutouts``. Source module must be ERA5.","Specifies the directory where the relevant weather data ist stored."
cutout,--,"Should be a folder listed in the configuration ``atlite: cutouts:`` (e.g. 'europe-2013-sarah3-era5') or reference an existing folder in the directory ``cutouts``. Source module must be ERA5.","Specifies the directory where the relevant weather data ist stored."
resource,,,
-- method,--,"Must be 'wind'","A superordinate technology type."
-- turbine,--,"One of turbine types included in `atlite <https://github.com/PyPSA/atlite/tree/master/atlite/resources/windturbine>`_. Can be a string or a dictionary with years as keys which denote the year another turbine model becomes available.","Specifies the turbine type and its characteristic power curve."
Expand Down
2 changes: 1 addition & 1 deletion doc/configtables/onwind.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
,Unit,Values,Description
cutout,--,"Should be a folder listed in the configuration ``atlite: cutouts:`` (e.g. 'europe-2013-era5') or reference an existing folder in the directory ``cutouts``. Source module must be ERA5.","Specifies the directory where the relevant weather data ist stored."
cutout,--,"Should be a folder listed in the configuration ``atlite: cutouts:`` (e.g. 'europe-2013-sarah3-era5') or reference an existing folder in the directory ``cutouts``. Source module must be ERA5.","Specifies the directory where the relevant weather data ist stored."
resource,,,
-- method,--,"Must be 'wind'","A superordinate technology type."
-- turbine,--,"One of turbine types included in `atlite <https://github.com/PyPSA/atlite/tree/master/atlite/resources/windturbine>`_. Can be a string or a dictionary with years as keys which denote the year another turbine model becomes available.","Specifies the turbine type and its characteristic power curve."
Expand Down
2 changes: 1 addition & 1 deletion doc/configtables/solar.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
,Unit,Values,Description
cutout,--,"Should be a folder listed in the configuration ``atlite: cutouts:`` (e.g. 'europe-2013-era5') or reference an existing folder in the directory ``cutouts``. Source module can be ERA5 or SARAH-2.","Specifies the directory where the relevant weather data ist stored that is specified at ``atlite/cutouts`` configuration. Both ``sarah`` and ``era5`` work."
cutout,--,"Should be a folder listed in the configuration ``atlite: cutouts:`` (e.g. 'europe-2013-sarah3-era5') or reference an existing folder in the directory ``cutouts``. Source module can be ERA5 or SARAH-2.","Specifies the directory where the relevant weather data ist stored that is specified at ``atlite/cutouts`` configuration. Both ``sarah`` and ``era5`` work."
resource,,,
-- method,--,"Must be 'pv'","A superordinate technology type."
-- panel,--,"One of {'Csi', 'CdTe', 'KANENA'} as defined in `atlite <https://github.com/PyPSA/atlite/tree/master/atlite/resources/solarpanel>`_ . Can be a string or a dictionary with years as keys which denote the year another turbine model becomes available.","Specifies the solar panel technology and its characteristic attributes."
Expand Down
1 change: 1 addition & 0 deletions doc/configtables/solving.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
options,,,
-- clip_p_max_pu,p.u.,float,To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero.
-- load_shedding,bool/float,"{'true','false', float}","Add generators with very high marginal cost to simulate load shedding and avoid problem infeasibilities. If load shedding is a float, it denotes the marginal cost in EUR/kWh."
-- curtailment_mode,bool/float,"{'true','false'}","Fixes the dispatch profiles of generators with time-varying p_max_pu by setting ``p_min_pu = p_max_pu`` and adds an auxiliary curtailment generator (with negative sign to absorb excess power) at every AC bus. This can speed up the solving process as the curtailment decision is aggregated into a single generator per region. Defaults to ``false``."
-- noisy_costs,bool,"{'true','false'}","Add random noise to marginal cost of generators by :math:`\mathcal{U}(0.009,0,011)` and capital cost of lines and links by :math:`\mathcal{U}(0.09,0,11)`."
-- skip_iterations,bool,"{'true','false'}","Skip iterating, do not update impedances of branches. Defaults to true."
-- rolling_horizon,bool,"{'true','false'}","Switch for rule :mod:`solve_operations_network` whether to optimize the network in a rolling horizon manner, where the snapshot range is split into slices of size `horizon` which are solved consecutively. This setting has currently no effect on sector-coupled networks."
Expand Down
2 changes: 1 addition & 1 deletion doc/preparation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ using the ``retrieve*`` rules (:ref:`data`).
Having downloaded the necessary data,

- :mod:`build_shapes` generates GeoJSON files with shapes of the countries, exclusive economic zones and `NUTS3 <https://en.wikipedia.org/wiki/Nomenclature_of_Territorial_Units_for_Statistics>`__ areas.
- :mod:`build_cutout` prepares smaller weather data portions from `ERA5 <https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era5>`__ for cutout ``europe-2013-era5`` and SARAH for cutout ``europe-2013-sarah``.
- :mod:`build_cutout` prepares smaller weather data portions from `ERA5 <https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era5>`__ for cutout ``europe-2013-sarah3-era5`` and SARAH for cutout ``europe-2013-sarah``.

With these and the externally extracted ENTSO-E online map topology
(``data/entsoegridkit``), it can build a base PyPSA network with the following rules:
Expand Down
19 changes: 19 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Release Notes
Upcoming Release
================

* Renamed the carrier of batteries in BEVs from `battery storage` to `EV battery` and the corresponding bus carrier from `Li ion` to `EV battery`. This is to avoid confusion with stationary battery storage.

* Changed default assumptions about waste heat usage from PtX and fuel cells in district heating.
The default value for the link efficiency scaling factor was changed from 100% to 25%.
It can be set to other values in the configuration ``sector: use_TECHNOLOGY_waste_heat``.
Expand Down Expand Up @@ -39,12 +41,29 @@ Upcoming Release

* Bugfix: Impose minimum value of zero for district heating progress between current and future market share in :mod:`build_district_heat_share`.

* The ``{scope}`` wildcard was removed, since its outputs were not used.

* Enable parallelism in :mod:`determine_availability_matrix_MD_UA.py` and remove plots. This requires the use of temporary files.

* Added new feature that to base the electricity network on OpenStreetMap (OSM data) (PR https://github.com/PyPSA/pypsa-eur/pull/1079). Note that a heuristics based cleaning process is used for lines and links where electrical parameters are incomplete, missing, or ambiguous. Through ``electricity_network["base_network"]``, the base network can be set to "gridkit" (original default setting), "osm-prebuilt" (which downloads the latest prebuilt snapshot based on OSM data from Zenodo), or "osm-raw" which retrieves (once) and cleans the raw OSM data and subsequently builds the network. Note that this process may take a few minutes.

* Voltage settings have been aggregated and are now directly read from the line type dictionary. Instead of ``electricity["voltages"]``, scripts have been updated to refer to ``lines["types"].keys()``.

* Updated pre-built `weather data cutouts
<https://zenodo.org/records/12791128>`__. These are now merged cutouts with
solar irradiation from the new SARAH-3 dataset while taking all other
variables from ERA5. Cutouts are now available for multiple years (2010, 2013,
2019, and 2023).

* Added option ``solving: curtailment_mode``` which fixes the dispatch profiles
of generators with time-varying p_max_pu by setting ``p_min_pu = p_max_pu``
and adds an auxiliary curtailment generator with negative sign (to absorb
excess power) at every AC bus. This can speed up the solving process as the
curtailment decision is aggregated into a single generator per region.

* In :mod:`base_network`, replace own voronoi polygon calculation function with
Geopandas `gdf.voronoi_polygons` method.

PyPSA-Eur 0.11.0 (25th May 2024)
=====================================

Expand Down
7 changes: 0 additions & 7 deletions doc/wildcards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,6 @@ The ``{sector_opts}`` wildcard is only used for sector-coupling studies.
:widths: 10,20,10,10
:file: configtables/sector-opts.csv

.. _scope:

The ``{scope}`` wildcard
========================

Takes values ``residential``, ``urban``, ``total``.

.. _planning_horizons:

The ``{planning_horizons}`` wildcard
Expand Down
Loading

0 comments on commit 5392e64

Please sign in to comment.