Describe the bug
.xrs.open_geotiff(..., coregister=True) returns a dask array chunked at 512x512 no matter how the caller is chunked. The windowed read does pick up the caller's chunk size (_infer_caller_y_chunk feeds kwargs.setdefault('chunks', ...) in accessor.py), but the reproject() call that snaps the result onto the caller's grid is never given a chunk_size, so _compute_chunk_layout falls back to its 512 default.
>>> study_area = open_geotiff("USGS_1_n35w112.tif", chunks=2048)
>>> study_area.data.chunksize
(2048, 2048)
>>> veg = study_area.xrs.open_geotiff("LF2024_EVC_CONUS.tif", unpack=True, coregister=True)
>>> veg.data.chunksize
(512, 512)
Expected behavior
Coregister puts the result on the caller's exact grid, so it should keep the caller's chunking too. A 2048-chunked study area should produce a 2048-chunked veg layer, and blockwise ops on the pair should line up chunk for chunk.
The auto_reproject=True path has the same gap: the windowed read uses the caller's chunks but the reprojected output reverts to 512.
Additional context
reproject() already accepts chunk_size (int or (row, col) tuple); _open_geotiff_windowed never passes it. Derive chunk_size from the caller's dask chunks (or from the explicit chunks= kwarg when the caller is in-memory) and forward it to both reproject() calls.
Describe the bug
.xrs.open_geotiff(..., coregister=True)returns a dask array chunked at 512x512 no matter how the caller is chunked. The windowed read does pick up the caller's chunk size (_infer_caller_y_chunkfeedskwargs.setdefault('chunks', ...)inaccessor.py), but thereproject()call that snaps the result onto the caller's grid is never given achunk_size, so_compute_chunk_layoutfalls back to its 512 default.Expected behavior
Coregister puts the result on the caller's exact grid, so it should keep the caller's chunking too. A 2048-chunked study area should produce a 2048-chunked veg layer, and blockwise ops on the pair should line up chunk for chunk.
The
auto_reproject=Truepath has the same gap: the windowed read uses the caller's chunks but the reprojected output reverts to 512.Additional context
reproject()already acceptschunk_size(int or(row, col)tuple);_open_geotiff_windowednever passes it. Derivechunk_sizefrom the caller's dask chunks (or from the explicitchunks=kwarg when the caller is in-memory) and forward it to bothreproject()calls.