IMPLEMENTATION OF A DISTRIBUTED HYDROLOGIC MODEL WITHIN GEOGRAPHIC RESOURCES ANALYSIS SUPPORT SYSTEM (GRASS) Bahram Saghafian U.S. Army Construction Engineering Research Laboratories (USACERL) 2902 Newmark Dr Champaign, IL 61826 email: bahram@zorro.cecer.army.mil ABSTRACT A number of strategies in conjunctive use of hydrologic models and GIS are outlined. By using data base structure and functions of GRASS GIS, this particular effort follows the "full integration" strategy by reprogramming CASC2D distributed parameter hydrologic model within GRASS GIS. Several advantages gained in fully integrating these two components are highlighted. While major features of the hydrologic model CASC2D are briefly described, the input requirements and output options in relation to GRASS are discussed in more detail. Some general issues in conjunctive use of hydrologic models and GIS are also addressed. BACKGROUND Nowadays, hydrologists have turned their attention to the Geographic Information Systems (GISs) for assistance in studying some of the natural and man-made processes which describe the movement of water within the hydrologic cycle. Hydrologic models, particularly those distributed in nature, have to deal with the spatial distribution of numerous watershed and rainfall characteristics. As such, GIS can play a significant role in facilitating the treatment of spatial dimension. Several of the advantages gained by using GIS in the pre- and post-processing of spatial data to and from hydrologic models have been exploited in a number of applications. The influence of spatial aggregation on runoff has been reported by Mancini and Rosso (1989), who investigated the spatial variability of the SCS curve number using a raster GIS and a distributed model. Leavesley and Stannard (1991) took GIS outputs defining the boundaries and associated parameter values of hydrologic response units (HRU) as input to the Precipitation Runoff Modeling System (PRMS). Remotely sensed snow cover data was also used in conjunction with the GIS to verify PRMS results predicting snowmelt processes. Steube and Johnston (1990) compared the performance of GIS-derived results with manually crafted methods in runoff simulation using the SCS curve number approach. GIS was found to be an acceptable alternative, greatly simplifying data preparation and handling. In a review of water quality and quantity modeling and GIS applications in water resources, Vieux (1991) used a GIS-based Triangular Irregular Network (TIN) to process the terrain of a small watershed for further application of the finite element solution to the kinematic overland flow equations. It was stressed that GIS can combine the model results with other map coverages to allow comparison of cause-and-effect relationships. Recently, Rewerts and Engel (1993) developed a hydrologic toolbox in which spatial data needs of ANSWERS (Areal Nonpoint Source Watershed Environmental Response Simulation) model were served by GRASS (Geographic Resources Analysis Support System) GIS. A project manager program was designed as a user interface to simulation scenario management and visualization. Maidment (1991) identified four different levels of hydrologic modeling in association with GIS: hydrologic assessment, hydrologic parameter determination, hydrologic modeling inside GIS, and linking GIS and hydrologic models. In the assessment level, hydrologic factors pertaining to some situation are mapped in GIS. Hydrologic parameter determination involves the analysis of terrain and land cover features to yield the parameters for hydrologic models. In his description of hydrologic modeling inside GIS, Maidment (1991) limited such operations to steady state processes. It was suggested, however, that with developing space-time data structures in GIS, it would be realistic to begin thinking about performing numerical modeling "within GIS". This study attempts to cover some aspects of hydrologic modeling within the GIS framework. APPROACH Conjunctive Use of Hydrologic Models and GIS A number of strategies can be inferred from available literature on conjunctive use of hydrologic models and GIS. Although the distinction may not be readily apparent, one may categorize alternatives in conjunctive use as follows: 1. Development of an independent spatial data structure to be used by a distributed hydrologic model. 2. Model input/output processing using a GIS. 3. Linkage of a model and a GIS through an interface. 4. Full integration of a model "within" a GIS. In category 1, the mere development of a distributed parameter hydrologic model requires construction of a spatial data structure for storage, manipulation, and even visualization of input/output, such as model input parameters and output discharge quantities. Thus a poor-man GIS is built as an integrated part of the model. Recent extensive use of standard GIS in determination of hydrologic model parameters, output analysis, and visualization may be classified in category 2. Such effort involves the pre-processing of spatial input data by a GIS in a format suited for the model and occasionally the subsequent analysis of spatial output results. Determination of slope, aspect, watershed boundaries, and stream network are some examples of the pre-processing tasks being carried out using GIS. The third category describing the linkage of models and GIS through interfaces is gaining popularity among hydrologists. In fact the linkage performed in category 3 is an advanced user-friendly implementation of category 2. The ANSWERS interface (Rewerts and Engel, 1993) is one of the examples of establishing linkage between a hydrologic model (ANSWERS) and a GIS (GRASS). Spatial decision support systems (SDSS) could be considered the ultimate product in category 3. Category 4 represents a full integration and involves programming of a hydrologic model "within GIS". This strategy encourages the model to adopt the spatial data structure of the GIS. While the model and the GIS are separate units in categories 2 and 3, the GIS is a subunit of the model in category 1 whereas the opposite is true in category 4. Except in category 1, the hydrologic model of conjunctive use could be either a lumped parameter or a distributed one. Watersheds and their properties are major spatial components of hydrologic modeling. While lumped parameter models must rely on different levels of aggregation prior to their use, the distributed watershed modeling can take full advantage of the GIS spatial operation capabilities for more accurate analysis that provides meaningful and verifiable spatial output results such as runoff discharge, surface depth, and sediment concentration. The time-varying nature of hydrological processes, however, needs to receive more attention in a GIS environment. CASC2D-GRASS Integration The model of this study, CASC2D, is a distributed raster-based hydrologic model and has been previously used in conjunction with GRASS GIS to study the hydrological impacts of soil disturbances created by training exercises (Doe and Saghafian, 1992). A five-step methodology was used in that study: 1) Disturbance scenario development; 2) Spatial characterization of the watershed in GRASS; 3) Linkage of GRASS spatial data to the CASC2D hydrologic model; 4) Hydrologic simulation of the scenario in CASC2D; and 5) Linkage of model output to GRASS for spatio-temporal analysis. This current effort revolves around offering a direct dynamic modeling capability to the GIS by adding a time-varying hydrologic model component (CASC2D) to the existing GIS modules, thus providing the GIS toolbox with an environmental simulation capability. While GIS benefits from such full integration by adding to its growing assets, the performance of the hydrologic model is improved by: 1) facilitating spatial data management; 2) taking advantage of data sets already prepared to perform other environmental studies using GIS; 3) gaining direct access to the GIS library for data resampling, manipulation, etc; and 4) employing the GIS visualization modules for display purposes. The GIS umbrella for this effort is GRASS. It is of significance to mention that the CASC2D-GRASS full integration is aimed at preparing the foundation for sediment transport simulations. GRASS GIS GRASS is a public-domain image-processing and geographic information system, written in the C programming language and running under the UNIX operating system. GRASS was originally developed by researchers at USACERL to assist land managers at military installations. At present, GRASS is used by a wide variety of public and private agencies, some of which have developed and contributed a number of GRASS programs. Data in raster format is of particular interest because GRASS is well developed to handle such data. There are several commands in GRASS for direct terrain analysis, which may be useful for hydrologic models. The raster command r.slope.aspect takes digital elevation models (DEM) as input and generates raster map layers of slope and aspect. r.watershed is a program that delineates subwatersheds and stream network in a given geographic region. r.drain can trace a flowline through an elevation raster map. s.surf.tps is a site program which interpolates site data, computes tangential and profile curvatures, and generates a raster map layer. The interpolation is accomplished using spline with tension. This program may be particularly useful in DEM generation. HYDROLOGIC MODEL CASC2D General Model Features CASC2D is a physically-based rainfall-runoff watershed model. Square grid elements are used to represent the distributed watershed and rainfall domains. Although spatial variability is allowed from one element to the next, each element is assumed to be a homogeneous unit. The primary features of the current version of the model include an advanced soil moisture accounting, primarily based on the Green-Ampt infiltration model, and a two-dimensional diffusive wave overland flow routing coupled with a one-dimensional diffusive wave channel routing. The numerical technique used to solve the continuity equation and diffusive form of momentum equation is an explicit finite difference method. The existing formulation of the point infiltration component allows for the continuous simulation of multistorm events by computing soil moisture content at all times. The main input parameters used to activate the infiltration module are the saturated hydraulic conductivity, the capillary suction head, the effective porosity, and the initial soil moisture. Other input data may be necessary depending upon how one wishes to model the soil desaturation during low-intensity and/or no-rainfall periods. At each time step iteration, prior to the first surface ponding, the soil moisture is incremented by the pro-rated soil moisture deficit at the present time. The rating factor is based on the ratio of the time step duration to the estimated ponding time that corresponds to the current soil moisture and rainfall intensity. Once ponding is reached, the original Green-Ampt equation is applied to compute the infiltration rate while the surface soil moisture stays at saturation. If and when the rainfall intensity falls below the saturated hydraulic conductivity, the water profile is redistributed to account for soil desaturation. This redistribution is performed based on the application of Darcy's law as indicated by Smith et al. (1993). Once a new burst of storm arrives and the rainfall intensity increases again, a new water profile is formed within the soil in addition to the still redistributing first water profile. This second profile is fed by a rate given by the Green-Ampt equation in which the moisture deficit is calculated relative to the moisture of the first profile. These two profiles join when the depth of the second profile exceeds that of the first profile. Once the excess surface water depth at any given time step is determined at all grid cells by removing infiltration losses, the overland surface depth is routed in two dimensions depending upon water surface slope. The model allows the simulation of runon which occurs when surface runoff from upstream cells infiltrates in a pervious downstream cell. Where the overland surface runoff meets a channel segment embedded in a cell, it becomes part of the channel flow. The model can also simulate overbank flow by connecting the flow over the floodplain to the overland flow routing component. A complete description of flow routing in CASC2D can be found in Julien and Saghafian (1991) and Saghafian (1992). Input Description The input data necessary for model simulations can be classified into three major categories: spatial, temporal, and parametric. While influenced by the selected grid resolution, most of the spatial data are stored and manipulated in GRASS. Such data include the following items: 1. Watershed boundary (shape) map. This is optional; however, failure to provide the shape map would result in extra computations for the elements outside the desired watershed boundary. The r.watershed program in GRASS may be used to delineate the watershed of interest. 2. Elevation map in DEM form. Where raster DEM is not available, digitized contours can be used to generate the DEM using s.surf.tps in GRASS. Noise and depression removal are not required because the model can handle water accumulation and backwater effects, if any, due to its diffusive wave nature. It is recommended, however, that unreal depression areas be filled to prevent excessive water accumulation that otherwise would contribute to the discharge at the watershed outlet. 3. Surface roughness map. If proper correlation between the vegetation cover map and surface roughness is established, r.reclass of GRASS may be used to reclassify the vegetation map and generate the roughness map. If no such map is provided, the watershed is assumed to be uniform with respect to overland surface roughness, requiring the input of a single roughness value. 4. Soil infiltration parameter maps. To compute infiltration losses using the original Green-Ampt equation, four maps are necessary: saturated hydraulic conductivity, capillary suction head at the wetting front, effective porosity, and antecedent soil moisture content. The soil textural maps can assist in construction of the first three maps using available tables (Rawls et al., 1983). As such, the r.reclass command in GRASS may be used to produce soil parameter maps from the soil textural maps. The maps of soil pore-size distribution index and residual soil moisture content are also required if soil desaturation is to be simulated. 5. Channel network and cross sectional properties. Channel network information should describe network spatial layout and connectivity. Cross sectional geometry data and a surface roughness value must be assigned to each channel segment. r.watershed of GRASS can assist in delineating the stream network. 6. Raingage network. The position of each recording raingage in a network in or nearby the watershed must be provided if simulation of such rainfall data is desired. 7. Outlet location. This is specified in terms of easting and northing of the outlet in UTM coordinate system. The temporal data mainly include the raingage rainfall data which is provided via an ASCII file. The parametric model inputs are computational time step duration, rainfall duration, and total simulation time. For simulating uniform watersheds and/or uniform rainfall events the parametric input data may also include, wherever appropriate, the uniform values of overland surface roughness, soil infiltration parameters, and rainfall intensity. Output Description The user can select several computed variables to be saved as output results for further analysis and visualization. These outputs include the hydrograph at the outlet and a time series of raster maps such as surface depth, rainfall intensity, infiltration depth, infiltration rate, and soil moisture content. The extension for each raster map in a given time series indicates the corresponding time iteration. For further analysis, the time series of raster maps can be visualized and put into animation using certain display capabilities of GRASS. Advanced 3-D multisurface visualization and animation are also possible in GRASS using SG3d module, a specially developed graphics program for Silicon Graphics computers. When utilizing SG3d, various surfaces including rainfall intensity, surface depth, and infiltration depth may be displayed while aligned with one another in vertical position. Model Improvements Addition of a major option for channel routing computations is currently being implemented. An implicit channel routing algorithm would enhance the capability of the hydrologic model in simulating internal boundary conditions such as bridges, culverts, etc. The trend in further development of the model is being directed toward simulation of sediment transport. GENERAL ISSUES There are a number of issues which need to be addressed in conjunctive use of hydrologic modeling and GIS in general, and in attempting to fully integrate distributed hydrologic models with GIS in particular. Most of the issues are related to the current weaknesses of GISs, while others deal with numerical techniques used in the hydrologic models, and still others root from the errors in spatial data. One may express these issues as follows: 1. Elevation Data Quality: The quality of USGS Digital Elevation Models (DEM) has recently caused some concern in the field of distributed hydrologic modeling. In particular, the error in DEM may generate unrealistic depression areas which kinematic-based models, for instance, cannot handle. The existence of error in a DEM will also introduce inaccuracy in delineation of subwatersheds and, most importantly, stream network. However, it is important to realize that some depression areas are real and do exist in watersheds and therefore the choice of hydrologic model to simulate such depressions must be at least a diffusive-based model. 2. Transition from Raster to Vector Operations: Two-dimensional overland flow routing using finite difference approach is well suited to raster environments while one-dimensional channel routing may best be performed in a vector domain. The transition from raster to vector operations needs special attention in models that operate as such. In current version of CASC2D model the channel network is known by identifying the raster cells which contain a channel segment. The length of this segment is assumed to be equal to cell size, but work is underway to incorporate the specified actual length of segment in each cell as a cell attribute. 3. Temporal Variation: Currently most standard GISs, including GRASS, have no straightforward way of dealing with temporal variations. Distributed hydrologic models can typically generate numerous spatial map layers through time. Storing all such map layers in the same spatial data base may be confusing unless some way of identifying the time attribute is established. 4. Conjunctive Ground and Surface Water Simulations: Conjunctive distributed surface and ground water simulations within GISs require the existence of a multilayer (or multidimensional) data handling capability. Development of temporally-varied multilayer data base in a GIS greatly facilitates the integration of linked surface and subsurface models with GIS. 5. Float/NULL Data Handling: This particular problem pertains to GRASS which, currently, is not capable of handling floating point input/output data. Therefore ASCII maps containing floating point values must be converted to integer maps by multiplying the maps by certain factors before they can be imported into GRASS. The multiplication factors may have to be known in advance to GRASS modules operating on converted data. Moreover, in producing output maps containing floating point variables still other multiplication factors must be applied. This method of handling floating point data is rather tedious and sometimes confusing, considering the number of maps involved in distributed hydrologic modeling. Also zero value data in GRASS is generally interpreted as no data. Fortunately, however, both floating point and zero data management capabilities are being designed for future GRASS releases. SUMMARY A number of strategies may be implemented to assist hydrologists in conjunctive use of hydrologic models and GISs. One of the strategies revolves around the full integration of distributed hydrologic models with GIS by programming a model within GIS and thus making the model a member of the GIS toolbox. The effort in this paper capitalizes on the raster-based nature of hydrologic model CASC2D as a suitable candidate for integration with a raster GIS such as GRASS. The model CASC2D is briefly described and its input data requirements in relation to GRASS is discussed. Some of the issues related to conjunctive use of hydrologic models and GIS are also outlined. ACKNOWLEDGMENT This work has been supported in part by an appointment to the Research Participation Program at the U.S. Army Construction Engineering Research Laboratories (USACERL) administered by the Oak Ridge Institute for Science and Education through an interagency agreement between the U.S. Department of Energy and USACERL. REFERENCES Doe, W. W., and Saghafian, B. (1992) Spatial and temporal effects of army maneuvers on watershed response: the integration of GRASS and a 2-D hydrologic model. Proceedings, 7th Annual GRASS GIS user's Conference, Denver, Colorado. Julien, P. Y., and Saghafian, B. (1991) CASC2D user's manual: A two-dimensional watershed rainfall-runoff model. Civil Engineering Report No. CER90-91PYJ-BS-12, Colorado State Univ., Fort Collins, Colorado. 66 pp. Leavesley, G. H., and Stannard, L. G. (1991) Application of remotely sensed data in a distributed parameter watershed model. Unpublished manuscript, USGS, Denver, Colorado. 12 pp. Maidment, D. R. (1991) GIS and hydrologic modeling. Proceedings, First International Symposium/Workshop on GIS and Environmental Modeling, Boulder, Colorado. 22 p. Mancini, M., and Rosso, R. (1989) Using GIS to assess spatial variability of SCS curve number at the basin scale. New Direction for Surface Water Modeling. IAHS Publication No. 181, pp. 435-444. Rewerts, C. C., and Engel, B. A. (1993) ANSWERS on GRASS: Integrating of a watershed simulation with a geographic information system, Conference Agenda and Listing of Abstracts, 8th Annual GRASS GIS user's Conference and Exhibition, Reston, Virginia. Steube, M. M., and Johnston, D. M. (1990) Runoff volume estimation using GIS Techniques. Water Resources Bulletin, 26(4): 611-620. Rawls, W. J., Brakensiek, D. L., and Miller, N. (1983) Green-Ampt infiltration parameters from soils data. J. of Hydraulic Engineering, ASCE, 109(1): 62-70. Saghafian, B. (1992) Hydrologic analysis of watershed response to spatially varied infiltration. Ph.D. Dissertation, Colorado State Univ., Fort Collins, Colorado. Smith, R. E., Corradini, C., and Melone, F. (1993) Modeling infiltration for multistorm runoff events. Water Resources Research, 29(1): 133-144. Vieux, B. (1991) Geographic information systems and non-point source water quality and quantity modelling. Hydrological Processes, 5(1): 101-113.