Skip to content

Commit

Permalink
bugfixing "combined" swithc in SupplPlotsCropShr.R
Browse files Browse the repository at this point in the history
changing the name from "Surface Temperature" to "Surface Warming"
  • Loading branch information
bodirsky committed May 4, 2023
1 parent 58a0677 commit 5820290
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '8513197'
ValidationKey: '8552159'
AutocreateReadme: yes
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: software
title: |-
m4fsdp: MAgPIE outputs R package for MAgPIE version 4.x to create outputs
for FSDP project
version: 0.43.7
version: 0.43.9
date-released: '2023-05-04'
abstract: Output routines for extracting results from the MAgPIE framework (versions
4.x) for the FSDP project.
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Type: Package
Package: m4fsdp
Title: MAgPIE outputs R package for MAgPIE version 4.x to create outputs
for FSDP project
Version: 0.43.7
Version: 0.43.9
Date: 2023-05-04
Authors@R: c(
person("Benjamin Leon", "Bodirsky", , "bodirsky@pik-potsdam.de", role = c("aut", "cre")),
Expand Down
4 changes: 3 additions & 1 deletion R/SupplPlotsCropShr.R
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ SupplPlotsCropShr <- function(outFolder, file = NULL, scenarios = c("BAU", "FSDP
)

if (!combined) {
CropShrReg <- CropShrReg + ggtitle(paste(getScenarios()[which(getScenarios()[,1]==scenario),2], year))
if (!is.null(file)) {
if (panel == "row") {
ggsave(filename = paste0(suppFolder, rev, "_", scenario, "_", year, "_REG_", file), CropShrReg, width = 9, height = 3, scale = 1)
Expand Down Expand Up @@ -218,6 +219,7 @@ SupplPlotsCropShr <- function(outFolder, file = NULL, scenarios = c("BAU", "FSDP

if (!is.null(file)) {
if (!combined) {
CropShrGlo <- CropShrGlo + ggtitle(paste(getScenarios()[which(getScenarios()[,1]==scenario),2], year))
ggsave(filename = paste0(suppFolder, rev, "_", scenario, "_", year, "_GLO_", file), CropShrGlo, width = 12, height = 6, scale = 1)
} else {
ggsave(filename = paste0(suppFolder, rev, "_", scenario, "_", year, "_", file), CropShrAll, width = 6, height = 7, scale = 1.4)
Expand All @@ -236,7 +238,7 @@ SupplPlotsCropShr <- function(outFolder, file = NULL, scenarios = c("BAU", "FSDP
for (yr in plotyears) {
if (!(yr == "2020" && scen != "BAU")) {
gdx <- paste(outFolder, gdxFolder[grep(scen, gdxFolder)], "fulldata.gdx", sep = "/")
.plotCropShr(gdx = gdx, file = file, scenario = scen, year = yr, combined = TRUE)
.plotCropShr(gdx = gdx, file = file, scenario = scen, year = yr, combined = combined)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion R/spatialMapsAllFSMDiffmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ spatialMapsAllFSMDiffmap <- function(repReg, repIso, repGrid, reg2iso, file = NU
#ggsave("plotGHG.png",plotGHG)

# Environment: Global Surface Temp
title <- "i) Global Surface Temperature"
title <- "i) Global Surface Warming"
unit <- "deg C"
caption <- "Projection: Mollweide"
b <- droplevels(repGrid[variable == "Global Surface Temperature (C)", ])
Expand Down
2 changes: 1 addition & 1 deletion R/spatialMapsFSDP.R
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ spatialMapsFSDP <- function(repReg, repIso, repGrid, reg2iso, file = NULL, recal
hjust = 0, vjust = 0, color = "white", size = 18 / .pt, lineheight = 0.7)

# Environment: Global Surface Temp
title <- "m) Global Surface Temperature"
title <- "m) Global Surface Warming"
unit <- "deg C"
caption <- "Projection: Mollweide"
b <- droplevels(repGrid[variable == "Global Surface Temperature (C)", ])
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MAgPIE outputs R package for MAgPIE version 4.x to create outputs
for FSDP project

R package **m4fsdp**, version **0.43.7**
R package **m4fsdp**, version **0.43.9**

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

Expand Down Expand Up @@ -40,7 +40,7 @@ In case of questions / problems please contact Benjamin Leon Bodirsky <bodirsky@

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

Bodirsky B, Dietrich J, Humpenoeder F (2023). _m4fsdp: MAgPIE outputs R package for MAgPIE version 4.x to create outputs for FSDP project_. doi:? <https://doi.org/%3F>, R package version 0.43.7, <https://github.com/pik-piam/m4fsdp>.
Bodirsky B, Dietrich J, Humpenoeder F (2023). _m4fsdp: MAgPIE outputs R package for MAgPIE version 4.x to create outputs for FSDP project_. doi:? <https://doi.org/%3F>, R package version 0.43.9, <https://github.com/pik-piam/m4fsdp>.

A BibTeX entry for LaTeX users is

Expand All @@ -50,7 +50,7 @@ A BibTeX entry for LaTeX users is
for FSDP project},
author = {Benjamin Leon Bodirsky and Jan Philipp Dietrich and Florian Humpenoeder},
year = {2023},
note = {R package version 0.43.7},
note = {R package version 0.43.9},
doi = {?},
url = {https://github.com/pik-piam/m4fsdp},
}
Expand Down

0 comments on commit 5820290

Please sign in to comment.