Skip to content

Commit 45b0877

Browse files
committed
initial commit
1 parent 72e86e2 commit 45b0877

File tree

4 files changed

+246
-0
lines changed

4 files changed

+246
-0
lines changed

InfeRes_package/Figure1.png

5.05 MB
Loading

InfeRes_package/Figure2.png

805 KB
Loading

InfeRes_package/paper.bib

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
@article{Giuliani:2021,
2+
title={A state-of-the-art review of optimal reservoir control for managing conflicting demands in a changing world},
3+
author={Giuliani, M and Lamontagne, JR and Reed, PM and Castelletti, A},
4+
journal={Water Resources Research},
5+
volume={57},
6+
number={12},
7+
pages={e2021WR029927},
8+
year={2021},
9+
url = {https://doi.org/10.1029/2021WR029927},
10+
doi = {10.1029/2021WR029927}
11+
}
12+
13+
@article{Dang:2020,
14+
author = {Dang, T. D. and Chowdhury, A. F. M. K. and Galelli, S.},
15+
title = {{On the representation of water reservoir storage and operations in large-scale hydrological models: implications on model parameterization and climate change impact assessments}},
16+
journal = {Hydrology and Earth System Sciences},
17+
number = {1},
18+
volume = {24},
19+
pages = {397--416},
20+
year = {2020},
21+
url = {https://hess.copernicus.org/articles/24/397/2020/},
22+
doi = {10.5194/hess-24-397-2020}
23+
}
24+
25+
@article{Galelli:2022,
26+
title={Opportunities to curb hydrological alterations via dam re-operation in the Mekong},
27+
author={Galelli, Stefano and Dang, Thanh Duc and Ng, Jia Yi and Chowdhury, AFM Kamal and Arias, Mauricio E},
28+
journal={Nature Sustainability},
29+
volume={5},
30+
number={12},
31+
pages={1058--1069},
32+
year={2022},
33+
url = {https://doi.org/10.1038/s41893-022-00971-z},
34+
doi = {10.1038/s41893-022-00971-z}
35+
}
36+
37+
@article{Warner:2012,
38+
title={Hegemony and asymmetry: Multiple-chessboard games on transboundary rivers},
39+
author={Warner, Jeroen and Zawahri, Neda},
40+
journal={International Environmental Agreements: Politics, Law and Economics},
41+
volume={12},
42+
pages={215--229},
43+
year={2012},
44+
url = {https://doi.org/10.1007/s10784-012-9177-y},
45+
doi = {10.1007/s10784-012-9177-y}
46+
}
47+
48+
@article{Steyaert:2022,
49+
title={ResOpsUS, a dataset of historical reservoir operations in the contiguous United States},
50+
author={Steyaert, Jennie C and Condon, Laura E and WD Turner, Sean and Voisin, Nathalie},
51+
journal={Scientific Data},
52+
volume={9},
53+
number={1},
54+
pages={34},
55+
year={2022},
56+
url = {https://doi.org/10.1038/s41597-022-01134-7},
57+
doi = {10.1038/s41597-022-01134-7}
58+
}
59+
60+
@article{Gao:2015,
61+
title={Satellite remote sensing of large lakes and reservoirs: From elevation and area to storage},
62+
author={Gao, Huilin},
63+
journal={Wiley Interdisciplinary Reviews: Water},
64+
volume={2},
65+
number={2},
66+
pages={147--157},
67+
year={2015},
68+
url = {https://doi.org/10.1002/wat2.1065},
69+
doi = {10.1002/wat2.1065}
70+
}
71+
72+
@article{Bonnema:2017,
73+
title={Inferring reservoir operating patterns across the M ekong B asin using only space observations},
74+
author={Bonnema, Matthew and Hossain, Faisal},
75+
journal={Water Resources Research},
76+
volume={53},
77+
number={5},
78+
pages={3791--3810},
79+
year={2017},
80+
url = {https://doi.org/10.1002/2016WR019978},
81+
doi = {10.1002/2016WR019978}
82+
}
83+
84+
@article{Busker:2019,
85+
title={A global lake and reservoir volume analysis using a surface water dataset and satellite altimetry},
86+
author={Busker, Tim and de Roo, Ad and Gelati, Emiliano and Schwatke, Christian and Adamovic, Marko and Bisselink, Berny and Pekel, Jean-Francois and Cottam, Andrew},
87+
journal={Hydrology and Earth System Sciences},
88+
volume={23},
89+
number={2},
90+
pages={669--690},
91+
year={2019},
92+
url = {https://doi.org/10.5194/hess-23-669-2019},
93+
doi = {10.5194/hess-23-669-2019}
94+
}
95+
96+
@article{Das:2022,
97+
title={Reservoir Assessment Tool 2.0: Stakeholder driven improvements to satellite remote sensing based reservoir monitoring},
98+
author={Das, Pritam and Hossain, Faisal and Khan, Shahzaib and Biswas, Nishan Kumar and Lee, Hyongki and Piman, Thanapon and Meechaiya, Chinaporn and Ghimire, Uttam and Hosen, Kamal},
99+
journal={Environmental Modelling \& Software},
100+
volume={157},
101+
pages={105533},
102+
year={2022},
103+
url = {https://doi.org/10.1016/j.envsoft.2022.105533},
104+
doi = {10.1016/j.envsoft.2022.105533}
105+
}
106+
107+
@article{Schwatke:2015,
108+
title={DAHITI--an innovative approach for estimating water level time series over inland waters using multi-mission satellite altimetry},
109+
author={Schwatke, Christian and Dettmering, Denise and Bosch, Wolfgang and Seitz, Florian},
110+
journal={Hydrology and Earth System Sciences},
111+
volume={19},
112+
number={10},
113+
pages={4345--4364},
114+
year={2015},
115+
url = {https://doi.org/10.5194/hess-19-4345-2015},
116+
doi = {10.5194/hess-19-4345-2015}
117+
}
118+
119+
@article{Zhao:2018,
120+
title={Automatic correction of contaminated images for assessment of reservoir surface area dynamics},
121+
author={Zhao, Gang and Gao, Huilin},
122+
journal={Geophysical Research Letters},
123+
volume={45},
124+
number={12},
125+
pages={6092--6099},
126+
year={2018},
127+
url = {https://doi.org/10.1029/2018GL078343},
128+
doi = {10.1029/2018GL078343}
129+
}
130+
131+
@article{Vu:2022,
132+
author = {Vu, D. T. and Dang, T. D. and Galelli, S. and Hossain, F.},
133+
title = {{Satellite observations reveal 13 years of reservoir filling strategies, operating rules, and hydrological alterations in the Upper Mekong River basin}},
134+
journal = {Hydrology and Earth System Sciences},
135+
volume = {26},
136+
year = {2022},
137+
number = {9},
138+
pages = {2345--2364},
139+
url = {https://hess.copernicus.org/articles/26/2345/2022/},
140+
doi = {10.5194/hess-26-2345-2022}
141+
}
142+
143+
@article{Coetzee:2020,
144+
author = {Coetzee, Serena and Ivánová, Ivana and Mitasova, Helena and Brovelli, Maria Antonia},
145+
title = {{Open Geospatial Software and Data: A Review of the Current State and A Perspective into the Future}},
146+
journal = {ISPRS International Journal of Geo-Information},
147+
volume = {9},
148+
year = {2020},
149+
number = {2},
150+
article-number = {90},
151+
url = {https://www.mdpi.com/2220-9964/9/2/90},
152+
issn = {2220-9964},
153+
doi = {10.3390/ijgi9020090}
154+
}
155+
156+
157+
@article{Hao:2019,
158+
author = {Hao, Jiangang and Ho, Tin Kam},
159+
title = {{Machine Learning Made Easy: A Review of Scikit-learn Package in Python Programming Language}},
160+
journal = {Journal of Educational and Behavioral Statistics},
161+
volume = {44},
162+
number = {3},
163+
pages = {348-361},
164+
year = {2019},
165+
dOI = {10.3102/1076998619832248},
166+
url = {https://doi.org/10.3102/1076998619832248},
167+
eprint = {https://doi.org/10.3102/1076998619832248}
168+
}

InfeRes_package/paper.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
title: 'InfeRes: A Python package for inferring reservoir water extent, level, and storage volume'
3+
tags:
4+
- Python
5+
- Remote sensing
6+
- Landsat
7+
- Dams
8+
- Water reservoirs
9+
authors:
10+
- name: Dung Trung Vu
11+
orcid: 0000-0002-7298-6716
12+
affiliation: 1
13+
- name: Shanti Shwarup Mahto
14+
orcid: 0000-0003-3224-4969
15+
affiliation: 2
16+
- name: Simone Fatichi
17+
orcid: 0000-0003-1361-6659
18+
affiliation: 2
19+
- name: Stefano Galelli
20+
orcid: 0000-0003-2316-3243
21+
affiliation: 3
22+
affiliations:
23+
- name: Pillar of Engineering Systems and Design, Singapore University of Technology and Design, Singapore
24+
index: 1
25+
- name: Department of Civil and Environmental Engineering, National University of Singapore, Singapore
26+
index: 2
27+
- name: School of Civil and Environmental Engineering, Cornell University, Ithaca, NY, USA
28+
index: 3
29+
date: 2 September 2023
30+
bibliography: paper.bib
31+
---
32+
33+
# Summary
34+
35+
`InfeRes` is a Python package for estimating time series of the water surface, level, and storage controlled by artificial water reservoirs. This information, rarely available, is retrieved by `InfeRes` by banking on two types of data, namely a Digital Elevation Model (DEM) and Landsat 5, 7, and 8 images. The DEM is used to identify the relationship between water surface level, and storage (bathymetric curve), while satellite images are used to estimate the water surface at the time of observation. By processing multiple images of the same reservoir and combining water surface estimates with the bathymetric curve, `InfeRes` can estimate the water storage for a given period of interest. `InfeRes` is designed to facilitate the work of hydrologists and environmental scientists that work on river basins heavily affected by reservoir operations. To this purpose, `InfeRes` automates both the download of Landsat images (using the Earth Engine Python API) and their processing. The source code for this package is freely available under the MIT license.
36+
37+
# Statement of need
38+
39+
Accurate information concerning the amount of water stored by dams is crucial for a variety of engineering applications, such as water resources management [`@Giuliani:2021`], hydrological modelling [`@Dang:2020`], or hydropower systems management [`@Galelli:2022`]. Unfortunately, these data are rarely available, particularly in developing countries and transboundary river basins, where dam operations are often a point of contention [`@Warner:2012`]. A user necessitating information about dam storage is, in general, left with two alternatives. The first and simplest one is to retrieve such information from a database containing actual observations, such as ResOpsUS [`@Steyaert:2022`]. The problem is that the creation of these databases is still at its infancy; at this stage, their spatial coverage is limited to the United States. The second alternative is to bank on the information contained in satellite observations. By combining information on a reservoir’s bathymetry (elevation-area-storage curve) with information
40+
on water level (measured by an altimeter), or water surface (retrieved from satellite images), one can, in principle, infer the corresponding time series of water storage [`@Gao:2015`]. The availability of such data has indeed opened up the possibility of monitoring reservoirs in ungauged areas [`@Bonnema:2017, @ Busker:2019`], and also led to the development of online monitoring tools [`@Das:2022`].
41+
42+
Creating storage time series for a given reservoir network is, however, not simple: water level observations provided by altimeters are relatively easy to retrieve and use, but are not available for every dam; moreover, satellite missions that included altimeters were launched only recently [`@Schwatke2015`]. Alternatively, satellite images, such as those provided by the Landsat missions, are available for longer periods of time (almost 40 years) and with global coverage. Yet, working with Landsat images requires familiarity with geospatial analysis software (e.g., ArcGIS, QGIS) as well as the statistical or traditional image analysis tools that are needed to process the images affected by cloud cover [`@Zhao:2018`]—a rather common problem in many regions, particularly during the monsoon seasons.
43+
44+
Motivated by these modelling challenges, we sought to develop a package that could be potentially used to study any reservoir for a period of time that goes beyond the availability of altimeter observations. This is achieved by developing a package that can extract information from Landsat images, which have a spatial resolution of 30 meters and frequency of 16 days. `InfeRes` was created with this goal: based on the methodology first presented in `@Vu:2022`, the NASA Landsat Collection 2 top-of-atmosphere (TOA) reflectance, the OSGeo package ['@Coetzee:2020'], and scikit-learn library ['@Hao:2019']. `InfeRes` automates three key modelling steps, namely data download, image processing, and time series reconstruction. With minimal input data required (dam location and design specifications), `InfeRes` is easy to use, even for users unfamiliar with remote sensing and image classification techniques and thus expected to provide an entry point for many users.
45+
46+
# Functionality
47+
48+
`InfeRes` is available on GitHub (https://github.com/ssmahto/InfeRes_test). Its documentation (https://inferes-test.readthedocs.io/en/latest/index.html) provides a detailed explanation of the installation steps and guidelines for running the code. This includes the preparation of the required modules, which can be easily imported in the Python environment via the pip, conda, or conda-forge package manager.
49+
50+
The package's core functionality is divided into two main modules, which are run in sequence. The first module (`data_download.py`) downloads the Landsat imageries using the Earth Engine Python API. To that purpose, the user needs to install the *earthengine-api* package and authenticate with the Google Earth Engine account. In principle, the user can download any set of data from the Google Earth Engine using `data_download.py`; however, for the current objective, we simply use the Normalised Difference Water Index (NDWI) and Quality Assessment Bands (QA_PIXEL) from the Landsat data collection. Alternatively, the user can also download the GREEN and NIR bands to calculate NDWI, instead of downloading NDWI directly from the Earth Engine. Note that more storage and time would be required in such case. The data download module also helps users change the data specifications, such as satellite sensor, area of interest, spatial resolution, and selection of bands. The time needed for data download depends on the size of the Landsat images. For instance, when tested on one of the biggest reservoir area (3010 x 5413 pixels of 30 m resolution), it took around 6-8 hours to download 1330 Landsat images (Landsat 5, 7, and 8), which required nearly 45 GB of storage.
51+
52+
The second module (`data_processing.py`) includes four sub-modules that are designed to execute one after another to get the complete set of results. The four sub modules are: **CURVE.py**, **MASK.py**, **WSA.py**, and **CURVE_Tile.py**. Apart from the Landsat images, the user needs the DEM of the selected reservoir (with the same dimension of the Landsat images), which is an input to the sub-modules. We recommend users to get the DEM separately before running the code. Please note that the DEM should have been created before the reservoir is filled. We tested our code with SRTM DEM (30m) which was acquired in the year 2000; therefore, reservoirs built before 2000 were not taken into account. As the user runs the data processing module, the **CURVE.py** is executed first, generating the reservoir's bathymetric curve (using the information contained in the DEM). Next, **MASK.py** takes the Landsat images and DEM as input (together with the design specifications i.e. dam location, extent of the reservoir, maximum and dead storage level, and year of commission) and generates the supporting intermediate files required to run **WSA.py**. This sub-module works with supporting files and processed Landsat images to calculate the reservoir surface water area. Finally, **CURVE_Tile.py** translates the reservoir's surface water area into its corresponding storage volume and level using the previously constructed bathymetric curve.
53+
54+
# Example Use Case
55+
56+
We showcase the application of `InfeRes` to two different dams: Xiaowan (containing one Landsat tile) and Nuozhadu (containing two tiles), built in the years 2010 and 2014 in the Upper Mekong River basin. Note that if a reservoir falls across multiple adjacent Landsat tiles (like Nuozhadu), the user should download the tile that contains the biggest portion of the reservoir, as illustrated in Figure 1. Since the likelihood of getting two images of the same date is less, we do not recommend to merge two tiles. Merging tiles of different acquisition dates is not meaningful, and it's also not advisable to compromise with fewer merged (same date) images.
57+
58+
59+
Figure 1. Illustration of the selection of Landsat tile for One-Tile (Xiaowan, Left), and Two-Tile (Nuozhadu, Right) reservoir.
60+
61+
In this example, since Xiaowan reservoir area is falling within one tile, we simply downloaded the tile (Path- 131, Row-43) for Xiaowan reservoir and ran the modules. However, in the case of Nuozhadu, two tiles need to be merged to get the total reservoir area. Therefore, we only downloaded the tile (Path- 131, Row-44) that contained the biggest are of the reservoir, and not the other one. The module (**MASK.py**) ran with the biggest tile and estimated the corresponding water-surface area, which was later converted to the total reservoir’s water surface area using bathymetric curve of the complete reservoir.
62+
63+
Operatively, we assigned a parent directory and ran the module `data_download.py`, which created a folder (*LandsatData*) and downloaded all the requested Landsat images (NDWI and QA_PIXEL). We then provided the static reservoir information (location, extent, maximum and dead water level) and ran the second module, `data_processing.py`. Please note that we specified both the extents (bigger portion and complete reservoir) for the Nuozhadu reservoir in the user input section (see Figure 1). Then, the package created another folder (*LandsatData_Clip*) and stored the modified NDWI images after applying the cloud mask information from the QA_PIXEL. Subsequently, it also generated the intermediate files and saved them into a different folder (*Outputs*). The intermediate files obtained for the Xiaowan reservoir are shown in Figure 2. The desired final outputs for Xiaowan and Nuozhadu were finally saved in **WSA_Complete_Xiaowan.csv** and **WSA_Complete_Nuozhadu.csv**, respectively.
64+
65+
66+
**Figure 2. (a) DEM-based mask**- a spatial mask of the reservoir’s maximum surface water extent created using digital elevation model corresponding to the full reservoir level, **(b) Landsat-based mask**- same as (a) but created using average of all selected non-cloudy (< 20% cloud coverage over the reservoir) Landsat images, **(c) Frequency map**- map showing the number of images used to make the Landsat-based mask, and **(d) Zone mask**- rescaled frequency map ranging from 0 and 50 (user defined range).
67+
68+
# Development Notes
69+
70+
`InfeRes` is developed on GitHub as an open-source package, and the authors welcome
71+
contributions and feature suggestions. We ensure the code's quality with an extensive suite of tests on multiple reservoirs. Note that the package is only tested on Python 3.8, because of its dependency on the GDAL package. The documentation is created with Sphinx and hosted on Read the Docs.
72+
73+
# Acknowledgments
74+
75+
This research ‘On the origin of droughts in Mainland Southeast Asia—implications for water and energy security’ is supported by Singapore’s Ministry of Education (MoE) under its Academic Research Fund Tier 2, Project ID: MOE-000379-00 / MOE-000379-01, Award Number: MOE-T2EP50122-0004” XX).
76+
77+
78+
# References

0 commit comments

Comments
 (0)