Skip to content

Analysis code and datasets used for running Lagrangian particle tracking simulations in the Northern California Current System.

License

Notifications You must be signed in to change notification settings

andrew-s28/plankton-particle-tracking

Repository files navigation

Plankton Particle Tracking in the Northern California Current System

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.

Usage

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:

  1. git clone https://github.com/andrew-s28/plankton-particle-tracking.git

  2. 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.

Installing a C Code Compiler

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:

  1. Download latest WinLibs build from this link
  2. Unzip and move to some reliable location (perhaps %USERPROFILE%)
  3. Swap to the directory %USERPROFILE%/winlibs-x86_64-posix-seh-gcc-15.1.0-mingw-w64msvcrt-12.0.0-r1/mingw64/bin
  4. Copy the file gcc.exe and rename cc.exe (this is a bit of a hack so that any cc calls in, e.g., Python source builds point to the up to date gcc executable).
  5. Add the %USERPROFILE%/winlibs-x86_64-posix-seh-gcc-15.1.0-mingw-w64msvcrt-12.0.0-r1/mingw64/bin directory to the Windows path (note you'll have to swap out %USERPROFILE% when actually adding it to the path).

About

Analysis code and datasets used for running Lagrangian particle tracking simulations in the Northern California Current System.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published