echse_run: Executes simulations with the WASA engine of the ECHSE...

Description Usage Arguments Value Note Author(s)

Description

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

Usage

1
2
3
4
5
echse_run(dir_input = NULL, run_name = NULL, echse_app = NULL,
  choices = NULL, output_sel = NULL, output_dbg = NULL,
  sim_start = NULL, sim_end = NULL, resolution = 86400,
  warmup_start = NULL, warmup_len = 3, max_pre_runs = 20,
  storage_tolerance = 0.01, error2warn = FALSE, nthreads = 1)

Arguments

dir_input

Character string giving the main simulation directory containing a directory 'data' with the readily prepared ECHSE input (e.g. prepared with function echse_prep_runs).

run_name

Character string defining the name of a sub-directory within dir_input to be created as storage of the actual simulations. It will further contain the directories 'pars' containing ECHSE's control files and parameter files with the model structure choices (if choices is given), and 'out' containing the actual simulation output.

echse_app

Character string giving the system command of the application.

choices

A named data.frame with each element containing the flag for a specific choice. See the latest version of ECHSE's WASA engine for required choice flags. If NULL (the default), it is assumed the model is run with default or manually defined selections. In that case, the 'data/parameter' input directory needs to contain the actual sharedParamNum_WASA_* files instead of the *_tpl.dat files.

output_sel

A named data.frame with elements 'object', 'variable', and 'digits' defining the output to be generated. Needed for control file 'output_selection.txt'. See the ECHSE core manual for further information. If NULL (default), the variable 'out' of object 'node_su_out_1' will be given (i.e. the basin's outlet river flow in m3/s).

output_dbg

A character vector specifying the names of objects for which debug output shall be written. Needed for control file 'output_debug.txt'. If set to NULL (default), no debug output will be generated.

sim_start

Character string giving the start date of the simulation period in the format "%Y-%m-%d %H:%M:%S".

sim_end

Character string giving the end date of the simulation period in the format "%Y-%m-%d %H:%M:%S".

resolution

Integer giving the simulation time step in seconds. Default: 86400 (i.e. daily resolution).

warmup_start

Character string giving the start date of the warm-up period in the format "%Y-%m-%d %H:%M:%S". If NULL (default), argument 'sim_start' will be 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.

error2warn

Value of type logical. Shall runtime errors of the model be reported as a warning instead of stopping this function with an error? Default: FALSE.

nthreads

Number of cores that shall be employed for the ECHSE run (argument 'number_of_threads' in configuration file). See ECHSE core manual for more information.

Value

Function returns nothing.

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.