% when sst was read by model is shown by this script
a = load('sst_read.log');
m = a>200;
m(3) = 0;
f1 = find(m);
f2 = f1 - (1:length(f1))';
m(3) = 1;
b = a(~m);

dtday = 480/86400;
nt = 0:length(b)-1;
day = dtday*nt;
plot(day,b)
hold on
plot(day(f2),b(f2),'r.')
ylabel('dt\_sst')
xlabel('model day')      
set(gca,'tickdir','out')

%testbed:
nday0 = 0;
aday0 = 0;
nhr0  = 0;
dt = 480;
nhr_sst = 24;

nhr = nt*dt/3600.0;
test = find(mod(nday0*24+nhr-nhr0,nhr_sst)==0);

plot(day(test),b(test),'r+')
set(gca,'ylim',[-0.1 1.1])