Food web input file for: 

The Gulf of Riga *AUTUMN* planktonic food web as described in:

Donali, E., Olli, K., Heiskanen, A.S., Andersen, T., 1999. Carbon flow 
patterns in the planktonic food web of the Gulf of Riga, the Baltic Sea: 
a reconstruction by the inverse method. Journal of Marine Systems 23, 251–268.

Originator: Dick van Oevelen and Karline Soetaert

#####################################################################

!==================================!
! MEASURED CONCENTRATIONS, mgC/m3  !
!==================================!
! Values from table 2, p. 254


## STOCK 

 P1  = IniP1     ! PicoAutotrophs
 P2  = IniP2     ! Non-picoAutotrophs
 B   = 87.28     ! Bacteria
 N   = 3.85      ! Heterotrophic nanoflagellates
 Z   = 90.51     ! Zooplankton-heterotrophic nanoflagellates
 D   = 355.27    ! Detritus + virus
 DOC = XNA       ! Dissolved organic carbon - not known

## END STOCK

## EXTERN

CO2
Sedimentation

## END EXTERN

## PARAMETER
 Inip1           = 19.06  {mmol/m3}   ! PicoAutotrophs
 Inip2           = 66.29 {mmol/m3}   ! Non-picoAutotrophs
 MaintenanceResp = 0.1
## END PARAMETER

!===================!
! NET INPUT VALUES  !
!===================!

## RATE 

 P1  = -2.19     !(SE 2.42)		! PicoAutotrophs
 P2  = 0.19      !(SE 4.90)		! Non-picoAutotrophs
 N   = 0.16      !(SE 0.60)		! Heterotrophic nanoflagellates
 Z   = 1.51      !(SE 17.95)		! Zooplankton-heterotrophic nanoflagellates
 B   = 6.75      !(SE 3.18)		! Bacteria
 D   = -18.62    !(SE 19.66)		! Detritus + virus
 DOC = -252.93	 !(SE 31.11)		! Dissolved organic carbon

## END RATE

!====================!
! RATE OF CHANGES    !
!====================! 

! dP1=-Flow(p1,0) -Flow(P1,Z) -Flow(P1,N) -Flow(P1,DOC) +Flow(0,P1)
! dP1=-Flow(p2,0) -Flow(P2,Z) -Flow(P2,N) -Flow(P2,DOC) +Flow(0,P2)
! dZ =-Flow(z,0)  +Flow(P2,Z) +Flow(N,Z)  +Flow(D,Z) -Flow(Z,D)-Flow(Z,DOC)
! dN =-Flow(N,0)  +Flow(P1,N) +Flow(B,N)  -Flow(N,Z) -Flow(N,DOC)
! dD = Flow(P2,D) +Flow(Z,D) 
! dB = Flow(DOC,B)-Flow(B,N) -Flow(B,0)
! dDOC=Flow(N,DOC)+Flow(P1,DOC)+Flow(P2,DOC)+Flow(Z,DOC)+Flow(D,DOC)-Flow(DOC,B)


## FLOW
 
 ! Respiration fluxes
 P1->CO2
 Flow(P2,CO2)        = ZeroOrder
 Flow(Z,CO2)         = ZeroOrder
 Flow(N,CO2)         = ZeroOrder
 Flow(B,CO2)         = ZeroOrder

 ! Production fluxes
 Flow(CO2,P1)        = ZeroOrder
 Flow(CO2,P2)        = ZeroOrder

 ! PicoAutotrophs
 Flow(P1,Z)        = ZeroOrder
 Flow(P1,N)        = ZeroOrder
 Flow(P1,DOC)      = ZeroOrder
 P1		->			Sedimentation

 ! Non-Pico autotrophs
 Flow(P2,DOC)      = ZeroOrder
 Flow(P2,Z)        = ZeroOrder
 Flow(P2,D)        = ZeroOrder
 Flow(P2,Sedimentation)

 ! Nanoflagellates
 Flow(N,DOC)       = ZeroOrder
 Flow(N,Z)         = ZeroOrder
 
 ! Zooplankton
 Flow(Z,DOC)       = ZeroOrder
 Flow(Z,D)         = ZeroOrder
 Z		->			Sedimentation

 ! Detritus
 Flow(D,Z)         = ZeroOrder
 Flow(D,DOC)       = ZeroOrder
 D		->			Sedimentation

 ! Bacteria
 Flow(B,N)         = ZeroOrder
 B		->			Sedimentation

 ! DOC
 Flow(DOC,B)       = ZeroOrder

## END FLOW

## VARIABLES

 GrossProdP1         = Flow(CO2,p1)
 RespirationP1       = Flow(p1,CO2)
 DocReleaseP1        = Flow(P1,DOC)
 SedP1               = Flow(P1,Sedimentation)

 GrossProdP2         = Flow(CO2,p2)
 RespirationP2       = Flow(p2,CO2)
 DocReleaseP2        = Flow(P2,DOC)
 SedP2               = Flow(P2,Sedimentation)

 GrossPrimProd       = GrossProdP1 + GrossProdP2

 Totalresp           = Flow(P1,CO2) +Flow(P2,CO2) +Flow(Z,CO2) +Flow(N,CO2) +Flow(B,CO2)

 ZooDOCrelease       = Flow(Z,DOC)
 ZooGrazing          = Flow(P1,Z) +Flow(P2,Z) +Flow(N,Z) +Flow(D,Z)
 ZooFaeces			 = Flow(Z,D)
 ZooFaecesSed		 = Flow(Z,Sedimentation)
 ZooAssimilation     = ZooGrazing - ZooFaeces - ZooFaecesSed - ZooDOCRelease
 ZooRespiration      = Flow(Z,CO2)
 
 

 BactRespiration     = Flow(B,CO2)
 BactAssimilation    = Flow(DOC,B)    ! 100% efficiency
 SedB            	 = Flow(B,Sedimentation)

 NanoRespiration     = Flow(N,CO2)
 NanoGrazing         = Flow(B,N)+Flow(P1,N)
 NanoGrazingBacteria = Flow(B,N)
 NanoGrazingP1       = Flow(P1,N)

 NanoAssimilation    = NanoGrazing    ! 100% efficiency

 DetritusDOCrelease  = Flow(D,DOC)
 SedD                = Flow(D,Sedimentation)


## END VARIABLES


!======================!
! EQUALITY CONSTRAINTS !
!======================!

## EQUATION

! Gross primary production
  GrossPrimProd						=	85.78	!(SE 30.32)

! Total respiration
  Totalresp							=	335.77	!(SE 11.69)

! Net bacterial production
 BactAssimilation - BactRespiration =	16.19	!(SE 8.15)

! Sedimentation
!SedP1								=	0.008   !(SE 0.45)
 SedP2								=	0.34	!(SE 0.13)
  ZooFaecesSed						=	0.78	!(SE 0.40)	
 SedB + SedD						=	13.92	!(SE 4.51)


## END EQUATION


!===================!
! CONSTRAINTS       !
!===================!


## CONSTRAINT

! Detritus DOC release
!--------------------------
 DetritusDOCrelease < 0.02* D

! Gross primary production : mass-specific
!--------------------------
 GrossProdP1*P2  =GrossProdP2*P1*[1,2]

! Grazing of nanoflagellates
!----------------------------
 NanoGrazingBacteria*P1 = [0.5,2]*NanoGrazingP1*B                 

! Zooplankton grazing
!--------------------------
 -Flow(D,Z)*P1-Flow(D,Z)*P2+Flow(P1,Z)*D+Flow(P2,Z)*D   > 0

! Zooplankton assimilation
!--------------------------
 ZooAssimilation = [0.4,0.8]*Zoograzing

! Heterotroph respiration
!--------------------------
 ZooRespiration  = Z*MaintenanceResp + ZooAssimilation * [0.4,1.0] !not recoverable from calculated flows
 BactRespiration = B*MaintenanceResp + BactAssimilation* [0.4,1.0]
 NanoRespiration = N*MaintenanceResp + NanoAssimilation* [0.4,1.0] !not recoverable from calculated flows

! Autotroph respiration
!--------------------------
 RespirationP1=GrossProdP1*[0.05,0.55]
 RespirationP2=GrossProdP2*[0.05,0.55]

! Autotroph DOC release
!--------------------------
 DOCreleaseP1 = GrossProdP1 * [0.05,1]
 DOCreleaseP2 = GrossProdP2 * [0.05,1]

! Zooplankton DOC release
!--------------------------
 ZooDOCrelease = ZooGrazing*[0.1,1.0] !not recoverable from calculated flows

! Sedimentation of bacteria
!--------------------------
 SedB < BactAssimilation - BactRespiration

## END CONSTRAINT
