Error reading netcdf file over internet
3 次查看(过去 30 天)
显示 更早的评论
The following code runs correctly without errors in online Matlab, Matlab Mobile, and even in this question box (when using the new RUN feature). Howver, on my Windows machines (10 and 11), the one-dimensional variable is read ok, but the three-dimensional variable throws the error shown below. Any idea how to fix this?
>> url='https://geo.public.data.uu.nl/vault-futurestreams/research-futurestreams%5B1633685642%5D/original/discharge/hist/gfdl/discharge_weekAvg_output_gfdl_hist_1986-01-07_to_1995-12-30.nc#mode=bytes';
>> aa=ncread(url,'longitude',1,3)
aa =
3×1 single column vector
-179.9583
-179.8750
-179.7917
>> bb=ncread(url,'discharge',[1, 1, 1 ],[1, 1, 10 ])
Error using matlab.internal.imagesci.netcdflib
The NetCDF library encountered an error during execution of 'getVarsFloat' 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 690)
data = netcdf.getVar(gid, varid, ...
Error in ncread (line 76)
vardata = ncObj.read(varName, varargin{:});
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 NetCDF 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!