run_investigatemodel: Run all model investigations for a base model

View source: R/run_investigatemodel.R

run_investigatemodelR Documentation

Run all model investigations for a base model

Description

Run all model investigations for a base model

Usage

run_investigatemodel(
  basemodelname,
  pars = system.file("extdata", "diagpars.csv", package = "lingcod"),
  run = c("jitter", "profile", "retro"),
  njitter = 100,
  extras = "-nohess -cbs 1500000000"
)

Arguments

basemodelname

The name of the base model of interest in modeldir. This can be a vector of names if you want to do the same thing for each area.

pars

A file path the csv with the parameter specifications. The file has a column for area, with values matching what you use in your model name for area, e.g., 2009.n.001.001_test, would be a northern model. and the remaining columns are parameter inputs for nwfscDiag::get_settings_profile, and the column names must match the formals exactly because they are used with do.call. You can pass any file you want, but the default is to use the one saved internal to this package.

run

A vector of options you want to run, where the default is to run them all.

njitter

An integer number of jitter runs you want to complete.

extras

A single character entry that will be passed to system when running SS. Typically this is "-nohess" but we have added cbs to make it "-nohess -cbs 1500000000" which will decrease run time for larger models. See the github issue for lingcod in 2021.

Details

notes:

  • The whole process will fail if a single model doesn't converge in the retro.

  • The process will in retro if no forecasts.

  • Error from SS_doretro I think has file names pasted together without spaces. ⁠Error in r4ss::SS_doRetro(masterdir = retro_dir, overwrite = model_settings$overwrite, :⁠ ⁠error copying file(s): ss.exeforecast.ssling_control.ssling_data.ss⁠

Author(s)

Chantel R. Wetzel from the example in nwfscDiags.

Examples

## Not run: 
# Just need to define xxx
setwd(dirname(system.file(package = "lingcod")))
run_investigatemodel(basemodelname = basemodelname)

## End(Not run)

iantaylor-NOAA/Lingcod_2021 documentation built on Oct. 30, 2024, 6:42 p.m.