Global Index (short | long) | Local contents | Local Index (short | long)
This script calls | |
---|---|
clear cd /home/disk/hayes2/dvimont/csm/300yr/srf load yrs1-51.mat sst1 = sst(1:600,:,:); oro1 = oro(1:600,:,:); load yrs51-100.mat sst2 = sst; oro2 = oro; load yrs101-150.mat sst3 = sst; oro3 = oro; load yrs151-200.mat sst4 = sst; oro4 = oro; load yrs201-250.mat sst5 = sst; oro5 = oro; load yrs251-300.mat sst6 = sst; oro6 = oro; sst = [sst1; sst2; sst3; sst4; sst5; sst6]; clear sst1 sst2 sst3 sst4 sst5 sst6; oro = [oro1; oro2; oro3; oro4; oro5; oro6]; clear oro1 oro2 oro3 oro4 oro5 oro6; [ntim, nlat, nlon] = size(sst); clear sst1 oro1; for i = 1:((ntim-1)/12); ind = 12*(i-1)+[12:14]; sst1(i,:,:) = mean(sst(ind,:,:)); oro1(i,:,:) = mean(oro(ind,:,:)); end moro = squeeze(mean(oro)); sst2 = sst1; kp = find(moro == 0); sst2(:,(moro ~= 0)) = NaN; clear sst3 oro3 [ntim, nlat, nlon] = size(sst2); for i = 1:(nlon/2); lonind = 2*(i-1)+[1:2]; for j = 1:(nlat/2); latind = 2*(j-1)+[1:2]; sst3(:,j,i) = mean(mean(shiftdim(sst2(:,latind,lonind), 1))); oro3(:,j,i) = mean(mean(shiftdim(oro1(:,latind,lonind), 1))); end end [ntim, nlat, nlon] = size(sst3); sst3(sst3 <= 274) = NaN; clim = mean(sst3); [sst3, tem] = remove_mean(sst3); kp = find(~isnan(clim)); [lat, lon] = getll('0000_srf.nc'); lat = mean([lat(1:2:length(lat))'; lat(2:2:length(lat))'])'; lat = mean([lat(1:2:length(lat))'; lat(2:2:length(lat))'])'; lon = mean([lon(1:2:length(lon))'; lon(2:2:length(lon))'])'; lon = mean([lon(1:2:length(lon))'; lon(2:2:length(lon))'])'; default_global; sst3 = cosweight(sst3, lat); sst3 = sst3(:,kp); if 0; [b, a] = butter(6, 2/6); sst3 = filtfilt(b, a, sst3); end sst3 = detrend(sst3); [lam, lds, pcs, per] = eof_dan(sst3); figure(1); figure_orient; num = 1; tem = NaN * ones(1, nlat*nlon); tem(kp) = lds(:, num); tem = reshape(tem, nlat, nlon); sd(1); gcont(tem, [-1:.1:1]); dc sd(2); plot(1:ntim, pcs(:,num)); [lat, lon] = getll('0000_srf.nc'); lat = mean([lat(1:2:length(lat))'; lat(2:2:length(lat))'])'; lon = mean([lon(1:2:length(lon))'; lon(2:2:length(lon))'])'; default_global; [ntim, nlat, nlon] = size(sst1); sst1 = reshape(sst1, ntim, nlat*nlon); [sst1, clim] = remove_mean(sst1); lag = 0; ind1 = (1:(ntim-lag)); ind2 = ((1+lag):ntim); lds2 = ((pcs(ind2,:))'*(sst1(ind1,:)) ./ (ntim-lag))'; num = 1; tem = lds2(:, num); tem = reshape(tem, nlat, nlon); sd(1); gcont(tem, [-60:5:-5 5:5:60]); dc sd(2); plot(1:ntim, pcs(:,num));