diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 65983f65c..ee5fe171f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -164,6 +164,8 @@ Added `#405 `_ * Fill egon-etrago-generators table `#485 `_ +* Include biomass CHP plants to eTraGo tables + `#498 `_ .. _PR #159: https://github.com/openego/eGon-data/pull/159 diff --git a/src/egon/data/datasets.yml b/src/egon/data/datasets.yml index 52693356a..36c0361e1 100644 --- a/src/egon/data/datasets.yml +++ b/src/egon/data/datasets.yml @@ -701,6 +701,7 @@ chp_location: vg250_lan: schema: 'boundaries' table: 'vg250_lan' + mastr_biomass: "bnetza_mastr_biomass_cleaned.csv" targets: chp_table: table: 'egon_chp_plants' @@ -724,6 +725,9 @@ chp_etrago: link: schema: 'grid' table: 'egon_etrago_link' + generator: + schema: 'grid' + table: 'egon_etrago_generator' DSM_CTS_industry: sources: diff --git a/src/egon/data/datasets/chp/__init__.py b/src/egon/data/datasets/chp/__init__.py index f43d96fc4..d7f728ea1 100644 --- a/src/egon/data/datasets/chp/__init__.py +++ b/src/egon/data/datasets/chp/__init__.py @@ -16,11 +16,18 @@ from egon.data.datasets import Dataset from egon.data.datasets.chp.match_nep import insert_large_chp from egon.data.datasets.chp.small_chp import ( + assign_use_case, existing_chp_smaller_10mw, extension_per_federal_state, select_target, ) from egon.data.datasets.etrago_setup import link_geom_from_buses +from egon.data.datasets.power_plants import ( + assign_bus_id, + assign_voltage_level, + filter_mastr_geometry, + scale_prox2now, +) Base = declarative_base() @@ -183,25 +190,120 @@ def assign_heat_bus(scenario="eGon2035"): # Insert district heating CHP with heat_bus_id session = sessionmaker(bind=db.engine())() for i, row in chp.iterrows(): - entry = EgonChp( - id=i, - sources=row.sources, - source_id=row.source_id, - carrier=row.carrier, - el_capacity=row.el_capacity, - th_capacity=row.th_capacity, - electrical_bus_id=row.electrical_bus_id, - ch4_bus_id=row.ch4_bus_id, - district_heating_area_id=row.district_heating_area_id, - district_heating=row.district_heating, - voltage_level=row.voltage_level, - scenario=scenario, - geom=f"SRID=4326;POINT({row.geom.x} {row.geom.y})", - ) + if row.carrier != "biomass": + entry = EgonChp( + id=i, + sources=row.sources, + source_id=row.source_id, + carrier=row.carrier, + el_capacity=row.el_capacity, + th_capacity=row.th_capacity, + electrical_bus_id=row.electrical_bus_id, + ch4_bus_id=row.ch4_bus_id, + district_heating_area_id=row.district_heating_area_id, + district_heating=row.district_heating, + voltage_level=row.voltage_level, + scenario=scenario, + geom=f"SRID=4326;POINT({row.geom.x} {row.geom.y})", + ) + else: + entry = EgonChp( + id=i, + sources=row.sources, + source_id=row.source_id, + carrier=row.carrier, + el_capacity=row.el_capacity, + th_capacity=row.th_capacity, + electrical_bus_id=row.electrical_bus_id, + district_heating_area_id=row.district_heating_area_id, + district_heating=row.district_heating, + voltage_level=row.voltage_level, + scenario=scenario, + geom=f"SRID=4326;POINT({row.geom.x} {row.geom.y})", + ) session.add(entry) session.commit() +def insert_biomass_chp(scenario): + """Insert biomass chp plants of future scenario + + Parameters + ---------- + scenario : str + Name of scenario. + + Returns + ------- + None. + + """ + cfg = config.datasets()["chp_location"] + + # import target values from NEP 2021, scneario C 2035 + target = select_target("biomass", scenario) + + # import data for MaStR + mastr = pd.read_csv(cfg["sources"]["mastr_biomass"]).query( + "EinheitBetriebsstatus=='InBetrieb'" + ) + + # Drop entries without federal state or 'AusschließlichWirtschaftszone' + mastr = mastr[ + mastr.Bundesland.isin( + pd.read_sql( + f"""SELECT DISTINCT ON (gen) + REPLACE(REPLACE(gen, '-', ''), 'ü', 'ue') as states + FROM {cfg['sources']['vg250_lan']['schema']}. + {cfg['sources']['vg250_lan']['table']}""", + con=db.engine(), + ).states.values + ) + ] + + # Scaling will be done per federal state in case of eGon2035 scenario. + if scenario == "eGon2035": + level = "federal_state" + else: + level = "country" + + # Choose only entries with valid geometries inside DE/test mode + mastr_loc = filter_mastr_geometry(mastr).set_geometry("geometry") + + # Scale capacities to meet target values + mastr_loc = scale_prox2now(mastr_loc, target, level=level) + + # Assign bus_id + if len(mastr_loc) > 0: + mastr_loc["voltage_level"] = assign_voltage_level(mastr_loc, cfg) + mastr_loc = assign_bus_id(mastr_loc, cfg) + + mastr_loc = assign_use_case(mastr_loc, cfg["sources"]) + + # Insert entries with location + session = sessionmaker(bind=db.engine())() + for i, row in mastr_loc.iterrows(): + if row.ThermischeNutzleistung > 0: + entry = EgonChp( + sources={ + "chp": "MaStR", + "el_capacity": "MaStR scaled with NEP 2021", + "th_capacity": "MaStR", + }, + source_id={"MastrNummer": row.EinheitMastrNummer}, + carrier="biomass", + el_capacity=row.Nettonennleistung, + th_capacity=row.ThermischeNutzleistung / 1000, + scenario=scenario, + district_heating=row.district_heating, + electrical_bus_id=row.bus_id, + voltage_level=row.voltage_level, + geom=f"SRID=4326;POINT({row.Laengengrad} {row.Breitengrad})", + ) + session.add(entry) + session.commit() + + def insert_chp_egon2035(): """Insert CHP plants for eGon2035 considering NEP and MaStR data @@ -217,6 +319,8 @@ def insert_chp_egon2035(): targets = config.datasets()["chp_location"]["targets"] + insert_biomass_chp("eGon2035") + # Insert large CHPs based on NEP's list of conventional power plants MaStR_konv = insert_large_chp(sources, targets["chp_table"], EgonChp) @@ -331,7 +435,7 @@ class Chp(Dataset): def __init__(self, dependencies): super().__init__( name="Chp", - version="0.0.1", + version="0.0.2", dependencies=dependencies, tasks=( create_tables, diff --git a/src/egon/data/datasets/chp/match_nep.py b/src/egon/data/datasets/chp/match_nep.py index af45425b8..74e819a72 100644 --- a/src/egon/data/datasets/chp/match_nep.py +++ b/src/egon/data/datasets/chp/match_nep.py @@ -2,19 +2,20 @@ The module containing all code dealing with large chp from NEP list. """ -import pandas as pd +from sqlalchemy.orm import sessionmaker import geopandas -from egon.data import db, config +import pandas as pd + +from egon.data import config, db +from egon.data.datasets.chp.small_chp import assign_use_case from egon.data.datasets.power_plants import ( - assign_voltage_level, assign_bus_id, assign_gas_bus_id, + assign_voltage_level, filter_mastr_geometry, select_target, ) -from egon.data.datasets.chp.small_chp import assign_use_case from egon.data.datasets.scenario_capacities import map_carrier -from sqlalchemy.orm import sessionmaker ##################################### NEP treatment ################################# diff --git a/src/egon/data/datasets/chp/small_chp.py b/src/egon/data/datasets/chp/small_chp.py index ca82b72c2..58e04b6e1 100644 --- a/src/egon/data/datasets/chp/small_chp.py +++ b/src/egon/data/datasets/chp/small_chp.py @@ -1,16 +1,17 @@ """ The module containing all code dealing with chp < 10MW. """ -from egon.data import db, config +from sqlalchemy.orm import sessionmaker +import geopandas as gpd +import numpy as np + +from egon.data import config, db from egon.data.datasets.power_plants import ( assign_bus_id, assign_gas_bus_id, filter_mastr_geometry, select_target, ) -from sqlalchemy.orm import sessionmaker -import geopandas as gpd -import numpy as np def insert_mastr_chp(mastr_chp, EgonChp): @@ -254,14 +255,18 @@ def extension_to_areas( areas.area_id == selected_areas.area_id.values[0] ], "demand", - ] -= (selected_chp.th_capacity * flh) + ] -= ( + selected_chp.th_capacity * flh + ) else: areas.loc[ areas.index[ areas.osm_id == selected_areas.osm_id.values[0] ], "demand", - ] -= (selected_chp.th_capacity * flh) + ] -= ( + selected_chp.th_capacity * flh + ) areas = areas[areas.demand > 0] else: @@ -370,7 +375,7 @@ def extension_district_heating( SELECT b.residential_and_service_demand - sum(a.el_capacity)*{flh_chp} as demand, b.area_id, - ST_Transform(ST_Centroid(geom_polygon), 4326) as geom + ST_Transform(ST_PointOnSurface(geom_polygon), 4326) as geom FROM {targets['chp_table']['schema']}. {targets['chp_table']['table']} a, @@ -538,6 +543,7 @@ def extension_per_federal_state(federal_state, EgonChp): FROM {target_table['schema']}. {target_table['table']} WHERE sources::json->>'el_capacity' = 'MaStR' + AND carrier != 'biomass' AND ST_Intersects(geom, ( SELECT ST_Union(geometry) FROM {sources['vg250_lan']['schema']}.{sources['vg250_lan']['table']} b diff --git a/src/egon/data/datasets/chp_etrago.py b/src/egon/data/datasets/chp_etrago.py index 532ccad48..33467e67c 100644 --- a/src/egon/data/datasets/chp_etrago.py +++ b/src/egon/data/datasets/chp_etrago.py @@ -3,9 +3,10 @@ """ import geopandas as gpd -from egon.data import db, config -from egon.data.datasets import Dataset +import pandas as pd +from egon.data import config, db +from egon.data.datasets import Dataset from egon.data.datasets.etrago_setup import link_geom_from_buses @@ -13,13 +14,23 @@ class ChpEtrago(Dataset): def __init__(self, dependencies): super().__init__( name="ChpEtrago", - version="0.0.0", + version="0.0.1", dependencies=dependencies, tasks=(insert), ) def insert(): + """Insert combined heat and power plants into eTraGo tables. + + Gas CHP plants are modeled as links to the gas grid, + biomass CHP plants (only in eGon2035) are modeled as generators + + Returns + ------- + None. + + """ sources = config.datasets()["chp_etrago"]["sources"] @@ -32,7 +43,14 @@ def insert(): AND scn_name = 'eGon2035' """ ) - + db.execute_sql( + f""" + DELETE FROM {targets['generator']['schema']}.{targets['generator']['table']} + WHERE carrier LIKE '%%CHP%%' + AND scn_name = 'eGon2035' + """ + ) + # Select all CHP plants used in district heating chp_dh = db.select_dataframe( f""" SELECT electrical_bus_id, ch4_bus_id, a.carrier, @@ -55,26 +73,31 @@ def insert(): electrical_bus_id, ch4_bus_id, a.carrier, c.bus_id) """ ) + # Divide into biomass and gas CHP which are modelled differently + chp_link_dh = chp_dh[chp_dh.carrier != "biomass"].index + chp_generator_dh = chp_dh[chp_dh.carrier == "biomass"].index - # Create geodataframes for CHP plants + # Create geodataframes for gas CHP plants chp_el = link_geom_from_buses( gpd.GeoDataFrame( - index=chp_dh.index, + index=chp_link_dh, data={ "scn_name": "eGon2035", - "bus0": chp_dh.ch4_bus_id, - "bus1": chp_dh.electrical_bus_id, - "p_nom": chp_dh.el_capacity, + "bus0": chp_dh.loc[chp_link_dh, "ch4_bus_id"].astype(int), + "bus1": chp_dh.loc[chp_link_dh, "electrical_bus_id"].astype( + int + ), + "p_nom": chp_dh.loc[chp_link_dh, "el_capacity"], "carrier": "urban central gas CHP", }, ), "eGon2035", ) - + # Set index chp_el["link_id"] = range( db.next_etrago_id("link"), len(chp_el) + db.next_etrago_id("link") ) - + # Insert into database chp_el.to_postgis( targets["link"]["table"], schema=targets["link"]["schema"], @@ -82,14 +105,15 @@ def insert(): if_exists="append", ) + # chp_heat = link_geom_from_buses( gpd.GeoDataFrame( - index=chp_dh.index, + index=chp_link_dh, data={ "scn_name": "eGon2035", - "bus0": chp_dh.ch4_bus_id, - "bus1": chp_dh.heat_bus_id, - "p_nom": chp_dh.th_capacity, + "bus0": chp_dh.loc[chp_link_dh, "ch4_bus_id"].astype(int), + "bus1": chp_dh.loc[chp_link_dh, "heat_bus_id"].astype(int), + "p_nom": chp_dh.loc[chp_link_dh, "th_capacity"], "carrier": "urban central gas CHP heat", }, ), @@ -107,6 +131,56 @@ def insert(): if_exists="append", ) + # Insert biomass CHP as generators + # Create geodataframes for CHP plants + chp_el_gen = pd.DataFrame( + index=chp_generator_dh, + data={ + "scn_name": "eGon2035", + "bus": chp_dh.loc[chp_generator_dh, "electrical_bus_id"].astype( + int + ), + "p_nom": chp_dh.loc[chp_generator_dh, "el_capacity"], + "carrier": "urban central biomass CHP", + }, + ) + + chp_el_gen["generator_id"] = range( + db.next_etrago_id("generator"), + len(chp_el_gen) + db.next_etrago_id("generator"), + ) + + chp_el_gen.to_sql( + targets["generator"]["table"], + schema=targets["generator"]["schema"], + con=db.engine(), + if_exists="append", + index=False, + ) + + chp_heat_gen = pd.DataFrame( + index=chp_generator_dh, + data={ + "scn_name": "eGon2035", + "bus": chp_dh.loc[chp_generator_dh, "heat_bus_id"].astype(int), + "p_nom": chp_dh.loc[chp_generator_dh, "th_capacity"], + "carrier": "urban central biomass CHP heat", + }, + ) + + chp_heat_gen["generator_id"] = range( + db.next_etrago_id("generator"), + len(chp_heat_gen) + db.next_etrago_id("generator"), + ) + + chp_heat_gen.to_sql( + targets["generator"]["table"], + schema=targets["generator"]["schema"], + con=db.engine(), + if_exists="append", + index=False, + ) + chp_industry = db.select_dataframe( f""" SELECT electrical_bus_id, ch4_bus_id, carrier, @@ -117,15 +191,22 @@ def insert(): GROUP BY (electrical_bus_id, ch4_bus_id, carrier) """ ) + chp_link_ind = chp_industry[chp_industry.carrier != "biomass"].index + + chp_generator_ind = chp_industry[chp_industry.carrier == "biomass"].index chp_el_ind = link_geom_from_buses( gpd.GeoDataFrame( - index=chp_industry.index, + index=chp_link_ind, data={ "scn_name": "eGon2035", - "bus0": chp_industry.ch4_bus_id, - "bus1": chp_industry.electrical_bus_id, - "p_nom": chp_industry.el_capacity, + "bus0": chp_industry.loc[chp_link_ind, "ch4_bus_id"].astype( + int + ), + "bus1": chp_industry.loc[ + chp_link_ind, "electrical_bus_id" + ].astype(int), + "p_nom": chp_industry.loc[chp_link_ind, "el_capacity"], "carrier": "industrial gas CHP", }, ), @@ -142,3 +223,28 @@ def insert(): con=db.engine(), if_exists="append", ) + # Insert biomass CHP as generators + chp_el_ind_gen = pd.DataFrame( + index=chp_generator_ind, + data={ + "scn_name": "eGon2035", + "bus": chp_industry.loc[ + chp_generator_ind, "electrical_bus_id" + ].astype(int), + "p_nom": chp_industry.loc[chp_generator_ind, "el_capacity"], + "carrier": "industrial biomass CHP", + }, + ) + + chp_el_ind_gen["generator_id"] = range( + db.next_etrago_id("generator"), + len(chp_el_ind_gen) + db.next_etrago_id("generator"), + ) + + chp_el_ind_gen.to_sql( + targets["generator"]["table"], + schema=targets["generator"]["schema"], + con=db.engine(), + if_exists="append", + index=False, + ) diff --git a/src/egon/data/datasets/heat_etrago/__init__.py b/src/egon/data/datasets/heat_etrago/__init__.py index b5dd4f798..0945d7d24 100644 --- a/src/egon/data/datasets/heat_etrago/__init__.py +++ b/src/egon/data/datasets/heat_etrago/__init__.py @@ -12,7 +12,7 @@ def insert_buses(carrier, scenario="eGon2035"): - """Insert heat buses to etrago table + """ Insert heat buses to etrago table Heat buses are divided into central and individual heating @@ -88,7 +88,7 @@ def insert_buses(carrier, scenario="eGon2035"): def insert_central_direct_heat(scenario="eGon2035"): - """Insert renewable heating technologies (solar and geo thermal) + """ Insert renewable heating technologies (solar and geo thermal) Parameters ---------- @@ -372,7 +372,7 @@ def insert_rural_gas_boilers(scenario="eGon2035", efficiency=0.98): def buses(): - """Insert individual and district heat buses into eTraGo-tables + """ Insert individual and district heat buses into eTraGo-tables Parameters ---------- @@ -388,7 +388,7 @@ def buses(): def supply(): - """Insert individual and district heat supply into eTraGo-tables + """ Insert individual and district heat supply into eTraGo-tables Parameters ---------- diff --git a/src/egon/data/datasets/heat_etrago/power_to_heat.py b/src/egon/data/datasets/heat_etrago/power_to_heat.py index c5e70a443..e14bb3cce 100644 --- a/src/egon/data/datasets/heat_etrago/power_to_heat.py +++ b/src/egon/data/datasets/heat_etrago/power_to_heat.py @@ -98,6 +98,7 @@ def insert_central_power_to_heat(scenario="eGon2035"): AND carrier = 'heat_pump' """, geom_col="geometry", + epsg=4326, ) # Assign voltage level @@ -137,6 +138,7 @@ def insert_central_power_to_heat(scenario="eGon2035"): AND carrier = 'resistive_heater' """, geom_col="geometry", + epsg=4326, ) # Assign voltage level @@ -344,7 +346,8 @@ def assign_electrical_bus(heat_pumps, carrier, multiple_per_mv_grid=False): SELECT bus_id, geom FROM {sources['egon_mv_grid_district']['schema']}. {sources['egon_mv_grid_district']['table']} - """ + """, + epsg=4326, ) # Map zensus cells to district heating areas @@ -363,7 +366,8 @@ def assign_electrical_bus(heat_pumps, carrier, multiple_per_mv_grid=False): WHERE a.scenario = 'eGon2035' AND b.scenario = 'eGon2035' GROUP BY (area_id, a.zensus_population_id, geom_point) - """ + """, + epsg=4326, ) # Select area_id per heat pump diff --git a/src/egon/data/datasets/heat_supply/district_heating.py b/src/egon/data/datasets/heat_supply/district_heating.py index 0aae617c3..8210167fb 100644 --- a/src/egon/data/datasets/heat_supply/district_heating.py +++ b/src/egon/data/datasets/heat_supply/district_heating.py @@ -9,7 +9,7 @@ def capacity_per_district_heating_category(district_heating_areas, scenario): - """Calculates target values per district heating category and technology + """ Calculates target values per district heating category and technology Parameters ---------- @@ -108,7 +108,7 @@ def set_technology_data(): def select_district_heating_areas(scenario): - """Selects district heating areas per scenario and assigns size-category + """ Selects district heating areas per scenario and assigns size-category Parameters ---------- @@ -163,7 +163,7 @@ def cascade_per_technology( areas, technologies, capacity_per_category, size_dh, max_geothermal_costs=2 ): - """Add plants of one technology suppliing district heating + """ Add plants of one technology suppliing district heating Parameters ---------- diff --git a/src/egon/data/datasets/heat_supply/individual_heating.py b/src/egon/data/datasets/heat_supply/individual_heating.py index d478a127a..23e380fce 100644 --- a/src/egon/data/datasets/heat_supply/individual_heating.py +++ b/src/egon/data/datasets/heat_supply/individual_heating.py @@ -15,7 +15,7 @@ def cascade_per_technology( max_size_individual_chp=0.05, ): - """Add plants for individual heat. + """ Add plants for individual heat. Currently only on mv grid district level. Parameters diff --git a/src/egon/data/datasets/power_plants/__init__.py b/src/egon/data/datasets/power_plants/__init__.py index f91017023..e9b709e96 100755 --- a/src/egon/data/datasets/power_plants/__init__.py +++ b/src/egon/data/datasets/power_plants/__init__.py @@ -41,9 +41,7 @@ class EgonPowerPlants(Base): sources = Column(JSONB) source_id = Column(JSONB) carrier = Column(String) - chp = Column(Boolean) el_capacity = Column(Float) - th_capacity = Column(Float) bus_id = Column(Integer) voltage_level = Column(Integer) weather_cell_id = Column(Integer) @@ -55,7 +53,7 @@ class PowerPlants(Dataset): def __init__(self, dependencies): super().__init__( name="PowerPlants", - version="0.0.4", + version="0.0.5", dependencies=dependencies, tasks=( create_tables, @@ -261,12 +259,11 @@ def insert_biomass_plants(scenario): else: level = "country" - # Scale capacities to meet target values - mastr = scale_prox2now(mastr, target, level=level) - # Choose only entries with valid geometries inside DE/test mode mastr_loc = filter_mastr_geometry(mastr).set_geometry("geometry") - # TODO: Deal with power plants without geometry + + # Scale capacities to meet target values + mastr_loc = scale_prox2now(mastr_loc, target, level=level) # Assign bus_id if len(mastr_loc) > 0: @@ -275,24 +272,22 @@ def insert_biomass_plants(scenario): # Insert entries with location session = sessionmaker(bind=db.engine())() + for i, row in mastr_loc.iterrows(): - entry = EgonPowerPlants( - sources={ - "chp": "MaStR", - "el_capacity": "MaStR scaled with NEP 2021", - "th_capacity": "MaStR", - }, - source_id={"MastrNummer": row.EinheitMastrNummer}, - carrier="biomass", - chp=type(row.KwkMastrNummer) != float, - el_capacity=row.Nettonennleistung, - th_capacity=row.ThermischeNutzleistung / 1000, - scenario=scenario, - bus_id=row.bus_id, - voltage_level=row.voltage_level, - geom=f"SRID=4326;POINT({row.Laengengrad} {row.Breitengrad})", - ) - session.add(entry) + if not row.ThermischeNutzleistung > 0: + entry = EgonPowerPlants( + sources={ + "el_capacity": "MaStR scaled with NEP 2021", + }, + source_id={"MastrNummer": row.EinheitMastrNummer}, + carrier="biomass", + el_capacity=row.Nettonennleistung, + scenario=scenario, + bus_id=row.bus_id, + voltage_level=row.voltage_level, + geom=f"SRID=4326;POINT({row.Laengengrad} {row.Breitengrad})", + ) + session.add(entry) session.commit() @@ -371,12 +366,10 @@ def insert_hydro_plants(scenario): for i, row in mastr_loc.iterrows(): entry = EgonPowerPlants( sources={ - "chp": "MaStR", "el_capacity": "MaStR scaled with NEP 2021", }, source_id={"MastrNummer": row.EinheitMastrNummer}, carrier=carrier, - chp=type(row.KwkMastrNummer) != float, el_capacity=row.Nettonennleistung, scenario=scenario, bus_id=row.bus_id, diff --git a/src/egon/data/datasets/power_plants/pv_ground_mounted.py b/src/egon/data/datasets/power_plants/pv_ground_mounted.py index 8aee65530..27ddf6c9f 100644 --- a/src/egon/data/datasets/power_plants/pv_ground_mounted.py +++ b/src/egon/data/datasets/power_plants/pv_ground_mounted.py @@ -1,10 +1,10 @@ +from shapely import wkb +import geopandas as gpd import numpy as np +import pandas as pd import psycopg2 -import geopandas as gpd -import pandas as pd from egon.data import db -from shapely import wkb def insert(): @@ -1140,8 +1140,6 @@ def pv_parks(pv_rora, pv_agri, pv_per_distr, scenario_name): # set static column values insert_pv_parks["carrier"] = "solar" - insert_pv_parks["chp"] = False - insert_pv_parks["th_capacity"] = 0 insert_pv_parks["scenario"] = scenario_name # change name and crs of geometry column diff --git a/src/egon/data/datasets/power_plants/wind_farms.py b/src/egon/data/datasets/power_plants/wind_farms.py index 7dd7f0da6..e21a17886 100755 --- a/src/egon/data/datasets/power_plants/wind_farms.py +++ b/src/egon/data/datasets/power_plants/wind_farms.py @@ -433,8 +433,6 @@ def match_district_se(x): # Set static column values insert_wind_farms["carrier"] = source - insert_wind_farms["chp"] = False - insert_wind_farms["th_capacity"] = 0 insert_wind_farms["scenario"] = scenario_year # Change name and crs of geometry column diff --git a/src/egon/data/datasets/power_plants/wind_offshore.py b/src/egon/data/datasets/power_plants/wind_offshore.py index d399bcd69..2b3be6bcb 100644 --- a/src/egon/data/datasets/power_plants/wind_offshore.py +++ b/src/egon/data/datasets/power_plants/wind_offshore.py @@ -1,9 +1,11 @@ -import pandas as pd +from pathlib import Path + +from shapely.geometry import Point import geopandas as gpd import numpy as np +import pandas as pd + from egon.data import db -from shapely.geometry import Point -from pathlib import Path import egon.data.config @@ -117,11 +119,9 @@ def insert(): # Assign static values offshore["carrier"] = "wind_offshore" - offshore["chp"] = False offshore["el_capacity"] = offshore["C 2035"] offshore["scenario"] = "eGon2035" - offshore["th_capacity"] = 0 - + # Delete unnecessary columns offshore.drop( [