Package: wflow
wflowwflow consists of a set of Python programs that can be run on the command line
and perform hydrological simulations. The models are based on the PCRaster
Python framework. In wflow this framework is extended (the wf_DynamicFramework)
so that models build using the framework can be controlled using the API.
Links to BMI, OpenMI and OpenDAP have been made.A link to the latest version can always be found athttps://github.com/openstreams/wflowReference documentation at:https://wflow.readthedocs.io/en/latest/Obtaining wflowGo tohttps://github.com/openstreams/wflow. There you can download the source or a release.
Also make sure you get the required third party models first (see below).Which version to useThe master branch can change rapidly (and break functionality without warning) so please
use one of the releases if possible. If you want to adjust things in the model(s) we
assume you should be comfortable using the master branch.InstallationInstall as a conda packageBy far the easiest way to install wflow, is using thecondapackage manager. This
package manager comes with the Anaconda Python distribution.wflowis available in theconda-forgechannel. To install
you can use the following command:conda install-cconda-forgewflowIf this works it will install wflow with all dependencies including Python and PCRaster,
and you skip the rest of the installation instructions.Installing Python and PCRaster dependenciesThe main dependencies for wflow are an installation of Python 3.6+, and PCRaster 4.2+.
Only 64 bit OS/Python is supported.Installing PythonFor Python we recommend using the Anaconda Distribution for Python 3, which is available
for download fromhttps://www.anaconda.com/download/. The installer gives the option to
addpythonto yourPATHenvironment variable. We will assume in the instructions
below that it is available in the path, such thatpython,pip, andcondaare
all available from the command line.Note that there is no hard requirement specifically for Anaconda’s Python, but often it
makes installation of required dependencies easier using the conda package manager.Installing pcrasterIf you are using conda, pcraster will be installed automatically in the section below, otherwise:Download pcraster fromhttp://pcraster.geo.uu.nl/website (version 4.2+)Follow the installation instructions athttp://pcraster.geo.uu.nl/quick-start-guide/Install as a conda environmentThe easiest and most robust way to install wflow is by installing it in a separate
conda environment. In the root repository directory there is anenvironment.ymlfile.
This file lists all dependencies. Either use theenvironment.ymlfile from the master branch
(please note that the master branch can change rapidly and break functionality without warning),
or from one of the releases {release}.Run this command to start installing all wflow dependencies:conda env create-fenvironment.ymlThis creates a new environment with the namewflow. To activate this environment in
a session, run:activate wflowFor the installation of wflow there are two options (from the Python Package Index (PyPI)
or from Github). To install a release of wflow from the PyPI (available from release 2018.1):pip installwflow=={release}To install directly from GitHub (from the HEAD of the master branch):pip installgit+https://github.com/openstreams/wflow.gitor from Github from a specific release:pip installgit+https://github.com/openstreams/wflow.git@{release}Now you should be able to start this environment’s Python withpython, tryimport wflowto see if the package is installed.More details on how to work with conda environments can be found here:https://conda.io/docs/user-guide/tasks/manage-environments.htmlIf you are planning to make changes and contribute to the development of wflow, it is
best to make a git clone of the repository, and do a editable install in the location
of you clone. This will not move a copy to your Python installation directory, but
instead create a link in your Python installation pointing to the folder you installed
it from, such that any changes you make there are directly reflected in your install.git clonehttps://github.com/openstreams/wflow.gitcd wflowactivate wflowpip install-e.Alternatively, if you want to avoid usinggitand simply want to test the latest
version from themasterbranch, you can replace the first line with downloading
a zip archive from GitHub:https://github.com/openstreams/wflow/archive/master.zipInstall using pipBesides the recommended conda environment setup described above, you can also install
wflow withpip. For the more difficult to install Python dependencies, it is best to
use the conda package manager:conda install numpy scipy gdal netcdf4 cftime xarray pyproj numbapython-dateutilThen install a release {release} of wflow (available from release 2018.1) with pip:pip installwflow=={release}If you want to avoid usingconda, an example of a PCRaster build and pip install on
Ubuntu Linux can be found inissue #36.Check if the installation is successfulTo check it the install is successful, go to the examples directory and run the following command:python-mwflow.wflow_sbm-Cwflow_rhine_sbm-RtestingThis should run without errors.CreditsThe stats.py script was made by Keith Cherkauer (https://engineering.purdue.edu/~cherkaue/software.htm)pcraster is developed and maintained by Utrecht University (http://www.pcraster.eu)netCDF4 is developed by unidata (http://unidata.github.io/netcdf4-python/)GDAL is released under an X/MIT style Open Source license by the Open Source Geospatial Foundation (http://www.gdal.org).CitationSee doi of the release you use. If you use a snapshot of the development (without a DOI) cite as follows:Jaap Schellekens, Willem van Verseveld, Martijn Visser, Hessel Winsemius, Tanja Euser, Laurène Bouaziz, Christophe Thiange, Sander de Vries,
Hélène Boisgontier, Dirk Eilander, Daniel Tollenaar, Albrecht Weerts, Fedor Baart, Pieter Hazenberg, Arthur Lutz, Corine ten Velden,
Mischa Jansen, Imme Benedict, YEAR. openstreams/wflow: unstable-master.https://github.com/openstreams/wflow, obtained: DATE_OF_DOWNLOADReleasesTo check the doi of releases you use:https://doi.org/10.5281/zenodo.593510