From 567e4551b7dd80fc690c6cc46a28f3242b123610 Mon Sep 17 00:00:00 2001 From: Edward Byers Date: Tue, 8 Mar 2022 10:30:59 +0100 Subject: [PATCH 1/4] Update emissions.py Added CO2-eq notation as this is currently used in our AR6 and other variable templates --- iam_units/emissions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iam_units/emissions.py b/iam_units/emissions.py index 78872cd..53d4dfd 100644 --- a/iam_units/emissions.py +++ b/iam_units/emissions.py @@ -110,7 +110,7 @@ # Sets of symbols that refer to the same species and are interchangeable. EQUIV = [ - set(["CO2", "CO2_eq", "CO2e", "CO2eq", "C", "Ce"]), + set(["CO2", "CO2_eq", "CO2e", "CO2eq", "CO2-eq", "C", "Ce"]), ] # Regular expression for one *SPECIES* in a pint-compatible unit string. From 35f975a0d593f3768f46ac1ec743df5b247f47de Mon Sep 17 00:00:00 2001 From: Paul Natsuo Kishimoto Date: Tue, 8 Mar 2022 11:24:20 +0100 Subject: [PATCH 2/4] Apply black 22.1 --- iam_units/update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iam_units/update.py b/iam_units/update.py index 9285714..a71c6fc 100644 --- a/iam_units/update.py +++ b/iam_units/update.py @@ -43,7 +43,7 @@ # - Preceded by a space or '-' character. # - Followed by a space, '-', '/', end-of-string, or non-word (\w) character. # The latter avoids matching only the 'C' within 'CH4'. -_EMI_CODE = fr"""{_EMI_HEADER} +_EMI_CODE = rf"""{_EMI_HEADER} import re GWP_VERSION = '{gwp.__version__}' From 2d7fee5c9b7acb58e0c612450929502bc591691a Mon Sep 17 00:00:00 2001 From: Edward Byers Date: Tue, 8 Mar 2022 12:11:27 +0100 Subject: [PATCH 3/4] Edit _EMI_EQUIV for CO2-eq --- iam_units/update.py | 1 + 1 file changed, 1 insertion(+) diff --git a/iam_units/update.py b/iam_units/update.py index a71c6fc..e920071 100644 --- a/iam_units/update.py +++ b/iam_units/update.py @@ -84,6 +84,7 @@ "CO2_eq": None, "CO2e": None, "CO2eq": None, + "CO2-eq": None, "C": "44. / 12 * ", "Ce": "44. / 12 * ", } From 7fe1feb812d17409877df3ac4428241c85d638e8 Mon Sep 17 00:00:00 2001 From: Edward Byers Date: Tue, 8 Mar 2022 12:12:15 +0100 Subject: [PATCH 4/4] Remove CO2-eq --- iam_units/emissions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iam_units/emissions.py b/iam_units/emissions.py index 53d4dfd..78872cd 100644 --- a/iam_units/emissions.py +++ b/iam_units/emissions.py @@ -110,7 +110,7 @@ # Sets of symbols that refer to the same species and are interchangeable. EQUIV = [ - set(["CO2", "CO2_eq", "CO2e", "CO2eq", "CO2-eq", "C", "Ce"]), + set(["CO2", "CO2_eq", "CO2e", "CO2eq", "C", "Ce"]), ] # Regular expression for one *SPECIES* in a pint-compatible unit string.