diff --git a/dev/Untitled1.ipynb b/dev/Untitled1.ipynb index 077c7dcc..84828cee 100644 --- a/dev/Untitled1.ipynb +++ b/dev/Untitled1.ipynb @@ -35,7 +35,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "id": "bee86950-ac96-49e0-8a9c-43920ae26096", "metadata": {}, "outputs": [ @@ -43,7 +43,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "premise v.(2, 1, 1)\n", + "premise v.(2, 1, 3)\n", "+------------------------------------------------------------------+\n", "| Warning |\n", "+------------------------------------------------------------------+\n", @@ -78,8 +78,445 @@ "Hide these messages?\n", "NewDatabase(..., quiet=True)\n", "- Extracting source database\n", + "Cannot find cached database. Will create one now for next time...\n", + "Getting activity data\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "100%|█████████████████████████████████| 23523/23523 [00:00<00:00, 384646.56it/s]\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Adding exchange data to activities\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "100%|████████████████████████████████| 743409/743409 [00:32<00:00, 23010.63it/s]\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Filling out exchange data\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "100%|███████████████████████████████████| 23523/23523 [00:02<00:00, 9800.02it/s]\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Set missing location of datasets to global scope.\n", + "Set missing location of production exchanges to scope of dataset.\n", + "Correct missing location of technosphere exchanges.\n", + "Correct missing flow categories for biosphere exchanges\n", + "Remove empty exchanges.\n", + "Remove uncertainty data.\n", "- Extracting inventories\n", + "Cannot find cached inventories. Will create them now for next time...\n", + "Importing default inventories...\n", + "\n", + "Extracted 1 worksheets in 0.11 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.02 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 4 worksheets in 0.17 seconds\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 7 worksheets in 0.03 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.02 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.03 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.03 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.02 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.03 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.02 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.02 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 2 worksheets in 0.02 seconds\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.29 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "The following datasets to import already exist in the source database. They will not be imported\n", + "+--------------------------------+--------------------------------+----------+-------------+\n", + "| Name | Reference product | Location | File |\n", + "+--------------------------------+--------------------------------+----------+-------------+\n", + "| fluorspar production, 97% puri | fluorspar, 97% purity | GLO | lci-PV.xlsx |\n", + "| metallization paste production | metallization paste, back side | RER | lci-PV.xlsx |\n", + "| metallization paste production | metallization paste, back side | RER | lci-PV.xlsx |\n", + "| metallization paste production | metallization paste, front sid | RER | lci-PV.xlsx |\n", + "| photovoltaic module production | photovoltaic module, building- | RER | lci-PV.xlsx |\n", + "| photovoltaic module production | photovoltaic module, building- | RER | lci-PV.xlsx |\n", + "| photovoltaic mounting system p | photovoltaic mounting system, | RER | lci-PV.xlsx |\n", + "| photovoltaic mounting system p | photovoltaic mounting system, | RER | lci-PV.xlsx |\n", + "| photovoltaic mounting system p | photovoltaic mounting system, | RER | lci-PV.xlsx |\n", + "| photovoltaic panel factory con | photovoltaic panel factory | GLO | lci-PV.xlsx |\n", + "| polyvinylfluoride production | polyvinylfluoride | US | lci-PV.xlsx |\n", + "| polyvinylfluoride production, | polyvinylfluoride, dispersion | US | lci-PV.xlsx |\n", + "| polyvinylfluoride, film produc | polyvinylfluoride, film | US | lci-PV.xlsx |\n", + "| silicon production, metallurgi | silicon, metallurgical grade | NO | lci-PV.xlsx |\n", + "| vinyl fluoride production | vinyl fluoride | US | lci-PV.xlsx |\n", + "| wafer factory construction | wafer factory | DE | lci-PV.xlsx |\n", + "+--------------------------------+--------------------------------+----------+-------------+\n", + "Extracted 1 worksheets in 0.02 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.04 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.02 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "The following datasets to import already exist in the source database. They will not be imported\n", + "+--------------------------------+--------------------------------+----------+--------------------------------+\n", + "| Name | Reference product | Location | File |\n", + "+--------------------------------+--------------------------------+----------+--------------------------------+\n", + "| carbon dioxide, captured at ce | carbon dioxide, captured and r | RER | lci-synfuels-from-methanol-fro |\n", + "+--------------------------------+--------------------------------+----------+--------------------------------+\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "The following datasets to import already exist in the source database. They will not be imported\n", + "+--------------------------------+--------------------------------+----------+--------------------------------+\n", + "| Name | Reference product | Location | File |\n", + "+--------------------------------+--------------------------------+----------+--------------------------------+\n", + "| hydrogen production, coal gasi | hydrogen, gaseous, low pressur | RoW | lci-hydrogen-coal-gasification |\n", + "| methanol production, coal gasi | methanol | RoW | lci-hydrogen-coal-gasification |\n", + "+--------------------------------+--------------------------------+----------+--------------------------------+\n", + "Extracted 1 worksheets in 0.00 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.02 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.02 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "The following datasets to import already exist in the source database. They will not be imported\n", + "+--------------------------------+--------------------------------+----------+--------------------------------+\n", + "| Name | Reference product | Location | File |\n", + "+--------------------------------+--------------------------------+----------+--------------------------------+\n", + "| hydrogen production, steam met | hydrogen, gaseous, low pressur | RER | lci-hydrogen-smr-atr-natgas.xl |\n", + "+--------------------------------+--------------------------------+----------+--------------------------------+\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.00 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.02 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "The following datasets to import already exist in the source database. They will not be imported\n", + "+--------------------------------+--------------------------------+----------+--------------------------------+\n", + "| Name | Reference product | Location | File |\n", + "+--------------------------------+--------------------------------+----------+--------------------------------+\n", + "| methanol production facility, | methanol production facility, | RER | lci-synfuels-from-methanol-fro |\n", + "+--------------------------------+--------------------------------+----------+--------------------------------+\n", + "Extracted 1 worksheets in 0.02 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.00 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 5 worksheets in 0.13 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.02 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.04 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.07 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.02 seconds\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.04 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.07 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 19 worksheets in 0.29 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 1.43 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.15 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.81 seconds\n", + "Migrating to 3.8 first\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.03 seconds\n", + "Applying strategy: migrate_datasets\n", + "Applying strategy: migrate_exchanges\n", + "Extracted 1 worksheets in 0.01 seconds\n", + "Extracted 1 worksheets in 0.02 seconds\n", + "Data cached. It is advised to restart your workflow at this point.\n", + "This allows premise to use the cached data instead, which results in\n", + "a faster workflow.\n", "- Fetching IAM data\n", + "The following variables are missing from the IAM file:\n", + "+-------------------------------------+\n", + "| Variable |\n", + "+-------------------------------------+\n", + "| ES|Transport|Pass|Road|Bus|Gasoline |\n", + "+-------------------------------------+\n", + "The following variables are missing from the IAM file:\n", + "+-------------------------------------+\n", + "| Variable |\n", + "+-------------------------------------+\n", + "| ES|Transport|Pass|Road|Bus|Gasoline |\n", + "+-------------------------------------+\n", "Done!\n" ] } @@ -111,7 +548,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "id": "a324c189-26bd-4a65-885c-bba4683e9ed1", "metadata": {}, "outputs": [ @@ -126,85 +563,21 @@ "name": "stdout", "output_type": "stream", "text": [ - "CAZ Size: 8B\n", - "array(0.2602536)\n", - "Coordinates:\n", - " region Size: 8B\n", - "array(0.3502335)\n", - "Coordinates:\n", - " region Size: 8B\n", - "array(0.5158754)\n", - "Coordinates:\n", - " region Size: 8B\n", - "array(1.e-06)\n", - "Coordinates:\n", - " region Size: 8B\n", - "array(0.1113064)\n", - "Coordinates:\n", - " region Size: 8B\n", - "array(0.9104345)\n", - "Coordinates:\n", - " region Size: 8B\n", - "array(0.1023939)\n", - "Coordinates:\n", - " region Size: 8B\n", - "array(0.0971269)\n", - "Coordinates:\n", - " region Size: 8B\n", - "array(0.3286556)\n", - "Coordinates:\n", - " region Size: 8B\n", - "array(0.0553194)\n", - "Coordinates:\n", - " region Size: 8B\n", - "array(0.0017913)\n", - "Coordinates:\n", - " region Size: 8B\n", - "array(1.0032668)\n", - "Coordinates:\n", - " region Size: 8B\n", - "array(3.7366584)\n", - "Coordinates:\n", - " region = 2020: @@ -1384,6 +1385,37 @@ def generate_world_market( return dataset + def correct_hydropower_water_emissions(self) -> None: + """ + Correct the emissions of water for hydropower plants. + In Swiss datasets, water evaoporation is too high. + We use a new factor from Flury and Frischknecht (2021) to correct this. + https://treeze.ch/fileadmin/user_upload/downloads/Publications/Case_Studies/Energy/flury-2012-hydroelectric-power-generation.pdf + """ + + water_factor = get_water_consumption_factors() + + hydropower_datasets = ws.get_many( + self.database, + *[ + ws.contains("name", "electricity production, hydro, reservoir"), + ws.equals("location", "CH"), + ws.equals("unit", "kilowatt hour"), + ], + ) + + for name, flows in water_factor.items(): + for dataset in hydropower_datasets: + if name in dataset["name"]: + for flow in flows: + for exc in ws.biosphere( + dataset, + ws.equals("name", flow["name"]), + ws.equals("unit", flow["unit"]), + ws.equals("categories", (flow["categories"],)), + ): + exc["amount"] = flow["amount"] + def update_efficiency_of_solar_pv(self) -> None: """ Update the efficiency of solar PV modules. diff --git a/premise/iam_variables_mapping/electricity_variables.yaml b/premise/iam_variables_mapping/electricity_variables.yaml index 71189267..7641243f 100644 --- a/premise/iam_variables_mapping/electricity_variables.yaml +++ b/premise/iam_variables_mapping/electricity_variables.yaml @@ -10,7 +10,7 @@ Biogas CHP: eff_aliases: tiam-ucl: Efficiency|Electricity|Biogas|w/o CCS iam_aliases: - tiam-ucl: Electricity|Biogas|w/o CCS + tiam-ucl: Secondary Energy|Electricity|Biogas|w/o CCS max_efficiency: 0.6 Biomass CHP: ecoinvent_aliases: @@ -32,7 +32,7 @@ Biomass CHP: iam_aliases: image: Secondary Energy|Electricity|Biomass|w/o CCS|3 remind: SE|Electricity|Biomass|++|Combined Heat and Power w/o CC - tiam-ucl: Electricity|Biomass CHP|w/o CCS + tiam-ucl: Secondary Energy|Electricity|Biomass CHP|w/o CCS max_efficiency: 0.3 Biomass CHP (existing): ecoinvent_aliases: diff --git a/premise/iam_variables_mapping/fuels_variables.yaml b/premise/iam_variables_mapping/fuels_variables.yaml index 0d5feb42..fdb9f6b8 100644 --- a/premise/iam_variables_mapping/fuels_variables.yaml +++ b/premise/iam_variables_mapping/fuels_variables.yaml @@ -202,7 +202,7 @@ biomethane: co2: 0.06 biogenic_share: 1 iam_aliases: - # tiam-ucl: Secondary Energy|Liquids|Biomass|Biomethane + tiam-ucl: Secondary Energy|Liquids|Biomass|Biomethane|Biogas remind: SE|Gases|+|Biomass eff_aliases: remind: Tech|Gases|Biomass|w/o CC|Efficiency @@ -394,7 +394,7 @@ diesel, synthetic, from coal: tiam-ucl: Efficiency|Liquids|Coal|FT fuel mix (diesel, kerosene, naptha, ELC)|w/o CCS gcam: Efficiency|Coal to Liquids|w/oCCS iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Coal|FT Diesel|w/o CCS + tiam-ucl: Secondary Energy|Liquids|Coal|FT|Diesel|w/o CCS gcam: Secondary Energy|Production|Coal to Liquids|w/oCCS remind: SE|Liquids|Fossil|Coal|+|w/o CC ecoinvent_aliases: @@ -410,7 +410,7 @@ diesel, synthetic, from coal, with CCS: tiam-ucl: Efficiency|Liquids|Coal|FT fuel mix (diesel, kerosene, naptha, ELC)|w CCS gcam: Efficiency|Coal to Liquids|w/CCS iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Coal|FT Diesel|w CCS + tiam-ucl: Secondary Energy|Liquids|Coal|FT|Diesel|w CCS gcam: Secondary Energy|Production|Coal to Liquids|w/CCS remind: SE|Liquids|Fossil|Coal|+|w/ CC ecoinvent_aliases: @@ -423,7 +423,7 @@ diesel, synthetic, from wood: co2: 0.0732 biogenic_share: 1 iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Biomass residues|FT Diesel|w/o CCS + tiam-ucl: Secondary Energy|Liquids|Biomass|FT|Diesel|w/o CCS gcam: Secondary Energy|Production|Refined Liquids|Biomass|FT Biofuels|w/oCCS remind: SE|Liquids|Biomass|BioFTR|w/o CC image: Secondary Energy|Consumption|Liquids|Biomass|FT Diesel|Woody|w/oCCS @@ -440,7 +440,7 @@ diesel, synthetic, from wood, with CCS: co2: 0.0732 biogenic_share: 1 iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Biomass residues|FT Diesel|w CCS + tiam-ucl: Secondary Energy|Liquids|Biomass|FT|Diesel|w CCS gcam: Secondary Energy|Production|Refined Liquids|Biomass|FT Biofuels|w/CCS remind: SE|Liquids|Biomass|BioFTR|w/ CC image: Secondary Energy|Consumption|Liquids|Biomass|FT Diesel|Woody|w/CCS @@ -485,7 +485,7 @@ diesel, synthetic, from natural gas: co2: 0.0732 biogenic_share: 0 iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Natural Gas|FT Diesel|w/o CCS + tiam-ucl: Secondary Energy|Liquids|Natural Gas|FT|Diesel|w/o CCS eff_aliases: tiam-ucl: Efficiency|Liquids|Natural gas|FT fuel mix (diesel, kerosene, naptha, ELC)|w/o CCS ecoinvent_aliases: @@ -497,7 +497,7 @@ diesel, synthetic, from natural gas, with CCS: co2: 0.0732 biogenic_share: 0 iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Natural Gas|FT Diesel|w CCS + tiam-ucl: Secondary Energy|Liquids|Natural Gas|FT|Diesel|w CCS eff_aliases: tiam-ucl: Efficiency|Liquids|Natural gas|FT fuel mix (diesel, kerosene, naptha, ELC)|w CCS ecoinvent_aliases: @@ -1039,14 +1039,14 @@ liquefied petroleum gas: - liquefied petroleum gas production, petroleum refinery operation - market for liquefied petroleum gas iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Oil|LPG + tiam-ucl: Secondary Energy|Liquids|Oil|Liquid Petroleum Gas liquefied petroleum gas, synthetic, from natural gas: lhv: 45.5 co2: 0.0631 biogenic_share: 0 iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Natural Gas|FT LPG|w/o CCS + tiam-ucl: Secondary Energy|Liquids|Natural Gas|FT|Liquid Petroleum Gas|w/o CCS ecoinvent_aliases: fltr: - liquefied petroleum gas production, synthetic, Fischer Tropsch process, from natural gas, energy allocation @@ -1058,7 +1058,7 @@ liquefied petroleum gas, synthetic, from natural gas, with CCS: co2: 0.0631 biogenic_share: 0 iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Natural Gas|FT LPG|w CCS + tiam-ucl: Secondary Energy|Liquids|Natural Gas|FT|Liquid Petroleum Gas|w CCS ecoinvent_aliases: fltr: - liquefied petroleum gas production, synthetic, Fischer Tropsch process, from natural gas, energy allocation, with carbon capture and storage @@ -1070,7 +1070,7 @@ liquefied petroleum gas, synthetic, from biomass: co2: 0.0631 biogenic_share: 1 iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Biomass|FT LPG|w/o CCS + tiam-ucl: Secondary Energy|Liquids|Biomass|FT|Liquid Petroleum Gas|w/o CCS ecoinvent_aliases: fltr: - liquefied petroleum gas production, synthetic, Fischer Tropsch process, hydrogen from wood gasification, energy allocation @@ -1082,7 +1082,7 @@ liquefied petroleum gas, synthetic, from biomass, with CCS: co2: 0.0631 biogenic_share: 1 iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Biomass|FT LPG|w CCS + tiam-ucl: Secondary Energy|Liquids|Biomass|FT|Liquid Petroleum Gas|w CCS ecoinvent_aliases: fltr: - liquefied petroleum gas production, synthetic, Fischer Tropsch process, hydrogen from wood gasification, energy allocation, with carbon capture and storage @@ -1098,7 +1098,7 @@ liquefied petroleum gas, synthetic, from coal: name: synthetic fuel production, from coal, high temperature Fisher-Tropsch operations reference product: liquefied petroleum gas iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Coal|FT LPG|w/o CCS + tiam-ucl: Secondary Energy|Liquids|Coal|FT|Liquid Petroleum Gas|w/o CCS eff_aliases: tiam-ucl: Efficiency|Liquids|Coal|FT fuel mix (diesel, kerosene, naptha, ELC)|w/o CCS @@ -1108,7 +1108,7 @@ liquefied petroleum gas, synthetic, from coal, with CCS: co2: 0.0631 biogenic_share: 0 iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Coal|FT LPG|w CCS + tiam-ucl: Secondary Energy|Liquids|Coal|FT|Liquid Petroleum Gas|w CCS ecoinvent_aliases: fltr: - liquefied petroleum gas production, synthetic, Fischer Tropsch process, from coal, energy allocation, with carbon capture and storage @@ -1310,7 +1310,7 @@ kerosene, synthetic, from coal, energy allocation: fltr: - kerosene production, synthetic, Fischer Tropsch process, hydrogen from coal gasification, energy allocation iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Coal|FT Kerosene|w/o CCS + tiam-ucl: Secondary Energy|Liquids|Coal|FT|Kerosene|w/o CCS eff_aliases: tiam-ucl: Efficiency|Liquids|Coal|FT fuel mix (diesel, kerosene, naptha, ELC)|w/o CCS @@ -1330,7 +1330,7 @@ kerosene, synthetic, from coal, energy allocation, with CCS: fltr: - kerosene production, synthetic, Fischer Tropsch process, hydrogen from coal gasification, with CCS, energy allocation iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Coal|FT Kerosene|w CCS + tiam-ucl: Secondary Energy|Liquids|Coal|FT|Kerosene|w CCS eff_aliases: tiam-ucl: Efficiency|Liquids|Coal|FT fuel mix (diesel, kerosene, naptha, ELC)|w CCS @@ -1348,7 +1348,7 @@ kerosene, synthetic, from biomass, energy allocation: co2: 0.0715 biogenic_share: 1 iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Biomass|FT Kerosene|w/o CCS + tiam-ucl: Secondary Energy|Liquids|Biomass|FT|Kerosene|w/o CCS eff_aliases: tiam-ucl: Efficiency|Liquids|Biomass|FT fuel mix (diesel, kerosene, naptha, ELC)|w/o CCS ecoinvent_aliases: @@ -1360,7 +1360,7 @@ kerosene, synthetic, from biomass, energy allocation, with CCS: co2: 0.0715 biogenic_share: 1 iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Biomass|FT Kerosene|w CCS + tiam-ucl: Secondary Energy|Liquids|Biomass|FT|Kerosene|w CCS eff_aliases: tiam-ucl: Efficiency|Liquids|Biomass|FT fuel mix (diesel, kerosene, naptha, ELC)|w CCS ecoinvent_aliases: @@ -1372,7 +1372,7 @@ kerosene, synthetic, from natural gas, energy allocation: co2: 0.0715 biogenic_share: 1 iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Natural Gas|FT Kerosene|w/o CCS + tiam-ucl: Secondary Energy|Liquids|Natural Gas|FT|Kerosene|w/o CCS eff_aliases: tiam-ucl: Efficiency|Liquids|Natural gas|FT fuel mix (diesel, kerosene, naptha, ELC)|w/o CCS ecoinvent_aliases: @@ -1384,7 +1384,7 @@ kerosene, synthetic, from natural gas, energy allocation, with CCS: co2: 0.0715 biogenic_share: 1 iam_aliases: - tiam-ucl: Secondary Energy|Liquids|Natural Gas|FT Kerosene|w CCS + tiam-ucl: Secondary Energy|Liquids|Natural Gas|FT|Kerosene|w CCS eff_aliases: tiam-ucl: Efficiency|Liquids|Natural gas|FT fuel mix (diesel, kerosene, naptha, ELC)|w CCS ecoinvent_aliases: diff --git a/premise/iam_variables_mapping/steel_variables.yaml b/premise/iam_variables_mapping/steel_variables.yaml index 844fad24..a4b86a41 100644 --- a/premise/iam_variables_mapping/steel_variables.yaml +++ b/premise/iam_variables_mapping/steel_variables.yaml @@ -41,57 +41,57 @@ steel - primary: - Final Energy|Industry|Steel|Primary|Gas - Final Energy|Industry|Steel|Primary|Biomass tiam-ucl: - - Final Energy|Production|Steel|Primary|BF and BOF 1|w CCS|Biofuels - - Final Energy|Production|Steel|Primary|BF and BOF 1|w CCS|Blast Furnace Gas - - Final Energy|Production|Steel|Primary|BF and BOF 1|w CCS|Coal - - Final Energy|Production|Steel|Primary|BF and BOF 1|w CCS|Coke Oven Coke - - Final Energy|Production|Steel|Primary|BF and BOF 1|w CCS|Coke Oven Gas - - Final Energy|Production|Steel|Primary|BF and BOF 1|w CCS|Electricity - - Final Energy|Production|Steel|Primary|BF and BOF 1|w CCS|Heat - - Final Energy|Production|Steel|Primary|BF and BOF 1|w CCS|Heavy Fuel Oil - - Final Energy|Production|Steel|Primary|BF and BOF 1|w CCS|Liquified Petroleum Gases - - Final Energy|Production|Steel|Primary|BF and BOF 1|w CCS|Natural Gas Mix - - Final Energy|Production|Steel|Primary|BF and BOF 1|w CCS|Petroleum Coke - - Final Energy|Production|Steel|Primary|BF and BOF 1|w CCS|Refined Petroleum Products (Oil) - - Final Energy|Production|Steel|Primary|BF and BOF 1|w/o CCS|Biofuels - - Final Energy|Production|Steel|Primary|BF and BOF 1|w/o CCS|Blast Furnace Gas - - Final Energy|Production|Steel|Primary|BF and BOF 1|w/o CCS|Coal - - Final Energy|Production|Steel|Primary|BF and BOF 1|w/o CCS|Coke Oven Coke - - Final Energy|Production|Steel|Primary|BF and BOF 1|w/o CCS|Coke Oven Gas - - Final Energy|Production|Steel|Primary|BF and BOF 1|w/o CCS|Electricity - - Final Energy|Production|Steel|Primary|BF and BOF 1|w/o CCS|Heat - - Final Energy|Production|Steel|Primary|BF and BOF 1|w/o CCS|Heavy Fuel Oil - - Final Energy|Production|Steel|Primary|BF and BOF 1|w/o CCS|Liquified Petroleum Gases - - Final Energy|Production|Steel|Primary|BF and BOF 1|w/o CCS|Natural Gas Mix - - Final Energy|Production|Steel|Primary|BF and BOF 1|w/o CCS|Petroleum Coke - - Final Energy|Production|Steel|Primary|BF and BOF 1|w/o CCS|Refined Petroleum Products (Oil) + - Final Energy|Production|Steel|Primary|BF and BOF 1|Biofuels|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Blast Furnace Gas|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Blast Furnace Gas|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Coal|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Coal|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Coke Oven Coke|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Coke Oven Coke|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Coke Oven Gas|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Coke Oven Gas|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Electricity|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Electricity|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Heat|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Heat|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Heavy Fuel Oil|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Liquefied Petroleum Gas|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Natural Gas|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Natural Gas|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Oil|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Oil|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 1|Petroleum Coke|w CCS - Final Energy|Production|Steel|Primary|BF and BOF 2|Blast Furnace Gas - Final Energy|Production|Steel|Primary|BF and BOF 2|Coal - Final Energy|Production|Steel|Primary|BF and BOF 2|Coke Oven Coke - Final Energy|Production|Steel|Primary|BF and BOF 2|Coke Oven Gas - Final Energy|Production|Steel|Primary|BF and BOF 2|Electricity - - Final Energy|Production|Steel|Primary|BF and BOF 2|Heat - - Final Energy|Production|Steel|Primary|BF and BOF 2|Natural Gas Mix - - Final Energy|Production|Steel|Primary|BF and BOF 2|Refined Petroleum Products (Oil) - - Final Energy|Production|Steel|Primary|BF and BOF 3|w CCS|Biofuels - - Final Energy|Production|Steel|Primary|BF and BOF 3|w CCS|Blast Furnace Gas - - Final Energy|Production|Steel|Primary|BF and BOF 3|w CCS|Coal - - Final Energy|Production|Steel|Primary|BF and BOF 3|w CCS|Coke Oven Coke - - Final Energy|Production|Steel|Primary|BF and BOF 3|w CCS|Coke Oven Gas - - Final Energy|Production|Steel|Primary|BF and BOF 3|w CCS|Electricity - - Final Energy|Production|Steel|Primary|BF and BOF 3|w CCS|Heat - - Final Energy|Production|Steel|Primary|BF and BOF 3|w CCS|Heavy Fuel Oil - - Final Energy|Production|Steel|Primary|BF and BOF 3|w CCS|Liquified Petroleum Gases - - Final Energy|Production|Steel|Primary|BF and BOF 3|w CCS|Natural Gas Mix - - Final Energy|Production|Steel|Primary|BF and BOF 3|w CCS|Petroleum Coke - - Final Energy|Production|Steel|Primary|BF and BOF 3|w CCS|Refined Petroleum Products (Oil) - - Final Energy|Production|Steel|Primary|BF and BOF 3|w/o CCS|Blast Furnace Gas - - Final Energy|Production|Steel|Primary|BF and BOF 3|w/o CCS|Coal - - Final Energy|Production|Steel|Primary|BF and BOF 3|w/o CCS|Coke Oven Coke - - Final Energy|Production|Steel|Primary|BF and BOF 3|w/o CCS|Coke Oven Gas - - Final Energy|Production|Steel|Primary|BF and BOF 3|w/o CCS|Electricity - - Final Energy|Production|Steel|Primary|BF and BOF 3|w/o CCS|Natural Gas Mix - - Final Energy|Production|Steel|Primary|BF and BOF 3|w/o CCS|Refined Petroleum Products (Oil) + - Final Energy|Production|Steel|Primary|BF and BOF 2|Natural Gas + - Final Energy|Production|Steel|Primary|BF and BOF 2|Oil + - Final Energy|Production|Steel|Primary|BF and BOF 3|Biofuels|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Biofuels|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Blast Furnace Gas|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Blast Furnace Gas|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Coal|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Coal|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Coke Oven Coke|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Coke Oven Coke|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Coke Oven Gas|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Coke Oven Gas|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Electricity|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Electricity|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Heat|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Heat|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Heavy Fuel Oil|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Heavy Fuel Oil|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Liquefied Petroleum Gas|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Liquefied Petroleum Gas|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Natural Gas|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Natural Gas|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Oil|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Oil|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Petroleum Coke|w CCS + - Final Energy|Production|Steel|Primary|BF and BOF 3|Petroleum Coke|w/o CCS - Final Energy|Production|Steel|Primary|BF and BOF 4|Biofuels - Final Energy|Production|Steel|Primary|BF and BOF 4|Blast Furnace Gas - Final Energy|Production|Steel|Primary|BF and BOF 4|Coal @@ -100,10 +100,19 @@ steel - primary: - Final Energy|Production|Steel|Primary|BF and BOF 4|Electricity - Final Energy|Production|Steel|Primary|BF and BOF 4|Heat - Final Energy|Production|Steel|Primary|BF and BOF 4|Heavy Fuel Oil - - Final Energy|Production|Steel|Primary|BF and BOF 4|Liquified Petroleum Gases - - Final Energy|Production|Steel|Primary|BF and BOF 4|Natural Gas Mix + - Final Energy|Production|Steel|Primary|BF and BOF 4|Liquefied Petroleum Gas + - Final Energy|Production|Steel|Primary|BF and BOF 4|Natural Gas + - Final Energy|Production|Steel|Primary|BF and BOF 4|Oil - Final Energy|Production|Steel|Primary|BF and BOF 4|Petroleum Coke - - Final Energy|Production|Steel|Primary|BF and BOF 4|Refined Petroleum Products (Oil) + - Final Energy|Production|Steel|Primary|BF and BOF 1|Liquefied Petroleum Gas|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 2|Heavy Fuel Oil + - Final Energy|Production|Steel|Primary|BF and BOF 2|Liquefied Petroleum Gas + - Final Energy|Production|Steel|Primary|BF and BOF 1|Heavy Fuel Oil|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 2|Biofuels + - Final Energy|Production|Steel|Primary|BF and BOF 2|Heat + - Final Energy|Production|Steel|Primary|BF and BOF 1|Biofuels|w/o CCS + - Final Energy|Production|Steel|Primary|BF and BOF 2|Petroleum Coke + - Final Energy|Production|Steel|Primary|BF and BOF 1|Petroleum Coke|w/o CCS ecoinvent_aliases: fltr: @@ -142,20 +151,42 @@ steel - secondary: tiam-ucl: - Final Energy|Production|Steel|Secondary|DRH2 and EAF|Electricity - Final Energy|Production|Steel|Secondary|DRH2 and EAF|Hydrogen + - Final Energy|Production|Steel|Secondary|DRI and EAF 1|Coal - Final Energy|Production|Steel|Secondary|DRI and EAF 1|Electricity - Final Energy|Production|Steel|Secondary|DRI and EAF 1|Natural Gas Mix - Final Energy|Production|Steel|Secondary|DRI and EAF 2|w CCS|Electricity - Final Energy|Production|Steel|Secondary|DRI and EAF 2|w CCS|Natural Gas Mix + - Final Energy|Production|Steel|Secondary|DRI and EAF 2|w/o CCS|Coal - Final Energy|Production|Steel|Secondary|DRI and EAF 2|w/o CCS|Electricity - Final Energy|Production|Steel|Secondary|DRI and EAF 2|w/o CCS|Natural Gas Mix - Final Energy|Production|Steel|Secondary|DRI and EAF 3|Electricity - Final Energy|Production|Steel|Secondary|DRI and EAF 3|Natural Gas Mix + - Final Energy|Production|Steel|Secondary|EAF 1|Coal - Final Energy|Production|Steel|Secondary|EAF 1|Electricity - Final Energy|Production|Steel|Secondary|EAF 1|Natural Gas Mix - Final Energy|Production|Steel|Secondary|EAF 2|Electricity - Final Energy|Production|Steel|Secondary|EAF 2|Natural Gas Mix - Final Energy|Production|Steel|Secondary|EAF 3|Electricity - Final Energy|Production|Steel|Secondary|EAF 3|Natural Gas Mix + - Final Energy|Production|Steel|Secondary|DRH2 and EAF|Electricity + - Final Energy|Production|Steel|Secondary|DRH2 and EAF|Hydrogen + - Final Energy|Production|Steel|Secondary|DRI and EAF 1|Electricity + - Final Energy|Production|Steel|Secondary|DRI and EAF 1|Natural Gas + - Final Energy|Production|Steel|Secondary|DRI and EAF 2|Electricity|w CCS + - Final Energy|Production|Steel|Secondary|DRI and EAF 2|Electricity|w/o CCS + - Final Energy|Production|Steel|Secondary|DRI and EAF 2|Natural Gas|w CCS + - Final Energy|Production|Steel|Secondary|DRI and EAF 2|Natural Gas|w/o CCS + - Final Energy|Production|Steel|Secondary|DRI and EAF 3|Electricity + - Final Energy|Production|Steel|Secondary|DRI and EAF 3|Natural Gas + - Final Energy|Production|Steel|Secondary|EAF 1|Electricity + - Final Energy|Production|Steel|Secondary|EAF 1|Natural Gas + - Final Energy|Production|Steel|Secondary|EAF 2|Electricity + - Final Energy|Production|Steel|Secondary|EAF 2|Natural Gas + - Final Energy|Production|Steel|Secondary|EAF 3|Electricity + - Final Energy|Production|Steel|Secondary|EAF 3|Natural Gas + - Final Energy|Production|Steel|Secondary|DRI and EAF 1|Coal + - Final Energy|Production|Steel|Secondary|DRI and EAF 2|Coal|w/o CCS + - Final Energy|Production|Steel|Secondary|EAF 1|Coal ecoinvent_aliases: fltr: diff --git a/premise/iam_variables_mapping/transport_bus_variables.yaml b/premise/iam_variables_mapping/transport_bus_variables.yaml index 818b991a..749922ef 100644 --- a/premise/iam_variables_mapping/transport_bus_variables.yaml +++ b/premise/iam_variables_mapping/transport_bus_variables.yaml @@ -4,30 +4,74 @@ 'bus, diesel': iam_aliases: remind: ES|Transport|Pass|Road|Bus|Liquids + tiam-ucl: Distance|Transport|Bus|Diesel|Diesel energy_use_aliases: remind: FE|Transport|Pass|Road|Bus|Liquids + tiam-ucl: Final Energy|Transport|Bus|Diesel|Diesel ecoinvent_aliases: fltr: - 'transport, passenger bus, diesel, 13m single deck urban bus, EURO-VI' ecoinvent_fuel_aliases: fltr: - diesel + +'bus, gasoline': + iam_aliases: + tiam-ucl: Distance|Transport|Bus|Gasoline|Gasoline + energy_use_aliases: + tiam-ucl: Final Energy|Transport|Bus|Gasoline|Gasoline + ecoinvent_aliases: + fltr: + - 'transport, passenger bus, gasoline, 13m single deck urban bus, EURO-VI' + ecoinvent_fuel_aliases: + fltr: + - petrol, low-sulfur + +'bus, diesel hybrid': + iam_aliases: + tiam-ucl: Distance|Transport|Bus|Gasoline|Gasoline + energy_use_aliases: + tiam-ucl: Final Energy|Transport|Bus|Gasoline|Gasoline + ecoinvent_aliases: + fltr: + - 'transport, passenger bus, gasoline, 13m single deck urban bus, EURO-VI' + ecoinvent_fuel_aliases: + fltr: + - diesel + 'bus, compressed gas': iam_aliases: remind: ES|Transport|Pass|Road|Bus|Gases + tiam-ucl: Distance|Transport|Bus|Natural Gas|Natural Gas energy_use_aliases: remind: FE|Transport|Pass|Road|Bus|Gases + tiam-ucl: Final Energy|Transport|Bus|Natural Gas|Natural Gas ecoinvent_aliases: fltr: - 'transport, passenger bus, compressed gas, 13m single deck urban bus, EURO-VI' ecoinvent_fuel_aliases: fltr: - natural gas + +'bus, liquefied petroleum gas': + iam_aliases: + tiam-ucl: Distance|Transport|Bus|Liquefied Petroleum Gas|Liquefied Petroleum Gas + energy_use_aliases: + tiam-ucl: Final Energy|Transport|Bus|Liquefied Petroleum Gas|Liquefied Petroleum Gas + ecoinvent_aliases: + fltr: + - 'transport, passenger bus, liquefied petroleum gas, 13m single deck urban bus, EURO-VI' + ecoinvent_fuel_aliases: + fltr: + - liquefied petroleum gas + 'bus, fuel cell': iam_aliases: remind: ES|Transport|Pass|Road|Bus|FCEV + tiam-ucl: Distance|Transport|Bus|Hydrogen Fuel Cell|Bus Hydrogen energy_use_aliases: remind: FE|Transport|Pass|Road|Bus|FCEV + tiam-ucl: Final Energy|Transport|Bus|Hydrogen Fuel Cell|Bus Hydrogen ecoinvent_aliases: fltr: - 'transport, passenger bus, fuel cell electric, 13m single deck urban bus' diff --git a/premise/utils.py b/premise/utils.py index feeb4e97..c07f7e29 100644 --- a/premise/utils.py +++ b/premise/utils.py @@ -36,11 +36,11 @@ def rescale_exchanges( - ds, - value, - technosphere_filters=None, - biosphere_filters=None, - remove_uncertainty=False, + ds, + value, + technosphere_filters=None, + biosphere_filters=None, + remove_uncertainty=False, ): """ Adapted from wurst's change_exchanges_by_constant_factor @@ -87,9 +87,9 @@ def __exit__(self, exc_type, exc_val, exc_tb): def eidb_label( - scenario: dict, - version: str, - system_model: str = "cutoff", + scenario: dict, + version: str, + system_model: str = "cutoff", ) -> str: """ Return a label to name a scenario. @@ -154,6 +154,17 @@ def get_crops_properties() -> dict: return crop_props +def get_water_consumption_factors() -> dict: + """ + Return a dictionary from renewables/hydropower.yaml + with correction factors for hydropower datasets + """ + with open(DATA_DIR / "renewables" / "hydropower.yaml", "r", encoding="utf-8") as stream: + water_consumption_factors = yaml.safe_load(stream) + + return water_consumption_factors + + def get_efficiency_solar_photovoltaics() -> xr.DataArray: """ Return an array with PV module efficiencies in function of year and technology. @@ -235,8 +246,8 @@ def clear_existing_cache(all_versions: Optional[bool] = False, filter=None) -> N f.unlink() for f in DIR_CACHED_DB.glob("*") if f.is_file() - and (all_versions or "".join(tuple(map(str, __version__))) not in f.name) - and (filter is None or filter in f.name) + and (all_versions or "".join(tuple(map(str, __version__))) not in f.name) + and (filter is None or filter in f.name) ] @@ -357,7 +368,6 @@ def delete_log(): def create_scenario_list(scenarios: list) -> list: - list_scenarios = [] for scenario in scenarios: