-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate3.asv
48 lines (43 loc) · 1.33 KB
/
generate3.asv
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
% require grid_WWLLN_8days (4D double 360 * 720 * 24 * 8)
% require grid_IMERG_8day (4D double 360 * 720 * 24 * 8)
load("8day_4D.mat");
DD = zeros(24,1,8);
NDD = zeros(24,1,8);
for day = 1:8
for hour = 1:24
lightning_index=find( grid_WWLLN_8days(:,:,hour,day) > 1);
no_lightning_index=find( grid_WWLLN_8days(:,:,hour,day) < 1);
hour_grid = grid_IMERG_8days(:,:,hour,day);
DD(hour, 1, day) = length(find(hour_grid(lightning_index) > 30));
NDD(hour, 1, day) = length(find(hour_grid(no_lightning_index) > 30));
end
end
% This is for 8 day all add up plot
% figure
% plot(sum(DD, 3), "*-")
% title("Cell covered with at least 2 lightning and 50 mm precptation")
% xlabel("UT hours")
% ylabel("Cell count")
% yyaxis right
% plot(sum(VOSTOK_hour_8days, 3), "*-")
% ylabel("Electric Field (V/m)")
%
% figure
% plot(sum(NDD, 3), "*-")
% title("Cell covered with no lightning and 50 mm precptation")
% xlabel("UT hours")
% ylabel("Cell count")
% yyaxis right
% plot(sum(VOSTOK_hour_8days, 3), "*-")
% ylabel("Electric Field (V/m)")
% This is for daily plot
for day = 1:8
figure;
plot(DD(:,:,day), "*-");
title(strcat("Day ", num2str(day)));
xlabel("UT hours");
ylabel("Cell count");
yyaxis right;
plot(VOSTOK_hour_8days(:,:,day), "*-");
ylabel("Electric Field (V/m)");
end