error using start and count vectors
显示 更早的评论
first I've opened a netcdf file. there are 8640 longitude points and 4320 latitude points. it is a world map. I'm trying to map a specific region. I created start and count vectors, then tried to extract the bio data corresponding to those lats and lons. However, I get an error, and can't figure out why.
% make the start and count vectors
start = [1440 1248 1]; % longitude -120.0208, latitude 38.0208
count = [7321 1320 1]; % longitude 125.0208, latitude 35.0208
fld = ncread(url,'bio',start,count);
This is the error I get:
Error using matlab.internal.imagesci.netcdflib
The NetCDF library encountered an error during execution of
'getVarsFloat' function - 'Index exceeds dimension bound
(NC_EINVALCOORDS)'.
Error in netcdf.getVar (line 182)
data =
matlab.internal.imagesci.netcdflib(funcstr,ncid,varid,varargin{:});
Error in internal.matlab.imagesci.nc/read (line 637)
data = netcdf.getVar(gid, varid, ...
Error in ncread (line 66)
vardata = ncObj.read(varName, varargin{:});
1 个评论
BN
2022-11-7
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 NetCDF 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!