-
Notifications
You must be signed in to change notification settings - Fork 3
/
evaMO_main.m
124 lines (89 loc) · 3.42 KB
/
evaMO_main.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
%% evaMO_main
%% Read original data
read_ocsp_TS(0);
read_ocsp_flux(0);
read_ocsp_wave(0);
read_spursi_TS;
read_spursi_flux;
read_spursi_wave;
%% Process original data
prep_ocsp;
prep_spursi;
%% Load processed datasets
data_dir = './data/';
ocsp_dir = [data_dir,'Papa/'];
spursi_dir = [data_dir,'SPURSI/'];
pzPA = load([ocsp_dir, 'ocsp_pzData.mat']);
pzSP = load([spursi_dir,'spursi_pzData.mat']);
skfPA = load([ocsp_dir, 'ocsp_skfData.mat']);
skfSP = load([spursi_dir,'spursi_skfData.mat']);
PAqs = skfPA.Islc;
SPqs = skfSP.Islc;
dTPA = load([ocsp_dir, 'ocsp_dTData.mat']);
dTSP = load([spursi_dir,'spursi_dTData.mat']);
rpPA = load([ocsp_dir, 'ocsp_rpData.mat']);
rpSP = load([spursi_dir,'spursi_rpData.mat']);
%% Figure 4: temperature comparison between observations and MOST
Poff = 0.055;
dTf = figure('position',[0 0 800 800]);
[dTax,dTpos] = tight_subplot(2,2,[.01 .02],[.06 .05],[.06 .08]);
dTax(1).Position = [dTpos{1}(1:2) dTpos{1}(3)+Poff dTpos{1}(4)];
dTax(2).Position = [dTpos{2}(1)+Poff dTpos{2}(2) dTpos{2}(3)-Poff dTpos{2}(4)];
dTax(3).Position = [dTpos{3}(1:2) dTpos{3}(3)+Poff dTpos{3}(4)];
dTax(4).Position = [dTpos{4}(1)+Poff dTpos{4}(2) dTpos{4}(3)-Poff dTpos{4}(4)];
dT_scat(dTPA,PAqs,1,dTax(1),1,1);
dT_scat(dTSP,SPqs,2,dTax(3),1,1);
plot_profcom(rpPA,1,dTax(2));
plot_profcom(rpSP,2,dTax(4));
%% Figure 5: boxplot for the observed phi_h in zeta space
phi_obs = {pzPA.phi_qs(:) pzSP.phi_qs(:)};
zet_obs = {pzPA.zeta_qs(:) pzSP.zeta_qs(:)};
PZ_scat_obs(phi_obs,zet_obs);
%% Figure 6: predictions from the "SE" surface wave breaking model
Poff = 0.14;
WBf = figure('position',[0 0 1015 500]);
[WBax,WBpos] = tight_subplot(1,3,[.03 .04],[.09 .1],[.04 .04]);
WBax(1).Position = [WBpos{1}(1:2) WBpos{1}(3)+Poff WBpos{1}(4)];
WBax(2).Position = [WBpos{2}(1)+Poff WBpos{2}(2) WBpos{2}(3)-Poff/2 WBpos{2}(4)];
WBax(3).Position = [WBpos{3}(1)+Poff/2 WBpos{3}(2) WBpos{3}(3)-Poff/2 WBpos{3}(4)];
r2o = -0.2; % z_0/L
plot_SFWB_phi2d(WBax(1),r2o,pzPA,pzSP)
q_in_SFWB(WBf,WBax(2),r2o,[])
demo_sfwbProf(WBax(3),r2o)
%% Figure 7: predictions from the SE Langmuir turbulence model
figure('position',[0 0 1015 500]);
[LTax,~] = tight_subplot(1,2,[.03 .03],[.1 .1],[.06 .06]);
plot_H15se_phi2d(LTax,'H2015',pzPA,pzSP);
%% Figure 8: comparison of phi_h from Kansas, observations and models
PZf = figure('position',[0 0 1050 510]);
[PZax,~] = tight_subplot(1,2,[.01 .01],[.12 .03],[.08 .03]);
PZ_scat(pzPA,1,PZf,PZax(1),1);
PZ_scat(pzSP,2,PZf,PZax(2),1);
%% Figure 9: phi_h & l^* from the SE Langmuir model with dynamic length scale
% Find optimal E6 value for SMCLT with varying l^*
% dT_obs_SMCLT;
% figure;
% plot(E6_list,slp,'-o'); grid on
% optimal E6 is about 2.5, with slp ~ 1
% save([spursi_dir,'spursi_slpE6.mat'],'E6_list','slp')
Lstarf = figure('position',[0 0 820 800]);
[lsrAx,~] = tight_subplot(2,2,[.07 .02],[.07 .03],[.08 .03]);
oE6 = 2.5;
phi_lstar_E6(pzPA,1,oE6,lsrAx,1);
phi_lstar_E6(pzSP,2,oE6,lsrAx,1);
%% Forcing distribution at two sites
xString = 'H_s [m]';
plot_pdf(skfPA.SKF.Hs(PAqs),skfSP.SKF.Hs(SPqs),22,xString)
xlim([0 10])
xString = 'u_* [m s^{-1}]';
plot_pdf(skfPA.SKF.Ustar(PAqs),skfSP.SKF.Ustar(SPqs),22,xString)
xlim([0 0.04])
xString = 'B_0 [m^2 s^{-3}]';
plot_pdf(skfPA.SKF.B0(PAqs),skfSP.SKF.B0(SPqs),42,xString)
xlim([-6e-7 4e-7])
xString = '\eta^x';
plot_pdf(pzPA.etaX_qs(:),pzSP.etaX_qs(:),100,xString)
xlim([-1.3 .3])
xString = '\eta^y';
plot_pdf(pzPA.etaY_qs(:),pzSP.etaY_qs(:),120,xString)
xlim([-1 1])