R/convertREMMAG.R

Defines functions convertREMMAG

convertREMMAG <- function(x,subtype) {
  map <- toolMappingFile("regional","regionmappingMAgPIE.csv")
  
  if(subtype=="ghgprices") {
    y <- toolAggregate(x,map)
  } else if(subtype=="biodem") {
    pop <- calcOutput("Population",aggregate=FALSE)
    y <- toolAggregate(x,map,weight=pop[,2010,1])
  } else {
    stop("Unknown subtype ",subtype)
  }
  return(y)
}
pik-piam/moinput documentation built on June 9, 2020, 12:23 p.m.