Commit 49b4c29c89d18f74d9654b90edc62c62f2b3f4d0

Authored by Jérémy Baudry
1 parent 39385008
Exists in master

clean matlab scripts

WIM deleted
No preview for this file type
scripts_matlab/adimentionnal_number.m deleted
... ... @@ -1,69 +0,0 @@
1   -
2   -clear all;
3   -close all;
4   -
5   -
6   -fig=figure;
7   -
8   -% fig.Units='inches';
9   -% fig.Position=[6 6 9 3.2];
10   -% fig.OuterPosition=[6 6 9 3.2];
11   -%
12   -% fig.PaperUnits = 'inches';
13   -% fig.PaperPosition = [0 0 9 3.2];
14   -% fig.PaperPositionMode = 'manual';
15   -% fig.PaperOrientation='landscape';
16   -% fig.PaperSize=[9 3.2];
17   -%
18   -
19   -
20   -for n=3
21   -titre1=['10^{-6}';'10^{-4}';'10^{-3}';'10^{-2}'];
22   -titre2=cellstr(titre1);
23   -
24   -dos1=['1e6 ';'1e4 ';'test ';'1e2 '];
25   -dos2=cellstr(dos1);
26   -
27   -
28   -dossier=[num2str(n),'mu1';num2str(n),'mu2';num2str(n),'mu3';dos2(n);num2str(n),'mu4'];
29   -dossier=cellstr(dossier);
30   -
31   -
32   -diffus=['1e-2_uniforme'];
33   -
34   -mix=[1e-6 1e-4 1e-3 1e-2];
35   -mu=[0.5 1 1.5 2 2.5]/86400;
36   -
37   -col=['mo';'ro';'bo';'ko'];
38   -col=cellstr(col);
39   -
40   -for i=1:5
41   -dos=char(dossier(i));
42   -
43   -number(:,n)=sqrt(mu/mix(n));
44   -
45   -
46   -lagbiomass=load(['~/projets/correction_memo/output/',dos,'/weight_',diffus,'.dat']);
47   -eulbiomass=load(['~/projets/correction_memo/output/',dos,'/eulerian_',diffus,'.dat']);
48   -
49   -biolag_tot=sum(lagbiomass,2)*0.5;
50   -bioeul_tot=sum(eulbiomass,2)*0.5;
51   -
52   -std=sqrt((biolag_tot-bioeul_tot).^2./bioeul_tot.^2)*100;
53   -std(1:3)=0;
54   -
55   -maxstd(i,n)=max(std);
56   -maxbio(i,n)=max(biolag_tot);
57   -
58   -
59   -plot(std)
60   -hold on
61   -
62   -end
63   -
64   -end
65   -
66   -
67   -
68   -
69   -
scripts_matlab/anim_joint_distribution.m deleted
... ... @@ -1,99 +0,0 @@
1   -clear all;
2   -close all;
3   -
4   -
5   -dossier=['temp1'];
6   -path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];
7   -
8   -x=ncread(path,'x_axis');
9   -t=ncread(path,'time');
10   -om=ncread(path,'omega');
11   -spectre=ncread(path,'Spectrum');
12   -Dave=ncread(path,'Dave');
13   -Dmax=ncread(path,'Dmax');
14   -FSD=ncread(path,'Floe size distribution');
15   -Fsize=ncread(path,'floe size');
16   -thick=ncread(path,'Ice thickness');
17   -conc=ncread(path,'Ice concentration');
18   -Hs=ncread(path,'significant height');
19   -IDT=ncread(path,'Ice Thickness Distribution');
20   -hcat=ncread(path,'thickness categories');
21   -
22   -
23   -fig=figure(1);
24   -u = fig.Units;
25   -fig.Units = 'inches';
26   -set(fig,'outerposition',[3 3 12 10])
27   -
28   -cm=colormap('jet');
29   -
30   -
31   -cm1(1,:)=[1 1 1];
32   -for i=2:10
33   - cm1(i,:)=[1-0.08*i 1-0.06*i 1];
34   -end
35   -cmap(1:10,:)=cm1;
36   -cmap(11:59,:)=cm(16:end,:);
37   -
38   -
39   - w = waitforbuttonpress;
40   -%figure
41   -%filename = 'joint_distribution_anim.gif';
42   -
43   -for j=1:length(t)
44   -
45   -FSD1=reshape(FSD(j,j,:,:),length(Fsize),length(hcat));
46   -
47   -IDT1=IDT(j,:);
48   -for i=1:length(hcat)
49   - FSD1(:,i)=FSD1(:,i)*IDT1(i);
50   - nfloe(:,i)=((FSD1(:,i)*(5000)^2)./Fsize.^2) ;
51   -end
52   - nfloe=nfloe/sum(sum(nfloe));
53   -FSD2(j,:)=sum(FSD1,2);
54   -
55   -subplot(2,2,1)
56   -hh=surf(hcat,Fsize,nfloe);
57   - shading interp
58   -%
59   -zoom(1.5)
60   -caxis([0 0.06])
61   -
62   -colormap(cmap)
63   - axis([0.1 10 0 400 0 0.1])
64   - view(108,60)
65   -
66   - xlabel('Ice thickness [m]')
67   - ylabel('Floe size [m]')
68   - zlabel('area fraction')
69   - subplot(2,2,2)
70   -nfloe2=((FSD2(j,:)*5000^2)./Fsize.^2')/sum((FSD2(j,:)*5000^2)./Fsize.^2');
71   - plot((Fsize),nfloe2)
72   -
73   - axis([0 400 0 1])
74   - xlabel('Floe size [m]')
75   - ylabel('normalized number of floe')
76   -
77   - subplot(2,2,3:4)
78   - plot(x,thick)
79   - hold on
80   - plot(x(j),thick(j),'ro','markerfacecolor','r')
81   - hold off
82   - xlabel('distance [km]')
83   - ylabel('Average ice thickness [m]')
84   -%pause(0.02)
85   - w = waitforbuttonpress;
86   -
87   -% drawnow
88   -% frame = getframe(1);
89   -% im = frame2im(frame);
90   -% [A,map] = rgb2ind(im,256);
91   -% if j == 1;
92   -% imwrite(A,map,filename,'gif','LoopCount',Inf,'DelayTime',0);
93   -% else
94   -% imwrite(A,map,filename,'gif','WriteMode','append','DelayTime',0);
95   -% end
96   -end
97   -
98   -
99   -
scripts_matlab/data_treatment.m deleted
... ... @@ -1,154 +0,0 @@
1   -clear all;
2   -close all;
3   -
4   -
5   -x=ncread('simulation1.nc','x_axis');
6   -t=ncread('simulation1.nc','time');
7   -om=ncread('simulation1.nc','omega');
8   -spectre=ncread('simulation1.nc','Spectrum');
9   -Dave=ncread('simulation1.nc','Dave');
10   -Dmax=ncread('simulation1.nc','Dmax');
11   -FSD=ncread('simulation1.nc','Floe size distribution');
12   -Fsize=ncread('simulation1.nc','floe size');
13   -thick=ncread('simulation1.nc','Ice thickness');
14   -conc=ncread('simulation1.nc','Ice concentration');
15   -Hs=ncread('simulation1.nc','significant height');
16   -IDT=ncread('simulation1.nc','Ice Thickness Distribution');
17   -hcat=ncread('simulation1.nc','thickness categories');
18   -
19   -
20   -
21   -f=om/(2*pi);
22   -E=reshape(spectre(end,end,:),length(om),1);
23   -Ei=reshape(spectre(30,:,:),length(x),length(om));
24   -E1=reshape(spectre(1,1,:),length(om),1);
25   -
26   -for i=1:length(f)
27   - thick2D(:,i)=thick;
28   -end
29   -thick2D(:,1)=0;
30   -thick2D(:,end)=0;
31   -thick2D(end,:)=0;
32   -
33   -
34   -
35   -fig=figure(1);
36   -u = fig.Units;
37   -fig.Units = 'inches';
38   -set(fig,'outerposition',[3 3 12 7])
39   -
40   -
41   -cm=colormap('jet');
42   -
43   -
44   -cm1(1,:)=[1 1 1];
45   -for i=2:10
46   - cm1(i,:)=[1-0.08*i 1-0.06*i 1];
47   -end
48   -cmap(1:10,:)=cm1;
49   -cmap(11:59,:)=cm(16:end,:);
50   -
51   -
52   -
53   -filename = 'spectrum_attenuation_anim.gif';
54   - % w = waitforbuttonpress;
55   -for i=1:length(t)
56   -
57   - figure(1)
58   -
59   -
60   -
61   - h2=surf(f,x,thick2D*0.05);
62   - view(-56,22)
63   -hold on
64   -
65   - sp=reshape(spectre(i,:,:),length(x),length(om));
66   - h=surf(f,x,sp);
67   - view(-56,22)
68   - colormap(jet)
69   - % caxis([-0.1 0.2])
70   -
71   - shading interp
72   - set(h2,'Facealpha',0.3,'facecolor',[0.9 0.9 0.9])
73   - ll=light;
74   - set(ll,'position',[0.25 -20 0.4])
75   - lighting phong
76   - axis([min(f) max(f) min(x) max(x) 0 max(E1)])
77   - xlabel('Frequency [s^{-1}]')
78   - zlabel('Energy')
79   - hold off
80   - ylabel('x [km]')
81   -% pause(0.001)
82   -%w = waitforbuttonpress;
83   -drawnow
84   -frame = getframe(1);
85   -im = frame2im(frame);
86   -[A,map] = rgb2ind(im,256);
87   - if i == 1;
88   - imwrite(A,map,filename,'gif','LoopCount',Inf,'DelayTime',0);
89   - else
90   - imwrite(A,map,filename,'gif','WriteMode','append','DelayTime',0);
91   - end
92   -
93   -end
94   -%
95   -%
96   -% for i=1:size(Hs,1)
97   -%
98   -% hs2(i)=Hs(i,i);
99   -% end
100   -%
101   -% figure
102   -% subplot(4,4,1:4)
103   -% [ax,p1,p2] = plotyy(x,thick,x,conc,'plot','plot');
104   -%
105   -% ylabel(ax(1),'Ice thickness [m]')
106   -% ylabel(ax(2),'Ice concentration')
107   -% hold on
108   -% line1=line([55 55], ylim);
109   -% line2=line([150 150], ylim);
110   -% line3=line([250 250], ylim);
111   -% line4=line([400 400], ylim);
112   -% set(line1,'color','k','linestyle','--')
113   -% set(line2,'color','k','linestyle','--')
114   -% set(line3,'color','k','linestyle','--')
115   -% set(line4,'color','k','linestyle','--')
116   -%
117   -%
118   -% subplot(4,4,5:8)
119   -%
120   -% plot(x,hs2)
121   -%
122   -% ylabel('Hs [m]')
123   -%
124   -%
125   -% subplot(4,4,9)
126   -% fsd1=reshape(FSD(:,find(x==55),:),size(FSD,1),length(Fsize));
127   -% fsd1=fsd1';
128   -% plot(Fsize,fsd1(:,find(x==55)),'-')
129   -% xlabel('Floe size [m]')
130   -% ylabel('area fraction')
131   -% subplot(4,4,10)
132   -% fsd1=reshape(FSD(:,find(x==150),:),size(FSD,1),length(Fsize));
133   -% fsd1=fsd1';
134   -% plot(Fsize,fsd1(:,find(x==150)),'-')
135   -% xlabel('Floe size [m]')
136   -%
137   -% subplot(4,4,11)
138   -% fsd1=reshape(FSD(:,find(x==250),:),size(FSD,1),length(Fsize));
139   -% fsd1=fsd1';
140   -% plot(Fsize,fsd1(:,find(x==250)),'-')
141   -% xlabel('Floe size [m]')
142   -%
143   -% subplot(4,4,12)
144   -% fsd1=reshape(FSD(:,find(x==400),:),size(FSD,1),length(Fsize));
145   -% fsd1=fsd1';
146   -% plot(Fsize,fsd1(:,find(x==400)),'-')
147   -% xlabel('Floe size [m]')
148   -%
149   -% subplot(4,4,13:16)
150   -% plot(x,Dave)
151   -% xlabel('Distance [km]')
152   -% ylabel('<D> [m]')
153   -% saveas(gcf,'new_model.png')
154   -%
scripts_matlab/fig2_article.m deleted
... ... @@ -1,41 +0,0 @@
1   -clear all;
2   -close all;
3   -
4   -
5   -
6   -fig=figure;
7   -
8   -fig.Units='inches';
9   -fig.Position=[7.0312 6.6875 4.0312 3.3021];
10   -fig.OuterPosition=[7.0312 6.6875 4.0312 4.3021];
11   -
12   -fig.PaperUnits = 'inches';
13   -fig.PaperPosition = [0 0 4.0312 3.3021];
14   -fig.PaperPositionMode = 'manual';
15   -fig.PaperOrientation='landscape';
16   -fig.PaperSize=[4.0312 3.3021];
17   -
18   -
19   -strain=[0:1e-6:3e-4];
20   -prob=exp(-2*3e-5^2./strain.^2);
21   -
22   -
23   - plot(strain(find(prob<0.37)),prob(find(prob<0.37)),'k--','linewidth',1.5)
24   -hold on
25   -plot(strain(find(prob>0.37)),prob(find(prob>0.37)),'k-','linewidth',1.5)
26   -
27   -a=xlabel('$E_s$');
28   -b=ylabel('$P_{\varepsilon}=P(E_w>\varepsilon_c)$');
29   -set(a,'interpreter','latex','fontsize',11)
30   -set(b,'interpreter','latex','fontsize',11)
31   -
32   -scrit=3e-5;
33   -probcrit=0.37;
34   -plot(xlim,[probcrit probcrit])
35   -plot([scrit scrit],ylim)
36   -c=text(1.5e-4,0.4,'$P_c$');
37   -d=text(3.5e-5,0.65,'$\varepsilon_c$');
38   -set(c,'interpreter','latex','fontsize',11)
39   -set(d,'interpreter','latex','rotation',90,'fontsize',11)
40   -
41   -saveas(fig,'Pe_Es','pdf')
scripts_matlab/fig3_article.m deleted
... ... @@ -1,96 +0,0 @@
1   -clear all;
2   -close all;
3   -
4   -
5   -dossier=['fig1_1'];
6   -path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];
7   -
8   -
9   -Fsize=ncread(path,'floe size');
10   -strain1=load('/home/bauj0001/projets/WIM/output/strain1.dat');
11   -beta1=load('/home/bauj0001/projets/WIM/output/beta1.dat');
12   -Q1=load('/home/bauj0001/projets/WIM/output/Q1.dat');
13   -
14   -strain2=load('/home/bauj0001/projets/WIM/output/strain2.dat');
15   -beta2=load('/home/bauj0001/projets/WIM/output/beta2.dat');
16   -Q2=load('/home/bauj0001/projets/WIM/output/Q2.dat');
17   -
18   -strain3=load('/home/bauj0001/projets/WIM/output/strain3.dat');
19   -beta3=load('/home/bauj0001/projets/WIM/output/beta3.dat');
20   -Q3=load('/home/bauj0001/projets/WIM/output/Q3.dat');
21   -
22   -Lmin=pi*0.5*((5e6*2^3)/(3*10*(1-0.3^2)))^0.25;
23   -Lmin=Lmin*2;
24   -wavelength=Fsize*2;
25   -
26   -
27   -fig=figure;
28   -
29   -fig.Units='inches';
30   -fig.Position=[7.4167 2.0833 2.9583 5.5312];
31   -fig.OuterPosition=[7.4167 2.0833 2.9583 6.5312];
32   -
33   -fig.PaperUnits = 'inches';
34   -fig.PaperPosition = [0 0 2.9583 5.5312];
35   -fig.PaperPositionMode = 'manual';
36   -fig.PaperOrientation='landscape';
37   -fig.PaperSize=[2.9583 5.5312];
38   -
39   -
40   -
41   -
42   -subplot(3,1,1)
43   -plot(wavelength(find(wavelength>Lmin)),strain1(find(wavelength>Lmin)),'color',[0.1 0.1 0.1],'linewidth',1.5)
44   -hold on
45   -plot(wavelength(find(wavelength>Lmin)),strain2(find(wavelength>Lmin)),'color',[0.5 0.5 0.5],'linewidth',1.5)
46   -plot(wavelength(find(wavelength>Lmin)),strain3(find(wavelength>Lmin)),'color',[0.8 0.8 0.8],'linewidth',1.5)
47   -a=ylabel('$E_s$');
48   -b=xlabel('$\lambda_{\mathrm{ice}}$ [m]');
49   -set(a,'interpreter','latex')
50   -set(b,'interpreter','latex')
51   -c=legend('Hs=0.1 m','Hs=0.5 m ','Hs=1 m');
52   -set(c,'box','off')
53   -hold on
54   -plot([Lmin Lmin],ylim,'color',[0.85 0.325 0.098])
55   -e=plot(wavelength(find(wavelength<Lmin)),strain1(find(wavelength<Lmin)),'color',[0.1 0.1 0.1],'linewidth',1.5);
56   -set(e,'linestyle',':')
57   -f=plot(wavelength(find(wavelength<Lmin)),strain2(find(wavelength<Lmin)),'color',[0.5 0.5 0.5],'linewidth',1.5);
58   -set(f,'linestyle',':')
59   -g=plot(wavelength(find(wavelength<Lmin)),strain3(find(wavelength<Lmin)),'color',[0.8 0.8 0.8],'linewidth',1.5);
60   -set(g,'linestyle',':')
61   -j=text(55,2e-3,'$\lambda_{MIN}$');
62   -set(j,'interpreter','latex','rotation',90)
63   -
64   -
65   -subplot(3,1,2)
66   -plot(Fsize,Q1,'color',[0.1 0.1 0.1],'linewidth',1.5)
67   -hold on
68   -plot(Fsize,Q2,'color',[0.5 0.5 0.5],'linewidth',1.5)
69   -plot(Fsize,Q3,'color',[0.8 0.8 0.8],'linewidth',1.5)
70   -a=ylabel('$Q$');
71   -b=xlabel('Floe size $l$ [m]');
72   -set(a,'interpreter','latex')
73   -set(b,'interpreter','latex')
74   -
75   -subplot(3,1,3)
76   -plot(Fsize,beta1(end,:),'color',[0.1 0.1 0.1],'linewidth',1.5)
77   -hold on
78   -plot(Fsize,beta2(end,:),'color',[0.5 0.5 0.5],'linewidth',1.5)
79   -plot(Fsize,beta3(end,:),'color',[0.8 0.8 0.8],'linewidth',1.5)
80   -a=ylabel('$\beta(l=400,l'')$');
81   -b=xlabel('Floe size $l$ [m]');
82   -set(a,'interpreter','latex')
83   -set(b,'interpreter','latex')
84   -
85   -saveas(fig,'test','pdf')
86   -
87   -
88   -
89   -
90   -
91   -
92   -
93   -
94   -
95   -
96   -
scripts_matlab/fig4_article.m deleted
... ... @@ -1,66 +0,0 @@
1   -clear all;
2   -close all;
3   -
4   -
5   -dossier=['wavenumber'];
6   -path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];
7   -
8   -x=ncread(path,'x_axis');
9   -t=ncread(path,'time');
10   -om=ncread(path,'omega');
11   -spectre=ncread(path,'Spectrum');
12   -Dave=ncread(path,'Dave');
13   -Dmax=ncread(path,'Dmax');
14   -FSD=ncread(path,'Floe size distribution');
15   -Fsize=ncread(path,'floe size');
16   -thick=ncread(path,'Ice thickness');
17   -conc=ncread(path,'Ice concentration');
18   -Hs=ncread(path,'significant height');
19   -IDT=ncread(path,'Ice Thickness Distribution');
20   -hcat=ncread(path,'thickness categories');
21   -
22   -
23   -
24   -
25   -
26   -cm=colormap('jet');
27   -
28   -
29   -cm1(1,:)=[1 1 1];
30   -for i=2:10
31   - cm1(i,:)=[1-0.08*i 1-0.06*i 1];
32   -end
33   -cmap(1:10,:)=cm1;
34   -cmap(11:59,:)=cm(16:end,:);
35   - alphmap=ones(63,1);
36   -alphmap(1)=0;
37   -
38   -
39   -
40   -xx=[55 70 80 100 200];
41   -for j=1:5
42   -FSD1=reshape(FSD(find(x==xx(j)),find(x==xx(j)),:,:),length(Fsize),length(hcat));
43   -
44   -IDT1=IDT(find(x==xx(j)),:);
45   -for i=1:length(hcat)
46   - FSD1(:,i)=FSD1(:,i)*IDT1(i);
47   - nfloe(:,i)=((FSD1(:,i)*(5000)^2)./Fsize.^2) ;
48   -end
49   -nfloe=nfloe/sum(sum(nfloe));
50   -
51   -subplot(1,5,j)
52   -pcolor(hcat,Fsize,nfloe)
53   -shading interp
54   -
55   -colormap(cmap)
56   -hold on
57   -alphamap(alphmap)
58   -xlabel('thickness')
59   -ylabel('floe size')
60   -zlabel('Distance')
61   -end
62   -
63   -
64   -
65   -
66   -
scripts_matlab/fig5_article.m deleted
... ... @@ -1,42 +0,0 @@
1   -clear all;
2   -close all;
3   -
4   -
5   -
6   -fig=figure;
7   -
8   -fig.Units='inches';
9   -fig.Position=[7.0729 5.6146 5.8333 4.3750];
10   -fig.OuterPosition=[7.0729 5.6146 5.8333 5.3750];
11   -
12   -fig.PaperUnits = 'inches';
13   -fig.PaperPosition = [0 0 5.8333 4.3750];
14   -fig.PaperPositionMode = 'manual';
15   -fig.PaperOrientation='landscape';
16   -fig.PaperSize=[5.8333 4.3750];
17   -
18   -
19   -
20   -for i=1:100
21   -
22   -
23   - dossier=['thickhs',num2str(i-1)];
24   - path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];
25   - Dave=ncread(path,'Dave');
26   - x=ncread(path,'x_axis');
27   -
28   - Lmiz(i)=length(find(Dave>0 & Dave<396))*(x(2)-x(1));
29   -
30   -
31   -
32   -
33   -end
34   -
35   -Lmiz=reshape(Lmiz,10,10);
36   -for i=1:10
37   - plot(hs,Lmiz(:,i))
38   - hold on
39   -end
40   -
41   -
42   -
scripts_matlab/fig7_article.m deleted
... ... @@ -1,88 +0,0 @@
1   -clear all;
2   -close all;
3   -
4   -
5   -
6   -
7   -
8   -for i=1:1000
9   -
10   -
11   - dossier=['thickhstp',num2str(i-1)];
12   - path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];
13   - Dave=ncread(path,'Dave');
14   - x=ncread(path,'x_axis');
15   -
16   - Lmiz(i)=length(find(Dave>0 & Dave<396))*(x(2)-x(1));
17   -
18   -
19   - i
20   -
21   -end
22   -
23   -hs=[0.2 0.4 0.8 1 1.5 2 2.5 3 3.5 4];
24   -tp=[6 7 8 9 10 11 12 13 14 15];
25   -a=0;
26   -b=0;
27   -for i=1:10
28   - a=b+1;
29   - b=b+100;
30   -
31   - Lmiz1(:,:,i)=reshape(Lmiz(a:b),10,10);
32   -
33   -end
34   -
35   -c=[2 5 8];
36   -fig=figure;
37   -fig.Units='inches';
38   -fig.Position=[3.6250 7.7812 8.0312 2.2083];
39   -fig.OuterPosition=[3.6250 7.7812 8.0312 3.2083];
40   -
41   -fig.PaperUnits = 'inches';
42   -fig.PaperPosition = [0 0 8.0312 2.2083];
43   -fig.PaperPositionMode = 'manual';
44   -fig.PaperOrientation='Portrait';
45   -fig.PaperSize=[8.0312 2.2083];
46   -
47   - cm=colormap('jet');
48   -cm1(1,:)=[1 1 1];
49   -for i=2:10
50   - cm1(i,:)=[1-0.08*i 1-0.06*i 1];
51   -end
52   -cmap(1:10,:)=cm1;
53   -cmap(11:59,:)=cm(16:end,:);
54   -
55   -titre=['$h_{\mathrm{ice}}=$ 1m ';'$h_{\mathrm{ice}}=$ 2.5m';'$h_{\mathrm{ice}}$= 3.5m'];
56   -titre=cellstr(titre);
57   -for i=1:3
58   - subplot(1,3,i)
59   -pcolor(tp,hs,Lmiz1(:,:,c(i)))
60   -hold on
61   -contour(tp,hs,Lmiz1(:,:,c(i)),[50 100 200 300 450],'color','k','showtext','on','linestyle',':','Linewidth',1.5)
62   -shading interp
63   -xlabel('$T_p$[s]','interpreter','Latex','Fontsize',10)
64   -if i==1
65   -ylabel('$H_s$[m]','interpreter','Latex','Fontsize',10)
66   -end
67   -p=gca;
68   -if i==1
69   -p.Position(1)=p.Position(1)-0.05;
70   -end
71   -if i>1
72   -p.Position(1)=p.Position(1)-0.07;
73   -end
74   -p.Position(2)=p.Position(2)+0.08;
75   -p.Position(4)=p.Position(4)-0.13;
76   -
77   -colormap(cmap)
78   -caxis([0 500])
79   -
80   -t=title(char(titre(i)));
81   - set(t,'interpreter','Latex','Fontsize',10)
82   -end
83   -
84   -col=colorbar;
85   -set(col,'position',[0.86 p.Position(2) 0.03 p.Position(end)])
86   -ylabel(col,'$L_{MIZ}$ [km]','interpreter','Latex','Fontsize',10)
87   -
88   -
scripts_matlab/fig8_article.m deleted
... ... @@ -1,70 +0,0 @@
1   -clear all;
2   -close all;
3   -
4   -
5   -for i=1:100
6   -
7   -
8   - dossier=['pc_ec',num2str(i-1)];
9   - path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];
10   - Dave=ncread(path,'Dave');
11   -
12   - x=ncread(path,'x_axis');
13   -
14   - Lmiz(i)=length(find(Dave>0 & Dave<396))*(x(2)-x(1));
15   -
16   - i
17   -
18   -end
19   -
20   -Lmiz2=reshape(Lmiz,10,10);
21   -Ec=[3e-5 4e-5 5e-5 6e-5 7e-5 8e-5 9e-5 1e-4 2e-4 3e-4];
22   -
23   -legende=['$P_c=0.10$';'$P_c=0.15$';'$P_c=0.20$';'$P_c=0.25$';'$P_c=0.30$'...
24   - ;'$P_c=0.35$';'$P_c=0.40$';'$P_c=0.45$';'$P_c=0.50$';'$P_c=0.55$'];
25   -legende=cellstr(legende);
26   -
27   -cmap=jet(10);
28   -M=['*','o','+','*','o','+','*','o','+','*'];
29   -
30   -
31   -
32   -fig=figure;
33   -
34   -fig.Units='inches';
35   -fig.Position=[7.0729 6.7396 4.2708 2.600];
36   -fig.OuterPosition=[7.0729 6.7396 4.2708 3.600];
37   -
38   -fig.PaperUnits = 'inches';
39   -fig.PaperPosition = [0 0 4.2708 2.600];
40   -fig.PaperPositionMode = 'manual';
41   -fig.PaperOrientation='landscape';
42   -fig.PaperSize=[4.2708 2.600];
43   -
44   -
45   -for i=1:10
46   -
47   -
48   - plot(Ec,Lmiz2(i,:),'color',cmap(i,:),'Marker',M(i));
49   - hold on
50   -
51   -end
52   - xlabel('$\varepsilon_c$','interpreter','latex')
53   - ylabel('$L_{MIZ}$ [km]','interpreter','latex')
54   - a=gca;
55   -% a.Position(2)=a.Position(2)+0.2;
56   -% a.Position(3)=a.Position(3)-0.2;
57   -% a.Position(4)=a.Position(4)-0.2;
58   -
59   -
60   - l=legend(char(legende));
61   - set(l,'interpreter','latex','Box','off','location','eastoutside');
62   -
63   -
64   -
65   -
66   -
67   -
68   -
69   -
70   -
71 0 \ No newline at end of file
scripts_matlab/fig_strain.m deleted
... ... @@ -1,68 +0,0 @@
1   -clear all;
2   -close all;
3   -
4   -
5   -
6   -
7   -kice=load('kice.dat');
8   -dossier=['wavenumber'];
9   -path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];
10   -hcat=ncread(path,'thickness categories');
11   -om=ncread(path,'omega');
12   -
13   -
14   -fig=figure;
15   -
16   -fig.Units='inches';
17   -fig.Position=[7.0312 7.9479 5.3125 2.0417];
18   -fig.OuterPosition=[7.0312 7.9479 5.3125 3.0417];
19   -
20   -fig.PaperUnits = 'inches';
21   -fig.PaperPosition = [0 0 5.3125 2.0417];
22   -fig.PaperPositionMode = 'manual';
23   -fig.PaperOrientation='landscape';
24   -fig.PaperSize=[5.3125 2.0417];
25   -
26   -
27   -
28   -subplot(1,2,1)
29   -W=9.81*kice(:,20)/om(20);
30   -strain=hcat*0.5.*kice(:,20).^2.*W;
31   -plot(hcat,strain,'color',[0.1 0.1 0.1],'linewidth',1.5)
32   -wl(1)=2*pi/(om(20)^2/9.81);
33   -hold on
34   -
35   -W=9.81*kice(:,50)/om(50);
36   -strain=hcat*0.5.*kice(:,50).^2.*W;
37   -plot(hcat,strain,'color',[0.5 0.5 0.5],'linewidth',1.5)
38   -wl(2)=2*pi/(om(50)^2/9.81);
39   -hold on
40   -
41   -W=9.81*kice(:,100)/om(100);
42   -strain=hcat*0.5.*kice(:,100).^2.*W;
43   -plot(hcat,strain,'color',[0.8 0.8 0.8],'linewidth',1.5)
44   -wl(3)=2*pi/(om(100)^2/9.81);
45   -xlabel('Ice thickness [m]','interpreter','latex')
46   -ylabel('E','interpreter','latex')
47   -legende=['$\lambda_{W}=$ 225m';'$\lambda_{W}=$ 85m ';'$\lambda_{W}=$ 30m '];
48   -l=legend(legende);
49   -set(l,'interpreter','latex')
50   -set(l,'box','off')
51   -
52   -
53   -subplot(1,2,2)
54   -wl2=2*pi./kice(:,20);
55   -plot(hcat,wl2,'color',[0.1 0.1 0.1],'linewidth',1.5)
56   -hold on
57   -
58   -wl2=2*pi./kice(:,50);
59   -plot(hcat,wl2,'color',[0.5 0.5 0.5],'linewidth',1.5)
60   -hold on
61   -
62   -wl2=2*pi./kice(:,100);
63   -plot(hcat,wl2,'color',[0.8 0.8 0.8],'linewidth',1.5)
64   -hold on
65   -
66   -xlabel('Ice thickness [m]','interpreter','latex')
67   -y2=ylabel('$\lambda_{ice}$ [m]','interpreter','latex');
68   -
scripts_matlab/figure_dany.m deleted
... ... @@ -1,219 +0,0 @@
1   -clear all;
2   -close all;
3   -
4   -
5   -dossier=['wavenumber'];
6   -path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];
7   -
8   -x=ncread(path,'x_axis');
9   -t=ncread(path,'time');
10   -om=ncread(path,'omega');
11   -spectre=ncread(path,'Spectrum');
12   -Dave=ncread(path,'Dave');
13   -Dmax=ncread(path,'Dmax');
14   -FSD=ncread(path,'Floe size distribution');
15   -Fsize=ncread(path,'floe size');
16   -thick=ncread(path,'Ice thickness');
17   -conc=ncread(path,'Ice concentration');
18   -Hs=ncread(path,'significant height');
19   -IDT=ncread(path,'Ice Thickness Distribution');
20   -hcat=ncread(path,'thickness categories');
21   -
22   -
23   -
24   - for i=1:size(Hs,1)
25   -
26   - hs2(i)=Hs(i,i);
27   - end
28   -
29   -
30   -
31   -
32   -fig=figure;
33   -fig.Units='inches';
34   -fig.Position=[7.1042 3.2708 4.6458 6.2812];
35   -fig.OuterPosition=[7.1042 3.2708 4.6458 7.2812];
36   -
37   -fig.PaperUnits = 'inches';
38   -fig.PaperPosition = [0 0 4.6458 6.2812];
39   -fig.PaperPositionMode = 'manual';
40   -fig.PaperOrientation='Portrait';
41   -fig.PaperSize=[4.6458 6.2812];
42   -
43   -
44   - cm=colormap('jet');
45   -
46   -
47   -cm1(1,:)=[1 1 1];
48   -for i=2:10
49   - cm1(i,:)=[1-0.08*i 1-0.06*i 1];
50   -end
51   -cmap(1:10,:)=cm1;
52   -cmap(11:59,:)=cm(16:end,:);
53   -
54   -
55   -
56   -
57   -
58   - %----------------------------------------------------
59   -ax1= subplot(4,4,1:4);
60   -[ax,p1,p2] = plotyy(x,thick,x,conc,'plot','plot');
61   -
62   -set(p2,'color',[0.1 0.1 0.1],'linewidth',1.5)
63   -% ylabel(ax(1),'<ice thickness> [m]')
64   -% label2=ylabel(ax(2),'Ice concentration');
65   -hold on
66   -
67   -
68   -line1=line([55 55], ylim);
69   -line2=line([150 150], ylim);
70   -line3=line([250 250], ylim);
71   -line4=line([350 350], ylim);
72   -set(line1,'color','k','linestyle','--')
73   -set(line2,'color','k','linestyle','--')
74   -set(line3,'color','k','linestyle','--')
75   -set(line4,'color','k','linestyle','--')
76   -
77   -set(ax(1),'xticklabel',{})
78   -ax1.Position(2)=ax1.Position(2)+0.06;
79   -ax1.Position(3)=ax1.Position(3)-0.1;
80   -ax1.Position(4)=ax1.Position(4)-0.01;
81   -%-----------------------------------------------------
82   -
83   -
84   -
85   -ax2=subplot(4,4,5:8);
86   -
87   - p3=plot(x,hs2,'color',[0.1 0.1 0.1],'linewidth',1.5);
88   -hold on
89   -
90   -line1=line([55 55], ylim);
91   -line2=line([150 150], ylim);
92   -line3=line([250 250], ylim);
93   -line4=line([350 350], ylim);
94   -set(line1,'color','k','linestyle','--')
95   -set(line2,'color','k','linestyle','--')
96   -set(line3,'color','k','linestyle','--')
97   -set(line4,'color','k','linestyle','--')
98   -
99   - ylabel('Hs [m]')
100   -
101   -
102   -
103   -set(ax2,'xticklabel',{})
104   -ax2.Position(2)=ax2.Position(2)+0.1;
105   -ax2.Position(3)=ax2.Position(3)-0.1;
106   -ax2.Position(4)=ax2.Position(4)-0.01;
107   -
108   -
109   -
110   -%------------------------------------------------------
111   - ax3=subplot(4,4,9:12);
112   - p4=plot(x,Dave,'color',[0.1 0.1 0.1],'linewidth',1.5);
113   - xlabel('Distance [km]')
114   - ylabel('<D> [m]')
115   -hold on
116   -
117   -line1=line([55 55], ylim);
118   -line2=line([150 150], ylim);
119   -line3=line([250 250], ylim);
120   -line4=line([350 350], ylim);
121   -set(line1,'color','k','linestyle','--')
122   -set(line2,'color','k','linestyle','--')
123   -set(line3,'color','k','linestyle','--')
124   -set(line4,'color','k','linestyle','--')
125   -
126   -ax3.Position(2)=ax3.Position(2)+0.13;
127   -ax3.Position(3)=ax3.Position(3)-0.1;
128   -ax3.Position(4)=ax3.Position(4)-0.01;
129   -
130   -
131   -
132   -%-------------------------------------------------------
133   -
134   - ax4=subplot(4,4,13);
135   -FSD1=reshape(FSD(find(x==55),find(x==55),:,:),length(Fsize),length(hcat));
136   -
137   -IDT1=IDT(find(x==55),:);
138   -for i=1:length(hcat)
139   - FSD1(:,i)=FSD1(:,i)*IDT1(i);
140   - nfloe(:,i)=((FSD1(:,i)*(5000)^2)./Fsize.^2) ;
141   -end
142   -nfloe=nfloe/sum(sum(nfloe));
143   -
144   - hh=pcolor(hcat,Fsize,nfloe);
145   - shading interp
146   -
147   -colormap(cmap)
148   -
149   - b=ylabel('Floe size [m]');
150   -
151   -% ax3.Position(2)=ax3.Position(2)+0.13;
152   -ax4.Position(3)=ax4.Position(3)+0.05;
153   -ax4.Position(4)=ax4.Position(4)+0.01;
154   -
155   -
156   - %-----------------------------------------------------
157   -
158   - for i=1:100
159   - FSDD(i,:,:)=reshape(FSD(i,i,:,:),50,50);
160   - end
161   -
162   -
163   - ax5=subplot(4,4,14);
164   -FSD1=reshape(FSD(find(x==150),find(x==150),:,:),length(Fsize),length(hcat));
165   -
166   -IDT1=IDT(find(x==150),:);
167   -for i=1:length(hcat)
168   - FSD1(:,i)=FSD1(:,i)*IDT1(i);
169   - nfloe(:,i)=((FSD1(:,i)*(5000)^2)./Fsize.^2) ;
170   -end
171   -nfloe=nfloe/sum(sum(nfloe));
172   -
173   - hh=pcolor(hcat,Fsize,nfloe);
174   - shading interp
175   -
176   -colormap(cmap)
177   -
178   - a=xlabel('Ice thickness [m]');
179   -set(gca,'yticklabel',{})
180   -
181   -
182   - ax6=subplot(4,4,15);
183   -FSD1=reshape(FSD(find(x==250),find(x==250),:,:),length(Fsize),length(hcat));
184   -
185   -IDT1=IDT(find(x==250),:);
186   -for i=1:length(hcat)
187   - FSD1(:,i)=FSD1(:,i)*IDT1(i);
188   - nfloe(:,i)=((FSD1(:,i)*(5000)^2)./Fsize.^2) ;
189   -end
190   -nfloe=nfloe/sum(sum(nfloe));
191   -
192   - hh=pcolor(hcat,Fsize,nfloe);
193   - shading interp
194   -
195   -colormap(cmap)
196   -
197   -
198   -set(gca,'yticklabel',{})
199