Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix emissions reporting #530

Merged
merged 15 commits into from
Feb 27, 2024
Merged

Conversation

mellamoSimon
Copy link
Contributor

@mellamoSimon mellamoSimon commented Feb 7, 2024

Fix errors in summations in emissions reporting from feedstock accounting. Some mismatches remain but they will be addressed in other PR (see below).

Copy link
Contributor

@amerfort amerfort left a comment

Choose a reason for hiding this comment

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

Let's discuss next week

setNames(out[, , "Emi|CO2|+|Energy (Mt CO2/yr)"]
- out[, , "Emi|CO2|CDR|Industry CCS|Synthetic Fuels (Mt CO2/yr)"]
- out[, , "Emi|CO2|CDR|BECCS (Mt CO2/yr)"]
- out[, , "Emi|CO2|CDR|Materials|+|Plastics (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.

@strefler are these energy emissions? I would rather treat Emi|CO2|CDR|Materials|+|Plastics the same way as DACCS or EW. So they should probably be neither included in Emi|CO2|+|Energy nor be deduced from the respective Gross variable here. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is a general issue we should discuss in the IAMC emissions group with everybody, that is, accounting of long-term CCU. I tend to be in favor of the convention that carbon stored in materials should be deduced from industry / energy emissions because that is how the IPCC emissions accounting defines energy-related emissions (i.e. only emissions from combustion). But I am happy to discuss further.

# and it is different to Emi|GHG|+++|Waste
if (!is.null(vm_plasticsCarbon)){
out <- mbind(out,
setNames(out[, , "Emi|CO2|Energy|+|Waste (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.

I'm not an accounting expert, so I have to ask: The UNFCCC inventories put waste in a separate category, so it is not part of the Energy emissions. But maybe this is the way we agreed on accounting for waste emissions in the Navigate-template/IAMC community. Or is that the emissions of waste used as energy feedstock?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is a very important point! indeed there's another category where we put non-CO2 emissions from waste management (CH4 emissions). But bringing those 2 together via coupling with waste-to-power capacities is a larger task that I think should not be part of this PR.


##(ecxl. negative emissions from BECCS and carbon storage of carbon-neutral synthetic fuels)
## note Emi|CO2|CDR|... variables are negative. That's why we substract them to get from net to gross emissions.
if (!is.null(vm_plasticsCarbon)){
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be possible to avoid duplicate code from these if-clauses and simply set all plastics related variables to zero if vm_plasticsCarbon doesn't exist but still add them up? Or would that cause problems somewhere else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe, but I wouldn't include it in this PR. Just trying to make it work, we can make it nicer later.


# total gross energy emissions
setNames(out[, , "Emi|GHG|+++|Energy (Mt CO2eq/yr)"]
- out[, , "Emi|CO2|CDR|Industry CCS|Synthetic Fuels (Mt CO2/yr)"]
- out[, , "Emi|CO2|CDR|BECCS (Mt CO2/yr)"],
- out[, , "Emi|CO2|CDR|BECCS (Mt CO2/yr)"]
- out[, , "Emi|CO2|CDR|Materials|+|Plastics (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.

same as above. Might not be Energy emissions

@mellamoSimon mellamoSimon marked this pull request as ready for review February 12, 2024 18:34
@mellamoSimon
Copy link
Contributor Author

hi,
the changes were successful in getting rid of most of the inconsistencies. The remaining differences do not seem to step from this part of the code. I suggest merging this to get the reporting back to life and then opening an issue to improve the reporting. I'm running buildLibrary now.
This is a summary of the summation checks after the modifications in this PR:

### Analyzing provided data.
# Use extractVariableGroups to check if summation groups add up.
# Analyzing results of model REMIND

variable groups found in extractVariableGroups                                

Carbon Management|Carbon Capture >                                            
   + Carbon Management|Carbon Capture|+|Biomass|Pe2Se                      
   + Carbon Management|Carbon Capture|+|Fossil|Pe2Se                       
   + Carbon Management|Carbon Capture|+|Industry Energy                    
   + Carbon Management|Carbon Capture|+|Industry Process                   
   + Carbon Management|Carbon Capture|+|DAC                                
Relative difference between 0.0000000311% and 28.8%, absolute difference up to 0.395 Mt CO2/yr.

Carbon Management|Storage >                                                   
   + Carbon Management|Storage|+|Biomass|Pe2Se                             
   + Carbon Management|Storage|+|Fossil|Pe2Se                              
   + Carbon Management|Storage|+|Industry Energy                           
   + Carbon Management|Storage|+|Industry Process                          
   + Carbon Management|Storage|+|DAC                                       
Relative difference between 0.00000059% and 28.8%, absolute difference up to 0.339 Mt CO2/yr.

Emi|CO2|+|Energy >                                                            
   + Emi|CO2|Energy|+|Supply                                               
   + Emi|CO2|Energy|+|Demand                                               
   + Emi|CO2|Energy|+|Waste                                                
Relative difference between 0.000000016% and 0.00415%, absolute difference up to 0.301 Mt CO2/yr.

Emi|CO2|Gross|Energy >                                                        
   + Emi|CO2|Gross|Energy|+|Supply                                         
   + Emi|CO2|Gross|Energy|+|Demand                                         
   + Emi|CO2|Gross|Energy|+|Waste                                          
Relative difference between 0.0000000159% and 0.00414%, absolute difference up to 0.301 Mt CO2/yr.

Emi|GHG|++|ESR <>                                                             
   + Emi|GHG|ESR|+|Industry                                                
   + Emi|GHG|ESR|+|Transport                                               
   + Emi|GHG|ESR|+|Buildings                                               
   + Emi|GHG|ESR|+|Agriculture                                             
   + Emi|GHG|ESR|+|Energy Waste                                            
   + Emi|GHG|ESR|+|Waste                                                   
Relative difference between -1.4% and 0.0361%, absolute difference up to 31.8 Mt CO2eq/yr.

Emi|GHG|++|ETS >                                                              
   + Emi|GHG|ETS|+|Energy Supply                                           
   + Emi|GHG|ETS|+|Industry                                                
   + Emi|GHG|ETS|+|Transport                                               
   + Emi|GHG|ETS|+|non-BECCS CDR                                           
   + Emi|GHG|ETS|+|Extraction                                              
   + Emi|GHG|ETS|+|Energy Waste                                            
   + Emi|GHG|ETS|+|Waste                                                   
Relative difference between 0.0000000194% and 0.00729%, absolute difference up to 0.301 Mt CO2eq/yr.

Emi|GHG|++|Outside ETS and ESR <>                                             
   + Emi|GHG|Outside ETS and ESR|+|Transport                               
   + Emi|GHG|Outside ETS and ESR|+|Land-Use Change                         
   + Emi|GHG|Outside ETS and ESR|+|F-Gases                                 
Relative difference between -15519% and 14.8%, absolute difference up to 31.8 Mt CO2eq/yr.

Emi|GHG|+++|Energy >                                                          
   + Emi|GHG|Energy|+|Supply                                               
   + Emi|GHG|Energy|+|Demand                                               
   + Emi|GHG|Energy|+|Waste                                                
Relative difference between 0.0000000152% and 0.00375%, absolute difference up to 0.301 Mt CO2eq/yr.

Emi|GHG|Gross|Energy >                                                        
   + Emi|GHG|Gross|Energy|+|Supply                                         
   + Emi|GHG|Gross|Energy|+|Demand                                         
   + Emi|GHG|Gross|Energy|+|Waste                                          
Relative difference between 0.0000000152% and 0.00374%, absolute difference up to 0.301 Mt CO2eq/yr.

# Summary of summation group checks for model REMIND:
# 9 equations are not satisfied but should according to extractVariableGroups.
# All deviations can be found in the returned object.
# To get more detailed information on 'Carbon Management|Carbon Capture', run piamInterfaces::variableInfo('Carbon Management|Carbon Capture').

# As generatePlots=FALSE, no plot comparison was produced.

The filtered data contains 84 variables.

### Analyzing provided data.
# Use C:/Users/simonlei/Nextcloud/Documents/Models/local-remind2/remind2/inst/extdata/additional_summation_checks.csv to check if summation groups add up.
# Analyzing results of model REMIND

variable groups found in additional_summation_checks.csv                      

Emi|CO2 >                                                                     
   + Emi|CO2|Gross|Energy|Supply|+|Electricity                             
   + Emi|CO2|Gross|Energy|Supply|Non-electric                              
   + Emi|CO2|Energy|Demand|+|Transport                                     
   + Emi|CO2|Gross|Energy|Demand|+|Industry                                
   + Emi|CO2|Energy|Demand|+|Buildings                                     
   + Emi|CO2|Energy|Demand|+|CDR                                           
   + Emi|CO2|+|Land-Use Change                                             
   + Emi|CO2|+|Industrial Processes                                        
   + Emi|CO2|CDR|BECCS                                                     
   + Emi|CO2|CDR|Industry CCS|Synthetic Fuels                              
   + Emi|CO2|CDR|DACCS                                                     
   + Emi|CO2|CDR|EW                                                        
   + Emi|CO2|Gross|Energy|+|Waste                                          
   + Emi|CO2|CDR|Materials|+|Plastics                                      
Relative difference between 0.0000000133% and 0.00388%, absolute difference up to 0.301 Mt CO2/yr.

Emi|CO2|Cumulated >                                                           
   + Emi|CO2|Cumulated|Land-Use Change                                     
   + Emi|CO2|Cumulated|Industrial Processes                                
   + Emi|CO2|Cumulated|Energy|Demand|Transport                             
   + Emi|CO2|Cumulated|Gross|Energy|Demand|Industry                        
   + Emi|CO2|Cumulated|Energy|Demand|Buildings                             
   + Emi|CO2|Cumulated|Energy|Demand|CDR                                   
   + Emi|CO2|Cumulated|Gross|Energy|Supply|Non-electric                    
   + Emi|CO2|Cumulated|Gross|Energy|Supply|Electricity                     
   + Emi|CO2|Cumulated|Gross|Energy|Waste                                  
   + Emi|CO2|Cumulated|CDR|BECCS                                           
   + Emi|CO2|Cumulated|CDR|Industry CCS|Synthetic Fuels                    
   + Emi|CO2|Cumulated|CDR|DACCS                                           
   + Emi|CO2|Cumulated|CDR|EW                                              
   + Emi|CO2|Cumulated|CDR|Materials|Plastics                              
Relative difference between 0.0000000126% and 0.000767%, absolute difference up to 4.38 Mt CO2.

Emi|GHG >                                                                     
   + Emi|GHG|Gross|Energy|Supply|Electricity                               
   + Emi|GHG|Gross|Energy|Supply|Non-electric                              
   + Emi|GHG|Energy|Demand|+|Buildings                                     
   + Emi|GHG|Gross|Energy|Demand|+|Industry                                
   + Emi|GHG|Energy|Demand|+|Transport                                     
   + Emi|GHG|Energy|Demand|+|CDR                                           
   + Emi|GHG|Gross|Energy|+|Waste                                          
   + Emi|GHG|+++|Industrial Processes                                      
   + Emi|GHG|+++|Waste                                                     
   + Emi|GHG|+++|Agriculture                                               
   + Emi|GHG|+++|Land-Use Change                                           
   + Emi|CO2|CDR|BECCS                                                     
   + Emi|CO2|CDR|DACCS                                                     
   + Emi|CO2|CDR|Industry CCS|Synthetic Fuels                              
   + Emi|CO2|CDR|EW                                                        
   + Emi|CO2|CDR|Materials|+|Plastics                                      
Relative difference between 0.0000000105% and 0.00239%, absolute difference up to 0.301 Mt CO2eq/yr.

# Summary of summation group checks for model REMIND:
# 3 equations are not satisfied but should according to additional_summation_checks.csv.
# All deviations can be found in the returned object.
# To get more detailed information on 'Emi|CO2', run piamInterfaces::variableInfo('Emi|CO2').

@orichters
Copy link
Contributor

I still suspect the CDR refactoring is responsible for them, see https://mattermost.pik-potsdam.de/rd3/channels/remind/s44bap551tdcifktignkm4nrpc

@fschreyer
Copy link
Contributor

fschreyer commented Feb 16, 2024

I still suspect the CDR refactoring is responsible for them, see https://mattermost.pik-potsdam.de/rd3/channels/remind/s44bap551tdcifktignkm4nrpc

It is responsible at least for the Emi|CO2|Energy etc. and the Carbon Management|Carbon Capture etc. summations. Accounting of captured CO2 from gas use in DAC (really small) seems to be an issue here (difference between vm_ccs_cdr and vm_emiCdrTeDetail in REMIND) . But as far as I understand @katarkow is aware and working on it.

Regarding the two emissions market failures with up to 31 MtCO2/yr, I think they have been there for a longer time and I will take care of them once I find the time. Afterwards, when everything is solved we should make compliance with summation checks mandatory in buildlibrary(), I think.

@orichters
Copy link
Contributor

Please check and merge mellamoSimon#2

@mellamoSimon
Copy link
Contributor Author

I still suspect the CDR refactoring is responsible for them, see https://mattermost.pik-potsdam.de/rd3/channels/remind/s44bap551tdcifktignkm4nrpc

since that is a separate problem, I think it's better if I first merge this and then that can be fixed in a separate PR. What do you think?

@katarkow
Copy link
Contributor

I still suspect the CDR refactoring is responsible for them, see https://mattermost.pik-potsdam.de/rd3/channels/remind/s44bap551tdcifktignkm4nrpc

since that is a separate problem, I think it's better if I first merge this and then that can be fixed in a separate PR. What do you think?

I think it's a good idea. I'm working on the CDR-related PR :)

@robertpietzcker
Copy link
Contributor

robertpietzcker commented Feb 23, 2024

ok, if I see it correctly, all the direct issues with this PR have been solved, and both the ETS/ESR and the CDR issues will be solved in follow-up PRs, correct?
So then cpuld someone of the three reviewers please approve this PR? @fschreyer @fbenke-pik @0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q

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.

Looks fine. Thanks!

Could you maybe post the remaining summation failures that you now get for the emissions variables here, before you merge so we know what is still open.

And also I assume you checked the test for #535 passes now.

@0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q
Copy link
Member

Could you maybe post the remaining summation failures that you now get for the emissions variables here, before you merge so we know what is still open.

### Analyzing provided data.										### Analyzing provided data.
# Use extractVariableGroups to check if summation groups add up.					# Use extractVariableGroups to check if summation groups add up.
# Analyzing results of model REMIND									# Analyzing results of model REMIND

variable groups found in extractVariableGroups                                				variable groups found in extractVariableGroups                                

Carbon Management|Carbon Capture >                                            				Carbon Management|Carbon Capture >                                            
   + Carbon Management|Carbon Capture|+|Biomass|Pe2Se                      				   + Carbon Management|Carbon Capture|+|Biomass|Pe2Se                      
   + Carbon Management|Carbon Capture|+|Fossil|Pe2Se                       				   + Carbon Management|Carbon Capture|+|Fossil|Pe2Se                       
   + Carbon Management|Carbon Capture|+|Industry Energy                    				   + Carbon Management|Carbon Capture|+|Industry Energy                    
   + Carbon Management|Carbon Capture|+|Industry Process                   				   + Carbon Management|Carbon Capture|+|Industry Process                   
   + Carbon Management|Carbon Capture|+|DAC                                				   + Carbon Management|Carbon Capture|+|DAC                                
Relative difference between 0.000151% and 28.8%, absolute difference up to 0.774 Mt CO2/yr.		Relative difference between 0.000151% and 28.8%, absolute difference up to 0.774 Mt CO2/yr.

Carbon Management|Materials|+|Plastics 1 <>                                   			   <
   + Carbon Management|Materials|Plastics|++|Incineration                  			   <
   + Carbon Management|Materials|Plastics|++|Other destination             			   <
Relative difference between -63.2% and 100%, absolute difference up to 906 Mt CO2/yr.		   <
												   <
Carbon Management|Storage >                                                   				Carbon Management|Storage >                                                   
   + Carbon Management|Storage|+|Biomass|Pe2Se                             				   + Carbon Management|Storage|+|Biomass|Pe2Se                             
   + Carbon Management|Storage|+|Fossil|Pe2Se                              				   + Carbon Management|Storage|+|Fossil|Pe2Se                              
   + Carbon Management|Storage|+|Industry Energy                           				   + Carbon Management|Storage|+|Industry Energy                           
   + Carbon Management|Storage|+|Industry Process                          				   + Carbon Management|Storage|+|Industry Process                          
   + Carbon Management|Storage|+|DAC                                       				   + Carbon Management|Storage|+|DAC                                       
Relative difference between 0.000153% and 28.8%, absolute difference up to 0.69 Mt CO2/yr.		Relative difference between 0.000153% and 28.8%, absolute difference up to 0.69 Mt CO2/yr.

Emi|CO2|+|Energy >                                                            				Emi|CO2|+|Energy >                                                            
   + Emi|CO2|Energy|+|Supply                                               				   + Emi|CO2|Energy|+|Supply                                               
   + Emi|CO2|Energy|+|Demand                                               				   + Emi|CO2|Energy|+|Demand                                               
   + Emi|CO2|Energy|+|Waste                                                				   + Emi|CO2|Energy|+|Waste                                                
Relative difference between 0.0000000179% and 0.00525%, absolute difference up to 0.113 Mt CO2/y	Relative difference between 0.0000000179% and 0.00525%, absolute difference up to 0.113 Mt CO2/y

Emi|CO2|Gross|Energy >                                                        				Emi|CO2|Gross|Energy >                                                        
   + Emi|CO2|Gross|Energy|+|Supply                                         				   + Emi|CO2|Gross|Energy|+|Supply                                         
   + Emi|CO2|Gross|Energy|+|Demand                                         				   + Emi|CO2|Gross|Energy|+|Demand                                         
Relative difference between 0.463% and 70.8%, absolute difference up to 1601 Mt CO2/yr.		   |	   + Emi|CO2|Gross|Energy|+|Waste                                          
												   >	Relative difference between 0.0000000166% and 0.00525%, absolute difference up to 0.113 Mt CO2/y

Emi|GHG|+++|Energy >                                                          				Emi|GHG|+++|Energy >                                                          
   + Emi|GHG|Energy|+|Supply                                               				   + Emi|GHG|Energy|+|Supply                                               
   + Emi|GHG|Energy|+|Demand                                               				   + Emi|GHG|Energy|+|Demand                                               
Relative difference between -21200% and 2394%, absolute difference up to 1601 Mt CO2eq/yr.	   |	   + Emi|GHG|Energy|+|Waste                                                
												   >	Relative difference between 0.000000017% and 0.00444%, absolute difference up to 0.113 Mt CO2eq/

Emi|GHG|++|ESR <>                                                             				Emi|GHG|++|ESR <>                                                             
   + Emi|GHG|ESR|+|Industry                                                				   + Emi|GHG|ESR|+|Industry                                                
   + Emi|GHG|ESR|+|Transport                                               				   + Emi|GHG|ESR|+|Transport                                               
   + Emi|GHG|ESR|+|Buildings                                               				   + Emi|GHG|ESR|+|Buildings                                               
   + Emi|GHG|ESR|+|Agriculture                                             				   + Emi|GHG|ESR|+|Agriculture                                             
												   >	   + Emi|GHG|ESR|+|Energy Waste                                            
   + Emi|GHG|ESR|+|Waste                                                   				   + Emi|GHG|ESR|+|Waste                                                   
Relative difference between -3.12% and 0.0862%, absolute difference up to 35.6 Mt CO2eq/yr.		Relative difference between -3.12% and 0.0862%, absolute difference up to 35.6 Mt CO2eq/yr.

Emi|GHG|++|ETS >                                                              				Emi|GHG|++|ETS >                                                              
   + Emi|GHG|ETS|+|Energy Supply                                           				   + Emi|GHG|ETS|+|Energy Supply                                           
   + Emi|GHG|ETS|+|Industry                                                				   + Emi|GHG|ETS|+|Industry                                                
   + Emi|GHG|ETS|+|Transport                                               				   + Emi|GHG|ETS|+|Transport                                               
   + Emi|GHG|ETS|+|non-BECCS CDR                                           				   + Emi|GHG|ETS|+|non-BECCS CDR                                           
   + Emi|GHG|ETS|+|Extraction                                              				   + Emi|GHG|ETS|+|Extraction                                              
												   >	   + Emi|GHG|ETS|+|Energy Waste                                            
   + Emi|GHG|ETS|+|Waste                                                   				   + Emi|GHG|ETS|+|Waste                                                   
Relative difference between -5029% and 5674%, absolute difference up to 1601 Mt CO2eq/yr.	   |	Relative difference between 0.0000000106% and 0.00788%, absolute difference up to 0.113 Mt CO2eq

Emi|GHG|++|Outside ETS and ESR <>                                             				Emi|GHG|++|Outside ETS and ESR <>                                             
   + Emi|GHG|Outside ETS and ESR|+|Transport                               				   + Emi|GHG|Outside ETS and ESR|+|Transport                               
   + Emi|GHG|Outside ETS and ESR|+|Land-Use Change                         				   + Emi|GHG|Outside ETS and ESR|+|Land-Use Change                         
   + Emi|GHG|Outside ETS and ESR|+|F-Gases                                 				   + Emi|GHG|Outside ETS and ESR|+|F-Gases                                 
Relative difference between -215% and 75.6%, absolute difference up to 35.6 Mt CO2eq/yr.		Relative difference between -215% and 75.6%, absolute difference up to 35.6 Mt CO2eq/yr.

Emi|GHG|Gross|Energy >                                                        				Emi|GHG|Gross|Energy >                                                        
   + Emi|GHG|Gross|Energy|+|Supply                                         				   + Emi|GHG|Gross|Energy|+|Supply                                         
   + Emi|GHG|Gross|Energy|+|Demand                                         				   + Emi|GHG|Gross|Energy|+|Demand                                         
Relative difference between 0.32% and 69.4%, absolute difference up to 1601 Mt CO2eq/yr.	   |	   + Emi|GHG|Gross|Energy|+|Waste                                          
												   >	Relative difference between 0.0000000159% and 0.00444%, absolute difference up to 0.113 Mt CO2eq

# Summary of summation group checks for model REMIND:							# Summary of summation group checks for model REMIND:
# 10 equations are not satisfied but should according to extractVariableGroups.			   |	# 9 equations are not satisfied but should according to extractVariableGroups.
# All deviations can be found in the returned object.							# All deviations can be found in the returned object.
# To get more detailed information on 'Carbon Management|Carbon Capture', run piamInterfaces::va	# To get more detailed information on 'Carbon Management|Carbon Capture', run piamInterfaces::va

# As generatePlots=FALSE, no plot comparison was produced.						# As generatePlots=FALSE, no plot comparison was produced.
### Analyzing provided data.										### Analyzing provided data.
# Use /p/projects/rd3mod/R/renv_paths_root/cache_1.25/v5/R-4.1/x86_64-pc-linux-gnu/remind2/1.135   |	# Use /p/projects/rd3mod/R/renv_paths_root/cache_1.25/v5/R-4.1/x86_64-pc-linux-gnu/remind2/1.135
# Analyzing results of model REMIND									# Analyzing results of model REMIND

variable groups found in additional_summation_checks.csv                      				variable groups found in additional_summation_checks.csv                      

Emi|CO2 >                                                                     				Emi|CO2 >                                                                     
   + Emi|CO2|Gross|Energy|Supply|+|Electricity                             				   + Emi|CO2|Gross|Energy|Supply|+|Electricity                             
   + Emi|CO2|Gross|Energy|Supply|Non-electric                              				   + Emi|CO2|Gross|Energy|Supply|Non-electric                              
   + Emi|CO2|Energy|Demand|+|Transport                                     				   + Emi|CO2|Energy|Demand|+|Transport                                     
   + Emi|CO2|Gross|Energy|Demand|+|Industry                                				   + Emi|CO2|Gross|Energy|Demand|+|Industry                                
   + Emi|CO2|Energy|Demand|+|Buildings                                     				   + Emi|CO2|Energy|Demand|+|Buildings                                     
   + Emi|CO2|Energy|Demand|+|CDR                                           				   + Emi|CO2|Energy|Demand|+|CDR                                           
   + Emi|CO2|+|Land-Use Change                                             				   + Emi|CO2|+|Land-Use Change                                             
   + Emi|CO2|+|Industrial Processes                                        				   + Emi|CO2|+|Industrial Processes                                        
   + Emi|CO2|CDR|BECCS                                                     				   + Emi|CO2|CDR|BECCS                                                     
   + Emi|CO2|CDR|Industry CCS|Synthetic Fuels                              				   + Emi|CO2|CDR|Industry CCS|Synthetic Fuels                              
   + Emi|CO2|CDR|DACCS                                                     				   + Emi|CO2|CDR|DACCS                                                     
   + Emi|CO2|CDR|EW                                                        				   + Emi|CO2|CDR|EW                                                        
Relative difference between -5903% and 2200%, absolute difference up to 1601 Mt CO2/yr.		   |	   + Emi|CO2|Gross|Energy|+|Waste                                          
												   |	   + Emi|CO2|CDR|Materials|+|Plastics                                      
Emi|CO2|CDR <                                                                 			   |	Relative difference between 0.0000000175% and 0.00352%, absolute difference up to 0.113 Mt CO2/y
   + Emi|CO2|CDR|Land-Use Change                                           			   <
   + Emi|CO2|CDR|BECCS|Pe2Se                                               			   <
   + Emi|CO2|CDR|BECCS|Industry                                            			   <
   + Emi|CO2|CDR|Industry CCS|Synthetic Fuels                              			   <
   + Emi|CO2|CDR|DACCS                                                     			   <
   + Emi|CO2|CDR|EW                                                        			   <
Relative difference between 0.0157% and 100%, absolute difference up to 38.2 Mt CO2/yr.		   <

Emi|CO2|Cumulated >                                                           				Emi|CO2|Cumulated >                                                           
   + Emi|CO2|Cumulated|Land-Use Change                                     				   + Emi|CO2|Cumulated|Land-Use Change                                     
   + Emi|CO2|Cumulated|Industrial Processes                                				   + Emi|CO2|Cumulated|Industrial Processes                                
   + Emi|CO2|Cumulated|Energy|Demand|Transport                             				   + Emi|CO2|Cumulated|Energy|Demand|Transport                             
   + Emi|CO2|Cumulated|Gross|Energy|Demand|Industry                        				   + Emi|CO2|Cumulated|Gross|Energy|Demand|Industry                        
   + Emi|CO2|Cumulated|Energy|Demand|Buildings                             				   + Emi|CO2|Cumulated|Energy|Demand|Buildings                             
   + Emi|CO2|Cumulated|Energy|Demand|CDR                                   				   + Emi|CO2|Cumulated|Energy|Demand|CDR                                   
   + Emi|CO2|Cumulated|Gross|Energy|Supply|Non-electric                    				   + Emi|CO2|Cumulated|Gross|Energy|Supply|Non-electric                    
   + Emi|CO2|Cumulated|Gross|Energy|Supply|Electricity                     				   + Emi|CO2|Cumulated|Gross|Energy|Supply|Electricity                     
												   >	   + Emi|CO2|Cumulated|Gross|Energy|Waste                                  
   + Emi|CO2|Cumulated|CDR|BECCS                                           				   + Emi|CO2|Cumulated|CDR|BECCS                                           
   + Emi|CO2|Cumulated|CDR|Industry CCS|Synthetic Fuels                    				   + Emi|CO2|Cumulated|CDR|Industry CCS|Synthetic Fuels                    
   + Emi|CO2|Cumulated|CDR|DACCS                                           				   + Emi|CO2|Cumulated|CDR|DACCS                                           
   + Emi|CO2|Cumulated|CDR|EW                                              				   + Emi|CO2|Cumulated|CDR|EW                                              
Relative difference between 0.193% and 18.9%, absolute difference up to 177774 Mt CO2.		   |	   + Emi|CO2|Cumulated|CDR|Materials|Plastics                              
												   >	Relative difference between 0.00000168% and 0.000548%, absolute difference up to 1.12 Mt CO2.

Emi|GHG >                                                                     				Emi|GHG >                                                                     
   + Emi|GHG|Gross|Energy|Supply|Electricity                               				   + Emi|GHG|Gross|Energy|Supply|Electricity                               
   + Emi|GHG|Gross|Energy|Supply|Non-electric                              				   + Emi|GHG|Gross|Energy|Supply|Non-electric                              
   + Emi|GHG|Energy|Demand|+|Buildings                                     				   + Emi|GHG|Energy|Demand|+|Buildings                                     
   + Emi|GHG|Gross|Energy|Demand|+|Industry                                				   + Emi|GHG|Gross|Energy|Demand|+|Industry                                
   + Emi|GHG|Energy|Demand|+|Transport                                     				   + Emi|GHG|Energy|Demand|+|Transport                                     
   + Emi|GHG|Energy|Demand|+|CDR                                           				   + Emi|GHG|Energy|Demand|+|CDR                                           
												   >	   + Emi|GHG|Gross|Energy|+|Waste                                          
   + Emi|GHG|+++|Industrial Processes                                      				   + Emi|GHG|+++|Industrial Processes                                      
   + Emi|GHG|+++|Waste                                                     				   + Emi|GHG|+++|Waste                                                     
   + Emi|GHG|+++|Agriculture                                               				   + Emi|GHG|+++|Agriculture                                               
   + Emi|GHG|+++|Land-Use Change                                           				   + Emi|GHG|+++|Land-Use Change                                           
   + Emi|CO2|CDR|BECCS                                                     				   + Emi|CO2|CDR|BECCS                                                     
   + Emi|CO2|CDR|DACCS                                                     				   + Emi|CO2|CDR|DACCS                                                     
   + Emi|CO2|CDR|Industry CCS|Synthetic Fuels                              				   + Emi|CO2|CDR|Industry CCS|Synthetic Fuels                              
   + Emi|CO2|CDR|EW                                                        				   + Emi|CO2|CDR|EW                                                        
Relative difference between -817% and 4085%, absolute difference up to 1601 Mt CO2eq/yr.	   |	   + Emi|CO2|CDR|Materials|+|Plastics                                      
												   >	Relative difference between 0.000000012% and 0.00189%, absolute difference up to 0.113 Mt CO2eq/

# Summary of summation group checks for model REMIND:							# Summary of summation group checks for model REMIND:
# 4 equations are not satisfied but should according to additional_summation_checks.csv.	   |	# 3 equations are not satisfied but should according to additional_summation_checks.csv.
# All deviations can be found in the returned object.							# All deviations can be found in the returned object.
# To get more detailed information on 'Emi|CO2', run piamInterfaces::variableInfo('Emi|CO2').		# To get more detailed information on 'Emi|CO2', run piamInterfaces::variableInfo('Emi|CO2').

# As generatePlots=FALSE, no plot comparison was produced.						# As generatePlots=FALSE, no plot comparison was produced.

@mellamoSimon
Copy link
Contributor Author

thank you for the reviews! @0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q you sure you used the latest status of this branch for that? I get this differently:

Emi|GHG|Gross|Energy >                                                        
   + Emi|GHG|Gross|Energy|+|Supply                                         
   + Emi|GHG|Gross|Energy|+|Demand                                         
   + Emi|GHG|Gross|Energy|+|Waste                                          
Relative difference between 0.0000000152% and 0.00374%, absolute difference up to 0.301 Mt CO2eq/yr

@0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q
Copy link
Member

That is the diff of log_output.txt for SSP2EU-PkBudg1050-AMT_2024-02-17 with either v1.135.3 (left) and ea06fef (right).

@mellamoSimon
Copy link
Contributor Author

oh, yeah, sorry I was looking at the wrong side of the comparison. That's right then :)

And also I assume you checked the test for #535 passes now.

yup, I get [ FAIL 0 | WARN 0 | SKIP 0 | PASS 1 ] from testthat::test_file("tests/testthat/test-piamInterfaces-Ariadne.R")

@mellamoSimon
Copy link
Contributor Author

ok, if I see it correctly, all the direct issues with this PR have been solved, and both the ETS/ESR and the CDR issues will be solved in follow-up PRs, correct?

there's parallel work going on for fixing the remaining inconsistencies

@mellamoSimon mellamoSimon merged commit 9b01828 into pik-piam:master Feb 27, 2024
4 checks passed
@mellamoSimon mellamoSimon deleted the fix-reportEmi branch February 27, 2024 09:09
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.

Non-energy use missing from ariadne reporting
7 participants