Skip to content

Increment 39: every SVAR sub-catchment of four Swedish SE2 river systems meshed, runner and record - #240

Merged
skavhaug merged 5 commits into
masterfrom
worktree-se2-catchments
Oct 12, 2026
Merged

skavhaug merged 5 commits into
masterfrom
worktree-se2-catchments

Conversation

@skavhaug

Copy link
Copy Markdown
Member

Increment 39, docs/increments/39-se2-catchments.md. No production code (count_loc.py: 0); a batch run of the existing rasputin mesh on SMHI SVAR 2022 polygons, with its runner and record under docs/benchmarks/2026-10-13/se2-catchments/.

  • Ljungan, Indalsälven, Ångermanälven (Faxälven, Fjällsjöälven, Åseleälven) and Umeälven: every SVAR 2022 sub-catchment used as an outline and meshed on GLO-30 with CORINE 2018 land cover at a 10 m vertical tolerance, the arguments of the Lagan quick-check case.
  • Results, finished 2026-10-12 18:05 UTC: 5,338 finest units, 17,889,867 triangles, 4,865 s wall with three at once; 31 main areas (SVAR's BARO level), 6,149,260 triangles; 4 whole systems, 4,914,027 triangles. No refusals; every max error under 10 m.
  • fetch_svar.py (the SMHI WFS download), se2_batch.py (prepare, run per level with a resumable ledger, report), README.md, report.md, three summary CSVs and twelve overview maps. The meshes themselves (about 5 GB of GeoPackages) stay outside git.

Source credit: SMHI, SVAR 2022, under the terms the README quotes. Review rounds 1 and 2 recorded in the increment file.

🤖 Generated with Claude Code

skavhaug and others added 5 commits October 12, 2026 18:13
…hment in one night (@architect)

Increment 39, re-scoped on Ola's words of 2026-10-12 (no forecast-point
list; "each (sub)catchment TINed by tomorrow morning"): every SMHI SVAR 2022
sub-catchment polygon of the Ljungan, Indalsälven, Ångermanälven (which
holds Faxälven, Fjällsjöälven and Åseleälven) and Umeälven is meshed by
`rasputin mesh` from the polygon as the outline, on GLO-30 with CORINE at
10 m, exactly as the Lagan quick-check case does. No delineation, so the
geographic-DEM catchment question does not arise. No production code: a
runner script, the fetch script and a README under docs/benchmarks/.

Measured today (M1 Max, AC): 5,338 sub-catchments over 98,095 km², median
12.6 km²; 31 coarser BARO areas (1,413 to 4,315 km²); the water-body level
is nearly the finest (5,179) and is not a coarser option. One unit at the
Lagan settings: 2.35 s for the smallest (0.004 km², 15 triangles), 3.08 s
for the median (12 km², 3,247 triangles, .gpkg), 4.22 s for the largest
(250 km²), 7.42 s for a 1,413 km² BARO area (119,987 triangles); 2.1 to
2.6 GB peak, fixed. Projection: about 4.6 h serial for the finest level,
under 20 min for BARO; the night runs BARO first, then the finest level
with a pool of three, resumable, largest first.

Data fetched into $RASPUTIN_DATA (not committed): the four systems' SVAR
units, 169 MB in 243 s over 54 paged WFS requests with a generic
User-Agent (the service breaks chunked responses above about 5 MB, so 100
units a page); the GLO-30 blocks for all four systems, 505 MB in 64 s
(cache now 642 MB, 36 tiles needed, 4 were cached). Licence: CC BY 4.0 SE,
"Källa: SMHI", checked on SMHI's terms page today.

Prior art: SVAR 2022:1.2's delivery description (10 m mean grid from the
1 m national model, snapped to the land-cover grid; MAINDOWN links); the
legacy tag has nothing on Sweden or SMHI (grep pasted). ROADMAP row 39
added. Five questions for Ola with defaults (tolerance 10 m, CORINE on,
.gpkg only per unit, both levels, GeoPackages stay in scratch).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…, the 5,338 units launched (@Perf)

docs/benchmarks/2026-10-13/se2-catchments/se2_batch.py is the runner the
design describes (prepare, run --level baro|fine|huvud, report): one GeoJSON
per polygon, BARO areas dissolved by BARONR (all 31 are one Polygon), a
ledger row appended per finished subprocess, resumable by the ledger,
--retry for refused/error rows, a per-run watchdog (--timeout, default
3600 s), peak memory per child from wait4, refusals in mesh's own words
with the Rich box stripped, SVG maps from shapely's svg() (no matplotlib in
the venv, as the design states) and a per-system GeoJSON for QGIS. Tested
on a scratch root: ok rows, a refused row, resume, retry, the watchdog kill
and report.

Written by @Perf, not @developer as the design names: the harness gives
docs/benchmarks/ to @Perf and keeps @developer out of docs/.

The venv is this worktree's, built by tools/new_worktree.py --existing
(master's C++; src_python, bindings, include unchanged from master).

BARO level, one process at a time, AC power, 2026-10-12 16:24:55 to
16:36:30 UTC: 31 of 31 ok, 98,095 km2, 6,149,260 triangles, 366.4 s gpkg
+ 327.9 s vtk, no refusal, largest max_error_m 9.999995, peak 3.26 GB.
Three outputs opened (sqlite3 triangle counts and run layer, vtk headers).

Finest level launched detached at 16:37:16 UTC (pid 79982, nohup,
launch_fine.sh, fine.log under ../rasputin_scratch/sweden/se2/), three at
once, the four whole systems chained after it; 25 units ok in the first
41 s. README has the method, the versions, the BARO table, the launch
record and the morning's report command.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… recorded as Ola's rulings, Status and ROADMAP row to built and running, by the main session

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ies and overview maps copied into the record, by the main session

The detached batch finished 2026-10-12T18:05:23Z: 31 BARO areas, 5,342 fine
units and 4 whole systems, 0 refusals. The report step
(se2_batch.py report --copy-to) wrote report.md, summary_fine.csv,
summary_huvud.csv and twelve overview SVGs (fine, BARO, whole system per
river system) beside the README.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…imate reconciled, Status and ROADMAP row to the batch done, by the main session

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@skavhaug
skavhaug enabled auto-merge October 12, 2026 20:46
@skavhaug
skavhaug added this pull request to the merge queue Oct 12, 2026
Merged via the queue into master with commit dd33a9c Oct 12, 2026
15 checks passed
skavhaug added a commit that referenced this pull request Oct 13, 2026
…P rows 38 and 39 both kept, by the main session

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant