Error using matlab.int​ernal.imag​esci.netcd​flib , R2021b

39 visualizaciones (últimos 30 días)
Simon r
Simon r el 16 de Feb. de 2022
Respondida: Abhijeet el 22 de En. de 2024
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');
>>

Respuestas (1)

Abhijeet
Abhijeet el 22 de En. de 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.

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by