Browse Source

[DATALAD] Recorded changes

Daniel Busch 3 weeks ago
parent
commit
b664815b48

+ 3 - 3
conv_FAO_IPPCC2006_PRIMAP_CH4.csv

@@ -1,10 +1,10 @@
 # references: CH4 emissions only
 # last_update: 2024-10-14
 FAO,IPCC2006_PRIMAP,comment
-1.A.2.c,3.C.7,Rice cultivation
-1.A.1.b + 1.A.2.b + 1.A.6.b + 1.A.7.b, 3.C.1.b, FAO 1.A.X.b Burning of crop residues to IPCC 3.C.1.b Biomass Burning In Croplands
+1.A.2.c,3.C.7, FAO 1.A.2.c Rice cultivation to IPCC 3.C.7 Rice Cultivation
+M.1.BCR, 3.C.1.b, FAO M.1.BCR (or 1.A.1.b + 1.A.2.b + 1.A.6.b + 1.A.7.b) Burning of crop residues to IPCC 3.C.1.b Biomass Burning In Croplands
 M.3.EF, 3.A.1, Enteric fermentation
 M.3.MM, 3.A.2, Manure Management
-6.A,3.C.1.a, FAO 6.A forest fires to IPCC 3.C.1.a Biomass burning in forest lands
+6.A,M.3.C.1.a, FAO 6.A forest fires to IPCC M.3.C.1.a Biomass burning in forest lands (M category because it is not contained in the 3.C.1 sum)
 6.B,3.C.1.c, FAO 6.B savanna fires to IPCC 3.C.1.c Biomass burning in grasslands
 6.C, M.3.B.2.FOS, FAO 6.C Fires in organic soils to IPCC 3.B.3 cropland (fires in organic soils)

+ 1 - 1
conv_FAO_IPPCC2006_PRIMAP_N2O.csv

@@ -10,5 +10,5 @@ M.1.CR, M.3.C.45.CR, FAO Crop residues to IPCC Direct and indirect emissions N2O
 1.B.2.a + 1.B.2.b,M.3.C.5.SF, FAO Synthetic fertilisers direct emissions to IPCC Synthetic fertiliser emissions from direct N2O Emissions from Managed Soils
 5.A,M.3.C.4.DOS.GL,FAO 5.A Drained grassland to IPCC 3.C.4 share of drained organic soils in grass land
 5.B,M.3.C.4.DOS.CL,FAO 5.B Drained cropland to IPCC 3.C.4 share of drained organic soils in cropland
-6.A,3.C.1.a, FAO 6.A forest fires to IPCC 3.C.1.a Biomass burning in forest lands
+6.A,M.3.C.1.a, FAO 6.A forest fires to IPCC M.3.C.1.a Biomass burning in forest lands (M category because it is not contained in the 3.C.1 sum)
 6.B, 3.C.1.c, FAO 6.B savanna fires to IPCC 3.C.1.c Biomass burning in grasslands

+ 1 - 1
extracted_data/v2023-12-13/FAOSTAT_Agrifood_system_emissions_v2023-12-13.csv

@@ -1 +1 @@
-../../.git/annex/objects/Jw/zv/MD5E-s6015159--a736c8b70368de8e5f281fd07cac37c4.csv/MD5E-s6015159--a736c8b70368de8e5f281fd07cac37c4.csv
+../../.git/annex/objects/84/Jg/MD5E-s6104450--9149191fea1c8852b3236979b2092381.csv/MD5E-s6104450--9149191fea1c8852b3236979b2092381.csv

+ 1 - 1
extracted_data/v2023-12-13/FAOSTAT_Agrifood_system_emissions_v2023-12-13.nc

@@ -1 +1 @@
-../../.git/annex/objects/01/Pm/MD5E-s2116669--c787beb1b58fce2424f670688b2c7f11.nc/MD5E-s2116669--c787beb1b58fce2424f670688b2c7f11.nc
+../../.git/annex/objects/kp/vZ/MD5E-s2060452--d7732a88ad51e73b64bc605e9a4a861d.nc/MD5E-s2060452--d7732a88ad51e73b64bc605e9a4a861d.nc

+ 1 - 1
extracted_data/v2023-12-13/FAOSTAT_Agrifood_system_emissions_v2023-12-13_raw.nc

@@ -1 +1 @@
-../../.git/annex/objects/Gv/V7/MD5E-s14450201--e7e0610708e91d7a81d4e41f57202f98.nc/MD5E-s14450201--e7e0610708e91d7a81d4e41f57202f98.nc
+../../.git/annex/objects/Q6/F6/MD5E-s14450580--a43c6824e8130ab4c56b300043374e93.nc/MD5E-s14450580--a43c6824e8130ab4c56b300043374e93.nc

+ 1 - 1
extracted_data/v2024-11-14/FAOSTAT_Agrifood_system_emissions_v2024-11-14.csv

@@ -1 +1 @@
-../../.git/annex/objects/Mq/zf/MD5E-s6145676--b2901987ff6f96b09054c047545b0f40.csv/MD5E-s6145676--b2901987ff6f96b09054c047545b0f40.csv
+../../.git/annex/objects/xK/xP/MD5E-s6236738--50418baa31366f55c691f7191c0edd4e.csv/MD5E-s6236738--50418baa31366f55c691f7191c0edd4e.csv

+ 1 - 1
extracted_data/v2024-11-14/FAOSTAT_Agrifood_system_emissions_v2024-11-14.nc

@@ -1 +1 @@
-../../.git/annex/objects/5M/Pj/MD5E-s2152875--bde17e8fdf6c749a5ce322b1c1f6bc69.nc/MD5E-s2152875--bde17e8fdf6c749a5ce322b1c1f6bc69.nc
+../../.git/annex/objects/m3/kK/MD5E-s2312541--ff444b4069808a639ac2bb785296921a.nc/MD5E-s2312541--ff444b4069808a639ac2bb785296921a.nc

+ 1 - 1
extracted_data/v2024-11-14/FAOSTAT_Agrifood_system_emissions_v2024-11-14_raw.nc

@@ -1 +1 @@
-../../.git/annex/objects/kV/Xv/MD5E-s15222617--72354d656a4f68ce4bca9f47fc73dab5.nc/MD5E-s15222617--72354d656a4f68ce4bca9f47fc73dab5.nc
+../../.git/annex/objects/VV/k7/MD5E-s15222746--49d853c6b5d16eb09b0ecae01cb7bc55.nc/MD5E-s15222746--49d853c6b5d16eb09b0ecae01cb7bc55.nc

+ 28 - 61
src/faostat_data_primap/helper/category_aggregation.py

@@ -212,6 +212,18 @@ agg_info_fao = {
             ],
             "sel": {"variable": ["N2O"]},
         },
+        # Only some crop types are burned on the field
+        # Rounding errors up to 100% (see explanation above)
+        "M.1.BCR": {
+            "tolerance": 1,
+            "sources": [
+                "1.A.1.b",  # wheat
+                "1.A.2.b",  # rice
+                "1.A.6.b",  # maize (corn)
+                "1.A.7.b",  # sugar cane
+            ],
+            "sel": {"variable": ["N2O", "CH4"]},
+        },
         "1.A": {
             # crops
             "tolerance": 1,
@@ -455,7 +467,10 @@ agg_info_ipcc2006_primap_N2O = {
         "M.LULUCF": {
             "sources": [
                 "3.B.1",  # Carbon stock change in forests (FAO 4, or 4.A and 4.B)
-                "3.C.1.a",  # Biomass Burning In Forests (FAO 6.A forest fires)
+                # Note that IPCC M.3.C.1.a biomass burning in forest goes to LULUCF and not to AG. According to the FAO
+                # mapping document it is part of forest land.
+                # M.3.C.1.a for CO2 is an exception, because it is already included in the carbon stock change (FAO 4)
+                "M.3.C.1.a",  # Biomass Burning In Forests (FAO 6.A forest fires)
             ],
             "sel": {"variable": ["N2O"]},
         },
@@ -511,75 +526,30 @@ agg_info_ipcc2006_primap_CO2 = {
 
 agg_info_ipcc2006_primap_CH4 = {
     "category (IPCC2006_PRIMAP)": {
-        "3.A.1.a": {  # enteric fermentation
+        "3.A": {  # Livestock
             "sources": [
-                "3.A.1.a.i",  # cattle (dairy)
-                "3.A.1.a.ii",  # cattle (non-dairy)
+                "3.A.1",  # enteric fermentation (FAO M.3.EF)
+                "3.A.2",  # manure management (FAO M.3.MM)
             ],
             "sel": {"variable": ["CH4"]},
         },
-        "3.A.1": {  # enteric fermentation
-            "sources": [
-                "3.A.1.a",
-                "3.A.1.b",
-                "3.A.1.c",
-                "3.A.1.d",
-                "3.A.1.e",
-                "3.A.1.f",
-                "3.A.1.g",
-                "3.A.1.h",
-                "3.A.1.j",
-            ],
-            "sel": {"variable": ["CH4"]},
-        },
-        # TODO 3.A.2.x are currently not read in
-        # "3.A.2.a": {  # decomposition of manure - CH4, N2O
-        #     "sources": [
-        #         "3.A.2.a.i",  # cattle (dairy)
-        #         "3.A.2.a.ii",  # cattle (non-dairy)
-        #     ],
-        #     "sel": {"variable": ["CH4"]},
-        # },
-        # # consistency check
-        # "3.A.2": {  # decomposition of manure - CH4, N2O
-        #     "sources": [
-        #         "3.A.2.a",
-        #         "3.A.2.b",
-        #         "3.A.2.c",
-        #         "3.A.2.d",
-        #         "3.A.2.e",
-        #         "3.A.2.f",
-        #         "3.A.2.g",
-        #         "3.A.2.h",
-        #         "3.A.2.i",
-        #         "3.A.2.j",
-        #     ],
-        #     "sel": {"variable": ["CH4"]},
-        # },
-        "3.A": {
-            "sources": ["3.A.1", "3.A.2"],
-            "sel": {"variable": ["CH4"]},
-        },
         "3.C.1": {  # Emissions from Biomass Burning
             "sources": [
-                # "3.C.1.a",  # Biomass Burning In Forest Lands, because not there in 2023 release
-                "3.C.1.b",  # Biomass Burning In Croplands
-                "3.C.1.c",  # Biomass Burning in Grasslands
+                "3.C.1.b",  # Biomass Burning In Croplands (FAO M.1.BCR))
+                "3.C.1.c",  # Biomass Burning in Grasslands (FAO 6.B savanna fires)
             ],
             "sel": {"variable": ["CH4"]},
         },
         "M.3.C.1.AG": {  # AG-related emissions from Biomass Burning
             "sources": [
-                "3.C.1.b",  # Biomass Burning In Croplands
-                "3.C.1.c",  # Biomass Burning in Grasslands
+                "3.C.1",  # Emissions from Biomass Burning
             ],
             "sel": {"variable": ["CH4"]},
         },
         "M.3.C.AG": {
             "sources": [
-                "3.C.1.b",  # Biomass Burning In Croplands - looks good (CH4, N2O)
-                "3.C.1.c",  # Biomass Burning in Grasslands - looks good (CH4)
-                "3.C.7",  # rice cultivation
+                "M.3.C.1.AG",  # AG-related emissions from Biomass Burning
+                "3.C.7",  # rice cultivation (FAO 1.A.2.c Rice cultivation)
             ],
             "sel": {"variable": ["CH4"]},
         },
@@ -597,18 +567,15 @@ agg_info_ipcc2006_primap_CH4 = {
         },
         "M.AG": {
             "sources": [
-                "3.A",
-                "M.AG.ELV",
+                "3.A",  # Livestock
+                "M.AG.ELV",  # Agriculture excluding livestock
             ],
             "sel": {"variable": ["CH4"]},
         },
         "M.LULUCF": {
             "sources": [
-                "3.B.1",  # Carbon stock change in forests
-                "3.B.2",  # Drained cropland
-                "3.B.3",  # Drained grassland
-                "3.C.1.a",  # Biomass Burning In Forests
-                "M.3.B.2.FOS",  # cropland (fires in organic soils)
+                "M.3.C.1.a",  # Biomass Burning In Forests (FAO 6.A forest fires)
+                "M.3.B.2.FOS",  # cropland - fires in organic soils (FAO 6.C fires in organic soils)
             ],
             "sel": {"variable": ["CH4"]},
         },