Skip to content

Commit c0c32c7

Browse files
committed
Merge for release_proposal_v4.3.0 with numba replacing Cython. Updated docs and lisflood flags.
1 parent 69a6357 commit c0c32c7

35 files changed

+477
-533
lines changed

.coveragerc

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
[run]
22
omit =
3-
src/lisflood/hydrological_modules/compile_kinematic_wave_parallel_tools.py
43
tests/*

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ npm-debug.log*
1717
__pycache__/
1818
build/
1919
*.so
20-
kinematic_wave_parallel_tools.html
2120
lisflood_model.egg-info
2221
/dist/
2322
.eggs
2423
.tox
2524
/src/dist/
26-
/src/lisflood/hydrological_modules/kinematic_wave_parallel_tools.c
2725
.coverage
2826
*.tox.ini
2927
.vscode/

Dockerfile

-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ COPY src/lisfloodSettings_reference.xml /
2727
COPY LICENSE /
2828
COPY VERSION /
2929

30-
# Compile kwpt
31-
RUN cd /lisflood/hydrological_modules && conda run -n lisflood python compile_kinematic_wave_parallel_tools.py build_ext --inplace
32-
3330
# RUN Tests
3431
COPY tests/. /tests/
3532
COPY pytest.ini /tests

MANIFEST.in

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
include src/lisflood/hydrological_modules/kinematic_wave_parallel_tools.pyx
21
include requirements.txt
32
include *.xml
43
include VERSION

README.md

+2-21
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ You can use conda environment to easily install dependencies.
2626
```bash
2727
conda create --name lisflood python=3.7 -c conda-forge
2828
conda activate lisflood
29-
conda install -c conda-forge pcraster
29+
conda install -c conda-forge pcraster gdal
3030
```
3131

3232
* Install lisflood-model pypi package
@@ -61,26 +61,7 @@ pip install -r requirements.txt
6161
If you don't use conda but a plain virtualenv, you need to install PCRaster and GDAL by your own and include its python interface in PYTHONPATH environment variable.
6262
For details, please follow instruction on [official docs](http://pcraster.geo.uu.nl).
6363

64-
65-
3. Compile the cython module kinematic_wave_parallel_tool
66-
67-
To compile this Cython module to enable OpenMP multithreading (parallel kinematic wave):
68-
69-
* Delete the files *.so (if any) in directory hydrological-modules
70-
71-
* Inside the hydrological_modules folder, execute "python compile_kinematic_wave_parallel_tools.py build_ext --inplace"
72-
73-
Important: the module has to be compiled on the machine where the model is run - the resulting binary is not portable.
74-
75-
Then in the settings file the option "numberParallelThreadsKinematicWave" may take the following values:
76-
- "0" : auto-detection of the machine/node's number of CPUs (all CPUs are used minus 1) (do not set it if other simulations are running on the same machine/node)
77-
- "1" : serial execution (not parallel)
78-
- "2", "3", ... : manual setting of the number of parallel threads.
79-
(if exceeding the number of CPUs, the option is set to "0") -->
80-
```xml
81-
<textvar name="numCPUs_parallelKinematicWave" value="3"/>
82-
```
83-
4. Run a cold run for the test catchment
64+
3. Run a cold run for the test catchment
8465

8566
Now your environment should be set up to run lisflood. Try with a prepared settings file for one of the two test catchments:
8667

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.2.0
1+
4.3.0

docs/3_step2_installation/index.md

+2-22
Original file line numberDiff line numberDiff line change
@@ -95,32 +95,12 @@ If you don't use conda but a plain virtualenv, you need to install PCRaster and
9595
For details, please follow instruction on [official docs](https://pcraster.geo.uu.nl/pcraster/4.3.1/documentation/pcraster_project/install.html).
9696
9797
98-
3. **Compile the cython module kinematic_wave_parallel_tool**
99-
100-
To compile this Cython module to enable OpenMP multithreading (parallel kinematic wave):
101-
102-
* Delete the files *.so (if any) in directory hydrological-modules
103-
* Inside the hydrological_modules folder, execute `python compile_kinematic_wave_parallel_tools.py build_ext --inplace`
104-
105-
Important: the module has to be compiled on the machine where the model is run - the resulting binary is not portable.
106-
107-
Then in the settings file the option "numberParallelThreadsKinematicWave" may take the following values:
108-
109-
* "0" : auto-detection of the machine/node's number of CPUs (all CPUs are used minus 1) (do not set it if other simulations are running on the same machine/node)
110-
* "1" : serial execution (not parallel)
111-
* "2", "3", ... : manual setting of the number of parallel threads.
112-
(if exceeding the number of CPUs, the option is set to "0")
113-
114-
```xml
115-
<textvar name="numCPUs_parallelKinematicWave" value="3"/>
116-
```
117-
118-
4. **Run a cold run for the test catchment**
98+
3. **Run a cold run for the test catchment**
11999
120100
Now that your environment should be set up to run lisflood, you may try with a prepared settings file for test catchment included into the tests/data folder:
121101
122102
```bash
123-
python src/lisf1.py tests/data/<TestCatchmentFolder>/settings/cold_day_base.xml
103+
python src/lisf1.py tests/data/<TestCatchmentFolder>/settings/cold.xml
124104
```
125105
4. **Run LISFLOOD unit tests**
126106

0 commit comments

Comments
 (0)