Skip to content

About

Cuts a D8 flow-direction grid along its rivers into regions that fit a memory capacity, and computes hydrographic attributes region by region, the same pixel for pixel as a whole-grid run.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlowDivide

FlowDivide computes hydrographic attributes on D8 grids larger than memory by cutting them into connected regions.

FlowDivide workflow

FD1 partitions the grid; FD2 makes views; FD3 computes attributes region by region.

Amazon partition

The Amazon is cut and merged into 11 regions, numbered so every flow goes to a larger number.

Install

git clone https://github.com/hellolulujiang/flowdivide.git
cd flowdivide
conda create -n flowdivide -c conda-forge python=3.11 numpy numba rasterio gdal pandas geopandas pyogrio pyarrow shapely scipy matplotlib
conda activate flowdivide

Run

Set the input paths as described in Running, then:

python flowdivide.py run south-america --out-root out
python flowdivide.py run south-america --out-root out --steps fd3 --capacity 2^31

Each region fits the chosen capacity. One value crosses each cut; results match a whole-grid run pixel for pixel.

Documentation

User guide: inputs, options, outputs, memory, checks and custom attributes.

Data products

FullDivide partitions: HydroSHEDS v2.0, 30 m over North and South America; MERIT Hydro, 90 m globally.

Paper data · FullHydro tools

Citing

Jiang, L., Chen, W. FlowDivide: a standard workflow for hydrographic attributes from flow-direction grids that outgrow a computer's memory. Submitted to Environmental Modelling & Software.

Cite this repository with the release used. Paper figures and archive.

Licence

MIT; see LICENSE. Input data retain their producers' terms; see DATA_NOTICE.md.

About

Cuts a D8 flow-direction grid along its rivers into regions that fit a memory capacity, and computes hydrographic attributes region by region, the same pixel for pixel as a whole-grid run.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages