Stream: python-questions

Topic: xarray.save_mfdataset


view this post on Zulip Seth McGinnis (Feb 03 2021 at 06:41):

I'm trying to use xarray.save_mfdataset to write out a bunch of netcdf files from a dask-enabled jupyter notebook.

Is there any way to specify the encoding and unlimited_dim as you would using the to_netcdf() function?
Tagging @Anderson Banihirwe

view this post on Zulip Deepak Cherian (Feb 03 2021 at 14:01):

The solution is to loop over and update DataArray.encoding and Dataset.encoding before calling save_mfdataset

unlimited_dims may also be set via dataset.encoding["unlimited_dims"].

view this post on Zulip Seth McGinnis (Feb 03 2021 at 18:51):

Thanks, I'll give that a shot!


Last updated: Jan 30 2022 at 12:01 UTC