Browse Source

category aggregation works

Daniel Busch 9 months ago
parent
commit
8335027586

+ 7 - 8
src/unfccc_ghg_data/unfccc_reader/Mongolia/config_mng_bur2.py

@@ -735,24 +735,21 @@ country_processing_step1 = {
         #     "name": "Aggregate sources and non-CO2 emissions sources on land "
         #     "(Agriculture)",
         # },
-        "M.3.D.AG": {"sources": ["3.D.2"], "name": "Other (Agriculture)"},
+        "M.3.D.AG": {"sources": ["3.D.2"]},
         # TODO: In this case 3.C should be equivalent to M.3.C.AG, but I'm not sure.
         "M.3.C.AG": {
             "sources": ["3.C.1", "3.C.4", "3.C.5"],
-            "name": "Aggregate sources and non-CO2 emissions sources on land ",
         },
         "M.AG.ELV": {
             "sources": ["M.3.C.AG", "M.3.D.AG"],
-            "name": "Agriculture excluding livestock",
         },
-        "M.AG": {"sources": ["3.A.1", "3.A.2", "M.AG.ELV"], "name": "Agriculture"},
-        "M.3.D.LU": {"sources": ["3.D.1"], "name": "Other (LULUCF)"},
-        "M.LULUCF": {"sources": ["3.B", "M.3.D.LU"], "name": "LULUCF"},
+        "M.AG": {"sources": ["3.A.1", "3.A.2", "M.AG.ELV"]},
+        "M.3.D.LU": {"sources": ["3.D.1"]},
+        "M.LULUCF": {"sources": ["3.B", "M.3.D.LU"]},
         "M.0.EL": {
             "sources": ["1", "2", "M.AG", "4"],
-            "name": "National total emissions excluding LULUCF",
         },
-        "3": {"sources": ["M.AG", "M.LULUCF"], "name": "AFOLU"},  # consistency check
+        "3": {"sources": ["M.AG", "M.LULUCF"]},  # consistency check
         # TODO why is this line repeated? Check if can be removed
         # "M.0.EL": {"sources": ["1", "2", "M.AG", "4"]},  # consistency check
         "0": {"sources": ["1", "2", "3", "4"]},  # consistency check
@@ -764,6 +761,8 @@ country_processing_step1 = {
     },
 }
 
+country_processing_gas_baskets = {"tolerance": 0.02}
+
 gas_baskets = {
     "FGASES (SARGWP100)": ["HFCS (SARGWP100)", "PFCS (SARGWP100)", "SF6", "NF3"],
     "FGASES (AR4GWP100)": ["HFCS (AR4GWP100)", "PFCS (AR4GWP100)", "SF6", "NF3"],

+ 5 - 4
src/unfccc_ghg_data/unfccc_reader/Mongolia/read_MNG_BUR2_from_pdf.py

@@ -10,6 +10,7 @@ from config_mng_bur2 import (
     coords_defaults,
     coords_terminologies,
     coords_value_mapping,
+    country_processing_gas_baskets,
     country_processing_step1,
     filter_remove,
     gas_baskets,
@@ -257,9 +258,9 @@ if __name__ == "__main__":
         for year in inv_conf_per_entity[entity]["years"]:
             df_entity.loc[:, year] = df_entity[year].str.replace(",", "")
 
-        if "del_value" in inv_conf_per_entity[entity]:
-            for year_del, category_del in inv_conf_per_entity[entity]["del_value"]:
-                df_entity.loc[df_entity["category"] == category_del, year_del] = ""
+        # if "del_value" in inv_conf_per_entity[entity]:
+        #     for year_del, category_del in inv_conf_per_entity[entity]["del_value"]:
+        #         df_entity.loc[df_entity["category"] == category_del, year_del] = ""
 
         if df_trend is None:
             df_trend = df_entity
@@ -544,7 +545,7 @@ if __name__ == "__main__":
         cat_terminology_out=None,
         category_conversion=None,
         sectors_out=None,
-        processing_info_country=None,
+        processing_info_country=country_processing_gas_baskets,
     )
 
     data_proc_pm2 = process_data_for_country(