Skip to content
Snippets Groups Projects
Commit 543303c7 authored by Felix Schreyer's avatar Felix Schreyer
Browse files

update reporting scripts to incorporate new LCOE output file and plot option

parent e435acbc
No related branches found
No related tags found
1 merge request!190update reporting scripts to incorporate new LCOE output file and plot…
......@@ -9,22 +9,27 @@ library(lucode)
library(remind)
library(lusweave)
############################# BASIC CONFIGURATION #############################
gdx_name <- "fulldata.gdx" # name of the gdx
if(!exists("source_include")) {
#Define arguments that can be read from command line
outputdir <- c("C:/work/REMIND_tests/Trunk_latest/output/BAU_Nash_2019-02-13_12.27.58");
outputdir <- "output/R17IH_SSP2_postIIASA-26_2016-12-23_16.03.23" # path to the output folder
# path to the output folder
lucode::readArgs("outputdir")
lucode::readArgs("outputdir","gdx_name")
}
gdx <- path(outputdir,gdx_name)
###############################################################################
# Set mif path
scenNames <- getScenNames(outputdir)
mif_path <- path(outputdir,paste("REMIND_LCOE_",scenNames,".mif",sep=""))
LCOE_path <- path(outputdir,paste("REMIND_LCOE_",scenNames,".csv",sep=""))
reportFile <- path(outputdir, paste("LCOE_Plot_",scenNames,".pdf",sep=""))
# run plot LCOE function
plotLCOE(mif_path)
plotLCOE(LCOE_path, gdx, fileName = reportFile)
......@@ -28,7 +28,7 @@ scenario <- getScenNames(outputdir)
# paths of the reporting files
remind_reporting_file <- path(outputdir,paste0("REMIND_generic_",scenario,".mif"))
magicc_reporting_file <- path(outputdir,paste0("REMIND_climate_", scenario, ".mif"))
LCOE_reporting_file <- path(outputdir,paste0("REMIND_LCOE_", scenario, ".mif"))
LCOE_reporting_file <- path(outputdir,paste0("REMIND_LCOE_", scenario, ".csv"))
# produce REMIND reporting *.mif based on gdx information
tmp <- try(convGDX2MIF(gdx,gdx_ref,file=remind_reporting_file,scenario=scenario)) # try to execute convGDX2MIF
......@@ -57,6 +57,6 @@ if(file.exists(file.path(outputdir, "EDGE-T"))){
reportEDGETransport(outputdir)
}
# produce REMIND LCOE reporting *.mif based on gdx information
tmp <- try(convGDX2MIF_LCOE(gdx,gdx_ref,file=LCOE_reporting_file,scenario=scenario)) # execute convGDX2MIF_LCOE
# produce REMIND LCOE reporting *.csv based on gdx information
tmp <- try(convGDX2CSV_LCOE(gdx,file=LCOE_reporting_file,scen=scenario)) # execute convGDX2MIF_LCOE
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment