Specify number of multi-file cache buffers for variable
cdflib.setVarCacheSize(cdfId,varNum,numBuffers)
cdflib.setVarCacheSize(cdfId,varNum,numBuffers)
specifies the number of cache buffers the CDF library uses for a variable
in a Common Data Format (CDF) file.
This function is only used with multifile format CDF files. It does not apply to single-file format CDFs. For more information about caching, see the CDF User's Guide.
|
Identifier of a CDF file, returned by a call to |
|
Numeric value identifying a variable in the file. Variable identifiers (variable numbers) are zero-based. |
|
Numeric value identifying the number of cache buffers to use. |
Create a multifile CDF, and then retrieve the number of buffers being used for a variable:
cdfid = cdflib.create('your_file.cdf') % Set the format of the file to be multi-file cdflib.setFormat(cdfid,'MULTI_FILE'); % Create a variable in the file varNum = cdflib.createVar(cdfid,'Time','cdf_int1',1,[],true,[]); % Note how the library creates a separate file for the variable ls your_file.* your_file.cdf your_file.z0 % Determine the number of cache buffers used with the variable numBuf = cdflib.getVarCacheSize(cdfid,varNum) numBuf = 1 % Increase the number of cache buffers used. cdflib.setVarCacheSize(cdfid,varNum,5) % Check the number of cache buffers used with the variable. numBuf = cdflib.getVarCacheSize(cdfid,varNum) numBuf = 5 % Clean up cdflib.delete(cdfid); clear cdfid
This function corresponds to the CDF library C API routine CDFsetzVarCacheSize
.
To use this function, you must be familiar with the CDF C
interface. Read the CDF documentation at the CDF website
.
For copyright information, see the cdfcopyright.txt
file.