Utah State University

GIS in Water Resources Fall 2007

Final Term Project Report

 

 

Building a VBA toolbox to perform the TOPMODEL

 

 

Hatim Geli

12/7/2007

 

 

 


 

 

 

Table of Content

·                   Introduction

·                   Objectives

·                   Data Sources

·                   Methodology

·                   Sample Model Run

·                   Summary and conclusion

·                   Future Improvements

·                   References

 


Introduction

Visual Basic for Applications VBA is one of the, Component Object Model, COM-complaint development languages that used to extend ArcObjects. ArcObjects is the development platform for the ArcGIS family (ESRI1, 2007, ESRI2, 2007). The VBA is one of the handy tools in many fields especially when it comes to carry some analyses for several times. The application of hydrological modeling especially the distributed models with the utilization of the ArcGIS requires a sequence of steps the need to be followed starting from acquiring the data, watershed and drainage network delineation, applying the hydrological model concept, and then analyzing and representing the results. It is easy to conduct all these steps once but when it is required to apply the modeling process for different locations or even at the same location but successively it become tedious task. In this study the ArcGIS Desktop (the Arc Info version) is used as the base modeling frame for all tools and commands especially the ArcHydro tool.  The study area selected to test the model on is for Blue River basin at Blue, OK. In this work a simple description of the TOPMODEL (Beven et al, 1979, Beven et al, 1995) is provided, since it is not our objective, the steps need to be followed in ArcGIS to apply the model, description of the VBA tools developed to perform the analysis, results obtained from testing the model performance.

Objectives

The main objective of this study is to use the VBA, which is embedded with in ArcMap, to build a simple toolbox that allows applying the hydrological model that named as the TOPMODEL.

Data Sources

The model was applied on one of the DMIP catchments namely: the Blue River at Blue, OK that has the USGS number of 07332500 and drainage area of 1233 km2, Figure 1. This watershed is one of the initial test basins of the Distributed Model Intercomparison Project DMIP (DMIP, 2007) proposed by the Hydrology Laboratory of the National weather Service Figure 2. The data provided consists of one arc-second digital elevation model DEM data which represents a resolution of 30 by 30 meter grid cells Figure 2, hourly rainfall data, and hourly streamflow measurements.

 

Figure 1: Plot of Blue River basin boundaries and stream network (source DMIP, 2007)

Figure 2: screenshot of the DIMP site where the data is obtained.

Methodology

Description of TOPMODEL

The TOPMODEL is a semi-distributed physically based rainfall-runoff model developed by Beven and Kirkby (1979). It requires digitized elevation data, rainfall data, and potential evapotranspiration data and it predicts the resulting runoff and spatial soil water saturation pattern (Tarboton et al 1999, Tarboton, 2003, Romanowicz, 1997).  The model assumptions are based on the interpretation of the mechanisms behind the surface and subsurface hillslope flow process in order to simplify the problem of the heterogeneity and the dynamics of these processes. The theory assumes that the local hydraulic gradient is equal to the local surface slope, see Figure 3, thus it implies that all points with the same value of topographic index, a/tanB, will respond in a hydrologically similar way. The model assumptions can be summarized as follows (Beven et al, 1995)

1-      The dynamics of he saturated zone can be approximated by successive steady state representations,

2-      The hydraulic gradient of the saturated zone can be approximated by the local surface topographic slope ,tanB, Figure 3,

3-      The distribution of the downslope transmissivity with depth is an exponential function of the storage deficit or depth to water table, and

4-      The recharge rate r (m/h) entering the water table is spatially homogeneous. Therefore the subsurface downslope flow per unit contour length qi , assuming steady state with the spatially homogeneous recharge rate, is given by q = ra, where a the area of the hillslope per unit contour length (m2), Figure 3.

 Figure 3: Depiction of topographic index and the recharge rate in assumption 2 and 4.

Base on these assumptions the following set of equations can be obtained to describe the depth to water table at each location (e.g. grid cell).

                                                            (1)

                                                               (2)

                                                                (3)

                                          (4)

                 (5)

                                                          (6)

                                                     (7)

where

Qb is the baseflow, the output from the saturated zone,

Qv is the total recharge to the water table,

qv is the vertical flow of the unsaturated zone,

A is the total catchment area,

is the catchment lambed, or mean, water table depth

zi is the local water table depth at point i.

ln(a/tanB) is the soil topographic index,

f is a scaling parameter

T0 is the lateral transmissivity when the soil is just saturated, equal to (f / K0), m2/h

K0 is the saturated hydraulic conductivity

is the effective water content change per unit depth in the unsaturated zone (effective drained porosity)

 is the effective vertical hydraulic gradient.

For this study, the evaporation component was not included assuming that the model works for humid regions and so it is not significant. Some other approximations were also introduced, first, the area “a”, shown in Figure 3, was assumed as one grid cell. Secondly, the saturated hydraulic conductivity K0 was assumed constant for the whole region as well as the lateral transmissivity T0,, and  .

The Basemap

In order to perform this analysis a basemap was prepared for the study area that consists of outlet point as feature class layer and a watershed raster layer for the specified basin extracted from the DEM obtained for the region.

The DEM obtained for the study area, Figure 4, covers three basins including the Blue River basin. The following steps were followed to prepare and extract the required basin raster using the Arc Hydro tool:

1)      Compute the Flow Direction grid ,

2)      Compute the Flow Accumulation grid,

3)      Compute the Stream Definition grid, in which the stream is defined by a threshold area of 33,000 km2 in this study decrease the amount of time of computation required,

4)      Create the Stream Segmentation,

5)      Create the Catchment Grid,

6)      Catchment polygon feature class,

7)      Create the Adjoint Catchments polygon feature class,

8)      Create Batch Point feature class which contains the point feature class for the USGS steam gage flow measurements,

9)      Create the Watershed polygon feature class which include all the subcatchments upstream the stream gage,

10)  Finally extract the Blue River Basin grid based on the Batch Point and the Watershed polygon.

The result of performing these steps was shown in Figure 5.

 

 

Figure 4: Map showing the DEM for the study area.

 

Figure 5: Layout of DEM and the delineated Blue River Basin including the USGS gage location

The Modeling Steps

In order to estimate the streamflow from rainfall measurements based on the TOPMODEL concepts the following summarizes the steps followed in this study;

1-      Assume and estimation of  f, T0, ,, and K0

2-      Calculate lambda and gamma,

3-      Assume or estimate initial baseflow, at time step t=1,

4-      Calculate the mean water table depth , at t=1,

5-      Calculate the local time table depth at location i ,, at time step t=1,

6-      Calculate Qv, at time step t=1,

7-      Using the previous time step values and Equation 4 to calculate  at t=2,

8-      Calculate Qb from resulted in step 7,

9-      Repeat steps 5 to 8 until t = T ,the total time length,

10-  Evaluate each of the estimated zi to obtain the runoff generated at the outlet point.

The Set of the VBA Tools Customized and Developed

The following tools were generated, and some were customized or added from the ESRI’s developed toolboxes developed by, to perform the analysis. The toolbars prepared by the Author were the Slope, TopoIndex, Run, and Output buttons

  • The main model toolbar, named as TOPMODEL, which includes DEM Process dropdown menu, Batch Point Generation, Weather Downloader, Run, and Output buttons, shown in Figure 6.
  • The DEM Process dropdown menu includes Slope, Flow Direction, Flow Accumulation, Stream Definition, Stream Segmentation, Catchment Grid Generation, Catchment Polygon Processing, Drainage Line Processing, Drainage Point Processing, Batch Watershed Delineation, and TopoIndex buttons, shown in Figure 7.
    • The Slope button opens up new menu that’s allows the user to load and display the DEM layer of the region and it also allows to calculate and display the slope layer based on  ESRI standard slope function, shown in Figure 8.
    • The other functions were obtained from the Arc Hydro toolbar.
  • The TopoIndex Button opens up a new menu that allows the user to calculate and display a layer of the topographic index and prompt the user with the value of the watershed lambda, shown in Figure 9.
  • The Run button opens up a new window allows the user to specify the model parameters, load the rainfall data, estimate zi and, calculate the runoff by evaluating zi for each time step, shown in Figure 10.
  • The last button is the Output button, which allows the user to append the estimated model runoff time series to the existing runoff table. Hence the user can plot the two runoffs and compare them, shown in Figure 9.

Figure 6: A screen capture of the TOPMODEL main toolbar.

 

   

                       

 

  

 

                           

       

 

 

 

Figure 11: A screen capture of the Output button.

Sample Model Run

·                  The DEM layer was loaded into ArcGIS then when the Slope window was accessed by clicking on the Slope button in DEM Processing menu. Clicking on the Load Data button allowed loading the DEM raster into the TOPMODEL engine and once it finished loading a small windows popped up informing the end of the loading process and showing some general information about the DEM. This general information includes the DEM layer name and source, the cell count and size, and the NO Data count and value, as shown in Figure 12.

·                  Clicking on the Slope button allowed the calculation of the slope (in decimals) for the DEM and a layer with the named as Slope was added to the current document. At the end of the calculation window popped up informing the end of the process, as shown in Figure 13.

Figure 12: A screen capture showing the result of end loading the DEM into TOPMODEL engine.

 

Figure 13: A screen capture showing the end of calculation of the slope.

·                  Once the Slope, Catchment grids, and the Watershed polygon feature were prepared, the topographic index was estimated by accessing the Topographic Index Calculation window by clicking on the TopoIndex button at the end of DEM Processing menu. Clicking on the Topo. Index button allowed for the specified layers to be loaded into the TOPMODEL engine and a mask layer of the watershed was calculated by assigning zero to all grid cells that lies off the watershed and hence allows computing the watershed area, as shown in Figure 14. At the end of the calculations a topographic layer was added to the document with the name TopoIndex, as shown in Figures 15 and 16.

·                  Clicking on the Run button popped up a window that allowed specifying the different model parameters and the rainfall input database table as well.

    • The parameters used in this sample run were as follows: f = 4 m-1, = 0.0025, K0 = 0.025 m/hr, T = 0.00625 m2/hr, = 0.25, and initial base flow of 1.8 m3/s
    • By writing the name of the table that contains the rainfall data and clicking the “add” button load the rainfall data in to the engine and a window popped up informing about the number of records, as shown in Figure 17.
    • The TOPMODEL calculation was started by clicking on the Run button to process the provided data. During this process an information window popped up showing the value of the estimated Gamma for the watershed, as shown in Figure 18, and at the end of the calculation the layer of the water table at the initial time step and at  T +1 were added, as shown in Figures 19 and 20.

·                  By clicking on the Output button an output window popped up informing that the estimated output was added to a specified table and field, as shown in Figure 21.

·                  A plot of the actual and estimated streamflow was shown in Figure 22.

Figure 14: A screen capture showing the results of creating a mask layer from the DEM.

Figure 14: A screen capture shows the information window of the watershed mask layer

Figure 15: A screen capture shows the end of calculation of the topographic index

Figure 16: Map showing the DEM overlaid with the Blue River Basin and the topographic index layer

Figure 17: A screen capture showing the number of records for the rainfall data input.

Figure 18: A screen capture showing the estimated value of gamma.

Figure 19: Layout showing the estimated depth to water table at the initial time step t =0.

Figure 20: Layout showing the estimated depth to water table at the time step t = T+1.

Figure 21: a screen capture showing estimated streamflow added to the exiting table of gage measurements.

 

Figure 22: Plot of the estimated and actual streamflow at the watershed outlet

 

Discussion and Conclusions

·                  In this sample run the estimated flow were higher at some points and lower at another compared with the actual measurements and this can be referred to the assumed soil parameters for the watershed and the assumed TOPMODEL parameter  f. Additional runs with the actual soil values and optimized value for f  will improve its performance.

·                  The time required to run the model approximated by 40 minutes for only 17 rainfall inputs which is considerably long time, this can be referred to the assumed fully distributed nature of the calculation. Note that the TOPMODEL uses lumped areas for “a”, Figure 3.  

·                  Although the model on its way to estimate the streamflow calculates the water table depth raster layer and allows to save it for each time step but it is not recommended to use such options since it require a considerable amount of disk space specially if it is only required to find the streamflow. 

Future Improvements

·         Include evaporation component,

·         Increase the model capabilities to allow working with distributed soil parameters.

·         Also to allow working with distributed rainfall as well as snow.

·         Include evapotranspiration component,

·         Include component to allow working with real-time data.

 

 

 


References

·                  Beven, K., R and Kirkby, M J.,(1979) , A physically based variable contributing area model of basin hydrology, hydrological science bulletin, 24(1),43-69.

·                  Beven, K., R. Lamb, P. Quinn, R. Romanowicz and J. Freer, (1995), "TOPMODEL," Chapter 18 in Computer Models of Watershed Hydrology, Edited by V. P. Singh, Water Resources Publications, Highlands Ranch, Colorado, p.627-668.

·                  Chinnayakanahalli, K., C. Kroeber, R. Hill, J. Olson, D. G. Tarboton and C. Hawkins, (2006), "Manual for Regional Watershed Analysis Using the Multi-Watershed Delineation Tool," Utah State University

·                  DMIP, (accessed, September 2007), National Weather Service, http://www.nws.noaa.gov/oh/hrl/dmip/.

·                  ESRI1, accessed November 2007, ESRI Developer Network, http://edndoc.esri.com/arcobjects/8.3/

·                  ESRI2,accessed November 2007, ArcGIS Desktop Help, http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=welcome

·                  Tarboton, D. G., R. Woods, C. Pearson, U. Shankar, R. Henderson and R. Ibbitt, (1999), "Distributed Hydrologic Modeling using GIS and Topmodel," Presentation at 19th Annual AGU Hydrology Days, Fort Collins, Colorado, August 16-20.

·                  Tarboton, David, (2003), Topmodel and Unit Hydrographs, class homework,,Utah State Univrsiy http://www.engineering.usu.edu/classes/cee/6400/hw8/index.html.

·                  Romanowicz, Renata, (1997), A MATLAP implementation of TOPMODEL, Hydrological Processes, vol. 11, 1115-1129.