Skip to content

Commit

Permalink
remove bunker correction for deprecated emissisons variables correcte…
Browse files Browse the repository at this point in the history
…d for non-energy use
  • Loading branch information
Felix Schreyer authored and Felix Schreyer committed Aug 16, 2024
1 parent 161f911 commit da59e10
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions R/reportEmi.R
Original file line number Diff line number Diff line change
Expand Up @@ -2482,45 +2482,13 @@ reportEmi <- function(gdx, output = NULL, regionSubsetList = NULL,
)


# if non-energy use variables exist, also do bunker correction for variables
# w/o non-energy use
if ( "FE|Non-energy Use|Industry (EJ/yr)" %in% getNames(output)
&& "FE|Non-energy Use|Industry|+|Liquids (EJ/yr)" %in% getNames(output)
&& "FE|Non-energy Use|Industry|+|Gases (EJ/yr)" %in% getNames(output)
&& "FE|Non-energy Use|Industry|+|Solids (EJ/yr)" %in% getNames(output)
&& exists('emi.vars.wNonEn')) {

emi.vars.wBunkers.wNonEn <- intersect(emi.vars.wBunkers, emi.vars.wNonEn)

# remove all pluses from the "Emi w/o Non-energy Use" variables as they do not cover sectors in which non-energy use not relevant and checking aggregation does not make sense
emi.vars.wBunkers.wNonEn <- deletePlus(emi.vars.wBunkers.wNonEn)

emi.vars.wBunkers.wNonEn <- gsub("Emi\\|CO2", "Emi|CO2|w/o Non-energy Use", emi.vars.wBunkers.wNonEn)
emi.vars.wBunkers.wNonEn <- gsub("Emi\\|GHG", "Emi|GHG|w/o Non-energy Use", emi.vars.wBunkers.wNonEn)

emi.vars.wBunkers <- c(emi.vars.wBunkers, emi.vars.wBunkers.wNonEn)

}

# add emissions variables with LULUCF national accounting
if (!is.null(p47_LULUCFEmi_GrassiShift)) {

emi.vars.wBunkers <- c(emi.vars.wBunkers,
"Emi|GHG|LULUCF national accounting (Mt CO2eq/yr)",
"Emi|CO2|LULUCF national accounting (Mt CO2/yr)" )

# add bunker correction for emissions variables with LULUCF national accounting and w/o non-energy use
if ( "FE|Non-energy Use|Industry (EJ/yr)" %in% getNames(output)
&& "FE|Non-energy Use|Industry|+|Liquids (EJ/yr)" %in% getNames(output)
&& "FE|Non-energy Use|Industry|+|Gases (EJ/yr)" %in% getNames(output)
&& "FE|Non-energy Use|Industry|+|Solids (EJ/yr)" %in% getNames(output)
&& exists('emi.vars.wNonEn')) {

emi.vars.wBunkers <- c(emi.vars.wBunkers,
"Emi|GHG|w/o Non-energy Use|LULUCF national accounting (Mt CO2eq/yr)",
"Emi|CO2|w/o Non-energy Use|LULUCF national accounting (Mt CO2/yr)" )

}
}

# variable names for emission variables with bunkers, insert w/ Bunkers
Expand Down

0 comments on commit da59e10

Please sign in to comment.