Skip to content

Commit

Permalink
more version standardizing
Browse files Browse the repository at this point in the history
  • Loading branch information
e-perl-NOAA committed Oct 17, 2023
1 parent 6716bd7 commit 4dc7bec
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 55 deletions.
6 changes: 3 additions & 3 deletions 13output.tex
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ \subsection{Stock Synthesis Summary}
Before v.3.30.17, TotBio and SmryBio did not always match values reported in columns of the TIME\_SERIES table of Report.sso. The report file should be used instead of ss\_summary.sso for correct calculation of these quantities before v.3.30.17. Care should be taken when using the TotBio and SmryBio if the model configuration has recruitment after January 1 or in a later season, as TotBio and SmryBio quantities are always calculated on January 1. Consult the detailed age-, area-, and season-specific tables in report.sso for calculations done at times other than January 1.

\subsection{SIS table}
The SIS\_table.sso is deprecated as of SS3 v.3.30.17. Please use the \hyperref[sec:r4ss]{r4ss} function \texttt{get\_SIS\_info()} instead.
The SIS\_table.sso is deprecated as of v.3.30.17. Please use the \hyperref[sec:r4ss]{r4ss} function \texttt{get\_SIS\_info()} instead.

The SIS\_table.sso file contains model output formatted for reading into the NMFS Species Information System (\href{https://www.st.nmfs.noaa.gov/sis/}{SIS}). This file includes an assessment summary for categories of information (abundance, recruitment, spawners, catch estimates) that are input into the SIS database. A time-series of estimated quantities which aggregates estimates across multiple areas and seasons are provided to summarize model results. Access to the SIS database is granted to all NOAA employees.

Expand Down Expand Up @@ -193,7 +193,7 @@ \subsection{Bootstrap Data Files}

\item Often there is need to explore the removal (not include in the model fitting) of specific years in a data set which can be done by specifying a negative fleet number. If bootstrapping a data file, note that specifying a negative fleet in the data inputs for indices, length composition, or age composition will include the ``observation'' in the model (hence generating predicted values and bootstrap data sets for the data), but not in the negative log likelihood. The ``observation values'' used with negative fleet do not influence the predicted values, except when using tail compression with length or age composition. Non-zero values greater than the minimum tail compression should be used for the observation values when tail compression is being used, as using zeros or values smaller than the minimum tail compression can cause the predicted values to be reported as zero and shift predictions to other bins.

\item As of SS3 v.3.30.15, age and length composition data that use the Dirichlet-Multinomial distribution in the model are generated using the Dirichlet-Multinomial in bootstrap data sets.
\item As of v.3.30.15, age and length composition data that use the Dirichlet-Multinomial distribution in the model are generated using the Dirichlet-Multinomial in bootstrap data sets.

\end{itemize}

Expand All @@ -214,7 +214,7 @@ \subsection{Forecast and Reference Points (Forecast-report.sso)}


\subsection{Main Output File, Report.sso}
This is the primary output file. Its major sections (as of SS3 v.3.30.16) are listed below.
This is the primary output file. Its major sections (as of v.3.30.16) are listed below.

The sections of the output file are:
\begin{itemize}
Expand Down
6 changes: 3 additions & 3 deletions 15special.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ \subsection{Using Time-Varying Parameters}
\hypertarget{tvOrder}{}
\subsubsection{Time-Varying Parameters}

Starting in SS3 v.3.30, mortality-growth, some stock-recruitment, catchability, and selectivity base parameters can be time varying. Note that as of v.3.30.16, time-varying parameters cannot be used with tagging parameters. There are four ways a parameter can be time-varying in SS3:
Starting in v.3.30, mortality-growth, some stock-recruitment, catchability, and selectivity base parameters can be time varying. Note that as of v.3.30.16, time-varying parameters cannot be used with tagging parameters. There are four ways a parameter can be time-varying in SS3:
\begin{enumerate}
\item Environmental or Density dependent Linkages: Links the base parameter with environmental data or a model derived quantity.
\item Parameter deviations: Creates annual deviations from the base parameter during a user-specified range of years.
Expand Down Expand Up @@ -144,7 +144,7 @@ \section{Detailed Information on Stock Synthesis Processes}

\subsection{Jitter}
\hypertarget{Jitter}{}
The jitter function has been updated with v.3.30. The following steps are now performed to determine the jittered starting parameter values (illustrated in Figure \ref{fig:jitter}):
The following steps are now performed to determine the jittered starting parameter values (illustrated in Figure \ref{fig:jitter}):
\begin{enumerate}
\item A normal distribution is calculated such that the pr(P\textsubscript{MIN}) = 0.1\% and the pr(P\textsubscript{MAX}) = 99.9\%.
\item A jitter shift value, termed ``\textit{K}'', is calculated from the distribution equal to pr(P\textsubscript{CURRENT}).
Expand Down Expand Up @@ -179,7 +179,7 @@ \subsection{Parameter Priors}
The options for parameter priors are described as a function of $Pval$, the value of the parameter for which a prior is being calculated, as well as the parameter bounds in the case of the beta distribution ($Pmax$ and $Pmin$), and the input values for $Prior$ and $Pr\_SD$, which in some cases are the mean and standard deviation, but interpretation depends on the prior type. The Prior Likelihoods below represent the negative log likelihood in all cases.

\myparagraph{Prior Types}
Note that the numbering in SS3 v.3.30 is different from that used in SS3 v.3.24 (where confusingly -1 indicated no prior and 0 indicated a normal prior). The calculation of the negative log likelihood is provided below for each prior types, as a function of the following inputs:
Note that the numbering in v.3.30 is different from that used in v.3.24 (where confusingly -1 indicated no prior and 0 indicated a normal prior). The calculation of the negative log likelihood is provided below for each prior types, as a function of the following inputs:

\begin{tabular}{ll}
$P_\text{init}$ & The value of the parameter for which a prior is being calculated where init can either be \\
Expand Down
8 changes: 4 additions & 4 deletions 1_4sections.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ \section{Introduction}\label{sec:intro}

Assessment models are loosely coupled to other models. For example, an ocean-temperature or circulation model or benthic-habitat map may be directly included in the pre-processing of the fish abundance survey. A time series of a derived ocean factor, like the North Atlantic Oscillation, can be included as an indicator of a change in a population process. Output of a multi-decadal time series of derived fish abundance can be an input to ecosystem and economic models to better understand cumulative impacts and benefits.

Stock Synthesis is an age- and size-structured assessment model in the class of models termed integrated analysis models. Stock Synthesis has evolved since its initial inception in order to model a wide range of fish populations and dynamics. The most recent major revision to Stock Synthesis occurred in 2016, when version 3.30 was introduced. This new version of Stock Synthesis required major revisions to the input files relative to earlier versions (see the \hypertarget{ConvIssues}{Converting Files} section for more information). The acronym for Stock Synthesis has evolved over time with earlier versions being referred to as SS2 (Stock Synthesis v.2.xx) and older versions as SS3 (Stock Synthesis v.3.xx).
Stock Synthesis is an age- and size-structured assessment model in the class of models termed integrated analysis models. Stock Synthesis has evolved since its initial inception in order to model a wide range of fish populations and dynamics. The most recent major revision to Stock Synthesis occurred in 2016, when v.3.30 was introduced. This new version of Stock Synthesis required major revisions to the input files relative to earlier versions (see the \hypertarget{ConvIssues}{Converting Files} section for more information). The acronym for Stock Synthesis has evolved over time with earlier versions being referred to as SS2 (Stock Synthesis v.2.xx) and older versions as SS3 (Stock Synthesis v.3.xx).

SS3 has a population sub-model that simulates a stock's growth, maturity, fecundity, recruitment, movement, and mortality processes, an observation sub-model estimates expected values for various types of data, a statistical sub-model characterizes the data's goodness of fit and obtains best-fitting parameters with associated variance, and a forecast sub-model projects needed management quantities. SS3 outputs the quantities, with confidence intervals, needed to implement risk-averse fishery control rules. The model is coded in C++ with parameter estimation enabled by automatic differentiation (\href{http://www.admb-project.org}{admb}). Windows, Linux, and iOS versions are available. Output processing and associated tools are in R, and a graphical interface is in QT. SS3 executables and support material is available on \href{https://github.com/nmfs-stock-synthesis}{GitHub}. The rich feature set in SS3 allows it to be configured for a wide range of situations. SS3 has become the basis for a large fraction of U.S. assessments and many other assessments around the world.

Expand Down Expand Up @@ -50,18 +50,18 @@ \section{File Organization}\label{FileOrganization}
\item control.ss\_ new: Updated version of the control file with final parameter values replacing the initial parameter values.
\item starter.ss\_ new: New version of the starter file with annotations.
\item Forecast.ss\_ new: New version of the forecast file with annotations.
\item warning.sso: This file contains a list of warnings generated during program execution. Starting in SS3 v.3.30.20 warnings are categorized into either Note or Warning. An item marked as a not denotes settings that the user may want to revise but do not require any additional changes for the model to run. Items marked with Warning are items that may or may not have allowed the model to finish running. Items with a fatal warning caused the model to fail during either reading input files or calculations. Warnings classified as error or adjustment may be causing calculation issues, even if the model was able to finish reading file and running, and should be addressed the user.
\item warning.sso: This file contains a list of warnings generated during program execution. Starting in v.3.30.20 warnings are categorized into either Note or Warning. An item marked as a not denotes settings that the user may want to revise but do not require any additional changes for the model to run. Items marked with Warning are items that may or may not have allowed the model to finish running. Items with a fatal warning caused the model to fail during either reading input files or calculations. Warnings classified as error or adjustment may be causing calculation issues, even if the model was able to finish reading file and running, and should be addressed the user.
\item echoinput.sso: This file is produced while reading the input files and includes an annotated echo of the input. The sole purpose of this output file is debugging input errors.
\item Report.sso: This file is the primary report file.
\item ss\_summary.sso: Output file that contains all the likelihood components, parameters, derived quantities, total biomass, summary biomass, and catch. This file offers an abridged version of the report file that is useful for quick model evaluation. This file is only available in SS3 v.3.30.08.03 and greater.
\item ss\_summary.sso: Output file that contains all the likelihood components, parameters, derived quantities, total biomass, summary biomass, and catch. This file offers an abridged version of the report file that is useful for quick model evaluation. This file is only available in v.3.30.08.03 and greater.
\item CompReport.sso: Observed and expected composition data in a list-based format.
\item Forecast-report.sso: Output of management quantities and for forecasts.
\item CumReport.sso: This file contains a brief version of the run output, output is appended to current content of file so results of several runs can be collected together. This is useful when a batch of runs is being processed.
\item Covar.sso: This file replaces the standard ADMB ss.cor with an output of the parameter and derived quantity correlations in database format.
\item ss.par: This file contains all estimated and fixed parameters from the model run.
\item ss.std, ss.rep, ss.cor etc.: Standard ADMB output files.
\item checkup.sso: Contains details of selectivity parameters and resulting vectors. This is written during the first call of the objective function.
\item Gradient.dat: New for SS3 v.3.30, this file shows parameter gradients at the end of the run.
\item Gradient.dat: New for v.3.30, this file shows parameter gradients at the end of the run.
\item rebuild.dat: Output formatted for direct input to Andre Punt's rebuilding analysis package. Cumulative output is output to REBUILD.SS (useful when doing MCMC or profiles).
\item SIS\_table.sso: Output formatted for reading into the NMFS Species Information System.
\item Parmtrace.sso: Parameter values at each iteration.
Expand Down
12 changes: 6 additions & 6 deletions 5converting.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\hypertarget{ConvIssues}{}
\section{Converting Files from SS3 v.3.24}
Converting files from version 3.24 to version 3.30 can be performed by using the program ss\_trans.exe. This executable takes 3.24 files as input and will output version 3.30 input and output files. SS\_trans executables are available for v.3.30.01 - v.3.30.17. The transitional executable was phased out with v.3.30.18. If a model needs to be converted from v.3.24 to a recent version, one should use the v.3.30.17 ss\_trans.exe available from the \href{https://github.com/nmfs-stock-synthesis/stock-synthesis/releases/tag/v3.30.17}{v.3.30.17 release page on GitHub} to convert the files and then any additional adjustments needed between v.3.30.17 and newer versions should be done by hand.
\section{Converting Files from Stock Synthesis v.3.24}
Converting files from version 3.24 to version 3.30 can be performed by using the program ss\_trans.exe. This executable takes v.3.24 files as input and will output v.3.30 input and output files. SS\_trans executables are available for v.3.30.01 - v.3.30.17. The transitional executable was phased out with v.3.30.18. If a model needs to be converted from v.3.24 to a recent version, one should use the v.3.30.17 ss\_trans.exe available from the \href{https://github.com/nmfs-stock-synthesis/stock-synthesis/releases/tag/v3.30.17}{v.3.30.17 release page on GitHub} to convert the files and then any additional adjustments needed between v.3.30.17 and newer versions should be done by hand.

The following file structure and steps are recommended for converting model files:
\begin{enumerate}
Expand All @@ -10,14 +10,14 @@ \section{Converting Files from SS3 v.3.24}

\item Review the control (control.ss\_new) file to determine that all model functions converted correctly. The structural changes and assumptions for a couple of the advanced model features are too complicated to convert automatically. See below for some known features that may not convert. When needed, it is recommended to modify the control.ss\_new file, the converted control file, for only the features that failed to convert properly.

\item Change the max phase to a value greater than the last phase in which the a parameter is set to estimated within the control file. Run the new SS3 v.3.30 executable (ss3.exe) within the ``converted'' folder using the renamed ss\_new files created from the transition executable.
\item Change the max phase to a value greater than the last phase in which the a parameter is set to estimated within the control file. Run the new v.3.30 executable (ss3.exe) within the ``converted'' folder using the renamed ss\_new files created from the transition executable.

\item Compare likelihood and model estimates between the SS3 v.3.24 and SS3 v.3.30 model versions.
\item Compare likelihood and model estimates between the v.3.24 and v.3.30 model versions.

\item If desired, update to versions of SS3 > v.3.30.17 by running the new v.3.30 input files with the higher executable.
\item If desired, update to versions of Stock Synthesis > v.3.30.17 by running the new v.3.30 input files with the higher executable.
\end{enumerate}

\noindent There are some options that have been substantially changed in SS3 v.3.30, which impedes the automatic converting of SS3 v.3.24 model files. Known examples of SS3 v.3.24 options that cannot be converted, but for which better alternatives are available in SS3 v.3.30 are:
\noindent There are some options that have been substantially changed in v.3.30, which impedes the automatic converting of v.3.24 model files. Known examples of v.3.24 options that cannot be converted, but for which better alternatives are available in v.3.30 are:
\begin{enumerate}
\item The use of Q deviations,
\item Complex birth seasons,
Expand Down
Loading

0 comments on commit 4dc7bec

Please sign in to comment.