2008 Unidata NetCDF Workshop for Developers and Data Providers > Chunking Data with NetCDF-4
12.11 Using Contiguous Variables
Use the nc_def_var_chunking function to make a variable contiguous.
- Turn this on with def_var_chunking. Set the third parameter
(contiguous) to a non-zero value to turn on contintigous storage for
this variable. (Pass NULL for the chunksizes.)
- You must do this before the first enddef on the file (even an
implied one, for example when you write some data.)
/* 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 contiguous, int
*chunksizesp);
- Matching inquiry function is use to retrieve current setting,
though it is transparent to readers of the data.
/* Inq chunking stuff for a var. */
EXTERNL int
nc_inq_var_chunking(int ncid, int varid, int *contiguousp, int *chunksizesp);
2008 Unidata NetCDF Workshop for Developers and Data Providers > Chunking Data with NetCDF-4