From a84781e634d3d73d6ee05a2a5224f72e25a0d8a9 Mon Sep 17 00:00:00 2001 From: romainsacchi Date: Thu, 11 Jul 2024 16:03:46 +0200 Subject: [PATCH] Change the oxygen supplier depending on the ei version --- dev/Untitled1.ipynb | 863 ++++++++++++++++++++++++++++++-------------- premise/cement.py | 24 +- 2 files changed, 613 insertions(+), 274 deletions(-) diff --git a/dev/Untitled1.ipynb b/dev/Untitled1.ipynb index 28e02fcd..d08b284e 100644 --- a/dev/Untitled1.ipynb +++ b/dev/Untitled1.ipynb @@ -26,6 +26,24 @@ { "cell_type": "code", "execution_count": 3, + "id": "776096ec-6e11-42ba-9604-4876ae234207", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Inventory cache cleared!\n" + ] + } + ], + "source": [ + "clear_inventory_cache()" + ] + }, + { + "cell_type": "code", + "execution_count": 4, "id": "bee86950-ac96-49e0-8a9c-43920ae26096", "metadata": {}, "outputs": [ @@ -33,7 +51,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "premise v.(2, 1, 1, 'dev2')\n", + "premise v.(2, 1, 1, 'dev4')\n", "+------------------------------------------------------------------+\n", "| Warning |\n", "+------------------------------------------------------------------+\n", @@ -69,22 +87,579 @@ "NewDatabase(..., quiet=True)\n", "- Extracting source database\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.09 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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\n", + "Extracted 7 worksheets in 0.03 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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\n", + "Extracted 1 worksheets in 0.03 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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\n", + "Extracted 1 worksheets in 0.03 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", + "Could not find a biosphere flow for ('Iron, 72% in magnetite, 14% in crude ore', 'natural resource', 'in ground', 'kilogram') in lci-vanadium.xlsx. Exchange deleted.\n", + "Could not find a biosphere flow for ('TiO2, 54% in ilmenite, 18% in crude ore, in ground', 'natural resource', 'in ground', 'kilogram') in lci-vanadium.xlsx. Exchange deleted.\n", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\n", + "Extracted 1 worksheets in 0.36 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", + "Remove uncertainty data.\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.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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\n", + "Extracted 5 worksheets in 0.14 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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\n", + "Extracted 1 worksheets in 0.03 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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\n", + "Extracted 1 worksheets in 0.07 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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\n", + "Extracted 1 worksheets in 0.51 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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\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", + "Remove uncertainty data.\n", + "Extracted 39 worksheets in 0.36 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", + "Remove uncertainty data.\n", + "Extracted 1 worksheets in 0.20 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", + "Remove uncertainty data.\n", + "Extracted 1 worksheets in 0.16 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", + "Remove uncertainty data.\n", + "Extracted 1 worksheets in 0.84 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", + "Remove uncertainty data.\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", "Done!\n" ] } ], "source": [ - "#clear_inventory_cache()\n", "ndb = NewDatabase(\n", " scenarios=[\n", " #{\"model\":\"remind\", \"pathway\":\"SSP2-Base\", \"year\":2050},\n", " #{\"model\":\"remind\", \"pathway\":\"SSP2-Base\", \"year\":2010},\n", " #{\"model\":\"image\", \"pathway\":\"SSP2-Base\", \"year\":2020},\n", - " {\"model\":\"image\", \"pathway\":\"SSP2-RCP26\", \"year\":2050},\n", + " {\"model\":\"remind\", \"pathway\":\"SSP2-Base\", \"year\":2050},\n", " #{\"model\":\"remind\", \"pathway\":\"SSP2-Base\", \"year\":2040},\n", " #{\"model\":\"image\", \"pathway\":\"SSP2-Base\", \"year\":2050},\n", - " {\"model\":\"remind\", \"pathway\":\"SSP2-PkBudg500\", \"year\":2050},\n", + " #{\"model\":\"image\", \"pathway\":\"SSP2-Base\", \"year\":2050},\n", " ],\n", " source_db=\"ecoinvent-3.10-cutoff\", # <-- name of the database in the BW2 project. Must be a string.\n", " source_version=\"3.10\", # <-- version of ecoinvent. Can be \"3.5\", \"3.6\", \"3.7\" or \"3.8\". Must be a string.\n", @@ -95,259 +670,44 @@ }, { "cell_type": "code", - "execution_count": 4, - "id": "0c80994c-cbac-4143-81ee-1de1531a6f95", + "execution_count": 5, + "id": "3e88c655-ddb1-409d-b84f-c2c4e1976542", "metadata": {}, "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Processing scenarios: 100%|█████████████| 2/2 [02:44<00:00, 82.05s/it]" - ] - }, { "name": "stdout", "output_type": "stream", "text": [ - "Done!\n", - "\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\n" + "Generate scenario report.\n", + "Report saved under /Users/romain/GitHub/premise/dev/export/scenario_report.\n" ] } ], "source": [ - "#ndb.update_electricity()\n", - "#ndb.update_all()\n", - "ndb.update()" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "b00fe6fb-6a91-4afa-a838-dab9fef0cd9c", - "metadata": {}, - "outputs": [], - "source": [ - "from premise.utils import load_database\n", - "ndb.scenarios[0] = load_database(ndb.scenarios[0])" + "ndb.generate_scenario_report()" ] }, { "cell_type": "code", - "execution_count": 7, - "id": "c898d82d-d788-473b-ba7a-d2f9ed063109", + "execution_count": null, + "id": "0c80994c-cbac-4143-81ee-1de1531a6f95", "metadata": {}, "outputs": [ { - "name": "stdout", + "name": "stderr", "output_type": "stream", "text": [ - "carbon dioxide, captured at cement production plant, using monoethanolamine RER\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine 1 RER\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine 1.0 EUR\n", - "\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine CAZ\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine 1 CAZ\n", - "Monoethanolamine 4.540440528634362e-05 None\n", - "Water 0.00047299999999999995 None\n", - "carbon dioxide storage from hard coal, post, pipeline 200km, storage 1000m 1 RER\n", - "heat production, natural gas, at industrial furnace >100kW 1.82 CA-QC\n", - "market for monoethanolamine 0.0014 GLO\n", - "market for sodium hydroxide, without water, in 50% solution state 0.0005359299516908213 RoW\n", - "market group for electricity, low voltage 0.0904905634903877 CA\n", - "market group for electricity, low voltage 0.057952274880177346 Canada without Quebec\n", - "market group for tap water 0.473 GLO\n", - "treatment of spent solvent mixture, hazardous waste incineration -0.0013639484978540772 RoW\n", - "\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine CHA\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine 1 CHA\n", - "Monoethanolamine 4.540440528634362e-05 None\n", - "Water 0.00047299999999999995 None\n", - "carbon dioxide storage from hard coal, post, pipeline 200km, storage 1000m 1 RER\n", - "heat production, natural gas, at industrial furnace >100kW 1.82 RoW\n", - "market for monoethanolamine 0.0014 GLO\n", - "market for sodium hydroxide, without water, in 50% solution state 0.0005359299516908213 RoW\n", - "market group for electricity, low voltage 0.04269921210154193 CN\n", - "market group for electricity, low voltage 0.03525409515461643 CN-SGCC\n", - "market group for electricity, low voltage 0.07048953111440667 RAS\n", - "market group for tap water 0.473 GLO\n", - "treatment of spent solvent mixture, hazardous waste incineration -0.0013639484978540772 RoW\n", - "\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine EUR\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine 1 EUR\n", - "Monoethanolamine 4.540440528634362e-05 None\n", - "Water 0.00047299999999999995 None\n", - "carbon dioxide storage from hard coal, post, pipeline 200km, storage 1000m 1 RER\n", - "heat production, natural gas, at industrial furnace >100kW 1.82 Europe without Switzerland\n", - "market for monoethanolamine 0.0014 GLO\n", - "market for sodium hydroxide, without water, in 50% solution state 0.0005359299516908213 RER\n", - "market group for electricity, low voltage 0.035853045162977645 ENTSO-E\n", - "market group for electricity, low voltage 0.0379425475156873 Europe without Switzerland\n", - "market group for electricity, low voltage 0.03794675201018174 RER\n", - "market group for electricity, low voltage 0.00952853037376815 RME\n", - "market group for electricity, low voltage 0.027171963307950207 UCTE\n", - "market group for tap water 0.473 RER\n", - "treatment of spent solvent mixture, hazardous waste incineration -0.0013639484978540772 Europe without Switzerland\n", - "\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine IND\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine 1 IND\n", - "Monoethanolamine 4.540440528634362e-05 None\n", - "Water 0.00047299999999999995 None\n", - "carbon dioxide storage from hard coal, post, pipeline 200km, storage 1000m 1 RER\n", - "heat production, natural gas, at industrial furnace >100kW 1.82 RoW\n", - "market for monoethanolamine 0.0014 GLO\n", - "market for sodium hydroxide, without water, in 50% solution state 0.0005359299516908213 RoW\n", - "market group for electricity, low voltage 0.14844283837056504 IN\n", - "market group for tap water 0.473 GLO\n", - "treatment of spent solvent mixture, hazardous waste incineration -0.0013639484978540772 RoW\n", - "\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine JPN\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine 1 JPN\n", - "Monoethanolamine 4.540440528634362e-05 None\n", - "Water 0.00047299999999999995 None\n", - "carbon dioxide storage from hard coal, post, pipeline 200km, storage 1000m 1 RER\n", - "heat production, natural gas, at industrial furnace >100kW 1.82 RoW\n", - "market for monoethanolamine 0.0014 GLO\n", - "market for sodium hydroxide, without water, in 50% solution state 0.0005359299516908213 RoW\n", - "market group for electricity, low voltage 0.14844283837056504 GLO\n", - "market group for tap water 0.473 GLO\n", - "treatment of spent solvent mixture, hazardous waste incineration -0.0013639484978540772 RoW\n", - "\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine LAM\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine 1 LAM\n", - "Monoethanolamine 4.540440528634362e-05 None\n", - "Water 0.00047299999999999995 None\n", - "carbon dioxide storage from hard coal, post, pipeline 200km, storage 1000m 1 RER\n", - "heat production, natural gas, at industrial furnace >100kW 1.82 RoW\n", - "market for monoethanolamine 0.0014 GLO\n", - "market for sodium hydroxide, without water, in 50% solution state 0.0005359299516908213 RoW\n", - "market group for electricity, low voltage 0.00011688040006759077 BR\n", - "market group for electricity, low voltage 0.14832595797049744 RLA\n", - "market group for tap water 0.473 GLO\n", - "treatment of spent solvent mixture, hazardous waste incineration -0.0013639484978540772 RoW\n", - "\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine MEA\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine 1 MEA\n", - "Monoethanolamine 4.540440528634362e-05 None\n", - "Water 0.00047299999999999995 None\n", - "carbon dioxide storage from hard coal, post, pipeline 200km, storage 1000m 1 RER\n", - "heat production, natural gas, at industrial furnace >100kW 1.82 RoW\n", - "market for monoethanolamine 0.0014 GLO\n", - "market for sodium hydroxide, without water, in 50% solution state 0.0005359299516908213 RoW\n", - "market group for electricity, low voltage 0.14844283837056504 GLO\n", - "market group for tap water 0.473 GLO\n", - "treatment of spent solvent mixture, hazardous waste incineration -0.0013639484978540772 RoW\n", - "\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine NEU\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine 1 NEU\n", - "Monoethanolamine 4.540440528634362e-05 None\n", - "Water 0.00047299999999999995 None\n", - "carbon dioxide storage from hard coal, post, pipeline 200km, storage 1000m 1 RER\n", - "heat production, natural gas, at industrial furnace >100kW 1.82 RoW\n", - "market for monoethanolamine 0.0014 GLO\n", - "market for sodium hydroxide, without water, in 50% solution state 0.0005359299516908213 RoW\n", - "market group for electricity, low voltage 0.14844283837056504 GLO\n", - "market group for tap water 0.473 GLO\n", - "treatment of spent solvent mixture, hazardous waste incineration -0.0013639484978540772 CH\n", - "\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine OAS\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine 1 OAS\n", - "Monoethanolamine 4.540440528634362e-05 None\n", - "Water 0.00047299999999999995 None\n", - "carbon dioxide storage from hard coal, post, pipeline 200km, storage 1000m 1 RER\n", - "heat production, natural gas, at industrial furnace >100kW 1.82 RoW\n", - "market for monoethanolamine 0.0014 GLO\n", - "market for sodium hydroxide, without water, in 50% solution state 0.0005359299516908213 RoW\n", - "market group for electricity, low voltage 0.14844283837056504 GLO\n", - "market group for tap water 0.473 GLO\n", - "treatment of spent solvent mixture, hazardous waste incineration -0.0013639484978540772 RoW\n", - "\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine REF\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine 1 REF\n", - "Monoethanolamine 4.540440528634362e-05 None\n", - "Water 0.00047299999999999995 None\n", - "carbon dioxide storage from hard coal, post, pipeline 200km, storage 1000m 1 RER\n", - "heat production, natural gas, at industrial furnace >100kW 1.82 RoW\n", - "market for monoethanolamine 0.0014 GLO\n", - "market for sodium hydroxide, without water, in 50% solution state 0.0005359299516908213 RoW\n", - "market group for electricity, low voltage 0.14844283837056504 GLO\n", - "market group for tap water 0.473 GLO\n", - "treatment of spent solvent mixture, hazardous waste incineration -0.0013639484978540772 RoW\n", - "\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine SSA\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine 1 SSA\n", - "Monoethanolamine 4.540440528634362e-05 None\n", - "Water 0.00047299999999999995 None\n", - "carbon dioxide storage from hard coal, post, pipeline 200km, storage 1000m 1 RER\n", - "heat production, natural gas, at industrial furnace >100kW 1.82 RoW\n", - "market for monoethanolamine 0.0014 GLO\n", - "market for sodium hydroxide, without water, in 50% solution state 0.0005359299516908213 RoW\n", - "market group for electricity, low voltage 0.14844283837056504 RAF\n", - "market group for tap water 0.473 GLO\n", - "treatment of spent solvent mixture, hazardous waste incineration -0.0013639484978540772 RoW\n", - "\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine USA\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine 1 USA\n", - "Monoethanolamine 4.540440528634362e-05 None\n", - "Water 0.00047299999999999995 None\n", - "carbon dioxide storage from hard coal, post, pipeline 200km, storage 1000m 1 RER\n", - "heat production, natural gas, at industrial furnace >100kW 1.82 RoW\n", - "market for monoethanolamine 0.0014 GLO\n", - "market for sodium hydroxide, without water, in 50% solution state 0.0005359299516908213 RoW\n", - "market group for electricity, low voltage 0.0787203060480959 RNA\n", - "market group for electricity, low voltage 0.06972253232246912 US\n", - "market group for tap water 0.473 GLO\n", - "treatment of spent solvent mixture, hazardous waste incineration -0.0013639484978540772 RoW\n", - "\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine World\n", - "carbon dioxide, captured at cement production plant, using monoethanolamine 1 World\n", - "Monoethanolamine 4.540440528634362e-05 None\n", - "Water 0.00047299999999999995 None\n", - "carbon dioxide storage from hard coal, post, pipeline 200km, storage 1000m 1 RER\n", - "heat production, natural gas, at industrial furnace >100kW 1.82 RoW\n", - "market for monoethanolamine 0.0014 GLO\n", - "market for sodium hydroxide, without water, in 50% solution state 0.0005359299516908213 RoW\n", - "market group for electricity, low voltage 0.14844283837056504 GLO\n", - "market group for tap water 0.473 GLO\n", - "treatment of spent solvent mixture, hazardous waste incineration -0.0013639484978540772 RoW\n", - "\n" + "Processing scenarios: 0%| | 0/1 [00:00 list: """