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

update all enty split #12

Merged
merged 11 commits into from
Aug 10, 2022
56 changes: 28 additions & 28 deletions config/21_regions_EU11/scenario_config_21_EU11_ARIADNE.csv

Large diffs are not rendered by default.

202 changes: 101 additions & 101 deletions config/21_regions_EU11/scenario_config_21_EU11_INNOPATHS.csv

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions config/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -444,15 +444,15 @@ cfg$gms$c_regi_nucscen <- "all" # def <- "all"
cfg$gms$c_regi_capturescen <- "all" # def <- "all"
cfg$gms$c_regi_sensscen <- "all" # def <- "all"

cfg$gms$cm_flex_tax <- 0 # def 0
cfg$gms$cm_flex_tax <- 1 # def 1

cfg$gms$cm_TaxConvCheck <- 0 # def <- 0, tax convergence check off

cfg$gms$cm_EDGEtr_scen <- "Mix1" # def <- "Mix1". For calibration runs: Mix1. Mix2, Mix3, Mix4 also available - numbers after the "mix" denote policy strength, with 1 corresponding roughly to Baseline/NPI, 2= NDC, 3= Budg1500, 4 = Budg800

cfg$gms$cm_H2targets <- 0 # def 0, off

cfg$gms$cm_PriceDurSlope_elh2 <- 20 # def 20
cfg$gms$cm_PriceDurSlope_elh2 <- 15 # def 15
cfg$gms$cm_FlexTaxFeedback <- 0 # def 0, off

cfg$gms$cm_build_H2costAddH2Inv <- 0.2 # Buildings def 0.2 $/Kwh (6.5$/kg)
Expand Down
42 changes: 21 additions & 21 deletions config/scenario_config_DeepEl.csv

Large diffs are not rendered by default.

254 changes: 127 additions & 127 deletions config/scenario_config_NGFS_v3.csv

Large diffs are not rendered by default.

84 changes: 42 additions & 42 deletions config/scenario_config_SHAPE.csv

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions main.gms
Original file line number Diff line number Diff line change
Expand Up @@ -542,8 +542,8 @@ cm_logitCal_markup_newtech_conv_b = 0.3; !! def 0.3
cm_build_AdjCostActive = 0; !! def 0 = Adjustment cost deactivated (set to 1 to activate)

*** flex tax switches
cm_flex_tax = 0; !! def 0
cm_PriceDurSlope_elh2 = 20; !! def 10
cm_flex_tax = 1; !! def 1
cm_PriceDurSlope_elh2 = 15; !! def 15
cm_FlexTaxFeedback = 0; !! def 0

*** VRE switch
Expand Down
2 changes: 1 addition & 1 deletion modules/32_power/IntC/equations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ q32_shStor(t,regi,teVRE)$(t.val ge 2015)..
=g=
p32_factorStorage(regi,teVRE) * 100
* (
(1.e-10 + (v32_shSeEl(t,regi,teVRE)+ sum(VRE2teVRElinked(teVRE,teVRE2), v32_shSeEl(t,regi,teVRE2)) /s32_storlink)/100 ) ** p32_storexp(regi,teVRE) !! offset of 1.e-10 for numerical reasons: gams doesn't like 0 if the exponent is not integer
(1.e-10 + (v32_shSeEl(t,regi,teVRE)+ sum(VRE2teVRElinked(teVRE,teVRE2), v32_shSeEl(t,regi,teVRE2)) /s32_storlink)/100 ) ** p32_storexp(regi,teVRE) !! offset of 1.e-10 for numerical reasons: gams doesnt like 0 if the exponent is not integer
- (1.e-10 ** p32_storexp(regi,teVRE) ) !! offset correction
- 0.07 !! first 7% of VRE share bring no negative effects
)
Expand Down
10 changes: 4 additions & 6 deletions output.R
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,9 @@ if (comp == "Exit") {
# define slurm class or direct execution
if (! exists("source_include")) {
# for selected output scripts, only slurm configurations matching these regex are available
slurmExceptions <- switch(output,
reporting = "--mem=[0-9]*[0-9]{3}",
plotIterations = "^direct",
NULL
)
slurmExceptions <- if ("reporting" %in% output) "--mem=[0-9]*[0-9]{3}" else NULL
outputUsingDirect <- c("plotIterations")
if (all(output %in% outputUsingDirect)) slurmConfig <- "direct"
# if this script is not being sourced by another script but called from the command line via Rscript let the user
# choose the slurm options
if (!exists("slurmConfig")) {
Expand Down Expand Up @@ -339,7 +337,7 @@ if (comp == "Exit") {
for (rout in output) {
name <- paste(rout, ".R", sep = "")
if (file.exists(paste0("scripts/output/single/", name))) {
if (slurmConfig == "direct") {
if (slurmConfig == "direct" | rout %in% outputUsingDirect) {
# execute output script directly (without sending it to slurm)
message("Executing ", name)
tmp.env <- new.env()
Expand Down
4 changes: 3 additions & 1 deletion scripts/output/comparison/policyCosts.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ write_new_reporting <- function(mif_path,
my_data <- magclass::add_dimension(my_data, dim=3.1, add = "scenario", nm = scen_name)

magclass::write.report(my_data, file = new_mif_path, ndigit = 7)
remind2::deletePlus(new_mif_path, writemif=TRUE)

return(new_mif_path)
}
Expand Down Expand Up @@ -202,7 +203,8 @@ report_transfers <- function(pol_mif, ref_mif) {
magclass::add_dimension(dim=3.1,add = "scenario",nm = sc)

magclass::write.report(pol_run, file = pol_mif, ndigit = 7, skipempty = FALSE)

remind2::deletePlus(pol_mif, writemif = TRUE)

return(my_transfers)
}
# ###### END FUNCTION DEFINITONS ########################################
Expand Down
6 changes: 3 additions & 3 deletions tutorials/4_RunningREMINDandMAgPIE.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bash /p/projects/rd3mod/R/libraries/Scripts/create_snapshot_with_day.sh

### Activate snapshot for REMIND and MAgPIE

Direct the models to the snapshot you just created above by editing [`.Rprofile`](../.Rprofile) in both REMIND's main folder. This file will be copied to the MAgPIE main folder automatically. Uncomment these line by deleting `#` and change the date to today (the `_R4` is necessary if you run `R 4.0` or later):
Direct the models to the snapshot you just created above by editing [`.Rprofile`](../.Rprofile) in REMIND's main folder. This file will be copied to the MAgPIE main folder automatically. Uncomment these line by deleting `#` and change the date to today (the `_R4` is necessary if you run `R 4.0` or later):

```bash
# snapshot <- "/p/projects/rd3mod/R/libraries/snapshots/2022_05_17_R4"
Expand All @@ -73,7 +73,7 @@ Here's an example of a simple case. If you start a new coupled run with the scen

This process will continue until for as many iterations as set in `max_iterations` in `start_bundle_coupled.R` (see Check the Convergence below). The last iteration will run REMIND only, so REMIND will have run `max_iterations` times and MAgPIE wil have run `max_iterations - 1` times. So, if `max_iterations` is 5, the last REMIND run in this case will be `C_SSP2-Base-rem-5` and the last MAgPIE iteration will be `C_SSP2-Base-mag-4`.

The output of both models can be analyzed normally from these two runs. However, at the end of a successful coupled run the coupling script will automatically merge the reports of the last runs of both models in a `.mif` file located in the root of REMIND's output folder. In our example, that file will be `path_remind/output/C_SSP-Base.mif`.
The output of both models can be analyzed normally from these two runs. The REMIND .mif file contains also the MAgPIE variables. Additionally, at the end of a successful coupled run the coupling script will automatically merge the reports of the last runs of both models in a `.mif` file located in the root of REMIND's output folder, using the joint model name "REMIND-MAgPIE". In our example, that file will be `path_remind/output/C_SSP-Base.mif`.

So, in the end of the coupled run in this example, you should have a directory structure like:

Expand Down Expand Up @@ -139,7 +139,7 @@ Other, optional columns allow you to make a run start only after another has fin
- If you set any of these `path_gdx…` columns (or `path_mif_ghgprice_land`, below) with a scenario name such as `SSP2-Base`, the coupling script will not start any runs that depend on an unfinished run, and automatically start them when that run finishes. So, in the example above, you can set `start` to `1` in both `SSP2-Base` and `SSP2-NDC`, `SSP2-NDC` will only start *after* `SSP2-Base` is finished. In "parallel" mode, `SSP2-NDC-rem-1` will start after `SSP2-Base-rem-1` is finished, while in "serial" mode, it waits for `SSP2-Base-rem-5`.
- If you set any of these settings with a scenario name, the script will automatically try to detect whether the required "parent" run including the reporting is already finished and uses the appropriate `fulldata.gdx` then. In "serial" mode, if for some reason you changed `max_iterations` between the "parent" run and the current one, it's safer to specify a full path to a `fulldata.gdx` in these settings, otherwise the script may look for the wrong iteration of the "parent" scenario.
- You can also set it to `C_SSP2-Base-rem-3` if for some reason, you want the results of a specific iteration.
- `path_mif_ghgprice_land`: This setting allows MAgPIE to be run using an exogenous, fixed GHG price path, regardless of the GHG price in the REMIND coupling. This can be useful if you want to simulate different GHG pricing policies in the land-use sector. It's timing is also controlled by `no_ghgprices_land_until`.
- `path_mif_ghgprice_land`: This setting allows MAgPIE to be run using an exogenous, fixed GHG price path, regardless of the GHG price in the REMIND coupling. This can be useful if you want to simulate different GHG pricing policies in the land-use sector. Its timing is also controlled by `no_ghgprices_land_until`.
- As with the `path_gdx*` settings, this can be set both to the full path of a REMIND `.mif` reporting file (*not* a `.gdx`) or to the name of another scenario. If set to the name of another scenario, it will also wait for that run to finish before starting the dependent run as described.
- `oldrun`: This setting can be used to continue a coupled run that had a different name and/or is in a different folder. It works in almost the same way as `path_gdx`, but it is used only if no REMIND run has been finished for this scenario. It will look in the path set in `start_bundle_coupled.R`'s `path_remind_oldruns`. This can be useful when continuing a previous experiment that was made in another REMIND copy, or after changing scenario names.
- `cm_nash_autoconverge_lastrun`: can be used to specify `cm_nash_autoconverge`, but only for the last REMIND run, for example to increase precision there by setting it to `2`.
Expand Down