Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Var harm #1793

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions scripts/output/single/reporting.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,23 @@ if (0 == nchar(Sys.getenv('MAGICC_BINARY'))) {
## REMIND_generic_<scenario>_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)
Expand All @@ -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)
Expand Down
Loading