%!ls -1 Monitoring_TrucVert_*.nc > LIST_TC.txt % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% mounth=['Jan' 'Feb' 'Mar' 'Apr' 'May' 'Jun' 'Jul' 'Aug' 'Sep' 'Oct' 'Nov' 'Dec']; TC_files=importdata('LIST_TC.txt'); % import la liste de nom de fichiers num=length(TC_files); % nombre de fichiers shorelineTrucVert=[]; for file=1:num a=char(TC_files(file)); zg=ncread(a,'zg'); for i=79:94 j=176; while j>0 && zg(i,j)<0 j=j-1; end id(i-78)=j; end shorelineTrucVert(file)=mean(id); kk=3*(str2num(a(26:27))-1)+1; timeTrucVert(file)=datenum([a(29:30) '-' mounth(kk:kk+2) '-' a(21:24)]); end timeTrucVertbis=timeTrucVert(1):timeTrucVert(length(timeTrucVert)); shorelineTrucVertBis=interp1(timeTrucVert,shorelineTrucVert,timeTrucVertbis);