From 87a37830d235cad5b9b80987ca7872650b26efc5 Mon Sep 17 00:00:00 2001 From: RickMethot Date: Wed, 30 Nov 2022 16:44:38 -0800 Subject: [PATCH 1/2] Create StockSynthesis.code-workspace --- StockSynthesis.code-workspace | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 StockSynthesis.code-workspace diff --git a/StockSynthesis.code-workspace b/StockSynthesis.code-workspace new file mode 100644 index 00000000..e935e2e4 --- /dev/null +++ b/StockSynthesis.code-workspace @@ -0,0 +1,12 @@ +{ + "folders": [ + { + "path": ".." + } + ], + "settings": { + "files.associations": { + "\"*.extension\":": "\"tpl\"" + } + } +} \ No newline at end of file From ebdc45e4fd1aae0e12401fe37504b7b289245ff6 Mon Sep 17 00:00:00 2001 From: RickMethot Date: Wed, 30 Nov 2022 17:11:04 -0800 Subject: [PATCH 2/2] revise sex_ratio report to be area-specific --- SS_write_report.tpl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/SS_write_report.tpl b/SS_write_report.tpl index ec4a8ec7..c9e69260 100644 --- a/SS_write_report.tpl +++ b/SS_write_report.tpl @@ -3574,7 +3574,10 @@ FUNCTION void write_bigoutput() SS2out << " Herma_Trans "; } if (gender == 2) - SS2out << " sex_ratio "; + { + for (p = 1; p <=pop; p++) + SS2out << " sex_ratio_area:_" << p ; + } for (f = 1; f <= Nfleet; f++) SS2out << " Len:_" << f << " SelWt:_" << f << " RetWt:_" << f; SS2out << endl; @@ -3627,16 +3630,20 @@ FUNCTION void write_bigoutput() SS2out << " NA "; } } - // write sex ratio in endyr using natage in area 1 + // write sex ratio in endyr for each area using natage + // small constant added to denominator so that morph-area combos with no fish will display a value of 0.0, rather than "nan" + // because natage is used, the reported sex ratio values will be responsive to hermaphroditism, and to sex-specific mortality if (gender == 2) { if (sx(g) == 1) { - SS2out << " " << natage(t, 1, g, a) / (natage(t, 1, g, a) + natage(t, 1, g + gmorph / 2, a)) << " "; + for (p = 1; p <= pop; p++) + SS2out << " " << natage(t, p, g, a) / (natage(t, p, g, a) + natage(t, p, g + gmorph / 2, a) + 1.0e-07) << " "; } else { - SS2out << " " << natage(t, 1, g, a) / (natage(t, 1, g, a) + natage(t, 1, g - gmorph / 2, a)) << " "; + for (p = 1; p <= pop; p++) + SS2out << " " << natage(t, p, g, a) / (natage(t, p, g, a) + natage(t, p, g - gmorph / 2, a) + 1.0e-07) << " "; } } if (WTage_rd == 0)