Documentation of seasonal_eof


Global Index (short | long) | Local contents | Local Index (short | long)


Cross-Reference Information

This script calls

Listing of script seasonal_eof


clear
cd /home/disk/hayes2/dvimont/csiro/annual_data
filin = ['temp_L5_djf_yr551-1000.nc'; ...
         'temp_L5_jja_yr551-1000.nc'];
for fi = 1:2;
nc = netcdf(filin(fi,:), 'nowrite');
  lat = nc{'latitude'}(:);
  lon = nc{'longitude'}(:);
  ctlim = [110 300 -30 30];
  [xk, yk] = keep_var(ctlim, lon, lat);
  temp = nc{'temp'}(:,:,yk,xk);
  mv = nc{'temp'}.missing_value(:);
nc = close(nc);
temp(temp == mv) = NaN;
[lat, lon] = keep_latlon(ctlim, lat, lon);
[ntim, nlev, nlat, nlon] = size(temp);
temp = squeeze(temp);
temp2 = NaN * ones(ntim, nlat/2, nlon/2);
for i = 1:nlat/2;
  latind = 2*(i-1)+[1:2];
  for j = 1:nlon/2;
    lonind = 2*(j-1)+[1:2];
    temp2(:,i,j) = squeeze(mean2(mean2(shiftdim(temp(:,latind,lonind), 1))));
  end
end
lat2 = mean([lat(1:2:nlat)'; lat(2:2:nlat)';])';
lon2 = mean([lon(1:2:nlon)'; lon(2:2:nlon)';])';
[ntim, nlat, nlon] = size(temp2);
[temp2, clim] = remove_mean(temp2);
kp = find(~isnan(clim));
temp2 = cosweight(temp2, lat2);
temp2 = temp2(:,kp);
[lam, lds, pcs, per] = eof_dan(temp2);
default_global
num = 1;
[ntim, nlat, nlon] = size(temp);
tem = pcs(:,num)' * reshape(temp, ntim, nlat*nlon) / ntim;
tem = reshape(tem, nlat, nlon);
figure(fi); figure_orient;
sd(1)
     gcont(tem, [-1:.1:1]);
     dc;
sd(2)
     plot(101:550, pcs(:,num));
     set(gca, 'XTick', [100:50:550], 'YTick', [-3:3]);
     axis([100 551 -3 3])
     grid on
eval(['pcs' num2str(fi) 'yr2 = pcs;']);
eval(['per' num2str(fi) 'yr2 = per;']);
eval(['lam' num2str(fi) 'yr2 = lam;']);
end