Del simulates the dynamics of three state variables that quantify the level of organic carbon (c) and nitrogen (s), plus the integrated amount of inorganic nitrogen which is accessible for plant uptake throughout the year (n). The state variables plus the aggregate flows of N and C around the farm are presented in Fig. 1. Hence, the differential equations from the model are: dn In zMn {En {Us dt ds Is zUs {Ps {Mn dt Where y = the dependent variable, representing UT, YT, UH or YH (kg ha year). x = the independent variable, representing n, UT, or UH (kg ha1 year). yMAX = maximum value of y, representing UMAX,T, YMAX,T, UMAX,H or YMAX,H (kg ha year). r = initial response of y to x, representing rU,T, rY,T, rU,H and rY,H (kg kg ha year). l = the decline of the response of y to x (kg).PLOS ONE | www.plosone.orgSimulation of Carbon and Nitrogen Dynamicson calculation procedures presented by Dammgen and Hutchings [27]; we followed the same steps in the calculations but adjusted the calculation of mineralization of manure organic N (see below).Glycine Part of the inorganic N can be adsorbed to straw and manure additives.Fenoprofen The inorganic N is prone to emission by NH3 volatilization after excretion in the barn (fE, g g), during storage (fS, g g) and after application to the field (fA, g g).PMID:23789847 The loss fractions fE, fS and fA are dependent on the barn and storage conditions, and the method of manure application and extra emission mitigating measures after application such as irrigation or application during rainfall. The values of manure parameters as used in the model are presented in Table S5. To estimate the mineralization or immobilization of N due to degradation of OM by microorganisms we use the following equation:Figure 1. State variables of the model: organic carbon and nitrogen (c and s), and available inorganic nitrogen (n). The arrows indicate flows between the pools. doi:10.1371/journal.pone.0067279.gMk:Cs 1 e { 1{e qs qMThe initial response of N uptake to available inorganic N and of biomass production to N uptake is linear, with an initial slope r. This initial slope declines with a rate depending on l until the maximum yMAX is reached. The ratio between UMAX,H and UMAX,T is denoted hN: the fraction of harvested N in biomass. Maximum dry matter yield is calculated as YMAX = YMAX/aMAX, where aMAX is the maximum N content of grass. The initial response of both total and harvested plant biomass yield to N uptake is calculated from the minimum N content in herbage: rY = 1/aMIN, with aMIN as the minimum N content of grass. The grassland production curves were calibrated for mixed use by mowing and grazing. For silage maize a yield level YMAIZE is defined. The parameters for maize production and the grassland production curves can be found in Table S2. The harvested biomass is fed to animals and can be partly exported in case of a feed surplus. The feed is partly digested by the animals (kD, year) and the undigested fraction enters the manure, where it is subjected to further degradation (kM, year) during storage before application to the field. Manure degradability is dependent on the feed quality, therefore the kM is proportional to kD using constant gM, so that kM = kDNgM. The parameters regarding feed quality are in Table S3. Soil processes include degradation and additions of OM, and soil N losses. Mineralization results in a decline of the organic carbon pool s, with a fractional rate kS (year). Moreover, a fraction of the unharvested biomass is degra.