Skip to content
Giacomo Falchetta edited this page Jun 9, 2023 · 11 revisions

Introduction

The NExus Solutions Tool (NEST) is an open modelling platform that integrates multi-scale energy–water–land resource optimization with distributed hydrological modelling. The 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 national inventories and the Earth system modelling community.

The documentation and code for the initial case studies is published by Vinca et al., 2020. For this application, a newer version of NEST has been developed, which uses the MESSAGEix framework developed at IIASA and allows the generation of country models with representation of the Energy-water-land systems similar to the previously developed NEST model in Vinca et al., 2020. This new version has been published as the open-source module MESSAGEix-Nexus (links to Code and Documentation), therefore the names NEST and MESSAGEix-Nexus might be used interchangeably in this documentation.

Temporal and spatial resolution The time horizon and the temporal and spatial resolution of NEST can be defined by the user, assuming that data is available to populate the required parameters. For the LEAP-RE application on Zambia, the model has 10-year time steps starting from 2020 until 2060 and monthly sub-annual timesteps. Spatially, some sector are defined at the country level and other at the Basin Country Units (BCU) wich are defined by crossing HYDROSHED basins (level 4) with Zambian administrative boundaries.

Figure 1: Spatial resolution of NEST-Zambia
Sector Temporal resolution Spatial resolution
Electricity supply connected to the grid yearly country
Primary energy resources yearly country
non-electricity energy demands yearly country
off-grid electricity demand and supply monthly BCU
Water balance and infrastructure monthly BCU
Irrigation requirements from crops monthly BCU

Model structure

Figure 2: NEST framework for LEAP-RE4AFRI

To understand the Energy system of a MESSAGEix model we recommend looking at the comprehensive documentation of MESSAGEix-GLOBIOM.

The detailed description of the updated MESSAGEix-Nexus module is currently under review and will be made available soon.

The land sector is in this country-model version simplified to only consider agriculture and irrigation. Crop land use, yield and water withdrawals are estimated from WaterCrop and used as input in NEST.

The documentation of the code needed to compile and run NEST is available and regularly updated at the MESSAGEix documentation

Building a MESSAGEix-Nexus country model

nest1

Figure 3: process to build NEST-Zambia

The country model for Zambia used as a case study for this project has been built following the process depicted in Figure 3 and described below, which could be in principle replicated for other countries. The process is achieved by any user by running the script build.py

  1. Downscaling an energy system model from the Global to a country implementation. This step is the only part that unfortunately relies on non-open-source scripts and requires guidance from the developers. In this case, the resulting scenarios needed for the next steps are provided in .csv format and it will be automatically read from the build.py file

  2. Adding sub-nodes and sub-annual timesteps as desired (link to shapefile)

  3. Adding electricity demand from M-LED and off-grid renewable parameters from OnSSET

  4. Apply the Nexus module (in this case only water)

  5. add irrigation demand from WaterCROP

Input data and scenarios

Parameter  Description  Data  on Github
Basin boundaries  Basin boundaries used from the HydroSheds database ​(Lehner et al., 2006)​ to create new spatial units in the water sector   All the processed files are available in the GitHub repository in CSV format(~data/water/delineation
Power plant water use  Power plants' water use and investments (Meldrum et al. 2013, (Platts Market Data – Electric Power S&P Global Commodity Insights, 2022
Hydropower use and investments ​(Grubert, 2016
Parasitic electricity requirements ​(Dai et al., 2016)
Regional shares of cooling  ​(Raptis et al., 2016)
Water Availability  Runoff & groundwater recharge from the GHM CWatM model ​(Burek et al., 2019) outputs of the ISIMIP project ​(Frieler et al., 2017).   All the processed files are available in the GitHub repository in CSV format (~data/water/water_availability
Groundwater abstraction data from ​(Wada et al., 2014) and historical water withdrawals from ​(Wada et al., 2016).
For the cost of groundwater pumping ​(Fan et al., 2013) and energy consumption values from ​(Vinca et al., 2020) and ​(Liu et al., 2016) The energy consumption values vary regionally based on the groundwater table depths. Thus, the processed file is available in the GitHub repository in CSV format (~data/water/water_availability
Freshwater Energy consumption per unit of water ​(Liu et al., 2016) 0.01883 (0.0011 - 0.03653) kwh/km3 
Techno-economic values from ​(Vinca et al., 2020) and ​(Burek et al., 2018) Investment costs assumed for the whole world. 
groundwater infrastructure: 155.57 million USD/km3, surface water extraction:54.52 million USD/km3 
Water demands  Municipal water demands are spatially and temporally processed using ​(Wada et al., 2016) All the processed files are available in the GitHub repository in CSV format (~data/water/water_demands
Irrigation water demands are used from the GLOBIOM ​(Frank et al., 2021) GLOBIOM Emulator 
Treatment & access rates are re-calculated using the approach described in ​(Parkinson et al., 2019) Return flows from ​(Wada et al., 2016) All the processed files are available in the GitHub repository in CSV format (~data/water/water_demands
Water Infrastructure  Water distribution & wastewater treatment energy footprints are used by ​(Liu et al., 2016) All the processed files are available in the GitHub repository in CSV format (~data/water/water_infrastructure
Desalination potential​ (Byers et al., 2018) Governance ​(Andrijevic et al., 2020) and ​(Global Water Intelligence, 2016). 

Default scenarios:

Scenario RCP  National goals  SSP 
Baseline RCP 7.0  Current policies, Agriculture: project historical trend of production  SSP2 (3) 
Improved access  RCP 7.0  Electricity access: halving the gap in 2030 water access & sanitation: halving the gap in 2030;  food security: increasing water supply to meet domestic food crops production demand in 2030** (given current diet,  no extensification, fertilization, trade)  SSP2 (3) 
Ambitious development, sustainable targets RCP7.0 (SSP1, RCP2.6 on land) Energy universal access*,  universal water access & sanitation;  nutrition security: improve yields to meet future food crop production demand to meet the EAT Lancet diet in 2030**; Renewable electricity share = 100% + climate constraints  SSP2 (3) 

RCP stands for Representative Concentration Pathway and mainly refers to hydrological and climate variables that vary across climate scenarios collected in the ISIMIP3a database. The SSPs are the Shared Socioeconomic Pathways, widely used in the literature on climate change scenarios.

As mentioned before, most of the data to define the energy system are copied and downscaled when generating a country energy system model (Figure 3, step 1). All the data to shape the specific abovementioned scenarios is available in nest/message_ix_models/data/leap_re_nest.

Data on electricity demand and electricity access are imported from MLED (e.g. electricity_demand_MLED_NEST_GWh_mth_baseline.csv).

Data on electricity access are imported from OnSSET (energy_allocation_results_for_nest.csv and OnSSET_cost_paramters.xlsx).

Data related to land are imported from WaterCROP (in the ~/crop subfolder).

Water-related data is instead located in the folder nest/message_ix_models/data/water:

  • water availability
  • delineation file, connected to the abovementioned Shapefile
  • water demands, access and sanitation rates in ~\demands\harmonized\ZMB
  • infrastructure: desalination potential
  • power plant cooling capacity

Running the model and Analysing the outputs

Running and building the model is the same thing and it is all done within the build.py file. Steps down in the pipeline can be rerun without needing to rerun all the previous steps.

  1. a Country energy system model has been already generated for Zambia and the scripts are still currently not open source

    1. The process start from pre-defined scenario MESSAGEix_ZM|single_node (|)loaded from the file data\leap_re_nest/ref_scen.xlsx.
    2. A scenario MESSAGEix_ZM|sub-units is created and sub-annual time steps (the user can change it) and subnodes (as defined in the delineation file)
  2. The scenarios MESSAGEix_ZM|MLED_baseline (together with MLED_improved and MLED_ambitious ) get created by updating energy demands and adding electricity shared for off-grid generation from OnSSET. This phase also generates MESSAGEix_ZM|MLED_baseline_cali, which calibrates energy supply and demands in 2020.

  3. This step requires running some commands from the CLI, so not just in the build.py script. But the instructions are written in build.py. The results are scenarios like MESSAGEix_ZM|MLED_baseline_nexus, where the water sector is included and connected to the energy sector. This might take some minutes to build and solve.

  4. Finally, irrigation demands are included in the model and the final scenario will be called MESSAGEix_ZM|MLED_baseline_nexus_full. This phase also runs the reporting script, which might take some time. the results will be generated in the \message_ix_models\reporting_output folder and for a baseline scenario will be named MESSAGEix_ZM_MLED_baseline_nexus_full_leap-re.csv

Runtime, frequent issues

The initial steps of developing the country model scenarios might take a few minutes, while the latter can be longer. But the whole process should not take more than 30 minutes. Some parts of the script are running all the default scenarios one after the other. A user who only wants to focus on a "specific scenario can delete the name of the others before the respective for loops.


Preparing a new country analysis and designing a new scenario

Refer to the Examples and exercises page for details