필터 지우기
필터 지우기

how to open netcdf file with specific location?

조회 수: 3 (최근 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 CenterFile Exchange에서 NetCDF에 대해 자세히 알아보기

태그

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by