-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfinalplotcode.m
More file actions
189 lines (106 loc) · 2.95 KB
/
finalplotcode.m
File metadata and controls
189 lines (106 loc) · 2.95 KB
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
%% final graph
tiledlayout(2,2)
nexttile
surface(t(1:2*365),-p.xgrid,C(end-2*365+1:end,3*length(p.xgrid)+1:end)');
shading interp
hold on
% surf(p.tRange,p.xgrid,log10(C(:,length(p.xgrid)+1:2*length(p.xgrid)))','b');
% alpha 0.5
shading interp
title('Nutrient')
ylabel('Depth (m)');
zlabel('Concentration (\muM m^-^3)');
shading interp
a=colorbar;
a.Label.String='Concentration (\muM m^-^3)';
set(gca,FontSize=20)
axis tight
nexttile
surface(t(1:2*365),-p.xgrid,(C(end-2*365+1:end,1:length(p.xgrid)))');
shading interp
hold on
% surf(p.tRange,p.xgrid,log10(C(:,length(p.xgrid)+1:2*length(p.xgrid)))','b');
% alpha 0.5
shading interp
title('Phytoplankton')
zlabel('Concentration (\muM m^-^3)');
shading interp
b=colorbar;
b.Label.String='Concentration (\muM m^-^3)';
set(gca,FontSize=20)
axis tight
nexttile
surface(t(1:2*365),-p.xgrid,C(end-2*365+1:end,length(p.xgrid)+1:2*length(p.xgrid))');
title('Zooplankton')
xlabel('Time (day)');
ylabel('Depth (m)');
zlabel('Concentration (\muM m^-^3)');
shading interp
c=colorbar;
c.Label.String='Concentration (\muM m^-^3)';
set(gca,FontSize=20)
axis tight
nexttile
surface(t(1:2*365),-p.xgrid,C(end-2*365+1:end,2*length(p.xgrid)+1:3*length(p.xgrid))');
shading interp
hold on
shading interp
title('Fish')
xlabel('Time (day)');
zlabel('Concentration (g m^-^3)');
shading interp
d=colorbar;
d.Label.String='Concentration (g m^-^3)';
set(gca,FontSize=20)
axis tight
%%
%% adv diffu
ttt=0:1:365;
xxx=(linspace(0,5,366))';
figure
tiledlayout(2,2)
%
nexttile
mesh(ttt,-(xxx),((exp(10*log(19/20)*xxx)-9/10).*(-0.3/2*cos(2*pi*ttt/365)+0.85).*(xxx>=0&xxx<=0.1)+(2/27*xxx-101/90).*(-0.2/2*cos(2*pi*ttt/365)+0.9).*(xxx>0.1&xxx<=3)+-0.9*(-0.1/2*cos(2*pi*ttt/365)+0.95).*(xxx>3)));
hold on
title('Advection (P Z)')
xlabel('Time (day)');
ylabel('Depth (m)');
zlabel('Advection velocity (m d^-^1)');
e=colorbar;
e.Label.String='Advection velocity (m d^-^1)';
set(gca,FontSize=20)
axis tight
%
nexttile
surf(ttt,-xxx,10*exp(-1.5*xxx).*(0.4/2*cos(2*pi*ttt/365)+0.8));
shading interp
hold on
shading interp
title('Diffusion (N P Z)')
xlabel('Time (day)');
ylabel('Depth (m)');
zlabel('Diffusivity (m^2 d^-^1)');
shading interp
f=colorbar;
f.Label.String='Diffusivity (m^2 d^-^1)';
set(gca,FontSize=20)
axis tight
%
nexttile
plot(-xxx,10000*-heaviside(xxx-1.5),LineWidth=5);
title('Advection (F)')
xlabel('Depth (m)');
ylabel('Advection (m d^-^1)');
shading interp
set(gca,FontSize=20)
axis tight
%
nexttile
plot(-xxx,10*(1-heaviside(xxx-1.5)),LineWidth=5);
hold on
title('Diffusion (F)')
xlabel('Depth (m)');
ylabel('Diffusivity (m^2 d^-^1)');
set(gca,FontSize=20)
axis tight