|
|
#Introduction {#intro}
|
|
|
**Please have a look at the same page for MeteoIO [Getting-Started](https://meteoio.slf.ch/Getting-started) for more details on the installation procedure.**
|
|
|
|
|
|
StreamFlow is an extension to the spatially-distributed snow model [Alpine3D](https://alpine3d.slf.ch/Getting-started/), but the two tools are independent and run separately. In order for StreamFlow to run properly, you must configure Alpine3D so as to output certain files which will be used by StreamFlow as input data (see [running StreamFlow](Running-StreamFlow)). You actually do not need to have Alpine3D installed on your machine as long as you have these files in your possession; you could for example transfer them from another machine or even get them from colleges familiar with Alpine3D.
|
|
|
|
|
|
Once you have StreamFlow installed on your system, you can learn to run a simulation at the following page: (running StreamFlow)[Running-StreamFlow].
|
|
|
|
|
|
# Installation of StreamFlow from sources
|
|
|
In order to reduce the maintenance burden and to make StreamFlow easier to tailor to specific needs, it has been decomposed into several tools:
|
|
|
|
|
|
* [MeteoIO](https://meteoio.slf.ch) for data retrieval and preprocessing
|
|
|
* [libstreamflow](https://code.wsl.ch/snow-hydrology/streamflow/-/tree/master/streamflow) for doing the core computation and [StreamFlow](https://code.wsl.ch/snow-hydrology/streamflow/-/tree/master/applications/streamflow) for calling libstreamflow to perform a hydrological simulation (i.e. what most people want out of StreamFlow)
|
|
|
|
|
|
In order for StreamFlow to work on your system, you need to have [MeteoIO](https://meteoio.slf.ch) on your system, compiled and preferably installed. As mentioned in the introduction, you may also want to install [Alpine3D](https://alpine3d.slf.ch) so as to produce the files required by StreamFlow as input data. The installation procedure for MeteoIO can be found [here](https://meteoio.slf.ch/Getting-started/), the one for Alpine3D is located [here](https://alpine3d.slf.ch/Getting-started/).
|
|
|
|
|
|
## Directory structure
|
|
|
If you don't want to install MeteoIO on your system, it is highly recommended to keep the following directory structure (so it can still be automatically found):
|
|
|
```
|
|
|
|
|
|
|
|-----> streamflow trunk
|
|
|
|-----> meteoio trunk
|
|
|
```
|
|
|
|
|
|
If you install MeteoIO, you have to provide its installation root directory to cmake (something such as "/usr" or "~/usr") and make sure this directory exists. Please do not confuse the source directory (ie where your sources are) and the installation directory (where the compiled versions are made available to your system). When you do a "make install", you basically copy the binaries from your source directory to the install directory of your choice.
|
|
|
|
|
|
## Online Documentation
|
|
|
Regarding the documentation, you can either generate it from your download using doxygen (see MeteoIO's [Getting started]((https://meteoio.slf.ch/Getting-started/))) or separately download a documentation only package (in the [Releases](https://code.wsl.ch/snow-hydrology/streamflow/-/releases)).
|
|
|
|
|
|
# Having StreamFlow in your PATH
|
|
|
In order to run StreamFlow from the command line without having to type its full path every time, StreamFlow's path should be added to the PATH environment variable (if this has not already been done by the installer).
|
|
|
|
|
|
## PATH for Linux and osX
|
|
|
Edit either your ${HOME}/.profile or ${HOME}/.bashrc file and add the following:
|
|
|
|
|
|
* on both Linux and osX: `export PATH={install path to StreamFlow}/bin:$PATH`
|
|
|
* on Linux: `export LD_LIBRARY_PATH={install path to StreamFlow}/lib:$LD_LIBRARY_PATH`
|
|
|
* on osX: `export DYLD_FALLBACK_LIBRARY_PATH={install path to StreamFlow}/lib:$DYLD_FALLBACK_LIBRARY_PATH`
|
|
|
|
|
|
On osX, this file might have to be created, see [tech-recipes.com](<A HREF=")http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable).
|
|
|
|
|
|
## PATH for Windows
|
|
|
The procedure to include StreamFlow's path to the PATH variable depends on the version of Windows that you are using. For Windows7, from the start menu, go to: `Start > Control Panel > System and Security > System > Advanced system settings`. Then in the `Advanced` tab, either create/edit the PATH variable in the `User variables` or in the `System variables` to contain `{install path to StreamFlow}/bin`. |
|
|
\ No newline at end of file |