feat(dfns): standardize cell id representation - #373
Merged
Merged
Conversation
Every cellid column is now Array(dtype="integer", shape=["ncelldim", ...], index=True, node=True): the first (fastest-varying) axis is one cellid's components, any further axes count cellids. This replaces the two prior encodings (bare ncelldim-shaped arrays, and Integer(node=True), whose type misstated its width) with one, and fixes GNC's cellidsj, which was read as plain integers on DIS/DISV grids. - schema: remove Integer.node; add Array.node, requiring integer dtype, index, a leading ncelldim, and a list item context. A node array's ncelldim isn't resolved in the component's scope, since it depends on the referenced grid (exchanges see neither model's dims). - migration: rewrite allowlisted integer cellid columns (exchange cellidm1/2, GNC cellidn/cellidm) as ncelldim arrays, prefix GNC cellidsj with ncelldim, and mark every ncelldim-led integer array in a list item. - docs: Array node section, shape axis order, multi-dim inline arrays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The attribute marks an ncelldim-wide cellid (layer/row/column, etc.), which is what MF6 calls a cellid; "node" in MF6 means a single node number. The new name matches MF6's docs, the DFN column names, and flopy4's usage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Cell IDS had 2 encodings, an array of shape
ncelldim(stress packages, HFB) or just an integer (exchanges, GNC). Standardize on the array encoding for all cell ID fieldsncelldimmust be the first axiscellidsjis["ncelldim", "numalphaj"]Array.cellidrequires integer dtype,index, a leadingncelldim, and to be in a list