{"id":22083382,"url":"https://github.com/cubed-dev/cubed-xarray","last_synced_at":"2025-07-24T16:31:05.187Z","repository":{"id":153619188,"uuid":"618495968","full_name":"cubed-dev/cubed-xarray","owner":"cubed-dev","description":"Interface for using cubed with xarray","archived":false,"fork":false,"pushed_at":"2024-04-30T08:25:23.000Z","size":33,"stargazers_count":18,"open_issues_count":3,"forks_count":1,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-06-11T16:54:04.215Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cubed-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-24T15:38:04.000Z","updated_at":"2024-08-06T16:56:54.937Z","dependencies_parsed_at":"2024-04-30T09:44:16.614Z","dependency_job_id":null,"html_url":"https://github.com/cubed-dev/cubed-xarray","commit_stats":{"total_commits":25,"total_committers":2,"mean_commits":12.5,"dds":"0.040000000000000036","last_synced_commit":"6ebfbe68a9909efdd79f33bd6c6d61aef8d8eb01"},"previous_names":["xarray-contrib/cubed-xarray"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cubed-dev%2Fcubed-xarray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cubed-dev%2Fcubed-xarray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cubed-dev%2Fcubed-xarray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cubed-dev%2Fcubed-xarray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cubed-dev","download_url":"https://codeload.github.com/cubed-dev/cubed-xarray/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227456925,"owners_count":17777943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-01T00:13:13.192Z","updated_at":"2024-12-01T00:13:13.681Z","avatar_url":"https://github.com/cubed-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Note: this is a proof-of-concept, and many things are incomplete, untested, or don't work.\n\n# cubed-xarray\n\nInterface for using [cubed](https://github.com/cubed-dev/cubed) with [xarray](https://github.com/pydata/xarray).\n\n## Requirements\n\n- Cubed version \u003e=0.17.0\n- Xarray version \u003e=2024.09.0\n\n## Installation\n\nInstall via pip\n\n`pip install cubed-xarray`\n\nor conda\n\n`conda install -c conda-forge cubed-xarray`\n\n## Importing\n\nYou don't need to import this package in user code. Once poperly installed, xarray should automatically become aware of this package via the magic of entrypoints.\n\n## Usage\n\nXarray objects backed by cubed arrays can be created either by:\n\n1. Passing existing `cubed.Array` objects to the `data` argument of xarray constructors,\n2. Calling `.chunk` on xarray objects,\n3. Passing a `chunks` argument to `xarray.open_dataset`.\n\nIn (2) and (3) the choice to use `cubed.Array` instead of `dask.array.Array` is made by passing the keyword argument `chunked_array_type='cubed'`.\nTo pass arguments to the constructor of `cubed.Array` you should pass them via the dictionary `from_array_kwargs`, e.g. `from_array_kwargs={'spec': cubed.Spec(allowed_mem='2GB')}`.\n\nIf cubed and cubed-xarray are installed but dask is not, then specifying `chunked_array_type` is not necessary,\nas the entrypoints system will then default to the only chunked parallel backend available (i.e. cubed).\n\n## Sharp Edges 🔪\n\nSome things almost certainly won't work yet:\n- Certain operations called in xarray but not implemented in cubed, for instance `pad` (see https://github.com/tomwhite/cubed/issues/193)\n- Array operations involving NaNs - for now use `skipna=True` to avoid eager loading (see https://github.com/pydata/xarray/issues/7243)\n- Using `parallel=True` with `xr.open_mfdataset` won't work because cubed doesn't implement a version of `dask.Delayed` (see https://github.com/pydata/xarray/issues/7810)\n- Groupby (see https://github.com/tomwhite/cubed/issues/223 and https://github.com/xarray-contrib/flox/issues/224)\n- `xarray.map_blocks` does not actually dispatch to `cubed.map_blocks` yet, and will always use Dask.\n- Certain operations using `cumreduction` (e.g. `ffill` and `bfill`) are [not hooked up to the `ChunkManager` yet](https://github.com/tomwhite/cubed/issues/277#issuecomment-1648567431), so will attempt to call dask.\n\nand some other things _might_ work but have not yet been tried:\n\n- Saving to formats other than zarr\n\nIn general a bug could take the form of an error, or of a silent attempt to coerce the array type to numpy by immediately computing the underlying array.\n\n## Tests\n\nIntegration tests for wrapping cubed with xarray also live in this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcubed-dev%2Fcubed-xarray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcubed-dev%2Fcubed-xarray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcubed-dev%2Fcubed-xarray/lists"}