feat: tolerate unknown options#2809
Open
wpbonelli wants to merge 4 commits into
Open
Conversation
mjreno
reviewed
May 26, 2026
| this%mf6_input%subcomponent_type, & | ||
| this%mf6_input%block_dfns(iblk)%blockname, & | ||
| tag, this%filename) | ||
| if (itolerate_unknown == 1) then |
Contributor
There was a problem hiding this comment.
This isn't specific to the OPTIONS block you would also need to check the block here.
Member
Author
There was a problem hiding this comment.
I'm not sure if this should apply only to options or to any variable. new options are added much more often than new data variables so would probably cover most cases, but seems more consistent to apply to all variables. any thoughts?
Member
Author
|
I'm undecided whether strict should be opt-in or on by default. Opt-in seems like nicer UX for anything driving multiple versions of MF6, like GUIs and flopy, with some added risk of not noticing if options go unused, because the simulation ran and the warning is buried/offscreen. |
34bbbd0 to
3b52000
Compare
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.
Add a keyword option
STRICTto the simulation, defaulting true for consistency with previous behavior. In strict mode, unrecognized variables will stop the simulation with an error, otherwise the simulation will continue with a warning.Alternative and/or complimentary solution to modflowpy/flopy#2712.
Checklist of items for pull request
ruffon new and modified python scripts in .doc, autotests, doc, distribution, pymake, and utils subdirectories.fprettify