how to access .cdf file
26 次查看(过去 30 天)
显示 更早的评论
Hello,
I am using matlab R2020a in windows 10 pro.
I have downloaded data from (/mms/sdc/public/data/mms1/fgm/brst) data science centre and i want to open it.
I am using data = cdfread(); syntax for this purpose as given in the matlab documentation but error is occuring as,
"Error using cdfread (line 149). Unable to open file. File might be corrupt or filename might have unsupported characters."
Similarly If I use [data,info] = cdfread();, the error occuring is as follows:
"Error using cdflibmex
33 is not a recognized DATATYPE mode.
Error in cdflib.inquireVar (line 28)
[name,dtype,nelts,dims,recVary,dimVary] = cdflibmex('inquireVar',cdfId,varNum);
Error in cdfread>read_data_by_hyperslab (line 357)
varinfo = cdflib.inquireVar(cdfid,varnum);
Error in cdfread>read_data (line 209)
data = read_data_by_hyperslab(cdfid,options);
Error in cdfread (line 172)
data = read_data(cdfid,options);"
Please help me out with this issue, if possible!
0 个评论
回答(1 个)
Rashed Mohammed
2021-3-11
Hi Neetasha
As of R2021a, reading CDF files which use CDF_TIME_TT2000 (datatype 33) is not supported. However, you can use the spdfcdfread function present in the patch provided by NASA for reading the CDF files you have. Download and install the patch. Add the installation folder to the path of MATLAB using addpath function.
Hope this helps.
2 个评论
源
2022-8-29
Hello Rashed,
I follow the above solution, but there are still errors.
Error in spdfcdfinfoc
Error issued from CDF library: "NO_SUCH_CDF: The specified CDF does not exist."
Error in spdfcdfinfo (line 359)
tmp = spdfcdfinfoc(filename, args.VarStruct, args.Variables, args.Validate);
Error in spdfcdfread (line 384)
info = spdfcdfinfo(filename, 'VALIDATE', args.Validate);
Please help me out with this issue, if possible!
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!