Skip to content

fix(model_splitter): fix spurious ssm creation#2716

Merged
wpbonelli merged 1 commit intomodflowpy:developfrom
wpbonelli:fix-2715
Feb 25, 2026
Merged

fix(model_splitter): fix spurious ssm creation#2716
wpbonelli merged 1 commit intomodflowpy:developfrom
wpbonelli:fix-2715

Conversation

@wpbonelli
Copy link
Member

@wpbonelli wpbonelli commented Feb 20, 2026

The model splitter generated empty SSM package files for partitions containing no boundary conditions, causing MODFLOW 6 to fail.

The _remap_ssm() method set a dict entry to None to indicate a partition had no boundary flows. Later the dict is checked in an if statement and considered "truthy" since it contains an entry whose value is None

Instead, indicate no boundary flows by not adding an entry to the dict. The conditional works, no SSM package is created, no file written, MF6 is happy.

Fix #2715

@wpbonelli wpbonelli marked this pull request as ready for review February 20, 2026 00:51
@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.4%. Comparing base (556c088) to head (41dc1c6).
⚠️ Report is 132 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2716      +/-   ##
===========================================
+ Coverage     55.5%    72.4%   +16.9%     
===========================================
  Files          644      674      +30     
  Lines       124135   130548    +6413     
===========================================
+ Hits         68947    94595   +25648     
+ Misses       55188    35953   -19235     
Files with missing lines Coverage Δ
flopy/mf6/utils/model_splitter.py 65.5% <ø> (-9.4%) ⬇️

... and 569 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@jlarsen-usgs jlarsen-usgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wpbonelli, this looks good!

@wpbonelli wpbonelli merged commit 7746e09 into modflowpy:develop Feb 25, 2026
20 checks passed
@wpbonelli wpbonelli deleted the fix-2715 branch February 25, 2026 16:53
@wpbonelli wpbonelli modified the milestone: 3.10.1 Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Mf6Splitter creates invalid empty SSM packages for GWT partitions without boundary flows

2 participants