Error reading .nc file
35 views (last 30 days)
Show older comments
Hi, how do I solve this error?
Error using internal.matlab.imagesci.nc/openToRead (line 1272)
Could not open
19951210120000-ESACCI-L4_GHRSST-SST-GMPE-GLOB_CDR2.0-v02.0-fv01.0.nc for reading.
Error in internal.matlab.imagesci.nc (line 121)
this.openToRead();
Error in ncread (line 61)
ncObj = internal.matlab.imagesci.nc(ncFile);
0 Comments
Answers (1)
Shiva Kalyan Diwakaruni
on 7 May 2021
Hi,
The issue could be due to a corrupt MATLAB installation.
In order to ensure that other MEX files can be loaded properly in MATLAB, you can try executing the following commands in MATLAB Command Window:
>> imread('example.tif');
>> h5read('example.h5', '/g1/g1.1/dset1.1.1');
The above commands use MEX files and if they work it means that Visual C++ 2015 Redistributable has been installed properly.
This error can be caused when the Visual C++ Redistributable is missing and hence there is dependency issue.
To identify the missing library dependencies, please download "dependency walker" from the link below:
Install one of the supported version of the compiler (Microsoft Visual C++ only) on the machine which will install the redistributable automatically. Please find the list of supported compilers below:
If you have access to another machine, you could also check if the same NetCDF file can be read on MATLAB on that machine.
If you cannot use dependency walker on your system, we are unable to identify which DLLs are missing. So, we suggest to do a fresh installation of MATLAB and try reading the file again.
Hope it helps.
0 Comments
See Also
Categories
Find more on NetCDF in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!