
% Make figures for PAICO reconstructions

%fln='arcatleurafr_r.20950_1950_prxyN.16_29-Jan-2018_12:10:46.mat';
%fln='arcatleurafr_r.24950_1950_prxyN.16_29-Jan-2018_12:23:15.mat';
fln='arcatleurafr_r.21950_1950_prxyN.15_27-Mar-2018_23:21:33.mat';
load(['./results/' fln])


%===================================
% Save mean and compute percentiles
%===================================


% define the output variable
outputf1=['paico_' fln(1:end-13) '.txt'];
outputf2=['paico_' fln(1:end-13) '.mat'];


yearsCE=result.times(:);

% Compute percentiles
t_pc=prctile(reconEns,[5 50 95],2);   
t_mn=mean(reconEns,2);
t_ens=reconEns;

save('yearsCE.txt','yearsCE','-ascii')
save('t_mean.txt','t_mn','-ascii')
save('t_percentiles_5_50_95.txt','t_pc','-ascii')
save('t_ensembles.txt','t_ens','-ascii')
%save(outputf2,'yearsCE','t_mn','t_pc','t_ens')



