Skip to content

Commit

Permalink
Merge pull request #15 from JFeldbauer/master
Browse files Browse the repository at this point in the history
added run scripts
  • Loading branch information
JFeldbauer authored Mar 16, 2021
2 parents 4b83598 + 226d521 commit 4de963d
Show file tree
Hide file tree
Showing 6 changed files with 135 additions and 1 deletion.
27 changes: 27 additions & 0 deletions LakeErken/run_lakeensemblr.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#initial clean up
rm(list = ls())
graphics.off()
cat("\f")

# set working directory
setwd(dirname(rstudioapi::getSourceEditorContext()$path))

# load library
library(LakeEnsemblR)

# Set config file
config_file <- "LER_Erken_hourly.yaml"
model <- c("FLake", "GLM", "GOTM", "Simstrat", "MyLake")
# 1. Example - creates directories with all model setup
export_config(config_file = config_file, model = c("FLake", "GLM", "GOTM", "Simstrat", "MyLake"),
folder = ".")
# 2. Run ensemble lake models
run_ensemble(config_file = config_file,
model = c("FLake", "GLM", "GOTM", "Simstrat", "MyLake"),
return_list = FALSE, parallel = FALSE)


# name of the netcdf output file
ncdf <- "output/ensemble_output.nc"
# plot heatmap
plot_heatmap(ncdf)
27 changes: 27 additions & 0 deletions LakeGiles/run_lakeensemblr.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#initial clean up
rm(list = ls())
graphics.off()
cat("\f")

# set working directory
setwd(dirname(rstudioapi::getSourceEditorContext()$path))

# load library
library(LakeEnsemblR)

# Set config file
config_file <- "Giles_master_config.yaml"
model <- c("FLake", "GLM", "GOTM", "Simstrat", "MyLake")
# 1. Example - creates directories with all model setup
export_config(config_file = config_file, model = c("FLake", "GLM", "GOTM", "Simstrat", "MyLake"),
folder = ".")
# 2. Run ensemble lake models
run_ensemble(config_file = config_file,
model = c("FLake", "GLM", "GOTM", "Simstrat", "MyLake"),
return_list = FALSE, parallel = FALSE)


# path of the output netcdf file
ncdf <- "output/ensemble_output.nc"
# plot heatmap
plot_heatmap(ncdf)
27 changes: 27 additions & 0 deletions LakeMendota/run_lakeensemblr.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#initial clean up
rm(list = ls())
graphics.off()
cat("\f")

# set working directory
setwd(dirname(rstudioapi::getSourceEditorContext()$path))

# load library
library(LakeEnsemblR)

# Set config file
config_file <- "LakeEnsemblR.yaml"
model <- c("FLake", "GLM", "GOTM", "Simstrat", "MyLake")
# 1. Example - creates directories with all model setup
export_config(config_file = config_file, model = c("FLake", "GLM", "GOTM", "Simstrat", "MyLake"),
folder = ".")
# 2. Run ensemble lake models
run_ensemble(config_file = config_file,
model = c("FLake", "GLM", "GOTM", "Simstrat", "MyLake"),
return_list = FALSE, parallel = FALSE)


# path of the output netcdf file
ncdf <- "output/ensemble_output.nc"
# plot heatmap
plot_heatmap(ncdf)
27 changes: 27 additions & 0 deletions Langtjern/run_lakeensemblr.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#initial clean up
rm(list = ls())
graphics.off()
cat("\f")

# set working directory
setwd(dirname(rstudioapi::getSourceEditorContext()$path))

# load library
library(LakeEnsemblR)

# Set config file
config_file <- "LER_Langtjern_1hour.yaml"
model <- c("FLake", "GLM", "GOTM", "Simstrat", "MyLake")
# 1. Example - creates directories with all model setup
export_config(config_file = config_file, model = c("FLake", "GLM", "GOTM", "Simstrat", "MyLake"),
folder = ".")
# 2. Run ensemble lake models
run_ensemble(config_file = config_file,
model = c("FLake", "GLM", "GOTM", "Simstrat", "MyLake"),
return_list = FALSE, parallel = FALSE)


# path of the output netcdf file
ncdf <- "output/ensemble_output.nc"
# plot heatmap
plot_heatmap(ncdf)
2 changes: 1 addition & 1 deletion LoughFeeagh/LakeEnsemblR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ inflows:
use: false # use in- and outflows? [true/false]
file: LakeEnsemblR_inflow_standard_round.csv # file with inflow data, with column headers according to LakeEnsemblR vocabulary [csv file; must be provided if inflows -> use is true]
scale_param: 1.0 # scaling factor for discharge in inflow, for example to correct for the percentage of catchment area drained by the inflow
mass-balance: true # enforce pseudo mass-balance by adding an artifical outflow for every inflow [true/false]
mass-balance: false # enforce pseudo mass-balance by adding an artifical outflow for every inflow [true/false]
output:
file: ensemble_output # name of output file, excluding extension
format: netcdf # format [text/netcdf]
Expand Down
26 changes: 26 additions & 0 deletions LoughFeeagh/run_lakeensemblr.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#initial clean up
rm(list = ls())
graphics.off()
cat("\f")

# set working directory
setwd(dirname(rstudioapi::getSourceEditorContext()$path))

# load library
library(LakeEnsemblR)

# Set config file
config_file <- "LakeEnsemblR.yaml"
model <- c("FLake", "GLM", "GOTM", "Simstrat", "MyLake")
# 1. Example - creates directories with all model setup
export_config(config_file = config_file, model = c("FLake", "GLM", "GOTM", "Simstrat", "MyLake"),
folder = ".")
# 2. Run ensemble lake models
run_ensemble(config_file = config_file,
model = c("FLake", "GLM", "GOTM", "Simstrat", "MyLake"),
return_list = FALSE, parallel = FALSE)

# path of the output netcdf file
ncdf <- "output/ensemble_output.nc"
# plot heatmap
plot_heatmap(ncdf)

0 comments on commit 4de963d

Please sign in to comment.