Skip to content

Conversation

@lecfab
Copy link
Contributor

@lecfab lecfab commented Jan 5, 2026

Purpose of this PR

Add the following reporting for Gross and Cumulated CO2 emissions (and use it for more detailed cs2 charts):

+ Emi|CO2|Cumulated|Energy|Demand (Mt CO2)
+ Emi|CO2|Cumulated|Energy|Supply (Mt CO2)
+ Emi|CO2|Cumulated|Gross (Mt CO2)
+ Emi|CO2|Cumulated|Gross|Energy (Mt CO2)
+ Emi|CO2|Cumulated|Gross|Energy|Demand (Mt CO2)
+ Emi|CO2|Cumulated|Gross|Energy|Demand|Buildings (Mt CO2)
+ Emi|CO2|Cumulated|Gross|Energy|Demand|Transport (Mt CO2)
+ Emi|CO2|Cumulated|Gross|Energy|Supply (Mt CO2)
+ Emi|CO2|Cumulated|Gross|Industrial Processes (Mt CO2)
+ Emi|CO2|Gross|Industrial Processes (Mt CO2/yr)

Add the following summations:

Emi|CO2 = |CDR + |Gross
Emi|CO2|Gross = |Energy + |Industrial Processes + |Waste
  • I will push the make build after integrating reviewers' comments

Checklist:

I checked the tests when running buildLibrary and made sure that my changes

  • do not create new complaints about summation checks.
  • do not create new complaints about missing variables that are expected in the piamInterfaces package. (If needed, adjust piamInterfaces mappings based on the README.md. In case of complaints unrelated to your changes that you are unable to fix, please open an issue in piamInterfaces.)

@lecfab lecfab requested review from fbenke-pik and fschreyer January 6, 2026 16:27
@fbenke-pik
Copy link
Contributor

fbenke-pik commented Jan 7, 2026

Did you test that you did not introduce any summation errors? You should run remind2::convGDX2MIF on some representative gdxes and make sure the output yields "All Summation Checks were fine"

Copy link
Contributor

@fschreyer fschreyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no summation errors are introduced, I am fine with it.

setNames(
out[, , "Emi|CO2|Gross|Energy and Industrial Processes (Mt CO2/yr)"]
- out[, , "Emi|CO2|Gross|+|Energy (Mt CO2/yr)"],
"Emi|CO2|Gross|+|Industrial Processes (Mt CO2/yr)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't gross emissions = net emissions for industrial processes? We only have cement calcination emissions here which are purely fossil and chemical feedstock processing emissions which cannot be captured. I don't see how there can be negative emissions.

Although maybe in the future...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible that emi|gross|ip = emi|ip, although I'm not sure because there is also a variable "Emi|CO2|Industrial Processes|CDR Sector|+|OAE (Mt CO2/yr)".

In any case, I find it clearer if there is an intuitive summation of Emi|CO2|Gross components rather than having to guess that emi|ip is probably gross already (this type of guess is not obvious as a non-emission expert). What do you think?

+ out[, , "Emi|CO2|CDR|+|Synthetic Fuels CCS (Mt CO2/yr)"]
+ out[, , "Emi|CO2|CDR|+|Materials (Mt CO2/yr)"],
"Emi|CO2|CDR (Mt CO2/yr)"
"Emi|CO2|+++|CDR (Mt CO2/yr)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And Emi|CO2|+++|Gross + Emi|CO2|+++|CDR actually always sum up to Emi|CO2? I vaguely remember there was at some point a reason why we didn't put the summation pluses here.

Generally, ofc good to have.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks, didnt think of that. Could it have been that plastics used to create a delay between when they account for CDR and when they are burnt and emit?
I'll check how bad the summation is currently.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correction: this code snippet should ensure the summation?

    # total gross emissions (CDR and Gross should add up to net emissions)
    setNames(
      out[, , "Emi|CO2 (Mt CO2/yr)"]
      - out[, , "Emi|CO2|+++|CDR (Mt CO2/yr)"],
      "Emi|CO2|+++|Gross (Mt CO2/yr)"
    )

showLinePlots(data, "Res|Extraction|Uranium [Energy]")
showLinePlots(data, "Res|Extraction|Uranium")
```
Note: multiply EJ by 7.16 to obtain kt of Uranium
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that an unfixed bug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two line plots were exactly similar except for the y-scale.
I thought it made more sense to keep only one chart, and indicate the scaling factor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants