Error reading NetCDF file: 'getVarDouble' function - 'HDF error (NC_EHDFERR)'
Mostrar comentarios más antiguos
Hello,
I am trying to read in different variables from a netCDF with 'ncread', but am encountering an error when trying to call in latitude and logitude (but not with any other variables)
My code:
ncfile =('D:\sydneysDrive\imagery\POLYMER\POLYMER_output\LC08_L1TP_001017_20140508_20200911_02_T1_redo_polymer.nc')
chl = ncread(ncfile,'logchl') ;
red = ncread(ncfile,'Rw655') ;
nir = ncread(ncfile,'Rw865') ;
lon = ncread(ncfile,'longitude') ;
lat = ncread(ncfile,'latitude') ;
My error:
Error using matlab.internal.imagesci.netcdflib
The NetCDF library encountered an error during execution of 'getVarDouble' function - 'HDF error (NC_EHDFERR)'.
Error in netcdf.getVar (line 205)
data = matlab.internal.imagesci.netcdflib(funcstr,ncid,varid,varargin{:});
Error in internal.matlab.imagesci.nc/read (line 644)
data = netcdf.getVar(gid, varid);
Error in ncread (line 74)
vardata = ncObj.read(varName, varargin{:});
Error in ReadingPolymerNetCDFs (line 6)
lon = ncread(ncfile,'longitude') ;
Any help is greatly appreciated!
Sydney
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre NetCDF en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!