Skip to content

Fix structured from_xarray n_face mapping (#1410)#1569

Open
rajeeja wants to merge 2 commits into
mainfrom
rajeeja/fix_1410
Open

Fix structured from_xarray n_face mapping (#1410)#1569
rajeeja wants to merge 2 commits into
mainfrom
rajeeja/fix_1410

Conversation

@rajeeja

@rajeeja rajeeja commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #1410 and the three bugs behind it:

  1. from_structured(lon=, lat=) used lowercase "structured", so the structured-flatten branch never ran.
  2. It passed source_dims_dict=None, so (lon, lat) → n_face was never recorded.
  3. from_dataset hard-coded source_dims_dict = {}, dropping any passed mapping.

rajeeja added 2 commits July 13, 2026 15:50
Grid.from_structured(lon=, lat=) recorded no source-dim mapping and used a
lowercase "structured" spec, so UxDataset.from_xarray could not flatten
(lon, lat) data variables onto n_face, leaving them unmapped and breaking
subsetting. Capture the lon/lat dim names, use the canonical "Structured"
spec, and honor a passed source_dims_dict in from_dataset. Closes #1410.
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

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.

When generalizing a structured dataset with UxDataset.from_structured, return information about faces

1 participant