From f909405e191e6cd6be7c6883ba468062fddd5b86 Mon Sep 17 00:00:00 2001 From: emolinab Date: Fri, 4 Oct 2024 15:43:06 +0200 Subject: [PATCH] bugfix calcISIMIP3bYields --- .buildlibrary | 2 +- CITATION.cff | 2 +- DESCRIPTION | 2 +- R/calcISIMIP3bYields.R | 6 +++--- README.md | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index d9b63a3..c1f0316 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '12480000' +ValidationKey: '12500000' AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' - 'Warning: namespace ''.*'' is not available and has been replaced' diff --git a/CITATION.cff b/CITATION.cff index 652db19..8888122 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -2,7 +2,7 @@ cff-version: 1.2.0 message: If you use this software, please cite it using the metadata from this file. type: software title: 'mrland: MadRaT land data package' -version: 0.62.4 +version: 0.62.5 date-released: '2024-10-04' abstract: The package provides land related data via the madrat framework. authors: diff --git a/DESCRIPTION b/DESCRIPTION index b599c94..c044a27 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: mrland Title: MadRaT land data package -Version: 0.62.4 +Version: 0.62.5 Date: 2024-10-04 Authors@R: c( person("Jan Philipp", "Dietrich", , "dietrich@pik-potsdam.de", role = c("aut", "cre")), diff --git a/R/calcISIMIP3bYields.R b/R/calcISIMIP3bYields.R index c613ec8..1152151 100644 --- a/R/calcISIMIP3bYields.R +++ b/R/calcISIMIP3bYields.R @@ -87,13 +87,13 @@ calcISIMIP3bYields <- function(subtype = "yields:EPIC-IIASA:ukesm1-0-ll:ssp585:d x[, , "winterwheat"] * harvArea[, , "winterwheat"]) # tece mask does not cover all cells, only current harv area. # Fill in other areas with higher yielding variety, based on historical 30 year averages - higherw <- magpply(x[, 1981:2011, "springwheat", ], - FUN = mean, MARGIN = c(1, 3)) > magpply(x[, 1981:2011, "winterwheat", ], + higherw <- magpply(x[, 1981:2011, "springwheat"], + FUN = mean, MARGIN = c(1, 3)) > magpply(x[, 1981:2011, "winterwheat"], FUN = mean, MARGIN = c(1, 3)) higherw <- time_interpolate(setYears(higherw, 1961), interpolated_year = getYears(x), integrate_interpolated_years = TRUE) - higherw <- collapseNames(ifelse(higherw == 1, x[, , "springwheat", ], x[, , "winterwheat", ])) + higherw <- collapseNames(ifelse(higherw == 1, x[, , "springwheat"], x[, , "winterwheat"])) tece <- ifelse(tece == 0, higherw, tece) diff --git a/README.md b/README.md index bdb7c51..8deb3dc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MadRaT land data package -R package **mrland**, version **0.62.4** +R package **mrland**, version **0.62.5** [![CRAN status](https://www.r-pkg.org/badges/version/mrland)](https://cran.r-project.org/package=mrland) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3822083.svg)](https://doi.org/10.5281/zenodo.3822083) [![R build status](https://github.com/pik-piam/mrland/workflows/check/badge.svg)](https://github.com/pik-piam/mrland/actions) [![codecov](https://codecov.io/gh/pik-piam/mrland/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/mrland) [![r-universe](https://pik-piam.r-universe.dev/badges/mrland)](https://pik-piam.r-universe.dev/builds) @@ -39,7 +39,7 @@ In case of questions / problems please contact Jan Philipp Dietrich , R package version 0.62.4, . +Dietrich J, Mishra A, Weindl I, Bodirsky B, Wang X, Baumstark L, Kreidenweis U, Klein D, Steinmetz N, Chen D, Humpenoeder F, von Jeetze P, Wirth S, Beier F, Hoetten D, Sauer P (2024). _mrland: MadRaT land data package_. doi:10.5281/zenodo.3822083 , R package version 0.62.5, . A BibTeX entry for LaTeX users is @@ -48,7 +48,7 @@ A BibTeX entry for LaTeX users is title = {mrland: MadRaT land data package}, author = {Jan Philipp Dietrich and Abhijeet Mishra and Isabelle Weindl and Benjamin Leon Bodirsky and Xiaoxi Wang and Lavinia Baumstark and Ulrich Kreidenweis and David Klein and Nele Steinmetz and David Chen and Florian Humpenoeder and Patrick {von Jeetze} and Stephen Wirth and Felicitas Beier and David Hoetten and Pascal Sauer}, year = {2024}, - note = {R package version 0.62.4}, + note = {R package version 0.62.5}, url = {https://github.com/pik-piam/mrland}, doi = {10.5281/zenodo.3822083}, }