Appending comments for gas_input_locations
This commit is contained in:
parent
1a7dd850f2
commit
0cb0ad528a
@ -27,8 +27,7 @@ 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 = lng.CapacityInMtpa.astype(float)
|
||||||
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)
|
||||||
|
@ -28,17 +28,10 @@ if __name__ == "__main__":
|
|||||||
remove_country = ['Cyprus','Turkey']
|
remove_country = ['Cyprus','Turkey']
|
||||||
remove_terminal = ['Puerto de la Luz LNG Terminal','Gran Canaria LNG Terminal']
|
remove_terminal = ['Puerto de la Luz LNG Terminal','Gran Canaria LNG Terminal']
|
||||||
|
|
||||||
for index in df.index:
|
df = df.query("Status != 'Cancelled' \
|
||||||
if df.Status[index] in remove_status:
|
& Country != @remove_country \
|
||||||
df = df.drop([index])
|
& TerminalName != @remove_terminal \
|
||||||
elif df.Country[index] in remove_country:
|
& CapacityInMtpa != '--'")
|
||||||
df = df.drop([index])
|
|
||||||
elif df.TerminalName[index] in remove_terminal:
|
|
||||||
df = df.drop([index])
|
|
||||||
elif df.CapacityInMtpa[index] == "--":
|
|
||||||
df = df.drop([index])
|
|
||||||
else:
|
|
||||||
continue
|
|
||||||
|
|
||||||
geometry = gpd.points_from_xy(df['Longitude'], df['Latitude'])
|
geometry = gpd.points_from_xy(df['Longitude'], df['Latitude'])
|
||||||
lng = gpd.GeoDataFrame(df, geometry=geometry, crs="EPSG:4326")
|
lng = gpd.GeoDataFrame(df, geometry=geometry, crs="EPSG:4326")
|
||||||
|
Loading…
Reference in New Issue
Block a user