Skip to content

Adds open_dataarray to BackendEntrypoint. - #11537

Open
dncnmcdougall wants to merge 4 commits into
pydata:mainfrom
dncnmcdougall:dataarray-backend
Open

Adds open_dataarray to BackendEntrypoint. #11537
dncnmcdougall wants to merge 4 commits into
pydata:mainfrom
dncnmcdougall:dataarray-backend

Conversation

@dncnmcdougall

@dncnmcdougall dncnmcdougall commented Aug 21, 2026

Copy link
Copy Markdown

Description

This adds the capacity to implement open_dataarray in BackendEntrypoint. This is done in a backwards compatible way: if it is not implemented open_dataset is used instead (which is the current behaviour.) The documentation on open_dataset has been updated. The how-to-add-new-backend.md has been updated.

Checklist

AI Disclosure

No AI was used in writing the code or documents in this pull request. AI may have been used for research.

This adds the capacity to implement open_dataarray in BackendEntrypoint.
This is done in a backwards compatable way: if it is not implemented
open_dataset is used instead (which is the current behaviour.)
The documentation on open_dataset has been updated. The
how-to-add-new-backend.md has been updated.
@welcome

welcome Bot commented Aug 21, 2026

Copy link
Copy Markdown

Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient.
If you have questions, some answers may be found in our contributing guidelines.

@dncnmcdougall dncnmcdougall changed the title Adds open_dataarray to BackendEntrypoint. #10562 Adds open_dataarray to BackendEntrypoint. Aug 21, 2026
@dncnmcdougall

dncnmcdougall commented Aug 21, 2026

Copy link
Copy Markdown
Author

I don't understand what is wrong with the document building.
There seems to be two errors

  1. in the docstring of xarray/core/accessor_str.py:xarray.core.accessor_str.StringAccessor, (unexpected indent) and
  2. an error in doc/user-guide/io.md. Maybe it is this:
 ------------------
ds = xr.tutorial.open_dataset("air_temperature_gradient")
cubes = ncdata.iris_xarray.cubes_from_xarray(ds)
print(cubes)
 ----- stderr -----
/home/docs/checkouts/readthedocs.org/user_builds/xray/checkouts/11537/.pixi/envs/doc/lib/python3.14/site-packages/ncdata/iris_xarray.py:53: SerializationWarning: saving variable Tair with floating point data as an integer dtype without any _FillValue to use for NaNs
ncdata = from_xarray(xrds, **xr_save_kwargs)
 ------------------

I do not know how to fix these:
For the first I did not touch that file, so cannot have altered it's docstring.
For the second all the other tests passed so I assume my change has not introduced this warning.

Are there other errors I missed? Is there something I can do to fix these, that is in scope for the changes for this PR?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add open_dataarray to BackendEntrypoint?

1 participant