@@ -67,6 +67,7 @@ def mask(res_name, yearOFcommission, max_wl, point, boundary, dem_file_path, res
6767
6868
6969 # [1] ============================= CLIP LANDSAT IMAGES BY THE UTM BOUNDING BOX
70+ print ('============ [1] CLIP LANDSAT IMAGES BY THE UTM BOUNDING BOX ===============' )
7071 print ("Clipping Landsat images by the bounding box ..." )
7172 clip_count = 0
7273 os .chdir (res_directory + "/LandsatData" )
@@ -102,6 +103,7 @@ def mask(res_name, yearOFcommission, max_wl, point, boundary, dem_file_path, res
102103
103104
104105 # [2] =============================== DELETE >80% cloudy (over the reservoir) images
106+ print ('============ [2] DELETE >80% cloudy (over the reservoir) images ===============' )
105107 print ("Estimating cloud fraction..." )
106108 class_count = 0
107109 cloud_threshold = 80
@@ -182,6 +184,7 @@ def mask(res_name, yearOFcommission, max_wl, point, boundary, dem_file_path, res
182184
183185
184186 # [3] =================================== NDWI CALCULATION (adding cloud mask)
187+ print ('============ [3] NDWI CALCULATION (adding cloud mask) ===============' )
185188 print ("Adding cloud mask to NDWI images..." )
186189 count = 0
187190 os .chdir (res_directory + "/LandsatData_Clip" )
@@ -241,6 +244,7 @@ def mask(res_name, yearOFcommission, max_wl, point, boundary, dem_file_path, res
241244
242245 # [4] ============================== CREATE DEM-BASED MAX WATER EXTENT MASK
243246 # DEM is preprocessed to have the same cell size and alignment with Landsat images
247+ print ('============ [4] CREATE DEM-BASED MAX WATER EXTENT MASK ===============' )
244248 print ("Creating DEM-based max water extent mask ..." )
245249 os .chdir (res_directory + "/Outputs" )
246250 res_dem_file = res_name + "DEM.tif"
@@ -268,6 +272,7 @@ def mask(res_name, yearOFcommission, max_wl, point, boundary, dem_file_path, res
268272
269273
270274 # [5] ============================ CREATE LANDSAT-BASED MAX WATER EXTENT MASK
275+ print ('============ [5] CREATE LANDSAT-BASED MAX WATER EXTENT MASK ===============' )
271276 print ("Creating Landsat-based max water extent mask ..." )
272277 os .chdir (res_directory + "/Outputs" )
273278 res_dem_file = res_name + "DEM.tif"
@@ -292,7 +297,7 @@ def mask(res_name, yearOFcommission, max_wl, point, boundary, dem_file_path, res
292297 cloud_percentage = round (np .nansum (ndwi )/ np .nansum (res_iso )* 100 ,2 )
293298 print (str (cloud_percentage ) + '% cloud' )
294299 if cloud_percentage < 20 :
295- print ('Image qualified for creating Landsat-based MASK ' )
300+ print ('------------------------------------------------- ' )
296301 ndwi = gdal_array .LoadFile (filename ).astype (np .float32 )
297302 water = ndwi
298303 water [np .where (ndwi >= 0 )] = 1
@@ -340,6 +345,7 @@ def mask(res_name, yearOFcommission, max_wl, point, boundary, dem_file_path, res
340345
341346
342347 # [6] ====================== CREATE EXPANDED MASK (by 3 pixels surrounding each of water pixels)
348+ print ('============ [6] CREATE EXPANDED MASK ===============' )
343349 print ("Creating expanded mask ..." )
344350 os .chdir (res_directory + "/Outputs" )
345351 mask_1 = gdal_array .LoadFile ("Landsat_Mask.tif" ).astype (np .float32 )
@@ -366,6 +372,7 @@ def mask(res_name, yearOFcommission, max_wl, point, boundary, dem_file_path, res
366372
367373
368374 # [7] ================================= CREATE 50-ZONE MAP (FREQUENCE MAP)
375+ print ('============ [7] CREATE 50-ZONE MAP (FREQUENCE MAP) ===============' )
369376 print ("Creating 50-zone map (frequence map) ..." )
370377 os .chdir (res_directory + "/Outputs" )
371378 count = gdal_array .LoadFile ("Count.tif" ).astype (np .float32 )
0 commit comments