JGuetschow / PRIMAP-hist

The PRIMAP-hist issue tracker repository
6 stars 2 forks source link

negatives in process emissions #70

Closed rich-wood closed 9 months ago

rich-wood commented 1 year ago

I think this is a bug, finding negatives in non LULUCF rows, listed below

Some are machine level repeated values (-2.220446E-16), but there are also bigger ones. Also a lot of negatives in category "0" the non-rounded file - not exactly sure what that refers to... i guess some LULUCF thing.

in file Guetschow-et-al-2023a-PRIMAP-hist_v2.4.2_final_09-Mar-2023.csv

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

source | scenario (PRIMAP-hist) | area (ISO3) | entity | unit | category (IPCC2006_PRIMAP) | Min Value -- | -- | -- | -- | -- | -- | -- PRIMAP-hist_v2.4.2_final | HISTCR | ESP | CH4 | CH4 * gigagram / a | 1.B.1 | -0.64 PRIMAP-hist_v2.4.2_final | HISTCR | ESP | KYOTOGHG (AR4GWP100) | CO2 * gigagram / a | 1.B.1 | -16 PRIMAP-hist_v2.4.2_final | HISTCR | ESP | KYOTOGHG (SARGWP100) | CO2 * gigagram / a | 1.B.1 | -13.4 PRIMAP-hist_v2.4.2_final | HISTCR | MMR | CO2 | CO2 * gigagram / a | 2.B | -7.2E-08 PRIMAP-hist_v2.4.2_final | HISTCR | PRY | FGASES (AR4GWP100) | CO2 * gigagram / a | 2 | -2.2E-16 PRIMAP-hist_v2.4.2_final | HISTCR | PRY | FGASES (SARGWP100) | CO2 * gigagram / a | 2 | -2.2E-16 PRIMAP-hist_v2.4.2_final | HISTCR | PRY | PFCS (AR4GWP100) | CO2 * gigagram / a | 2 | -2.2E-16 PRIMAP-hist_v2.4.2_final | HISTCR | PRY | PFCS (SARGWP100) | CO2 * gigagram / a | 2 | -2.2E-16 PRIMAP-hist_v2.4.2_final | HISTTP | ESP | CH4 | CH4 * gigagram / a | 1.B.1 | -0.894 PRIMAP-hist_v2.4.2_final | HISTTP | FIN | CO2 | CO2 * gigagram / a | 1.B.1 | -75 PRIMAP-hist_v2.4.2_final | HISTTP | FIN | KYOTOGHG (AR4GWP100) | CO2 * gigagram / a | 1.B.1 | -45.5 PRIMAP-hist_v2.4.2_final | HISTTP | FIN | KYOTOGHG (SARGWP100) | CO2 * gigagram / a | 1.B.1 | -50.2 PRIMAP-hist_v2.4.2_final | HISTTP | GBR | CH4 | CH4 * gigagram / a | 1.B.1 | -11.7 PRIMAP-hist_v2.4.2_final | HISTTP | MMR | CO2 | CO2 * gigagram / a | 2.B | -7.2E-08 PRIMAP-hist_v2.4.2_final | HISTTP | PRY | FGASES (AR4GWP100) | CO2 * gigagram / a | 2 | -2.2E-16 PRIMAP-hist_v2.4.2_final | HISTTP | PRY | FGASES (SARGWP100) | CO2 * gigagram / a | 2 | -2.2E-16 PRIMAP-hist_v2.4.2_final | HISTTP | PRY | PFCS (AR4GWP100) | CO2 * gigagram / a | 2 | -2.2E-16 PRIMAP-hist_v2.4.2_final | HISTTP | PRY | PFCS (SARGWP100) | CO2 * gigagram / a | 2 | -2.2E-16


in file Guetschow-et-al-2023a-PRIMAP-hist_v2.4.2_final_no_rounding_09-Mar-2023.csv

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

source | scenario (PRIMAP-hist) | area (ISO3) | entity | unit | category (IPCC2006_PRIMAP) | Min Value -- | -- | -- | -- | -- | -- | -- PRIMAP-hist_v2.4.2_final_nr | HISTCR | ESP | CH4 | CH4 * gigagram / a | 1.B.1 | -                        1 PRIMAP-hist_v2.4.2_final_nr | HISTCR | ESP | KYOTOGHG (AR4GWP100) | CO2 * gigagram / a | 1.B.1 | -                      16 PRIMAP-hist_v2.4.2_final_nr | HISTCR | ESP | KYOTOGHG (SARGWP100) | CO2 * gigagram / a | 1.B.1 | -                      13 PRIMAP-hist_v2.4.2_final_nr | HISTCR | MMR | CO2 | CO2 * gigagram / a | 2.B | -                        0 PRIMAP-hist_v2.4.2_final_nr | HISTCR | PRY | FGASES (AR4GWP100) | CO2 * gigagram / a | 2 | -                        0 PRIMAP-hist_v2.4.2_final_nr | HISTCR | PRY | FGASES (SARGWP100) | CO2 * gigagram / a | 2 | -                        0 PRIMAP-hist_v2.4.2_final_nr | HISTCR | PRY | PFCS (AR4GWP100) | CO2 * gigagram / a | 2 | -                        0 PRIMAP-hist_v2.4.2_final_nr | HISTCR | PRY | PFCS (SARGWP100) | CO2 * gigagram / a | 2 | -                        0 PRIMAP-hist_v2.4.2_final_nr | HISTTP | ESP | CH4 | CH4 * gigagram / a | 1.B.1 | -                        1 PRIMAP-hist_v2.4.2_final_nr | HISTTP | FIN | CO2 | CO2 * gigagram / a | 1.B.1 | -                      75 PRIMAP-hist_v2.4.2_final_nr | HISTTP | FIN | KYOTOGHG (AR4GWP100) | CO2 * gigagram / a | 1.B.1 | -                      45 PRIMAP-hist_v2.4.2_final_nr | HISTTP | FIN | KYOTOGHG (SARGWP100) | CO2 * gigagram / a | 1.B.1 | -                      50 PRIMAP-hist_v2.4.2_final_nr | HISTTP | GBR | CH4 | CH4 * gigagram / a | 1.B.1 | -                      12 PRIMAP-hist_v2.4.2_final_nr | HISTTP | MMR | CO2 | CO2 * gigagram / a | 2.B | -                        0 PRIMAP-hist_v2.4.2_final_nr | HISTTP | PRY | FGASES (AR4GWP100) | CO2 * gigagram / a | 2 | -                        0 PRIMAP-hist_v2.4.2_final_nr | HISTTP | PRY | FGASES (SARGWP100) | CO2 * gigagram / a | 2 | -                        0 PRIMAP-hist_v2.4.2_final_nr | HISTTP | PRY | PFCS (AR4GWP100) | CO2 * gigagram / a | 2 | -                        0 PRIMAP-hist_v2.4.2_final_nr | HISTTP | PRY | PFCS (SARGWP100) | CO2 * gigagram / a | 2 | -                        0

mikapfl commented 1 year ago

I looked into one of them, FIN 1.B.1 CO2 emissions, and it looks like there the HISTTP sources are causing these negative emissions (also, they fluctuate wildly, which is a bit funny for Fugitive CO2 emissions from Solid Fuels) final_fin_1b1

JGuetschow commented 1 year ago

Thanks for spotting and reporting. What I have found so far is that the negative values << 0 in 1.B.1 come from EDGAR data. I will try to find out if there is a good reason for the negative emissions in EDGAR (can't think of one, but better check before just capping the data at 0).

The very small values do not come from EDGAR data but are probably due to some numerical uncertainty. I have to check the code in detail and fix the issue. I assume that it's from fixing trends such that they do not create negative values but end at 0. If the parameters have some numerical error the time series might not end up exactly at 0.

I will also add a check for negative values to my quality control scripts.

JGuetschow commented 9 months ago

The issue has been resolved now by fixing extrapolation algorithms and removing negative values in EDGAR data.

JGuetschow commented 9 months ago

A final comment: in the CRF reporting tables there are optiona to report captured CH4 and CO2 in the fugitive emissions categories. However, as far as I understand in these categories only emissions from the categories can be reported as captured, so there can't be net-negative emissions.

rich-wood commented 9 months ago

Nice work. Thanks for all your efforts and explanations.