Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't make maturity at 50% length time-varying #317

Open
ChristineStawitz-NOAA opened this issue Sep 30, 2021 · 1 comment
Open

Can't make maturity at 50% length time-varying #317

ChristineStawitz-NOAA opened this issue Sep 30, 2021 · 1 comment
Labels
type --- 🐛 an unexpected problem or unintended behavior

Comments

@ChristineStawitz-NOAA
Copy link
Contributor

I suspect this is due to the pesky % in the parameter name, but when I try to make the Mat50%_Fem_GP_1 parameter decrease over time I receive the error:

 Error in FUN(X[[i]], ...) : 
  Could not locate the parameter Mat50%_Fem_GP_1 in the operating model .ctl file. Check that the parameter is spelled correctly and in the correct case. Have you standardized your .ctl file by running it through SS and used the control.ss_new file? 

I did confirm that re-running it and re-naming control.ss_new to om_ctl doesn't fix the issue.

@ChristineStawitz-NOAA ChristineStawitz-NOAA added the type --- 🐛 an unexpected problem or unintended behavior label Sep 30, 2021
@k-doering-NOAA k-doering-NOAA self-assigned this Feb 17, 2022
@k-doering-NOAA k-doering-NOAA removed their assignment Jul 29, 2022
@kellijohnson-NOAA
Copy link
Contributor

@ChristineStawitz-NOAA I just tried this out using

  d <- system.file("extdata", package = "ss3sim")
  om <- paste0(d, "/models/cod-om")
  newctl <- change_tv(
    change_tv_list = list("Mat50%_Fem_GP_1" = seq(0.01, 0.05, length.out = 100)),
    ctl_file_in = file.path(om, "codOM.ctl"),
    ctl_file_out = NULL,
    dat_file_in = file.path(om, "codOM.dat"),
    dat_file_out = NULL
  )
  oldctl <- r4ss::SS_read(om, verbose = FALSE)$ctl
  oldctl$MG_parms[9, ]
  newctl$ctl_out[81]
  newctl$dat_out$envdat

and it appears to be working. I am not sure if something was fixed or if the character of the percent sign was just not working for you because of some copy and paste error wrt characters, but I doubt either is true 😆 . Please let me know if you would like me to look into this further, if you can replicate the error, or if the above code works for you. If you don't want to bother, feel free to close the issue and we can deal with it when it comes up again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type --- 🐛 an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants