DOI: 10.5061/dryad.tqjq2bw6c
title: Intraspecific diversity in Atlantic cod drives divergent trophic cascades across a coastal food web

description: Intraspecific diversity can profoundly shape ecological interactions, yet
 its role within complex food webs remains challenging to quantify. We
 explored how eco-evolutionary divergence within Atlantic cod (Gadus
 morhua), specifically between the resident Fjord and migratory North Sea
 ecotypes, influences food web structure and function in a coastal marine
 ecosystem. Using key trait differences, including growth rate, age, and
 size at maturation, reproductive investment, and ontogenetic dietary
 shifts, we parameterized an allometric trophic network (ATN) model with
 empirical data from the Norwegian Skagerrak. The high-resolution network
 comprised 148 trophic guilds and 2054 feeding links, permitting resolution
 of ecotype-specific interactions. We found pronounced intraspecific
 divergence: North Sea cod reached higher trophic position earlier,
 exerting greater interspecific influence, whereas Fjord cod retained
 higher early-stage biomass, intensifying intraspecific competition between
 ecotypes. Together, these complementary roles indicate that variation
 within a single species can both dampen and amplify food web interactions
 across life stages, enhancing ecosystem connectivity, and triggering
 cascading ecological effects. To sustain this natural buffer, conservation
 and management must move beyond species-level metrics and actively protect
 intraspecific diversity.
description: # **Intraspecific diversity in Atlantic cod drives divergent trophic
 cascades across a coastal food web**
 [https://doi.org/10.5061/dryad.tqjq2bw6c](https://doi.org/10.5061/dryad.tqjq2bw6c) ## Description This repository contains data files and code used to simulate, analyze, and visualize coastal marine food webs, examining the effects of Atlantic cod (*Gadus morhua*) ecotype diversity on trophic cascades. Food web dynamics were simulated using Matlab and analyzed and visualized in R. ## Simulation Data and Code ### Matlab Simulation Files Matlab data files hosted on Zenodo include four parameterized food web matrices representing alternative Atlantic cod ecotype scenarios in the Skagerrak coastal system: * **5_Skagerrak_2BothEcotypes.mat** – Food web including both Fjord and North Sea cod ecotypes * **5_Skagerrak_2FCod.mat** – Food web including Fjord cod ecotype only * **5_Skagerrak_2NSCod.mat** – Food web including North Sea cod ecotype only * **5_Skagerrak_2NoEcotypes.mat** – Food web without cod ecotypes These food webs were implemented in an **Allometric Trophic Network (ATN)** model and simulated using the Matlab script **webdriver.m**. ## Simulation Results Simulation outputs include total and average biomasses (units of µgC/m3) for each food web scenario: ### Biomass Outputs * *_allbiomasses.txt* – Time series of total biomass for each guild (variables: guilds ordered column and row-wise as in \_label.txt, unit of measure: µgC/m3) * *_avgbiomasses.txt* – Average biomass for each guild (variables: guilds ordered column and row-wise as in \_label.txt, unit of measure: µgC/m3) `(5_Skagerrak_2BothEcotypes_allbiomasses.txt, 5_Skagerrak_2BothEcotypes_avgbiomasses.txt, 5_Skagerrak_2FCod_allbiomasses.txt, 5_Skagerrak_2FCod_avgbiomasses.txt, 5_Skagerrak_2NoEcotypes_allbiomasses.txt, 5_Skagerrak_2NoEcotypes_avgbiomasses.txt, 5_Skagerrak_2NSCod_allbiomasses.txt, 5_Skagerrak_2NSCod_avgbiomasses.txt )` ### Supporting Files For each scenario, the following supplementary files are included: * **Labels** (*_labels.txt*): Guild names corresponding to rows and columns of the biomass matrices (variable: guild labels) `(5_Skagerrak_2BothEcotypes_labels.txt, 5_Skagerrak_2FCod_labels.txt, 5_Skagerrak_2NoEcotypes_labels.txt, 5_Skagerrak_2NSCod_labels.txt)` * **Colors** (*_colors.txt*): Color assignments used for data visualization (variable: color codes) `(5_Skagerrak_2BothEcotypes_colors.txt, 5_Skagerrak_2FCod_colors.txt, 5_Skagerrak_2NoEcotypes_colors.txt, 5_Skagerrak_2NSCod_colors.txt)` * **Links** (*_links.txt*): Trophic links among guilds describing food web structure (variable: interaction matrix with guilds as ordered in label.txt file column and row wise, where 0 means no link, and 1 signifies link present) `(5_Skagerrak_2BothEcotypes_links.txt, 5_Skagerrak_2FCod_links.txt, 5_Skagerrak_2NoEcotypes_links.txt, 5_Skagerrak_2NSCod_links.txt )` * **Trophic Levels** (*_TL.txt*): Calculated trophic position for each guild (variable: trophic position, dimensionless numerical index) `(5_Skagerrak_2BothEcotypes_TL.txt, 5_Skagerrak_2FCod_TL.txt, 5_Skagerrak_2NoEcotypes_TL.txt, 5_Skagerrak_2NSCod_TL.txt) ` ## Analysed dataset The following are cleaned and processed datasets in R, used for downstream analyses: 1. `Sk_nodes.csv` – Node (guild) attributes (variables: name (guild label), Group (broader functional guild),  Ecosystem (tested food web scenario), TL (trophic position), Biomass_avg (average biomass, unit of measure: µgC/m3) 2. `Sk_edge.csv` – Trophic interactions among guilds  (variables: name (guild label where the biomass flows from), to (guild label where the biomass flows to), Group (broader functional guild),  Ecosystem (tested food web scenario), TL (trophic position), Biomass_avg (average biomass, unit of measure: µgC/m3) 3. `Biomasses_Scenarios.csv` – Biomass data across all four food web scenarios (variables: Name (guild label), Year (a year of recorded biomass), Group (broader functional guild),  Ecosystem (tested food web scenario), TL (trophic position), Biomass (estimated biomass of that year, unit of measure: µgC/m3) Additional summarized biomass change datasets are provided in Excel format: 1. `Biomasses_Scenarios_20Final.xlsx` – Biomass changes for all guilds (variables: Group (broader functional guild),  Ecosystem (tested food web scenario), GuildBiomass (total estimated biomass of the group, unit of measure: µgC/m3), GuildTL (average trophic position of the group), Prop (proportional change in GuildBiomass in relation to GuildBiomass under scenario where both ecotypes are present), Change (change proportion) 2. `Biomasses_Scenarios_20GuildPropFinal.xlsx` – Proportional biomass changes by guild (variables: Name (guild label), Species (higher taxonomic grouping than guild label, to species for fish, and to broader functional guilds for other taxa), Group (broader functional guild),  Ecosystem (tested food web scenario), GuildBiomass (total estimated biomass of the guild, unit of measure: µgC/m3), GuildTL (average trophic position of the guild), Prop (proportional change in GuildBiomass in relation to GuildBiomass under scenario where both ecotypes are present), Change (change proportion), TotalChange (total change proportion for the guild) 3. `Biomasses_Scenarios_FishDB.xlsx` – Biomass changes for fish guilds only  (variables: Name (guild label), Species (label of the fish species), Group (broader functional guild),  Ecosystem (tested food web scenario), GuildBiomass (total estimated biomass of the guild, unit of measure: µgC/m3), GuildTL (average trophic position of the guild), Prop (proportional change in GuildBiomass in relation to GuildBiomass under scenario where both ecotypes are present), Change (change proportion), TotalChange (total change proportion for the species), AverageChange (average change proportion for the species across all tested scenarios), Family (family fish species belongs to), Habitat (habitat it most associates with), SpeciesBiomass (estimated species biomass, µgC/m3), SpeciesProp (proportional change in SpeciesBiomass in relation to SpeciesBiomass under scenario where both ecotypes are present), SpeciesChange (change proportion)