-
Notifications
You must be signed in to change notification settings - Fork 1
/
Heat_Budget_Plot_Line.m
151 lines (136 loc) · 4.52 KB
/
Heat_Budget_Plot_Line.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
% This script makes line plots of specific regions
close all;
clear all;
base = '/srv/ccrc/data03/z3500785/mom/mat_data/';
RUNS = {'ACCESS-OM2_025deg_jra55_ryf_norediGM', ...
'ACCESS-OM2_025deg_jra55_ryf_noGM', ...
'ACCESS-OM2_025deg_jra55_ryf', ...
};
colors = {'r','r','r'};
styles = {'-',':','--'};
names = {'ACCESS-OM2-025','ACCESS-OM2-025-N','ACCESS-OM2-025-NG'};
region = 'Kuroshio';
region = 'GulfStream';
Tcaxs = [-2 30];
% $$$ RUNS = {'ACCESS-OM2_025deg_jra55_ryf', ...
% $$$ 'ACCESS-OM2_025deg_jra55_ryf_rediGM_kbvar', ...
% $$$ 'ACCESS-OM2_025deg_jra55_ryf_rediGM_kb1em5', ...
% $$$ };
% $$$ colors = {'r',[0 0.5 0],'k'};
% $$$ styles = {'-',':','--'};
% $$$ names = {'ACCESS-OM2-025-NG','ACCESS-OM2-025-NG-kbv','ACCESS-OM2-025-NG-kb5'};
% $$$ region = 'Kuroshio';
% $$$ region = 'EastTropPac';
% $$$ Tcaxs = [10 30];
RUNS = {'ACCESS-OM2_025deg_jra55_ryf_norediGM', ...
'ACCESS-OM2_025deg_jra55_ryf_norediGM_smoothkppbl'
};
colors = {'r',[0 0.5 0],'k'};
styles = {'-',':','--'};
names = {'ACCESS-OM2-025','ACCESS-OM2-025-KPPBL-smooth'};
region = 'Kuroshio';
region = 'EastTropPac';
Tcaxs = [10 30];
rr = 1;
NUMs = {};
udhs = {};
vdhs = {};
Tdzs = {};
for rr = 1:length(RUNS)
model = RUNS{rr}
load([base model '_' region '_nummixprofiles.mat']);
% time-averaging:
NUMs{rr} = mean(mean(NUM,2),3);
vars = {'EKE','Tdxsq','Tdysq','Tdzsq','aiso','rey_bih', ...
'udxsq','vdysq'};
vars = {'Tdxsq','Tdysq','Tdzsq','udxsq','vdysq'};
for vi = 1:length(vars)
eval([vars{vi} ' = monmean(' vars{vi} ',1,ndays);']);
end
udhs{rr} = sqrt(0.5*(udxsq+vdysq));
Tdhs{rr} = sqrt(0.5*(Tdxsq+Tdysq));
Tdzs{rr} = sqrt(Tdzsq);
EKEs{rr} = EKE;
end
poss = [0.05 0.0900 0.16 0.8150; ...
0.23 0.0900 0.16 0.8150; ...
0.41 0.0900 0.16 0.8150; ...
0.59 0.0900 0.16 0.8150; ...
0.77 0.0900 0.16 0.8150];
figure;
set(gcf,'Position',[1 36 1920 970]);
subplot(1,5,1);
for rr = 1:length(RUNS)
plot(NUMs{rr}/1e12,Te,styles{rr},'color',colors{rr},'linewidth',2);
hold on;
end
ylabel('Temperature $\Theta^*$ ($^\circ$C)');
title('Numerical Mixing $\mathcal{I}(\Theta^*)$');
xlabel('TW');
xlim([-80 0]);
% $$$ xlim([-60 0]);
ylim(Tcaxs);
legend(names);
set(gca,'Position',poss(1,:));
xlims = get(gca,'xlim');
ylims = get(gca,'ylim');
text(xlims(2)-0.12*diff(xlims),ylims(2)-0.03*diff(ylims),'(a)');
subplot(1,5,2);
for rr = 1:length(RUNS)
plot(EKEs{rr},T,styles{rr},'color',colors{rr},'linewidth',2);
hold on;
end
title('EKE');
xlabel('m$^2$s$^{-2}$');
set(gca,'yticklabel',[]);
xlim([0 4]*1e-3);
% $$$ xlim([0 10]*1e-3);
ylim(Tcaxs);
set(gca,'Position',poss(2,:));
xlims = get(gca,'xlim');
ylims = get(gca,'ylim');
text(xlims(2)-0.12*diff(xlims),ylims(2)-0.03*diff(ylims),'(b)');
subplot(1,5,3);
for rr = 1:length(RUNS)
plot(udhs{rr},T,styles{rr},'color',colors{rr},'linewidth',2);;
hold on;
end
% $$$ ylabel('Temperature ($^\circ$C)');
set(gca,'yticklabel',[]);
title('$\sqrt{\frac{1}{2}\left(\overline{|\Delta_x u|^2}+\overline{|\Delta_y v|^2}\right)}$');
xlabel('ms$^{-1}$');
ylim(Tcaxs);
set(gca,'Position',poss(3,:));
xlims = get(gca,'xlim');
ylims = get(gca,'ylim');
text(xlims(2)-0.12*diff(xlims),ylims(2)-0.03*diff(ylims),'(c)');
subplot(1,5,4);
for rr = 1:length(RUNS)
plot(Tdhs{rr},T,styles{rr},'color',colors{rr},'linewidth',2);;
hold on;
end
% $$$ ylabel('Temperature ($^\circ$C)');
set(gca,'yticklabel',[]);
title('$\sqrt{\frac{1}{2}\left(\overline{|\Delta_x \Theta|^2}+\overline{|\Delta_y \Theta|^2}\right)}$');
xlabel('$^\circ$C');
ylim(Tcaxs);
set(gca,'Position',poss(4,:));
xlims = get(gca,'xlim');
ylims = get(gca,'ylim');
text(xlims(2)-0.12*diff(xlims),ylims(2)-0.03*diff(ylims),'(d)');
subplot(1,5,5);
for rr = 1:length(RUNS)
plot(Tdzs{rr},T,styles{rr},'color',colors{rr},'linewidth',2);;
hold on;
end
% $$$ ylabel('Temperature ($^\circ$C)');
set(gca,'yticklabel',[]);
title('$\sqrt{\overline{|\Delta_z \Theta|^2}}$');
xlabel('$^\circ$C');
xlim([0 15]);
% $$$ xlim([0 8]);
ylim(Tcaxs);
set(gca,'Position',poss(5,:));
xlims = get(gca,'xlim');
ylims = get(gca,'ylim');
text(xlims(2)-0.12*diff(xlims),ylims(2)-0.03*diff(ylims),'(e)');