Documentation of sst_fcst


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


Help text

  Load data from gr_nmc 

Cross-Reference Information

This script calls

Listing of script sst_fcst



load ct_gr.mat
lims = [0 360 -90 90];

%  Load and interpolate NMC forcast to CCM grid

cd /home/disk/tao/dvimont/model/data
load ssta.fcst9.out
load date.fcst9
load x.fcst9
load y.fcst9
sst = ssta';
sst = reshape(sst, 112, 56, 11);
sst = permute(sst, [3,2,1]);
clear ssta;

lim_sst = [min(x) max(x) min(y) max(y)];

clons = clon(find(clon >= lim_sst(1) & clon <= lim_sst(2)));
clats = clat(find(clat >= lim_sst(3) & clat <= lim_sst(4)));

for i = 1:11
  sst2(i,:,:) = interp2(x, y, squeeze(sst(i,:,:)), clons, clats');
end

sst = sst2;
clear sst2;

lonct = find(clons >= ctlim(1) & clons <= ctlim(2));
latct = find(clats >= ctlim(3) & clats <= ctlim(4));
ctsst = squeeze(mean(mean(shiftdim(sst(:,latct,lonct),1))));

num = 4
subplot(2,1,1)
gcont(squeeze(sst(num,:,:)), lim_sst, [-5:.5:5]);
dc
title(['SSTA for ' num2str(date(num))])
ylabel(['CT* = ' num2str(ctsst(num))])
subplot(2,1,2)
num = num+1
gcont(squeeze(sst(num,:,:)), lim_sst, [-5:.5:5]);
dc
title(['SSTA for ' num2str(date(num))])
xlabel('Contour Interval = 0.5 K')
ylabel(['CT* = ' num2str(ctsst(num))])

%  Define weighting functions for forcast and climatology

weightl = zeros(size(find(clat < min(clats))));
weightr = zeros(size(find(clat > max(clats))));
weight1 = exp(-1*((clats+6)./5).^2);
weight2 = exp(-1*((clats-6)./5).^2);
weightfull = [weightl; weight1(1:6); ones(6,1); weight2(13:20); weightr];
weightfull = ones(size(weightfull)) - weightfull;
weight = [weightl; weight1(1:7); ones(4,1); weight2(12:20); weightr];
%weight = [weight1(1:7); ones(4,1); weight2(12:20)];

plot(clats, weight);
axis([-25 30 -.1 1.1])
set(gca,'XTick',clats)
set(gca,'XTickLabel',round(clats))

%  Weight data sets by appropriate amount

sstfcst = zeros(6,nlat,nlon);
lonk = find(clon >= min(clons) & clon <= max(clons));
latk = find(clat >= min(clats) & clat <= max(clats));
sstfcst(:,latk,lonk) = sst(1:6,:,:);

stdct = std(ctstar);

for i = 1:6
  ssta(i,:,:) = (weight*ones(1,nlon)) .* squeeze(sstfcst(i,:,:)) +...
    (weightfull*ones(1,nlon)) .* ((1.5 * ctsst(i)/stdct) .* ctpat);
end

%  Contour up some data.

num = 1;
subplot(2,1,1);
gcont(squeeze(ssta(num,:,:)),lims,[-10:.25:10]);
dc
subplot(2,1,2);
gcont(squeeze(ssta(num+1,:,:)),lims,[-10:.25:10]);
dc

%  Compare CT pattern with forcast

tem = squeeze(mean(sst));
subplot(2,1,1)
gcont(tem, lim_sst, [-10:.25:10])
dc
subplot(2,1,2)
tem = ctpat(find(ismember(clat,clats)), find(ismember(clon,clons)));
gcont(tem, lim_sst, [-10:.25:10])
dc