-
Notifications
You must be signed in to change notification settings - Fork 0
/
do_maps.m
78 lines (71 loc) · 3.01 KB
/
do_maps.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
function do_maps(s_cfg, s_cds, s_at, s_us)
%function do_maps(s_cfg, s_cds, s_at, s_us)
%
%Plots maps per instant and per layer
siz = size(s_us);
ninstants = siz(1);
nlayers = siz(2);
for n = 1 : ninstants
for k = 1 : nlayers
%var2d
if s_us(n,k).layer > 0
layer = s_us(n,k).layer;
if s_us(n,k).instant > 0
bl_corner = [...
s_us(n,k).instant ...
s_us(n,k).layer ...
s_us(n,k).xrange(1) ...
s_us(n,k).yrange(1) ...
]; % bl_corner (tzxy)
tr_corner = [...
s_us(n,k).instant ...
s_us(n,k).layer ...
s_us(n,k).xrange(2) ...
s_us(n,k).yrange(2) ...
]; % tr_corner (tzxy)
else
bl_corner = [layer ...
s_us(n,k).xrange(1) ...
s_us(n,k).yrange(1) ...
]; % tr_corner (zxy)
tr_corner = [layer ...
s_us(n,k).xrange(2) ...
s_us(n,k).yrange(2) ...
]; % tr_corner (zxy)
end
else
layer = length(s_cds.zsize);
if s_us(n,k).instant > 0
bl_corner = [s_us(n,k).instant ...
s_us(n,k).xrange(1) ...
s_us(n,k).yrange(1) ...
]; %tr_corner (txy)
tr_corner = [s_us(n,k).instant ...
s_us(n,k).xrange(2) ...
s_us(n,k).yrange(2) ...
]; %tr_corner (txy)
else
bl_corner = [...
s_us(n,k).xrange(1) ...
s_us(n,k).yrange(1) ...
]; %tr_corner (xy)
tr_corner = [...
s_us(n,k).xrange(2) ...
s_us(n,k).yrange(2) ...
]; %tr_corner (xy)
end
end
%mask
m_bl_corner = [layer s_us(n,k).xrange(1) s_us(n,k).yrange(1)]; %z x y
m_tr_corner = [layer s_us(n,k).xrange(2) s_us(n,k).yrange(2)];
%bathym
bat_bl_corner = [s_us(n,k).xrange(1) s_us(n,k).yrange(1)]; %x y
bat_tr_corner = [s_us(n,k).xrange(2) s_us(n,k).yrange(2)];
list = get_vars(s_cfg, s_cds, s_at, s_us(n,k), ...
bl_corner, tr_corner, ...
m_bl_corner, m_tr_corner, ...
bat_bl_corner, bat_tr_corner);
s_plot = do_map( list, s_cfg, s_cds, s_at, s_us(n,k));
do_plot(s_cfg, s_at, s_plot);
end
end