diff --git a/config/oneRegi.cfg b/config/oneRegi.cfg deleted file mode 100644 index 2422f7acb78cc6b4604d0674a962ce04a37d4eb7..0000000000000000000000000000000000000000 --- a/config/oneRegi.cfg +++ /dev/null @@ -1,782 +0,0 @@ -# | (C) 2006-2019 Potsdam Institute for Climate Impact Research (PIK) -# | authors, and contributors see CITATION.cff file. This file is part -# | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -# | AGPL-3.0, you are granted additional permissions described in the -# | REMIND License Exception, version 1.0 (see LICENSE file). -# | Contact: remind@pik-potsdam.de -################# -#### SETTINGS #### -################## - -cfg <- list() - -#### Main settings #### - -#short description of the actual run -cfg$title <- "testOneRegi" - -# path to the submodel to be used relative to main model folder (e.g."standalone/template.gms") -#cfg$model <- "main.gms" #def = "main.gms" - -#### region settings #### -cfg$regionmapping <- "config/regionmappingH12.csv" - -#### Current input data revision (<mainrevision>.<subrevision>) #### -cfg$revision <- 5.935 - -#### Force the model to download new input data #### -cfg$force_download <- FALSE - -#### list of repositories containing input data -# defined in your local .Rprofile or on the cluster /p/projects/rd3mod/R/.Rprofile -cfg$repositories <- getOption("remind_repos") - -#### Folder run statistics should be submitted to -cfg$runstatistics <- "/p/projects/rd3mod/models/statistics/remind" - -#### name of the overall model (used for run statistics only) -# should usually not be changed -cfg$model_name <- "REMIND" - -#### model version of the overall model (used for run statistics only). -# Use extension "-rc" for release candidate and "-dev" for developer version -cfg$model_version <- "2.0-dev" - -#### settings #### -cfg$gms <- list() - -# ***------------------------------------------------------------------------------ -# *** MODULES START -# ***------------------------------------------------------------------------------ - -# ***--------------------- 04_PE_FE_parameters ---------------------------- -# * (iea2014): new PE-FE parameters based on IEA 2014 -cfg$gms$PE_FE_parameters <- "iea2014" # def = iea2014 - -# ***--------------------- 05_initialCap ---------------------------- -# * (on): load existing CES parameters matching model configuration -cfg$gms$initialCap <- "on" # def = on - -# ***--------------------- 11_aerosols ---------------------------------------- -# * (exoGAINS) : -cfg$gms$aerosols <- "exoGAINS" # def = exoGAINS - -# ***--------------------- 15_climate ---------------------------------------- -# * (off): no climate coupling -# * (magicc): MAGICC - iterative mode, outside of optimization. -# * (box): Petschel-Held -cfg$gms$climate <- "off" # def = off - -# ***--------------------- 16_downscaleTemperature ---------------------------------------- -# * (off) -# * (CMIP5): downscale GMT to regional temperature based on CMIP5 data (between iterations, no runtime impact). Requires climate='magicc' and cm_rcp_scen={rcp26,rcp85} -cfg$gms$downscaleTemperature <- "off" # def = off - -# ***--------------------- 20_growth ------------------------------------------ -# * (exogenous): exogenous growth -# * (endogenous): endogenous growth !!Warning: still experimental stuff!! -# * (spillover): endogenous growth with spillover externality !!Warning: not yet calibrated!! -cfg$gms$growth <- "exogenous" # def = exogenous - -# ***--------------------- 21_tax ------------------------------------------ -# * (on): tax mechanism active -# * (off): no tax mechanism -cfg$gms$tax <- "on" # def = on - -# ***--------------------- 22_subsidizeLearning ----------------------------- -# * (globallyOptimal): Only works with Nash, gives cooperative solution w.r.t. the learning spillover - this should then be equivalent to the Negishi solution. -# * (off): do not subsidize learning. Default setting for Negishi. With Nash, this gives the non-cooperative solution w.r.t. the learning spillover. -cfg$gms$subsidizeLearning <- "off" # def = off - -# ***---------------------- 23_capitalMarket ------------------------------- -# * (imperfect): Imperfect capital market: brings initial consumption shares closer to empirical data -# * (perfect): Perfect capital market (results in large short-term capital flows from North to South) -cfg$gms$capitalMarket <- "perfect" # def = perfect - - -# ***---------------------- 26_agCosts ---------------------------------------- -# * (off): agricultural costs zero, no trade taken into account -# * (costs): includes total landuse costs -# * (costs_trade): includes agricultural production costs and the MAgPIE trade balance -cfg$gms$agCosts <- "costs" # def = costs - -# ***--------------------- 29_CES_parameters ---------------------------- -# * (load): load existing CES parameters matching model configuration -# * (calibrate): calculate new CES parameters based on v_cesIO trajectories -- under development! -cfg$gms$CES_parameters <- "load" # def = load - -# ***--------------------- 30_biomass ---------------------------------------- -# * (exogenous): exogenous biomass extraction and costs -# * (magpie_40): using supplycurved derived from MAgpIE 4.0 -cfg$gms$biomass <- "magpie_40" # def = magpie_hightccost - -# ***--------------------- 31_fossil ---------------------------------------- -# * (timeDepGrades): time-dependent grade stucture of fossil resources (oil & gas only) -# * (grades2poly) : simplified version of the time-dependent grade realization (using polynomial functions) -# * (exogenous) : exogenous fossil extraction and costs -cfg$gms$fossil <- "grades2poly" # def = grades2poly - -# ***--------------------- 32_power ---------------------------------------- -# * (IntC) : Power sector formulation with Integration Cost (IntC) markups and curtailment for VRE integration - linearly increasing with VRE share -, and fixed capacity factors for dispatchable power plants -# * (RLDC) : Power sector formulation with Residual Load Duration Curve (RLDC) formulation for VRE power integration, and flexible capacity factors for dispatchable power plants -cfg$gms$power <- "IntC" # def = IntC - -# ***--------------------- 33_CDR ---------------------------------------- -# * (off) : no carbon dioxide removal technologies except BECCS -# * (weathering) : includes enhanced weathering -# * (DAC) : includes direct air capture -# * (all) : includes all CDR technologies -cfg$gms$CDR <- "DAC" # def = DAC - -# ***--------------------- 35_transport ---------------------------------------- -# * (complex): transport realization including electricity in the transport sector (*RP*) -cfg$gms$transport <- "complex" # def = complex - -# ***--------------------- 36_buildings --------------------------------- -# * (simple): representation of the demand in terms of energy carriers -# * (services_with_capital): representation of the demand by energy service with capital -# * (services_putty): representation of the demand by energy service with capital and with putty-clay for buildings insulation -# * (off): no buildings representation -cfg$gms$buildings <- "simple" # def = simple - -# ***--------------------- 37_industry ---------------------------------- -# * (fixed_shares): fixed shares of industry sub-sectors (cement, chemicals, -# steel, other) in industry FE use -# * (off): no industry representation -cfg$gms$industry <- "fixed_shares" # def = fixed_shares - -# ***--------------------- 38_stationary --------------------------------- -# * (simple): simple representation of the stationary sector (buildings and industry are represented together) -# * (off): no stationary representation (split between buildings and industry -cfg$gms$stationary <- "off" # def = off - -# ***--------------------- 39_CCU --------------------------------- -# * (on): simple representation of carbon capture and utilization technologies, first only example of syngas (H22CH4) -# * (off): no representation of carbon caputre and utilization technologies. -cfg$gms$CCU <- "off" # def = off - -# ***--------------------- 40_techpol ---------------------------------------- -# * (none): no technology policies -# * (lowCarbonPush): [works only with Negishi] global low-carbon push until 2030: PV, CSP, Wind, Gas-CCS, Bio-CCS and Electromobility -# * (coalPhaseout): [works only with Negishi] global phase-out of new freely-emitting coal conversion, caps all coal routes with the exception of coaltr: coal solids can still expand -# * (coalPhaseoutRegional): [works only with Negishi] global phase-out of new freely-emitting coal conversion, caps all coal routes with the exception of coaltr: coal solids can still expand -# * (CombLowCandCoalPO): [works only with Negishi] combination of lowCarbonPush and coalPhaseout -# * (NDC2018): Technology targets for 2030 for spv,wind,tnrs. -# * (NPi): Reference technology targets, mostly already enacted (N)ational (P]ol(i)cies, mostly for 2020 -# * (EVmandates): mandate for electric vehicles - used for UBA project -cfg$gms$techpol <- "none" # def = none - -# ***--------------------- 41_emicapregi ---------------------------------------- -# * (none): no regional emission caps -# * (CandC): contraction and convergence allocation (under construction) -# * (GDPint): GDP intensity allocation (under construction) -# * (POPint): sovereignity (per cap.) allocation (under construction) -# * (exog): exogenous emission cap path (generic) (under construction) -# * (PerCapitaConvergence): based on CandC: convergence, to be run with emiscen = 4 -# * (AbilityToPay): mitigation requirement shared based on per-capita GDP, to be run with emiscen = 4 -cfg$gms$emicapregi <- "none" # def = none - -# ***--------------------- 42_banking ---------------------------------------- -# * (off): no banking and borrowing of emission permits, no when-flexibility -# * (banking): only banking allowed, no borrowing at all -cfg$gms$banking <- "off" # def = off - -# ***--------------------- 45_carbonprice ---------------------------------------- -# * (none): no tax policy (combined with all emiscens except emiscen eq 9) -# * (exponential): 5% exponential increase over time of the tax level in 2020 set via cm_co2_tax_2020 (combined with emiscen eq 9 and cm_co2_tax_2020>0) -# * (expoLinear): 5% exponential increase until c_expoLinear_yearStart, linear increase thereafter -# * (exogenous): carbon price is speficied using an external input file -# * (linear): linear increase over time of the tax level in 2020 set via cm_co2_tax_2020 (combined with emiscen eq 9 and cm_co2_tax_2020>0) -# * (diffPriceSameCost) ! experimental ! adjusts regional carbon prices until regional mitigation costs (in NPV GDP) are equal across regions. Use with iterative_adjust=2, emiscen=9. Experimental feature, you are responsible to check for convergence yourself (check that p45_mitiCostRel is about constant over iterations) -# * (Exog4xPrevious): uses 4 times the carbon price found in the input_ref.gdx file -# * (ExogSameAsPrevious): uses the identical carbon prices of a previous run, so far requires manual updating of the input file - see outcommented text in scripts/start_functions.R -# * (temperatureNotToExceed): [test and verify before using it!] Find the optimal carbon carbon tax (set cm_emiscen=9) for the not-to-exceed temperature target defined by cm_carbonprice_temperatureLimit. -# * (NDC2constant): linearly phase in global constant price from NDC prices (default 2020-2040 phase-in) -# * (diffPhaseIn2Constant): linearly phase in global constant price, with starting values differentiated by GDP/cap (Robert's proposal) - -cfg$gms$carbonprice <- "none" # def = none - -# ***--------------------- 47_regipol ---------------------------------------- -# * (none): no regional policies -# * (regiCarbonPrice): Region specific or region group independent carbon price. -# * the target is defined in the cm_regiCO2target switch, for year target e.g. "2050.EUR.year.netCO2 0.7, 2050.USA.year.grossFFaI 1.0" sets a 0.7GtCO2 net CO2 target for EUR in 2050 and a 1GtCO2 gross Fossil Fuel and Industry CO2 emissions target for USA -# * for budget target: "2050.EUR.budget.netCO2 70, 2050.USA.budget.grossFFaI 100" sets a netCO2/grossFFaI budget from 2020-2050 correspondingly -cfg$gms$regipol <- "none" # def = none - -# ***--------------------- 50_damages ---------------------------------------- -# * (off): no damages on GDP -# * (DiceLike): DICE-like damages (linear-quadratic damages on GDP). Choose specification via cm_damage_DiceLike_specification -# * (BurkeLike): Burke-like damages (growth rate damages on GDP). Choose specification via cm_damage_BurkeLike_specification and cm_damage_BurkeLike_persistenceTime -cfg$gms$damages <- "off" # def = off - -# ***--------------------- 51_internalizeDamages ---------------------------------------- -# * (off): -# * (DiceLikeItr): Internalize DICE-like damages (calculate the SCC) adjust cm_damages_SccHorizon. Requires cm_emiscen=9 for now. -# * (BurkeLikeItr): Internalize Burke-like damages (calculate the SCC) adjust cm_damages_SccHorizo. Requires cm_emiscen=9 for now. -cfg$gms$internalizeDamages <- "off" # def = off - - -# ***--------------------- 70_water ---------------------------------------- -# * (off): no water demand taken into account -# * (exogenous): exogenous water demand is calculated based on data on water demand coefficients and cooling shares -# * (heat): as exogenous only that vintage structure in combination with time dependent cooling shares as vintages and efficiency factors are also considered and demand is a function of excess heat as opposed to electricity output -cfg$gms$water <- "off" # def = off - -# ***--------------------- 80_optimization ---------------------------------------- -# * (nash): Nash solution. Adjust cm_nash_autoconverge to needs. -# * (negishi): calculates a Negishi solution (social planner) -# * (testOneRegi): solves the problem for one region for given prices (taken from gdx). -# * ! Warning: For development purposes only ! -cfg$gms$optimization <- "testOneRegi" # def = nash - -# ***--------------------- 81_codePerformance ---------------------------------------- -# * (off): nothing happens -# * (on): noumerous (30) succesive runs performed in a triangle: tax0, tax30, tax150 ,all growing exponentially, -# therefore use carbonprice|exponential, c_emiscen|9, and cm_co2_tax_2020|0. also "long" as loadleveler class option (node = not_shared is recommended, too). test code performance -cfg$gms$codePerformance <- "off" # def = off - -# ***------------------------------------------------------------------------------ -# *** MODULES END -# ***------------------------------------------------------------------------------ - -#----------------------------------------------------------------------------- -# SWITCHES -#----------------------------------------------------------------------------- -cfg$gms$cm_iteration_max <- 1 # def <- 1 -cfg$gms$c_solver_try_max <- 2 # def <- 2 -cfg$gms$c_keep_iteration_gdxes <- 0 # def <- 0 -cfg$gms$cm_nash_autoconverge <- 1 # def <- 1 -cfg$gms$cm_MAgPIE_coupling <- "off" # def <- "off" - -cfg$gms$cm_emiscen <- 1 # def <- 1 -cfg$gms$cm_rcp_scen <- "none" # def <- "none" -cfg$gms$cm_iterative_target_adj <- 0 # def <- 0 -cfg$gms$cm_co2_tax_2020 <- -1 # def <- -1 -cfg$gms$cm_co2_tax_growth <- 1.05 # def <- 1.05 -cfg$gms$c_macscen <- 1 # def <- 1 - -cfg$gms$cm_nucscen <- 2 # def <- 2 -cfg$gms$cm_ccapturescen <- 1 # def <- 1 -cfg$gms$c_bioliqscen <- 1 # def <- 1 -cfg$gms$c_bioh2scen <- 1 # def <- 1 -cfg$gms$cm_IndCCSscen <- 1 # def <- 1 -cfg$gms$cm_optimisticMAC <- 0 # def <- 0 -cfg$gms$cm_CCS_cement <- 1 # def <- 1 -cfg$gms$cm_CCS_chemicals <- 1 # def <- 1 -cfg$gms$cm_CCS_steel <- 1 # def <- 1 -cfg$gms$c_solscen <- 1 # def <- 1 - -cfg$gms$cm_bioenergy_tax <- 1.5 # def <- 1.5 -cfg$gms$cm_bioenergymaxscen <- 0 # def <- 0 -cfg$gms$cm_tradecost_bio <- 2 # def <- 2 -cfg$gms$cm_LU_emi_scen <- "SSP2" # def <- "SSP2" -cfg$gms$cm_1stgen_phaseout <- 0 # def <- 0 - -cfg$gms$cm_POPscen <- "pop_SSP2" # def <- "pop_SSP2" -cfg$gms$cm_GDPscen <- "gdp_SSP2" # def <- "gdp_SSP2" - -cfg$gms$cm_startyear <- 2005 # def <- 2005 for BAU, 2015 for policy run -cfg$gms$c_start_budget <- 2100 # def <- 2100 - -cfg$gms$cm_prtpScen <- 3 # def <- 3 -cfg$gms$cm_fetaxscen <- 3 # def <- 3 -cfg$gms$cm_multigasscen <- 2 # def <- 2 -cfg$gms$cm_permittradescen <- 1 # def <- 1 -cfg$gms$cm_limit_peur_scen <- 1 # def <- 1 -cfg$gms$cm_oil_scen <- "medOil" # def <- "medOil" -cfg$gms$cm_gas_scen <- "medGas" # def <- "medGas" -cfg$gms$cm_coal_scen <- "medCoal" # def <- "medCoal" -cfg$gms$cm_rentdiscoil <- 0.2 # def 0.2 -cfg$gms$cm_rentdiscoil2 <- 0.9 # def 0.9 -cfg$gms$cm_rentconvoil <- 50 # def 50 -cfg$gms$cm_rentdiscgas <- 0.6 # def 0.6 -cfg$gms$cm_rentdiscgas2 <- 0.8 # def 0.8 -cfg$gms$cm_rentconvgas <- 50 # def 50 -cfg$gms$cm_rentdisccoal <- 0.4 # def 0.4 -cfg$gms$cm_rentdisccoal2 <- 0.6 # def 0.6 -cfg$gms$cm_rentconvcoal <- 50 # def 50 -cfg$gms$cm_earlyreti_rate <- 0.09 # def 0.09 - -cfg$gms$c_cint_scen <- 1 # def <- 1 -cfg$gms$cm_so2tax_scen <- 1 # def <- 1 -cfg$gms$cm_damage <- 0.005 # def <- 0.005 -cfg$gms$cm_solwindenergyscen <- 1 # def <- 1 -cfg$gms$c_techAssumptScen <- 1 # def <- 1 -cfg$gms$c_ccsinjecratescen <- 1 # def <- 1 -cfg$gms$c_ccscapratescen <- 1 # def <- 1 -cfg$gms$c_export_tax_scen <- 0 # def <- 0 -cfg$gms$cm_gdximport_target <- 0 # def <- 0 -cfg$gms$c_SSP_forcing_adjust <- "forcing_SSP2" # def <- "forcing_SSP2" -cfg$gms$c_delayPolicy <- "SPA0" # def <- "SPA0" -cfg$gms$cm_gs_ew <- 20 # def <- 20 -cfg$gms$cm_LimRock <- 1000 # def <- 1000 -cfg$gms$c_tau_so2_xmpt <- 0 # def <- 0 -cfg$gms$cm_expoLinear_yearStart <- 2050 # def <- 2050 -cfg$gms$c_budgetCO2FFI <- 1000 # def <- 1000 -cfg$gms$c_budgetCO2 <- 1350 # def <- 1350 -cfg$gms$c_abtrdy <- 2010 # def <- 2010 -cfg$gms$c_abtcst <- 1 # def <- 1 -cfg$gms$cm_regiCO2target <- "off" # def <- "off" - -cfg$gms$c_CES_calibration_iterations <- 10 # def <- 10 -cfg$gms$c_CES_calibration_new_structure <- 0 # def <- 0 -cfg$gms$c_CES_calibration_write_prices <- 0 # def <- 0 -cfg$gms$cm_CES_calibration_default_prices <- 0 # def <- 0 - -cfg$gms$c_testOneRegi_region <- "EUR" # def <- "EUR" -cfg$gms$cm_DiscRateScen <- 0 #def <- 0 -cfg$gms$cm_noReboundEffect <- 0 #def <- 0 -cfg$gms$cm_esubGrowth <- "low" #def <- "low" - -cfg$gms$cm_cooling_shares <- "static" # def <- "static", or "dynamic" -cfg$gms$cm_techcosts <- "REG" # def <- "REG", or "GLO" -cfg$gms$cm_trdcst <- 1.5 # def <- 1.5 -cfg$gms$cm_trdadj <- 2.0 # def <- 2.0 -cfg$gms$c_refcapbnd <- 0 # def <- 0 -cfg$gms$cm_frac_CCS <- 10 # def <- 10 -cfg$gms$cm_frac_NetNegEmi <- 0.5 # def <- 0.5 -cfg$gms$cm_regNetNegCO2 <- "on" # def <- "on" -cfg$gms$cm_peakBudgYr <- 2050 # def <- 2050 -cfg$gms$cm_taxCO2inc_after_peakBudgYr <- 2 # def <- 2 -cfg$gms$cm_CO2priceRegConvEndYr <- 2050 # def <- 2050 - -#----------------------------------------------------------------------------- -# FLAGS -#----------------------------------------------------------------------------- -cfg$gms$cm_SlowConvergence <- "off" # def = off -cfg$gms$cm_nash_mode <- "parallel" # def = parallel ; Choices: parallel, serial, debug. -cfg$gms$cm_OILRETIRE <- "off" # def = off - -cfg$gms$cm_INCONV_PENALTY <- "on" # def = on -cfg$gms$cm_so2_out_of_opt <- "on" # def = on ask Jessi -cfg$gms$cm_MOFEX <- "off" # def = off - -cfg$gms$cm_less_TS <- "on" # def = on -cfg$gms$c_skip_output <- "off" # def <- off DELETE -cfg$gms$cm_ccsfosall <- "off" # def <- off - -cfg$gms$cm_APscen <- "SSP2" # def <- SSP2 - -cfg$gms$cm_Full_Integration <- "off" # def = off - -cfg$gms$c_CO2priceDependent_AdjCosts <- "on" # def = on - -# MAGICC configuration (AJS) -# Calibrate year 2000 temperature to HADCRUT4 data (which is very close to AR5). -cfg$gms$cm_magicc_calibrateTemperature2000 <- "uncalibrated" # def = uncalibrated; {uncalibrated, HADCRUT4 } - -# MAGICC configuration -# roughly comparable to TCRE value, or even more roughly, equivalent climate sensitivity -# choose from OLDDEFAULT (REMIND1.7 legacy file); or different percentiles of RCP26 or generic TCRE outcomes calibrated to CMIP5 (see Schultes et al. (2018) for details) -cfg$gms$cm_magicc_config <- "OLDDEFAULT" # def = OLDDEFAULT ; {OLDDEFAULT, RCP26_[5,15,..,95], TCRE_[LOWEST,LOW,MEDIUM,HIGH,HIGHEST] } - -# Derive temperature impulse response to CO2 emissions, based on MAGICC. Adds around 10min runtime. -cfg$gms$cm_magicc_temperatureImpulseResponse <- "off" # def = off; {off,on } - -cfg$gms$cm_carbonprice_temperatureLimit <- 1.8 # def = 1.8; not-to-exceed temperature target in degree above pre-industrial - -# climate damages -cfg$gms$cm_damage_DiceLike_specification <- "HowardNonCatastrophic" # def = "HowardNonCatastrophic"; {DICE2013R,DICE2016,HowardNonCatastrophic,HowardInclCatastrophic} -cfg$gms$cm_damages_BurkeLike_specification <- 0 # def = 0; {0,5} Selects the main Burke specification "pooled, short-run" (0) or an alternative one "pooled, long-run "(5) -cfg$gms$cm_damages_BurkeLike_persistenceTime <- 30 # def = 30; Persistence time (half-time) in years. Highly uncertain, but may be in between 5 and 55 years. -cfg$gms$cm_damages_SccHorizon <- 100 # def = 100; Horizon for SCC calculation. Damages cm_damagesSccHorizon years into the future are internalized. -#### Other settings (e.g. clustering, gdx files, ...): #### - -# Choose which GAMS version to use (choosing the default option "gams" uses the GAMS system in your PATH variable - in both UNIX and Windows) -# Cluster Example: if you want GAMS version 24.0, use "/p/system/packages/gams/24.0.1/gams" -# Local machine Example: use your GAMS path, e.g. "C:\\GAMS\\win32\\24.3\\gams.exe" (please note the double backslashes) -cfg$gamsv <- "gams" # def = gams - -#*ag* set conopt version. Warning: conopt4 is in beta -cfg$gms$cm_conoptv <- "conopt3" # def = conopt3 - -# Action that should be performed ("ce": compile and run, "c": compile) -cfg$action <- "ce" #def <- ce - -# Tar-ball all the put files to save space? -cfg$tarball_puts <- "on" # def <- on - -# Specify the way REMIND will be run on the cluster (job class, number of nodes, ...) or locally ("direct") -cfg$slurmConfig <- "direct" - -# Should REMIND output be shown in console? (0:no, 2:logfile, 3:yes) -cfg$logoption <- 2 - -# Just list the name of the output scripts that should be used by output.R -# At the moment there are several R-scripts located in scripts/output/ -cfg$output <- 'reporting' # c("reporting","validation","emulator","reportCEScalib","rds_report","validationSummary","dashboard") - -# Set the format for the results folder, type string :date: in order to use the current time stamp in the folder name (e.g. "results:date:") use :title: to use the current title in the folder name -cfg$results_folder <- "output/:title:" # :date:" - -# Which files should be copied into the output folder? -cfg$files2export <- list() -# Files that should be copied before REMIND is started -cfg$files2export$start <- c("config/conopt3.opt", - "config/conopt3.op2", - "config/conopt3.op3", - "config/conopt3.op4", - "config/conopt3.op5", - "config/conopt3.op8", - "config/conopt3.op9", - "scripts/run_submit/submit.cmd", - "scripts/run_submit/submit.R", - "scripts/run_submit/run_magicc.R", - "scripts/run_submit/run_magicc_temperatureImpulseResponse.R", - "scripts/run_submit/read_DAT_TOTAL_ANTHRO_RF.R", - "scripts/run_submit/read_DAT_SURFACE_TEMP.R", - "core/input/historical/historical.mif", - "scripts/input/exoGAINSAirpollutants.R", - "config/input.gdx", - "config/input_ref.gdx", - "core/magicc", - ".Rprofile", - "config/mappingEDGEtoREMINDsectors.csv") - -# Files that should be copied after the REMIND run is finished -cfg$files2export$end <- NULL - -# There is the converted data located? -cfg$converted_input_folder <- "config" - -# placeholder for storing information on subsequent runs -cfg$subsequentruns <- character(0) - -# List of runs that use the fulldata.gdx of this run as input_bau.gdx -cfg$RunsUsingTHISgdxAsBAU <- NA - -############################################################ -##### explanations of switches and flags ################### -############################################################ - -#-------------------- switches ---------------------------------------------------- -# cm_iteration_max "number of Negishi iterations (up to 49)" -# c_solver_try_max "maximum number of inner iterations within one Negishi iteration (<10)" -#*** Careful: for each inner_itr_count, the size of remind.lst can increase by 50MB! -# cm_nash_autoconverge "choice of nash convergence mode" -# (0): manually set number of iterations by adjusting cm_iteration_max -# (1): run until solution is sufficiently converged - coarse tolerances, quick solution. ! donot use in production runs ! -# (2): run until solution is sufficiently converged - fine tolerances, for production runs. -# cm_MAgPIE_coupling "switch on coupling mode with MAgPIE" -# (off): off = REMIND expects to be run standalone (emission factors are used, shiftfactors are set to zero) -# (on): on = REMIND expects to be run based on a MAgPIE reporting file (emission factors are set to zero because emissions are retrieved from the MAgPIE reporting, shift factors for supply curves are calculated) -# cm_emiscen "policy scenario choice" -# (0): no global budget. Policy may still be prescribed by 41_emicaprei module. -# (1): BAU -# (2): temperature cap -# (3): CO2 concentration cap -# (4): emission time path -# (5): forcing target from 2010 (not to exceed) -# (6): budget -# (8): forcing target from 2100 onwards (overshoot scen) -# (9): tax scenario (requires running module 21_tax "on"), tax level controlled by module 45_carbonprice and cm_co2_tax_2020, other ghg etc. controlled by cm_rcp_scen -#*RP* WARNING: cm_emiscen 3 should not be used anymore, as the MACs are not updated anymore. -#*JeS* WARNING: data for cm_emiscen 4 only exists for multigas_scen 2 bau scenarios and for multigas_scen 1 -# cm_rcp_scen "chooses RCP scenario" -# (none): no RCP scenario, standard setting -# (rcp20): RCP2.0 -# (rcp26): RCP2.6 -# (rcp37): RCP3.7 -# (rcp45): RCP4.5 -# (rcp60): RCP6.0 -# (rcp85): RCP8.5 -# cm_co2_tax_2020 "level of co2 tax in year 2020 in $ per t CO2eq, makes sense only for emiscen eq 9 and 45_carbonprice exponential" -# (-1): default setting equivalent to no carbon tax -# (any number >= 0): tax level in 2020, with 5% exponential increase over time -# cm_co2_tax_growth "yearly growth rate of co2 tax" -# (any number >= 0): rate of exponential increase over time -# c_macscen "use of mac" -# (1): on -# (2): off -# cm_nucscen "nuclear option choice" -# (1): no fnrs, tnrs completely free after 2020 -# (2): no fnrs, tnrs with restricted new builds until 2030 (based on current data on plants under construction, planned or proposed) -# (3): no tnrs no fnrs -# (4): fix at bau level -# (5): no new nuclear investments after 2020 -# (6): +33% investment costs (tnrs) & uranium resources increased by a factor of 10 -# cm_limit_peur_scen "limit total uranium production" -# (0): off -# (1): on -# cm_ccapturescen "carbon capture option choice, no carbon capture only if CCS and CCU are switched off!" -# (1): yes -# (2): no carbon capture (only if CCS and CCU are switched off!) -# (3): no bio carbon capture -# (4): no carbon capture in the electricity sector -# c_bioliqscen "switch liquids producing technology on or off" -# (0): no technologies -# (1): all technologies -# c_bioh2scen "switch hydrogen producing technology on or off" -# (0): no technologies -# (1): all technologies -# c_solscen "solar option choice" -# (1): yes -# (2): no solar -# (3): fix at bau level -# cm_bioenergy_tax "level of bioenergy tax in fraction of bioenergy price" -# (0): default setting equivalent to no tax -# (any number >= 0): tax level, e.g. for a 100% tax cm_bioenergy_tax has to be 1 -# cm_bioenergymaxscen "bound on global pebiolc production excluding residues" -# optional scaling of bioenergy costs in generisdata.inc (at the moment: no scaling for both cases) -# (0): no bound -# (1): 100 EJ global bioenergy potential (bound in boundsextra.inc) -# (2): 200 EJ global bioenergy potential (bound in boundsextra.inc) -# (3): 300 EJ global bioenergy potential (bound in boundsextra.inc) -# (4): 152 EJ global bioenergy potential, i.e. 100 EJ 2nd generation (bound in boundsextra.inc) -# cm_tradecost_bio "choose financal tradecosts for biomass (purpose grown pebiolc)" -# (1): low tradecosts (for other SSP scenarios than SSP2) -# (2): high tradecosts (default and SSP2) -# cm_LU_emi_scen "choose emission baseline for CO2, CH4, and N2O land use emissions from MAgPIE" -# (SSP1): emissions (from SSP1 scenario in MAgPIE) -# (SSP2): emissions (from SSP2 scenario in MAgPIE) -# (SSP5): emissions (from SSP5 scenario in MAgPIE) -# cm_1stgen_phaseout "choose if 1st generation biofuels should phase out after 2030 (deltacap=0)" -# (0): 1st generation biofuels after 2020 are fixed at upper limit of resource potential (maxprod) -# (1): no new capacities for 1st generation biofuel technologies may be built after 2030 -> phaseout until ~2060 -# cm_POPscen "Population growth scenarios from UN data and IIASA projection used in SSP" -# pop_SSP1 "SSP1 population scenario" -# pop_SSP2 "SSP2 population scenario" -# pop_SSP3 "SSP3 population scenario" -# pop_SSP4 "SSP4 population scenario" -# pop_SSP5 "SSP5 population scenario" -# cm_GDPscen "assumptions about future GDP development, linked to population development (cm_POPscen)" -# (gdp_SSP1): SSP1 fastGROWTH medCONV -# (gdp_SSP2): SSP2 medGROWTH medCONV -# (gdp_SSP3): SSP3 slowGROWTH slowCONV -# (gdp_SSP4): SSP4 medGROWTH mixedCONV -# (gdp_SSP5): SSP5 fastGROWTH fastCONV -# cm_startyear "first free (or pseudo-free in case of 2005) modelling time step"; -# (2005): standard for BAU to check if model is well calibrated -# (2015): standard for all policy runs (eq. to fix2010) and production baselines, especially if various baselines with varying parameters are explored -# (....): later start for delay policy runs, eg. 2025 for what used to be delay2020 -# cm_prtpScen "pure rate of time preference standard values" -# (1): 1 % -# (3): 3 % -# cm_fetaxscen "choice of final energy tax path, subsidy path and inconvenience cost path, values other than 0 make setting module 21_tax on"; -#*RP* even if set to 0, the PE inconvenience cost/SO2-cost for coal are always on if module 21_tax is on -# (0): no tax, sub, inconv -# (1): constant t,s,i (used in SSP 5 and ADVANCE WP3.1 HighOilSub) -# (2): converging tax, phased out sub (-2030), no inconvenience cost so far (used in SSP 1) -# (3): constant tax, phased out sub (-2050), no inconvenience cost so far (used in SSP 2) -# (4): constant tax, phased out sub (-2030), no inconvenience cost so far (used in SDP) -# cm_multigasscen "scenario on GHG portfolio to be included in permit trading scheme" -# (1): CO2 only -# (2): all GHG -# (3): all GHG excl CO2 emissions from LULUCF -# cm_permittradescen "scenario assumption on permit trades" -# (1): full permit trade (no restrictions) -# (2): no permit trade (only domestic mitigation) -# (3): limited trade (certain percentage of GDP) -# c_limit_peur_scen "limit total uranium production" -# (0): no -# (1): yes (the exact amount is specified in boundsextra) -# cm_oil_scen "assumption on oil availability" -# (lowOil): low -# (medOil): medium (this is the new case) -# (highOil): high (formerly this has been the "medium" case; RoSE relevant difference) -# (4): very high (formerly this has been the "high" case; RoSE relevant difference) -# cm_gas_scen "assumption on gas availability" -# (lowGas): low -# (medGas): medium -# (highGas): high -# cm_coal_scen "assumption on coal availability" -# (0): very low (this has been the "low" case; RoSE relevant difference) -# (lowCoal): low (this is the new case) -# (medCoal): medium -# (highCoal): high -# cm_earlyreti_rate "maximum portion of capital stock that can be retired in one year" -# 0.09 default value: (full retirement after 11 years, 10% standing after 10 years) -# 0.06 default value before 2019-02-18 (full retirement after 16 years, 10% standing after 15 years) -# 0.04 default value before 2016-12-06 -# 0.001 lowest possible value: basically no early retirement -# c_cint_scen "additional GHG emissions from mining fossil fuels" -# (0): switch is off (emissions are not accounted) -# (1): switch is on (emissions are accounted) -# cm_so2tax_scen "level of SO2 tax" -# (0): so2 tax is set to zero -# (1): so2 tax is low -# (2): so2 tax is standard -# (3): so2 tax is high -# (4): so2 tax intermediary between 1 and 2, multiplying (1) tax by the ratio (3)/(2) -# cm_damage "cm_damage factor for forcing overshoot" -#*JeS* can be used to lower forcing overshoot in cm_emiscen 8 scenarios, use only with box model! -# cm_solwindenergyscen "scenario for fluctuating renewables, 1 is reference, 2 is pessimistic with limits to fluctuating SE el share" -# (0) advanced - cheap investment costs, higher learning rates for pv, csp and wind -# (1) reference - normal investment costs & learning rates for pv, csp and wind EMF27-3nd round Adv scenario -# (2) pessimistic EMF27 and AWP 2 - share of PV, wind&CSP limited to 20%. Learning rates reduced by 20%, floor costs increased by 40%. EMF27-3nd round Cons scenario -# (3) frozen - no learning after 2010, share of PV, wind&CSP limited to 20%. EMF27-3rd round Frozen scenario -# (4) pessimistic SSP: pessimistic techno-economic assumptions -# c_techAssumptScen "scenario for assumptions of energy technologies based on SSP scenarios, 1: SSP2 (default), 2: SSP1, 3: SSP5" -#*JH* This flag defines an energy technology scenario -# (1) SSP2: reference scenario - default investment costs & learning rates for pv, csp and wind -# (2) SSP1: advanced renewable energy techno., pessimistic for nuclear and CCS -# (3) SSP5: pessimistic techno-economic assumptions -# c_ccsinjecratescen "CCS injection rate factor, 0.5% by default yielding a 60 Mt per year IR" -#*JH* This flag determines the upper bound of the CCS injection rate -#*LP* CCS refers to carbon sequestration, carbon capture is modelled separately -# (0) no "CCS" as in no carbon sequestration at all -# (1) reference case: 0.005 -# (2) lower estimate: 0.0025 -# (3) upper estimate: 0.01 -# (4) unconstrained: 1 -# (5) sustainability case: 0.001 -# c_ccscapratescen "CCS capture rate" -#*JH* This flag determines the CO2 capture rate of CCS technologies -# (1) reference -# (2) increased capture rate -# c_export_tax_scen "choose which oil export tax is used in the model. 0 = none, 1 = fix" -#c_SSP_forcing_adjust "chooses forcing target and budget according to SSP scenario such that magicc forcing meets the target"; -# ("forcing_SSP1") settings consistent with SSP 1 -# ("forcing_SSP2") settings consistent with SSP 2 -# ("forcing_SSP5") settings consistent with SSP 5 -#cm_iterative_target_adj "whether or not a tax or a budget target should be iteratively adjusted depending on actual emission or forcing level"; -# (0): no iterative adjustment -# (1): iterative adjustment I for tax based on 2030 emissions or for 2150 budget based on 2100 budget result, see core/postsolve.gms for direct algorithms of adjustment -# (2): iterative adjustment II based on magicc calculated forcing (for both budget and tax runs), see modules/climate/magicc/postsolve.gms for direct algorithms of adjustment -# (3): [requires 45_carbonprice = "INDC" or "NDC" or "NDCEU" and emiscen = 9] iterative adjustment III for tax based on 2025 or 2030 regionally differentiated emissions, see module/45_carbonprice/<INDC/NDC/NDCEU90>/postsolve.gms for algorithm of adjustment -# (4): iterative adjustment IV for both budget and tax runs based on CO2 FF&I emissions 2010-2100, see core/postsolve.gms for direct algorithms of adjustment -# (5): iterative adjustment V for both budget and tax runs based on CO2 emissions 2011-2100, see core/postsolve.gms for direct algorithms of adjustment -# (6): iterative adjustment VI for both budget and tax runs based on peak CO2 emissions budget, without changing temporal profile (i.e. with overshoot), see core/postsolve.gms for direct algorithms of adjustment -# (7): iterative adjustment VII for tax runs based on peak CO2 emissions, with change of temporal tax profile after time of peak budget, aiming for net-zero thereafter, see core/postsolve.gms for direct algorithms of adjustment -#c_budgetCO2 "cumulative CO2|Total emissions budget 2011-2100, Gt CO2" -# budgets from 1.5°C report, chapter 2, Table 2.2: 67% 1.5°C GSAT budget 2018-2100 = 420 Gt CO2, 67% 2.0°C GSAT budget 2018-2100 = 1170 -# add emissions 2011-2018 = 290 Gt CO2, subtract emissions from feedbacks (e.g. thawing permafrost) 100 Gt CO2 -# budget 2011-2100 for 2°C = 1170 + 290 - 100 = 1350 Gt CO2; for 1.5°C 420 + 290 - 100 = 600 Gt CO2 -#cm_regiCO2target "budget or year target for specific region or region group. Ex.: '2050.EUR_regi.budget 72, 2050.DEU.year 0.1' sets a 72 GtCO2eq budget target for European countries for emissions between 2020 and 2050, and a 100 MtCO2 CO2eq emission target for the 2050 year for Germany (only used if regipol model regiCarbonPrice realization is active)" -#cm_gdximport_target "whether or not the starting value for iteratively adjusted budgets, tax scenarios, or forcing targets (emiscen 5,6,7,8,9) should be read in from the input.gdx"; -# (0): no import, the default starting value as specified in modules/21_tax/on/input/tax_CO2.inc, core/input/data_emibudget.inc, modules/15_climate/box/datainput.gms is used -# (1): the values from the gdx are read in (works only if the gdx has a parameter value) ATTENTION: make sure that the values from the gdx have the right structure (e.g. regionally differentiated or not) -# -# cm_cooling_shares -# use "static" or "dynamic" cooling shares in module 70_water/heat -# -# cm_regNetNegCO2 -# default "on" allows for regionally netNegative CO2 emissions, setting "off" activates bound in core/bounds.gms that disallows net negative CO2 emissions at the regional level -## cm_peakBudgYr -# time of net-zero CO2 emissions (peak budget), requires emiscen = 9 and cm_iterative_target_adj = 7, will potentially be adjusted by algorithms -# -# cm_techcosts -# use regionalized or globally homogenous technology costs for certain technologies -# -# cm_Full_Integration -# use "on" to treat wind and solar as fully dispatchable electricity production technologies -# -# c_CO2priceDependent_AdjCosts -# default "on" changes adjustment costs for advanced vehicles in dependence of CO2 prices -# -#cm_DiscRateScen "Implicit additional discount rate on investment in energy efficiency" -#(0) Baseline without higher discount rate: No additional discount rate -#(1) Baseline with higher discount rate: Increase the discount rate by 10%pts from 2005 until the end -#(2) Energy Efficiency policy: 10%pts higher discount rate until cm_start_year and 0 afterwards. -#cm_esubGrowth "long term growth of the elasticity of substitution" -#(low) 1.3 -#(middle) 1.5 -#(high) 2 -##-------------------- flags -------------------------------------------------- -# cm_SlowConvergence off !! def = off -#*RP* Turn on a slower convergence scheme where each conopt file is used twice, thus conopt1 is used for itr 1+2, conopt.op2 for itr 3+4, conopt.op3 for itr 5+6, conopt.op4 for itr 7+8, conopt.op5 from itr 9 on. -#*RP* from my own experience, this improves convergence and actually decreases total runtime, even if you start from a gdx with good convergence. But, as always, feelings about REMIND runtimes can be misleading :-) -# cm_OILRETIRE off !! def = off -#*RP* Flag to allow the model to not extract oil, even though the eq_fuelex_dec would force it to extract. -# cm_INCONV_PENALTY on !! def = on -#*RP* 2012-03-06 Flag to turn on inconvenience penalties, e.g. for air pollution -# cm_so2_out_of_opt on !! def = on -#*JeS* Flag to exclude aerosols from optimization routine, should be used especially for temperature targets -# c_skip_output off -#*** This flag turns off output production -# ap_scenarios off!! def = off -#*JeS* Report aerosol and precursor emissions using exogenous emission factor scenarios -# cm_MOFEX off !! def=off -#*JH/LB* Activate MOFEX partial fossil fuel extraction cost minimization model -#* Warning: Use a well-converged run since the model uses vm_prodPe from the input GDX -# cfg$gms$c_skip_output <- "off" # def <- off -# Skip output? (Useful for development) -# cfg$gms$cm_ccsfosall <- "off" # def <- off -############################################################ -# here you find old and new names of the latest renaming -#----------------------------------------------------------- -# magicc_emi into pm_MAGICC_emi, pm_MAGICC_emi into p_MAGICC_emi and ts into pm_ts -# s_earlyreti into sm_earlyreti, s_tgn2pgc into s_tgn_2_pgc, regi2RCP_region into p_regi_2_MAGICC_regionsv, s_tgch42pg into sm_tgch42pg, s_tmp into sm_tmp, s_c_so2 into sm_c_so2, s_tax_time into s21_tax_time, s_tax_value into s21_tax_value, conv_cap_2_MioLDV into pm_conv_cap_2_MioLDV, s_before into s80_before, s_after inot s80_after -# p_limits_wp4_rcp into pm_emiAPexo, p_ratio_ppp into pm_shPPPMER, p_vintage_in into pm_vintage_in,sm_c_so2 into s_c_so2 -# p_datafe into pm_dataFE, p_w into pm_w -# p_ttot_val into pm_ttot_val, p_t_interpolate into p80_t_interpolate, c_iterative_target_adj into cm_iterative_target_adj, c_co2_tax_2020 into cm_co2_tax_2020, c_macscen into c_macscen, c_bioenergy_tax into cm_bioenergy_tax, c_startyear into cm_startyear, c_export_tax_scen into c_export_tax_scen, c_gdximport_target into cm_gdximport_target, c_SSP_forcing_adjust into c_SSP_forcing_adjust -# p_share_ind_fesos into pm_share_ind_fesos, p_share_ind_fesos_bio into pm_share_ind_fesos_bio, p_share_ind_fehos into pm_share_ind_fehos, p_share_trans into pm_share_trans -# p_petradecost_Mp_en into pm_costsPEtradeMp, f_data_weathering_graderegi into f33_data_weathering_graderegi -# v_emicap = "vm_perm", -# v_co2eqGlob = "vm_co2eqGlob", -# v_banking = "vm_banking", -# v_vari = "vm_cesIO", -# v_invest = "vm_invMacro", -# v_deltacap = "vm_deltaCap", -# v_pedem = "vm_demPe", -# v_seprod = "vm_prodSe", -# v_feprod = "vm_prodFe", -# v_fedem = "v_demFe",v_demFe = "v_demFe", -# vm_peprod = "vm_prodPe", -# v_sedem = "v_demSe,v_demSe = "vm_demSe" -# p_nw into p80_nw,c_nucscen into cm_nucscen, q_co2eq into qm_co2eq. qm_co2eq into q_co2eq -# pm_costsPEtradeMp into pm_costsPEtradeMp, vm_welfare into v_welfare -# pm_tau_fe_sub into p21_tau_fe_sub, pm_tau_fe_tax into p21_tau_fe_tax -# pm_datapop into pm_pop, p_datalab into p_lab, p_lab into pm_lab -# p80_pvp into pm_pvp, p80_pvpRegi into pm_pvpRegi -# pm_pvp_perm into pm_pricePerm, s_c2co2 into s_c_2_co2, s_dpy into s_year_2_day, s_hpd into s_day_2_hour -# s_m2n into sm_mega_2_non, sm_g2n into sm_giga_2_non, s_zj2twyr into s_zj_2_twa, sm_ej2twyr into sm_EJ_2_TWa, sm_gj2twyr into sm_GJ_2_TWa, s_twa2mwh into s_TWa_2_MWh -# s_dpkwa2tdptwyr into s_DpKWa_2_TDpTWa, s_dpkw2tdptw into sm_DpKW_2_TDpTW, sm_dpgj2tdptwyr into sm_DpGJ_2_TDpTWa -# s_GWP_CH4 into s_gwpCH4, s_GWP_N2O into s_gwpN2O, sm_tgn2pgc into s_tgn_2_pgc, sm_tgch42pg into s_tgch4_2_pgc -# v_ccs into v_co2CCS, v_co2CCS into vm_co2CCS, vm_costfu into vm_costFu, v_costin into v_costInv, v_costom into v_costOM, vm_costfu_bio into vm_costFuBio, vm_costfu_ex into vm_costFuEx -# v_adjustteinv into v_costInvTeAdj, v_adj into v_adjFactor, v_adj_glob into v_adjFactorGlob, v_directteinv into v_costInvTeDir -# vm_capCum into vm_capCum, v_inconvpen into v_inconvPen, v_invest_adjcosts into v01_invMacroAdj -# v_capini into v_INIcap0, v_earlyreti into v_capEarlyReti, v_emi into vm_emiTeDetail, v_gridshare into v_shGrid, v_shareseel into v_shSeEl, v_shSeEl into v32_shSeEl -# v_investcost into v_costTeCapital, v_storshare into v_shStor, v_shStor into v32_shStor, v_edemini into v_INIdemEn0, vm_esprod into vm_prodEs, vm_forc_os into vm_forcOS -# vm_fuelex into vm_fuExtr, vm_taxrev into vm_taxRev, v_capEarlyReti into vm_capEarlyReti -# testor into teVRE, stor into teStor, tegrid into teLoc, learnte into teLearn, teAdj into teAdj, terenew into teRe, terenew_nobio into teReNoBio, te_bio into teBio -# trade_macro into tradeMacro, trade_pe into tradePe, trade_se into tradeSe -# grid into teGrid, s_c_2_co2 into sm_c_2_co2, s_TWa_2_MWh into sm_TWa_2_MWh, c_postproc into cm_postproc, p11_scale_rcp into pm_scale_rcp, p11_emi_postrun into pm_emi_postrun -# s80_fadeoutPriceAnticip into sm_fadeoutPriceAnticip -# v10_CONBOX into v10_conc, v10_EMI into v10_emi, v10_RADBOX into v10_forcComp, v10_RADBOX_kyo into v10_forcKyo, v10_RADBOX_rcp into v10_forcRcp, -# v10_temp1 into v_tempFast, v10_temp2 into v_tempSlow, v10_slack_os into v10_slackForc, v35_share_espet into v35_shEsPeT -# nolearnte into teNoLearn, teccs into teCCS, tenoccs into teNoCCS, techp into teChp, te_pebiolc into teBioPebiolc -# p_emi_fgas into p_emiFgas, p_datachp into p_shCHP, p_shCHP into p32_shCHP, pebio into peBio, perenew into peRe -# emismac into emiMacSector, emismacmagpie into emiMacMagpie, emismacmagpien2o into emiMacMagpieN2O, emismacmagpiech4 into emiMacMagpieCH4, emismacmagpieco2 into emiMacMagpieCO2 -# sector into sectorEndoEmi , sector_exo into sectorExogEmi, sector2te into sectorEndoEmi2te, charpot into charPot, charperen into charPeRe, magicc_units into unitsMagicc -# ceslev into cesLevel2cesIO, tenr into teNoRe, pety into entyPe, sety into entySe, fety into entyFe, esty into entyEs -# tenotransform into teNoTransform, fetransform into feForEs, ppfenfromes into ppfEnFromEs, petyf into peFos, petyex into peEx, petyrog into peExPol, petystepex into peExGrade -# petyrencompgeopot into peReComp, teeta into teEtaIncr, teneta into teEtaConst, ccsco2 into ccsCo2, xirog into xirog -# RCP_emissions into emiRCP, RCP_emissions_n into numberEmiRCP, RCP_emissions_order into emiRCP2order -# v31_fuelex_mc_dummy into v31_fuExtrMC, v31_fuelex_cum_dummy into v31_fuExtrCumMax, v31_fuelex_cum into v31_fuExtrCum, v31_fuelslack into v31_fuSlack, v_usablese into v_usableSe, v_usableSe into vm_usableSe, v_usablese_te into v_usableSeTe, v_usableSeTe into vm_usableSeTe -# vm_emiengregi into vm_emiTe, vm_eminegregi into vm_emiMacSector, vm_sumeminegregi into vm_emiMac, vm_emissions into vm_emiAll, vm_emicdrregi into vm_emiCdr, vm_emissionsGlob into vm_emiAllGlob -# emisnegall into emiMac, emiseng into emiTe, emisfuelex into emiFuEx, emis into emi, ppfen into ppfEn, tefosnoccs into teFosNoCCS, tefosccs into teFosCCS, s_tech_stat into s_statusTe -# ppfka into ppfKap, pm_tau_CO2_tax into pm_taxCO2eq, pm_emi_budget1 into sm_budgetCO2eqGlob, pm_emi_budget1_reg into pm_budgetCO2eq, p_t_budget1 into sm_endBudgetCO2eq -# pm_emishare into pm_shPerm, p_dataoc into p_prodCouple, p31_datarog into p31_costExPoly, pm_capcum0 into pm_capCum0, -# pm_capcumForeign into pm_capCumForeign, p_emimac0 into p_macBase2005, p_emimac1990 into p_macBase1990 -# te2stor into VRE2teStor, te2teVRElinked into VRE2teVRElinked, te2grid into VRE2teGrid, ccs2tele into ccs2Leak, petyren2ter into teReComp2pe -# emismac2mac into emiMac2mac, RCP_units into emiRCP2unitsMagicc, petyric into peRicardian -# Emissions|F-Gases into emiFgasTotal, Emissions|PFC into emiFgasPFC, Emissions|CF4 into emiFgasCF4, Emissions|C2F6 into emiFgasC2F6, Emissions|C6F14 into emiFgasC6F14, Emissions|HFC into emiFgasHFC -# Emissions|HFC|HFC23 into emiFgasHFC23, Emissions|HFC|HFC32 into emiFgasHFC32, Emissions|HFC|HFC43-10 into emiFgasHFC43-10, Emissions|HFC|HFC125 into emiFgasHFC125, Emissions|HFC|HFC134a into emiFgasHFC134a -# Emissions|HFC|HFC143a into emiFgasHFC143a, Emissions|HFC|HFC227ea into emiFgasHFC227ea, Emissions|HFC|HFC245fa into emiFgasHFC245fa, Emissions|SF6 into emiFgasSF6 -# tlt_year into opTimeYr, tlt_5 into opTime5, balfinen_domain into feForCes, oc2te into pc2te, tlt_year2te into opTimeYr2te, tsu2tlt_5 into tsu2opTime5, ttot2tlt_year into tsu2opTimeYr, -# cesrev into cesRev2cesIO, ces into cesOut2cesIn, tese2rlf into teSe2rlf, tefe2rlf into teFe2rlf, tese2rlfDistr into teRe2rlfDetail, temapall into en2en, temapse into en2se, teall2rlf into te2rlf -# finenbal into fe2ppfEn, cintbyfuel into emi2fuelMine, enty2rlf into pe2rlf -# q_ccostfu into q_costFu, q_ccostin into q_costInv, q_cdirectteinv into q_costInvTeDir, q_cadjustteinv into q_costInvTeAdj, q_ccostom into q_costOM, qm_pebal into q_balPe, q_usablese into q_usableSe, q_usableSe into q32_usableSe -# q_usablese_te into q_usableSeTe, q_usableSeTe into q32_usableSeTe, q_sebal into q_balSe and q32_balSe, q_pe2setrans into q_transPe2se, q_se2fetrans into q_transSe2fe, q_febal into q_balFe, q_se2setrans into q_transSe2se, q_fe2estrans into q_transFe2es -# q_balfinen into q_balFeForCes, q_capconstes into q_limitCapEs, q_capconstse into q_limitCapSe, q_capconstse2se into q_limitCapSe2se, q_capconststor into q_limitCapTeStor, q_limitCapTeStor into q32_limitCapTeStor, q_capconstfe into q_limitCapFe -# q_capconstccs into q_limitCapCCS, q_capconstchp into q_limitCapTeChp, q_limitCapTeChp into q32_limitCapTeChp, q_ccap into q_cap, q_distrCap into q_capDistr, q_capcummo into qm_deltaCapCumNet, q_capcum0 into q_capCumNet -# q_fuelconst2 into q_fuel2pe, q_renconst into q_limitProd, q_geopot into q_limitGeopot, q_storshare into q_shStor, q_shStor into q32_shStor, q_shareseel into q_shSeEl, q_shSeEl into q32_shSeEl, q_llearn into q_costTeCapital, -# q_limit_pvwindcsp_share_EMF27 into q_limitSolarWind, q_limitSolarWind into q32_limitSolarWind, q_limit_biotrmod into q_limitBiotrmod, q_capconstgrid into q_limitCapTeGrid, q_limitCapTeGrid into q32_limitCapTeGrid, q_gridshare into q_shGrid, q_emi into q_emiTeDetail -# q_emissengregi into q_emiTe, q_eminegregi into q_emiMacSector, q_co2bioexp into q_macBaseCo2bioexp, q_sumeminegregi into q_emiMac, q_emissions into q_emiAll, q_emissionsGlob into q_emiAllGlob -# q_emiconst into q_emiCap, q_emibudget1Glob into q_budgetCO2eqGlob, q_ccsbal ionto q_balCCS, q_ccstrans into q_transCCS, q_ccsconst itnto q_limitCCS, q_so2constraint into q_limitSo2 -# q_co2constraint into q_limitCO2, q_eqadj into q_adjFactor, q_operating_reserve into q_operatingReserve, q_operatingReserve into q32_operatingReserve, q_nocoldreserve into q_limitCapEarlyReti, q_smoothphaseout into q_smoothphaseoutCapEarlyReti -# q_inconvpen into q_inconvPen, q_labbal into q01_balLab, q_production into q01_cesIO, q_kapmo into q01_kapMo, q_invest_adjcosts into q01_invMacroAdj, q_limit_ppfen_shares into q01_limitShPpfen -# q_limit_ppfen_ratios into q01_limtRatioPpfen, q_limit_seel2fehes into q_limitSeel2fehes, q_min_oil_share into q_limitShOil, q80_tradebal into q80_balTrade, q35_share_espet into q35_shEsPeT -# q31_costfu_ex into q31_costFuExPol q31_costfu_ex_step into q31_costFuExGrade, q31_fuelex_cum into q31_fuExtrCum, q31_fuelex_dec into q31_fuExtrDec, q31_fuelex_inc into q31_fuExtrInc, -# q30_costfu_bio into q30_costFuBio, q30_limit_bioexport into q30_limitXpBio, q30_limit_bio into q30_limitTeBio, p35_bunker_share_in_nonldv_fe into pm_bunker_share_in_nonldv_fe -# v_tempSlow into v10_tempSlow,f_dataemiglob into fm_dataemiglob, f_dataglob into fm_dataglob, p_dt into pm_dt, p_prodCouple into pm_prodCouple, p_dataeta into pm_dataeta,p_eta_conv into pm_eta_conv -# p_emiFgas into pm_emiFgas and then into vm_emiFgas, v_costTeCapital into vm_costTeCapital, v_capCum into vm_capCum, v_co2eq into vm_co2eq, p11_emiAP_endu into pm_emiAP_endu, q_fuel2pe into qm_fuel2pe -# p_priceCO2 into pm_priceCO2, c_GDPscen into cm_GDPscen, v_INIdemEn0 into v05_INIdemEn0, v_INIcap0 into v05_INIcap0, f33_data_weathering_graderegi into f33_maxProdGradeRegiWeathering -# pm_dataemi into pm_emifac, f_co2magpietax50 into p_macPolCO2luc -# p_dataren into pm_dataren -# v_capDistr into vm_capDistr, v_storloss into v32_storloss -# p_storexp into p32_storexp, p_gridexp into p32_gridexp, p_grid_factor into p32_grid_factor, p_factorStorage into p32_factorStorage, p_correct into pm_correct, pm_data|nu into pm_cf -# p_factorStorage into f32_factorStorage, p_shCHP into f_shCHP, f_shCHP into f32_shCHP -# q_storloss into q32_storloss -############################################################ diff --git a/oneRegi.R b/oneRegi.R deleted file mode 100644 index 98fa3f5ca4d5913a62bedb66074a237f618ff3d9..0000000000000000000000000000000000000000 --- a/oneRegi.R +++ /dev/null @@ -1,30 +0,0 @@ -# | (C) 2006-2019 Potsdam Institute for Climate Impact Research (PIK) -# | authors, and contributors see CITATION.cff file. This file is part -# | of REMIND and licensed under AGPL-3.0-or-later. Under Section 7 of -# | AGPL-3.0, you are granted additional permissions described in the -# | REMIND License Exception, version 1.0 (see LICENSE file). -# | Contact: remind@pik-potsdam.de -#! /usr/bin/Rscript - -########################################################## -#### Script to start a REMIND run #### -########################################################## - -library(lucode, quietly = TRUE, warn.conflicts = FALSE) -library(magclass, quietly = TRUE, warn.conflicts = FALSE) - -#Here the function start_run(cfg) is loaded which is needed to start REMIND runs -#The function needs information about the configuration of the run. This can be either supplied as a list of settings or as a file name of a config file -source("scripts/start_functions.R") - -if (file.exists("./output/testOneRegi/")) - unlink("./output/testOneRegi/", recursive = TRUE) - -#Load config-file -cfg_REMIND <- "oneRegi.cfg" -readArgs("cfg") - -# start REMIND run -start_run(cfg_REMIND) -#rep = read.report("coupling.mif") -#start_reportrun(rep) diff --git a/start.R b/start.R index 618b460f2eb8c9e535515db241148ba4d2d3783a..fde2696c5e8596d7ddca802e6e55078004bd817a 100644 --- a/start.R +++ b/start.R @@ -6,7 +6,7 @@ source("scripts/start/choose_slurmConfig.R") ############## Define function: configure_cfg ######################### configure_cfg <- function(icfg, iscen, iscenarios, isettings) { - + .setgdxcopy <- function(needle, stack, new) { # delete entries in stack that contain needle and append new out <- c(stack[-grep(needle, stack)], new) @@ -16,20 +16,20 @@ configure_cfg <- function(icfg, iscen, iscenarios, isettings) { # Edit run title icfg$title <- iscen cat("\n", iscen, "\n") - + # Edit main file of model if( "model" %in% names(iscenarios)){ - icfg$model <- iscenarios[iscen,"model"] + icfg$model <- iscenarios[iscen,"model"] } # Edit regional aggregation if( "regionmapping" %in% names(iscenarios)){ - icfg$regionmapping <- iscenarios[iscen,"regionmapping"] + icfg$regionmapping <- iscenarios[iscen,"regionmapping"] } - + # Edit input data revision if( "revision" %in% names(iscenarios)){ - icfg$revision <- iscenarios[iscen,"revision"] + icfg$revision <- iscenarios[iscen,"revision"] } # Edit switches in default.cfg according to the values given in the scenarios table @@ -41,13 +41,13 @@ configure_cfg <- function(icfg, iscen, iscenarios, isettings) { if( "output" %in% names(iscenarios)){ icfg$output <- paste0("c(\"",gsub(",","\",\"",gsub(", ",",",iscenarios[iscen,"output"])),"\")") } - + # check if full input.gdx path is provided and, if not, search for correct path if (!substr(isettings[iscen,"path_gdx"], nchar(isettings[iscen,"path_gdx"])-3, nchar(isettings[iscen,"path_gdx"])) == ".gdx"){ #if there is no correct scenario folder within the output folder path provided, take the config/input.gdx if(length(grep(iscen,list.files(path=isettings[iscen,"path_gdx"]),value=T))==0){ isettings[iscen,"path_gdx"] <- "config/input.gdx" - #if there is only one instance of an output folder with that name, take the fulldata.gdx from this + #if there is only one instance of an output folder with that name, take the fulldata.gdx from this } else if (length(grep(iscen,list.files(path=isettings[iscen,"path_gdx"]),value=T))==1){ isettings[iscen,"path_gdx"] <- paste0(isettings[iscen,"path_gdx"],"/", grep(iscen,list.files(path=isettings[iscen,"path_gdx"]),value=T),"/fulldata.gdx") @@ -55,13 +55,13 @@ configure_cfg <- function(icfg, iscen, iscenarios, isettings) { #if there are multiple instances, take the newest one isettings[iscen,"path_gdx"] <- paste0(isettings[iscen,"path_gdx"],"/", substr(grep(iscen,list.files(path=isettings[iscen,"path_gdx"]),value=T),1, - nchar(grep(iscen,list.files(path=isettings[iscen,"path_gdx"]),value=T))-19)[1], + nchar(grep(iscen,list.files(path=isettings[iscen,"path_gdx"]),value=T))-19)[1], max(substr(grep(iscen,list.files(path=isettings[iscen,"path_gdx"]),value=T), nchar(grep(iscen,list.files(path=isettings[iscen,"path_gdx"]),value=T))-18, nchar(grep(iscen,list.files(path=isettings[iscen,"path_gdx"]),value=T)))),"/fulldata.gdx") } } - + # if the above has not created a path to a valid gdx, take config/input.gdx if (!file.exists(isettings[iscen,"path_gdx"])){ isettings[iscen,"path_gdx"] <- "config/input.gdx" @@ -70,7 +70,7 @@ configure_cfg <- function(icfg, iscen, iscenarios, isettings) { stop("Cant find a gdx under path_gdx, please specify full path to gdx or else location of output folder that contains previous run") } } - + # Define path where the GDXs will be taken from gdxlist <- c(input.gdx = isettings[iscen, "path_gdx"], input_ref.gdx = isettings[iscen, "path_gdx_ref"], @@ -82,7 +82,7 @@ configure_cfg <- function(icfg, iscen, iscenarios, isettings) { # add gdx information for subsequent runs icfg$subsequentruns <- rownames(isettings[isettings$path_gdx_ref == iscen & !is.na(isettings$path_gdx_ref) & isettings$start == 1,]) icfg$RunsUsingTHISgdxAsBAU <- rownames(isettings[isettings$path_gdx_bau == iscen & !is.na(isettings$path_gdx_bau) & isettings$start == 1,]) - + return(icfg) } @@ -91,13 +91,21 @@ slurmConfig <- choose_slurmConfig() ###################### Load csv if provided ########################## -# If scenario_config.csv was provided from command line, set cfg according to it (copy from start_bundle) -# check for config file parameter -config.file <- commandArgs(trailingOnly = TRUE)[1] -if (!is.na(config.file)) { +# If testOneRegi was selected, set up a testOneRegi run. IF a +# scenario_config.csv file was provided, set cfg according to it (copy from +# start_bundle). +# check command-line arguments for testOneRegi and scenario_config file +argv <- commandArgs(trailingOnly = TRUE) +config.file <- argv[1] +if ('--testOneRegi' %in% argv) { + testOneRegi <- TRUE + config.file <- NA +} + +if (!is.na(config.file)) { cat(paste("reading config file", config.file, "\n")) - + # Read-in the switches table, use first column as row names settings <- read.csv2(config.file, stringsAsFactors = FALSE, row.names = 1, comment.char = "#", na.strings = "") @@ -115,26 +123,37 @@ if (!is.na(config.file)) { for (scen in rownames(scenarios)) { #source cfg file for each scenario to avoid duplication of gdx entries in files2export source("config/default.cfg") - + # Have the log output written in a file (not on the screen) cfg$slurmConfig <- slurmConfig cfg$logoption <- 2 start_now <- TRUE - + + # testOneRegi settings + if (testOneRegi) { + cfg$title <- 'testOneRegi' + cfg$gms$optimization <- 'testOneRegi' + cfg$output <- NA + cfg$results_folder <- 'output/testOneRegi' + + # delete existing Results directory + unlink('output/testOneRegi', recursive = TRUE) + } + # configure cfg based on settings from csv if provided if (!is.na(config.file)) { - + cfg <- configure_cfg(cfg, scen, scenarios, settings) - + # Directly start runs that have a gdx file location given as path_gdx_ref or where this field is empty - start_now <- (substr(scenarios[scen,"path_gdx_ref"], nchar(scenarios[scen,"path_gdx_ref"])-3, nchar(scenarios[scen,"path_gdx_ref"])) == ".gdx" + start_now <- (substr(scenarios[scen,"path_gdx_ref"], nchar(scenarios[scen,"path_gdx_ref"])-3, nchar(scenarios[scen,"path_gdx_ref"])) == ".gdx" | is.na(scenarios[scen,"path_gdx_ref"])) } - + # save the cfg data for later start of subsequent runs (after preceding run finished) cat("Writing cfg to file\n") save(cfg,file=paste0(scen,".RData")) - + if (start_now){ cat("Creating and starting: ",cfg$title,"\n") submit(cfg)