Skip to content

Application procedure for watershed delineation with lakes

Julie edited this page Nov 24, 2020 · 2 revisions

Required inputs dataset

To delineate watershed with lakes, following dataset are needed and an example of input dataset for a small watershed can be downloaded here:

  • DEM [mandatory]: A hydrologically consistent DEM is preferred here. For example, global hydrologically consistent DEM dataset HydroSHEDS and MERIT. DEM dataset prefer to be in ".tif" format and can be in any resolution and spatial coordinate system. The extent of the DEM can be either larger than the extent of the target watershed or the same as the extent of the target watershed. Correspond to "merit_dem_big.tif" or "merit_dem_big.tif" in the example dataset.

  • Lake polygons [optional]: The lake polygon should be in ESRI shp format. Follow attributes needs to be include in the lake polygon shpfile: 1) Hylak_id, the unique Id of each lake within the lake polygon shpfile; 2) Lake_type, type of the lake should be integer; 3) Vol_total, the volume of the lake in km3; 4) Depth_avg, the average depth of the lake in m; 5) Lake_area, the area of the lake in km2. The Lake polygons can be obtained from HydroLAKE database and all required attribute are included. To use lake polygon from other source, required attributes need to be added into the attribute table. Correspond to "HyLake.shp" in the example dataset.*

  • Observation point file [optional]: This is a point files indicate the location of the streamflow observation gauges. Following attribute needs to be included in this files: 1) STATION_NU, the name of the observation guage; 2) Obs_ID, the observation guage ID, which is a unique number assigned to each gauge; 3) DA_obs, Observed drainage area in km2; and 4) SRC_obs, the source of the observation gauges, 'CA' for gauges in Canada and 'US' for observation gauge in United States. Correspond to "obsfinal.shp" in the example dataset.

  • Stream shpfile for Bankfull width, depth and discharge [optional]: This is a line shpfile indicate river segments. The Bankfull width, depth and discharge for each river segment is stored in the attribute of this line shpfile. 1) WIDTH, is the Bankfull width in m; 2) DEPTH, is the Bankfull depth in m; 3) Q_Mean, is the annual mean discharge in m3/s. Correspond to "narivs_new_b5.shp" in the example dataset.

  • Landuse raster [optional]: This is a landuse raster which will be used to estimate the floodplain roughness coefficient. Preferred to be the same resolution and the same coordinate system as DEM. Correspond to "landuse.tif" in the example dataset.

  • Landuse roughness table [optional]: This is a table describing the floodplain roughness coefficient correspond to a given landuse type. The table should have two columns: RasterV and MannV. RasterV is the landuse value in the landuse raster for each land use type and the MannV is the roughness coefficient value for each landuse type. Correspond to "Landuse.csv" in the example dataset.

  • Streamflow database [optional]: The toolbox can automatically download streamflow observation data from USGS website for US gauges or automatically read streamflow data from a HYDAT database for Canadian gauges. The 'Hydat.sqlite3' is needed if Canadian streamflow observation is needed.

Import and initialize the routing toolbox

The toolbox can be initialized and imported by:

############################ Import toolbox
from ToolboxClass import LRRT
import os

############################ Define Inputs
### Define where the example dataset are located 
Example_Folder = 'xxx/xxx/example_folder/'  

### Define where output should be saved
Output_Folder  =  'xxx/xxx/output/' 

### Define a project name 
ProjectName = 'Project Name'

###Define path to input files 
Path_DEM               = os.path.join(example_folder, 'merit_dem_big.tif')
Path_Lake_ply          = os.path.join(example_folder, 'HyLake.shp')
Path_obs_pt            = os.path.join(example_folder, 'obsfinal.shp')
Path_bkf_wd            = os.path.join(example_folder, 'narivs_new_b5.shp')
Path_Landuse           = os.path.join(example_folder, 'landuse.tif')
Path_Roughness_landuse = os.path.join(example_folder, 'Landuse.csv')
Path_CA_HYDAT          = os.path.join(example_folder, 'Hydat.sqlite3')

############################ Initialize toolbox 
RTtool=LRRT(dem_in = Path_DEM,WidDep = Path_bkf_wd,Lakefile = Path_Lake_ply,Landuse = Path_Landuse,Landuseinfo = Path_Roughness_landuse, obspoint = Path_obs_pt,OutputFolder = Output_Folder,ProjectNM = ProjectName)

Define the processing extent

After import and initialize the toolbox, the first step is to define the processing extent. The processing extent is a region within which the toolbox will processing data and generate lake river routing networks. The processing extent can be defined in two different ways: 1) using the extent of the input dem as the processing extent (Figure 1); and 2) provide a outlet coordinate, then the toolbox will generate the drainage area controlled by this coordinate and using this as the processing extent (Figure 2).

Option 1: use input DEM as the processing extent

############################Define the processing extent

################# 
Option 1: use input DEM as the processing extent
#################

### Define processing extent 
RTtool.Generatmaskregion()    

Figure 1: Processing extent using DEM directly

Option 2: provide an outlet coordinate and a large DEM dataset

############################Define the processing extent

################# 
Option 2: Provide a big dem and outlet coordinate of region of interest
#################

### Define outlet coordinate   
OutletPointxy = [-92.387,49.09]

### Define processing extent 
RTtool.Generatmaskregion(OutletPoint = OutletPointxy)    

Figure 2: Processing extent using large DEM and an outlet coordinate

Preprocessing inputs data

The extent of input datasets needed by the Toolbox is normally global or continental. In the preprocessing step the toolbox will: 1) automatically crop all input datasets with the processing extent defined in previous step; 2) Resample raster inputs to match the extent and the resolution of DEM dataset; and 3) Transfer cropped vector inputs into raster datasets with the same extent and the resolution of the DEM dataset.

############################Preprocessing inputs data

RTtool.Generateinputdata()

Generating predefined river system and catchments without considering lakes

In this step, the toolbox will generate predefined river system and catchments without considering lakes. A user specified flow accumulation thresthold is needed. The larger flow accumulation you provided, the coarser catchments and river system will be generated.

############################Generating river network and catchments without considering lakes

### Define flow accumulation thresthold
accthres = 500 

### Generating river segments and catchments without considering
RTtool.WatershedDiscretizationToolset(accthresold = accthres)

Figure 3: Generated catchments and predefined river system by the toolbox without considering lakes

Add lakes into the routing network-Part1

In this step, first, lakes within the drainage area will be divided into two categories: 1) lakes that are connected by the predefined river network in previous step and 2) lakes that are not connected by the predefined river network (Figure 4A). Then the toolbox will selected connected lakes and none connected lakes using user provided lake area thresholds for connected lake and none connected lake, respectively. Only lakes with lake area larger than these thresholds will be processed and added into the routing network. Catchments generated in this step is showed in Figure 4B. In this routing structure showed in Figure 4B, all lake's inlets and outlets are presented as catchment outlet. Each none connected lakes is represented by a catchment with none connected lake, while some connected lakes that cover multiple predefined river reaches are represented by more than one catchments. Further steps will merge catchments covered by the same connected lakes, the final routing structure is showed in Figure 4C.

############################Add lakes into the routing network-Part1 

### define lake area thresthold for connected lakes 
Thresthold_Lake_Area_Connect = 0 

### define lake area thresthold for connected lakes 
Thresthold_Lake_Area_none_Connect = 0

#### Add lakes
RTtool.AutomatedWatershedsandLakesFilterToolset(Thre_Lake_Area_Connect = 0,Thre_Lake_Area_nonConnect = 0.1)

Figure 4: A) Predefined river network, connected lakes and none connected lakes. B) Polygons are catchments generated after ***Add lakes into the routing network-Part1***; C) Polygons are catchments generated after ***Define Final Catchment*** .

Calculate routing parameters

Routing related parameters for each catchments showed in Figure 4B will be calculated in this step, which can be found in Table 1. To calculate catchment area, river length, and slope etc, user need to specify a projected coordinate system. The toolbox will calculate length and area related parameters under this coordinate system.

Name Description Unit
SubId Subbasin ID -
DowSubId Downstream subbasin ID -
BasArea Area of the catchment m2
BasSlope Averaged slope of the catchment m m-1
BasAspect Averaged aspect of the catchment degree
RivLength The length of the river within catchment m
RivSlope The river slope m m-1
BkfWidth The bankfull width of the catchment m
BkfDepth The bankfull depth of the catchment m
Q_Mean The annual averaged discharge m3/s
IsLake -9999 catchment is not a lake catchment; 1 catchment with a connected lake; 2 catchment with a none connected lake -
HyLakeId The lake ID -
LakeVol The lake volume km3
LakeDepth The lake depth m
LakeArea The lake area km2
Laketype The lake type -
MeanElev The mean elevation of the catchment m
FloodP_n The flood plain manning’s coefficient -
Ch_n The channel manning’s coefficient -
DA The drainage area of this catchment m
Strahler The Strahler order of each river reach -
Seg_ID The unique ID of each river reach -
Seg_order The unique ID of each river segment in each river reach -
Max_DEM the maximum elevation along the river segment m
Min_DEM the minimum elevation along the river segment m
IsObs > 0, means the catchment is has a streamflow observation gauge -
DA_Obs Observed streamflow gauge drainage area km2
DA_error Percentage of drainage area error for a given gauge %
Obs_NM The observation gauge name -
SRC_obs Source of the streamflow observation guages. CA: Canada WSC gauge; US, USGS gauges -
INSIDE_X The longitude of the center of the catchment degree
INSIDE_Y The latitude of the center of the catchment degree
############################Calculate Routing parameters

### Define projection 
user_projection = 'EPSG:3573'

### Calculate Routing parameters 
RTtool.RoutingNetworkTopologyUpdateToolset_riv(projection = user_projection)

Define Final Catchment

In this step, catchments in Figure 4B covered by the same connected lake will be merged into one catchment (Figure 4C). All routing related parameters will be updated.

############################Generate final catchments

RTtool.Define_Final_Catchment()