first commit for #182; Bmsy_for_H4010_top#322
Conversation
There was a problem hiding this comment.
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?
SS_write_ssnew.tpl
Outdated
| 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; |
There was a problem hiding this comment.
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.
SS_readdata_330.tpl
Outdated
| 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);} |
There was a problem hiding this comment.
Change "control rule bottom" to "control rule cutoff" to increase consistency
SS_readdata_330.tpl
Outdated
| *(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; |
There was a problem hiding this comment.
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;} |
There was a problem hiding this comment.
Change "bottom" to "cutoff"
|
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
kellijohnson-NOAA
left a comment
There was a problem hiding this comment.
4a19422 increases consistency in comments. I think this can be merged once checks show that they are all passing.
Info for change logDescriptionOption for control rule inflection point to use Bmsy / SSB_unf
|
|
Thanks Kelli for the improvements. |
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:
Describe any changes in r4ss/SS3 manual/SSI/change log that are needed (if not checked):
Additional information (optional):