diff --git a/config/default.cfg b/config/default.cfg index 0f02cca09..d33d28cf5 100644 --- a/config/default.cfg +++ b/config/default.cfg @@ -150,7 +150,8 @@ cfg$files2export$start <- c("config/conopt3.opt", "modules/35_transport/edge_esm/input/scenSpecEnIntensity.cs4r", "modules/35_transport/edge_esm/input/initialIncoCosts.cs4r", "modules/35_transport/edge_esm/input/annualMileage.cs4r", - "modules/35_transport/edge_esm/input/timeValueCosts.cs4r") + "modules/35_transport/edge_esm/input/timeValueCosts.cs4r", + "modules/29_CES_parameters/calibrate/input/f29_trpdemand.cs4r") # Files that should be copied after the REMIND run is finished cfg$files2export$end <- NULL diff --git a/scripts/output/single/reporting.R b/scripts/output/single/reporting.R index 3c14e1bf9..dad8a5c6f 100644 --- a/scripts/output/single/reporting.R +++ b/scripts/output/single/reporting.R @@ -73,22 +73,23 @@ if (0 == nchar(Sys.getenv('MAGICC_BINARY'))) { ## REMIND_generic__withoutPlus.MIF is replaced. edgetOutputDir <- file.path(outputdir, "EDGE-T") -if(file.exists(edgetOutputDir)) { - if (! file.exists(file.path(edgetOutputDir, "4_Output", "vehSalesAndModeShares.RDS"))) { - message("EDGE-T reporting files are missing, probably because the run was killed.") - message("Rerunning toolIterativeEDGETransport().") +if (file.exists(edgetOutputDir)) { savewd <- getwd() setwd(outputdir) edgeTransport::iterativeEdgeTransport() setwd(savewd) - } +} + message("start generation of EDGE-T reporting") EDGET_output <- reportEdgeTransport(edgetOutputDir, isTransportExtendedReported = FALSE, modelName = "REMIND", - scenarioName = scenario, + scenarioName = scenario, gdxPath = file.path(outputdir, "fulldata.gdx"), - isStored = FALSE) + isStored = FALSE, + isHarmonized = TRUE, + remindReportingFile = file.path(outputdir, + paste0("REMIND_generic_", scenario,"_withoutPlus.mif"))) write.mif(EDGET_output, remind_reporting_file, append = TRUE) piamutils::deletePlus(remind_reporting_file, writemif = TRUE) @@ -100,7 +101,6 @@ if(file.exists(edgetOutputDir)) { isStored = TRUE) message("end generation of EDGE-T reporting") -} envir <- new.env() load(file.path(outputdir, "config.Rdata"), envir = envir)