Can chunk caching be used with the high-level NetCDF functions?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 11 de En. de 2021
Respondida: MathWorks Support Team
el 13 de En. de 2021
I am using the high-level NetCDF interface to read a NetCDF file. My code might have to access the same data multiple times. In order to increase performance, I want to use chunk caching. The low-level interface includes the function "netcdf.setChunkCache" that is used to configure the default chunk cache size. If I use this low-level function to configure the chunk cache, can I expect a performance increase when I call functions in the high-level interface like "ncread"?
Respuesta aceptada
MathWorks Support Team
el 11 de En. de 2021
When the default chunk cache is configured with the low-level interface, those settings will be respected by the high-level functions such as "ncread". However, if you intend on using multiple calls to "ncread" to access the same data, the performance improvement from caching may not be fully realized. This is because the "ncread" function always closes the file before it returns. This action of closing the file will clear the chunk cache, and subsequent calls to "ncread" will start with an empty cache.
To fully realize the performance improvements offered by the chunk cache, you may wish to exclusively use the low-level interface. This interface offers much more control over when the file is opened and closed, and therefore enables greater persistence of the chunk cache. For more information regarding the low-level NetCDF interface, please consult the functions described under the section "NetCDF Library Package" at the documentation link below.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre NetCDF en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!