Documentation of hofmoeller_depth_temp4


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


Help text


  First, look depth sections across EQ

Cross-Reference Information

This script calls

Listing of script hofmoeller_depth_temp4


clear
cd /home/disk/hayes2/dvimont/csiro/data
tim = 101:900;
filin = 'temp_A_L1-10.nc';
nc = netcdf(filin, 'nowrite');
  lat = nc{'latitude'}(:);
  lon = nc{'longitude'}(:);
  depth = nc{'depth'}(:);
  ctlim = [130 300 -50 50];
  [xk, yk] = keep_var(ctlim, lon, lat);
  temp = nc{'temp'}(tim,:,yk,xk);
  mv = nc{'temp'}.missing_value(:);
nc = close(nc);
temp(find(temp == mv)) = NaN * ones(size(find(temp == mv)));
lon = lon(xk); lat = lat(yk);
[ntim, nlev, nlat, nlon] = size(temp);
temp = reshape(temp, ntim, nlev*nlat*nlon);
temp = detrend(temp); 
temp = reshape(temp, ntim, nlev, nlat, nlon);

figure(1); figure_landscape;
colormap('pink');

lonind = [140 160; 160 180; 180 220; 220 260]; 
latind = [-6 6];
[b, a] = butter(6, 2/20);

for i = 1:4;
  tind = 50*(i-1)+[1:ntim/16];
  [xk, yk] = keep_var([lonind(1,:) latind], lon, lat);
  tem = squeeze(mean2(mean2(shiftdim(temp(tind,:,yk,xk), 2))));
  tem = detrend(tem);

  tem = tem - filtfilt(b, a, tem); tem(1,1) = 1; tem(2,1) = -1;
  subplot(4,1,i);
    contourf(tim(tind), -.01*depth, tem', [-1:.1:1]); hold on;
    shading flat
    contour(tim(tind), -0.01*depth, tem', [0 0], '-k'); hold off;
    set(gca, 'YTick', [-500:100:0], 'YTickLabel', [500:-100:0]);
  ylabel(['Lon: ' num2str(lonind(i,1)) ':' num2str(lonind(i,2))]);
  
end

%  Look at latitude/time sections

figure(2); figure_landscape;
colormap('pink');

lonind = [250 300];
depind = [0 70; 90 200; 200 315; 300 500];
[b, a] = butter(6, 2/10);

for i = 1:4;
  [xk, dk] = keep_var([lonind depind(i,:)], lon, 0.01*depth);
  tem = squeeze(mean2(shiftdim(temp(:,dk,:,xk), 1)));
  tem = squeeze(mean2(shiftdim(tem, 1)));
  tem = filtfilt(b, a, tem);

  tem = filtfilt(b, a, tem);
  subplot(4,1,i);
    contourf(tim, lat, tem');
  ylabel(['Depth: ' num2str(depind(i,1)) ':' num2str(depind(i,2))]);

end

%  First, look depth sections across EQ

figure(1); figure_landscape;
colormap('default');

%lonind = [205 230; 170 205; 130 160; 210 240];
%latind = [22.5 37.5; 10 22.5; 7.5 15; -6 6];
lonind = [180 210; 
[b, a] = butter(6, 2/8);
[b1, a1] = butter(6, 2/30);

for i = 1:4;
  tind = [101:200];% 50*(i-1)+[1:ntim/16];
  [xk, yk] = keep_var([lonind(i,:) latind(i,:)], lon, lat);
  tem = squeeze(mean2(mean2(shiftdim(temp(tind,:,yk,xk), 2))));
  tem = detrend(tem);

  tem = filtfilt(b, a, tem) - filtfilt(b1, a1, tem);
  subplot(4,1,i);
    contourf(tim(tind), -.01*depth, tem', 10); hold on;
    shading flat
    contour(tim(tind), -0.01*depth, tem', [0 0], '-k'); hold off;
    set(gca, 'YTick', [-500:100:0], 'YTickLabel', [500:-100:0]);
  ylabel(['Lon: ' num2str(lonind(i,1)) ':' num2str(lonind(i,2))]);
  
end