This function modernizes scripts developed by Jon Carey and Derek Dapp to update and overwrite Chinook age 2 recruit scalers in a database run. It calculates the ratio of the provided forecast age 2 abundance to the existing mature cohort abundance, and then multiplies that ratio against the existing recruit scaler.

update_2s(chinrs, db, runID)

Arguments

chinrs

string, path to "ChinRSScalers" file with provided a2s

db

string, file path to database

runID

numeric, RunID to be altered

Value

Nothing, but database tables are altered.

Examples

if (FALSE) {
#note that reads from xlsm ChinRSScaler files can be very slow
#due to old/leftover sheet names & connections
update_2s("path/to/ChinRSScalarsMR21.xlsm", "path/to/Chinook_FRAM_Database.mdb", runID = NNN)

}