`identical` returns False after read-write round trip
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
Research direction
Run the reproducible example and compare the geometry variable and metadata before and after the Zarr round trip. Start with the encode_cf and decode_cf entry points, using issue #26 for context; done means roundtripped.identical(encoded) returns True while the non-geometry comparison remains unchanged.
Written by the indexing model from the issue text.
Description
Following #26.
The identical method returns False after a read-write round trip following the user guide instructions.
Reproducible example:
import geopandas as gpd
import xarray as xr
import xvec # noqa: F401
cube = xr.Dataset(
data_vars={"temperature": [20, 20, 20], "relative_humidity": [60, 60, 60]},
coords={
"geometry": gpd.points_from_xy(
[6.7928, 6.1278, 7.3303], [47.0838, 46.2475, 46.2186]
)
},
).xvec.set_geom_indexes("geometry", crs="epsg:4326")
encoded = cube.xvec.encode_cf()
encoded.to_zarr("cube.zarr", mode="w")
roundtripped = xr.open_zarr("cube.zarr").xvec.decode_cf()
print("identical: ", roundtripped.identical(encoded))
print(
"identical (no geometry): ",
cube.drop_vars("geometry").identical(roundtripped.drop_vars("geometry")),
)
outputs:
identical: False
identical (no geometry): True
also note that I am getting this warning:
/path/to/pixi/env/lib/python3.13/site-packages/zarr/api/asynchronous.py:247: ZarrUserWarning: Consolidated metadata is currently not part in the Zarr format 3 specification. It may not be supported by other zarr implementations and may change in the future.
warnings.warn(
versions:
geopandas 1.1.2
numpy 2.3.5
xarray 2026.1.0
xvec 0.5.2
zarr 3.1.5
- Dominant language
- Python
- Stars
- 139
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from xarray-contrib/xvec
-
CI
Difficulty 3/5 1-2 days Newbie friendliness 35/100
xarray-contrib/xvec#145 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
xarray-contrib/xvec#129 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
xarray-contrib/xvec#113 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
xarray-contrib/xvec#100 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
xarray-contrib/xvec#91 · 2 comments ·
All issues in xarray-contrib/xvec
Similar issues
-
agent-ready documentation needs-triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
instance instance add
Difficulty 1/5 Under an hour Newbie friendliness 72/100
searxng/searx-instances#939 · 1 comment ·
-
area-deployment area-integrations triage:bot-seen
Difficulty 2/5 Half a day Newbie friendliness 86/100