Skip to content

Commit

Permalink
bug fix in calcCropland for option cell=lpjcell: buggy magpie object …
Browse files Browse the repository at this point in the history
…call is fixed [,,] rather than []
  • Loading branch information
FelicitasBeier committed Dec 11, 2020
1 parent e2fcab5 commit 79f4f2b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '20653770'
ValidationKey: '20672377'
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
- 'Warning: namespace ''.*'' is not available and has been replaced'
Expand Down
2 changes: 1 addition & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "mrcommons: MadRat commons Input Data Library",
"version": "0.11.10",
"version": "0.11.11",
"description": "<p>Provides useful functions and a common structure to all the input data required to run models like MAgPIE and REMIND\n of model input data.<\/p>",
"creators": [
{
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: mrcommons
Type: Package
Title: MadRat commons Input Data Library
Version: 0.11.10
Version: 0.11.11
Date: 2020-12-11
Authors@R: c(person("Benjamin Leon", "Bodirsky", email = "bodirsky@pik-potsdam.de", role = "aut"),
person("Kristine", "Karstens", role = "aut"),
Expand Down
4 changes: 2 additions & 2 deletions R/calcCroparea.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ calcCroparea <- function(sectoral="kcr", physical=TRUE, cellular=FALSE, cells="m
if(cells=="lpjcell"){
LUHcroparea <- toolCell2isoCell(calcOutput("LUH2v2",landuse_types="LUH2v2", cells=cells, aggregate = FALSE, irrigation=irrigation, cellular=TRUE, selectyears="past"),cells=cells)
org_seq <- getCells(LUHcroparea)
dummy <- new.magpie(getCells(LUHcroparea[c("XNL","KO-")]),getYears(LUHcroparea),getNames(LUHweights,dim=2))
dummy <- new.magpie(getCells(LUHcroparea[c("XNL","KO-"),,]),getYears(LUHcroparea),getNames(LUHweights,dim=2))
dummy[,,] <- 0
LUHcroparea <- LUHcroparea[getCells(LUHcroparea[c("XNL","KO-")]),,invert=T]
LUHcroparea <- LUHcroparea[getCells(LUHcroparea[c("XNL","KO-"),,]),,invert=T]
} else if(cells=="magpiecell"){
LUHcroparea <- toolCell2isoCell(calcOutput("LUH2v2",landuse_types="LUH2v2", cells=cells, aggregate = FALSE, irrigation=irrigation, cellular=TRUE, selectyears="past"),cells=cells)
}
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MadRat commons Input Data Library

R package **mrcommons**, version **0.11.10**
R package **mrcommons**, version **0.11.11**

[![Travis build status](https://travis-ci.com/pik-piam/mrcommons.svg?branch=master)](https://travis-ci.com/pik-piam/mrcommons) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3822009.svg)](https://doi.org/10.5281/zenodo.3822009)

Expand Down Expand Up @@ -39,10 +39,12 @@ In case of questions / problems please contact Jan Philipp Dietrich <dietrich@pi

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

Bodirsky B, Karstens K, Baumstark L, Weindl I, Wang X, Mishra A, Wirth S, Stevanovic M, Steinmetz N, Kreidenweis U, Rodrigues R, Popov
R, Humpenoeder F, Giannousakis A, Levesque A, Klein D, Araujo E, Beier F, Oeser J, Pehl M, Leip D, Molina Bacca E, Martinelli E,
Schreyer F, Dietrich J (2020). _mrcommons: MadRat commons Input Data Library_. doi: 10.5281/zenodo.3822009 (URL:
https://doi.org/10.5281/zenodo.3822009), R package version 0.11.10, <URL: https://github.com/pik-piam/mrcommons>.
Bodirsky B, Karstens K, Baumstark L, Weindl I, Wang X, Mishra A, Wirth S, Stevanovic M,
Steinmetz N, Kreidenweis U, Rodrigues R, Popov R, Humpenoeder F, Giannousakis A, Levesque A,
Klein D, Araujo E, Beier F, Oeser J, Pehl M, Leip D, Molina Bacca E, Martinelli E, Schreyer
F, Dietrich J (2020). _mrcommons: MadRat commons Input Data Library_. doi:
10.5281/zenodo.3822009 (URL: https://doi.org/10.5281/zenodo.3822009), R package version
0.11.11, <URL: https://github.com/pik-piam/mrcommons>.

A BibTeX entry for LaTeX users is

Expand All @@ -51,7 +53,7 @@ A BibTeX entry for LaTeX users is
title = {mrcommons: MadRat commons Input Data Library},
author = {Benjamin Leon Bodirsky and Kristine Karstens and Lavinia Baumstark and Isabelle Weindl and Xiaoxi Wang and Abhijeet Mishra and Stephen Wirth and Mishko Stevanovic and Nele Steinmetz and Ulrich Kreidenweis and Renato Rodrigues and Roman Popov and Florian Humpenoeder and Anastasis Giannousakis and Antoine Levesque and David Klein and Ewerton Araujo and Felicitas Beier and Julian Oeser and Michaja Pehl and Debbora Leip and Edna {Molina Bacca} and Eleonora Martinelli and Felix Schreyer and Jan Philipp Dietrich},
year = {2020},
note = {R package version 0.11.10},
note = {R package version 0.11.11},
doi = {10.5281/zenodo.3822009},
url = {https://github.com/pik-piam/mrcommons},
}
Expand Down

0 comments on commit 79f4f2b

Please sign in to comment.