bcdev / zappend

Robustly creating and updating Zarr data cubes from smaller subsets
https://bcdev.github.io/zappend/
MIT License
40 stars 1 forks source link

write_levels does not handle coordinate variables correctly #103

Open AliceBalfanz opened 1 month ago

AliceBalfanz commented 1 month ago

Describe the bug When creating a levels dataset from .zarr which contains bnds variables (i.e. lat_bnds, lon_bnds, time_bnds), the resulting .levels only keeps time_bnds as coodrinate variable and converts lat_bnds and lon_bnds into data variables.

To Reproduce Convert a .zarr cube which contains bnds variables and compare .zattrs from the original dataset as well as the one for e.g. 0.zarr of the levels dataset. Expected behavior If not specified differently, the default of https://bcdev.github.io/zappend/config/#attrs_update_mode should be used, which is "keep" and therefor they should be identical.

Python Environment