Skip to content

cf.from_xarray and cf.to_xarray - #980

Merged
davidhassell merged 4 commits into
NCAS-CMS:mainfrom
davidhassell:xarray-from-to
Nov 24, 2026
Merged

davidhassell merged 4 commits into
NCAS-CMS:mainfrom
davidhassell:xarray-from-to

Conversation

@davidhassell

Copy link
Copy Markdown
Collaborator

Fixes #978

@davidhassell davidhassell added this to the NEXTVERSION milestone Nov 20, 2026
@davidhassell davidhassell added enhancement New feature or request xarray Related to xarray datasets labels Nov 20, 2026

@sadielbartholomew sadielbartholomew left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brill. Only comment is that there are some test methods and their docstrings in test_xarray that could do with updating to reflect these new function-level not method-level xarray to/from utilities:

$ pwd
/home/slb93/git-repos/cf-python/cf
$ git grep "Field.to_xarray" | cat                                                       ─╯
test/test_xarray.py:    def test_Field_to_xarray(self):
test/test_xarray.py:        """Test Field.to_xarray."""
test/test_xarray.py:    def test_Field_to_xarray_from_disk(self):
test/test_xarray.py:        """Test Field.to_xarray on datasets read from disk."""
test/test_xarray.py:    def test_Field_to_xarray_groups(self):
test/test_xarray.py:        """Test Field.to_xarray with groups."""

Perfect other than that so please merge when ready!

@davidhassell

Copy link
Copy Markdown
Collaborator Author

doc strings done: a7d7acf

@davidhassell
davidhassell merged commit ec14876 into NCAS-CMS:main Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request xarray Related to xarray datasets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Convert from/to xarray

2 participants