data_treatment.m 1.35 KB
Newer Older
Jérémy Baudry's avatar
Jérémy Baudry committed
1
clear all;
Jérémy Baudry's avatar
Jérémy Baudry committed
2 3
close all;

Jérémy Baudry's avatar
Jérémy Baudry committed
4 5 6 7 8 9 10

x=ncread('simulation1.nc','x_axis');
t=ncread('simulation1.nc','time');
om=ncread('simulation1.nc','omega');
spectre=ncread('simulation1.nc','Spectrum');
Dave=ncread('simulation1.nc','Dave');
Dmax=ncread('simulation1.nc','Dmax');
Jérémy Baudry's avatar
Jérémy Baudry committed
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
hice=ncread('simulation1.nc','Ice thickness');
c=ncread('simulation1.nc','Ice concentration');
FSD=ncread('simulation1.nc','Floe size distribution');
floesize=ncread('simulation1.nc','floe size');

% f=om/(2*pi);
% E=reshape(spectre(end,end,:),length(om),1);
% Ei=reshape(spectre(30,:,:),length(x),length(om));
% E1=reshape(spectre(1,1,:),length(om),1);
% 
% 
% 
% 
% 
% figure(1)
% cmap=rand(length(t),3);
%    w = waitforbuttonpress;
% for i=1:length(t)
%     
%     figure(1)
%     
%     sp=reshape(spectre(i,:,:),length(x),length(om));
%     h=mesh(f,x,sp);
%     axis([min(f) max(f) min(x) max(x) 0 max(E1)])
%          xlabel('Frequency [s^{-1}]')
%         zlabel('Energy')
%    
%     ylabel('x [km]')
%   pause(0.1)
%  
% end
%     
% 
% 
% 
% figure
% 
% plot(x,hice,'color','r')
%     hold on
%     plot(x,c,'--b')
%     grid on
%     
%      xlabel('x [km]')
%     
%     legend('ice thickness','ice concentration')
% 
% 
% 
% figure
% 
% 
%  
%  plot(x,Dmax,'color','r')
%     hold on
%     plot(x,Dave,'--b')
%     grid on
%     
%      xlabel('x [km]')
%     ylabel('Floe size [m]')
%     
%     legend('Dmax','<D>')