-
Notifications
You must be signed in to change notification settings - Fork 1
/
Sall.m
executable file
·98 lines (97 loc) · 2.67 KB
/
Sall.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
% The idea is that the code from step S01.. on can only
% accept one particular data structure.
% All S00.. steps are meant to prepare the raw input data to the desired format which should look as such:
% Daily .mat-files saved as
%
% exampleCut = load('../dataXXX/CUTS/CUT_yyyymmdd_SSS-NNN-WWW-EEE.mat')
%
% exampleCut.fields
%
% ans =
%
% ssh: [173x170 double]
% sshAnom: [173x170 double]
% U: [173x170 double]
% V: [173x170 double]
% absUV: [173x170 double]
% OkuboWeiss: [173x170 double]
%
%
% where XXX is the name of the current folder.
% The necessary field is exampleCut.fields.sshAnom which is (in [SI]) the SSH anomaly built by subtracting the time-mean of SSH from SSH.
%
% ------------------------------------
%
% Also necessary is the file
%
% w = load('../dataXXX/window.mat')
%
% w.window
%
% ans =
%
% flag: [2400x3600 logical]
% fullsize: [1x1 struct]
% dim: [1x1 struct]
% limits: [1x1 struct]
% idx: [173x170 double]
% type: 'normal'
% iy: [173x170 double]
% ix: [173x170 double]
% seam: 0
% dimPlus: [1x1 struct]
% geo: [1x1 struct]
% lat: [173x170 double]
% lon: [173x170 double]
% dy: [173x170 double]
% dx: [173x170 double]
%
%
% (See constructGeoFile.m for details.)
%
% ------------------------------------
%
% Also needed are maps of Rossby wave phase speed (1st baroclinic) and Rossby radius in the same format and geometry as everything else.
% The files need to be here:
%
% c = load('../dataXXX/ROSSBY/RossbyPhaseSpeed.mat')
% c =
%
% data: [YYYxXXX double]
% lat: [YYYxXXX single]
% lon: [YYYxXXX single]
%
% and
%
% L = load('../dataXXX/ROSSBY/RossbyRadius.mat')
% L =
%
% data: [YYYxXXX double]
% lat: [YYYxXXX single]
% lon: [YYYxXXX single]
%
%
% All input parameters are to be set in INPUT.m and INPUTx.m, where 'x' is eg 'POP'.
%
% ------------------------------------
%
% In the case of new input data, an edited copy of S00a.. should suffice to get the data into required format.
% It wouldnt hurt to rewrite S00b_rossbyStuff, as its coding is rather opaque..
%
% remember to run addpath(genpath('./')) when starting matlab
%% data preparation
% S00a_prep_raw_data
% S00b_rossbyStuff
% %% SSH 2 SSH-anomaly
% S00c_buildMeanSsh
% S00d_buildSshAnomaly
% %% main steps
% S01_calc_fields % probably redundant by now
% S02_contours % calc all contours of sshAnom
S03_filterContours % main bottleneck! filter all contours to test for eddy
S04_trackEddies % track found eddies through time dim
%% post process
P01_analyzeTracks
P02_analyzedTracks2maps
%% plotting
P03_plotting