|
|
|
[[_TOC_]]
|
|
|
|
|
|
|
|
# HRU delin next gen
|
|
|
|
|
|
|
|
HRU delin used to work with grass6 only. This version brings compatibility with grass7 (and looses compatibility with grass6).
|
|
|
|
|
|
|
|
## Differences with HRU delin v5
|
|
|
|
|
|
|
|
* Grass7 compatibility
|
|
|
|
* Parallelized process in step2, step3 and step4
|
|
|
|
* Launch scripts now accept an optional parameter to specify where to find the config file (with any name)
|
|
|
|
* Advanced progression display
|
|
|
|
* Automatic grass environment building, no more need to build a "case"
|
|
|
|
* Flexibility in config file values path (accepts relative and absolute path)
|
|
|
|
* Flexibility in user location when running launch scripts
|
|
|
|
* New launch script to run all steps
|
|
|
|
* No more system calls (to awk, grep, sed...) -> code is now portable to Windows
|
|
|
|
* Use pipes between grass tools to avoid some hard disk access (avoid writing some intermediate files)
|
|
|
|
|
|
|
|
## Install
|
|
|
|
|
|
|
|
### Dependencies
|
|
|
|
|
|
|
|
You'll need some Python3 modules to be able to run HRU delin.
|
|
|
|
|
|
|
|
* TQDM: display progress
|
|
|
|
* Pandas: read/write tabular files and perform some computations
|
|
|
|
* dbf: write dbf versions of hru.par and reach.par
|
|
|
|
|
|
|
|
On Debian/Ubuntu/Mint/... you can install those with your package manager like that:
|
|
|
|
``` bash
|
|
|
|
sudo apt install python3-pandas python3-dbf python3-tqdm
|
|
|
|
```
|
|
|
|
|
|
|
|
If you don't have administrator rights but still have pip3 installed:
|
|
|
|
``` bash
|
|
|
|
pip3 install --user pandas dbf tqdm
|
|
|
|
```
|
|
|
|
|
|
|
|
### HRU delin
|
|
|
|
|
|
|
|
Get the release archive and extract it somewhere. Then make sure the `bin` directory is in your `PATH` environment variable. Here is an example procedure:
|
|
|
|
``` bash
|
|
|
|
# go to your home directory
|
|
|
|
cd
|
|
|
|
# extract the archive (adapt the path to the archive)
|
|
|
|
tar xvf Downloads/hru-delin-v7.tar.bz2
|
|
|
|
cd hru-delin
|
|
|
|
# add bin directory to your PATH variable
|
|
|
|
echo 'export PATH='`pwd`/bin':$PATH' >> ~/.bashrc
|
|
|
|
```
|
|
|
|
That's is, now every **new** terminal will be able to run HRU delin. To check if everything is fine, open a new terminal and type
|
|
|
|
``` bash
|
|
|
|
which hru-delin_step1.sh
|
|
|
|
```
|
|
|
|
It should display something like `/home/myname/hru-delin/bin/hru-delin_step1.sh`. If not, there's something wrong. |
|
|
|
\ No newline at end of file |