Skip to content

Comments

first commit for #182; Bmsy_for_H4010_top#322

Merged
Rick-Methot-NOAA merged 4 commits intomainfrom
BMSY_for_H4010_top
Jun 3, 2022
Merged

first commit for #182; Bmsy_for_H4010_top#322
Rick-Methot-NOAA merged 4 commits intomainfrom
BMSY_for_H4010_top

Conversation

@Rick-Methot-NOAA
Copy link
Collaborator

What issue(s) does this PR address? Describe and add issue numbers, if applicable.

Link issue(s) here: #182

What tests have been done? Upload any model input files created for testing in a zip file, if possible.

verified with simple example

What tests/review still need to be done? Who can do it, and by when is it needed (ideally)?

none, but checking variance would be good idea

Check which is true. This PR requires:

  • no further changes to r4ss
  • no further changes to the manual
  • no further changes to SSI (the SS3 GUI)
  • no further changes to the stock synthesis change log (new features, bug reports)

Describe any changes in r4ss/SS3 manual/SSI/change log that are needed (if not checked):

Additional information (optional):

Copy link
Contributor

@kellijohnson-NOAA kellijohnson-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to compile this branch locally and I too ran the simple example as practice of running through the process. After running simple and looking at some of the comments and warning messages I think with just a little bit more effort we could increase consistency to help future users. For example "control rule bottom" should be "control rule cutoff" in all instances.

I am not sure what is standard practice here? Does the review commit the proposed changes in this branch or a fork or would @Rick-Methot-NOAA be responsible for making changes if he agrees with the comments?

Also, who is responsible for making issues in nmfs-stock-synthesis/doc, nmfs-stock-synthesis/ssi, and r4ss/r4ss?

NuFore << HarvestPolicy << " # Control rule method (0: none; 1: ramp does catch=f(SSB), buffer on F; 2: ramp does F=f(SSB), buffer on F; 3: ramp does catch=f(SSB), buffer on catch; 4: ramp does F=f(SSB), buffer on catch) " << endl;
NuFore << "# values for top, bottom and buffer exist, but not used when Policy=0" << endl;
NuFore << H4010_top << " # Control rule Biomass level for constant F (as frac of Bzero, e.g. 0.40); (Must be > the no F level below) " << endl;
NuFore << H4010_top_rd << " # Control rule Biomass level for constant F (as frac of Bzero, e.g. 0.40); must be > the no F level below, or set to -1 to use Bmsy/SSB_unf " << endl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we should change this to

" # Control rule inflection, level for constant F (as frac of Bzero, e.g. 0.40); must be > level for no F, or set to -1 to use Bmsy/SSB_unf

and change line 1485 to

" # Control rule cutoff, level for no F (as frac of Bzero, e.g., 0.10) "

to increase consistency and allow users to search for "level for no F", which, with this change, they would find on two lines. We could add the word Biomass back into the line after control rule, where I propose removing it to match the wording used in echoinput.sso and warnings.sso.

H4010_scale=H4010_scale_rd;
echoinput<<H4010_scale<<" # echoed harvest policy scalar "<<endl;
if(H4010_top<=H4010_bot) {N_warn++; cout<<" EXIT - see warning "<<endl; warning<<N_warn<<" control rule inflection: "<<H4010_top<<" must be > control rule bottom "<<H4010_bot<<endl; exit(1);}
if(H4010_top_rd > 0.0 && H4010_top_rd<=H4010_bot) {N_warn++; cout<<" EXIT - see warning "<<endl; warning<<N_warn<<" control rule inflection: "<<H4010_top_rd<<" must be > control rule bottom "<<H4010_bot<<endl; exit(1);}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change "control rule bottom" to "control rule cutoff" to increase consistency

*(ad_comm::global_datafile) >> H4010_top;
echoinput<<H4010_top<<" # echoed harvest policy inflection "<<endl;
*(ad_comm::global_datafile) >> H4010_top_rd; // use -1 to set H4010_top to Bmsy/SSB_unf
echoinput<<H4010_top_rd<<" # echoed harvest policy inflection (-1 for H4010_top set to Bmsy/SSB_unf)"<<endl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we should change lines 3227, 3229, and 3232 to use "control rule" rather than "harvest policy".

Should we shorten the comment in the brackets to "(-1 to set to Bmsy/SSB_unf)"? I don't think many users look at the source code to know what H4010_top is referring to.

SS_benchfore.tpl Outdated
if (H4010_top_rd < 0.0)
{
H4010_top = Bmsy / SSB_unf;
if(H4010_bot > 0.25) {N_warn++; warning<<N_warn<<" Beware: control rule bottom is large ("<<H4010_bot<<"); so may not be < calculated Bmsy/SSB_unf ("<<H4010_top<<")"<<endl;}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change "bottom" to "cutoff"

@Rick-Methot-NOAA
Copy link
Collaborator Author

consistency is good and not my forte. I am fine with use of control rule throughout and glad if someone else can make those edits.

change to the .bat file in this commit was accidental and harmless. It need not be isolated in its own commit.

Thanks to @k-doering-NOAA for guidance on formatting.

PR #322
* H4010_* is called control rule in all files except
where it was being read in and displayed back to echoinput.
* uses `control rule cutoff` instead of `control rule bottom`
* control rule* in comments instead of other verbage
* removes H4010_top from comment
  because most people won't be looking at source code

PR #322
Copy link
Contributor

@kellijohnson-NOAA kellijohnson-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4a19422 increases consistency in comments. I think this can be merged once checks show that they are all passing.

@k-doering-NOAA k-doering-NOAA added this to the 3.30.20 milestone May 31, 2022
@kellijohnson-NOAA
Copy link
Contributor

kellijohnson-NOAA commented May 31, 2022

Info for change log

Description

Option for control rule inflection point to use Bmsy / SSB_unf
instead of user-specified value. If read in value is -1 then,
Stock Synthesis will use calculated Bmsy/SSB_unf to override input value.

Version Date Description Issue Input change Action Topic Type
3.30.20 2022-05-31 #182 Option for control rule inflection point to use Bmsy / SSB_unf instead of user-specified value. If read in value is -1 then, Stock Synthesis will use calculated Bmsy/SSB_unf to override input value. No revise forecast input, calc

@Rick-Methot-NOAA
Copy link
Collaborator Author

Thanks Kelli for the improvements.

@k-doering-NOAA k-doering-NOAA deleted the BMSY_for_H4010_top branch August 10, 2022 20:25
@Rick-Methot-NOAA Rick-Methot-NOAA added forecast change log use for issues that should appear in change log labels Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change log use for issues that should appear in change log forecast

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new control rule option with inflection linked to Bmsy rather than % of Bzero

3 participants