clearvars
close all


load('array_simb1.mat');
% load('array_exp.mat');



%% Tracé

colormax_U = 2;
colormin_U = -0.5;
colormax_W = 0.15;
colormin_W = -0.15;

colormax_k = 0.16;
colormin_k = 0;

y_lim = [0 6];     
x_lim = [-6.2 24];

aspect1 = 1.2;




F = figure('rend','painters','pos',[10 10 1150 560],'DefaultAxesFontName','cmr10','defaulttextinterpreter','latex')
ha = tight_subplot(3,2,[0.01 .05],[.2 .2],[.09 .15])





axes(ha(1));
mapmaskmanuel(array_sim(7).x,array_sim(7).z,array_sim(7).U,array_sim(7).U,array_sim(7).W,colormin_U,colormax_U,0,20)


caxis([colormin_U colormax_U]) 
set(gca, 'FontSize', 20);
hy = ylabel('$z/H_{2}$','FontSize',15);
set(hy,'interpreter','Latex','FontSize',15)

yticks([0 2 4])
ylim([y_lim(1) y_lim(2)])
xlim([x_lim(1) x_lim(2)])
set(gca,'TickLabelInterpreter', 'Latex');
pbaspect([aspect1 1 1])  
set(gca, 'xTick', [])
set(gca, 'yTick', [0 2 4])


letter = {'$case 1$'};


pos_letter_x = 24;
pos_letter_y = 7.2;
fontsize = 20;

text(pos_letter_x,pos_letter_y,letter(1),'Interpreter','latex','FontSize',fontsize)




axes(ha(3));

mapmaskmanuel(array_sim(19).x,array_sim(19).z,array_sim(19).U,array_sim(19).U,array_sim(19).W,colormin_U,colormax_U,0,20)


caxis([colormin_U colormax_U]) 
set(gca, 'FontSize', 20);
hy = ylabel('$z/H_{2}$','FontSize',15);
set(hy,'interpreter','Latex','FontSize',15)

yticks([0 2 4])
ylim([y_lim(1) y_lim(2)])
xlim([x_lim(1) x_lim(2)])
set(gca,'TickLabelInterpreter', 'Latex');
pbaspect([aspect1 1 1])  
set(gca, 'xTick', [])
set(gca, 'yTick', [0 2 4])


letter1 = {'$case 2$'};


pos_letter_x1 = 24;
pos_letter_y1 = 7.2;
fontsize = 20;

text(pos_letter_x1,pos_letter_y1,letter1(1),'Interpreter','latex','FontSize',fontsize)

axes(ha(5));

mapmaskmanuel(array_sim(15).x,array_sim(15).z,array_sim(15).U,array_sim(15).U,array_sim(15).W,colormin_U,colormax_U,0,20)




caxis([colormin_U colormax_U]) 
set(gca, 'FontSize', 20);
hy = ylabel('$z/H_{2}$','FontSize',15);
set(hy,'interpreter','Latex','FontSize',15)
hx = xlabel('$x/H_{2}$','FontSize',15);
set(hx,'interpreter','Latex','FontSize',15)

yticks([0 2 4])
ylim([y_lim(1) y_lim(2)])
xlim([x_lim(1) x_lim(2)])
set(gca,'TickLabelInterpreter', 'Latex');
pbaspect([aspect1 1 1])  
% set(gca, 'xTick', [])
set(gca, 'xTick', [-4 0 4 8 12 16 20])

letter2 = {'$case 3$'};


pos_letter_x2 = 24;
pos_letter_y2 = 7.2;
fontsize = 20;

text(pos_letter_x2,pos_letter_y2,letter2(1),'Interpreter','latex','FontSize',fontsize)


pos_letter_x3 = 8.1;
pos_letter_y3 = -6;

    letter3 = '(a)';
    text(pos_letter_x3,pos_letter_y3,letter3,'Interpreter','latex','FontSize',15)    


axes('Position',[.13 .53 .28 .38])
caxis([colormin_U colormax_U]); 
c = colorbar('northoutside'); 
colormap jet
axis off
set(gca, 'FontSize', 20);
ylabel(c, '$\overline{u}/U_{flow}$','interpreter','Latex', 'FontSize', 30)




axes(ha(2));


mapmaskmanuel(array_sim(7).x,array_sim(7).z,array_sim(7).k,array_sim(7).k,array_sim(7).k,colormin_k,colormax_k,0,20)

caxis([colormin_k colormax_k]) 
% hy = ylabel('$z/H_{2}$','FontSize',20);
% set(hy,'interpreter','Latex','FontSize',20)
set(gca, 'FontSize', 20);
ylim([y_lim(1) y_lim(2)])
xlim([x_lim(1) x_lim(2)])
set(gca,'TickLabelInterpreter', 'Latex');
pbaspect([aspect1 1 1])  
set(gca, 'xTick', [])
set(gca, 'yTick', [])




axes(ha(4));

mapmaskmanuel(array_sim(19).x,array_sim(19).z,array_sim(19).k,array_sim(19).k,array_sim(19).k,colormin_k,colormax_k,0,20)


 box on


caxis([colormin_k colormax_k]) 
% hy = ylabel('$z/H_{2}$','FontSize',20);
% set(hy,'interpreter','Latex','FontSize',20)
set(gca, 'FontSize', 20);
yticks([0 2 4])
ylim([y_lim(1) y_lim(2)])
xlim([x_lim(1) x_lim(2)])
set(gca,'TickLabelInterpreter', 'Latex');
pbaspect([aspect1 1 1])  
set(gca, 'xTick', [])
set(gca, 'yTick', [])




axes(ha(6));
mapmaskmanuel(array_sim(15).x,array_sim(15).z,array_sim(15).k,array_sim(15).k,array_sim(15).k,colormin_k,colormax_k,0,20)

box on

caxis([colormin_k colormax_k]) 
set(gca, 'FontSize', 20);
% hy = ylabel('$z/H_{2}$','FontSize',20);
% set(hy,'interpreter','Latex','FontSize',20)
hx = xlabel('$x/H_{2}$','FontSize',15);
set(hx,'interpreter','Latex','FontSize',15)

yticks([])
ylim([y_lim(1) y_lim(2)])
xlim([x_lim(1) x_lim(2)])
set(gca,'TickLabelInterpreter', 'Latex');
pbaspect([aspect1 1 1])  

set(gca, 'xTick', [-4 0 4 8 12 16 20])

pos_letter_x4 = 8.1;
pos_letter_y4 = -6;

    letter4 = '(b)';
    text(pos_letter_x4,pos_letter_y4,letter4,'Interpreter','latex','FontSize',15)    


axes('Position',[.53 .53 .28 .38])
caxis([colormin_k colormax_k]); 
c = colorbar('northoutside'); 
colormap jet
axis off
set(gca, 'FontSize', 20);
ylabel(c, '$k/U_{flow}^2$','interpreter','Latex', 'FontSize', 30)





