MY SIRR: Minimalist agro-hYdrological model for Sustainable IRRigation management—Soil moisture and crop dynamics

The paper introduces a minimalist water-driven crop model for sustainable irrigation management using an eco-hydrological approach. Such model, called MY SIRR, uses a relatively small number of parameters and attempts to balance simplicity, accuracy, and robustness. MY SIRR is a quantitative tool to assess water requirements and agricultural production across different climates, soil types, crops, and irrigation strategies. The MY SIRR source code is published under copyleft license. The FOSS approach could lower the financial barriers of smallholders, especially in developing countries, in the utilization of tools for better decision-making on the strategies for short- and long-term water resource management. © 2017 Published by Elsevier B.V.


Motivation and significance
Water supply is becoming more and more critical to meet current and foreseeable water demands [1,2]. With vast regions already experiencing water shortages, it is becoming imperative to manage sustainably the available water resources, especially in relation to agriculture. Globally, irrigated agriculture is the primary user of freshwater, accounting for nearly 85% of total water consumption [3], and providing about 40% of the total food production [4]. Higher pressures on water for food production may be expected to develop because large segments of the populations in the emerging countries will tend to raise their living standards [5]. Hence, irrigation is projected to increase in face of climate change, Nomenclature R(t) rainfall λ mean frequency of rainfall events I(s(t)) irrigation input to soil water balance T mean daily mean temperature n/N daily relative sunshine duration p mean daily percentage of annual daytime hours e a mean daily ambient vapor pressure c n the numerator constant for the reference crop type and time step slope of the saturated vapor pressure curve Z r active soil depth ET (s(t)) soil water losses through evapotranspiration s * point of incipient stomatal closure, when plant transpiration is reduced s w wilting point, corresponding to irreversible damages to plants s 1 soil moisture level at which deep percolation and runoff losses take placẽ s soil moisture ''intervention point'' triggering an irrigation application ET seas total evapotranspiration over the growing season Y crop yield a EMP steepness parameter the of the seasonal evapotranspiration-yield function a DIC Crop-specific response to water limitation ρ (s (t)) maximum normalized evapotranspiration loss rate g (s (t)) simplified rate of crop biomass change EW effective use of water b (t) crop biomass WP water productivity α mean depth of rainfall events T seas length of the growing season ET 0 reference evapotranspiration RH min minimum daily relative humidity U d daily mean wind speed R n Net radiation flux e s mean saturated vapor pressure c d the denominator constant for the reference crop type and time step ET max evapotranspiration rate under well-watered conditions n soil porosity E A irrigation application efficiency coefficient s fc soil field capacity, i.e. soil moisture level at which deep percolation and runoff losses take place, above which deep percolation is non negligible s (t) relative soil moisture ranging from 0 (perfectly dry soil) to 1 (soil saturation) R tot = αλt seas total rainfall over the growing season s ''Target level'' to which soil moisture is replenished by an irrigation application η = ET max /(nZ r ) maximum normalized evapotranspiration loss rate Et seas50% total seasonal evapotranspiration corresponding to Y max /2 Y max maximum crop yield agricultural management at spatial scales ranging from the single field level to regional scales [6][7][8][9]. On the other hand, smallholders need reliable, parsimonious and flexible tools to support them to decide the management strategy more useful for their needs. At on-farm level, the tool complexity should be set into relation to the effort required to apply that model and should reflect farmers' flexibility in coping with uncertainty to maximize yields and profit. A (FOSS) free and open source approach could lowering the financial barriers of smallholders to utilize tools and software that can lead to better decision-making especially in developing countries [10,11]. FOSS tool could promote leanings generate a guided discovery for the smallholders that can examine and experiment with software. Moreover, these tools are typically published for free and their source code is open with end-user rights to run the program for any purpose, to study how the program works, to adapt it, and to redistribute copies including modifications. The availability of the source code and the right to modify it is very important. It enables the unlimited tuning and improvement of a software product. It also makes it possible to port the code to new hardware, to adapt it to changing conditions, and to reach a detailed understanding of how the system works.

MY SIRR model
In this paper, we present a decision support tool at farm scale, called MY SIRR (Minimalist agro-hYdrological model for Sustainable IRRigation management), based on the description of the soil water balance and crop development, explicitly accounting for the randomness in the hydro-climatic forcing and the essential nonlinearities of the soil-plant-atmosphere system. This tool incorporates simple and widely applicable formulae with parsimonious inputs clearly showing the effects of climate, irrigation strategy, crop, and soil features on agro-ecosystems. The relatively few, physically based parameters make MYSIRR suitable for designing and assessing the feasibility of new agricultural initiatives and investigating the effect of climate change on existing agricultural practices. MY SIRR is based on the methods developed by stochastic ecohydrology [12] in order to realize a simple, widely applicable agro-hydrological tool designed to inform farmers, especially from the developing countries or smallholders, for water-related agricultural management. The ecohydrological approach, traditionally focusing on natural ecosystems, has the potential to offer a quantitative tool to assess and compare agricultural enterprises across climates, soil types, crops, and irrigation strategies, accounting for nonlinear interactions and temporal stochasticity, while smoothing out spatial heterogeneities through spatially lumped representations. In this manner, MYSIRR hopes to achieve predictions that are robust to parameter uncertainties and are easily transferable to future climatic conditions. On one hand, MYSIRR have similar functions to other available software, such as CROPWAT [13], that can be used to predict water availability and crop response to current and future agro-climatic conditions. On the other hand, in this respect, MYSIRR has the peculiarity to developing optimized irrigation schedules, maximizing Water Productivity, (that is considered, according to [14], the inverse of Water Footprint), for different climate scenarios carrying out future climate scenario analyses. This could help drive strategic action toward sustainable, efficient and equitable water use with reference to water productivity, yields, water requirements, and their variability (a crucial element for food security and resource allocation planning).
As in previous ecohydrological models (e.g., [12,15]), the physical interpretation of the processes is at the daily time scale, assuming that all sub-daily variability has been averaged out in defining the daily fluxes. At this scale, rainfall, percolation, and concentrated irrigation events may be conveniently treated as impulsive, thus considerably simplifying the results without compromising the realisms of the description. For a given vegetation cover, the losses by evapotranspiration are controlled by atmospheric water demand, which sets the maximum transpiration under wellwatered conditions, and by soil moisture, which reduces transpiration through stomatal closure and reductions in plant and soilto-root hydraulic conductivities as the soil dries [16,17]. The model does not account for the effects of groundwater table movements, slope, pests and diseases. Moreover, we assume that plant productivity is not nutrient limited and do not discuss salinity problems

Model components and input
MY SIRR uses fairly intuitive input variables, either widely used or largely requiring simple methods for their determination. The input files contain the characteristics of the crop, of the environment (climate, soil), of the human\pressures (management) in which the crop is cultivated, and of the initial conditions. Input consists in diverse comma-separated values (csv) or eventually Microsoft excels files, easily managed, that are organized in a project file, encoding in eXtensible Markup Language (XML), which includes all the required information for a simulation run. The input data, which are summarized schematically in Fig. 1, consist of the following components: For each day of the simulation period, MY SIRR requires rainfall, and reference evapotranspiration (ET ) in mm as a measure of the evaporative demand of the atmosphere. Additionally, MY SIRR provides the possibility to calculate the ET using the Penman-Monteith equation [18] or using the Blaney-Criddle method [19]. Moreover, the model allows estimating the rainfall amount and frequency with a stochastic approach, if measured data are not available At the daily level, rainfall events (mm/day) may be assumed to occur according to a marked Poisson process [20], with mean frequency of events λ (express in day −1 ), and with exponentially distributed event depths, with mean depth α (mm).
It provides the only stochastic forcing to the coupled soil moisture crop development dynamics. During each growing season, a specific realization of the rainfall forcing produces a random soil moisture trajectory, and hence a random crop development path and a final yield. This stochastic approach accounts for the key role of rainfall unpredictability on crop yields without rely heavily on computationally intensive numerical simulation, evaluating seasonal rainfall as R tot = αλT seas .

(b) Soil characteristics
The soil is modeled as a horizontal layer of depth Z r with homogeneous characteristics. The product of soil depth, that in the model is associated to the crop roots depth, and porosity gives the active soil depth which is height (or volume per unit surface area) available for water storage. From a physical viewpoint, the active soil depth controls the response time of the system. Different values of active soil depth greatly affect the interaction of soil and vegetation with the climate forcing, and, hence, crop dynamic and yield. Vertically averaged approaches have been advocated [21] for their parsimony, which allows a direct analysis of the interplay of the main processes, and provides an ideal starting point to include external, random hydroclimatic fluctuations in the analyses of soil water.
The input soil parameters needed by the model are: volumetric water content at field capacity (s fc ), permanent wilting point (s w ), soil moisture level corresponding to incipient stomatal closure (s * ) and soil porosity (n).
Usually, local surveys or monitoring should be carried out in order to assess the variability of these parameters at farmer scale. The estimation of these parameters through field or laboratory measurements is often difficult and costly. In case these information could not be available, a dataset of literature values of the model parameters for several type of soil and crop are provided by authors. Moreover, it is also possible to derived data with the help of pedo-transfer functions (see for example The Hydraulic Properties Calculator on the web: http://hydrolab.arsusda.gov/soilwater/ Index.htm). These functions are based on primary particle size distribution of the different soil textures. Since these functions depend on texture class only, they do not account for differences in soil aggregation and should be taken as rough approximations.

(c) Crop parameters
The model uses a small number of crop parameters, (e.g. the biologic correction factor (K c ), that takes into account the species and the development stadium of plant, the active rooting depth (Z r )), the maximum yield (Y max ), i.e. the asymptotic yield, to characterize the crop with its development, growth and yield processes.
After emergence, the crop grows and develops over its growth cycle by expanding its canopy and deepening its root system, transpiring water and cumulating biomass. In addition to the effect of evapotranspiration rate on crop growth, the crop development during the growing season can be interpreted as a dynamical system forced by the stochastic rainfall, mediated by the soil moisture balance over the rooting zone. The crop yield, as a function of available rainfall and applied water and plant transpiration, is calculated here through an empirical relationship (crop productivity function) proposed by Vico and Porporato [22] or it is idealized as a dichotomic process [9]. Although using data from different studies in different parts of the world have given confidence that most of the fundamental parameters considered to be conservative will be applicable even to different cultivars, genetic differences among species could require calibration of the model for each species.

(d) Management practices
The proposed model includes both natural and anthropogenic water input to assess the crop water productivity at the field to farm level. Management options include the definition of the schedule by specifying the time, depth of the irrigation water and the selection of water application methods (i.e. sprinkler, surface, or drip either surface or underground). The latter is defined by the introduction of the irrigation application efficiency coefficient, E A , which accounts for non-beneficial fluxes associated with an irrigation application. Usually, application efficiency does not exceed 50% for surface systems, is around 80% for sprinkler irrigation, and may reach or even be above 90% for drip irrigation (as, e.g., reported by Trout and Kincaid [23]). Moreover, MY SIRR offers the flexibility to optimize the irrigation frequency and amount focusing on sustainable, efficient and equitable water use through the maximization of Water Productivity (WP), considered, here, the inverse of Water Footprint, according to [14]. This, may held farmers in defining efficient irrigation strategies. In this case, the irrigation is considered an instantaneous water application, (at daily time scale), triggered by crop and soil water status reaching a defined threshold. Depending on the set level of plant or soil water status at which an irrigation application is initiated, either stressavoidance or deficit irrigation may be performed.
When running a simulation, the user can track changes in soil water content, components of soil water balance, plant water stress, yield and water productivity. The key simulation results are displayed in multiple graphs and an output comma-separated value (csv) or eventually Microsoft excels file, that can help the user to discern the consequences of input changes, to analyze the simulation results and for further processing and analysis. MY SIRR is designed also for iterative runs with different input data, e.g. diverse alternatives for irrigation management practice. Hence, MYSIRR could support the decision for choosing the practices that the user judges optimal for its purpose.

Algorithms and calculation procedures
MY SIRR has a structure that overarches the soil-plantatmosphere continuum. It includes the soil (with its water balance), the plant (with its development and yield processes), and the atmosphere (with its rainfall, and evaporative demand). Additionally, the management aspect is explicitly considered as they will affect the soil water balance, crop development and therefore final yield. Pests, diseases, and weeds are not considered. The fundamental model components of MY SIRR, and their functions, are briefly described in the following sub-sections and summarize in Fig. 2.

Soil moisture as key variable
The starting point is the balance equations of soil water, open to natural and anthropogenic inputs and outputs, and subject to stochastic environmental fluctuations. The temporal dynamics of soil moisture in an irrigated parcel of land is solved numerically and can be effectively described by the following equation The state variable is the volumetric soil moisture s (t), (0 < s ≤ 1), averaged over a representative soil rooting zone of depth Z r of a homogeneous soil of porosity n [20]. Input to the soil water balance are rainfall, R(t), and irrigation, I(s(t)), while the main soil water losses are evapotranspiration ET (s(t)) and the combination of deep percolation and runoff LQ (s(t)). The main simplifying assumptions implicit in Eq. (1), which allow a parsimonious description of soil water balance, are no interactions between soil moisture in the rooting area and the underlying water table, negligible lateral subsurface water redistribution and uniform soil features and rooting depth. We assume that plant productivity is not nutrient limited and do not discuss salinity problems. The physical interpretation of the processes is at the daily time scale level. At this scale, rainfall, percolation, and concentrated irrigation events may be conveniently treated as impulsive, thus considerably simplifying the results without compromising the realisms of the description. Hence, through a parsimonious statistical description of hydrologic variability, rainfall R(t) is modeled as instantaneous events occurring according to a marked Poisson process of rate (mean frequency of rainfall events) λ, and with exponentially distributed depths with mean α [20]. The irrigation term I(s(t)) depends on the employed irrigation management. The main soil water losses are accounted for in Eq. (1): ET (s(t)) is the rate of loss of soil moisture due to evapotranspiration (ET ), while LQ (s(t)) combines deep infiltration and runoff losses. Daily ET is assumed to vary in time also through soil moisture. In fact, empirical evidence shows a roughly linear dependence of ET on soil moisture from basically zero at wilting point (here sw ≈ 0) up to a maximum rate ET max at the point of incipient stomatal closure and for higher soil moisture values (i.e., under well watered conditions). In the following, we will often refer to the evapotranspiration rate normalized by the active soil depth, i.e., η(s(t)) = ET max /(nZ r ). A quantitative applications a piecewise linear function with constant losses under well-watered conditions will be assumed [20]: where s 1 is a set soil moisture threshold, typically around soil field capacity (s fc ) or slightly above. This simplified description is particularly suitable for soils with medium to high hydraulic conductivities.
In Eq. (2), s * is the point of incipient stomatal closure, below which experimental evidence (e.g., [24,25]) suggests a linear decrease in plant transpiration to basically zero at plant wilting point. The possible changes in rooting depth with plant development are included through the definition of the Z r over the growing season.
Stomatal closure is an important process for the description of plant response to water deficit. The incipient stomatal closure is among the first effects of water deficit on plant physiology, while, on the other hand, complete stomatal closure only takes place at the very end of the sequence of the effects on physiology when the plant starts wilting. These proprieties make stomatal closure the ideal candidate to delimit both the starting and the maximum point of water stress.
Hence, we assume here that the plant water stress is zero when soil moisture is above the level of incipient stomatal closure, s*, and reaches a maximum value equal to one when soil moisture is at the level of complete stomatal closure (i.e. wilting point, s w ). There is a nonlinear increase of vegetation water stress with soil moisture deficit. Therefore, a reasonable form for static stress, proposed by Porporato et al. [26], is: where q is a measure of the nonlinearity of the effects of soil moisture deficit on plant conditions. This value vary with plant species and with soil type. Finally, deep infiltration and runoff losses, LQ (s(t)), are also treated here in a simplified manner, as they were by Milly [27] and Porporato et al. [28]. Accordingly, they are assumed to take place instantaneously (at the daily time scale) whenever soil moisture reaches a threshold s 1 , typically around soil field capacity or slightly above it. Thus, when (effective) rainfall exceeds the available storage capacity, max(0, nZ r (s − s 1 )), any excess is immediately lost as runoff and deep infiltration.

Irrigation frequency and volume
The irrigation requirements over the growing season in terms of frequency and water volumes can be obtained from the crossing properties of the soil moisture process (see Vico and Porporato [29] for details).
In our conceptual scheme, each irrigation treatment is instantaneous. An irrigation application is triggered whenever the soil moisture process reaches a threshold, called ''intervention point'', (s), and the amount of water applied at each treatment is determinate by the soil moisture level restored by the irrigation application (''target level'',ŝ). This generalized scheme allows us to assess the water requirements for both deficit and stress-avoidance irrigation as well as over-irrigation for soil salinity control through a proper definition of the ''intervention point'' and ''target level''. Depending on plant or soil water status at which an irrigation application is initiated, either stress-avoidance or deficit irrigation may be performed. In the first case, the crop is always maintained under well-watered conditions, while the latter case allows a certain level of water stress to occur. As such, deficit irrigation may result in lower water requirements at the cost of yield reduction [30]. This description also includes rainfed agriculture as the extreme case when the intervention point decreases to zero. This approach allows to determine the difference in water requirements between different irrigation schemes as a function of soil, plant and climatic conditions.

Coupled soil moisture and plant dynamics
Two methods are implemented in this tool in order to describe crop yield as a function of available rainfall and applied water and plant transpiration.

A. Empirical crop productivity function
The crop development during a growing season may be seen as a stochastically forced dynamical system, in which the external forcing includes hydro-climatic variables, and possibly other factors. The impact of rainfall variability on crop development and yield is mediated by soil moisture. Hence, in the absence of other limiting factors and disturbances, the crop developmental level at any time during the growing season may be assumed determined by the history of soil moisture, because of the coupling of the latter to leaf water status and CO 2 assimilation, leaf elongation, flowering, and fruit production [17]. Hence, in the absence of other limiting factors and disturbances, (e.g. when adequate soil nutrients are available, and in the absence of pests and diseases), the crop developmental level at any time during the growing season is primarily controlled by water availability, and hence, may be assumed to be fully determined by the history of soil moisture.
Even if the impact of water stress on crop yield may depend on both the phenological stage in which the water deficit occurs and the extent of the deficit itself [31] as a first approximation, it may suffice here to simply assume that crop yield depends on total seasonal transpiration.
Such an assumption is supported by several experimental results, which explored the impact of irrigation timing over crop yields [32,33], by eliminating irrigation applications over one or more crop phenological stages, and measuring the corresponding total seasonal evapotranspiration, ET seas , and yield.
These linkages are at the basis of often employed empirical relations to quantify crop yields, as a function of total seasonal evapotranspiration, ET seas . When the above description of soil moisture dynamics is used to obtain ET seas , i.e. total evapotranspiration over the growing season, these empirical relations allow the quantification of the average yield Y , as a function of crop and soil features, irrigation strategy, and rainfall pattern. Moreover, the productivity function does not depend only on the selected crop, but also on crop cultivar, soil features and management, nutrient availability and climatic conditions, as evident when comparing data from different literature experiments [22,32,33]. In particular, Vico and Porporato [22] has fitted the observed transpiration-yield patterns by the following empirical crop water productivity function, used in MY SIRR: where Y max represents the maximum yield (i.e., the asymptotic yield for very high ET seas ), i.e. total evapotranspiration over the growing season, ET seas, 50% is the ET corresponding to a yield of Y max /2, and the parameter a EMP defines the steepness of the curve.
The Eq. (4) has been showed by Vico and Porporato [22] more realistic than previously proposed linear [34] and quadratic [32] dependences and, hence, sufficiently flexible to describe, through a limited number of parameters, the observed features of productivity functions: the existence of a minimum transpiration below which yield is practically zero, a nearly linear dependence of yield on transpiration over a range of intermediate ET seas , and a decrease in slope of the Yield-ET seas relationship towards high ET seas corresponding to well-watered conditions [31].

B. Minimalist Crop Development Model: A Dichotomic Approach
An alternative, more detailed approach to the one presented above follows the actual crop development and irrigation application during the growing season [9]. Neglecting the effect of crop growth on the evapotranspiration rate, the crop development during the growing season is interpreted as a dynamical system, forced by the (unpredictable) rainfall, mediated by the soil moisture balance over the rooting zone. With an extreme simplifications of the complex mechanisms driving plant growth, crop development is described as proceeding unhampered whenever soil moisture s is above the point of incipient stomatal closure and at a lower rate otherwise.
Under these simplifying assumptions, the temporal evolution of the crop development can be recast in the form: The instantaneous rate of crop development, g(t), can then be idealized as a stationary dichotomic Markov noise, jumping between the unhampered g+ and limited growth rates value, with mean rates equal to mean crossing frequencies of the threshold s * for the soil moisture process [9]: where a DIC accounts for the crop specific response to water limitation, with higher a DIC for more drought sensitive crops. Depending on the species under consideration, may coincide or be slightly below the soil moisture level at which incipient stomatal closure is observed, Aiming here at a minimalist description of crop development, we focus on the central part of the growing season of length. We thus assume that under appropriate water and nutrient supply and in the absence of additional disturbances, crop development rate is well approximated by g(s(t)), with growth rate g+ independent of time. A nonzero initial condition for plant biomass, b 0 , is included to account for the development preceding the linear growth phase, thus rendering the model applicable to both annual and perennial crops.
For annual and perennial biomass crops (e.g., some energy and fiber crops and leaf vegetables), the crop development level is directly related to the final yield by means of an allometric constant describing the partition between root and aboveground biomass: where the linear function h [35] accounts for the partition between crop biomass and harvestable yield. A similar one-to one correspondence between crop biomass and yields can be assumed also for grain crops, because of the strong links between crop development at the beginning of grain filling and yields [36].

Water Productivity as a measure of agricultural sustainability and productivity
We focus on water productivity, WP, a measure of the efficiency with which total available water supply is transformed into marketable yield Y [14]. WP is defined here as: (8) where V + R tot is the total water input during the entire growing season, combining seasonal irrigation application V , (including losses to non-beneficial uses, e.g., inefficiencies in the water distribution), and seasonal rainfall R tot . The water productivity WP, as defined in (8), can also be interpreted as the inverse of the crop water footprint [14].

Optimal irrigation strategies for sustainability
An irrigation strategy may be considered ''optimal'' under different points of view. We focus, here, on sustainable, efficient and equitable water use. Sustainability is achieved when local and regional agricultural practices are such that land, water, and other resources are not degraded, thus providing similar opportunities in the future in terms of both available resources and their quality. Thus, focusing on sustainability with respect to water conservation, we will consider two complementary metrics: (i) the amount of irrigation water required per unit cultivated area (Irrigation Volume), and (ii) total amount of supplied water, through rainfall and irrigation, per unit crop yield (Water Productivity). Including rainfall in the second metric allows the assessment of how efficiently the cultivated crop exploits water supplied according to a certain irrigation scheme and rainfall regime and their variability.
Under this considerations, MYSIRR has a module that aims to optimize, through a grid search machine learning technique [37], irrigation frequency and amount under the constraints of WP maximization.

Model and software pilot application
The presented model is applied, in term of soil moisture spatiotemporal distribution, on a study case in South-Italy. The study was conducted in a private farm in Eboli (40 • 58'54'' N, 15 • 06'50'' E) on two orchards: 1,5 ha peach orchard and 1,5 ha kiwi orchard (Fig. 3). The software was used to describe dynamic of soil moisture in different field points, characterized by different soil proprieties, in diverse time periods.
Monitoring point have been identified by using an electromagnetic Induction (EMI) measurements by means of a multifrequency EMI sensor (GSSI Profiler EMP-400), with intercoil spacing of 1.2 m. The measurement of the apparent soil electrical conductivity (ECa) by EMI are an invaluable tool for identifying the spatial variation of soil physical-chemical properties [38][39][40]. EMI measurements was utilized to estimate the maximum statistical difference in term of soil humidity in the two orchards and, thus, it is possible to estimate homogeneous areas in the orchards that could, consequently, have similar soil characteristics. This technique permits to represents with a statistical approach the soil type micro-variability in the orchards. The EMI technique allowed selecting 5-6 sampling points (Fig. 3) in which evaluate with direct measurements the hydrological characteristics of soils utilized to validate output of MY SIRR model. Therefore, a monitoring campaign was performed to evaluate with direct gravimetric method the soil moisture in diverse time periods, i.e. from 7 of May to 25 June, for all the selected sampling points.
Moreover, a meteo-station was installed in the orchards in order to estimate the evapotranspiration through the FAO Penman-Monteith methodology [18] and obtain in situ rainfall measurement (the total rainfall amount, during the campaign measurement, was around 30 mm). Moreover, irrigation efficiency was measured using the Christiansen's Uniformity Coefficient CU [41] along the lines of the drip irrigation system installed. The in situ measurements show a CU > 0.9. The mean single application volume is around 9 mm and the irrigation frequency around 0.3 day −1 . Moreover, the observed soil moisture level at the first day of the measurement campaign was used as software initial condition.
The results in Fig. 4 show that there is a good correlation between the observed soil moisture measurements, obtained through gravimetric analysis in the selected sampling points, and simulated soil moisture dynamic, through MYSIRR, during the same studying period. Therefore, the model estimate with a good accuracy the soil moisture, that is a key variable in the model, in different soil types and crops. It demonstrates the reliability of the presented model. However, the model can be also utilized to improve the user knowledge of the soil-plant-atmosphere interaction in order to support irrigation management.

Software framework and requirements
The MYSIRR package currently consists of pure python (version 2.7) and does not require any extension modules to be built. Hence, the script works under Linux, Window and OSX operative systems. In addition, the model depends on a number of 3rd party Python packages, i.e. ''numpy'' (http://www.numpy.org/) and ''matplotlib'' (http://matplotlib.org/). The tool is composed by four main classes: the class that contains the several main functions (i.e. myfun.py) utilized in the main class (i.e. mysirr.py), that manages the input parameters to evaluate the results and, therefore, to create the outputs, and the class (mysim.py) used to read the project file and its components and run the proposed model; finally, the class mysirrGUI_mainWindow.py can be used to run the model by graphical user interface (GUI). MYSIRR is relatively easy to manipulate through a GUI and uses literature equations widely adopted within the global scientific and other user communities, thus not limiting its use to research professionals, but enlarging to farmers living in developing regions. However, expert-user can also run MYSIRR skipping the user-interface, therefore, it can facilitate multiple concurrent simulations or applications where iterative runs are required. Moreover, by running the program a project file is carried out and results are stored in output file. The project file is composed by a set of input modules in csv format. Moreover, if the user likes to utilize the input and output files as Microsoft excels spreadsheet, the script required also the ''xlrd'' (https: //pypi.python.org/pypi/xlrd) and ''xlwt'' (https://pypi.python.org/ pypi/xlwt) python package. MY SIRR source code is distributed under free and open sources GPL (GNU Public License) licenses.

Software functionalities: an illustrative Examples
The main functionalities of the model are presented in this section.
The proposed approach is based on the description of the soil water balance and crop development, explicitly accounting for the randomness of rainfall and the essential nonlinearities of the soilplant-atmosphere system.
In the proposed example, we consider a Zea mays (maize) crop, a loam soil and a dry climate with a scheduled drip irrigation management. The input consists of a project file, which contains all the required information for the simulation run. A project file is a text file that stores all the path of the input modules/files described in Section 2.1: -The climate modules contains the stochastic rainfall for a dry climate (with λ = 0.1 day −1 and α = 15 mm) and the other parameters, such as (T mean ) the mean daily temperature in • C, (RH min ) the minimum daily relative humidity in %, (U d ) the daily wind velocity in m/s, (p) the mean daily percentage of annual daytime hours, (n/N) the daily relative sunshine duration in hours, used to estimate the ET with the Blaney-Criddle method [19].
-The crop module stores the main maize parameters to estimate the maize yield with the empirical formula described in Eq. (4): (Z r ) the active rooting depth, (K c ) the biologic correction factor, (Y max ) the asymptotic yield at high Et seas , (Et seas50% ) the seasonal transpiration corresponding to 50% of the maximum yield, (a) a crop sensitive parameters that determines how steep the response of yield to declining Et seas . The values of the crop parameters are taken from Vico and Porporato [14].
-The soil modules stores the information about the (s w ) wilting point, corresponding to irreversible damages to plants, (s fc ) the soil moisture level at which deep percolation and runoff losses take place, (s * ) the point of incipient stomatal closure, when plant transpiration is reduced and (n) the soil porosity. All the soil parameters are estimated, as in [42], with the help of pedo-transfer functions (e.g. The Hydraulic Properties Calculator on the web: http://hydrolab.arsusda.gov/soilwater/Index.htm) for loamy soil. The agricultural field is treated as a matrix, in which each cell could be a part of the field with diverse soil texture and characteristics. In this example the simulation is performed only for one cell/soil type.
-The management module is used to set the time and amount of irrigation practice and type of irrigation system. The latter is taken equal to 0.9, i.e. a value of application efficiency reported by Trout and Kincaid [23] for drip irrigation system.
The initial soil moisture value is fixed, in the project file, to the field capacity in order to take into account the beneficial effects of a pre-sowing irrigation or an off-season (e.g., winter) recharge of the soil water.
The simulation can be easily run by the provided user interface or through terminal or python interpreter. The results consist of the Climate-Crop-Soil water output diagrammed in two main graphs, see Figs. 5 and 6, and stored an output file that could be easily retrieved in spreadsheets for further processing and analysis. The graphs show respectively the soil moisture, rain and irrigation time series and the time variability of evapotranspiration, varying in time through soil moisture and plant water stress, i.e. Figs. 5 and 6. The output file stores the results values for time variability of soil moisture, water plant stress, deep infiltration and runoff   4. Correlation between in situ measured and simulated soil moisture dynamic in the two orchards during the study period.

Table 1
Irrigation volumes (mm), within irrigation interval time (days) and number of applications under current (C IS ) and optimal (O IS ) irrigation schedule.

Irrigation volume (mm)
Within-Irrigation interval (days) Number of irrigations Growing season Single application IS  288  336  8  14  3 4.2 36 26 losses, LQ (s(t)), the crop development and the final yield, effective use of water, ET V +Rtot and the water productivity. In this way the user could recognize how the scheduled irrigation management and the irrigation water amount have impacted on plant stress, yield and sustainability of the chosen practice. In this light, MYSIRR offers the capability to simulate an alternative irrigation schedule (O is ) based on the maximization of WP. This alternative scheme aims to optimize the two parameters that, according to the approach proposed in Section 2.2.2, fully characterize demandbased irrigation strategies, i.e. intervention point (s) and target level (ŝ). Indeed, the difference between the target level and the intervention point is proportional to the depth of water supplied by each irrigation application (e.g., volume of water per unit area). Hence, the optimization of these two parameter directly affected the irrigation frequency and volume. Therefore, for a more comprehensive assessment of sustainability of the agricultural enterprise, the above considerations on water productivity and its components should be complemented with the quantification of yields, water requirements, in order to compare the non-optimized ''irrigation behaviour'', (C is ), against the optimized one (O is ). When irrigated under non-optimized, i.e. current, operational scheme (C is ), the crop likely suffers water deficits for most of the growing season (Fig. 5). The non-optimized (i.e., current) irrigation plan determines a water application of 288 mm per all the growing  season, while a seasonal volume of 363 mm would be supplied under the optimal irrigation schedule ( Table 1). The mean interval time between consecutive irrigations is approx. 3 days and 4.2 days the C IS and O IS schemes, respectively ( Table 1). The mean single irrigation volume substantially differs being equal to 8 mm (C IS ) and about 14 mm (O IS ) per application (Table 1). On the other hand, the calculated crop yield is approx. 6 t ha −1 and 8 t ha −1 the C IS and O IS schemes. This results are in line with the maize crop yield range provided in the FAO AQUASTAT database.
Such a lower yield, for C IS scheme, could be attributable to the largely inadequate irrigation supply [43], the relationship between yield reduction and water restriction proposed by Pérez-Pastor et al. [44] further supports this conclusion. Moreover, the value of WP has an increase of 15% in the O IS schemes. The WP increases non only depends from the increase of Y but also via a reduction in non-beneficial losses as is showed by the increase of the effective use of water (approx. 0.95 and 1.1 for the C IS and O IS schemes, respectively), i.e. the fraction of water made available to the plant that is indeed used for productive uses [45]. Fig. 7 shows the visual comparison of the soil moisture dynamic for both, i.e. C IS and O IS , schemes.
Results show that field under C IS were poorly irrigated receiving approx. 25% of the volumes simulated for O IS . Findings show that yield would be improved by application of optimal irrigation practice adopting a deficit irrigation scheme. Hence, they highlight the need for utilized of such tool for supporting stakeholder, included farmers, for designing and assessing the feasibility of new agricultural initiatives and investigating the effect of climate change on existing agricultural practices. Moreover, an approach that focuses on WP could help drive strategic action toward sustainable, efficient and equitable water use.

Conclusions
The paper presents a free and open source tool, called MY SIRR (Minimalist agro-hYdrological model for Sustainable IRRigation management), which source code is distributed on a GPL license. The conceptual framework, design, structure and key algorithms of MY SIRR have been described to highlight its distinctive features and peculiarities. The simple, widely applicable agro-hydrological tool is designed to inform farmers, especially from the developing countries or smallholders, for short-and long-term water-related agricultural management. Its parameters are explicit and mostly intuitive and the model maintains sufficient balance between simplicity and robustness. The tool accounts in a parsimonious and flexible way for the main climate, soil and vegetation characteristics, and includes the most important source of uncertainty in soil moisture with stochastic rainfall generator. Finally, MY SIRR is suitable for optimization of irrigation frequency and amount under the constrain of the Water Productivity (WP) maximization, considered, according to [14], the inverse of Water Footprint. The free and open source approach, here adopted, permits the freedom of model reuse and redistribution and, hence, this increases the possibility of improving in a collaborative environment.