diff --git a/config/default.cfg b/config/default.cfg index 40ae3ff39..b395e4d70 100644 --- a/config/default.cfg +++ b/config/default.cfg @@ -26,7 +26,7 @@ cfg$input <- c(regional = "rev4.112_h12_magpie.tgz", cellular = "rev4.112_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz", validation = "rev4.112_h12_magpie.tgz", additional = "additional_data_rev4.56.tgz", - calibration = "calibration_H12_26Mar24_fixed.tgz") + calibration = "calibration_H12_27Sep24.tgz") # NOTE: It is recommended to recalibrate the model when changing cellular input data # as well as for any other setting that would affect initial values in the model, @@ -93,14 +93,14 @@ cfg$best_calib <- TRUE # def = TRUE # * (FALSE): Land conversion cost calibration will not be performed cfg$recalibrate_landconversion_cost <- "ifneeded" #def "ifneeded" # Up to which accuracy shall be recalibrated? -cfg$calib_accuracy_landconversion_cost <- 0.05 # def = 0.05 +cfg$calib_accuracy_landconversion_cost <- 0.01 # def = 0.01 # What is the maximum number of iterations if the precision goal is not reached? cfg$calib_maxiter_landconversion_cost <- 40 # def = 40 # Restart from existing calibration factors (TRUE or FALSE) -cfg$restart_landconversion_cost <- FALSE # def = FALSE +cfg$restart_landconversion_cost <- TRUE # def = TRUE # Number of lowpass filter iterations applied on calibration factors # for time steps 1995-2015 -cfg$lowpass_filter_landconversion_cost <- 1 # def= 1 +cfg$lowpass_filter_landconversion_cost <- 5 # def= 5 # Set upper limit for cropland calibration factor cfg$cost_calib_max_landconversion_cost <- 3 # def= 3 # Set lower limit for cropland calibration factor @@ -108,7 +108,7 @@ cfg$cost_calib_min_landconversion_cost <- 0.05 # def= 0.05 # Selection type of calibration factors. # If FALSE, calibration factors from the last iteration are used. # If TRUE, calibration factors from the iteration with the lowest divergence are used. -cfg$best_calib_landconversion_cost <- FALSE # def = FALSE +cfg$best_calib_landconversion_cost <- TRUE # def = TRUE # Settings for NPI/NDC recalculation # * (TRUE): NPI/NDC recalculation will be performed diff --git a/main.gms b/main.gms index 6313f1764..6d4bbafcd 100644 --- a/main.gms +++ b/main.gms @@ -160,11 +160,11 @@ $title magpie * md5sum: NA * Repository: https://rse.pik-potsdam.de/data/magpie/public * -* Used data set: additional_data_rev4.55.tgz +* Used data set: additional_data_rev4.56.tgz * md5sum: NA * Repository: https://rse.pik-potsdam.de/data/magpie/public * -* Used data set: calibration_H12_26Mar24_fixed.tgz +* Used data set: calibration_H12_27Sep24.tgz * md5sum: NA * Repository: https://rse.pik-potsdam.de/data/magpie/public * diff --git a/modules/57_maccs/on_aug22/preloop.gms b/modules/57_maccs/on_aug22/preloop.gms index 3504fe5c9..0c89a1fc9 100644 --- a/modules/57_maccs/on_aug22/preloop.gms +++ b/modules/57_maccs/on_aug22/preloop.gms @@ -7,15 +7,15 @@ * inflated using USD05 --> USD17 MER rate: 5 * 1.23 $if "%c57_macc_version%" == "PBL_2007" s57_step_length = 6.15; -* inflated using USD10 --> USD17 MER rate: 20 * 1 -$if "%c57_macc_version%" == "PBL_2019" s57_step_length = 20; -* inflated using USD10 --> USD17 MER rate: 20 * 1 -$if "%c57_macc_version%" == "PBL_2022" s57_step_length = 20; +* inflated using USD10 --> USD17 MER rate: 20 * 1.12 +$if "%c57_macc_version%" == "PBL_2019" s57_step_length = 22.4; +* inflated using USD10 --> USD17 MER rate: 20 * 1.12 +$if "%c57_macc_version%" == "PBL_2022" s57_step_length = 22.4; $ontext Determine level of GHG emission abatement depending on GHG prices. There are 201 abatement steps. Each step is 6.15 USD17MER per tC eq in case of PBL_2007 and -20 USD17MER per tC eq in case of PBL_2019. +22.4 USD17MER per tC eq in case of PBL_2019. Since the GHG prices are in USD per ton N and USD per ton CH4, conversion to USD per ton C eq is needed. In this realization, the IPCC AR4 global warming potential factor for N2O (298) and CH4 (25) are used because PBL used these parameters to convert USD per ton N2O and USD per ton CH4 into USD per ton C eq. diff --git a/scripts/start/extra/recalibrateH16.R b/scripts/start/extra/recalibrateH16.R new file mode 100644 index 000000000..340a473d2 --- /dev/null +++ b/scripts/start/extra/recalibrateH16.R @@ -0,0 +1,33 @@ +# | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) +# | authors, and contributors see CITATION.cff file. This file is part +# | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of +# | AGPL-3.0, you are granted additional permissions described in the +# | MAgPIE License Exception, version 1.0 (see LICENSE file). +# | Contact: magpie@pik-potsdam.de + +# -------------------------------------------------------- +# description: calculate and store new land conversion cost calibration factors for default setup (time consuming; up to 40 model runs with 5 time steps) +# -------------------------------------------------------- + +library(magpie4) +library(magclass) + +# Load start_run(cfg) function which is needed to start MAgPIE runs +source("scripts/start_functions.R") + +#start MAgPIE run +source("config/default.cfg") +cfg$input['regional'] <- "rev4.112_36f73207_magpie.tgz" +cfg$input['validation'] <- "rev4.112_36f73207_validation.tgz" +cfg$input['calibration'] <- "calibration_H16_14Jun24.tgz" +cfg$input['cellular'] <- "rev4.112_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" + +cfg$results_folder <- "output/:title:" +cfg$recalibrate <- FALSE +cfg$recalibrate_landconversion_cost <- TRUE +cfg$title <- "calib_run_H16" +cfg$output <- c("rds_report") +cfg$force_replace <- TRUE +cfg$qos <- "priority" +start_run(cfg,codeCheck=FALSE) +magpie4::submitCalibration("H16") diff --git a/scripts/start/extra/recalibrate_FSEC.R b/scripts/start/extra/recalibrate_FSEC.R index 0611437f0..1b33e460b 100644 --- a/scripts/start/extra/recalibrate_FSEC.R +++ b/scripts/start/extra/recalibrate_FSEC.R @@ -20,12 +20,12 @@ source("scripts/projects/fsec.R") # Calibration run cfg <- fsecScenario(scenario = "c_BAU") -cfg$title <- "FSEC23Mar2024" +cfg$title <- "calib_run_FSEC" cfg$results_folder <- "output/:title:" cfg$recalibrate <- TRUE # required when penality_apr22 activated cfg$best_calib <- TRUE cfg$recalibrate_landconversion_cost <- TRUE -cfg$best_calib_landconversion_cost <- FALSE +cfg$best_calib_landconversion_cost <- TRUE cfg$output <- c("rds_report") cfg$force_replace <- TRUE cfg$qos <- "priority" diff --git a/scripts/start/extra/recalibrate_default.R b/scripts/start/extra/recalibrate_default.R index 69f52a17f..fdf41a97a 100644 --- a/scripts/start/extra/recalibrate_default.R +++ b/scripts/start/extra/recalibrate_default.R @@ -20,7 +20,7 @@ source("config/default.cfg") cfg$results_folder <- "output/:title:" cfg$recalibrate <- FALSE cfg$recalibrate_landconversion_cost <- TRUE -cfg$title <- "calib_run" +cfg$title <- "calib_run_H12" cfg$output <- c("rds_report") cfg$force_replace <- TRUE cfg$qos <- "priority"