


SLHFTC: computes sensible and latent heat flux following TOGA/COARE.
[qsen,qlat,tau,theta,A]=SLHFTC(ua,va,uo,vo,zr,Ta,zt,rh,zq,ap,Ts) computes
the sensible and latent heat fluxes into the ocean and the surface wind
stress based on the Fairall et al (1996) COARE code. (see HFBULKTC for
description). Assumes input series are either column or row vectors;
zr, zt, and zq are fixed scalars, and rh and/or Pa may be scalars.
The output variables are column vectors and the column matrix A. NOTE:
user must decide if cool-skin and Webb corrections are to be included.
INPUT: ua,va - east, north wind components [m/s]
uo,vo - east, north ocean surface currents [m/s]
zr - wind measurement height [m]
Ta - air temperature [C]
zt - air temperature measurement height [m]
rh - relative humidity [%]
zq - rh measurement height [m]
Ts - sea surface temperature [C]
Pa - air pressure [mb]
OUTPUT: qsen - sensible heat flux [W/m^2]
qlat - latent heat flux [W/m^2]
tau - wind stress magnitude [Pa]
theta - direction of wind stress [deg CCW from east]
A - 12 column matrix of auxilary diagnostic outputs
(see HFBULKTC for details)

0001 function [qsen,qlat,tau,theta,A]=slhftc(ua,va,uo,vo,zr,Ta,zt,rh,zq,Pa,Ts) 0002 % SLHFTC: computes sensible and latent heat flux following TOGA/COARE. 0003 % [qsen,qlat,tau,theta,A]=SLHFTC(ua,va,uo,vo,zr,Ta,zt,rh,zq,ap,Ts) computes 0004 % the sensible and latent heat fluxes into the ocean and the surface wind 0005 % stress based on the Fairall et al (1996) COARE code. (see HFBULKTC for 0006 % description). Assumes input series are either column or row vectors; 0007 % zr, zt, and zq are fixed scalars, and rh and/or Pa may be scalars. 0008 % The output variables are column vectors and the column matrix A. NOTE: 0009 % user must decide if cool-skin and Webb corrections are to be included. 0010 % 0011 % INPUT: ua,va - east, north wind components [m/s] 0012 % uo,vo - east, north ocean surface currents [m/s] 0013 % zr - wind measurement height [m] 0014 % Ta - air temperature [C] 0015 % zt - air temperature measurement height [m] 0016 % rh - relative humidity [%] 0017 % zq - rh measurement height [m] 0018 % Ts - sea surface temperature [C] 0019 % Pa - air pressure [mb] 0020 % 0021 % OUTPUT: qsen - sensible heat flux [W/m^2] 0022 % qlat - latent heat flux [W/m^2] 0023 % tau - wind stress magnitude [Pa] 0024 % theta - direction of wind stress [deg CCW from east] 0025 % A - 12 column matrix of auxilary diagnostic outputs 0026 % (see HFBULKTC for details) 0027 0028 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0029 % 8/28/98: version 1.1 (contributed by RP) 0030 % 8/5/99: version 2.0 0031 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0032 0033 % compute relative velocity magnitude and direction 0034 du=ua-uo; 0035 dv=va-vo; 0036 spd=sqrt(du.^2+dv.^2); 0037 theta=(180./pi).*atan2(dv,du); 0038 0039 % change column vector to row vector if necessary 0040 [m n] = size(spd); 0041 if m > n 0042 spd = spd'; 0043 end 0044 % keep theta a column vector 0045 [m n] = size(theta); 0046 if n > m 0047 theta = theta'; 0048 end 0049 0050 % compute fluxes 0051 A = hfbulktc(spd,zr,Ta,zt,rh,zq,Pa,Ts); qsen=A(:,1); % no cool_skin, Webb correction 0052 qlat=A(:,2); 0053 tau=A(:,4); 0054 0055