how to open netcdf file with specific location?

1 次查看(过去 30 天)
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')

标签

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by