skip to main content
Running RiverWare in Batch Mode
The RiverWare Command Language (RCL) facility allows models to be run in batch mode. While in this mode, RiverWare does not open a user interface, but instead runs in background mode.
In batch mode, the user provides RiverWare with a script file, which contains the commands RiverWare executes. Commands are entered through the RCL file, rather than through the user interface. The commands are described in detail in the following document.
The syntax to invoke RiverWare in batch mode from a command prompt is:
riverware --batch <script file>
The following example will invoke the batch script file called BasinOperationsScript.rcl and will write the diagnostics output to file called BasinOperationsDiagnostics.txt.
riverware --batch “C:\MyRiverWareFiles\BasinOperationsScript.rcl” --log “C:\MyOutputs\BasinOperationsDiagnostics.txt”
The <script file> defines how the batch run should proceed. In the file, you specify commands to load a model, load a ruleset if necessary, start a run, and save the results. In the simplest case, you will load a model, run a simulation, save the model, and exit batch mode. The following RCL commands support these actions:
# Load the model
OpenWorkspace <Model Name>
# run the simulation
StartController
# save the model
SaveWorkspace <Model Name>.saved.mdl
# Close the opened model and exit RiverWare
CloseWorkspace
This is a very simple example. The full complement of key words and commands is presented in the following section.
Revised: 12/01/2020