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),' [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(' [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',{})