how to load big netcdf file?
조회 수: 14 (최근 30일)
이전 댓글 표시
Hello
I was wondering why Matlab could not able to load 3GB file to the work space. I have Netacdf file format with 3GB an di tried to load it to the work space using ncread as shown below. but it results in error message.
Does any has better ideas for this error.
P = ncread('v2p0chirps_25.nc','precip');
Error using netcdflib
Requested 1440x400x14853 (31.9GB) array
exceeds maximum array size preference.
Creation of arrays greater than this
limit may take a long time and cause
MATLAB to become unresponsive. See
array size limit or preference panel
for more information.
Error in netcdf.getVar (line 140)
data =
netcdflib(funcstr,ncid,varid,varargin{:});
Error in
internal.matlab.imagesci.nc/read (line
605)
data =
netcdf.getVar(gid,
varid);
Error in ncread (line 66)
vardata = ncObj.read(varName,
varargin{:});
댓글 수: 0
채택된 답변
Benjamin Thompson
2022년 2월 1일
The ncread function accepts additional arguments for a starting position and number of elements to read. See the help on ncread. Or you could increase array size limit in the MATLAB preferences as your error suggests. Looks like MATLAB wants a 31.9GB array though so that might be hard to do.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 NetCDF에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!