clear;clc;close all;
%-------------------------------------------------------------------------
Amp=[12 12 12]; % Amplitude of soliton wave 三个孤立内波波峰值
ShiftDis=[0 630 1260]; % The horizontal scale for each soliton wave
WaveLength=160;
dis=0:5:30000;
Velocity=0.5;%内波速度
for TimeInterval=0;%内波传播时间
Vel=Velocity*TimeInterval;
OriginalPosition=4500+Vel;
y=Amp(1)*(sech((dis-OriginalPosition-ShiftDis(1))/WaveLength)).^2+...
Amp(2)*(sech((dis-OriginalPosition-ShiftDis(2))/WaveLength)).^2+...
Amp(3)*(sech((dis-OriginalPosition-ShiftDis(3))/WaveLength)).^2;
% y表示由三个孤立内波引起的位移变化
% plot(dis,y);
%------------------------------------------------------------------------
%--------------------------------------------
% 以下内容计算海底大陆架高度参数
bed=0:3000:30000;
height=[60 60 58 49 46.5 44 39 38 37 36 35];
Height=interp1(bed,height,dis,'linear');
% plot(bedi,Height);
% set(gca,'YDir','rev');
%--------------------------------------------
%=========================================================================
for m=1:61;
dep=m-1;
% 深度梯度变化
for n=1:6001
% 水平距离梯度变化
if dep<=20+y(n)
speed(m,n)=1528;
% 此时没有温跃层速度为1528m/s
end
if dep>20+y(n)
if dep<=25+y(n)
speed(m,n)=1528-(dep-y(n)-20)*6.2;
% 这表示在温跃层内 声速线性递减
end
if dep>25+y(n)
% 表示在温跃层以下
if dep>Height(n)
speed(m,n)=NaN;
% 表示已经进入海底 声速为1700m/s 为画图方便设为NaN
end
if dep<=Height(n)
speed(m,n)=1497;
% 在温跃层下方,声速为1497m/s
end
end
end
end
end
%=========================================================================
mynum=TimeInterval/20;
savename=['speed',int2str(mynum)];
save(savename,'speed');
end
% 以下为剖面的声速分布
pcolor(0:5:30000,0:1:60,speed);
set(gca,'YDir','rev');
shading interp;
colorbar('YTickLabel',...
{'1495','1500','1505','1510','1515','1520','1525','1530','1535'});
title('地形和声速分布图');
xlabel('水平距离 (单位m)');
ylabel('深度 (单位m)');
评论0