|
本文作者:波哥 工作单位:中国海洋大学海洋与大气学院 联系邮箱:916490285@qq.com
1 三维涡旋温度、盐度、流速以及合成图: 1.1 三维涡旋盐度图: , G% c0 G5 _1 [. j& s! [% }
[C] 纯文本查看 复制代码 clc;clear;close all
fig_h=figure;
set(fig_h,'position',[50,50,1200,1200])
for j=1:2
if j==1
load('cyc_lat_lon.mat')%读取已经切好的数据;cyc 气旋
load('cyc_data.mat')%读取已经切好的数据;TSUV3
lev=1;
[c,i]=min(abs(lat-lat_cyc_bowl(3,1)));
Lon=lon(i(1),:);
[c,i]=min(abs(lon-lon_cyc_bowl(3,1)));
Lat=lat(:,i(1));
llat=lat_cyc_bowl(3,:);
llon=lon_cyc_bowl(3,:);
else
load('anti_lat.mat')%anti反气旋数据
load('anti_data.mat')%anti反气旋数据
[c,i]=min(abs(lat-lat_anti_lense(3,1)));
Lon=lon(i(1),:);
[c,i]=min(abs(lon-lon_anti_lense(3,1)));
Lat=lat(:,i(1));
llat=lat_anti_lense(8,:);
llon=lon_anti_lense(8,:);
end
% meshgrid 网格化数据;
[X1,Y1,Z1]=meshgrid(Lon,Lat,level);% level 是深度;
T=sst3d;
u=u3d;
v=v3d;
Sal=salt3d;
%% plot sal
subplot(1,2,j)
slice(X1,Y1,Z1,Sal,[],[],-1*depth(1:5))%(1:5)画5层的盐度图;
shading interp
colormap jet
hold on
plot3(llon(1:5),llat(1:5),-1*depth(1:5),'o--b')% 判断出来涡旋中心的位置,进行画线条;
xlabel('Longitude')
ylabel('Latitude')
zlabel('Depth(m)')
set(gca,'ztick',[-200 -150 -100 -50 -10])
view(-44,15)
if j==1
title('气旋 盐度')
else
title('反气旋 盐度')
end
end
colorbar
saveas(fig_h,'3d_salt.png')
* P0 e% X, ~/ H. Q* ?
1.2 三维涡旋温度、盐度、流速以及合成图:
$ ^" W! B5 e1 `5 K/ p& W3 o' T[C] 纯文本查看 复制代码 %% temp
clc;clear;close all
fig_h=figure;
set(fig_h,'position',[50,50,1200,1200])
for j=1:2
if j==1
load('cyc_lat_lon.mat')%读取已经切好的数据;cyc 气旋
load('cyc_data.mat')%读取已经切好的数据;TSUV3
lev=1;
[c,i]=min(abs(lat-lat_cyc_bowl(3,1)));
Lon=lon(i(1),:);
[c,i]=min(abs(lon-lon_cyc_bowl(3,1)));
Lat=lat(:,i(1));
llat=lat_cyc_bowl(3,:);
llon=lon_cyc_bowl(3,:);
else
load('anti_lat.mat')%anti反气旋数据
load('anti_data.mat')%anti反气旋数据
[c,i]=min(abs(lat-lat_anti_lense(3,1)));
Lon=lon(i(1),:);
[c,i]=min(abs(lon-lon_anti_lense(3,1)));
Lat=lat(:,i(1));
llat=lat_anti_lense(8,:);
llon=lon_anti_lense(8,:);
end
% meshgrid 网格化数据;
[X1,Y1,Z1]=meshgrid(Lon,Lat,level);% level 是深度;
T=sst3d;
u=u3d;
v=v3d;
Sal=salt3d;
%% plot sal
subplot(1,2,j)
slice(X1,Y1,Z1,T,[],[],-1*depth(1:5))%(1:5)画5层的盐度图;
shading interp
colormap jet
hold on
plot3(llon(1:5),llat(1:5),-1*depth(1:5),'o--b')% 判断出来涡旋中心的位置,进行画线条;
xlabel('Longitude')
ylabel('Latitude')
zlabel('Depth(m)')
set(gca,'ztick',[-200 -150 -100 -50 -10])
view(-44,15)
if j==1
title('气旋 温度')
else
title('反气旋 温度')
end
end
colorbar
saveas(fig_h,'3d_temp.png')
1.3 三维涡旋温度、盐度、流速以及合成图:
9 t1 I% ~2 w0 S+ p& z9 l0 O$ a% B* w! D[C] 纯文本查看 复制代码 %% u v
clc;clear;close all
fig_h=figure;
set(fig_h,'position',[50,50,1200,1200])
for j=1:2
if j==1
load('cyc_lat_lon.mat')%读取已经切好的数据;cyc 气旋
load('cyc_data.mat')%读取已经切好的数据;TSUV3
lev=1;
[c,i]=min(abs(lat-lat_cyc_bowl(3,1)));
Lon=lon(i(1),:);
[c,i]=min(abs(lon-lon_cyc_bowl(3,1)));
Lat=lat(:,i(1));
llat=lat_cyc_bowl(3,:);
llon=lon_cyc_bowl(3,:);
else
load('anti_lat.mat')%anti反气旋数据
load('anti_data.mat')%anti反气旋数据
[c,i]=min(abs(lat-lat_anti_lense(3,1)));
Lon=lon(i(1),:);
[c,i]=min(abs(lon-lon_anti_lense(3,1)));
Lat=lat(:,i(1));
llat=lat_anti_lense(8,:);
llon=lon_anti_lense(8,:);
end
% meshgrid 网格化数据;
[X1,Y1,Z1]=meshgrid(Lon,Lat,level);% level 是深度;
T=sst3d;
u=u3d;
v=v3d;
[m,n,p]=size(u);
w=zeros(m,n,p);
Sal=salt3d;
%% plot uv
subplot(1,2,j)
for i=1:5
loc(i) = find(level==-depth(i));
quiver3(X1(1:4:end,1:4:end,loc(i)),Y1(1:4:end,1:4:end,loc(i)),Z1(1:4:end,1:4:end,loc(i)),u(1:4:end,1:4:end,loc(i)),v(1:4:end,1:4:end,loc(i)),w(1:4:end,1:4:end,loc(i)),2)%(1:5)画5层的uv图;
hold on
end
% colormap jet
hold on
plot3(llon(1:5),llat(1:5),-1*depth(1:5),'o--b')% 判断出来涡旋中心的位置,进行画线条;
xlabel('Longitude')
ylabel('Latitude')
zlabel('Depth(m)')
set(gca,'ztick',[-200 -150 -100 -50 -10])
view(-44,15)
if j==1
title('气旋 流速')
else
title('反气旋 流速')
end
end
saveas(fig_h,'3d_uv.png')
5 Y7 r% r8 c" R Y$ k( J( g
1.4 三维涡旋温度、盐度、流速以及合成图:
: i4 Z1 x" L9 d8 c[C] 纯文本查看 复制代码 %% u v temp
clc;clear;close all
fig_h=figure;
set(fig_h,'position',[50,50,1200,1200])
for j=1:2
if j==1
load('cyc_lat_lon.mat')%读取已经切好的数据;cyc 气旋
load('cyc_data.mat')%读取已经切好的数据;TSUV3
lev=1;
[c,i]=min(abs(lat-lat_cyc_bowl(3,1)));
Lon=lon(i(1),:);
[c,i]=min(abs(lon-lon_cyc_bowl(3,1)));
Lat=lat(:,i(1));
llat=lat_cyc_bowl(3,:);
llon=lon_cyc_bowl(3,:);
else
load('anti_lat.mat')%anti反气旋数据
load('anti_data.mat')%anti反气旋数据
[c,i]=min(abs(lat-lat_anti_lense(3,1)));
Lon=lon(i(1),:);
[c,i]=min(abs(lon-lon_anti_lense(3,1)));
Lat=lat(:,i(1));
llat=lat_anti_lense(8,:);
llon=lon_anti_lense(8,:);
end
% meshgrid 网格化数据;
[X1,Y1,Z1]=meshgrid(Lon,Lat,level);% level 是深度;
T=sst3d;
u=u3d;
v=v3d;
[m,n,p]=size(u);
w=zeros(m,n,p);
Sal=salt3d;
%% plot uv
subplot(1,2,j)
for i=1:5
loc(i) = find(level==-depth(i));
quiver3(X1(1:4:end,1:4:end,loc(i)),Y1(1:4:end,1:4:end,loc(i)),Z1(1:4:end,1:4:end,loc(i)),u(1:4:end,1:4:end,loc(i)),v(1:4:end,1:4:end,loc(i)),w(1:4:end,1:4:end,loc(i)),2,'k')%(1:5)画5层的uv图;
hold on
end
slice(X1,Y1,Z1,T,[],[],-1*depth(1:5))%(1:5)画5层的盐度图;
shading interp
colormap jet
hold on
plot3(llon(1:5),llat(1:5),-1*depth(1:5),'o--b')% 判断出来涡旋中心的位置,进行画线条;
xlabel('Longitude')
ylabel('Latitude')
zlabel('Depth(m)')
set(gca,'ztick',[-200 -150 -100 -50 -10])
view(-44,15)
if j==1
title('气旋 温度+流速')
else
title('反气旋 温度+流速')
end
end
colorbar
saveas(fig_h,'3d_uv_temp.png')
[p=null, 2, center][color=rgb(0, 0, 0)][font=sans-serif][size=16px]
获取本文Matlab三维涡旋温度、盐度、流速以及合成图源代码和数据的途径: 7 g+ n5 c t; O$ a3 V) H
|