Error using matlab.internal.imagesci.netcdflib , R2021b
24 views (last 30 days)
Show older comments
I get an error using ncread
The script works on earlier release (R2020a)
What could be the reason for this?
---------------------
Error using matlab.internal.imagesci.netcdflib
The NetCDF library encountered an error during execution of 'open' function - 'I/O failure (NC_EIO)'. If the data source was an OPeNDAP URL, see the OPeNDAP Troubleshooting
section in the Users Guide.
Error in netcdf.open (line 67)
[varargout{:}] = matlab.internal.imagesci.netcdflib ( 'open', filename, varargin{1} );
Error in internal.matlab.imagesci.nc/openToRead (line 1280)
this.ncRootid = netcdf.open(this.Filename,'NOWRITE');
Error in internal.matlab.imagesci.nc (line 124)
this.openToRead();
Error in ncread (line 61)
ncObj = internal.matlab.imagesci.nc(ncFile);
Error in file (line 56)
lon = ncread(urlget,'longitude');
>>
0 Comments
Answers (1)
Abhijeet
on 22 Jan 2024
Hi Simon ,
I understand that you are facing isssue while using "ncread" function in MATLAB R2021b.
This is a known issue with the recent versions of the NetCDF library that is used by "ncread" function to query the OPeNDAP data. There has been a change in the implementation of this third-party library which is causing unintended errors in MATLAB and other programming languages that use this library.
To resolve this issue please refer either of the following workaround :-
1. Prepend the "ncread" source URL with “[fillmismatch]”
time=ncread("[fillmismatch]http://sccoos.org/thredds/dodsC/autoss/scripps_pier-2019.nc","time"");
2. Append the "ncread" source URL with “#fillmismatch”
time=ncread("http://sccoos.org/thredds/dodsC/autoss/scripps_pier-2019.nc#fillmismatch","time"");
I hope this resolves the issue you were facing.
0 Comments
See Also
Categories
Find more on Visualization and Data Export 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!