diff --git a/Snakefile b/Snakefile index b14adacf..ca4efa46 100644 --- a/Snakefile +++ b/Snakefile @@ -146,10 +146,9 @@ if config["sector"]["gas_network"] or config["sector"]["H2_retrofit"]: rule build_gas_input_locations: input: - lng="data/gas_network/scigrid-gas/data/IGGIELGN_LNGs.geojson", + lng=HTTP.remote("https://globalenergymonitor.org/wp-content/uploads/2022/09/Europe-Gas-Tracker-August-2022.xlsx", keep_local=True), entry="data/gas_network/scigrid-gas/data/IGGIELGN_BorderPoints.geojson", production="data/gas_network/scigrid-gas/data/IGGIELGN_Productions.geojson", - planned_lng="data/gas_network/planned_LNGs.csv", regions_onshore=pypsaeur("resources/regions_onshore_elec_s{simpl}_{clusters}.geojson"), regions_offshore=pypsaeur('resources/regions_offshore_elec_s{simpl}_{clusters}.geojson') output: diff --git a/data/gas_network/planned_LNGs.csv b/data/gas_network/planned_LNGs.csv deleted file mode 100644 index 65706216..00000000 --- a/data/gas_network/planned_LNGs.csv +++ /dev/null @@ -1,8 +0,0 @@ -name,geometry,max_cap_store2pipe_M_m3_per_d,source -Wilhelmshaven,"POINT(8.133 53.516)",27.4,https://www.gem.wiki/Wilhelmshaven_LNG_Terminal -Brunsbüttel,"POINT(8.976 53.914)",19.2,https://www.gem.wiki/Brunsb%C3%BCttel_LNG_Terminal -Stade,"POINT(9.510 53.652)",32.9,https://www.gem.wiki/Stade_LNG_Terminal -Alexandroupolis,"POINT(25.843 40.775)",16.7,https://www.gem.wiki/Alexandroupolis_LNG_Terminal -Shannon,"POINT(-9.442 52.581)",22.5,https://www.gem.wiki/Shannon_LNG_Terminal -Gothenburg,"POINT(11.948 57.702)",1.4,https://www.gem.wiki/Gothenburg_LNG_Terminal -Cork,"POINT(-8.323 51.831)",11.0,https://www.gem.wiki/Cork_LNG_Terminal \ No newline at end of file diff --git a/scripts/build_gas_input_locations.py b/scripts/build_gas_input_locations.py index c08d92de..2edfd81b 100644 --- a/scripts/build_gas_input_locations.py +++ b/scripts/build_gas_input_locations.py @@ -19,14 +19,29 @@ def read_scigrid_gas(fn): return df -def build_gas_input_locations(lng_fn, planned_lng_fn, entry_fn, prod_fn, countries): +def build_gem_lng_data(lng_fn): + df = pd.read_excel(lng_fn[0], sheet_name='LNG terminals - data') + df = df.set_index("ComboID") + + remove_status = ['Cancelled'] + remove_country = ['Cyprus','Turkey'] + remove_terminal = ['Puerto de la Luz LNG Terminal', 'Gran Canaria LNG Terminal'] + + df = df.query("Status != 'Cancelled' \ + & Country != @remove_country \ + & TerminalName != @remove_terminal \ + & CapacityInMtpa != '--'") + + df.CapacityInMtpa = df.CapacityInMtpa.astype(float) + + geometry = gpd.points_from_xy(df['Longitude'], df['Latitude']) + return gpd.GeoDataFrame(df, geometry=geometry, crs="EPSG:4326") + + +def build_gas_input_locations(lng_fn, entry_fn, prod_fn, countries): # LNG terminals - lng = read_scigrid_gas(lng_fn) - planned_lng = pd.read_csv(planned_lng_fn) - planned_lng.geometry = planned_lng.geometry.apply(wkt.loads) - planned_lng = gpd.GeoDataFrame(planned_lng, crs=4326) - lng = pd.concat([lng, planned_lng], ignore_index=True) + lng = build_gem_lng_data(lng_fn) # Entry points from outside the model scope entry = read_scigrid_gas(entry_fn) @@ -45,10 +60,11 @@ def build_gas_input_locations(lng_fn, planned_lng_fn, entry_fn, prod_fn, countri (prod.country_code != "DE") ] - conversion_factor = 437.5 # MCM/day to MWh/h - lng["p_nom"] = lng["max_cap_store2pipe_M_m3_per_d"] * conversion_factor - entry["p_nom"] = entry["max_cap_from_to_M_m3_per_d"] * conversion_factor - prod["p_nom"] = prod["max_supply_M_m3_per_d"] * conversion_factor + mcm_per_day_to_mw = 437.5 # MCM/day to MWh/h + mtpa_to_mw = 1649.224 # mtpa to MWh/h + lng["p_nom"] = lng["CapacityInMtpa"] * mtpa_to_mw + entry["p_nom"] = entry["max_cap_from_to_M_m3_per_d"] * mcm_per_day_to_mw + prod["p_nom"] = prod["max_supply_M_m3_per_d"] * mcm_per_day_to_mw lng["type"] = "lng" entry["type"] = "pipeline" @@ -64,7 +80,7 @@ if __name__ == "__main__": if 'snakemake' not in globals(): from helper import mock_snakemake snakemake = mock_snakemake( - 'build_gas_import_locations', + 'build_gas_input_locations', simpl='', clusters='37', ) @@ -87,7 +103,6 @@ if __name__ == "__main__": gas_input_locations = build_gas_input_locations( snakemake.input.lng, - snakemake.input.planned_lng, snakemake.input.entry, snakemake.input.production, countries