Skip to content

Commit

Permalink
ss.par to ss3.par
Browse files Browse the repository at this point in the history
  • Loading branch information
e-perl-NOAA committed Jan 4, 2024
1 parent cff25dd commit 79f354c
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
10 changes: 5 additions & 5 deletions 12runningSS3.tex
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ \subsection{Command Line Interface}
\end{verbatim}
\end{quote}

An additional command has been added that allows users to specify the name of the .par file that is both read and output. Prior to v.3.30.22.1, the default exe name was `ss' and the default .par file name was ss.par. The code now produces a ss3.par file by default instead of a ss.par file. If you would like to read a ss.par file (or differently named .par file) from a previous SS3 model (without just changing the name of the file) or if you would still like to produce a ss.par file or a .par file with a different name, for example `ss4you.par', you will need to add ``modelname ss4you'' after the executable name such as:
An additional command has been added that allows users to specify the name of the .par file that is both read and output. Prior to v.3.30.22.1, the default exe name was `ss' and the default .par file name was ss.par. The code now produces a ss3.par file by default instead of an ss.par file. The code will search for the default ss3.par file first, and then look for an ss.par file in order to have backwards compatibility and will by default output a ss3.par file (not an ss.par file). If you would like to read a differently named .par file and produce a .par file with the same name, you will need to add the ``modelname'' command. See the below example of using ``modelname'' to read and produce a .par file with the name ``ss4you''.:

\begin{quote}
\begin{verbatim}
Expand Down Expand Up @@ -101,9 +101,9 @@ \subsubsection{Complicated Batch}
copy /Y ..\MakeData\A1-D1-%%i.dat Asel.dat
del ss.std
del ss.cor
del ss.par
del ss3.par
c:\admodel\ss3\ss3.exe
copy /Y ss.par A1-D1-A1-%%i.par
copy /Y ss3.par A1-D1-A1-%%i.par
copy /Y ss.std A1-D1-A1-%%i.std
find ``Number'' A1-D1-A1-%%i.par >> Summary.txt
find ``hessian'' ss.cor >> Summary.txt)
Expand Down Expand Up @@ -137,7 +137,7 @@ \subsubsection{Running Without Estimation}

The second difference between the two no estimation approaches is the reported number of ``Active\_count'' of parameters in the Report file. If the command line approach is used (ss3 -maxfn 0 -phase 50 -nohess) then the active number of parameters will equal the number of parameters with positive phases, but because the model is started in a phase greater than the maximum phase in the model, these parameters do not move from the initial values in the control file (or the par file). The first approach where the maximum phase is changed in the starter file will report the number of ``Active\_count'' parameters as 0.

The final thing to consider when running a model without estimation is whether you are starting from the par file or the control file. If you start from the par file (specified in the starter file: 1=use ss.par) then all parameters, including parameter deviations, will be fixed at the estimated values. However, if the model is not run with the par file, any parameter deviations (e.g., recruitment deviations) will not be included in the model run (a user could paste in the estimated recruitment deviations into the control file).
The final thing to consider when running a model without estimation is whether you are starting from the par file or the control file. If you start from the par file (specified in the starter file: 1=use ss3.par) then all parameters, including parameter deviations, will be fixed at the estimated values. However, if the model is not run with the par file, any parameter deviations (e.g., recruitment deviations) will not be included in the model run (a user could paste in the estimated recruitment deviations into the control file).

\myparagraph{Generate .ss\_new files}
There may be times a user would like to generate the .ss\_new files without running the model, with or without estimation. There are two approaches that a user can take. The first is to manually change the maxphase in the starter.ss file to -1 and running the model as normal will generate these files without running through the model dynamics (e.g., no Report file will be created). The maxphase in the starter.ss\_new file will be set to -1 and will need to be manually changed back if the intent is the replace the original (i.e., starter.ss) file with the new files (i.e., starter.ss\_new). The second approach is to modify the maxphase via the command line or power shell input. Calling the model using the commands:
Expand Down Expand Up @@ -198,7 +198,7 @@ \subsubsection{Running Parameter Profiles}
The summary results will all be collected in the cumreport.sso file. Each step of the profile will have an unique run number and its output will include the values of the natural mortality and steepness parameters for that run.

\subsubsection{Re-Starting a Run}
Model runs can be restarted from a previously estimated set of parameter values. In the starter.ss file, enter a value of 1 on the first numeric input line. This will cause the model to read the file ss.par and use these parameter values in place of the initial values in the control file. This option only works if the number of parameters to be estimated in the new run is the same as the number of parameters in the previous run because only actively estimated parameters are saved to the file ss.par. The file ss.par can be edited with a text editor, so values can be changed and rows can be added or deleted. However, if the resulting number of elements does not match the setup in the control file, then unpredictable results will occur. Because ss.par is a text file, the values stored in it will not give exactly the same initial results as the run just completed. To achieve greater numerical accuracy, the model can also restart from ss.bar which is the binary version of ss.par. In order to do this, the user must make the change described above to the starter.ss file and must also enter -binp ss.bar as one of the command line options.
Model runs can be restarted from a previously estimated set of parameter values. In the starter.ss file, enter a value of 1 on the first numeric input line. This will cause the model to read the file ss3.par and use these parameter values in place of the initial values in the control file. This option only works if the number of parameters to be estimated in the new run is the same as the number of parameters in the previous run because only actively estimated parameters are saved to the file ss3.par. The file ss3.par can be edited with a text editor, so values can be changed and rows can be added or deleted. However, if the resulting number of elements does not match the setup in the control file, then unpredictable results will occur. Because ss3.par is a text file, the values stored in it will not give exactly the same initial results as the run just completed. To achieve greater numerical accuracy, the model can also restart from ss.bar which is the binary version of ss3.par. In order to do this, the user must make the change described above to the starter.ss file and must also enter -binp ss.bar as one of the command line options.

\subsubsection{Optional Output Subfolders}
As of v.3.30.19, users can optionally send .sso and .ss\_new extension files to subfolders. To send files with a .sso extension to a subfolder within the model folder, create a subfolder called sso before running the model. To send files with a .ss\_new extension to a separate subfolder, create a folder called ssnew before running the model.
Expand Down
2 changes: 1 addition & 1 deletion 13output.tex
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ \subsection{Custom Reporting}
\subsection{Standard ADMB output files}
Standard ADMB files are created by SS3. These are:

ss.par - This file has the final parameter values. They are listed in the order they are declared in SS3. This file can be read back into SS3 to restart a run with these values (see \hyperref[sec:RunningSS3]{Running Stock Synthesis} for more info).
ss3.par (previously ss.par) - This file has the final parameter values. They are listed in the order they are declared in SS3. This file can be read back into SS3 to restart a run with these values (see \hyperref[sec:RunningSS3]{Running Stock Synthesis} for more info).

ss.std - This file has the parameter values and their estimated standard deviation for those parameters that were active during the model run. It also contains the derived quantities declared as standard deviation report variables. All of this information is also report in the covar.sso. Also, the parameter section of Report.sso lists all the parameters with their SS3 generated names, denotes which were active in the reported run, displays the parameter standard deviations, then displays the derived quantities with their standard deviations.

Expand Down
2 changes: 1 addition & 1 deletion 5converting.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\hypertarget{ConvIssues}{}
\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-ost/ss3-source-code/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.
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-ost/ss3-source-code/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. To see the changes that need to be made between v.3.30.17 and the latest release of SS3, please see the \href{https://github.com/orgs/nmfs-ost/projects/11}{change log}.

The following file structure and steps are recommended for converting model files:
\begin{enumerate}
Expand Down
6 changes: 3 additions & 3 deletions 6starter.tex
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ \subsection{Starter File Options (starter.ss)}
control\_ file.ctl & & File name of the control file \Tstrut\\

\hline
0 & Initial Parameter Values: & \multirow{1}{1cm}[-0.25cm]{\parbox{12.5cm}{Do not set equal to 1 if there have been any changes to the control file that would alter the number or order of parameters stored in the ss.par file. Values in ss.par can be edited, carefully. Do not run ss\_trans.exe from a ss.par from v.3.24.}}\Tstrut\\
0 & Initial Parameter Values: & \multirow{1}{1cm}[-0.25cm]{\parbox{12.5cm}{Do not set equal to 1 if there have been any changes to the control file that would alter the number or order of parameters stored in the ss3.par file. Values in ss3.par can be edited, carefully. Do not run ss\_trans.exe from a ss3.par from v.3.24.}}\Tstrut\\
& 0 = use values in control file; and& \\
& 1 = use ss.par after reading setup in the control file. & \\
& 1 = use ss3.par after reading setup in the control file. & \\

\hline
1 & Run display detail: & \multirow{1}{1cm}[-0.25cm]{\parbox{12.5cm}{With option 2, the display shows value of each -logL component for each iteration and it displays where crash penalties are created}} \Tstrut\\
Expand Down Expand Up @@ -256,7 +256,7 @@ \subsection{Starter File Options (starter.ss)}

% \pagebreak
\hline
\hypertarget{Convert}{3.30} & Model version check value. & \multirow{1}{1cm}[-0.25cm]{\parbox{12.5cm}{A value of 3.30 indicates that the control and data files are currently in v.3.30 format. A value of 999 indicates that the control and data files are in a previous v.3.24 version. The ss\_trans.exe executable should be used and will convert the v.3.24 files the control.ss\_new and data\_echo.ss\_new files to the new format. All ss\_new files are in the v.3.30 format, so starter.ss\_new has v.3.30 on the last line. The mortality-growth parameter section has a new sequence and v.3.30 cannot read a ss.par file produced by v.3.24 and earlier, so ensure that read par file option at the top of the starter file is set to 0. The \hyperlink{ConvIssues}{Converting Files from Stock Synthesis v.3.24} section has additional information on model features that may impede file conversion.}} \Tstrut\Bstrut\\
\hypertarget{Convert}{3.30} & Model version check value. & \multirow{1}{1cm}[-0.25cm]{\parbox{12.5cm}{A value of 3.30 indicates that the control and data files are currently in v.3.30 format. A value of 999 indicates that the control and data files are in a previous v.3.24 version. The ss\_trans.exe executable should be used and will convert the v.3.24 files the control.ss\_new and data\_echo.ss\_new files to the new format. All ss\_new files are in the v.3.30 format, so starter.ss\_new has v.3.30 on the last line. The mortality-growth parameter section has a new sequence and v.3.30 cannot read a ss3.par file produced by v.3.24 and earlier, so ensure that read par file option at the top of the starter file is set to 0. The \hyperlink{ConvIssues}{Converting Files from Stock Synthesis v.3.24} section has additional information on model features that may impede file conversion.}} \Tstrut\Bstrut\\
& & \\
& & \\
& & \\
Expand Down
4 changes: 2 additions & 2 deletions 9control.tex
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ \subsection{Parameter Line Elements}
\hline
1 & LO & Minimum value for the parameter \Tstrut\\
2 & HI & Maximum value for the parameter \Tstrut\\
3 \Tstrut & INIT & Initial value for the parameter. If the phase (described below) for the parameter is negative the parameter is fixed at this value. If the ss.par file is read, it overwrites these INIT values.\\
3 \Tstrut & INIT & Initial value for the parameter. If the phase (described below) for the parameter is negative the parameter is fixed at this value. If the ss3.par file is read, it overwrites these INIT values.\\
4 \Tstrut & PRIOR & Expected value for the parameter. This value is ignored if the prior type is 0 (no prior) or 1 (symmetric beta). If the selected prior type (described below) is lognormal, this value is entered in log space. \\
5 \Tstrut & PRIOR SD & Standard deviation for the prior, used to calculate likelihood of the current parameter value. This value is ignored if prior type is 0. The standard deviation is in regular space regardless of the prior type. \\
6 \Tstrut & \hyperlink{PriorDescrip}{PRIOR TYPE} & 0 = none; \\
Expand All @@ -66,7 +66,7 @@ \subsection{Parameter Line Elements}
& & 4 = lognormal with bias adjustment; \\
& & 5 = gamma; and \\
& & 6 = normal. \\
7 \Tstrut & PHASE & Phase in which parameter begins to be estimated. A negative value causes the parameter to retain its INIT value (or value read from the ss.par file). \Bstrut\\
7 \Tstrut & PHASE & Phase in which parameter begins to be estimated. A negative value causes the parameter to retain its INIT value (or value read from the ss3.par file). \Bstrut\\
8 \Tstrut & Env var \& Link & Create a linkage to an input environmental time-series \\
9 \Tstrut & Dev link & Invokes use of the deviation vector in the linkage function \\
10 \Tstrut & Dev min yr & Beginning year for the deviation vector \\
Expand Down
Loading

0 comments on commit 79f354c

Please sign in to comment.