Main Content


Set default chunk cache settings for netCDF library



    netcdf.setChunkCache(csize,nelems,premp) sets the default chunk cache settings used by the netCDF library.

    Settings apply for subsequent file open and create operations for the remainder of the MATLAB® session. This function does not change the chunk cache settings of files that are already open.


    collapse all

    Set the default chunk settings for the netCDF library.


    Input Arguments

    collapse all

    Cache size in bytes, specified as a positive integer scalar. This value represents the total size, in bytes, of the raw chunk data cache.

    Data Types: double

    Number of elements to hold in the raw chunk data cache, specified as a positive integer scalar.

    Data Types: double

    Preemption policy, specified as a scalar value in the range [0, 1]. A value of 0 indicates that fully read chunks are treated the same as other chunks, that is, preemption occurs based on the Least Recently Used (LRU) algorithm. A value of 1 indicates that fully read chunks are always preempted before other chunks.

    Data Types: double


    • This function corresponds to the nc_set_chunk_cache function in the netCDF library C API.

    Version History

    Introduced in R2011b