⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cdnlp.m

📁 一个计算海天背景的工程模型。由matlab编写
💻 M
字号:
function [cd,u10]=cdnlp(sp,z)

% CDNLP: computes neutral drag coefficient following Large&Pond (1981).

% [cd,u10]=CDNLP(sp,z) computes the neutral drag coefficient and wind 

% speed at 10m given the wind speed at height z following Large and 

% Pond (1981), J. Phys. Oceanog., 11, 324-336. 

%

% INPUT:   sp - wind speed  [m/s]

%          z - measurement height [m]

%

% OUTPUT:  cd - neutral drag coefficient at 10m

%          u10 - wind speed at 10m  [m/s]



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% 3/8/97: version 1.0

% 8/26/98: version 1.1 (vectorized by RP)

% 8/5/99: version 2.0

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



as_consts;           % define physical constants

a=log(z./10)/kappa;  % log-layer correction factor

tol=.001;            % tolerance for iteration [m/s]



u10o=zeros(size(sp));

cd=1.15e-3*ones(size(sp));

u10=sp./(1+a.*sqrt(cd));



ii=abs(u10-u10o)>tol;

while any(ii(:)),

  u10o=u10;

  cd=(4.9e-4+6.5e-5*u10o);    % compute cd(u10)

  cd(u10o<10.15385)=1.15e-3;

  u10=sp./(1+a.*sqrt(cd));   % next iteration

  ii=abs(u10-u10o)>tol;      % keep going until iteration converges

end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -