Final edit to update LNG ports. Remove unused files

This commit is contained in:
virio-andreyana 2022-12-15 11:42:21 +01:00
parent d37cd49f7d
commit 55ff725e3b
4 changed files with 14 additions and 20 deletions

View File

@ -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
1 name geometry max_cap_store2pipe_M_m3_per_d source
2 Wilhelmshaven POINT(8.133 53.516) 27.4 https://www.gem.wiki/Wilhelmshaven_LNG_Terminal
3 Brunsbüttel POINT(8.976 53.914) 19.2 https://www.gem.wiki/Brunsb%C3%BCttel_LNG_Terminal
4 Stade POINT(9.510 53.652) 32.9 https://www.gem.wiki/Stade_LNG_Terminal
5 Alexandroupolis POINT(25.843 40.775) 16.7 https://www.gem.wiki/Alexandroupolis_LNG_Terminal
6 Shannon POINT(-9.442 52.581) 22.5 https://www.gem.wiki/Shannon_LNG_Terminal
7 Gothenburg POINT(11.948 57.702) 1.4 https://www.gem.wiki/Gothenburg_LNG_Terminal
8 Cork POINT(-8.323 51.831) 11.0 https://www.gem.wiki/Cork_LNG_Terminal

View File

@ -11,6 +11,9 @@ from shapely import wkt
from cluster_gas_network import load_bus_regions from cluster_gas_network import load_bus_regions
import warnings
warnings.filterwarnings('ignore')
def read_scigrid_gas(fn): def read_scigrid_gas(fn):
df = gpd.read_file(fn) df = gpd.read_file(fn)
@ -23,6 +26,9 @@ def build_gas_input_locations(lng_fn, entry_fn, prod_fn, countries):
# LNG terminals # LNG terminals
lng = gpd.read_file(lng_fn) lng = gpd.read_file(lng_fn)
for index in lng.index:
lng.CapacityInMtpa[index] = float(lng.CapacityInMtpa[index])
# Entry points from outside the model scope # Entry points from outside the model scope
entry = read_scigrid_gas(entry_fn) entry = read_scigrid_gas(entry_fn)
entry["from_country"] = entry.from_country.str.rstrip() entry["from_country"] = entry.from_country.str.rstrip()

View File

@ -1,12 +1,11 @@
""" """
Retrieve gas infrastructure data fro Retrieve LNG gas infrastructure data from "https://globalenergymonitor.org/wp-content/uploads/2022/09/Europe-Gas-Tracker-August-2022.xlsx"
Note: This is the script that removes non EU grid countries and terminals that are not closely connected to the europe network
""" """
import logging import logging
from helper import progress_retrieve import pandas as pd
import geopandas as gpd
import zipfile
from pathlib import Path
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -14,18 +13,15 @@ logger = logging.getLogger(__name__)
if __name__ == "__main__": if __name__ == "__main__":
if 'snakemake' not in globals(): if 'snakemake' not in globals():
from helper import mock_snakemake from helper import mock_snakemake
snakemake = mock_snakemake('retrieve_gas_network_data') snakemake = mock_snakemake('retrieve_gas_input_locations')
rootpath = '..' rootpath = '..'
else: else:
rootpath = '.' rootpath = '.'
# LNG terminals # LNG terminals
lng_url="https://globalenergymonitor.org/wp-content/uploads/2022/09/Europe-Gas-Tracker-August-2022.xlsx", lng_url="https://globalenergymonitor.org/wp-content/uploads/2022/09/Europe-Gas-Tracker-August-2022.xlsx"
df = pd.read_excel(lng_url,storage_options={'User-Agent': 'Mozilla/5.0'}, sheet_name = 'LNG terminals - data')
storage_options = {'User-Agent': 'Mozilla/5.0'}
df = pd.read_excel(lng_url, storage_options=storage_options, sheet_name = 'LNG terminals - data')
#df = pd.read_excel(fn, sheet_name = 'LNG terminals - data')
df = df.set_index("ComboID") df = df.set_index("ComboID")
remove_status = ['Cancelled'] remove_status = ['Cancelled']