From f6f72bc7a156b67fe88e4a8fe11127e351670513 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Mar 2026 14:17:48 +0000 Subject: [PATCH 1/2] Initial plan From 8361fd837162ad95da7c5d27971530190ca56311 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Mar 2026 14:20:18 +0000 Subject: [PATCH 2/2] Fix misleading comment about water_cells usage in dig_rivers.py Co-authored-by: spiani <8956990+spiani@users.noreply.github.com> --- src/bathytools/actions/dig_rivers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bathytools/actions/dig_rivers.py b/src/bathytools/actions/dig_rivers.py index 6c4b829..8c76b21 100644 --- a/src/bathytools/actions/dig_rivers.py +++ b/src/bathytools/actions/dig_rivers.py @@ -686,7 +686,9 @@ def __call__(self, bathymetry: xr.DataArray) -> xr.DataArray: allow_broadcast=True, ) - # Check if a side is "open", i.e., if it has at least one water cell + # Precompute a boolean array of cells that are already underwater + # (negative bathymetry). Used later to skip water cells when tracking + # river dig cells for intersection detection. b_array = bathymetry.elevation.transpose( "latitude", "longitude" ).values