Documentation of hgt_nmc_ccm


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


Help text

  Get climatology

Cross-Reference Information

This script calls

Listing of script hgt_nmc_ccm


cd /home/disk/tao/data/nmc.reanalysis/monthly
filin = 'hgt.mon.mean.nc'
nc = netcdf(filin, 'nowrite');
lev = nc{'level'}(:);
hgt = nc{'hgt'}(289:488,12,:,:);
lat = nc{'lat'}(:);
lon = nc{'lon'}(:);
time = nc{'time'}(289:488);
nc = close(nc);
hgt = squeeze(hgt);
[ntim, nlat, nlon] = size(hgt);
yr = floor(((time-time(1)+(365+366)*24))/(365.25*24)+1980);
mo = round((((time-time(1)+(365+366)*24))/(365.25*24)+1980-yr)*12+1);

hgt = reshape(hgt, ntim, nlat*nlon);
[hgt, clim] = annave(hgt);
hgt = reshape(hgt, ntim, nlat, nlon);

%  Get composites for warm and cold years

wyrs = [1983 1988 1992 1995 1998];
cyrs = [1984 1985 1989 1996 1997];

wyrk = intersect(find(ismember(yr, wyrs)),find(mo == 1));
cyrk = intersect(find(ismember(yr, cyrs)),find(mo == 1));

wave = zeros(5, nlat, nlon);
cave = zeros(5, nlat, nlon);
for i = 1:5;
  wave(i,:,:) = mean(hgt((wyrk-3+i),:,:));
  cave(i,:,:) = mean(hgt((cyrk-3+i),:,:));
end;

%  Get CCM data

cd /home/disk/hayes2/dvimont/ccm/ccm3.6/data

filin = 'warm.nc';
nc = netcdf(filin, 'nowrite');
  wz = nc{'Z3'}(:);
  clat = nc{'lat'}(:);
  clon = nc{'lon'}(:);
  P0 = nc{'P0'}(:);
  hyam = nc{'hyam'}(:);
  hybm = nc{'hybm'}(:);
  wps  = nc{'PS'}(:);
nc = close(nc);

filin = 'cold.nc';
nc = netcdf(filin, 'nowrite');
  cz = nc{'Z3'}(:);
  cps  = nc{'PS'}(:,:,:);
nc = close(nc);

filin = 'oi_dynam.nc';
nc = netcdf(filin, 'nowrite');
  sz = nc{'Z3'}(:,:,:,:);
  sps  = nc{'PS'}(:);
nc = close(nc);

sz = [sz(11:12,:,:,:); sz(1:3,:,:,:)];
sps = [sps(11:12,:,:); sps(1:3,:,:)];

wz500 = atlev(wz(2:4,:,:,:), 500, wps(2:4,:,:), hyam, hybm, P0);
cz500 = atlev(cz(2:4,:,:,:), 500, cps(2:4,:,:), hyam, hybm, P0);
sz500 = atlev(sz(2:4,:,:,:), 500, sps(2:4,:,:), hyam, hybm, P0);

%  Do some plots

orient tall

global XAX YAX
lims = [0 360 -90 90];

clf
XAX = lon;
YAX = lat;
tem = squeeze(mean(wave(2:4,:,:)));
tem = squeeze(mean(wave(2:4,:,:)+cave(2:4,:,:)));
subplot('Position', [.1 .53 .8 .42])
%     gcont(tem, lims, [-200:10:200])
mcont(tem, [-600:20:600], 'miller', [0 180]);
title('NMC Warm Event 500mb Height')
xlabel('Contour Interval: 20m')
XAX = clon;
YAX = clat;
tem = squeeze(mean(wz500+cz500-2*sz500));
subplot('Position', [.1 .0525 .8 .42])
%     gcont(tem, lims, [-200:10:200])
mcont(tem, [-600:20:600], 'miller', [0 180]);
title('CCM Warm Event 500mb Height')
xlabel('Contour Interval: 20m')



     tem = squeeze(mean(wz(2:4,11,:,:)-sz(2:4,11,:,:)));