source: Roms_tools/air_sea/t_hfbulktc.m @ 1

Last change on this file since 1 was 1, checked in by cholod, 13 years ago

import Roms_Agrif

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