Git Product home page Git Product logo

lagrangian-microbes's Introduction

mixing-induced-ecological-warfare

Rock-paper-scissors between Lagrangian microbes in a turbulent ocean.

https://www.youtube.com/watch?v=evxhhAHxJPc&feature=youtu.be

Initial configuration with 490,000 regularly spaced Lagrangian microbes in a small patch in the Northern Pacific. Each Lagrangian microbe is assigned a species at random (either rock, paper, or scissors). Initial configuration

A pair of Lagrangian microbes interact if they are within ~1 km of each other by playing rock-paper-scissors. The forward interaction (rock beats scissors, scissors beats paper, or paper beats rock) occurs with probability p while the backward interaction (scissors beats rock, paper beats scissors, or rock beats paper) occurs with probability 1-p.

A snapshot of the same set of Lagrangian microbes after 7,670 hours. Initial configuration

lagrangian-microbes's People

Contributors

ali-ramadhan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lagrangian-microbes's Issues

Better way of writing output?

Right now everything is written to uncompressed pickle files. At the very least, the pickle files should be compressed. Would be good to use NetCDF as it's a familiar format.

Unfortunately last time I tried, Parcels' NetCDF output didn't work when running parallel jobs with joblib so I had to use joblib pickles. If this is still the case, maybe all the pickle files can be merged into a massive NetCDF file at the end?

The interactions might create Lagrangian microbes with properties such as species (integer or string) or genome (binary string). These should still fit in NetCDF files.

Cannot simulate interactions by themselves :(

Right now the InteractionSimulator contains a ParticleAdvecter which isn't good because we can't run multiple interaction simulations by themselves, they need to be tied to a ParticleAdvecter at run time.

They should be decoupled!

Checkpointing

Once we have modules this should be easy to implement so it's super easy to restart.

Examples

Should have some examples for potential users:

  • Simple barebones single-core simulation (show the entire pipeline)
  • Large multi-core simulation with OSCAR fields

Ensemble runs

Run for a full year:

  • Vary # of particles: 10,000 100,000 1,000,000
  • Vary diffusivity: 0, low ฮบ (fuzzy motion, Kh=20), medium ฮบ (Kh=100), large ฮบ (get kicked out of eddies, Kh=500)
  • Vary the interaction: netural (change p=0.5, 0.7, 0.9, 0.999, 1), non-neutral (pRS=0.501, 0.51, 0.6, 0.7, 0.99)

Microbe interactions module

Should be able to:

  • Keep track of arbitrary microbe properties.
  • Accept a user-defined interaction between two Lagrangian microbes of the form `interaction(microbe1, microbe2).
  • Maybe also a self-interaction of the form self_interaction(microbe).
  • Also NetCDF output (preferably).

Particle advection module.

Should be able to:

  • Choose a velocity field (OSCAR, LLC4320, chaotic mixing, etc.)
  • Choose number of processors to run on.
  • Choose number of particles and their initial distribution.
  • Choose time step, simulation length, output frequency, etc.
  • Writes output to NetCDF preferably.
  • Changes the velocity field as time progresses (especially relevant for OSCAR and LLV4320).

Save OSCAR fields to disk (under tmp dir?)

Right now it's impractical to run on 20+ cores as each core will download the OSCAR dataset which causes network issues and gets our connections rejected from NASA's servers.

A simple solution would be to just download and save the OSCAR dataset to disk. Then 100+ cores can read it.

This should also resolve #23.

Unit tests.

Gotta pick a favorite python testing framework and write unit tests along the way.

Analysis modules/functions.

Would be nice to refactor the analysis scripts into nice modules or functions. Right now they are:

  • Species count time series.
  • Pairwise haversine distance histogram (in Julia).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.