This is the analysis code and datasets used for running Lagrangian particle tracking simulations in the Northern California Current System, specifically targeted at locations coincident with plankton sampling lines such as the Newport Hydrographic Line.
The primary Lagrangian particle tracking simulations are ran using plankton_tracking.py. This script is designed to work with velocity fields from a CROCO model. These model files are far too large to include in a repository. Set the path to model files within the script before running.
Run this script by:
-
git clone https://github.com/andrew-s28/plankton-particle-tracking.git -
uv run scripts/plankton_tracking.py⚠️ The local install of OceanParcels is necessary to run this notebook since the fix implemented in #1886 is not yet published on PyPi. If or when it is, this local install can be removed.⚠️ A C compiler is necessary to run this script. See below for install instructions.
OceanParcels requires a C compiler (such as GCC) in the path to run - i.e., gcc --version should successfully run from the command line. If using a Linux distro (or even WSL), this is straightforward: enjoy the ease with which sudo apt install build-essential handles things perfectly!
On Windows, however, there's a few more steps to installing a compiler. These are the steps I've taken to get it working on my machine:
- Download latest WinLibs build from this link
- Unzip and move to some reliable location (perhaps
%USERPROFILE%) - Swap to the directory
%USERPROFILE%/winlibs-x86_64-posix-seh-gcc-15.1.0-mingw-w64msvcrt-12.0.0-r1/mingw64/bin - Copy the file
gcc.exeand renamecc.exe(this is a bit of a hack so that anycccalls in, e.g., Python source builds point to the up to dategccexecutable). - Add the
%USERPROFILE%/winlibs-x86_64-posix-seh-gcc-15.1.0-mingw-w64msvcrt-12.0.0-r1/mingw64/bindirectory to the Windows path (note you'll have to swap out%USERPROFILE%when actually adding it to the path).