wasa_run: Executes simulations with the WASA-SED model

Description Usage Arguments Value Note Author(s)

Description

Function executes simulation with the WASA-SED model including warm-up runs to start from stable model states as initial conditions.

Usage

1
2
3
4
wasa_run(dir_run = NULL, wasa_app = NULL, warmup_start = NULL,
  warmup_len = 3, max_pre_runs = 20, storage_tolerance = 0.01,
  keep_warmup_states = FALSE, log_meta = NULL, keep_log = FALSE,
  error2warn = FALSE)

Arguments

dir_run

Character string giving the WASA-SED simulation directory. Needs to contain sub-directories 'input' and 'output'.

wasa_app

Character string giving the system command of the WASA-SED application.

warmup_start

An object of class 'date' giving the start date of the warm-up period. If NULL (default), the value in do.dat (lines 4 and 6) is used.

warmup_len

Integer giving the length of the warm-up period in months. Default: 3.

max_pre_runs

Integer specifying the maximum number of warm-up iterations to be applied. If the relative storage change is still larger than storage_tolerance after max_pre_runs iterations, the warm-up will be aborted and the model be run anyway. A warning will be issued. Default: 20.

storage_tolerance

Numeric value giving the relative change of the model's water storages between two connsecutive warm-up runs below which the warm-up will be concluded and the actual model simulation be started. Default: 0.01.

keep_warmup_states

Logical value. Shall state storage files after finishing the warm-up runs be stored for upcomming runs? If so, the *.stat files will be copied into dir_run/input. WARNING: Existing *.stat files will be overwritten! Default: FALSE.

log_meta

Character containg the name (and path) of a file into which information about the function call will be written. See below for more information. Default: NULL, i.e. no logile will be created. If the file already exists, the file name to be created will be extended by a call to tempfile.

keep_log

Value of type logical. Shall the WASA-SED specific log file (not to be confused with log_meta!) of the model run be written (to dir_run)? Default: FALSE.

error2warn

Value of type logical. Shall runtime errors of the model be reported as a warning instead of stopping this function with an error? If so, the model run's log file will be saved. Default: FALSE.

Value

Function returns nothing.

If argument log_meta was given, the logfile contains the following information: run_dir: realisation of argument dir_run, time_simrun: runtime of the simulation run (in secs.), time_warmup: total runtime for all warm-up runs (in secs.), warmup_iterations: number of warm-up iterations, warmup_storchange: relative storage change after the last warm-up iteration.

Note

To avoid warm-up runs, set max_pre_runs or warmup_len to zero.

Author(s)

Tobias Pilz tpilz@uni-potsdam.de


tpilz/WasaEchseTools documentation built on May 5, 2019, 12:33 p.m.