Skip to content Skip to sidebar Skip to footer

"valueerror: Chunksize Cannot Exceed Dimension Size" When Trying To Write Xarray To Netcdf

I got the following error when trying to write a xarray object to netcdf file: 'ValueError: chunksize cannot exceed dimension size' The data is too big for my memory and needs

Solution 1:

It was an issue of the engine in the writing command. You need to change the engine from netcdf4 (default) to scipy if you are using chunks!

myds.to_netcdf("somenewfile.nc",engine='scipy')

The netcdf4 package is NOT capable of writing such files.

Post a Comment for ""valueerror: Chunksize Cannot Exceed Dimension Size" When Trying To Write Xarray To Netcdf"