netCDF
4.2.1.1
|
(and 4.1.1)
When the data writer does not specify chunk sizes for variable, the netCDF library has to come up with some default values.
The C code below determines the default chunks sizes.
For unlimited dimensions, a chunk size of one is always used. Users are advised to set chunk sizes for large data sets with one or more unlimited dimensions, since a chunk size of one is quite inefficient.
For fixed dimensions, the algorithm below finds a size for the chunk sizes in each dimension which results in chunks of DEFAULT_CHUNK_SIZE (which can be modified in the netCDF configure script).
/* Unlimited dim always gets chunksize of 1. */ if (dim->unlimited) chunksize[d] = 1; else chunksize[d] = pow((double)DEFAULT_CHUNK_SIZE/type_size, 1/(double)(var->ndims - unlimdim));