Skip to content

Commit

Permalink
Merge branch 'features/status2023' into features/status2023_cached_ffe
Browse files Browse the repository at this point in the history
  • Loading branch information
nailend authored Jan 18, 2024
2 parents 8029d38 + eda0909 commit 59d0d2f
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 20 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ Added
`#169 <https://github.com/openego/powerd-data/pull/169>`_
* Use cached DemandRegio tables and scale status2023 cts & ind
`#185 <https://github.com/openego/powerd-data/pull/185>`_
* Add status2023 scenario of demandregio households
`#186 <https://github.com/openego/powerd-data/pull/186>`_



Expand Down
55 changes: 36 additions & 19 deletions src/egon/data/datasets/demandregio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,18 +445,40 @@ def disagg_households_power(
pd.DataFrame or pd.Series
"""
# source: survey of energieAgenturNRW
# with/without direct water heating (DHW), and weighted average
# https://1-stromvergleich.com/wp-content/uploads/erhebung_wo_bleibt_der_strom.pdf
demand_per_hh_size = pd.DataFrame(
index=range(1, 7),
data={
"weighted DWH": [2290, 3202, 4193, 4955, 5928, 5928],
"without DHW": [1714, 2812, 3704, 4432, 5317, 5317],
# "weighted DWH": [2290, 3202, 4193, 4955, 5928, 5928],
# "without DHW": [1714, 2812, 3704, 4432, 5317, 5317],
"with_DHW": [2181, 3843, 5151, 6189, 7494, 8465],
"without_DHW": [1798, 2850, 3733, 4480, 5311, 5816],
"weighted": [2256, 3248, 4246, 5009, 5969, 6579],
},
)

if scenario == "eGon100RE":
# chose demand per household size from survey without DHW
power_per_HH = (
demand_per_hh_size["without_DHW"] / 1e3
) # TODO why without?

# calculate demand per nuts3 in 2011
df_2011 = data.households_per_size(year=2011) * power_per_HH

# scale demand per hh-size to meet demand without heat
# according to JRC in 2011 (136.6-(20.14+9.41) TWh)
# TODO check source and method
power_per_HH *= (136.6 - (20.14 + 9.41)) * 1e6 / df_2011.sum().sum()

# calculate demand per nuts3 in 2050
df = data.households_per_size(year=year) * power_per_HH

# Bottom-Up: Power demand by household sizes in [MWh/a] for each scenario
if scenario in ["status2019", "eGon2021", "eGon2035"]:
elif scenario in ["status2019", "status2023", "eGon2021", "eGon2035"]:
# chose demand per household size from survey including weighted DHW
power_per_HH = demand_per_hh_size["weighted DWH"] / 1e3
power_per_HH = demand_per_hh_size["weighted"] / 1e3

# calculate demand per nuts3
df = (
Expand All @@ -466,21 +488,16 @@ def disagg_households_power(

if scenario == "eGon2035":
# scale to fit demand of NEP 2021 scebario C 2035 (119TWh)
df *= 119000000 / df.sum().sum()
df *= 119 * 1e6 / df.sum().sum()

elif scenario == "eGon100RE":
# chose demand per household size from survey without DHW
power_per_HH = demand_per_hh_size["without DHW"] / 1e3

# calculate demand per nuts3 in 2011
df_2011 = data.households_per_size(year=2011) * power_per_HH

# scale demand per hh-size to meet demand without heat
# according to JRC in 2011 (136.6-(20.14+9.41) TWh)
power_per_HH *= (136.6 - (20.14 + 9.41)) * 1e6 / df_2011.sum().sum()
if scenario == "status2023":
# scale to fit demand of BDEW 2023 (130.48 TWh) see issue #180
df *= 130.48 * 1e6 / df.sum().sum()

# calculate demand per nuts3 in 2050
df = data.households_per_size(year=year) * power_per_HH
# if scenario == "status2021": # TODO status2021
# # scale to fit demand of AGEB 2021 (138.6 TWh)
# # https://ag-energiebilanzen.de/wp-content/uploads/2023/01/AGEB_22p2_rev-1.pdf#page=10
# df *= 138.6 * 1e6 / df.sum().sum()

else:
print(
Expand All @@ -501,7 +518,7 @@ def insert_hh_demand(scenario, year, engine):
Parameters
----------
scenario : str
Name of the corresponing scenario.
Name of the corresponding scenario.
year : int
The number of households per region is taken from this year.
Expand Down Expand Up @@ -617,7 +634,7 @@ def insert_household_demand():

scenarios = egon.data.config.settings()["egon-data"]["--scenarios"]

scenarios.append("eGon2021")
scenarios.append("eGon2021") # TODO why is this always appended?

for t in targets:
db.execute_sql(
Expand Down
31 changes: 30 additions & 1 deletion src/egon/data/datasets/scenario_parameters/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,35 @@ def global_settings(scenario):
"weather_year": 2011,
"population_year": 2021,
}
elif scenario == "status2023":
parameters = {
"weather_year": 2021, # TODO check if possible for 2023
"population_year": 2021, # TODO check maybe possible for 2023 if
# ffe.opendata is online
# "fuel_costs": {
# # TYNDP 2020, data for 2020 (https://2020.entsos-tyndp-scenarios.eu/fuel-commodities-and-carbon-prices/)
# "oil": 12.9 * 3.6, # [EUR/MWh]
# "gas": 5.6 * 3.6, # [EUR/MWh]
# "coal": 3.0 * 3.6, # [EUR/MWh]
# "lignite": 1.1 * 3.6, # [EUR/MWh]
# "nuclear": 0.47 * 3.6, # [EUR/MWh]
# "biomass": read_costs(read_csv(2020), "biomass", "fuel"),
# },
# "co2_costs": 24.7, # [EUR/t_CO2], source:
# # https://de.statista.com/statistik/daten/studie/1304069/umfrage/preisentwicklung-von-co2-emissionsrechten-in-eu/
# "co2_emissions": {
# # Netzentwicklungsplan Strom 2035, Version 2021, 1. Entwurf, p. 40, table 8
# "waste": 0.165, # [t_CO2/MW_th]
# "lignite": 0.393, # [t_CO2/MW_th]
# "gas": 0.201, # [t_CO2/MW_th]
# "nuclear": 0.0, # [t_CO2/MW_th]
# "oil": 0.288, # [t_CO2/MW_th]
# "coal": 0.335, # [t_CO2/MW_th]
# "other_non_renewable": 0.268, # [t_CO2/MW_th]
# },
# "interest_rate": 0.05, # [p.u.]
}

elif scenario == "status2019":
parameters = {
"weather_year": 2019,
Expand All @@ -135,7 +164,7 @@ def global_settings(scenario):
"nuclear": 0.47*3.6, # [EUR/MWh]
"biomass": read_costs(read_csv(2020), "biomass", "fuel"),
},
"co2_costs": 24.7, # [EUR/t_CO2], source:
"co2_costs": 24.7, # [EUR/t_CO2], source:
#https://de.statista.com/statistik/daten/studie/1304069/umfrage/preisentwicklung-von-co2-emissionsrechten-in-eu/
"co2_emissions": { # Netzentwicklungsplan Strom 2035, Version 2021, 1. Entwurf, p. 40, table 8
"waste": 0.165, # [t_CO2/MW_th]
Expand Down

0 comments on commit 59d0d2f

Please sign in to comment.