Skip to content

Conversation

@reneangermeyer
Copy link
Contributor

Add support for reading and writing well names (boundnames) in the MODFLOW-USG WEL package. Since MODFLOW-USG doesn't natively support the BOUNDNAMES keyword, boundnames are implemented as auxiliary variables.

Changes:

  • Add boundnames parameter to MfUsgWel.init for creating wells with boundnames
  • Add string_aux_names parameter to MfUsgWel.get_empty() for loading files with string-type auxiliary variables
  • Auto-detect extra columns (including boundnames) when loading WEL files that don't declare them in the header (common with Groundwater Vistas exports)
  • Infer dtype from loaded data to handle auto-detected columns
  • Update ulstrd() to handle object-type columns and expand dtype when extra columns are detected

The implementation supports:

  • Creating new wells with boundnames using boundnames=True
  • Custom dtype with boundname field for both GWF and CLN wells
  • Loading existing files with boundnames (auto-detected)
  • Writing files with proper aux boundname declarations

@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

❌ Patch coverage is 59.52381% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.3%. Comparing base (556c088) to head (1d15b33).
⚠️ Report is 115 commits behind head on develop.

Files with missing lines Patch % Lines
flopy/pakbase.py 56.5% 30 Missing ⚠️
flopy/mfusg/mfusgwel.py 57.1% 3 Missing ⚠️
flopy/modflow/mfwel.py 50.0% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2693      +/-   ##
===========================================
+ Coverage     55.5%    72.3%   +16.8%     
===========================================
  Files          644      667      +23     
  Lines       124135   130546    +6411     
===========================================
+ Hits         68947    94464   +25517     
+ Misses       55188    36082   -19106     
Files with missing lines Coverage Δ
flopy/utils/flopy_io.py 72.3% <100.0%> (-3.1%) ⬇️
flopy/modflow/mfwel.py 86.8% <50.0%> (-3.2%) ⬇️
flopy/mfusg/mfusgwel.py 90.1% <57.1%> (-1.8%) ⬇️
flopy/pakbase.py 80.0% <56.5%> (-4.4%) ⬇️

... and 559 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 force-pushed the feature/mfusgwel-boundnames branch from ee0b2a0 to a5290e5 Compare January 29, 2026 01:13
Captures undeclared trailing text in MODFLOW-USG WEL files (common in
Groundwater Vistas exports) as comment columns with object dtype. Comments
are preserved on read/write roundtrip without being declared as AUX in the
header.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@reneangermeyer reneangermeyer force-pushed the feature/mfusgwel-boundnames branch from a5290e5 to 1d15b33 Compare January 29, 2026 01:14
@reneangermeyer reneangermeyer deleted the feature/mfusgwel-boundnames branch January 29, 2026 01:17
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