Explicitly set the chunking with the nc_def_var_chunking function:
Usage
int nc_def_var_chunking(int ncid, int varid, int storage, size_t *chunksizesp);
ncid
NetCDF ID, from a previous call to nc_open or nc_create.
varid
Variable ID.
storage
If NC_CONTIGUOUS, then contiguous storage is used for this
variable. Variables with chunking, compression, checksums, or one or
more unlimited dimensions cannot use contiguous storage.
If NC_CHUNKED, then chunked storage is used for this variable. Chunk
sizes may be specified with the chunksizes parameter or default
sizes will be used if that parameter is NULL.
By default contiguous storage is used for fix-sized variables when
compression, chunking, and checksums are not used.
*chunksizes
A pointer to an array list of chunk sizes. The array must have one
chunksize for each dimension of the variable.