fig7_article.m 1.7 KB
clear all;
close all;





for i=1:1000
    
    
    dossier=['thickhstp',num2str(i-1)];
   path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];
   Dave=ncread(path,'Dave');
   x=ncread(path,'x_axis');

   Lmiz(i)=length(find(Dave>0 & Dave<396))*(x(2)-x(1));
  
 
  i
   
end

hs=[0.2 0.4 0.8 1 1.5 2 2.5 3 3.5 4];
tp=[6 7 8 9 10 11 12 13 14 15];
a=0;
b=0;
for i=1:10
   a=b+1;
   b=b+100;
   
   Lmiz1(:,:,i)=reshape(Lmiz(a:b),10,10);

end

c=[2 5 8];
fig=figure;
fig.Units='inches';
fig.Position=[3.6250 7.7812 8.0312 2.2083];
fig.OuterPosition=[3.6250 7.7812 8.0312 3.2083];

fig.PaperUnits = 'inches';
fig.PaperPosition = [0 0 8.0312 2.2083];
fig.PaperPositionMode = 'manual';
fig.PaperOrientation='Portrait';
fig.PaperSize=[8.0312 2.2083];

 cm=colormap('jet');
cm1(1,:)=[1 1 1];
for i=2:10
    cm1(i,:)=[1-0.08*i 1-0.06*i 1];
end
cmap(1:10,:)=cm1;
cmap(11:59,:)=cm(16:end,:);

titre=['$h_{\mathrm{ice}}=$ 1m  ';'$h_{\mathrm{ice}}=$ 2.5m';'$h_{\mathrm{ice}}$= 3.5m'];
titre=cellstr(titre);
for i=1:3
    subplot(1,3,i)
pcolor(tp,hs,Lmiz1(:,:,c(i)))
hold on
contour(tp,hs,Lmiz1(:,:,c(i)),[50 100 200 300 450],'color','k','showtext','on','linestyle',':','Linewidth',1.5)
shading interp
xlabel('$T_p$[s]','interpreter','Latex','Fontsize',10)
if i==1
ylabel('$H_s$[m]','interpreter','Latex','Fontsize',10)
end
p=gca;
if i==1
p.Position(1)=p.Position(1)-0.05;
end
if i>1
p.Position(1)=p.Position(1)-0.07;
end
p.Position(2)=p.Position(2)+0.08;
p.Position(4)=p.Position(4)-0.13;

colormap(cmap)
caxis([0 500])

t=title(char(titre(i)));
 set(t,'interpreter','Latex','Fontsize',10)
end

col=colorbar;
set(col,'position',[0.86 p.Position(2) 0.03 p.Position(end)])
ylabel(col,'$L_{MIZ}$ [km]','interpreter','Latex','Fontsize',10)