Global Index (short | long) | Local contents | Local Index (short | long)
compress data
This script calls | |
---|---|
clear data; load seas_ct2.mat; back; ct = detrend(ct); cthp = ct - rave(rave(ct, 25), 37); gr = ct - cthp; tim = [1:1200] + 12*450; tim = [1:length(cthp)-1]+1200; figure(1); subplot(3,1,1); plot(tim, cthp(tim), '-b'); set(gca, 'XTick', min(tim-1):60:max(tim), ... 'XTickLabel', [min(tim-1):60:max(tim)]/12, ... 'YTick', -1:.25:1); axis([min(tim-1) max(tim) -0.75 0.75]); grid on subplot(3,1,2); plot(tim, gr(tim), '-b'); set(gca, 'XTick', min(tim-1):60:max(tim), ... 'XTickLabel', [min(tim-1):60:max(tim)]/12, ... 'YTick', -1:.25:1); axis([min(tim-1) max(tim) -0.75 0.75]); grid on [lat, lon, depth, lm] = getll('temp', [-0.1 360 -90 90]); lims = [100 290 -60 60]; [xk, yk] = keep_var(lims, lon, lat); cd /home/disk/hayes2/dvimont/csiro/data/Individual_levels nc = netcdf('temp_M_L1_1000_years_new.nc', 'nowrite'); temp = nc{'temp'}(tim, 1, yk, xk); mv = nc{'temp'}.missing_value(:); nc = close(nc); temp(temp == mv) = NaN; temp = squeeze(temp); back [ntim, nlat, nlon] = size(temp); temp2 = (temp(:,1:2:nlat,1:2:nlon)+temp(:,2:2:nlat,1:2:nlon)+ ... temp(:,1:2:nlat,2:2:nlon)+temp(:,2:2:nlat,2:2:nlon))/4; lat2 = (lat(1:2:nlat)+lat(2:2:nlat))/2; lon2 = (lon(1:2:nlon)+lon(2:2:nlon))/2; [ntim, nlat, nlon] = size(temp2); temp2 = reshape(temp2, ntim, nlat*nlon); [temp2, clim] = annave(temp2); temp2 = cosweight(temp2, lat2); kp = find(~isnan(mean(clim))); temp2 = temp2(:, kp); tim2 = 2:length(cthp); ct2 = (cthp(tim2)-mean(cthp(tim2)))./std(cthp(tim2)); a1 = ct2' * temp2 / ntim; tsnct = temp2 - ct2*a1; [lam, lds, pcs, per] = eof_dan(tsnct); data %save gr_pcs.mat lam lds pcs per lims cthp gr [reg1, c1] = regress_eof(temp, pcs, 0); [lat, lon, depth, lm] = getll('temp', lims); default_global; figure(2); fo(1);% clf subplot(2,2,1); gcont(reg1, .05); dc2(lm); figure(1); subplot(3,1,3); plot(tim, -1*pcs(:,1), '-b'); set(gca, 'XTick', min(tim-1):60:max(tim), ... 'XTickLabel', [min(tim-1):60:max(tim)]/12, ... 'YTick', -1:.25:1); %axis([min(tim-1) max(tim) -0.75 0.75]); grid on grpcs = pcs; data; load LP9_detrend_L1-7_EOF_yr101-1000.mat for i = 1:900; ind = 12*(i-1)+[1:12]; tem(i) = mean(grpcs(ind,1)); end tim2 = 1:100; subplot(4,1,3); plot(tim2, tem(tim2), 'b', tim2, pcs(tim2,1), 'r') subplot(4,1,4); plot(1:(max(tim2*12)), rave(grpcs(1:max(tim2*12),1), 5), 'b', ... 12*(tim2-0.5), pcs(tim2,1), 'r');