Skip to content

Commit

Permalink
avoid duplicate existing RES capacities (closes #1016)
Browse files Browse the repository at this point in the history
  • Loading branch information
fneum committed May 24, 2024
1 parent a0e968e commit 5397f3f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion doc/configtables/electricity.csv
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ conventional_carriers,--,"Any subset of {nuclear, oil, OCGT, CCGT, coal, lignite
,,,
renewable_carriers,--,"Any subset of {solar, onwind, offwind-ac, offwind-dc, offwind-float, hydro}",List of renewable generators to include in the model.
estimate_renewable_capacities,,,
-- enable,,bool,Activate routine to estimate renewable capacities
-- enable,,bool,Activate routine to estimate renewable capacities in rule :mod:`add_electricity`. This option should not be used in combination with pathway planning ``foresight: myopic`` or ``foresight: perfect`` as renewable capacities are added differently in :mod:`add_existing_baseyear`.
-- from_opsd,--,bool,Add renewable capacities from `OPSD database <https://data.open-power-system-data.org/renewable_power_plants/2020-08-25>`_. The value is depreciated but still can be used.
-- year,--,bool,Renewable capacities are based on existing capacities reported by IRENA (IRENASTAT) for the specified year
-- expansion_limit,--,float or false,"Artificially limit maximum IRENA capacities to a factor. For example, an ``expansion_limit: 1.1`` means 110% of capacities . If false are chosen, the estimated renewable potentials determine by the workflow are used."
Expand Down
7 changes: 7 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ Release Notes
Upcoming Release
================

* Bugfix: The configuration setting ``electricity:
estimate_renewable_capacities: enable:`` for rule :mod:`add_electricity` is
not compatible with ``foresight: myopic``, as the former adds existing
renewable capacities in a different way in :mod:`add_existing_baseyear`.
The logic was changed so that adding existing renewable capacities is now
skipped in :mod:`add_electricity` if the foresight mode is ``myopic``.

* Bugfix: Make sure that gas-fired power plants are correctly added as OCGT or
CCGT in :mod:`add_electricity`. Previously they were always added as OCGT.

Expand Down
1 change: 1 addition & 0 deletions rules/build_electricity.smk
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ rule add_electricity:
electricity=config_provider("electricity"),
conventional=config_provider("conventional"),
costs=config_provider("costs"),
foresight=config_provider("foresight"),
drop_leap_day=config_provider("enable", "drop_leap_day"),
input:
unpack(input_profile_tech),
Expand Down
25 changes: 16 additions & 9 deletions scripts/add_electricity.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,15 +881,22 @@ def attach_line_rating(

estimate_renewable_caps = params.electricity["estimate_renewable_capacities"]
if estimate_renewable_caps["enable"]:
tech_map = estimate_renewable_caps["technology_mapping"]
expansion_limit = estimate_renewable_caps["expansion_limit"]
year = estimate_renewable_caps["year"]

if estimate_renewable_caps["from_opsd"]:
attach_OPSD_renewables(n, tech_map)
estimate_renewable_capacities(
n, year, tech_map, expansion_limit, params.countries
)
if params.foresight != "overnight":
logger.info(
"Skipping renewable capacity estimation because they are added later "
"in rule `add_existing_baseyear` with foresight mode 'myopic'."
)
else:
tech_map = estimate_renewable_caps["technology_mapping"]
expansion_limit = estimate_renewable_caps["expansion_limit"]
year = estimate_renewable_caps["year"]

if estimate_renewable_caps["from_opsd"]:
attach_OPSD_renewables(n, tech_map)

estimate_renewable_capacities(
n, year, tech_map, expansion_limit, params.countries
)

update_p_nom_max(n)

Expand Down

0 comments on commit 5397f3f

Please sign in to comment.