Test Case 2, Example 0

MSEAS Ocean Test Cases and associated documents present a set of simplified test cases for Active Transfer Learning (ATL) in an oceanographic context:

In what follows, we define a set of ocean test cases for Active Transfer Learning. The test cases are intended to be not too simple but not too complicated, so that ideas can be generated and tested, and algorithms and methods evaluated, in fast but relevant enough situations. We provide three types of cases, as well as software to run them and/or actual data sets.

This page presents a simplified (e.g., largely non-mathematical) version of the setup and underlying "story" for example 0 of test case 2 (Learning for 2-D Biogeochemical Dynamical Systems). It is not definitive, but it may serve as a useful conceptual introduction.


We'll start by describing the high-level environment, then describe the ecological players and their interactions.


All of the examples take place in roughly the same environment. A mixture of water and biomass (plankton and nutrients) is flowing, left-to-right, through a 2-dimensional channel. The input stream is laminar and the layers (i.e., plankton, water, nutrients) are mostly distinct.

A rounded hump, partway down the channel, disturbs this flow. Depending on environmental factors (e.g., inlet flow rate), this disturbance may cause various amounts of mixing, turbulence, etc. This affects the local ecosystem in various ways, changing the distribution and relative amounts of biomass:


The initial effects of the disturbance are felt by the Phytoplankton:

  • As Phytoplankton rise or fall, they receive more or less sunlight.

  • Mixing of nutrients into clearer water increases their availability.

  • Sunlight and nutrients enable photosynthesis and growth.

So, we can expect to see more Phytoplankton downstream of the hump. However, that isn't the end of the story. Zooplankton graze on Phytoplankton, assimilating some of their mass. The remainder, along with the bodies of plankton that die of natural causes, goes back into the supply of nutrients.


The flow of biomass through the ecosystem forms three cycles, based on the behavior of three processes: Uptake, Grazing, and Mortality:

These processes interact, over time, through their effects on the ecosystem's mass balance. For example, Grazing adds to the mass of both Nutrients and Zooplankton, while reducing the mass of Phytoplankton. This interaction creates feedback loops, which may cause divergent, restorative, or even cyclic behavior.


Because 2-dimensional channels don't occur in nature, we're clearly dealing with some sort of simulation. Indeed, the MSEAS test data is entirely artificial, based on their own oceanographic and ecological equations.

In example 0, we are asked to estimate the parameters for the ecological (NPZ) equations, based on their forms and a small set of sparse data sets. In other words, we get to simulate the MSEAS simulation, tuning our parameters to match limited amounts of "observed" data.

Scientific Overview

Two scientific fields (physics and biology) interact in this example:


The flow in the input stream is laminar and the layers (i.e., plankton, water, nutrients) are mostly distinct. The plankton are light, so they tend to rise. The nutrients are heavy, so they tend to sink.

The fluid rises over the hump, compressing the layers of biomass. After the hump, the layers decompress. At low input velocities, the resulting layers look very much like the input layers (e.g., laminar flow). However, at higher velocities turbulence may occur. This can cause advection (e.g., flow-based mixing of the layers).

Various regimes appear in the area beyond the hump, including single stable points and stable limit cycles. Biomass (Nitrogen + Phytoplankton + Zooplankton) is conserved at every point.


Phytoplankton take up nutrients (e.g., Nitrogen) and use energy from sunlight (through photosynthesis) to turn it into plant material. Zooplankton graze on Phytoplankton, incorporating some of its mass and discarding the rest. This biomass, along with dead Phytoplankton and Zooplankton, may become available as Nutrients.


Several parameters in the mathematical model have to do with biological processes:

  • Assimilation (efficiency) rate

    This is the fraction of the Phytoplankton that becomes part of the the grazing Zooplankton; the rest returns to the stock of Nutrients.

  • Availability of Phytoplankton for grazing

    This controls the fraction of Phytoplankton that is available for grazing (in the Ivlev predation model).

  • e-folding depth for light

    This controls the amount of light that is available at a given depth and thus the maximum amount of photosynthesis that Phytoplankton can perform.

  • Grazing rate of Zooplankton

    This is the daily grazing rate by Zooplankton of Phytoplankton.

  • Mortality rate of Phytoplankton (Zooplankton)

    This is the daily death rate for Phytoplankton (Zooplankton). The resulting biomass returns to the stock of Nutrients.

  • Phytoplankton uptake rate

    This is the maximum daily uptake rate by Phytoplankton of Nutrients.

  • Saturation concentration of Phytoplankton

    Together with the amount of available Nutrients, this controls the actual uptake rate by Phytoplankton of Nutrients.

NPZ Equations

The NPZ (Nutrients, Phytoplankton, Zooplankton) model (ignoring advection) is defined by three differential equations. The published form of these equations looks pretty scary, but stay calm; all will be explained:

made simple...

The equations above are 2-dimensional Partial Differential Equations (PDEs). This allows them to handle position in the channel as well as time. However, our existing modeling system (SC-IPM) is limited to 0-dimensional Ordinary Differential Equations (ODEs), so it can only model the system in terms of time. By removing the advection term from each equation, we can put them into a form that SC-IPM can handle.

Each of the NPZ values (e.g., total mass of Nutrients) is recalculated for each time step of the simulation. However, instead of talking about the absolute mass, we'll just consider the change in mass for each NPZ value (dN, dP, dZ). This is calculated based on four common terms (P_uptake, P_death, Z_death, Z_graze):

Note the way that the use of common terms balances out in these equations, maintaining the mass balance for the system as a whole. P_uptake, P_death, and Z_death each appear twice, with opposite signs. Z_graze appears three times, but the mass taken from Phytoplankton is split between the Zooplankton and Nutrients:

dN = - P_uptake  + P_death  + Z_death  + Z_graze * (1-a)
dP = + P_uptake  - P_death             - Z_graze
dZ =                        - Z_death  + Z_graze * a

Now, let's look at the definitions and effects of these terms:

  • P_uptake (uptake by Phytoplankton of Nutrients)

    This depends on the ratio of Phytoplankton to Nutrients and the amount of sunlight at this depth. It decreases the mass of Nutrients and increases the mass of Phytoplankton.

  • P_death (natural death of Phytoplankton)

    This depends on the mass of Phytoplankton. It increases the mass of Nutrients and decreases the mass of Phytoplankton.

  • Z_death (natural death of Zooplankton)

    This depends on the mass of Zooplankton. It increases the mass of Nutrients and decreases the mass of Zooplankton.

  • Z_graze (grazing by Zooplankton on Phytoplankton)

    This depends on the relative masses of Zooplankton and Phytoplankton. It increases the masses of Nutrients and Zooplankton and decreases the mass of Phytoplankton.

Here, for the brave, are the equations for the common terms:

P_uptake =  U * exp(z/h) * (P*N) / (N+ks)  # P uptake of N
P_death  =  P * dp                         # P natural death
Z_death  =  Z * dz                         # Z natural death
Z_graze  =  Z * gv * (1-exp(-v*P))         # Z grazing on P

Note: The NPZ Equations section is adapted, with thanks, from work done by Gene Dronek.


As long as Phytoplankton are supplied with sunlight and Nutrients, they will produce more mass, reproduce, etc. However, advection can affect this in multiple ways:

  • By bringing Phytoplankton into proximity with needed Nutrients, advection can increase its growth rate.

  • By concentrating Phytoplankton more than Nutrients, advection can decrease its growth rate.

  • By moving Phytoplankton out of the photic zone (i.e., the well-lit region near the top of the stream), advection can inhibit photosynthesis.

In general, the Zooplankton will attempt to be near Phytoplankton, in order to graze on them. Advection and diffusion may separate some Phytoplankton from Zooplankton, increasing the grazing search time, but this is not part of this model.

Observed Data

The observed data is actually a set of simulation results, based on MSEAS research. Along with the equations discussed above, we have been provided with a few images and some sparse data sets.


We've already seen the 3x3 matrix of images from the test case page. Let's look at it again, in detail:

Each image depicts a 2D channel, containing a stream of water and biomass (Nutrients, Phytoplankton, and Zooplankton) that enters on the left and exits on the right. The trailing asterisks on the vertical (z*) and horizontal (x*) axis labels indicate that they are non-dimensional quantities (i.e., we only know their relative values). For brevity and clarity, we will omit all such asterisks in the following text.

The stream enters the channel at x=-7.5 and exits at x=11.5. The top of the stream (z=0) receives sunlight during the day. The bottom of the stream (z=-2) does not, because of the shading effect of the biomass above it. A rounded bump (based at x=0 and z=-2, extending upwards to z=-1) interferes with the stream and may cause advection (i.e., mixing due to currents).

Each row of images details the distribution of a particular type of biomass (e.g., Nutrients), using a false-color representation (e.g., dark blue represents minimal biomass, brown represents maximal biomass).

The images in each column depict a simulation of biological dynamics for a particular situation:

  • Left column: single stable points

  • Middle column: stable limit cycles for z values from -0.4 to -0.9

  • Right column: stable limit cycles in whole euphotic zone

The final solution fields for the three different regimes of biological dynamics ... is plotted in Fig. 11. The results show that idealized strait bathymetry effectively perturbs the biology away from the inlet conditions. The case with single stable points (bio case 1) adjusts back to the stable equilibrium, whereas the two cases with limit cycles show complex structures in the vertical. In all cases, a phytoplankton bloom over the bump is observed.

-- High Order Schemes for 2D Unsteady Biogeochemical Ocean Models, section 4.4 (Full NPZ equations)

Q: The heading for the image matrix is "Three simulations with increased biomass". However, the description for these images in the paper speaks of single stable points, stable limit cycles, etc. Is the heading incorrect? If not, how does it relate to the paper's description?

Q: Is the "a)" annotation in the upper-left corner of the image set an accidental and irrelevant inclusion from the source paper?

Data Sets

There are three data sets, taken at (non-dimensional) depths of 0.5, 1.0, and 1.5. Each data set (e.g., y-0.5.csv) is a four-column array, containing a header row and 200 data rows. (The file names and some plots refer to depth as y or Y; this is an artifact of the plotting software.)

The columns contain time values (t, ranging from 0.2 to 40.0) and corresponding concentrations of Nutrients (N), Phytoplankton (P), and Zooplankton (Z). The data sets provide a general picture of the simulation over time. The image columns, in contrast, provide a detailed snapshot, taken halfway through the simulation run (i.e., t=20).

Q: It appears that the (N, P, Z) values for t=20 in each data file correspond to the false colors shown at the appropriate z offset (e.g., -0.5) in the corresponding images. However, what x offset (e.g., 11.5) is used?


MSEAS suggests several problems for this test case, ranging in difficulty. After performing some of the simpler problems, to demonstrate that we have the basics right, we plan to select and/or generate more challenging problems that take advantage of our approach (IPM) and technology (IPM Lab).

Dynamics classification

  • Discover unknown biomass, biomass (time)

  • Discover dynamical regimes, etc.

Inductive model learning

  • Learn specific terms (e.g., unknown functionals, functionals (time), etc.

  • Discover parameters and structures of the 0D biological reaction terms.

  • Determine when/where certain terms matter: e.g. when do the physical terms matter?

This wiki page is maintained by Rich Morin, an independent consultant specializing in software design, development, and documentation. Please feel free to email comments, inquiries, suggestions, etc!

Topic revision: r19 - 04 Apr 2016, RichMorin
This site is powered by Foswiki Copyright © by the contributing authors. All material on this wiki is the property of the contributing authors.
Foswiki version v2.1.6, Release Foswiki-2.1.6, Plugin API version 2.4
Ideas, requests, problems regarding CFCL Wiki? Send us email