Skip to content

feat: support nwt to mf6 binary output file conversion#2746

Open
wpbonelli wants to merge 1 commit intomodflowpy:developfrom
wpbonelli:nwt-to-mf6
Open

feat: support nwt to mf6 binary output file conversion#2746
wpbonelli wants to merge 1 commit intomodflowpy:developfrom
wpbonelli:nwt-to-mf6

Conversation

@wpbonelli
Copy link
Copy Markdown
Member

Support converting MODFLOW-NWT binary outputs to MF6 binary output files, for compatibility with use cases requiring MF6 outputs (e.g. MF6 PRT). Introduce a class NwtToMf6Converter to handle the conversion.

Required a few utilities:

  • get_icelltype_from_laytyp(): convert NWT LAYTYP to MF6 ICELLTYPE
  • get_saturation(): calculate saturation from head, cell geometry, and cell type
  • get_structured_flowja(): inverse of get_structured_faceflows()
  • MfGrdFile.write_dis(): write grb file for structured grid

@wpbonelli wpbonelli added this to the 3.11 milestone Apr 14, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2026

Codecov Report

❌ Patch coverage is 79.75309% with 82 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.5%. Comparing base (556c088) to head (8c56314).
⚠️ Report is 151 commits behind head on develop.

Files with missing lines Patch % Lines
flopy/utils/nwt_to_mf6.py 77.7% 33 Missing ⚠️
flopy/mf6/utils/binarygrid_util.py 74.7% 27 Missing ⚠️
flopy/utils/postprocessing.py 80.9% 12 Missing ⚠️
flopy/mf6/utils/postprocessing.py 88.2% 10 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2746      +/-   ##
===========================================
+ Coverage     55.5%    72.5%   +16.9%     
===========================================
  Files          644      676      +32     
  Lines       124135   132800    +8665     
===========================================
+ Hits         68947    96299   +27352     
+ Misses       55188    36501   -18687     
Files with missing lines Coverage Δ
flopy/mf6/utils/__init__.py 100.0% <100.0%> (ø)
flopy/utils/__init__.py 100.0% <100.0%> (ø)
flopy/mf6/utils/postprocessing.py 92.1% <88.2%> (-4.7%) ⬇️
flopy/utils/postprocessing.py 80.2% <80.9%> (+2.6%) ⬆️
flopy/mf6/utils/binarygrid_util.py 86.5% <74.7%> (-4.3%) ⬇️
flopy/utils/nwt_to_mf6.py 77.7% <77.7%> (ø)

... and 571 files with indirect coverage changes

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

@wpbonelli wpbonelli requested a review from jdhughes-dev April 14, 2026 11:22
@wpbonelli wpbonelli marked this pull request as ready for review April 14, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant