Documentation of backwards_quicklook


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


Help text

  Plot data

Cross-Reference Information

This script calls

Listing of script backwards_quicklook


clean
cd /home/disk/hayes2/dvimont/ccm/ccm3.6/run/sun/BACK/BACKWARD/atm/netcdf
filenam = dir('00*.nc');
nfile = length(filenam);
tem = repmat(NaN, [nfile 48 48]);
varn = 'TS';
for i = 1:nfile;
  disp(filenam(i).name);
  nc = netcdf(filenam(i).name, 'nowrite');
    tem(i,:,:) = nc{varn,1}(:,:,:);
  nc = close(nc);
end
nc = netcdf(filenam(1).name, 'nowrite');
  lat = nc{'lat'}(:);
  lon = nc{'lon'}(:);
nc = close(nc);
back = tem;
cd /home/disk/hayes2/dvimont/ccm/ccm3.6/run/sun/BACK/FORWARD/atm/netcdf
filenam = dir('00*.nc');
nfile = length(filenam);
tem = repmat(NaN, [nfile 48 48]);
for i = 1:nfile;
  disp(filenam(i).name);
  nc = netcdf(filenam(i).name, 'nowrite');
    tem(i,:,:) = nc{varn,1}(:,:,:);
  nc = close(nc);
end
forw = tem;
cd /home/disk/hayes2/dvimont/ccm/ccm3.6/run/sun/BACK/BACKWARD/atm/netcdf
filenam = dir('00*.nc');
nfile = length(filenam);
tem = repmat(NaN, [nfile 48 48]);
varn = 'SICTHK';
for i = 1:nfile;
  disp(filenam(i).name);
  nc = netcdf(filenam(i).name, 'nowrite');
    tem(i,:,:) = nc{varn,1}(:,:,:);
  nc = close(nc);
end
nc = netcdf(filenam(1).name, 'nowrite');
  lat = nc{'lat'}(:);
  lon = nc{'lon'}(:);
nc = close(nc);
back2 = tem;
cd /home/disk/hayes2/dvimont/ccm/ccm3.6/run/sun/BACK/FORWARD/atm/netcdf
filenam = dir('00*.nc');
nfile = length(filenam);
tem = repmat(NaN, [nfile 48 48]);
for i = 1:nfile;
  disp(filenam(i).name);
  nc = netcdf(filenam(i).name, 'nowrite');
    tem(i,:,:) = nc{varn,1}(:,:,:);
  nc = close(nc);
end
forw2 = tem;
global_axes(6, 2.5, .5, .5, 1.5);
tim = 13+[1/12:1/12:11];
subplot2(1,1);
  plot(tim, squeeze(mean(mean(shiftdim(back, 1)))), 'r', ...
       tim, squeeze(mean(mean(shiftdim(forw, 1)))), 'b');
win = [3:8]; tind = [];
for i = 1:11;
  tind = [tind 12*(i-1)+1+win];
end
win = [9:14]; tind = [];
for i = 1:10;
  tind = [tind 12*(i-1)+1+win];
end
global_axes(4, 2.5, .5, .5, 1.5);
figure_tall(2); clf
colormap('default'); color_4levs;
global_latlon(lat, lon, [0 360 -90 90]);
subplot2(1,1); cla;
  maxes('giso', [0 0]);
  tem1 = fliplr(squeeze(mean(back(tind,:,:)))) - ...
              mean(fliplr(squeeze(mean(back(tind,:,:))))')'*ones(1,48);
  tem1b = fliplr(squeeze(mean(back2(tind,:,:)))); tem1b(tem1b<4)=NaN;
  map_surface(tem1b, -0.5);
  hold on;
    [cc, hh] = map_contour_pn(tem1, 4);
  hold off;
  set(hh, 'linewidth', 2);
  caxis([-20 20]);
  fill_landmap('under');
  gridm on; tightmap;
  cb = colorbar2('v');
  title2('Backward', 'fontsize', 10);
  xx = get(gca, 'XLim'); yy = get(gca, 'YLim');
  t1 = text(mean(xx), yy(2)+1.2, 'hi')
  set(t1, 'String', '\bf Winter (NDJFMA)', ...
	  'Horizontalalignment', 'center', 'fontsize', 14)
  t2 = text(mean(xx), yy(2)+0.7, 'hi');
  set(t2, 'String', [' TS eddy:  contours 4^oC; '; ...
		     'Sea Ice Thickness:  shaded'], ...
	  'Horizontalalignment', 'center', 'fontsize', 12)
  set(cb, 'XLim', [-1 1], 'YLim', [0 20], ...
	  'XLimMode', 'manual', 'YLimMode', 'manual', ...
	  'YTick', 0:4:20);

subplot2(1,2); cla;
  maxes('giso', [0 0]);
  tem2 = (squeeze(mean(forw(tind,:,:)))) - ...
              mean((squeeze(mean(forw(tind,:,:))))')'*ones(1,48);
  tem2b = (squeeze(mean(forw2(tind,:,:)))); tem2b(tem2b<4)=NaN;
  map_surface(tem2b, -0.5);
  hold on;
    [cc, hh] = map_contour_pn(tem2, 4);
  hold off;
  set(hh, 'linewidth', 2);
  caxis([-20 20]);
  fill_landmap('under');
  gridm on; tightmap;
  cb = colorbar2('v');
  title2('Forward', 'fontsize', 10);
  xx = get(gca, 'XLim'); yy = get(gca, 'YLim');
  set(cb, 'XLim', [-1 1], 'YLim', [0 20], ...
	  'XLimMode', 'manual', 'YLimMode', 'manual', ...
	  'YTick', 0:4:20);

subplot2(1,3); cla;
  maxes('giso', [0 0]);
  tem3 = tem1 - tem2;
  tem3b = fliplr(squeeze(mean(back2(tind,:,:)))) - ...
	  squeeze(mean(forw2(tind,:,:)));
  tem3b(abs(tem3b) < 0.4) = NaN;
  map_surface(tem3b, -0.5);
  hold on;
    [cc, hh] = map_contour_pn(tem3, 4);
  hold off;
  set(hh, 'linewidth', 2);
  caxis([-2 2]);
  fill_landmap('under');
%  drawmapm;
  gridm on; tightmap;
  cb = colorbar2('v');
  title2('Backward - Forward', 'fontsize', 10);
  set(cb, 'XLim', [-1 1], 'YLim', [-2 2], ...
	  'XLimMode', 'manual', 'YLimMode', 'manual', ...
	  'YTick', -2:.8:2);

cd ~/matlab/CCM/
print -dpsc2 backward_ts_sicthk.ps

%  Plot data
figure_tall(3);
global_latlon(lat, lon, [0 360 -90 90]);
subplot2(1,1); cla;
  maxes('giso');
  tem1 = fliplr(squeeze(mean(back(tind,:,:))));
  map_surface(tem1);
  caxis([-25 25]);
  drawmapm;
  gridm on; tightmap;

subplot2(1,2); cla;
  maxes('giso');
  tem2 = (squeeze(mean(forw(tind,:,:))));
  map_surface(tem2);
  caxis([-2 2]);
  drawmapm;
  gridm on; tightmap;

subplot2(1,3); cla;
  maxes('giso');
  map_surface(tem1 - tem2);
  caxis([-25 25]);
  drawmapm;
  gridm on; tightmap;