

clear all;
clear figure;

yd=2000;
yf=2007;
%yd=1991;
%yf=1994;

exp1='erai69c';
exp2='erai70a';
exp3='erai70c';
exp4='erai72c';
%exp1='erai40c';
%exp2='erai51c';
%exp3='erai61c';
%exp4='erai65c';

load(['./mat.SAV/var_ssh_' exp1 '_' num2str(yd) '0101_' num2str(yf) '1231.mat'])

kee=zeros(4,size(ke,2));
sgzose=zeros(4,size(sgzos,2));
kee(1,:)=ke(:);
sgzose(1,:)=sgzos(:);

load(['./mat.SAV/var_ssh_' exp2 '_' num2str(yd) '0101_' num2str(yf) '1231.mat'])
kee(2,:)=ke(:);
sgzose(2,:)=sgzos(:);
load(['./mat.SAV/var_ssh_' exp3 '_' num2str(yd) '0101_' num2str(yf) '1231.mat'])
kee(3,:)=ke(:);
sgzose(3,:)=sgzos(:);
load(['./mat.SAV/var_ssh_' exp4 '_' num2str(yd) '0101_' num2str(yf) '1231.mat'])
kee(4,:)=ke(:);
sgzose(4,:)=sgzos(:);

figure;
plot(time,kee(1,:),'-k','LineWidth',2);
hold on
plot(time,kee(2,:),'-b','LineWidth',2);
hold on
plot(time,kee(3,:),'-g','LineWidth',2);     
hold on
plot(time,kee(4,:),'-r','LineWidth',2);

%legend('erai40c','erai51c','erai61c','erai65c','Location','Best')
legend(exp1,exp2,exp3,exp4,'Location','Best')
grid on;
xlabel('jours')
year_dur=[num2str(yd) '-' num2str(yf)]
title(['Variance ssh serie (m^2)- (' year_dur ')'], 'FontSize',15);
set (gca,'ylim',[0.0e-3 2.0e-3]);
%print ('-dpng','var_ssh_serie_erai40c_erai51c_erai61c_erai65c.png')
print ('-dpng',['var_ssh_serie_' exp1 '_' exp2 '_' exp3 '_' exp4 '.png'])

figure;
plot(time,sgzose(1,:),'-k','LineWidth',2);
hold on
plot(time,sgzose(2,:),'-b','LineWidth',2);
hold on
plot(time,sgzose(3,:),'-g','LineWidth',2);     
hold on
plot(time,sgzose(4,:),'-r','LineWidth',2);

%legend('erai40c','erai51c','erai61c','erai65c','Location','Best')
legend(exp1,exp2,exp3,exp4,'Location','Best')
grid on;
xlabel('jours')
year_dur=[num2str(yd) '-' num2str(yf)]
title(['Gradient ssh serie (m^2)- (' year_dur ')'], 'FontSize',15);
set (gca,'ylim',[0.0e-5 6e-5]);
%print ('-dpng','grad_ssh_serie_erai40c_erai51c_erai61c_erai65c.png')
print ('-dpng',['grad_ssh_serie_' exp1 '_' exp2 '_' exp3 '_' exp4 '.png'])


quit



