The Nexus Solutions Tool (NEST): An open platform for optimizing multi-scale energy-water-land system transformations

The energy-water-land nexus represents a critical leverage future policies must draw upon to reduce trade-offs between sustainable development objectives. Yet, existing long-term planning tools do not provide the scope or level of integration across the nexus to unravel important development constraints. Moreover, existing tools and data are not always made openly available or are implemented across disparate modeling platforms that can be difficult to link directly with modern scientific computing tools and databases. In this paper, we present the Nexus Solutions Tool (NEST): a new open modeling platform 5 that integrates multi-scale energy-water-land resource optimization with distributed hydrological modeling. The new approach provides insights into the vulnerability of water, energy and land resources to future socioeconomic and climatic change and how multi-sectoral policies, technological solutions and investments can improve the resilience and sustainability of transformation pathways while avoiding counterproductive interactions among sectors. NEST can be applied at different spatial and temporal resolutions, and is designed specifically to tap into the growing body of open access geospatial data available through 10 national inventories and the earth system modeling community. A case study analysis of the Indus River Basin in South Asia demonstrates the capability of the model to capture important interlinkages across system transformation pathways towards the United Nations’ Sustainable Development Goals, including the intersections between local and regional transboundary policies and incremental investment costs from rapidly increasing regional consumption projected over the coming decades. 1 https://doi.org/10.5194/gmd-2019-134 Preprint. Discussion started: 15 July 2019 c © Author(s) 2019. CC BY 4.0 License.

decisions is required to capture important interactions in an explicit way, so that least-cost nexus solutions can be identified using engineering-economic tools such as optimization.
Leveraging open source tools will promote end-user accessibility and should be prioritized for long-term system optimization models to enable validation and re-use in future research (Howells et al., 2011;DeCarolis et al., 2017). Previous analysis combines different energy, water and land sector planning tools to achieve open-access integration (Welsch et al., 2014). The 5 results of each sectoral planning tool are passed between tools as boundary conditions until the models reach an acceptable level of convergence. This process can take time and the decision solution obtained is not necessarily optimal across sectors.
Moreover, the individual resource planning models require specific expertise to develop and run, and it can be time-consuming to design and implement a robust database for the model inputs and results, as well as online systems for sharing and merging model changes across different users. Other recent model developments are focusing mainly on water infrastructure (Payet- aquifers and crops. By solving the following deterministic inter-regional and inter-temporal linear programming (LP) problem, MESSAGEix minimizes the total cost for system capacity and operation over a future time period while meeting user-specified levels of demand and technical/policy constraints: In the above system of equations, the time period index is given by t and the region index is given by r. The solution vector 5 containing the capacity and activity of the technologies is given by x. Economic costs are described in the cost coefficient vector of the objective function c. The discount rate associated with future cash flows is represented by δ. The set of constraints including the supply-demand balances, capacity limits, technology retirements and capacity additions, activity bounds and additional policies addressing environmental impacts are contained in the technical coefficient matrix A and right-hand side constraints vector b. The full set of equations is summarized in the online model documentation (https://messageix.iiasa.ac.at).

10
The single-objective LP formulation can also readily be transformed to handle multiple objectives, such as minimum total investments, emission level or other environmental indicators .
By linking the inputs and outputs of individual processes, energy, water and land decisions can be represented as a single system using the MESSAGEix modeling scheme. Thus, decisions impacting system design and operation over the planning horizon are made understanding the nexus interactions, and will adapt the transformation pathways for each sector to avoid constraints and reduce trade-offs from the perspective of the objective function. Moreover, MESSAGEix supports spatiallydistributed systems modeling using a node-link representation, where commodities can be transferred between nodes based on 5 the definition of dedicated technologies. It is therefore possible to explicitly represent the interplays between up-and downstream water users. Commodities are distinguished by the location (level) within the supply-chain enabling explicit accounting of associated efficiency losses and costs for grid and conveyance infrastructures. The temporal representation enables users to select the investment periods (e.g., annual) and sub-investment periods (e.g., sub-annual) over which supply, demand and system capacity must be balanced . 10 2.3 Reference system The reference system is the user-defined bottom-up representation of the technological system and its spatio-temporal delineation in MESSAGEix that defines interactions between technologies and the balance of commodity flows across the system (Messner and Strubegger, 1995). The reference system contains the portfolio of possible technologies and interventions (existing and future) and does not typically change across scenarios; the parameterization of data, including the constraints, are boundary conditions. A reduced-form network for guiding surface water flows between the BCUs is derived based on highresolution flow-direction data consistent with CWatM (Kahil et al., 2018). An example for the Indus River Basin in South Asia is depicted in Figure (2). The approach is leveraging flow direction data at 15 arc-seconds from HydroSHEDS, which provides hydrographic data layers that allow for the derivation of watershed boundaries for any given location based on the high-resolution Shuttle Radar Topography Mission (SRTM) digital elevation model (Lehner and Grill, 2013).

5
Renewable surface water and groundwater inflows into each BCU are represented by aggregating (upscaling) the gridded run-off and recharge projections simulated with CWatM under current land-use patterns ( Figure 2). This approach is likely to overestimate the available freshwater for human use within each BCU, because water users are distributed and do not have uniform access to the aggregate BCU-level water resources. Grid-cells in CWatM are mapped to specific management units in MESSAGEix by overlaying the polygons and identifying the grid-cell centroids that fall within a given polygon boundary.

10
Daily run-off sequences from CWatM are converted to decadal inflow scenarios by averaging monthly volumes over a 30-year time period; inflow percentiles can alternatively be stipulated to consider extreme flow conditions. Similarly, other gridded resource potential and demand projections detailed in the following subsections are harmonized to the CWatM spatial grid to facilitate upscaling and downscaling between models.

Water sector
The scheme for water management within each BCU is depicted in Figure 3. Different water resources (surface, aquifer and 5 saline) are accounted for and allocated across sectors (urban, rural, energy and agriculture). Internal runoff, regulation of reservoirs and water flowing from adjacent nodes through rivers or canals, all contribute to available surface water in each BCU. Renewable and non-renewable groundwater use is distinguished using groundwater recharge scenarios from CWatM and the efficiency losses from irrigation (Yang et al., 2016). Simultaneously, return-flow volumes are managed, including opportunities to recycle wastewater streams within and between sectors. River flow and conveyance technologies move water 10 between BCUs. Sectoral water withdrawals and return flows occurring outside the energy and land systems (i.e., municipal and manufacturing sectors) are exogenous and, together with endogenous water requirements for power plants and crops, drive the investments in water distribution and wastewater treatment infrastructure. Interactions across sectors are included in the model decision-making, including the energy required for pumping and treating water, and the water needed for crops and electricity generation. Average elevation changes between major urban areas are used to estimate energy intensities for specific 15 conveyance routes , whereas average water table depths are used to estimate energy intensities for lifting groundwater to the surface (Kahil et al., 2018).
Figure 3 depicts an explicit linkage enabled between nodal outflows and the production of hydropower potential in the model.
The potential is passed to the energy system representation described in the following section, and limits the maximum monthly hydropower generation in each BCU. An important challenge surrounds the aggregation of distributed hydropower potential 20 that varies within each BCU both spatially and temporally. We estimate a linear transformation coefficient between modeled flows in the reduced-form basin network and the BCU-level hydropower potential calculated using the gridded data from the hydrological model. Hydropower projects off the main river tributary do not depend on upstream flows in the BCU river network and are identified based on the gridded flow direction data. Separate technologies and linear transformation coefficients are defined for these projects, where the linear transformation coefficient is estimated using the internal BCU runoff. In NEST, 25 we map the CWatM runoff data onto the 15 arc seconds flow accumulation grids from HydroSHEDS to estimate discharge at scales that preserve elevation differences governing hydropower potential (Gernaat et al., 2017;Korkovelos et al., 2018).
Potential hydropower capacity hp is calculated with the following equation: where η is the turbine efficiency, ρ is the density of water, g is the gravitational acceleration, q is the design discharge (taken 30 to be the 70th percentile of the inflow sequence), h o is the outlet elevation and h i is the inlet elevation. Individual projects are identified along 5 km reaches of the 15-arc second river system based on their estimated annual production level and a set of exclusion zones including the distance to existing infrastructure, land-use and population density (Gernaat et al., 2017). We  assume that new projects can only utilize 10% of the total flow to ensure a high level of ecological security (Richter et al., 2012), and limit the canal lengths to a maximum of 3 km based on observed historical trends in installations. We do not consider dam storage or transfers of water between rivers in the assessment of hydropower potential due to additional planning challenges that are associated with these projects not readily monetized in the framework. Alternatively, new dam projects are considered on a case-by-case basis based on published information on planned projects and stakeholder engagement. 5 2.3.3 Energy sector The energy system representation for EWL nexus analysis using the MESSAGEix framework is depicted in Figure 4. The approach mimics closely conventional energy systems modeling with MESSAGEix, but integrates directly interactions with the novel implementation of the water and land systems. A diverse range of fossil and low-carbon energy resource extraction, processing and power generation technologies can be included in the framework. Water system interactions are enabled through 10 the definition of water withdrawal and consumption intensities for each energy technology and connection to water diversion technologies constrained by the availability of water resources. Thermal power plants are also distinguished by cooling technology, with the choice of cooling technology impacting the plant's economics and efficiencies. Alternative formulations may disaggregate the cooling technology choice from the prime mover technology in order to enable retro-fitting of cooling systems directly . 15 Wind and solar potential is estimated by linking NEST to the Renewables.ninja application programming interface (https: //www.renewables.ninja/). Renewables.ninja estimates hourly capacity factors for wind and solar technologies covering most terrestrial locations in the world, and generated based on calibrated resource data and technology representations Staffell and Pfenninger, 2016). In NEST, the grid-cell centroids from CWatM are passed to Renewables.ninja which then generates hourly production times series at each location. Exclusions zones are used to limit the areas where wind 20 and solar can expand. The gridded potential in each management unit is categorized into capacity factors for representing diverse performance characteristics within each BCU.
A simple energy transfer scheme is considered for electricity transmission between adjacent BCUs, with distinct costs for each route estimated based on the average distances between the most populated urban area within each BCU . Fuel trade with areas outside the delineated study region are defined using consistent fuel price projections from 25 the MESSAGEix-GLOBIOM global integrated assessment model (Fricko et al., 2017

Agriculture sector
An important feature of the reference system that bridges decision-making across the nexus is an agriculture sector representation integrated with the water and energy sectors presented previously. Diverse crop types and management strategies can be included in the approach, with the model selecting the cropping area and management method. The latter enables representation of alternative irrigation technologies, land preparation methods, and/or fertilizer application intensities, and importantly 5 incorporates the spatial re-distribution of crops as a management strategy. We adopt a similar approach for integrating land-use into the reference system to that proposed in Köberle (2018) (de Carvalho Köberle, 2018), so that when the model selects a specific land-use it must balance the decision with the available land area within each BCU. Land-use is categorized into specific types (forest, pasture, crop, natural, etc.), with dedicated land-use change processes defined in the reference system to convert land-use between types. The maximum cropping area is constrained based on the suitability of land within each BCU to support specific crop-types due to topographic and climatic conditions, as well as the total area available for cropping across all crop types. Non-CO 2 emissions as well as on-farm energy requirements besides that used for water pumping are tracked for different crops based on data from the literature (Rao et al., 2019). The model does not currently include dynamic growth and harvest of short-rotation forest crops, but this feature could be added in future work through appropriate definition 5 in MESSAGEix using, e.g., the interannual stock and storage variables (Section 2.4). In Figure 5 we show an example for a system containing rice and wheat crop types with rain-fed, canal and drip irrigation options.  For crop process modeling, each BCU aggregates crop parameters into coarser spatial units with average land-use parameters (Havlík et al., 2011). Crop yields are calculated aggregating spatial historical data at the BCU-level. This results in different yield coefficients for each crop, unit area and water supply (irrigation or rain). Similarly, crop water requirements vary across types and the intensity per unit area is estimated for each BCU using consistent water resource projections from the hydrological model. The irrigation per unit area for each crop w is calculated using the CROPWAT approach (Smith, 1992): In the above equation, k is the crop coefficient, e is the reference evapotranspiration and p * is the effective precipitation.
The reference evapotranspiration is calculated with CWatM using the Penman-Monteith method. The effective precipitation accounts for soil water storage and is estimated following the CROPWAT approach: (Smith, 1992): For non-paddy crops, p is the 10-day moving average daily precipitation (in mm/day), and for paddy crops it is the 3-day moving average to account for saturated soils (Döll, 2002). Irrigation intensities can optionally be calibrated such that, when aggregated across a given BCU, reproduce annual historical irrigation withdrawals when multiplied by the historical cropping area.
Similarly to the other sectors, the model defines the infrastructure portfolio to meet an exogenous demand for crop yields. 15 Additionally to internal production, import and export of crop yields are allowed and demands can be defined and aggregated across multiple regions to simulate national accounts. Moreover, crop residues are tracked as by-products of agriculture activities. The residues can be burnt resulting in air emissions or transported and processed to have solid or liquid biofuel for electricity production.

Multi-sector demands and return-flows 20
Despite the endogenous representation of interactions between energy, water and land systems, there remains the need to exogenously define consumption profiles for the different sectors of the economy categorized in NEST but not specifically modeled at the technology-level. This currently includes the municipal and manufacturing sectors. Baseline demands for freshwater and cropping pattern are also required for the hydrological modeling. A demand scenario generator incorporated into NEST combines gridded climate and socioeconomic data from the coupled SSP-RCP scenario framework with econometric models 25 fit to historical data. The SSP-RCP scenario data is harmonized at 7.5 arc-minutes and includes urban and rural populations, income-level and climatic indicators. Sector specific econometric models convert the gridded demand drivers into consumption profiles (water and electricity) and water infrastructure access rates for each sector . Food and fiber demands are represented as constraints on yields from specific crops aggregated to the national-scale. Import and export demands are included using variable prices, which might be calibrated in future work by optimizing parameter settings so that the model is able to reproduce prices observed historically (Howitt, 1995). Transport of agricultural products is not considered in the modeling, but might be added as a feature in future work by integrating geospatial and economic indicators for existing and future transport options including road networks (Mosnier et al., 2014). Land and surface water 5 resource availability is also added as an exogenous inflow into the system that must be continuously balanced by technologies and processes included in the model. This supports accounting for conservation measures that preserve land and move water downstream (environmental flows).

Enhancements to the MESSAGEix model
The existing MESSAGEix core model does not represent sub-annual storage dynamics and associated capacity constraints.

10
Previous work demonstrates specific approaches for integrating short-term (i.e., daily) storage dynamics into long-term energy system models similar to MESSAGEix ); yet, sequential seasonal storage dynamics are most critical to represent from the perspective of water resources management, because of the important role reservoirs play in balancing seasonal hydrologic and demand variability, and the potential for future reservoir development to compete with other water uses during filling. To enable inclusion of seasonal reservoirs in NEST, sequential monthly sub-annual time steps are included in 15 the MESSAGEix implementation and the core model is enhanced with the following set of equations merged into the existing technical coefficient matrix and right-hand constraints vector: ∆S n,c,l,y,m · ∆t m + S n,c,l,y,m+1 − (S n,c,l,y,m · λ n,c,l,y,m ) = 0 S − n,c,l,y,m ≤ S n,c,l,y,m ≤ S + n,c,l,y,m S n,c,l,y,m ≤ Z n,c,l,y ∆S n,c,l,y,m ≤ ∆Z n,c,l,y In the above equations, n is the node where the storage is located, c is the commodity stored, l is the level in the supply-chain the storage interacts with, y is the investment period (annual), and m is the operational periods (sub-annual). The storage 20 level is given by S, whereas the change in storage is given by ∆S. The first set of inequality constraints is used to limit the storage level to within a specific range (S − is the lower bound and S + the upper bound), for example to include operating rules for reservoirs used for multiple purposes. The second and third inequality constraints are the capacity limitations both in terms of system size (Z) and rate of commodity transfer (∆Z). Storage losses (i.e. evaporation and seepage) are given by the factor λ, and computed as a function of the estimated evaporation from the hydrological model and a linear area-volume 25 relationship (Liu et al., 2018c). The sub-annual time period duration ∆t converts the storage change calculated as a rate into a volume consistent with the storage level. To account for filling behavior and interannual variations we ensure: (1) the start and end levels are the same across years when no new storage capacity is added; and (2) when new storage capacity is added, it must be filled uniformly throughout the first 10 years, thus presenting an additional freshwater demand. Capacity additions are exogenously defined based on reported data; future work will consider the capacity limitations as control variables that can be expanded through increased investment in storage capacity.
To avoid integer (binary) decision variables associated with the choice of whether or not to plant a specific crop in a specific area, an additional set of minimum utilization constraints are defined for crops included in MESSAGEix. This forces the optimization to maintain the growing schedule over the course of the year, while balancing the total land area across crop 5 types. Further adjustments to the core model are needed to ensure the physical balance of EWL resources. Specifically, the existing MESSAGEix core model constrains resource supply to be greater than or equal to resource demand. This setup enables the model to spill excess resource production when beneficial to the overall operating costs of the system. However, this configuration poses challenges when accounting for inflows into the system to effectively size infrastructure capacity.
For example, when considering wastewater return flows as a specific commodity that should be managed using wastewater 10 treatment technologies, it is crucial to ensure a complete commodity balance across all time periods. Otherwise, the model would be able to exclude inflows to avoid building wastewater treatment capacity. To reconcile inconsistencies and to ensure a physical balance of EWL resources, we define a new set of supply-demand balance equality constraints in the enhanced MESSAGEix core model used in NEST.
Finally, for computational efficiency we developed a set of tools in the R programming interface that enable users to rapidly 15 prototype new models during the testing phase by selectively managing interactions with ixmp. We found that for the case study described in Section 3 that the new approach cuts model instance generation time by an order of magnitude. Importantly, the ixmp utilities can be optionally used so that once debugging is complete, models can readily be shared and modified using the powerful database utilities enabled with ixmp. All of the enhancements to the MESSAGEix model implemented in this paper can be obtained from the online repository for NEST (https://github.com/iiasa/NEST). 20 3 Modeling SDG implementation in the Indus River Basin As a first application of NEST, we focus on the Indus River Basin (IRB). The setup is meant to demonstrate the capabilities of the model, with ongoing work dedicated to the integration of local data and understanding of the policy implications for the region, and to be summarized in a future publication. The IRB, located in South Asia, is home to an estimated 250-million people (Pakistan 61%, India 35%, Afghanistan 4%, and China less than 1%) and has the highest density of irrigated land in 25 the world (Laghari et al., 2012;Yu et al., 2013). In recent years, the region experienced rapid population and economic activity growth, and this is expected to continue in the next decades leading to reduced poverty and growing demands for water, energy and food. With no surface water left in the basin for expanded use and accelerating exploitation of fossil groundwater as a result, long-term management of systems dependent on water is fundamental for the sustainable development of the region (Wada et al., 2019).

30
There have been a number of previous analyses of EWL challenges in the IRB, including integrated modeling of the systems in Pakistan's portion of the basin to understand the cost of climate change (Yu et al., 2013;Yang et al., 2016). Other recent analysis has quantified existing and future gaps in water supply caused by projected socioeconomic and climate change or gaps in estimating electricity demand variation due to groundwater pumping for agriculture (Wijngaard et al., 2018;Siddiqi and Wescoat, 2013). Previous work on the IRB does not provide a full assessment of EWL adaptation options or long-term pathways for the IRB as a whole. Specifically, there remains a need to link long-term capacity expansion decisions across EWL systems to understand the best strategies for developing the region's infrastructure into the future while accounting for existing transboundary policies. Crucially, there are important interplays between irrigation efficiency, land-use change and groundwater recharge that need to be reconciled to ensure water saving policies have the intended effect (Grafton et al., 2018). The NEST framework is ideally positioned to tackle these research questions because of its explicit representation of EWL capacity expansion and land-use change across spatially distributed regions and features basin wide water accounting for surface and groundwater systems.

Model setup
10 To parameterize the model in terms of resources, technologies and demands, we used the data sources outlined in Table 1.
Importantly, much of the data needed to run NEST can be obtained from open access geospatial datasets with global coverage.
Thus, NEST is readily adapted to other regions of the world. Nevertheless, it is important to emphasize the prioritization of approved local data, as well as use of the calibration steps that can be embedded in the framework that improve the performance of the model in terms of reproducing historical conditions. Moreover, it is important to stress the use of multiple climate models 15 and RCP-SSP scenarios to bridge the range of uncertainties in the hydrological modeling and demand drivers.
We calibrated CWatM for the IRB at 5 arcmin resolution using the monthly streamflow data during 1995-2010 at the Besham station, in northern Pakistan. It is important to emphasize the complexity of the hydrology in the IRB and the difficulties in calibrating to observed data due to extreme elevation changes (Forsythe et al., 2019). For calibration, the CWatM simulations included human impacts on streamflow and a spin-up period of 5 years to allow long-term storage components to stabilize. 20 Analysis of the initial calibration results showed that the calibration was mainly impacted by the ice melt coefficient and empirical shape parameter of the ARNO model for infiltration (Todini, 1996;Burek et al., 2013). Therefore, we ran a second calibration that searched for optimal values for only these two parameters. The calibrated parameter values are given in Table 2.
The performance of the model after the two calibration runs is in Figure 6. We then used the calibrated CWatM for the IRB for historical   reported data (Laghari et al., 2012).

30
For implementation in MESSAGEix, the IRB is delineated into 24 Basin Country Units (BCUs) using the basin and country administrative boundary datasets ( Figure 2). Further disaggregation into the agro-ecological zones is not pursued in this case because of limited spatial variability in crop potential within the delineated BCUs. The planning horizon considers investment     With most of the land area dedicated to crop production, we simplify the reference system by limiting the land-use options to crop land choices and limit the crop types to fertilized options. The SSP2 (middle-of-the-road) socioeconomic scenario is explored in the analysis and the ensemble mean climate scenario across the RCP climate models is used for climate forcing.
Urban and rural population and per capita income for SSP1, 2 and 5 projected for 2050 are compared to 2010 values for each riparian country's part of the IRB in Figure 8. It can be seen that rapid urbanization and growth in income levels is 5 projected in the scenarios, and these changes translate into increased consumption of water, energy and crops in the modeling framework. Figure A1 depicts the corresponding sectoral exogenous demands for the SSP2 scenario. Note that results for China are not included because the existing and projected population growth in this region is very low and thus the consumption has negligible impact on the downstream resources. Electricity demands increase most dramatically across countries due to the rapid increases in GDP and the assumption that electrification is supporting economic development. Water demands increase more gradually due to less influence of economic growth, although for India the manufacturing sector water uses increases significantly due to the existing water intensity. Corresponding projections of the population with and without access to preand post-treatment of freshwater are generated based on the GDP projections.  Canals play an important role in enabling the Indus Water Treaty, and are mapped to specific BCUs using the data in Table   B1. Operational constraints are also added to force the linkages to transfer water between routes, in line with the Indus Treaty.

5
The Indira Gandhi canal is considered as a constraint on flows originating from the particular BCU where the inlet is found.
Similarly, an urban water transfer to Karachi near the Indus Delta is included as an additional demand. The capacities of other water diversion infrastructures (surface and groundwater) for each sector are estimated from the historical withdrawals. The energy source for groundwater pumping is also identified, where diesel generators dominate in Pakistan and Afghanistan, and electricity is used predominately in India.

10
The existing and planned capacity of power generation in the IRB is depicted Figure B1. Hydropower is the main source of generation capacity in the basin, with the basin regions of Pakistan also hosting significant amount of fossil generation. A number of large-scale hydropower projects are also planned in the region (Table B2)

Scenario analysis
The parameterized NEST model of the IRB is applied within a scenario analysis in which a baseline (business as usual) scenario and a multi-objective scenario achieving multiple SDG indicators by 2030 are compared. The SSP2 information 25 is used to parameterize population and economic indicators in each scenario. The business as usual scenario assumes the continuation of existing policies (e.g., Indus Water Treaty), and is aiming at cost minimization with limited environmental constraints such as emission or infrastructure access targets. Conversely, the SDG implementation pursues a vision of economic growth (poverty eradication) jointly combined with reducing resource access inequalities and the environmental impacts of infrastructure systems. It is important to emphasize the SDG scenario is not exploring all of the individual targets and indicators, 30 but instead a limited set relevant for water, energy and land systems that are also well represented in the NEST framework.
The main features of the baseline and multiple-SDG scenarios are summarized in Table 3. The scenarios are simulated by solving NEST under the different implementations. Additional sensitivity analysis is performed to highlight uncertainties in the modeling framework.   Seasonality effects embedded in the model input are mostly related to water availability, renewable energy capacity factors and crop water requirements and productivity. Figure 10 shows outputs of the model that are affected by the above mentioned seasonal variations. Electricity generation fluctuations in hydropower generation are mostly compensated by nuclear, imports 5 or natural gas. Similarly, the time for crop cultivation, growth and yield is season specific, taking into account precipitation and crop coefficients seasonality. Other studies have looked at the role of hydropower in the region with a nexus perspective, considering both electricity production and water management (Yang et al., 2016). Whilst the results from the Indus Basin Model Revised (IBMR) and NEST could be compared, if similar scenarios were run, it must be noted that IBMR only focuses on a sub-region of the basin network with higher spatial detail, while NEST includes a more complete representation of energy 10 demands, supply and water-energy linkages.

Quantifying investments to achieve the SDGs
We present a comparison between the baseline and the multiple SDG scenarios. Figure 11  As a consequence of the environmental flow policy in SDG6, multiple sectors need to adapt to lower water availability.

5
The agriculture sector is particularly impacted due to its high share of total water demands and expands to non irrigated areas to avoid water withdrawals. However, this implies lower yields and so more area is needed to support the same production and at higher operational costs due to the lower productivities. Additionally, there is increased investment into more efficient irrigation technologies, especially where most of the available arable land is cultivated and production still needs to be boosted to maintain agricultural supplies.
10 Figure 11 (b) compares the nexus interactions at the basin-scale for each scenario. The multiple SDG scenario displays an almost fivefold increase (from 500 GWh to 2500 GWh per year) in energy requirements for water management (mostly pumping, treatment and arrangement of new canals). This is to support increased water access in the municipal sector and massively expanded wastewater treatment capabilities in urban areas, but still represent less than 2% of total electricity gener-ation projected in 2020. A combined GHG emission target ensures the increased demands are met without increasing carbon emissions.
These results demonstrate the value of interconnection across EWL sectors in terms of chain reaction in investments (i.e. expanding piping distribution also require expansion in electricity production and distribution), synergies (investing in irrigation efficiency implies saving in water distribution for irrigation) and trade-offs, as it is clearly not possible to minimize costs and 5 resource use across all sectors to achieve the SDGs.

Synergies and trade-off among SDG targets
The sustainability scenario includes multiple policy objectives across different sectors, which are considered simultaneously by the model. Specific policy objectives can thus be analyzed individually or in combination. Cross-sectoral implications are not necessarily the same when assessing multiple policies at the same time or individually. However, to additionally understand 10 the implication of each single SDG policy on the water, energy and land systems, we tested each policy independently (as in Table 3). Figure 12 depicts the electricity generation, water withdrawal by source and the land use for agriculture in India and Pakistan from 2020 to 2050 in all the scenario permutations tested. The baseline scenario assumes that enough water is present in the basin to meet increasing energy, water and food demands, while fulfilling the Indus Water Treaty allocations, but neglecting 15 the additional environmental flow standards, water efficiency guidelines and infrastructure access constraints present in the SDG6 case. The second row of plots depicts the sectoral changes induced by the multiple sustainability policies. Intuitively, constraining the use of surface water for environmental purposes has most impact on cross-sectoral activities in Pakistan because it is the most downstream country and thus faces the greatest challenge in meeting increasing water demands while concurrently allocating more flow to ecosystems when water is already scarce. In fact, its hydroelectric potential is significantly 20 reduced and the main water source left is renewable groundwater. This has a large impact on the agriculture system, where both India and Pakistan expand cultivated land with rain-fed crops, to adapt to water scarcity 1 .
It is crucial to note that in India the total available land for agriculture is already utilized in the base year in most of the modeled regions due in part to the Indus Water Treaty obligations (which allows India to use a limited amount of western river waters for irrigation). Thus, to fulfill increasing food demand and reduce the water consumption per hectare in the SDG 25 scenario, an uptake in more efficient irrigation technologies is observed. Importantly, the basin-wide water accounting framework enables the applied water efficiency policies to account for the complex interactions between irrigation water losses and groundwater availability, to ensure that a combination of surface and non-renewable groundwater sources are conserved.
Looking at single scenarios separately helps to understand what policy drives the specific changes and what sector is mostly affected. water demand for irrigation. For further analysis the authors intend to add other SDG2 related targets concerning changes in food demand, import, export and shifts to different types of crops.
-SDG6. The environmental flow policy represents one of the major constraints for the resource management in the region. Indeed, we notice how, particularly in Pakistan, electricity and water supply systems would require complete 5 restructuring, as well as management of land for agriculture. The main water resource for Pakistan becomes renewable groundwater, which is recharged from via infiltration including losses from irrigated fields. One important difference to the multiple SDG scenario is the role of hydropower and the consequences on the remaining surface water availability in Pakistan. In fact, as the SDG6 scenario is not bound by emission constraints, fossil fuel generation (gas and oil) is rapidly deployed. When adding CO 2 emission and renewable energy shares consistent with SDG7, results show it can 10 be optimal for Pakistan to exploit all the possible hydropower potential, while meeting environmental flow minimum requirements. This reduces the surface water availability both for irrigation and other demands. As a consequence, less irrigation technologies are adopted in the multiple SDG scenario in favor of more rain-fed crops. However, this leads to a vicious circle where less irrigated land means less water recharging groundwater aquifers, but at the same time the model accounts for the interaction and finds an optimal balance.

15
-SDG7. This policy imposes specific targets for solar, wind and geothermal electricity production in terms of the share in the entire energy mix. We set the share target of 30% by 2050, which is achieved gradually starting with 10% in 2020. In addition, a phase out of coal and once through cooling technologies after 2030 are also considered. One consequence of this policy is a more rapid transformation away from fossil fuels. Nonetheless, this is not necessarily the most economically optimal way of achieving CO 2 emission reduction (see SDG13). When compared to the multiple SDG scenario, 20 nuclear plays a more significant role, despite higher water consumption. Since nuclear is currently a critical issue in both India and Pakistan, further research will investigate the feasibility of nuclear with more detail and interacting with local stakeholders.
-SDG13. To understand what are the possible pathways towards a carbon neutral electricity system, the SDG13 results show how nuclear electricity generation can be an important option due to cost and reliability, and is complemented well 25 by the available hydropower potential. Importantly cost and policy barriers difficult to monetize in the framework could cause development constraints for nuclear systems in the region.
In summary, this overview of the single policy objectives shows that constraints on land and water availability push the system to make transformational changes to the development pathway for each sector, and can drastically alter the structure of the energy and water supplies and land-use pattern. Considering multiple target simultaneously shows different results than summing 30 individual analysis. As mentioned above, the electricity mix changes when considering water constraints and climate targets.
Similarly, land use is different when efficiency policies are in place together with environmental targets. This clearly shows the importance of an integrated multi-sectoral analysis to highlight synergies and barriers among objectives. The authors intend expand this topic in upcoming research.

Uncertainty and sensitivity
Integrated assessment models are subjected to different types of uncertainty, which can cumulate and therefore require particular attention. Uncertainty can be broadly divided in data or parametric uncertainty, which is given by data sources, often represented as distribution or numerical ranges; and assumption uncertainty, occurring when dealing with future scenario in the scope of policy analysis (Rotmans and van Asselt, 2001).

5
This paper illustrates the behavior of a model for policy assessment that can be applied to different case studies. We therefore leave data source uncertainty analysis to future publication that will to focus specifically on numerical outputs and implications.
Still, we show an example of uncertainty originated by scenario assumptions and how it propagates when linking the two different models in NEST. Figure 13 (a) shows different level of monthly total runoff from the CWaTM using different climate models and under two different climate scenarios (RCP 2.6 and 6.0). We notice major diversity in trend given by different 10 climate models, while climate scenario implies changes mostly in the eighth and ninth months of year 2020. When running the optimization model in NEST, outcomes carry the uncertainty from the hydrological model and cumulate it with other types of uncertainty. Figure 13 (b) show total cost for the Indus region where the uncertainty of different SSP assumptions is added the previous set of climate scenarios. We notice how SSP assumptions more greatly affect total cost compared to either climate model or RCP (each bundle of same-color lines includes runs with all climate scenario and RCP assumptions). However, 15 looking at SSP 2 and 1, with reduced stress caused by population growth, climate uncertainty is more significant than for SSP 5.

Limitations
Increasing spatial and temporal resolution might be helpful to focus on sub-regions and identify possible critical areas with higher detail. However, it brings greater computational challenges associated with using classical mathematical programming 20 methods. In this context, scaling of the input-output coefficients to ensure fast solution times can be challenging for nexus models, because many cross-sector interactions require definition of input-output coefficient ranges covering multiple orders of magnitude. Future work may need to explore heuristics or other emulations as an alternative approach to classical optimization methods in order to integrate and optimize the vast amounts of geospatial data increasingly available and promoting the use of ultra-high resolution models for infrastructure planning.
From a hydrological perspective, some limitations of the current NEST formulation include the use of static land-use maps 5 in the development of the water resource potentials. Dynamic land-use maps could be used in future work using the optimal solutions from MESSAGEix. An important next step involves downscaling water-and land-use results to the spatial scale used in the hydrological model, improving the visualization and analysis of results, as well as enabling spatially explicit calculation of water availability and demands to represent dynamic changes of water and land-use consistently across the two models in NEST. The assessment of groundwater could also be improved by including lateral groundwater flows and by changing the Finally, assumptions on boundary conditions, such as costs of imports (of food, electricity or water), are important for simplistic assumptions (e.g. electricity imports in Figure 12). Future work could improve the representation of boundary con- 15 ditions with supply-cost curves or by linking with market models representative of the system outside the study area. Linking with global and regional integrated assessment models through the common commodity markets could improve the expected import-export response in NEST under scenarios of global change and explore different scenarios of basin self-sufficiency and resilience to external shocks.

20
The NExus Solution Tool (NEST) links a distributed hydrological model with a multi-sector infrastructure optimization model, the framework of which described in this paper in detail and applied to the Indus River Basin's energy, water and land systems.
The framework is flexible and can be adapted to other regions of the world. NEST is designed to produce indicators relevant to the SDGs for water, energy, land and climate and to tap into the increasing volumes of geospatial data openly available through national inventories and the earth system modeling community. Comparing results for a business as usual scenario 25 to one where multiple SDGs are enforced highlights the framework's capability to capture clear differences in the optimal investment portfolio and cross-sector interactions characteristic of the SDGs.
A key innovative feature of the NEST framework is the dynamic linking of the distributed hydrological and infrastructure Basin-Country-Units (BCUs) embedding geopolitical borders. Among these data, we make use of 3-D cross-sectoral resource flows and potentials, such as water availability, hydropower and renewable capacity. Additional local data can substitute or complement global data in empowering the model, facilitating calibration and validation and for building stakeholder trust.
The application of NEST to the Indus River Basin demonstrates the usefulness of such a tool in highlighting cross-sectoral policy impacts. An example are the implications of water treatment and recycling policies on energy consumption and the consequences for agriculture when attaining river environmental flow standards. Moreover, the delineation of the model into 5 spatial units and the parametrization based on spatial data, enables results interrogation for single countries or BCUs within the basin boundaries. In this context, results for Pakistan and India are very different for water supply, electricity generation and agriculture.
Finally, critical areas for possible future improvement include: increasing spatial resolution and capability to deal with ultra-high resolution data; iterating MESSAGEix and CWatM to obtain a dynamic solution and better representing the non-10 linear interactions between groundwater and surface water; and, the improving assumptions at the geographical (and model) boundaries, for instance with cost curves or market models for food and electricity to represent the options of international trade.
Code and data availability. Code and data is made available at https://github.com/iiasa/NEST The code and documentation for CWatM can also be found at: https://cwatm.iiasa.ac.at/    Table B2. Additional planned hydropower projects included in the NEST implementation of the IRB. Locations, capacities and dates are approximate and estimated by the authors based on reported technical data.