Skip to content

keep cell edges when aligning or concatenating structured grid arrays - #486

Merged
wpbonelli merged 1 commit into
modflowpy:developfrom
wpbonelli:cellindex-align
Oct 17, 2026
Merged

wpbonelli merged 1 commit into
modflowpy:developfrom
wpbonelli:cellindex-align

Conversation

@wpbonelli

Copy link
Copy Markdown
Member

Follow-up to #485. CellIndex used PandasIndex's join and concat, which build a new index without the cell edges. So after a + b on overlapping grids, xr.align, or concat along row/col, sel(x=, y=) without a method needed exact centers again.

  • join and concat keep each cell's edges, in any order
  • aligning grids with a cell at the same centre but different edges raises ValueError
  • index_xy skips a scalar x or y (e.g. a single row) instead of failing

CellIndex.join and concat took PandasIndex's, which built a new index
without the edges, so after aligning grids or concatenating along
col/row, sel without a method needed exact centres. Aligning cells with
the same centre and different edges now raises. index_xy also skips a
scalar x or y, as on a single row, instead of failing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wpbonelli wpbonelli added this to the MVP milestone Oct 17, 2026
@wpbonelli wpbonelli added the bug Something isn't working label Oct 17, 2026
@wpbonelli
wpbonelli marked this pull request as ready for review October 17, 2026 15:44
@wpbonelli
wpbonelli merged commit 6f0517a into modflowpy:develop Oct 17, 2026
17 checks passed
@wpbonelli
wpbonelli deleted the cellindex-align branch October 17, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant