add ch data as csv

This commit is contained in:
lisazeyen 2024-08-07 11:49:33 +02:00
parent 7e75aab295
commit 5bf36c218c
3 changed files with 36 additions and 24 deletions

View File

@ -0,0 +1,16 @@
sector,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023
Nahrung,19035,17728,16486,16782,16261,17062,17132,17335,15625,15713
Textil / Leder,1845,1742,1450,1497,1433,1488,1331,1496,1371,1112
Papier / Druck,12407,12257,11100,11086,9530,9436,8482,9186,8850,7657
Chemie / Pharma,27253,27050,27501,26953,26506,26055,24889,25595,25028,23240
Zement / Beton,15513,13307,13576,13429,13263,13221,12612,12843,12919,11400
Andere NE-Mineralien,4029,3820,3884,4254,3546,3577,3475,3602,3603,3178
Metall / Eisen,7841,7889,7638,8049,8053,7188,7051,6872,6782,5531
NE-Metall,3386,3037,2833,2813,2743,2931,2719,2992,2896,2653
Metall / Geräte,14652,14993,14272,14689,14300,15037,13946,15042,13862,12578
Maschinen,4561,4724,4861,4957,4365,4364,4061,4290,3698,3545
Andere Industrien,10750,10825,10225,9833,9689,9545,8696,9371,8823,8157
current electricity,55142,53760,51302,52173,51604,51389,48933,51730,50926,46969
,,,,,,,,,,
,,,,,,,,,,
"source: https://pubdb.bfe.admin.ch/de/publication/download/11817, accessed August 2024",,,,,,,,,,
1 sector 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023
2 Nahrung 19035 17728 16486 16782 16261 17062 17132 17335 15625 15713
3 Textil / Leder 1845 1742 1450 1497 1433 1488 1331 1496 1371 1112
4 Papier / Druck 12407 12257 11100 11086 9530 9436 8482 9186 8850 7657
5 Chemie / Pharma 27253 27050 27501 26953 26506 26055 24889 25595 25028 23240
6 Zement / Beton 15513 13307 13576 13429 13263 13221 12612 12843 12919 11400
7 Andere NE-Mineralien 4029 3820 3884 4254 3546 3577 3475 3602 3603 3178
8 Metall / Eisen 7841 7889 7638 8049 8053 7188 7051 6872 6782 5531
9 NE-Metall 3386 3037 2833 2813 2743 2931 2719 2992 2896 2653
10 Metall / Geräte 14652 14993 14272 14689 14300 15037 13946 15042 13862 12578
11 Maschinen 4561 4724 4861 4957 4365 4364 4061 4290 3698 3545
12 Andere Industrien 10750 10825 10225 9833 9689 9545 8696 9371 8823 8157
13 current electricity 55142 53760 51302 52173 51604 51389 48933 51730 50926 46969
14
15
16 source: https://pubdb.bfe.admin.ch/de/publication/download/11817, accessed August 2024

View File

@ -502,6 +502,7 @@ rule build_industrial_production_per_country:
industry=config_provider("industry"),
countries=config_provider("countries"),
input:
ch_industrial_production="data/ch_industrial_production_per_subsector.csv",
ammonia_production=resources("ammonia_production.csv"),
jrc="data/jrc-idees-2021",
eurostat="data/eurostat/Balances-April2023",

View File

@ -31,7 +31,7 @@ The industrial production is taken from the `JRC-IDEES <https://joint-research-c
This dataset provides detailed information about the consumption of energy for various processes.
If the country is not part of the EU28, the energy consumption in the industrial sectors is taken from the `Eurostat <https://ec.europa.eu/eurostat/de/data/database>` dataset. The industrial production is calculated for the year specified in the config["industry"]["reference_year"].
The ammonia production is provided by the rule `build_ammonia_production <https://pypsa-eur.readthedocs.io/en/latest/sector.html#module-build_ammonia_production>`. Since Switzerland is not part of the EU28 nor reported by eurostat, the energy consumption in the industrial sectors is taken from the `BFE <https://www.bfe.admin.ch/bfe/de/home/versorgung/statistik-und-geodaten/energiestatistiken/energieverbrauch-nach-verwendungszweck.html> dataset.
The ammonia production is provided by the rule `build_ammonia_production <https://pypsa-eur.readthedocs.io/en/latest/sector.html#module-build_ammonia_production>`. Since Switzerland is not part of the EU28 nor reported by eurostat, the energy consumption in the industrial sectors is taken from the `BFE <https://pubdb.bfe.admin.ch/de/publication/download/11817> dataset.
After the industrial production is calculated, the basic chemicals are separated into ammonia, chlorine, methanol and HVC. The production of these chemicals is assumed to be proportional to the production of basic chemicals without ammonia.
The following subcategories [kton/a] are considered:
@ -167,27 +167,19 @@ eb_sectors = {
}
# TODO: this should go in a csv in `data`
# Annual energy consumption in Switzerland by sector in 2015 (in TJ)
# From: Energieverbrauch in der Industrie und im Dienstleistungssektor, Der Bundesrat
# http://www.bfe.admin.ch/themen/00526/00541/00543/index.html?lang=de&dossier_id=00775
e_switzerland = pd.Series(
{
"Iron and steel": 7889.0,
"Chemical industry": 26871.0,
"Non-metallic mineral products": 15513.0 + 3820.0,
"Pulp, paper and printing": 12004.0,
"Food, beverages and tobacco": 17728.0,
"Non Ferrous Metals": 3037.0,
"Transport equipment": 14993.0,
"Machinery equipment": 4724.0,
"Textiles and leather": 1742.0,
"Wood and wood products": 0.0,
"Other industrial sectors": 10825.0,
"current electricity": 53760.0,
ch_mapping = {
"Nahrung": "Food, beverages and tobacco",
"Textil / Leder": "Textiles and leather",
"Papier / Druck": "Pulp, paper and printing",
"Chemie / Pharma": "Chemical industry",
"Zement / Beton": "Non-metallic mineral products",
"Andere NE-Mineralien": "Other non-ferrous metals",
"Metall / Eisen": "Iron and steel",
"NE-Metall": "Non Ferrous Metals",
"Metall / Geräte" : "Transport equipment",
"Maschinen": "Machinery equipment",
"Andere Industrien": "Other industrial sectors",
}
)
def find_physical_output(df):
start = np.where(df.index.str.contains("Physical output", na=""))[0][0]
@ -198,11 +190,14 @@ def find_physical_output(df):
def get_energy_ratio(country, eurostat_dir, jrc_dir, year):
if country == "CH":
e_country = e_switzerland * tj_to_ktoe
# data ranges between 2014-2023
e_country = pd.read_csv(snakemake.input.ch_industrial_production,
index_col=0).dropna()
e_country = e_country.rename(index=ch_mapping).groupby(level=0).sum()
e_country = e_country[str(min(2019, year))]
e_country *= tj_to_ktoe
else:
ct_eurostat = country.replace("GB", "UK")
if ct_eurostat == "UK":
logger.info("Assume Eurostat data for GB from 2019.")
# estimate physical output, energy consumption in the sector and country
fn = f"{eurostat_dir}/{ct_eurostat}-Energy-balance-sheets-April-2023-edition.xlsb"
df = pd.read_excel(