Skip to content

Commit

Permalink
Maturity not 0 if multiple birthseas, but only seasson 1 is really us…
Browse files Browse the repository at this point in the history
…ed in SRR
  • Loading branch information
iagomosqueira committed Mar 11, 2021
1 parent 40ee488 commit fd1f1d8
Show file tree
Hide file tree
Showing 86 changed files with 366,048 additions and 38 deletions.
3 changes: 2 additions & 1 deletion R/build330.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ buildFLSss330 <- function(out, morphs=out$morph_indexing$Index, name=out$Control
wt <- ss3wt30(endgrowth, dmns, birthseas=1)

# MAT
mat <- ss3mat30(endgrowth, dmns, spawnseas=out$Spawn_seas,
# NOTE birthseas from morph_indexing
mat <- ss3mat30(endgrowth, dmns, spawnseas=out$morph_indexing$BirthSeas,
option=out$Maturity_option)

# CORRECT Mat*Fecund to by unit body weight
Expand Down
1 change: 1 addition & 0 deletions R/check.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ extractFbar <- function(out) {

#
} else {
fbar <- fbar$Value
warning(paste("Returned F is relative to", out$F_report_basis))
}
return(FLQuant(fbar, dimnames=list(age="all",
Expand Down
2 changes: 1 addition & 1 deletion R/load.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ loadOMS <- function(dir=".", subdirs=list.dirs(path=dir, recursive=FALSE),

# LOOP over subdirs
out <- foreach(i=seq(length(subdirs)),
.final = function(x) setNames(x, seq(length(subdirs))),
.final = function(x) setNames(x, nm=seq(length(subdirs))),
.inorder=TRUE, .errorhandling="remove") %dopar% {

if(progress)
Expand Down
12 changes: 6 additions & 6 deletions R/read.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ readFLomss3 <- function(dir, birthseas=out$birthseas, fleets,

# readOutputss3 {{{
readOutputss3 <- function(dir, repfile = "Report.sso",
compfile = "CompReport.sso", compress="gz") {
compfile = "CompReport.sso", covarfile = "covar.sso", compress="gz") {

# Possibly compressed files
cfiles <- c(repfile = repfile, compfile = compfile)
cfiles <- c(repfile = repfile, compfile = compfile, covarfile = covarfile)

# CHECK compressed files
idx <- file.exists(file.path(dir, paste(cfiles, compress, sep = ".")))
cfiles[idx] <- paste(cfiles, compress, sep = ".")

out <- SS_output(dir, verbose=FALSE, hidewarn=TRUE, warn=FALSE,
printstats=FALSE, covar=FALSE, forecast=FALSE,
printstats=FALSE, covarfile=cfiles["covarfile"], forecast=FALSE,
repfile=cfiles["repfile"], compfile=cfiles["compfile"])

return(out)
Expand Down Expand Up @@ -312,7 +312,7 @@ readFLomeOMss3 <- function(dir, birthseas=out$birthseas, fleets,
} # }}}

# readOMSss3 {{{
readOMSss3 <- function(dir, birthseas=out$birthseas, fleets,
readOMSss3 <- function(dir, fleets,
repfile="Report.sso", compfile="CompReport.sso", ...) {

# LOAD SS_output list
Expand All @@ -321,14 +321,14 @@ readOMSss3 <- function(dir, birthseas=out$birthseas, fleets,
if(out$SS_versionNumeric == 3.24) {

# FLStock
stk <- buildFLSss3(out, birthseas=birthseas, ...)
stk <- buildFLSss3(out, birthseas=out$birthseas, ...)
# FLIndexBiomass
idx <- buildFLIBss3(out, fleets=fleets)
# refpts
rps <- buildFLRPss3(out)
# results
res <- buildRESss3(out)
} else{
} else {

# FLStock
stk <- buildFLSss330(out, ...)
Expand Down
5 changes: 3 additions & 2 deletions exec/packss3run
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@

#!/bin/bash

GZFILES=("Report.sso" "covar.sso" "wtatage.ss_new" "CompReport.sso")
KEEPFILES=("warning.sso" "Forecast-report.sso" "starter.ss" "forecast.ss", "ss3.par", "admodel.hes")
INPUTFILES=`find . \( -name "*.dat" -or -name "*.ctl" \) -exec basename {} ';'`
KEEPFILES=("warning.sso" "Forecast-report.sso" "starter.ss" "forecast.ss" "ss3.par" "admodel.hes" "ss.par" "ss.cor" "watatage.ss")
INPUTFILES=("control.ss" "data.ss" `find . \( -name "*.dat" -or -name "*.ctl" \) -exec basename {} ';'`)
GZEDFILES=("Report.sso.gz" "covar.sso.gz" "wtatage.ss_new.gz" "CompReport.sso.gz")
EXCEPT=("${INPUTFILES[@]}" "${KEEPFILES[@]}" "${GZEDFILES[@]}")

Expand Down
Binary file added inst/ext-data/albio/CompReport.sso.gz
Binary file not shown.
754 changes: 754 additions & 0 deletions inst/ext-data/albio/Forecast-report.sso

Large diffs are not rendered by default.

Binary file added inst/ext-data/albio/Report.sso.gz
Binary file not shown.
534 changes: 534 additions & 0 deletions inst/ext-data/albio/abt.ctl

Large diffs are not rendered by default.

Loading

0 comments on commit fd1f1d8

Please sign in to comment.