Commit e9b2930b authored by mppalves's avatar mppalves
Browse files

fixing parameter naming conflict

parent 0b8c214c
......@@ -19,14 +19,15 @@ cfg$lpjml <- c(natveg = "LPJmL4_for_MAgPIE_44ac93de+oldGSWP3",
# ssp126, ssp245, ssp370, ssp585,
# ssp119 (only MRI, IPSL, UKESMI),
# ssp460 (only MRI, IPSL)
cfg$climatetype <- "MRI-ESM2-0:ssp370"
# cfg$climatetype <- "MRI-ESM2-0:ssp370"
cfg$climatetype <- "IPSL-CM6A-LR:ssp126"
# Pasture Soil carbon Machine learning emulator ID.
# This ID can be found in the source folder 'GrassSoilEmu' after the emulator has been trained.
cfg$emu_id <- "0d9d46"
# Current ISIMIP version from where climate raw data will be read.
cfg$isimip_version = "ISIMIP3b"
cfg$version_isimip = "ISIMIP3b"
#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
......@@ -39,7 +40,7 @@ cfg$isimip <- NULL
cfg$revision <- 4.62
# developer suffix for regional revision
cfg$dev <- ""
cfg$dev <- "_MPPA3"
# aggregation clustering type, which is a combination of a single letter, indicating the cluster methodology, and a number,
# indicating the number of resulting clusters. Available methodologies are hierarchical clustering (h), normalized k-means clustering
......
start_preprocessing <- function(cfg, debug=FALSE){
require(gms)
require(madrat)
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 <- ""
madrat::setConfig(regionmapping=cfg$regionmapping, nocores=cfg$nocores, debug=debug)
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 = ", "),
"\n isimip yield subtype: ", paste(names(cfg$isimip), cfg$isimip, sep = ":", collapse = ", "),
"\n isimip version: ", cfg$isimip_version,
"\n Emulator id: ", cfg$emu_id))
madrat::retrieveData(model="MAgPIE", rev=cfg$revision, dev=cfg$dev, cachetype="def")
madrat::retrieveData(model="CellularMAgPIE", rev=cfg$revision, dev=cfg$dev, cachetype="def",
ctype=cfg$ctype, lpjml=cfg$lpjml,
climatetype=cfg$climatetype, clusterweight=cfg$clusterweight, isimip=cfg$isimip,
isimip_version = cfg$isimip_version, emu_id = cfg$emu_id)
madrat::retrieveData(model="Validation", rev=cfg$revision, dev=cfg$dev, cachetype="def")
}
start_preprocessing <- function(cfg, debug=FALSE){
require(gms)
require(madrat)
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 <- ""
madrat::setConfig(regionmapping=cfg$regionmapping, nocores=cfg$nocores, debug=debug)
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 = ", "),
"\n isimip yield subtype: ", paste(names(cfg$isimip), cfg$isimip, sep = ":", collapse = ", "),
"\n isimip version: ", cfg$isimip_version,
"\n Emulator id: ", cfg$emu_id))
madrat::retrieveData(model="MAgPIE", rev=cfg$revision, dev=cfg$dev, cachetype="def")
madrat::retrieveData(model="CellularMAgPIE", rev=cfg$revision, dev=cfg$dev, cachetype="def",
ctype=cfg$ctype, lpjml=cfg$lpjml,
climatetype=cfg$climatetype, clusterweight=cfg$clusterweight, isimip=cfg$isimip,
version_isimip = cfg$version_isimip, emu_id = cfg$emu_id)
madrat::retrieveData(model="Validation", rev=cfg$revision, dev=cfg$dev, cachetype="def")
}
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