how to open netcdf file with specific location?

1 vue (au cours des 30 derniers jours)
Edwin Apriyanta Winardi
Edwin Apriyanta Winardi le 8 Avr 2022
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{:});

Réponses (1)

MJFcoNaN
MJFcoNaN le 8 Avr 2022
Please post the result of
ncinfo(ncfile_uv, 'u')

Tags

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by