Sovereign 8s.is mirror of standardgalactic/MHW_NPP
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-01-20 15:11:51 -08:00
npp_model.m Add files via upload 2025-11-19 15:22:11 -08:00
README.md Update README.md 2026-01-20 15:11:51 -08:00

Marine Heatwaves and Ocean Net Primary Productivity

This repository contains the MATLAB code used to build statistical models and analyze the impact of marine heatwaves (MHWs) on ocean net primary productivity (NPP), as described in:

Bian et al. (2025) - Marine Heatwaves Shift Ocean Net Primary Productivity from the Tropics to the Poles

Overview

Repository Contents

  • npp_model.m - Main MATLAB script implementing the statistical decomposition framework

Methodology

Statistical Model

The code implements a linear regression framework to decompose NPP anomalies (NPPA) into:

  1. SST-dependent components: Direct thermal forcing effects

    • Linear SSTA term
    • SST-related chlorophyll (CHL_SST)
    • SST-related photosynthetically active radiation (PAR_SST)
  2. SST-independent components: Ecological feedbacks and residuals

    • SST-residual chlorophyll (CHL_r)
    • SST-residual PAR (PAR_r)
    • Unexplained residuals (NPP_r)

Regression Framework

The model performs the following steps:

Stage 1: Decompose environmental variables

% Regress CHL onto SST
CHLA = β₁·SSTA + CHL_r

% Regress PAR onto SST
PARA = β₂·SSTA + PAR_r

Stage 2: Decompose NPP anomalies

% Full regression model
NPPA = β₃·SSTA + β₄·CHL_SST + β₅·PAR_SST + β₆·CHL_r + β₇·PAR_r + NPP_r

Where:

  • CHL_SST = β₁·SSTA (SST-related chlorophyll component)
  • PAR_SST = β₂·SSTA (SST-related PAR component)
  • CHL_r = SST-independent chlorophyll residual
  • PAR_r = SST-independent PAR residual
  • NPP_r = unexplained residual

The code runs this analysis for two thermal conditions:

  • SSTA⁺: Moderate warming (positive SST anomalies below MHW threshold)
  • MHW: Extreme warming (SST exceeds 90th percentile for ≥5 consecutive days)

Data Requirements

The analysis requires the following input data (not included):

  • NPP anomalies: Satellite-derived, Eppley-VGPM version
  • Sea surface temperature (SST) anomalies: NOAA OISST v2
  • Chlorophyll concentration (CHL) anomalies: Ocean Color data
  • Photosynthetically active radiation (PAR) anomalies: Satellite-derived

Data Format

Data should be organized in 4D arrays stored in MAT files named anom[depth].mat:

data_anom(longitude, latitude, time, variable)

Where the 4th dimension (variable) contains:

  1. NPP anomalies
  2. PAR anomalies
  3. CHL anomalies
  4. SST anomalies

Dimensions:

  • Longitude: 2160 grid points
  • Latitude: Variable (depends on ocean coverage)
  • Time: 288 months (24 years, 1998-2018 for MHW analysis)
  • Variables: 4

Usage

Basic Usage

% Set depth parameter
depth_s = 1;  % or your specific depth level

% Run the statistical model
npp_model

Output Files

The script generates three output files:

  1. npp_d_lr[depth].mat - Linear regression decomposition results

    • npp_d: NPP components (5 layers)
    • corr_d: Correlation coefficients
    • b_full: Regression coefficients
    • r2: R-squared values
  2. npp_d[depth].mat - Alternative decomposition using simple regressions

    • npp_d: NPP components
    • corr_d: Correlation coefficients
  3. chl_d[depth].mat - Chlorophyll decomposition

    • chl_r_full: SST-residual chlorophyll
    • chl_sst_full: SST-related chlorophyll

Output Variables

npp_d (5D array)

Dimensions: [10 × 2160 × 288 × 5]

The 5th dimension contains decomposed NPP components:

  1. NPPA_SST: Direct SST effect (β₃·SSTA)
  2. NPPA_CHL_SST: SST-mediated chlorophyll effect (β₄·CHL_SST)
  3. NPPA_PAR_SST: SST-mediated PAR effect (β₅·PAR_SST)
  4. NPPA_CHL_r: SST-independent chlorophyll effect (β₆·CHL_r)
  5. NPPA_PAR_r: SST-independent PAR effect (β₇·PAR_r)

SST-dependent NPPA = Components 1 + 2 + 3

SST-independent NPPA = Components 4 + 5 + residual

Additional Outputs

  • corr_d: Correlation between observed and modeled NPP [2160 × latitude]
  • b_full: Regression coefficients [2160 × latitude × 5]
  • r2: R-squared values [2160 × latitude]
  • chl_r_full: SST-residual chlorophyll [2160 × latitude × 288]
  • chl_sst_full: SST-related chlorophyll [2160 × latitude × 288]

Code Structure

The npp_model.m script contains two main sections:

Section 1: Multiple Linear Regression Approach

This section uses a full multiple regression model that includes all predictors simultaneously:

NPPA = regress(npp, [SSTA, CHL_SST, PAR_SST, CHL_r, PAR_r])

Section 2: Simple Regression Approach

This section uses individual simple regressions and combines their effects:

β_sst = regress(npp, sst)
β_chl = regress(npp, chl)
β_par = regress(npp, par)
β_chl_sst = regress(chl, sst)
β_par_sst = regress(par, sst)

NPPA = (β_sst + β_chl·β_chl_sst + β_par·β_par_sst)·SSTA + β_chl·CHL_r + β_par·PAR_r

Both approaches provide complementary perspectives on the SST-NPP relationship.

Example Analysis Workflow

% 1. Load data
depth_s = 1;
load(['anom' num2str(depth_s)]);

% 2. Run the model
npp_model;

% 3. Load results
load(['npp_d_lr' num2str(depth_s)]);

% 4. Calculate SST-dependent and SST-independent contributions
sst_dependent = npp_d(:,:,:,1) + npp_d(:,:,:,2) + npp_d(:,:,:,3);
sst_independent = npp_d(:,:,:,4) + npp_d(:,:,:,5);

% 5. Visualize results
figure;
subplot(1,2,1);
imagesc(nanmean(sst_dependent, 3));
title('SST-dependent NPPA');
colorbar;

subplot(1,2,2);
imagesc(nanmean(sst_independent, 3));
title('SST-independent NPPA');
colorbar;

Data Availability

The datasets used in this study are publicly available from:

Marine Heatwave Definition

Following Hobday et al. (2016), marine heatwaves are defined as:

  • Duration: ≥5 consecutive days
  • Threshold: Sea surface temperature exceeds the seasonally varying 90th percentile
  • Baseline: 1998-2021 climatology

SSTA⁺ (general warm conditions) are defined as periods where SST anomalies are positive but remain below the MHW threshold.

  • Hobday, A.J., et al. (2016). A hierarchical approach to defining marine heatwaves. Progress in Oceanography, 141, 227-238.
  • Oliver, E.C.J., et al. (2018). Longer and more frequent marine heatwaves over the past century. Nature Communications, 9, 1324.
  • Behrenfeld, M.J., & Falkowski, P.G. (1997). Photosynthetic rates derived from satellite-based chlorophyll concentration. Limnology and Oceanography, 42, 1-20.

Authors

  • Ce Bian - Lamont Doherty Earth Observatory, Columbia University (Paper Leading Author)

  • Zijie Zhao - Institute for Marine and Antarctic Studies, University of Tasmania (Statistical Model Developer)

  • Neil J. Holbrook - University of Tasmania & ARC Centre of Excellence for Climate Extremes

  • Peter G. Strutton - University of Tasmania & ARC Centre of Excellence for Climate Extremes