Blame view

scripts_matlab/fig4_article.m 1.15 KB
68586e03   Jérémy Baudry   new release
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
clear all;
close all;


dossier=['wavenumber'];
path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];

x=ncread(path,'x_axis');
t=ncread(path,'time');
om=ncread(path,'omega');
spectre=ncread(path,'Spectrum');
Dave=ncread(path,'Dave');
Dmax=ncread(path,'Dmax');
FSD=ncread(path,'Floe size distribution');
Fsize=ncread(path,'floe size');
thick=ncread(path,'Ice thickness');
conc=ncread(path,'Ice concentration');
Hs=ncread(path,'significant height');
IDT=ncread(path,'Ice Thickness Distribution');
hcat=ncread(path,'thickness categories');





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,:);
 alphmap=ones(63,1);
alphmap(1)=0;



xx=[55 70 80 100 200];
for j=1:5
FSD1=reshape(FSD(find(x==xx(j)),find(x==xx(j)),:,:),length(Fsize),length(hcat));

IDT1=IDT(find(x==xx(j)),:);
for i=1:length(hcat)
    FSD1(:,i)=FSD1(:,i)*IDT1(i);
    nfloe(:,i)=((FSD1(:,i)*(5000)^2)./Fsize.^2) ;
end
nfloe=nfloe/sum(sum(nfloe));

subplot(1,5,j)
pcolor(hcat,Fsize,nfloe)
shading interp

colormap(cmap)
hold on
alphamap(alphmap)
xlabel('thickness')
ylabel('floe size')
zlabel('Distance')
end