-
Notifications
You must be signed in to change notification settings - Fork 12
/
t_hfbulktc.m
52 lines (46 loc) · 1.66 KB
/
t_hfbulktc.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
% T_HFBULKTC: a program to test hfbulktc.m using COARE test data
% T_HFBULKTC is a program to test hfbulktc.m using COARE test data
% (file test2_5b.dat). NOTE: Make sure that you use the COARE
% parameters located in the files as_consts.m and cool_skin.m when
% conducting the test.
%
% VARIBLES:
%
% ur = wind speed [m/s] measured at height zr [m]
% Ta = air temperature [C] measured at height zt [m]
% rh = relative humidity [%] measured at height zq [m]
% Pa = air pressure [mb]
% Ts = sea surface temperature [C]
% sal = salinity [psu (PSS-78)]
% dlw = downwelling (INTO water) longwave radiation [W/m^2]
% dsw = measured insolation [W/m^2]
% nsw = net shortwave radiation INTO the water [W/m^2]
% rain = rain rate [mm/hr]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 4/7/99: version 1.2 (contributed by AA)
% 8/5/99: version 2.0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% change directory to yours
load c:\flux_fsu\test\test2_5b.dat
% parse data
ur = test2_5b(:,2);
zr = 15;
Ta = test2_5b(:,4);
zt = 15;
Pa = 1008*ones(size(ur));
q = test2_5b(:,5);
rh = q./qsat(Ta,Pa)/10;
zq = 15;
Ts = test2_5b(:,14);
sal = 30*ones(size(ur));
dsw = test2_5b(:,9);
nsw = 0.945*dsw;
dlw = test2_5b(:,10);
rain= test2_5b(:,11);
i=[1:length(ur)];
% i=[1:10];
% NO cool-skin; compare to COARE output in file no_skin.out
A1 = hfbulktc(ur(i),zr,Ta(i),zt,rh(i),zq,Pa(i),Ts(i));
% YES cool-skin; compare to COARE output file yes_skin.out
A2 = hfbulktc(ur(i),zr,Ta(i),zt,rh(i),zq,Pa(i),Ts(i), ...
sal(i),dlw(i),dsw(i),nsw(i));