Skip to content

Commit

Permalink
Merge pull request #629 from katarkow/ng-el-OAE
Browse files Browse the repository at this point in the history
Report ocean CDR
  • Loading branch information
katarkow authored Aug 21, 2024
2 parents 3b1e83a + 0980144 commit 27632ce
Show file tree
Hide file tree
Showing 11 changed files with 211 additions and 83 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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", , "[email protected]", role = c("aut", "cre")),
person("Lavinia", "Baumstark", role = "aut"),
Expand Down
250 changes: 177 additions & 73 deletions R/reportEmi.R

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion R/reportFE.R
Original file line number Diff line number Diff line change
Expand Up @@ -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: "<method name in REMIND>"="<method name displayed in reporting>"
# 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|++|<CDR technology> (EJ/yr)" and "FE|CDR|<CDR technology>|+|<FE type> (EJ/yr)",
Expand Down
2 changes: 1 addition & 1 deletion R/reportLCOE.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down Expand Up @@ -49,7 +49,7 @@ In case of questions / problems please contact Renato Rodrigues <renato.rodrigue

To cite package **remind2** in publications use:

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, <https://github.com/pik-piam/remind2>.
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, <https://github.com/pik-piam/remind2>.

A BibTeX entry for LaTeX users is

Expand All @@ -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},
}
```
3 changes: 3 additions & 0 deletions inst/compareScenarios/cs_01_summary.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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")
```
Expand All @@ -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")
```
Expand Down Expand Up @@ -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")
```
Expand Down
16 changes: 16 additions & 0 deletions inst/compareScenarios/cs_03_emissions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand All @@ -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 <-
Expand Down Expand Up @@ -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")
```
Expand Down
1 change: 1 addition & 0 deletions inst/compareScenarios/preprocessing.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions inst/extdata/additional_summation_checks.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 27632ce

Please sign in to comment.