nmfs-ost / ss3-source-code

The source code for Stock Synthesis (SS3).
https://nmfs-ost.github.io/ss3-website/
Creative Commons Zero v1.0 Universal
36 stars 16 forks source link

[Feature]: add line to rebuilder output consistent with latest rebuilder version (3.12j) #512

Closed brianlangseth-NOAA closed 11 months ago

brianlangseth-NOAA commented 11 months ago

Describe the solution you would like.

The latest version of rebuilder (3.12j December 2021) includes a line to adjust spawning output for single sex models where Sex = -1. SS3 does not output this line into rebuild.dat when "Do westcoast rebuilder" is selected in the forecast file. Therefore, can two lines be added into the rebuild.dat output?

Lines to add (default of 1 means no adjustments are done): # Sex ratio correction 1

This needs to be added between the age specific selectivity and weights, and the M and current age structure outputs.

Describe alternatives you have considered

Require any user who wants to use rebuilder to enter these lines on their own

Statistical validity, if applicable

No response

Describe if this is needed for a management application

No response

Additional context

Here is the output (line 41-42) within a rebuild.dat file

image

Rick-Methot-NOAA commented 11 months ago

How's this?

      rebuild_dat << "# Sex ratio correction" << endl;
      if (gender_rd < 0) 
      {rebuild_dat << fracfemale << endl;}  // where fracfemale is set to the sexratio parameter value
      else
      {rebuild_dat << "1" << endl;}  // value to indicate not used
brianlangseth-NOAA commented 11 months ago

Thanks Rick! That satisfies me.