flr / ss3om

Tools to load SS3 outputs and generate grids of model runs for OM conditioning
5 stars 5 forks source link

Possible incompatibility between last version of r4ss and SS3om in linux #10

Closed mmrinconh closed 6 days ago

mmrinconh commented 2 weeks ago

Hi, I'm trying to run ss3om::readFLSss3 function after running SS3 on linux (ubuntu focal fossa) with SS3 executable in the same folder. Nevertheless I got some conflicts with r4ss and SS3om functions:

With the last version of r4ss (r4ss_1.50.0), the following line inputs <- r4ss::SS_read(dir = "boot/data", verbose = TRUE) catage <- subset(inputs$dat$agecomp,fleet==1 & Yr>=(inputs$dat$styr) & Yr<(inputs$dat$endyr),c("Yr","a0","a1","a2","a3","a4","a5","a6")) gives an error Error in eval(e, x, parent.frame()): object 'Yr' not found This is solved by changing the 'Yr' by 'year' as follows: catage <- subset(inputs$dat$agecomp,fleet==1 & year>=(inputs$dat$styr) & year<(inputs$dat$endyr),c("year","a0","a1","a2","a3","a4","a5","a6"))

Nevertheless if I use the CRAN version of r4ss (1.44.0) this is not producing an error.

Then trying to run SS3 executable with the 1.44.0 version r4ss::get_ss3_exe(dir = wd) system(paste0("chmod 755 ",wd,"/ss3")) r4ss::run(dir=wd, exe="ss3", skipfinished=FALSE, show_in_console =T) I got Error: 'run' is not an exported object from 'namespace:r4ss'

But with the latest version of r4ss (r4ss_1.5.0) it goes fine, after running SS3 with that version I tried to install ss3om via 'remotes' package and I got the following:

remotes::install_github("flr/ss3om") Downloading GitHub repo flr/ss3om@HEAD Error in utils::download.file(url, path, method = method, quiet = quiet, : download from 'https://api.github.com/repos/flr/ss3om/tarball/HEAD' failed

The CRAN version 'ss3om_0.5.2' of ss3om was fine but when I execute pil.stock <- ss3om::readFLSss3(dir=dir) I got: Error en eval(jsub, SDenv, parent.frame()): objeto 'Yr' no encontrado

And it looks related to r4ss when using the outputs of the function r4ss::SS_read. Any help on this will be appreciated!

Thanks in advanced

kellijohnson-NOAA commented 1 week ago

r4ss just underwent some recent edits to clean up the naming scheme of several columns. I am guessing this is what is causing problems. @iantaylor-NOAA will be back in the office tomorrow (today is a federal holiday in the states) and he can better summarize what has changed.

iagomosqueira commented 1 week ago

We were kindly notified of those changes in r4ss (https://github.com/flr/ss3om/issues/9), but they still need to be incorporated into ss3om. Will look soon into it.

iagomosqueira commented 1 week ago

Changes have now been pushed to ss3om, version 0.5.3, to account for naming changes in r4ss. Version 1.50.0 of r4ss is now needed.

On the problem installing ss3om via install_github I do not know what the issue is. Other FLR packages can be installed just fine. The new version should be available in r-universe fairly soon. Or maybe try cloning it and installing from there. I will chase this problem.