Global Index (short | long) | Local contents | Local Index (short | long)
nc = netcdf('sal_gauss.cdf', 'nowrite');
This script calls | |
---|---|
clear cd /home/disk/hayes2/dvimont/ocean/data nc = netcdf('coup.cdf', 'nowrite'); h2 = nc{'h'}(:,1,50:53,51:102); nc = close(nc); h = squeeze(h); % average data a bit, to make this manageable [ntim, nlat, nlon] = size(h); ind1 = [1:2:102]; ind2 = [2:2:102]; h2 = h(:, ind1, :) + h(:, ind2, :); h2 = h2(:, :, ind1) + h2(:, :, ind2); h2 = h2./4; [ntim, nlat, nlon] = size(h2); h2 = reshape(h2, ntim, nlat*nlon); h2= detrend(h2); [lam, lds, pcs, per] = eof_dan(h2); cd /home/disk/hayes2/dvimont/ocean/matlab_data %save coup_eof.mat lam lds pcs per pat lags load coup_eof.mat lam lds pcs per pat lags h2 = reshape(h2, ntim, nlat, nlon); lags = -3:3 pat = regress_eof(h2, pcs, lags); ind = find(lags == 1); figure(1); figure_landscape; pncont(1:2:102, 1:2:102, squeeze(pat(ind,:,:,:)), [-10:.5:10], 0, 'k'); axis([0 103 0 103]); default_global; XAX = 1:102; YAX = 1:102; FRAME = [1 102 1 102]; M = moviein(11); for i = 1:11 contourf(1:102, 1:102, squeeze(100*pat(1,:,:)), [-5:.5:5]); axis([1 102 1 102]); caxis([-3 3]); M(:,i) = getframe; end movie(M) % Look at CT index; ct = h2(:,50:53,51:102); ct = squeeze(mean(mean(shiftdim(ct, 1)))); figure(2); fo(1); for i = 1:4; ind = 250*(i-1)+[1:250]; subplot(4,1,i); plot(ind, ct(ind), '-k') end % Power spectrum nfft = 256; noverlap = 0.75*nfft; [p, f] = spectrum(ct, nfft, noverlap); f2 = 0.5*f*3.65; figure(3); fo(1); subplot(2,1,2); semilogy(f2, p(:,1), 'b-');