-
Notifications
You must be signed in to change notification settings - Fork 0
/
major_review.m~
209 lines (199 loc) · 6.86 KB
/
major_review.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
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
%% FSD rad
close all
clear all
clc
addpath functions
filename_wim = "/Volumes/NoahDay5TB/cases/monthwim/history/iceh.2005-09.nc";
filename_none = "/Volumes/NoahDay5TB/cases/noforcing/history/iceh.2005-07.nc";
grid = "gx1";
[lat,lon,row] = grid_read(grid);
lat_vec = reshape(lat,1,[]);
lon_vec = reshape(lon,1,[]);
dim = 2;
SIC_threshold = 0.15;
sector = "SH";
aice_wim = data_format(filename_wim,'aice');
afsdn_none = data_format(filename_none,'afsdn');
aice_none = fsd_converter(filename_none,"afsdn","aice",afsdn_none,sector);
% Ice mask
icemask_wim = aice_wim > SIC_threshold;
icemask_none = aice_none > SIC_threshold;
%% Plotting
close all
clc
% Representative radius WITH waves
data = data_format(filename_wim,'fsdrad');
idx = data < eps;
data(idx) = NaN;
data(~icemask_wim) = NaN;
conFigure(11,1)
f = figure;
w = worldmap('world');
axesm eqaazim; %, eqaazim eqdazim vperspec, eqdazim flips the x-axis, and y-axis to eqaazim. cassini
setm(w, 'Origin', [-90 0 0]);
setm(w, 'maplatlimit', [-90,-55]);
setm(w, 'maplonlimit', [-180,180]);
setm(w, 'meridianlabel', 'on')
setm(w, 'parallellabel', 'off')
setm(w, 'mlabellocation', 60);
setm(w, 'plabellocation', 10);
setm(w, 'mlabelparallel', -45);
setm(w, 'grid', 'on');
%setm(w, 'frame', 'on');
setm(w, 'labelrotation', 'on')
pcolorm(lat,lon,data)
land = shaperead('landareas', 'UseGeoCoords', true);
geoshow(w, land, 'FaceColor', [0.5 0.7 0.5])
c = colorbar;
c.TickLabelInterpreter = 'latex';
c.Label.String = 'Mean floe size radius [m]';
c.Label.Interpreter = 'latex';
caxis([0,3000]);
%quiverm(lat_vec,lon_vec,u_vec,v_vec,'k')
%exportgraphics(f,'swhtest.pdf','ContentType','vector')
% Representative radius WITHOUT waves
data = data_format(filename_none,'fsdrad');
idx = data < eps;
data(idx) = NaN;
data(~icemask_none) = NaN;
f = figure;
w = worldmap('world');
axesm eqaazim; %, eqaazim eqdazim vperspec, eqdazim flips the x-axis, and y-axis to eqaazim. cassini
setm(w, 'Origin', [-90 0 0]);
setm(w, 'maplatlimit', [-90,-55]);
setm(w, 'maplonlimit', [-180,180]);
setm(w, 'meridianlabel', 'on')
setm(w, 'parallellabel', 'off')
setm(w, 'mlabellocation', 60);
setm(w, 'plabellocation', 10);
setm(w, 'mlabelparallel', -45);
setm(w, 'grid', 'on');
%setm(w, 'frame', 'on');
setm(w, 'labelrotation', 'on')
pcolorm(lat,lon,data)
land = shaperead('landareas', 'UseGeoCoords', true);
geoshow(w, land, 'FaceColor', [0.5 0.7 0.5])
c = colorbar;
c.TickLabelInterpreter = 'latex';
c.Label.String = 'Mean floe size radius [m]';
c.Label.Interpreter = 'latex';
caxis([0,3000]);
%quiverm(lat_vec,lon_vec,u_vec,v_vec,'k')
% Significant wave height WITH waves
data = data_format(filename_wim,'wave_sig_ht');
idx = data < eps;
data(idx) = NaN;
data(~icemask_wim) = NaN;
f = figure;
w = worldmap('world');
axesm eqaazim; %, eqaazim eqdazim vperspec, eqdazim flips the x-axis, and y-axis to eqaazim. cassini
setm(w, 'Origin', [-90 0 0]);
setm(w, 'maplatlimit', [-90,-55]);
setm(w, 'maplonlimit', [-180,180]);
setm(w, 'meridianlabel', 'on')
setm(w, 'parallellabel', 'off')
setm(w, 'mlabellocation', 60);
setm(w, 'plabellocation', 10);
setm(w, 'mlabelparallel', -45);
setm(w, 'grid', 'on');
%setm(w, 'frame', 'on');
setm(w, 'labelrotation', 'on')
pcolorm(lat,lon,data)
land = shaperead('landareas', 'UseGeoCoords', true);
geoshow(w, land, 'FaceColor', [0.5 0.7 0.5])
c = colorbar;
c.TickLabelInterpreter = 'latex';
c.Label.String = 'Mean floe size radius [m]';
c.Label.Interpreter = 'latex';
%c.Limits = [0,5];
caxis([0,5])
%quiverm(lat_vec,lon_vec,u_vec,v_vec,'k')
%% Change in FSD
close all
% Waves
dafsd_wave = data_format(filename_wim,'dafsd_wave');
data = fsd_converter(filename_wim,"dafsd_wave","fsdrad",dafsd_wave,sector);
data(~icemask_wim) = NaN;
data = data .*aice_wim;
f = figure;
w = worldmap('world');
axesm eqaazim; %, eqaazim eqdazim vperspec, eqdazim flips the x-axis, and y-axis to eqaazim. cassini
setm(w, 'Origin', [-90 0 0]);
setm(w, 'maplatlimit', [-90,-55]);
setm(w, 'maplonlimit', [-180,180]);
setm(w, 'meridianlabel', 'on')
setm(w, 'parallellabel', 'off')
setm(w, 'mlabellocation', 60);
setm(w, 'plabellocation', 10);
setm(w, 'mlabelparallel', -45);
setm(w, 'grid', 'on');
%setm(w, 'frame', 'on');
setm(w, 'labelrotation', 'on')
pcolorm(lat,lon,data)
land = shaperead('landareas', 'UseGeoCoords', true);
geoshow(w, land, 'FaceColor', [0.5 0.7 0.5])
c = colorbar;
c.TickLabelInterpreter = 'latex';
c.Label.String = 'Change in FSD due to waves [m/day]';
c.Label.Interpreter = 'latex';
cmocean('balance')
%c.Limits = [0,5];
caxis([-10,10])
% New ice
dafsd_wave = data_format(filename_wim,'dafsd_newi');
data = fsd_converter(filename_wim,"dafsd_newi","fsdrad",dafsd_wave,sector);
data(~icemask_wim) = NaN;
data = data .*aice_wim;
f = figure;
w = worldmap('world');
axesm eqaazim; %, eqaazim eqdazim vperspec, eqdazim flips the x-axis, and y-axis to eqaazim. cassini
setm(w, 'Origin', [-90 0 0]);
setm(w, 'maplatlimit', [-90,-55]);
setm(w, 'maplonlimit', [-180,180]);
setm(w, 'meridianlabel', 'on')
setm(w, 'parallellabel', 'off')
setm(w, 'mlabellocation', 60);
setm(w, 'plabellocation', 10);
setm(w, 'mlabelparallel', -45);
setm(w, 'grid', 'on');
%setm(w, 'frame', 'on');
setm(w, 'labelrotation', 'on')
pcolorm(lat,lon,data)
land = shaperead('landareas', 'UseGeoCoords', true);
geoshow(w, land, 'FaceColor', [0.5 0.7 0.5])
c = colorbar;
c.TickLabelInterpreter = 'latex';
c.Label.String = 'Change in FSD due to new floes [m/day]';
c.Label.Interpreter = 'latex';
cmocean('balance')
%c.Limits = [0,5];
caxis([-10,10])
% Weld
dafsd_wave = data_format(filename_wim,'dafsd_weld');
data = fsd_converter(filename_wim,"dafsd_weld","fsdrad",dafsd_wave,sector);
data(~icemask_wim) = NaN;
data = data .*aice_wim;
f = figure;
w = worldmap('world');
axesm eqaazim; %, eqaazim eqdazim vperspec, eqdazim flips the x-axis, and y-axis to eqaazim. cassini
setm(w, 'Origin', [-90 0 0]);
setm(w, 'maplatlimit', [-90,-55]);
setm(w, 'maplonlimit', [-180,180]);
setm(w, 'meridianlabel', 'on')
setm(w, 'parallellabel', 'off')
setm(w, 'mlabellocation', 60);
setm(w, 'plabellocation', 10);
setm(w, 'mlabelparallel', -45);
setm(w, 'grid', 'on');
%setm(w, 'frame', 'on');
setm(w, 'labelrotation', 'on')
pcolorm(lat,lon,data)
land = shaperead('landareas', 'UseGeoCoords', true);
geoshow(w, land, 'FaceColor', [0.5 0.7 0.5])
c = colorbar;
c.TickLabelInterpreter = 'latex';
c.Label.String = 'Change in FSD due to welding [m/day]';
c.Label.Interpreter = 'latex';
cmocean('balance')
%c.Limits = [0,5];
caxis([-1,0.1])