== 3.18 Nutrient cycling and nutrient limitation in Ecosim == Ecosim uses a very simple strategy to represent nutrient cycling and potential nutrient limitation of primary production rates. It is assumed that at any instant in time the system has a total nutrient concentration ''N,,T,,'', which is partitioned between nutrient 'bound' in biomass versus free in the environment (accessible to plants for nutrient uptake). That is, ''T'' is represented as the sum ''N'',,''T'',,''=∑iŋ'',,''i'',,''B'',,''i'',,'' + N'f'', where'' ŋ'',,''i'',, is (fixed) nutrient content per unit of pool i biomass, and N,,f,, is free nutrient concentration. Then assuming that ''N'',,''T'',, varies as ''dN'',,''T'',,''/dt'' = ''I - vN'',,''T'',,, where'' I'' is total inflow rate to the system from all nutrient loading sources and v is total loss rate from the system due to all loss agents (volume exchange, sedimentation, export in harvests, etc.), and that'' v'' is relatively large,'' N'',,''T'',, is approximated in Ecosim by the (possibly moving) equilibrium value ''N'',,''T'',,'' = I/v''. Changes in nutrient loading can be simulated by assigning a time forcing function number to ''N'',,''T'',, on the [wiki:EwEugEcosimParameters Ecosim parameters] form, in which case N,,T,, is calculated as N,,T,, = ft ''N'',,''To'',, where ''N'',,''To'',, is the Ecopath base estimate of N,,T,, (at the start of each simulation) and ft is a time multiplier (''f'',,''t'',,'' '' = 1 implies Ecopath base value of ''N'',,''T'',,) supplied by the user the same as any other time forcing function. Note that under the moving equilibrium assumption, changes in ''f,,t,,'' can be viewed as caused by either changes in input rate ''I'' or nutrient loss rate ''v''. The Ecopath base estimate ''N'',,''T'',,''o'',,',, of total nutrient is entered by specifying the base free nutrient proportion ''pf = Nf / N'',,''T'',,''o'',,',, on entry to Ecosim (also on the [wiki:EwEugEcosimParameters Ecosim parameters] form: ''Time dynamic (Ecosim) >Input > Ecosim parameters''), from which the Ecosim initialization can calculate N,,T,,o,,,, as simply ''N'',,''T''^''o''^,,'' = ∑i ŋi Bi / (1-pf)''. Note here that the units of nutrient concentration are contained in the per-biomass relative nutrient concentrations ''ŋ,,i,,'', and these need not be specified in any particular absolute units. During each simulation, ''N'',,''f'',, is varied dynamically by setting it equal at any time to ''N'',,''T'',,'' - ''∑''I ŋ'',,''i'',,'' B'',,''i'',,, so that accumulation of nutrient in any biomass pool(s) can reduce free nutrient available to promote primary production. Primary production rates for producer pools ''j'' are linked to free nutrient concentration during each simulation through assumed Michaelis-Menten uptake relationships of the form ''P/B'',,''j'',,''=P/B'',,''max,j'',,'' N'',,''f'',,''/(K'',,''j'',,''+N'',,''f'',,'')'', where the parameters ''P/B'',,''max,j'',, and ''K'',,''j'',, are calculated as part of the Ecosim initialization using input estimates by the user of the ratios ''P/B,,max,j,, / P/B'',,''Ecopath,j'',, (Ecosim [wiki:EwEugGroupInfo Group Info] form). The Michaelis constant ''K'',,''j'',, is set so that ''P/B'',,''j '',,''='P/B'',,''Ecopath,j'',,'when ''N,,f,,'',,,,is at the initial concentration determined by ''N'',,''T'',,'' - ∑'',,''I'',,'' ŋ'',,''i'',,'' B'',,''i'',,'when all ''B'',,''i'',, are at Ecopath base values). The user can increase sensitivity to changes in nutrient concentration (make ''P/B'',,''j'',, more variable with changes in ''N'',,''T'',, and'' N'',,''f'',,) by increasing the input ''P/B'',,''max,j'',,'' / P/B'',,''Ecopath,j'',, ratio. The default free nutrient proportion pf is set at unity, which causes ''N'',,''f'',, to be virtually constant over time (and hence ''P/B'',,''j'',,'s to be virtually independent of nutrient concentration changes). Thus to "turn on" nutrient limitation effects, you must set a lower value for pf, (e.g., 0.3) on the Ecosim parameters form. Users should be aware that this simple approach to accounting for nutrient limitation can interact with the numerical method used to simulate very fast phytoplankton dynamics over time, to cause numerical instability or "chattering" in the values of phytoplankton biomass. This happens mainly in cases where ''p'',,''f'',, is low, so that ''N'',,''f'',,is initially small. Then any biomass decline in the system (e.g. due to decline in zooplankton biomass) results in a relatively large increase in ''N'',,''f'',,, which can cause an over-response in the calculated phytoplankton biomass(es) ''B'',,''j'',,, which then drives'' N'',,''f'',, to near zero, which in turn causes too large a decrease in calculated ''B'',,''j'',, for the next monthly Ecosim time step. Chattering can be reduced by using the Runge-Kutta integration option and/or higher pf settings. Improved numerical integration procedures should allow us to avoid the problem entirely in future Ecosim versions, but at present the computational cost of avoiding the problem by 'brute force' (shorter simulation time steps) would be prohibitively expensive of computer time. Note further that the single free nutrient concentration ''N'',,''f'',,'is linked to all primary producer groups in the model (through the uptake kinetics-P/B relationships), implying competition among all plant types in the model for free nutrients. This can cause major shifts in primary production structure over time, e.g. between benthic and pelagic primary production and between grazeable and non-grazeable algal types.