From b862bb95cd01c40aedd0d9e051f52469fcf95353 Mon Sep 17 00:00:00 2001 From: Tom Brown Date: Fri, 25 Sep 2020 16:23:45 +0200 Subject: [PATCH] Fix H2 underground potentials from TWh to MWh; simplify H2 data --- data/hydrogen_salt_cavern_potentials.csv | 62 ++++++++++++------------ scripts/prepare_sector_network.py | 13 ++--- 2 files changed, 38 insertions(+), 37 deletions(-) diff --git a/data/hydrogen_salt_cavern_potentials.csv b/data/hydrogen_salt_cavern_potentials.csv index e9d269af..c1168266 100644 --- a/data/hydrogen_salt_cavern_potentials.csv +++ b/data/hydrogen_salt_cavern_potentials.csv @@ -1,31 +1,31 @@ -,,TWh -AT,False, -BA,False, -BE,False, -BG,False, -CH,False, -CZ,False, -DE,True,4500 -DK,True,700 -EE,False, -ES,True,350 -FI,False, -FR,False, -GB,True,1050 -GR,True,120 -HR,False, -HU,False, -IE,False, -IT,False, -LT,False, -LU,False, -LV,False, -NL,True,150 -NO,False, -PL,True,120 -PT,True,400 -RO,False, -RS,False, -SE,False, -SI,False, -SK,False, +ct,TWh +AT, +BA, +BE, +BG, +CH, +CZ, +DE,4500 +DK,700 +EE, +ES,350 +FI, +FR, +GB,1050 +GR,120 +HR, +HU, +IE, +IT, +LT, +LU, +LV, +NL,150 +NO, +PL,120 +PT,400 +RO, +RS, +SE, +SI, +SK, diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index b596b50c..0bab8487 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -805,17 +805,18 @@ def add_storage(network): if options['hydrogen_underground_storage']: h2_salt_cavern_potential = pd.read_csv(snakemake.input.h2_cavern, - index_col=0, skiprows=[0], - names=["potential", "TWh"]) - h2_cavern_ct = h2_salt_cavern_potential[h2_salt_cavern_potential.potential] + index_col=0,squeeze=True) + h2_cavern_ct = h2_salt_cavern_potential[~h2_salt_cavern_potential.isna()] cavern_nodes = pop_layout[pop_layout.ct.isin(h2_cavern_ct.index)] h2_capital_cost = costs.at["hydrogen storage underground", "fixed"] # assumptions: weight storage potential in a country by population - h2_pot = (h2_cavern_ct.loc[cavern_nodes.ct, "TWh"].astype(float) - .reset_index().set_index(cavern_nodes.index)) - h2_pot = h2_pot.TWh * cavern_nodes.fraction + # TODO: fix with real geographic potentials + #convert TWh to MWh with 1e6 + h2_pot = h2_cavern_ct.loc[cavern_nodes.ct] + h2_pot.index = cavern_nodes.index + h2_pot = h2_pot * cavern_nodes.fraction * 1e6 network.madd("Store", cavern_nodes.index + " H2 Store",