netcdf.inqVarChunking
Configure or inspect netCDF-4 variable storage options.
📝Syntax
[storage, chunksizes] = netcdf.inqVarChunking(ncid, varid)
📥Input Arguments
Parameter Description
ncid Open netCDF file or group identifier.
varid Variable identifier.
storage NC_CHUNKED or NC_CONTIGUOUS.
chunksizes Chunk size vector.
fillValue Default value used for unwritten data.
📤Output Arguments
Parameter Description
[storage, chunksizes] Return value described by the syntax shown above.
📄Description

netcdf.inqVarChunking controls variable storage metadata for netCDF-4 files.

Compression, chunking, fill values, and checksums must be defined before leaving define mode.

💡Examples
Copy-paste example for netcdf.inqVarChunking.
filename = [tempdir(), 'help_netcdf_inqVarChunking.nc'];
mode = bitor(netcdf.getConstant('NC_CLOBBER'), netcdf.getConstant('NC_NETCDF4'));
ncid = netcdf.create(filename, mode);
dimid = netcdf.defDim(ncid, 'x', 4);
varid = netcdf.defVar(ncid, 'temperature', netcdf.getConstant('NC_DOUBLE'), dimid);
netcdf.defVarChunking(ncid, varid, netcdf.getConstant('NC_CHUNKED'), 2);
[storage, chunks] = netcdf.inqVarChunking(ncid, varid);
netcdf.close(ncid);
🔗See Also
netcdf.defVarnetcdf.endDef
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub