Wflow can be used in two different ways, depending on the required use of the code:
- If you want to stay up-to-date with the latest version, explore and modify the model code, and write your own Julia scripts around the wflow package, we recommend installing wflow as a Julia package.
- If you don't need extra features, but just want to run simulations, a complied executable version is available. This consists of a single executable,
wflow_cli, allowing you to run the model via the command line.
Below, we describe how to install both versions of wflow.
Wflow is a Julia package, that can be installed through several different ways. Below we show how to install wflow from Julia's package repository, and how to install the latest version from GitHub.
To access Julia's package manager, press
] in the Julia REPL. To get back to the Julia REPL, press backspace or ^C.
If you have not used Julia in a while, it can be a good idea to run
up to update your packages.
Access Julia's package manager and install wflow using:
pkg> add Wflow
This can take a while, especially the first time, since compatible dependencies are also automatically looked up and installed from the Pkg General registry.
It is also possible to install wflow from the
master branch as follows:
pkg> add Wflow#master
This command will track the
master branch, and will update to the latest commit on that branch when you run
update, or simply
up, in the Pkg REPL. The use of
add will install wflow in you home directory under
.julia/packages/Wflow. Note that packages installed under
add are supposed to never be altered in that location, for Pkg and it's automatic dependency handling to work well.
If you want to make any changes to any of the files in the repository, you need to do a development install. This can be done using:
pkg> dev Wflow
This will clone the git repository, put it under your home directory in
.julia/dev/Wflow, and add the wflow package to your project environment. Note that to receive updates, you have to pull in the latest changes yourself using
Finally, go back the Julia REPL and try to load wflow:
julia> using Wflow
The first time this will take longer as any package that is new or changed needs to be pre-compiled first, to allow faster loading on subsequent uses. No error messages should appear, indicating that you have now successfully installed wflow.
Before ending this section, we still want to recommend a few tools that can make using and developing Julia code easier.
When planning to make changes to the code of wflow, we recommend installing the
Revise.jl package. This package allows you to modify code and use the changes without restarting Julia. Install it with
add Revise from the Pkg REPL. Then create a file called
.julia/config/startup.jl, and put
using Revise there. This will load Revise every time you start a Julia session.
wflow_cli can be downloaded from our website download.deltares.nl, and are currently available for Windows. Download and install the
.msi file. After installing you can see two folders in the installation directory. It is only the
bin/wflow_cli that is used. The artifacts folder contains binary dependencies such as NetCDF.
Check whether the installation was performed successfully, run
wflow_cli with no arguments in the command line will give the following message:
Usage: wflow_cli 'path/to/config.toml'
The old version of wflow, based on Python and PCRaster libraries is also available to download from our website download.deltares.nl. We recommend installing the Julia version, as this documentation is written to support this version.