Error using matlab.internal.imagesci.netcdflib , R2021b
    조회 수: 25 (최근 30일)
  
       이전 댓글 표시
    
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
답변 (1개)
  Abhijeet
      
 2024년 1월 22일
        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
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

