figure_dany.m 4.62 KB
Newer Older
Jérémy Baudry's avatar
Jérémy Baudry committed
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 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
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');



 for i=1:size(Hs,1)
     
 hs2(i)=Hs(i,i);
 end
 



fig=figure;
fig.Units='inches';
fig.Position=[7.1042 3.2708 4.6458 6.2812];
fig.OuterPosition=[7.1042 3.2708 4.6458 7.2812];

fig.PaperUnits = 'inches';
fig.PaperPosition = [0 0 4.6458 6.2812];
fig.PaperPositionMode = 'manual';
fig.PaperOrientation='Portrait';
fig.PaperSize=[4.6458 6.2812];
 
 
 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,:);

 
 
 
 
 %----------------------------------------------------
ax1= subplot(4,4,1:4);
[ax,p1,p2] = plotyy(x,thick,x,conc,'plot','plot');

set(p2,'color',[0.1 0.1 0.1],'linewidth',1.5)
% ylabel(ax(1),'<ice thickness> [m]')
% label2=ylabel(ax(2),'Ice concentration');
hold on


line1=line([55 55], ylim);
line2=line([150 150], ylim);
line3=line([250 250], ylim);
line4=line([350 350], ylim);
set(line1,'color','k','linestyle','--')
set(line2,'color','k','linestyle','--')
set(line3,'color','k','linestyle','--')
set(line4,'color','k','linestyle','--')

set(ax(1),'xticklabel',{})
ax1.Position(2)=ax1.Position(2)+0.06;
ax1.Position(3)=ax1.Position(3)-0.1;
ax1.Position(4)=ax1.Position(4)-0.01;
%-----------------------------------------------------



ax2=subplot(4,4,5:8);
 
 p3=plot(x,hs2,'color',[0.1 0.1 0.1],'linewidth',1.5);
hold on

line1=line([55 55], ylim);
line2=line([150 150], ylim);
line3=line([250 250], ylim);
line4=line([350 350], ylim);
set(line1,'color','k','linestyle','--')
set(line2,'color','k','linestyle','--')
set(line3,'color','k','linestyle','--')
set(line4,'color','k','linestyle','--')

 ylabel('Hs [m]')
 


set(ax2,'xticklabel',{})
ax2.Position(2)=ax2.Position(2)+0.1;
ax2.Position(3)=ax2.Position(3)-0.1;
ax2.Position(4)=ax2.Position(4)-0.01;



%------------------------------------------------------
 ax3=subplot(4,4,9:12);
 p4=plot(x,Dave,'color',[0.1 0.1 0.1],'linewidth',1.5);
  xlabel('Distance [km]')
  ylabel('<D> [m]')
hold on

line1=line([55 55], ylim);
line2=line([150 150], ylim);
line3=line([250 250], ylim);
line4=line([350 350], ylim);
set(line1,'color','k','linestyle','--')
set(line2,'color','k','linestyle','--')
set(line3,'color','k','linestyle','--')
set(line4,'color','k','linestyle','--')

ax3.Position(2)=ax3.Position(2)+0.13;
ax3.Position(3)=ax3.Position(3)-0.1;
ax3.Position(4)=ax3.Position(4)-0.01;



%-------------------------------------------------------

 ax4=subplot(4,4,13);
FSD1=reshape(FSD(find(x==55),find(x==55),:,:),length(Fsize),length(hcat));

IDT1=IDT(find(x==55),:);
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));
 
 hh=pcolor(hcat,Fsize,nfloe);
 shading interp

colormap(cmap)
  
   b=ylabel('Floe size [m]');
   
%    ax3.Position(2)=ax3.Position(2)+0.13;
ax4.Position(3)=ax4.Position(3)+0.05;
ax4.Position(4)=ax4.Position(4)+0.01;
   
   
 %-----------------------------------------------------  
   
   for i=1:100
       FSDD(i,:,:)=reshape(FSD(i,i,:,:),50,50);
   end
   
   
 ax5=subplot(4,4,14);
FSD1=reshape(FSD(find(x==150),find(x==150),:,:),length(Fsize),length(hcat));

IDT1=IDT(find(x==150),:);
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));
 
 hh=pcolor(hcat,Fsize,nfloe);
 shading interp

colormap(cmap)
   
   a=xlabel('Ice thickness [m]');
set(gca,'yticklabel',{})
   
 
  ax6=subplot(4,4,15);
FSD1=reshape(FSD(find(x==250),find(x==250),:,:),length(Fsize),length(hcat));

IDT1=IDT(find(x==250),:);
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));
 
 hh=pcolor(hcat,Fsize,nfloe);
 shading interp

colormap(cmap)
   
  
set(gca,'yticklabel',{})
   
 
  ax7=subplot(4,4,16);
FSD1=reshape(FSD(find(x==350),find(x==350),:,:),length(Fsize),length(hcat));

IDT1=IDT(find(x==350),:);
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));
 
 hh=pcolor(hcat,Fsize,nfloe);
 shading interp

colormap(cmap)
   colorbar
  
  set(gca,'yticklabel',{})