| Contents | Index |
netcdf.defVarChunking(ncid,varid,storage,chunkDims)
netcdf.defVarChunking(ncid,varid,storage,chunkDims). sets the chunk settings for the variable specified by varid. Chunking is a technique to improve performance. storage specifies the type of chunking to use and chunkDims specifies the extents of the chunk size. You must specify the chunk size used with a variable after creating the variable but before you write data to the variable.
You cannot specify the chunk size for variables in a NetCDF file created with the netCDF-3 mode (CLASSIC_MODEL).
This example creates a NetCDF file and specifies the chunking behavior of a variable.
ncid = netcdf.create('myfile.nc','NETCDF4');
latdimid = netcdf.defDim(ncid,'lat',1800);
londimid = netcdf.defDim(ncid,'col',3600);
varid = netcdf.defVar(ncid,'earthgrid','double',[latdimid londimid]);
netcdf.defVarChunking(ncid,varid,'CHUNKED',[180 360]);
netcdf.close(ncid);This function corresponds to the nc_def_var_chunking function in the NetCDF library C API.
For copyright information, read the netcdfcopyright.txt and mexnccopyright.txt files.
netcdf | netcdf.inqVarChunking
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |