필터 지우기
필터 지우기

How to import a set of NetCDF Files?

조회 수: 2 (최근 30일)
YH
YH 2018년 11월 8일
댓글: CHANG XV 2019년 11월 14일
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.

채택된 답변

KSSV
KSSV 2018년 11월 8일
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
end
  댓글 수: 4
YH
YH 2018년 11월 9일
I tried to do so, it gives me back 3 errors regarding ncread
Error using internal.matlab.imagesci.nc/openToRead (line 1272) Could not open cD-2_TRIM-NP-2d-Baltic_6.4_e_001.nc for reading.
Error in internal.matlab.imagesci.nc (line 121) this.openToRead();
Error in ncread (line 53) ncObj = internal.matlab.imagesci.nc(ncFile); Do you have an idea, why I am getting these errors?
CHANG XV
CHANG XV 2019년 11월 14일
Have you sorted out this problem? I encounter the same problem this days. I have no idea about that. Thanks !

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 NetCDF에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by