The repository contains the code, input and output data used in the paper Tangi, M., Schmitt, R., Almeida, R., Bossi, S., Flecker, A., Sala, F., and Castelletti, A. - "Robust hydropower planning balances energy generation, carbon emissions and sediment connectivity in the Mekong river basin"