how to open netcdf file with specific location?

1 回表示 (過去 30 日間)
Edwin Apriyanta Winardi
Edwin Apriyanta Winardi 2022 年 4 月 8 日
回答済み: MJFcoNaN 2022 年 4 月 8 日
Hello,
I'm struglling with opening nc file.
the nc file have variable u which the dimension is 601x321x15x720;
the variables is longitude, latitude, depth, and times
I open the file using this code:
ncfile_uv = 'zuv_Nov.nc';
U = ncread(ncfile_uv, 'u', [1 1 1 361], [Inf Inf 1 361])
I need to take the value at the 361, but i got some error. the error is:
Error using netcdflib
The NetCDF library encountered an error during execution of 'getVarsFloat' function - 'Start+count exceeds dimension bound (NC_EEDGE)'.
Error in netcdf.getVar (line 182)
data = netcdflib(funcstr,ncid,varid,varargin{:});
Error in internal.matlab.imagesci.nc/read (line 635)
data = netcdf.getVar(gid, varid, ...
Error in ncread (line 66)
vardata = ncObj.read(varName, varargin{:});

回答 (1 件)

MJFcoNaN
MJFcoNaN 2022 年 4 月 8 日
Please post the result of
ncinfo(ncfile_uv, 'u')

カテゴリ

Help Center および File ExchangeNetCDF についてさらに検索

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by