Introduction

Subsurface drainage systems or tile drainage systems have been widely used to deal with soil salinization and waterlogging problems around the world (Allam et al. 2016; Xin et al. 2016a, b). The environmental impacts of agricultural drainage have led to serious problems (Alibakhshi et al. 2013). Nitrate contamination is one of the main polluting factors for surface- and groundwater (Lalehzari et al. 2013; Shariati-Rad et al. 2015). When nitrate levels have exceeded the limits allowed from the subsurface drainage systems, it has caused different environmental problems and reduced the quality of water resources. The transferred nitrate to water resources not only is detrimental to human health but also causes eutrophication, reducing the oxygen level in the rivers, and leads to significant damages to agricultural products and economy (Bahmani et al. 2010). The majority of agricultural systems that produce the highest amount of products are in drained areas. Although subsurface drainage systems make agricultural production in salty and waterlogging soils possible, the drainage outflow will transfer some pollutants such as nutrients, sediments, pesticides and other pollutants to the surface- and groundwater. Regarding the effect of subsurface drainage parameters (drain spacing and depth) on the quality of drainage water and its damage to the environment, the drainage networks should be designed and managed appropriately. Subsurface drainage systems play an important role in the transfer of soluble agricultural chemicals such as nitrate. The subsurface drain depth and spacing are two important parameters in designing drainage systems that play a determining role in the amount and quality of the drain outflow (Kalita et al. 2006). The quality of drainage water depends on the quality of irrigation water, agricultural elements (fertilizers, pesticides) and the quality of groundwater. The depth and spacing of drains also affect the quality and amount of drainage water. The difference is such that deeper drains have a higher amount of drainage water with lower quality in comparison with shallower drains (Ayars et al. 1997, 2006; Christen and Skehan 2001). The amount of drainage water, saltiness, nutrients and heavy metals will be reduced in those areas that the water table is controlled by the shallow drains (Skaggs 1999; Zucker and Brown 1998).

The inappropriate designing of subsurface drainage systems would lead to the excessive loss of soil nitrogen through runoff and drainage losses that cause different environmental problems. The nitrate and ammonium pollution in the agricultural watersheds with tile drainage systems can be controlled by appropriate drainage systems designing to reduce the volume of drain outflow and nitrate and ammonium concentrations in drainage water. An effective drainage system would consider the desirable quality and quantity of drain outflow on the one hand and the acceptable product yield on the other hand. Nitrogen dynamic in soil–water–plant–drainage system is a complex process since many interactions of physical, chemical and biological processes contribute to it. Moreover, drainage nitrate and ammonium concentrations depend on the flow hydraulic toward drains. In order to model these complex relations in such a system, we need a new tool. One of the most effective methods for modeling complex systems is the system dynamics approach.

The system dynamics approach (SD) was first developed by Forrester (1961) for a better understanding of strategic issues in complex dynamic systems. The models developed based on SD make a clear understanding of the dynamic behavior of the systems by the feedback process for the users during the time. Every SD is identified and determined by interaction, interdependency, information, feedback, stock and flow diagram. In SD, the relation between structure and behavior of every dynamic system is based on the concept of information feedback and interaction of stock and flow variables (Neuwirth et al. 2015; Sahin et al. 2016; Simonovic 2000).

Today many models have been developed for simulating nitrogen transformation and leaching in the plant root zone, the most important of them include LEACHN (Wagenet and Hutson 1989), ANIMO (Rijtema and Kroes 1991) and HYDRUS (Simunek et al. 1999). The problems with these models are: The many number of input parameters are needed for simulating the flow of water and nitrate in soil, and measuring some of them with high accuracy at the field scale is really difficult or sometimes not possible. Moreover, they cannot be used in tile-drained farms for accurate modeling of the drainage rate and the nitrate losses from the drain pipes and this is because the subsurface drainage hydraulics toward drains has not been taken into consideration. The drainage water is the result of two inflows to the tile drain: the vertical and horizontal flows from the deep percolation losses of irrigation water toward the drains and the subsurface radial flows into drains due to entering the groundwater and losses of irrigation. Thus, entering nitrate to the drain pipe also includes two parts: (1) nitrate in the water of irrigation and in the upper soil of the drain pipe that enters into the drain from the top by horizontal and vertical flows resulting from the losses of percolation and (2) nitrate released in groundwater that enters into the drain from the bottom part of the drain by radial flows. Therefore, the quality and quantity of the drainage water depend on the drain depth and spacing (subsurface drainage hydraulics toward drains) and the nitrate concentration at the top and below of the drain pipe.

The investigation of different literature indicates that there is no research on modeling the environmental effects of subsurface drainage systems in terms of nitrate and ammonium losses from the sugarcane farmlands. The optimal designing of subsurface drainage systems according to environmental criteria is the procedure that presents desirable economic and environmental results due to the ability to control pollution at farm level. It would be difficult to create a balance between the increase in the subsurface drainage system density (narrow spacing and more depth) for promoting plant growth conditions and decrease in the subsurface drainage system density for reducing the nitrate and ammonium losses. It can be achieved by simulation of various scenarios of drain depth and spacing. On the other hand, to reach this purpose it is necessary a simple but comprehensive simulation model of nitrogen dynamic in water–soil–plant–drainage system. Therefore, the main objective of this study is assessing nitrate and ammonium losses and relative yield from changes in the drain depth and spacing using a simple nitrogen dynamic developed model by the system dynamic approach and selecting optimal drain depth and spacing (optimal subsurface drainage system density) according to environmental criteria (minimize the nitrate and ammonium drainage losses into the water resources) and the acceptable relative yield.

Materials and methods

To develop the model for nitrogen dynamic under a drainage system, based on the system dynamic approach it is necessary to consider two essential sub-models of hydrological and nitrogen cycle as follows.

Hydrological sub-model

For the hydrological modeling in the saturated and unsaturated zones was used the similar model of Nozari and Liaghat (2014). Briefly, the water balance model, FAO Penman–Monteith equation and Hooghoudt (1940) equation have been formulated for unsaturated conditions, potential evapotranspiration and the performance of tile drainage system, respectively. The output of hydrological sub-model includes simulation of soil moisture in different layers, upward flux, water table fluctuations and drainage rate from tile drain. The timescale of these hydrological variables is on a daily basis.

Nitrogen cycle sub-model

The two organic and inorganic (mineral) pools have been considered for the nitrogen cycle sub-model. The mineral pool includes ammonium and nitrate, and the organic pool includes soil organic compounds. Various processes have been considered in this model including the dissolution of fertilizer, nitrification, denitrification, nitrogen uptake by plant, ammonium volatilization, soil adsorption, mineralization, immobilization, upward flux, drainage and surface runoff losses. The calculation processes of nitrogen cycle model have been described in detail by Matinzadeh et al. (2016). Here are some equations in brief:

Governing equations for nitrogen transformation reaction

We assume that all the nitrogen transformations are performed in the root development zone in which soil microorganisms are active, and the kinetics of all these processes are approximated by first-order kinetics (Liang et al. 2007; Shaffer et al. 2001). The governing differential equations, describing the rate of nitrogen transformations species, are as follows:

$$C_{{{\text{NH}}_{4} }} = C_{Urea} \cdot (1 - e^{{ - k_{\text{hyd}} \cdot t}} )$$
(1)
$$C_{{{\text{NH}}_{3} }} = C_{{{\text{NH}}_{4} }} \cdot (1 - e^{{ - k_{\text{Vol}} \cdot t}} )$$
(2)
$$C_{{{\text{NO}}_{3} }} = C_{{{\text{NH}}_{4} }} \cdot (1 - e^{{ - k_{\text{nit}} \cdot t}} )$$
(3)
$$C_{\text{Ngas}} = C_{{{\text{NO}}_{3} }} \cdot (1 - e^{{ - k_{\text{den}} \cdot t}} )$$
(4)
$$\frac{{{\text{d}}({\text{ON}})}}{{{\text{d}}t}} = - \left(\frac{1}{C/N}\right) \cdot k_{\text{Net}} \cdot {\text{OC}}$$
(5)
$$C_{{{\text{NH}}_{4} }} = C_{\text{ON}} \cdot (1 - e^{{ - k_{\text{Net}} \cdot t}} )$$
(6)

In which, \(C_{\text{Urea}}\) is the amount of urea fertilizer applied (mg/L); \(C_{{{\text{NH}}_{4} }}\) is the amount of ammonium produced due to urea hydrolysis reaction (mg/L); \(k_{\text{hyd}}\) is the first-order urea hydrolysis rate constant (per day); \(C_{{{\text{NH}}_{3} }}\) is the amount of ammonia produced due to volatilization reaction (mg/L);\(k_{\text{Vol}}\) is the first-order volatilization rate constant (per day); \(C_{{{\text{NO}}_{3} }}\) is the amount of nitrate produced due to nitrification reaction (mg/L); \(C_{{{\text{NH}}_{4} }}\) is the amount of ammonium produced due to urea hydrolysis or mineralization reaction (mg/L); \(k_{\text{nit}}\) is the first-order nitrification rate constant (per day);\(C_{\text{Ngas}}\) is the amount of nitrogen gases produced due to denitrification reaction (mg/L); \(k_{\text{den}}\) is the first-order denitrification rate constant (per day); OC is the organic carbon in the soil (mg/g); ON is the soil organic nitrogen (mg/g); \(C_{\text{ON}}\) is the amount of soil organic nitrogen (mg/L); \(k_{\text{Net}}\) is the first-order net mineralization rate constant (per day); and \(t\) is the time (day).

Nitrate and ammonium transfer

All the movements and nitrate and ammonium transfer in this model including leaching to lower layers (Liang et al. 2007), nitrogen uptake by the plant (Youssef et al. 2005), ammonium adsorption by the soil particles (Groenendijk and Kroes 1997; van Genuchten et al. 1974), transferring to the upper layers due to the upward flux, losses through surface runoff and transferring to the drain pipes based on flow hydraulic toward drains are according to the following equations:

$$C_{{{\text{Leach}},{\text{NO}}_{3} }} = {\text{DP}} \times C_{{{\text{NO}}_{3} }}$$
(7)
$$C_{{{\text{Leach}},{\text{NH}}_{4} }} = {\text{DP}} \times C_{{{\text{NH}}_{4} }}$$
(8)
$$C_{{{\text{Upflow}},{\text{NO}}_{3} }} = {\text{UF}} \times C_{{{\text{NO}}_{3} }}$$
(9)
$$C_{{{\text{Upflow}},{\text{NH}}_{4} }} = {\text{UF}} \times C_{{{\text{NH}}_{4} }}$$
(10)
$$C_{{{\text{Runoff}},{\text{NO}}_{3} }} = {\text{RF}} \times C_{{{\text{est}},{\text{NO}}_{3} }}$$
(11)
$$C_{{{\text{Runoff}},{\text{NH}}_{4} }} = {\text{RF}} \times C_{{{\text{est}},{\text{NH}}_{4} }}$$
(12)
$$C_{\text{drain}} = \frac{{q_{{{\text{up}}\,{\text{drain}}}} \times C_{{{\text{up}}\,{\text{drain}}}} + q_{{{\text{down}}\,{\text{drain}}}} \times C_{{{\text{down}}\,{\text{drain}}}} }}{{q_{{{\text{up}}\,{\text{drain}}}} + q_{{{\text{down}}\,{\text{drain}}}} }}$$
(13)
$$q_{{{\text{up}}\,{\text{drain}}}} = 4k_{1} h^{2} /L^{2}$$
(14)
$$q_{{{\text{down}}\,{\text{drain}}}} = 8k_{2} D_{e} h/L^{2}$$
(15)
$$C_{{{\text{Upt}},{\text{NO}}_{3} }} = \hbox{min} \left\{ \begin{array}{l} N_{\text{demand}} \cdot \frac{{C_{{{\text{NO}}_{3} }} }}{{C_{{{\text{NH}}_{4} }} + C_{{{\text{NO}}_{3} }} }} \hfill \\ C_{{{\text{NO}}_{3} }} \hfill \\ \end{array} \right.$$
(16)
$$C_{{{\text{Upt}},{\text{NH}}_{4} }} = \hbox{min} \left\{ \begin{array}{l} N_{\text{demand}} \cdot \frac{{C_{{{\text{NH}}_{4} }} }}{{C_{{{\text{NH}}_{4} }} + C_{{{\text{NO}}_{3} }} }} \hfill \\ C_{{{\text{NH}}_{4} }} \hfill \\ \end{array} \right.$$
(17)
$${\text{UP}}_{{N,{\text{total}}}} = C_{{{\text{Upt}},{\text{NO}}_{3} }} + C_{{{\text{Upt}},{\text{NH}}_{4} }}$$
(18)
$$S_{{{\text{NH}}_{4} }} = K_{\text{D}} \times C_{{{\text{NH}}_{4} }}$$
(19)
$$K_{\text{D}} = 6 \times 10^{ - 5} \times {\text{CEC}}$$
(20)

In which, \(C_{{{\text{Leach}},{\text{NO}}_{3} }}\) and \(C_{{{\text{Leach}},{\text{NH}}_{4} }}\) are the amount of nitrate and ammonium leached from root zone, respectively (mg/L \(\times\) mm/day); \({\text{DP}}\) is deep percolation (mm/day); \(C_{{{\text{Upflow}},{\text{NO}}_{3} }}\) and \(C_{{{\text{Upflow}},{\text{NH}}_{4} }}\) are the amount of nitrate and ammonium transferred toward the upper layers, respectively (mg/L \(\times\) mm/day); \({\text{UF}}\) is upward flux (mm/day); \(C_{{{\text{Runoff}},{\text{NO}}_{3} }}\) and \(C_{{{\text{Runoff}},{\text{NH}}_{4} }}\) are the amount of nitrate and ammonium in runoff losses, respectively (mg/L \(\times\) mm/day); \(C_{{{\text{est}},{\text{NO}}_{3} }}\) and \(C_{{{\text{est}},{\text{NH}}_{4} }}\) are an empirically estimated the amount of nitrate and ammonium in runoff, respectively (mg/L); \({\text{RF}}\) is runoff rate (mm/day); \(C_{\text{drain}}\) is the concentration of the nitrate and ammonium in drainage water from drain pipe (mg/L); \(C_{{{\text{up}}\,{\text{drain}}}}\) is the concentration of the nitrate and ammonium in the upper layer of the drain pipe (mg/L); \(C_{{{\text{down}}\,{\text{drain}}}}\) is the concentration of the nitrate and ammonium in the shallow groundwater in the bottom of the drain pipe (mg/L); \(q_{{{\text{up}}\,{\text{drain}}}}\) is the water inflow to the drain from above the drain pipe (mm/day); \(q_{{{\text{down}}\,{\text{drain}}}}\) is the water inflow to the drain from bottom of the drain pipe based on radial flow (mm/day); \(C_{{{\text{Upt}},{\text{NO}}_{3} }}\) is the amount of nitrate uptake by the plant (mg/L); \(C_{{{\text{Upt}},{\text{NH}}_{4} }}\) is the amount of ammonium uptake by the plant (mg/L); \(N_{\text{demand}}\) is the daily potential nitrogen requirement based on potential nitrogen demand curve (PNDC) (mg/L); \({\text{UP}}_{{N,{\text{total}}}}\) is total actual nitrogen uptake by the plant (mg/L); \(S_{{{\text{NH}}_{4} }}\) is the amount of adsorbed ammonium to the soil particles (mg/kg); \(K_{\text{D}}\) is the distribution coefficient between liquid and solid phases of the soil (Lit/kg); and \({\text{CEC}}\) is the cation exchange capacity (meq/100 g soil).

The system dynamic model

Programming environment

In this research, Vensim Professional software was used for developing an integrated subsurface drainage system model including hydrological and nitrogen cycle sub-models. This object-oriented programming environment provides a fully integrated simulation system to conceptualize, simulate and analyze models of dynamic systems. This modeling tool with its advanced algorithms makes it possible to program more complex systems with greater ease in comparison with the other programming environments.

Model structure (stock and flow diagram)

The developed model by system dynamic approach includes two important variables of stock and flow. The stock variables are the accumulations in the system which show the state of the system, and the decisions of the system are performed based on them. The flow variables indicate the rate of changes, i.e., they are indicative of processes that make the stock variable full or empty (Sterman 2000). In this developed model, the soil profile has been defined as a stock variable that it has been divided into three layers and every layer can have different characteristics. The soil moisture, water table level, nitrogen uptake by plant, the amount of nitrate and ammonium dissolved in soil solution have all been defined as stock variables. The irrigation water, runoff, evapotranspiration, rainfall, deep percolation, upward flux, drainage rate, nitrification, denitrification, ammonium volatilization, net mineralization, the nitrate and ammonium concentration in drainage water from the drainage system have all been defined as flow variables. For instance, the inflow variable to water table level is the deep percolation from upper layers but the outflow variables are upward flux and the drainage rate. Figure 1 shows the stock and flow diagram of developed model in this study by the Vensim Professional software.

Fig. 1
figure 1

Developed model structure representation of the N-cycle in subsurface drainage system

Reducing the relative production yield due to soil water and nitrogen stresses

The subsurface drains discharge the excessive soil water from the root zone to create appropriate aeration conditions for the growth of the plant. They also increase the production yield through controlling the water table, but it also causes the loss of nitrate and ammonium needed by the plant through the drainage water. This can cause two types of stresses in the plant: One is excessive soil water stress and the other is nitrogen deficiency stress; this is because the drain depth and spacing are more effective on the height and fluctuation of water table and nitrogen and ammonium leaching from the root zone. Therefore, these stresses lead to reducing the relative yield. Thus, it is necessary to consider the effect of these two stresses on the relative crop yield. As a result, the appropriate drain depth and spacing scenario is the one that causes both reducing the nitrate and ammonium drain losses and would not lead to the meaningful reduction in relative crop yield due to these stresses.

Excessive soil water conditions stress

The high level of water table and the resulting excessive moisture in the root zone causes the changing in many processes effective on plant growth that leads to product decrease. These conditions cause nitrogen and phosphor uptake reduction by the plant. Therefore, each plant has a threshold water table depth with regard to its physiologic conditions and root development depth. The sum of excess water (SEW) in the root zone of plant is calculated as following:

$${\text{SEW}} = \sum\limits_{j = 1}^{m} {(d_{c} - X_{j} )}$$
(21)

In which, \(X_{j}\) is the average distance from the soil surface to the water table level during day j (cm); \(d_{c}\) is threshold water table depth (cm); and m is the number of days in a growth stage that negative terms inside the summation are neglected.

The stress day index (SDI) model was used to quantify the effect of excessive soil water conditions stress on corn yield as following:

$${\text{SDI}} = \sum\limits_{i = 1}^{n} {({\text{CS}}_{i} \times {\text{SEW}}_{i} )}$$
(22)
$${\text{YR}}_{\text{WS}} = {\text{YRDMAX}} - {\text{DSLOPE}} \times {\text{SDI}}$$
(23)

In which, \({\text{SDI}}\) is the stress day index for excess water conditions (cm/day); \({\text{SEW}}_{i}\) is the sum of excess water in the growth stage \(i\) (cm/day); \({\text{CS}}_{i}\) is the crop susceptibility factor in the growth stage \(i\) that is typically higher during the early to middle parts of the growing (dimensionless); \(n\) is the number of growth stage; \({\text{YRDMAX}}\) is yield intercept (%);\({\text{DSLOPE}}\) is the slope of the linear relationship relating excess water stress to relative yields (dimensionless); and \({\text{YR}}_{\text{WS}}\) is relative crop yield due to excessive soil water stress (%).

Gayle et al. (1987) suggested the threshold water table depth to be 45 cm for sugarcane and recommended the crop susceptibility factors (CS) under the excessive soil water stress according to Table 1.

Table 1 Crop susceptibility factors (CS) for sugarcane under excessive soil water conditions
$${\text{SEW}}_{45} = \sum\limits_{j = 1}^{m} {(45 - X_{j} )}$$
(24)

In which, \({\text{SEW}}_{45}\) is the sum of excess water above the 45-cm depth.

In this research, the equation of Gayle et al. (1987) was used for modeling of the relative sugarcane yield under excessive soil water stress as follows:

$${\text{YR}}_{\text{WS}} = 100 - 0.03 \times {\text{SDI}}$$
(25)

In which, the parameters are defined previously.

Nitrogen deficiency stress

The total need of the plant to nitrogen during its growing season is called nitrogen uptake demand. If the total mineral nitrogen in the soil solution is not sufficient for the plant potential nitrogen demand, the plant will face a nitrogen stress. In this way, the actual uptake of nitrogen is equal to the total available mineral nitrogen in the soil. Therefore, the relative crop yield due to nitrogen deficiency stress can be calculated by (Shaffer et al. 2001):

$${\text{YR}}_{\text{NS}} = \frac{{{\text{actual}}\,N\,{\text{uptake}}}}{{N\,{\text{uptake}}\,{\text{demand}}}} \times 100$$
(26)

In which, \({\text{actual}}\,N\,{\text{uptake}}\) is the total amount of nitrogen uptake by the plant in growing season (kg/ha); \(N\,{\text{uptake}}\,{\text{demand}}\) is the potential nitrogen demand of the plant in growing season (kg/ha); and \({\text{YR}}_{\text{NS}}\) is the relative crop yield due to nitrogen deficiency stress (%).

Therefore, the overall relative yield (\({\text{YR}}\)) is obtained according to the following formula:

$${\text{YR}} = \frac{{{\text{YR}}_{\text{WS}} \, \times \,{\text{YR}}_{\text{NS}} }}{100}$$
(27)

Model evaluation

Research Area

For evaluating and testing the developed model, the data collected in 2011 from B-129 field with an area of 21 hectare located in Imam agro-industrial Company (one of the seven sugarcane development Companies) in Khuzestan province, Iran, were used. This zone is part of the Khuzestan Shoeibieh Plain with the total area of 15,800 hectares that has the shallow groundwater with tile drainage system and located in 40 km distance in the south of the city of Shushtar and 50 km of the city of Ahvaz (31º37′N to 32º00′N, 48º05′E to 48º37′E; 42 m altitude). The agricultural farmlands in sugarcane cultivations and industrial centers have been divided into pieces of 21 and 25 hectares, i.e., (\(250 \times 850\)) and (\(250 \times 1000\)) that include 480 farmlands. The annual average rainfall in this region is 266 mm, the average annual evaporation is 2800 mm, and the average annual temperature is 24.5 °C.

The model input data

The necessary input data for the model include drainage system information, soil properties, meteorological parameters for calculating the potential evapotranspiration by FAO Penman–Monteith equation, crop parameters, water nitrogen planning management including the daily amount of irrigation water, the daily rainfall depth, the amount and time of fertilizer application and the first-order rate constant of nitrogen transformation reactions. The initial value of the first-order rate constants is selected from the literature, and the final value of the first-order rate constants is obtained through model calibration as follows: \(k_{\text{Vol}}\) = 0.052, \(k_{\text{nit}}\) = 1.83, \(k_{\text{den}}\) = 0.025 and \(k_{\text{Net}}\) = 0.00006. The input data were obtained from field measurement.

The input data for the developed model included the information regarding the drainage system (drain spacing 75 m, drain depth 2.1 m, drain radius 160 mm, impermeable depth 7.5 m); soil physical and chemical characteristics (water content at saturation 41.22%, water content at field capacity 26.25%, water content at permanent wilting point 15.63%, dry soil bulk density 1.66 g/cm3, upward flux parameter 1.9 1/mm, clay soil 37%, silt soil 51%, saturated hydraulic conductivity 1.61 m/day, average initial OM content in soil 1.53%, average initial OC content in soil 1.09%, average initial ON content in soil 0.085%, soil C/N ratio 12.7%, pH 7.65, ECe 2.24 dS/m, \(K_{\text{D}}\) distribution coefficient 2.4 lit/kg, CEC 17.3 cmol/kg); crop parameter (\(k_{{C,{\text{ini}}}}\) = 0.41, \(k_{{C,{\text{mid}}}}\) = 1.15, \(k_{{C,{\text{end}}}}\) = 0.9, maximum root depth 1 m, potential sugarcane yield 130 ton/ha, N content in sugarcane shoots and roots 1.24%, maximum nitrogen uptake by sugarcane 125 kg/ha, potential nitrogen demand curve includes relative growing season and relative N-uptake 0.1, 0.05; 0.2, 0.16; 0.3, 0.30; 0.4, 0.46; 0.5, 0.62; 0.6, 0.77; 0.7, 0.89; 0.8, 0.96; 0.9, 0.99; 1, 1, respectively) and the amount of urea fertilizer applied to 450 kg/ha in the form of fertigation during 09 May, 01 June, 19 June and 14 July, respectively. The amount of utilized fertilizers was in accordance with conventional recommendation in Imam agro-industrial Company.

Subsurface drainage system designing scenarios (drain depth and spacing)

The optimal designing and managing the subsurface drainage systems play an important role in reducing the concentration of nitrate and ammonium in drainage water. Therefore, depth and spacing of subsurface drains are two important parameters in designing drainage systems that play a determining role in both production yield and drain environmental quality impacts. Therefore, in this study, 24 scenarios for subsurface drainage system designing modeling have been implemented that include the combination of four different drain depths (1.1, 1.4, 1.7 and 2 m) and six drain spacing (50, 60, 70, 80, 90 and 100 m) to compare the effect of drain depth and spacing on the nitrogen uptake by plant, denitrification process, net mineralization, the amount of ammonium losses through runoff, nitrate and ammonium losses through drainage water, the sum of excessive water (SEW45), the stress day index (SDI) and the relative yield.

Results and discussion

The cumulative drainage rate and the nitrate and ammonium losses in drainage water

Figure 2 illustrates a comparison between the observed and the simulated data of the cumulative drainage rate and nitrate and ammonium losses in drain outflow during the 203 days of the research. The observed cumulative amount of drainage rate, and nitrate and ammonium losses in drain outflow are equal to 1708.8 mm, and 179.1 and 57.7 kg/ha, respectively, while the predicted amount by the model are 1696.0 mm, and 176.1 and 54.6 kg/ha, in which the error percentage of simulation is 0.7, 1.7 and 5.4, respectively. Moreover, the Nash–Sutcliff efficiency (NSE) and normalized root-mean-square error (NRMSE) coefficients for drainage rate and nitrate and ammonium losses in drainage water were also calculated that were equal to 0.99, 0.99, 0.98 and 0.02, 0.06, 0.07 which is indicative of the fact that the model is well able to simulate drainage rate and nitrate and ammonium losses in drainage water. Figure 2 indicates well that the observed and simulated data match well with each other. Moreover, the model is well capable of simulating the trend of the cumulative drainage rate and nitrate and ammonium losses in the drain outflow in the field scale.

Fig. 2
figure 2

Comparison between simulated and observed data of the cumulative drainage rate, nitrate and ammonium losses from subsurface drainage system

Additionally, for developed models based on system dynamic approach, the adherence of the model behavior and trends to the observed data is sufficient for the success and verifications of the model (Sadeghi et al. 2015; Simonovic 2000). Therefore, it is possible to use this calibrated and verified model for simulating and investigating various scenarios of the effects of the drain depth and spacing on nitrate and ammonium losses.

Assessing the various drain depth and spacing scenarios

The results of modeling 24 combination of drain depth and spacing scenarios are presented in Table 2 and Fig. 3. As shown in Table 2, by increasing the drain spacing, the nitrogen losses in the form of the runoff and denitrification process will increase. This is because the increase in the drain spacing would reduce the drainage rate and accordingly risen ups the water table level that leads to decreasing the infiltrated water into the soil and more water is discharged from the farm due to runoff.

Table 2 Modeling nitrogen losses and relative crop yield in different scenarios of drain depth and spacing (applied urea fertilizer was 450 kg/ha)
Fig. 3
figure 3

Modeling of the relative crop yield, SDI, nitrogen losses through runoff, denitrification and subsurface drainage system in different scenarios of drain depth and spacing (the amount of applied urea fertilizer was 450 kg/ha)

Thus, denitrification process would increase due to waterlogging; ammonium losses in the runoff would increase due to producing more runoff. Moreover, with increasing the spacing between the drains, the amount of nitrate and ammonium losses through the drainage water would decrease. The reason is that due to the formation of more runoff, less ammonium is entered into the soil on the one hand, and on the other hand due to reducing the drainage rate and decreasing the leaching, the nitrate and ammonium drainage losses will also decrease. Additionally, through increasing the drain spacing, the amount of SEW45 and SDI will increase due to the rise of the water table level and getting closer to the soil surface. As a result, the excessive soil water stress would be more and the relative yield would be less.

Meanwhile, Table 2 indicates that with increasing the drain depth, the nitrogen losses will be decreased in the form of runoff and denitrification process, since increasing the drain depth would lead to the increment in the volume of the soil water storage, increase in infiltration water into the soil. The result is that the drainage rate will increase that leads to lowering the level of the water table and reducing the runoff losses. Therefore, denitrification process would decrease because of the more aeration in the soil; ammonium losses in the runoff would decrease due to decreasing runoff losses. Moreover, the drain depth increase would add to the nitrate and ammonium losses through drainage and this is because of the fact that through the less runoff creation, more ammonium enters into the soil on the one hand, and due to the increasing of the leaching and the rate of the drainage outflow, nitrate and ammonium losses in drainage water will be more.

Additionally, by increasing the drain depth the amount of SEW45 and SDI would decrease, the soil excessive water stress decrease and the relative yield will increase, and this is because of lowering water table level and increasing its spacing from the soil surface.

To summarize, the highest nitrogen losses are due to runoff and denitrification process; the lowest total nitrate and ammonium losses through the drainage water are related to the combination of drain depth and spacing scenario of (1.1, 100 m) that equal to 110.4, 135.7 and 30.4 kg/ha, respectively. Meanwhile, the lowest amount of nitrogen losses is due to runoff and denitrification process and the highest amount of nitrate and ammonium losses through the drainage water is in the combination of drain depth and spacing scenario of (2.0, 50 m) that are equal to 0.6, 35.6 and 236.3 kg/ha, respectively.

Moreover, the highest amount of SEW45 and SDI and the lowest relative yield are in scenario of (1.1, 100 m) that are equal to 2051.2, 455.3 (cm/day) and 83%, respectively. The lowest amount of SEW45 and SDI and the highest relative yield are in scenario of (2.0, 50 m) that equal to 53.7 and 11.7 (cm/day) and 100%, respectively.

This modeling results of drain depth and spacing affecting on crop yield and nitrogen drainage losses are similar to the field drainage experimental results that carried out by Darzi-Naftchalia et al. (2013), Alibakhshi et al. (2013) and Darzi-Naftchalia and Shahnazari (2014).

As shown in Fig. 3, through increasing drainage system density (narrow spacing and more depth), the amount of nitrogen losses in the form of runoff and denitrification will decrease and nitrate and ammonium losses through the subsurface drainage will increase. The amount of SEW45 and SDI are reduced, and relative crop yield will increase. Therefore, the worst-case scenario in terms of nitrate and ammonium losses through drainage water is related to the highest drainage system density (scenario of 2.0 m depth and spacing 50 m). The worst-case scenario in terms of relative production yield and nitrogen losses through runoff and denitrification is in the less density of drainage system (scenario of 1.1 m depth and spacing 100 m).

According to Table 2 and Fig. 3, the amount of the nitrogen losses are high both through runoff and denitrification and also through subsurface drainage system, and this is because of the excessive use of urea fertilizer in the Imam agro-industrial Company (applied urea 450 kg/ha). Therefore, it is not possible to determine the optimal drainage system density. Thus, to achieve this purpose, it is necessary first to apply an optimum urea fertilizer. The optimal drainage system density as for a combination of drain depth and spacing is the one that both reduces the nitrogen losses through runoff, denitrification and drainage to the environment and increases relative production yield at an acceptable level economically (90% relative yield).

As mentioned previously, in order to determine the optimal density in the subsurface drainage system, it is necessary first to apply an optimized fertilizer in the farmland. Abbasi et al. (2015) and Matinzadeh et al. (2016) recommended 210 kg/ha of optimized urea fertilizer for the sugarcane in Imam agro-industrial Company that should be applied during 4 split according to conventional fertilization timing in this area. Thus, different scenarios of drain depth and spacing with 210 kg/ha of applied urea fertilizer were modeled to choose the optimum drainage system density. The results are presented in Table 3 and Fig. 4.

Table 3 Modeling nitrogen losses and relative crop yield in different scenarios of drain depth and spacing (applied urea fertilizer was 210 kg/ha)
Fig. 4
figure 4

Modeling of the relative crop yield, SDI, nitrogen losses through runoff, denitrification and subsurface drainage system in different scenarios of drain depth and spacing (the amount of applied urea fertilizer was 210 kg/ha)

As shown in Table 3 and Fig. 4, the trend of relative yield and nitrogen losses through runoff, denitrification and drainage to the drain depth and spacing is similar to Table 2 and Fig. 3. So that through increasing drain spacing and reducing drain depth (reduction in drainage system density), nitrogen loss in the form of runoff and denitrification would increase; the nitrate and ammonium losses through the drainage water would decrease. Moreover, SEW45 and SDI would increase and relative yield would reduce. The amounts of net mineralization, SEW45 and SDI for modeling different scenarios of combined depth and space for the amounts of 450 and 210 kg/ha of applied urea fertilizers are similar to each other, since the amount of the soil organic materials and the amounts of irrigation water in the two mentioned amounts of fertilizers have not been changed. Therefore, the trend of changes in these parameters to different amounts of applied fertilizers is constant and in both cases they are equal to each other.

According to the results of this research and the environmental criteria, for reducing the nitrate and ammonium losses from the drainage system, drain spacing should be increased and the depth should be decreased. Therefore, in this area for the optimized density of drainage system the depth is 1.1 m and the spacing is 80 m, so that the total drainage losses of nitrate and ammonium would reduce to less than 25 kg/ha and the relative production yield would be kept at 90%.

In this optimum density of the drainage system, only a reduction of 10 percent of the relative yield, the total amount of nitrate and ammonium drainage losses would decrease by 71.3% for 450 kg/ha of applied fertilizer and 91.2% for 210 kg/ha of fertilizer. Therefore, this has a significant effect on reducing the nitrogen pollution load into the water resources and environment.

Conclusion

In this research, a simple but comprehensive developed model for water cycle and nitrogen dynamics in farmlands under subsurface drainage systems was used to simulate the effect of drain depth and spacing on nitrate and ammonium losses by system dynamic approach. The optimum designing of the drainage systems according to environmental criteria is the procedure that can present appropriate economic and environmental results due to pollution control in the farm level. The results of this research indicated that any combination of drain depth and spacing has both some advantages and disadvantages. More density of drainage system would cause the production yield increase, denitrification process reduction, reducing nitrogen losses through the runoff, increasing the drain installation costs and increasing nitrate and ammonium losses through the drain (increasing of fertilizer losses). On the other hand, less density in the drainage system would result in reducing the relative crop yield, increasing denitrification process, increasing nitrogen losses through the runoff, reducing the drain installation costs and reducing nitrate and ammonium losses through the drainage water (reducing the fertilizer losses). Therefore, it is recommended to change the attitude toward the principles and criterion for designing the drainage systems, from economic criteria to environmental standards.

In order to create a win–win strategy between the farmers and the environment, a drainage system should be designed in a way that besides creating appropriate conditions for the acceptable production yield, it can also reduce nitrate and ammonium leaching into the surface- and groundwater. Therefore, this model can be used for developing drain depth and spacing strategies to achieve the desired amount of yield and the environmental objectives in agricultural lands with drainage system.

Another advantage of this developed model is that it is possible to use it for fertilizer management through modeling different fertilizer scenarios and selecting optimum amount of fertilizer for reducing nitrate losses into the environment and decreasing its negative environmental impacts which this is an environmental management procedure in region under drainage network.

Moreover, the system dynamics approach was found to be a suitable tool for simulating most of the known processes of dealing with complex systems of nitrogen and water–soil–plant–drainage. The benefits and advantages of this approach include significantly fast development of the model development, ease of the model improvement, flexibility, ease of use and the ability to accurately analyze the data. The merits of the developed model include both running significantly faster and requiring significantly fewer inputs data than other simulating models.