You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ENSO Effects on Pacific Tuna Distribution and Abundance
Code for the manuscript submitted.
Overview
This repository contains the R analysis pipeline for examining how ENSO (El Niño–Southern Oscillation) affects the spatial distribution and relative abundance of four Pacific tuna species using longline fishery data from 1993 to 2023.
Species studied:
Code
Species
Spatial domain
ALB_N
Albacore (Thunnus alalunga)
North Pacific
ALB_S
Albacore (Thunnus alalunga)
South Pacific
BET
Bigeye tuna (Thunnus obesus)
Pacific-wide
YFT
Yellowfin tuna (Thunnus albacares)
Pacific-wide
Pipeline
The scripts are designed to be run sequentially. Each script documents its inputs, outputs, and dependencies in its file header.
Data preparation
Script
Description
GCB_Data.R
Read and clean WCPFC + IATTC longline data; aggregate to 5°×5° monthly grid; compute nominal CPUE per 1 000 hooks; merge environmental layers; download MEI.v2 and CPC ONI v5; assign strict ENSO phase; split into species-specific datasets
XGBoost Tweedie species distribution models (hyperparameter tuning via mlr3, spatial block CV, final model fit and prediction)
GCB_Model_VIF.R
VIF-based stepwise feature elimination with trace logging
GCB_RFECV.R
Recursive feature elimination with cross-validation (RFECV) score plots
GCB_Model_instance.R
Tuning instance diagnostic plots
GCB_Model_Dia_Pl.R
Model diagnostic plots (observed vs predicted, residuals, Q-Q)
GCB_SHAP.R
SHAP value computation and visualisation (importance bars + dependence plots)
ENSO–abundance analysis
Script
Description
GCB_RA.R
Relative abundance vs ENSO index analysis module (correlation, linear vs GAM, lag screening, GLS AR(1) phase contrasts, relative change vs Neutral with 95% CI)
GCB_RA_Pl.R
Three-panel figure: abundance–MEI relationship, ENSO phase violin plots, and relative change from Neutral → Fig 1
GCB_RA_CCF.R
Cross-correlation analysis (abundance vs MEI) → Fig A (CCF)
Centre of gravity analysis
Script
Description
GCB_COG-A.R
Centre of gravity (COG Lon/Lat) computation, GLS candidate models with harmonised AICc selection