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

update IEA Energy Balances #536

Merged
merged 3 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '37361999'
ValidationKey: '37383840'
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: 'mrremind: MadRat REMIND Input Data Package'
version: 0.187.1
date-released: '2024-09-03'
version: 0.187.2
date-released: '2024-09-04'
abstract: The mrremind packages contains data preprocessing for the REMIND model.
authors:
- family-names: Baumstark
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: mrremind
Title: MadRat REMIND Input Data Package
Version: 0.187.1
Date: 2024-09-03
Version: 0.187.2
Date: 2024-09-04
Authors@R: c(
person("Lavinia", "Baumstark", , "[email protected]", role = c("aut", "cre")),
person("Renato", "Rodrigues", role = "aut"),
Expand Down
2 changes: 1 addition & 1 deletion R/calcFE.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ calcFE <- function(source = "IEA", scenario_proj = "SSP2", ieaVersion = "default
colnames(map) <- gsub("io", "names_in", colnames(map))

# Give description
ieaYear <- if (ieaVersion == "default") 2022 else 2023
ieaYear <- if (ieaVersion == "default") 2022 else 2024
descript <- paste0("IEA Final Energy Data based on ", ieaYear, " version of IEA Energy Balances")

#------ PROCESS DATA ------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion R/calcIO.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ calcIO <- function(subtype = c("input", "output", "output_biomass", "trade",
}

ieaSubtype <- if (ieaVersion == "default") "EnergyBalances" else "EnergyBalances-latest"
ieaYear <- if (ieaVersion == "default") 2022 else 2023
ieaYear <- if (ieaVersion == "default") 2022 else 2024

# read in data and convert from ktoe to EJ
data <- readSource("IEA", subtype = ieaSubtype) * 4.1868e-5
Expand Down
2 changes: 1 addition & 1 deletion R/calcPE.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ calcPE <- function(subtype = "IEA", ieaVersion = "default") {
x <- mbind(x, setNames(dimSums(x[, , "PE|Gas", pmatch = TRUE], dim = 3), "PE|Gas (EJ/yr)"))
x <- mbind(x, setNames(dimSums(x[, , "PE|Biomass", pmatch = TRUE], dim = 3), "PE|Biomass (EJ/yr)"))

ieaYear <- if (ieaVersion == "default") 2022 else 2023
ieaYear <- if (ieaVersion == "default") 2022 else 2024

return(list(x = x, weight = NULL, unit = "EJ",
description = paste0("IEA Primary Energy Data based on ", ieaYear,
Expand Down
2 changes: 1 addition & 1 deletion R/calcTrade.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ calcTrade <- function() {

return(list(
x = x, weight = NULL, unit = "EJ",
description = "IEA Final Energy Data based on 2023 version of IEA Energy Balances"
description = "IEA Final Energy Data based on 2024 version of IEA Energy Balances"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean an update for teh input data or only for the validaiton data?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calcTrade is used to generate historical.mif only

))
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MadRat REMIND Input Data Package

R package **mrremind**, version **0.187.1**
R package **mrremind**, version **0.187.2**

[![CRAN status](https://www.r-pkg.org/badges/version/mrremind)](https://cran.r-project.org/package=mrremind) [![R build status](https://github.com/pik-piam/mrremind/workflows/check/badge.svg)](https://github.com/pik-piam/mrremind/actions) [![codecov](https://codecov.io/gh/pik-piam/mrremind/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/mrremind) [![r-universe](https://pik-piam.r-universe.dev/badges/mrremind)](https://pik-piam.r-universe.dev/builds)

Expand Down Expand Up @@ -39,7 +39,7 @@ In case of questions / problems please contact Lavinia Baumstark <lavinia@pik-po

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

Baumstark L, Rodrigues R, Levesque A, Oeser J, Bertram C, Mouratiadou I, Malik A, Schreyer F, Soergel B, Rottoli M, Mishra A, Dirnaichner A, Pehl M, Giannousakis A, Klein D, Strefler J, Feldhaus L, Brecha R, Rauner S, Dietrich J, Bi S, Benke F, Weigmann P, Richters O, Hasse R, Fuchs S, Mandaroux R, Koch J (2024). _mrremind: MadRat REMIND Input Data Package_. R package version 0.187.1, <https://github.com/pik-piam/mrremind>.
Baumstark L, Rodrigues R, Levesque A, Oeser J, Bertram C, Mouratiadou I, Malik A, Schreyer F, Soergel B, Rottoli M, Mishra A, Dirnaichner A, Pehl M, Giannousakis A, Klein D, Strefler J, Feldhaus L, Brecha R, Rauner S, Dietrich J, Bi S, Benke F, Weigmann P, Richters O, Hasse R, Fuchs S, Mandaroux R, Koch J (2024). _mrremind: MadRat REMIND Input Data Package_. R package version 0.187.2, <https://github.com/pik-piam/mrremind>.

A BibTeX entry for LaTeX users is

Expand All @@ -48,7 +48,7 @@ A BibTeX entry for LaTeX users is
title = {mrremind: MadRat REMIND Input Data Package},
author = {Lavinia Baumstark and Renato Rodrigues and Antoine Levesque and Julian Oeser and Christoph Bertram and Ioanna Mouratiadou and Aman Malik and Felix Schreyer and Bjoern Soergel and Marianna Rottoli and Abhijeet Mishra and Alois Dirnaichner and Michaja Pehl and Anastasis Giannousakis and David Klein and Jessica Strefler and Lukas Feldhaus and Regina Brecha and Sebastian Rauner and Jan Philipp Dietrich and Stephen Bi and Falk Benke and Pascal Weigmann and Oliver Richters and Robin Hasse and Sophie Fuchs and Rahel Mandaroux and Johannes Koch},
year = {2024},
note = {R package version 0.187.1},
note = {R package version 0.187.2},
url = {https://github.com/pik-piam/mrremind},
}
```
Loading