Skip to content

Commit

Permalink
Updated max past function and rebuilt
Browse files Browse the repository at this point in the history
  • Loading branch information
mppalves committed Jun 18, 2024
1 parent 6ca3de2 commit f74c7e3
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '29876282'
ValidationKey: '30036920'
AutocreateReadme: yes
AcceptedWarnings:
- 'Warning: package .* was built under R version'
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: 'mrmagpie: madrat based MAgPIE Input Data Library'
version: 1.50.2
date-released: '2024-06-17'
version: 1.51.0
date-released: '2024-06-18'
abstract: Provides functions for MAgPIE country and cellular input data generation.
authors:
- family-names: Karstens
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: mrmagpie
Title: madrat based MAgPIE Input Data Library
Version: 1.50.2
Date: 2024-06-17
Version: 1.51.0
Date: 2024-06-18
Authors@R: c(
person("Kristine", "Karstens", , "[email protected]", role = c("aut", "cre")),
person("Jan Philipp", "Dietrich", , "[email protected]", role = "aut"),
Expand Down
12 changes: 6 additions & 6 deletions R/calcPastureSuit.R → R/calcMaxPastureSuit.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#' @title calcPastureSuit
#' @description Calculate glassland suitable for pasture management based
#' @title calcMaxPastureSuit
#' @description Calculate maximum glassland suitable for pasture management based
#' on population and aridity criteria.
#'
#' @param lpjml Defines LPJmL version for crop/grass and natveg specific inputs
Expand All @@ -11,14 +11,14 @@
#' @author Marcos Alves, Kristine Karstens, Alexandre Köberle
#' @examples
#' \dontrun{
#' calcOutput("PastureSuit")
#' calcOutput("MaxPastureSuit")
#' }
#' @importFrom raster area rasterFromXYZ


calcPastureSuit <- function(climatetype = "MRI-ESM2-0:ssp126",
lpjml = "LPJmL4_for_MAgPIE_44ac93de",
cells = "lpjcell") {
calcMaxPastureSuit <- function(climatetype = "MRI-ESM2-0:ssp126",
lpjml = "LPJmL4_for_MAgPIE_44ac93de",
cells = "lpjcell") {
x <- toolSplitSubtype(climatetype, list(climatemodel = NULL, scenario = NULL))

# Extract stage argument information
Expand Down
8 changes: 4 additions & 4 deletions R/fullCELLULARMAGPIE.R
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ fullCELLULARMAGPIE <- function(rev = numeric_version("0.1"), dev = "",
lsu_levels = c(seq(0, 2.2, 0.2), 2.5), past_mngmt = "mdef",
file = paste0("f31_grassl_yld.mz"), years = magYears,
cells = cells, aggregate = FALSE)
calcOutput("PastureSuit", climatetype = climatetype, lpjml = lpjml[["natveg"]], cells = cells,
file = paste0("f31_pastr_suitability_", ctype, ".mz"), years = magYears, aggregate = "cluster")
calcOutput("PastureSuit", climatetype = climatetype, lpjml = lpjml[["natveg"]], cells = cells,
file = "f31_pastr_suitability.mz", years = magYears, aggregate = FALSE)
calcOutput("MaxPastureSuit", climatetype = climatetype, lpjml = lpjml[["natveg"]], cells = cells,
file = paste0("f31_max_managed_pasture_", ctype, ".mz"), years = magYears, aggregate = "cluster")
calcOutput("MaxPastureSuit", climatetype = climatetype, lpjml = lpjml[["natveg"]], cells = cells,
file = "f31_max_managed_pasture.mz", years = magYears, aggregate = FALSE)

if (grepl("+PastrMngtLevels", dev)) {
calcOutput("PastrMngtLevels", climatetype = paste0("MRI-ESM2-0", ":", climatescen),
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 based MAgPIE Input Data Library

R package **mrmagpie**, version **1.50.2**
R package **mrmagpie**, version **1.51.0**

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

Expand Down Expand Up @@ -39,7 +39,7 @@ In case of questions / problems please contact Kristine Karstens <karstens@pik-p

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

Karstens K, Dietrich J, Chen D, Windisch M, Alves M, Beier F, Köberle A, v. Jeetze P, Mishra A, Humpenoeder F, Sauer P (2024). _mrmagpie: madrat based MAgPIE Input Data Library_. doi:10.5281/zenodo.4319612 <https://doi.org/10.5281/zenodo.4319612>, R package version 1.50.2, <https://github.com/pik-piam/mrmagpie>.
Karstens K, Dietrich J, Chen D, Windisch M, Alves M, Beier F, Köberle A, v. Jeetze P, Mishra A, Humpenoeder F, Sauer P (2024). _mrmagpie: madrat based MAgPIE Input Data Library_. doi: 10.5281/zenodo.4319612 (URL: https://doi.org/10.5281/zenodo.4319612), R package version 1.51.0, <URL: https://github.com/pik-piam/mrmagpie>.

A BibTeX entry for LaTeX users is

Expand All @@ -48,7 +48,7 @@ A BibTeX entry for LaTeX users is
title = {mrmagpie: madrat based MAgPIE Input Data Library},
author = {Kristine Karstens and Jan Philipp Dietrich and David Chen and Michael Windisch and Marcos Alves and Felicitas Beier and Alexandre Köberle and Patrick {v. Jeetze} and Abhijeet Mishra and Florian Humpenoeder and Pascal Sauer},
year = {2024},
note = {R package version 1.50.2},
note = {R package version 1.51.0},
doi = {10.5281/zenodo.4319612},
url = {https://github.com/pik-piam/mrmagpie},
}
Expand Down
14 changes: 7 additions & 7 deletions man/calcPastureSuit.Rd → man/calcMaxPastureSuit.Rd

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

0 comments on commit f74c7e3

Please sign in to comment.