How to import a set of NetCDF Files?

7 views (last 30 days)
YH on 8 Nov 2018
Commented: CHANG XV on 14 Nov 2019
Hallo, Does someone know how to import a complete Dataset of NetCDF files. I have 54 files representing the sea levels from 1948 to 2011. so far I know how to read one file with ncread but I couldnt't find out how to import the entire set of the files.

Accepted Answer

KSSV on 8 Nov 2018
ncfiles = dir('*.nc') ; % you are in the folder where nc files are present
N = length(ncfiles) ; % number of files
% loop for each file
for i = 1:N
thisfile = ncfiles(i).name;
% load the data and do what you want
CHANG XV on 14 Nov 2019
Have you sorted out this problem? I encounter the same problem this days. I have no idea about that. Thanks !

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!