Data from: From temporal variability to integrated metabolic balance: Interpreting total alkalinity and dissolved inorganic carbon relationships in dynamic coral reef ecosystems
Data files
May 12, 2026 version files 3.47 MB
-
Box_Model.zip
5.98 KB
-
Global_Reefs.zip
53.52 KB
-
Heron_Model.zip
5.82 KB
-
Lizard_Metabolic_Rates.zip
3.40 MB
-
README.md
8.89 KB
May 12, 2026 version files 3.47 MB
-
Box_Model.zip
5.98 KB
-
Global_Reefs.zip
53.52 KB
-
Heron_Model.zip
5.82 KB
-
Lizard_Metabolic_Rates.zip
3.40 MB
-
README.md
8.96 KB
Abstract
Linear regressions between total alkalinity (TA) and dissolved inorganic carbon (DIC) are widely used to infer the balance between net ecosystem calcification (NEC) and net ecosystem production (NEP) in coral reefs. Using high-frequency carbonate chemistry observations from an Australian reef flat and simple numerical models, we show that TA–DIC slopes primarily reflect the temporal co-variability of NEC and NEP, rather than their time-integrated metabolic balance. To recover time-integrated metabolic information, diel reef measurements must be coupled with offshore reference conditions, which anchor changes in TA and DIC to NEC:NEP ratios. We further demonstrate that metabolic balance shifts systematically over the diel cycle and depends on light, indicating that it is inherently dynamic rather than static. Together, our results highlight the need to distinguish metabolic co-variability from metabolic ratios when interpreting carbonate chemistry data in coral reef and other dynamic aquatic ecosystems.
Dataset DOI: 10.5061/dryad.p2ngf1w4v
Description of the Data and File Structure
These datasets and code accompany the manuscript “Re-evaluating Relationships Between Calcification and Production in Dynamic Coral Reef Ecosystems.”
The data were collected and modeled to investigate how diel variability in coral reef metabolism affects the relationship between total alkalinity (TA) and dissolved inorganic carbon (DIC).
Field observations were conducted on a reef flat near Lizard Island, Great Barrier Reef, where high-frequency TA and pH samples were used to calculate net ecosystem calcification (NEC) and net ecosystem production (NEP). These measurements were supplemented with simple numerical and box models simulating diel changes in NEC and NEP, as well as global comparisons across 11 reef systems.
Included Datasets and Code
- Lizard Metabolic Rates – Processed NEC and NEP fluxes and derived metabolic balance (NEC:Mtot) from high-resolution field data.
- Heron Model – Model (Cyronak et al., 2014) exploring diel variability in photosynthesis, respiration, dissolution, and calcification parameters.
- Box Model – Simulated carbonate-system trajectories (TA–DIC) illustrating how the dynamics of NEC and NEP influence within-system slopes.
- Global Reefs – Compiled TA–DIC datasets from 11 coral reef sites worldwide used to evaluate spatial variability in metabolic balance.
Together, these data support the conclusion that within-system TA–DIC slopes primarily reflect short-term spatiotemporal variability in reef metabolism rather than steady-state NEC:NEP ratios.
Files and Variables
Folder: Box_Model.zip
Description:
Contains MATLAB scripts from the diel carbonate-system box model described in the manuscript. The model simulates changes in TA and DIC over a 24-hour cycle under varying ratios of NEC and NEP. Simulations explore constant versus variable NEC:NEP conditions to demonstrate how within-system TA–DIC slopes become offset from offshore starting values.
Main Files:
- BoxModel_DynamicSystems.m: Main MATLAB script that runs the diel carbonate-system box model, simulating how NEC and NEP forcing affect TA–DIC trajectories over a 24-hour cycle.
- buildcmap.m: Function to create custom color maps for visualizing modeled TA–DIC slopes and diel patterns.
- lsqfitma.m: Major-axis linear regression function.
File: Global_Reefs.zip
Description:
Contains total alkalinity (TA) and dissolved inorganic carbon (DIC) datasets compiled from 11 coral reef systems worldwide, including Lizard Island, Heron Island, and other sites from Cyronak et al. (2018) and DeCarlo et al. (2016). These data were used to construct Figure 4 in the manuscript, comparing global variability in TA–DIC slopes and derived metabolic balances.
Main Files:
- GlobalReefs.m: Main MATLAB script that compiles global TA–DIC datasets, computes start–end vector slopes, and generates Figure 4 boxplots of metabolic
- balance.CO2SYS.m: MATLAB implementation of the CO2SYS carbonate chemistry routine used to calculate DIC and pCO₂ from TA and pH or alkalinity–DIC pairs.
- datasets/: Subfolder containing total alkalinity (TA) and dissolved inorganic carbon (DIC) datasets in .csv files compiled from 11 coral reef systems worldwide. Each file represents a site dataset used for the global TA–DIC slope comparison. The title of each file is the location, variables in each file are:
- %Temp: Seawater temperature (°C)
- %Salinity: Salinity (PSU)
- %TA: Total alkalinity (µmol kg⁻¹)
- %DIC: Dissolved inorganic carbon (µmol kg⁻¹) calculated from pH and TA
-
lsqfitma.m: Major-axis linear regression function used to calculate TA–DIC slopes (NEC:NEP ratios).
-
offshore.mat: MATLAB data file containing offshore reference values (TA, DIC) for each reef system used for normalization and slope calculations.
Folder: Heron_Model.zip
Description:
Includes MATLAB code and model output from the carbonate-system model originally developed for Heron Island (Cyronak et al., 2014) and modified for this study. The model explores how diel variability in calcification, dissolution, photosynthesis, and respiration coefficients affect TA–DIC relationships and metabolic balance.
Files:
- HeronModel.m: Main script that runs the Heron Island carbonate-balance model, executes parameter sweeps, and outputs diel TA–DIC trajectories.
- buildcmap.m: Custom MATLAB function to build color maps used for figure plotting and model visualization.
- herondif.m: Core differential equation function defining carbonate-system dynamics (changes in TA and DIC) for the Heron Island model.
- lsqfitma.m: Function for major-axis linear regression.
Folder: Lizard_Metabolic_Rates.zip
Description:
Contains code, raw data, and processed field observations from the Lizard Island reef-flat autosampler deployment (17 October – 1 November 2018). Discrete total alkalinity and pH measurements were used to calculate dissolved inorganic carbon (via CO2SYS) and determine NEC and NEP fluxes using the flow-respirometry approach. This dataset underlies Figures 1 and 2 in the manuscript.
Files:
- LizardRateCalculations.m: Main MATLAB script for calculating NEC, NEP, and metabolic balance from field data.
- CO2SYS.m: MATLAB implementation of the CO2SYS carbonate chemistry calculation routine.
- deg2utm.m: Function to convert geographic coordinates (latitude/longitude) to UTM coordinates.
- density.m: Function to calculate seawater density from temperature and salinity.
- lizardDEM.mat: Digital elevation model or bathymetry matrix for the Lizard Island reef flat.
- lsqfitma.m: Function for major axis linear regression.
- PI_curve.m: Function for fitting photosynthesis–irradiance (P–I) curves to light-response data.
- southdata_parsed.mat: Data from the autosampler and offshore samples.
- South_adp_5min_avg.mat: Five-minute averaged current or ADCP data
- South_boundary.mat: Boundary coordinate file (polygon or transect definition) for the study area.
- South_SP_calibrated_final_withPAR.mat: Calibrated SeapHox data.
- output.csv: Output variables from LizardRateCalculations.m, including the variables:
- Date Time: Timestamp of each autosampler sample (GMT +10)
- TA: Total alkalinity (µmol kg⁻¹)
- DIC: Dissolved inorganic carbon (µmol kg⁻¹) calculated from pH and TA
- pH25: pH measured at 25 °C in total scale
- TAoo: Offshore total alkalinity (µmol kg⁻¹)
- DICoo: Offshore dissolved inorganic carbon (µmol kg⁻¹)
- light: Photosynthetically active radiation (µmol photons m⁻² s⁻¹)
- S: Salinity (PSU)
- sst: Seawater temperature (°C)
- pHphox: In situ pH recorded by SeapHox in total scale
- dens: Seawater density (kg m-3)
- nec: Net ecosystem calcification calcification (mmol m⁻² h⁻¹)
- nep: Net ecosystem production calcification (mmol m⁻² h⁻¹)
- traveltime: Residence of water over the reef flat (hours)
- depth: Mean water depth during the residence time (m)
- dir: mean current direction during the residence time (degrees)
Code and Software
All data files are provided in open formats (.csv and .mat) compatible with freely available software. Analyses and modeling were performed primarily using MATLAB and standard statistical and visualization toolboxes.
Software Requirements:
- MATLAB R2022b (MathWorks Inc.) – used for numerical modeling, data processing, and figure generation.
Required toolboxes:
- Statistics and Machine Learning Toolbox
- Curve Fitting Toolbox
- Mapping Toolbox (for spatial data visualization, if used)
- Compatible with MATLAB R2021a or later.
- Python (v3.10+) or GNU Octave (v8.0+) can also be used to open .mat files for users without MATLAB.
Each script is self-contained and annotated with variable definitions, units, and figure references corresponding to the main text.
Data Processing:
Raw Lizard Island TA and pH data were processed in MATLAB to calculate DIC (using CO2SYS functions) and derive NEC and NEP from differences between reef and offshore samples.
Modeling:
Box and Heron models were executed in MATLAB to simulate diel carbonate-system behavior under varying NEC and NEP ratios.
Global Comparison:
Global reef datasets were imported as .csv files and analyzed using MATLAB scripts to generate Figure 4, comparing observed and modeled TA–DIC relationships.
Visualization:
Figures were produced using built-in MATLAB plotting functions (plot, boxplot, histogram) and exported as high-resolution .png and .eps files for publication.
All code and data are fully open and reproducible using the software versions listed above.
