필터 지우기
필터 지우기

NetCDF Read Slow Down - Sometimes

조회 수: 3 (최근 30일)
Brandon Sackmann
Brandon Sackmann 2012년 2월 17일
I am reading data from very large NetCDF files (>25GB/file). The data are stored in separate 2D variables within the NetCDF file and depending on the syntax I use for netcdf.getVar I get dramatically different performance.
If I retrieve 'X' data values from the NetCDF file (different parts of the code require different subsets of the data):
(1) Always Fast: netcdf.getVar(ncid,varid,[0 0],[X 1]) (2) Initially Slow: netcdf.getVar(ncid,varid,[0 0],[1 X]) ...however subsequent reads from the same variable seem much faster.
Any thoughts as to what might be going on...is there any way to optimize things such that (1) and (2) are equally fast???

채택된 답변

John
John 2012년 2월 21일
If your variable's 2nd dimension crosses a lot of chunk boundaries, that might explain why the initial read might be slow.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 NetCDF에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by