@@ -413,26 +413,28 @@ def get_data_DEA(tech, data_in, expectation=None):
413
413
414
414
if tech == "air separation unit" :
415
415
416
- # Calculate ASU cost separate to HB facility in terms of t N2 output
417
- # To add the cost of an ASU a multiplication factor of 1.06-1.09
418
- # should be applied to the total Specific Investment
416
+ # Calculate ASU cost separate to HB facility in terms of t N2 output
419
417
df .loc [[
420
- "Specific investment [MEUR /MW Ammonia output]" ,
421
- "Fixed O&M [kEUR/MW Ammonia/year]" ,
422
- "Variable O&M [EUR/MWh Ammonia]"
423
- ]] *= df .loc ["Specific investment mark-up factor optional ASU" ]
424
- # / excel.loc["N2 Consumption, [t/t] Ammonia"]
425
-
418
+ "Specific investment [MEUR /TPD Ammonia output]" ,
419
+ "Fixed O&M [kEUR /TPD Ammonia]" ,
420
+ "Variable O&M [EUR /t Ammonia]"
421
+ ]] *= (df .loc ["Specific investment mark-up factor optional ASU" ] - 1. ) / excel .loc ["N2 Consumption, [t/t] Ammonia" ]
422
+ # Convert output to hourly generation
423
+ df .loc [[
424
+ "Specific investment [MEUR /TPD Ammonia output]" ,
425
+ "Fixed O&M [kEUR /TPD Ammonia]" ,
426
+ ]] *= 24
427
+
426
428
# Rename costs for correct units
427
- # df.index = df.index.str.replace("MEUR /MW Ammonia output", "MEUR/MW_N2 /h")
428
- # df.index = df.index.str.replace("kEUR/MW Ammonia/year ", "kEUR/MW_N2 /h/year")
429
- # df.index = df.index.str.replace("EUR/MWh Ammonia", "EUR/MWh_N2 ")
429
+ df .index = df .index .str .replace ("MEUR /TPD Ammonia output" , "MEUR/t_N2 /h" )
430
+ df .index = df .index .str .replace ("kEUR /TPD Ammonia" , "kEUR/t_N2 /h/year" )
431
+ df .index = df .index .str .replace ("EUR /t Ammonia" , "EUR/t_N2 " )
430
432
431
433
df .drop (df .loc [df .index .str .contains ("Specific investment mark-up factor optional ASU" )].index , inplace = True )
432
- # df.drop(df.loc[df.index.str.contains("Specific investment [MEUR /MW Ammonia output]", regex=False)].index, inplace=True)
433
- # df.drop(df.loc[df.index.str.contains("Fixed O&M [kEUR/MW Ammonia/year]", regex=False)].index, inplace=True)
434
- # df.drop(df.loc[df.index.str.contains("Variable O&M [EUR/MWh Ammonia]", regex=False)].index, inplace=True)
435
-
434
+ df .drop (df .loc [df .index .str .contains ("Specific investment [MEUR /MW Ammonia output]" , regex = False )].index , inplace = True )
435
+ df .drop (df .loc [df .index .str .contains ("Fixed O&M [kEUR/MW Ammonia/year]" , regex = False )].index , inplace = True )
436
+ df .drop (df .loc [df .index .str .contains ("Variable O&M [EUR/MWh Ammonia]" , regex = False )].index , inplace = True )
437
+
436
438
if "solid biomass power" in tech :
437
439
df .index = df .index .str .replace ("EUR/MWeh" , "EUR/MWh" )
438
440
@@ -749,9 +751,11 @@ def clean_up_units(tech_data, value_column="", source=""):
749
751
750
752
tech_data .unit = tech_data .unit .str .replace ("FT Liquids Output, MWh/MWh Total Inpu" , "MWh_FT/MWh_H2" )
751
753
# biomass-to-methanol-specific
752
- tech_data .unit = tech_data .unit .str .replace ("Methanol Output, MWh/MWh Total Inpu" , "MWh_MeOH/MWh_th" )
753
- tech_data .unit = tech_data .unit .str .replace ("District heat Output, MWh/MWh Total Inpu" , "MWh_th/MWh_th" )
754
- tech_data .unit = tech_data .unit .str .replace ("Electricity Output, MWh/MWh Total Inpu" , "MWh_e/MWh_th" )
754
+ if isinstance (tech_data .index , pd .MultiIndex ):
755
+ tech_data .loc [tech_data .index .get_level_values (1 )== "Methanol Output," , "unit" ] = "MWh_MeOH/MWh_th"
756
+ tech_data .loc [tech_data .index .get_level_values (1 )== 'District heat Output,' , "unit" ] = "MWh_th/MWh_th"
757
+ tech_data .loc [tech_data .index .get_level_values (1 )== 'Electricity Output,' , "unit" ] = "MWh_e/MWh_th"
758
+
755
759
# Ammonia-specific
756
760
tech_data .unit = tech_data .unit .str .replace ("MW Ammonia output" , "MW_NH3" ) #specific investment
757
761
tech_data .unit = tech_data .unit .str .replace ("MW Ammonia" , "MW_NH3" ) #fom
@@ -1915,14 +1919,11 @@ def add_energy_storage_database(costs, data_year):
1915
1919
agg = df .loc [power_filter ].groupby (["technology" , "year" ]).sum (numeric_only = True )
1916
1920
charger_investment_filter = charger_filter & (df .technology == tech ) & (df .parameter == "investment" )
1917
1921
discharger_investment_filter = discharger_filter & (df .technology == tech ) & (df .parameter == "investment" )
1918
- for a in [2021 , 2030 ]:
1919
- df_year = (df .year == a )
1920
- df .loc [charger_investment_filter & df_year , "value" ] += agg .loc [(tech , a )]/ 2
1921
- df .loc [discharger_investment_filter & df_year , "value" ] += agg .loc [(tech , a )]/ 2
1922
-
1923
- index = df .loc [df ["technology_type" ]!= "nan" ].index
1924
- df .technology_type .replace ("nan" , np .nan , inplace = True )
1925
- df .loc [index ,"technology" ] = df .loc [index , "technology" ] + "-" + df .loc [index , "technology_type" ]
1922
+ df .loc [charger_investment_filter & df .year == 2021 , "value" ] += agg .loc [(tech , 2021 )]/ 2
1923
+ df .loc [charger_investment_filter & df .year == 2030 , "value" ] += agg .loc [(tech , 2030 )]/ 2
1924
+ df .loc [discharger_investment_filter & df .year == 2021 , "value" ] += agg .loc [(tech , 2021 )]/ 2
1925
+ df .loc [discharger_investment_filter & df .year == 2030 , "value" ] += agg .loc [(tech , 2030 )]/ 2
1926
+ df .loc [:,"technology" ] = df ["technology" ] + "-" + df ["technology_type" ]
1926
1927
1927
1928
# aggregate technology_type and unit
1928
1929
df = df .groupby (["technology" , "unit" , "year" ]).agg ({
0 commit comments