Skip to content

Expose a public interface for CF encoding/decoding functions #155

Open

Description

@shoyer

Relevant discussion: #153

Activity

  1. stale commented on Feb 3, 2019

    @stale

    In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity

    If this issue remains relevant, please comment here or remove the stale label; otherwise it will be marked as closed automatically

  2. jhamman commented on Feb 4, 2019

    @jhamman
    Member

    @shoyer - I know we've made some steps towards addressing some of this issue (e.g. #1752, #1803). What do you think it would take to make that the coding module public API?

  3. shoyer commented on Feb 4, 2019

    @shoyer
    MemberAuthor

    I think the eventual interface we want is something like this:

    • CF decoding in open_dataset is controlled by a coders argument, which takes a list of coders to apply in order.
    • CF encoding in to_netcdf is also controlled by a coders argument, which takes a list of coders to apply in reversed order.
    • Helper functions (get_coders()?) make it easy to construct the default coders, e.g., with boolean options for disabling particular coders.

    To complete this, we'll need to get all CF encoding/decoding happening in Coder classes. VariableCoder might not suffice -- we also need a way to indicate transformations of a full dataset (e.g., for coding/decoding coordinates).

    Eventually, it should be possible to read a dataset without any CF decoding (e.g., by setting coders=[]).

  4. TomNicholas commented on Jul 26, 2024

    @TomNicholas
    Member

    Can these coders just be new zarr codecs? Exposing xarray's decoding logic in a way that follows that interface would allow for zarr to become a "universal reader" - see zarr-developers/zarr-specs#303.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions