Cooperative adaptive management of the Nile River with climate and socio-economic uncertainties

The uncertainties around the hydrological and socio-economic implications of climate change pose a challenge for Nile River system management, especially with rapidly rising demands for river-system-related services and political tensions between the riparian countries. Cooperative adaptive management of the Nile can help alleviate some of these stressors and tensions. Here we present a planning framework for adaptive management of the Nile infrastructure system, combining climate projections; hydrological, river system and economy-wide simulators; and artificial intelligence multi-objective design and machine learning algorithms. We demonstrate the utility of the framework by designing a cooperative adaptive management policy for the Grand Ethiopian Renaissance Dam that balances the transboundary economic and biophysical interests of Ethiopia, Sudan and Egypt. This shows that if the three countries compromise cooperatively and adaptively in managing the dam, the national-level economic and resilience benefits are substantial, especially under climate projections with the most extreme streamflow changes. The Nile River system is faced with challenges including increasing water demands, political tensions, and future climate and socio-economic uncertainties. Cooperative adaptive management can help increase synergies, balance trade-offs and bring various benefits to riparian countries.

The uncertainties around the hydrological and socio-economic implications of climate change pose a challenge for Nile River system management, especially with rapidly rising demands for river-system-related services and political tensions between the riparian countries. Cooperative adaptive management of the Nile can help alleviate some of these stressors and tensions. Here we present a planning framework for adaptive management of the Nile infrastructure system, combining climate projections; hydrological, river system and economy-wide simulators; and artificial intelligence multi-objective design and machine learning algorithms. We demonstrate the utility of the framework by designing a cooperative adaptive management policy for the Grand Ethiopian Renaissance Dam that balances the transboundary economic and biophysical interests of Ethiopia, Sudan and Egypt. This shows that if the three countries compromise cooperatively and adaptively in managing the dam, the national-level economic and resilience benefits are substantial, especially under climate projections with the most extreme streamflow changes.
Human activities have increased the atmospheric concentration of GHGs, leading to warming of the Earth's land, atmosphere and ocean [1][2][3][4] . Global initiatives such as the Paris Agreement 5 and the Sustainable Development Goals 6 aim to reduce the impacts of climate change by limiting the rise in global temperature and stepping up adaptation efforts. However, the global mean temperature continued to rise over the past two decades, from 0.89 °C in 2001-2010 to 1.09 °C in 2011-2020 above pre-industrial conditions 1 . The Nile Basin (Fig. 1) faces the threat of climate change alongside water scarcity, rapidly rising pressures on water resources due to population and economic growth, and a politically complex transboundary water management system. The Nile Basin is located in northeastern Africa, occupies around 10% of the continent's area and extends over 11 countries. Supplementary Section 1 provides further information on the Nile geography.
Since the beginning of the twentieth century, several large water infrastructure projects have been constructed on the Nile River to reduce the spatial and temporal variabilities of the river flow and to facilitate water supply, flood control and hydropower generation. Most of these infrastructures are in Egypt, Sudan and Ethiopia. Currently, most of the consumptive usage of the Nile streamflow, measured at Aswan, is located in Sudan and Egypt 7,8 . Over the past two decades, Ethiopia has been increasing its use of the Nile, primarily for hydropower generation. The construction of the Grand Ethiopian Renaissance Dam (GERD) on the Nile near the Ethiopian-Sudanese border ( Fig. 1) flared up political Article https://doi.org/10.1038/s41558-022-01556-6 GERD negotiations was a series of meetings held from November 2019 to February 2020, with the United States administration and the World Bank as observers 18 . These meetings produced a proposal for the dam's initial filling and long-term operation (hereon referred to as the Washington draft proposal) 19 , but the proposal was unacceptable to Ethiopia, which opined that the proposal would limit power generation from the dam and restrain future development 20 .
Alongside this changing political landscape, the quantity and intensity of rainfall and streamflow in the Nile Basin have changed over the past two decades and are expected to continue to change due to climate change. However, the direction and magnitude of future changes to the Nile climate are uncertain, stemming from different scenarios, modelling and downscaling choices 21,22 . In the Nile context, these inconsistencies in climate projections diminish the value of using one projection or a multi-model ensemble mean in climate adaptation planning 22,23 .
tensions between Ethiopia, Sudan and Egypt on Nile water use [9][10][11][12] . The construction of the GERD started in 2011, and when completed, the dam will have a total storage capacity of 74 billion cubic meters (bcm) and an installed power capacity of 5,150 MW. The total storage capacity of the GERD is equivalent to 1.5 times the historical mean annual river flow at the dam location. The dam is expected to result in a range of opportunities and risks to Sudan and Egypt. Subject to coordination and data sharing, hydropower generation, irrigation water supply reliability and flood control in Sudan could improve because of the dam [13][14][15][16] . Still, the dam will probably produce adverse environmental impacts and losses to recession agriculture in Sudan 17 . For Egypt, the GERD is expected to reduce hydropower generation and impose irrigation water deficits if there is no coordination on managing multi-year droughts 7,12 .
Despite over a decade of negotiations, there is still disagreement and political tension between Ethiopia, Sudan and Egypt on the GERD's initial filling and long-term operation. A milestone in the tripartite  The large uncertainties associated with the water resource implications of changes in socio-economic and climate systems motivate adaptive infrastructure development plans [24][25][26][27][28][29] . Several approaches have been proposed to enable planning under deep uncertainty 26,30 ; these allow designing robust and flexible plans that maximize resilience and minimize investment costs on the basis of, for example, adaptation tipping points 31 , dynamic adaptive planning 32 and dynamic adaptive policy pathways 24,33 . Several recent studies have applied such adaptive methods to planning water resource systems in various contexts 25,34-38 . For instance, a reservoir adaptive planning framework has been developed to explicitly consider learning about climate uncertainty over time 35 , and other studies have optimized the indicators, actions and/or thresholds in the design process of adaptive plans for water resource systems 33,36,39,40 . However, none of the previous studies considered engineering performance alongside economy-wide performance in the design process of climate adaptation plans for large water infrastructure systems, even though the ultimate goal of building and operating infrastructure is typically to stimulate economic development and generate economy-wide gains.
Here we introduce a planning framework for adaptive management of river infrastructure systems to consider both the socio-economic and hydrological uncertainties of climate change and policy.
The framework uses climate and socio-economic data from the Coupled Model Intercomparison Project 6 (CMIP6) 41 to drive integrated hydrological, economy-wide and river system simulators of the Nile Basin. Our adaptive planning framework uses artificial-intelligence-based algorithms to design efficient adaptive plans for climate change on the basis of thousands of iterations between the algorithms and the integrated simulators. We use the framework to design a cooperative adaptive management policy for the GERD (for 2020-2045) that considers economic and river system interests of Ethiopia, Sudan and Egypt. The results demonstrate that if the GERD is adaptively managed, the economic and resilience benefits to individual countries (especially under extreme climate projections) are substantially larger than with less adaptive responses such as the Washington draft proposal.

Adaptive planning framework for Nile management
In this study, we introduce an adaptive planning framework for managing the Nile infrastructure system in the face of climate and socio-economic changes, including four interconnected stages ( Fig. 2)     (3) simulating the economy-wide and river system infrastructure performance under the selected projections, and (4) designing an adaptive plan for managing river system infrastructure. The four stages are numbered in Fig. 2    Because climate change scenarios have implications for river systems and their economies, the third stage of the framework aims to capture these implications through integrated economy-wide and river system simulators 7 . The river system simulator accounts for all major infrastructure in the Nile Basin in monthly time steps and uses the naturalized streamflow and PET time series generated in the second stage. Furthermore, dynamic-recursive annual computable general equilibrium (CGE) models were developed for Ethiopia, Sudan and Egypt to simulate their economies.
Climate projections may have different global socio-economic development pathways associated with them 41 . Accordingly, the CGE models were exogenously driven by national-level projections for labour growth and population growth, total and sectoral productivities, and climate policies that differ with each SSP characterizing the climate projections 44-46 . Population growth projections under the SSPs were also used to change (that is, increase or decrease) municipal water demands in the river system simulator.
The fourth stage of the framework seeks to design adaptive management policies for the Nile water infrastructure. Climate adaptation planning is achieved using an artificial-intelligence-based approach (multi-objective evolutionary algorithm) to design efficient adaptive management plans. These plans involve adaptation mechanisms based on new information gained about climate change impacts on the river system and riparian countries as the future unravels. The design framework identifies efficient adaptive plans that maximize the riparian countries' economy-wide and river system interests in different ways and reveal trade-offs.

Implications of climate change for the Nile
Under the 29 examined projections, the results show varying impacts of climate change on the naturalized streamflow of the Nile and some socio-economic characteristics of Ethiopia, Sudan and Egypt (Fig. 3). The lower the GHG emissions and EOC forcing levels, the lower the change in precipitation and streamflow (Fig. 3a). The 30-year moving average naturalized streamflow data shown in Fig. 3c-f indicate that the mean Nile streamflow could change by between −13% and +90% by 2050 compared with 2020. The intra-annual variability of the naturalized streamflow of the Nile and its main tributaries is projected to change (Extended Data Fig. 1 Various SSPs that underpin climate projections have different implications for baseline gross domestic product (GDP) and population growth and urbanization in Ethiopia, Sudan and Egypt over 2021-2050 (Fig. 3b) [44][45][46] . The highest economic growth for each of the three countries is projected under SSP5, whereas the lowest economic growth occurs under SSP3.

Cooperative adaptive management policy for the GERD
We use the Nile adaptive management framework to formulate and design an adaptive management policy for the GERD's initial filling and long-term operation for 2020-2045, involving short-term rules and interim and long-term adaptation measures to cope with climate change uncertainties.
The formulation is based on cooperative behaviour whereby the riparian countries consider each other's interests through adaptive measures. The formulation of the GERD adaptive filling and operation policy is described briefly below and detailed in Extended Data Fig. 5.
In the adaptive formulation, water retention during the GERD's initial filling phase is carried out in July and August and follows a stage-based approach (Supplementary Table 2) while maintaining a minimum outflow of 1.28 bcm per month, similar to the Washington draft proposal 19 . From March to June, additional interim water releases during the initial filling phase are made if the storage of the High Aswan Dam (HAD) reservoir in Egypt falls below 60 bcm. This would enable quick initial filling of the GERD, as data show consistently high water storage in the HAD reservoir in recent years (2020-2022) 47 .
In the long-term operation phase of the adaptive formulation, GERD water releases aim to generate a regular power target when reservoir storage is above a level termed the power reduction threshold, but this target is reduced as an interim precaution if GERD storage runs lower than a power reduction threshold to allow storage recovery during and following multi-year droughts. To help Egypt during droughts, an interim minimum monthly drought mitigation water release from the GERD is activated if the storage of the HAD reservoir stays below 60 bcm over the past six months for an extended period; this period is termed the drought trigger. This interim drought mitigation measure is activated only if the GERD storage is above a threshold termed the drought outflow storage threshold. The operations of the seasonal storage dams downstream of the GERD follow their historical rules during the GERD's filling phase, whereas their reservoirs are kept as high as possible during the long-term operation phase, similar to assumptions made by previous studies, assuming data sharing between Ethiopia and Sudan 7,14-16 .
Long-term adaptation measures are applied to the GERD's regular and reduced power targets, the drought trigger of the HAD, and the interim minimum monthly drought mitigation water release. The long-term adaptation measures are triggered on a five-year interval, involving increasing or decreasing these four GERD management variables on the basis of the change in the mean annual inflow to the dam over the past five years in relation to the historical mean annual inflow over 1980-2019. For instance, if the mean annual inflow to the GERD increased over the past five years compared with the historical mean, the four above-mentioned GERD operation variables are increased proportionally, and vice versa.
The artificial-intelligence-based search component of the framework was used to design the adaptive GERD management policy described above. The search algorithm optimizes seven variables; these variables and their upper and lower bounds are reported in Supplementary Table 3. The variables are designed to maximize nine objectives of Ethiopia, Sudan and Egypt over 2020-2045 across the 29 climate change projections: the accumulated GDP values of each country (three objectives); the GERD's 90% firm power (one objective); the annual hydro-energy generation of the GERD, Sudan and Egypt (three objectives); and the annual irrigation water use in Sudan and Egypt (two objectives).

Economic and river system benefits of adaptive GERD management
The results reveal differences between the aggregated economy-wide and river system performance objectives over 2020-2045 under 1,032 efficient GERD adaptive management options and the performance under the Washington draft proposal, as shown in the parallel coordinates plot 48 depicted in Fig. 4a. The reader is referred to Supplementary Section 2, Supplementary Table 2 and Extended Data Fig. 6 for the implementation details of the Washington draft proposal. Four efficient adaptive GERD policy designs are highlighted in Fig. 4a (the green, blue, purple and cyan lines): a favourable design for each of Ethiopia, Sudan and Egypt that results in the highest national accumulated GDP benefits, and an example compromise design that results in Climate projections (higher Nile streamflow →) Climate projections (higher Nile streamflow →) Climate projections (higher Nile streamflow →) Year Year Year  The results reveal varying costs and benefits across climate projections ( Fig. 4b-i). For instance, in the most favourable design for each country taken individually, the discounted GDP over 2020-2045 could increase by up to US$15.8, US$6.3 and US$3.0 billion for Ethiopia, Sudan and Egypt, respectively, compared with the Washington draft proposal. However, these country-centric designs lead to GDP losses for at least one of the other two countries. In contrast, the mean GDP changes are positive for the three countries under the compromise design.
The temporal evolution of GDP changes under different climate projections and GERD policy designs (Fig. 5) shows that adaptive GERD management benefits Ethiopia and Sudan the most under climate projections with the highest streamflow. The favourable Egyptian design benefits Egypt during multi-year droughts in climate projections with low streamflow, but it reduces the overall Sudanese and Ethiopian benefits (Fig. 5). The compromise system design results in balanced performance across the three countries.
The seven optimized variables of the GERD adaptive policy show varying influence on the Ethiopian, Sudanese and Egyptian performance objectives (Fig. 6). The Egyptian GDP is influenced the most by the interim minimum drought mitigation water releases (Fig. 6a), as most of Egypt's benefits and costs materialize during droughts through irrigation. In contrast, the most influential parameter for the Sudanese and Ethiopian GDPs is the GERD's reduced power target (Fig. 6b,c). For Sudan, decreases in GERD water releases due to power reduction influence irrigation (Fig. 6f) and hydropower (Fig. 6g) because of the absence of multi-year storage dams to buffer this variability.

Discussion
Because the Nile River is crucial to its population's economic development and well-being, adaptation strategies are needed to cope with the deep uncertainties associated with future climate change 26,49 . An approach that can identify efficient options for transboundary adaptation and demonstrate their economy-wide and river system benefits and trade-offs could provide a platform for discussions on Nile adaptation strategies. The adaptive planning framework introduced in this paper can design adaptive policies for large infrastructures to cope with climate change uncertainties. Using a meta-heuristic artificial-intelligence-based algorithm for the search process provides twofold benefits. First, it enables finding multi-dimensionally efficient (Pareto-optimal) solutions for complex and highly nonlinear interlinked river and economic systems. Second, it optimizes on the basis of linked but independent simulation models developed by different disciplines. Although the proposed framework can capture direct and induced impacts of climate change and infrastructure management policies on river and economy systems, it should be complemented with approaches to assess other impacts on groundwater, river ecology and riparian populations 7,50 .
The analysis of the GERD's initial filling and long-term operation shows that adaptively managing the dam to maximize the national benefits of any of the three countries would be costly for at least one of the other two countries. We show that a compromise adaptive management approach could produce balanced benefits for the three countries. These results demonstrate the opportunity cost of not implementing collaborative adaptive solutions, especially under extreme climate change projections. It is high time to integrate climate change adaptation into the decade-long negotiations between Ethiopia, Sudan and Egypt over the GERD and the broader Nile management discussion between the 11 riparian countries.
Although the adaptive formulation examined in this study includes some controlling features (for example, the 60-bcm HAD drought threshold and the five-year adaptation period) that constrain basin-wide water management, it represents an incremental step towards adaptive cooperation. Our goal is to show that any step towards adaptive cooperation results in benefits. Such an incremental approach can help build trust between riparian countries and make an eventual unconstrained basin-wide adaptive management easier to achieve, aiming to maximize basin-wide benefits, adopt benefit-sharing and build on the comparative advantages of each riparian country.
Practical use of the proposed framework in Nile negotiations requires riparian countries to negotiate an adaptive formulation and define the ranges within which decisions can be optimized. The philosophy behind the adaptive formulation should be guided by a long-term vision to counter future climate and socio-economic uncertainties. The efficient cooperative adaptive designs emanating from the agreed formulation should then be negotiated to find a compromise solution that balances national-level and basin-wide performance.

Online content
Any methods, additional references, Nature Portfolio reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at https://doi.org/10.1038/s41558-022-01556-6.

Methods
Here we introduce an adaptive planning framework for the Nile Basin that combines climate change projections; integrated hydrological, economy-wide and river system simulators; and multi-objective evolutionary and machine learning algorithms. Below is a description of the components and data of the framework.

Climate projections
Twenty climate projections were selected from CMIP6 Tier 1 GCMs on the basis of uniform sampling to cover the full range of available SSPs, radiative forcing and the joint distribution of EOC change in precipitation and temperature over the Nile Basin. Processing, downscaling and bias correction of the GCM simulations were driven by the requirement for transient (2017-2100) three-hourly forcing data across seven climate variables that govern the surface mass and energy balances in the hydrological model (described in the next section). The seven variables are precipitation, temperature, incoming shortwave radiation, incoming longwave radiation, humidity, wind speed and surface pressure. Given the large spatial domain, the low availability of subdaily model output for all of the relevant variables in CMIP6 and challenges of multivariate bias correction 51 , we derived bias-corrected transient projections by (1) resampling the 0.25° historical baseline climate dataset to match the (detrended) relative variability of the selected GCM projections and then (2) applying perturbation factors to reintroduce the change signal extracted from the GCMs following a quantile delta mapping approach 52 .
In more detail, we first detrended the basin-average monthly future precipitation series for 2017-2100 in each GCM run on a month-wise basis using smoothed 37-year moving averages. Second, we ranked the detrended future series month-wise and matched the ranks to their equivalents in the historical baseline precipitation dataset of 1981-2016, allowing us to construct synthetic climate series for 2017-2100 at the three-hour temporal resolution of the historical climate datasets by inserting the relevant month of data from the historical dataset at the right place in the future series. The synthesized series thus have the same overall sequencing of relative intra-annual (seasonal), interannual and multi-annual variability as the original GCM projections in rank terms, while preserving the statistical properties (including spatial, temporal and intervariable consistency 53,54 ) and resolution of the historical baseline dataset (that is, without GCM bias). The historical baseline climate datasets used are the Multi-Source Weighted-Ensemble Precipitation (MSWEP) 55 for precipitation and the Princeton Global Forcing (PGF) 56 for the other climate variables. The 0.1° MSWEP data were regridded to the 0.25° PGF grid before the climate series was synthesized.
For each of the 20 climate projections, we then reintroduced the climate change signal to the synthesized 2017-2100 climate series, producing bias-corrected and perturbed projections. The transient climate change signal was reintroduced on a month-wise basis using a 37-year moving window of quantile-based perturbations 52 . Smoothing was applied to the perturbation factors via a moving average to avoid any jumps between successive windows. We note that this method does not adjust the frequency of wet periods/days within a month, and it is not designed to focus on projected changes in precipitation extremes, given the study's focus on water resources management on a monthly scale rather than flood frequency.
Several previous studies have highlighted how the wetting trend in climate projections for eastern Africa stands in contrast to the observed decline in precipitation from the 1980s to the late 2000s 42 . This contradiction, known as the Eastern African Paradox, represents a challenge for climate adaptation planning 42,43 . While the literature shows a growing understanding of how this issue is linked with regional circulation dynamics and their representation in models 57,58 , there is not yet a consensus on how the projections might be constrained. Yet, if the projections are taken at face value, there is a risk that adaptation measures are designed for a highly uncertain wetter climate that might not materialize, with potentially severe socio-economic consequences.
To address this issue, we synthesized nine additional scenarios based on 9 of the 20 initial projections by removing the overall wetting tendency in the CMIP6 ensemble for the East Africa region. The magnitude of the tendency was estimated by quantifying the mean increase in EOC mean precipitation for a unit increase in mean temperature according to the full GCM ensemble, given their strong relationship in this context. The relationship was then used to adjust individual GCM precipitation trends downwards, allowing us to select the nine projections representing the most pessimistic scenarios in terms of precipitation decreases, which enables stress-testing adaptation policies across a wide range of plausible futures (Fig. 3a). Supplementary Table 1 lists the 29 projections and their main features. Daily PET was calculated for the 29 projections using the FAO56 Penman-Monteith method 59 .

Hydrological simulator
To generate time series of historical and projected naturalized streamflow for the Nile Basin, we used and calibrated the Variable Infiltration Capacity (VIC version 5) land surface model 60 and the Routing Application for Parallel Computation of Discharge (RAPID) 61 . The VIC and RAPID models were originally developed in a previous study to reconstruct vector-based global naturalized streamflow 62 . The hydrological model has a spatial resolution of 0.25° and a three-hourly temporal resolution. The historical streamflow time series was driven by MSWEP 55 and temperature, incoming shortwave radiation, incoming longwave radiation, humidity, wind speed and surface pressure data from the PGF 56 . The 29 projected streamflow time series were driven by similar climate variables obtained from the climate projections described in the previous section. The VIC and RAPID models were calibrated against a historical naturalized streamflow dataset of the Nile previously developed for the Eastern Nile Technical Regional Office 63 . The hydrological model was calibrated using baseflow parameters, depth of soil layers, variable infiltration curve and maximum soil moisture. Supplementary Table 5 shows the ranges of the values of the calibration parameters for all grid cells in the hydrological model. The RAPID model routes streamflow using the Muskingum method 64 and requires a river network to determine Muskingum parameters (that is, the gradient coefficient and the weighting factor). The river network was obtained from the Hydrological data and maps on the basis of SHuttle Elevation Derivatives at multiple Scales (HydroSHEDS) 65 . The hydrological model was calibrated over the period 1982-1992 and validated over 1993-2002 at four locations where naturalized flow data are available. Supplementary Table 6 shows the performance of the hydrological model in the calibration and validation periods, and Supplementary Table 7 summarizes the model performance ranking criteria adopted. As elaborated in the next section, the combined hydrological and river system simulator was calibrated at additional locations.

River system simulator
To simulate the performance of the Nile River system infrastructure under climate change and various adaptive management options, we developed a monthly river system model for the basin using Python Water Resources (Pywr) 66 . A river system model is a network representation of the supplies, demands and infrastructures of water resources in a river system 67 . Pywr is an open-source Python library that simulates resource networks. It enables representing water resources system infrastructure (for example, dams, lakes, aquifer-based water supply and water abstraction locations) in a network structure driven by water supplies (for example, hydrological inflows) and demands (for example, irrigation, municipal and industrial water demands and hydropower) and system operating rules. Pywr uses a linear programming approach to simulate water allocations at each time step (monthly in this study) subject to constraints imposed by system operation rules. Supplementary Fig. 3 shows a schematic of the Nile River system model https://doi.org/10.1038/s41558-022-01556-6 and its elements, and Supplementary Table 8 shows the main features of the dams included in the model. The model uses the naturalized streamflow time series of the Nile generated using the hydrological model described in the previous section. Data for dams, lakes, reservoirs, and irrigation and municipal water demands were collected from different sources, including the Nile Basin Initiative and previous studies 14,15,[68][69][70][71] .
In simulating future scenarios, the water demands of irrigation schemes and the net evaporation rates of lakes, reservoirs and swamps were modified (increased or decreased) on the basis of the annual change ratio of PET at their locations relative to the historical annual mean. Extended Data Figs. 3 and 4 show the projected annual change in PET relative to the historical mean at some selected dams and irrigation schemes in the Nile River system. Future municipal water demands were calculated by applying the population growth rates projected under different climate change scenarios (that is, SSPs). The population growth projections under different SSPs were obtained from the International Institute for Applied Systems Analysis (IIASA) database 44,45 . Supplementary Section 3 describes the initial water demand assumptions for Ethiopia, Sudan and Egypt. The Nile River system simulator was calibrated and validated at ten locations over 1995-2010 using historical river flow observations and reservoir and lake water levels. This calibration period was chosen on the basis of the availability of common and continuous historical observed data for the ten selected locations. Supplementary Fig. 4 and Supplementary Table 9 show the performance of the Nile River system model over the calibration and validation periods, Supplementary Table 10 reports the calibration parameters and their values, and Supplementary Table 7 reports the performance ranking criteria. Total non-hydro (for example, thermal) generation for each country was represented as a super generator used to fill the gap between hydropower generation and national electricity demand subject to generation capacity. The non-hydro generation capacity and national electricity demands are updated annually on the basis of an iterative process between the river system and the economy-wide simulators, as described in a later section.

Economy-wide simulator
The standard open-source CGE model of the International Food Policy Research Institute 72 was modified and used to develop economy-wide models for Ethiopia, Sudan and Egypt. The production and consumption specifications in the CGE models are shown in Supplementary Figs. 5 and 6. The CGE models were set up to run dynamically over multi-year periods (that is, dynamic-recursive) following endogenous investment behaviour, exogenous total and sectoral factor productivities, labour growth, and energy use efficiency trends.
The CGE models of Ethiopia, Sudan and Egypt include five agent types: households, the government, enterprises, industries (or economic activities) and the rest of the world. Households are disaggregated into rural and urban groups. Ethiopia's, Sudan's and Egypt's CGE models include 12, 15 and 14 economic activities, respectively. Economic activities use the following factors of production: labour, general capital, land, hydropower capital, non-hydro capital, renewables capital, water supply capital, oil capital and gas capital. Labour and general capital are assumed mobile between sectors, whereas the other factors are sector-specific. All capital types, except water supply and hydropower capitals, grow or shrink over time on the basis of investment behaviour according to relative rates of return. Water supply and hydropower capitals were not included in the year-to-year investment behaviour, as expansion in these infrastructures typically requires abrupt investment in the Nile context.
We assume that commodity prices on the international market are exogenous, following the small open-economy assumption 73 . The government is assumed to spend a fixed share of total absorption. Saving propensities are fixed, and the exchange rate is variable. The CGE models were calibrated to social accounting matrices for 2011 obtained from the International Food Policy Research Institute [74][75][76] . We then used the GTAP-Power 10 database for the year 2014 77 to disaggregate the electricity sectors of the social accounting matrices. Five dynamic baselines were calibrated for the CGE models of Ethiopia, Sudan and Egypt, with each baseline corresponding to an SSP. The baseline total factor productivity values were set up such that the baseline models follow projected economic growth (obtained from the IIASA database) for each SSP scenario 46 . After that, the total factor productivity values were fixed and applied exogenously. Labour growth (16-64 age group) 45 , urbanization 78 and population growth 45 projections for each of the three countries were obtained from the IIASA database and applied exogenously to the CGE models. Also, projections for national-level sectoral productivity under each SSP were obtained from the Centre d'Études Prospectives et d'Informations Internationales 79 and applied exogenously to the CGE models. Sectoral future energy use efficiency values were calibrated such that the baseline simulated country-level carbon dioxide emissions in the baselines follow the growth pattern of the regional emission values of the Middle East and North Africa projected by IIASA for each SSP 80 . Carbon dioxide emissions were calculated in the CGE models by applying emission factors (tons of carbon per terajoule) to the use of petroleum, gas and coal commodities in the economies.
Because the CGE models were calibrated on the basis of 2011 social accounting matrices, they were first run dynamically over 2011-2019 to bring the economies to the first year of the GERD's initial filling before scenarios for 2020-2045 were assessed. The temporal evolution of the values of some of the key driving parameters and baseline outputs of the CGE models are shown in Supplementary Fig. 7.

Economy and river system coupling
The river system infrastructure and economy-wide simulators were connected using a generic co-evolutionary framework developed in a previous study 7 . The framework enables linking river system simulation models (with daily or monthly time steps) with dynamic-recursive annual CGE models. At each annual time step, the coupling framework performs an iterative bidirectional communication between the river system and the CGE simulators to ensure coherence in the annual national-scale irrigation water supply and demand, municipal water supply and demand, hydropower generation, non-hydro generation and capacity, and electricity demand. In each iteration over an annual time step, the river system model quantifies and spatially aggregates national-scale irrigation and municipal water supplies and hydro and non-hydro generation on the basis of the river system's spatial and temporal constraints, infrastructure, and external drivers. This information is then passed to the CGE models as an external shock on the basis of which changes to the economy's municipal and irrigation water demands, electricity demand, and non-hydro capacity are determined and passed back to the river system model for the next iteration. Iterations over each annual time step can be terminated by a maximum number of iterations and/or a convergence error. In this work, we specified a maximum of three iterations between the river system and the economy-wide simulators for each annual time step and a convergence error of US$5 million measured using the Ethiopian real GDP. The coupling framework is implemented using the open-source Python Network Simulation framework 81 . The reader is referred to Basheer et al. 7 for further details about the co-evolutionary coupling framework used in this study.

Multi-method artificial-intelligence-based design and learning
In the Nile adaptive planning framework, an artificial-intelligence-based multi-objective evolutionary algorithm (MOEA) provides the ability to identify efficient adaptive management policies for river system infrastructure. Supplementary Fig. 8 shows the interaction between the integrated economy-wide and river system simulators and the MOEA. The MOEA generates a design (that is, a set of decision variable values) for the adaptive management policy (the yellow box in Supplementary Fig. 8), which is then passed to the integrated economy-wide and river system simulators. The integrated model performs a dynamic multi-year multi-scenario simulation considering socio-economic and hydrological uncertainties related to climate change, resulting in aggregated performance metrics (over time and projections) that are indicated as objectives. The adaptive management design and objective values are then stored before proceeding to the next iteration, in which the MOEA suggests new adaptive management designs. The iteration between the MOEA and the integrated simulators continues until a stopping criterion is met. In this study, we use a maximum number of iterations as a criterion to terminate iteration between the integrated simulators and the MOEA. A maximum of 6,000 iterations (or function evaluations) was specified as a stopping criterion for the search process of adaptive GERD management. With every iteration, the MOEA learns from the previous generations of iterations and attempts to suggest an adaptive infrastructure management design that improves performance as measured by the objectives. Once the stopping criterion is met, a non-dominated sorting process is performed to filter efficient adaptive management policies. We used the open-source Non-dominated Sorting Genetic Algorithm III (NSGA-III) 82 as an MOEA for adaptive design. Platypus, an open-source Python-based framework for evolutionary computing 83 , was used, which supports NSGA-III.
The multi-objective search was performed for the adaptive management formulation for the GERD with five random seeds. Each seed represents a unique starting condition for the search algorithm. The use of multiple seeds allows checking that the search has converged to a global, approximately optimal set of solutions. A total of 30,000 iterations were therefore performed during the search process (that is, five seeds multiplied by 6,000 iterations). Optimization convergence was tested by calculating the evolution of the hypervolume 84 for each random seed (Supplementary Fig. 9).
We used machine learning as a post-processing step for understanding the relative influence of adaptive policy variables on economy-wide and river system performance, on the basis of a similar approach to a previous study on economy systems 85 . The values of the adaptive policy variables and the objectives generated during the search iterations between the MOEA and the integrated simulators are used to train a machine learning model for each objective. Accordingly, the features of each machine learning model are the variables of the adaptive policy, and the target is each of the objectives. The Random Forest Regression Machine Learning Algorithm 86 was used. After the machine learning models were trained, feature importance was calculated, which, for each model, represents the relative influence of features on an objective. The Random Forest Regression Algorithm was used through the open-source Scikit-learn Python library 87 .
For the GERD application, 80% of the data on the objectives and decision variables were used to train 100 tree predictors for each machine learning model, and 20% of the data were used to test performance. Maximum tree depth values from 1 to 30 were tested for each machine learning model. The lowest tree depth that provided a good prediction ability while avoiding overfitting or underfitting the data was selected for each machine learning model. Supplementary  Fig. 10 shows the performance of the machine learning models with the training and testing data with different maximum tree depths and the chosen maximum tree depth values.

Implementation of the GERD adaptive management formulation
The GERD adaptive management formulation optimized in this study includes nine objectives and seven decision variables. The objectives maximize the following aggregate metrics over 2020-2045:  Supplementary Table 3. Long-term adaptation measures are applied to the regular power target, the interim reduced power target, the drought trigger and the interim minimum drought mitigation water release. The adaptation measures involve increasing or decreasing these four GERD operation variables dynamically on a five-year interval on the basis of how the mean annual inflow to the GERD over the past five years changed in relation to the historical mean annual inflow over 1980-2019.

Reporting summary
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

Data availability
The economy-related input data supporting this study's findings are available at Zenodo 88 : https://doi.org/10.5281/zenodo.5914757. The Nile River system model and its data are not publicly available due to state restrictions and contain information that could compromise research participant privacy/consent. The Nile model data can be made available upon presentation of the necessary permissions from the relevant authorities that own the data. The CMIP6 climate projections data can be accessed from https://esgf-node.llnl.gov/ search/cmip6/. The baseline population, labour, urbanization and economic growth data of Ethiopia, Sudan and Egypt associated with the SSPs can be accessed from the IIASA database at https://tntcat. iiasa.ac.at/SspDb/dsd?Action=htmlpage&page=10. The sectoral productivity projections of Ethiopia, Sudan and Egypt were produced on the basis of data from the Centre d'Études Prospectives et d'Informations Internationales at http://www.cepii.fr/cepii/en/ bdd_modele/bdd.asp. The MSWEP data are available from http:// www.gloh2o.org/mswep/. The PGF data are available from https:// rda.ucar.edu/datasets/ds314.0/. The river network data used with RAPID are freely accessible from https://www.hydrosheds.org/. The World Bank data referred to in the manuscript are freely accessible from https://data.worldbank.org/. Tekeze-Atbara is projected to witness the biggest change in the intra-annual naturalized streamflow variability under the most extreme scenarios, followed by the Blue Nile.

Corresponding author(s): Julien Harou
Last updated by author(s): Nov 1, 2022 Reporting Summary Nature Research wishes to improve the reproducibility of the work that we publish. This form provides structure for consistency and transparency in reporting. For further information on Nature Research policies, see our Editorial Policies and the Editorial Policy Checklist.

Statistics
For all statistical analyses, confirm that the following items are present in the figure legend, Data Policy information about availability of data All manuscripts must include a data availability statement. This statement should provide the following information, where applicable: -Accession codes, unique identifiers, or web links for publicly available datasets -A list of figures that have associated raw data -A description of any restrictions on data availability The economy-related input data supporting this study's findings are available at Zenodo: http://doi.org/10.5281/zenodo.5914757. The Nile River system model and its data are not publicly available due to state restrictions and contain information that could compromise research participant privacy/consent. The Nile model data can be made available upon presentation of necessary permissions from the relevant authorities that own the data. The CMIP6 climate projections data can be accessed from: https://esgf-node.llnl.gov/search/cmip6/. The baseline population, labor, urbanization, and economic growth data of Ethiopia, Sudan, and Egypt associated with the SSPs can be accessed from the International Institute for Applied System Analysis (IIASA) database: https://tntcat.iiasa.ac.at/SspDb/dsd? Action=htmlpage&page=10. The sectoral productivity projections of Ethiopia, Sudan, and Egypt were produced based on data from the Centre d'Études Prospectives et d'Informations Internationales (CEPII): http://www.cepii.fr/cepii/en/bdd_modele/bdd.asp. The Multi-Source Weighted-Ensemble Precipitation (MSWEP) data are available from: http://www.gloh2o.org/mswep/. The Princeton Global Forcing (PGF) data are available from: https://rda.ucar.edu/datasets/ ds314.0/. The river network data used with the Routing Application for Parallel computatIon of Discharge (RAPID) are freely accessible from: https:// www.hydrosheds.org/. The World Bank data referred to in the manuscript is freely accessible from: https://data.worldbank.org/.

Field-specific reporting
Please select the one below that is the best fit for your research. If you are not sure, read the appropriate sections before making your selection. All studies must disclose on these points even when the disclosure is negative.

Study description
This study introduces the first planning framework for adaptive management of river infrastructure systems to consider both the socio-economic and hydrological uncertainties of climate change and policy. The framework uses climate and socio-economic data from the Coupled Model Intercomparison Project 6 (CMIP6) to drive integrated hydrological, economy-wide, and river system simulators of the Nile Basin. Our adaptive planning framework uses artificial intelligence-based algorithms to design efficient adaptive plans for climate change. We use the framework to design a cooperative adaptive management policy for the Grand Ethiopian Renaissance Dam (GERD) that considers the socio-economic and river system interests of Ethiopia, Sudan, and Egypt.

Research sample
The targeted region of the study is the Nile Basin. The Nile River Basin, located in northeastern Africa, faces the threat of climate change alongside physical and economic water scarcities, rapidly rising pressures on water resources due to population and economic growth, and a politically complex transboundary water management system Sampling strategy Twenty climate projections were selected from CMIP6 Tier-1 based on uniform sampling to cover the full range of available SSPs, radiative forcing, and the joint distribution of EOC change in precipitation and temperature over the Nile Basin. Processing and bias correction of the GCM simulations was driven by the requirement for transient (2017-2100) 3-hourly forcing data across seven climate variables that govern the surface mass and energy balances in the hydrological model. We developed nine additional projections based on 9 of the 20 initial projections by removing the overall wetting tendency in the CMIP6 ensemble for this region.
Timing and spatial scale The overall timeframe of the study is 1979-2100, including climate data downscaling and bias-correction (1979-2100), hydrological model development and simulation (1979-2100), economy simulation (2011-2045), and river system infrastructure simulation . The spatial domain of the study is the Nile Basin.

Data exclusions
No data were excluded from the analysis.

Reproducibility
The study experiments were designed based on numerical simulations. To ensure that the study experiments are reliable and reproducible, we calibrated and validated the simulation models at multiple sites in the Nile Basin over multi-year periods.

Randomization
The Nile river system simulator was calibrated over the period 1995-2004 and validated over the period 2005-2010 at ten locations over using historical river flow observations and reservoir and lake water levels. This calibration period was chosen based on the availability of common and continuous historical observed data for the ten selected locations.