Skip to content

Commit

Permalink
add rmndt import
Browse files Browse the repository at this point in the history
  • Loading branch information
fbenke-pik committed Jul 23, 2024
1 parent 0d302fd commit 56ff7e3
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '36498936'
ValidationKey: '36526191'
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.183.2
date-released: '2024-07-19'
version: 0.183.3
date-released: '2024-07-23'
abstract: The mrremind packages contains data preprocessing for the REMIND model.
authors:
- family-names: Baumstark
Expand Down
5 changes: 3 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.183.2
Date: 2024-07-19
Version: 0.183.3
Date: 2024-07-23
Authors@R: c(
person("Lavinia", "Baumstark", , "[email protected]", role = c("aut", "cre")),
person("Renato", "Rodrigues", role = "aut"),
Expand Down Expand Up @@ -64,6 +64,7 @@ Imports:
readxl,
reshape2,
rlang,
rmndt,
tibble,
tidyr,
tidyselect,
Expand Down
4 changes: 2 additions & 2 deletions R/calcEDGETransport.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ calcEDGETransport <- function(subtype) {
weight[weight < 1e-5] <- 0
#check whether weightsum is zero for some cases
#if so, the values should just be aggregated equally in order to prevent zeros in the results
weight <- magpie2dt(weight)
weight <- rmndt::magpie2dt(weight)
regMap <- toolGetMapping(getConfig("regionmapping"), type = "regional", where = "mappingfolder")
setnames(regMap, "CountryCode", "all_regi")
weight <- merge(weight, regMap[, c("all_regi", "RegionCode")], by = "all_regi")
Expand All @@ -35,7 +35,7 @@ calcEDGETransport <- function(subtype) {
weight[weight < 1e-5] <- 0
#check whether weightsum is zero for some cases
#if so, the values should just be aggregated equally in order to prevent zeros in the results
weight <- magpie2dt(weight)
weight <- rmndt::magpie2dt(weight)
regMap <- toolGetMapping(getConfig("regionmapping"), type = "regional", where = "mappingfolder")
setnames(regMap, "CountryCode", "all_regi")
weight <- merge(weight, regMap[, c("all_regi", "RegionCode")], by = "all_regi")
Expand Down
4 changes: 1 addition & 3 deletions R/fullREMIND.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ fullREMIND <- function() {
rem_years <- seq(2005, 2150, 5)
rem_years_hist <- seq(1990, 2150, 5)

madratAttach("edgeTransport") # enable madrat caching for edgeTransport

#-------------- macro-economic parameters -----------------------------------------------------------
calcOutput("Population", years = rem_years_hist, round = 8, file = "f_pop.cs3r")
calcOutput("Labour", years = rem_years, round = 8, file = "f_lab.cs3r")
Expand Down Expand Up @@ -174,7 +172,7 @@ fullREMIND <- function() {

#--------------- EDGE Transport ---------------------------------------------------------------------
calcOutput("TransportGDPshare", round = 6, file = "f35_transportGDPshare.cs4r")

calcOutput("EDGETransport", subtype = "f35_esCapCost", file = "f35_esCapCost.cs4r")
calcOutput("EDGETransport", subtype = "f35_fe2es", file = "f35_fe2es.cs4r")
calcOutput("EDGETransport", subtype = "f35_demByTech", file = "f35_demByTech.cs4r")
Expand Down
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.183.2**
R package **mrremind**, version **0.183.3**

[![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.183.2, <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.183.3, <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.183.2},
note = {R package version 0.183.3},
url = {https://github.com/pik-piam/mrremind},
}
```
4 changes: 2 additions & 2 deletions man/toolFillEU34Countries.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 56ff7e3

Please sign in to comment.