-
Notifications
You must be signed in to change notification settings - Fork 0
/
WalleyeSizeStruc.pro
9805 lines (9358 loc) · 778 KB
/
WalleyeSizeStruc.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
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
PRO WalleyeSizeStruc
PRINT, 'a function to create lake-year-specific age-length keys of walleye stocks in Wisconsin, USA'
PRINT, 'Created: March, 2014'
PRINT, 'Updated: April, 19, 2014'
tstart = SYSTIME(/seconds); starting point for computation time
; Identify a direcotry for exporting daily output of state variables as .csv file
CD, 'C:\Users\Daisuke\Desktop\Walleye outputs'; Directory; F:\SNS_SEIBM
; File location
; All lakes
file = FILEPATH('Walleye_growth_data_IDL.csv', Root_dir = 'C:', SUBDIR = 'Users\Daisuke\Desktop\Walleye_production_project\Data')
; All lakes w/ length data only
; Lakes w/ 4 or more years of data
;file = FILEPATH('WAE_growth_data_Select_IDL.csv', Root_dir = 'C:', SUBDIR = 'Users\Daisuke Goto\Desktop\Walleye_production_project\Data')
; Lakes w/ 4 or more years of exploitation data
;file = FILEPATH('WAE_Growth_Expl_Data_Select_IDL.csv', Root_dir = 'C:', SUBDIR = 'Users\Daisuke Goto\Desktop\Walleye_production_project\Data')
; Escanaba only
; length
;file = FILEPATH('WAE_growth_L_data_Escanaba_IDL.csv', Root_dir = 'C:', SUBDIR = 'Users\Daisuke Goto\Desktop\Walleye_production_project\Data')
; weight
;file = FILEPATH('WAE_growth_W_data_Escanaba_IDL.csv', Root_dir = 'C:', SUBDIR = 'Users\Daisuke Goto\Desktop\Walleye_production_project\Data')
; Derived body mass data for yellow perch
; Check if the file is not blank
IF (N_ELEMENTS(file) EQ 0L) THEN MESSAGE, 'FILE is undefined'
;IF (N_ELEMENTS(maxcols) EQ 0L) THEN maxcols = 8L
; Read the file
; Input file order
; (1) WBIC_Year (2) WBIC (3) SurveyYear (4) Age (5) FracAge (6) LengthMM (7) Sex
; Define the data structure
N = 107866L; all lakes
;N = 108814L; all lakes with covariates
;N = 26667L; Lakes w/ >4 years of data
;N = 16290L; Lakes w/ >4 years of exploitation data
Data_Final = DOUBLE(FLTARR(8L, N))
OPENR, lun, file, /GET_LUN
READF, lun, Data_Final;, FORMAT='(A17, x, I0)';
WBIC_Year = Data_Final[0, *]
WBIC = Data_Final[1, *]
SurveyYear = Data_Final[2, *]
Age = Data_Final[3, *]
FracAge = Data_Final[4, *]
Length = Data_Final[5, *]
;LengthMM = Data_Final[5, *]
Sex = Data_Final[6, *]
FishID = Data_Final[7, *]
FREE_LUN, lun
; Find unique lake-years for growth curve parameterization
uniqWBIC_Year = WBIC_Year[UNIQ(WBIC_Year, SORT(WBIC_Year))]
PRINT, 'Total N of WBIC_years', n_elements(uniqWBIC_Year)
; Allocate an array for paramter outputs
paramset = FLTARR(156L, N_ELEMENTS(uniqWBIC_Year)); an array for growth model parameters
WAE_size_age = FLTARR(409L, N_ELEMENTS(uniqWBIC_Year)+1L); an array for mean size-at-age
WAE_size_age_all = FLTARR(198, max(SurveyYear)-min(SurveyYear)+1L)
;WAE_size_age_all = FLTARR(198, 40)
year = indgen(max(SurveyYear)-min(SurveyYear)+1L)+min(SurveyYear); an index for year
NumLengthBin = 37L; numebr of length bins in a default array (NEED TO CORRECT)
Nageclass = 28; number of age class
WAE_length_bin=fltarr(37*3L, N_ELEMENTS(uniqWBIC_Year)*NumLengthBin + 37)
; Pooling by YEAR
; For i = 0L, max(SurveyYear2)-min(SurveyYear2) do begin
; INDEX_growthdata_ALL = WHERE(SurveyYear2[*] EQ year[i], INDEX_growthdata_allcount)
;
; ;INDEX_growthdata = WHERE(WBIC_Year2[*] EQ uniqWBIC_Year[i], INDEX_growthdatacount)
;
; ; arrays based on N of samples: all records > unique WBIC_year > unique WBIC
; IF INDEX_growthdata_allcount GT 0 THEN BEGIN
; Nageclass = INTARR(3L, INDEX_growthdata_allcount); subarray w/ unique WBIC_year only
;
; ; FOR ii = 0L, INDEX_growthdata_allcount-1L DO BEGIN
; Numageclass = N_ELEMENTS(UNIQ(FIX(AGE[INDEX_growthdata_ALL]), SORT(FIX(AGE[INDEX_growthdata_ALL]), /L64)))
; Maxageclass = Max(AGE[INDEX_growthdata_ALL])
; Minageclass = Min(AGE[INDEX_growthdata_ALL])
;
;
; Length_Gro = Length2[INDEX_growthdata_ALL]
; Age_Gro = Age2[INDEX_growthdata_ALL]
; Sex_Gro = Sex2[INDEX_growthdata_ALL]
;
; Male = WHERE(Sex_Gro eq 0, malecount)
; Female = WHERE(Sex_Gro eq 1, femalecount)
; unknown = WHERE(Sex_Gro eq 2, unknowncount)
;
; IF malecouNt gt 0 then begin
; NumageclassM = N_ELEMENTS(UNIQ(FIX(AGE[INDEX_growthdata_ALL[male]]), SORT(FIX(AGE[INDEX_growthdata_ALL[male]]), /L64)))
; MaxageclassM = Max(AGE[INDEX_growthdata_ALL[male]])
; MinageclassM = Min(AGE[INDEX_growthdata_ALL[male]])
; endif
; if femalecount gt 0 then begin
; NumageclassF = N_ELEMENTS(UNIQ(FIX(AGE[INDEX_growthdata_ALL[female]]), SORT(FIX(AGE[INDEX_growthdata_ALL[female]]), /L64)))
; MaxageclassF = Max(AGE[INDEX_growthdata_ALL[female]])
; MinageclassF = Min(AGE[INDEX_growthdata_ALL[female]])
; endif
;
; ;paramset[0, i] = uniqWBIC_Year[i]
; paramset[1, i] = N_ELEMENTS(Length_Gro)
; ;paramset[2, i] = WBIC2[INDEX_growthdata_ALL[0]]
; paramset[3, i] = SurveyYear2[INDEX_growthdata_ALL[0]]
; ; ENDFOR
;
; ; All
; age1 = WHERE((AGE[INDEX_growthdata_all] EQ 1), Age1count)
; age2 = WHERE((AGE[INDEX_growthdata_all] EQ 2), AGE2count)
; age3 = WHERE((AGE[INDEX_growthdata_all] EQ 3), AGE3count)
; age4 = WHERE((AGE[INDEX_growthdata_all] EQ 4), AGE4count)
; age5 = WHERE((AGE[INDEX_growthdata_all] EQ 5) , AGE5count)
; age6 = WHERE((AGE[INDEX_growthdata_all] EQ 6) , AGE6count)
; age7 = WHERE((AGE[INDEX_growthdata_all] EQ 7) , AGE7count)
; age8 = WHERE((AGE[INDEX_growthdata_all] EQ 8), AGE8count)
; age9 = WHERE((AGE[INDEX_growthdata_all] EQ 9), AGE9count)
; age10 = WHERE((AGE[INDEX_growthdata_all] EQ 10), AGE10count)
; age11 = WHERE((AGE[INDEX_growthdata_all] EQ 11) , AGE11count)
; age12 = WHERE((AGE[INDEX_growthdata_all] EQ 12) , AGE12count)
; age13 = WHERE((AGE[INDEX_growthdata_all] EQ 13), AGE13count)
; ; Male
; age1M = WHERE((AGE[INDEX_growthdata_all] EQ 1) AND (SEX[INDEX_growthdata_all] EQ 0), Age1Mcount)
; age2M = WHERE((AGE[INDEX_growthdata_all] EQ 2) AND (SEX[INDEX_growthdata_all] EQ 0), AGE2Mcount)
; age3M = WHERE((AGE[INDEX_growthdata_all] EQ 3) AND (SEX[INDEX_growthdata_all] EQ 0), AGE3Mcount)
; age4M = WHERE((AGE[INDEX_growthdata_all] EQ 4) AND (SEX[INDEX_growthdata_all] EQ 0), AGE4Mcount)
; age5M = WHERE((AGE[INDEX_growthdata_all] EQ 5) AND (SEX[INDEX_growthdata_all] EQ 0), AGE5Mcount)
; age6M = WHERE((AGE[INDEX_growthdata_all] EQ 6) AND (SEX[INDEX_growthdata_all] EQ 0), AGE6Mcount)
; age7M = WHERE((AGE[INDEX_growthdata_all] EQ 7) AND (SEX[INDEX_growthdata_all] EQ 0), AGE7Mcount)
; age8M = WHERE((AGE[INDEX_growthdata_all] EQ 8) AND (SEX[INDEX_growthdata_all] EQ 0), AGE8Mcount)
; age9M = WHERE((AGE[INDEX_growthdata_all] EQ 9) AND (SEX[INDEX_growthdata_all] EQ 0), AGE9Mcount)
; age10M = WHERE((AGE[INDEX_growthdata_all] EQ 10) AND (SEX[INDEX_growthdata_all] EQ 0), AGE10Mcount)
; age11M = WHERE((AGE[INDEX_growthdata_all] EQ 11) AND (SEX[INDEX_growthdata_all] EQ 0), AGE11Mcount)
; age12M = WHERE((AGE[INDEX_growthdata_all] EQ 12) AND (SEX[INDEX_growthdata_all] EQ 0), AGE12Mcount)
; age13M = WHERE((AGE[INDEX_growthdata_all] EQ 13) AND (SEX[INDEX_growthdata_all] EQ 0), AGE13Mcount)
; ; Female
; age1F = WHERE((AGE[INDEX_growthdata_all] EQ 1) AND (SEX[INDEX_growthdata_all] EQ 1), Age1Fcount)
; age2F = WHERE((AGE[INDEX_growthdata_all] EQ 2) AND (SEX[INDEX_growthdata_all] EQ 1), AGE2Fcount)
; age3F = WHERE((AGE[INDEX_growthdata_all] EQ 3) AND (SEX[INDEX_growthdata_all] EQ 1), AGE3Fcount)
; age4F = WHERE((AGE[INDEX_growthdata_all] EQ 4) AND (SEX[INDEX_growthdata_all] EQ 1), AGE4Fcount)
; age5F = WHERE((AGE[INDEX_growthdata_all] EQ 5) AND (SEX[INDEX_growthdata_all] EQ 1), AGE5Fcount)
; age6F = WHERE((AGE[INDEX_growthdata_all] EQ 6) AND (SEX[INDEX_growthdata_all] EQ 1), AGE6Fcount)
; age7F = WHERE((AGE[INDEX_growthdata_all] EQ 7) AND (SEX[INDEX_growthdata_all] EQ 1), AGE7Fcount)
; age8F = WHERE((AGE[INDEX_growthdata_all] EQ 8) AND (SEX[INDEX_growthdata_all] EQ 1), AGE8Fcount)
; age9F = WHERE((AGE[INDEX_growthdata_all] EQ 9) AND (SEX[INDEX_growthdata_all] EQ 1), AGE9Fcount)
; age10F = WHERE((AGE[INDEX_growthdata_all] EQ 10) AND (SEX[INDEX_growthdata_all] EQ 1), AGE10Fcount)
; age11F = WHERE((AGE[INDEX_growthdata_all] EQ 11) AND (SEX[INDEX_growthdata_all] EQ 1), AGE11Fcount)
; age12F = WHERE((AGE[INDEX_growthdata_all] EQ 12) AND (SEX[INDEX_growthdata_all] EQ 1), AGE12Fcount)
; age13F = WHERE((AGE[INDEX_growthdata_all] EQ 13) AND (SEX[INDEX_growthdata_all] EQ 1), AGE13Fcount)
;
; ;WAE_size_age_all[0, ii] = 'All_annual'
; ;WAE_size_age_all[1, ii] = 'All'
; WAE_size_age_all[2, i] = year[i]
;
; IF Age1Mcount GT 0. THEN BEGIN
; WAE_size_age_all[3, i] = MEAN(Length[INDEX_growthdata_all[age1M]])
; WAE_size_age_all[4, i] = STDDEV(Length[INDEX_growthdata_all[age1M]])
; WAE_size_age_all[5, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age1M]])
; WAE_size_age_all[6, i] = MAX(Length[INDEX_growthdata_all[age1M]])
; WAE_size_age_all[7, i] = MIN(Length[INDEX_growthdata_all[age1M]])
; ENDIF
; IF Age2Mcount GT 0. THEN BEGIN
; WAE_size_age_all[8, i] = MEAN(Length[INDEX_growthdata_all[age2M]])
; WAE_size_age_all[9, i] = STDDEV(Length[INDEX_growthdata_all[age2M]])
; WAE_size_age_all[10, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age2M]])
; WAE_size_age_all[11, i] = MAX(Length[INDEX_growthdata_all[age2M]])
; WAE_size_age_all[12, i] = MIN(Length[INDEX_growthdata_all[age2M]])
; ENDIF
; IF Age3Mcount GT 0. THEN BEGIN
; WAE_size_age_all[13, i] = MEAN(Length[INDEX_growthdata_all[age3M]])
; WAE_size_age_all[14, i] = STDDEV(Length[INDEX_growthdata_all[age3M]])
; WAE_size_age_all[15, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age4M]])
; WAE_size_age_all[16, i] = MAX(Length[INDEX_growthdata_all[age3M]])
; WAE_size_age_all[17, i] = MIN(Length[INDEX_growthdata_all[age3M]])
; ENDIF
; IF Age4Mcount GT 0. THEN BEGIN
; WAE_size_age_all[18, i] = MEAN(Length[INDEX_growthdata_all[age4M]])
; WAE_size_age_all[19, i] = STDDEV(Length[INDEX_growthdata_all[age4M]])
; WAE_size_age_all[20, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age4M]])
; WAE_size_age_all[21, i] = MAX(Length[INDEX_growthdata_all[age4M]])
; WAE_size_age_all[22, i] = MIN(Length[INDEX_growthdata_all[age4M]])
; ENDIF
; IF Age5Mcount GT 0. THEN BEGIN
; WAE_size_age_all[23, i] = MEAN(Length[INDEX_growthdata_all[age5M]])
; WAE_size_age_all[24, i] = STDDEV(Length[INDEX_growthdata_all[age5M]])
; WAE_size_age_all[25, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age5M]])
; WAE_size_age_all[26, i] = MAX(Length[INDEX_growthdata_all[age5M]])
; WAE_size_age_all[27, i] = MIN(Length[INDEX_growthdata_all[age5M]])
; ENDIF
; IF Age6Mcount GT 0. THEN BEGIN
; WAE_size_age_all[28, i] = MEAN(Length[INDEX_growthdata_all[age6M]])
; WAE_size_age_all[29, i] = STDDEV(Length[INDEX_growthdata_all[age6M]])
; WAE_size_age_all[30, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age6M]])
; WAE_size_age_all[31, i] = MAX(Length[INDEX_growthdata_all[age6M]])
; WAE_size_age_all[32, i] = MIN(Length[INDEX_growthdata_all[age6M]])
; ENDIF
; IF Age7Mcount GT 0. THEN BEGIN
; WAE_size_age_all[33, i] = MEAN(Length[INDEX_growthdata_all[age7M]])
; WAE_size_age_all[34, i] = STDDEV(Length[INDEX_growthdata_all[age7M]])
; WAE_size_age_all[35, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age7M]])
; WAE_size_age_all[36, i] = MAX(Length[INDEX_growthdata_all[age7M]])
; WAE_size_age_all[37, i] = MIN(Length[INDEX_growthdata_all[age7M]])
; ENDIF
; IF Age8Mcount GT 0. THEN BEGIN
; WAE_size_age_all[38, i] = MEAN(Length[INDEX_growthdata_all[age8M]])
; WAE_size_age_all[39, i] = STDDEV(Length[INDEX_growthdata_all[age8M]])
; WAE_size_age_all[40, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age8M]])
; WAE_size_age_all[41, i] = MAX(Length[INDEX_growthdata_all[age8M]])
; WAE_size_age_all[42, i] = MIN(Length[INDEX_growthdata_all[age8M]])
; ENDIF
; IF Age9Mcount GT 0. THEN BEGIN
; WAE_size_age_all[43, i] = MEAN(Length[INDEX_growthdata_all[age9M]])
; WAE_size_age_all[44, i] = STDDEV(Length[INDEX_growthdata_all[age9M]])
; WAE_size_age_all[45, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age9M]])
; WAE_size_age_all[46, i] = MAX(Length[INDEX_growthdata_all[age9M]])
; WAE_size_age_all[47, i] = MIN(Length[INDEX_growthdata_all[age9M]])
; ENDIF
; IF Age10Mcount GT 0. THEN BEGIN
; WAE_size_age_all[48, i] = MEAN(Length[INDEX_growthdata_all[age10M]])
; WAE_size_age_all[49, i] = STDDEV(Length[INDEX_growthdata_all[age10M]])
; WAE_size_age_all[50, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age10M]])
; WAE_size_age_all[51, i] = MAX(Length[INDEX_growthdata_all[age10M]])
; WAE_size_age_all[52, i] = MIN(Length[INDEX_growthdata_all[age10M]])
; ENDIF
; IF Age11Mcount GT 0. THEN BEGIN
; WAE_size_age_all[53, i] = MEAN(Length[INDEX_growthdata_all[age11M]])
; WAE_size_age_all[54, i] = STDDEV(Length[INDEX_growthdata_all[age11M]])
; WAE_size_age_all[55, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age11M]])
; WAE_size_age_all[56, i] = MAX(Length[INDEX_growthdata_all[age11M]])
; WAE_size_age_all[57, i] = MIN(Length[INDEX_growthdata_all[age11M]])
; ENDIF
; IF Age12Mcount GT 0. THEN BEGIN
; WAE_size_age_all[58, i] = MEAN(Length[INDEX_growthdata_all[age12M]])
; WAE_size_age_all[59, i] = STDDEV(Length[INDEX_growthdata_all[age12M]])
; WAE_size_age_all[60, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age12M]])
; WAE_size_age_all[61, i] = MAX(Length[INDEX_growthdata_all[age12M]])
; WAE_size_age_all[62, i] = MIN(Length[INDEX_growthdata_all[age12M]])
; ENDIF
; IF Age13Mcount GT 0. THEN BEGIN
; WAE_size_age_all[63, i] = MEAN(Length[INDEX_growthdata_all[age13M]])
; WAE_size_age_all[64, i] = STDDEV(Length[INDEX_growthdata_all[age13M]])
; WAE_size_age_all[65, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age13M]])
; WAE_size_age_all[66, i] = MAX(Length[INDEX_growthdata_all[age13M]])
; WAE_size_age_all[67, i] = MIN(Length[INDEX_growthdata_all[age13M]])
; ENDIF
;
; ; Female
; IF Age1Fcount GT 0. THEN BEGIN
; WAE_size_age_all[68, i] = MEAN(Length[INDEX_growthdata_all[age1F]])
; WAE_size_age_all[69, i] = STDDEV(Length[INDEX_growthdata_all[age1F]])
; WAE_size_age_all[70, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age1F]])
; WAE_size_age_all[71, i] = MAX(Length[INDEX_growthdata_all[age1F]])
; WAE_size_age_all[72, i] = MIN(Length[INDEX_growthdata_all[age1F]])
; ENDIF
; IF Age2Fcount GT 0. THEN BEGIN
; WAE_size_age_all[73, i] = MEAN(Length[INDEX_growthdata_all[age2F]])
; WAE_size_age_all[74, i] = STDDEV(Length[INDEX_growthdata_all[age2F]])
; WAE_size_age_all[75, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age2F]])
; WAE_size_age_all[76, i] = MAX(Length[INDEX_growthdata_all[age2F]])
; WAE_size_age_all[77, i] = MIN(Length[INDEX_growthdata_all[age2F]])
; ENDIF
; IF Age3Fcount GT 0. THEN BEGIN
; WAE_size_age_all[78, i] = MEAN(Length[INDEX_growthdata_all[age3F]])
; WAE_size_age_all[79, i] = STDDEV(Length[INDEX_growthdata_all[age3F]])
; WAE_size_age_all[80, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age3F]])
; WAE_size_age_all[81, i] = MAX(Length[INDEX_growthdata_all[age3F]])
; WAE_size_age_all[82, i] = MIN(Length[INDEX_growthdata_all[age3F]])
; ENDIF
; IF Age4Fcount GT 0. THEN BEGIN
; WAE_size_age_all[83, i] = MEAN(Length[INDEX_growthdata_all[age4F]])
; WAE_size_age_all[84, i] = STDDEV(Length[INDEX_growthdata_all[age4F]])
; WAE_size_age_all[85, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age4F]])
; WAE_size_age_all[86, i] = MAX(Length[INDEX_growthdata_all[age4F]])
; WAE_size_age_all[87, i] = MIN(Length[INDEX_growthdata_all[age4F]])
; ENDIF
; IF Age5Fcount GT 0. THEN BEGIN
; WAE_size_age_all[88, i] = MEAN(Length[INDEX_growthdata_all[age5F]])
; WAE_size_age_all[89, i] = STDDEV(Length[INDEX_growthdata_all[age5F]])
; WAE_size_age_all[90, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age5F]])
; WAE_size_age_all[91, i] = MAX(Length[INDEX_growthdata_all[age5F]])
; WAE_size_age_all[92, i] = MIN(Length[INDEX_growthdata_all[age5F]])
; ENDIF
; IF Age6Fcount GT 0. THEN BEGIN
; WAE_size_age_all[93, i] = MEAN(Length[INDEX_growthdata_all[age6F]])
; WAE_size_age_all[94, i] = STDDEV(Length[INDEX_growthdata_all[age6F]])
; WAE_size_age_all[95, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age6F]])
; WAE_size_age_all[96, i] = MAX(Length[INDEX_growthdata_all[age6F]])
; WAE_size_age_all[97, i] = MIN(Length[INDEX_growthdata_all[age6F]])
; ENDIF
; IF Age7Fcount GT 0. THEN BEGIN
; WAE_size_age_all[98, i] = MEAN(Length[INDEX_growthdata_all[age7F]])
; WAE_size_age_all[99, i] = STDDEV(Length[INDEX_growthdata_all[age7F]])
; WAE_size_age_all[100, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age7F]])
; WAE_size_age_all[101, i] = MAX(Length[INDEX_growthdata_all[age7F]])
; WAE_size_age_all[102, i] = MIN(Length[INDEX_growthdata_all[age7F]])
; ENDIF
; IF Age8Fcount GT 0. THEN BEGIN
; WAE_size_age_all[103, i] = MEAN(Length[INDEX_growthdata_all[age8F]])
; WAE_size_age_all[104, i] = STDDEV(Length[INDEX_growthdata_all[age8F]])
; WAE_size_age_all[105, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age8F]])
; WAE_size_age_all[106, i] = MAX(Length[INDEX_growthdata_all[age8F]])
; WAE_size_age_all[107, i] = MIN(Length[INDEX_growthdata_all[age8F]])
; ENDIF
; IF Age9Fcount GT 0. THEN BEGIN
; WAE_size_age_all[108, i] = MEAN(Length[INDEX_growthdata_all[age9F]])
; WAE_size_age_all[109, i] = STDDEV(Length[INDEX_growthdata_all[age9F]])
; WAE_size_age_all[110, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age9F]])
; WAE_size_age_all[111, i] = MAX(Length[INDEX_growthdata_all[age9F]])
; WAE_size_age_all[112, i] = MIN(Length[INDEX_growthdata_all[age9F]])
; ENDIF
; IF Age10Fcount GT 0. THEN BEGIN
; WAE_size_age_all[113, i] = MEAN(Length[INDEX_growthdata_all[age10F]])
; WAE_size_age_all[114, i] = STDDEV(Length[INDEX_growthdata_all[age10F]])
; WAE_size_age_all[115, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age10F]])
; WAE_size_age_all[116, i] = MAX(Length[INDEX_growthdata_all[age10F]])
; WAE_size_age_all[117, i] = MIN(Length[INDEX_growthdata_all[age10F]])
; ENDIF
; IF Age11Fcount GT 0. THEN BEGIN
; WAE_size_age_all[118, i] = MEAN(Length[INDEX_growthdata_all[age11F]])
; WAE_size_age_all[119, i] = STDDEV(Length[INDEX_growthdata_all[age11F]])
; WAE_size_age_all[120, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age11F]])
; WAE_size_age_all[121, i] = MAX(Length[INDEX_growthdata_all[age11F]])
; WAE_size_age_all[122, i] = MIN(Length[INDEX_growthdata_all[age11F]])
; ENDIF
; IF Age12Fcount GT 0. THEN BEGIN
; WAE_size_age_all[123, i] = MEAN(Length[INDEX_growthdata_all[age12F]])
; WAE_size_age_all[124, i] = STDDEV(Length[INDEX_growthdata_all[age12F]])
; WAE_size_age_all[125, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age12F]])
; WAE_size_age_all[126, i] = MAX(Length[INDEX_growthdata_all[age12F]])
; WAE_size_age_all[127, i] = MIN(Length[INDEX_growthdata_all[age12F]])
; ENDIF
; IF Age13Fcount GT 0. THEN BEGIN
; WAE_size_age_all[128, i] = MEAN(Length[INDEX_growthdata_all[age13F]])
; WAE_size_age_all[129, i] = STDDEV(Length[INDEX_growthdata_all[age13F]])
; WAE_size_age_all[130, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age13F]])
; WAE_size_age_all[131, i] = MAX(Length[INDEX_growthdata_all[age13F]])
; WAE_size_age_all[132, i] = MIN(Length[INDEX_growthdata_all[age13F]])
; ENDIF
;
; ;all
; IF Age1count GT 0. THEN BEGIN
; WAE_size_age_all[133, i] = MEAN(Length[INDEX_growthdata_all[age1]])
; WAE_size_age_all[134, i] = STDDEV(Length[INDEX_growthdata_all[age1]])
; WAE_size_age_all[135, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age1]])
; WAE_size_age_all[136, i] = MAX(Length[INDEX_growthdata_all[age1]])
; WAE_size_age_all[137, i] = MIN(Length[INDEX_growthdata_all[age1]])
; ENDIF
; IF Age2count GT 0. THEN BEGIN
; WAE_size_age_all[138, i] = MEAN(Length[INDEX_growthdata_all[age2]])
; WAE_size_age_all[139, i] = STDDEV(Length[INDEX_growthdata_all[age2]])
; WAE_size_age_all[140, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age2]])
; WAE_size_age_all[141, i] = MAX(Length[INDEX_growthdata_all[age2]])
; WAE_size_age_all[142, i] = MIN(Length[INDEX_growthdata_all[age2]])
; ENDIF
; IF Age3count GT 0. THEN BEGIN
; WAE_size_age_all[143, i] = MEAN(Length[INDEX_growthdata_all[age3]])
; WAE_size_age_all[144, i] = STDDEV(Length[INDEX_growthdata_all[age3]])
; WAE_size_age_all[145, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age4]])
; WAE_size_age_all[146, i] = MAX(Length[INDEX_growthdata_all[age3]])
; WAE_size_age_all[147, i] = MIN(Length[INDEX_growthdata_all[age3]])
; ENDIF
; IF Age4count GT 0. THEN BEGIN
; WAE_size_age_all[148, i] = MEAN(Length[INDEX_growthdata_all[age4]])
; WAE_size_age_all[149, i] = STDDEV(Length[INDEX_growthdata_all[age4]])
; WAE_size_age_all[150, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age4]])
; WAE_size_age_all[151, i] = MAX(Length[INDEX_growthdata_all[age4]])
; WAE_size_age_all[152, i] = MIN(Length[INDEX_growthdata_all[age4]])
; ENDIF
; IF Age5count GT 0. THEN BEGIN
; WAE_size_age_all[153, i] = MEAN(Length[INDEX_growthdata_all[age5]])
; WAE_size_age_all[154, i] = STDDEV(Length[INDEX_growthdata_all[age5]])
; WAE_size_age_all[155, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age5]])
; WAE_size_age_all[156, i] = MAX(Length[INDEX_growthdata_all[age5]])
; WAE_size_age_all[157, i] = MIN(Length[INDEX_growthdata_all[age5]])
; ENDIF
; IF Age6count GT 0. THEN BEGIN
; WAE_size_age_all[158, i] = MEAN(Length[INDEX_growthdata_all[age6]])
; WAE_size_age_all[159, i] = STDDEV(Length[INDEX_growthdata_all[age6]])
; WAE_size_age_all[160, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age6]])
; WAE_size_age_all[161, i] = MAX(Length[INDEX_growthdata_all[age6]])
; WAE_size_age_all[162, i] = MIN(Length[INDEX_growthdata_all[age6]])
; ENDIF
; IF Age7count GT 0. THEN BEGIN
; WAE_size_age_all[163, i] = MEAN(Length[INDEX_growthdata_all[age7]])
; WAE_size_age_all[164, i] = STDDEV(Length[INDEX_growthdata_all[age7]])
; WAE_size_age_all[165, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age7]])
; WAE_size_age_all[166, i] = MAX(Length[INDEX_growthdata_all[age7]])
; WAE_size_age_all[167, i] = MIN(Length[INDEX_growthdata_all[age7]])
; ENDIF
; IF Age8count GT 0. THEN BEGIN
; WAE_size_age_all[168, i] = MEAN(Length[INDEX_growthdata_all[age8]])
; WAE_size_age_all[169, i] = STDDEV(Length[INDEX_growthdata_all[age8]])
; WAE_size_age_all[170, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age8]])
; WAE_size_age_all[171, i] = MAX(Length[INDEX_growthdata_all[age8]])
; WAE_size_age_all[172, i] = MIN(Length[INDEX_growthdata_all[age8]])
; ENDIF
; IF Age9count GT 0. THEN BEGIN
; WAE_size_age_all[173, i] = MEAN(Length[INDEX_growthdata_all[age9]])
; WAE_size_age_all[174, i] = STDDEV(Length[INDEX_growthdata_all[age9]])
; WAE_size_age_all[175, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age9]])
; WAE_size_age_all[176, i] = MAX(Length[INDEX_growthdata_all[age9]])
; WAE_size_age_all[177, i] = MIN(Length[INDEX_growthdata_all[age9]])
; ENDIF
; IF Age10count GT 0. THEN BEGIN
; WAE_size_age_all[178, i] = MEAN(Length[INDEX_growthdata_all[age10]])
; WAE_size_age_all[179, i] = STDDEV(Length[INDEX_growthdata_all[age10]])
; WAE_size_age_all[170, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age10]])
; WAE_size_age_all[181, i] = MAX(Length[INDEX_growthdata_all[age10]])
; WAE_size_age_all[182, i] = MIN(Length[INDEX_growthdata_all[age10]])
; ENDIF
; IF Age11count GT 0. THEN BEGIN
; WAE_size_age_all[183, i] = MEAN(Length[INDEX_growthdata_all[age11]])
; WAE_size_age_all[184, i] = STDDEV(Length[INDEX_growthdata_all[age11]])
; WAE_size_age_all[185, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age11]])
; WAE_size_age_all[186, i] = MAX(Length[INDEX_growthdata_all[age11]])
; WAE_size_age_all[187, i] = MIN(Length[INDEX_growthdata_all[age11]])
; ENDIF
; IF Age12count GT 0. THEN BEGIN
; WAE_size_age_all[188, i] = MEAN(Length[INDEX_growthdata_all[age12]])
; WAE_size_age_all[189, i] = STDDEV(Length[INDEX_growthdata_all[age12]])
; WAE_size_age_all[190, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age12]])
; WAE_size_age_all[191, i] = MAX(Length[INDEX_growthdata_all[age12]])
; WAE_size_age_all[192, i] = MIN(Length[INDEX_growthdata_all[age12]])
; ENDIF
; IF Age13count GT 0. THEN BEGIN
; WAE_size_age_all[193, i] = MEAN(Length[INDEX_growthdata_all[age13]])
; WAE_size_age_all[194, i] = STDDEV(Length[INDEX_growthdata_all[age13]])
; WAE_size_age_all[195, i] = N_ELEMENTS(Length[INDEX_growthdata_all[age13]])
; WAE_size_age_all[196, i] = MAX(Length[INDEX_growthdata_all[age13]])
; WAE_size_age_all[197, i] = MIN(Length[INDEX_growthdata_all[age13]])
; ENDIF
; Loop through WBIC_years
FOR i = 0L, N_ELEMENTS(uniqWBIC_Year)-1L DO BEGIN
; Index for unique WBIC-year walleye populations
INDEX_growthdata = WHERE(WBIC_Year[*] EQ uniqWBIC_Year[i], INDEX_growthdatacount)
; WBIC_Year2 - WBIC_year from the input data
; uniqWBIC_year - hypothetical WBIC_years created for loops
;paramset[22L, i] = INDEX_growthdatacount
print,'Number of fish in each WBIC_year',INDEX_growthdatacount
Nageclass = INTARR(3L, INDEX_growthdatacount); subarray w/ unique WBIC_year only
; arrays based on N of samples: all records > unique WBIC_year > unique WBIC
; FOR ii = 0L, INDEX_growthdatacount-1L DO BEGIN
; ENDFOR
IF INDEX_growthdatacount GT 0 THEN BEGIN; if there is fish in a given WBIC_year
Numageclass = N_ELEMENTS(UNIQ(FIX(AGE[INDEX_growthdata]), SORT(FIX(AGE[INDEX_growthdata]), /L64)))
Maxageclass = Max(AGE[INDEX_growthdata])
Minageclass = Min(AGE[INDEX_growthdata])
Length_Gro = Length[INDEX_growthdata]
Age_Gro = Age[INDEX_growthdata]
Sex_Gro = Sex[INDEX_growthdata]
PRINT, 'age_gro', age[index_growthdata]
PRINT, 'length_gro', length[index_growthdata]
Male = WHERE(Sex_Gro eq 0, malecount)
Female = WHERE(Sex_Gro eq 1, femalecount)
unknown = WHERE(Sex_Gro eq 2, unknowncount)
; age infomation for males
IF malecouNt gt 0 then begin
NumageclassM = N_ELEMENTS(UNIQ(FIX(AGE[INDEX_growthdata[male]]), SORT(FIX(AGE[INDEX_growthdata[male]]), /L64)))
MaxageclassM = Max(AGE[INDEX_growthdata[male]])
MinageclassM = Min(AGE[INDEX_growthdata[male]])
endif
; age information for females
if femalecount gt 0 then begin
NumageclassF = N_ELEMENTS(UNIQ(FIX(AGE[INDEX_growthdata[female]]), SORT(FIX(AGE[INDEX_growthdata[female]]), /L64)))
MaxageclassF = Max(AGE[INDEX_growthdata[female]])
MinageclassF = Min(AGE[INDEX_growthdata[female]])
endif
; store information in the output array
paramset[0, i] = uniqWBIC_Year[i]; WBIC_year (abbrev)
paramset[1, i] = N_ELEMENTS(Length_Gro); N of fish
paramset[2, i] = WBIC[INDEX_growthdata[0]]; WBIC
paramset[3, i] = SurveyYear[INDEX_growthdata[0]]; year
;PRINT, 'Observed length', Length_Gro
;PRINT, 'Observed age', Age_Gro
print, 'N of fish', paramset[1, i]
print, 'WBIC', paramset[2, i]
print, 'Year', paramset[3, i]
print, 'Max length (mm)', Max(length[INDEX_growthdata])
print, 'Min length (mm)', Min(length[INDEX_growthdata])
print, 'Female max length (mm)', Max(length[INDEX_growthdata[female]])
print, 'Female min length (mm)', Min(length[INDEX_growthdata[female]])
print, 'Male max length (mm)', Max(length[INDEX_growthdata[male]])
print, 'Male min length (mm)', Min(length[INDEX_growthdata[male]])
; Length group distributions - all fish
SizeLT100 = WHERE(Length_Gro LT 100., SizeLT100count)
Size100to120 = WHERE((Length_Gro GE 100.) AND (Length_Gro LT 120.), Size100to120count)
Size120to140 = WHERE((Length_Gro GE 120.) AND (Length_Gro LT 140.), Size120to140count)
Size140to160 = WHERE((Length_Gro GE 140.) AND (Length_Gro LT 160.), Size140to160count)
Size160to180 = WHERE((Length_Gro GE 160.) AND (Length_Gro LT 180.), Size160to180count)
Size180to200 = WHERE((Length_Gro GE 180.) AND (Length_Gro LT 200.), Size180to200count)
Size200to220 = WHERE((Length_Gro GE 200.) AND (Length_Gro LT 220.), Size200to220count)
Size220to240 = WHERE((Length_Gro GE 220.) AND (Length_Gro LT 240.), Size220to240count)
Size240to260 = WHERE((Length_Gro GE 240.) AND (Length_Gro LT 260.), Size240to260count)
Size260to280 = WHERE((Length_Gro GE 260.) AND (Length_Gro LT 280.), Size260to280count)
Size280to300 = WHERE((Length_Gro GE 280.) AND (Length_Gro LT 300.), Size280to300count)
Size300to320 = WHERE((Length_Gro GE 300.) AND (Length_Gro LT 320.), Size300to320count)
Size320to340 = WHERE((Length_Gro GE 320.) AND (Length_Gro LT 340.), Size320to340count)
Size340to360 = WHERE((Length_Gro GE 340.) AND (Length_Gro LT 360.), Size340to360count)
Size360to380 = WHERE((Length_Gro GE 360.) AND (Length_Gro LT 380.), Size360to380count)
Size380to400 = WHERE((Length_Gro GE 380.) AND (Length_Gro LT 400.), Size380to400count)
Size400to420 = WHERE((Length_Gro GE 400.) AND (Length_Gro LT 420.), Size400to420count)
Size420to440 = WHERE((Length_Gro GE 420.) AND (Length_Gro LT 440.), Size420to440count)
Size440to460 = WHERE((Length_Gro GE 440.) AND (Length_Gro LT 460.), Size440to460count)
Size460to480 = WHERE((Length_Gro GE 460.) AND (Length_Gro LT 480.), Size460to480count)
Size480to500 = WHERE((Length_Gro GE 480.) AND (Length_Gro LT 500.), Size480to500count)
Size500to520 = WHERE((Length_Gro GE 500.) AND (Length_Gro LT 520.), Size500to520count)
Size520to540 = WHERE((Length_Gro GE 520.) AND (Length_Gro LT 540.), Size520to540count)
Size540to560 = WHERE((Length_Gro GE 540.) AND (Length_Gro LT 560.), Size540to560count)
Size560to580 = WHERE((Length_Gro GE 560.) AND (Length_Gro LT 580.), Size560to580count)
Size580to600 = WHERE((Length_Gro GE 580.) AND (Length_Gro LT 600.), Size580to600count)
Size600to620 = WHERE((Length_Gro GE 600.) AND (Length_Gro LT 620.), Size600to620count)
Size620to640 = WHERE((Length_Gro GE 620.) AND (Length_Gro LT 640.), Size620to640count)
Size640to660 = WHERE((Length_Gro GE 640.) AND (Length_Gro LT 660.), Size640to660count)
Size660to680 = WHERE((Length_Gro GE 660.) AND (Length_Gro LT 680.), Size660to680count)
Size680to700 = WHERE((Length_Gro GE 680.) AND (Length_Gro LT 700.), Size680to700count)
Size700to720 = WHERE((Length_Gro GE 700.) AND (Length_Gro LT 720.), Size700to720count)
Size720to740 = WHERE((Length_Gro GE 720.) AND (Length_Gro LT 740.), Size720to740count)
Size740to760 = WHERE((Length_Gro GE 740.) AND (Length_Gro LT 760.), Size740to760count)
Size760to780 = WHERE((Length_Gro GE 760.) AND (Length_Gro LT 780.), Size760to780count)
Size780to800 = WHERE((Length_Gro GE 780.) AND (Length_Gro LT 800.), Size780to800count)
SizeGE800 = WHERE((Length_Gro GE 800.), SizeGE800count)
PRINT, 'i', i
IF i EQ 0L THEN adj = 0
IF i GT 1L THEN adj = 1
; length bin 1
; store basic data information in the output array
WAE_length_bin[0, i*NumLengthBin+adj] = WBIC_year[INDEX_growthdata[0]]; WBIC_year (abbrev)
WAE_length_bin[1, i*NumLengthBin+adj] = N_ELEMENTS(Length_Gro); N of fish
WAE_length_bin[2, i*NumLengthBin+adj] = WBIC[INDEX_growthdata[0]]; WBIC
WAE_length_bin[3, i*NumLengthBin+adj] = SurveyYear[INDEX_growthdata[0]]; year
WAE_length_bin[4, i*NumLengthBin+adj] = Max(length[INDEX_growthdata]); max length all
WAE_length_bin[5, i*NumLengthBin+adj] = Min(length[INDEX_growthdata]); min length all
WAE_length_bin[6, i*NumLengthBin+adj] = Max(age[INDEX_growthdata]); max age all
WAE_length_bin[7, i*NumLengthBin+adj] = Min(age[INDEX_growthdata]); min age all
WAE_length_bin[8, i*NumLengthBin+adj] = 99
WAE_length_bin[9, i*NumLengthBin+adj] = SizeLT100count; number of fish <100
IF SizeLT100count GT 0 THEN BEGIN
age0SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 0), Age0SizeLT100count)
age1SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 1), Age1SizeLT100count)
age2SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 2), AGE2SizeLT100count)
age3SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 3), AGE3SizeLT100count)
age4SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 4), AGE4SizeLT100count)
age5SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 5), AGE5SizeLT100count)
age6SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 6), AGE6SizeLT100count)
age7SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 7), AGE7SizeLT100count)
age8SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 8), AGE8SizeLT100count)
age9SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 9), AGE9SizeLT100count)
age10SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 10), AGE10SizeLT100count)
age11SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 11), AGE11SizeLT100count)
AGE12SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 12), AGE12SizeLT100count)
AGE13SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 13), AGE13SizeLT100count)
AGE14SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 14), AGE14SizeLT100count)
AGE15SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 15), AGE15SizeLT100count)
age16SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 16), Age16SizeLT100count)
age17SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 17), AGE17SizeLT100count)
age18SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 18), AGE18SizeLT100count)
age19SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 19), AGE19SizeLT100count)
age20SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 20), AGE20SizeLT100count)
age21SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 21), AGE21SizeLT100count)
age22SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 22), AGE22SizeLT100count)
age23SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 23), AGE23SizeLT100count)
age24SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 24), AGE24SizeLT100count)
age25SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 25), AGE25SizeLT100count)
age26SizeLT100 = WHERE((Age_Gro[SizeLT100] EQ 26), AGE26SizeLT100count)
WAE_length_bin[10, i*NumLengthBin+adj] = Age0SizeLT100count
WAE_length_bin[11, i*NumLengthBin+adj] = Age1SizeLT100count
WAE_length_bin[12, i*NumLengthBin+adj] = Age2SizeLT100count
WAE_length_bin[13, i*NumLengthBin+adj] = Age3SizeLT100count
WAE_length_bin[14, i*NumLengthBin+adj] = Age4SizeLT100count
WAE_length_bin[15, i*NumLengthBin+adj] = Age5SizeLT100count
WAE_length_bin[16, i*NumLengthBin+adj] = Age6SizeLT100count
WAE_length_bin[17, i*NumLengthBin+adj] = Age7SizeLT100count
WAE_length_bin[18, i*NumLengthBin+adj] = Age8SizeLT100count
WAE_length_bin[19, i*NumLengthBin+adj] = Age9SizeLT100count
WAE_length_bin[20, i*NumLengthBin+adj] = Age10SizeLT100count
WAE_length_bin[21, i*NumLengthBin+adj] = Age11SizeLT100count
WAE_length_bin[22, i*NumLengthBin+adj] = Age12SizeLT100count
WAE_length_bin[23, i*NumLengthBin+adj] = Age13SizeLT100count
WAE_length_bin[24, i*NumLengthBin+adj] = Age14SizeLT100count
WAE_length_bin[25, i*NumLengthBin+adj] = Age15SizeLT100count
WAE_length_bin[26, i*NumLengthBin+adj] = Age16SizeLT100count
WAE_length_bin[27, i*NumLengthBin+adj] = Age17SizeLT100count
WAE_length_bin[28, i*NumLengthBin+adj] = Age18SizeLT100count
WAE_length_bin[29, i*NumLengthBin+adj] = Age19SizeLT100count
WAE_length_bin[30, i*NumLengthBin+adj] = Age20SizeLT100count
WAE_length_bin[31, i*NumLengthBin+adj] = Age21SizeLT100count
WAE_length_bin[32, i*NumLengthBin+adj] = Age22SizeLT100count
WAE_length_bin[33, i*NumLengthBin+adj] = Age23SizeLT100count
WAE_length_bin[34, i*NumLengthBin+adj] = Age24SizeLT100count
WAE_length_bin[35, i*NumLengthBin+adj] = Age25SizeLT100count
WAE_length_bin[36, i*NumLengthBin+adj] = Age26SizeLT100count
ENDIF
PRINT, 'SizeLT100', TOTAL(WAE_length_bin[10L:36, i*NumLengthBin+adj])
; length bin 2
WAE_length_bin[0, i*NumLengthBin+adj+1L] = WBIC_year[INDEX_growthdata[0]]; WBIC_year (abbrev)
WAE_length_bin[1, i*NumLengthBin+adj+1L] = N_ELEMENTS(Length_Gro); N of fish
WAE_length_bin[2, i*NumLengthBin+adj+1L] = WBIC[INDEX_growthdata[0]]; WBIC
WAE_length_bin[3, i*NumLengthBin+adj+1L] = SurveyYear[INDEX_growthdata[0]]; year
WAE_length_bin[4, i*NumLengthBin+adj+1L] = Max(length[INDEX_growthdata])
WAE_length_bin[5, i*NumLengthBin+adj+1L] = Min(length[INDEX_growthdata])
WAE_length_bin[6, i*NumLengthBin+adj+1L] = Max(age[INDEX_growthdata])
WAE_length_bin[7, i*NumLengthBin+adj+1L] = Min(age[INDEX_growthdata])
WAE_length_bin[8, i*NumLengthBin+adj+1L] = 100
WAE_length_bin[9, i*NumLengthBin+adj+1L] = Size100to120count
IF Size100to120count GT 0 THEN BEGIN
age0Size100to120 = WHERE((Age_Gro[Size100to120] EQ 0), Age0Size100to120count)
age1Size100to120 = WHERE((Age_Gro[Size100to120] EQ 1), Age1Size100to120count)
age2Size100to120 = WHERE((Age_Gro[Size100to120] EQ 2), AGE2Size100to120count)
age3Size100to120 = WHERE((Age_Gro[Size100to120] EQ 3), AGE3Size100to120count)
age4Size100to120 = WHERE((Age_Gro[Size100to120] EQ 4), AGE4Size100to120count)
age5Size100to120 = WHERE((Age_Gro[Size100to120] EQ 5), AGE5Size100to120count)
age6Size100to120 = WHERE((Age_Gro[Size100to120] EQ 6), AGE6Size100to120count)
age7Size100to120 = WHERE((Age_Gro[Size100to120] EQ 7), AGE7Size100to120count)
age8Size100to120 = WHERE((Age_Gro[Size100to120] EQ 8), AGE8Size100to120count)
age9Size100to120 = WHERE((Age_Gro[Size100to120] EQ 9), AGE9Size100to120count)
age10Size100to120 = WHERE((Age_Gro[Size100to120] EQ 10), AGE10Size100to120count)
age11Size100to120 = WHERE((Age_Gro[Size100to120] EQ 11), AGE11Size100to120count)
AGE12Size100to120 = WHERE((Age_Gro[Size100to120] EQ 12), AGE12Size100to120count)
AGE13Size100to120 = WHERE((Age_Gro[Size100to120] EQ 13), AGE13Size100to120count)
AGE14Size100to120 = WHERE((Age_Gro[Size100to120] EQ 14), AGE14Size100to120count)
AGE15Size100to120 = WHERE((Age_Gro[Size100to120] EQ 15), AGE15Size100to120count)
age16Size100to120 = WHERE((Age_Gro[Size100to120] EQ 16), Age16Size100to120count)
age17Size100to120 = WHERE((Age_Gro[Size100to120] EQ 17), AGE17Size100to120count)
age18Size100to120 = WHERE((Age_Gro[Size100to120] EQ 18), AGE18Size100to120count)
age19Size100to120 = WHERE((Age_Gro[Size100to120] EQ 19), AGE19Size100to120count)
age20Size100to120 = WHERE((Age_Gro[Size100to120] EQ 20), AGE20Size100to120count)
age21Size100to120 = WHERE((Age_Gro[Size100to120] EQ 21), AGE21Size100to120count)
age22Size100to120 = WHERE((Age_Gro[Size100to120] EQ 22), AGE22Size100to120count)
age23Size100to120 = WHERE((Age_Gro[Size100to120] EQ 23), AGE23Size100to120count)
age24Size100to120 = WHERE((Age_Gro[Size100to120] EQ 24), AGE24Size100to120count)
age25Size100to120 = WHERE((Age_Gro[Size100to120] EQ 25), AGE25Size100to120count)
age26Size100to120 = WHERE((Age_Gro[Size100to120] EQ 26), AGE26Size100to120count)
WAE_length_bin[10, i*NumLengthBin+adj+1L] = Age0Size100to120count
WAE_length_bin[11, i*NumLengthBin+adj+1L] = Age1Size100to120count
WAE_length_bin[12, i*NumLengthBin+adj+1L] = Age2Size100to120count
WAE_length_bin[13, i*NumLengthBin+adj+1L] = Age3Size100to120count
WAE_length_bin[14, i*NumLengthBin+adj+1L] = Age4Size100to120count
WAE_length_bin[15, i*NumLengthBin+adj+1L] = Age5Size100to120count
WAE_length_bin[16, i*NumLengthBin+adj+1L] = Age6Size100to120count
WAE_length_bin[17, i*NumLengthBin+adj+1L] = Age7Size100to120count
WAE_length_bin[18, i*NumLengthBin+adj+1L] = Age8Size100to120count
WAE_length_bin[19, i*NumLengthBin+adj+1L] = Age9Size100to120count
WAE_length_bin[20, i*NumLengthBin+adj+1L] = Age10Size100to120count
WAE_length_bin[21, i*NumLengthBin+adj+1L] = Age11Size100to120count
WAE_length_bin[22, i*NumLengthBin+adj+1L] = Age12Size100to120count
WAE_length_bin[23, i*NumLengthBin+adj+1L] = Age13Size100to120count
WAE_length_bin[24, i*NumLengthBin+adj+1L] = Age14Size100to120count
WAE_length_bin[25, i*NumLengthBin+adj+1L] = Age15Size100to120count
WAE_length_bin[26, i*NumLengthBin+adj+1L] = Age16Size100to120count
WAE_length_bin[27, i*NumLengthBin+adj+1L] = Age17Size100to120count
WAE_length_bin[28, i*NumLengthBin+adj+1L] = Age18Size100to120count
WAE_length_bin[29, i*NumLengthBin+adj+1L] = Age19Size100to120count
WAE_length_bin[30, i*NumLengthBin+adj+1L] = Age20Size100to120count
WAE_length_bin[31, i*NumLengthBin+adj+1L] = Age21Size100to120count
WAE_length_bin[32, i*NumLengthBin+adj+1L] = Age22Size100to120count
WAE_length_bin[33, i*NumLengthBin+adj+1L] = Age23Size100to120count
WAE_length_bin[34, i*NumLengthBin+adj+1L] = Age24Size100to120count
WAE_length_bin[35, i*NumLengthBin+adj+1L] = Age25Size100to120count
WAE_length_bin[36, i*NumLengthBin+adj+1L] = Age26Size100to120count
ENDIF
PRINT, 'Size100to120', TOTAL(WAE_length_bin[10L:36, i*NumLengthBin+adj+1L])
; length bin 3
WAE_length_bin[0, i*NumLengthBin+adj+2L] = WBIC_year[INDEX_growthdata[0]]; WBIC_year (abbrev)
WAE_length_bin[1, i*NumLengthBin+adj+2L] = N_ELEMENTS(Length_Gro); N of fish
WAE_length_bin[2, i*NumLengthBin+adj+2L] = WBIC[INDEX_growthdata[0]]; WBIC
WAE_length_bin[3, i*NumLengthBin+adj+2L] = SurveyYear[INDEX_growthdata[0]]; year
WAE_length_bin[4, i*NumLengthBin+adj+2L] = Max(length[INDEX_growthdata])
WAE_length_bin[5, i*NumLengthBin+adj+2L] = Min(length[INDEX_growthdata])
WAE_length_bin[6, i*NumLengthBin+adj+2L] = Max(age[INDEX_growthdata])
WAE_length_bin[7, i*NumLengthBin+adj+2L] = Min(age[INDEX_growthdata])
WAE_length_bin[8, i*NumLengthBin+adj+2L] = 120
WAE_length_bin[9, i*NumLengthBin+adj+2L] = Size120to140count
IF Size120to140count GT 0 THEN BEGIN
age0Size120to140 = WHERE((Age_Gro[Size120to140] EQ 0), Age0Size120to140count)
age1Size120to140 = WHERE((Age_Gro[Size120to140] EQ 1), Age1Size120to140count)
age2Size120to140 = WHERE((Age_Gro[Size120to140] EQ 2), AGE2Size120to140count)
age3Size120to140 = WHERE((Age_Gro[Size120to140] EQ 3), AGE3Size120to140count)
age4Size120to140 = WHERE((Age_Gro[Size120to140] EQ 4), AGE4Size120to140count)
age5Size120to140 = WHERE((Age_Gro[Size120to140] EQ 5), AGE5Size120to140count)
age6Size120to140 = WHERE((Age_Gro[Size120to140] EQ 6), AGE6Size120to140count)
age7Size120to140 = WHERE((Age_Gro[Size120to140] EQ 7), AGE7Size120to140count)
age8Size120to140 = WHERE((Age_Gro[Size120to140] EQ 8), AGE8Size120to140count)
age9Size120to140 = WHERE((Age_Gro[Size120to140] EQ 9), AGE9Size120to140count)
age10Size120to140 = WHERE((Age_Gro[Size120to140] EQ 10), AGE10Size120to140count)
age11Size120to140 = WHERE((Age_Gro[Size120to140] EQ 11), AGE11Size120to140count)
AGE12Size120to140 = WHERE((Age_Gro[Size120to140] EQ 12), AGE12Size120to140count)
AGE13Size120to140 = WHERE((Age_Gro[Size120to140] EQ 13), AGE13Size120to140count)
AGE14Size120to140 = WHERE((Age_Gro[Size120to140] EQ 14), AGE14Size120to140count)
AGE15Size120to140 = WHERE((Age_Gro[Size120to140] EQ 15), AGE15Size120to140count)
age16Size120to140 = WHERE((Age_Gro[Size120to140] EQ 16), Age16Size120to140count)
age17Size120to140 = WHERE((Age_Gro[Size120to140] EQ 17), AGE17Size120to140count)
age18Size120to140 = WHERE((Age_Gro[Size120to140] EQ 18), AGE18Size120to140count)
age19Size120to140 = WHERE((Age_Gro[Size120to140] EQ 19), AGE19Size120to140count)
age20Size120to140 = WHERE((Age_Gro[Size120to140] EQ 20), AGE20Size120to140count)
age21Size120to140 = WHERE((Age_Gro[Size120to140] EQ 21), AGE21Size120to140count)
age22Size120to140 = WHERE((Age_Gro[Size120to140] EQ 22), AGE22Size120to140count)
age23Size120to140 = WHERE((Age_Gro[Size120to140] EQ 23), AGE23Size120to140count)
age24Size120to140 = WHERE((Age_Gro[Size120to140] EQ 24), AGE24Size120to140count)
age25Size120to140 = WHERE((Age_Gro[Size120to140] EQ 25), AGE25Size120to140count)
age26Size120to140 = WHERE((Age_Gro[Size120to140] EQ 26), AGE26Size120to140count)
WAE_length_bin[10, i*NumLengthBin+adj+2L] = Age0Size120to140count
WAE_length_bin[11, i*NumLengthBin+adj+2L] = Age1Size120to140count
WAE_length_bin[12, i*NumLengthBin+adj+2L] = Age2Size120to140count
WAE_length_bin[13, i*NumLengthBin+adj+2L] = Age3Size120to140count
WAE_length_bin[14, i*NumLengthBin+adj+2L] = Age4Size120to140count
WAE_length_bin[15, i*NumLengthBin+adj+2L] = Age5Size120to140count
WAE_length_bin[16, i*NumLengthBin+adj+2L] = Age6Size120to140count
WAE_length_bin[17, i*NumLengthBin+adj+2L] = Age7Size120to140count
WAE_length_bin[18, i*NumLengthBin+adj+2L] = Age8Size120to140count
WAE_length_bin[19, i*NumLengthBin+adj+2L] = Age9Size120to140count
WAE_length_bin[20, i*NumLengthBin+adj+2L] = Age10Size120to140count
WAE_length_bin[21, i*NumLengthBin+adj+2L] = Age11Size120to140count
WAE_length_bin[22, i*NumLengthBin+adj+2L] = Age12Size120to140count
WAE_length_bin[23, i*NumLengthBin+adj+2L] = Age13Size120to140count
WAE_length_bin[24, i*NumLengthBin+adj+2L] = Age14Size120to140count
WAE_length_bin[25, i*NumLengthBin+adj+2L] = Age15Size120to140count
WAE_length_bin[26, i*NumLengthBin+adj+2L] = Age16Size120to140count
WAE_length_bin[27, i*NumLengthBin+adj+2L] = Age17Size120to140count
WAE_length_bin[28, i*NumLengthBin+adj+2L] = Age18Size120to140count
WAE_length_bin[29, i*NumLengthBin+adj+2L] = Age19Size120to140count
WAE_length_bin[30, i*NumLengthBin+adj+2L] = Age20Size120to140count
WAE_length_bin[31, i*NumLengthBin+adj+2L] = Age21Size120to140count
WAE_length_bin[32, i*NumLengthBin+adj+2L] = Age22Size120to140count
WAE_length_bin[33, i*NumLengthBin+adj+2L] = Age23Size120to140count
WAE_length_bin[34, i*NumLengthBin+adj+2L] = Age24Size120to140count
WAE_length_bin[35, i*NumLengthBin+adj+2L] = Age25Size120to140count
WAE_length_bin[36, i*NumLengthBin+adj+2L] = Age26Size120to140count
ENDIF
PRINT, 'Size120to140', TOTAL(WAE_length_bin[10L:36, i*NumLengthBin+adj+2L])
; length bin 4
WAE_length_bin[0, i*NumLengthBin+adj+3L] = WBIC_year[INDEX_growthdata[0]]; WBIC_year (abbrev)
WAE_length_bin[1, i*NumLengthBin+adj+3L] = N_ELEMENTS(Length_Gro); N of fish
WAE_length_bin[2, i*NumLengthBin+adj+3L] = WBIC[INDEX_growthdata[0]]; WBIC
WAE_length_bin[3, i*NumLengthBin+adj+3L] = SurveyYear[INDEX_growthdata[0]]; year
WAE_length_bin[4, i*NumLengthBin+adj+3L] = Max(length[INDEX_growthdata])
WAE_length_bin[5, i*NumLengthBin+adj+3L] = Min(length[INDEX_growthdata])
WAE_length_bin[6, i*NumLengthBin+adj+3L] = Max(age[INDEX_growthdata])
WAE_length_bin[7, i*NumLengthBin+adj+3L] = Min(age[INDEX_growthdata])
WAE_length_bin[8, i*NumLengthBin+adj+3L] = 140
WAE_length_bin[9, i*NumLengthBin+adj+3L] = Size140to160count
IF Size140to160count GT 0 THEN BEGIN
age0Size140to160 = WHERE((Age_Gro[Size140to160] EQ 0), Age0Size140to160count)
age1Size140to160 = WHERE((Age_Gro[Size140to160] EQ 1), Age1Size140to160count)
age2Size140to160 = WHERE((Age_Gro[Size140to160] EQ 2), AGE2Size140to160count)
age3Size140to160 = WHERE((Age_Gro[Size140to160] EQ 3), AGE3Size140to160count)
age4Size140to160 = WHERE((Age_Gro[Size140to160] EQ 4), AGE4Size140to160count)
age5Size140to160 = WHERE((Age_Gro[Size140to160] EQ 5), AGE5Size140to160count)
age6Size140to160 = WHERE((Age_Gro[Size140to160] EQ 6), AGE6Size140to160count)
age7Size140to160 = WHERE((Age_Gro[Size140to160] EQ 7), AGE7Size140to160count)
age8Size140to160 = WHERE((Age_Gro[Size140to160] EQ 8), AGE8Size140to160count)
age9Size140to160 = WHERE((Age_Gro[Size140to160] EQ 9), AGE9Size140to160count)
age10Size140to160 = WHERE((Age_Gro[Size140to160] EQ 10), AGE10Size140to160count)
age11Size140to160 = WHERE((Age_Gro[Size140to160] EQ 11), AGE11Size140to160count)
AGE12Size140to160 = WHERE((Age_Gro[Size140to160] EQ 12), AGE12Size140to160count)
AGE13Size140to160 = WHERE((Age_Gro[Size140to160] EQ 13), AGE13Size140to160count)
AGE14Size140to160 = WHERE((Age_Gro[Size140to160] EQ 14), AGE14Size140to160count)
AGE15Size140to160 = WHERE((Age_Gro[Size140to160] EQ 15), AGE15Size140to160count)
age16Size140to160 = WHERE((Age_Gro[Size140to160] EQ 16), Age16Size140to160count)
age17Size140to160 = WHERE((Age_Gro[Size140to160] EQ 17), AGE17Size140to160count)
age18Size140to160 = WHERE((Age_Gro[Size140to160] EQ 18), AGE18Size140to160count)
age19Size140to160 = WHERE((Age_Gro[Size140to160] EQ 19), AGE19Size140to160count)
age20Size140to160 = WHERE((Age_Gro[Size140to160] EQ 20), AGE20Size140to160count)
age21Size140to160 = WHERE((Age_Gro[Size140to160] EQ 21), AGE21Size140to160count)
age22Size140to160 = WHERE((Age_Gro[Size140to160] EQ 22), AGE22Size140to160count)
age23Size140to160 = WHERE((Age_Gro[Size140to160] EQ 23), AGE23Size140to160count)
age24Size140to160 = WHERE((Age_Gro[Size140to160] EQ 24), AGE24Size140to160count)
age25Size140to160 = WHERE((Age_Gro[Size140to160] EQ 25), AGE25Size140to160count)
age26Size140to160 = WHERE((Age_Gro[Size140to160] EQ 26), AGE26Size140to160count)
WAE_length_bin[10, i*NumLengthBin+adj+3L] = Age0Size140to160count
WAE_length_bin[11, i*NumLengthBin+adj+3L] = Age1Size140to160count
WAE_length_bin[12, i*NumLengthBin+adj+3L] = Age2Size140to160count
WAE_length_bin[13, i*NumLengthBin+adj+3L] = Age3Size140to160count
WAE_length_bin[14, i*NumLengthBin+adj+3L] = Age4Size140to160count
WAE_length_bin[15, i*NumLengthBin+adj+3L] = Age5Size140to160count
WAE_length_bin[16, i*NumLengthBin+adj+3L] = Age6Size140to160count
WAE_length_bin[17, i*NumLengthBin+adj+3L] = Age7Size140to160count
WAE_length_bin[18, i*NumLengthBin+adj+3L] = Age8Size140to160count
WAE_length_bin[19, i*NumLengthBin+adj+3L] = Age9Size140to160count
WAE_length_bin[20, i*NumLengthBin+adj+3L] = Age10Size140to160count
WAE_length_bin[21, i*NumLengthBin+adj+3L] = Age11Size140to160count
WAE_length_bin[22, i*NumLengthBin+adj+3L] = Age12Size140to160count
WAE_length_bin[23, i*NumLengthBin+adj+3L] = Age13Size140to160count
WAE_length_bin[24, i*NumLengthBin+adj+3L] = Age14Size140to160count
WAE_length_bin[25, i*NumLengthBin+adj+3L] = Age15Size140to160count
WAE_length_bin[26, i*NumLengthBin+adj+3L] = Age16Size140to160count
WAE_length_bin[27, i*NumLengthBin+adj+3L] = Age17Size140to160count
WAE_length_bin[28, i*NumLengthBin+adj+3L] = Age18Size140to160count
WAE_length_bin[29, i*NumLengthBin+adj+3L] = Age19Size140to160count
WAE_length_bin[30, i*NumLengthBin+adj+3L] = Age20Size140to160count
WAE_length_bin[31, i*NumLengthBin+adj+3L] = Age21Size140to160count
WAE_length_bin[32, i*NumLengthBin+adj+3L] = Age22Size140to160count
WAE_length_bin[33, i*NumLengthBin+adj+3L] = Age23Size140to160count
WAE_length_bin[34, i*NumLengthBin+adj+3L] = Age24Size140to160count
WAE_length_bin[35, i*NumLengthBin+adj+3L] = Age25Size140to160count
WAE_length_bin[36, i*NumLengthBin+adj+3L] = Age26Size140to160count
ENDIF
PRINT, 'Size140to160', TOTAL(WAE_length_bin[10L:36, i*NumLengthBin+adj+3L])
WAE_length_bin[0, i*NumLengthBin+adj+4L] = WBIC_year[INDEX_growthdata[0]]; WBIC_year (abbrev)
WAE_length_bin[1, i*NumLengthBin+adj+4L] = N_ELEMENTS(Length_Gro); N of fish
WAE_length_bin[2, i*NumLengthBin+adj+4L] = WBIC[INDEX_growthdata[0]]; WBIC
WAE_length_bin[3, i*NumLengthBin+adj+4L] = SurveyYear[INDEX_growthdata[0]]; year
WAE_length_bin[4, i*NumLengthBin+adj+4L] = Max(length[INDEX_growthdata])
WAE_length_bin[5, i*NumLengthBin+adj+4L] = Min(length[INDEX_growthdata])
WAE_length_bin[6, i*NumLengthBin+adj+4L] = Max(age[INDEX_growthdata])
WAE_length_bin[7, i*NumLengthBin+adj+4L] = Min(age[INDEX_growthdata])
WAE_length_bin[8, i*NumLengthBin+adj+4L] = 160
WAE_length_bin[9, i*NumLengthBin+adj+4L] = Size160to180count
; length bin 5
IF Size160to180count GT 0 THEN BEGIN
age0Size160to180 = WHERE((Age_Gro[Size160to180] EQ 0), Age0Size160to180count)
age1Size160to180 = WHERE((Age_Gro[Size160to180] EQ 1), Age1Size160to180count)
age2Size160to180 = WHERE((Age_Gro[Size160to180] EQ 2), AGE2Size160to180count)
age3Size160to180 = WHERE((Age_Gro[Size160to180] EQ 3), AGE3Size160to180count)
age4Size160to180 = WHERE((Age_Gro[Size160to180] EQ 4), AGE4Size160to180count)
age5Size160to180 = WHERE((Age_Gro[Size160to180] EQ 5), AGE5Size160to180count)
age6Size160to180 = WHERE((Age_Gro[Size160to180] EQ 6), AGE6Size160to180count)
age7Size160to180 = WHERE((Age_Gro[Size160to180] EQ 7), AGE7Size160to180count)
age8Size160to180 = WHERE((Age_Gro[Size160to180] EQ 8), AGE8Size160to180count)
age9Size160to180 = WHERE((Age_Gro[Size160to180] EQ 9), AGE9Size160to180count)
age10Size160to180 = WHERE((Age_Gro[Size160to180] EQ 10), AGE10Size160to180count)
age11Size160to180 = WHERE((Age_Gro[Size160to180] EQ 11), AGE11Size160to180count)
AGE12Size160to180 = WHERE((Age_Gro[Size160to180] EQ 12), AGE12Size160to180count)
AGE13Size160to180 = WHERE((Age_Gro[Size160to180] EQ 13), AGE13Size160to180count)
AGE14Size160to180 = WHERE((Age_Gro[Size160to180] EQ 14), AGE14Size160to180count)
AGE15Size160to180 = WHERE((Age_Gro[Size160to180] EQ 15), AGE15Size160to180count)
age16Size160to180 = WHERE((Age_Gro[Size160to180] EQ 16), Age16Size160to180count)
age17Size160to180 = WHERE((Age_Gro[Size160to180] EQ 17), AGE17Size160to180count)
age18Size160to180 = WHERE((Age_Gro[Size160to180] EQ 18), AGE18Size160to180count)
age19Size160to180 = WHERE((Age_Gro[Size160to180] EQ 19), AGE19Size160to180count)
age20Size160to180 = WHERE((Age_Gro[Size160to180] EQ 20), AGE20Size160to180count)
age21Size160to180 = WHERE((Age_Gro[Size160to180] EQ 21), AGE21Size160to180count)
age22Size160to180 = WHERE((Age_Gro[Size160to180] EQ 22), AGE22Size160to180count)
age23Size160to180 = WHERE((Age_Gro[Size160to180] EQ 23), AGE23Size160to180count)
age24Size160to180 = WHERE((Age_Gro[Size160to180] EQ 24), AGE24Size160to180count)
age25Size160to180 = WHERE((Age_Gro[Size160to180] EQ 25), AGE25Size160to180count)
age26Size160to180 = WHERE((Age_Gro[Size160to180] EQ 26), AGE26Size160to180count)
WAE_length_bin[10, i*NumLengthBin+adj+4L] = Age0Size160to180count
WAE_length_bin[11, i*NumLengthBin+adj+4L] = Age1Size160to180count
WAE_length_bin[12, i*NumLengthBin+adj+4L] = Age2Size160to180count
WAE_length_bin[13, i*NumLengthBin+adj+4L] = Age3Size160to180count
WAE_length_bin[14, i*NumLengthBin+adj+4L] = Age4Size160to180count
WAE_length_bin[15, i*NumLengthBin+adj+4L] = Age5Size160to180count
WAE_length_bin[16, i*NumLengthBin+adj+4L] = Age6Size160to180count
WAE_length_bin[17, i*NumLengthBin+adj+4L] = Age7Size160to180count
WAE_length_bin[18, i*NumLengthBin+adj+4L] = Age8Size160to180count
WAE_length_bin[19, i*NumLengthBin+adj+4L] = Age9Size160to180count
WAE_length_bin[20, i*NumLengthBin+adj+4L] = Age10Size160to180count
WAE_length_bin[21, i*NumLengthBin+adj+4L] = Age11Size160to180count
WAE_length_bin[22, i*NumLengthBin+adj+4L] = Age12Size160to180count
WAE_length_bin[23, i*NumLengthBin+adj+4L] = Age13Size160to180count
WAE_length_bin[24, i*NumLengthBin+adj+4L] = Age14Size160to180count
WAE_length_bin[25, i*NumLengthBin+adj+4L] = Age15Size160to180count
WAE_length_bin[26, i*NumLengthBin+adj+4L] = Age16Size160to180count
WAE_length_bin[27, i*NumLengthBin+adj+4L] = Age17Size160to180count
WAE_length_bin[28, i*NumLengthBin+adj+4L] = Age18Size160to180count
WAE_length_bin[29, i*NumLengthBin+adj+4L] = Age19Size160to180count
WAE_length_bin[30, i*NumLengthBin+adj+4L] = Age20Size160to180count
WAE_length_bin[31, i*NumLengthBin+adj+4L] = Age21Size160to180count
WAE_length_bin[32, i*NumLengthBin+adj+4L] = Age22Size160to180count
WAE_length_bin[33, i*NumLengthBin+adj+4L] = Age23Size160to180count
WAE_length_bin[34, i*NumLengthBin+adj+4L] = Age24Size160to180count
WAE_length_bin[35, i*NumLengthBin+adj+4L] = Age25Size160to180count
WAE_length_bin[36, i*NumLengthBin+adj+4L] = Age26Size160to180count
ENDIF
PRINT, 'Size160to180', TOTAL(WAE_length_bin[10L:36, i*NumLengthBin+adj+4L])
WAE_length_bin[0, i*NumLengthBin+adj+5L] = WBIC_year[INDEX_growthdata[0]]; WBIC_year (abbrev)
WAE_length_bin[1, i*NumLengthBin+adj+5L] = N_ELEMENTS(Length_Gro); N of fish
WAE_length_bin[2, i*NumLengthBin+adj+5L] = WBIC[INDEX_growthdata[0]]; WBIC
WAE_length_bin[3, i*NumLengthBin+adj+5L] = SurveyYear[INDEX_growthdata[0]]; year
WAE_length_bin[4, i*NumLengthBin+adj+5L] = Max(length[INDEX_growthdata])
WAE_length_bin[5, i*NumLengthBin+adj+5L] = Min(length[INDEX_growthdata])
WAE_length_bin[6, i*NumLengthBin+adj+5L] = Max(age[INDEX_growthdata])
WAE_length_bin[7, i*NumLengthBin+adj+5L] = Min(age[INDEX_growthdata])
WAE_length_bin[8, i*NumLengthBin+adj+5L] = 180
WAE_length_bin[9, i*NumLengthBin+adj+5L] = Size180to200count
; length bin 6
IF Size180to200count GT 0 THEN BEGIN
age0Size180to200 = WHERE((Age_Gro[Size180to200] EQ 0), Age0Size180to200count)
age1Size180to200 = WHERE((Age_Gro[Size180to200] EQ 1), Age1Size180to200count)
age2Size180to200 = WHERE((Age_Gro[Size180to200] EQ 2), AGE2Size180to200count)
age3Size180to200 = WHERE((Age_Gro[Size180to200] EQ 3), AGE3Size180to200count)
age4Size180to200 = WHERE((Age_Gro[Size180to200] EQ 4), AGE4Size180to200count)
age5Size180to200 = WHERE((Age_Gro[Size180to200] EQ 5), AGE5Size180to200count)
age6Size180to200 = WHERE((Age_Gro[Size180to200] EQ 6), AGE6Size180to200count)
age7Size180to200 = WHERE((Age_Gro[Size180to200] EQ 7), AGE7Size180to200count)
age8Size180to200 = WHERE((Age_Gro[Size180to200] EQ 8), AGE8Size180to200count)
age9Size180to200 = WHERE((Age_Gro[Size180to200] EQ 9), AGE9Size180to200count)
age10Size180to200 = WHERE((Age_Gro[Size180to200] EQ 10), AGE10Size180to200count)
age11Size180to200 = WHERE((Age_Gro[Size180to200] EQ 11), AGE11Size180to200count)
AGE12Size180to200 = WHERE((Age_Gro[Size180to200] EQ 12), AGE12Size180to200count)
AGE13Size180to200 = WHERE((Age_Gro[Size180to200] EQ 13), AGE13Size180to200count)
AGE14Size180to200 = WHERE((Age_Gro[Size180to200] EQ 14), AGE14Size180to200count)
AGE15Size180to200 = WHERE((Age_Gro[Size180to200] EQ 15), AGE15Size180to200count)
age16Size180to200 = WHERE((Age_Gro[Size180to200] EQ 16), Age16Size180to200count)
age17Size180to200 = WHERE((Age_Gro[Size180to200] EQ 17), AGE17Size180to200count)
age18Size180to200 = WHERE((Age_Gro[Size180to200] EQ 18), AGE18Size180to200count)
age19Size180to200 = WHERE((Age_Gro[Size180to200] EQ 19), AGE19Size180to200count)
age20Size180to200 = WHERE((Age_Gro[Size180to200] EQ 20), AGE20Size180to200count)
age21Size180to200 = WHERE((Age_Gro[Size180to200] EQ 21), AGE21Size180to200count)
age22Size180to200 = WHERE((Age_Gro[Size180to200] EQ 22), AGE22Size180to200count)
age23Size180to200 = WHERE((Age_Gro[Size180to200] EQ 23), AGE23Size180to200count)
age24Size180to200 = WHERE((Age_Gro[Size180to200] EQ 24), AGE24Size180to200count)
age25Size180to200 = WHERE((Age_Gro[Size180to200] EQ 25), AGE25Size180to200count)
age26Size180to200 = WHERE((Age_Gro[Size180to200] EQ 26), AGE26Size180to200count)
WAE_length_bin[10, i*NumLengthBin+adj+5L] = Age0Size180to200count
WAE_length_bin[11, i*NumLengthBin+adj+5L] = Age1Size180to200count
WAE_length_bin[12, i*NumLengthBin+adj+5L] = Age2Size180to200count
WAE_length_bin[13, i*NumLengthBin+adj+5L] = Age3Size180to200count
WAE_length_bin[14, i*NumLengthBin+adj+5L] = Age4Size180to200count
WAE_length_bin[15, i*NumLengthBin+adj+5L] = Age5Size180to200count
WAE_length_bin[16, i*NumLengthBin+adj+5L] = Age6Size180to200count
WAE_length_bin[17, i*NumLengthBin+adj+5L] = Age7Size180to200count
WAE_length_bin[18, i*NumLengthBin+adj+5L] = Age8Size180to200count
WAE_length_bin[19, i*NumLengthBin+adj+5L] = Age9Size180to200count
WAE_length_bin[20, i*NumLengthBin+adj+5L] = Age10Size180to200count
WAE_length_bin[21, i*NumLengthBin+adj+5L] = Age11Size180to200count
WAE_length_bin[22, i*NumLengthBin+adj+5L] = Age12Size180to200count
WAE_length_bin[23, i*NumLengthBin+adj+5L] = Age13Size180to200count
WAE_length_bin[24, i*NumLengthBin+adj+5L] = Age14Size180to200count
WAE_length_bin[25, i*NumLengthBin+adj+5L] = Age15Size180to200count
WAE_length_bin[26, i*NumLengthBin+adj+5L] = Age16Size180to200count
WAE_length_bin[27, i*NumLengthBin+adj+5L] = Age17Size180to200count
WAE_length_bin[28, i*NumLengthBin+adj+5L] = Age18Size180to200count
WAE_length_bin[29, i*NumLengthBin+adj+5L] = Age19Size180to200count
WAE_length_bin[30, i*NumLengthBin+adj+5L] = Age20Size180to200count
WAE_length_bin[31, i*NumLengthBin+adj+5L] = Age21Size180to200count
WAE_length_bin[32, i*NumLengthBin+adj+5L] = Age22Size180to200count
WAE_length_bin[33, i*NumLengthBin+adj+5L] = Age23Size180to200count
WAE_length_bin[34, i*NumLengthBin+adj+5L] = Age24Size180to200count
WAE_length_bin[35, i*NumLengthBin+adj+5L] = Age25Size180to200count
WAE_length_bin[36, i*NumLengthBin+adj+5L] = Age26Size180to200count
ENDIF
PRINT, 'Size180to200', TOTAL(WAE_length_bin[10L:36, i*NumLengthBin+adj+5L])
WAE_length_bin[0, i*NumLengthBin+adj+6L] = WBIC_year[INDEX_growthdata[0]]; WBIC_year (abbrev)
WAE_length_bin[1, i*NumLengthBin+adj+6L] = N_ELEMENTS(Length_Gro); N of fish
WAE_length_bin[2, i*NumLengthBin+adj+6L] = WBIC[INDEX_growthdata[0]]; WBIC
WAE_length_bin[3, i*NumLengthBin+adj+6L] = SurveyYear[INDEX_growthdata[0]]; year
WAE_length_bin[4, i*NumLengthBin+adj+6L] = Max(length[INDEX_growthdata])
WAE_length_bin[5, i*NumLengthBin+adj+6L] = Min(length[INDEX_growthdata])
WAE_length_bin[6, i*NumLengthBin+adj+6L] = Max(age[INDEX_growthdata])
WAE_length_bin[7, i*NumLengthBin+adj+6L] = Min(age[INDEX_growthdata])
WAE_length_bin[8, i*NumLengthBin+adj+6L] = 200
WAE_length_bin[9, i*NumLengthBin+adj+6L] = Size200to220count
; length bin 7
IF Size200to220count GT 0 THEN BEGIN
age0Size200to220 = WHERE((Age_Gro[Size200to220] EQ 0), Age0Size200to220count)
age1Size200to220 = WHERE((Age_Gro[Size200to220] EQ 1), Age1Size200to220count)
age2Size200to220 = WHERE((Age_Gro[Size200to220] EQ 2), AGE2Size200to220count)
age3Size200to220 = WHERE((Age_Gro[Size200to220] EQ 3), AGE3Size200to220count)
age4Size200to220 = WHERE((Age_Gro[Size200to220] EQ 4), AGE4Size200to220count)
age5Size200to220 = WHERE((Age_Gro[Size200to220] EQ 5), AGE5Size200to220count)
age6Size200to220 = WHERE((Age_Gro[Size200to220] EQ 6), AGE6Size200to220count)
age7Size200to220 = WHERE((Age_Gro[Size200to220] EQ 7), AGE7Size200to220count)
age8Size200to220 = WHERE((Age_Gro[Size200to220] EQ 8), AGE8Size200to220count)