NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/gliderproc/trunk/pelagia_DO_hysteresis_plots.m

Revision 515 (checked in by cbc, 10 years ago)

Add dissolved oxygen hysteresis plot scripts.

Line 
1 clear;
2 load('GLIDER_DATA_LEVEL1\Pelagia_Deployment1_DO_L1.mat');
3 f1 = figure('Name', 'Pelagia Dissolved Oxygen Hysteresis Analysis', 'NumberTitle', 'off');
4
5 sp1 = subplot(3, 4, 1);
6 [ax, h1, h2] = plotyy(ptime_ebd_datenum, -depthi, ptime_ebd_datenum, o2_sat);
7 datetick(ax(1), 'x', 6, 'keeplimits', 'keepticks');
8 datetick(ax(2), 'x', 6, 'keeplimits', 'keepticks');
9 set(h2, 'Color', 'r');
10 set(ax(2), 'YColor', 'r');
11 tt = title({'Pelagia Deployment 1'; 'Depth and O2 Saturation'});
12 xl = xlabel('Time');
13 yl1 = ylabel(ax(1), 'Depth (m)');
14 yl2 = ylabel(ax(2), 'O2 Saturation (%)');
15
16 sp2 = subplot(3, 4, 2);
17 start = 250174;
18 middle = 250290;
19 stop = 250401;
20 [ax, h1, h2] = plotyy(ptime_ebd_datenum(start:stop), -depthi(start:stop), ptime_ebd_datenum(start:stop), o2_sat(start:stop));
21 datetick(ax(1), 'x', 15, 'keeplimits', 'keepticks');
22 datetick(ax(2), 'x', 15, 'keeplimits', 'keepticks');
23 set(h2, 'Color', 'r');
24 set(ax(2), 'YColor', 'r');
25 tt = title({'Pelagia Deployment 1'; 'Depth and O2 Saturation'; ['on ', datestr(ptime_ebd_datenum(start), 1)]});
26 xl = xlabel('Time');
27 yl1 = ylabel(ax(1), 'Depth (m)');
28 yl2 = ylabel(ax(2), 'O2 Saturation (%)');
29
30 sp3 = subplot(3, 4, 3);
31 p1 = plot(o2_sat(start:middle), -depthi(start:middle), '.');
32 hold on;
33 p2 = plot(o2_sat(middle:stop), -depthi(middle:stop), 'r.');
34 tt = title({'Pelagia Deployment 1'; 'Depth and O2 Saturation'; '\color{blue}Downcast = Blue \color{black}/ \color{red}Upcast = Red'});
35 xl = xlabel('O2 Saturation (%)');
36 yl = ylabel('Depth (m)');
37
38 sp4 = subplot(3, 4, 4);
39 p1 = plot(o2_sat(start:middle), tempi(start:middle), '.');
40 hold on;
41 p2 = plot(o2_sat(middle:stop), tempi(middle:stop), 'r.');
42 tt = title({'Pelagia Deployment 1'; 'Temp and O2 Saturation'; '\color{blue}Downcast = Blue \color{black}/ \color{red}Upcast = Red'});
43 xl = xlabel('O2 Saturation (%)');
44 yl = ylabel('Temp (Degrees C)');
45
46 clear;
47 load('GLIDER_DATA_LEVEL1\Pelagia_Deployment2_DO_L1.mat');
48
49 sp1 = subplot(3, 4, 5);
50 [ax, h1, h2] = plotyy(ptime_ebd_datenum, -depthi, ptime_ebd_datenum, o2_sat);
51 datetick(ax(1), 'x', 6, 'keeplimits', 'keepticks');
52 datetick(ax(2), 'x', 6, 'keeplimits', 'keepticks');
53 set(h2, 'Color', 'r');
54 set(ax(2), 'YColor', 'r');
55 tt = title({'Pelagia Deployment 2'; 'Depth and O2 Saturation'});
56 xl = xlabel('Time');
57 yl1 = ylabel(ax(1), 'Depth (m)');
58 yl2 = ylabel(ax(2), 'O2 Saturation (%)');
59
60 sp2 = subplot(3, 4, 6);
61 start = 303249;
62 middle = 303491;
63 stop = 303678;
64 [ax, h1, h2] = plotyy(ptime_ebd_datenum(start:stop), -depthi(start:stop), ptime_ebd_datenum(start:stop), o2_sat(start:stop));
65 datetick(ax(1), 'x', 15, 'keeplimits', 'keepticks');
66 datetick(ax(2), 'x', 15, 'keeplimits', 'keepticks');
67 set(h2, 'Color', 'r');
68 set(ax(2), 'YColor', 'r');
69 tt = title({'Pelagia Deployment 2'; 'Depth and O2 Saturation'; ['on ', datestr(ptime_ebd_datenum(start), 1)]});
70 xl = xlabel('Time');
71 yl1 = ylabel(ax(1), 'Depth (m)');
72 yl2 = ylabel(ax(2), 'O2 Saturation (%)');
73
74 sp3 = subplot(3, 4, 7);
75 p1 = plot(o2_sat(start:middle), -depthi(start:middle), '.');
76 hold on;
77 p2 = plot(o2_sat(middle:stop), -depthi(middle:stop), 'r.');
78 tt = title({'Pelagia Deployment 2'; 'Depth and O2 Saturation'; '\color{blue}Downcast = Blue \color{black}/ \color{red}Upcast = Red'});
79 xl = xlabel('O2 Saturation (%)');
80 yl = ylabel('Depth (m)');
81
82 sp4 = subplot(3, 4, 8);
83 p1 = plot(o2_sat(start:middle), tempi(start:middle), '.');
84 hold on;
85 p2 = plot(o2_sat(middle:stop), tempi(middle:stop), 'r.');
86 tt = title({'Pelagia Deployment 2'; 'Temp and O2 Saturation'; '\color{blue}Downcast = Blue \color{black}/ \color{red}Upcast = Red'});
87 xl = xlabel('O2 Saturation (%)');
88 yl = ylabel('Temp (Degrees C)');
89
90 clear;
91 load('GLIDER_DATA_LEVEL1\Pelagia_Deployment3_DO_L1.mat');
92
93 sp1 = subplot(3, 4, 9);
94 [ax, h1, h2] = plotyy(ptime_ebd_datenum, -depthi, ptime_ebd_datenum, o2_sat);
95 datetick(ax(1), 'x', 6, 'keeplimits', 'keepticks');
96 datetick(ax(2), 'x', 6, 'keeplimits', 'keepticks');
97 set(h2, 'Color', 'r');
98 set(ax(2), 'YColor', 'r');
99 tt = title({'Pelagia Deployment 3'; 'Depth and O2 Saturation'});
100 xl = xlabel('Time');
101 yl1 = ylabel(ax(1), 'Depth (m)');
102 yl2 = ylabel(ax(2), 'O2 Saturation (%)');
103
104 sp2 = subplot(3, 4, 10);
105 start = 134879;
106 middle = 135082;
107 stop = 135263;
108 [ax, h1, h2] = plotyy(ptime_ebd_datenum(start:stop), -depthi(start:stop), ptime_ebd_datenum(start:stop), o2_sat(start:stop));
109 datetick(ax(1), 'x', 15, 'keeplimits', 'keepticks');
110 datetick(ax(2), 'x', 15, 'keeplimits', 'keepticks');
111 set(h2, 'Color', 'r');
112 set(ax(2), 'YColor', 'r');
113 tt = title({'Pelagia Deployment 3'; 'Depth and O2 Saturation'; ['on ', datestr(ptime_ebd_datenum(start), 1)]});
114 xl = xlabel('Time');
115 yl1 = ylabel(ax(1), 'Depth (m)');
116 yl2 = ylabel(ax(2), 'O2 Saturation (%)');
117
118 sp3 = subplot(3, 4, 11);
119 p1 = plot(o2_sat(start:middle), -depthi(start:middle), '.');
120 hold on;
121 p2 = plot(o2_sat(middle:stop), -depthi(middle:stop), 'r.');
122 tt = title({'Pelagia Deployment 3'; 'Depth and O2 Saturation'; '\color{blue}Downcast = Blue \color{black}/ \color{red}Upcast = Red'});
123 xl = xlabel('O2 Saturation (%)');
124 yl = ylabel('Depth (m)');
125
126 sp4 = subplot(3, 4, 12);
127 p1 = plot(o2_sat(start:middle), tempi(start:middle), '.');
128 hold on;
129 p2 = plot(o2_sat(middle:stop), tempi(middle:stop), 'r.');
130 tt = title({'Pelagia Deployment 3'; 'Temp and O2 Saturation'; '\color{blue}Downcast = Blue \color{black}/ \color{red}Upcast = Red'});
131 xl = xlabel('O2 Saturation (%)');
132 yl = ylabel('Temp (Degrees C)');
Note: See TracBrowser for help on using the browser.