Water Resources Research · FlowNest
Figures and tables of the manuscript
FlowNest: A Unified Coding System for Position on Global River Networks, by Lulu Jiang, Huan Wu, Weitian Chen, Dai Yamazaki and Zhijun Huang, submitted to Water Resources Research.
These are the 16 figures and 6 tables of the manuscript with their captions. If anything here differs from the manuscript as submitted, the manuscript prevails. The code is the FlowNest Python package, github.com/hellolulujiang/flownest; the data are FullNest, doi:10.5281/zenodo.24393217 and doi:10.5281/zenodo.24393244.
Main text: figures












Main text: tables
Table 1. What river network datasets and methods number, how they store the tree, and whether their networks at different thresholds share identifiers.
| Dataset or method | Coverage; source data; channel threshold or basin levels | Numbered | Tree stored as | Thresholds linked | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Pixel | Reach | Unit catchment | Path | Basin | Adjacency list | Path enumeration | Nested set | |||
| National and regional datasets | ||||||||||
| NHDPlus V2 and HR (McKay et al., 2012; Moore et al., 2019) | United States; V2: mainly 30 m DEM and medium-resolution mapped streams; HR: 10 m DEM and high-resolution mapped streams | – | ✓ | ✓ | ✓ | ✓ | ✓ | (✓) | – | (✓) |
| WBD, Watershed Boundary Dataset (Jones et al., 2022) | United States; hydrologic units HU2–HU12 | – | – | – | – | (✓) | ✓ | ✓ | – | – |
| Geofabric V3 (Bureau of Meteorology, 2015) | Australia; 1″ DEM | – | ✓ | ✓ | – | (✓) | ✓ | – | – | (✓) |
| BHO 2017 (Agência Nacional de Águas, 2017) | Brazil; mapped hydrography; 5 km² in the 5k version | – | ✓ | ✓ | ✓ | (✓) | ✓ | ✓ | – | (✓) |
| REC2 v2.5, River Environment Classification (National Institute of Water and Atmospheric Research, 2019) | New Zealand; 30 m DEM | – | ✓ | ✓ | – | – | ✓ | – | – | – |
| Global datasets | ||||||||||
| HydroSHEDS v1: HydroRIVERS and HydroBASINS (Lehner & Grill, 2013) | Global; 15″; rivers ≥ 10 km² or ≥ 0.1 m³/s; basins at 12 levels | – | ✓ | – | – | ✓ | ✓ | ✓ | – | – |
| HydroSHEDS v2 (Lehner, 2026; Lehner et al., 2022) | North and South America; 1″; 1 km² | – | ✓ | ✓ | – | ✓ | ✓ | – | – | – |
| HDMA (Verdin, 2017) | Global; 3″ (7.5″ north of 60°N, 30″ in Greenland); 250 km² | – | ✓ | ✓ | – | (✓) | – | ✓ | – | – |
| MERIT-Basins (Lin et al., 2019) | Global; MERIT Hydro 3″; 25 km² | – | ✓ | ✓ | – | – | ✓ | (✓) | – | – |
| Hydrography90m (Amatulli et al., 2022) | Global; MERIT Hydro 3″; 0.05 km² | – | ✓ | ✓ | – | ✓ | ✓ | – | – | – |
| TDX-Hydro (National Geospatial-Intelligence Agency, 2023; Olsen et al., 2023) | Global; TanDEM-X 12 m; about 5 km² | – | ✓ | ✓ | – | – | ✓ | – | – | – |
| GRIT (Wortmann et al., 2025) | Global without Greenland and Antarctica; FABDEM 30 m and a river mask; 50 km² | – | ✓ | ✓ | – | (✓) | ✓ | – | – | – |
| NWEI, Nested Watershed dataset considering Endorheic basins and Islands (Liu et al., 2025) | Global; MERIT Hydro 3″; levels 1–12 | – | – | – | – | (✓) | ✓ | ✓ | – | – |
| RiverLakeBasins (Liu et al., 2026) | Global; NWEI and HydroLAKES; levels 1–12 | – | – | – | – | (✓) | ✓ | – | – | – |
| SWORD v17c, SWOT River Database (Altenau et al., 2021; Gearon et al., 2026) | Global; rivers ≥ 30 m wide; reaches about 10 km, nodes about 200 m | – | ✓ | – | ✓ | (✓) | ✓ | (✓) | – | – |
| Methods and tools | ||||||||||
| TauDEM StreamNet (Tarboton, 2026) | Any DEM; user threshold | – | ✓ | ✓ | – | – | ✓ | – | – | – |
| TOPAZ (Garbrecht & Martz, 1997; Martz & Garbrecht, 1992) | Any DEM; critical source area and minimum source channel length | – | ✓ | ✓ | – | – | ✓ | – | (✓) | – |
| Demir and Szczepanek (2017) | Iowa; 90 m DEM; 620,173 subwatersheds; three tree models compared | – | ✓ | ✓ | – | – | ✓ | ✓ | ✓ | – |
| Haag et al. (2018); Haag and Shokoufandeh (2019) | Delaware River basin; every pixel of a 30 m flow-direction grid (2018); NHDPlus V2 reaches (2019) | ✓ | ✓ | ✓ | – | – | ✓ | – | ✓ | – |
| This study and its predecessor | ||||||||||
| FullBasin (Jiang et al., 2026c) | Global; MERIT Hydro 3″; all land pixels | ✓ | – | – | – | ✓ | – | – | ✓ | – |
| FlowNest (this study) | Global; MERIT Hydro 3″; any threshold ≥ 1 km² | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | – | ✓ | ✓ |
Table_01: CSV
Table 2. The columns of the pixel table, the 1 km² reach table, and its location table. Every range of numbers is stored as its first number and a count; every window of the grid as its first row and column and one past its last.
| Column | Meaning | Range or window |
|---|---|---|
| (a) Pixel table (flownest_merit90m_pixel_1km2.parquet): one row per channel pixel, in the order of pixel_seq_id | ||
| Which pixel, and where | ||
| pixel_seq_id | the number of the channel pixel | |
| row | grid row, 0 at the northern edge, 85°N | |
| col | grid column, 0 at the western edge, 180°W | |
| What it belongs to | ||
| reach_seq_id | its reach at 1 km² | |
| path_seq_id | its path | |
| basin_id | its basin | |
| What lies upstream of it | ||
| upstream_area_km2 | its drainage area, from MERIT Hydro | |
| upstream_channel_pixel_count | how many channel pixels lie upstream of it, itself included | the channel pixels upstream: [pixel_seq_id, pixel_seq_id + upstream_channel_pixel_count) |
| (b) Reach table (flownest_merit90m_reach_1km2.parquet): one row per reach, in the order of reach_seq_id | ||
| Which reach, and where in the tree | ||
| reach_seq_id | the number of the reach | |
| upstream_reach_count | how many reaches lie upstream of it, itself included | the reaches upstream: [reach_seq_id, reach_seq_id + upstream_reach_count) |
| next_down_reach_seq_id | the reach it flows into; at a basin outlet, the reach itself | |
| path_seq_id | its path, which begins at a source and runs down to a channel with a larger drainage area or to the basin outlet | |
| path_level | 1 on the path that reaches the basin outlet; otherwise 1 plus the level of the path it flows into | |
| basin_id | its basin | |
| Its channel pixels | ||
| downstream_end_pixel_seq_id | its most downstream channel pixel; a coarser reach ends at the same pixel as the most downstream 1 km² reach in it | |
| channel_pixel_count | how many channel pixels it has | its channel pixels, from the most downstream to the most upstream: [downstream_end_pixel_seq_id, downstream_end_pixel_seq_id + channel_pixel_count) |
| upstream_channel_pixel_count | how many channel pixels lie upstream of its most downstream pixel, that pixel included | the channel pixels upstream: [downstream_end_pixel_seq_id, downstream_end_pixel_seq_id + upstream_channel_pixel_count) |
| Coarser thresholds | ||
| break_threshold_km2 | the largest threshold at which a reach still ends at its most downstream pixel: at a confluence, the smaller of its own drainage area and that of the largest other branch; at a basin outlet, its own drainage area | |
| Attributes | ||
| upstream_area_km2 | drainage area at its most downstream pixel | |
| unit_catchment_area_km2 | area of its unit catchment, its channel pixels included | |
| length_km | channel length between pixel centers, from its most upstream pixel to the pixel it flows into (the most upstream pixel of the next reach downstream); at a basin outlet, to its most downstream pixel | |
| distance_to_basin_outlet_km | channel distance to the basin outlet from the pixel it flows into, the sum of length_km over the reaches downstream; 0 for the reach at the basin outlet | |
| (c) Location table (flownest_merit90m_reach_location_1km2.parquet): one row per reach, in the row order of the reach table | ||
| reach_seq_id | the number of the reach | |
| downstream_end_lon, downstream_end_lat | center of its most downstream pixel (°) | |
| unit_catchment_row_min, unit_catchment_row_max, unit_catchment_col_min, unit_catchment_col_max | the smallest window of the grid that holds its unit catchment | rows [unit_catchment_row_min, unit_catchment_row_max) and columns [unit_catchment_col_min, unit_catchment_col_max) |
| upstream_catchment_row_min, upstream_catchment_row_max, upstream_catchment_col_min, upstream_catchment_col_max | the smallest window of the grid that holds its upstream catchment | rows [upstream_catchment_row_min, upstream_catchment_row_max) and columns [upstream_catchment_col_min, upstream_catchment_col_max) |
Table_02: CSV
Table 3. The files of the global FlowNest release on MERIT Hydro: what each file holds, its format, and its size. Figure 6 shows how they are used together.
| Object | Format | File | Columns or content | Rows or pixels | Size |
|---|---|---|---|---|---|
| Navigation: from a basin of 1 km² or more to its pixels and reaches | |||||
| Basin | Table | flownest_merit90m_basin.parquet | the FullBasin basin ID (basin_id); FullBasin Level-1 to Level-3 group codes (flowdivide_level1_id to flowdivide_level3_id); the range of its channel pixels (outlet_pixel_seq_id, channel_pixel_count) and of its 1 km² reaches (first_reach_seq_id_1km2, reach_count_1km2), each as start and count; drainage area, outlet coordinates, whether it drains to an inland sink, and its window of the grid | 340,991 | 13.9 MB |
| Basin | Vector, polygons | flownest_merit90m_basin.geo.parquet | basin_id; the basin as a polygon along the pixel edges, with its bounding box | 340,991 | 0.42 GB |
| Land pixel | Raster | flownest_merit90m_basin_id.tif | the FullBasin basin ID on every pixel of the basins of 1 km² or more | 174,000 × 432,000 | 0.34 GB |
| Pixel level: every channel pixel, used at every threshold | |||||
| Channel pixel | Table | flownest_merit90m_pixel_1km2.parquet | the 8 columns of Table 2a: number, grid row and column, reach, path, basin, drainage area, and the count of channel pixels upstream | 1,223,005,242 | 9.74 GB |
| Land pixel | Raster | flownest_merit90m_pixel_seq_id_1km2.tif | pixel_seq_id on a channel pixel; minus that number on the hillslope pixels that drain first to it | 174,000 × 432,000 | 18.06 GB |
| Reach level: the reaches at 1 km², from which the reaches at any coarser threshold are read (Table 4) | |||||
| Reach | Table | flownest_merit90m_reach_1km2.parquet | the 14 columns of Table 2b: number, tree, channel pixels, break threshold, and attributes | 70,883,935 (68,655,012 in the basins of 1 km² or more, 2,228,923 in the small basins) | 2.43 GB |
| Reach | Table, location | flownest_merit90m_reach_location_1km2.parquet | the 11 columns of Table 2c: coordinates of the downstream end; windows of the unit catchment and of the upstream catchment | 70,883,935 | 1.33 GB |
| Reach | Vector, lines | flownest_merit90m_reach_line_1km2.geo.parquet | reach_seq_id; the channel of the reach as a line through its pixel centers to the pixel it flows into, with its bounding box; empty for the 2,244,282 reaches that are only a basin outlet pixel | 70,883,935 | 3.89 GB |
| Unit catchment | Vector, polygons | flownest_merit90m_unit_catchment_1km2.geo.parquet | reach_seq_id; the unit catchment of the reach as a polygon along the pixel edges, with its bounding box | 70,883,935 | 17.51 GB |
| Land pixel | Raster | flownest_merit90m_reach_seq_id_1km2.tif | reach_seq_id on the channel pixels of a reach; minus that number on the hillslope pixels that drain first to them | 174,000 × 432,000 | 9.33 GB |
Table_03: CSV
Table 4. The number and size of the reaches and paths of the global network at five thresholds (MERIT Hydro), all read from the 1 km² reach and pixel tables.
| Threshold A (km²) | Reaches | Reach length (km) median (10th–90th) | Unit catchment area (km²) median (10th–90th) | Paths | Path length (km) median (10th–90th) | Deepest path level | Channel length (million km) | Rows of the 1 km² reach table kept |
|---|---|---|---|---|---|---|---|---|
| 1 | 68,655,012 | 1.25 (0.301–3.55) | 1.55 (0.308–3.92) | 34,708,374 | 1.41 (0.274–6.95) | 12 | 117.7 | 100% |
| 5 | 14,350,027 | 2.91 (0.662–8.35) | 7.51 (1.30–18.7) | 7,259,309 | 3.31 (0.622–16.2) | 11 | 56.8 | 48.0% |
| 25 | 2,944,884 | 6.81 (1.49–19.8) | 36.8 (5.68–90.7) | 1,502,329 | 7.87 (1.45–38.2) | 10 | 27.4 | 24.3% |
| 100 | 736,750 | 14.1 (2.92–41.9) | 146 (21.1–359) | 382,012 | 16.3 (2.89–80.7) | 9 | 14.3 | 13.2% |
| 1,000 | 70,170 | 47.2 (8.45–144) | 1,470 (200–3,560) | 38,581 | 55.2 (8.63–269) | 7 | 4.6 | 4.4% |
Table_04: CSV
Appendix A: figures




Appendices A and B: tables
Table A1. What FlowNest and 10 other river network datasets call the objects of Figures 1 and 3, and the fields that hold them.
| Dataset | Basin | Path | Reach | Next reach downstream | Unit catchment | Drainage area |
|---|---|---|---|---|---|---|
| FlowNest | basin_id | path_seq_id | reach_seq_id | next_down_reach_seq_id | polygon and raster by reach_seq_id; unit_catchment_area_km2 | upstream_area_km2 |
| NHDPlus V2 | TerminalPa | Level path (LevelPathI) | Flowline (COMID) | TOCOMID (in PlusFlow); DnHydroseq (a Hydroseq, not a COMID); FromNode and ToNode | Catchment (FEATUREID); AreaSqKM | TotDASqKM |
| Geofabric V3 | – (drainage divisions and river regions as reporting units) | – | Stream segment (HydroID) | NextDownID | Catchment (HydroID, joined to the stream by DrainID); AlbersArea | UpstrDArea |
| BHO 2017 | Otto-coded basin (the first digits of cobacia) | Watercourse (cocursodag) | Segment (cotrecho) | nutrjus | Contributing area of the segment (cobacia); nuareacont | nuareamont |
| REC2 v2.5 | – | – | Segment (nzsegment) | NextDownID; FROM_NODE and TO_NODE | Watershed (nzsegment); CATAREA | CUM_AREA |
| HydroSHEDS v1 | MAIN_RIV in HydroRIVERS; MAIN_BAS in HydroBASINS | – (river order, ORD_CLAS) | Reach (HYRIV_ID) | NEXT_DOWN | – (area only, CATCH_SKM; polygons by Level-12 sub-basin, HYBAS_L12) | UPLAND_SKM |
| HydroSHEDS v2 | MAIN_BAS | – | Stream (STRM_ID) | STRM_DN | Sub-basin polygon (HYBAS_ID, equal to STRM_ID where possible; beta version) | UPLAND_SKM |
| MERIT-Basins | – | – | Reach (COMID) | NextDownID | Unit catchment (COMID); unitarea | uparea |
| Hydrography90m | Drainage basin (ID on the basin raster and polygons) | – | Stream segment (ID on the segment raster and lines) | next_stream | Sub-catchment (the ID of its segment; raster and polygons) | Flow accumulation raster (km²) |
| TDX-Hydro | – (files by HydroBASINS Level-2 region) | – | Link (LINKNO) | DSLINKNO | Catchment (streamID) | DSContArea |
| SWORD v17c | Connected network (subnetwork_id) | Main path (main_path_id) | Reach (reach_id), about 10 km, with nodes about 200 m apart (node_id) | rch_id_dn_main | – | facc |
Table_A1: CSV
Table B1. The files that place the GRDC gauges and the SWORD v17c reaches and nodes on FlowNest (MERIT Hydro, 1 km² threshold), and the reach files at 5 and 25 km². GRDC, Global Runoff Data Centre; SWORD, SWOT River Database.
| Object | Format | File | Columns or content | Rows or pixels | Size |
|---|---|---|---|---|---|
| GRDC gauges (10,241; GRDC, 2022), placed on channel pixels | |||||
| GRDC gauge | Table | …grdc_burek2023.parquet | the gauge (station_seq_id, grdc_station_id) and its number within its basin (basin_station_seq_id); the gauges upstream and the next one downstream (upstream_station_count, next_down_station_seq_id); where it is on FlowNest (pixel_seq_id, reach_seq_id_1km2, path_seq_id_1km2, basin_id); its position in Burek and Smilovic (2023) and as placed; its drainage area on FlowNest and as reported | 10,241 | 0.7 MB |
| GRDC gauge | Table, location | …grdc_burek2023_location.parquet | station_seq_id; the center of its pixel; the windows of its unit catchment and of its upstream catchment | 10,241 | 0.4 MB |
| GRDC gauge | Vector, points | …grdc_burek2023_point.geo.parquet | station_seq_id; the gauge at the center of its pixel | 10,241 | 0.4 MB |
| Unit catchment of a gauge | Vector, polygons | …grdc_burek2023_unit_catchment.geo.parquet | station_seq_id; the land that drains to the gauge without passing another gauge | 10,241 | 148 MB |
| Land pixel | Raster | …grdc_burek2023_station_seq_id.tif | on every channel pixel, the station_seq_id of the first gauge at or downstream of it, 0 if there is none; minus that value on the hillslope pixels that drain first to it, as in Table 3 | 174,000 × 432,000 | 1.49 GB |
| GRDC gauge and SWORD node | Table | …grdc_burek2023_sword_v17c_node_pair.parquet | station_seq_id and its candidate SWORD node, the one of at most two whose drainage area is closer to that of the gauge as a ratio: which candidate it is (pair_side: down, up, or none if there is no candidate), whether it is on the gauge’s own pixel (pair_on_gauge_pixel), its pixel, node, and reach numbers, the ratio of the two drainage areas, and whether they agree within 10% (pair_within_10pct), which makes them a pair | 10,241 | 0.4 MB |
| SWORD v17c reaches, placed on FlowNest | |||||
| SWORD reach | Table | …sword_v17c_reach.parquet | the reach (sword_reach_id, sword_reach_seq_id); SWORD’s reach type and lake and side-channel flags (sword_type, sword_lakeflag, sword_main_side); the reaches upstream (upstream_sword_reach_count); where it is on FlowNest: its most downstream pixel (most_downstream_pixel_seq_id, the smallest pixel_seq_id of its placed nodes), its path or two paths (path_seq_id_1km2, path2_seq_id_1km2), and basin_id; how it was matched (matched_at_step) and the fraction of its length that follows its path or paths (cover; the fraction of its nodes for the 38 reaches matched through nodes continued from a neighbor, Appendix B); how far the match can be trusted and why (match_confidence, confidence_reason) | 248,673, all reaches | 12.4 MB |
| SWORD reach | Table, location | …sword_v17c_reach_location.parquet | sword_reach_seq_id; the center of its most downstream pixel; the windows of its unit catchment and of its upstream catchment | 240,111, placed | 6.5 MB |
| SWORD reach | Vector, lines | …sword_v17c_reach_line.geo.parquet | sword_reach_seq_id; the reach as a line through the pixels of its placed nodes | 240,111, placed | 51.7 MB |
| Unit catchment of a SWORD reach | Vector, polygons | …sword_v17c_reach_unit_catchment.geo.parquet | sword_reach_seq_id; the land that drains to the reach without passing another SWORD reach | 240,111, placed | 696 MB |
| Land pixel | Raster | …sword_v17c_reach_seq_id.tif | on every channel pixel, the sword_reach_seq_id of the first SWORD reach at or downstream of it, 0 if there is none; minus that value on the hillslope pixels that drain first to it, as in Table 3 | 174,000 × 432,000 | 2.17 GB |
| SWORD v17c nodes, placed on channel pixels | |||||
| SWORD node | Table | …sword_v17c_node.parquet | the node (sword_node_id, sword_node_seq_id) and its reach (sword_reach_id); SWORD’s lake and side-channel flags (sword_lakeflag, sword_main_side); the nodes upstream (upstream_sword_node_count); where it is on FlowNest (pixel_seq_id, reach_seq_id_1km2, path_seq_id_1km2); its position in SWORD and as placed; its drainage area on FlowNest; how far its placement can be trusted and why (match_confidence, confidence_reason) | 11,112,454, all nodes | 419 MB |
| SWORD node | Vector, points | …sword_v17c_node_point.geo.parquet | sword_node_seq_id; the node at the center of its pixel | 10,729,230, placed | 142 MB |
| Land pixel | Raster | …sword_v17c_node_seq_id.tif | on every channel pixel, the sword_node_seq_id of the first SWORD node at or downstream of it, 0 if there is none; minus that value on the hillslope pixels that drain first to it, as in Table 3 | 174,000 × 432,000 | 2.64 GB |
| SWORD v17c connected networks and the FlowNest basins that hold them | |||||
| SWORD connected network | Table | …sword_v17c_subnetwork.parquet | sword_subnetwork_id; the FlowNest basin or basins that hold it, 0 for the three that lie in the sea beyond the MERIT Hydro coastline (Appendix B) | 3,027 | 0.1 MB |
| Reaches at 5 and 25 km², read from the 1 km² reach table of Table 3 | |||||
| Reach | Table | …reach_5km2.parquet; …reach_25km2.parquet | the 14 columns of Table 2b except break_threshold_km2, at this threshold; the 1 km² reaches along its channel, as start and count (downstream_end_reach_seq_id_1km2, stem_reach_count_1km2) | 14,350,027; 2,944,884 | 495 MB; 106 MB |
| Reach | Table, location | …reach_location_5km2.parquet; …reach_location_25km2.parquet | the 11 columns of Table 2c | 14,350,027; 2,944,884 | 290 MB; 71.4 MB |
| Reach | Vector, lines | …reach_line_5km2.geo.parquet; …reach_line_25km2.geo.parquet | reach_seq_id; the channel of the reach as a line, as in Table 3; empty for the 8,252 and 5,371 reaches that are only a basin outlet pixel | 14,350,027; 2,944,884 | 1.68 GB; 0.79 GB |
| 1 km² reach | Table | …crosswalk_reach_1km2_to_coarser.parquet | reach_seq_id_1km2; the reaches at 5 and 25 km² whose unit catchments contain it (reach_seq_id_5km2, reach_seq_id_25km2), 0 where its basin has no network at that threshold | 70,883,935 | 188 MB |
Table_B1: CSV