Skip to content

Don't overwrite indexes for region writes, always #8589

Closed
@dcherian

Description

@dcherian

What happened?

Currently we don't overwrite indexes when region="auto"

xarray/xarray/backends/api.py

Lines 1769 to 1770 in e6ccedb

if region_was_autodetected:
dataset = dataset.drop_vars(dataset.indexes)

I propose we do this for all region writes and completely disallow modifying indexes with a region write.

This would match the map_blocks model, where all indexes are specified in the template and no changes by the mapped function are allowed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions