-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextract.pro
306 lines (253 loc) · 7.78 KB
/
extract.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
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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
Pro extract
; set the directory
CD, 'D:\earlylife_seibm'; Directory
;file = FILEPATH('1998_whole.dat', Root_dir = 'C:', SUBDIR = 'IDLWorkspace80\FishCirc')
; cutoff size for transport
;Scenario1 = 'Baseline10mm_Depth_pval'
;Scenario2 = 'Baseline20mm_Depth_pval'
;Scenario3 = 'Baseline30mm_Depth_pval'
Scenario1 = 'Baseline10mm_NoDepth'
Scenario2 = 'Baseline20mm_NoDepth'
Scenario3 = 'Baseline30mm_NoDepth'
; For the following scenarios, the cutoff size is 20mm
Scenario4 = 'Pval_base'
Scenario5 = 'Pval_HighDec'
Scenario6 = 'Pval_LowDec'
Scenario7 = 'Pval_HighInc'
Scenario8 = 'Pval_LowInc'
Scenario9 = 'Pred_base'
Scenario10 = 'Pred_HighDec'
Scenario11 = 'Pred_LowDec'
Scenario12 = 'Pred_HighInc'
Scenario13 = 'Pred_LowInc'
Scenario14 = 'Pval_HighDec+Pred_HighInc'
Scenario15 = 'Pval_HighInc+Pred_HighInc'
Scenario16 = 'Pval_HighDec+Pred_HighDec'
Scenario17 = 'Pval_HighInc+Pred_HighDec'
; Set the simulation scenario
Scenario = Scenario1; for all years 1998-2003
tstart1 = SYSTIME(/seconds); timer to annual simulations
; Year 1998
Year='1998_'
Filename98=Year+Scenario+'_output.csv'
Filename98sum=Year+Scenario+'_summary.csv'
;openr, lun, 'alewife1998_whole.dat', /GET_LUN
openr, lun, 'inputfiles\AW_PHYS_1998s.dat', /GET_LUN
;array=fltarr(9,2095080)
array=fltarr(9,35802000L)
readf, lun, array
free_lun, lun
arr=fltarr(10,35802000L)
;arr=array[*,1299480:2095079]
arr[0:8,*]=array
;arr[9, *]=(indgen(3315)+1L) # REPLICATE(1., 90*4*30L)
output=fish_circmod(arr, scenario)
summary=summarize(output, Filename98sum)
; Export the output
s = Size(output, /Dimensions)
xsize = s[0]
lineWidth = 1600000
comma = ","
openw, lun, Filename98, /get_lun, Width=lineWidth
sOutput = StrTrim(output, 2)
sOutput[0:xsize-2, *] = sOutput[0:xsize-2, *] + comma
PrintF, lun, sOutput
free_lun, lun
;s = Size(summary, /Dimensions)
;xsize = s[0]
;lineWidth = 1600000
;comma = ","
;openw, lun, Filename98sum, /get_lun, Width=lineWidth
;sSummary = StrTrim(Summary, 2)
;sSummary[0:xsize-2, *] = sSummary[0:xsize-2, *] + comma
;PrintF, lun, sSummary
;free_lun, lun
t_elapsed = systime(/seconds) - tstart1
;PRINT, 'Elapesed time (seconds) for all simulations:', t_elapsed
PRINT, 'Elapesed time (minutes) for all simulations for 1998:', t_elapsed/60.
; Year 1999
Year='1999_'
Filename99=Year+Scenario+'_output.csv'
Filename99sum=Year+Scenario+'_summary.csv'
;openr, lun, '1999_whole.dat', /GET_LUN
openr, lun, 'inputfiles\AW_PHYS_1999s.dat', /GET_LUN
;array=fltarr(9,2095080)
array=fltarr(9,35802000L)
readf, lun, array
free_lun, lun
arr=fltarr(10,35802000L)
;arr=array[*,1299480:2095079]
arr[0:8,*]=array
;arr[9, *]=(indgen(3315)+1L) # REPLICATE(1., 90*4*30L)
output=awf_circmod(arr, scenario)
summary=summarize(output, Filename99sum)
; Export the output
s = Size(output, /Dimensions)
xsize = s[0]
lineWidth = 1600000
comma = ","
openw, lun, Filename99, /get_lun, Width=lineWidth
sOutput = StrTrim(output, 2)
sOutput[0:xsize-2, *] = sOutput[0:xsize-2, *] + comma
PrintF, lun, sOutput
free_lun, lun
;s = Size(summary, /Dimensions)
;xsize = s[0]
;lineWidth = 1600000
;comma = ","
;openw, lun, Filename99sum, /get_lun, Width=lineWidth
;sSummary = StrTrim(Summary, 2)
;sSummary[0:xsize-2, *] = sSummary[0:xsize-2, *] + comma
;PrintF, lun, sSummary
;free_lun, lun
t_elapsed = systime(/seconds) - tstart1
PRINT, 'Elapesed time (minutes) for all simulations for 1999:', t_elapsed/60.
; Year 2000
Year='2000_'
Filename00=Year+Scenario+'_output.csv'
Filename00sum=Year+Scenario+'_summary.csv'
;openr, lun, 'alewife2000_whole.dat', /GET_LUN
openr, lun, 'inputfiles\AW_PHYS_2000s.dat', /GET_LUN
;array=fltarr(9,2095080)
array=fltarr(9,35802000L)
readf, lun, array
free_lun, lun
arr=fltarr(10,35802000L)
;arr=array[*,1299480:2095079]
arr[0:8,*]=array
;arr[9, *]=(indgen(3315)+1L) # REPLICATE(1., 90*4*30L)
output=awf_circmod(arr, scenario)
summary=summarize(output, Filename00sum)
; Export the output
s = Size(output, /Dimensions)
xsize = s[0]
lineWidth = 1600000
comma = ","
openw, lun, Filename00, /get_lun, Width=lineWidth
sOutput = StrTrim(output, 2)
sOutput[0:xsize-2, *] = sOutput[0:xsize-2, *] + comma
PrintF, lun, sOutput
free_lun, lun
;s = Size(summary, /Dimensions)
;xsize = s[0]
;lineWidth = 1600000
;comma = ","
;openw, lun, Filename00sum, /get_lun, Width=lineWidth
;sSummary = StrTrim(Summary, 2)
;sSummary[0:xsize-2, *] = sSummary[0:xsize-2, *] + comma
;PrintF, lun, sSummary
;free_lun, lun
t_elapsed = systime(/seconds) - tstart1
PRINT, 'Elapesed time (minutes) for all simulations for 2000:', t_elapsed/60.
; Year 2001
Year='2001_'
Filename01=Year+Scenario+'_output.csv'
Filename01sum=Year+Scenario+'_summary.csv'
;openr, lun, 'alewife2001_whole.dat', /GET_LUN
openr, lun, 'inputfiles\AW_PHYS_2001s.dat', /GET_LUN
;array=fltarr(9,2095080)
array=fltarr(9,35802000L)
readf, lun, array
free_lun, lun
arr=fltarr(10,35802000L)
;arr=array[*,1299480:2095079]
arr[0:8,*]=array
;arr[9, *]=(indgen(3315)+1L) # REPLICATE(1., 90*4*30L)
output=awf_circmod(arr, scenario)
summary=summarize(output, Filename01sum)
; Export the output
s = Size(output, /Dimensions)
xsize = s[0]
lineWidth = 1600000
comma = ","
openw, lun, Filename01, /get_lun, Width=lineWidth
sOutput = StrTrim(output, 2)
sOutput[0:xsize-2, *] = sOutput[0:xsize-2, *] + comma
PrintF, lun, sOutput
free_lun, lun
;s = Size(summary, /Dimensions)
;xsize = s[0]
;lineWidth = 1600000
;comma = ","
;openw, lun, Filename01sum, /get_lun, Width=lineWidth
;sSummary = StrTrim(Summary, 2)
;sSummary[0:xsize-2, *] = sSummary[0:xsize-2, *] + comma
;PrintF, lun, sSummary
;free_lun, lun
t_elapsed = systime(/seconds) - tstart1
PRINT, 'Elapesed time (minutes) for all simulations for 2001:', t_elapsed/60.
; Year 2002
Year='2002_'
Filename02=Year+Scenario+'_output.csv'
Filename02sum=Year+Scenario+'_summary.csv'
;openr, lun, 'alewife2002_whole.dat', /GET_LUN
openr, lun, 'inputfiles\AW_PHYS_2002s.dat', /GET_LUN
;array=fltarr(9,2095080)
array=fltarr(9,35802000L)
readf, lun, array
free_lun, lun
arr=fltarr(10,35802000L)
;arr=array[*,1299480:2095079]
arr[0:8,*]=array
;arr[9, *]=(indgen(3315)+1L) # REPLICATE(1., 90*4*30L)
output=awf_circmod(arr, scenario)
summary=summarize(output, Filename02sum)
; Export the output
s = Size(output, /Dimensions)
xsize = s[0]
lineWidth = 1600000
comma = ","
openw, lun, Filename02, /get_lun, Width=lineWidth
sOutput = StrTrim(output, 2)
sOutput[0:xsize-2, *] = sOutput[0:xsize-2, *] + comma
PrintF, lun, sOutput
free_lun, lun
;s = Size(summary, /Dimensions)
;xsize = s[0]
;lineWidth = 1600000
;comma = ","
;openw, lun, Filename02sum, /get_lun, Width=lineWidth
;sSummary = StrTrim(Summary, 2)
;sSummary[0:xsize-2, *] = sSummary[0:xsize-2, *] + comma
;PrintF, lun, sSummary
;free_lun, lun
t_elapsed = systime(/seconds) - tstart1
PRINT, 'Elapesed time (minutes) for all simulations for 2002:', t_elapsed/60.
; Year 2003
Year='2003_'
Filename03=Year+Scenario+'_output.csv'
Filename03sum=Year+Scenario+'_summary.csv'
;openr, lun, 'alewife2003_whole.dat', /GET_LUN
openr, lun, 'inputfiles\AW_PHYS_2003s.dat', /GET_LUN
;array=fltarr(9,2095080)
array=fltarr(9,35802000L)
readf, lun, array
free_lun, lun
arr=fltarr(10,35802000L)
;arr=array[*,1299480:2095079]
arr[0:8,*]=array
;arr[9, *]=(indgen(3315)+1L) # REPLICATE(1., 90*4*30L)
output=awf_circmod(arr, scenario)
summary=summarize(output, Filename03sum)
; Export the output
s = Size(output, /Dimensions)
xsize = s[0]
lineWidth = 1600000
comma = ","
openw, lun, Filename03, /get_lun, Width=lineWidth
sOutput = StrTrim(output, 2)
sOutput[0:xsize-2, *] = sOutput[0:xsize-2, *] + comma
PrintF, lun, sOutput
free_lun, lun
;s = Size(summary, /Dimensions)
;xsize = s[0]
;lineWidth = 1600000
;comma = ","
;openw, lun, Filename03sum, /get_lun, Width=lineWidth
;sSummary = StrTrim(Summary, 2)
;sSummary[0:xsize-2, *] = sSummary[0:xsize-2, *] + comma
;PrintF, lun, sSummary
;free_lun, lun
t_elapsed = systime(/seconds) - tstart1
PRINT, 'Elapesed time (minutes) for all simulations for 2003:', t_elapsed/60.
END