R/calcPotentialWeathering.R

Defines functions calcPotentialWeathering

#' Calculate hydro potential
#' 
#' Provides weathering potential data
#' 
#' 
#' @return weathering potential data and corresonding weights as a list of
#' two MAgPIE objects
#' @author Lavinia Baumstark
#' @seealso \code{\link{calcOutput}}
#' @examples
#' 
#' \dontrun{ 
#' calcOutput("PotentialWeathering")
#' 
#' }
#' 
calcPotentialWeathering <- function() {
  
  # read weathering data 
  pot <- readSource("Strefler") 

  # change the unit:  10^6 km^2 -> kg/m^2 =  Gt / 10^6 km^2
  pot <- pot * 15
  
  # delete total
  pot <- pot[,,"total",invert=TRUE]
  # allocate "warm" and "temperate" to the right grades
  getNames(pot) <- gsub("warm",     "1",getNames(pot))                 
  getNames(pot) <- gsub("temperate","2",getNames(pot))
 
  return(list(x=pot,
              weight=NULL,
              unit="Gt of ground stone/a",
              description="This file includes max. potential for enhanced weathering in Gt of ground stone/a for different regions and warm (1) and temperate (2) grades. (=maxprod)"
               ))
}
pik-piam/moinput documentation built on June 9, 2020, 12:23 p.m.