Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
flohump committed Nov 20, 2024
1 parent 32d659a commit 94ce089
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions scripts/start/projects/paper_peatlandTax.R
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,11 @@ if(is.null(x) | (is.magpie(x) & any(!x %in% c(2,7)))) {
success <- FALSE
while (!success) {
z <- NULL
for (rcp in rcps) {
for (ssp in ssps) {
x <- try(modelstat(file.path("output",cfg$title,"fulldata.gdx")),silent = TRUE)
if (is.magpie(x) & all(x %in% c(2,7))) {
x <- add_dimension(collapseNames(x),dim = 3.1,add = "scen",nm = paste0(ssp,rcp))
} else x <- NULL
z <- mbind(z,x)
}
}
x <- try(modelstat(file.path("output",cfg$title,"fulldata.gdx")),silent = TRUE)
if (is.magpie(x) & all(x %in% c(2,7))) {
x <- add_dimension(collapseNames(x),dim = 3.1,add = "scen",nm = paste0(ssp,rcp))
} else x <- NULL
z <- mbind(z,x)
if (is.null(z)) {
message("Not any model run with endogenous TAU finished. Sleeping for 10 minutes.")
Sys.sleep(60*10)
Expand Down

0 comments on commit 94ce089

Please sign in to comment.