revise RECR_DIST output to work better for models without 50/50 sex ratio at recruitment?
iantaylor-NOAA opened this issue · 2 comments
The 2nd dimension of the recr_dist
array has length equal to the product of the number of growth patterns and number of sexes:
Line 157 in 69cc716
However the RECRUITMENT_DIST output in Report.sso only loops over growth patterns, not sexes within them:
ss3-source-code/SS_write_report.tpl
Lines 1031 to 1043 in 69cc716
This works fine for the huge majority of models that are either 1-sex or have the fraction female fixed at 0.5.
However, @akatan999 shared a model (shared with SS3 developers on Google Drive here) with hermaphroditism and multiple areas where the fish recruit to both areas as males but the values in the table only show the tiny fraction of females recruiting to each area:
RECRUITMENT_DIST report:10
Settle# settle_timing# G_pattern Area Settle_Month Seas Age Time_w/in_seas Frac/sex
1 1 1 1 1 1 0 0 4.43463e-07
2 1 1 2 1 1 0 0 5.56537e-07
Could that table be revised to either sum across females and males OR have separate rows for both females and males?
Update: I just changed the code in r4ss/r4ss@2081ce2 to rescale the recruitments to sum to 1.0 before plotting. It may still be worth revising the SS3 output but the confusing plot which led to this issue has been resolved:
The values being plotted are just the frac female. I revised the SS3 output table to relabel and output the fraction male.
New output:
ECRUITMENT_DIST report:10
Settle# settle_timing# G_pattern Area Settle_Month Seas Age Time_w/in_seas recr_dist_F recr_dist_M
1 1 1 1 1 1 0 0 4.42102e-07 0.442101
2 1 1 2 1 1 0 0 5.57898e-07 0.557898
#
RECRUITMENT_DIST_Bmark
Settle# settle_timing# G_pattern Area Settle_Month Seas Age Time_w/in_seas recr_dist_F recr_dist_M
1 1 1 1 1 1 0 0 4.42102e-07 0.442101
2 1 1 2 1 1 0 0 5.57898e-07 0.557898
#
RECRUITMENT_DIST_endyr
Settle# settle_timing# G_pattern Area Settle_Month Seas Age Time_w/in_seas recr_dist_F recr_dist_M
1 1 1 1 1 1 0 0 4.42102e-07 0.442101
2 1 1 2 1 1 0 0 5.57898e-07 0.557898
#
RECRUITMENT_DIST_TIMESERIES
GP: 1 1 1 1
settle_timing: 1 1 1 1
area: 1 1 2 2
sex: 1 2 1 2
Year recr_dist
1970 4.42102e-07 0.442101 5.57898e-07 0.557898
1971 4.42102e-07 0.442101 5.57898e-07 0.557898
1972 4.42102e-07 0.442101 5.57898e-07 0.557898