Skip to content

Read Kerchunk datasets #936

@davidhassell

Description

@davidhassell

It would be very nice to be able to read Kerchunk datasets with cf.read.

The route to this is not to pass in a Kerchunk file name to cf.read:

>>> f = cf.read('kerchunk.json')

because there doesn't seem to be a nice one-size-fits-all way to open and parse them.

Rather, we should assume that the user has opened it into a virtual directory, and passes that to cf.read:

>>> import fsspec
>>> fs = fsspec.filesystem('reference', fo='kerchunk.json', <options>)
>>> kerchunk = fs.get_mapper()
>>> f = cf.read(kerchunk)

This is (in essence) how other libraries deal with Kerchunk (e.g. zarr and xarray).

This will be largely implemented via NCAS-CMS/cfdm#385

PR to follow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dataset readRelating to reading datasetsenhancementNew feature or requestkerchunkRelating to Kerchunk datasets

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions