Generate Synthetic Riverbed Topography for Meandering Rivers
Meandering rivers erode their outer banks and deposit sediments on their inner banks. This process makes point bars, which are always exposed when water level is relatively low and thus visible in satellite/aerial imageries. It is interesting and educational to apply this tool to manufacture your own meandering river at any scales, or to investigate meandering rivers near you.
This tool could:
-
help people working on hydrodynamic and morphodynamic modeling of fluvial processes with preparing their FEM triangle meshes and boundary condition files
-
help people working on field surveying with interpolating bathymetry data in unexplored zones during their campaigns
-
help people working on laboratory experiments with designing their flumes
-
Provides two modes:
- Making synthetic meandering rivers via the built-in Kinoshita Curve calculator
- Reading users' own real river centerlines
-
Expands 1D centerline to 2D river channel by polyline offsetting
-
Calculates riverbed topography through an analytical method
-
Simulates meander channel migration using linear channel migration model
-
Makes FEM mesh files and boundary condition files for TELEMAC numerical modeling usage
-
Cross-platform, runs on macOS, Linux, Windows machines
-
Uses a tkinter-based graphical user interface (GUI) as front end
- Python >= 3.5
- tkinter (usually comes with Python installation)
- Numpy
- Scipy
- Matplotlib
- Numba
- tabulate
- imageio (only needed if simulating meander channel migration)
Using Anaconda is recommended. Or install Numpy, Scipy, Matplotlib, Numba, tabulate and imageio by pip install <something>
. Their versions must adapt Python >= 3.5.
In some rare cases, such as in some versions of Ubuntu in Windows Subsystem for Linux, tkinter may not be installed even though Python 3 is installed with the system, then installation of tkinter by sudo apt install python3-tk
or similar command is required.
The following two are recommended but not required at all:
- PyInstaller (to freeze python codes and dependencies into a single package, i.e. making executables)
- Gifsicle (a command-line tool to optimize GIFs) and its Python wrapper pygifsicle
git clone https://github.com/ZhiLiHydro/pyRiverBed.git
python gui4pyriverbed.py
first, then enter model parameters, and click Generate steering file
button to prepare the steering file stee
80DF
ring.txt
GUI method: click Run pyRiverBed
button in GUI to run pyRiverBed
CLI method: quit the GUI and then type python pyriverbed.py
in command line to run pyRiverBed
Both methods to run pyRiverBed work with zero difference
Task: Reproduce the flume studied in this paper.
The default parameters in GUI are pre-typed for this case, so nothing needs to be changed. Click Generate steering file
button, then click Run pyRiverBed
button to run and check the results.
Synthetic riverbed | River centerline |
---|---|
Task: Read centerline coordinates from file.
The river centerline of a randomly picked reach (at 7°32'09.9"S 72°31'16.0"W) of a randomly picked river (it's Juruá River in Brazil) is discretized manually (well, a fancy centerline extraction tool is recommended here for real cases) on a georeferenced TIFF map. The river centerline coordinates is saved to jurua.txt
. Open the GUI to type in the followings: mode = 2, file name = 'jurua.txt', width = 160 m (estimated), depth = 8 m (arbitrary), slope = 0 (arbitrary), lag strength = 6 (estimated), flip in transverse direction = no. Keep the defaults for other parameters. Click Generate steering file
button, then click Run pyRiverBed
button in GUI to run and see the results.
Synthetic riverbed | River centerline |
---|---|
- Performance improvements and code optimizations
Li, Z. and Garcia, M. H. (2020). pyRiverBed: A Python framework to generate synthetic riverbed topography for constant-width meandering rivers. (Manuscript submitted for publication).