From 446683efc286f5b364b7463742e56a53e3f7e9e1 Mon Sep 17 00:00:00 2001 From: romainsacchi Date: Wed, 23 Aug 2023 10:33:32 +0200 Subject: [PATCH] EODC --- dev/Untitled.ipynb | 364 +++++++----------- .../lci-co-firing-power-plants.xlsx | Bin 25814 -> 25642 bytes premise/data_collection.py | 114 +++--- .../iam_variables_mapping/TIAM_iso2_map.json | 221 ++++++++++- premise/iam_variables_mapping/constants.yaml | 2 +- .../electricity_variables.yaml | 7 +- .../gains_regions_mapping.yaml | 27 +- .../missing_geography_equivalences.yaml | 47 ++- premise/transformation.py | 1 + 9 files changed, 490 insertions(+), 293 deletions(-) diff --git a/dev/Untitled.ipynb b/dev/Untitled.ipynb index ea5bf047..8de806b2 100644 --- a/dev/Untitled.ipynb +++ b/dev/Untitled.ipynb @@ -20,7 +20,7 @@ "outputs": [], "source": [ "scenarios = [\n", - " {\"model\":\"tiam\", \"pathway\":\"SSP2-RCP19\", \"year\":2030, \"filepath\": \"/Users/romain/Downloads/Electricity/Scenario Files/Production volumes & efficiencies\"}, # optimistic renewable scenario, 2.3-2.8 °C\n", + " {\"model\":\"tiam\", \"pathway\":\"SSP2-RCP19\", \"year\":2030, \"filepath\": \"/Users/romain/Downloads/Scenario Files/Production volumes & efficiencies\"}, # optimistic renewable scenario, 2.3-2.8 °C\n", "]" ] }, @@ -78,7 +78,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|█████████████████████████████████| 21238/21238 [00:00<00:00, 128965.45it/s]\n" + "100%|█████████████████████████████████| 21238/21238 [00:00<00:00, 304494.43it/s]\n" ] }, { @@ -92,7 +92,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|████████████████████████████████| 674593/674593 [00:51<00:00, 13119.49it/s]\n" + "100%|████████████████████████████████| 674593/674593 [00:39<00:00, 17190.81it/s]\n" ] }, { @@ -106,7 +106,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|███████████████████████████████████| 21238/21238 [00:03<00:00, 6418.74it/s]\n" + "100%|███████████████████████████████████| 21238/21238 [00:03<00:00, 6066.49it/s]\n" ] }, { @@ -125,7 +125,7 @@ "Cannot find cached inventories. Will create them now for next time...\n", "Importing default inventories...\n", "\n", - "Extracted 1 worksheets in 0.22 seconds\n", + "Extracted 1 worksheets in 0.12 seconds\n", "Migrating to 3.8 first\n", "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", @@ -143,7 +143,7 @@ "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.02 seconds\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", @@ -152,9 +152,9 @@ "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.03 seconds\n", - "Remove uncertainty data.\n", "Extracted 1 worksheets in 0.02 seconds\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", @@ -163,37 +163,37 @@ "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.04 seconds\n", + "Extracted 1 worksheets in 0.02 seconds\n", "Remove uncertainty data.\n", - "Extracted 7 worksheets in 0.08 seconds\n", + "Extracted 7 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", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.06 seconds\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", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.03 seconds\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", + "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", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.85 seconds\n", + "Extracted 1 worksheets in 0.46 seconds\n", "Migrating to 3.8 first\n", "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", @@ -223,13 +223,13 @@ "| 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.11 seconds\n", + "Extracted 1 worksheets in 0.05 seconds\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.02 seconds\n", + "Extracted 1 worksheets in 0.01 seconds\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.05 seconds\n", + "Extracted 1 worksheets in 0.02 seconds\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.04 seconds\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", @@ -238,7 +238,7 @@ "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.04 seconds\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", @@ -262,7 +262,7 @@ "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.04 seconds\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", @@ -278,7 +278,7 @@ "| methanol distillation, hydrogen from coal gasifica | methanol, purified | RER | lci-synfuels-from-methanol-from-coal.xlsx |\n", "| methanol synthesis, hydrogen from coal gasificatio | methanol, unpurified | RER | lci-synfuels-from-methanol-from-coal.xlsx |\n", "+----------------------------------------------------+----------------------+----------+-------------------------------------------+\n", - "Extracted 1 worksheets in 0.03 seconds\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", @@ -287,7 +287,7 @@ "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.03 seconds\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", @@ -296,7 +296,7 @@ "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.03 seconds\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", @@ -305,7 +305,7 @@ "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.03 seconds\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", @@ -323,9 +323,9 @@ "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.04 seconds\n", - "Remove uncertainty data.\n", "Extracted 1 worksheets in 0.02 seconds\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", @@ -334,7 +334,7 @@ "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", "Remove uncertainty data.\n", - "Extracted 4 worksheets in 0.32 seconds\n", + "Extracted 4 worksheets in 0.19 seconds\n", "Migrating to 3.8 first\n", "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", @@ -343,7 +343,7 @@ "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.04 seconds\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", @@ -352,7 +352,7 @@ "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.03 seconds\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", @@ -361,7 +361,7 @@ "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.03 seconds\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", @@ -370,7 +370,7 @@ "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.03 seconds\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", @@ -379,7 +379,7 @@ "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.03 seconds\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", @@ -388,7 +388,7 @@ "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.07 seconds\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", @@ -397,74 +397,53 @@ "Applying strategy: migrate_datasets\n", "Applying strategy: migrate_exchanges\n", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.02 seconds\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.18 seconds\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", "Remove uncertainty data.\n", - "Extracted 1 worksheets in 0.02 seconds\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", + "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.05 seconds\n", - "Remove uncertainty data.\n", "Extracted 1 worksheets in 0.02 seconds\n", "Remove uncertainty data.\n", + "Extracted 1 worksheets in 0.01 seconds\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", "Done!\n", "\n", - "/////////////////////// EXTRACTING IAM DATA ////////////////////////\n" - ] - }, - { - "ename": "FileNotFoundError", - "evalue": "[Errno 2] No such file or directory: '/Users/romain/Downloads/Electricity/Scenario Files/Production volumes & efficiencies/tiam_SSP2-RCP19.mif'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)", - "File \u001b[0;32m~/Github/premise/premise/data_collection.py:640\u001b[0m, in \u001b[0;36mIAMDataCollection.__get_iam_data\u001b[0;34m(self, key, filedir, variables)\u001b[0m\n\u001b[1;32m 639\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 640\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[38;5;28;43mopen\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mfilepath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mrb\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mas\u001b[39;00m file:\n\u001b[1;32m 641\u001b[0m \u001b[38;5;66;03m# read the encrypted data\u001b[39;00m\n\u001b[1;32m 642\u001b[0m encrypted_data \u001b[38;5;241m=\u001b[39m file\u001b[38;5;241m.\u001b[39mread()\n", - "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/Users/romain/Downloads/Electricity/Scenario Files/Production volumes & efficiencies/tiam_SSP2-RCP19.csv'", - "\nDuring handling of the above exception, another exception occurred:\n", - "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[3], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m ndb \u001b[38;5;241m=\u001b[39m \u001b[43mNewDatabase\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 2\u001b[0m \u001b[43m \u001b[49m\u001b[43mscenarios\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mscenarios\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 3\u001b[0m \u001b[43m \u001b[49m\u001b[43msource_db\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mecoinvent cutoff 3.9.1\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[43m \u001b[49m\u001b[43msource_version\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43m3.9.1\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;66;43;03m#source_type=\"ecospold\",\u001b[39;49;00m\n\u001b[1;32m 6\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;66;43;03m#source_file_path=f\"/Users/romain/Documents/ecoinvent 3.9.1_cutoff_ecoSpold02/datasets\", # <-- this is NEW\u001b[39;49;00m\n\u001b[1;32m 7\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;66;43;03m#key='tUePmX_S5B8ieZkkM7WUU2CnO8SmShwmAeWK9x2rTFo=',\u001b[39;49;00m\n\u001b[1;32m 8\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;66;43;03m#system_model=\"cutoff\",\u001b[39;49;00m\n\u001b[1;32m 9\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;66;43;03m#system_args=combinations[0]\u001b[39;49;00m\n\u001b[1;32m 10\u001b[0m \u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/Github/premise/premise/ecoinvent_modification.py:610\u001b[0m, in \u001b[0;36mNewDatabase.__init__\u001b[0;34m(self, scenarios, source_version, source_type, key, source_db, source_file_path, additional_inventories, system_model, system_args, use_cached_inventories, use_cached_database, external_scenarios, quiet, keep_uncertainty_data, gains_scenario, use_absolute_efficiency)\u001b[0m\n\u001b[1;32m 608\u001b[0m \u001b[38;5;66;03m# use multiprocessing to speed up the process\u001b[39;00m\n\u001b[1;32m 609\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m Pool(processes\u001b[38;5;241m=\u001b[39mmultiprocessing\u001b[38;5;241m.\u001b[39mcpu_count()) \u001b[38;5;28;01mas\u001b[39;00m pool:\n\u001b[0;32m--> 610\u001b[0m \u001b[43mpool\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmap\u001b[49m\u001b[43m(\u001b[49m\u001b[43m_fetch_iam_data\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mscenarios\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 612\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mDone!\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n", - "File \u001b[0;32m/opt/anaconda3/envs/premise/lib/python3.10/multiprocessing/pool.py:364\u001b[0m, in \u001b[0;36mPool.map\u001b[0;34m(self, func, iterable, chunksize)\u001b[0m\n\u001b[1;32m 359\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mmap\u001b[39m(\u001b[38;5;28mself\u001b[39m, func, iterable, chunksize\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mNone\u001b[39;00m):\n\u001b[1;32m 360\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m'''\u001b[39;00m\n\u001b[1;32m 361\u001b[0m \u001b[38;5;124;03m Apply `func` to each element in `iterable`, collecting the results\u001b[39;00m\n\u001b[1;32m 362\u001b[0m \u001b[38;5;124;03m in a list that is returned.\u001b[39;00m\n\u001b[1;32m 363\u001b[0m \u001b[38;5;124;03m '''\u001b[39;00m\n\u001b[0;32m--> 364\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_map_async\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfunc\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43miterable\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mmapstar\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mchunksize\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m/opt/anaconda3/envs/premise/lib/python3.10/multiprocessing/pool.py:771\u001b[0m, in \u001b[0;36mApplyResult.get\u001b[0;34m(self, timeout)\u001b[0m\n\u001b[1;32m 769\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_value\n\u001b[1;32m 770\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m--> 771\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_value\n", - "File \u001b[0;32m/opt/anaconda3/envs/premise/lib/python3.10/multiprocessing/pool.py:125\u001b[0m, in \u001b[0;36mworker\u001b[0;34m(inqueue, outqueue, initializer, initargs, maxtasks, wrap_exception)\u001b[0m\n\u001b[1;32m 123\u001b[0m job, i, func, args, kwds \u001b[38;5;241m=\u001b[39m task\n\u001b[1;32m 124\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 125\u001b[0m result \u001b[38;5;241m=\u001b[39m (\u001b[38;5;28;01mTrue\u001b[39;00m, \u001b[43mfunc\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwds\u001b[49m\u001b[43m)\u001b[49m)\n\u001b[1;32m 126\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[1;32m 127\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m wrap_exception \u001b[38;5;129;01mand\u001b[39;00m func \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m _helper_reraises_exception:\n", - "File \u001b[0;32m/opt/anaconda3/envs/premise/lib/python3.10/multiprocessing/pool.py:48\u001b[0m, in \u001b[0;36mmapstar\u001b[0;34m(args)\u001b[0m\n\u001b[1;32m 47\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mmapstar\u001b[39m(args):\n\u001b[0;32m---> 48\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mlist\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mmap\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/Github/premise/premise/ecoinvent_modification.py:589\u001b[0m, in \u001b[0;36mNewDatabase.__init__.._fetch_iam_data\u001b[0;34m(scenario)\u001b[0m\n\u001b[1;32m 588\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m_fetch_iam_data\u001b[39m(scenario):\n\u001b[0;32m--> 589\u001b[0m data \u001b[38;5;241m=\u001b[39m \u001b[43mIAMDataCollection\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 590\u001b[0m \u001b[43m \u001b[49m\u001b[43mmodel\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mscenario\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mmodel\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 591\u001b[0m \u001b[43m \u001b[49m\u001b[43mpathway\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mscenario\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mpathway\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 592\u001b[0m \u001b[43m \u001b[49m\u001b[43myear\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mscenario\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43myear\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 593\u001b[0m \u001b[43m \u001b[49m\u001b[43mexternal_scenarios\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mscenario\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mexternal scenarios\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 594\u001b[0m \u001b[43m \u001b[49m\u001b[43mfilepath_iam_files\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mscenario\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mfilepath\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 595\u001b[0m \u001b[43m \u001b[49m\u001b[43mkey\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mkey\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 596\u001b[0m \u001b[43m \u001b[49m\u001b[43msystem_model\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msystem_model\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 597\u001b[0m \u001b[43m \u001b[49m\u001b[43msystem_model_args\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msystem_model_args\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 598\u001b[0m \u001b[43m \u001b[49m\u001b[43mgains_scenario\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mgains_scenario\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 599\u001b[0m \u001b[43m \u001b[49m\u001b[43muse_absolute_efficiency\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43muse_absolute_efficiency\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 600\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 601\u001b[0m scenario[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124miam data\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m data\n\u001b[1;32m 603\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdatapackages:\n", - "File \u001b[0;32m~/Github/premise/premise/data_collection.py:399\u001b[0m, in \u001b[0;36mIAMDataCollection.__init__\u001b[0;34m(self, model, pathway, year, filepath_iam_files, key, external_scenarios, system_model, system_model_args, gains_scenario, use_absolute_efficiency)\u001b[0m\n\u001b[1;32m 396\u001b[0m \u001b[38;5;66;03m# flatten the list of lists\u001b[39;00m\n\u001b[1;32m 397\u001b[0m new_vars \u001b[38;5;241m=\u001b[39m flatten(new_vars)\n\u001b[0;32m--> 399\u001b[0m data \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m__get_iam_data\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 400\u001b[0m \u001b[43m \u001b[49m\u001b[43mkey\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mkey\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 401\u001b[0m \u001b[43m \u001b[49m\u001b[43mfiledir\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mfilepath_iam_files\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 402\u001b[0m \u001b[43m \u001b[49m\u001b[43mvariables\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mnew_vars\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 403\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 405\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mregions \u001b[38;5;241m=\u001b[39m data\u001b[38;5;241m.\u001b[39mregion\u001b[38;5;241m.\u001b[39mvalues\u001b[38;5;241m.\u001b[39mtolist()\n\u001b[1;32m 406\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39msystem_model \u001b[38;5;241m=\u001b[39m system_model\n", - "File \u001b[0;32m~/Github/premise/premise/data_collection.py:646\u001b[0m, in \u001b[0;36mIAMDataCollection.__get_iam_data\u001b[0;34m(self, key, filedir, variables)\u001b[0m\n\u001b[1;32m 644\u001b[0m file_ext \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmodel \u001b[38;5;241m+\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m_\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;241m+\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mpathway \u001b[38;5;241m+\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m.mif\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 645\u001b[0m filepath \u001b[38;5;241m=\u001b[39m Path(filedir) \u001b[38;5;241m/\u001b[39m file_ext\n\u001b[0;32m--> 646\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[38;5;28;43mopen\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mfilepath\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mrb\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mas\u001b[39;00m file:\n\u001b[1;32m 647\u001b[0m \u001b[38;5;66;03m# read the encrypted data\u001b[39;00m\n\u001b[1;32m 648\u001b[0m encrypted_data \u001b[38;5;241m=\u001b[39m file\u001b[38;5;241m.\u001b[39mread()\n\u001b[1;32m 650\u001b[0m \u001b[38;5;66;03m# create a temp csv-like file to pass to pandas.read_csv()\u001b[39;00m\n", - "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/Users/romain/Downloads/Electricity/Scenario Files/Production volumes & efficiencies/tiam_SSP2-RCP19.mif'" + "/////////////////////// EXTRACTING IAM DATA ////////////////////////\n", + "Reading /Users/romain/Downloads/Scenario Files/Production volumes & efficiencies/tiam_SSP2-RCP19.xlsx as excel file\n", + "Done!\n" ] } ], "source": [ "ndb = NewDatabase(\n", " scenarios=scenarios,\n", - " source_db=\"ecoinvent cutoff 3.9.1\",\n", + " source_db=\"ecoinvent 3.9.1 cutoff\",\n", " source_version=\"3.9.1\",\n", " #source_type=\"ecospold\",\n", " #source_file_path=f\"/Users/romain/Documents/ecoinvent 3.9.1_cutoff_ecoSpold02/datasets\", # <-- this is NEW\n", @@ -484,171 +463,108 @@ "name": "stdout", "output_type": "stream", "text": [ - "`update_all()` will skip the following steps:\n", - "update_two_wheelers(), update_cars(), and update_buses()\n", - "If you want to update these steps, please run them separately afterwards.\n", - "Extracted 1 worksheets in 7.72 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", - "Done!\n", - "Done!\n", - "Extracted 1 worksheets in 8.06 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", - "Done!\n", - "Done!\n", - "Extracted 1 worksheets in 7.77 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", - "Done!\n", - "No fuel market for market for hydrogen, gaseous in BRA\n", - "No fuel market for market for hydrogen, gaseous in CAN\n", - "No fuel market for market for hydrogen, gaseous in CEU\n", - "No fuel market for market for hydrogen, gaseous in EAF\n", - "No fuel market for market for hydrogen, gaseous in INDIA\n", - "No fuel market for market for hydrogen, gaseous in INDO\n", - "No fuel market for market for hydrogen, gaseous in JAP\n", - "No fuel market for market for hydrogen, gaseous in KOR\n", - "No fuel market for market for hydrogen, gaseous in ME\n", - "No fuel market for market for hydrogen, gaseous in MEX\n", - "No fuel market for market for hydrogen, gaseous in NAF\n", - "No fuel market for market for hydrogen, gaseous in OCE\n", - "No fuel market for market for hydrogen, gaseous in RCAM\n", - "No fuel market for market for hydrogen, gaseous in RSAF\n", - "No fuel market for market for hydrogen, gaseous in RSAM\n", - "No fuel market for market for hydrogen, gaseous in RSAS\n", - "No fuel market for market for hydrogen, gaseous in RUS\n", - "No fuel market for market for hydrogen, gaseous in SAF\n", - "No fuel market for market for hydrogen, gaseous in SEAS\n", - "No fuel market for market for hydrogen, gaseous in STAN\n", - "No fuel market for market for hydrogen, gaseous in UKR\n", - "No fuel market for market for hydrogen, gaseous in USA\n", - "No fuel market for market for hydrogen, gaseous in WAF\n", - "No fuel market for market for hydrogen, gaseous in WEU\n", - "Incorrect market share for market for hydrogen, gaseous in BRA\n", - "Incorrect market share for market for hydrogen, gaseous in CAN\n", - "Incorrect market share for market for hydrogen, gaseous in CEU\n", - "Incorrect market share for market for hydrogen, gaseous in CHN\n", - "Incorrect market share for market for hydrogen, gaseous in EAF\n", - "Incorrect market share for market for hydrogen, gaseous in INDIA\n", - "Incorrect market share for market for hydrogen, gaseous in INDO\n", - "Incorrect market share for market for hydrogen, gaseous in JAP\n", - "Incorrect market share for market for hydrogen, gaseous in KOR\n", - "Incorrect market share for market for hydrogen, gaseous in ME\n", - "Incorrect market share for market for hydrogen, gaseous in MEX\n", - "Incorrect market share for market for hydrogen, gaseous in NAF\n", - "Incorrect market share for market for hydrogen, gaseous in OCE\n", - "Incorrect market share for market for hydrogen, gaseous in RCAM\n", - "Incorrect market share for market for hydrogen, gaseous in RSAF\n", - "Incorrect market share for market for hydrogen, gaseous in RSAM\n", - "Incorrect market share for market for hydrogen, gaseous in RSAS\n", - "Incorrect market share for market for hydrogen, gaseous in RUS\n", - "Incorrect market share for market for hydrogen, gaseous in SAF\n", - "Incorrect market share for market for hydrogen, gaseous in SEAS\n", - "Incorrect market share for market for hydrogen, gaseous in STAN\n", - "Incorrect market share for market for hydrogen, gaseous in TUR\n", - "Incorrect market share for market for hydrogen, gaseous in UKR\n", - "Incorrect market share for market for hydrogen, gaseous in USA\n", - "Incorrect market share for market for hydrogen, gaseous in WAF\n", - "Incorrect market share for market for hydrogen, gaseous in WEU\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in BRA\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in CAN\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in CEU\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in EAF\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in INDIA\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in INDO\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in JAP\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in KOR\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in ME\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in MEX\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in NAF\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in OCE\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in RCAM\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in RSAF\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in RSAM\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in RSAS\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in RUS\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in SAF\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in SEAS\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in STAN\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in UKR\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in USA\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in WAF\n", - "No fuel market for market for hydrogen, gaseous, 20-year period in WEU\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in BRA\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in CAN\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in CEU\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in EAF\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in INDIA\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in INDO\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in JAP\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in KOR\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in ME\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in MEX\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in NAF\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in OCE\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in RCAM\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in RSAF\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in RSAM\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in RSAS\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in RUS\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in SAF\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in SEAS\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in STAN\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in UKR\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in USA\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in WAF\n", - "No fuel market for market for hydrogen, gaseous, 40-year period in WEU\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in BRA\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in CAN\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in CEU\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in EAF\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in INDIA\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in INDO\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in JAP\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in KOR\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in ME\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in MEX\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in NAF\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in OCE\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in RCAM\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in RSAF\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in RSAM\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in RSAS\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in RUS\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in SAF\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in SEAS\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in STAN\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in UKR\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in USA\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in WAF\n", - "No fuel market for market for hydrogen, gaseous, 60-year period in WEU\n", - "Done!\n", + "\n", + "/////////////////////////// ELECTRICITY ////////////////////////////\n", "Done!\n", "\n" ] } ], "source": [ - "#ndb.update_electricity()\n", - "ndb.update_all()\n", - "#ndb.update_metals()\n", - "#ndb.update_fuels()" + "ndb.update_electricity()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "90f32b85-6451-419f-bab8-a99bb1fa65c9", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Write new database(s) to Brightway2.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Writing activities to SQLite3 database:\n", + "0% [## ] 100% | ETA: 00:01:35" + ] + } + ], + "source": [ + "ndb.write_db_to_brightway()" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "fd525328-d802-473f-8266-7315392cac23", + "metadata": {}, + "outputs": [ + { + "ename": "AssertionError", + "evalue": "('electricity production, at co-firing wood and coal power plant, 50-50', 'electricity production, at co-firing wood and coal power plant, 50-50')", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mAssertionError\u001b[0m Traceback (most recent call last)", + "Input \u001b[0;32mIn [8]\u001b[0m, in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m e \u001b[38;5;129;01min\u001b[39;00m ds[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mexchanges\u001b[39m\u001b[38;5;124m\"\u001b[39m]:\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m e[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtype\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;129;01min\u001b[39;00m [\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtechnosphere\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mproduction\u001b[39m\u001b[38;5;124m\"\u001b[39m]:\n\u001b[0;32m----> 5\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mlocation\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01min\u001b[39;00m e, (ds[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mname\u001b[39m\u001b[38;5;124m\"\u001b[39m], e[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mname\u001b[39m\u001b[38;5;124m\"\u001b[39m])\n", + "\u001b[0;31mAssertionError\u001b[0m: ('electricity production, at co-firing wood and coal power plant, 50-50', 'electricity production, at co-firing wood and coal power plant, 50-50')" + ] + } + ], + "source": [ + "for ds in ndb.scenarios[0][\"database\"]:\n", + " assert \"location\" in ds, ds[\"name\"]\n", + " for e in ds[\"exchanges\"]:\n", + " if e[\"type\"] in [\"technosphere\", \"production\"]:\n", + " assert \"location\" in e, (ds[\"name\"], e[\"name\"])" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "da6f4bbc-8e8f-4cb3-ab73-176ee6d30d10", + "metadata": {}, + "outputs": [], + "source": [ + "import wurst.searching as ws\n", + "name = \"heat and power co-generation, wood chips\"\n", + "ref_prod = \"electricity, high voltage\"\n", + "for d in ws.get_many(\n", + " ndb.database,\n", + " ws.equals(\"name\", name),\n", + " ws.contains(\"reference product\", ref_prod),\n", + "):\n", + " print(d[\"location\"])\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "1916650c-fc34-4fde-a918-a34fc3f6111b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array(['AFR', 'AUS', 'CAN', 'CHI', 'CSA', 'EEU', 'FSU', 'IND', 'JPN',\n", + " 'MEA', 'MEX', 'ODA', 'SKO', 'UK', 'USA', 'WEU', 'World'],\n", + " dtype=object)" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ndb.scenarios[0][\"iam data\"].production_volumes.region.values" ] }, { @@ -2131,7 +2047,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.9.12" } }, "nbformat": 4, diff --git a/premise/data/additional_inventories/lci-co-firing-power-plants.xlsx b/premise/data/additional_inventories/lci-co-firing-power-plants.xlsx index 2bb6e80616ecef59cd74ee5720736fd03ce62c19..2488be18f2d06793a40e8c6ab6f1f371445575a5 100644 GIT binary patch delta 17428 zcmXtfV|XQ9uyve?%?T&A?POw`C$@RwoM3`UCf3BZZQHgcw(Xnu-tYU<{XD%_SFNtD z+FiS9_u>e6=`eUTEgbaE;+XodcqX_XAVI6ofKb|V435HIC=;BhQD0!;u!WWiO~Vi zc4)d}b1~rwG$WqUkhj4yx3_z{p|?mligc4%h+x!ahUPNrf}*S=mLhvJRhDpcA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UPTth0(y@xIZOP%3mwFGYEZ;{ZXll=z!rdYiHzVQ2_St^g z%l+LVlTsTeu}uD4&_G$t=kN(x^>7WL1+Vze{pp;*Xka zkgOyPO0BWL=3+4u1A`#4DuzdsbCd0u%Hk*AkJFrdEm=SYJ;)KNI}#={r6{q*B!Ywh D^uwB& diff --git a/premise/data_collection.py b/premise/data_collection.py index bdf09209..fc034af5 100644 --- a/premise/data_collection.py +++ b/premise/data_collection.py @@ -659,13 +659,12 @@ def __get_iam_data( elif filepath.suffix in [".xls", ".xlsx"]: print(f"Reading {filepath} as excel file") - data = pd.read_excel(filepath, sheet_name=None) + data = pd.read_excel(filepath) else: raise ValueError( f"Extension {filepath.suffix} is not supported. Please use .csv, .mif, .xls or .xlsx." ) - else: # Uses an encrypted file fernet_obj = Fernet(key) @@ -688,7 +687,7 @@ def __get_iam_data( # if a column name can be an integer # we convert it to an integer - new_cols = {c: int(c) if c.isdigit() else c for c in dataframe.columns} + new_cols = {c: int(c) if str(c).isdigit() else c for c in dataframe.columns} dataframe = dataframe.rename(columns=new_cols) # remove any column that is a string @@ -908,7 +907,7 @@ def __get_carbon_capture_rate( # and that none of the CO2 emissions are captured if not any( - x in data.variables.values.tolist() for x in dict_vars.get("cement - cco2") + x in data.variables.values.tolist() for x in dict_vars.get("cement - cco2", []) ): cement_rate = xr.DataArray( np.zeros((len(data.region), len(data.year))), @@ -923,7 +922,7 @@ def __get_carbon_capture_rate( cement_rate.coords["variables"] = "cement" if not any( - x in data.variables.values.tolist() for x in dict_vars.get("steel - cco2") + x in data.variables.values.tolist() for x in dict_vars.get("steel - cco2", []) ): steel_rate = xr.DataArray( np.zeros((len(data.region), len(data.year))), @@ -948,17 +947,61 @@ def __get_carbon_capture_rate( # as it is sometimes neglected in the # IAM files - if not any( - x in data.variables.values.tolist() for x in dict_vars.get("cement - cco2") - ): - rate.loc[dict(region="World", variables="cement")] = 0 - else: - try: - rate.loc[dict(region="World", variables="cement")] = ( + if "World" in rate.region.values.tolist(): + if not any( + x in data.variables.values.tolist() for x in dict_vars.get("cement - cco2", []) + ): + rate.loc[dict(region="World", variables="cement")] = 0 + else: + try: + rate.loc[dict(region="World", variables="cement")] = ( + data.loc[ + dict( + region=[r for r in self.regions if r != "World"], + variables=dict_vars["cement - cco2"], + ) + ] + .sum(dim=["variables", "region"]) + .values + / data.loc[ + dict( + region=[r for r in self.regions if r != "World"], + variables=dict_vars["cement - co2"], + ) + ] + .sum(dim=["variables", "region"]) + .values + ) + except ZeroDivisionError: + rate.loc[dict(region="World", variables="cement")] = 0 + + try: + rate.loc[dict(region="World", variables="steel")] = data.loc[ + dict( + region=[r for r in self.regions if r != "World"], + variables=dict_vars["steel - cco2"], + ) + ].sum(dim=["variables", "region"]) / data.loc[ + dict( + region=[r for r in self.regions if r != "World"], + variables=dict_vars["steel - co2"], + ) + ].sum( + dim=["variables", "region"] + ) + except ZeroDivisionError: + rate.loc[dict(region="World", variables="steel")] = 0 + + if not any( + x in data.variables.values.tolist() for x in dict_vars.get("steel - cco2", []) + ): + rate.loc[dict(region="World", variables="steel")] = 0 + else: + rate.loc[dict(region="World", variables="steel")] = ( data.loc[ dict( region=[r for r in self.regions if r != "World"], - variables=dict_vars["cement - cco2"], + variables=dict_vars["steel - cco2"], ) ] .sum(dim=["variables", "region"]) @@ -966,55 +1009,12 @@ def __get_carbon_capture_rate( / data.loc[ dict( region=[r for r in self.regions if r != "World"], - variables=dict_vars["cement - co2"], + variables=dict_vars["steel - co2"], ) ] .sum(dim=["variables", "region"]) .values ) - except ZeroDivisionError: - rate.loc[dict(region="World", variables="cement")] = 0 - - try: - rate.loc[dict(region="World", variables="steel")] = data.loc[ - dict( - region=[r for r in self.regions if r != "World"], - variables=dict_vars["steel - cco2"], - ) - ].sum(dim=["variables", "region"]) / data.loc[ - dict( - region=[r for r in self.regions if r != "World"], - variables=dict_vars["steel - co2"], - ) - ].sum( - dim=["variables", "region"] - ) - except ZeroDivisionError: - rate.loc[dict(region="World", variables="steel")] = 0 - - if not any( - x in data.variables.values.tolist() for x in dict_vars.get("steel - cco2") - ): - rate.loc[dict(region="World", variables="steel")] = 0 - else: - rate.loc[dict(region="World", variables="steel")] = ( - data.loc[ - dict( - region=[r for r in self.regions if r != "World"], - variables=dict_vars["steel - cco2"], - ) - ] - .sum(dim=["variables", "region"]) - .values - / data.loc[ - dict( - region=[r for r in self.regions if r != "World"], - variables=dict_vars["steel - co2"], - ) - ] - .sum(dim=["variables", "region"]) - .values - ) # we ensure that the rate can only be between 0 and 1 rate.values = np.clip(rate, 0, 1) diff --git a/premise/iam_variables_mapping/TIAM_iso2_map.json b/premise/iam_variables_mapping/TIAM_iso2_map.json index b1b1b5df..bf9e31e5 100644 --- a/premise/iam_variables_mapping/TIAM_iso2_map.json +++ b/premise/iam_variables_mapping/TIAM_iso2_map.json @@ -92,7 +92,6 @@ "HN", "JM", "MQ", - "AN", "NI", "PA", "PY", @@ -103,12 +102,14 @@ "SR", "TT", "UY", - "VE" + "VE", + "CW" ], "CHI": [ "CN", - "TW" + "TW", + "HK" ], "EEU": [ @@ -123,7 +124,8 @@ "RS", "SK", "SI", - "MK" + "MK", + "XK" ], "FSU": [ @@ -148,7 +150,7 @@ "IN" ], - "JAP": [ + "JPN": [ "JP" ], @@ -172,7 +174,8 @@ "SY", "TR", "AE", - "YE" + "YE", + "IQ" ], "ODA": [ @@ -247,5 +250,209 @@ "SE", "CH", "VA" - ] + ], + "World": [ + "DZ", + "AO", + "BJ", + "BW", + "BF", + "BI", + "CM", + "CV", + "CF", + "TD", + "KM", + "CG", + "CI", + "CD", + "DJ", + "EG", + "GQ", + "ER", + "ET", + "GA", + "GM", + "GH", + "GN", + "GW", + "KE", + "LS", + "LR", + "LY", + "MG", + "MW", + "ML", + "MR", + "MA", + "MZ", + "NA", + "NE", + "NG", + "RW", + "ST", + "SN", + "SC", + "SL", + "SO", + "ZA", + "SS", + "SD", + "SZ", + "TG", + "TN", + "UG", + "TZ", + "ZM", + "ZW", + "AU", + "NZ", + "CA", + "AI", + "AG", + "AR", + "AW", + "BS", + "BB", + "BZ", + "BM", + "BO", + "BR", + "KY", + "CL", + "CO", + "CR", + "CU", + "DM", + "DO", + "EC", + "SV", + "FK", + "GD", + "GT", + "GY", + "HT", + "HN", + "JM", + "MQ", + "NI", + "PA", + "PY", + "PE", + "KN", + "LC", + "VC", + "SR", + "TT", + "UY", + "VE", + "CN", + "TW", + "BA", + "BG", + "HR", + "CZ", + "HU", + "ME", + "PL", + "RO", + "RS", + "SK", + "SI", + "MK", + "AM", + "AZ", + "BY", + "EE", + "GE", + "KZ", + "KG", + "LV", + "LT", + "MD", + "RU", + "TJ", + "TM", + "UA", + "UZ", + "IN", + "JP", + "MX", + "BH", + "BN", + "CY", + "IR", + "IL", + "JO", + "KW", + "LB", + "PS", + "OM", + "QA", + "SA", + "SY", + "TR", + "AE", + "YE", + "AF", + "AS", + "BD", + "BT", + "KH", + "KP", + "FJ", + "PF", + "ID", + "KI", + "LA", + "MY", + "MV", + "MU", + "MN", + "MM", + "NP", + "NC", + "PK", + "PG", + "PH", + "WS", + "SG", + "SB", + "LK", + "TH", + "TL", + "TO", + "VU", + "VN", + "KR", + "GB", + "US", + "AL", + "AD", + "AT", + "BE", + "DK", + "FO", + "FI", + "FR", + "DE", + "GI", + "GR", + "GL", + "IS", + "IE", + "IT", + "LU", + "MT", + "MC", + "NL", + "NO", + "PT", + "SM", + "ES", + "SE", + "CH", + "VA" + ] + } \ No newline at end of file diff --git a/premise/iam_variables_mapping/constants.yaml b/premise/iam_variables_mapping/constants.yaml index b03d1e89..ea506569 100644 --- a/premise/iam_variables_mapping/constants.yaml +++ b/premise/iam_variables_mapping/constants.yaml @@ -116,7 +116,7 @@ LIST_TIAM_REGIONS: - EEU - FSU - IND - - JAP + - JPN - MEX - MEA - ODA diff --git a/premise/iam_variables_mapping/electricity_variables.yaml b/premise/iam_variables_mapping/electricity_variables.yaml index 2952f9f5..fbadc5a9 100644 --- a/premise/iam_variables_mapping/electricity_variables.yaml +++ b/premise/iam_variables_mapping/electricity_variables.yaml @@ -33,7 +33,7 @@ Biomass CHP (existing): tiam: Efficiency|Electricity|Existing biomass|w/o CCS ecoinvent_aliases: fltr: - - heat and power co-generation, wood chips + - heat and power co-generation, existing, wood chips mask: reference product: - heat @@ -44,7 +44,7 @@ Biomass CHP (existing): - market for wood chips, wet, measured as dry mass exists in database: False proxy: - name: heat and power co-generation, wood chips + name: heat and power co-generation, wood chips, 6667 kW reference product: electricity, high voltage mask: reference product: @@ -146,6 +146,9 @@ Biomass MSW: fltr: name: treatment of municipal solid waste, incineration reference product: electricity + ecoinvent_fuel_aliases: + fltr: + - market for wood chips, wet, measured as dry mass Biogas CHP: diff --git a/premise/iam_variables_mapping/gains_regions_mapping.yaml b/premise/iam_variables_mapping/gains_regions_mapping.yaml index 4d03b9cf..a97e05b1 100644 --- a/premise/iam_variables_mapping/gains_regions_mapping.yaml +++ b/premise/iam_variables_mapping/gains_regions_mapping.yaml @@ -4,99 +4,124 @@ AFRI_EAST: message: AFR remind: SSA image: EAF + tiam: AFR AFRI_NORT: message: AFR remind: MEA image: NAF + tiam: AFR AFRI_WEST: message: AFR remind: SSA image: WAF + tiam: AFR ASIA_STAN: message: PAS remind: OAS image: STAN + tiam: ODA BRAZ_WHOL: message: LAM remind: LAM image: BRA + tiam: CSA CANA_WHOL: message: NAM remind: CAZ image: CAN + tiam: CAN CEAM_REST: message: LAM remind: LAM image: RCAM + tiam: CSA CENT_EURO: message: EEU remind: EUR image: CEU + tiam: EEU CHIN_PLUS: message: CHN remind: CHA image: CHN + tiam: CHI INDI_WHOL: message: SAS remind: IND image: INDIA + tiam: CHI INDO_PLUS: message: PAS remind: OAS image: INDO + tiam: ODA JAPA_WHOL: message: PAO remind: JPN image: JAP + tiam: JAP KORE_AALL: message: PAS remind: OAS image: KOR + tiam: SKO LAME_REST: message: LAM remind: LAM image: RSAM + tiam: CSA MEXI_WHOL: message: LAM remind: LAM image: MEX + tiam: MEX MIDD_EAST: message: MEA remind: MEA image: ME + tiam: MEA OCEA_WHOL: message: PAO remind: CAZ image: OCE + tiam: AUS RUSS_PLUS: message: FSU remind: REF image: RUS + tiam: FSU SAFR_WHOL: message: AFR remind: SSA image: SAF + tiam: AFR SOEA_ASIA: message: PAS remind: OAS image: SEAS + tiam: ODA SOUA_REST: message: SAS remind: OAS image: RSAS + tiam: ODA TURK_WHOL: message: WEU remind: MEA image: TUR + tiam: MEA UKRA_PLUS: message: FSU remind: REF image: UKR + tiam: FSU USAM_WHOL: message: NAM remind: USA image: USA + tiam: USA WEST_EURO: message: WEU remind: NEU - image: WEU \ No newline at end of file + image: WEU + tiam: WEU \ No newline at end of file diff --git a/premise/iam_variables_mapping/missing_geography_equivalences.yaml b/premise/iam_variables_mapping/missing_geography_equivalences.yaml index 5ad9b9bc..1f5067c3 100644 --- a/premise/iam_variables_mapping/missing_geography_equivalences.yaml +++ b/premise/iam_variables_mapping/missing_geography_equivalences.yaml @@ -6,171 +6,216 @@ Europe without Austria: remind: EUR image: WEU message: WEU + tiam: WEU Europe without Switzerland and Austria: remind: EUR image: WEU message: WEU + tiam: WEU Europe without Switzerland: remind: EUR image: WEU message: WEU + tiam: WEU North America without Quebec: remind: USA image: USA message: NAM + tiam: USA RER w/o RU: remind: EUR image: WEU message: WEU + tiam: WEU RER: remind: EUR image: WEU message: WEU + tiam: WEU RoW: remind: World image: World message: World + tiam: World GLO: remind: World image: World message: World + tiam: World RNA: remind: USA image: USA message: NAM + tiam: USA SAS: remind: IND image: INDIA message: SAS + tiam: ODA IAI Area, EU27 & EFTA: remind: EUR image: WEU message: WEU + tiam: WEU UN-OCEANIA: remind: CAZ image: OCE message: PAO + tiam: AUS UN-SEASIA: remind: OAS image: SEAS message: PAS + tiam: ODA RAF: remind: SSA image: RSAF message: AFR + tiam: AFR RAS: remind: CHA image: CHN message: CHN + tiam: CHI IAI Area, Africa: remind: SSA image: RSAF message: AFR + tiam: AFR RER w/o CH+DE: remind: EUR image: WEU message: WEU + tiam: WEU RER w/o DE+NL+RU: remind: EUR image: WEU message: WEU + tiam: WEU IAI Area, Asia, without China and GCC: remind: OAS image: SEAS message: PAS + tiam: ODA Europe, without Russia and Turkey: remind: EUR image: WEU message: WEU + tiam: WEU WECC: remind: USA image: USA message: NAM + tiam: USA WEU: remind: EUR image: WEU message: WEU + tiam: WEU UCTE: remind: EUR image: WEU message: WEU + tiam: WEU UCTE without Germany: remind: EUR image: WEU message: WEU + tiam: WEU NORDEL: remind: NEU image: WEU message: WEU + tiam: WEU ENTSO-E: remind: EUR image: WEU message: WEU + tiam: WEU RLA: remind: LAM image: RSAM message: LAM + tiam: CSA IAI Area, South America: remind: LAM image: RSAM message: LAM + tiam: CSA IAI Area, Russia & RER w/o EU27 & EFTA: remind: REF image: RUS message: FSU + tiam: FSU IAI Area, North America: remind: USA image: USA message: NAM + tiam: USA OCE: remind: CAZ image: OCE message: PAO + tiam: AUS US-PR: remind: USA image: USA message: NAM + tiam: USA US only: remind: USA image: USA message: NAM + tiam: USA APAC: remind: OAS image: SEAS message: PAS + tiam: ODA CN-NCGC: remind: CHA image: CHN message: CHN + tiam: CHI + CN-CSG: remind: CHA image: CHN message: CHN + tiam: CHI + CN-SWG: remind: CHA image: CHN message: CHN + tiam: CHI CN-CCG: remind: CHA image: CHN message: CHN + tiam: CHI CN-ECGC: remind: CHA image: CHN message: CHN + tiam: CHI RoE: remind: EUR image: WEU message: WEU + tiam: WEU CN-NWG: remind: CHA image: CHN message: CHN + tiam: CHI BR-South-eastern/Mid-western grid: remind: LAM image: RSAM message: LAM + tiam: CSA CN-NECG: remind: CHA image: CHN - message: CHN \ No newline at end of file + message: CHN + tiam: CHI \ No newline at end of file diff --git a/premise/transformation.py b/premise/transformation.py index 9374d612..0ca0e279 100644 --- a/premise/transformation.py +++ b/premise/transformation.py @@ -6,6 +6,7 @@ """ import logging.config +import sys import uuid from collections import defaultdict from copy import deepcopy