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/R/reportEmi.R b/R/reportEmi.R index 504d7dcc..6129aa29 100644 --- a/R/reportEmi.R +++ b/R/reportEmi.R @@ -159,7 +159,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,10 +173,44 @@ 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) } + + 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, emiOAE) + vm_emiCdrTeDetail <- setNames(vm_emiCdrTeDetail, c("dac", "weathering", "oae_ng", "oae_el")) + } + + if (!"oae_ng" %in% getItems(vm_emiCdrTeDetail, dim = 3)) { + 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(v33_emiDAC, v33_emiEW) - vm_emiCdrTeDetail <- setNames(vm_emiCdrTeDetail, c("dac", "weathering")) + 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", react = "silent") + if (is.null(s33_capture_rate)) { + s33_capture_rate <- 0.9 + te_oae33 <- c("oae_el", "oae_ng") } + # stored CO2 vm_co2CCS <- readGDX(gdx, "vm_co2CCS", field = "l", restore_zeros = F)[, t, ] # CO2 captured by industry sectors @@ -629,8 +663,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 # add waste emissions of energy supply sector + out[,,"Emi|CO2|Energy|Supply|Waste (Mt CO2/yr)"], "Emi|CO2|Energy|+|Supply (Mt CO2/yr)"), @@ -717,6 +756,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 @@ -736,6 +777,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 @@ -1285,17 +1328,18 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL, } else { mselect(vm_emiTeMkt, all_enty = "co2") } + 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"]) + # 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 ---- @@ -1340,8 +1384,10 @@ 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) - setNames((vm_emiCdrTeDetail[, , "weathering"] + vm_emiCdrTeDetail[, , "dac"] * p_share_CCS) * GtC_2_MtCO2, + # negative emissions from (non-BECCS) CDR (DACCS, EW, OAE) + setNames(( + vm_emiCdr_co2 - vm_emiCdrTeDetail[, , "dac"] * (1 - p_share_CCS) + ) * GtC_2_MtCO2, "Emi|CO2|+|non-BECCS CDR (Mt CO2/yr)") ) } else { @@ -1371,7 +1417,9 @@ 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_emiCdr_co2 - vm_emiCdrTeDetail[, , "dac"] * (1 - p_share_CCS) + ) * GtC_2_MtCO2, "Emi|CO2|+|non-BECCS CDR (Mt CO2/yr)") ) } @@ -1580,6 +1628,20 @@ 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_capture_rate * dimSums(v33_co2emi_non_atm_calcination, dim = 3) + * GtC_2_MtCO2, + "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, "Carbon Management|Carbon Capture (Mt CO2/yr)") @@ -1872,7 +1934,15 @@ 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)"), + 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 @@ -1930,6 +2000,8 @@ 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|+|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)"] @@ -1939,6 +2011,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)) { @@ -1949,37 +2102,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)"), - # 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, @@ -1988,50 +2114,25 @@ 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)"], "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)"), - # 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? 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)") @@ -2718,7 +2819,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 @@ -2751,7 +2853,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 { ####################################### @@ -2815,7 +2916,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 @@ -3247,6 +3349,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)" ) @@ -3273,6 +3376,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..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") + 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)", 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") 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}, } ``` 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 c49ddd36..fdbfd202 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") @@ -342,6 +343,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") @@ -356,11 +358,24 @@ 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") ``` +#### 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 <- @@ -404,6 +419,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/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, 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