Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reporting and calculations for feedstocks and plastics #489

Merged
merged 40 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
790093a
adapt emissions reporting for feedstocks implementation: apply emissi…
Feb 21, 2022
833b0d4
make feedstock-related changes in emissions reporting backwards compa…
Feb 22, 2022
9099bf6
solve summations issues in emissions reporting after feedstock-relate…
Feb 22, 2022
d85b87a
remove deprecated reporting of emissions without non-energy use
Feb 22, 2022
c6c6a21
add FE reporting for FE without non-energy use for relevant sectors a…
Feb 22, 2022
1f80c2a
refactor and extend FE w/o Bunkers reporting for relevant variables
Feb 22, 2022
bb76433
add non-energy use related plots to compare scenario 2 script
Feb 23, 2022
72253e8
add further FE liquids variables to bunker correction part
Mar 7, 2022
3833700
correct bunker substraction for fossil, biomass, synthetic liquids
Mar 8, 2022
406833e
Merge branch 'master' of https://github.com/pik-piam/remind2 into Fee…
Mar 9, 2022
432ae5f
make bunkers correction backwards compatible with version without non…
Mar 11, 2022
f78238d
adapt reporting to include feedstock CDR, that is, carbon stored in p…
Mar 23, 2022
efbb784
fetch from main repo and fix conflicts
mellamoSimon Jul 21, 2022
286805b
fix bugs introduced when fetching
mellamoSimon Jul 22, 2022
53c625e
fix compatibility of reportEmi.R for feedstocks implementation
mellamoSimon Jul 29, 2022
96abe9d
fix conflicts with master
mellamoSimon Aug 11, 2022
dcfe4f3
fix reportEmi.R and another attempt to make this dev branch compatibl…
mellamoSimon Aug 31, 2022
608eb20
unfinished fix in reportFE.R for compatibility
mellamoSimon Sep 1, 2022
363d7e6
fix compatibility in reportFE.R for feedstocks implementation
mellamoSimon Nov 9, 2022
ce8a163
Merge branch 'master' of https://github.com/pik-piam/remind2 into Fel…
mellamoSimon Feb 20, 2023
c722672
Merge remote-tracking branch 'upstream/master' into Felix-feedstock2 …
mellamoSimon Jun 9, 2023
24c8995
remove temporary fix for feedstock reporting from new reporting of fe…
mellamoSimon Jun 9, 2023
77e746d
adapt feedstock reporting to new industry reporting framework, fix co…
mellamoSimon Jul 21, 2023
7225b04
unfinished: adapt feedstock and removal reporting to new industry rep…
mellamoSimon Aug 10, 2023
8ef57b0
debug feedstocks removals reporting in new industry framework
mellamoSimon Aug 10, 2023
a5f145d
Merge branch 'master' of https://github.com/pik-piam/remind2 into fee…
mellamoSimon Aug 14, 2023
e25501a
add plastics-related variables to emissions reporting and restrict ne…
mellamoSimon Aug 29, 2023
41d66ca
add plastic plots and fix emi|CO2 accounting
mellamoSimon Aug 31, 2023
5e00627
add plot in cs2 for plastics fate
mellamoSimon Sep 4, 2023
fbfb81e
bugfix: fix backwards compatibility of emissions reporting when chemi…
mellamoSimon Sep 4, 2023
a76ed3f
add historical UNFCCC data for process emissions and line plot for FE…
mellamoSimon Oct 12, 2023
3e667b1
Merge branch 'master' of https://github.com/pik-piam/remind2 into fee…
mellamoSimon Nov 23, 2023
b444663
fix comments
mellamoSimon Nov 23, 2023
831bd37
bugfix: missplaced bracket
mellamoSimon Nov 23, 2023
acac883
bugfix errors from master pull for backward compatibility
mellamoSimon Nov 24, 2023
e346fd8
delete spurious sets definitions
mellamoSimon Nov 24, 2023
740212f
un-do wrongly commented lines
mellamoSimon Nov 24, 2023
545affa
modify redundant variables
mellamoSimon Nov 27, 2023
9bcadda
Merge branch 'master' of https://github.com/pik-piam/remind2 into fee…
mellamoSimon Dec 7, 2023
7e24a6d
include products EoL emissions to energy emissions to fix summation c…
mellamoSimon Dec 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
430 changes: 373 additions & 57 deletions R/reportEmi.R

Large diffs are not rendered by default.

252 changes: 232 additions & 20 deletions R/reportFE.R

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion inst/markdown/compareScenarios2/cs2_01_summary.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ items <- c(
showAreaAndBarPlots(data, items, scales = "fixed")
```

## FE Industry by carrier
## FE Industry by carrier (incl. non-energy use)

```{r FE Industry by carrier}
items <- c(
Expand Down Expand Up @@ -204,6 +204,17 @@ items <- c(
showAreaAndBarPlots(data, items, scales = "fixed")
```


## FE Non-energy Use by carrier

```{r FE Non-energy Use by carrier}
items <- c(
"FE|Non-energy Use|Industry|Solids",
"FE|Non-energy Use|Industry|Liquids",
"FE|Non-energy Use|Industry|Gases")
showAreaAndBarPlots(data, items)
```

## SE Electricity by carrier

```{r SE Electricity by carrier}
Expand Down
46 changes: 43 additions & 3 deletions inst/markdown/compareScenarios2/cs2_03_emissions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ items <- c(
"Emi|CO2|Energy|Supply|Non-electric",
"Emi|CO2|Energy|Supply|Electricity w/ couple prod",
"Emi|CO2|CDR|DACCS",
"Emi|CO2|CDR|EW")
"Emi|CO2|CDR|EW",
"Emi|CO2|Plastics incineration",
"Emi|CO2|Feedstocks unknown fate"
)
showAreaAndBarPlots(data, items, tot, scales = "fixed")
```

Expand Down Expand Up @@ -229,8 +232,45 @@ showLinePlots(data, "Emi|CO2|Energy|Demand|Transport|International Bunkers")

```{r CO2 Process Emissions}
items <- c(
"Emi|CO2|Industrial Processes", # scenario
"Emi|CO2|FFaI|Industry|Process") # historical
"Emi|CO2|Industrial Processes"#, # scenario
# "Emi|CO2|FFaI|Industry|Process"
) # historical
showLinePlots(data, items)
```

```{r CO2 Process Emissions}
tot <- c("Emi|CO2|Industrial Processes")
items <- c(
"Emi|CO2|Industrial Processes|Chemicals",
"Emi|CO2|Industrial Processes|Cement"
)
showAreaAndBarPlots(data, items, tot, scales = "fixed")
```

### Process Emissions Cement

```{r}
items <- c(
"Emi|CO2|Industrial Processes|Cement",
"Emi|CO2|Industrial Processes|Minerals" # to display historical data from UNFCCC
)
showLinePlots(data, items)
```


### Process Emissions Chemicals

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

### Process Emissions Metals

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

Expand Down
26 changes: 26 additions & 0 deletions inst/markdown/compareScenarios2/cs2_05_energy_demand.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@ items <- c(
showAreaAndBarPlots(data, items, tot, scales = "fixed")
```

### FE Total Chemicals
```{r FE Total Chemicals}
items <- c(
"FE|Industry|Chemicals")
showLinePlots(data, items)
```

### FE mix Other Industry
```{r FE mix Other Industry}
tot <- "FE|Industry|Other Industry"
Expand All @@ -215,6 +222,25 @@ showLinePlots(data, "FE|Industry|Chemicals")
showLinePlots(data, c("FE|Industry|Other Industry", "FE|Industry|other"))
```


### FE|Non-energy Use|Industry per carrier and SE origin

```{r}
tot <- "FE|Non-energy Use|Industry"
items <- c(
"FE|Non-energy Use|Industry|Solids|Fossil",
"FE|Non-energy Use|Industry|Solids|Biomass",
"FE|Non-energy Use|Industry|Liquids|Fossil",
"FE|Non-energy Use|Industry|Liquids|Biomass",
"FE|Non-energy Use|Industry|Liquids|Hydrogen",
"FE|Non-energy Use|Industry|Gases|Fossil",
"FE|Non-energy Use|Industry|Gases|Biomass",
"FE|Non-energy Use|Industry|Gases|Hydrogen")
showAreaAndBarPlots(data, items, tot)
```



### Specific Energy Consumption
```{r}
# estimated values for thermodynamic limits are hard coded here. Could be
Expand Down
24 changes: 24 additions & 0 deletions inst/markdown/compareScenarios2/cs2_09_carbon_management.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,27 @@ showAreaAndBarPlots(data,
'Carbon Management|Usage'),
tot = 'Carbon Management|Carbon Capture')
```

# Materials

## Total plastics production
```{r }
showLinePlots(data, "Carbon Management|Materials|Plastics")
```

## Plastics production by origin
```{r }
showAreaAndBarPlots(data,
vars = c("Carbon Management|Materials|Plastics|Fossil",
"Carbon Management|Materials|Plastics|Biomass",
"Carbon Management|Materials|Plastics|Synfuels"),
scales = "fixed")
```

## Plastics production by fate
```{r }
showAreaAndBarPlots(data,
vars = c("Carbon Management|Materials|Plastics|Incineration",
"Carbon Management|Materials|Plastics|Other destination"),
scales = "fixed")
```