From 972bcb67b6a1e9042b959628f3592f4f97af50a9 Mon Sep 17 00:00:00 2001 From: Katarzyna Kowalczyk Date: Fri, 1 Mar 2024 17:18:13 +0100 Subject: [PATCH 1/8] Report OAE --- R/reportEmi.R | 98 +++++++++++++++++-- R/reportFE.R | 2 +- inst/compareScenarios/cs_01_summary.Rmd | 3 + inst/compareScenarios/cs_03_emissions.Rmd | 4 + .../cs_09_carbon_management.Rmd | 1 - inst/extdata/additional_summation_checks.csv | 4 + 6 files changed, 101 insertions(+), 11 deletions(-) diff --git a/R/reportEmi.R b/R/reportEmi.R index 97706576..9af87052 100644 --- a/R/reportEmi.R +++ b/R/reportEmi.R @@ -172,10 +172,21 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, if (is.null(v33_emiEW)) { v33_emiEW <- new.magpie(getItems(vm_co2capture, "all_regi"), getItems(vm_co2capture, "ttot"), fill = 0) } + + v33_emiOAE <- new.magpie(getItems(vm_co2capture, "all_regi"), getItems(vm_co2capture, "ttot"), c("oae_ng", "oae_el"), fill = 0) + # variable used in the rest of the reporting - vm_emiCdrTeDetail <- mbind(v33_emiDAC, v33_emiEW) - vm_emiCdrTeDetail <- setNames(vm_emiCdrTeDetail, c("dac", "weathering")) + vm_emiCdrTeDetail <- mbind(v33_emiDAC, v33_emiEW, v33_emiOAE) + vm_emiCdrTeDetail <- setNames(vm_emiCdrTeDetail, c("dac", "weathering", "oae_ng", "oae_el")) } + + if (!"oae_ng" %in% getItems(vm_emiCdrTeDetail, dim = 3)) { + v33_emiOAE <- new.magpie(getItems(vm_emiCdrTeDetail, "all_regi"), getItems(vm_emiCdrTeDetail, "ttot"), c("oae_ng", "oae_el"), fill = 0) + + # variable used in the rest of the reporting + vm_emiCdrTeDetail <- mbind(vm_emiCdrTeDetail, v33_emiOAE) + } + # stored CO2 vm_co2CCS <- readGDX(gdx, "vm_co2CCS", field = "l", restore_zeros = F)[, t, ] # CO2 captured by industry sectors @@ -1078,12 +1089,20 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, } else { mselect(vm_emiTeMkt, all_enty = "co2") } + + s33_OAE_chem_decomposition <- readGDX(gdx, "s33_OAE_chem_decomposition", react = "silent") + if(is.null(s33_OAE_chem_decomposition)) { + s33_OAE_chem_decomposition <- 1 + } out <- mbind(out, setNames( # vm_emiTeMkt is variable in REMIND closest to energy co2 emissions (dimSums(sel_vm_emiTeMkt_co2, dim = 3) - # subtract non-BECCS CCU CO2 (i.e., non-CCS part of DAC (synfuels)) - - (1 - p_share_CCS) * (-vm_emiCdrTeDetail[, , "dac"]) + # subtract non-BECCS CCU CO2 (i.e., non-CCS part of DAC (synfuels) and CO2 from OAE calcination) + - (1 - p_share_CCS) * ( + - vm_emiCdrTeDetail[, , "dac"] + - s33_OAE_chem_decomposition * (vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"]) + ) # deduce co2 captured by industrial processes which is not stored but used for CCU (synfuels) # -> gets accounted in industrial process emissions - vm_emiIndCCS[, , "co2cement_process"]*(1-p_share_CCS) @@ -1134,7 +1153,12 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, setNames(dimSums(vm_emiMacSector[, , "co2luc"], dim = 3) * GtC_2_MtCO2, "Emi|CO2|+|Land-Use Change (Mt CO2/yr)"), # negative emissions from (non-BECCS) CDR (DACCS, EW) - setNames((vm_emiCdrTeDetail[, , "weathering"] + vm_emiCdrTeDetail[, , "dac"] * p_share_CCS) * GtC_2_MtCO2, + setNames(( + vm_emiCdrTeDetail[, , "weathering"] + + vm_emiCdrTeDetail[, , "dac"] * p_share_CCS + + (vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"]) + * (1 - s33_OAE_chem_decomposition * (1 - p_share_CCS)) + ) * GtC_2_MtCO2, "Emi|CO2|+|non-BECCS CDR (Mt CO2/yr)") ) } else { @@ -1164,7 +1188,12 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, setNames(dimSums(vm_emiMacSector[, , "co2luc"], dim = 3) * GtC_2_MtCO2, "Emi|CO2|+|Land-Use Change (Mt CO2/yr)"), # negative emissions from (non-BECCS) CDR (DACCS, EW) - setNames((vm_emiCdrTeDetail[, , "weathering"] + vm_emiCdrTeDetail[, , "dac"] * p_share_CCS) * GtC_2_MtCO2, + setNames(( + vm_emiCdrTeDetail[, , "weathering"] + + vm_emiCdrTeDetail[, , "dac"] * p_share_CCS + + (vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"]) + * (1 - s33_OAE_chem_decomposition * (1 - p_share_CCS)) + ) * GtC_2_MtCO2, "Emi|CO2|+|non-BECCS CDR (Mt CO2/yr)") ) } @@ -1373,6 +1402,13 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, setNames(-vm_emiCdrTeDetail[, , "dac"] * GtC_2_MtCO2, "Carbon Management|Carbon Capture|+|DAC (Mt CO2/yr)"), + # total co2 captured from OAE calcination + setNames( + - s33_OAE_chem_decomposition + * (vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"]) + * GtC_2_MtCO2, + "Carbon Management|Carbon Capture|+|OAE calcination (Mt CO2/yr)"), + # total co2 captured setNames(vm_co2capture * GtC_2_MtCO2, "Carbon Management|Carbon Capture (Mt CO2/yr)") @@ -1665,7 +1701,11 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, setNames( out[, , "Carbon Management|Carbon Capture|+|DAC (Mt CO2/yr)"] * p_share_CCS, - "Carbon Management|Storage|+|DAC (Mt CO2/yr)") + "Carbon Management|Storage|+|DAC (Mt CO2/yr)"), + setNames( + out[, , "Carbon Management|Carbon Capture|+|OAE calcination (Mt CO2/yr)"] + * p_share_CCS, + "Carbon Management|Storage|+|OAE calcination (Mt CO2/yr)") ) # calculate carbon storage variables for energy supply CCS @@ -1723,6 +1763,7 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, + out[, , "Carbon Management|Carbon Capture|Industry Energy|+|Biomass (Mt CO2/yr)"]) / (out[, , "Carbon Management|Carbon Capture|+|Biomass|Pe2Se (Mt CO2/yr)"] + out[, , "Carbon Management|Carbon Capture|+|DAC (Mt CO2/yr)"] + + out[, , "Carbon Management|Carbon Capture|+|OAE calcination (Mt CO2/yr)"] + out[, , "Carbon Management|Carbon Capture|Industry Energy|+|Biomass (Mt CO2/yr)"] + out[, , "Carbon Management|Carbon Capture|+|Fossil|Pe2Se (Mt CO2/yr)"] + out[, , "Carbon Management|Carbon Capture|Industry Energy|+|Fossil (Mt CO2/yr)"] @@ -1769,6 +1810,24 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, # total DACCS setNames(-out[, , "Carbon Management|Storage|+|DAC (Mt CO2/yr)"], "Emi|CO2|CDR|DACCS (Mt CO2/yr)"), + + # gross OAE + setNames(vm_emiCdrTeDetail[, , "oae_ng"] * GtC_2_MtCO2, + "Emi|CO2|CDR|OAE|+|Ocean Uptake, traditional calciner (Mt CO2/yr)"), + setNames(vm_emiCdrTeDetail[, , "oae_el"] * GtC_2_MtCO2, + "Emi|CO2|CDR|OAE|+|Ocean Uptake, electric calciner (Mt CO2/yr)"), + setNames((vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"]) * GtC_2_MtCO2, + "Emi|CO2|CDR|OAE|+|Ocean Uptake (Mt CO2/yr)"), + # OAE process emissions + setNames(out[, , "Carbon Management|Carbon Capture|+|OAE calcination (Mt CO2/yr)"] + - out[, , "Carbon Management|Storage|+|OAE calcination (Mt CO2/yr)"], + "Emi|CO2|CDR|OAE|+|Calcination emissions (Mt CO2/yr)"), + # net OAE + setNames((vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"]) * GtC_2_MtCO2 + + + out[, , "Carbon Management|Carbon Capture|+|OAE calcination (Mt CO2/yr)"] + - out[, , "Carbon Management|Storage|+|OAE calcination (Mt CO2/yr)"], + "Emi|CO2|CDR|OAE (Mt CO2/yr)"), + # total EW # total co2 captured by EW setNames(vm_emiCdrTeDetail[, , "weathering"] * GtC_2_MtCO2, @@ -1781,6 +1840,7 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, setNames( out[, , "Emi|CO2|CDR|Land-Use Change (Mt CO2/yr)"] + out[, , "Emi|CO2|CDR|BECCS (Mt CO2/yr)"] + out[, , "Emi|CO2|CDR|DACCS (Mt CO2/yr)"] + + out[, , "Emi|CO2|CDR|OAE (Mt CO2/yr)"] + out[, , "Emi|CO2|CDR|EW (Mt CO2/yr)"] + out[, , "Emi|CO2|CDR|Industry CCS|Synthetic Fuels (Mt CO2/yr)"] + out[, , "Emi|CO2|CDR|Materials|+|Plastics (Mt CO2/yr)"], @@ -1813,6 +1873,18 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, # total DACCS setNames(-out[, , "Carbon Management|Storage|+|DAC (Mt CO2/yr)"], "Emi|CO2|CDR|DACCS (Mt CO2/yr)"), + # gross OAE + setNames((vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"] ) * GtC_2_MtCO2, + "Emi|CO2|CDR|OAE|+|Ocean Uptake (Mt CO2/yr)"), + # OAE process emissions + setNames(out[, , "Carbon Management|Carbon Capture|+|OAE calcination (Mt CO2/yr)"] + - out[, , "Carbon Management|Storage|+|OAE calcination (Mt CO2/yr)"], + "Emi|CO2|CDR|OAE|+|Calcination emissions (Mt CO2/yr)"), + # net OAE + setNames((vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"]) * GtC_2_MtCO2 + + + out[, , "Carbon Management|Carbon Capture|+|OAE calcination (Mt CO2/yr)"] + - out[, , "Carbon Management|Storage|+|OAE calcination (Mt CO2/yr)"], + "Emi|CO2|CDR|OAE (Mt CO2/yr)"), # total EW # total co2 captured by EW setNames(vm_emiCdrTeDetail[, , "weathering"] * GtC_2_MtCO2, @@ -1825,6 +1897,7 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, setNames( out[, , "Emi|CO2|CDR|Land-Use Change (Mt CO2/yr)"] + out[, , "Emi|CO2|CDR|BECCS (Mt CO2/yr)"] + out[, , "Emi|CO2|CDR|DACCS (Mt CO2/yr)"] + + out[, , "Emi|CO2|CDR|OAE (Mt CO2/yr)"] + out[, , "Emi|CO2|CDR|EW (Mt CO2/yr)"] + out[, , "Emi|CO2|CDR|Industry CCS|Synthetic Fuels (Mt CO2/yr)"], "Emi|CO2|CDR (Mt CO2/yr)") @@ -2527,7 +2600,13 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, # CDR energy-related emissions (dimSums(mselect(EmiFeCarrier[, , "ETS"], emi_sectors = "CDR"), dim = 3) # Captured CO2 by non-BECCS capture technologies - + (vm_emiCdrTeDetail[, , "weathering"] + vm_emiCdrTeDetail[, , "dac"] * p_share_CCS)) * GtC_2_MtCO2, + + vm_emiCdrTeDetail[, , "weathering"] + + vm_emiCdrTeDetail[, , "dac"] * p_share_CCS + # CDR from ocean alkalinity enhancement + # (what is captured in the ocean - what is released from the calcination process) + + (vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"]) + * (1 - s33_OAE_chem_decomposition * (1 - p_share_CCS)) + ) * GtC_2_MtCO2, "Emi|GHG|ETS|+|non-BECCS CDR (Mt CO2eq/yr)"), # Extraction @@ -2590,7 +2669,6 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, setNames( out[, , "Emi|GHG|+|F-Gases (Mt CO2eq/yr)"], "Emi|GHG|Outside ETS and ESR|+|F-Gases (Mt CO2eq/yr)") - ) } else { ####################################### @@ -3087,6 +3165,7 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, "Emi|CO2|CDR|Industry CCS|Synthetic Fuels (Mt CO2/yr)", "Emi|CO2|CDR|DACCS (Mt CO2/yr)", "Emi|CO2|CDR|EW (Mt CO2/yr)", + "Emi|CO2|CDR|OAE (Mt CO2/yr)", "Emi|CO2|CDR|Land-Use Change (Mt CO2/yr)", "Emi|CO2|CDR|Materials|+|Plastics (Mt CO2/yr)" ) @@ -3113,6 +3192,7 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, "Emi|CO2|CDR|Industry CCS|Synthetic Fuels (Mt CO2/yr)", "Emi|CO2|CDR|DACCS (Mt CO2/yr)", "Emi|CO2|CDR|EW (Mt CO2/yr)", + "Emi|CO2|CDR|OAE (Mt CO2/yr)", "Emi|CO2|CDR|Land-Use Change (Mt CO2/yr)" ) } diff --git a/R/reportFE.R b/R/reportFE.R index 0c0fbb91..592a1189 100644 --- a/R/reportFE.R +++ b/R/reportFE.R @@ -960,7 +960,7 @@ reportFE <- function(gdx, regionSubsetList = NULL, # KK: Mappings from gams set names to names in mifs. If new CDR methods are added to REMIND, please add # the method to CDR_te_list: ""="" # If a final energy carrier not included in CDR_FE_list is used, please also add it to the list. - CDR_te_list <- list("dac"="DAC", "weathering"="EW") + CDR_te_list <- list("dac"="DAC", "weathering"="EW", "oae_ng"="OAE, traditional calciner", "oae_el"="OAE, novel calciner") CDR_FE_list <- list("feels"="Electricity", "fegas"="Gases", "fehes"="Heat", "feh2s"="Hydrogen", "fedie"="Diesel") # loop to compute variables "FE|CDR|++| (EJ/yr)" and "FE|CDR||+| (EJ/yr)", diff --git a/inst/compareScenarios/cs_01_summary.Rmd b/inst/compareScenarios/cs_01_summary.Rmd index 9060f01a..a47da7ca 100644 --- a/inst/compareScenarios/cs_01_summary.Rmd +++ b/inst/compareScenarios/cs_01_summary.Rmd @@ -35,6 +35,7 @@ items <- c( "Emi|CO2|CDR|BECCS", "Emi|CO2|CDR|Industry CCS|Synthetic Fuels", "Emi|CO2|CDR|DACCS", + "Emi|CO2|CDR|OAE", "Emi|CO2|CDR|EW") showAreaAndBarPlots(data, items, tot, scales = "fixed") ``` @@ -61,6 +62,7 @@ items <- c( "Emi|CO2|CDR|BECCS", "Emi|CO2|CDR|Industry CCS|Synthetic Fuels", "Emi|CO2|CDR|DACCS", + "Emi|CO2|CDR|OAE", "Emi|CO2|CDR|EW") showAreaAndBarPlots(data, items, tot, scales = "fixed") ``` @@ -88,6 +90,7 @@ items <- c( "Emi|CO2|Cumulated|CDR|BECCS", "Emi|CO2|Cumulated|CDR|Industry CCS|Synthetic Fuels", "Emi|CO2|Cumulated|CDR|DACCS", + "Emi|CO2|Cumulated|CDR|OAE", "Emi|CO2|Cumulated|CDR|EW") showAreaAndBarPlots(data, items, tot, scales = "fixed") ``` diff --git a/inst/compareScenarios/cs_03_emissions.Rmd b/inst/compareScenarios/cs_03_emissions.Rmd index ee6a708f..87422219 100644 --- a/inst/compareScenarios/cs_03_emissions.Rmd +++ b/inst/compareScenarios/cs_03_emissions.Rmd @@ -91,6 +91,7 @@ items <- c( "Emi|CO2|Energy|Supply|Electricity w/ couple prod", "Emi|CO2|CDR|DACCS", "Emi|CO2|CDR|EW", + "Emi|CO2|CDR|OAE", "Emi|CO2|Energy|Waste" ) showAreaAndBarPlots(data, items, tot, scales = "fixed") @@ -290,6 +291,7 @@ items <- c( "Emi|CO2|CDR|BECCS", "Emi|CO2|CDR|Industry CCS|Synthetic Fuels", "Emi|CO2|CDR|DACCS", + "Emi|CO2|CDR|OAE", "Emi|CO2|CDR|EW" ) showAreaAndBarPlots(data, items, tot, scales = "fixed") @@ -304,6 +306,7 @@ items <- c( "Emi|CO2|CDR|BECCS|Industry", "Emi|CO2|CDR|Industry CCS|Synthetic Fuels", "Emi|CO2|CDR|DACCS", + "Emi|CO2|CDR|OAE", "Emi|CO2|CDR|EW" ) showAreaAndBarPlots(data, items, tot, scales = "fixed") @@ -352,6 +355,7 @@ items <- c( "Emi|CO2|Cumulated|CDR|BECCS|Industry", "Emi|CO2|Cumulated|CDR|Industry CCS|Synthetic Fuels", "Emi|CO2|Cumulated|CDR|DACCS", + "Emi|CO2|Cumulated|CDR|OAE", "Emi|CO2|Cumulated|CDR|EW") showAreaAndBarPlots(data, items, tot, scales = "fixed") ``` diff --git a/inst/compareScenarios/cs_09_carbon_management.Rmd b/inst/compareScenarios/cs_09_carbon_management.Rmd index ca1a174d..269de037 100644 --- a/inst/compareScenarios/cs_09_carbon_management.Rmd +++ b/inst/compareScenarios/cs_09_carbon_management.Rmd @@ -78,7 +78,6 @@ showLinePlots(data, "Carbon Management|Storage|Share of annual potential used") showAreaAndBarPlots(data, vars = c("Carbon Management|Storage"), tot = "Carbon Management|Storage|Maximum annual CO2 storage potential") -``` ## Carbon Usage ### Usage Total - Line diff --git a/inst/extdata/additional_summation_checks.csv b/inst/extdata/additional_summation_checks.csv index 97ee5078..4c7f72b7 100644 --- a/inst/extdata/additional_summation_checks.csv +++ b/inst/extdata/additional_summation_checks.csv @@ -27,6 +27,7 @@ Emi|GHG;Emi|CO2|CDR|DACCS;1 Emi|GHG;Emi|CO2|CDR|Industry CCS|Synthetic Fuels;1 Emi|GHG;Emi|CO2|CDR|EW;1 Emi|GHG;Emi|CO2|CDR|Materials|+|Plastics;1 +Emi|GHG;Emi|CO2|CDR|OAE;1 ;; # total CO2 emissions by sectors with separation into gross and negative emissions;; Emi|CO2;Emi|CO2|Gross|Energy|Supply|+|Electricity;1 @@ -43,6 +44,7 @@ Emi|CO2;Emi|CO2|CDR|DACCS;1 Emi|CO2;Emi|CO2|CDR|EW;1 Emi|CO2;Emi|CO2|Gross|Energy|+|Waste;1 Emi|CO2;Emi|CO2|CDR|Materials|+|Plastics;1 +Emi|CO2;Emi|CO2|CDR|OAE;1 ;; # total GHG emissions by CO2 sectors and non-CO2 gases;; Emi|GHG 1;Emi|CO2|+|Energy;1 @@ -68,6 +70,7 @@ Emi|CO2|Cumulated;Emi|CO2|Cumulated|CDR|Industry CCS|Synthetic Fuels;1 Emi|CO2|Cumulated;Emi|CO2|Cumulated|CDR|DACCS;1 Emi|CO2|Cumulated;Emi|CO2|Cumulated|CDR|EW;1 Emi|CO2|Cumulated;Emi|CO2|Cumulated|CDR|Materials|Plastics;1 +Emi|CO2|Cumulated;Emi|CO2|Cumulated|CDR|OAE;1 ;; # total CDR;; Emi|CO2|CDR;Emi|CO2|CDR|Land-Use Change;1 @@ -77,6 +80,7 @@ Emi|CO2|CDR;Emi|CO2|CDR|Industry CCS|Synthetic Fuels;1 Emi|CO2|CDR;Emi|CO2|CDR|DACCS;1 Emi|CO2|CDR;Emi|CO2|CDR|EW;1 Emi|CO2|CDR;Emi|CO2|CDR|Materials|+|Plastics;1 +Emi|CO2|CDR;Emi|CO2|CDR|OAE;1 ;; # check balance of SE|Electricity electricity generation with the electricity demand variables by sector;; SE|Electricity;SE|Input|Electricity|Hydrogen|Synthetic Fuels|+|Liquids;1 From cda2b920f58aa87177a9ac3c0bacffec4e8049d4 Mon Sep 17 00:00:00 2001 From: Katarzyna Kowalczyk Date: Thu, 8 Aug 2024 13:33:44 +0200 Subject: [PATCH 2/8] Rename variables and fix summation errros --- R/reportEmi.R | 274 +++++++++++++++++++++++++++---------------------- R/reportLCOE.R | 2 +- 2 files changed, 150 insertions(+), 126 deletions(-) diff --git a/R/reportEmi.R b/R/reportEmi.R index 9af87052..c768e2c8 100644 --- a/R/reportEmi.R +++ b/R/reportEmi.R @@ -158,7 +158,7 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, ### Carbon management variables # total captured CO2 vm_co2capture <- readGDX(gdx, "vm_co2capture", field = "l", restore_zeros = F)[, t, ] - + vm_emiCdr_co2 <- readGDX(gdx, "vm_emiCdr", field = "l", restore_zeros = F)[, t, "co2"] vm_emiCdrTeDetail <- readGDX(gdx, c("vm_emiCdrTeDetail","v33_emi"), field = "l", restore_zeros = F, react = "silent")[, t, ] if (is.null(vm_emiCdrTeDetail)) { # compatibility with the CDR module before the portfolio was added @@ -173,18 +173,41 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, v33_emiEW <- new.magpie(getItems(vm_co2capture, "all_regi"), getItems(vm_co2capture, "ttot"), fill = 0) } - v33_emiOAE <- new.magpie(getItems(vm_co2capture, "all_regi"), getItems(vm_co2capture, "ttot"), c("oae_ng", "oae_el"), fill = 0) + emiOAE <- new.magpie(getItems(vm_co2capture, "all_regi"), getItems(vm_co2capture, "ttot"), c("oae_ng", "oae_el"), fill = 0) # variable used in the rest of the reporting - vm_emiCdrTeDetail <- mbind(v33_emiDAC, v33_emiEW, v33_emiOAE) + vm_emiCdrTeDetail <- mbind(v33_emiDAC, v33_emiEW, emiOAE) vm_emiCdrTeDetail <- setNames(vm_emiCdrTeDetail, c("dac", "weathering", "oae_ng", "oae_el")) } if (!"oae_ng" %in% getItems(vm_emiCdrTeDetail, dim = 3)) { - v33_emiOAE <- new.magpie(getItems(vm_emiCdrTeDetail, "all_regi"), getItems(vm_emiCdrTeDetail, "ttot"), c("oae_ng", "oae_el"), fill = 0) + emiOAE <- new.magpie(getItems(vm_emiCdrTeDetail, "all_regi"), + getItems(vm_emiCdrTeDetail, "ttot"), + c("oae_ng", "oae_el"), + fill = 0) # variable used in the rest of the reporting - vm_emiCdrTeDetail <- mbind(vm_emiCdrTeDetail, v33_emiOAE) + vm_emiCdrTeDetail <- mbind(vm_emiCdrTeDetail, emiOAE) + } + + # CO2 captured from CDR-related activities that does not come from the atmosphere + v33_co2emi_non_atm_gas <- readGDX(gdx, "v33_co2emi_non_atm_gas", field = "l", restore_zeros = F, react = "silent")[, t, ] + v33_co2emi_non_atm_calcination <- readGDX(gdx, "v33_co2emi_non_atm_calcination", field = "l", restore_zeros = F, react = "silent")[, t, ] + if (is.null(v33_co2emi_non_atm_gas)) { + # set non atmospheric emissions to 0 + v33_co2emi_non_atm_gas <- new.magpie(getItems(vm_emiCdrTeDetail, "all_regi"), + getItems(vm_emiCdrTeDetail, "ttot"), + getItems(vm_emiCdrTeDetail, "all_te"), + fill = 0) + + v33_co2emi_non_atm_calcination <- v33_co2emi_non_atm_gas + } + + s33_capture_rate <- readGDX(gdx, "s33_capture_rate", react = "silent") + te_oae33 <- readGDX(gdx, "te_oae33") + if (is.null(s33_capture_rate)) { + s33_capture_rate <- 0.9 + te_oae33 <- c("oae_el", "oae_ng") } # stored CO2 @@ -487,8 +510,13 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, # pe2se emissions setNames((dimSums(EmiPe2Se, dim = 3) # add extraction energy-related CO2 emissions - + dimSums(v_emiEnFuelEx[, , "co2"], dim = 3)) - * GtC_2_MtCO2, + + dimSums(v_emiEnFuelEx[, , "co2"], dim = 3) + # add CCU from carbon captured from the energy system in the CDR module + # (e.g., gas for CDR heat demand and CO2 from calcination of limestone) + + s33_capture_rate * (1 - p_share_CCS) * ( + dimSums(v33_co2emi_non_atm_gas, dim = 3) + + dimSums(v33_co2emi_non_atm_calcination, dim = 3)) + ) * GtC_2_MtCO2, "Emi|CO2|Energy|+|Supply (Mt CO2/yr)"), # demand-side energy CO2 emissions # fe emissions @@ -596,6 +624,8 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, # supply-side solids emissions (w/ coupled production) # solids emissions from pe2se technologies which have no coupled product setNames((dimSums(mselect(EmiPe2Se[, , emi.te.nocp], all_enty1 = se_sol), dim = 3) + # add CCU from carbon captured from the energy system in the CDR module (e.g., CO2 from the calcination of limestone) + + s33_capture_rate * dimSums(v33_co2emi_non_atm_calcination, dim = 3) * (1 - p_share_CCS) # emissions from coupled production technologies where solids are first product + dimSums(mselect((1 - p_weights_cp) * EmiPe2Se[, , getNames(p_weights_cp, dim = 3)], all_enty1 = se_sol), dim = 3) # emissions from coupled production technologies where solids are coupled/second product @@ -615,6 +645,8 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, # supply-side gases emissions (w/ coupled production) # gases emissions from pe2se technologies which have no coupled product setNames((dimSums(mselect(EmiPe2Se[, , emi.te.nocp], all_enty1 = se_gas), dim = 3) + # add CCU from carbon captured from the energy system in the CDR module (e.g., gas for CDR heat demand) + + s33_capture_rate * dimSums(v33_co2emi_non_atm_gas, dim = 3) * (1 - p_share_CCS) # emissions from coupled production technologies where gases are first product + dimSums(mselect((1 - p_weights_cp) * EmiPe2Se[, , getNames(p_weights_cp, dim = 3)], all_enty1 = se_gas), dim = 3) # emissions from coupled production technologies where gases are coupled/second product @@ -1090,24 +1122,17 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, mselect(vm_emiTeMkt, all_enty = "co2") } - s33_OAE_chem_decomposition <- readGDX(gdx, "s33_OAE_chem_decomposition", react = "silent") - if(is.null(s33_OAE_chem_decomposition)) { - s33_OAE_chem_decomposition <- 1 - } out <- mbind(out, setNames( - # vm_emiTeMkt is variable in REMIND closest to energy co2 emissions - (dimSums(sel_vm_emiTeMkt_co2, dim = 3) - # subtract non-BECCS CCU CO2 (i.e., non-CCS part of DAC (synfuels) and CO2 from OAE calcination) - - (1 - p_share_CCS) * ( - - vm_emiCdrTeDetail[, , "dac"] - - s33_OAE_chem_decomposition * (vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"]) - ) + # vm_emiTeMkt is variable in REMIND closest to energy co2 emissions, it contains CCU emissions + (dimSums(sel_vm_emiTeMkt_co2, dim = 3) + # subtract non-BECCS CCU from atmospheric CO2 (i.e., non-CCS part of DAC (synfuels), it is 'neutral') + + (1 - p_share_CCS) * vm_emiCdrTeDetail[, , "dac"] # deduce co2 captured by industrial processes which is not stored but used for CCU (synfuels) # -> gets accounted in industrial process emissions - vm_emiIndCCS[, , "co2cement_process"]*(1-p_share_CCS) ) * GtC_2_MtCO2, - "Emi|CO2|+|Energy (Mt CO2/yr)") + "Emi|CO2|+|Energy (Mt CO2/yr)") ) ### 2.2 Non-energy CO2 emissions ---- @@ -1152,12 +1177,9 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, # land-use change CO2 setNames(dimSums(vm_emiMacSector[, , "co2luc"], dim = 3) * GtC_2_MtCO2, "Emi|CO2|+|Land-Use Change (Mt CO2/yr)"), - # negative emissions from (non-BECCS) CDR (DACCS, EW) + # negative emissions from (non-BECCS) CDR (DACCS, EW, OAE) setNames(( - vm_emiCdrTeDetail[, , "weathering"] - + vm_emiCdrTeDetail[, , "dac"] * p_share_CCS - + (vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"]) - * (1 - s33_OAE_chem_decomposition * (1 - p_share_CCS)) + vm_emiCdr_co2 - vm_emiCdrTeDetail[, , "dac"] * (1 - p_share_CCS) ) * GtC_2_MtCO2, "Emi|CO2|+|non-BECCS CDR (Mt CO2/yr)") ) @@ -1189,10 +1211,7 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, "Emi|CO2|+|Land-Use Change (Mt CO2/yr)"), # negative emissions from (non-BECCS) CDR (DACCS, EW) setNames(( - vm_emiCdrTeDetail[, , "weathering"] - + vm_emiCdrTeDetail[, , "dac"] * p_share_CCS - + (vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"]) - * (1 - s33_OAE_chem_decomposition * (1 - p_share_CCS)) + vm_emiCdr_co2 - vm_emiCdrTeDetail[, , "dac"] * (1 - p_share_CCS) ) * GtC_2_MtCO2, "Emi|CO2|+|non-BECCS CDR (Mt CO2/yr)") ) @@ -1404,10 +1423,17 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, # total co2 captured from OAE calcination setNames( - - s33_OAE_chem_decomposition - * (vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"]) + s33_capture_rate * dimSums(v33_co2emi_non_atm_calcination, dim = 3) * GtC_2_MtCO2, - "Carbon Management|Carbon Capture|+|OAE calcination (Mt CO2/yr)"), + "Carbon Management|Carbon Capture|+|OAE calcination (Mt CO2/yr)") + ) + + out <- mbind( + out, + # co2 captured from CDR-related energy emissions + setNames( + s33_capture_rate * dimSums(v33_co2emi_non_atm_gas, dim = 3) * GtC_2_MtCO2, + "Carbon Management|Carbon Capture|+|CDR energy (Mt CO2/yr)"), # total co2 captured setNames(vm_co2capture * GtC_2_MtCO2, @@ -1705,7 +1731,11 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, setNames( out[, , "Carbon Management|Carbon Capture|+|OAE calcination (Mt CO2/yr)"] * p_share_CCS, - "Carbon Management|Storage|+|OAE calcination (Mt CO2/yr)") + "Carbon Management|Storage|+|OAE calcination (Mt CO2/yr)"), + setNames( + out[, , "Carbon Management|Carbon Capture|+|CDR energy (Mt CO2/yr)"] + * p_share_CCS, + "Carbon Management|Storage|+|CDR energy (Mt CO2/yr)") ) # calculate carbon storage variables for energy supply CCS @@ -1764,6 +1794,7 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, / (out[, , "Carbon Management|Carbon Capture|+|Biomass|Pe2Se (Mt CO2/yr)"] + out[, , "Carbon Management|Carbon Capture|+|DAC (Mt CO2/yr)"] + out[, , "Carbon Management|Carbon Capture|+|OAE calcination (Mt CO2/yr)"] + + out[, , "Carbon Management|Carbon Capture|+|CDR energy (Mt CO2/yr)"] + out[, , "Carbon Management|Carbon Capture|Industry Energy|+|Biomass (Mt CO2/yr)"] + out[, , "Carbon Management|Carbon Capture|+|Fossil|Pe2Se (Mt CO2/yr)"] + out[, , "Carbon Management|Carbon Capture|Industry Energy|+|Fossil (Mt CO2/yr)"] @@ -1773,6 +1804,87 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, p_share_atmosco2[is.infinite(p_share_atmosco2)] <- 0 p_share_atmosco2[is.na(p_share_atmosco2)] <- 0 + # Emi|CO2|CDR is defined negative + + out <- mbind(out, + # total negative land-use change emissions + setNames(EmiCDR.LUC, + "Emi|CO2|CDR|Land-Use Change (Mt CO2/yr)"), + # total BECCS (pe2se + industry) + setNames(-out[, , "Carbon Management|Storage|+|Biomass|Pe2Se (Mt CO2/yr)"] + -out[, , "Carbon Management|Storage|Industry Energy|+|Biomass (Mt CO2/yr)"], + "Emi|CO2|CDR|BECCS (Mt CO2/yr)"), + # Pe2Se BECCS + setNames(-out[, , "Carbon Management|Storage|+|Biomass|Pe2Se (Mt CO2/yr)"], + "Emi|CO2|CDR|BECCS|Pe2Se (Mt CO2/yr)"), + # Industry BECCS + setNames(-out[, , "Carbon Management|Storage|Industry Energy|+|Biomass (Mt CO2/yr)"], + "Emi|CO2|CDR|BECCS|Industry (Mt CO2/yr)"), + # stored CO2 in industry from carbon-neutral fuels (synthetic fuels) + setNames(-out[, , "Carbon Management|Carbon Capture|Industry Energy|+|Synfuel (Mt CO2/yr)"] * p_share_atmosco2 * p_share_CCS, + "Emi|CO2|CDR|Industry CCS|Synthetic Fuels (Mt CO2/yr)"), + + # total DACCS + setNames(-out[, , "Carbon Management|Storage|+|DAC (Mt CO2/yr)"] + + (1 - s33_capture_rate) * v33_co2emi_non_atm_gas[, , "dac"] * GtC_2_MtCO2, + "Emi|CO2|CDR|DACCS (Mt CO2/yr)"), + + # total EW + setNames(vm_emiCdrTeDetail[, , "weathering"] * GtC_2_MtCO2, + "Emi|CO2|CDR|EW (Mt CO2/yr)"), + + # net OAE + setNames(dimSums(vm_emiCdrTeDetail[, , te_oae33], dim = 3) * GtC_2_MtCO2 + # reduce removal by the unavoidable emissions due to capture rate < 100% + + (1 - s33_capture_rate) * ( + dimSums(v33_co2emi_non_atm_gas[, , te_oae33], dim = 3) + + dimSums(v33_co2emi_non_atm_calcination, dim = 3) + ) * GtC_2_MtCO2, + "Emi|CO2|CDR|OAE (Mt CO2/yr)"), + + # gross OAE + setNames(dimSums(vm_emiCdrTeDetail[, , te_oae33], dim = 3) * GtC_2_MtCO2, + "Emi|CO2|CDR|net OAE|+|Ocean Uptake (Mt CO2/yr)"), + setNames(vm_emiCdrTeDetail[, , "oae_ng"] * GtC_2_MtCO2, + "Emi|CO2|CDR|net OAE|Ocean Uptake|+|traditional calciner (Mt CO2/yr)"), + setNames(vm_emiCdrTeDetail[, , "oae_el"] * GtC_2_MtCO2, + "Emi|CO2|CDR|net OAE|Ocean Uptake|+|electric calciner (Mt CO2/yr)"), + # OAE process emissions + setNames(out[, , "Carbon Management|Carbon Capture|+|OAE calcination (Mt CO2/yr)"] + - out[, , "Carbon Management|Storage|+|OAE calcination (Mt CO2/yr)"], + "Emi|CO2|CDR|net OAE|Calcination emissions (Mt CO2/yr)"), + # OAE released emissions that were captured either from calcination or energy + setNames(out[, , "Carbon Management|Carbon Capture|+|OAE calcination (Mt CO2/yr)"] + - out[, , "Carbon Management|Storage|+|OAE calcination (Mt CO2/yr)"] + + s33_capture_rate + * dimSums(v33_co2emi_non_atm_gas[, , te_oae33], dim = 3) + * (1 - p_share_CCS) + * GtC_2_MtCO2, + "Emi|CO2|CDR|net OAE|+|Released emissions (Mt CO2/yr)"), + # OAE unavoidable emissions due to capture rate < 100% (applies to process and energy emissions) + setNames((1 - s33_capture_rate) * ( + dimSums(v33_co2emi_non_atm_gas[, , te_oae33], dim = 3) + + dimSums(v33_co2emi_non_atm_calcination, dim = 3) + ) * GtC_2_MtCO2, + "Emi|CO2|CDR|net OAE|+|Unavoidable emissions (Mt CO2/yr)"), + setNames((dimSums(vm_emiCdrTeDetail[, , te_oae33], dim = 3) + # emissions released due to synfuels + + s33_capture_rate * (1 - p_share_CCS) + * ( + dimSums(v33_co2emi_non_atm_gas[, , te_oae33], dim = 3) + + dimSums(v33_co2emi_non_atm_calcination[, , te_oae33], dim = 3) + ) + # unavoidable emissions + + (1 - s33_capture_rate) + * ( + dimSums(v33_co2emi_non_atm_gas[, , te_oae33], dim = 3) + + dimSums(v33_co2emi_non_atm_calcination, dim = 3) + ) + ) * GtC_2_MtCO2, + "Emi|CO2|CDR|net OAE (Mt CO2/yr)") + ) + + # CDR reporting if plastic-removals are considered if (!is.null(v37_plasticsCarbon)) { @@ -1783,55 +1895,10 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, out[, , "Carbon Management|Materials|+|Plastics (Mt CO2/yr)"] ) - # Emi|CO2|CDR is defined negative - out <- mbind(out, - # total negative land-use change emissions - setNames(EmiCDR.LUC, - "Emi|CO2|CDR|Land-Use Change (Mt CO2/yr)"), - # total BECCS (pe2se + industry) - setNames(-out[, , "Carbon Management|Storage|+|Biomass|Pe2Se (Mt CO2/yr)"] - -out[, , "Carbon Management|Storage|Industry Energy|+|Biomass (Mt CO2/yr)"], - "Emi|CO2|CDR|BECCS (Mt CO2/yr)"), - # Pe2Se BECCS - setNames(-out[, , "Carbon Management|Storage|+|Biomass|Pe2Se (Mt CO2/yr)"], - "Emi|CO2|CDR|BECCS|Pe2Se (Mt CO2/yr)"), - # Industry BECCS - setNames(-out[, , "Carbon Management|Storage|Industry Energy|+|Biomass (Mt CO2/yr)"], - "Emi|CO2|CDR|BECCS|Industry (Mt CO2/yr)"), - # stored CO2 in industry from carbon-neutral fuels (synthetic fuels) - setNames(-out[, , "Carbon Management|Carbon Capture|Industry Energy|+|Synfuel (Mt CO2/yr)"] * p_share_atmosco2 * p_share_CCS, - "Emi|CO2|CDR|Industry CCS|Synthetic Fuels (Mt CO2/yr)"), - # CO2 stored in plastic products that are not incinerated and come from atmospheric or biogenic carbon - setNames(-out[, , "Carbon Management|Materials|Plastics|Waste|++|Other destination (Mt CO2/yr)"] *p_share_atmBiogco2, - "Emi|CO2|CDR|Materials|+|Plastics (Mt CO2/yr)"), - - # total DACCS - setNames(-out[, , "Carbon Management|Storage|+|DAC (Mt CO2/yr)"], - "Emi|CO2|CDR|DACCS (Mt CO2/yr)"), - - # gross OAE - setNames(vm_emiCdrTeDetail[, , "oae_ng"] * GtC_2_MtCO2, - "Emi|CO2|CDR|OAE|+|Ocean Uptake, traditional calciner (Mt CO2/yr)"), - setNames(vm_emiCdrTeDetail[, , "oae_el"] * GtC_2_MtCO2, - "Emi|CO2|CDR|OAE|+|Ocean Uptake, electric calciner (Mt CO2/yr)"), - setNames((vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"]) * GtC_2_MtCO2, - "Emi|CO2|CDR|OAE|+|Ocean Uptake (Mt CO2/yr)"), - # OAE process emissions - setNames(out[, , "Carbon Management|Carbon Capture|+|OAE calcination (Mt CO2/yr)"] - - out[, , "Carbon Management|Storage|+|OAE calcination (Mt CO2/yr)"], - "Emi|CO2|CDR|OAE|+|Calcination emissions (Mt CO2/yr)"), - # net OAE - setNames((vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"]) * GtC_2_MtCO2 + - + out[, , "Carbon Management|Carbon Capture|+|OAE calcination (Mt CO2/yr)"] - - out[, , "Carbon Management|Storage|+|OAE calcination (Mt CO2/yr)"], - "Emi|CO2|CDR|OAE (Mt CO2/yr)"), - - # total EW - # total co2 captured by EW - setNames(vm_emiCdrTeDetail[, , "weathering"] * GtC_2_MtCO2, - "Emi|CO2|CDR|EW (Mt CO2/yr)") + setNames(-out[, , "Carbon Management|Materials|Plastics|Waste|++|Other destination (Mt CO2/yr)"] * p_share_atmBiogco2, + "Emi|CO2|CDR|Materials|+|Plastics (Mt CO2/yr)") ) out <- mbind(out, @@ -1847,50 +1914,11 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, "Emi|CO2|CDR (Mt CO2/yr)") ) - } else { # CDR reporting if plastic-removals are not considered # Emi|CO2|CDR is defined negative - out <- mbind(out, - # total negative land-use change emissions - setNames(EmiCDR.LUC, - "Emi|CO2|CDR|Land-Use Change (Mt CO2/yr)"), - # total BECCS (pe2se + industry) - setNames(-out[, , "Carbon Management|Storage|+|Biomass|Pe2Se (Mt CO2/yr)"] - -out[, , "Carbon Management|Storage|Industry Energy|+|Biomass (Mt CO2/yr)"], - "Emi|CO2|CDR|BECCS (Mt CO2/yr)"), - # Pe2Se BECCS - setNames(-out[, , "Carbon Management|Storage|+|Biomass|Pe2Se (Mt CO2/yr)"], - "Emi|CO2|CDR|BECCS|Pe2Se (Mt CO2/yr)"), - # Industry BECCS - setNames(-out[, , "Carbon Management|Storage|Industry Energy|+|Biomass (Mt CO2/yr)"], - "Emi|CO2|CDR|BECCS|Industry (Mt CO2/yr)"), - # stored CO2 in industry from carbon-neutral fuels (synthetic fuels) - setNames(-out[, , "Carbon Management|Carbon Capture|Industry Energy|+|Synfuel (Mt CO2/yr)"] * p_share_atmosco2 * p_share_CCS, - "Emi|CO2|CDR|Industry CCS|Synthetic Fuels (Mt CO2/yr)"), - # total DACCS - setNames(-out[, , "Carbon Management|Storage|+|DAC (Mt CO2/yr)"], - "Emi|CO2|CDR|DACCS (Mt CO2/yr)"), - # gross OAE - setNames((vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"] ) * GtC_2_MtCO2, - "Emi|CO2|CDR|OAE|+|Ocean Uptake (Mt CO2/yr)"), - # OAE process emissions - setNames(out[, , "Carbon Management|Carbon Capture|+|OAE calcination (Mt CO2/yr)"] - - out[, , "Carbon Management|Storage|+|OAE calcination (Mt CO2/yr)"], - "Emi|CO2|CDR|OAE|+|Calcination emissions (Mt CO2/yr)"), - # net OAE - setNames((vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"]) * GtC_2_MtCO2 + - + out[, , "Carbon Management|Carbon Capture|+|OAE calcination (Mt CO2/yr)"] - - out[, , "Carbon Management|Storage|+|OAE calcination (Mt CO2/yr)"], - "Emi|CO2|CDR|OAE (Mt CO2/yr)"), - # total EW - # total co2 captured by EW - setNames(vm_emiCdrTeDetail[, , "weathering"] * GtC_2_MtCO2, - "Emi|CO2|CDR|EW (Mt CO2/yr)") - ) - out <- mbind(out, # total CDR # double-check: if we don't account for fossil content in plastics, the emissions might not add up? @@ -2600,12 +2628,7 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, # CDR energy-related emissions (dimSums(mselect(EmiFeCarrier[, , "ETS"], emi_sectors = "CDR"), dim = 3) # Captured CO2 by non-BECCS capture technologies - + vm_emiCdrTeDetail[, , "weathering"] - + vm_emiCdrTeDetail[, , "dac"] * p_share_CCS - # CDR from ocean alkalinity enhancement - # (what is captured in the ocean - what is released from the calcination process) - + (vm_emiCdrTeDetail[, , "oae_ng"] + vm_emiCdrTeDetail[, , "oae_el"]) - * (1 - s33_OAE_chem_decomposition * (1 - p_share_CCS)) + + vm_emiCdr_co2 - vm_emiCdrTeDetail[, , "dac"] * (1 - p_share_CCS) ) * GtC_2_MtCO2, "Emi|GHG|ETS|+|non-BECCS CDR (Mt CO2eq/yr)"), @@ -2732,7 +2755,8 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, # CDR energy-related emissions (dimSums(mselect(EmiFeCarrier[, , "ETS"], emi_sectors = "CDR"), dim = 3) # Captured CO2 by non-BECCS capture technologies - + (vm_emiCdrTeDetail[, , "weathering"] + vm_emiCdrTeDetail[, , "dac"] * p_share_CCS)) * GtC_2_MtCO2, + + (vm_emiCdr_co2 - vm_emiCdrTeDetail[, , "dac"] * (1 - p_share_CCS)) + ) * GtC_2_MtCO2, "Emi|GHG|ETS|+|non-BECCS CDR (Mt CO2eq/yr)"), # Extraction diff --git a/R/reportLCOE.R b/R/reportLCOE.R index aa4ae52a..01bd4482 100644 --- a/R/reportLCOE.R +++ b/R/reportLCOE.R @@ -172,7 +172,7 @@ reportLCOE <- function(gdx, output.type = "both"){ # dac FE demand v33_FEdemand <- readGDX(gdx, name="v33_FEdemand", field="l",restore_zeros=FALSE,format="first_found")[,ttot_from2005,teCDR] - DAC_ccsdemand <- readGDX(gdx, name="vm_ccs_cdr", field="l",restore_zeros=FALSE,format="first_found")[,ttot_from2005,"ccsinje.1"] + DAC_ccsdemand <- readGDX(gdx, name="v33_co2emi_non_atm_gas", field="l", restore_zeros=FALSE, format="first_found")[, ttot_from2005, "dac"] v33_emi <- readGDX(gdx, name=c("v33_emi","vm_emiCdrTeDetail"), field="l",restore_zeros=FALSE,format="first_found")[,ttot_from2005,teCDR] pm_FEPrice <- readGDX(gdx, "pm_FEPrice")[,ttot_from2005,"indst.ETS"] fe2cdr <- readGDX(gdx, name="fe2cdr") From 424277df1e34319bfb30910bd9981075ef1d4914 Mon Sep 17 00:00:00 2001 From: Katarzyna Kowalczyk Date: Thu, 8 Aug 2024 15:02:25 +0200 Subject: [PATCH 3/8] Fix cs2 for OAE --- inst/compareScenarios/cs_03_emissions.Rmd | 12 ++++++++++++ inst/compareScenarios/cs_09_carbon_management.Rmd | 1 + 2 files changed, 13 insertions(+) diff --git a/inst/compareScenarios/cs_03_emissions.Rmd b/inst/compareScenarios/cs_03_emissions.Rmd index 87422219..5fb519aa 100644 --- a/inst/compareScenarios/cs_03_emissions.Rmd +++ b/inst/compareScenarios/cs_03_emissions.Rmd @@ -312,6 +312,18 @@ items <- c( showAreaAndBarPlots(data, items, tot, scales = "fixed") ``` +#### Ocean CDR +```{r Ocean CDR} +tot <- "Emi|CO2|CDR|net OAE" +items <- c( + "Emi|CO2|CDR|net OAE|Ocean Uptake|traditional calciner", + "Emi|CO2|CDR|net OAE|Ocean Uptake|electric calciner", + "Emi|CO2|CDR|net OAE|Released emissions", + "Emi|CO2|CDR|net OAE|Unavoidable emissions" +) +showAreaAndBarPlots(data, items, tot, scales = "fixed") +``` + #### CDR Subcategories - Line ```{r CO2 CDR Subcategories - Line} cdrVars <- diff --git a/inst/compareScenarios/cs_09_carbon_management.Rmd b/inst/compareScenarios/cs_09_carbon_management.Rmd index 269de037..ca1a174d 100644 --- a/inst/compareScenarios/cs_09_carbon_management.Rmd +++ b/inst/compareScenarios/cs_09_carbon_management.Rmd @@ -78,6 +78,7 @@ showLinePlots(data, "Carbon Management|Storage|Share of annual potential used") showAreaAndBarPlots(data, vars = c("Carbon Management|Storage"), tot = "Carbon Management|Storage|Maximum annual CO2 storage potential") +``` ## Carbon Usage ### Usage Total - Line From 3b74dbc991fe02e37d84eb0eeca4d0002292ea5a Mon Sep 17 00:00:00 2001 From: Katarzyna Kowalczyk Date: Sat, 10 Aug 2024 10:18:10 +0200 Subject: [PATCH 4/8] Calculate pCap OAE and react silently if te_oae33 doesnt exist --- R/reportEmi.R | 2 +- inst/compareScenarios/preprocessing.R | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/R/reportEmi.R b/R/reportEmi.R index c768e2c8..4f62a8e8 100644 --- a/R/reportEmi.R +++ b/R/reportEmi.R @@ -204,7 +204,7 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, } s33_capture_rate <- readGDX(gdx, "s33_capture_rate", react = "silent") - te_oae33 <- readGDX(gdx, "te_oae33") + te_oae33 <- readGDX(gdx, "te_oae33", react = "silent") if (is.null(s33_capture_rate)) { s33_capture_rate <- 0.9 te_oae33 <- c("oae_el", "oae_ng") diff --git a/inst/compareScenarios/preprocessing.R b/inst/compareScenarios/preprocessing.R index 274a968c..508693c0 100644 --- a/inst/compareScenarios/preprocessing.R +++ b/inst/compareScenarios/preprocessing.R @@ -80,6 +80,7 @@ pCapVariables <- tribble( "Emi|CO2|CDR|BECCS", "t CO2eq/yr/pCap", 1e6, "Emi|CO2|CDR|Industry CCS|Synthetic Fuels", "t CO2eq/yr/pCap", 1e6, "Emi|CO2|CDR|DACCS", "t CO2eq/yr/pCap", 1e6, + "Emi|CO2|CDR|OAE", "t CO2eq/yr/pCap", 1e6, "Emi|CO2|CDR|EW", "t CO2eq/yr/pCap", 1e6, "Emi|CO2", "t CO2eq/yr/pCap", 1e6, "Emi|CO2|Land-Use Change", "t CO2eq/yr/pCap", 1e6, From f5c579bcdadc26043005d5c4287208ee6f85ae5d Mon Sep 17 00:00:00 2001 From: Katarzyna Kowalczyk Date: Sat, 10 Aug 2024 10:44:11 +0200 Subject: [PATCH 5/8] Increase version --- .buildlibrary | 2 +- CITATION.cff | 4 ++-- DESCRIPTION | 4 ++-- README.md | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index bffa080a..7c16fb7c 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '229216392' +ValidationKey: '229367500' AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' - 'Warning: namespace ''.*'' is not available and has been replaced' diff --git a/CITATION.cff b/CITATION.cff index 59627ddc..b17bd01d 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -2,8 +2,8 @@ cff-version: 1.2.0 message: If you use this software, please cite it using the metadata from this file. type: software title: 'remind2: The REMIND R package (2nd generation)' -version: 1.149.3 -date-released: '2024-08-09' +version: 1.150.0 +date-released: '2024-08-10' abstract: Contains the REMIND-specific routines for data and model output manipulation. authors: - family-names: Rodrigues diff --git a/DESCRIPTION b/DESCRIPTION index e813188e..d71ac85e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: remind2 Title: The REMIND R package (2nd generation) -Version: 1.149.3 -Date: 2024-08-09 +Version: 1.150.0 +Date: 2024-08-10 Authors@R: c( person("Renato", "Rodrigues", , "renato.rodrigues@pik-potsdam.de", role = c("aut", "cre")), person("Lavinia", "Baumstark", role = "aut"), diff --git a/README.md b/README.md index 6b331bc2..213c7958 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # The REMIND R package (2nd generation) -R package **remind2**, version **1.149.3** +R package **remind2**, version **1.150.0** [![CRAN status](https://www.r-pkg.org/badges/version/remind2)](https://cran.r-project.org/package=remind2) [![R build status](https://github.com/pik-piam/remind2/workflows/check/badge.svg)](https://github.com/pik-piam/remind2/actions) [![codecov](https://codecov.io/gh/pik-piam/remind2/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/remind2) [![r-universe](https://pik-piam.r-universe.dev/badges/remind2)](https://pik-piam.r-universe.dev/builds) @@ -49,7 +49,7 @@ In case of questions / problems please contact Renato Rodrigues . +Rodrigues R, Baumstark L, Benke F, Dietrich J, Dirnaichner A, Duerrwaechter J, Führlich P, Giannousakis A, Hasse R, Hilaire J, Klein D, Koch J, Kowalczyk K, Levesque A, Malik A, Merfort A, Merfort L, Morena-Leiva S, Pehl M, Pietzcker R, Rauner S, Richters O, Rottoli M, Schötz C, Schreyer F, Siala K, Sörgel B, Spahr M, Strefler J, Verpoort P, Weigmann P, Rüter T (2024). _remind2: The REMIND R package (2nd generation)_. R package version 1.150.0, . A BibTeX entry for LaTeX users is @@ -58,7 +58,7 @@ A BibTeX entry for LaTeX users is title = {remind2: The REMIND R package (2nd generation)}, author = {Renato Rodrigues and Lavinia Baumstark and Falk Benke and Jan Philipp Dietrich and Alois Dirnaichner and Jakob Duerrwaechter and Pascal Führlich and Anastasis Giannousakis and Robin Hasse and Jérome Hilaire and David Klein and Johannes Koch and Katarzyna Kowalczyk and Antoine Levesque and Aman Malik and Anne Merfort and Leon Merfort and Simón Morena-Leiva and Michaja Pehl and Robert Pietzcker and Sebastian Rauner and Oliver Richters and Marianna Rottoli and Christof Schötz and Felix Schreyer and Kais Siala and Björn Sörgel and Mike Spahr and Jessica Strefler and Philipp Verpoort and Pascal Weigmann and Tonn Rüter}, year = {2024}, - note = {R package version 1.149.3}, + note = {R package version 1.150.0}, url = {https://github.com/pik-piam/remind2}, } ``` From 573be959dba281c708e53a1ade99a144370a7648 Mon Sep 17 00:00:00 2001 From: Katarzyna Kowalczyk Date: Sat, 10 Aug 2024 10:45:58 +0200 Subject: [PATCH 6/8] Use electric calciner instead of novel calciner --- R/reportFE.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/reportFE.R b/R/reportFE.R index 592a1189..e7f558b2 100644 --- a/R/reportFE.R +++ b/R/reportFE.R @@ -960,7 +960,7 @@ reportFE <- function(gdx, regionSubsetList = NULL, # KK: Mappings from gams set names to names in mifs. If new CDR methods are added to REMIND, please add # the method to CDR_te_list: ""="" # If a final energy carrier not included in CDR_FE_list is used, please also add it to the list. - CDR_te_list <- list("dac"="DAC", "weathering"="EW", "oae_ng"="OAE, traditional calciner", "oae_el"="OAE, novel calciner") + CDR_te_list <- list("dac"="DAC", "weathering"="EW", "oae_ng"="OAE, electric calciner", "oae_el"="OAE, novel calciner") CDR_FE_list <- list("feels"="Electricity", "fegas"="Gases", "fehes"="Heat", "feh2s"="Hydrogen", "fedie"="Diesel") # loop to compute variables "FE|CDR|++| (EJ/yr)" and "FE|CDR||+| (EJ/yr)", From f66609a3a035ca12acfda7ddad831543a14b97f3 Mon Sep 17 00:00:00 2001 From: Katarzyna Kowalczyk Date: Wed, 21 Aug 2024 13:04:48 +0200 Subject: [PATCH 7/8] Library version --- .buildlibrary | 2 +- CITATION.cff | 4 ++-- DESCRIPTION | 4 ++-- README.md | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index fc4b7088..6a007fd3 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '229425000' +ValidationKey: '229693560' AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' - 'Warning: namespace ''.*'' is not available and has been replaced' diff --git a/CITATION.cff b/CITATION.cff index c608f47a..ba89e588 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -2,8 +2,8 @@ cff-version: 1.2.0 message: If you use this software, please cite it using the metadata from this file. type: software title: 'remind2: The REMIND R package (2nd generation)' -version: 1.150.0 -date-released: '2024-08-15' +version: 1.151.0 +date-released: '2024-08-21' abstract: Contains the REMIND-specific routines for data and model output manipulation. authors: - family-names: Rodrigues diff --git a/DESCRIPTION b/DESCRIPTION index 460b56fd..e731ef6c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: remind2 Title: The REMIND R package (2nd generation) -Version: 1.150.0 -Date: 2024-08-15 +Version: 1.151.0 +Date: 2024-08-21 Authors@R: c( person("Renato", "Rodrigues", , "renato.rodrigues@pik-potsdam.de", role = c("aut", "cre")), person("Lavinia", "Baumstark", role = "aut"), diff --git a/README.md b/README.md index 213c7958..a02fb465 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # The REMIND R package (2nd generation) -R package **remind2**, version **1.150.0** +R package **remind2**, version **1.151.0** [![CRAN status](https://www.r-pkg.org/badges/version/remind2)](https://cran.r-project.org/package=remind2) [![R build status](https://github.com/pik-piam/remind2/workflows/check/badge.svg)](https://github.com/pik-piam/remind2/actions) [![codecov](https://codecov.io/gh/pik-piam/remind2/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/remind2) [![r-universe](https://pik-piam.r-universe.dev/badges/remind2)](https://pik-piam.r-universe.dev/builds) @@ -49,7 +49,7 @@ In case of questions / problems please contact Renato Rodrigues . +Rodrigues R, Baumstark L, Benke F, Dietrich J, Dirnaichner A, Duerrwaechter J, Führlich P, Giannousakis A, Hasse R, Hilaire J, Klein D, Koch J, Kowalczyk K, Levesque A, Malik A, Merfort A, Merfort L, Morena-Leiva S, Pehl M, Pietzcker R, Rauner S, Richters O, Rottoli M, Schötz C, Schreyer F, Siala K, Sörgel B, Spahr M, Strefler J, Verpoort P, Weigmann P, Rüter T (2024). _remind2: The REMIND R package (2nd generation)_. R package version 1.151.0, . A BibTeX entry for LaTeX users is @@ -58,7 +58,7 @@ A BibTeX entry for LaTeX users is title = {remind2: The REMIND R package (2nd generation)}, author = {Renato Rodrigues and Lavinia Baumstark and Falk Benke and Jan Philipp Dietrich and Alois Dirnaichner and Jakob Duerrwaechter and Pascal Führlich and Anastasis Giannousakis and Robin Hasse and Jérome Hilaire and David Klein and Johannes Koch and Katarzyna Kowalczyk and Antoine Levesque and Aman Malik and Anne Merfort and Leon Merfort and Simón Morena-Leiva and Michaja Pehl and Robert Pietzcker and Sebastian Rauner and Oliver Richters and Marianna Rottoli and Christof Schötz and Felix Schreyer and Kais Siala and Björn Sörgel and Mike Spahr and Jessica Strefler and Philipp Verpoort and Pascal Weigmann and Tonn Rüter}, year = {2024}, - note = {R package version 1.150.0}, + note = {R package version 1.151.0}, url = {https://github.com/pik-piam/remind2}, } ``` From 0980144e4e743ecab5e25caf982b05dc9cb76950 Mon Sep 17 00:00:00 2001 From: Katarzyna Kowalczyk Date: Wed, 21 Aug 2024 20:07:46 +0200 Subject: [PATCH 8/8] Last bug :) --- R/reportFE.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/reportFE.R b/R/reportFE.R index e7f558b2..5150242f 100644 --- a/R/reportFE.R +++ b/R/reportFE.R @@ -960,7 +960,7 @@ reportFE <- function(gdx, regionSubsetList = NULL, # KK: Mappings from gams set names to names in mifs. If new CDR methods are added to REMIND, please add # the method to CDR_te_list: ""="" # If a final energy carrier not included in CDR_FE_list is used, please also add it to the list. - CDR_te_list <- list("dac"="DAC", "weathering"="EW", "oae_ng"="OAE, electric calciner", "oae_el"="OAE, novel calciner") + CDR_te_list <- list("dac"="DAC", "weathering"="EW", "oae_ng"="OAE, traditional calciner", "oae_el"="OAE, electric calciner") CDR_FE_list <- list("feels"="Electricity", "fegas"="Gases", "fehes"="Heat", "feh2s"="Hydrogen", "fedie"="Diesel") # loop to compute variables "FE|CDR|++| (EJ/yr)" and "FE|CDR||+| (EJ/yr)",