cf_xarray.encode_multi_index_as_compress#
- cf_xarray.encode_multi_index_as_compress(ds, idxnames=None)[source]#
Encode a MultiIndexed dimension using the “compression by gathering” CF convention.
- Parameters
- dsxarray.Dataset
Dataset with at least one MultiIndexed dimension
- idxnameshashable or iterable of hashable, optional
Dimensions that are MultiIndex-ed. If None, will detect all MultiIndex-ed dimensions.
- Returns
- xarray.Dataset
Encoded Dataset with
name
as a integer coordinate with a"compress"
attribute.
References
CF conventions on compression by gathering