-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsea_post_v3.pro
184 lines (136 loc) · 6.58 KB
/
sea_post_v3.pro
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
pro sea_post_v3
xdim = 57600ULL
ydim = 24000ULL
topx = 6671703.1176
topy = 4447802.0784
pix_width = 231.65635825
grid_width = 100000. ;50km
min_pdf_points = 1000 ; for cl7090100
train_file = '~/global_250m/samples/hlorey_train_v3/sea/train_hlorey_sea_v3_cl7090100_wbin.csv'
in_dir = '/nobackup/yyu1/global_250m_output/sea/cl_7090100'
out_dir = '/nobackup/yyu1/global_250m_output/sea/cl_7090100/results'
bin_file = '~/global_250m/samples/hlorey_train_v3/sea/bin_hlorey_sea_v3_cl7090100.csv'
spawn, 'mkdir ' + out_dir
spawn, 'find ' + in_dir + ' -name "*.gz" | parallel -j 10 gunzip {}'
;create local pdf
grid_nx = fix(xdim * pix_width / grid_width) + 1
grid_ny = fix(ydim * pix_width / grid_width) + 1
train_data = read_csv(train_file)
n_plots = n_elements(train_data.(0))
def_bin_data = read_csv(bin_file)
def_nbins = n_elements(def_bin_data.(0))
pdf_2d, train_data.(1), train_data.(2), train_data.(4), def_nbins, grid_width, topx, grid_nx, topy, grid_ny, pdf_out, min_pdf_points
maxent_post_vectorized_prior, xdim, ydim, in_dir, out_dir, bin_file, pdf_out
;print, !error_state.code
;if (!error_state.code eq -104 or !error_state.code eq 0) then begin
; spawn, 'rm ' + in_dir + '/*.bil'
; message, /reset
;endif
;-----------------------
train_file = '~/global_250m/samples/hlorey_train_v3/sea/train_hlorey_sea_v3_cl7090100_wbin.csv'
in_dir = '/nobackup/yyu1/global_250m_output/sea/cl_7090100_nomodis'
out_dir = '/nobackup/yyu1/global_250m_output/sea/cl_7090100_nomodis/results'
bin_file = '~/global_250m/samples/hlorey_train_v3/sea/bin_hlorey_sea_v3_cl7090100.csv'
spawn, 'mkdir ' + out_dir
spawn, 'find ' + in_dir + ' -name "*.gz" | parallel -j 10 gunzip {}'
;create local pdf
grid_nx = fix(xdim * pix_width / grid_width) + 1
grid_ny = fix(ydim * pix_width / grid_width) + 1
train_data = read_csv(train_file)
n_plots = n_elements(train_data.(0))
def_bin_data = read_csv(bin_file)
def_nbins = n_elements(def_bin_data.(0))
pdf_2d, train_data.(1), train_data.(2), train_data.(4), def_nbins, grid_width, topx, grid_nx, topy, grid_ny, pdf_out, min_pdf_points
maxent_post_vectorized_prior, xdim, ydim, in_dir, out_dir, bin_file, pdf_out
;print, !error_state.code
;if (!error_state.code eq -104 or !error_state.code eq 0) then begin
; spawn, 'rm ' + in_dir + '/*.bil'
; message, /reset
;endif
;-----------------------------
grid_width = 50000. ;50km
min_pdf_points = 5000
train_file = '~/global_250m/samples/hlorey_train_v3/sea/train_hlorey_sea_v3_cl40_wbin.csv'
in_dir = '/nobackup/yyu1/global_250m_output/sea/cl_40'
out_dir = '/nobackup/yyu1/global_250m_output/sea/cl_40/results'
bin_file = '~/global_250m/samples/hlorey_train_v3/sea/bin_hlorey_sea_v3_cl40.csv'
spawn, 'mkdir ' + out_dir
spawn, 'find ' + in_dir + ' -name "*.gz" | parallel -j 10 gunzip {}'
;create local pdf
grid_nx = fix(xdim * pix_width / grid_width) + 1
grid_ny = fix(ydim * pix_width / grid_width) + 1
train_data = read_csv(train_file)
n_plots = n_elements(train_data.(0))
def_bin_data = read_csv(bin_file)
def_nbins = n_elements(def_bin_data.(0))
pdf_2d, train_data.(1), train_data.(2), train_data.(4), def_nbins, grid_width, topx, grid_nx, topy, grid_ny, pdf_out, min_pdf_points
maxent_post_vectorized_prior, xdim, ydim, in_dir, out_dir, bin_file, pdf_out
;print, !error_state.code
;if (!error_state.code eq -104 or !error_state.code eq 0) then begin
; spawn, 'rm ' + in_dir + '/*.bil'
; message, /reset
;endif
;----------------------------------
train_file = '~/global_250m/samples/hlorey_train_v3/sea/train_hlorey_sea_v3_cl40_wbin.csv'
in_dir = '/nobackup/yyu1/global_250m_output/sea/cl_40_nomodis'
out_dir = '/nobackup/yyu1/global_250m_output/sea/cl_40_nomodis/results'
bin_file = '~/global_250m/samples/hlorey_train_v3/sea/bin_hlorey_sea_v3_cl40.csv'
spawn, 'mkdir ' + out_dir
spawn, 'find ' + in_dir + ' -name "*.gz" | parallel -j 10 gunzip {}'
;create local pdf
grid_nx = fix(xdim * pix_width / grid_width) + 1
grid_ny = fix(ydim * pix_width / grid_width) + 1
train_data = read_csv(train_file)
n_plots = n_elements(train_data.(0))
def_bin_data = read_csv(bin_file)
def_nbins = n_elements(def_bin_data.(0))
pdf_2d, train_data.(1), train_data.(2), train_data.(4), def_nbins, grid_width, topx, grid_nx, topy, grid_ny, pdf_out, min_pdf_points
maxent_post_vectorized_prior, xdim, ydim, in_dir, out_dir, bin_file, pdf_out
;print, !error_state.code
;if (!error_state.code eq -104 or !error_state.code eq 0) then begin
; spawn, 'rm ' + in_dir + '/*.bil'
; message, /reset
;endif
;-----------------------------
train_file = '~/global_250m/samples/hlorey_train_v3/sea/train_hlorey_sea_v3_clmisclass_wbin.csv'
in_dir = '/nobackup/yyu1/global_250m_output/sea/cl_misclass'
out_dir = '/nobackup/yyu1/global_250m_output/sea/cl_misclass/results'
bin_file = '~/global_250m/samples/hlorey_train_v3/sea/bin_hlorey_sea_v3_clmisclass.csv'
spawn, 'mkdir ' + out_dir
spawn, 'find ' + in_dir + ' -name "*.gz" | parallel -j 10 gunzip {}'
;create local pdf
grid_nx = fix(xdim * pix_width / grid_width) + 1
grid_ny = fix(ydim * pix_width / grid_width) + 1
train_data = read_csv(train_file)
n_plots = n_elements(train_data.(0))
def_bin_data = read_csv(bin_file)
def_nbins = n_elements(def_bin_data.(0))
pdf_2d, train_data.(1), train_data.(2), train_data.(4), def_nbins, grid_width, topx, grid_nx, topy, grid_ny, pdf_out, min_pdf_points
maxent_post_vectorized_prior, xdim, ydim, in_dir, out_dir, bin_file, pdf_out
;print, !error_state.code
;if (!error_state.code eq -104 or !error_state.code eq 0) then begin
; spawn, 'rm ' + in_dir + '/*.bil'
; message, /reset
;endif
;----------------------------------
train_file = '~/global_250m/samples/hlorey_train_v3/sea/train_hlorey_sea_v3_clmisclass_wbin.csv'
in_dir = '/nobackup/yyu1/global_250m_output/sea/cl_misclass_nomodis'
out_dir = '/nobackup/yyu1/global_250m_output/sea/cl_misclass_nomodis/results'
bin_file = '~/global_250m/samples/hlorey_train_v3/sea/bin_hlorey_sea_v3_clmisclass.csv'
spawn, 'mkdir ' + out_dir
spawn, 'find ' + in_dir + ' -name "*.gz" | parallel -j 10 gunzip {}'
;create local pdf
grid_nx = fix(xdim * pix_width / grid_width) + 1
grid_ny = fix(ydim * pix_width / grid_width) + 1
train_data = read_csv(train_file)
n_plots = n_elements(train_data.(0))
def_bin_data = read_csv(bin_file)
def_nbins = n_elements(def_bin_data.(0))
pdf_2d, train_data.(1), train_data.(2), train_data.(4), def_nbins, grid_width, topx, grid_nx, topy, grid_ny, pdf_out, min_pdf_points
maxent_post_vectorized_prior, xdim, ydim, in_dir, out_dir, bin_file, pdf_out
;print, !error_state.code
;if (!error_state.code eq -104 or !error_state.code eq 0) then begin
; spawn, 'rm ' + in_dir + '/*.bil'
; message, /reset
;endif
end