pydata / pydata/xarray

add `use_zarr_fill_value_as_mask` in `open_datatree` for Zarr Stores

Open Beginner friendly
#11,361 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
4.2k
Forks
1.4k
Avg merge
2d 15h
Merged PRs (30d)
14

Description

Maybe I'm totally mistaken but it seems that use_zarr_fill_value_as_mask option is not available when using xarray.open_datatree for a Zarr store, while it's available for open_dataset

https://github.com/pydata/xarray/blob/d022da54265253ce19d426bbe1cbda7ca4f8821b/xarray/backends/zarr.py#L1770-L1808

Looking at https://github.com/pydata/xarray/blob/d022da54265253ce19d426bbe1cbda7ca4f8821b/xarray/backends/zarr.py#L1840-L1851

it seems that we should be able to forward a use_zarr_fill_value_as_mask option

cc @d-v-b

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in xarray/backends/zarr.py, comparing the option handling around lines 1770-1808 with the open_datatree-related code around lines 1840-1851. Trace how Zarr store options reach open_datatree, then verify that use_zarr_fill_value_as_mask is accepted and forwarded consistently with open_dataset.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.