/* These are limits for default chunksizes. (2^16 and 2^20). */ #define NC_LEN_TOO_BIG 65536 #define NC_LEN_WAY_TOO_BIG 1048576 /* Now we must determine the default chunksize. */ if (dim->unlimited) chunksize[d] = 1; else if (dim->len < NC_LEN_TOO_BIG) chunksize[d] = dim->len; else if (dim->len > NC_LEN_TOO_BIG && dim->len <= NC_LEN_WAY_TOO_BIG) chunksize[d] = dim->len / 2 + 1; else chunksize[d] = NC_LEN_WAY_TOO_BIG;
/* Define chunking for a variable. This must be done after nc_def_var and before nc_enddef. */ EXTERNL int nc_def_var_chunking(int ncid, int varid, int *chunkalgp, int *chunksizesp, int *extend_incrementsp); /* Inq chunking stuff for a var. */ EXTERNL int nc_inq_var_chunking(int ncid, int varid, int *chunkalgp, int *chunksizesp, int *extend_incrementsp);