Skip to content

Releases: hellolulujiang/flowtopo

FlowTopo 1.1.3

Choose a tag to compare

@hellolulujiang hellolulujiang released this 01 Nov 00:07
  • dfs_in is numbered within each basin: dfs_in = a + b - seq_dfs, where b is seq_dfs at the basin's outlet and a = b - upg + 1 with upg at the outlet, so a basin keeps the block of numbers it has in seq_dfs, its outlet at a. 1.1.2 read the whole region backward, dfs_in = n - 1 - seq_dfs; the two differ by a constant within each basin and give the same upstream cells, but the numbers differ, and those of 1.1.3 are the ones FullBasin v1.1 documents. dfs_out = dfs_in + upg - 1 and the test dfs_in[p] <= dfs_in[q] <= dfs_out[p] are unchanged.
  • dfs_interval(seq_dfs, upg, outlets) and dfs_interval_geotiff(..., outlets, rows=512) take the outlets of the region's basins: index arrays on the array form, and on the GeoTIFF form the path of the region's basin table of FullBasin v1.1 (local_outlet_row, local_outlet_col, basin_cell_count) or (rows, cols). The basins must take positions 0 to n - 1 one after another, no position may be held by two cells, and basin_cell_count must equal upg at each outlet; otherwise the inputs are refused. These checks cannot prove that seq_dfs is a depth-first order of the flow network: seq_dfs and upg must come from the same flow network. The table is read as FullBasin writes it, fields split at every comma and each a plain integer; the line of a field that is missing or not an integer is named. On the GeoTIFF form seq_dfs must hold signed integers and upg integers, and one bit is kept for each cell of the sequence. The n argument of 1.1.2 is gone: the array form reads a whole region.
  • tests/test_dfs_interval.py checks, on grids of several basins, that each basin's dfs_in is its block of seq_dfs read backward, that it differs from n - 1 - seq_dfs by a constant within the basin, and that missing, extra and repeated outlets, a table that disagrees with upg, a table with a field that is not a plain integer, a position held by two cells and rasters that are not integers are refused; a table with CRLF line ends gives the same files.
  • The C tool dfs_interval/ (MERIT-FlowTopo code 1.1.1) takes the basin table and gives the same files.
  • Other results are unchanged.

FlowTopo 1.1.2

Choose a tag to compare

@hellolulujiang hellolulujiang released this 28 Oct 14:45
  • dfs_interval(seq_dfs, upg) and dfs_interval_geotiff(...) give dfs_in and dfs_out, the depth-first interval of every cell, from a seq_dfs layer of FullTopo v1.1 and MERIT Hydro's upg: dfs_in = n - 1 - seq_dfs, dfs_out = dfs_in + upg - 1, and cell q drains through cell p exactly when dfs_in[p] <= dfs_in[q] <= dfs_out[p].
  • The GeoTIFF form reads and writes one region, from the region's seq_dfs and upg, a strip of rows at a time.
  • Other results are unchanged.

All changes: CHANGELOG.md at v1.1.2.

FlowTopo 1.1.1

Choose a tag to compare

@hellolulujiang hellolulujiang released this 28 Oct 10:52
  • The bundled MERIT Hydro v1.0.1 excerpt, in data/ and in tests/reference/expected.npz, is distributed under CC BY-NC 4.0 or ODbL 1.0, at the user's choice, as stated in DATA_NOTICE.md and the README.
  • Documentation and comments describe the methods themselves.
  • The README and guide describe the 1.1 products only; the 1.0 records are cited from the paper.
  • The FullTopo and region-map links are fixed.
  • Six tests are renamed for the reference values they compare with.
  • Results are unchanged.

All changes: CHANGELOG.md at v1.1.1.

FlowTopo 0.1.0

Choose a tag to compare

@hellolulujiang hellolulujiang released this 08 Sep 03:36

The version archived on Zenodo with the companion paper
(MERIT-FlowTopo code, https://doi.org/10.5281/zenodo.22227621).

Three serial orderings, three parallel layerings, two spatial partitions
and three propagation manners for D8 flow networks, with four kernels
(upstream drainage area, flow length downstream, flow length upstream,
Strahler stream order) cross-checked on the bundled 731 km² example basin
cut from MERIT Hydro. Python 3.10 to 3.12; numba optional, for the threaded
kernels.

The README on main has since been rewritten; the code is unchanged.