Optimization of Water-Energy-Food Nexus considering CO 2 emissions from cropland: A case study in northwest Iran

Water-Energy-Food Nexus and CO 2 emissions for a farm in northwest Iran were analyzed to provide data support for decision-makers formulating national strategies in response to climate change. In the analysis, input – output energy in the production of seven crop species (alfalfa, barley, silage corn, potato, rapeseed, sugar beet, and wheat) was determined using six indicators, water, and energy consumption, mass productivity, and economic productivity. WEF Nexus index (WEFNI), calculated based on these indicators, showed the highest (best) value for silage corn and the lowest for potato. Nitrogen fertilizer and diesel fuel with an average of 36.8% and 30.6% of total input energy were the greatest contributors to energy demand. Because of the direct rela- tionship between energy consumption and CO 2 emissions, potato cropping, with the highest energy consumption, had the highest CO 2 emissions with a value of 5166 kg CO 2 eq ha (cid:0) 1 . A comparison of energy inputs and CO 2 emissions revealed a direct relationship between input energy and global warming potential. A 1 MJ increase in input energy increased CO 2 emissions by 0.047, 0.049, 0.047, 0.054, 0.046, 0.046, and 0.047 kg ha (cid:0) 1 for alfalfa, barley, silage corn, potato, rapeseed, sugar beet, and wheat, respectively. Optimization assessments to identify the optimal cultivation pattern, with emphasis on maximized WEFNI and minimized CO 2 emissions, showed that barley, rapeseed, silage corn, and wheat performed best under the conditions studied.


Introduction
Climate change is one of the most challenging environmental problems today, and the international community has devoted much effort to this issue. On the 4th of November 2016, the Paris Agreement entered into force, bringing all the nations into a common goal to reduce their Greenhouse Gas emissions and achieve a climate-neutral world by 2050. Studies have shown that increased CO 2 concentrations as one of the most critical greenhouse gases affect the Earth's climate and lead to a rise in atmospheric temperature and a decrease in rainfall. The food sector alone contributes about 35% of all GHG through energy consumption, land-use change, methane release, and nitrous oxide emissions from fertile soils [1]. Also, fossil fuels that generate two-thirds of the global CO 2 emissions remain predominant [2,3]. Furthermore, CO 2 emissions generated from energy system is expected to increase in the future as energy demand is expected to increase by 50% [4].
Lack of resources can lead to social and political instability, geopolitical conflict, and irreparable environmental damage [5]. To fulfill the needs of the world's growing population, agricultural production, including crops and livestock, must increase by about 70% by 2050 [6]. Dramatic population growth, industrialization, and urbanization, associated with extra pressure on the water, energy, and food sectors, accelerate the generation of man-made GHG emissions. As a consequence, future global warming would increase agricultural water demand (evapotranspiration) while decreasing rainfall availability, resulting in water scarcity and adverse effects on food production [7]. Water scarcity and inefficient water use are the main limiting factors for Iran's agricultural development and food production [8]. Croplands cover 12-14% of the global ice-free surface and, together with livestock, consume more than 80% of water and energy [9]. Therefore, balancing the different biomass components is considered essential in water resources management.
Climate policies affecting water, energy, and food security can be incompatible and even conflicting [5]. Demand for water, energy, and food is estimated to increase by 40, 50, and 35 %, respectively, by 2030 [10]. Given the interdependence between these components, any strategy that focuses on one sector and ignores its relationship to others may cause multiple problems [11]. Therefore, to address global challenges and threats, the United Nations developed 17 Sustainable Development Goals (SDGs) for 2030, including providing adequate water, energy, and food for all [12]. Achieving these goals requires the cooperation of all relevant stakeholders in various management departments [13].
The Water-Energy-Food (WEF) Nexus concept has emerged in the international community in response to climate change. The WEF Nexus concept created by the Food and Agriculture Organization (FAO) can engage a wide range of stakeholders [14]. It represents a new approach for assessing the interaction between water, energy, and food to meet the growing demand for limited resources without threatening the sustainability of natural resources. The WEF Nexus is a livelihood sustainability perspective that strives to balance various goals, profits, human requirements, and the environment. Comprehensive analyses that can best support decision-makers evaluating different consequences of future decisions by providing more accurate policy, planning, monitoring, and evaluation data for other sectors, are essential for sustainable development in the future [15]. Many recent studies have used a Nexus approach, including the Water-Energy Nexus [16], Water-Food Nexus [17], Water-Energy-Food Nexus [18], Integrated Water-Energy-Land Nexus [19], Nexus across Water-Energy-Food-Land Requirements [20], Investigating the Nexus of Climate-Energy-Water-Land [21], and Modeling Water-Energy-Food-Land Use-Climate Nexus [22]. In addition, including water harvesting as an essential step in the WEF Nexus has been suggested [23].
It would be beneficial to add other sectors to the WEF Nexus, requiring a great deal of coordination, cost, and experts in all sectors. Since resource use efficiency, sustainable consumption patterns, product profits, and resource limitations vary depending on the different facilities in each region, it is advisable to consider regional studies when confronting environmental problems. In this context, the WEF Nexus approach can help identify an appropriate strategy to overcome the scarcity of relevant resources in each area. However, most studies to date applying the WEF Nexus approach have focused on quality, while to gain a better understanding, the analysis needs to be focused on quantity.
Focusing solely on one of the interconnected water, energy, and food sectors creates a serious risk of overlooking their interactions. Accordingly, balancing the various critical biomass components in a WEF correlation approach is a vital pillar of water resources management. This approach can promote sustainable development and improve the quality of life for watershed communities while preserving natural and social capital to sustain long-term water resources. In this regard, the use of the WEF Nexus index (WEFNI) is recommended [24]. It can be applied annually for managing water, food, and energy, and their interrelationships, to reduce water and energy consumption and increase productivity in optimal cropping pattern strategies. Developing a cultivation pattern based on economic criteria and resources that provide essential support in meeting human needs and nature conservation goals can play a significant role in managing agriculture in a particular region. For this, the optimal cultivation pattern in the region must be identified, using the optimization techniques presented in some studies, including a graphical method for optimization water-energy Nexus [25], developed an optimization model for optimal resource allocation towards sustainable water and food security [17], optimization Water-Food-Energy Nexus in response to urbanization [26] land-use optimization for water food energy Nexus [27]. In practice, the optimization process involves many decision variables and complicated calculation steps, and therefore a computer model can be of help as long as the variables and functions can be adequately expressed in computer code [28].
Studies of optimal benefits of the WFE Nexus considering CO 2 emissions are rare. There were attempts to incorporate the CO 2 emissions in the WEF Nexus framework within the AWEFSM model targeting system profit and environmental protection and by [2] analyzing tradeoffs among economic, environmental, and carbon-abatement objectives [29]. Or optimization of water-energy-food Nexus index (WEFNI) in the field of agriculture at the watershed scale but no combination of WEFNI and CO 2 emissions [24]. Therefore, this study aimed to model short-term joint operations for a multi-objective problem in order to optimize the balance between CO 2 emissions, water consumption, energy consumption, food production, cost, and benefits during the cultivation period and improve the synergistic benefits of the WFE Nexus in coming years. A second aim was to evaluate the usefulness of the WEF Nexus approach in illustrating the interactions between water, energy, and food and in revealing ways to reduce CO 2 emissions to achieve an optimal cropping pattern. The literature on the links between water, energy, and food has increased in the past few years, but no previous study has examined their interrelationships using real farm data.

Methodology
The study area selected for the analysis was a region in northwest Iran. We applied an approach comprising three steps to identify the best cultivation pattern in terms of low water and energy consumption, high production, and low CO2 emissions (Fig. 1). First, to cover water, energy, and food interactions, we identified factors that affect the WEF Nexus and computed six indicators: water consumption, energy consumption, water mass productivity, energy mass productivity, water economic productivity, and energy economic productivity, based on actual data obtained from a farm in the study area. The second step was to calculate CO 2 emissions. The last step was multi-objective optimization with mixed-integer linear programming (MILP), and linear programming (LP) approaches comparing two scenarios: 1) cropping pattern with maximized WEFNI value; and 2) cropping pattern with minimized CO 2 emissions, i.e., the optimal cropping pattern to minimize water and energy consumption and maximize productivity. Considering these two scenarios and using the MILP and LP methods, the optimal cultivation pattern was determined based on field constraints. The data sources in the studied area are shown in Appendix A: Supplementary Section 1.1.

Study area
Real farm data were obtained from Sahand Agro-Industry Co., an arable farm (established 1996) on the Heris plain in northwest Iran (38 • 14 ′ 9 ′′ N, 46 • 57 ′ 49 ′′ E; 1379 m above sea level). The data obtained for this study covered root crops (potato and sugar beet) and oilseeds (rapeseed) grown in 2017-2018, and cereals (barley and wheat) and forages (alfalfa and silage corn) grown in 2018-2019. Other data, including labor usage, electricity, machinery, diesel fuel, fertilizers, biocide, seed, water consumption, and crop parameters, were collected in field measurement campaigns during 2017-2019 (see details in Appendix A: Supplementary Section 2.3 and Fig. S3).

Evaluation indicators
In the first step, input-output data for quantifying WEFNI were collected for all products per unit area on the study farm. The six indicators (water consumption (W c,t ), energy consumption (E c,t ), water mass productivity (W pro,t ), energy mass productivity (E pro,t ), water economic productivity (W E.V.,t ), energy-economic productivity (E E.V.,t )) were then calculated based on a study by El-Gafy [18]. Given that the energy consumption indicator representing energy and water interconnection; water consumption, water mass productivity, and water economic productivity indicators showing the water and food interconnection, and energy consumption, energy mass productivity, and energy economic productivity indicators are measuring the energy and food interconnection, WEFNI value was utilized to evaluate the relations between water, energy, and food. WFENI provides an indicator for decision-makers of the performance of water-food-energy management by integrating the major variables of the Nexus. Its significance is that it integrates several aspects that reflect major concerns in the Water-Energy-Food Nexus into a single number that can be applied as a tool to assess and compare strategies [18] (see the detailed methods in Appendix A: Supplementary Section 1.2 and Table. S1).
The water consumption indicator (W c,t ) considered was water consumption (including irrigation water and rainfall) per hectare of crop c at time t. The energy consumption indicator (E c,t ) considered was energy consumption per hectare of crop c at time t, calculated as: Water and energy-mass productivity were used as indicators to show food crop production per unit of water and energy consumed, respectively (Eqs. (2) and (3)): The economic productivity of irrigation water (W E.V.,t ) and energy (E E.V.,t ) at time t was calculated as: The average values of indicators 1-6 were calculated as WEF Nexus index (WEFNI), using Eq. (6) (see the detailed methods in Supplementary Section 1.2.).

CO 2 emissions
In the second step, the CO 2 emissions from all production units were calculated using the CO 2 emissions coefficient for agricultural inputs obtained from the various literature sources. The input data were collected in field measurement campaigns during 2017-2019. The quantity of CO 2 (CO 2 eq) produced was calculated by multiplying the input application rate (diesel fuel, chemical fertilizer, biocide, water for irrigation) by the emissions coefficient (given in Appendix A: Supplementary Section 1.3 and Table. S2).

Optimization
The last step aims to optimize the WEFNI among other production per unit by considering the CO 2 emissions for a given farm. Optimization is a technique to find optimal solutions by adjusting decision variables to maximize or minimize an objective function [30]. This study used the MILP and LP approaches, which optimize agricultural inputs and outputs to increase WEFNI under a wide range of constraints. The model optimizes the links between different agricultural inputs to achieve water, energy, and food security objectives. The first and second objective functions (Eqs (9) and (10)) were used, respectively, based on the WEFNI and CO2 emissions data. First, considering that only four crops can be harvested in the field, using the MILP model and selecting variables as binary, four crops were chosen from among the seven crops studied. Optimization was then performed between these four crops using the LP solver.
Next, the area constraints for different production units were defined. Each objective in Eqs. (9) and (10) can be solved directly to optimality using global MILP and LP solvers through the R software. This study used information for the study farm (Sahand Agro-Industry Co.) for the optimization procedure. The constraints in optimization were defined as a total cultivated area of the farm (150 ha), cultivation of four crops per year, and the minimum and maximum cultivated area of each crop (varied between 10 and 50 ha). Cultivated area for both silage corn and rapeseed was set to < 80 ha due to market limitations. Wheat and barley are strategic staple crops in Iran and, due to the high need for their production, more than 50% of the cultivated area was allocated for the cultivation of these two crops. For this reason, about 90 ha were needed for cultivating these two crops on the study farm, which is shown as a constraint in Appendix A: supplementary section 1.4.1 and Eqs. S13-S16.
The first objective function combined WEFNI for the selected crops: The second objective function combined CO 2 emissions for the selected crops: where N i and C i are the decision elements that represent the waterenergy-food Nexus index and the normalized value of CO 2 emissions for crop i (from steps one and two), and. X i is the cultivated area for crop i (ha), and n is the number of crops under study.
The multi-objective optimization problem can be transformed into a single-objective problem when the problem's objective functions have similar units and orders of magnitude [31]. For examining this twoequation problem in one maximization equation, the CO 2 emissions data needed to be normalized: where Eq. (12) represents the final objective problem. The relevant equations for the area constraints are as follows: Subjectto : where X i is the cultivated area by crop i, and X is the total area cultivated in the study farm.

Analysis of input-output energy
The total input quantity and energy consumed in the production of the seven crops are shown in Tables 1 and 2. The amounts of human labor, machinery, diesel fuel, chemical fertilizer, biocide, seed, and irrigation water as inputs, and crop production as outputs, were determined to specify all production input and output energy (Fig. 2). The input energy evaluation results showed that human labor requirements ranged from 22.1 h ha − 1 for rapeseed to 34.1 h ha − 1 for alfalfa, with equivalent energy between 43.3 and 66.8 MJ ha − 1 . Comparing different inputs, human labor was the least demanding energy input, with an average value of 54 MJ ha − 1 , due to mechanization and machinery development. Input energy of electricity ranged from 193 to 719 kWh, with equivalent energy from 696 to 259 MJ ha − 1 , with the highest for alfalfa and the lowest for barley. Diesel fuel input energy varied from 17,907 to 26691 MJ ha − 1 , with alfalfa and rapeseed having the highest and lowest fuel consumption, respectively. The type of agricultural machinery used and the number of farming operations needed are directly related to the amount of fuel consumed. They can be considered the reason for the high fuel consumption in alfalfa and sugar beet fields. Nitrogen fertilizer was applied in the highest amounts among chemical fertilizers, with the highest dose used for potato, silage corn, and sugar beet (500 kg ha − 1 and 33070 MJ ha − 1 ).
The work requirement for agricultural tools and machinery varied from 63 to 176 h ha − 1 . Machinery energy consumption ranged from 3956 to 11026 MJ ha − 1 , with the highest and lowest for alfalfa and barley, respectively. Among biocides, herbicides had the highest amount of input energy, followed by insecticides and fungicides. Energy consumption for irrigation was calculated based on the energy needed for groundwater withdrawal (pumping) and water use with a pressurized irrigation system in the farm. The highest energy consumption of irrigation water was obtained for alfalfa (6635 MJ ha − 1 ) and the lowest for barley (1778 MJ ha − 1 ). Seed energy value varied from 93.8 MJ ha − 1 (rapeseed) to 16200 MJ ha − 1 (potato).
Comparing the different inputs showed that nitrogen fertilizer and diesel fuel were the most energy-demanding inputs, with an average value of 26,456 and 21567 MJ ha − 1 , representing 36.7 and 30.56 %, respectively, of total input energy. Some previous studies have reported that chemical fertilizers represent 40-50% of input energy to crop systems and that, compared with the energy inputs of diesel fuel and chemical fertilizers, other operations such as biocides, seed, and machinery import less energy into production systems [32,33]. In the present study, the highest contributions to input energy for alfalfa were for diesel fuel, nitrogen fertilizer, and machinery, representing 35.38, 26.3, and 14.62 %, respectively, of the total energy used (Fig. 2). A similar pattern of input energy contributions was observed for barley, rapeseed, sugar beet, and wheat. The highest input energy for silage corn and potato was related to nitrogen fertilizer (46.10 and 34.72 %, respectively), followed by diesel fuel (28.02 and 21.87 %, respectively). Similar results have been reported for alfalfa [34], barley [35,36], silage corn [35], potato [37,38], rapeseed [39], sugar beet [40], and wheat [35,36], with diesel fuel generally representing the largest share of input energy.
Comparisons of output energy for the products indicated that sugar beet, with a yield of 40 t ha − 1 and energy equivalent of 672000 MJ ha − 1 , had the highest output energy, while alfalfa and potato (15 and 30 t ha − 1 and energy equivalent 237,000 and 108,000 MJ ha − 1 , respectively) were in second and third position. The lowest output energy was obtained for barley (633315 MJ ha − 1 ).

Analysis of indicators
The values of the six indicators studied are shown in Table 3, and the importance of the indicators is compared pairwise in Fig. 3. For the water and energy consumption indicators (Indicators 1 and 2), the highest water use to irrigate one hectare of the crop was found for alfalfa (10532 m 3 ha − 1 ) and the lowest for barley (2822 m 3 ha − 1 ) (Fig. 3a). The high water consumption in alfalfa production is due to its long growing season, deep root system, and dense canopy. Comparing energy consumption based on crop type, the highest energy consumption was obtained for potato (95257 MJ ha − 1 ), followed in order by sugar beet (86149 MJ ha − 1 ), alfalfa (75436 MJ ha − 1 ), silage corn (71732 MJ ha − 1 ), rapeseed (61868 MJ ha − 1 ), wheat (59093 MJ ha − 1 ) and barley (55207 MJ ha − 1 ). The input energy of root crops (potato and sugar beet) was Table 1 Quantity of inputs and outputs per unit area (unit ha − 1 ) for the seven crops studied.

Fig. 2.
Contribution of agricultural inputs in crop production to total energy use for the seven crops studied.
higher than for cereals (barley and wheat), forages (alfalfa and silage corn), and oilseeds (rapeseed) because of the more significant energy inputs for nitrogen fertilizer. This confirms previous findings for farms in Germany [32,33]. Total input energy required to produce crops has been reported previously to be 32541.12 MJ ha − 1 for alfalfa [34], 59042.5 MJ ha − 1 for barley, and 72317.7 MJ ha − 1 for silage corn [35], 51040 MJ ha − 1 for wheat, and 44866 MJ ha − 1 for barley [36], 47000 MJ ha − 1 for potato [38], 21062.27 MJ ha − 1 for rapeseed [39], 39685.51 MJ ha − 1 for sugar beet [40], and 45457 MJ ha − 1 for the wheat [41]. Comparison of the water and energy productivity indicators showed that having the highest water productivity resulted in the highest energy productivity (Fig. 3b). The highest water and energy productivity were Table 3 Final values of the six indicators (1: water consumption, 2: energy consumption, 3: water mass productivity, 4: energy mass productivity, 5: water economic productivity, 6: energy economic productivity) for the seven crops studied.  obtained for silage corn (4.58 t m − 3 and 0.63 t MJ − 1 ), followed by sugar beet (4.11 t m − 3 and 0.46 t MJ − 1 ) and potato (3.38 t m − 3 and 0.31 t MJ − 1 ). In comparisons of water and energy economic productivity indicators (Fig. 3c), the highest water economic productivity was obtained for rapeseed (0.321 $ m − 3 ) and the lowest for potato (0.205 $ m − 3 . The highest energy economic productivity was obtained for alfalfa (0.033 $ MJ − 1 ) and the lowest for barley (0.011$ MJ − 1 ). After calculating water and energy consumption indicators, water and energy productivity indicators, and water and energy economic productivity indicators, a final index (WEFNI) was calculated as an average of all six indicators. Normalized values of the indicators used in calculating WEFNI are shown in Table 4. The WEFNI value for the seven crops studied ranged from 0.29 (for potato) to 0.69 (for silage corn). A high value of WEFNI for a crop reflects maximum productivity with the optimal cultivation pattern and minimum water and energy consumption [18].

CO 2 emissions
The CO 2 emissions from crop production and the contribution to total CO 2 emissions of each agricultural input used in crop production are shown in Table 5 and Fig. 4. As can be seen, among the various inputs in alfalfa production, diesel fuel (1687 kg CO 2 eq ha − 1 ) made the greatest contribution (47.5%) to total CO 2 emissions. High CO 2 emissions from diesel fuel use can be due to employing worn-out tractors in operations, improper matching of equipment to tractors, and performing highly energy-intense tillage operations in crop production [38]. Among the chemical fertilizers, nitrogen with 930 kg CO 2 eq ha − 1 was the greatest contributor to CO 2 emissions from alfalfa production (26.2% of total CO 2 emissions). The use of chemical fertilizer (especially nitrogen) in excess of plant requirements leads to high CO 2 emissions.
Moreover, soil and water pollution result from using high amounts of chemical fertilizer, making the agricultural environment unfavorable. Irrigation water, potassium, phosphorus, biocides, seeds, and machinery ranked next, contributing 11.8%, 5.6%, 3.9%, 1.9%, 1.5%, and 1.2% of total CO 2 emissions from alfalfa cropping, respectively. The lowest emissions from alfalfa production were related to electricity use (12.49 kg CO 2 eq ha − 1 , 0.35% of total CO 2 emissions).
A similar trend in emissions contributions, with only slight differences, was observed for all products except potato. In potato production, nitrogen fertilizer (1550 kg, CO 2 eq ha − 1 , 30% of total CO 2 emissions) made the greatest contribution to CO 2 emissions. Higher consumption of seeds in potato cultivation than for other crops resulted in seed input, making the second-largest contribution (1485 kg CO 2 eq ha − 1 , 28.7% of total CO 2 emissions), followed by diesel fuel (1317 kg CO 2 eq ha − 1 , 25.5% of total CO 2 emissions). The lowest total CO 2 emissions per hectare were found for barley (2719 kg CO 2 eq ha − 1 ) and the highest for potato (5166 kg CO 2 eq ha − 1 ), while alfalfa (3553 kg CO 2 eq ha − 1 ), silage corn (3376 kg CO 2 eq ha − 1 ), rapeseed (2836 kg CO 2 eq ha − 1 ), sugar beet (3970 kg CO 2 eq ha − 1 ) and wheat (2779 kg CO 2 eq ha − 1 ) were intermediate (Table 5). Previous studies on cropping have reported total CO 2 emissions of 2350 kg CO 2 eq ha − 1 for potato in Portugal [42], 1038 kg CO 2 eq ha − 1 for wheat in Germany [43], and 2330 kg CO 2 eq ha − 1 for wheat in Finland [44]. These are lower than the values obtained in the present study, which could be due to differences in soil type, fertilizer rate, irrigation type, and climate between studied crops.
As shown in Table 5, the highest CO 2 emissions per kilogram of the product were found for rapeseed (0.95 kg CO 2 eq kg − 1 ), followed by barley and wheat (0.6 and 0.56 kg CO 2 eq kg − 1 , respectively). Nitrogen fertilizer application and crop production had the most significant effects on CO 2 emissions per hectare or kilogram. Low crop production and high application of nitrogen fertilizers were the main reasons for higher CO 2 emissions per kilogram of rapeseed. The lowest CO 2 emissions per kilogram were obtained for silage corn (0.075 kg CO 2 eq) due to its high yield mass. If field inputs are kept constant, and crop yield can be increased with good management, CO 2 emissions per kg of the product will decrease, but not CO 2 emissions per hectare. Our calculations indicated that a 20% increase in crop yield would lead to a 16.67% reduction in CO 2 emissions per kilogram of product, whereas a 20% decrease in crop yield would increase CO 2 emissions by 25% per kilogram of produce. Comparisons of energy input and CO 2 emissions in this study showed a direct relationship between input energy and global warming potential. For every 1 MJ increase in input energy, CO 2 emissions increased by 0.047 kg ha − 1 for alfalfa, 0.049 kg ha − 1 for barley, 0.047 kg ha − 1 for silage corn, 0.054 kg ha − 1 for potato, 0.046 kg ha − 1 for rapeseed, 0.046 kg ha − 1 for sugar beet, and 0.047 kg ha − 1 for wheat.

WEF Nexus and CO 2 emissions
Emissions of CO 2 from crop production per unit of water used for crop production are shown in Fig. 5a. As CO 2 emissions were directly related to water demand, the crops with the highest water demand were expected to have the highest CO 2 emissions. However, despite the relatively high water demand in alfalfa (10532 m 3 ha − 1 ), it ranked third for CO 2 emissions per hectare (3553 kg ha − 1 ) among the crops studied, and it ranked last for CO 2 emission per unit volume of water applied (0.34 kg CO 2 eq m − 3 ) (Fig. 5a). Wheat and barley, with low water demand (4065 and 2823 m 3 ha − 1 , respectively) and CO 2 emissions (2779 and 2719 kg ha − 1 , respectively) among the crops studied, ranked first in CO 2 emissions per unit of water applied (0.68 and 0.96 kg CO 2 eq m − 3 ) (Fig. 5a). It can be inferred that although alfalfa consumed 2.6-fold and 3.7-fold more water than wheat and barley, respectively, the increase in CO 2 emissions related to water consumed was not significant.
Potato and sugar beet were also two significant contributors to CO 2 emissions, as they had similar energy consumption to alfalfa (Fig. 3a). Emissions of CO 2 per unit energy demand in crop production are shown in Fig. 5b. Potato, the more prominent producer of CO 2 emissions among the crops, also ranked first in CO 2 emissions per unit of energy, with a value of 0.054 kg CO 2 eq MJ − 1 . Despite the relatively high energy consumption in sugar beet and alfalfa production, they ranked sixth and third, respectively, with a value of 0.046 and 0.047 kg CO 2 eq MJ − 1 (Fig. 5b).
The relationship between crop production (kg ha − 1 ) and average CO 2 emissions (kg CO 2 eq ha − 1 ) is shown in Fig. 5c. Rapeseed had the lowest output per unit area, but it ranked first in CO 2 emissions per unit Table 4 Normalized values of the six indicators (1: water consumption, 2: energy consumption, 3: water mass productivity, 4: energy mass productivity, 5: water economic productivity, 6: energy economic productivity) used in the calculation of the Water-Energy-Food Nexus index (WEFNI) for the seven crops studied, and the WEFNI values obtained. of crop yield, with a value of 0.95 kg CO 2 eq kg − 1 . Although silage corn had the highest output per unit area, it ranked last in terms of carbon emissions per unit of crop yield (0.075 kg CO 2 eq kg − 1 ). Therefore, it can be concluded that by keeping inputs constant and increasing crop yield per hectare, CO 2 emissions produced per ton of product can be reduced.

Nexus optimization
In the first stage of optimization with MILP programming, considering the amount of water and energy consumed, crop yield, profit, and CO 2 emissions, four products were selected among the seven products included in this study. The second stage of optimization, with LP programming, was performed to calculate the cropping pattern in the field for the study farm. The cropping pattern for the three objective functions is illustrated in Fig. 6.
In optimization with the first objective function, silage corn and sugar beet had the highest cultivated area (50 ha each) on the farm, followed by rapeseed and wheat with 30 and 20 ha, respectively. The WEFNI includes several water, food, and energy indicators, with higher values of the index indicating lower water and energy consumption and higher production. By maximizing WEFNI, the best conditions for optimal cultivation patterns were calculated. With the first objective function, about two-thirds of the total area was allocated to the cultivation of silage corn and sugar beet (Fig. 6a), which had a high yield. Although rapeseed and wheat had lower yields than silage corn and sugar beet, they had low water and energy consumption, so around one-third of the remaining area was allocated to the cultivation of these two crops (Fig. 6a). As shown inTable 6, maximizing WEFNI under the first objective function resulted in 1.07 Mm 3 water and about 10,932 GJ energy consumption, 4.44 Mt food production, and about 507.95 t CO 2 emissions during one growing season.
The second objective function, which was implemented to reduce CO 2 emissions, showed that the optimized cropping pattern for the farms was a combination of barley, wheat, rapeseed, and silage corn, with 50, 50, 40, and 10 ha of cultivated area, respectively (Fig. 6b). These were the four crops with the lowest CO 2 emissions in the region (see Fig. 5). For the second objective function, 0.65 Mm 3 water and about 8907 GJ energy were required to produce 1.05 Mt food, and about 422.06 t CO 2 emissions were released. Compared with optimization with the first (WEFNI-based) objective function, water and energy consumption, food production, and CO 2 emissions decreased by about 39.8%, 18.5%, 76.5%, and 16.9%, respectively, with the second objective function ( Table 6). Because the largest area under cultivation was allocated to rapeseed and barley, which had the lowest water and energy consumption of all crops, besides reducing CO 2 emissions, this brought a significant benefit in water and energy supply aspects. In the second objective function, 80% less area compared with the first objective function was allocated to silage corn due to its high CO 2 emissions. The cultivated area of wheat and rapeseed increased by 150% and 33%, respectively, but sugar beet was not included in the second objective function due to its high CO 2 emissions. Comparing the results of these two objective functions showed that maximizing WEFNI achieved a high Table 5 Equivalent CO 2 emissions (CO 2 eq) from different inputs used to produce the seven studied crops and total CO 2 emissions per hectare and a kilogram of product.  Fig. 4. Contribution (%) of greenhouse gas emissions (CO 2 eq) from agricultural inputs used in crop production to total emissions for the seven crops studied.
level of water use, energy use, and food production, leading to higher CO 2 emissions and high negative impacts on the environment (Table 6).
With the optimal objective function, products were selected to meet both goals. With the constraints defined during optimization, the results showed that barley, rapeseed, wheat, and silage corn (as found for the second objective function, but with the different cultivated area) should be grown on 30, 20, 50, and 50 ha, respectively. As shown in Table 6, the optimal situation used 0.71 Mm 3 water and 9188 GJ energy to produce 1.83 Mt food. It also released 434.6 tons of CO 2 , an intermediate value compared with the first and second objective functions. In the optimal situation compared with the first (WEFNI-based) objective function, water, and energy consumption, food production, and CO 2 emissions decreased by 33.5%, 16%, 58.9%, and 14.4%, respectively. Compared with the second (CO 2 -based) objective function, water and energy consumption, food production, and CO 2 emissions increased by 10.5%, 3.15%, 74.6%, and 3%, respectively.
With the first objective function, a large area was allocated to silage corn and sugar beet due to their high yield. With the optimal objective function, 40% less area was allocated to silage corn, and sugar beet was not included in the optimum cultivation pattern due to their high CO 2 emissions, and rapeseed cultivation area was increased by 67%, compared with the first objective model. With the second objective model, a large area was allocated to barley due to its low CO 2 emissions. Still, with the optimal objective function, 60% less area was allocated to wheat cultivation due to its low yield, and silage corn cultivation area was increased by 200% compared with the second objective model. Alfalfa and potato were not included by any objective function due to high water and energy consumption.
In theory, the imprecise input data may affect the optimal results of WEFNI and the identification of sustainable cropping patterns; however, in practice, the input errors are inevitable because of fluctuations of natural elements and imprecision in order to identify sustainable cropping patterns parameters affecting the decision making processes [28]. According to the Sadeghi et al. [23], analysis of the water-energy-food nexus index over time shows the visible variations from year to year, as can be seen in the case of alfalfa that had WEFNI ranging between 0.29 in 2006 to 0.14 in 2007 or barley with WEFNI as low as 0.37 in 2010 and up to 0.47 in 2014. Thus, a current study is based on input and output data collected over two years and was used to calculate one WEFNI value that may cause uncertainty. For instance, crop production utilized to estimate water and energy-mass productivity is a source of uncertainty in this case. Due to the agricultural industry's biological nature and natural factors that cannot be overseen or controlled, the crop yield will vary from year to year. FAO (2020) provides the wheat yields recorded for the last 60 years in Iran, and high variability of this value can be seen in the example of the sharp drop in production from   Table 6 Water and energy consumption, food production, and greenhouse gas (CO 2 ) emissions after optimization. 2.2 t ha − 1 in 2007 to 1.33 t ha − 1 in 2008. Although the data is on a national level, the trend is still representative.
The results obtained in this study show that an optimization approach that involves determining the optimal cropping pattern could improve the prediction of WEF Nexus and CO 2 emissions, providing a better solution for managing limited resources in future food production.

Conclusions
The WEF Nexus approach was used to develop appropriate mitigation strategies for optimal cropping patterns and illustrate the interactions between water, energy, and food by focusing on CO 2 emissions. For the first time, water-energy-food interrelationships were studied using real farm data, and their interactions with water and energy consumption and food production were analyzed for seven crops (alfalfa, barley, silage corn, potato, rapeseed, sugar beet, and wheat). This study showed that WEFNI values could be used to optimize cropping patterns to minimize water consumption, energy consumption, and CO 2 emission, and maximize food production, and be applied annually to assess water-energy-food relationships. Some of the findings can be concluded as 1) Analysis of input-output energy showed that diesel fuel and nitrogen fertilizers were the most energy-demanding inputs and the greatest contribution to CO 2 emissions for all crops. 2) The highest water and energy productivity were obtained for silage corn, followed by sugar beet and potato. This means that for each unit of energy (MJ) and water (m 3 ) consumed, more tons of crops are produced in these products. 3) The WEFNI estimated for the studied crops ranged from 0.69 for silage corn to 0.29 for potato. 4) To find the best cultivation pattern for the study area in the coming years, optimization was performed with two objectives, maximizing WEFNI and minimizing CO 2 emissions. In the optimal situation (considering WEFNI and CO 2 emissions) compared with the WEFNI maximization approach, water, and energy consumption, food production, and CO 2 emissions decreased 33.5%, 16%, 58.9%, and 14.4%, respectively. In the optimal situation compared with the CO 2 emissions minimization approach, water and energy consumption, food production, and CO 2 emissions increased by 10.5%, 3.15%, 74.6%, and 3%, respectively. The optimization results ranked barley, silage corn, rapeseed, and wheat as the best crops for the study region and allocated the largest cultivated area to barley and rapeseed. Also, further research is required in order to propose future sowing plans, including crop rotation to maintain soil fertility. There are crop rotation constraints for wheat and silage corn, stating that these crops should not be planted two years in the same site, or the wheat should not be sown for a year after silage corn [45]. The study results showed that land management efficiency using optimized water-energy-food Nexus by preventing negative impacts on available resources could be reduced CO 2 emissions.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.