[Bug]: xarray.open_mfdataset
drops .encoding
attributes, need to handle with xcdat.open_mfdataset()
#308
Labels
type: bug
Inconsistencies or issues which will cause an issue or problem for users or implementors.
What happened?
Related to #302 (comment).
The temporal averaging APIs require decoded time coordinates and the
ds.time.encoding
dict to be populated with the"calendar"
attr.What did you expect to happen?
The
.encoding
attributes should remain persistent after runningxcdat.open_mfdataset()
.This does not affect
xcdat.open_dataset()
.Minimal Complete Verifiable Example
Relevant log output
No response
Anything else we need to know?
Possible Solutions
preprocess kwarg
)Related Issues
Environment
xcdat 0.3.0
INSTALLED VERSIONS
commit: None
python: 3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:56:21)
[GCC 10.3.0]
python-bits: 64
OS: Linux
OS-release: 3.10.0-1160.45.1.el7.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.12.1
libnetcdf: 4.8.1
xarray: 2022.3.0
pandas: 1.4.3
numpy: 1.22.4
scipy: 1.9.0
netCDF4: 1.5.8
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: None
cftime: 1.6.0
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: None
dask: 2022.6.1
distributed: 2022.6.1
matplotlib: 3.5.2
cartopy: None
seaborn: None
numbagg: None
fsspec: 2022.7.1
cupy: None
pint: None
sparse: 0.13.0
setuptools: 63.3.0
pip: 22.1.2
conda: None
pytest: 7.1.2
IPython: 8.4.0
sphinx: 4.5.0
The text was updated successfully, but these errors were encountered: