% for making reconstructed climate series based on over-fit adjustment

clear all; close all;

t1=load('./recon/reconserieslagnolut_3d1');
t2=load('./recon/reconserieslagnolut_3d2');
t3=load('./recon/reconserieslagnolut_3d3');
t4=load('./recon/reconserieslagnolut_3d4');
t5=load('./recon/reconserieslagnolut_3d5');
t6=load('./recon/reconserieslagnolut_3d6');
t7=load('./recon/reconserieslagnolut_3d7');
t8=load('./recon/reconserieslagnolut_3d8');
t9=load('./recon/reconserieslagnolut_3d9');
t10=load('./recon/reconserieslagnolut_3d10');
t11=load('./recon/reconserieslagnolut_3d11');
t12=load('./recon/reconserieslagnolut_3d12');
t13=load('./recon/reconserieslagnolut_3d13');
t14=load('./recon/reconserieslagnolut_3d14');
t15=load('./recon/reconserieslagnolut_3d15');
t16=load('./recon/reconserieslagnolut_3d16');
t17=load('./recon/reconserieslagnolut_3d17');
t18=load('./recon/reconserieslagnolut_3d18');
t19=load('./recon/reconserieslagnolut_3d19');

%-------- which time interval to use based on over-fit adjustment -----
x=t19;
%x(101:1996,:)=t18(1:1896,:);
%x(201:1996,:)=t17(1:1796,:);
%x(301:1996,:)=t16(1:1696,:);
%x(401:1996,:)=t15(1:1596,:);
x(501:1996,:)=t14(1:1496,:);
%x(601:1996,:)=t13(1:1396,:);
%x(701:1996,:)=t12(1:1296,:);
%x(801:1996,:)=t11(1:1196,:);
x(901:1996,:)=t10(1:1096,:);
%x(1001:1996,:)=t9(1:996,:);
%x(1101:1996,:)=t8(1:896,:);
%x(1201:1996,:)=t7(1:796,:);
%x(1301:1996,:)=t6(1:696,:);
x(1401:1996,:)=t5(1:596,:);
x(1501:1996,:)=t4(1:496,:);
x(1601:1996,:)=t3(1:396,:);
x(1701:1996,:)=t2(1:296,:);
x(1801:1996,:)=t1(1:196,:);

save('./recon/reconserieslagnolut_3d','x','-ASCII');




clear all; close all;

t1=load('./recon/reconseriessmlagnolut_3d1');
t2=load('./recon/reconseriessmlagnolut_3d2');
t3=load('./recon/reconseriessmlagnolut_3d3');
t4=load('./recon/reconseriessmlagnolut_3d4');
t5=load('./recon/reconseriessmlagnolut_3d5');
t6=load('./recon/reconseriessmlagnolut_3d6');
t7=load('./recon/reconseriessmlagnolut_3d7');
t8=load('./recon/reconseriessmlagnolut_3d8');
t9=load('./recon/reconseriessmlagnolut_3d9');
t10=load('./recon/reconseriessmlagnolut_3d10');
t11=load('./recon/reconseriessmlagnolut_3d11');
t12=load('./recon/reconseriessmlagnolut_3d12');
t13=load('./recon/reconseriessmlagnolut_3d13');
t14=load('./recon/reconseriessmlagnolut_3d14');
t15=load('./recon/reconseriessmlagnolut_3d15');
t16=load('./recon/reconseriessmlagnolut_3d16');
t17=load('./recon/reconseriessmlagnolut_3d17');
t18=load('./recon/reconseriessmlagnolut_3d18');
t19=load('./recon/reconseriessmlagnolut_3d19');

%-------- which time interval to use based on over-fit adjustment -----
x=t19;
%x(101:1996,:)=t18(1:1896,:);
%x(201:1996,:)=t17(1:1796,:);
%x(301:1996,:)=t16(1:1696,:);
%x(401:1996,:)=t15(1:1596,:);
x(501:1996,:)=t14(1:1496,:);
%x(601:1996,:)=t13(1:1396,:);
%x(701:1996,:)=t12(1:1296,:);
%x(801:1996,:)=t11(1:1196,:);
x(901:1996,:)=t10(1:1096,:);
%x(1001:1996,:)=t9(1:996,:);
%x(1101:1996,:)=t8(1:896,:);
%x(1201:1996,:)=t7(1:796,:);
%x(1301:1996,:)=t6(1:696,:);
x(1401:1996,:)=t5(1:596,:);
x(1501:1996,:)=t4(1:496,:);
x(1601:1996,:)=t3(1:396,:);
x(1701:1996,:)=t2(1:296,:);
x(1801:1996,:)=t1(1:196,:);

save('./recon/reconseriessmlagnolut_3d','x','-ASCII');









% for making real reconstructed gridded temperature based on over-fit adjustment

clear all; close all;

t1=load('./recon/reconserieslagnolut_3dgrid1');
t2=load('./recon/reconserieslagnolut_3dgrid2');
t3=load('./recon/reconserieslagnolut_3dgrid3');
t4=load('./recon/reconserieslagnolut_3dgrid4');
t5=load('./recon/reconserieslagnolut_3dgrid5');
t6=load('./recon/reconserieslagnolut_3dgrid6');
t7=load('./recon/reconserieslagnolut_3dgrid7');
t8=load('./recon/reconserieslagnolut_3dgrid8');
t9=load('./recon/reconserieslagnolut_3dgrid9');
t10=load('./recon/reconserieslagnolut_3dgrid10');
t11=load('./recon/reconserieslagnolut_3dgrid11');
t12=load('./recon/reconserieslagnolut_3dgrid12');
t13=load('./recon/reconserieslagnolut_3dgrid13');
t14=load('./recon/reconserieslagnolut_3dgrid14');
t15=load('./recon/reconserieslagnolut_3dgrid15');
t16=load('./recon/reconserieslagnolut_3dgrid16');
t17=load('./recon/reconserieslagnolut_3dgrid17');
t18=load('./recon/reconserieslagnolut_3dgrid18');
t19=load('./recon/reconserieslagnolut_3dgrid19');

%-------- which time interval to use based on over-fit adjustment -----
x=t19;
%x(101:1996,:)=t18(1:1896,:);
%x(201:1996,:)=t17(1:1796,:);
%x(301:1996,:)=t16(1:1696,:);
%x(401:1996,:)=t15(1:1596,:);
x(501:1996,:)=t14(1:1496,:);
%x(601:1996,:)=t13(1:1396,:);
%x(701:1996,:)=t12(1:1296,:);
%x(801:1996,:)=t11(1:1196,:);
x(901:1996,:)=t10(1:1096,:);
%x(1001:1996,:)=t9(1:996,:);
%x(1101:1996,:)=t8(1:896,:);
%x(1201:1996,:)=t7(1:796,:);
%x(1301:1996,:)=t6(1:696,:);
x(1401:1996,:)=t5(1:596,:);
x(1501:1996,:)=t4(1:496,:);
x(1601:1996,:)=t3(1:396,:);
x(1701:1996,:)=t2(1:296,:);
x(1801:1996,:)=t1(1:196,:);

save('./recon/reconserieslagnolut_3dgrid','x','-ASCII');




clear all; close all;

t1=load('./recon/reconseriessmlagnolut_3dgrid1');
t2=load('./recon/reconseriessmlagnolut_3dgrid2');
t3=load('./recon/reconseriessmlagnolut_3dgrid3');
t4=load('./recon/reconseriessmlagnolut_3dgrid4');
t5=load('./recon/reconseriessmlagnolut_3dgrid5');
t6=load('./recon/reconseriessmlagnolut_3dgrid6');
t7=load('./recon/reconseriessmlagnolut_3dgrid7');
t8=load('./recon/reconseriessmlagnolut_3dgrid8');
t9=load('./recon/reconseriessmlagnolut_3dgrid9');
t10=load('./recon/reconseriessmlagnolut_3dgrid10');
t11=load('./recon/reconseriessmlagnolut_3dgrid11');
t12=load('./recon/reconseriessmlagnolut_3dgrid12');
t13=load('./recon/reconseriessmlagnolut_3dgrid13');
t14=load('./recon/reconseriessmlagnolut_3dgrid14');
t15=load('./recon/reconseriessmlagnolut_3dgrid15');
t16=load('./recon/reconseriessmlagnolut_3dgrid16');
t17=load('./recon/reconseriessmlagnolut_3dgrid17');
t18=load('./recon/reconseriessmlagnolut_3dgrid18');
t19=load('./recon/reconseriessmlagnolut_3dgrid19');

%-------- which time interval to use based on over-fit adjustment -----
x=t19;
%x(101:1996,:)=t18(1:1896,:);
%x(201:1996,:)=t17(1:1796,:);
%x(301:1996,:)=t16(1:1696,:);
%x(401:1996,:)=t15(1:1596,:);
x(501:1996,:)=t14(1:1496,:);
%x(601:1996,:)=t13(1:1396,:);
%x(701:1996,:)=t12(1:1296,:);
%x(801:1996,:)=t11(1:1196,:);
x(901:1996,:)=t10(1:1096,:);
%x(1001:1996,:)=t9(1:996,:);
%x(1101:1996,:)=t8(1:896,:);
%x(1201:1996,:)=t7(1:796,:);
%x(1301:1996,:)=t6(1:696,:);
x(1401:1996,:)=t5(1:596,:);
x(1501:1996,:)=t4(1:496,:);
x(1601:1996,:)=t3(1:396,:);
x(1701:1996,:)=t2(1:296,:);
x(1801:1996,:)=t1(1:196,:);

save('./recon/reconseriessmlagnolut_3dgrid','x','-ASCII');













