Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions SS_readstarter.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -640,20 +640,18 @@
int depletion_basis;
int depletion_multi;
int depletion_log;
init_int depletion_basis_rd; // 0=skip; 1=B0; 2=Bmsy; 3=B_styr; 4=B_endyr; 5=dynamic_Bzero; values >=11 invoke multiyr with 10's digit; >=100 invoke log(ratio) with hundreds digit
init_number depletion_basis_rd; // 0=skip; 1=B0; 2=Bmsy; 3=B_styr; 4=B_endyr; 5=dynamic_Bzero; values >=11 invoke multiyr with 10's digit; append .1 to invoke log(ratio) with hundreds digit
LOCAL_CALCS
// clang-format on
echoinput << depletion_basis_rd << " depletion_basis as read; this is also known as Bratio and is a std quantity; has multi-yr and log(ratio) options" << endl;
depletion_multi = 0;
depletion_log = 0;
k = depletion_basis_rd;
depletion_basis = depletion_basis_rd; // default
depletion_basis = int( depletion_basis_rd ); // discard decimal
k = depletion_basis;

if (k >= 100) // invokes log(ratio)
if (depletion_basis_rd > float( depletion_basis) ) // invokes log(ratio) if decimal value exists
{
k -= 100;
depletion_log = 1;
depletion_basis = k;
}

if (k > 10) // invokes multiyr
Expand Down Expand Up @@ -695,7 +693,7 @@
// clang-format off
END_CALCS

init_int F_std_basis_rd; // 0=raw; 1=rel Fspr; 2=rel Fmsy ; 3=rel Fbtgt; values >=11 invoke multiyr with 10's digit; >=100 invoke log(ratio) with hundreds digit
init_number F_std_basis_rd; // 0=raw; 1=rel Fspr; 2=rel Fmsy ; 3=rel Fbtgt; values >=11 invoke multiyr with 10's digit; >=100 invoke log(ratio) with hundreds digit
number finish_starter;
int mcmc_output_detail;
number MCMC_bump; // value read and added to ln(R0) when starting into MCMC
Expand All @@ -714,14 +712,12 @@
F_std_multi = 0;
F_std_log = 0;
echoinput << F_std_basis_rd << " F_std basis as read" << endl;
k = F_std_basis_rd;
F_std_basis = F_std_basis_rd; // default
F_std_basis = int(F_std_basis_rd); // discards the decimal
k = F_std_basis; // temp value

if (k >= 100) // invokes log(ratio)
if (F_std_basis_rd > float( F_std_basis) ) // invokes log(ratio) if decimal value exists
{
F_std_log = 1;
k -= 100;
F_std_basis = k; // can be overridden by next test
}

if (k > 10) // invokes multiyr
Expand Down
4 changes: 2 additions & 2 deletions SS_write_ssnew.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@ FUNCTION void write_nucontrol()
NuStart << final_conv << " # final convergence criteria (e.g. 1.0e-04) " << endl;
NuStart << retro_yr - endyr << " # retrospective year relative to end year (e.g. -4)" << endl;
NuStart << Smry_Age << " # min age for calc of summary biomass" << endl;
NuStart << depletion_basis_rd << " # Depletion basis: denom is: 0=skip; 1=X*SPBvirgin; 2=X*SPBmsy; 3=X*SPB_styr; 4=X*SPB_endyr; 5=X*dyn_Bzero; values>=11 invoke N multiyr (up to 9!) with 10's digit; >100 invokes log(ratio)" << endl;
NuStart << depletion_basis_rd << " # Depletion basis: denom is: 0=skip; 1=X*SPBvirgin; 2=X*SPBmsy; 3=X*SPB_styr; 4=X*SPB_endyr; 5=X*dyn_Bzero; values>=11 invoke N multiyr with 10s & 100s digit; append .1 to invoke log(ratio); e.g. 122.1 produces log(12 yr trailing average of B/Bmsy)" << endl;
NuStart << depletion_level << " # Fraction (X) for Depletion denominator (e.g. 0.4)" << endl;
NuStart << SPR_reporting << " # SPR_report_basis: 0=skip; 1=(1-SPR)/(1-SPR_tgt); 2=(1-SPR)/(1-SPR_MSY); 3=(1-SPR)/(1-SPR_Btarget); 4=rawSPR" << endl;
NuStart << F_reporting << " # F_std_reporting_units: 0=skip; 1=exploitation(Bio); 2=exploitation(Num); 3=sum(Apical_F's); 4=mean F for range of ages (numbers weighted); 5=unweighted mean F for range of ages" << endl;
Expand All @@ -1548,7 +1548,7 @@ FUNCTION void write_nucontrol()
{
NuStart << "#COND 10 15 #_min and max age over which mean F will be calculated with F_reporting=4 or 5" << endl;
}
NuStart << F_std_basis_rd << " # F_std_scaling: 0=no scaling; 1=F/Fspr; 2=F/Fmsy; 3=F/Fbtgt; where F means annual F_std, Fmsy means F_std@msy; values >=11 invoke N multiyr (up to 9!) using 10's digit; >100 invokes log(ratio)" << endl;
NuStart << F_std_basis_rd << " # F_std_scaling: 0=no scaling; 1=F/Fspr; 2=F/Fmsy; 3=F/Fbtgt; where F means annual F_std, Fmsy means F_std@msy; values >=11 invoke N multiyr using 10s and 100s digit; append .1 to invoke log(ratio)" << endl;
NuStart << double(mcmc_output_detail) + MCMC_bump << " # MCMC output detail: integer part (0=default; 1=adds obj func components; 2= +write_report_for_each_mceval); and decimal part (added to SR_LN(R0) on first call to mcmc)" << endl;
NuStart << ALK_tolerance << " # ALK tolerance ***disabled in code" << endl;
NuStart << irand_seed_rd << " # random number seed for bootstrap data (-1 to use long(time) as seed): # " << irand_seed << endl;
Expand Down