How to read .nc files that are located in multiple folders (sub-subfolders with similar name).
3 次查看(过去 30 天)
显示 更早的评论
In my case, 'Main' folder has 16 subfolders (2002, 2003, ..., 2017), while each subfolder have 365 sub-subfolders (001, 002, ..., 365), except subfolder 2002 as it start in 152. Subfolders 2004 and 2016 have 366 sub-subfolders instead of 365 as they are leap years. Subfolder 2017 only have 31 sub-subfolders. In each sub-subfolder there 2 files, one of them is .nc, which is the file that I need to read and analyze. NAME.nc files have different names. Here is an example of these files location...
Main/2002/152/NAME.nc
Main/2002/153/NAME.nc
...
Main/2002/365/NAME.nc
Main/2003/001/NAME.nc
Main/2003/002/NAME.nc
...
Main/2003/365/NAME.nc
...
Main/2017/001/NAME.nc
Main/2017/002/NAME.nc
...
Main/2017/031/NAME.nc
Your suggestions are welcome!
0 个评论
采纳的回答
KSSV
2017-2-2
This is not a new question, this question has been asked multiple times and it is discussed to death in mathworks. There are lot of links which give a help on this. You may refer the above links. Mostly people asked reading images, text files in the folder. In your case it is nc. You have to use ncread to read nc files. Also read about ncinfo, ncdisp.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!