32
Project no. GOCE-CT-2003-505540 Project acronym: Euro-limpacs Project full name: Integrated Project to evaluate the Impacts of Global Change on European Freshwater Ecosystems Instrument type: Integrated Project Priority name: Sustainable Development Deliverable No. 53 Specification of wetland productivity model A. Diagrams in STELLA 6.0 model Due date of deliverable: Month 18 Actual submission date: Month 12 Start date of project: 1 February 2004 Duration: 5 Years Organisation name of lead contractor for this deliverable: UU-Bio Project co-funded by the European Commission within the Sixth Framework Programme (2002-2006) Dissemination Level (tick appropriate box) PU Public PU PP Restricted to other programme participants (including the Commission Services) RE Restricted to a group specified by the consortium (including the Commission Services) CO Confidential, only for members of the consortium (including the Commission Services)

Deliverable No. 53 Specification of wetland productivity

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Project no. GOCE-CT-2003-505540

Project acronym: Euro-limpacs

Project full name: Integrated Project to evaluate the Impacts of Global Change on

European Freshwater Ecosystems

Instrument type: Integrated Project

Priority name: Sustainable Development

Deliverable No. 53

Specification of wetland productivity model

A. Diagrams in STELLA 6.0 model

Due date of deliverable: Month 18

Actual submission date: Month 12

Start date of project: 1 February 2004 Duration: 5 Years

Organisation name of lead contractor for this deliverable: UU-Bio

Project co-funded by the European Commission within the Sixth Framework Programme (2002-2006)

Dissemination Level (tick appropriate box)

PU Public PU

PP Restricted to other programme participants (including the Commission Services)

RE Restricted to a group specified by the consortium (including the Commission Services)

CO Confidential, only for members of the consortium (including the Commission Services)

Introduction

This deliverable contains a listing of the dynamic simulation model CNP20. This

model has been developed during the EU project FAEWE (contract numbers CT90-

0084 and EV5V-CT94-0559 ) to model primary production of wetland vegetation in

relation to the interactions of carbon, nitrogen and phosphorus cycling. The model is

especially designed to test the effect of hydroperiod on nutrient dynamics and primary

production in wetlands. It has been used during FAEWE and PROTOWET (contract

number ENV4-CT95-0060) to test the effects of restoration measures such as

rewetting of drained wetland slopes and to test the effects of eutrophication. The

model description has been published (Van der Peijl & Verhoeven 1999). Further

applications of the model were a landscape analysis of rewetting of a slope wetland

along the Torridge (Devon, UK)(Van der Peijl & Verhoeven 2000) and an analysis of

the effects of nutrient enrichment of wetlands in the same catchment (Van der Peijl et

al. 2000).

The listing of the model is given here in two parts, which were both generated by the

STELLA modelling environment. Part A contains the model diagram; whereas part B

contains the model equations.

Rationale for use in Euro-Limpacs

The CNP20 model will be used in Euro-Limpacs to test the effects of future climate

change on the productivity and nutrient dynamics of wetlands. For this exercise, the

model has been calibrated for a wetland slope and adjacent floodplain area along the

Torridge, which is part of the Tamar catchment, UK. Within WP1, detailed

predictions of climate in 2085 at this location will be used to modify the

meteorological inputs to the model (rainfall, annual cycle of growing season) and test

the effects on hydroperiod and associated changes in nutrient dynamics and

productivity.

This modelling exercise will start after Month 18.

References

Van der Peijl, M.J., Van Oorschot, M.M.P. & Verhoeven, J.T.A. (2000) Simulation of

the effects of nutrient enrichment on nutrient and carbon dynamics in a river marginal

wetland. Ecological Modelling, 134, 169-184.

Van der Peijl, M.J. & Verhoeven, J.T.A. (1999) A model for carbon, nitrogen and

phosphorus dynamics and their interactions in river marginal wetlands. Ecological

Modelling, 118, 95-130.

Van der Peijl, M.J. & Verhoeven, J.T.A. (2000) Carbon, nitrogen and phosphorus

cycling in river marginal wetlands; using a dynamic simulation model to examine the

importance of landscape geochemical flows. Biogeochemistry, 50, 45-71.

a0

a1

a2

weeknr

NNO3 p y

NNH4 p y

PAVAIL p y

unit

site

burntime

burnfract

site ud

area

porosity

burningfract ud

fert nno3

fert nnh4

orgmat%

unit user

orgmat% ud

unit

nnh4 fert

rdr ro max

vegetation type

rdr sh max

rrr ro max

vegetation type ud

sh max

rfr rod max

rfr shd max

k dr 1 max

rgr max

cconc pl

pmin

kmP

kmN

cn plws opt

cp plws opt

nmin

nretransfr

pretransfr

weeknr

nconc plws opt

pconc plws opt

k dr 0 max

~ sh ro ratio opt vt1

pads maxdw ud

froff

pads maxkm ads

weeknr

cn mo 0

depth

cp mo 0

bulkdens ud

km ads ud

unit

depth ud

frout

unit

pads maxdw

bulkdens

fert week

fert pavail

unit

cn mo 1

nno3 fert

pavail fert

herbivore species

biomass per animal

cp mo 1

rrr sh max

h0 h1

number herb per ha ud

herbivore species ud

unit

sh ro opt

net rgr herb

~ sh ro ratio opt vt2

upt ineff

rcr herb

harv week

cp herb opt

grazing y or nnumber herb per ha

pconc herb opt

rmpr

rrr herb

harv level

~ sh ro ratio opt vt3

~ sh ro ratio opt vt4

herb C per m2 begin

frin

cn manure

cn herb opt

cconc herb

nconc herb opt

01a. INITIALISATION, parameters 01b. INITIALISATION, parameters

VEGETATION

HYDROLOGY

GRAZING

- 1 -

nconc om begin ud

NNO3 begin ud

NNH4 begin ud

PAVAIL begin ud

PADS begin ud

nconc shd begin ud

BPL SHOOTD begin ud

pconc shd begin ud

nconc rod begin ud

BPL ROOTD begin ud

pconc rod begin ud

orgmat% ud

herbivore species ud

nconc pl begin ud

pconc pl begin ud

sh biom begin ud

number herb per ha ud

burningfract ud

pconc om begin ud

01c. INITIAL VALUES, UD

litter and dead rootssoil nutrients and organic

matter

NEW UNIT (UNIT=0)

management

vegetation

NEW VEGETATION TYPE (VEGETATION_TYPE=0)

NEW HERBIVORE SPECIES (HERBIVORE_SPECIES=0)

NEW SITE (SITE=0) give new parameters for temperature and atmospheric

deposition

give new herbivore species specific parameters

give new vegetation type specific

parameters

- 2 -

CPL SHOOTD

burntime

burnfract

Cfrag shd

Cdeath sh

Cleach shd

rsoiltemp

Cburn

rtemp

Ctrans

Cass

Cresp sh

CPL SHOOT

cd shd max

rtemp

rrr sh max

pconc plws

rdr sh max

Cgraz Cmethane

~mod ass

limit assP

kmP

pmin

mod herb s 0 or f 1

sh max

Cmethane s

rtemp

limit ass tot

rgr max

limit assN

nconc plws

kmN

nmin

rmpr

Cdec

Cdeni

cd rod max

Ndeni

cn deni

rsoiltemp

c dec

rfr rod max

CSOILOM

Cdeath ro

Cfrag rod

Cleach rod

Cmanure

CPL ROOTD

rfr shd max

CPL ROOT

Cresp ro

~rtemp inv

temp airC

~rtemp inv r

rdr ro max

upt ineff

rrr ro max

CHERB

Cfarmer

Cresp herb

Charv

km gr

sh ro opt

rsoiltemp

Charv s

Cresp herb s

Cgraz s

Cmanure s

mod herb s 0 or f 1

CHERB S

weeknr

harv levelupt ineff

Cherb totrrr herb

harv week

rcr herb

temp soilC~

mod ass

09. Carbon submodel

- 3 -

soilom begin

nconc om begin

unit

cconc om ud

orgmat%

nconc om begin ud

bulkdens

cconc soilom

CSOILOM ini

NSOILOM ini

biomass per animal

cconc herb

number herb per ha

cn herb optNHERB ini

CHERB ini

mod herb s 0 or f 1

NHERB STORE ini

CHERB STORE ini

herb C per m2 begin

pconc om begin

shd biomass begin

nconc shd begin

pconc shd begin

cconc pl

NNH4 begin

NNO3 begin

PAVAIL begin

PADS begin

unit

BPL SHOOTD begin ud

nconc shd begin ud

pconc om begin ud

NNH4 begin ud

NNO3 begin ud

PAVAIL begin ud

PADS begin ud

pconc shd begin ud

NPL STORE ini

PPL STORE ini

nconc pl begin

PSOILOM ini

NNH4 ini

NNO3 ini

PAVAIL ini

PADS ini

CPL SHOOTD ini

NPL SHOOTD ini

PPL SHOOTD ini

mode hyd

depth

sh biom begin ud

nconc pl begin ud

CPL SHOOT ini CPL ROOT ini

PHERB inicp herb opt

NPL SHOOT ini NPL ROOT ini

PHERB STORE ini

NPL STORE ini ud

PPL STORE ini ud

BPL ROOTD begin

nconc rod begin

pconc rod begin

cconc pl

BPL ROOTD begin ud

nconc rod begin ud

pconc rod begin ud

sh biom begin

pconc pl begin

CPL ROOTD ini

NPL ROOTD ini

PPL ROOTD ini

pconc pl begin ud

unit

sh ro opt

PPL SHOOT ini PPL ROOT ini

cconc pl

01d. INITIALISATION 01e INITIALISATION

SOIL

GRAZING

LITTER AND DEAD ROOTS

VEGETATION

- 7 -

BPL SHOOT

CPL SHOOT

NPL SHOOT

cn sh

PPL SHOOT

cp sh

CPLANT

NPLANT ws

PPLANT ws

cconc pl

pconc sh

nconc sh

BPLANT

sr pl

cn pl

cp pl

pconc plws

nconc plws

CPL ROOT

PPL ROOT

BPL ROOT

NPL ROOT

cn ro

cp ro

pconc ro

nconc ro

cconc pl

CPL SHOOTD

CPL ROOTD

NPL SHOOTD

NPL ROOTD

PPL ROOTD

PPL SHOOTD

CHERB

NHERB

PHERB

BPL SHOOTD

BPL ROOTDcconc pl

cn rod

cn shd

cp rod

cp shd

pconc rod

nnonc rod

pconc shd

nconc shd

BHERB

cconc soilom

CSOILOM

NSOILOM

PSOILOM

CHERB S

NHERB S

PHERB S

BSOILOM

cn soilom

cp soilom

BHERB STORE

cn herb

cp herb

pconc soilom

grazing y or n

nconc soilom

cconc herb

pconc herb

nnonc herb

Cherb tot

04. CN, CP ratios and nutrient conc

- 8 -

Nfarmer

Nharv

Nharv s

Ngraz s

NHERB S

cn herb

Charv s

grazing y or n

cn food

Cgraz s

Ngraz

Nleach shd

NmanureNHERB

Charv

Cmanure

cn manure

Nfrag shd

Cgraz

NSOILOM cn shd

Cleach shd Ndeath sh

Nburn a

Nburn s1

NPL SHOOTD

cn sh

sr pl

cn sh

Ntrans

Nretrans shNPL SHOOT

Cdeath shNPL STORE

burnratio

cn sh

burntime

burnfract

Nvol

Nmanure&urine s

NNH4 in

NNH4 out

Cfarmer

cn herb optcn manure

Cmanure s

CHERB S

NNH4 in flow

NNH4 out flow

nnh4 fertNnitrif

Nupt NH4

Ndec

Nleach rod

NNH4

Ndis nitr red

Nurine

rnitr max

mod nitrif

rsoiltemp

n dec

CHERB

Nfrag rod

NNO3 imm

cn rod

Cfrag rod

Cleach rod

nno3imm neg

nretransfr

Ndeath ro

Nupt NO3

Cfrag shd

NNO3

cn ro

NPL ROOTD

Cdeath ro

CPLANT

NPLANT ws

cn plws optnplav

nneed

Nretrans ro

Nremob

NPL ROOT

mod deni

nneed

rdenir max

nremobrate

weeknr

rvolr maxrsoiltemp

NNH4 p y

NNO3 inNNO3 p y

NNO3 in flow

nno3 fert

rsoiltempNdeni

Nburn s

NNO3 out

NNO3 out flow Nburn s1

10. Nitrogen submodel

- 9 -

~ox % u1

mode meas

ox mode

~ox % ud depth z

D

weeknr

b

temp depth eq

depth eq

temp soilC

temp airC

weeknr

a1a0a2

mode hyd

weeknr

~redox u2

~level u1

mod deni

mod nitrif

~mod ass

mod Pads

mod herb s 0 or f 1

redox mode

level mode

ox %

redox

level

wfp fc

surfw

unit

~

ox % u2

~redox u1

~level u2

~redox ud

~level ud

depth

water table hyd

h0

h1

wfp

rsoiltemp

minHl mo

rho25 mo Ha mo

Hl mo

Hh moTl mo

h

cn mo

CSOILOM

rtemp

minHl

temp airK

r rho25

Ha

Hl

HhTl Th

rsoil temp K

Th mo

rsoiltemp

cn crit cp crit

k dr max

cdec maxcp mo

k dr 1 max

cp mo 1

k dr 0 max

mode hyd

mode hyd

ox hyd

redox hyd

wat vgl data

cn mo 0

cn mo 1

cp mo 0

cn mo

k dr max

cp mo

NNO3

NNH4

ndec ul

nno3imm pot

ndec pot

PAVAIL

cn soilom

n dec

pdec ul

pdec pot

c dec

nno3imm neg

cdec potN

cdec potP

cp soilom

p decndec tot

h

05. controlling factors: mode 2

06. controling factors: temperature

07. decomposition/mineralisation/immobilisation

- 13 -

Wprecipitation

~rain mm monthweeknr

pt

Wet

porosity

mode meas

depth~wfp old

volume

wfp

WATER

Winfl

litres from prev unit

~ lit u 1 to 2

unit

~

dif mm month

weeknr

dif litres

cycl managem

c

NNO3 in flow

area

NNO3 from prev unit g

NNO3 conc DIF

Woutfl

NNO3

soilw fixed

soilw freesurfw

wfp fc

soilw out

froff

surfw off

NNO3 out flowpF

vol fraction

frout

NNH4

PAVAIL

NNH4 out flow

PAVAIL out flow

NNH4 from prev unit gNNH4 conc DIF

~

NNH4 from 1 to 2 gcycl managem

PAVAIL from prev unit g

NNH4 in flow

PAVAIL in flow

PAVAIL conc DIF

~

PAVAIL 1 to 2 g

~

NNO3 1 to 2 g unitsoilw out

NNO3 to next unit g

NNH4 to next unit g

area

PAVAIL to next unit g

liters to next unit

frin

08. hydro balance

- 14 -

Pharv s

PHERB S

cp herb

Pfarmer

Pharv

Charv s

grazing y or n Charv

CHERB

Pgraz s

PAVAIL p y

cp herb opt

CHERB S

cp food

Cgraz s

PHERB

Pupt

Pgraz

Pdec

Pleach shd

Pleach rod

Pmanure

Pmanure s

Pburn

Cleach shd

Cfarmer

p dec

burnfract

burntime

Pfrag shd

Pfrag rod

Cfrag shd

Cgraz

PPL SHOOTD

PSOILOM

PPL ROOTD

Cfrag rod

cp sh

cp rod

cp shd

Pdeath sh

Pdeath ro

Cdeath ro

PPL SHOOT

PPL ROOT

Cdeath sh

pretransfr

Ptrans

Pretrans sh

Pretrans ro

Premob

PPL STORE

sr pl

PAVAIL in

PAVAIL out

PAVAIL out flow

PAVAIL in flow

pavail fert

PAVAIL

Padsorb

Preleas

Cleach rod

PADS

pads eq

pads max

WATER

PAVAILkm ads

pconc

surfw

cp ro

CPLANT

PPLANT wspneed

cp plws opt

premobrate

weeknr

11. Phosphorus submodel

- 15 -

Winfl

Ncycle

Nleach rodNleach shd

Ndec

NNO3 imm Nburn s

PAVAIL in flow

pconc win

PPL SHOOTD

PPL ROOTD

NPL SHOOT

NPL ROOT

NPL STORE

NPL ROOTD

NPL SHOOTD

Pcycle

Pleach shd Pburn

Pleach rod

Pdec

nconc win

NNH4 in flowNNO3 in flow

NNO3

NNH4

Ninorg tot

Ppl totPHERB

PHERB SPpld totPherb tot

NHERB S

NHERB

NSOILOM

Nsoil tot

Npld totNherb tot

Npl tot

Nsystem tot

nplav

WoutflPAVAIL out flow

pconc wout

PPL STORE

PPL SHOOT

PPL ROOT

nconc wout

NNH4 out flowNNO3 out flow

Psoil tot

Psystem tot

PSOILOM

PAVAIL

PADS

cycling 02. Total N

water purification ?

03. Total P

- 19 -

Project no. GOCE-CT-2003-505540

Project acronym: Euro-limpacs

Project full name: Integrated Project to evaluate the Impacts of Global Change on

European Freshwater Ecosystems

Instrument type: Integrated Project

Priority name: Sustainable Development

Deliverable No. 53

Specification of wetland productivity model

B. Equations in STELLA 6.0 model

Due date of deliverable: Month 18

Actual submission date: Month 12

Start date of project: 1 February 2004 Duration: 5 Years

Organisation name of lead contractor for this deliverable: UU-Bio

Project co-funded by the European Commission within the Sixth Framework Programme (2002-2006)

Dissemination Level (tick appropriate box)

PU Public PU

PP Restricted to other programme participants (including the Commission Services)

RE Restricted to a group specified by the consortium (including the Commission Services)

CO Confidential, only for members of the consortium (including the Commission Services)

01a. INITIALISATION, parameters

a0 = if site=1 then 9.840757 else if site=2 then 12 else 9.840757

a1 = if site=1 then 5.479941 else if site=2 then 6 else 5.479941

a2 = if site=1 then 34.886267 else if site=2 then 40 else 34.886267

area = if unit=1 then 130*360 else if unit=2 then 130*70 else if unit=3 then 182698.4 else 130*360

bulkdens = if unit=0 then bulkdens_ud else (if unit=1 then 0.47 else if unit=2 then 0.77 else if unit=3 then 0.96

else 0.47)

bulkdens_ud = .47

burnfract = if unit=0 then burningfract_ud else if unit=1 then 0*0.8 else if unit=2 then 0.0 else if unit=3 then

0.0 else 0.0

burningfract_ud = 0.8

burntime = IF unit=1 THEN pulse(1,56,156) ELSE pulse(1,56,156)

cn_mo_0 = if unit=1 then 4.5 else if unit=2 then 17 else if unit=3 then 10 else 10

cn_mo_1 = if unit=1 then 3.5 else if unit=2 then 6.25 else if unit=3 then 5 else 5

cp_mo_0 = if unit=1 then 110 else if unit=2 then 110 else if unit=3 then 110 else 110

cp_mo_1 = if unit=1 then 80 else if unit=2 then 60 else if unit=3 then 60 else 60

depth = if unit=0 then depth_ud else if unit=1 then 0.2 else if unit=2 then 0.2 else if unit=3 then 0.2 else

depth_ud

depth_ud = 0.2

fert_nnh4 = 0

fert_nno3 = 0

fert_pavail = 0

fert_week = 0

frin = if unit=1 then 0.01 else 1

froff = if unit=1 then 1 else if unit=2 then 0.95 else if unit=3 then 0.8 else 1

frout = if unit=1 then 0.2 else if unit=2 then 0.95 ELSE IF unit=3 then 0.2 else 0.2

h0 = if unit=1 then 0.1 else if unit=2 then 0.1 else if unit=3 then 0.1 else 0.1

h1 = if unit=1 then 0.5 else if unit=2 then 0.5 else if unit=3 then 0.5 else 0.5

km_ads = if unit=0 then km_ads_ud else (if unit=1 then 12.47 else if unit=2 then 6.09 else if unit=3 then 3.06

else 12.47)

km_ads_ud = 10.95

nnh4_fert = if (int(weeknr)=int(fert_week)) then fert_nnh4 else 0

NNH4_p_y = if site=1 then 0.4 else if site=2 then 0.6 else if site=3 then 0.4 else 0.4

nno3_fert = if (int(weeknr)=int(fert_week)) then fert_nno3 else 0

NNO3_p_y = if site=1 then 0.4 else if site=2 then 0.6 else if site=3 then 0.4 else 0.4

orgmat% = if unit=0 then orgmat%_ud else if unit=1 then 23.1 else if unit=2 then 14.4 else if unit=3 then 9.54

else orgmat%_ud

orgmat%_ud = 23.1

pads_max = pads_maxdw*bulkdens*depth

pads_maxdw = if unit=0 then pads_maxdw_ud else (if unit=1 then 1299 else if unit=2 then 1172 else if unit=3

then 1325 else 1299)

pads_maxdw_ud = 1334

pavail_fert = if (int(weeknr)=int(fert_week)) then fert_pavail else 0

PAVAIL_p_y = if site=1 then 0.01 else if site=2 then 0.01 else if site=3 then 0.01 else 0.01

- 1 -

porosity = if unit=1 then 0.8 else if unit=2 then 0.7 else if unit=3 then 0.58 else 0.8

site = if unit=0 then site_ud else if unit=1 then 1 else if unit=2 then 1 else if unit=3 then 2 else site_ud

site_ud = 1

unit = if (unit_user<0.5) then 0 else (if (unit_user>=0.5 and unit_user<1.5) then 1 else ( if (unit_user>=1.5 and

unit_user<2.5) then 2 else (if (unit_user>=2.5 and unit_user < 3.5) then 3 else 1 )))

unit_user = 1

weeknr = mod((time-1),52)+1

01b. INITIALISATION, parameters

biomass_per_animal = if herbivore_species = 1 then 800 else

(if herbivore_species = 2 then 60 else 0)

cconc_herb = if herbivore_species=1 then 0.091 else 0.091

cconc_pl = if vegetation_type<10 then 0.45 else 0.45

cn_herb_opt = cconc_herb/nconc_herb_opt

cn_manure = if herbivore_species=1 then 40 else 40

cn_plws_opt = cconc_pl/nconc_plws_opt

cp_herb_opt = cconc_herb/pconc_herb_opt

cp_plws_opt = cconc_pl/pconc_plws_opt

grazing_y_or_n = if number_herb_per_ha = 0 then 0 else 1

harv_level = exp(net_rgr_herb*(harv_week-53))*herb_C_per_m2_begin

harv_week = if herbivore_species=1 then 40 else 40

herbivore_species = if unit=0 then herbivore_species_ud else if unit=1 then 1 else if unit=2 then 1 else

herbivore_species_ud

herbivore_species_ud = 1

kmN = nmin+(nconc_plws_opt-nmin)/9

kmP = pmin+(pconc_plws_opt-pmin)/9

k_dr_0_max = ( if vegetation_type=1 then 0.77*0.0001 else if vegetation_type=2 then 0.77*0.0005 else if

vegetation_type=3 then 0.77* 0.0005 else 0.77*0.001)/0.20558

k_dr_1_max = ( if vegetation_type=1 then 0.77* 0.001 else if vegetation_type=2 then 0.77*0.005 else if

vegetation_type=3 then 0.77*0.0005 else 0.77*0.006)/0.20558

nconc_herb_opt = if herbivore_species=1 then 0.024 else 0.024

nconc_plws_opt = if vegetation_type=1then 0.030 else if vegetation_type=2 then 0.030 else if

vegetation_type=3 then 0.030 else 0.030

net_rgr_herb = rcr_herb*(1-rmpr-upt_ineff)-rrr_herb

nmin = 0.0016

nretransfr = if vegetation_type=1 then 0.4 else if vegetation_type=2 then 0.2 else if vegetation_type=3 then 0.3

else 0.4

number_herb_per_ha = if unit=0 then number_herb_per_ha_ud else if unit=1 then 0.3 else if unit=2 then 0.3

else if unit=3 then 0.6 else number_herb_per_ha_ud

number_herb_per_ha_ud = 0.3

pconc_herb_opt = if herbivore_species=1 then 0.00575 else 0.00575

pconc_plws_opt = if vegetation_type=1 then 0.0015 else if vegetation_type = 2 then 0.002 else if

vegetation_type=3 then 0.0015 else 0.0015

pmin = 0.00008

- 2 -

pretransfr = if vegetation_type=1 then 0.77 else if vegetation_type=2 then 0.2 else if vegetation_type=3 then

0.3 else 0.6

rcr_herb = if herbivore_species=1 then 0.1135 else 0.1135

rdr_ro_max = if vegetation_type=1 then 0.01 else if vegetation_type=2 then 0.1 else if vegetation_type=3 then

0.0005 else 0.1

rdr_sh_max = if vegetation_type=1 then 0.04 else if vegetation_type=2 then 0.1 else if vegetation_type=3 then

0.0005 else 0.1

rfr_rod_max = if vegetation_type=1 then 0.0012/0.20558 else if vegetation_type=2 then 0.08/0.20558 else if

vegetation_type=3 then 0.0005/0.20558 else 0.02/0.20558

rfr_shd_max = if vegetation_type=1 then 0.0004/0.20743 else if vegetation_type=2 then 0.04/0.20743 else if

vegetation_type=3 then 0.0005/0.20743 else 0.02/0.20743

rgr_max = if vegetation_type=1 then 1.7*0.81 else if vegetation_type=2 then 5.5*0.81 else if

vegetation_type=3 then 3*0.81 else 5*0.81

rmpr = if herbivore_species=1 then 0.0787665 else 0.0787665

rrr_herb = if herbivore_species=1 then 0.03565 else 0.03565

rrr_ro_max = if vegetation_type=1 then 0.01/0.20558 else if vegetation_type=2 then 0.07/0.20558 else if

vegetation_type=3 then 0.0005/0.20558 else 0.07

rrr_sh_max = if vegetation_type=1 then 0.1/0.20743 else if vegetation_type=2 then 0.15/0.20743 else if

vegetation_type=3 then 0.0005/0.207 else 0.15/0.20743

sh_max = if vegetation_type=1 then 300 else if vegetation_type=2 then 1000 else if vegetation_type=3 then

600 else 1000

sh_ro_opt = if vegetation_type=1 then sh_ro_ratio_opt_vt1 else if vegetation_type=2 then sh_ro_ratio_opt_vt2

else if vegetation_type=3 then sh_ro_ratio_opt_vt3 else if vegetation_type=4 then sh_ro_ratio_opt_vt4 else

sh_ro_ratio_opt_vt1

upt_ineff = if herbivore_species=1 then 0.55 else 0.55

vegetation_type = if unit=0 then vegetation_type_ud else if unit=1 then 1 else if unit=2 then 2 else if unit=3

then 3 else vegetation_type_ud

vegetation_type_ud = 1

sh_ro_ratio_opt_vt1 = GRAPH(weeknr)

(1.00, 0.065), (2.00, 0.065), (3.00, 0.065), (4.00, 0.067), (5.00, 0.07), (6.00, 0.07), (7.00, 0.07), (8.00, 0.07),

(9.00, 0.07), (10.0, 0.07), (11.0, 0.075), (12.0, 0.08), (13.0, 0.09), (14.0, 0.095), (15.0, 0.1), (16.0, 0.105), (17.0,

0.115), (18.0, 0.12), (19.0, 0.13), (20.0, 0.145), (21.0, 0.155), (22.0, 0.175), (23.0, 0.21), (24.0, 0.25), (25.0,

0.295), (26.0, 0.335), (27.0, 0.375), (28.0, 0.405), (29.0, 0.44), (30.0, 0.46), (31.0, 0.47), (32.0, 0.47), (33.0,

0.47), (34.0, 0.465), (35.0, 0.455), (36.0, 0.44), (37.0, 0.41), (38.0, 0.375), (39.0, 0.335), (40.0, 0.285), (41.0,

0.235), (42.0, 0.185), (43.0, 0.145), (44.0, 0.12), (45.0, 0.1), (46.0, 0.09), (47.0, 0.08), (48.0, 0.075), (49.0,

0.065), (50.0, 0.065), (51.0, 0.065), (52.0, 0.065), (53.0, 0.065)

sh_ro_ratio_opt_vt2 = GRAPH(weeknr)

(1.00, 0.54), (2.00, 0.57), (3.00, 0.57), (4.00, 0.57), (5.00, 0.56), (6.00, 0.55), (7.00, 0.56), (8.00, 0.57), (9.00,

0.57), (10.0, 0.6), (11.0, 0.61), (12.0, 0.65), (13.0, 0.7), (14.0, 0.75), (15.0, 0.8), (16.0, 0.85), (17.0, 0.9), (18.0,

0.96), (19.0, 1.11), (20.0, 1.26), (21.0, 1.40), (22.0, 1.51), (23.0, 1.62), (24.0, 1.71), (25.0, 1.77), (26.0, 1.77),

(27.0, 1.77), (28.0, 1.81), (29.0, 1.80), (30.0, 1.78), (31.0, 1.78), (32.0, 1.78), (33.0, 1.77), (34.0, 1.74), (35.0,

1.70), (36.0, 1.62), (37.0, 1.52), (38.0, 1.41), (39.0, 1.25), (40.0, 1.15), (41.0, 1.02), (42.0, 0.88), (43.0, 0.79),

(44.0, 0.69), (45.0, 0.62), (46.0, 0.59), (47.0, 0.57), (48.0, 0.56), (49.0, 0.55), (50.0, 0.55), (51.0, 0.55), (52.0,

0.54), (53.0, 0.54)

- 3 -

sh_ro_ratio_opt_vt3 = GRAPH(weeknr)

(1.00, 0.065), (2.00, 0.065), (3.00, 0.065), (4.00, 0.067), (5.00, 0.07), (6.00, 0.07), (7.00, 0.07), (8.00, 0.07),

(9.00, 0.07), (10.0, 0.07), (11.0, 0.075), (12.0, 0.08), (13.0, 0.09), (14.0, 0.095), (15.0, 0.1), (16.0, 0.105), (17.0,

0.115), (18.0, 0.12), (19.0, 0.13), (20.0, 0.145), (21.0, 0.155), (22.0, 0.175), (23.0, 0.21), (24.0, 0.25), (25.0,

0.295), (26.0, 0.335), (27.0, 0.375), (28.0, 0.405), (29.0, 0.44), (30.0, 0.46), (31.0, 0.47), (32.0, 0.47), (33.0,

0.47), (34.0, 0.465), (35.0, 0.455), (36.0, 0.44), (37.0, 0.41), (38.0, 0.375), (39.0, 0.335), (40.0, 0.285), (41.0,

0.235), (42.0, 0.185), (43.0, 0.145), (44.0, 0.12), (45.0, 0.1), (46.0, 0.09), (47.0, 0.08), (48.0, 0.075), (49.0,

0.065), (50.0, 0.065), (51.0, 0.065), (52.0, 0.065), (53.0, 0.065)

sh_ro_ratio_opt_vt4 = GRAPH(weeknr)

(1.00, 0.065), (2.00, 0.065), (3.00, 0.065), (4.00, 0.067), (5.00, 0.07), (6.00, 0.07), (7.00, 0.07), (8.00, 0.07),

(9.00, 0.07), (10.0, 0.07), (11.0, 0.075), (12.0, 0.08), (13.0, 0.09), (14.0, 0.095), (15.0, 0.1), (16.0, 0.105), (17.0,

0.115), (18.0, 0.12), (19.0, 0.13), (20.0, 0.145), (21.0, 0.155), (22.0, 0.175), (23.0, 0.21), (24.0, 0.25), (25.0,

0.295), (26.0, 0.335), (27.0, 0.375), (28.0, 0.405), (29.0, 0.44), (30.0, 0.46), (31.0, 0.47), (32.0, 0.47), (33.0,

0.47), (34.0, 0.465), (35.0, 0.455), (36.0, 0.44), (37.0, 0.41), (38.0, 0.375), (39.0, 0.335), (40.0, 0.285), (41.0,

0.235), (42.0, 0.185), (43.0, 0.145), (44.0, 0.12), (45.0, 0.1), (46.0, 0.09), (47.0, 0.08), (48.0, 0.075), (49.0,

0.065), (50.0, 0.065), (51.0, 0.065), (52.0, 0.065), (53.0, 0.065)

01d. INITIALISATION

BPL_ROOTD_begin = if unit=0 then BPL_ROOTD_begin_ud else if unit=1 then 4000/2 else if unit=2 then

600/2 else if unit=3 then 100 else BPL_ROOTD_begin_ud

BPL_ROOTD_begin_ud = 4000/2

BPL_SHOOTD_begin_ud = 250

cconc_om_ud = 0.53

cconc_soilom = if unit=0 then cconc_om_ud else 0.53

CPL_ROOTD_ini = BPL_ROOTD_begin*cconc_pl

CPL_SHOOTD_ini = shd_biomass_begin*cconc_pl

CSOILOM_ini = soilom_begin*cconc_soilom*depth*10

nconc_om_begin = if unit=0 then nconc_om_begin_ud else if unit=1 then 0.02858 else if unit=2 then 0.03714

else if unit=3 then 0.03466 else nconc_om_begin_ud

nconc_om_begin_ud = 0.0259

nconc_rod_begin = if unit=0 then nconc_rod_begin_ud else if unit=1 then 0.00796 else if unit=2 then 0.01293

else if unit=3 then 0.012 else nconc_rod_begin_ud

nconc_rod_begin_ud = 0.00747

nconc_shd_begin = if unit=0 then nconc_shd_begin_ud else if unit=1 then 0.00796 else if unit=2 then 0.01293

else if unit=3 then 0.012 else nconc_shd_begin_ud

nconc_shd_begin_ud = 0.00796

NNH4_begin = if unit=0 then NNH4_begin_ud else if unit=1 then 1.01 else if unit=2 then 1.27 else if unit=3

then 1 else NNH4_begin_ud

NNH4_begin_ud = 1.01

NNH4_ini = (0.8*NNH4_begin + (0.2*NNH4_begin+0.8*NNO3_begin)*(1-mode_hyd))*depth*10

NNO3_begin = if unit=0 then NNO3_begin_ud else if unit=1 then 0.000 else if unit=2 then 0.032 else if unit=3

then 0.05 else NNO3_begin_ud

NNO3_begin_ud = .000

NNO3_ini = (0.2*NNO3_begin + (0.2*NNH4_begin+0.8*NNO3_begin)*mode_hyd)*depth*10

NPL_ROOTD_ini = nconc_rod_begin*BPL_ROOTD_begin

- 4 -

NPL_SHOOTD_ini = nconc_shd_begin*shd_biomass_begin

NSOILOM_ini = nconc_om_begin*soilom_begin*depth*10

PADS_begin = if unit=0 then PADS_begin_ud else if unit=1 then 6.56 else if unit=2 then 16.87 else if unit=3

then 81.06 else PADS_begin_ud

PADS_begin_ud = 5.04

PADS_ini = PADS_begin*depth*10

PAVAIL_begin = if unit=0 then PAVAIL_begin_ud else if unit=1 then 0.0768 else if unit=2 then 0.0606 else if

unit=3 then 1.216 else PAVAIL_begin_ud

PAVAIL_begin_ud = 0.0768

PAVAIL_ini = PAVAIL_begin*depth*10

pconc_om_begin = if unit=0 then pconc_om_begin_ud else if unit=1 then 0.001328 else if unit=2 then

0.004325 else if unit=3 then 0.004330 else pconc_om_begin_ud

pconc_om_begin_ud = 0.53/567

pconc_rod_begin = if unit=0 then pconc_rod_begin_ud else if unit=1 then 0.00034 else if unit=2 then 0.00124

else if unit=3 then 0.0015 else pconc_rod_begin_ud

pconc_rod_begin_ud = 0.00031

pconc_shd_begin = if unit=0 then pconc_shd_begin_ud else if unit =1 then 0.00034 else if unit=2 then 0.00124

else if unit=3 then 0.0015 else pconc_shd_begin_ud

pconc_shd_begin_ud = 0.00034

PPL_ROOTD_ini = pconc_rod_begin*BPL_ROOTD_begin

PPL_SHOOTD_ini = pconc_shd_begin*shd_biomass_begin

PSOILOM_ini = pconc_om_begin*soilom_begin*depth*10

shd_biomass_begin = if unit=0 then BPL_SHOOTD_begin_ud else if unit=1 then 250 else if unit=2 then 1145

else if unit=3 then 60 else BPL_SHOOTD_begin_ud

soilom_begin = bulkdens*orgmat%*1000

01e INITIALISATION

CHERB_ini = mod_herb_s_0_or_f_1*herb_C_per_m2_begin

CHERB_STORE_ini = (1-mod_herb_s_0_or_f_1)*herb_C_per_m2_begin

CPL_ROOT_ini = CPL_SHOOT_ini/sh_ro_opt

CPL_SHOOT_ini = sh_biom_begin*cconc_pl

herb_C_per_m2_begin = number_herb_per_ha * biomass_per_animal * cconc_herb / 10

nconc_pl_begin = if unit=0 then nconc_pl_begin_ud else if unit=1 then 0.01111 else if unit=2 then 0.01774

else if unit=3 then 0.035 else nconc_pl_begin_ud

nconc_pl_begin_ud = 0.01111

NHERB_ini = CHERB_ini/cn_herb_opt

NHERB_STORE_ini = CHERB_STORE_ini/cn_herb_opt

NPL_ROOT_ini = NPL_SHOOT_ini/sh_ro_opt

NPL_SHOOT_ini = nconc_pl_begin*sh_biom_begin

NPL_STORE_ini = if unit=0 then NPL_STORE_ini_ud else if unit=1 then 0.5 else if unit=2 then 1.0 else if

unit=3 then 1.0 else NPL_STORE_ini_ud

NPL_STORE_ini_ud = 0.5

pconc_pl_begin = if unit=0 then pconc_pl_begin_ud else if unit=1 then 0.00081 else if unit=2 then 0.00165

else if unit=3 then 0.0024 else pconc_pl_begin_ud

pconc_pl_begin_ud = 0.00081

- 5 -

PHERB_ini = CHERB_ini/cp_herb_opt

PHERB_STORE_ini = CHERB_STORE_ini/cp_herb_opt

PPL_ROOT_ini = PPL_SHOOT_ini/sh_ro_opt

PPL_SHOOT_ini = pconc_pl_begin*sh_biom_begin

PPL_STORE_ini = if unit=0 then PPL_STORE_ini_ud else if unit=1 then 0.2 else if unit=2 then 0.8 else if

unit=3 then 0.8 else PPL_STORE_ini_ud

PPL_STORE_ini_ud = 0.2

sh_biom_begin = if unit=0 then sh_biom_begin_ud else if unit=1 then 60 else if unit=2 then 310 else if unit=3

then 60 else sh_biom_begin_ud

sh_biom_begin_ud = 60

02. Total N

Nherb_tot = NHERB+NHERB_S

Ninorg_tot = NNH4+NNO3

nplav = (NNH4-0.001)+(NNO3-0.001)

Npld_tot = NPL_SHOOTD+NPL_ROOTD

Npl_tot = NPL_SHOOT+NPL_ROOT+NPL_STORE

Nsoil_tot = Ninorg_tot+NSOILOM

Nsystem_tot = Npl_tot+Nherb_tot+Nsoil_tot+Npld_tot

03. Total P

Pherb_tot = PHERB+PHERB_S

Ppld_tot = PPL_ROOTD+PPL_SHOOTD

Ppl_tot = PPL_ROOT+PPL_SHOOT+PPL_STORE

Psoil_tot = PSOILOM+PADS+PAVAIL

Psystem_tot = Ppld_tot+Pherb_tot+Ppl_tot+Psoil_tot

04. CN, CP ratios and nutrient conc

BHERB = CHERB/cconc_herb

BHERB_STORE = CHERB_S/cconc_herb

BPLANT = BPL_SHOOT+BPL_ROOT

BPL_ROOT = CPL_ROOT/cconc_pl

BPL_ROOTD = CPL_ROOTD/cconc_pl

BPL_SHOOT = CPL_SHOOT/cconc_pl

BPL_SHOOTD = CPL_SHOOTD/cconc_pl

BSOILOM = CSOILOM/cconc_soilom

Cherb_tot = CHERB+CHERB_S

cn_herb = if (grazing_y_or_n = 1) then (CHERB+CHERB_S)/(NHERB+NHERB_S) else 0

cn_pl = CPLANT/NPLANT_ws

cn_ro = CPL_ROOT/NPL_ROOT

cn_rod = CPL_ROOTD/NPL_ROOTD

cn_sh = CPL_SHOOT/NPL_SHOOT

cn_shd = CPL_SHOOTD/NPL_SHOOTD

cn_soilom = CSOILOM/NSOILOM

CPLANT = CPL_SHOOT+CPL_ROOT

- 6 -

cp_herb = if (grazing_y_or_n = 1) then (CHERB+CHERB_S)/(PHERB+PHERB_S) else 0

cp_pl = CPLANT/PPLANT_ws

cp_ro = CPL_ROOT/PPL_ROOT

cp_rod = CPL_ROOTD/PPL_ROOTD

cp_sh = CPL_SHOOT/PPL_SHOOT

cp_shd = CPL_SHOOTD/PPL_SHOOTD

cp_soilom = CSOILOM/PSOILOM

nconc_plws = NPLANT_ws/BPLANT

nconc_ro = NPL_ROOT/BPL_ROOT

nconc_sh = NPL_SHOOT/BPL_SHOOT

nconc_shd = NPL_SHOOTD/BPL_SHOOTD

nconc_soilom = NSOILOM/BSOILOM

nnonc_herb = if grazing_y_or_n = 1

then (NHERB + NHERB_S) / (BHERB + BHERB_STORE)

else 0

nnonc_rod = NPL_ROOTD/BPL_ROOTD

NPLANT_ws = NPL_SHOOT+NPL_ROOT

pconc_herb = if grazing_y_or_n = 1

then (PHERB+PHERB_S)/(BHERB+BHERB_STORE)

else 0

pconc_plws = PPLANT_ws/BPLANT

pconc_ro = PPL_ROOT/BPL_ROOT

pconc_rod = PPL_ROOTD/BPL_ROOTD

pconc_sh = PPL_SHOOT/BPL_SHOOT

pconc_shd = PPL_SHOOTD/BPL_SHOOTD

pconc_soilom = PSOILOM/BSOILOM

PPLANT_ws = PPL_SHOOT+PPL_ROOT

sr_pl = CPL_SHOOT/CPL_ROOT

05. controlling factors: mode 2

cn_mo = 1/(1/cn_mo_0+(1/cn_mo_1-1/cn_mo_0)*mode_hyd)

cp_mo = 1/(1/cp_mo_0+(1/cp_mo_1-1/cp_mo_0)*mode_hyd)

h = h0+(h1-h0)*mode_hyd

k_dr_max = k_dr_0_max+(k_dr_1_max-k_dr_0_max)*mode_hyd

level = if unit=0 then level_ud else if unit=1 then level_u1 else level_u2

level_mode = if (level<-15) then 1 else level/-15

mode_hyd = min(1,max(0, ((1-wfp)/(1-wfp_fc))))

mode_meas = (level_mode+0.5*delay(level_mode,1)+0.5*delay(level_mode,2)+ ox_mode+redox_mode)/4

mod_deni = 1-mode_hyd

mod_herb_s_0_or_f_1 = if weeknr<43 and weeknr>19 then

( if (mode_hyd>0.6) then 1 else 0 ) else 0

mod_nitrif = mode_hyd

mod_Pads = (1.2-mode_hyd)/1.2

ox_% = if unit=0 then ox_%_ud else (if unit=1 then ox_%_u1 else ox_%_u2)

ox_hyd = mode_hyd*14 +4

- 7 -

ox_mode = if (ox_%>18) then 1 else if ox_%<4 then 0 else (ox_%-4)/14

redox = if unit=0 then redox_ud else if unit=1 then redox_u1 else redox_u2

redox_hyd = -38.57+14.52*ox_hyd

redox_mode = if redox<20 then 0 else (if redox>223 then 1 else (redox-20)/203)

water_table_hyd = if surfw>0 then surfw/-1000 else depth*mode_hyd

wat_vgl_data = water_table_hyd*-100

level_u1 = GRAPH(weeknr)

(1.00, 0.00), (3.08, 0.00), (5.16, 0.00), (7.24, -0.3), (9.32, 0.00), (11.4, -0.5), (13.5, 0.00), (15.6, -0.8), (17.6,

-0.5), (19.7, -14.5), (21.8, -21.0), (23.9, -16.0), (26.0, -20.4), (28.0, -33.0), (30.1, -8.50), (32.2, -8.00), (34.3,

-11.2), (36.4, -8.50), (38.4, -2.80), (40.5, -2.50), (42.6, -1.30), (44.7, -1.30), (46.8, -0.3), (48.8, -0.3), (50.9,

-0.8), (53.0, 0.00)

level_u2 = GRAPH(weeknr)

(1.00, -15.5), (3.08, -27.0), (5.16, -45.0), (7.24, -33.0), (9.32, -26.0), (11.4, -50.0), (13.5, -40.0), (15.6, -31.5),

(17.6, -23.0), (19.7, -57.5), (21.8, -72.5), (23.9, -69.0), (26.0, -50.0), (28.0, -36.0), (30.1, -36.5), (32.2, -39.0),

(34.3, -55.0), (36.4, -6.00), (38.4, -20.5), (40.5, -33.0), (42.6, -24.0), (44.7, -5.00), (46.8, -2.50), (48.8, -20.5),

(50.9, -10.5), (53.0, -15.5)

level_ud = GRAPH(weeknr)

(1.00, 0.00), (3.08, 0.00), (5.16, 0.00), (7.24, -0.3), (9.32, 0.00), (11.4, -0.5), (13.5, 0.00), (15.6, -0.8), (17.6,

-0.5), (19.7, -14.5), (21.8, -21.0), (23.9, -16.0), (26.0, -20.4), (28.0, -33.0), (30.1, -8.50), (32.2, -8.00), (34.3,

-11.2), (36.4, -8.50), (38.4, -2.80), (40.5, -2.50), (42.6, -1.30), (44.7, -1.30), (46.8, -0.3), (48.8, -0.3), (50.9,

-0.8), (53.0, 0.00)

mod_ass = GRAPH(mode_hyd)

(0.00, 0.8), (0.1, 0.82), (0.2, 0.84), (0.3, 0.86), (0.4, 0.88), (0.5, 0.9), (0.6, 0.92), (0.7, 0.94), (0.8, 0.96), (0.9,

0.98), (1, 1.00)

ox_%_u1 = GRAPH(weeknr)

(1.00, 4.40), (3.08, 3.00), (5.16, 5.80), (7.24, 4.10), (9.32, 4.70), (11.4, 10.9), (13.5, 11.0), (15.6, 11.3), (17.6,

7.40), (19.7, 8.90), (21.8, 17.0), (23.9, 15.9), (26.0, 20.1), (28.0, 20.3), (30.1, 17.6), (32.2, 8.80), (34.3, 14.6),

(36.4, 16.7), (38.4, 14.8), (40.5, 9.60), (42.6, 8.60), (44.7, 7.00), (46.8, 3.80), (48.8, 3.40), (50.9, 4.50), (53.0,

4.40)

ox_%_u2 = GRAPH(weeknr)

(1.00, 20.5), (3.08, 18.9), (5.16, 20.1), (7.24, 19.4), (9.32, 19.6), (11.4, 19.0), (13.5, 17.7), (15.6, 19.1), (17.6,

16.3), (19.7, 18.2), (21.8, 18.6), (23.9, 19.6), (26.0, 18.9), (28.0, 20.5), (30.1, 19.5), (32.2, 16.8), (34.3, 19.0),

(36.4, 14.1), (38.4, 18.8), (40.5, 17.3), (42.6, 19.2), (44.7, 15.9), (46.8, 17.8), (48.8, 9.40), (50.9, 18.6), (53.0,

20.5)

ox_%_ud = GRAPH(weeknr)

(1.00, 4.40), (3.08, 3.00), (5.16, 5.80), (7.24, 4.10), (9.32, 4.70), (11.4, 10.9), (13.5, 11.0), (15.6, 11.3), (17.6,

7.40), (19.7, 8.90), (21.8, 17.0), (23.9, 15.9), (26.0, 20.1), (28.0, 20.3), (30.1, 17.6), (32.2, 8.80), (34.3, 14.6),

(36.4, 16.7), (38.4, 14.8), (40.5, 9.60), (42.6, 8.60), (44.7, 7.00), (46.8, 3.80), (48.8, 3.40), (50.9, 4.50), (53.0,

4.40)

redox_u1 = GRAPH(weeknr)

(1.00, -25.0), (3.08, 5.00), (5.16, 59.0), (7.24, -84.0), (9.32, -136), (11.4, -66.0), (13.5, 18.0), (15.6, -299),

(17.6, -83.0), (19.7, 27.0), (21.8, -3.00), (23.9, -63.0), (26.0, 35.0), (28.0, 121), (30.1, 115), (32.2, -71.0), (34.3,

0.00), (36.4, 145), (38.4, -9.00), (40.5, 36.0), (42.6, -55.0), (44.7, 28.0), (46.8, 18.0), (48.8, 0.00), (50.9, -21.0),

(53.0, -25.0)

- 8 -

redox_u2 = GRAPH(weeknr)

(1.00, 257), (3.08, 228), (5.16, 305), (7.24, 206), (9.32, 209), (11.4, 327), (13.5, 395), (15.6, 468), (17.6, 254),

(19.7, 344), (21.8, 251), (23.9, 289), (26.0, 177), (28.0, 197), (30.1, 379), (32.2, 280), (34.3, 469), (36.4, 358),

(38.4, 181), (40.5, 387), (42.6, 142), (44.7, 60.0), (46.8, -5.00), (48.8, 198), (50.9, 149), (53.0, 257)

redox_ud = GRAPH(weeknr)

(1.00, -25.0), (3.08, 5.00), (5.16, 59.0), (7.24, -84.0), (9.32, -136), (11.4, -66.0), (13.5, 18.0), (15.6, -299),

(17.6, -83.0), (19.7, 27.0), (21.8, -3.00), (23.9, -63.0), (26.0, 35.0), (28.0, 121), (30.1, 115), (32.2, -71.0), (34.3,

0.00), (36.4, 145), (38.4, -9.00), (40.5, 36.0), (42.6, -55.0), (44.7, 28.0), (46.8, 18.0), (48.8, 0.00), (50.9, -21.0),

(53.0, -25.0)

06. controling factors: temperature

b = 1/D

D = 2.5

depth_eq = 100

depth_z = 0.20

Ha = 6476

Ha_mo = 6476

Hh = 68584

Hh_mo = 68584

Hl = -1*minHl

Hl_mo = -1*minHl_mo

minHl = 343181

minHl_mo = 343181

r = 1.987

rho25 = 0.79

rho25_mo = 0.79

rsoiltemp =

rho25_mo*soil_temp_K/298*10^(Ha_mo/r*(1/298-1/soil_temp_K))/(1+(10^(Hl_mo/r*(1/Tl_mo-1/soil_temp_

K)))+(10^(Hh_mo/r*(1/Th_mo-1/soil_temp_K))))

rtemp =

rho25*temp_airK/298*10^(Ha/r*(1/298-1/temp_airK))/(1+(10^(Hl/r*(1/Tl-1/temp_airK)))+(10^(Hh/r*(1/Th-1

/temp_airK))))

soil_temp_K = temp_soilC+273

temp_airC = a0+a1*SIN(2*PI/52*(weeknr+a2))

temp_airK = temp_airC+273

temp_depth_eq = 12

temp_soilC = a0+a1*2.7182818^(-b*depth_z)*SIN(2*PI/52*(weeknr+a2)-b*depth_z)+

(temp_depth_eq-a0)*depth_z/depth_eq

Th = 304

Th_mo = 304

Tl = 273

Tl_mo = 273

07. decomposition/mineralisation/immobilisation

cdec_max = rsoiltemp*k_dr_max*CSOILOM

- 9 -

cdec_potN = (ndec_pot+nno3imm_pot)*(1-h)/(1/cn_soilom-1/cn_crit)

cdec_potP = pdec_pot*(1-h)/(1/cp_soilom-1/cp_crit)

cn_crit = cn_mo/h

cp_crit = cp_mo/h

c_dec = min(cdec_potN,cdec_potP)

ndec_pot = if (ndec_ul>=0) then ndec_ul else (if (NNH4-0.001<=0) then 0 else max(-1*(NNH4-0.001),

ndec_ul) )

ndec_tot = (1/cn_soilom-1/cn_crit)*c_dec/(1-h)

ndec_ul = (1/cn_soilom-1/cn_crit)*cdec_max/(1-h)

nno3imm_neg = if (ndec_tot>=0 or (NNO3-0.0005<=0 or n_dec>=ndec_tot)) then 0 else

(max(-1*(NNO3-0.0005) , ndec_tot - n_dec))

nno3imm_pot = if (ndec_ul >= 0 or (NNO3-0.0005<=0 or ndec_pot<=ndec_ul)) then 0 else max (

-1*(NNO3-0.0005) , (ndec_ul - ndec_pot) )

n_dec = if ndec_tot >=0 then ndec_tot else ( if NNH4-0.001<=0 then 0 else max(-1*(NNH4-0.001) , ndec_tot)

)

pdec_pot = if pdec_ul>=0

then pdec_ul

else ( if PAVAIL-0.0001<=0

then 0

else max(-1*(PAVAIL-0.0001),pdec_ul)

)

pdec_ul = (1/cp_soilom-1/cp_crit)*cdec_max/(1-h)

p_dec = (1/cp_soilom-1/cp_crit)*c_dec/(1-h)

08. hydro balance

WATER(t) = WATER(t - dt) + (Winfl + Wprecipitation - Woutfl - Wet) * dt

INIT WATER = if unit=1 then porosity*volume else if unit=2 then 0.75*porosity*volume else

porosity*volume

INFLOWS:

Winfl = litres_from_prev_unit/area

Wprecipitation = (rain_mm_month*12/52)

OUTFLOWS:

Woutfl = soilw_out+surfw_off

Wet = if pF>4.2 then 0 else (0.73*pt+0.16*7)

c = 49.87

cycl_managem = mod((time-1),156)+1

dif_litres = dif_mm_month*12/52*area

liters_to_next_unit = max (0 , Woutfl * frin * area)

litres_from_prev_unit = if unit=1 then dif_litres else

if unit=2 then lit_u_1_to_2 else

dif_litres

NNH4_conc_DIF = .000231

NNH4_from_prev_unit_g = if unit=1 then NNH4_conc_DIF*dif_litres else

if unit=2 then NNH4_from_1_to_2_g else NNH4_conc_DIF*dif_litres

NNH4_in_flow = NNH4_from_prev_unit_g/area

- 10 -

NNH4_out_flow = if WATER>0 then 0.2*NNH4 / (WATER-surfw) * soilw_out else 0

NNH4_to_next_unit_g = NNH4_out_flow*frin*area

NNO3_conc_DIF = .000088

NNO3_from_prev_unit_g = if unit=1 then NNO3_conc_DIF*dif_litres else

if unit=2 then NNO3_1_to_2_g else NNO3_conc_DIF*dif_litres

NNO3_in_flow = NNO3_from_prev_unit_g/area

NNO3_out_flow = if WATER >0 then (NNO3 / WATER * Woutfl) else 0

NNO3_to_next_unit_g = NNO3_out_flow*frin*area

PAVAIL_conc_DIF = .000001

PAVAIL_from_prev_unit_g = if unit=1 then PAVAIL_conc_DIF*dif_litres else

if unit=2 then PAVAIL_1_to_2_g else PAVAIL_conc_DIF*dif_litres

PAVAIL_in_flow = PAVAIL_from_prev_unit_g/area

PAVAIL_out_flow = 0.02*soilw_out*PAVAIL/(WATER-surfw)

PAVAIL_to_next_unit_g = PAVAIL_out_flow*frin*area

pF =

min(7,max(0,7+((1-3*wfp_fc)*c*porosity^2-7/porosity)*vol_fraction+3*wfp_fc*porosity*c*vol_fraction^2-c*

vol_fraction^3))

pt = 7*(1.44879+1.3986*sin(2*pi/52*(weeknr+39.8973)))

soilw_fixed = max(0,WATER-surfw-soilw_free)

soilw_free = if vol_fraction<porosity then max(0, (vol_fraction-porosity*wfp_fc)*volume) else

(porosity-wfp_fc*porosity)*volume

soilw_out = soilw_free*frout

surfw = if vol_fraction>=porosity then (vol_fraction-porosity)*volume else 0

surfw_off = froff*surfw

volume = depth*1000

vol_fraction = WATER/volume

wfp = vol_fraction/porosity

wfp_fc = 0.58

dif_mm_month = GRAPH(weeknr)

(1.00, 1.43), (5.33, 1.48), (9.67, 1.49), (14.0, 1.48), (18.3, 0.39), (22.7, 0.27), (27.0, 0.45), (31.3, 0.77), (35.7,

0.91), (40.0, 0.98), (44.3, 1.08), (48.7, 1.19), (53.0, 1.43)

lit_u_1_to_2 = GRAPH(cycl_managem)

(1.00, 13096), (2.00, 12539), (3.00, 11663), (4.00, 10640), (5.00, 9537), (6.00, 8551), (7.00, 7992), (8.00,

7593), (9.00, 7236), (10.0, 6851), (11.0, 6260), (12.0, 5996), (13.0, 5599), (14.0, 5092), (15.0, 4581), (16.0,

4148), (17.0, 3783), (18.0, 3476), (19.0, 3194), (20.0, 2848), (21.0, 2450), (22.0, 2016), (23.0, 1570), (24.0,

1229), (25.0, 1014), (26.0, 909), (27.0, 905), (28.0, 987), (29.0, 1145), (30.0, 1371), (31.0, 1663), (32.0, 2002),

(33.0, 2351), (34.0, 2710), (35.0, 3083), (36.0, 3474), (37.0, 3918), (38.0, 4417), (39.0, 4963), (40.0, 5546),

(41.0, 6172), (42.0, 8362), (43.0, 9901), (44.0, 10994), (45.0, 11841), (46.0, 12427), (47.0, 12884), (48.0,

13268), (49.0, 13577), (50.0, 13639), (51.0, 13540), (52.0, 13350), (53.0, 13096)...

- 11 -

NNH4_from_1_to_2_g = GRAPH(cycl_managem)

(1.00, 0.239), (2.00, 0.235), (3.00, 0.231), (4.00, 0.228), (5.00, 0.227), (6.00, 0.226), (7.00, 0.227), (8.00,

0.229), (9.00, 0.232), (10.0, 0.236), (11.0, 0.24), (12.0, 0.255), (13.0, 0.276), (14.0, 0.273), (15.0, 0.215), (16.0,

0.102), (17.0, 0.0423), (18.0, 0.0331), (19.0, 0.0302), (20.0, 0.0275), (21.0, 0.0243), (22.0, 0.0234), (23.0,

0.0197), (24.0, 0.0145), (25.0, 0.0112), (26.0, 0.00982), (27.0, 0.00971), (28.0, 0.0105), (29.0, 0.012), (30.0,

0.0141), (31.0, 0.0166), (32.0, 0.0195), (33.0, 0.0224), (34.0, 0.0253), (35.0, 0.0283), (36.0, 0.0313), (37.0,

0.035), (38.0, 0.0449), (39.0, 0.185), (40.0, 0.345), (41.0, 0.412), (42.0, 0.378), (43.0, 0.353), (44.0, 0.334),

(45.0, 0.318), (46.0, 0.304), (47.0, 0.291), (48.0, 0.28), (49.0, 0.269), (50.0, 0.26), (51.0, 0.252), (52.0, 0.245),

(53.0, 0.239)...

NNO3_1_to_2_g = GRAPH(cycl_managem)

(1.00, 0.534), (2.00, 0.518), (3.00, 0.49), (4.00, 0.456), (5.00, 0.419), (6.00, 0.384), (7.00, 0.364), (8.00, 0.35),

(9.00, 0.336), (10.0, 0.321), (11.0, 0.297), (12.0, 0.291), (13.0, 0.283), (14.0, 0.272), (15.0, 0.26), (16.0, 0.246),

(17.0, 0.141), (18.0, 0.121), (19.0, 0.112), (20.0, 0.104), (21.0, 0.0932), (22.0, 0.0808), (23.0, 0.0667), (24.0,

0.0546), (25.0, 0.0462), (26.0, 0.0421), (27.0, 0.042), (28.0, 0.0454), (29.0, 0.0516), (30.0, 0.0601), (31.0,

0.0703), (32.0, 0.0813), (33.0, 0.0915), (34.0, 0.101), (35.0, 0.11), (36.0, 0.119), (37.0, 0.128), (38.0, 0.162),

(39.0, 0.237), (40.0, 0.276), (41.0, 0.294), (42.0, 0.373), (43.0, 0.425), (44.0, 0.46), (45.0, 0.488), (46.0, 0.507),

(47.0, 0.522), (48.0, 0.535), (49.0, 0.545), (50.0, 0.548), (51.0, 0.546), (52.0, 0.541), (53.0, 0.534)...

PAVAIL_1_to_2_g = GRAPH(cycl_managem)

(1.00, 0.15), (2.00, 0.152), (3.00, 0.154), (4.00, 0.155), (5.00, 0.157), (6.00, 0.159), (7.00, 0.161), (8.00, 0.163),

(9.00, 0.165), (10.0, 0.167), (11.0, 0.168), (12.0, 0.166), (13.0, 0.161), (14.0, 0.151), (15.0, 0.136), (16.0,

0.123), (17.0, 0.112), (18.0, 0.103), (19.0, 0.095), (20.0, 0.0848), (21.0, 0.0729), (22.0, 0.0601), (23.0, 0.0468),

(24.0, 0.0366), (25.0, 0.0302), (26.0, 0.027), (27.0, 0.0266), (28.0, 0.0285), (29.0, 0.0322), (30.0, 0.0375),

(31.0, 0.0442), (32.0, 0.0516), (33.0, 0.059), (34.0, 0.0663), (35.0, 0.0737), (36.0, 0.0813), (37.0, 0.0896),

(38.0, 0.0989), (39.0, 0.11), (40.0, 0.122), (41.0, 0.133), (42.0, 0.137), (43.0, 0.139), (44.0, 0.14), (45.0, 0.141),

(46.0, 0.141), (47.0, 0.142), (48.0, 0.143), (49.0, 0.144), (50.0, 0.145), (51.0, 0.147), (52.0, 0.148), (53.0,

0.15)...

rain_mm_month = GRAPH(weeknr)

(1.00, 124), (5.33, 87.0), (9.67, 88.0), (14.0, 64.0), (18.3, 77.0), (22.7, 61.0), (27.0, 77.0), (31.3, 91.0), (35.7,

94.0), (40.0, 108), (44.3, 128), (48.7, 134), (53.0, 124)

wfp_old = GRAPH(mode_meas)

(0.00, 1.00), (0.1, 1.00), (0.2, 0.99), (0.3, 0.945), (0.4, 0.745), (0.5, 0.555), (0.6, 0.5), (0.7, 0.5), (0.8, 0.49),

(0.9, 0.49), (1, 0.49)

09. Carbon submodel

CHERB(t) = CHERB(t - dt) + (Cgraz - Cfarmer - Cresp_herb - Cmanure - Cmethane - Charv) * dt

INIT CHERB = CHERB_ini

INFLOWS:

Cgraz = rcr_herb*CHERB*CPL_SHOOT/(km_gr+CPL_SHOOT)*mod_herb_s_0_or_f_1

OUTFLOWS:

Cfarmer = if (mod_herb_s_0_or_f_1=0) then CHERB else (-1*CHERB_S)

Cresp_herb = CHERB*rrr_herb*mod_herb_s_0_or_f_1

Cmanure = upt_ineff*Cgraz

Cmethane = rmpr*Cgraz

Charv = if ((Cherb_tot >harv_level) and (int(weeknr)=harv_week)) and (mod_herb_s_0_or_f_1=1)

then (Cherb_tot-harv_level)/DT else 0

- 12 -

CHERB_S(t) = CHERB_S(t - dt) + (Cfarmer + Cgraz__s - Charv_s - Cresp_herb_s - Cmethane_s -

Cmanure_s) * dt

INIT CHERB_S = CHERB_STORE_ini

INFLOWS:

Cfarmer = if (mod_herb_s_0_or_f_1=0) then CHERB else (-1*CHERB_S)

Cgraz__s = rcr_herb*CHERB_S*(1-mod_herb_s_0_or_f_1)

OUTFLOWS:

Charv_s = if ((Cherb_tot >harv_level) and (int(weeknr)=harv_week)) and (mod_herb_s_0_or_f_1=0)

then (Cherb_tot-harv_level)/DT else 0

Cresp_herb_s = rrr_herb*CHERB_S*(1-mod_herb_s_0_or_f_1)

Cmethane_s = rmpr*Cgraz__s

Cmanure_s = upt_ineff*Cgraz__s

CPL_ROOT(t) = CPL_ROOT(t - dt) + (Ctrans - Cdeath_ro - Cresp_ro) * dt

INIT CPL_ROOT = CPL_ROOT_ini

INFLOWS:

Ctrans = (CPL_SHOOT-CPL_ROOT*sh_ro_opt)/(1+sh_ro_opt)

OUTFLOWS:

Cdeath_ro = rdr_ro_max*CPL_ROOT*rtemp_inv_r

Cresp_ro = rrr_ro_max*CPL_ROOT*rsoiltemp*mod_ass

CPL_ROOTD(t) = CPL_ROOTD(t - dt) + (Cdeath_ro - Cfrag_rod - Cleach_rod) * dt

INIT CPL_ROOTD = CPL_ROOTD_ini

INFLOWS:

Cdeath_ro = rdr_ro_max*CPL_ROOT*rtemp_inv_r

OUTFLOWS:

Cfrag_rod = rsoiltemp*rfr_rod_max*CPL_ROOTD

Cleach_rod = cd_rod_max*rsoiltemp*Cdeath_ro

CPL_SHOOT(t) = CPL_SHOOT(t - dt) + (Cass - Ctrans - Cgraz - Cdeath_sh - Cresp_sh) * dt

INIT CPL_SHOOT = CPL_SHOOT_ini

INFLOWS:

Cass = rgr_max *limit_ass_tot* CPL_SHOOT

OUTFLOWS:

Ctrans = (CPL_SHOOT-CPL_ROOT*sh_ro_opt)/(1+sh_ro_opt)

Cgraz = rcr_herb*CHERB*CPL_SHOOT/(km_gr+CPL_SHOOT)*mod_herb_s_0_or_f_1

Cdeath_sh = rdr_sh_max*CPL_SHOOT*rtemp_inv

Cresp_sh = rrr_sh_max*CPL_SHOOT*rtemp*mod_ass

CPL_SHOOTD(t) = CPL_SHOOTD(t - dt) + (Cdeath_sh - Cfrag_shd - Cleach_shd - Cburn) * dt

INIT CPL_SHOOTD = CPL_SHOOTD_ini

INFLOWS:

Cdeath_sh = rdr_sh_max*CPL_SHOOT*rtemp_inv

OUTFLOWS:

Cfrag_shd = rtemp*rfr_shd_max*CPL_SHOOTD

Cleach_shd = rsoiltemp*cd_shd_max*Cdeath_sh

Cburn = burnfract*CPL_SHOOTD*burntime

CSOILOM(t) = CSOILOM(t - dt) + (Cfrag_shd + Cfrag_rod + Cmanure - Cdec - Cdeni) * dt

INIT CSOILOM = CSOILOM_ini

- 13 -

INFLOWS:

Cfrag_shd = rtemp*rfr_shd_max*CPL_SHOOTD

Cfrag_rod = rsoiltemp*rfr_rod_max*CPL_ROOTD

Cmanure = upt_ineff*Cgraz

OUTFLOWS:

Cdec = c_dec

Cdeni = Ndeni*cn_deni

cd_rod_max = 0.1/0.20558

cd_shd_max = 0.1/0.20558

cn_deni = 1.0716

km_gr = 0.4

limit_assN = if nconc_plws > nmin

then min(0.9, (nconc_plws-nmin)/((kmN-nmin)+(nconc_plws-nmin)) )

else 0

limit_assP = if pconc_plws > pmin

then min(0.9,

(pconc_plws-pmin)/((kmP-pmin) + (pconc_plws-pmin)) )

else 0

limit_ass_tot = (limit_assN*limit_assP/0.81)*(sh_max-CPL_SHOOT)/sh_max*rtemp*mod_ass

rtemp_inv = GRAPH(temp_airC)

(-20.0, 0.965), (-18.0, 0.965), (-16.0, 0.96), (-14.0, 0.955), (-12.0, 0.95), (-10.0, 0.95), (-8.00, 0.945), (-6.00,

0.92), (-4.00, 0.9), (-2.00, 0.85), (0.00, 0.75), (2.00, 0.67), (4.00, 0.575), (6.00, 0.49), (8.00, 0.395), (10.0,

0.305), (12.0, 0.225), (14.0, 0.115), (16.0, 0.06), (18.0, 0.04), (20.0, 0.045), (22.0, 0.04), (24.0, 0.04), (26.0,

0.04), (28.0, 0.04), (30.0, 0.045), (32.0, 0.04), (34.0, 0.03), (36.0, 0.025), (38.0, 0.02)

rtemp_inv_r = GRAPH(temp_soilC)

(-20.0, 0.965), (-18.0, 0.965), (-16.0, 0.96), (-14.0, 0.955), (-12.0, 0.95), (-10.0, 0.95), (-8.00, 0.945), (-6.00,

0.92), (-4.00, 0.9), (-2.00, 0.85), (0.00, 0.75), (2.00, 0.67), (4.00, 0.575), (6.00, 0.49), (8.00, 0.395), (10.0,

0.305), (12.0, 0.225), (14.0, 0.115), (16.0, 0.06), (18.0, 0.04), (20.0, 0.045), (22.0, 0.04), (24.0, 0.04), (26.0,

0.04), (28.0, 0.04), (30.0, 0.045), (32.0, 0.04), (34.0, 0.03), (36.0, 0.025), (38.0, 0.02)

10. Nitrogen submodel

NHERB(t) = NHERB(t - dt) + (Ngraz - Nfarmer - Nharv - Nmanure - Nurine) * dt

INIT NHERB = NHERB_ini

INFLOWS:

Ngraz = Cgraz/cn_sh

OUTFLOWS:

Nfarmer = if (grazing_y_or_n = 1) then Cfarmer/cn_herb else 0

Nharv = if (grazing_y_or_n = 1) then Charv/cn_herb else 0

Nmanure = Cmanure/cn_manure

Nurine = max(0 , NHERB-CHERB/cn_herb_opt)

NHERB_S(t) = NHERB_S(t - dt) + (Nfarmer + Ngraz_s - Nharv_s - Nmanure&urine_s) * dt

INIT NHERB_S = NHERB_STORE_ini

INFLOWS:

Nfarmer = if (grazing_y_or_n = 1) then Cfarmer/cn_herb else 0

Ngraz_s = Cgraz__s/cn_food

- 14 -

OUTFLOWS:

Nharv_s = if (grazing_y_or_n = 1) then Charv_s/cn_herb else 0

Nmanure&urine_s = (Cmanure_s/cn_manure) + (max(0,NHERB_S-CHERB_S/cn_herb_opt))

NNH4(t) = NNH4(t - dt) + (Nleach_rod + Ndec + Nleach_shd + Ndis_nitr_red + Nurine + NNH4_in -

Nupt_NH4 - Nnitrif - Nvol - NNH4_out) * dt

INIT NNH4 = NNH4_ini

INFLOWS:

Nleach_rod = Cleach_rod/cn_rod

Ndec = n_dec

Nleach_shd = Cleach_shd/cn_shd

Ndis_nitr_red = 0*NNO3

Nurine = max(0 , NHERB-CHERB/cn_herb_opt)

NNH4_in = NNH4_in_flow+NNH4_p_y/52+nnh4_fert

OUTFLOWS:

Nupt_NH4 = if (NNH4-0.001<=0) then 0 else min(NNH4-0.001, nneed*(NNH4-0.001)/nplav)

Nnitrif = rnitr_max*rsoiltemp*mod_nitrif*NNH4

Nvol = rvolr_max*NNH4*rsoiltemp

NNH4_out = NNH4_out_flow

NNO3(t) = NNO3(t - dt) + (Nnitrif + Nburn_s + NNO3_in - Nupt_NO3 - Ndis_nitr_red - Ndeni - NNO3_imm

- NNO3_out) * dt

INIT NNO3 = NNO3_ini

INFLOWS:

Nnitrif = rnitr_max*rsoiltemp*mod_nitrif*NNH4

Nburn_s = Nburn_s1

NNO3_in = NNO3_in_flow+NNO3_p_y/52+nno3_fert

OUTFLOWS:

Nupt_NO3 = if (NNO3-0.001<=0) then 0 else min(NNO3-0.001 , nneed*(NNO3-0.001) /nplav)

Ndis_nitr_red = 0*NNO3

Ndeni = rdenir_max*NNO3*mod_deni*rsoiltemp

NNO3_imm = nno3imm_neg*(-1)

NNO3_out = NNO3_out_flow

NPL_ROOT(t) = NPL_ROOT(t - dt) + (Ntrans + Nupt_NH4 + Nupt_NO3 + Nremob - Ndeath_ro -

Nretrans_ro) * dt

INIT NPL_ROOT = NPL_ROOT_ini

INFLOWS:

Ntrans = (NPL_SHOOT-sr_pl*NPL_ROOT)/(sr_pl+1)

Nupt_NH4 = if (NNH4-0.001<=0) then 0 else min(NNH4-0.001, nneed*(NNH4-0.001)/nplav)

Nupt_NO3 = if (NNO3-0.001<=0) then 0 else min(NNO3-0.001 , nneed*(NNO3-0.001) /nplav)

Nremob = if ((weeknr>5) and (weeknr<40))

then min(nremobrate*NPL_STORE , nneed) else 0

OUTFLOWS:

Ndeath_ro = (1-nretransfr)*Cdeath_ro/cn_ro

Nretrans_ro = Cdeath_ro/cn_ro*nretransfr

NPL_ROOTD(t) = NPL_ROOTD(t - dt) + (Ndeath_ro - Nfrag_rod - Nleach_rod) * dt

INIT NPL_ROOTD = NPL_ROOTD_ini

- 15 -

INFLOWS:

Ndeath_ro = (1-nretransfr)*Cdeath_ro/cn_ro

OUTFLOWS:

Nfrag_rod = Cfrag_rod/cn_rod

Nleach_rod = Cleach_rod/cn_rod

NPL_SHOOT(t) = NPL_SHOOT(t - dt) + (- Ntrans - Ndeath_sh - Ngraz - Nretrans_sh) * dt

INIT NPL_SHOOT = NPL_SHOOT_ini

OUTFLOWS:

Ntrans = (NPL_SHOOT-sr_pl*NPL_ROOT)/(sr_pl+1)

Ndeath_sh = (1-nretransfr)*Cdeath_sh/cn_sh

Ngraz = Cgraz/cn_sh

Nretrans_sh = Cdeath_sh/cn_sh*nretransfr

NPL_SHOOTD(t) = NPL_SHOOTD(t - dt) + (Ndeath_sh - Nfrag_shd - Nleach_shd - Nburn_a - Nburn_s1) *

dt

INIT NPL_SHOOTD = NPL_SHOOTD_ini

INFLOWS:

Ndeath_sh = (1-nretransfr)*Cdeath_sh/cn_sh

OUTFLOWS:

Nfrag_shd = Cfrag_shd/cn_shd

Nleach_shd = Cleach_shd/cn_shd

Nburn_a = burnratio* burnfract*NPL_SHOOTD*burntime

Nburn_s1 = (1-burnratio)*burnfract*NPL_SHOOTD*burntime

NPL_STORE(t) = NPL_STORE(t - dt) + (Nretrans_sh + Nretrans_ro - Nremob) * dt

INIT NPL_STORE = NPL_STORE_ini

INFLOWS:

Nretrans_sh = Cdeath_sh/cn_sh*nretransfr

Nretrans_ro = Cdeath_ro/cn_ro*nretransfr

OUTFLOWS:

Nremob = if ((weeknr>5) and (weeknr<40))

then min(nremobrate*NPL_STORE , nneed) else 0

NSOILOM(t) = NSOILOM(t - dt) + (Nfrag_shd + Nfrag_rod + Nmanure + NNO3_imm - Ndec) * dt

INIT NSOILOM = NSOILOM_ini

INFLOWS:

Nfrag_shd = Cfrag_shd/cn_shd

Nfrag_rod = Cfrag_rod/cn_rod

Nmanure = Cmanure/cn_manure

NNO3_imm = nno3imm_neg*(-1)

OUTFLOWS:

Ndec = n_dec

burnratio = 0.5

cn_food = 10

nneed = max(0 , CPLANT/cn_plws_opt-NPLANT_ws)

nremobrate = 0.25

rdenir_max = 0.1/0.20558

rnitr_max = 0.05*7

- 16 -

rvolr_max = 0.01

11. Phosphorus submodel

PADS(t) = PADS(t - dt) + (Padsorb - Preleas) * dt

INIT PADS = PADS_ini

INFLOWS:

Padsorb = if (PADS < pads_eq) then min(0.2*(1-PADS/pads_max)*(pads_eq-PADS) ,

PAVAIL-0.001) else 0

OUTFLOWS:

Preleas = if PADS> pads_eq then 0.01*(PADS/pads_max)*(PADS-pads_eq) else 0

PAVAIL(t) = PAVAIL(t - dt) + (Pleach_rod + Pdec + Pleach_shd + Preleas + Pburn + PAVAIL_in - Pupt -

Padsorb - PAVAIL_out) * dt

INIT PAVAIL = PAVAIL_ini

INFLOWS:

Pleach_rod = Cleach_rod/cp_rod

Pdec = p_dec

Pleach_shd = Cleach_shd/cp_shd

Preleas = if PADS> pads_eq then 0.01*(PADS/pads_max)*(PADS-pads_eq) else 0

Pburn = burnfract*PPL_SHOOTD*burntime

PAVAIL_in = PAVAIL_in_flow+PAVAIL_p_y/52+pavail_fert

OUTFLOWS:

Pupt = if (PAVAIL-0.001<=0) then 0 else

0.1*min(PAVAIL-0.001, pneed) *PAVAIL/init(PAVAIL)

Padsorb = if (PADS < pads_eq) then min(0.2*(1-PADS/pads_max)*(pads_eq-PADS) ,

PAVAIL-0.001) else 0

PAVAIL_out = PAVAIL_out_flow

PHERB(t) = PHERB(t - dt) + (Pgraz - Pmanure - Pharv - Pfarmer) * dt

INIT PHERB = PHERB_ini

INFLOWS:

Pgraz = Cgraz/cp_sh

OUTFLOWS:

Pmanure = max(0 , PHERB-CHERB/cp_herb_opt)

Pharv = if (grazing_y_or_n = 1) then Charv/cp_herb else 0

Pfarmer = if (grazing_y_or_n = 1) then Cfarmer/cp_herb else 0

PHERB_S(t) = PHERB_S(t - dt) + (Pfarmer + Pgraz_s - Pharv_s - Pmanure_s) * dt

INIT PHERB_S = PHERB_STORE_ini

INFLOWS:

Pfarmer = if (grazing_y_or_n = 1) then Cfarmer/cp_herb else 0

Pgraz_s = Cgraz__s/cp_food

OUTFLOWS:

Pharv_s = if (grazing_y_or_n = 1) then Charv_s/cp_herb else 0

Pmanure_s = max(0,PHERB_S-CHERB_S/cp_herb_opt)

PPL_ROOT(t) = PPL_ROOT(t - dt) + (Ptrans + Pupt + Premob - Pdeath_ro - Pretrans_ro) * dt

INIT PPL_ROOT = PPL_ROOT_ini

INFLOWS:

- 17 -

Ptrans = (PPL_SHOOT-sr_pl*PPL_ROOT)/(sr_pl+1)

Pupt = if (PAVAIL-0.001<=0) then 0 else

0.1*min(PAVAIL-0.001, pneed) *PAVAIL/init(PAVAIL)

Premob = if ((weeknr>5) and (weeknr<40))

then min(premobrate*PPL_STORE,pneed)

else 0

OUTFLOWS:

Pdeath_ro = (1-pretransfr)*Cdeath_ro/cp_ro

Pretrans_ro = Pdeath_ro/(1-pretransfr)*pretransfr

PPL_ROOTD(t) = PPL_ROOTD(t - dt) + (Pdeath_ro - Pfrag_rod - Pleach_rod) * dt

INIT PPL_ROOTD = PPL_ROOTD_ini

INFLOWS:

Pdeath_ro = (1-pretransfr)*Cdeath_ro/cp_ro

OUTFLOWS:

Pfrag_rod = Cfrag_rod/cp_rod

Pleach_rod = Cleach_rod/cp_rod

PPL_SHOOT(t) = PPL_SHOOT(t - dt) + (- Ptrans - Pgraz - Pdeath_sh - Pretrans_sh) * dt

INIT PPL_SHOOT = PPL_SHOOT_ini

OUTFLOWS:

Ptrans = (PPL_SHOOT-sr_pl*PPL_ROOT)/(sr_pl+1)

Pgraz = Cgraz/cp_sh

Pdeath_sh = (1-pretransfr)*Cdeath_sh/cp_sh

Pretrans_sh = Pdeath_sh/(1-pretransfr)*pretransfr

PPL_SHOOTD(t) = PPL_SHOOTD(t - dt) + (Pdeath_sh - Pfrag_shd - Pleach_shd - Pburn) * dt

INIT PPL_SHOOTD = PPL_SHOOTD_ini

INFLOWS:

Pdeath_sh = (1-pretransfr)*Cdeath_sh/cp_sh

OUTFLOWS:

Pfrag_shd = Cfrag_shd/cp_shd

Pleach_shd = Cleach_shd/cp_shd

Pburn = burnfract*PPL_SHOOTD*burntime

PPL_STORE(t) = PPL_STORE(t - dt) + (Pretrans_sh + Pretrans_ro - Premob) * dt

INIT PPL_STORE = PPL_STORE_ini

INFLOWS:

Pretrans_sh = Pdeath_sh/(1-pretransfr)*pretransfr

Pretrans_ro = Pdeath_ro/(1-pretransfr)*pretransfr

OUTFLOWS:

Premob = if ((weeknr>5) and (weeknr<40))

then min(premobrate*PPL_STORE,pneed)

else 0

PSOILOM(t) = PSOILOM(t - dt) + (Pfrag_shd + Pfrag_rod + Pmanure - Pdec) * dt

INIT PSOILOM = PSOILOM_ini

INFLOWS:

Pfrag_shd = Cfrag_shd/cp_shd

Pfrag_rod = Cfrag_rod/cp_rod

- 18 -

Pmanure = max(0 , PHERB-CHERB/cp_herb_opt)

OUTFLOWS:

Pdec = p_dec

cp_food = 100

pads_eq = pads_max*pconc/(km_ads+pconc)

pconc = PAVAIL/(WATER-surfw)*1000

pneed = max(0 , CPLANT/cp_plws_opt-PPLANT_ws)

premobrate = 0.25

cycling

Ncycle = Ndec+Nleach_rod+Nleach_shd-NNO3_imm+Nburn_s

Pcycle = Pburn+Pdec+Pleach_rod+Pleach_shd

water purification ?

nconc_win = 1000*(NNH4_in_flow+NNO3_in_flow)/Winfl

nconc_wout = 1000*(NNH4_out_flow+NNO3_out_flow)/Woutfl

pconc_win = 1000*PAVAIL_in_flow/Winfl

pconc_wout = 1000*PAVAIL_out_flow/Woutfl

Not in a sector