-
Notifications
You must be signed in to change notification settings - Fork 1
/
stroke_contribution.m
62 lines (44 loc) · 1.27 KB
/
stroke_contribution.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
% stroke_contribution.m
% Todd Anderson
% July 27, 2022
%
% Plot maps of WWLLN strokes detected by the whole network and subsets of
% the network (e.g. single stations).
% TODO: average month of strokegrid in UT
%% import data
run_start = datenum(2022, 03, 01);
run_end = datenum(2022, 03, 31);
run_days = run_start:run_end;
run_days = run_days';
daystr = string(datestr(run_days, "yyyymmdd"));
stationstr = "Fairbanks";
filestr = sprintf("data/strokegrid_10m_%s_%s.mat", daystr, stationstr);
sg = importdata(filestr);
%% plot whole day
sg = importdata("data/strokegrid_10m_20220301_Fairbanks.mat");
sg_day = sum(sg, 3);
load coastlines;
geoidrefvec = [1,90,-180];
figure(1)
hold off
worldmap("World");
geoshow(sg_day, geoidrefvec, "DisplayType","texturemap");
hold on
geoshow(coastlat, coastlon, "Color", "white");
set(gca, 'ColorScale', 'log');
crameri('tokyo')
colorbar('eastoutside');
title("Strokes detected by Fairbanks WWLLN station")
%% animate 10-minute windows
for j = 1:size(sg, 3)
figure(2)
hold off
worldmap("World");
geoshow(sg(:,:,j), geoidrefvec, "DisplayType","texturemap");
hold on
geoshow(coastlat, coastlon, "Color", "white");
set(gca, 'ColorScale', 'log');
crameri('tokyo')
colorbar('eastoutside');
drawnow;
end