data_treatment.m 1.35 KB
clear all;
close all;


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');
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>')