Browse Source

* Corrected GWP for Australia CRF/CRT 2023
* Corrected typos

Johannes Gütschow 1 year ago
parent
commit
1f80b44f29

+ 17 - 15
UNFCCC_GHG_data/UNFCCC_CRF_reader/crf_specifications/CRF2023_AUS_specification.py

@@ -42,6 +42,8 @@ TODO:
 import numpy as np
 from .util import unit_info
 
+gwp_to_use = 'AR5GWP100'
+
 CRF2023_AUS = {
     # Table1 instead of 1s1 and 1s2
     "Table1": {
@@ -116,7 +118,7 @@ CRF2023_AUS = {
         ],
         "entity_mapping": {
             "NOX": "NOx",
-            "Total GHG emissions (1)": "KYOTOGHG (AR4GWP100)",
+            "Total GHG emissions (1)": f"KYOTOGHG ({gwp_to_use})",
         },
         "coords_defaults": {
             "class": "Total",
@@ -992,10 +994,10 @@ CRF2023_AUS = {
             ["2.H.2. Food and Beverages Industry", ["2.H.2"]],
         ],
         "entity_mapping": {
-            "HFCs (1)": "HFCS (AR4GWP100)",
-            "PFCs (1)": "PFCS (AR4GWP100)",
-            "Unspecified mix of HFCs and PFCs (1)": "UnspMixOfHFCsPFCs (AR4GWP100)",
-            "Total GHG emissions (2)": "KYOTOGHG (AR4GWP100)",
+            "HFCs (1)": f"HFCS ({gwp_to_use})",
+            "PFCs (1)": f"PFCS ({gwp_to_use})",
+            "Unspecified mix of HFCs and PFCs (1)": f"UnspMixOfHFCsPFCs ({gwp_to_use})",
+            "Total GHG emissions (2)": f"KYOTOGHG ({gwp_to_use})",
         },
         "coords_defaults": {
             "class": "Total",
@@ -1071,9 +1073,9 @@ CRF2023_AUS = {
             "HFC-365mfc": "HFC365mfc",
             "HFC-41": "HFC41",
             "HFC-43-10mee": "HFC4310mee",
-            "Unspecified mix of HFCs (1)": "UnspMixOfHFCs (AR4GWP100)",
-            "Unspecified mix of HFCs and PFCs(1)": "UnspMixOfHFCsPFCs (AR4GWP100)",
-            "Unspecified mix of PFCs (1)": "UnspMixOfPFCs (AR4GWP100)",
+            "Unspecified mix of HFCs (1)": f"UnspMixOfHFCs ({gwp_to_use})",
+            "Unspecified mix of HFCs and PFCs(1)": f"UnspMixOfHFCsPFCs ({gwp_to_use})",
+            "Unspecified mix of PFCs (1)": f"UnspMixOfPFCs ({gwp_to_use})",
             "c-C3F6": "cC3F6",
             "c-C4F8": "cC4F8",
         },
@@ -1142,7 +1144,7 @@ CRF2023_AUS = {
             ["3.J. Other (please specify)", ["3.J"], 1],
             ["NA", ["\IGNORE"], 2],
         ],
-        "entity_mapping": {"Total GHG emissions (1)": "KYOTOGHG (AR4GWP100)"},
+        "entity_mapping": {"Total GHG emissions (1)": f"KYOTOGHG ({gwp_to_use})"},
         "coords_defaults": {
             "class": "Total",
         },
@@ -1575,7 +1577,7 @@ CRF2023_AUS = {
             "CH4(2)": "CH4",
             "N2O(2)": "N2O",
             "Net CO2 emissions/removals (1,2)": "CO2",
-            "Total GHG emissions/removals (3)": "KYOTOGHG (AR4GWP100)",
+            "Total GHG emissions/removals (3)": f"KYOTOGHG ({gwp_to_use})",
         },
         "coords_defaults": {
             "class": "Total",
@@ -1622,7 +1624,7 @@ CRF2023_AUS = {
         ],
         "entity_mapping": {
             "CO2(1)": "CO2",
-            "Total GHG emissions (1)": "KYOTOGHG (AR4GWP100)",
+            "Total GHG emissions (1)": f"KYOTOGHG ({gwp_to_use})",
         },
         "coords_defaults": {
             "class": "Total",
@@ -1710,10 +1712,10 @@ CRF2023_AUS = {
         "entity_mapping": {
             "NOX": "NOx",
             "Net CO2 emissions/ removals": "CO2",
-            "HFCs (1)": "HFCS (AR4GWP100)",
-            "PFCs (1)": "PFCS (AR4GWP100)",
-            "Unspecified mix of HFCs and PFCs (1)": "UnspMixOfHFCsPFCs (AR4GWP100)",
-            "Total GHG emissions/removals (2)": "KYOTOGHG (AR4GWP100)",
+            "HFCs (1)": f"HFCS ({gwp_to_use})",
+            "PFCs (1)": f"PFCS ({gwp_to_use})",
+            "Unspecified mix of HFCs and PFCs (1)": f"UnspMixOfHFCsPFCs ({gwp_to_use})",
+            "Total GHG emissions/removals (2)": f"KYOTOGHG ({gwp_to_use})",
         },
         "coords_defaults": {
             "class": "Total",

+ 1 - 1
UNFCCC_GHG_data/UNFCCC_DI_reader/UNFCCC_DI_reader_datalad.py

@@ -53,7 +53,7 @@ def read_DI_for_country_datalad(
             explicit=False,
         )
     except IncompleteResultsError as IRE:
-        print(f"IncompleteResultsError occured when running {cmd}: {IRE}")
+        print(f"IncompleteResultsError occurred when running {cmd}: {IRE}")
     except Exception as ex:
         print(f"Exception occurred when running {cmd}")
         print(ex.message)

+ 1 - 1
UNFCCC_GHG_data/UNFCCC_reader/read_UNFCCC_submission.py

@@ -10,7 +10,7 @@ from UNFCCC_GHG_data.helper import root_path, get_code_file
 # Find the right function and possible input and output files and
 # read the data using datalad run.
 parser = argparse.ArgumentParser()
-parser.add_argument('--country', help='Country name or UNFCCC_GHG_data')
+parser.add_argument('--country', help='Country name or code')
 parser.add_argument('--submission', help='Submission to read')
 
 args = parser.parse_args()

+ 1 - 1
UNFCCC_GHG_data/helper/functions.py

@@ -513,7 +513,7 @@ def get_country_code(
             except:
                 raise ValueError(
                     f"Country name {country_name} can not be mapped to "
-                    f"any country UNFCCC_GHG_data. Try using the ISO3 UNFCCC_GHG_data directly."
+                    f"any country code. Try using the ISO3 code directly."
                 )
             if len(country) > 1:
                 country_code = None

+ 1 - 1
dodo.py

@@ -180,7 +180,7 @@ read_config = {
 
 # TODO: make individual task for non-UNFCCC submissions
 def task_read_unfccc_submission():
-    """ Read submission for a country (if UNFCCC_GHG_data exists) (not for CRF)"""
+    """ Read submission for a country (if code exists) (not for CRF)"""
     return {
         'actions': [f"./venv/bin/python UNFCCC_GHG_data/UNFCCC_reader/read_UNFCCC_submission.py "
                     f"--country={read_config['country']} --submission={read_config['submission']}",