爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 10238|回复: 1

[源程序] matlab 基于温度盐度的地转流。

[复制链接]
发表于 2021-8-28 17:38:57 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
clc; clear; close all;
load('G:\生成数据\HYCOM\temp.mat')
load('G:\生成数据\HYCOM\sal.mat')
%%
t=temp(:,:,:,1);
s=sal(:,:,:,1);
v=s;
v(:)=nan;
u=v;
% %%
for i=1:length(lon)
    for j=1:length(lat)
depth1(i,j,:)=sw_pres(depth,lat(j));
    end
end
%%
ro=sw_dens(s,t,depth1);
rom=nanmean(ro(:));
rox=ro(2:end,:,:)-ro(1:end-1,:,:);
roy=ro(:,2:end,:)-ro(:,1:end-1,:);
for i=1:length(lon)-1
    for j=1:length(lat)-1
[s(i,j),al(i,j)]=sw_dist([lat(j),lat(j+1)],[lon(i),lon(i+1)],'km');
dx(i,j)=s(i,j)*cosd(al(i,j))*1e3;
dy(i,j)=s(i,j)*sind(al(i,j))*1e3;
    end
end
%%
f=sw_f(lat);
for i=1:length(lon)-1
for j=1:length(lat)-1
    v(i,j,:)=1/rom/f(i).*rox(i,j,:)/dx(i,j);
    u(i,j,:)=-1/rom/f(i).*roy(i,j,:)/dy(i,j);
end
end
%%
ro0=ro(:,:,1);
u0=u(:,:,1);
v0=u(:,:,1);
s0=sqrt(u0.^2+v0.^2);
contourf(lon,lat,s0','linecolor','none')
colorbar
colormap jet

%%


中国东海地转流

中国东海地转流
密码修改失败请联系微信:mofangbao
发表于 2022-2-14 09:54:59 | 显示全部楼层
这是什么图
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表