We might be able to replace some logic (especially that implemented in #156) with a call to xarray.decode_cf. This function can accept a Dataset and return a new dataset with different attributes and encoding etc. I think it's used internally in some of xarray's backends.
We might be able to replace some logic (especially that implemented in #156) with a call to
xarray.decode_cf
. This function can accept aDataset
and return a new dataset with different attributes and encoding etc. I think it's used internally in some of xarray's backends.Also there is an idea to expose a corresponding
xarray.encode_cf
function in xarray, which we might also be able to use (see https://github.com/pydata/xarray/issues/4412).