Running a simulation

Using Julia

Once you installed Julia and Wflow.jl, a simulation can be started from the command line as follows:

julia -e "using Wflow; Wflow.run()" "path/to/config.toml"

Furthermore, it is possible to write a Julia script to run a simulation. Example data to explore how this works can be found here.

using Wflow
toml_path = "path/to/config.toml"
Wflow.run(toml_path)

Julia can also be used to modify settings after reading the settings file. In the example below, we show how to adjust the end date of the simulation.

using Dates
toml_path = "path/to/config.toml"
config = Wflow.Config(toml_path)
config.endtime = DateTime("2000-01-03T00:00:00")
Wflow.run(config)

Using the command line interface

If you don’t need the extra features of using wflow as a library, but just want to run simulations, the command line interface makes it easier to do so. It consists of a single executable, wflow_cli that accepts a single argument, the path to a TOML configuration file.

Binaries of wflow_cli can be downloaded from our website download.deltares.nl, and are currently available for Windows.

After installing, you can run wflow_cli from a new terminal session. Simply running wflow_cli with no arguments will give the following message:

Usage: wflow_cli "path/to/config.toml"

When starting a run, you will see basic run information on the screen, as well as a progress bar, that gives an estimate of how much time is needed to finish the simulation:

 Info: Run information
   model_type = "sbm"
   starttime = CFTime.DateTimeStandard(2000-01-01T00:00:00)
   dt = 86400 seconds
   endtime = CFTime.DateTimeStandard(2000-12-31T00:00:00)
   nthreads() = 4

Progress: 100%|██████████████████████████████████████████████████| Time: 0:00:27
Back to top