필터 지우기
필터 지우기

how to load big netcdf file?

조회 수: 12 (최근 30일)
TESFALEM ALDADA
TESFALEM ALDADA 2022년 2월 1일
답변: Benjamin Thompson 2022년 2월 1일
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{:});

채택된 답변

Benjamin Thompson
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개)

카테고리

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