Skip to content

feat(mfusg): add Transient IBOUND (TIB) package#2724

Open
reneangermeyer wants to merge 1 commit intomodflowpy:developfrom
reneangermeyer:feature/mfusg-tib-package
Open

feat(mfusg): add Transient IBOUND (TIB) package#2724
reneangermeyer wants to merge 1 commit intomodflowpy:developfrom
reneangermeyer:feature/mfusg-tib-package

Conversation

@reneangermeyer
Copy link
Contributor

The TIB package allows changing IBOUND and ICBUND values at any stress period in MODFLOW-USG. Use cases include excavation/reclamation, well drilling/plugging, and transient prescribed head/concentration cells. FloPy currently has no TIB support.

Supports six data categories per stress period: ib0, ib1, ibm1 (IBOUND) and icb0, icb1, icbm1 (ICBUND). Node arrays (ib0/icb0) use U2DINT format via Util2d, while list records (ib1/ibm1/icb1/icbm1) support HEAD/AVHEAD and CONC/AVCONC keywords. As required by the TIB specification, all node numbers are global — for structured grids, model.dis.get_node() can be used to convert (layer, row, col) tuples.

Changes:

  • flopy/mfusg/mfusgtib.py: new MfUsgTib(Package) class with write_file, load, and get_empty
  • flopy/mfusg/init.py: add import and all entry, remove pre-existing duplicate MfUsgGnc entry
  • flopy/mfusg/mfusg.py: register TIB in mfnam_packages
  • autotest/test_mfusg_tib.py: 10 tests covering round-trip, transport data, empty stress periods, input validation, and both DIS and DISU grids

Add MfUsgTib class for changing IBOUND and ICBUND values at any stress
period in MODFLOW-USG. Supports six data categories (ib0, ib1, ibm1,
icb0, icb1, icbm1) with U2DINT arrays and line-by-line records.

Also fix pre-existing duplicate MfUsgGnc entry in mfusg __all__.
@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 90.55556% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.4%. Comparing base (556c088) to head (1c57750).
⚠️ Report is 136 commits behind head on develop.

Files with missing lines Patch % Lines
flopy/mfusg/mfusgtib.py 90.5% 17 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2724      +/-   ##
===========================================
+ Coverage     55.5%    72.4%   +16.9%     
===========================================
  Files          644      676      +32     
  Lines       124135   130920    +6785     
===========================================
+ Hits         68947    94915   +25968     
+ Misses       55188    36005   -19183     
Files with missing lines Coverage Δ
flopy/mfusg/__init__.py 100.0% <100.0%> (ø)
flopy/mfusg/mfusg.py 78.3% <ø> (+0.8%) ⬆️
flopy/mfusg/mfusgtib.py 90.5% <90.5%> (ø)

... 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.

@reneangermeyer reneangermeyer marked this pull request as ready for review March 3, 2026 15:02
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