Skip to content

Feature/performance - #234

Merged
doc78 merged 21 commits into
developmentfrom
feature/performance
Oct 9, 2026
Merged

doc78 merged 21 commits into
developmentfrom
feature/performance

Conversation

@doc78

@doc78 doc78 commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Performance optimizations:

  • Improved soil initialization: now scales with number of cores, reducing global run ColdStart soil initialization from hours to minutes
  • First step initialization: improved speed on lakes and reservoir initialization, that were the major cause of slow first step run
  • Improved speed of soil dynamic_canopy function, now written in numba
  • Improved speed of water abstraction (numba)
  • further improvement in routing module
  • Unit tests now run in parallel, reducing total time from 2h to 40 minutes
  • Added full coverage of unit test
  • Automatic selection of best number of cores settings based on catchment size, to avoid threads oversubscription

…on catchment size. Added unit test for full code coverage
Replace the per-vegetation numpy chain (soil water stress, actual
transpiration and layer-wise abstraction) with a fused
@njit(parallel=True) kernel over pixels. swdf is precomputed in numpy to
preserve the original float32 ETRef precision; moisture state (W1/W1a/W1b/
Ta/RWS) is indexed by vegetation, soil properties by land-use class.

Results are bit-identical on the ETRS89 and Congo benchmarks and the slow
MCT/split/kinematic reference suite. dynamic_canopy drops from ~17s to ~4s
on the 100k-pixel Congo benchmark.
After centralizing thread control, configure_parallelism applies the numba
thread count itself; Lisflood_initial just calls it once at startup. Correct
the module docstring which still described numba as configured separately.
…rance for FlowMomentum results test, as values are big
@doc78
doc78 requested a review from fuchsiger October 9, 2026 08:19
@doc78
doc78 merged commit 281d31d into development Oct 9, 2026
3 checks passed
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