Skip to content

Commit

Permalink
bugfix resubmit.R and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
flohump committed Oct 18, 2024
1 parent 389b22d commit 4264621
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- **config** changed default input data to use 2017USD
- **module_documentation** all references to USD05 changed to USD17
- **scripts** REMIND coupling reads data in US$2017, not US$2005
- **config** updated input data to rev4.113

### added
- **62_material** added switch to turn off future material demand for bioplastic
Expand All @@ -20,7 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### fixed
- **11_costs** changed equation to fix bug in total water cost calculation
- **29_cropland** treecover age-class growth was not working properly because ac_sub was erroneously not fixed

- **scripts** script/output/extra/resubmit.R

## [4.8.2] - 2024-09-24

Expand Down
11 changes: 7 additions & 4 deletions scripts/output/extra/resubmit.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@ for (i in 1:length(outputdir)) {
print(paste("Checking",outputdir[i]))
#gdx file
gdx<-file.path(outputdir[i],"fulldata.gdx")
if(file.exists(gdx)) tmp <- modelstat(gdx) else tmp <- 0
if (any(tmp>2) | all(tmp==0)) {
file.copy(from = "scripts/run_submit/submit.sh",to = file.path(outputdir[i],"submit.sh"),overwrite = TRUE)
if(file.exists(gdx)) {
tmp <- try(modelstat(gdx),silent = TRUE)
if(!is.magpie(tmp)) tmp <- 0
} else tmp <- 0
if (any(tmp>2) | any(tmp==0)) {
file.copy(from = "scripts/run_submit/submit_standby.sh",to = file.path(outputdir[i],"submit_standby.sh"),overwrite = TRUE)
current <- getwd()
setwd(outputdir[i])
if (file.exists("magpie_y1995.gdx")) file.remove("magpie_y1995.gdx")
system("sbatch submit.sh")
system("sbatch submit_standby.sh")
setwd(current)
}
}

0 comments on commit 4264621

Please sign in to comment.