フィルターのクリア

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 Center および File ExchangeNetCDF についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by