Forums

Back

Can I ask some question about ss3sim

JW
Jintao Wang, modified 2 Years ago.

Can I ask some question about ss3sim

Youngling Posts: 34 Join Date: 8/9/16 Recent Posts

I use different files of OM and EM, and want to do simulations about that, but it shows many problems. I really need some suggestions.

 

d<-system.file("extdata",package="ss3sim")
om<-file.path(d,"models","om")
em<-file.path(d,"models","em")
df<- setup_scenarios_defaults()
df[, "si.years.2"] <- "seq(1990, 2020, by =2)"
df[, "cf.years.1"] <- "seq(1990, 2020, by =1)"
df[,"sa.years.1"]<- "seq(1990, 2020, by =2)"

iterations <- 1:100
scname <- run_ss3sim(iterations = iterations, simdf = df, em_dir=em,om_dir=om)

KJ
Kelli Faye Johnson, modified 2 Years ago.

RE: Can I ask some question about ss3sim

Youngling Posts: 28 Join Date: 6/13/17 Recent Posts

Thank you for your question regarding ss3sim. It is often a difficult task to set up specialized OM and EM files. Some guidance is available in a vignette located on GitHub (https://ss3sim.github.io/ss3sim/articles/making-models.html). I will try to work through the "error" messages that you are getting tomorrow.

JW
Jintao Wang, modified 2 Years ago.

RE: Can I ask some question about ss3sim

Youngling Posts: 34 Join Date: 8/9/16 Recent Posts

Error: The `om_dir` argument of `run_ss3sim()` was deprecated in ss3sim 1.1.4 and is now defunct.

It is not a package problem, because I have used the github package (remotes::install_github("ss3sim/ss3sim"))

KD
Kathryn Doering, modified 2 Years ago.

RE: Can I ask some question about ss3sim

Youngling Posts: 57 Join Date: 2/19/19 Recent Posts

Thanks for posting this error - The om_dir and em_dir should now be specified as "om" and "em" columns within the simdf (use ?ss3sim::run_ss3sim in the R console to see more details) rather than as separate arguments to run_ss3sim(). This allows each scenario to have a different om/em path, which is not possible using the om_dir and em_dir variables. Here is an example of specifying the om and em paths as part of the dataframe, where om and em paths can differ by scenario) 

 

 

KJ
Kelli Faye Johnson, modified 2 Years ago.

RE: Can I ask some question about ss3sim

Youngling Posts: 28 Join Date: 6/13/17 Recent Posts

Can you send me (kelli.johnson@noaa.gov) or post your input files or perhaps post the specific error messages that you are getting? I think that you may have posted them originally but I am not seeing them now.

JW
Jintao Wang, modified 2 Years ago.

RE: Can I ask some question about ss3sim

Youngling Posts: 34 Join Date: 8/9/16 Recent Posts

Yes, I change some files, but it is still not true.

 Error in if (final == 3.3) { : missing value where TRUE/FALSE needed
In addition: Warning message:
In SS_readstarter(file.path(dir.old, ifelse(use_ss_new, "starter.ss_new",  :
  Final value is NA but should be either 3.30 or 999

KJ
Kelli Faye Johnson, modified 2 Years ago.

RE: Can I ask some question about ss3sim

Youngling Posts: 28 Join Date: 6/13/17 Recent Posts

This message is from {r4ss} when reading your starter file with `r4ss::SS_readstart()` used by {ss3sim}. There should be a space after the input value and before the pound or hash symbol. This error is occurring because there is no space on lines 33 and 36.