Is an ecosystem perspective sufficient to understand meta-ecosystem processes? A critical reflection
Data files
Oct 09, 2025 version files 14.43 KB
-
get_coupling.py
3.62 KB
-
get_coupling.R
3.62 KB
-
LV_example.py
1.68 KB
-
LV_example.R
2.48 KB
-
README.md
1.65 KB
-
README.txt
1.38 KB
Abstract
Meta-ecosystems are the largest and probably most complex structures investigated in ecology. Because of their complexity, they are often separated into their respective sub-systems and then studied in isolation. This is often done without analysing whether an understanding of the individual ecosystems can lead to a proper understanding of the meta-ecosystem, likely because we lack clear guidelines as to when such a separation is sufficient. In the accompanying study (DOI: 10.1002/oik.11127), we propose four conceptual models for which a separation may approximate the full dynamics. For one of those methods, we provide a new theoretical framework to assess how strongly two ecosystems are linked and test this new method on virtual data. We show that the new method is a good approximation of the coupling strength between two ecosystems. Here we provide the computer code to compute this method.
Dataset DOI: 10.5061/dryad.qbzkh18x9
Description of the data and file structure
Computing Ecosystem Coupling in R
Overview
This repository contains two R scripts and two equivalent Python scripts that demonstrate how to compute ecosystem coupling in dynamical systems modeled with differential equations.
The provided functions integrate the system forward in time, check for equilibrium, compute the Jacobian at equilibrium, and derive a coupling strength between two ecosystems.
Files
1. ecosystem_example.R
This script provides a worked example using a Lotka–Volterra model with two coupled ecosystems:
- Defines species intrinsic growth rates (mu) and interaction matrices (A).
- Simulates species dynamics starting from random initial densities.
- Calls the function run_to_equilibrium_and_jacobian (from the second script).
- Produces plots of community dynamics and prints:
- whether equilibrium was reached,
- equilibrium densities,
- the Jacobian matrix at equilibrium,
- the coupling strength between ecosystems.
This file can be used as a teaching or demonstration example.
2. get_coupling.R
This script defines the core function:
```r
run_to_equilibrium_and_jacobian(community_model, y0, ecosystem_bool, params,
t_step = 1.0, tol = 1e-4, max_steps = 20, plot = FALSE)
The corresponding Python scripts are equivalent.
Code/software
Python or R
Access information
NA
