pik-piam / remind2

The remind2 package contains the REMIND-specific routines for data and model output manipulation.
0 stars 40 forks source link

Fix emissions reporting #530

Closed mellamoSimon closed 6 months ago

mellamoSimon commented 7 months ago

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

mellamoSimon commented 7 months ago

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 commented 7 months ago

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

fschreyer commented 7 months ago

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 commented 6 months ago

Please check and merge https://github.com/mellamoSimon/remind2/pull/2

mellamoSimon commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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

0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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 https://github.com/pik-piam/remind2/issues/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 commented 6 months ago

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