diff --git a/dev/Untitled1.ipynb b/dev/Untitled1.ipynb index 06fcf5c9..72e691e6 100644 --- a/dev/Untitled1.ipynb +++ b/dev/Untitled1.ipynb @@ -28,17 +28,9 @@ "execution_count": 3, "id": "776096ec-6e11-42ba-9604-4876ae234207", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Inventory cache cleared!\n" - ] - } - ], + "outputs": [], "source": [ - "clear_inventory_cache()" + "# clear_inventory_cache()" ] }, { @@ -51,7 +43,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", @@ -87,565 +79,14 @@ "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.10 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.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 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.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.38 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.05 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.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.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.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 5 worksheets in 0.54 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.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", - "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.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 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.21 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.17 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 1.23 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", + "dict_items([('train, electric', 'ES|Transport|Freight|Rail|Electric'), ('train, diesel-electric', ['ES|Transport|Freight|Rail|Liquids|Fossil', 'ES|Transport|Freight|Rail|Liquids|Biomass']), ('train, fuel cell', 'ES|Transport|Freight|Rail|Liquids|Hydrogen')])\n", + "1113 set()\n", + "1113 set()\n", + "1113 set()\n", + "1113 set()\n", + "1113 set()\n", + "1113 set()\n", "Done!\n" ] } @@ -656,7 +97,7 @@ " #{\"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\":\"remind\", \"pathway\":\"SSP2-Base\", \"year\":2028},\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\":\"image\", \"pathway\":\"SSP2-Base\", \"year\":2050},\n", @@ -668,43 +109,31 @@ ")" ] }, - { - "cell_type": "code", - "execution_count": null, - "id": "0f71d709-497d-4454-9545-aafd07387bdf", - "metadata": {}, - "outputs": [], - "source": [] - }, { "cell_type": "code", "execution_count": 5, - "id": "0c80994c-cbac-4143-81ee-1de1531a6f95", + "id": "3e88c655-ddb1-409d-b84f-c2c4e1976542", "metadata": {}, "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Processing scenarios: 100%|█████████████| 1/1 [01:06<00:00, 66.21s/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.generate_scenario_report()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0c80994c-cbac-4143-81ee-1de1531a6f95", + "metadata": {}, + "outputs": [], "source": [ "ndb.update()" ] @@ -11587,7 +11016,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.13" + "version": "3.11.8" } }, "nbformat": 4, diff --git a/premise/data/additional_inventories/lci-buses.xlsx b/premise/data/additional_inventories/lci-buses.xlsx index f218c5b8..af63b8fd 100644 Binary files a/premise/data/additional_inventories/lci-buses.xlsx and b/premise/data/additional_inventories/lci-buses.xlsx differ diff --git a/premise/data/additional_inventories/lci-pass_cars.xlsx b/premise/data/additional_inventories/lci-pass_cars.xlsx index 56318891..a5abade9 100644 Binary files a/premise/data/additional_inventories/lci-pass_cars.xlsx and b/premise/data/additional_inventories/lci-pass_cars.xlsx differ diff --git a/premise/data/additional_inventories/lci-trucks.xlsx b/premise/data/additional_inventories/lci-trucks.xlsx index 7c529fd5..ed5d0aa9 100644 Binary files a/premise/data/additional_inventories/lci-trucks.xlsx and b/premise/data/additional_inventories/lci-trucks.xlsx differ diff --git a/premise/data_collection.py b/premise/data_collection.py index 6aa4202b..6e4aed2b 100644 --- a/premise/data_collection.py +++ b/premise/data_collection.py @@ -47,6 +47,7 @@ def print_missing_variables(missing_vars): + if missing_vars: print("The following variables are missing from the IAM file:") table = PrettyTable( @@ -1020,7 +1021,12 @@ def __fetch_market_data( # check if values of input_vars are strings or lists if any(isinstance(x, list) for x in input_vars.values()): - vars = list(chain.from_iterable(input_vars.values())) + vars = [ + item + for sublist in input_vars.values() + for item in (sublist if isinstance(sublist, list) else [sublist]) + ] + else: vars = list(input_vars.values()) @@ -1037,7 +1043,10 @@ def __fetch_market_data( return None if any(isinstance(x, list) for x in input_vars.values()): - rev_input_vars = {x: k for k, v in input_vars.items() for x in v} + rev_input_vars = {v: k for k, val in input_vars.items() for v in + (val if isinstance(val, list) else [val])} + + else: rev_input_vars = {v: k for k, v in input_vars.items()} @@ -1132,7 +1141,6 @@ def get_iam_efficiencies( elif production_labels and energy_labels: eff_data = xr.DataArray(dims=["variables"], coords={"variables": []}) for k, v in production_labels.items(): - # check that each element of energy.values() is in data.variables.values # knowing that energy.values() is a list of lists # and that each element of prod.values() is in data.variables.values