Skip to content

Commit

Permalink
Merge pull request pik-piam#627 from robertpietzcker/updateCS2_2024-0…
Browse files Browse the repository at this point in the history
…7-08

cs2: added new plots for energy supply, energy services, carbon management, emissions. Restructure bookmarks
  • Loading branch information
robertpietzcker authored Jul 11, 2024
2 parents 19ded90 + fe90eb3 commit d3838cd
Show file tree
Hide file tree
Showing 10 changed files with 539 additions and 211 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '228274182'
ValidationKey: '228425050'
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.146.3
date-released: '2024-07-10'
version: 1.147.0
date-released: '2024-07-11'
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.146.3
Date: 2024-07-10
Version: 1.147.0
Date: 2024-07-11
Authors@R: c(
person("Renato", "Rodrigues", , "renato.rodrigues@pik-potsdam.de", role = c("aut", "cre")),
person("Lavinia", "Baumstark", role = "aut"),
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.146.3**
R package **remind2**, version **1.147.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.146.3, <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.147.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.146.3},
note = {R package version 1.147.0},
url = {https://github.com/pik-piam/remind2},
}
```
59 changes: 39 additions & 20 deletions inst/compareScenarios/cs_03_emissions.Rmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
\newpage

# Emissions

## GHG - total
Expand All @@ -14,23 +16,36 @@ showLinePlotsWithTarget(data, items)
showLinePlots(data, "Emi|GHG|w/ Bunkers")
```

```{r GHG - total with national LULUCF accounting - should match UNFCCC reporting}
showLinePlots(data, "Emi|GHG|w/ Bunkers|LULUCF national accounting")
```


## GHG Sectors

```{r GHG Sectors}
items <- c(
"Emi|GHG|Energy",
"Emi|GHG|Industrial Processes",
"Emi|GHG|Agriculture",
"Emi|GHG|Waste")
walk(items, showLinePlots, data = data)
### GHG Energy
```{r GHG Energy}
showLinePlots(data, "Emi|GHG|Energy")
```

### GHG Industrial Processes
```{r GHG Industrial Processes}
showLinePlots(data, "Emi|GHG|Industrial Processes")
```

### GHG Agriculture
```{r GHG Agriculture}
showLinePlots(data, "Emi|GHG|Agriculture")
```

### GHG Waste
```{r GHG Waste}
showLinePlots(data, "Emi|GHG|Waste")
```

## GHG - Market

### ETS

```{r GHG ETS}
items <- "Emi|GHG|ETS"
showLinePlots(data, items)
Expand All @@ -39,7 +54,6 @@ showLinePlotsWithTarget(data, items)


### ESR

```{r GHG ESR}
items <- "Emi|GHG|ESR"
showLinePlots(data, items)
Expand All @@ -50,16 +64,13 @@ Note: Reduction targets wrt 2005


### Other - Outside ETS and ESR

```{r GHG Other}
showLinePlots(data, "Emi|GHG|Outside ETS and ESR")
```


## CO2

### CO2 by sector (net emissions, incl. BECCS)

```{r CO2 by sector net incl. BECCS}
tot <- "Emi|CO2"
items <- c(
Expand Down Expand Up @@ -214,7 +225,7 @@ items <- c(
showAreaAndBarPlots(data, items, tot, scales = "fixed")
```

### Process Emissions Cement
#### Process Emissions Cement

```{r}
items <- c(
Expand All @@ -225,15 +236,15 @@ showLinePlots(data, items)
```


### Process Emissions Chemicals
#### Process Emissions Chemicals

```{r}
items <- c(
"Emi|CO2|Industrial Processes|Chemicals")
showLinePlots(data, items)
```

### Process Emissions Metals
#### Process Emissions Metals

```{r}
items <- c(
Expand All @@ -250,6 +261,14 @@ items <- c(
showLinePlots(data, items)
```

```{r CO2 Land-Use Change - LULUCF national accounting}
items <- c(
"Emi|CO2|Land-Use Change|LULUCF national accounting", # scenario
"Emi|CO2|Land Use") # historical
showLinePlots(data, items)
```



### non-BECCS CDR

Expand All @@ -258,8 +277,8 @@ showLinePlots(data, "Emi|CO2|non-BECCS CDR")
```

### CDR

```{r CO2 CDR}
#### CDR compared to other CO2 emissions
```{r CDR compared to other CO2 emissions}
tot <- "Emi|CO2"
items <- c(
"Emi|CO2|Gross|Energy and Industrial Processes",
Expand All @@ -272,7 +291,7 @@ items <- c(
showAreaAndBarPlots(data, items, tot, scales = "fixed")
```


#### Only CDR
```{r CO2 CDR Detail}
tot <- "Emi|CO2|CDR"
items <- c(
Expand All @@ -286,8 +305,8 @@ items <- c(
showAreaAndBarPlots(data, items, tot, scales = "fixed")
```


```{r CO2 CDR Subcategories}
#### CDR Subcategories - Line
```{r CO2 CDR Subcategories - Line}
cdrVars <-
levels(data$variable) %>%
str_subset(fixed("Emi|CO2|CDR|"))
Expand Down
83 changes: 77 additions & 6 deletions inst/compareScenarios/cs_04_energy_supply.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ showAreaAndBarPlots(data, items, orderVars = "user", scales = "fixed")

```{r Capacities Electricity}
items <- c(
"Cap|Electricity|Storage|Battery",
"Cap|Electricity|Solar",
if ("Cap|Electricity|Wind|Offshore" %in% levels(data$variable))
c("Cap|Electricity|Wind|Onshore", "Cap|Electricity|Wind|Offshore")
else
"Cap|Electricity|Wind",
"Cap|Electricity|Storage|Battery",
"Cap|Electricity|Hydro",
"Cap|Electricity|Nuclear",
"Cap|Electricity|Geothermal",
Expand Down Expand Up @@ -115,6 +115,7 @@ items <- c(
showAreaAndBarPlots(data, items, orderVars = "user", scales = "fixed")
```


### PE Gas
```{r PE Gas}
items <- c(
Expand All @@ -132,7 +133,6 @@ showAreaAndBarPlots(data, items, orderVars = "user", scales = "fixed")


### PE Biomass

```{r PE Biomass}
items <- c(
"PE|Biomass|Hydrogen|w/ CC",
Expand All @@ -148,16 +148,45 @@ items <- c(
showAreaAndBarPlots(data, items, orderVars = "user", scales = "fixed")
```

## Primary Energy line plots
### PE Oil
```{r PE Oil}
items <- c(
"PE|Oil",
NULL)
showAreaAndBarPlots(data, items, orderVars = "user", scales = "fixed")
```

```{r Primary Energy line plots}
## Primary Energy line plots
### PE Coal - Line
```{r PE Coal}
showLinePlots(data, "PE|Coal")
```

### PE Oil - Line
```{r PE Oil}
showLinePlots(data, "PE|Oil")
```

### PE Gas - Line
```{r PE Gas}
showLinePlots(data, "PE|Gas")
```

### PE Biomass - Line
```{r PE Biomass}
showLinePlots(data, "PE|Biomass")
```

### PE Biomass - Energy Crops - Line
```{r PE Biomass - Energy Crops}
showLinePlots(data, "Primary Energy Production|Biomass|Energy Crops")
```

### PE Geothermal - Line
```{r PE Geothermal}
showLinePlots(data, "PE|Geothermal")
```

### PE Coal Extraction
```{r PE Coal Extraction}
showLinePlots(data, "Res|Extraction|Coal")
Expand All @@ -175,9 +204,7 @@ showLinePlots(data, "Res|Extraction|Gas")

## Secondary Energy Mixes


### SE Electricity

```{r SE Electricity}
tot <- "SE|Electricity"
Expand Down Expand Up @@ -289,6 +316,20 @@ items <- c(
showAreaAndBarPlots(data, items, tot, scales = "fixed")
```

### SE Solids - Usage
```{r SE Solids - Usage}
tot <- "SE|Solids"
items <- c(
"SE|Solids|Input|T&D Losses",
"FE|CDR|Solids",
"FE|Transport|Solids",
"FE|Buildings|Solids",
"FE|Non-energy Use|Industry|Solids",
"FE|w/o Non-energy Use|Industry|Solids")
showAreaAndBarPlots(data, items, tot, orderVars = "user", scales = "fixed")
```

### SE Liquids

Expand All @@ -311,6 +352,22 @@ items <- c(
showAreaAndBarPlots(data, items, tot, orderVars="user", scales = "fixed")
```

### SE Liquids - Usage
```{r SE Liquids - Usage}
tot <- "SE|Liquids"
items <- c(
"SE|Liquids|Input|T&D Losses",
"FE|CDR|Liquids",
"FE|Buildings|Liquids",
"FE|Non-energy Use|Industry|Liquids",
"FE|w/o Non-energy Use|Industry|Liquids",
"FE|Transport|Bunkers|Liquids",
"FE|Transport|w/o Bunkers|Liquids")
showAreaAndBarPlots(data, items, tot, orderVars = "user", scales = "fixed")
```

### SE Gases
```{r SE Gases}
Expand All @@ -328,7 +385,21 @@ items <- c(
showAreaAndBarPlots(data, items, tot, orderVars="user", scales = "fixed")
```

### SE Gases - Usage
```{r SE Gases - Usage}
tot <- "SE|Gases"
items <- c(
"SE|Gases|Input|T&D Losses",
"FE|CDR|Gases",
"FE|Transport|Bunkers|Gases",
"FE|Transport|w/o Bunkers|Gases",
"FE|Buildings|Gases",
"FE|Non-energy Use|Industry|Gases",
"FE|w/o Non-energy Use|Industry|Gases")
showAreaAndBarPlots(data, items, tot, orderVars = "user", scales = "fixed")
```



Expand Down
Loading

0 comments on commit d3838cd

Please sign in to comment.