Documentation of shortrun


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


Help text

% Movie

Cross-Reference Information

This script calls

Listing of script shortrun


clear
cd /home/disk/hayes2/dvimont/ocean/shortrun/data
filin = 'impulse.cdf';
nc = netcdf(filin, 'nowrite');
  himp = nc{'h'}(:);
  uimp = nc{'u'}(:);
  vimp = nc{'v'}(:);
nc = close(nc);
filin = 'step2.cdf';
nc = netcdf(filin, 'nowrite');
  himp = nc{'h'}(:);
  uimp = nc{'u'}(:);
  vimp = nc{'v'}(:);
nc = close(nc);
himp = squeeze(himp)-15000.;
uimp = squeeze(uimp);
vimp = squeeze(vimp);
[ntim, nlat, nlon] = size(himp);
hs = himp(:,1:2:nlat,1:2:nlon);
us = uimp(:,1:2:nlat,1:2:nlon);
vs = vimp(:,1:2:nlat,1:2:nlon);
get_global; XAX = 1:2:nlon; YAX = 1:2:nlat; FRAME = [0 nlon+1 0 nlat+1];
for fig = 1:4;
  figure(fig); figure_orient
  for i = 1:4;
    subplot(2,2,i)
    tem = squeeze(hs(2*i+8*(fig-1),:,:));
    contourf(XAX, YAX, tem, [-40:2:40]);
    hold on;
      [h1, h2] = contour(XAX, YAX, tem, [0 0], 'k');
      set(h2, 'linewidth', 2);
    hold off;
    caxis([-40 40]);
    shading flat
  end
end
get_global; XAX = 1:nlon; YAX = 1:nlat; FRAME = [0 nlon+1 0 nlat+1];
XAX = XAX'; YAX = YAX';
figure(5); figure_landscape
i = 5
htem = squeeze(himp(i,:,:));
utem = squeeze(uimp(i,:,:));
vtem = squeeze(vimp(i,:,:));
contourf(XAX, YAX, htem, [-40:2:40]);
shading flat
hold on;
  gquiv(utem, vtem, -0.5, 2, 'k');
hold off
caxis([-40 40]);

[ntim, nlat, nlon] = size(himp);

hs = himp(:,1:2:nlat,1:2:nlon);
us = uimp(:,1:2:nlat,1:2:nlon);
vs = vimp(:,1:2:nlat,1:2:nlon);

get_global; XAX = 1:2:nlon; YAX = 1:2:nlat; FRAME = [0 nlon+1 0 nlat+1];

frm = 2:2:50; nfrm = length(frm);
M = moviein(nfrm);

for i = frm;
  contourf(XAX, YAX, squeeze(hs(i,:,:)), [-1:.05:1]);
  shading flat
  caxis([-1 1]);
  M(:,i/2) = getframe;
end