how to access .cdf file

10 ビュー (過去 30 日間)
neetasha arya
neetasha arya 2021 年 3 月 8 日
コメント済み: 2022 年 8 月 29 日
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!

回答 (1 件)

Rashed Mohammed
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 件のコメント
neetasha arya
neetasha arya 2021 年 3 月 29 日
Hello Rashed,
I followed the above solution given by you and now I am able to open the cdf file.
Thanks for the help!
Regards,
Neetasha.
源
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!

Translated by