Kenhasteandersen / NUMmodel

Reference implementation of the Nutrient-Unicellular-Multicellular modelling framework
GNU General Public License v3.0
3 stars 7 forks source link

NUMmodel

Reference implementation of the Nutrient-Unicellular-Multicellular modelling framework. The model is described in:

The core library is written in Fortran2008 and is interfaced from matlab and with a minimal frontend in R (see http://oceanlife.dtuaqua.dk/Plankton/R).

image

https://user-images.githubusercontent.com/13268353/148120839-6bbfc0ac-69f1-445b-9b9f-b3880436bf2f.mp4

The figure above shows a setup with only unicellular generalists run with the MIT ECCO transport matrices. The inset shows a high latitude water column at 60N, 15E, with the lower panel illustrating the trophic strategies: blue for DOC uptake (osmotrophy/bacteria), green for phototrophy, and red for phagotrophy.

Papers using the NUM model:

Installation

The library requires a recent version of matlab (2021 or later). Installation and compilation instructions are given in the wiki.

Basic structure

There are three levels of routines: top-level, medium-level and low-level. There are two model systems: an upper ocean represented as a chemostat and a global simulation with transport matrices.

Top-level matlab routines

These routines run a simulation and returns the results in a sim structure:

All units are in micro gC/l (or micro gN/l for nutrient concentration). Units of light are micro mol photons per m2 per second.

Medium-level matlab routines

The routines operates with two basic structures: a parameter structure and a simulation structure. The parameter structure contains all parameters needed for a simulation. The simulation structure contains all the output, which can be used for analysis or for plotting. See more details on the wiki page.

Parameters are set with two calls: one to setup the size spectra to simulate and one to add the parameters for the simulation (chemostat or global). The size spectra are setup with a call to setupXX where XX represent the setup, e.g., setupNUMmodel or setupGeneralistsOnly or (the latter onlu includes unicellular generalists). Parameters for the simulation are subsequently set with a call to parametersChemostat, parametersWatercolumn, or parametersGlobal. For example: p = parametersChemostat( setupGeneralistsOnly() ); (see the wiki for a description of the parameter structure).

Simulations are performed with calls to a simulation routine: sim = simulationChemostat(p), sim = simulationWatercolumn(p, latitude, longitude), or sim = simulationGlobal(p), where p is the parameter structure (see the wiki for a description of the simulation structure).

Plots are made with calls to the plot routines. plotSimulation(sim) makes a series of basic plots of a simulation.