close all;
clear;

casefn{1}='Case_A.mat';
casefn{2}='Case_B.mat';
casefn{3}='Case_C.mat';
casefn{4}='Case_D.mat';
casefn{5}='Case_E.mat';
casefn{6}='Case_F.mat';
colors='rgbcmk';

for i=1:6
    load(casefn{i});
    U_prof = mean(MU,2);
    W_prof = mean(MW,2);
    su_prof = mean(SU,2);
    sw_prof = mean(SW,2);
    k_prof = 1/2*(su_prof.^2+2*sw_prof.^2);
    eps_prof = mean(eps,2);
    vt_prof = 0.09*k_prof.^2./(eps_prof*10000);
    
    figure(1);
    plot(abs(U_prof),z,colors(i));
    hold on;
    
    figure(2);
    plot(k_prof,z,colors(i));
    hold on;

    figure(3);
    plot(eps_prof,z,colors(i));
    hold on;
    
    figure(4);
    plot(vt_prof,z,colors(i));
    hold on;

end

figure(1);
xlabel('{\it U} (cm/s)','fontsize',15,'fontname','times');
ylabel('{\it z} (cm)','fontsize',15,'fontname','times');
title('Mean velocity');
legend('A','B','C','D','E','F');

figure(2);
xlabel('{\it k} (cm^2/s^2)','fontsize',15,'fontname','times');
ylabel('{\it z} (cm)','fontsize',15,'fontname','times');
title('Turbulent kinetic energy (TKE)');
legend('A','B','C','D','E','F');

figure(3);
xlabel('{\it \epsilon} (m^2/s^3)','fontsize',15,'fontname','times');
ylabel('{\it z} (cm)','fontsize',15,'fontname','times');
set(gca,'xscale','log');
title('Dissipation rate of TKE');
legend('A','B','C','D','E','F');

figure(4);
xlabel('{\it \nu_T} (cm^2/s)','fontsize',15,'fontname','times');
ylabel('{\it z} (cm)','fontsize',15,'fontname','times');
set(gca,'xscale','log');
title('Turbulent diffusivity');
legend('A','B','C','D','E','F');

