function Var3
% Code used in Bherenfeld and Boss, 2014,
% Resurrecting the Ecological Underpinnings of Ocean Plankton Blooms?
% Annual Review of Marine Science.
% This code provided the results shown in Fig. 4a, top left panel
%
% In this run the code is set with a prescribed phytoplankton growth-rate
% (alpha) which is varried every month starting in day 1000.
%
% The model is based on that of Evans and Parslow, 1985, with some
% modifications following Moore et al., 2002.
% clear the memory and close all figures
clear all
close all
%parameter used:
c1=3.24; % maximum herbivore growth rate [day^-1] %note: this value is actually given for N not C in Moore's paper resulting in a slight bias
c2=0.44; % grazing half saturation [mmole^2 m^-6] %note: this value is actually given for N not C in Moore's paper resulting in a slight bias
c3=0.5; % ingestion efficiency [unitles]
c4=0.06; % herbivore non-predation loss [day^-1]
c5=1.0; %herbivore quadratic mortality [mmole^-1 m^2 day^-1] %note: this value is actually given for N not C in Moore's paper resulting in a slight bias
N0=10; %deep nutrients [mmole m^-3]
J=0.5; %uptake half saturation [mmole m^-3]
b=0.07; %phytoplankton respiration [day^-1]
lat=47; %latitude [degrees]
m=3; %diffusion velocity [m day^-1]
tspan=[0 365*9:1:365*10-1];%integrate for 10 years get data, for year 10.
y0=[10 0.26 0.26]; %initial condition
%solve equations numerically by integrating ODE
[t,y]=ode23(@f,tspan,y0);
%convert phytoplankton from [mM m^{-3}] of Nitrogen to Chl
%Chl (mg/m3) = Phytoplankton N (mM/m3) * 14 mg/mM * 6 C/N * 1/60 Chl/C
y(:,2)=y(:,2)*14*6/60;
%convert herbivores from [mM m^{-3}] of Nitrogen to mg/m^3 of carbon
%grazer biomass (mg/m3) = grazer N (mM/m3) * 14 mg/mM * 6 C/N
y(:,3)=y(:,3)*14*6;
figure(1)
II=find(365*9+1