Skip to content

Convert from/to xarray #978

Open

Description

@davidhassell

It would be nice to be able to convert from xarray datasets to cf.Field and cf.Domain constructs in memory.

See #935 (convert to xarray)

It would make sense to have a unified package-level API for this:

cf.from_xarray
cf.to_xarray

as opposed to to_xarray being a method on various classes. This new approach would also make it really easy to convert lists of fields/domains to xarray.

Activity

  1. added this to the NEXTVERSION milestone on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestxarrayRelated to xarray datasets

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions