DIGITAL.CSIC. Repositorio Institucional del CSIC
Research data
Set de datos (Dataset)
Data and Code for: Marine heatwaves overwhelm the buffering benefits of marine protected areas: two decades of collapse in a Mediterranean gorgonian [Dataset]
Code
Scripts are organised into 5 groups:
- Demographic trend models (one per response variable)
- Temperature, MHW detection, exposure and protection models
- Figure-generation scripts
- Supplementary material
1. Demographic trend models:
Five scripts, one per response variable, all sharing the same hierarchical GAMM structure and five-step validation workflow (see script headers).
MMortalityTrend.R — Injured surface (%) — Beta
MHeightTrend.R — Max colony height (cm) — Gaussian
MDensityTrend.R — Colony density (N per m²) — Gamma
MRecruitsTrend.R — Recruits (% colonies < 5 cm) — Beta
MBiomassTrend.R — Biomass (g per m²) — Gamma
2. Temperature, MHW detection, exposure and protection models:
- TempMHWDetection.R: Matches in-situ logger data to colony sampling depths and detects MHW events.
- MBioTempProt.R:Fits three hierarchical Bayesian linear models testing the effects of time, MHW exposure, and protection status on biomass
3. Figure-generation scripts:
Figure1.R: Sampling timeline per population coloured by impact category, and SST JJASON anomaly for the Mediterranean (panels L–M of Figure 1).
Figure2.R: Shared regional demographic trends for all five variables, plus posterior distribution of regional biomass loss (Figure 2). Reads model objects from the five trend scripts.
Figure3_4_5_6.R: Population-level biomass decline probabilities, exposure and protection characterisation per population, and effects of MHW exposure and protection on biomass trends (Figures 3–6). Reads model objects from MBioTempProt.R.
4. Supplementary: All supplementary analyses are contained in a separate Supplementary/ folder and rendered through a Quarto script, Data
Colonies_Pclavata.csv: Colony-level survey data
In_situ_Temp.rds: In-situ daily mean temperature logger data
MHWDecadeClimat.rda: Pre-computed MHW events (output of TempMHWDetection.R)
MBioTempProtData.rda: Pre-compiled modelling dataset (output of MBioTempProt.R)
Map.csv: Site coordinates and zone metadata
medsea_omi_tempsal_...nc: Monthly SST anomalies (Copernicus Marine Service, 10.48670/moi-00268)
Execution order:
MMortalityTrend.R
MHeightTrend.R
MDensityTrend.R
MRecruitsTrend.R
MBiomassTrend.R
TempMHWDetection.R
MBioTempProt.R
Figure1.R
Figure2.R
Figure3_4_5_6.R
Supplementary.qmd
Note: Fitted model objects are saved to Stats/ and loaded directly by the figure scripts, so models do not need to be re-run each time. Given the computational cost of model fitting, it is recommended to load the pre-computed outputs, This repository contains the data and code used to analyse long-term demographic trends of the gorgonian coral Paramuricea clavata across 49 populations in the north-western Mediterranean Sea. The study investigates how repeated marine heatwave (MHW) events have driven population-level declines in mortality, height, density, recruitment, and biomass, and whether marine protected areas (MPAs) buffer these impacts. Each script contains detailed header describing its objective, model structure and validation workflow, RTI2018-095346-BI00 (HEATMED) funded by MCIN/AEI/10.13039/501100011033 and by “ERDF/UE”.
TED2021-131622B-I00 (CORFUN) funded by MCIN/AEI/10.13039/501100011033 and by the “European Union NextGenerationEU”/PRTR”.
PID2022-137539OA-C22 (UNDRESCORAL) funded by funded by MCIN/AEI/10.13039/501100011033.
SEP-210597628 (Futuremares) funded by the European Union H2020.
MED0200736 (MPA4Change) funded by Interreg EuroMED and the European Union.
CL acknowledges ICREA Academia 2019 award funded by the Institució Catalana de Recerca i Estudis Avançats.
JG also acknowledges the Severo Ochoa Centre of Excellence grant (CEX2019-000928-S) funded by MCIU/AEI/10.13039/501100011033.
YZ acknowledges the FPU Fellowship (FPU20/03574) funded by MCIU/AEI/10.13039/501100011033, Peer reviewed