Commit 6472555f authored by David Chen's avatar David Chen
Browse files

add isimip subtype and argument in default cfg

parent b92d1af7
......@@ -8,17 +8,20 @@ cfg$regionmapping <- "config/regionmappingH12.csv"
# which LPJmL data set should be used
# see cmuellers landuse folder for available options
cfg$lpjml <- c(natveg = "LPJmL4_for_MAgPIE_84a69edd",
cfg$lpjml <- c(natveg = "LPJmL4_for_MAgPIE_84a69edd",
crop = "ggcmi_phase3_nchecks_fbed5c8b_irrig-is-rainf",
cgrazing = "LPJmL_cgrazing",
cgrazing = "LPJmL_cgrazing",
mowing = "LPJmL_mowing")
# climate scenario specification (in the form of <gcm>:<scenario>)
cfg$climatetype <- "GFDL-ESM4:ssp370"
#ISIMIP scenarios, with format: "yields:EPIC-IIASA:ukesm1-0-ll:ssp585:default:3b"
# available GGCMs: EPIC-IIASA, pDSSAT, CYGMA1p74, full list here: /p/projects/macmit/data/GGCMI/AgMIP.output
# available gcms: UKESM1-0-LL, MRI-ESM2-0, MPI-ESM1-2-HR, IPSL-CM6A-LR, GFDL-ESM4
# available scenarios: ssp126, ssp370, ssp585
# available rcps: ssp126, ssp370 (only for some), ssp585
# available co2 fert: default, 2015co2
cfg$isimip <- NULL
# data revision
cfg$revision <- 4.59
......
......@@ -4,22 +4,22 @@ start_preprocessing <- function(cfg, debug=FALSE){
require(mrland)
require(mrmagpie)
require(mrvalidation)
### check and clean settings ###
cfg <- gms::check_config(cfg, modulepath = NULL)
if(!grepl(".csv$",cfg$regionmapping)) cfg$regionmapping <- paste0("regionmapping", cfg$regionmapping, ".csv")
if(!file.exists(cfg$regionmapping)) cfg$regionmapping <- paste0("config/",cfg$regionmapping)
if(is.null(cfg$dev)) cfg$dev <- ""
message(paste0("Start preprocessing for \n climatescenario: ",cfg$climatetype, "\n rev: ",cfg$revision,
"\n regionmapping: ", cfg$regionmapping, "\n clustertype: ",cfg$ctype,
"\n LPJmL-Versions: ", paste(names(cfg$lpjml), cfg$lpjml, sep = "->", collapse = ", "),
"\n clusterweight: ", paste(names(cfg$clusterweight), cfg$clusterweight, sep = ":", collapse = ", ")))
madrat::setConfig(regionmapping=cfg$regionmapping, nocores=cfg$nocores, debug=debug)
madrat::setConfig(regionmapping=cfg$regionmapping, nocores=cfg$nocores, debug=debug)
madrat::retrieveData(model="MAgPIE", rev=cfg$revision, dev=cfg$dev)
madrat::retrieveData(model="CellularMAgPIE", rev=cfg$revision, dev=cfg$dev,
ctype=cfg$ctype, lpjml=cfg$lpjml,
climatetype=cfg$climatetype, clusterweight=cfg$clusterweight)
madrat::retrieveData(model="CellularMAgPIE", rev=cfg$revision, dev=cfg$dev,
ctype=cfg$ctype, lpjml=cfg$lpjml,
climatetype=cfg$climatetype, clusterweight=cfg$clusterweight, isimip=cfg$isimip)
madrat::retrieveData(model="Validation", rev=cfg$revision, dev=cfg$dev)
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment