https://github.com/pacificcommunity/ofp-sam-bet-2023-diagnostic
Bigeye 2023 diagnostic model
https://github.com/pacificcommunity/ofp-sam-bet-2023-diagnostic
2023 assessment bet ofp sam
Last synced: about 1 month ago
JSON representation
Bigeye 2023 diagnostic model
- Host: GitHub
- URL: https://github.com/pacificcommunity/ofp-sam-bet-2023-diagnostic
- Owner: PacificCommunity
- Created: 2023-09-13T03:27:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-06T04:59:36.000Z (3 months ago)
- Last Synced: 2025-03-06T05:31:50.480Z (3 months ago)
- Topics: 2023, assessment, bet, ofp, sam
- Language: R
- Homepage:
- Size: 70.1 MB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BET 2023 Diagnostic Model
Download BET 2023 assessment report:
- **Stock assessment of bigeye tuna in the western and central Pacific Ocean: 2023**\
**[WCPFC-SC19-2023/SA-WP-05](https://meetings.wcpfc.int/node/19353)**Download BET 2023 diagnostic model:
- Clone the **[bet-2023-diagnostic](https://github.com/PacificCommunity/ofp-sam-bet-2023-diagnostic)** repository or download as **[main.zip](https://github.com/PacificCommunity/ofp-sam-bet-2023-diagnostic/archive/refs/heads/main.zip)** file
Download BET 2023 grid results:
- The **[bet-2023-grid](https://github.com/PacificCommunity/ofp-sam-bet-2023-grid)** repository includes a **[bet-2023-grid-results.zip](https://github.com/PacificCommunity/ofp-sam-bet-2023-grid/releases/download/file/bet-2023-grid-results.zip)** file
## Reference model
In SPC assessment jargon, the *diagnostic model* is the reference model that is the basis of several sections and figures in the stock assessment report.
The diagnostic model is also the entry point when configuring and running the grid of ensemble models that is the basis of scientific advice. When the grid includes specific factor levels (for steepness, likelihood weights, etc.) the diagnostic model has intermediate levels, while other grid members explore higher and lower levels.
Finally, the diagnostic model is also the starting point for the BET 2026 stock assessment model development. One purpose of this repository is to give the stock assessor a good starting point that is organized and documented.
## Explore data, model settings, and results
The **[MFCL](MFCL)** folder includes all the MFCL input files, model settings, and output files.
The **TAF** folder extracts the data and results from MFCL format to CSV format that can be examined using Excel, R, or other statistical software. [TAF](https://cran.r-project.org/package=TAF) is a standard reproducible format for stock assessments that is practical for making the MFCL **[data](TAF/data)** and **[output](TAF/output)** available in a format that is easy to examine. The **[report](TAF/report)** folder contains formatted tables and example plots.
## Run the assessment model
The BET 2023 model takes around 10 hours to run. It requires a Linux platform, such as:
- Plain Linux machine, e.g. a personal laptop
- Windows Subsystem for Linux, optional feature in Windows
- Virtual machine, e.g. VirtualBox or VMware
- Online services that provide Linux machinesThe `mfclo64` executable was compiled on Ubuntu 20.04 using *static linking*, so it should run on almost any Linux machine.
### Run in a Linux terminal
Navigate to the MFCL folder and run:
```
./doitall.sh
```Alternatively, copy the required files into a new folder,
```
doitall.sh
mfcl.cfg
mfclo64
bet.age_length
bet.frq
bet.ini
bet.tag
```and then run the model:
```
./doitall.sh
```### Run on Condor
SPC staff run most assessment models on a Condor cluster of Linux machines:
```
library(condor)
session <- ssh_connect("CONDOR_SUBMITTER_MACHINE")
condor_submit()
```### Run in TAF format
Anyone can run the assessment analysis in TAF format. First install TAF, FLCore, and FLR4MFCL, if they are not already installed:
```
install.packages("TAF")
install_github("flr/FLCore")
install_github("PacificCommunity/FLR4MFCL")
```On a Linux machine, the full assessment model can be run as a TAF analysis. Start R, make sure the TAF folder is the working directory, and then run:
```
library(TAF)
taf.boot()
source.taf("data.R")
source.taf("model.R")
source.taf("output.R")
source.taf("report.R")
```A shortcut script is provided, to run the TAF analysis in 1 minute rather than 10 hours:
```
library(TAF)
taf.boot()
source.taf("data.R")
source.taf("model_shortcut.R")
source.taf("output.R")
source.taf("report.R")
```The TAF shortcut analysis runs an all platforms: Windows, Linux, and macOS. It extracts the data and output from the MFCL files and makes them available as CSV files that can be examined and analyzed further.