Supporting data and code: Power Purchase Agreements are Choke Points for Electricity Trade in Southeast Asia

Read full text
Authors: Phumthep Bunnak, Hisham Eldardiry, Twarath Sutabutr, Patrick Reed, Stefano Galelli
Cited by: 0

Abstract

Overview This repository contains the data and Python code necessary to replicate the experiments, analyze results, and generate the figures presented in the study "Power Purchase Agreements are Choke Points for Electricity Trade in Southeast Asia". The study quantifies the opportunity costs that long-term, static Power Purchase Agreements (PPAs) pose for cross-border electricity trade in the Laos-Cambodia-Thailand-Vietnam (LCTV) corridor, the most active part of the ASEAN Power Grid. Using a high-resolution, multi-sector modeling framework, we evaluate the regional grid across hydro-climatic conditions spanning 1982–2023. The analysis compares two primary scenarios: Business-as-Usual (BAU): Represents current contractual obligations, including dispatch limits and cross-border flow restrictions. Flexible Trade (FXT): A counterfactual scenario where unit-to-grid and grid-to-grid trades occur without contractual barriers. Software Frameworks This study relies on the following open-source modeling frameworks: PowNet 2.0: Used to simulate the least-cost operations of the power system subject to techno-economic constraints. Bunnak, P., Eldardiry, H., Pavičević, M., Feng, J. Z., & Galelli, S. (2025). PowNet 2.0: A production cost modeling framework for large-scale power systems. Journal of Open Source Software, 10(111), 8035. https://joss.theoj.org/papers/10.21105/joss.08035.pdf VIC-Res Mekong: An open-source, spatially-distributed, hydrologic-water management model used to calculate water and energy fluxes and route them through the river network. The hydropower availability data utilized in this study was generated using the model as described in the following publication: Eldardiry, H., Mahto, S. S., Fatichi, S., & Galelli, S. (2025). VIC-Res Mekong: An open-source hydrological-water management model for the Mekong River basin. Environmental Modelling & Software, 193, 106603. https://doi.org/10.1016/j.envsoft.2025.106603 Replication Instructions Step 1: Download and Unzip Files Download and extract the following core components into a single working directory: models.zip: Contains the required model inputs. scripts.zip: Contains the Python scripts used to run the experiments, process model outputs, and recreate the figures found in our manuscript. outputs.zip: Contains pre-processed model inputs needed for visualizations, as well as the processed outputs from our experiments. Note: Running the full suite of experiments from scratch is computationally expensive; we completed the full simulation in 1.5 months using four computer nodes in parallel. The resulting output files require roughly 298 GB of storage. If you prefer to bypass this, you can rely entirely on the provided outputs. environment.yml: Contains the required environment dependencies. pownet.zip: Contains the specific version of PowNet used in this study Step 2: Environment Setup Create and activate a new Python environment. Install the specific version of PowNet used in this study directly from this Zenodo repository. Navigate to the PowNet source code directory in your terminal and run pip install -e . Install all remaining dependencies using the provided environment.yml file. Step 3: Input Data Verification Confirm that the model input files have been properly processed. Ensure the following JSON files containing expected annual revenue and energy generation data for export-oriented hydropower units are present within the /model_outputs/publish_data/ directory. Verify the energy dictionaries of export-oriented hydropower projects: must_gen_energy_dict.json (contracted must-generate volumes) , must_take_energy_dict.json (contracted must-take volumes) , max_annual_energy_dict.json (contracted max-annual volumes) , and max_daily_energy_dict.json (contracted max-daily volumes). Verify the corresponding cost dictionaries: max_annual_cost_dict.json , max_daily_cost_dict.json , must_gen_cost_dict.json , and must_take_cost_dict.json. Navigate to /model_outputs/ and locate export_hydro_butgets_1981_2023.csv, detailing the monthly hydropower availability (in MWh) across export-oriented projects. Locate monthly_nondispatch_budgets.csv for the monthly availability of solar, wind, and hydropower by project. Locate nondispatch_budgets.csv for the annual availability of solar, wind, and hydropower by project. Step 4: Running Experiments If you choose not to run the experiments locally, you can skip directly to Step 6, as the processed model outputs are already provided. Run the Business-as-Usual scenario for a specific year of interest (e.g., 2023) by executing python run_bau.py --year 2023 Run the Flexible Trade scenario for a specific year of interest by executing python run_exp.py --year 2023 Repeat the execution of these two scripts for all years spanning 1982 to 2023 to fully reproduce the study. Step 5: Processing Model Outputs As stated, these files are already provided in the repository, but you can recreate them when you run your own experiments. Create country hydropower sales CSV both scenarios by running the following command once:python get_country_hydro_sales_csv.py Run the following scripts for the Flexible Trade (lctv_exp) and Business-as-Usual (lctv_bau2) scenarios separately: Output Description Flexible Trade Command (lctv_exp) Business-as-Usual Command (lctv_bau2) Hydropower Dispatch & Curtailment (Annual) python create_gen_by_export_unit_csv.py --case lctv_exp python create_gen_by_export_unit_csv.py --case lctv_bau2 Grid-to-Grid Energy Flows (Annual) python create_grid_to_grid_flows_csv.py --case lctv_exp python create_grid_to_grid_flows_csv.py --case lctv_bau2 Grid-to-Grid Energy Flows (Monthly) python create_monthly_grid_to_grid_flows_csv.py --case lctv_exp python create_monthly_grid_to_grid_flows_csv.py --case lctv_bau2 Generation by Contract (Monthly) python create_monthly_region_gen_by_contract_csv.py --case lctv_exp python create_monthly_region_gen_by_contract_csv.py --case lctv_bau2 Generation by Contract Type (Annual) python create_region_gen_by_contract_csv.py --case lctv_exp python create_region_gen_by_contract_csv.py --case lctv_bau2 Generation by Fuel Type (Annual) python create_region_gen_by_fuel_csv.py --case lctv_exp python create_region_gen_by_fuel_csv.py --case lctv_bau2 Carbon Emissions (CO2) (Annual) python create_region_co2_csv.py --case lctv_exp python create_region_co2_csv.py --case lctv_bau2 Step 6: Visualization Run the following Python files to generate the data visualizations for the study. Main Manuscript Figures Figure Reference Description Python Visualization Script Figure 2 Country unit to grid SOI (Security of Interconnection) python viz_fig2_country_unit_to_grid_soi.py Figure 3A Chord diagrams illustrating energy flow between regions python viz_fig3a_chord_country_flows.py Figure 3B & S4 Boxplots showing monthly grid-to-grid exchanges python viz_fig3b_monthly_g2g.py Figure 4 Distribution of projected annual WCOE and carbon emissions python viz_fig4_wcoe_co2.py Figure 5 Analysis of power system operating regimes python viz_fig5_op_regime.py Figure 6 Annual variability of renewable energy sources python viz_fig6_variability.py Supplementary Information Figures Figure Reference Description Python Visualization Script Figure S1A Power system connectivity and regional transmission bottlenecks python viz_fig_s1a_regional_flows.py Figure S1B Renewable energy availability and hydroclimate variability (1982–2023) python viz_fig_s1b_nondispatch_budgets.py Figure S2 Annual opportunity cost of hydropower curtailment (BAU vs. Flexible) python viz_fig_s2_hydro_curtail.py Figure S3 Distribution of changes in annual generation by fuel type (1982–2023) python viz_fig_s3_genchange.py Figure S5 Supply-cost curve for LCTV python viz_fig_s5_supply_curve.py Figure S6 Annual variability in renewable energy for LCTV python viz_fig_s6_budget_variability.py

Fields of Study & Subjects

Electric Power System Optimization Integrated Energy Systems Optimization Renewable energy and sustainable power systems

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
5 March 2026
Language
EN