Ancient WEF: Water–Energy–Food Nexus in the Distant Past

The concept of water–energy–food (WEF) nexus is gaining favor as a means to highlight the functions of the three individual nexus elements as interrelated components of a single complex system. In practice, the nexus approach projects forward from the present, seeking to maximize future WEF synergies and avoid undesirable tradeoffs. A complementary approach was employed here to gain insights into how the ancients dealt with WEF relationships, whether currently relevant nexus principles were practiced long ago, and how past WEF dynamics compare to those of today. Two examples, both dating to before the common era (BCE), are considered in detail. The qanats of ancient Persia brought groundwater to the surface and directed it to clusters of agricultural fields in arid areas where crop production was not otherwise feasible. In contrast, the Dujiangyan irrigation scheme of ancient China harnessed previously destructive surface water flows to stabilize food production across a vast agricultural plain. Designed and constructed under highly uncertain conditions and with a long-term perspective, both relied on local resources and expertise to exploit the tight coupling of water and the intrinsic energy from its flows to produce food. Ingenious infrastructure combined with sound governance allowed both to achieve remarkable synergies among the WEF components with minimal apparent tradeoffs. Although both are now challenged by climate change and the increasing complexity of modern WEF relationships, qanat systems and the Dujiangyan irrigation scheme have survived for millennia and still exist in recognizable form. This is due in large part to the persistence of governance systems that devolved significant decision-making authority to those who used water and energy for food production. Although it is not feasible to roll back technology to that of an earlier time, the successful attributes of earlier WEF governance systems warrant more attention in the future.


Introduction
Our understanding of the interactions between water, energy, and food (WEF) has deepened in recent years, as the world struggles with climate change and begins to seriously confront planetary limits [1][2][3][4]. First formalized a decade ago [5,6], the concept of WEF nexus coalesces thinking about these relationships into a conceptual framework that assigns priority to the coupling of the three components. Focus on interrelationships de-emphasizes fragmented treatment of the three individual components and underscores their functional roles in the underlying system [5][6][7]. In practice, the nexus approach seeks to maximize the advantages of WEF synergies while avoiding the disadvantages of WEF tradeoffs [8][9][10]. This requires a shift from viewing water, energy, and food as competitors for land and other resources, as well as renewed attention to the potential for mutual benefits. Technology and governance become crucial tools for achieving these goals [11][12][13].
The concept of WEF nexus has triggered a lively and ongoing debate in scientific and policy circles [14][15][16][17][18]. Although the basic concept is evolving and certainly not the only framework for assessing WEF relationships [19,20], the nexus approach has the advantage

Structure and Operation of Qanat Systems
Although centered on what is now modern Iran, ancient Persia once encompassed a significantly larger area that extended from northeastern Africa into Central Asia. Much of this landscape is dominated by mountain chains towering above arid desert basins. Although the piedmont belts separating the montane uplands from the dry lowlands have fertile soils and favorable temperatures [50], lack of water posed a nearly insurmountable barrier to early human habitation [51][52][53]. Precipitation in these areas is less-often much less-than 300 mm per year [54][55][56], an amount far below that necessary to sustain dryland agriculture. Snowmelt from the mountains sometimes pulses into wadis that cut across the piedmont, but water in these indentations is only intermittently available and usually inadequate to sustain food production [51,57].
The early Persians thus turned their attention to the water that flows from the mountains and quickly disappears into the alluvium that characterizes the foothills [58,59]. This water forms an underground water table that gradually flattens as it loses elevation [48,51,56,60,61]. Water sporadically reaches the surface, but it is usually saline and unusable. These aquifers were first tapped at least 2500 years ago, and perhaps much earlier [62], when structures termed qanats in Arabic and karez in Persian were first constructed, most probably in what is now Iran [51,[63][64][65][66]. Qanats are the earliest engineered structures for delivering subsurface water to the earth's surface [67]. They are widely admired as marvels of early human ingenuity, and this has focused scientific attention on the astonishing complexity and precision of their design and construction [51,55,[68][69][70]. Basic qanat features, which can be optimized for local edaphic, hydrological, and environmental conditions [58,71], are documented elsewhere for those interested in details [51,68] and summarized briefly here to provide essential context.
Construction commences when a shaft is bored downward until it pierces the water table near the base of mountain bedrock ( Figure 1). This forms the qanat's head or mother well. An inclined tunnel is then excavated from a predetermined downhill location to the higher elevation well. Vertical shafts are simultaneously sunk downward from the soil surface to the tunnel's roof at regular intervals to facilitate air circulation and removal of spoil from the tunnel [54,58,63]. This generates a characteristic linear surface pattern above each qanat ( Figure 1). It has been estimated that on average, more than 2900 m 3 of rubble must be drawn manually to the surface per km of tunnel length [48], and thus energy in the form of human labor during the construction phase is considerable.
Qanat technology encompasses not just the design and operation of excavations to deliver water to the surface, but also the underappreciated and no less ingenious surface engineering of the cropland [55,72,73]. Water discharged from the tunnel's mouth was sometimes allowed to accumulate in a reservoir [74,75]. More often, it flowed through a settlement in an open channel that terminated in an agricultural zone. Food production areas took various forms, all of which utilized the advantages of local topography to optimize efficiency [72,[76][77][78][79].
The remote images shown in Figure 2 detail the configuration of a qanat that is still in use in southeastern Iran. It extends about 17 km from its origin to its outlet at the village of Deh Salm, which lies above the green agricultural fields that contrast sharply with the surrounding desert landscape. The ancient fields of qanat areas have been examined in detail in what is now Central Iran. They were usually configured as carefully leveled rectangular strips [72] having a long axis parallel to the slope of the land [80][81][82]. Incoming water was diverted into perpendicularly oriented cross channels and then onto fields by mounded earth or temporary weirs that were controlled to achieve even application of the desired amount of water to each field [48,57]. Field size was crucial. If strips were too small, the effort required to regulate water movement became excessive, and if they were too large, uniform application of water became impractical. The cross-sectional perspective shows the relationship of the tunnel to the water table and other subsurface features, as well as to the agricultural fields. The aerial perspective shows the typical pattern of surface openings above the channel and the pathway to the fields. The curved lines from left to right indicate decreases in elevation. After illustrations by Beaumont [60] and English [63].
Qanat technology encompasses not just the design and operation of excavations to deliver water to the surface, but also the underappreciated and no less ingenious surface engineering of the cropland [55,72,73]. Water discharged from the tunnel's mouth was sometimes allowed to accumulate in a reservoir [74,75]. More often, it flowed through a settlement in an open channel that terminated in an agricultural zone. Food production areas took various forms, all of which utilized the advantages of local topography to optimize efficiency [72,[76][77][78][79].
The remote images shown in Figure 2 detail the configuration of a qanat that is still in use in southeastern Iran. It extends about 17 km from its origin to its outlet at the village of Deh Salm, which lies above the green agricultural fields that contrast sharply with the surrounding desert landscape. The ancient fields of qanat areas have been examined in detail in what is now Central Iran. They were usually configured as carefully leveled rectangular strips [72] having a long axis parallel to the slope of the land [80][81][82]. Incoming water was diverted into perpendicularly oriented cross channels and then onto fields by mounded earth or temporary weirs that were controlled to achieve even application of the desired amount of water to each field [48,57]. Field size was crucial. If strips were too small, the effort required to regulate water movement became excessive, and if they were too large, uniform application of water became impractical.
The agronomic systems that developed in qanat areas were optimized and carefully coordinated for efficiency [68,83]. Orchards and other high value crops were planted in the upper fields, which even in dry years were guaranteed enough moisture, and as the potential for consistent water availability decreased with elevation, so did the value of crops that were grown [74,79,81,84]. Cropping patterns were synchronized with seasonal qanat flows [83], and rotations that included fallowing practices were coordinated such that the total demand of the irrigation area did not exceed the available water supply from the qanat [74]. Fruits, vegetables, and cereals were all produced in qanat areas, as was fodder for animals used for food and to perform work [51,68,83,85]. As in the tunnel, and regardless of the local environment and pattern of fields, the intrinsic energy of water was harnessed to drive the entire aboveground distribution system, the function of which  (c). Enlargement of a segment of the qanat between the mother well and the settlement, showing the shaft openings and spoil heaps flanking a roadway that parallels the qanat. The agronomic systems that developed in qanat areas were optimized and carefully coordinated for efficiency [68,83]. Orchards and other high value crops were planted in the upper fields, which even in dry years were guaranteed enough moisture, and as the potential for consistent water availability decreased with elevation, so did the value of crops that were grown [74,79,81,84]. Cropping patterns were synchronized with seasonal qanat flows [83], and rotations that included fallowing practices were coordinated such that the total demand of the irrigation area did not exceed the available water supply from the qanat [74]. Fruits, vegetables, and cereals were all produced in qanat areas, as was fodder for animals used for food and to perform work [51,68,83,85]. As in the tunnel, and regardless of the local environment and pattern of fields, the intrinsic energy of water was harnessed to drive the entire aboveground distribution system, the function of which rested, in the words of Labbaf Khaneike [56], on a "vital triangle of water, food, and energy."

Governance of Early Qanat Systems
The unique governance policies that arose to optimize the benefits of qanat technology were as essential as appropriately designed infrastructure in sustaining these systems over time [86]. Qanats are expensive to build and maintain, and so they were originally constructed by wealthy elites who had access to forced labor and the ability to impose authority over the enterprise [63]. In contrast to lower status residents, who lived farther downhill, those in control of the qanat always settled near its outlet, so that their home gardens had first rights to water [48]. They exercised their authority by specifying mechanisms of land tenure and ownership, fostering social relationships that influenced access to irrigation water for food production, and ultimately creating what would be known today as a community of water users [57,87].
Policies for allocation of water to the fields were a key innovation [53]. If plentiful, qanat water was distributed on the basis of land area, but this was usually not the case in the arid piedmont areas. Scarcity consequently led to an unusual distribution system: Each agricultural unit, whether owned or rented by an individual or by a group of farmers, received its entire allotment of irrigation water on the basis of a pre-agreed upon unit of time, regardless of the amount of water actually delivered during this interval [81]. This timeshare system, which in one extreme case functioned by allocating just 30 s of water flow per 12 days [63], was exacting but also flexible and easily customizable [82,84]. The length of time periods for access to water could be increased or decreased, and the periods could be rearranged within daily or monthly cycles, so that everyone had equitable access to water during peak flow periods or during drought [65,72]. Adjustments could also be made when land tenancy and ownership changed [48,63].
In effect, time became a proxy, not just for water, but also for access to the internal energy needed to distribute it. Equity and cooperation were reinforced by measures to balance access to higher quality land, provide seed and regulate which crops could be grown where, and in some cases allocate land not to individuals but to groups who were thus incentivized to work together [68,74]. Disputes, some of which could be serious [59], were usually resolved peacefully by locally elected bailiffs who understood hydrology [53,64]. Landowners and farmers were directly involved in measuring timeshares and diverting flows, but with rare exceptions [88], powerful authorities or their proxies exercised ultimate control-sometimes harshly-but usually with restraint and in ways that kept the peace and heightened solidarity among the water users [72,87,89].
Qanat maintenance was a second key governance issue. The infrastructure was a complex common good that was distributed over significant distances ( Figure 2) and easily damaged by floods, shifting sands, tunnel collapse, and sociopolitical instability [46,68]. Local authorities originally organized maintenance by corvée, e.g., intermittent unpaid labor by those with few resources and low status [56]. Although later upkeep was sometimes provided by hired workers and financed by payments, labor to care for water infrastructure was also typically exchanged for access to farmland [56,83]. Later upkeep practices thus served as important mechanisms to forge solidarity among users. The need for ongoing maintenance thus reinforced water allocation policies, and since no one could benefit individually from the common infrastructure unless it was entirely intact, qanat technology avoided the tradeoffs that are often fueled by narrow self-interest [51,56,83,90].
Synergies were also strengthened by practices such as installation of underground milling machinery in favorably configured tunnels with appropriate flows [51,56,59,74]. Food and energy security were enhanced by the mere existence of qanat settlements, which became upland bases for herding, limited seasonal dryland farming, and fuel collection [51,52]. Policies were also instituted to prevent construction of qanats across private land unless permission was granted [59,64,91]. In practice, this assured right of way access, prevented infringement of one qanat on the water catchment area of another, and supplied mechanisms to resolve disagreements [54,57,63]. Except in extreme cases, these equalizing mechanisms were enforced, not by legal mandates, but rather by exploitation of social norms [92].

The Dujiangyan Irrigation Scheme
The Sichuan basin is one of the most distinctive geographical features of western China. An immense lowland area of 229,000 km 2 , the basin is ringed by mountains and divided into multiple topographic zones. The westernmost of these is the Chengdu plain, a relatively flat alluvial area that abuts the foothills of the Tibetan plateau. Soils are productive and the humid climate is favorable, but efficient use of these assets for food production is only possible when water is available in the right amounts at the appropriate time of the year [93,94]. Although the foothills are incised by rivers and streams at regular intervals, inflows are charged by mountain rain and snowmelt, and this means that flow volumes vary significantly according to season and weather patterns. Flooding, substantial erosion, and meandering river channels are all common on the Chengdu plain, which on average receives 1000-1400 mm of annual precipitation [95]. There is historical evidence that the inconsistent availability of water was driven in part by a changing climate and that damage due to flooding was decisive in preventing exploitation of the plain's resource base by early settlers [96].
These suboptimal natural conditions were fundamentally altered by construction of a combined flood control and irrigation system in the mid third century BCE [97,98]. Unlike qanats, which could be replicated in a variety of environments, the Dujiangyan irrigation scheme took advantage of novel topographical and hydrological features associated with a single aboveground water source. The Minjiang River is the largest stream entering the Chengdu basin. It draws water and suspended sediments from an expansive watershed with significant snowpack, delivering on average 462 cubic meters of water per second [99], but roughly twenty times as much when spring and summer thaws lead to prolonged flooding [49]. Surface water from the Minjiang was consequently available to enhance food production, but if unregulated, it coursed through the plain, in the words of Jones [49], as a "seething torrent, laden with uprooted trees, debris from houses and villages, and drowned animals." The Dujiangyan irrigation scheme employs ingenious headwater infrastructure at the point where the Minjiang River emerges from the mountains and cascades toward an impervious rock face [98], capturing the energy of the water and exploiting it to simultaneously prevent flooding and enable irrigation of the plain [78]. As with qanats, the brilliance of this infrastructure continues to awe scientists and engineers [100], who have subjected the scheme to detailed technical analysis [101,102]. The key feature is an artificial irrigation channel that, with manual labor and primitive tools, was hewn through the solid rock face that naturally confines the river (Figure 3). A dike and temporary bamboo diversion dams were constructed midstream above the intake channel to bifurcate the inflowing Minjiang into a wide and shallow outer river that bypasses the mouth of the artificial channel and a deep and narrow inner river that flows past it before rejoining the outer river farther downstream [103].
irrigation channel that, with manual labor and primitive tools, was hewn through the solid rock face that naturally confines the river (Figure 3). A dike and temporary bamboo diversion dams were constructed midstream above the intake channel to bifurcate the inflowing Minjiang into a wide and shallow outer river that bypasses the mouth of the artificial channel and a deep and narrow inner river that flows past it before rejoining the outer river farther downstream [103]. Google Earth image of the site. Temporary bamboo dams above the main diversion dike were used to divert the inflowing water into an outer river that bypassed the entrance of the irrigation channel and an inner river that approached it. An overflow spillway was used to regulate the amount of water entering the irrigation channel and help prevent buildup of sediments.
During low flow, the headworks diverted most-and sometimes all-of the water into the inner river, where it could easily be further channeled into irrigation ditches. During high flow, much of the excess water was directed to the outer river so that it bypassed the channel. Under conditions of extreme flooding, water also rushed into the inner river, where it splashed against a rock cliff with great force. This not only deflected unwanted flow away from the irrigation inlet, but also facilitated its movement through an overflow spillway that had been installed to direct floodwater back to the outer channel and on Figure 3. Schematic configuration of the early Dujiangyan irrigation headworks overlaid on a 2018 Google Earth image of the site. Temporary bamboo dams above the main diversion dike were used to divert the inflowing water into an outer river that bypassed the entrance of the irrigation channel and an inner river that approached it. An overflow spillway was used to regulate the amount of water entering the irrigation channel and help prevent buildup of sediments.
During low flow, the headworks diverted most-and sometimes all-of the water into the inner river, where it could easily be further channeled into irrigation ditches. During high flow, much of the excess water was directed to the outer river so that it bypassed the channel. Under conditions of extreme flooding, water also rushed into the inner river, where it splashed against a rock cliff with great force. This not only deflected unwanted flow away from the irrigation inlet, but also facilitated its movement through an overflow spillway that had been installed to direct floodwater back to the outer channel and on down the river (Figure 3). Critically, the headwater infrastructure exploited the turbulence of water to prevent buildup of gravel, sand, and lighter sediments that would have eventually rendered the irrigation system useless [98,101,104]. Water entering the channel through the rock face was divided and further subdivided by water gates and other smaller diversion structures into a web-like network of increasingly finer channels as gravity distributed it across the plain [78,104]. Rice, a valuable and productive crop that had previously been cultivated with only mixed success, spread across the area as the destructive force of water was tamed and supply stabilized [105]. This facilitated expansion of agricultural areas, intensification of food production, and population increases.

Governance of the Early Dujiangyan Irrigation Scheme
The Dujiangyan irrigation scheme consists of two components from the perspective of governance: the headwater infrastructure, including major irrigation channels (Figure 3), and the extensive net-like system of smaller canals that distributed water throughout the agricultural area [100]. Decisions to finance and install the expensive headworks were made centrally under the direction of Li Bing, the province's powerful governor, in the third century BCE [97,98]. Although this infrastructure was designed to be self-regulating and avoid buildup of silt and other suspended material, dredging and maintenance of dikes, overflow dams, and embankments was required, as was labor to tend temporary dams and spillways and deal with routine wear and tear [101]. These efforts were organized and directed centrally. Although corvée labor was originally used, farmers later participated willingly, because they understood that their personal benefit from the system far outweighed any labor and other costs borne for maintenance [104,106,107].
Although the authorities retained control of the major Dujiangyan infrastructure, they devolved responsibility for the smaller canals and other irrigation sub-works to the farmers who lived on the Chengdu plain. The beneficiaries of the infrastructure that made their fields productive were thus empowered to ensure that necessary maintenance was performed and water distributed fairly [104]. Such fine-grained governance emphasized local context and mandated local cooperation [100,106], which was facilitated by a peculiar ancient form of rural agricultural settlement termed linpan [108][109][110][111][112][113]. Each linpan settlement consisted of a compact cluster of bamboo-and tree-shaded farmhouses and courtyards surrounded by small canals and fields, creating a unique patchy landscape that still exists (Figure 4). the agricultural area [100]. Decisions to finance and install the expensive headworks were made centrally under the direction of Li Bing, the province's powerful governor, in the third century BCE [97,98]. Although this infrastructure was designed to be self-regulating and avoid buildup of silt and other suspended material, dredging and maintenance of dikes, overflow dams, and embankments was required, as was labor to tend temporary dams and spillways and deal with routine wear and tear [101]. These efforts were organized and directed centrally. Although corvée labor was originally used, farmers later participated willingly, because they understood that their personal benefit from the system far outweighed any labor and other costs borne for maintenance [104,106,107].
Although the authorities retained control of the major Dujiangyan infrastructure, they devolved responsibility for the smaller canals and other irrigation sub-works to the farmers who lived on the Chengdu plain. The beneficiaries of the infrastructure that made their fields productive were thus empowered to ensure that necessary maintenance was performed and water distributed fairly [104]. Such fine-grained governance emphasized local context and mandated local cooperation [100,106], which was facilitated by a peculiar ancient form of rural agricultural settlement termed linpan [108][109][110][111][112][113]. Each linpan settlement consisted of a compact cluster of bamboo-and tree-shaded farmhouses and courtyards surrounded by small canals and fields, creating a unique patchy landscape that still exists (Figure 4). Farmers from each linpan settlement tended the adjacent agricultural area and assumed collective responsibility for operation of the associated irrigation infrastructure [112], guiding the activities of gatekeepers and elected water masters so that water distribution was fair, necessary upkeep completed, and conflicts swiftly resolved [93]. Although agricultural practices and the timing and details of irrigation policies differed from linpan to linpan, the interwoven nature of the irrigation channels ensured that water was distributed equitably and in sufficient amounts throughout the irrigation area [93,106,108]. Such finegrained local control has been sustained over the centuries as agricultural practices evolved and as the network of canals was reconfigured in the irrigation area. Sustaining such systems is rare [106], but two millennia after construction of the Dujiangyan scheme, the resilient agricultural landscape that emerged continues to support the highest level of food productivity in inland China [104,111,114].

Early WEF Nexus Perspective
When contemplating their options for complex engineering of the landscape, the ancients would have envisioned certain constraints. The lack of benefits until all work was completed mandated long-term perspective and commitment, unambiguous identification of intended beneficiaries, and tacit acknowledgement of the limits of local expertise and resources [59,98,115]. The need to avoid conflicts among future beneficiaries would have loomed large, and thus all conceivable means to forge cooperation-social, cultural, governmental, and religious-must also have been contemplated in advance. These issues have been examined from various modern perspectives, typically with a strongly water-centric bias [12,[116][117][118]. Considerations of food are usually subordinated to those of water, and social issues are often distanced from technical considerations [29]. The existence of such divergence was underscored by Fogel [23], who after attending a conference organized by social scientists, wrote that "It is both a terrifying and rewarding experience for a hydrologist to be invited to a meeting of anthropologists discussing irrigation." More than 40 years later, it seems timely to apply the lens of ancient WEF systems to current WEF dynamics and seek insights of contemporary relevance.
The two examples considered here are by no means the only early approaches requiring substantial collaborative effort and engineering to establish WEF nexus [119][120][121][122]. Ephemeral streams in much of the ancient world were modified to conserve water for food production, both within the streambed and on adjacent land (Table 1). Although fascinating in design and locally important, most of these approaches have been poorly investigated. Others, including leveling of hillsides into terraces and construction of dams and canals, are well known (Table 1). Ancient water diversion schemes along the Nile River in Egypt [123], the Tigris, Euphrates, Amu Darya, Syr Darya, and other rivers in Central Asia [124,125], and the Wei, Yellow, and Yangtze rivers in China [126][127][128][129] are particularly notable efforts to obtain water for large scale food production.
Many ancient water projects have nevertheless been obliterated by urbanization and land use change; others, including dozens of sites in China and Central Asia, were abandoned long ago because of environmental change and political instability [39,[124][125][126][127][130][131][132][133]. Although intense efforts are underway to document the environmental and social attributes of early water projects that are no longer in existence, the task is daunting [47,127,134,135]. This creates a strong rationale for probing well documented ancient examples that proved durable and still exist for insights into the dynamics of early WEF nexus. Table 1. Examples of early approaches to bring water, energy, and food into nexus.

WEF Nexus Characteristics of Qanats and the Dujiangyan Irrigation Scheme
The green landscapes nourished by qanats and the irrigated Chengdu plain owe their existence to dazzling feats of early engineering paired with tailored policies for governance [56,93]. Although these characteristics converged in both cases, there are major underlying differences. Qanats allowed early settlers to begin producing food on arid, inhospitable terrain, but the areas made livable by individual qanats were small and often isolated from one another [88]. Although qanat areas sometimes fused, the key to their significance lies in their sheer numbers. Qanats added food to the water-energy couplet and then multiplied the resulting nexus across literally thousands of locations where food production was previously infeasible. The Dujiangyan irrigation scheme, on the other hand, enhanced rather than enabled food production, and it did so across a single expanse of fertile land that dwarfed the area served by any individual qanat [114]. Stabilization of food production on the Chengdu plain was a major accomplishment and is thought to be a key factor in the unification of the Chinese empire [146].
Qanats are the products of decisions taken with the full knowledge of the risks involved, and indeed, many attempts ended in failure. The possibility of WEF nexus could never be assured until water consistently emerged from the tunnel's outlet-often after decades of investment in excavation [55,64]. Policies codifying access rights, maintenance responsibilities, and boundaries to prevent encroachment and other conflicts were key to qanat sustainability [63,68], but inefficiencies and tradeoffs are nevertheless apparent. Animal herding and harvest of firewood [51] removed groundcover, allowing shifting sands to obstruct nearby qanat shafts [68]. Significant quantities of water were lost due to seepage and evaporation from qanat streams [91,[147][148][149], and flows were wasted during seasons when food was not being produced [59]. These losses could nevertheless be partially mitigated by constructing reservoirs, lining channels with impervious clay, and even timing releases of water into longer canals at night, when evaporation was minimal [74,83,89].
There was also no advance guarantee for the success of the uncertain irrigation venture at Dujiangyan, which required intricate water-energy balance among the elements of the headwater infrastructure. This could only have been perfected by repeated trial and error adjustments as floodwaters rushed past over a period of years. The history of failure of a contemporaneous irrigation project on the Wei River, in what is now Shaanxi Province, serves as a stark reminder of the difficulty in preventing buildup of silt and salinity [126,150]. The challenges on the Wei River, which have never been completely overcome, were avoided by well-designed engineering on the Minjiang River, finely tuned maintenance of the headworks, and the linpan settlement pattern, which fostered sustainable irrigation practices and ensured upkeep the vast irrigation area below the headworks [106,151]. Waste was also minimized, because excess water flowing through the irrigated fields was eventually returned to its source in the Minjiang River.
The WEF nexus relationships of qanats and the Dujiangyan irrigation scheme have remained remarkably stable and resilient as political structures changed over the centuries and under all but the most extreme environmental and social disruptions [51,72,88,103,104,106,110,152]. Such sustainability was due in large part to the constraints imposed by limited availability of water and energy, resources that with few exceptions, could not be stored in quantity for later use. Moreover, humans could not transport water and energy over significant distances. Water from wells could be used domestically and for drinking [61], and trees, shrubs, and crop residues could be harvested for heat and cooking, but these sources could hardly be used to grow food [113]. Available sources of water and energy were for the most part appropriated for food production in real time, a practice that permitted exploitation but not overexploitation [63].
Effective principles of governance to ensure smooth operation of the physical WEF components also fostered stability and resilience [51,74,91]. These principles arose in tandem with the technology and proved to be flexible and customizable. Qanats and their associated principles of governance radiated from the Iranian plateau and may also have arisen independently at sites as far east as the Turpan basin of what is now Xinjiang, China [153,154]. Early qanat distribution included the Levant, North Africa, Central Asia, and areas now in Pakistan, Afghanistan, and Oman [46][47][48]63,78,79,89,91,115,135,[155][156][157][158][159]. Effective governing practices similarly characterized the Chengdu plain as the headwater infrastructure was updated and the irrigation area enlarged and reconfigured over time [93,98,100,104,110,111].

Modern Threats to Qanats and the Dujiangyan Irrigation Scheme
Given their lengthy historical records of success in achieving WEF nexus, it is ironic that the world's qanats and the revered Dujiangyan irrigation scheme are now jeopardized. Climate change, which has altered precipitation patterns and exerted dramatic recent effects on streamflow and groundwater availability, is a major threat that is projected to intensify in the future as glaciers recede and temperatures continue to rise in qanat areas and the Minjiang River watershed [66,97,160]. Groundwater availability to qanats in Iran and Afghanistan is declining [161,162], as are flows of the Minjiang River [163], and these trends are expected to continue unless mitigation steps are undertaken.
Other threats relate to human activities. By the mid twentieth century, qanats were becoming seen as old-fashioned and inefficient [52,[164][165][166]. External energy was available to operate pumps, and so deep wells were drilled to provide an alternative source of irrigation water [55,84,167]. Construction was straightforward, maintenance minimal, and operation necessary only when water was needed [51,83], but deep wells also made it easy to deplete groundwater [59]. As water tables fell, flows through nearby qanats slowed and sometimes dried up [167].
The wells, many of which were privately owned, also proved to be poorly compatible with longstanding social and cultural practices for upkeep of qanats and allocation of water from them [63,66,165]. In some areas, these disturbances were exacerbated by declining interest in agriculture [91,168] and centralized policies that redistributed land and further diminished the collective spirit that characterized communities dependent on qanats [88,92,169,170]. The virtues of qanats have not been entirely discounted, and construction never ceased entirely, [88,171]. They can be re-engineered, rehabilitated, and sometimes equipped with pumps to accommodate lowered water tables [48,53,83]. Drilling of deep wells has even been banned in some areas [92], but the future of these structures is nevertheless doubtful [59,61,83,124,171].
Although the Minjiang River's flow has been altered by several modern Dujiangyan headworks structures, as well as a large new hydroelectric dam that lies just upstream from them [101,103,172,173], most of the modern threats to the irrigation scheme are playing out on the plain and are socioeconomic rather than technological [106]. The headworks and linpan irrigation areas lie within the jurisdiction of the city of Chengdu, a rapidly growing urban area with a total population of more than 16 million [174][175][176][177]. The linpan areas retain much of their rural character, but this is changing as the city grapples with population increase and urban development. Centralized policies to free up agricultural land and consolidate farms on the patchy landscape are leading to demolition of linpan settlements and relocation of residents to more concentrated villages [104,110,178]. This process, which has been accelerated by quick action to repair damage caused by the destructive 2008 Wenchuan earthquake [110,146], has weakened the fine-grained WEF decision making that has persisted for so long in the irrigation area [106,111].
Shifts in agriculture are accelerating this process. Cultivation of annual food crops such as rice is giving way to plant nurseries and orchard crops, as well as a flourishing agrotourism industry. Both have been made possible by the availability of fossil fuels, but neither requires water from traditional irrigation channels [98,104,106,113,146]. Although there is no doubt about the survival of the Dujiangyan headworks, which are now listed as a UNESCO World Heritage Site [102], the same cannot be said about their millennia-long function in food production on the Chengdu plain.

Discussion and Conclusions
Early settled agriculture began with attempts to adapt food production to natural conditions, but farmers eventually discovered that they could reverse the process and modify the environment to suit their own purposes [36,179]. Although it was necessary to find the right climate and soils, select adapted crops, and adopt sound agronomic practices, water was the limiting factor in much of the world. It was scarce in many areas, overabundant in others, and often available only during seasons of the year when there was no cultivation or in locations that required uphill transport to nearby fields [86,180]. Individually and in small groups, our earliest forebears devised simple methods to overcome these challenges. Berms and other barriers, ditches, ponds, and water lifting devices were all devised to retain, redistribute, and sometimes exclude water to meet demands for food [181]. Complex governance would have been unnecessary for such simple, small scale efforts, but as is evident from analysis of the case studies presented here, this changed as the magnitude and complexity of the undertaking increased [182].
Guidance for the future often emerges from the past, and it takes on added significance when past achievements stand the test of time. It is understandable that efforts to solve current and future WEF challenges might overlook the approaches taken to surmount these same challenges long ago. After all, introduction of profound technological and other advances over a lengthy timespan has gradually masked underlying similarities. Although sophisticated analytical frameworks to assess modern nexus relationships are now available [183,184], lack of data precludes their use as tools to comprehensively unravel relationships of the distant past. Analysis of ancient practices nevertheless makes it clear that early humans exercised wisdom and foresight about interlocking WEF relationships in their quest to produce food under conditions that were less than ideal ( Table 2). They also benefitted from good luck. Table 2. Major characteristics of ancient and modern WEF nexus.

Characteristic Then Now
Transport of water, energy, or food across long distances Rare [61,104] Frequent [185][186][187][188][189] Relationship between movement of water and energy Tightly linked, nearly impossible to overexploit [55,56,98,101] Mostly decoupled, overexploitation an increasing problem [190][191][192] Overall governance, including allocation to users Many key decisions local and tradition-based, guided by self-interest of beneficiaries [91,92,100] Decisions often made remotely, prone to transboundary and political conflicts [193][194][195][196] Technology and resources Local, based on indigenous knowledge and knowhow, perspective usually long [81,97,98] Usually externally sourced, intended beneficiaries often feel disenfranchised [197,198] Balance between the WEF nexus components Sought during the entire decision-making process [53,101,155] Often sought after initial decisions have been made [15,29,199] WEF nexus synergies and tradeoffs Synergies predominate, tradeoffs uncommon [53,83,93,106] Synergies and tradeoffs common, unintended consequences frequent [200,201] Physical isolation was always a major factor in the past, and self-sufficiency was paramount. Moreover, opportunities to transport any of the three WEF components over long distances were limited, and it was nearly impossible to separate water from energy in time and space or to store either for later use in food production. Isolation also placed the burden of obtaining resources and expertise, and to a significant extent technology, in local hands. In practice, these constraints mandated close attention to interrelationships among WEF components. The means to procure water and energy for food production may have been centralized, but decisionmakers never underestimated the importance of empowered beneficiaries in achieving their goals. Except in extreme cases, routine governance-allocation of water, upkeep of infrastructure, and adjudication of disputeswas devolved to the people in local communities who used the water to grow food. These practices proved to be pivotal in allowing synergies to predominate over tradeoffs ( Table 2).
The three components of WEF nexus have now been largely released from the stringent spatiotemporal constraints of the distant past, but new constraints have appeared. Energy has been converted into an expensive global commodity [202], and its flows can be readily separated from those of water. Energy now allows irrigation water to be stored and transferred from basin to basin, often across significant distances and against the force of gravity [203,204]. Energy availability has also become a key factor in agricultural mechanization [205], but WEF tradeoffs are becoming apparent. Hydroelectric dams disrupt seasonal water cycles that are important for food production, and their associated reservoirs often flood fertile farmland [25,206]. Inter-basin transfer of water creates winners and losers [203,204,207], and the drive for renewable energy and lowered levels of atmospheric carbon creates food crop versus energy crop tradeoffs [208,209]. Release from the spatiotemporal constraints of long ago has nevertheless increased WEF resilience, generated buffering capacity against natural disasters and other threats, and uncovered comparative advantages that can be exploited locally. These benefits are unquestionable, but they have also heightened awareness about overexploitation of resources and unintended consequences [210][211][212].
Paying careful attention to WEF interrelationships in advance rather than after decisions have been made, assigning as much authority as possible to those impacted by decisions, and taking advantage of local knowledge and knowhow [213][214][215][216] are as relevant today as they were millennia ago. Strategies to in effect revisit these principles have been recently proposed and implemented in a few cases [217][218][219][220][221][222][223][224]. Although there can be no return to the circumstances of the distant past, when scale and complexity were much simpler than today, the principles of ancient WEF nexus governance nevertheless deserve another look [46,53,72,89,[108][109][110][111][112][113][225][226][227].
Funding: This research received no external funding.