This repository contains code used for assessing spatial structure in marine populations. This research was conducted with Dalhousie University's Department of Engineering Mathematics & Internetworking in collaboration with Fisheries and Oceans Canada. Author is Karsten Economou.
Manuscript in progress.
The particle-track simulation, contributed to by Dr. Kira Krumhansl, Dr. Wendy Gentleman, and Karsten Economou (not included in this repository), uses the Bedford Institute of Oceanography North Atlantic Ocean model (BNAM) for field data. The species distribution model used for Placopecten magellanicus was provided by Drs. Ben Lowen and Claudio DiBacco.
See LICENSE
.
All .py
and .ipynb
files are written in Python 3.8.
Clone the repository with
git clone https://github.com/KarstenEconomou/marine-spatial-structure
or use DownGit to download the files.
Install requirements with a virtual environment (venv) activated with
pip install -r requirements.txt
Used data, temporary files, and most output is not included in this repository. pathlib
is used for referencing files in code with the cwd
assumed to be the top-level project directory.
- Create initial particle locations of a uniform density:
initial_positions.ipynb
- Write a grid over the domain depicting the suitability of habitat of each cell for each genetic lineage from a
.tif
probability-based species distribution model:sdm_grid.ipynb
- Process simulated particle trajectories and create a flow network:
network.ipynb
- Run Infomap:
community_detection.ipynb
- Plot and analyze detected communities stored in
.clu
format:modules.ipynb
plot.py
offers tailored options for plotting particles and hexagons over the domain of interestconstants.py
is a centralized hub of constantsgeneticlineage.py
,hexbin.py
,module.py
,particle.py
,particletype.py
,season.py
,zone.py
are modules containing classes.