fix(evt): fix optional field handling at write time#2684
Merged
wpbonelli merged 2 commits intomodflowpy:developfrom Jan 24, 2026
Merged
fix(evt): fix optional field handling at write time#2684wpbonelli merged 2 commits intomodflowpy:developfrom
wpbonelli merged 2 commits intomodflowpy:developfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2684 +/- ##
===========================================
+ Coverage 55.5% 72.3% +16.7%
===========================================
Files 644 667 +23
Lines 124135 130124 +5989
===========================================
+ Hits 68947 94134 +25187
+ Misses 55188 35990 -19198
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
EVT packages with
nseg > 1, and auxiliary variables, failed on file write with:When
nseg > 1, the EVT package has optional fieldspxdp,petm,petm0that may or may not be present in the structured array depending onnsegandsurf_rate_specifiedvalues. #2496 added_dependent_opt()and_optional_nval()methods to handle these fields when reading, but_get_file_entry_record()inmfdatalist.pystill iterated through all DFN-defined fields when writing. The index then advanced past the array bounds before reaching auxiliary variables.At write time, skip EVT-specific optional fields that aren't present in the structured array, using the same methods #2496 added for reading.
Close #2683