Add non-EU28 energy demand per country and sector for today
Use the industrial production per sector and multiply with EU28 averages for energy per sector.
This commit is contained in:
parent
783e026ebf
commit
c58f18667d
@ -187,7 +187,8 @@ rule build_industrial_production_per_country_tomorrow:
|
||||
|
||||
rule build_industrial_energy_demand_per_country_today:
|
||||
input:
|
||||
ammonia_production="resources/ammonia_production.csv"
|
||||
ammonia_production="resources/ammonia_production.csv",
|
||||
industrial_production_per_country="resources/industrial_production_per_country.csv"
|
||||
output:
|
||||
industrial_energy_demand_per_country_today="resources/industrial_energy_demand_per_country_today.csv"
|
||||
threads: 1
|
||||
|
@ -121,6 +121,20 @@ for ct in eu28:
|
||||
|
||||
final_summary = pd.concat(summaries,axis=1)
|
||||
|
||||
# add in the non-EU28 based on their output (which is derived from their energy too)
|
||||
# output in MtMaterial/a
|
||||
output = pd.read_csv(snakemake.input.industrial_production_per_country,
|
||||
index_col=0)/1e3
|
||||
|
||||
eu28_averages = final_summary.groupby(level=1,axis=1).sum().divide(output.loc[eu28].sum(),axis=1)
|
||||
|
||||
non_eu28 = output.index^eu28
|
||||
|
||||
for ct in non_eu28:
|
||||
print(ct)
|
||||
final_summary = pd.concat((final_summary,pd.concat({ct : eu28_averages.multiply(output.loc[ct],axis=1)},axis=1)),axis=1)
|
||||
|
||||
|
||||
final_summary.index.name = 'TWh/a'
|
||||
|
||||
final_summary.to_csv(snakemake.output.industrial_energy_demand_per_country_today)
|
||||
|
Loading…
Reference in New Issue
Block a user