Bladeren bron

downscaling entities, some categories don't work

Daniel Busch 5 maanden geleden
bovenliggende
commit
a1407ec087

+ 43 - 2
src/unfccc_ghg_data/unfccc_reader/Saint_Kitts_and_Nevis/config_kna_bur1.py

@@ -269,12 +269,12 @@ conf_trend = {
             "A.  Enteric Fermentation": "3.A.1",
             "B.  Manure Management": "3.A.2",
             "C.  Rice Cultivation": "3.C.7",
-            "D.  Agricultural Soils": "3.C.4",  # TODO confirm!
+            "D.  Agricultural Soils": "3.C.4",  # TODO confirm! 3c4 and 3c5
             "E.  Prescribed Burning of Savannahs": "3.C.1.d",  # TODO confirm!
             "F.  Field Burning of Agricultural": "3.C.1.b",  # TODO confirm!
             "Residues  G.  Liming": "3.C.2",
             "H.  Urea applications": "3.C.3",
-            "I.  Other carbon-containing": "3.D.2",  # TODO confirm!
+            "I.  Other carbon-containing": "3.D.2",  # TODO confirm! ?
             "fertilisers  4. Land Use, Land-Use Change and  Forestry": "M.LULUCF",
             "A. Forest Land": "3.B.1",
             "B. Cropland": "3.B.2",
@@ -586,3 +586,44 @@ country_processing_step1 = {
         "source_GWP": gwp_to_use,
     },
 }
+
+country_processing_step2 = {
+    "downscale": {
+        "entities": {
+            "KYOTO": {
+                "basket": "KYOTOGHG (AR5GWP100)",
+                "basket_contents": [
+                    "CH4",
+                    "CO2",
+                    "N2O",
+                    "HFCS (AR5GWP100)",
+                    "PFCS (AR5GWP100)",
+                    "SF6",
+                ],
+                "sel": {
+                    f'category ({coords_terminologies["category"]})': [
+                        "1",
+                        "1.A",
+                        "1.B",  # not all zero - but doesn't work
+                        "1.C",  # all zero -> doesn't work
+                        "2",  # all zero -> doesn't work
+                        "2.A",  # all zero -> doesn't work
+                        "2.B",  # all zero -> doesn't work
+                        "2.C",  # all zero -> doesn't work
+                        "2.D",  # all zero -> doesn't work
+                        "2.E",  # all zero -> doesn't work
+                        "2.F",  # all zero -> doesn't work
+                        "2.G",  # all zero -> doesn't work
+                        "2.H",  # all zero -> doesn't work
+                        "3",
+                        "3.A",
+                        "3.B",
+                        "3.C",
+                        "3.D",
+                        "4",
+                    ]
+                },
+            },
+        },
+    },
+}

+ 12 - 0
src/unfccc_ghg_data/unfccc_reader/Saint_Kitts_and_Nevis/read_KNA_BUR1_from_pdf.py

@@ -20,6 +20,7 @@ from unfccc_ghg_data.unfccc_reader.Saint_Kitts_and_Nevis.config_kna_bur1 import
     coords_terminologies,
     coords_value_mapping,
     country_processing_step1,
+    country_processing_step2,
     filter_remove,
     fix_values_main,
     fix_values_trend,
@@ -361,6 +362,17 @@ if __name__ == "__main__":
         processing_info_country=country_processing_step1,
     )
 
+    data_proc_pm2 = process_data_for_country(
+        data_country=data_proc_pm2,
+        entities_to_ignore=[],
+        gas_baskets={},
+        filter_dims=None,
+        cat_terminology_out=None,
+        category_conversion=None,
+        sectors_out=None,
+        processing_info_country=country_processing_step2,
+    )
+
     # # ###
     # # save processed data to IF and native format
     # # ###