CRWR Online Report 00-6 Upscaling River Network Extractions from Global Digital Elevation Models by Mary Lear, M.S.E. Graduate Research Assistant and Francisco Olivera, Ph.D. James S. Famiglietti, Ph.D. David R. Maidment, Ph.D. Research Supervisors August 2000 CENTER FOR RESEARCH IN WATER RESOURCES Bureau of Engineering Research ? The University of Texas at Austin J.J. Pickle Research Campus ? Austin, TX 78712-4497 This document is available online via World Wide Web at http://www.crwr.utexas.edu/online.html Copyright by Mary Stockley Lear 2000 Upscaling River Network Extractions from Global Digital Elevation Models by Mary Stockley Lear, B.S.C.E. Thesis Presented to the Faculty of the Graduate School of The University of Texas at Austin in Partial Fulfillment of the Requirements for the Degree of Master of Science in Engineering The University of Texas at Austin August 2000 Upscaling River Network Extractions from Global Digital Elevation Models Approved by Supervising Committee: David R. Maidment James S. Famiglietti Francisco Olivera Acknowledgements I am thankful to have worked on this project under the guidance of Jay Famiglietti, David Maidment, and Francisco Olivera. Thank you, Jay, for the many opportunities that you afforded me to experience hydrology from the field. Thank you, Dr. Maidment and Dr. Olivera, for sharing your expertise and resources in the world of hydrology. Thank you to Kwabena Asante for your insights, your time, and teaching me with patience. Thank you to Aaron Berg for making sense of helpful though foreign programs. Thank you to Amy Orr Lear, my mom, for your constant support and your ability to change batteries. Thank you to Teresa Hart for inspiring adventures and to Katherine Osborne for your generosity of time. Thank you to J?na Finnd?s J?nsd?ttir, Caroline Gerwe, and Carolyn Nobel for keeping my priorities in order. August 2000 Upscaling River Network Extractions from Global Digital Elevation Models Mary S. Lear, M.S.E. The University of Texas at Austin, 2000 Co-Supervisors: James S. Famiglietti and David R. Maidment The representation of stream networks is an integral component of river transport schemes used in large-scale hydrological and climate models. However, the coarse resolution of the cells describing the land component of climate models (e.g. 2.8?) is insufficient to adequately represent river flow directions across continents. Hence, a methodology is required for upscaling river network extraction from high resolution digital elevation models (DEMs) to the lower resolution of the climate models to which they will be applied. In this study, an innovative approach for upscaling flow directions is introduced. The method utilizes the maximum flow accumulation, computed from the high resolution DEM, to determine the most realistic representation of the river network at the coarse resolution. The approach is original because it incorporates a projected mesh as the overlay for the high resolution grid and uses a unique division of the low resolution grid into four sub-sections. Upscaled networks for rivers of Africa and South America are compared with the river networks from alternative upscaling methods and from the fine resolution river network to determine which approach best represents the rivers. Example river networks are provided for the Niger, the Congo and the Amazon River basins. Table of Contents Chapter 1 Introduction............................................................................................1 1.1 Motivation................................................................................................1 1.2 Objectives .................................................................................................6 1.3 Material Presented ....................................................................................8 Chapter 2 Literature Review ...................................................................................9 2.1 Resolution Sensitivities............................................................................9 2.2 Upscaling Algorithms.............................................................................10 2.3 Division of Coarse Boxes .......................................................................14 Chapter 3 Methodology.........................................................................................18 3.1 Overview of Double Maximum Algorithm............................................18 3.2 User Input and Coarse Mesh Generation ...............................................26 3.2.1 Rotated Coarse Mesh .................................................................33 3.3 Upscaling Process ..................................................................................34 3.3.1 Algorithm Steps .........................................................................35 3.3.2 Explanation of Flow Direction Determination ..........................43 3.4 Downstream Box Information from Raster to Vector Format ..............48 3.5 Sinks: Inland Catchments and the Continental Margin .........................50 3.6 Coarse Resolution River Network .........................................................56 Chapter 4 Results and Discussion.........................................................................60 4.1 Double Maximum Algorithm Applications ............................................60 4.2 Analysis of Double Maximum Algorithm..............................................66 4.2.1 Rotated Coarse Mesh..................................................................67 4.2.2 Flow Direction Distribution.......................................................70 4.3 Evaluation and Comparison to Other River Networks...........................72 4.3.1 Flow Generation Algorithm .......................................................73 4.3.2 Manual River Networks .............................................................75 4.3.3 Observed Data River Networks..................................................77 4.4 Contributions .........................................................................................78 4.4.1 Projection of Coarse Mesh .........................................................79 4.4.2 Orientation of Coarse Mesh........................................................80 4.4.3 Division of Coarse Boxes...........................................................80 4.5 Limitations..............................................................................................80 4.5.1 Suggested Solution for the Integration of Smaller Watersheds..81 4.5.2 Suggested Solution for the Uneven Flow Direction Distribution ................................................................................83 Chapter 5 Conclusions...........................................................................................84 Appendix A Double Maximum Algorithm ..........................................................88 Appendix B User's Guide to Section One ............................................................99 Appendix C Coarse Mesh Parameters ................................................................103 Appendix D Projection Parameters....................................................................106 References ...........................................................................................................109 Vita ....................................................................................................................110 1 INTRODUCTION Chapter 1 The hydrologic cycle is a complex system requiring many disciplines for its study. Until fifteen years ago, land surface hydrologists worked separately from atmospheric and oceanic scientists, as each studied distinct parts of the hydrologic cycle (Eagleson, 1986). Then, the global impacts of climatic events like El Ni?o-Southern Oscillation and La Ni?a, produced an awareness of the interdisciplinary nature of the hydrologic cycle as part of the climate system. In an attempt to better understand the climate?s behavior, scientists from atmospheric, oceanic and land surface hydrology began to collaborate and to model the climate as a coupled system. 1.1 MOTIVATION Global-scale climate models, called General Circulation Models (GCMs), integrate many complex algorithms that describe the physical, chemical, and biological processes of the climate system. The four main components of GCMs are the land surface, atmosphere, ocean, and ice models. In the land surface model, the vertical movement of water in the hydrologic cycle, precipitation and evaporation, is well represented. However, the horizontal movement of water, specifically rivers, is missing from the models. Even though rivers make up less 2 than one tenth of a percent of the earth?s water, their influence on both the local and regional-scale climate is significant. A river network for each continent, or a global river network, describes the horizontal movement of water over the land surface. Therefore, including a global river network as input for GCMs including the National is necessary in order to provide a more complete representation of the hydrologic cycle. Scale plays an important part in creating a global river network. The scale of GCMs, like the National Center for Atmospheric Research?s Climate System Model, can be 2.8125? or about 300 kilometer-sized boxes, while global digital elevation models (DEMs) that represent the land surface topography are available in 30 arc-second or 1 kilometer grids. Thus a single GCM box contains more than 100,000 DEM cells. The translation from fine resolution DEMs to coarse resolution river networks is called upscaling. Geographic Information Systems (GIS) provide an invaluable tool to solve the upscaling problem. An algorithm must be developed to translate fine resolution flow direction data, derived from the global DEMs, to a coarse resolution river network for each continent. The aforementioned concept of upscaling can be described visually in Figures 1.1 and 1.2. River networks can be created from the fine resolution global DEMs, which represent the river as a sequence of DEM cells, as seen in Figure 1.1 for West Africa including the Niger River basin. The level of detail of the river network from the 1-kilometer grid is appropriate when performing analysis 3 on the watershed scale but it is too intensive for continental scale hydrological studies. Therefore, an algorithm is necessary to upscale the river hydrography from fine to coarse resolution for use in global scale GCMs. The algorithm performs a series of steps on the fine resolution DEM to determine the flow direction that best describes the river network in the coarser scale. The upscaled river network for the same section of West Africa, as seen in Figure 1.2, can be used as input for a GCM. 4 Figure 1.1 Fine Resolution River Network (Blue) for West Africa Shown With Watershed Boundaries (Red) Figure 1.2 Coarse Resolution River Network (Blue) for West Africa Shown with Watershed Boundaries (Red) 5 Upscaling river networks from global DEMs is not a straightforward process. A new upscaling algorithm was created in this research to extract a coarse resolution river network from a fine resolution DEM. This extraction required a connection between the DEM, which is in raster or grid format, and the river network, which is in vector or coverage format. The algorithm was written in Arc Macro Language (AML), the language for the GIS software, ArcInfo, Version 7. Both grids and coverages are used in the algorithm and are discussed extensively in this thesis. To distinguish between the raster (grid) and vector (coverage) formats, their definitions are given here. The raster or grid format describes a matrix of pixels or cells where each cell has a value. In this research, all grids have the same fine resolution, specifically 1-kilometer, with their pixels being referred to as cells. In contrast, vector or coverage data can represent points, lines, or polygons where each element is described with x and y coordinates and an identification number. The coverages in this thesis are line and polygon type coverages. For example, the river networks in the previous figures are line coverages and the watershed boundaries are part of a polygon coverage. A key component of the upscaling algorithm is a polygon coverage called a fishnet as seen in Figure 1.3. The fishnet is a coarse resolution rectangular mesh whose 6 elements are referred to as boxes. The role of the mesh will be introduced in Section 3.1. Figure 1.3 Example of Polygon Coverage Called Mesh 1.2 OBJECTIVES There were two main objectives to this research. The first objective involved the creation of an upscaling algorithm. The main requirement of the algorithm was to work in an environment conducive to both the GCM and land surface hydrology. A goal was to create an algorithm that best represents the flow of water over the land surface at large scale. The second objective was to evaluate the algorithm by analyzing the unique aspects of the algorithm and to compare the 7 river networks to the results of 1) an upscaling algorithm by O?Donnell et al., (1999), 2) a manual approach to determining flow direction and 3) the representation of the river at fine scale. For the first objective, an algorithm called the double maximum method (DMA) was created. To satisfy the requirement, a coarse resolution mesh was introduced and projected from geographic coordinates of the GCMs into Lambert- Azimuthal Equal Area projection. It is necessary to work in a projected environment for land surface hydrology, since the land area is preserved. A square mesh in geographic coordinates does not have the same land area in each cell because of the curvature of the meridians on the earth?s surface. Since the path that water follows over land is important for river length calculations and routing, a projected environment with x and y coordinates in meter or feet rather than degrees must be used for land surface hydrology. A coarse resolution mesh was created in geographic coordinates and then projected into the same environment as the fine scale DEM. Second, the river networks from the double maximum algorithm were analyzed and compared with other upscaling algorithm results. The analysis includes examining the effects of the orientation of the coarse resolution mesh, the flow direction distribution, and the division of the boxes. The river networks were also compared to river networks from the O?Donnell et al. algorithm, a 8 manual flow direction algorithm, and observed river hydrography to see which method extracted the best representation of the example rivers. 1.3 MATERIAL PRESENTED The chapters in this thesis will describe the innovative upscaling algorithms in detail. Chapter 2 gives the background for the research in continental scale river routing in the literature review. The procedure of the double maximum algorithm is provided in the Chapter 3. Chapter 4 shows the algorithm?s results for watersheds from two continents and a comparison to river networks from other algorithms. The conclusion chapter, Chapter 5, shows a summary of the thesis and indicates future work. 9 LITERATURE REVIEW Chapter 2 Global river networks play an integral role in better representing land surface hydrology in general circulation models (GCMs). Including global or coarse scale river networks in GCMs requires the upscaling of fine resolution grids. There are a variety of issues related to resolution for inputs and outputs to their models. The issue of digital elevation model (DEM) and digital terrain model (DTM) resolution in hydrologic model are discussed in this literature review. The previous work in upscaling river networks and the methods of upscaling are introduced. Also, the evolution of the division of the coarse boxes is discussed 2.1 RESOLUTION SENSITIVITIES Two main groups (Quinn et al., 1991 and Wolock and Price, 1994) studied the effects of DTM and DEM resolution on hydrological processes and showed that many are sensitive to resolution. Quinn et al. tested the predictions of the hillslope flow processes of TOPMODEL, a topography-based hydrologic model, with two DTMs, a 12.5-meter and a 50-meter resolution grid. They proved that the spatial patterns of the ln (a/tan? ??distribution calculated from the two DTMs with different resolutions produced varying results. For the ln (a/tan? ? index, a is 10 the cumulative upslope area draining to a point per unit contour length and tan? ?is the slope angle at the drainage point. The model showed higher ln (a/tan? ? values with the 50-meter resolution grid which indicated larger saturated areas. Therefore, the loss of detail with the coarser resolution DTM did affect hydrologic predictions which may be important for global circulation modelers to understand and consider. Wolock and Price tested the effects of map scale and data resolution on the hydrologic predictions of TOPMODEL. Two DEMs with the map scale of 1:24,000 were used with 30 and 90-meter resolutions, and a 1:250,000-scale with 90-meter resolution was also entered into the model. Their results showed that both the DEM scale and resolution affected the predictions of the mean value of the ln (a/tan? ??distributions. The spatial distribution of ln (a/tan? ? shows where water pools in a watershed and indicates the depth to the water table. Specifically, the map scale affects both the mean of the ln (a??distribution, which characterizes the shape of the watershed, and the mean of the ln (1/tan? ) distribution, which characterizes the watershed?s slope. However, the resolution affects only the model predictions of the mean of the ln (a) distribution. 2.2 UPSCALING ALGORITHMS Working directly with resolution issues with upscaling algorithms, three main approaches to extracting fine resolution river network data were created. 11 One approach was defined simultaneously by Fekete et al. (1999) and Kwabena Asante (1998) at the University of Texas at Austin. This approach called the inverse method works with by using the inverse of the fine resolution flow accumulation grid (FAC). First, the flow direction grid (FDR) is created from the DEM. Since the DEM cells each have an elevation value, the direction of land surface flow can be determined from the DEM since water flows in the direction of steepest decent. Next, the FAC is created from the FDR. Each cell in the flow accumulation grid has the value of the upstream cells which flow to it. Therefore, as the river approaches its mouth, the FAC grid values increase. The inverse method calculates the inverse of the FAC cells or multiples them by the power of ?1. Therefore, as the Inverse FAC approaches the mouth of the river, the values decrease and the water can then follow the downhill path. In other words, the values of the Inverse FAC resemble the values in a DEM and the Inverse FAC is a new fine resolution DEM. The upscaling occurs with the inverse method using a scale factor. The scale factor, decided by the user, multiplies the cell size of the inverse of the FAC or the new DEM to obtain the desired resolution for the output grid. A flow direction grid and a flow accumulation grid are created from the coarse resolution new DEM. Then the coarse resolution river network is generated. Fekete et al. illustrated the inverse method, named the WB Re-scaling Algorithm (WBRA), to create a 10, 15, and 30 minute resolution river network 12 from a 5-minute fine resolution DEM for the Danube River basin in Europe. Asante?s program is published on the World Wide Web at http://www.ce.utexas.edu/stu/asanteko/home.html. Both algorithms have the flexibility of inputting any resolution fine scale DEM and any scale factor which will upscale the river network. The resulting river networks for both algorithm have many side flow directions, like stair steps, and few diagonal flow segments. The limitation of this method is that the flow direction for the upscaled box-like areas cannot easily be translated to the vector format of a GCM input. Francisco Olivera (1998) at the University of Texas at Austin created a different resampling approach which introduced the use of the fishnet, http://www.ce.utexas.edu/prof/olivera/CoarseFDr/coarsefdr.htm, Olivera?s algorithm divides the fine resolution grids with fishnet boxes, and flow direction of the boxes is determined by the position of the river?s exit point from each box. Using the fishnet to divide the grids was a helpful concept that was continued in the double maximum method, but the resulting coarse river networks contained mostly flow directions to the sides and very few in the diagonal directions. The third main approach to upscaling was invented by O?Donnell et al. (1999) and provides the most comprehensive approach to date. The algorithm also uses a scale factor which upscales the fine scale grids. Then each coarse scale area is divided into nine equal subsections. The unique part of the method is that the algorithm follows the river network beyond the boundary of each coarse box 13 through the neighboring subsections of the bordering coarse boxes. The flow direction is based on which neighboring area the river mainly flows to. If the river just ?touches? into a neighboring area before flowing across the majority of a second neighboring area, then the downstream area is the second area. Figure 2.1 shows an example of the flow direction for the Coarse Area 10. Though the river flows into Coarse Areas 20 and 21, the downstream area is Coarse Area 11. Figure 2.1 O?Donnell Coarse Areas (Black), Nine Equal Divisions (Red) and the Fine Resolution River Network (Blue) The O?Donnell algorithm produces reasonable results that require few manual edits. A comparison of the resulting river network from the O?Donnell algorithm and the double maximum algorithm is seen in Section 4.3.1 of this thesis. The limitation of the O?Donnell approach is that the algorithm works with 14 square or rectangular boxes and cannot be projected, and the projected environment is important for the land surface hydrology. The contribution of the research presented in this thesis includes two main improvements to the O?Donnell approach. The first improvement is the use of projected coarse boxes, instead of square areas. The second improvement is dividing the coarse mesh boxes into four subsections. The analysis of varying divisions of the coarse cell showed that the four subsections yielded improved results to the nine subsections. 2.3 DIVISION OF COARSE BOXES The uneven distribution of flow directions is not a new problem for hydrologists modeling rivers in digital form, but the issue did initiate an interesting metamorphosis of this upscaling algorithm specifically related to the division of the mesh boxes. The early methodology of the double maximum algorithm (DMA) described in this thesis included dividing the coarse boxes into nine equal parts which created eight sub-boxes along the edge of the main box. This subsection describes the changes from the nine-box division to the double maximum algorithm?s current four-box division. The methodology for determining the flow direction is similar for both the early and the current version of the DMAs. For each case, the maximum flow cell inside of each coarse box was determined, and the placement of this cell was critical in making the flow direction decision. The rivers were also ?tracked? 15 outside of the box by using the maximum flow cells of the secondary or dividing mesh. The difference in the earlier DMA was that not all of the rivers or tributaries were tracked. Of the nine sub-boxes, four of them intersect with only one side of another coarse box. For the maximum flow cells which were located in one of these sub-boxes, the flow direction which the number is associated was given to the box. Using the same numbering convention as the eight pour-point model, the four sub-boxes that share a side with just one other coarse box are 1, 4, 16, and 64 as seen in Figure 2.2. For the maximum flow cells that were located in either of the sub-boxes 2, 8, 32, or 128, the position of the secondary maximum flow cell was examined. The flow direction was determined by which neighboring box the secondary maximum flow cell was placed. The division of the earlier algorithm is shown in Figure 2.2 with the sub-boxes in dashed lines and numbered the same as the eight direction pour-point model. The example coarse box is shown as a solid line. 16 Figure 2.2 An Example of the Early Division of the Coarse Mesh Boxes The flow direction distribution from this nine-box division displayed a skew towards the sides. In an attempt to achieve even flow direction distribution the dividing mesh was changed from dividing the boxes into nine even parts to making the side sub-boxes (1, 4, 16, and 64) smaller. This ?squeezing? of the sub- boxes was conducted in a series of steps of which each one shortened the length of the side sub-boxes. The percentages of flow directions to the sides and corners remarkably stayed constant despite the length of the side sub-boxes. The examples of the progression of steps to decreasing the sub-box size are seen in Figure 2.3. The dashed lines represent the secondary dividing mesh while the box with the solid lines is one of the coarse mesh boxes. 17 Figure 2.3 Two Steps in the Progression of the Squeezing the Side Sub-boxes Though the flow direction bias was not resolved, the squeeze progression ultimately led to the division of the boxes into four even sub-boxes with statistically similar though biased results. 18 METHODOLOGY Chapter 3 This chapter is divided into six main sections, with an introductory section and each subsequent section describing a portion of the double maximum algorithm for upscaling river networks. The first section provides an overview of the algorithm?s methods. The second section describes the user inputs and the files required to run the algorithm. The upscaling process of the algorithm is explained in the third section. The fourth section describes translating the upscaling information from the raster format to the vector format in order to form the coarse resolution river network. The fifth section provides a description of the steps necessary to include the sinks, the inland catchments and the continental margin, in the river network. The final steps for the creation of the river network are given in the sixth section. 3.1 OVERVIEW OF THE DOUBLE MAXIMUM ALGORITHM The method for upscaling river networks from fine to coarse resolution described in this thesis is called the ?double maximum algorithm? (DMA). The main concepts of the algorithm are presented in this section and illustrated in Figure 3.1 with an example from a portion of the Niger River in West Africa. Starting with the fine resolution DEM, flow direction and flow accumulation grids 19 are calculated. The flow accumulation grid, as seen in Figure 3.1a, represents the river as a sequence of cells where each cell has a value of the number of upstream cells which flow to it. Therefore, the cells in the main channel of the river have increasing values as they reach the mouth of the river. The fine resolution grids are the input portion of the algorithm. The framework for the coarse resolution network is the mesh, Mesh A, previously described in Section 1.1, which covers the area of the grids is shown in Figure 3.1a for the continent of Africa. The goal of the algorithm is to determine the flow direction that best represents the direction of the river or rivers in each of the Mesh A boxes. This goal is accomplished with the use of two meshes. A second mesh, Mesh B, with the same resolution as Mesh A is placed over the grid but it is offset from Mesh A by half of the length and half of the height of its boxes as seen in Figure 3.1a. As a result, Mesh B ?divides? the boxes of Mesh A into four sub-sections which is different than O?Donnell et al.?s nine subdivisions. 20 21 The next series of steps introduces the approach to extracting high resolution hydrography information. First, both meshes are intersected with the edges of the grid as seen in Figure 3.1b. With the intersected meshes placed over the flow accumulation grid, the location where the river or stream flows from each mesh box is determined. This exit location is defined by the fine resolution cell per box with the highest flow accumulation and is called the river exit cell. The river exit cell is found for each box in both meshes. An example of the both meshes and their river exit cells is shown in Figure 3.1b. The size of the cells is increased for visibility in the figure. The boxes of Mesh B create regions where the river can be tracked after it exits each of the Mesh A boxes. The reason for tracking the river beyond the boundary of the box is to provide a better representation of the river?s direction after it flows from the box. Because the mesh is placed arbitrarily over the DEM, the river may flow through a small portion of a neighboring box in Mesh A before flowing across the main portion of a different neighboring box in Mesh A. In another case, the river may flow across the main portion of the first neighboring box that it encounters. With the secondary mesh, the downstream box in both scenarios will be the box which the river crosses a main portion of. To accomplish tracking the river, the position of the river exit cells for Mesh B play a key role. 22 23 An example of the method in which the flow direction for the Mesh A boxes is determined is illustrated in Figure 3.1c. First, the quadrant of the Mesh A box where the river exit cell falls is noted. In this example, the river exit cell for Box A1 is located in its southeast quadrant. Next, the Mesh B box where the Box A1 river exit cell is inside of is located which is Box B1 as seen in Figure 3.1c. The river exit cell for the Mesh B box is located inside of a different Mesh A box which is the downstream box for the sample Mesh A box. The downstream box for Box A1 is Box A2, therefore the flow direction of Box A1 is southeast to Box A2. The same flow direction determination process is applied to each box in the original coarse resolution mesh. The direction for the rivers in each of the Mesh A boxes for Africa is shown in Figure 3.1d. The flow directions make up a coarse resolution river network. 24 25 26 3.2 USER INPUT AND COARSE MESH GENERATION The double maximum algorithm (DMA) was written in Arc Macro Language (AML), the programming language of the GIS software, ArcInfo. The algorithm requires two GIS files and one text file as inputs and can be executed when these files and the algorithm file are located in the working directory of ArcInfo. The DMA extracts river networks from any fine resolution and upscales to any coarse resolution specified. The example in this thesis includes upscaling a 1- kilometer flow direction grid to a 2.8125? x 2.8125? mesh. This coarse resolution was chosen with the goal of using the river network in the land component of the National Center for Atmosphere Research general circulation model. Two fine resolution grids for a continent or a large watershed are a critical component required to run the DMA. These are the flow direction and flow accumulation grids, which are extracted from the processing of a digital elevation model (DEM). The 1-kilometer grids described in this thesis were created from the GTOPO30, which is the finest resolution DEM currently available for the world. The DEM is available from the United States Geological Survey and can be downloaded from the World Wide Web at http://edcwww.cr.usgs.gov/glis/hyper/guide/gtopo_30. The DEM should be processed according to the Jenson & Dominigue (1988) method for filling depressions and creating flow direction (FDR) and flow accumulation (FAC) 27 grids. The user is prompted to input the names of the FDR and the FAC grids. See Appendix B for a detailed explanation of the input requirements. The two grids are the only GIS files required for the algorithm. The other required inputs are related to the resolution of the final river network and its projection. The resolution of the coarse river network is decided by the user and is entered as a set of inputs when the algorithm is initiated. The algorithm generates a coarse resolution mesh, Mesh A, from the mesh parameters given by the user. Two main inputs must be provided to describe the coarse mesh. Those inputs are 1) the parameters for the mesh and 2) a projection file. The first input describes the orientation, resolution, placement, and size of the coarse mesh. The coarse resolution meshes in this thesis are 2.8125? x 2.8125? and are created in geographic coordinates using the generate/fishnet series of commands. The user is prompted to input eight parameters for the mesh. The recommended parameters for making a north-south oriented mesh for each continent are given in Appendix C. An example of the input parameters is shown in Table 3.1 with values for the continent of Africa. 28 ArcInfo Prompt User Input Fishnet Origin Longitude -20.00 Fishnet Origin Latitude -38.00 Y-Axis X-Coordinate -20.00 Y-Axis Y-Coordinate 32.00 Cell Length 2.8125 Cell Height 2.8125 Number of Rows 28 Number of Columns 29 Table 3.1 Coarse Mesh Parameters for Africa An important characteristic of the coarse mesh is that it extends beyond the border of the continent or large watershed. An example of a mesh extending over the land surface is shown in Figure 3.2 for the African continent. 29 Figure 3.2 Geographic Coarse Mesh Overlaid on the Watersheds of Africa The second main input necessary for the algorithm is the projection file. The mesh is created in geographic coordinates and must be projected into the same projection as the input grids. The example in this thesis uses the Lambert- Azimuthal Equal Areas projection for which each continent has specific latitude and longitude projection parameters. The origin of projection parameters is the United States Geological Survey Earth Resources Observation Systems Data Center?s Hydro1K data available for each continent from the World Wide Web at http://edcdaac.usgs.gov/gtopo30/hydro. The parameters are in Lambert-Azimuthal 30 projection and are provided for each continent in the Appendix D. An example of the file for Africa is shown here in Figure 3.3. INPUT PROJECTION GEOGRAPHIC UNITS DD PARAMETERS OUTPUT PROJECTION LAMBERT_AZIMUTH UNITS METERS PARAMETERS 6378137.00000 20 0 0 5 0 0 0.0 0.0 END Figure 3.3 Projection Parameters for the ArcInfo Projection Command for Africa Projecting the coarse mesh is an important component of the algorithm. Since the working environment becomes projected, then the land area is preserved which is important for applications in land surface hydrology. The projected mesh is shown here with the projected watersheds of Africa in Figure 3.4. 31 Figure 3.4 Projected Coarse Mesh Overlaid on the Projected Watersheds of Africa The following steps require no additional input by the user though their result plays a critical role in the upscaling portion of the algorithm. This step involves creating a second coarse resolution mesh, Mesh B. The algorithm uses the inputs provided for Mesh A to create Mesh B. Mesh B is created in the same resolution as Mesh A though its placement is different. Offset by one half of Mesh A?s length and height, Mesh B appears to divide the Mesh A boxes into four parts when the two coverages are overlaid. The second mesh and its division of the original mesh help determine the flow direction of the coarse boxes which is described in detail in Section 3.3. The second mesh is longer and wider than the 32 original mesh by one row and one column respectively. The second mesh is also projected. Both coarse meshes are shown in Figure 3.5 with the first coarse resolution mesh displayed as bold dark blue lines and the second mesh shown as red lines. Figure 3.5 A Portion of Two Projected Coarse Meshes The user input for the algorithm includes only the parameters for the first coarse resolution mesh since the second mesh is created depending on the first. The names of the grids and the projection file and the first coarse resolution mesh characteristics are the only user-input variables. The algorithm continues to run to completion without any other input from the user. 33 3.2.1 Rotated Coarse Mesh The flexibility of the DMA includes more than its ability to upscale any resolution of flow direction and flow accumulation grids to any coarse resolution river network. The DMA can also create the coarse river network in any orientation. Because the meshes are created with user inputs and the generate fishnet command includes orientation parameters, then a rotated coarse river network is simple to extract using the DMA. Though climate models meshes are usually north-south in orientation, the versatility of the algorithm allows for the relatively easy creation of a rotated network. As an evaluation technique to examine flow direction distributions, river networks were created from meshes with a 45? rotation and compared to the perpendicular networks. The comparison, discussed in Section 4.2.1, can provide an understanding of the robustness of the DMA. A few minor modifications to the algorithm are needed in order to create a river network with a rotated mesh. The variables for creating Mesh B in relation to Mesh A are changed. For a rotated river network, the position of Mesh B also divides Mesh A into quarters but the offset direction is different. Appendix A shows the code for Section One for a rotated mesh, and the User?s Guide to Section One describes the inputs necessary for a rotated mesh in Appendix B. After the meshes are created, the procedure of the algorithm is exactly the same regardless of mesh orientation. The complete rotated mesh for Africa and its watersheds are seen in Figure 3.6. 34 Figure 3.6 Geographic Coarse Mesh Overlaid on the Watersheds of Africa 3.3 UPSCALING PROCESS The critical steps of the upscaling process occur in this section of the algorithm. The ArcInfo commands and the grids which they form are described in Section 3.3.1. For clarification of the upscaling procedure, an example of how flow direction is determined for three different flow direction scenarios for one coarse box is given in Section 3.3.2. 35 3.3.1. Algorithm Steps Once the coarse meshes have been created, the algorithm begins the upscaling process. As the first step of the upscaling process, the algorithm moves to the grid mode of ArcInfo where most of the steps in this section are performed. Grid is the cell-based geo-processing tool of ArcInfo and requires an analysis environment and cell size to be declared. The flow direction grid serves both of these functions. A polygon coverage called BORDER is created which covers the same extent as the flow direction grid. For the African continent, the BORDER coverage is shown in Figure 3.7. Figure 3.7 BORDER Coverage of the Flow Direction Grid Extent Next, the meshes, which are called PRONET and PRONET2, are each intersected with the BORDER coverage. This intersection is important in making 36 the coarse meshes cover the same area as the grids. The intersected meshes are called PROJECTNET and PROJECTNET2 or Mesh A and Mesh B respectively and are used throughout the algorithm. Mesh A is shown in Figure 3.8 for Africa. Figure 3.8 Intersected Polygon Coverage of Coarse Mesh over Africa After the coverages are intersected, they are converted into grids with the same resolution as the DEM and input grids which are 1 square kilometer cells for this thesis. In other words, the coverages, PROJECTNET and PROJECTNET2, are converted into grids called PROJECTGRID and IDGRID. This conversion allows for the transfer of flow direction information between grids. In the grid format, more than 100,000 fine cells represent each coarse mesh box and carry the same coarse box identification number, which is PROJECTNET# for Mesh A. 37 This identification number is key in the upscaling process, switching from high to low resolution. The conversion of the projected meshes to grids (i.e., PROJECTNET to PROJECTGRID) is interesting to note. Since the coarse meshes are projected, they are not perfect squares nor are all the boxes the same shape. The transformation of the mesh to the grid creates a grid which does not correspond exactly to the projected mesh. The fine cells along the border of the mesh boxes get the identification number of the box of which they are inside the majority. An example of the ?jagged? representation of the coarse boxes is shown as a zoomed- in view of the border of two boxes in Figure 3.9. The jagged edge does not introduce any problems for the algorithm. Figure 3.9 Example of Two Boxes and Their Representation in Grid Format The zonalmax command is a powerful tool in transferring information from grid to grid and is used throughout this section in this algorithm. The flow accumulation grid is used in conjunction with the zonalmax command in the next step. The zonalmax command determines the cell with the maximum flow 38 accumulation value for each group of fine cells in a given coarse box or with the same coarse box identification number. The river exit cell is located where the river exits the coarse box and is called the ?river exit cell?. The command is performed on both meshes and the new grids, MAXFAC and MAXFAC2, are created. The river exit cells are almost always located on outside border of the coarse boxes with one exception. The exception is for inland catchments, or lakes that do not flow to the ocean, which have the river exit cell located somewhere inside of a coarse box. Inland catchments will be discussed in further detail in Section 3.5. To further distinguish the river exit cell in each coarse box, a conditional statement follows the zonalmax command. For MAXFAC, which represents Mesh A, the value from the flow direction grid is assigned to the river exit cells while all other cells receive the value of zero. This grid is called POURPOINTS because the river exit cell indicates where the river or stream exits or pours from the box. The values of the POURPOINTS grid are taken from the eight-direction pourpoint model and are labeled 1, 2, 4, 8, 16, 32, 64, and 128 for East, Southeast, South, Southwest, West, Northwest, North, and Northeast respectively. A depiction of four coarse boxes with their river exit cells is shown in Figure 3.10. The size of the cells is exaggerated for the figures in this chapter since the actual cells in a view with the boxes are too small to locate. The gray numbers indicate the identification number of the coarse boxes. 39 Figure 3.10 Example of Fine Resolution River Network in Coarse Boxes (Left); River Exit Cells for the Coarse Boxes (Right) The second mesh, Mesh B, plays an important role in the upscaling procedure since it ?tracks? the river once it leaves the boxes of Mesh A. The conditional statement following the zonalmax command for the second grid, MAXFAC2, which represents Mesh B, assigns the value of the first coarse box identification number to the river exit cell. Again, all cells that are not the river exit cells receive a value of zero. For MAXFAC2, the river exit cells are distinguished form the zero value cells with a conditional statement. This conditional statement for the creation of the POURPOINTS2 grid is a key component of the upscale process. The cells in POURPOINTS2 with one of the eight-direction values indicate where the river or stream exits each box of Mesh B. As a result, the two pourpoint grids show the fine resolution cell where the river exits the box for each coarse box of both 40 meshes. The second mesh accounts for the name of the double maximum algorithm. For clarification, the main distinction between the two pourpoint grids is described here. The first pourpoint grid, POURPOINTS, contains the river exit cells for the grid representation of Mesh A. The values of the POURPOINTS non- zero cells are one of the eight-direction pourpoint model numbers from 1 ? 128. For Mesh B, the second pourpoint grid, POURPOINTS2, contains the river exits cells which each have the value of the Mesh A box where it is located. In other words, the value of the river exit cells in the POURPOINTS2 grid is the downstream box for the Mesh A boxes. An example of the river exit cells for a portion of the Mesh A and Mesh B boxes is shown in Figure 3.11 with the fine scale river network. The Mesh A boxes are shown with solid black lines and their river cells are black. The Mesh B boxes are depicted with red dotted lines with red cells to mark their river exit cells. The cell value for the river exit cell in Box B60 is A21. 41 Figure 3.11 Mesh A and Mesh B Boxes, Their River Exit Cells, and Fine Scale River Network Using the zonalmax command, a grid called QUADRANT is created with the non-zero POURPOINTS2 cell values distributed to all of the cells within the Mesh B boxes. For the example in Figure 3.11, all of the cells that represent the Mesh B Box B60 are given the POURPOINTS2 value of A21. The helpful part of this distribution is that the non-zero POURPOINTS cells for Mesh A then share the same location as a QUADRANT cell with the downstream box information. For this example, since the river exit cells for boxes A10, A11, and A20 are located in Mesh B Box B60 whose value is A21, then the downstream box for the three Mesh A boxes is Box A21. 42 The next command transfers the downstream box information to Mesh A. The QUADRANT grid cells which all have the downstream box information correspond with the river exit cells for Mesh A and a grid, OUTGRID, is generated with the downstream box information. In other words, OUTGRID is created with a conditional statement which each non-zero POURPOINTS cell is given the QUADRANT value. The QUADRANT value is equivalent to the downstream box of Mesh A. The downstream box information is then distributed to each cell in the coarse boxes with the use of the zonalmax command. This crucial step transfers the downstream box numbers to the centroids of each box, which will be useful since the linking the centroids of upstream and downstream boxes creates the river network. The zonalmax command creates the FLOWZONE grid, which is similar to the grid representation of the Mesh A, PROJECTNET, except that its values are that of the downstream box. The last command in Section Two of the algorithm is a maintenance step. The NODATA cells of the FLOWZONE grid are switched to having a value of zero in a grid called FLOWZONE0. The grid, FLOWZONE0, will be used in Section Three to continue transferring the information to the coarse resolution river network. 43 3.3.2 Explanation of Flow Direction Determination In general, each box has eight neighboring boxes to which water can flow. This algorithm like many others allows for only one downstream box or allows only one flow direction to be associated with each box. Each flow direction has been assigned a number by Jenson and Dominigue (1988). The eight possible directions are shown in Figure 3.12. The directions all are in relation to the center boxes flow possibilities. Figure 3.12 Eight-Direction Pourpoint Model?s Flow Direction Values The position of the river exit cells or pourpoints is the most important factor in determining the Mesh A boxes? flow directions. Since Mesh A?s boxes are divided into four sections by Mesh B, the river exit cells for Mesh A each are located in one of its quadrants. The quadrants of Mesh A and Mesh B?s river exit cells are the deciding factors for the flow direction of the Mesh A. An example with three different locations for Mesh B river exit cells will be described in this section. 44 For each coarse box, there are eight neighboring boxes and therefore eight possible directions for the flow directions. However, each river exit cell for Mesh A falls in just one of the quadrants that is imposed by Mesh B. Hence, for each quadrant there are three neighboring boxes (two with which the quadrant shares a border and one with which it shares a corner) and three possible flow directions. For the example box A10 in Figure 3.13, if the river exit cell is located in the southeast quadrant, then the three neighboring boxes for the southeast quadrant are Boxes A11, A20, and A21. The Mesh B Box B60, with dotted red lines, overlaps with four Mesh A boxes. The four sections of the Mesh B box are labeled here as a, b, c, and d which overlap with Boxes A10, A11, A20, and A21 respectively. Since the Mesh A river exit cell is found in its southeast quadrant and is located in Box B60, then the position of the Box B60 river exit cell is important and will be examined. The Mesh B labels are shown exclusively for this explanation and are not used by the algorithm. 45 Figure 3.13 Quadrant Labels for the Mesh B Box B60 When the river exit cell for Box A10 falls into the southeast quadrant, the three downstream box possibilities are Boxes A11, A20, and A21. For the example in Figure 3.14, the river exit cell for Mesh B in POURPOINTS2 is located in quadrant d of the Box B60. Therefore, the downstream box for Box A10 is Box A21 and its flow direction is 2 according to the eight-direction pourpoint flow model. This scenario, Scenario One, is shown in Figure 3.14. 46 Figure 3.14 Scenario One for the Flow Direction of Box A10 There are two other options of flow direction for Box A10, which are Scenario Two and Scenario Three. The river exit cell of the Mesh B box could fall in quadrant c and then the downstream box would be Box A20 for Scenario Two. If the POURPOINTS2 cell were in quadrant b, then the example box would flow to Box A11 which is Scenario Three. The pictures for the two possibilities are shown below in Figures 3.15 and 3.16. 47 Figure 3.15 Scenario Two for Flow Direction of Box A10 Figure 3.16 Scenario Three for Flow Direction of Box A10 The example with Box A10 shows the situation for boxes which fall completely within the border of the watershed or continent that is being upscaled. For these scenarios, the river exit cell of the Mesh B boxes was always located outside of the Mesh A box. In Section 3.3, the method is described for gathering 48 the downstream information for the boxes which are within the watershed boundary in the vector format. Then, Section 3.4 addresses the inland catchment and continental margin situations, which are both sinks, when the river exit cells of Mesh B fall inside of the Mesh A box that it is exiting. 3.4 DOWNSTREAM BOX INFORMATION FROM RASTER TO VECTOR FORMAT The downstream boxes have been identified by the upscaling procedure of the algorithm in fine resolution and in the grid format. The information must be translated to the coarse resolution in the vector domain. The raster to raster transfer of data is relatively simple with overlaid grids as illustrated in the previous section. The raster to vector formats are not quite as compatible and require more commands to share information. In this section, the steps for transferring the downstream box information from the fine resolution FLOWZONE0 grid to the original coarse mesh, PROJECTNET are described. An AML algorithm, pickgrid.aml (Hellweger, 1997), takes values from grids and places them in the corresponding location in the polygon attribute table of a coverage. For this algorithm, the item that links the downstream box information from the grid to the correct row of the polygon attribute table is the PROJECTNET identification number. First, the x and y coordinates of the centroids of each PROJECTNET box are added to the polygon attribute table. The x and y coordinates play a crucial role in linking the upstream and downstream boxes for the river network 49 coverage. Then, a new field is created in the PROJECTNET polygon attribute table called Downstream. With the polygon attribute table prepared, Arcplot is executed which begins the ArcInfo graphical interface and query program. The coverage, PROJECTNET, is displayed in Arcplot. A cursor is declared in the coverage to enable the values from the FLOWZONE0 grid to be added into the Downstream column of the table. As a reminder, the FLOWZONE0 grid is a fine resolution representation of Mesh A. Each of the cells that make up the coarse box carries the value of the downstream box of the box that it represents. In other words, each cell in the raster form of the coarse mesh includes the PROJECTNET identification number of its downstream coarse mesh box. A DO loop is initiated which locates each coarse mesh box?s centroid and extracts the value of the FLOWZONE0 grid or the downstream box identification number. The number is placed in the Downstream column for the each coarse mesh box and the loop is continued until the cursor finishes with every centroid in the table. The attributes table of the coarse mesh at this point of the algorithm includes the standard ArcInfo columns including an identification number for each original coarse box, the x and y coordinates for the centroid of each box, and the identification number of its downstream coarse box. An example of part of an attributes table is shown here in Figure 3.17. 50 Figure 3.17 Sample Portion of Coarse Mesh Attribute Table This transfer of the raster information to the vector format is the one of the steps in creating a complete coarse river network. The completed steps have addressed only the boxes which fall completely inside the continent or watershed. The next section will pay special attention to the boxes that intersect with the continental margin and which contain inland catchments. 3.5 SINKS : CONTINENTAL MARGIN AND INLAND CATCHMENTS The goal of the algorithm in this section is to identify the x and y coordinates of the river exit cells that are sinks. Sinks can be located either along the continental margin or at an inland catchment. Sinks at the continental margin indicate the mouth of rivers. Inland catchments indicate a lake or depression for a watershed which does not drain to the ocean. Each continent has a few naturally occurring inland catchments, for instance the Great Salt Lake in the United States. The algorithm does not make a distinction between the two types of sinks. 51 Sinks are distinguishable in the polygon attribute table since they are located within the boxes that have the same downstream box number as their box identification number. A few examples of this are seen in the Figure 3.17 from the previous section for PROJECTNET# 3, 5, 10 and 31 boxes. This effect of the box appearing to drain to itself happens for a logical reason and is explained here. The intersection of the coarse meshes and the flow direction grid in the first section results in irregularly shaped boxes along the continental border. The edge of the land surface essentially cuts off the original and secondary coarse meshes. Therefore, in a box along the continental border, the river exit cells for both meshes, the non-zero cells in POURPOINTS and POURPOINTS2, share the same location. An example is shown below in Figure 3.18 for the mouth of the Niger River in West Africa. The solid black lines represent the original coarse mesh boxes and the dashed gray lines are the secondary coarse mesh. The gray cell represents the river exit cells for both meshes. A similar situation occurs for the inland catchments except that their boxes are full-sized. 52 Figure 3.18 Continental Border Box with the Same Location for the River Exit Cells of Both Meshes With the arcedit command initiated, the PROJECTNET polygon is chosen to be edited. The polygon boxes with the same downstream box as their own PROJECTNET# value are selected. A new coverage, EDGEPOLY, is formed with only the selected boxes, which are the boxes which appear to flow to themselves. The EDGEPOLY coverage, the boxes with sinks, is shown for Africa in Figure 3.19. 53 Figure 3.19 Polygons from PROJECTNET that Exit to the Ocean or Inland Catchments Next, the grid mode is initiated to form a fine resolution grid from EDGEPOLY with the cells having the downstream box for their values. A mask is set with the new grid, EDGEGRID, which limits the analysis area for the following steps on the edge boxes and the inland catchments. With a conditional statement, a new grid, POURPTGRD, is created for the boxes which river exit cells for both meshes have the same location. The grid?s values are POURPOINTS2 values for every cell with a non-zero POURPOINTS value. 54 The non-zero values cells are the sinks and a point coverage is created from the POURPTGRD grid called EDGEPOINTS. The x and y coordinates of the sinks are added to the EDGEPOINTS polygon attribute table because they need to be included in the river network. From the mouth of the Niger River example, Figure 3.20 shows that the EDGEPOINTS coverage has a point where the river exit cells are located. Figure 3.20 EDGEPOINT Coverage at the Mouth of the Niger River in West Africa An example of the point coverage of the river exit cells for Africa is given in Figure 3.21. 55 Figure 3.21. Sinks for the Continent of Africa Since the transfer of information from grid to grid and from grid to polygon is complete, a few maintenance commands are performed here. Fine resolution grids can be extremely large and many of them are not needed after this section. Therefore, the unnecessary grids and coverages are deleted with a kill statement. 56 3.6 COARSE RESOLUTION RIVER NETWORK The ultimate result of the DMA is the coarse resolution river network. The downstream box information is completely in the polygon format. The information needs to be consolidated and written to a line input file to create the river network. A few preparations of the data are required. First, the x and y coordinates of each original box, each downstream box, and each sink are joined into one polygon attribute table. The PROJECTNET table is joined with a copy of itself for the original box and downstream box coordinates. The sink coordinates are obtained from joining the EDGEPOINTS table with the PROJECTNET table. The names of the columns with the same titles are renamed so that they do not get overwritten. Now, the downstream and sink information is in the same attribute table. To create the river network or line coverage of the river network, the ArcInfo command generate is used. The format that the generate command uses is a number of a line segment, an x and y coordinate for the upstream node, an x and y coordinate for the downstream node, and the word ?end?. A sample for this type of file is shown here in Figure 3.22. 57 7 -2439332.25 , 3868970.50 -2469909.75 , 3700791.25 END 8 2330810.50 , 3856037.00 2574468.25 , 3886034.00 END 9 -2194514.00 , 3840776.00 -2469909.75 , 3700791.25 END Figure 3.22 Example of Input File for Generate/Line Command 58 As previously stated, all of the coordinates are contained within the PROJECTNET attribute table and must be extracted and written to the text file to be used for the generate line command. A DO loop is initiated to extract the coordinate data. The boxes, which fall completely inside the continental border, have a different downstream cell value than their own identification number. Their x and y coordinates are taken accordingly for the upstream node, the center point of the original box, and the downstream node, the center point of the downstream box. For the edge boxes, their identification numbers match their downstream box numbers and can be distinguished by an if statement from the other types. For the boxes with the same downstream value as their value, the EDGEPOINTS x and y coordinates are used for the downstream node. The write statement makes the text file for the line coverage is part of the DO loop. When the algorithm has a successful run, it has created a river network file called RIVERS that links the centroids of the coarse mesh boxes. From the example of the mouth of the Niger River in Figures 3.18 and 3.19, the river network result is shown here in Figure 3.23. 59 Figure 3.23 River Network and Coarse Mesh for Mouth of Niger River 60 RESULTS AND DISCUSSION Chapter 4 In this chapter the results of the double maximum algorithm (DMA) are displayed and analyzed. The strengths and weaknesses of the algorithm are discussed. Comparisons are made between river networks extracted by the DMA and those resulting from two other upscaling methods. The contributions and limitations of the double maximum method are also discussed. 4.1 DOUBLE MAXIMUM ALGORITHM APPLICATIONS The DMA produces a line coverage of the coarse scale river network for any continent or watershed for which the required input is provided. The user chooses the resolution of the river network. Initially, with the user?s input, a coarse resolution mesh is created which covers the continent or watershed. The links made between the centroids of the upstream and downstream boxes of the mesh form the coarse resolution river network. Each box has a single downstream box or one flow direction associated with it. The coarse resolution river network for Africa is shown in Figure 4.1 for the coarse mesh parameters provided in Appendix C. The figure is produced from a display in ArcView which is a user friendly way to view coverages and grids created in ArcInfo. The black boxes represent the coarse resolution mesh, and the line coverage of the river network is shown in blue. 61 Figure 4.1 Coarse River Network and Coarse Mesh for the African Continent One advantage to the DMA is the incorporation of the mesh, which was created in geographic coordinates and translated to the projected environment for the execution of the program. With the river network as seen in Figure 4.1, the mesh can be projected back into geographic coordinates. Since the input parameters control the position of the mesh, the placement of the mesh can be 62 created to correspond directly to the placement of the GCM boxes with the same number system. Therefore a transfer of the information of each box?s downstream box to a GCM database is easy. Also, the resolution of the GCM can also be correlated to match the coarse river network from this algorithm. For clearer distinction of the rivers, an alternative method for dividing the land surface is accomplished with watershed boundaries. The same river network is shown in Figure 4.2 with the major watersheds of Africa. The outlines of the watersheds are shown in red, and the river network is shown in blue. 63 Figure 4.2 Coarse River Network with Watershed Boundaries for the African Continent Viewing the results by continent, the river networks for the large watersheds are mostly located within the watershed boundaries even at this large scale of 2.8125? boxes or approximately 90,000-km2. This close representation is impressive considering the large scale of the mesh and that the naturally shaped watershed boundaries do not correspond to the mesh. The smaller watersheds that have an area less than one box or which are split by the arbitrarily placed mesh 64 sometimes are represented as flowing into neighboring watersheds. These issues are discussed in Section 4.5. For a more detailed investigation of the algorithm?s results, a portion of West Africa?s watersheds are examined. The longest river network shown in Figure 4.3, which represents the Niger River, follows the overall direction of the river. The Niger?s headwaters fall on the Fouta Djalon region of Guinea in the southwestern part of the watershed. Flowing northeast into Mali, the river reaches Timbuktu as its northernmost point and turns south through the desert in Niger until it reaches the Atlantic Ocean in Nigeria. The connectivity of the river network is complete except for one box?s river segment near the mouth of the river. This separate segment represents a small river which is not part of the Niger River but part of its watershed. The river network is contained almost entirely inside of the watershed boundary with the exception of the narrow part of the watershed in the western region. The river networks for the smaller watersheds in the area fall less distinctly within their boundaries. A few of the smaller watersheds have joined together and share an outlet to the ocean. The Niger River and smaller watershed are shown in Figure 4.3. with the same convention as the other figures with watershed boundaries shown in red lines and river networks shown in blue lines. 65 Figure 4.3 Coarse Resolution Representation of Niger River with Watershed Boundaries In contrast to the more accurate Niger River network, the South American river networks are an example of a problem with the algorithm. Though the Amazon River flows within its borders, a neighboring watershed is included in the outflow. Because the mouth of the Tocantin/Araguaia river is located very close, within one coarse box length, to the mouths of the Amazon, the two river networks are joined. This amalgamation occurs since the maximum flow cell of the boxes in the outlet region has a higher value for the Amazon River than the smaller neighboring river. The Amazon River provides thirty percent of the world?s fresh water input from rivers to the oceans, and the input from the significantly sized river system, Tocantin/Araguaia, would increase this runoff 66 value. The South American river networks are shown in Figure 4.4 with the same color convention as Figure 4.3. Figure 4.4 Amazon and Tocantin/Araguaia River Networks with Watershed Boundaries 4.2 ANALYSIS OF DOUBLE MAXIMUM ALGORITHM In this section, the algorithm is examined in more detail. First, the versatility of the algorithm is described in Section 4.2.1. Then, the flow direction distribution is discussed in Section 4.2.2. 67 4.2.1 Rotated Coarse Mesh Two of the strengths of the DMA are its ability to create river networks from a coarse mesh with any resolution and any orientation. The river networks and meshes shown previously all had the same 2.8125? resolution and the same north-south or perpendicular orientation as the grids. With the same resolution and grids at their north-south orientation, the algorithm was also executed with rotated meshes. The river network created from a mesh with a 45? rotation for Africa is seen in Figure 4.5. The variable orientation of the mesh is helpful since it is unique to this algorithm and it can be used to test or compare the algorithm?s results. From the Figure 4.6, the river network is displayed with the watershed boundaries and the accuracy of the placement of the rivers is acceptable. 68 Figure 4.5 Coarse River Networks and Rotated Coarse Mesh for African Continent 69 Figure 4.6 River Networks for Africa from Rotated Mesh shown with Watersheds The main similarity between the river networks created with perpendicular and rotated meshes is that the river network placement of the large watersheds is clear for both mesh orientations while the smaller basins become integrated into neighboring watersheds. Another similarity is the uneven flow direction distribution which is discussed in the next subsection. The closer view of part of West Africa in Figure 4.7 reveals a well-placed Niger River. 70 Figure 4.7 Niger River Network with Watersheds 4.2.2 Flow Direction Distribution The flow direction distribution of the coarse river network is uneven as there are more river segments exiting the boxes from the sides than from the corners. From the eight pour-point model, there are twice as many flow directions of 1, 4, 16, and 64 than flow directions of 2, 8, 32, and 128. This unbalanced distribution is logical considering the flow direction determination process for corner boxes. For every box, regardless of the quadrant where the river exit cell is located, there are two neighboring side boxes and one neighboring corner box as options for the downstream box. The two to one ratio is seen directly in the flow distribution. 71 In this thesis, the flow segments that connect the boxes that share a side are called sides, and they correspond to the flow directions 1, 4, 16, and 64 from the eight direction pour-point model. The flow segments that direct water to one of the four boxes that touch the boxes at the corners are called corners and they correspond to the flow direction 2, 8, 32, and 128 from the eight pour-point model. A rotated box and its corresponding flow directions are seen in Figure 4.8. Figure 4.8 Eight Pour-point Model Illustration of Rotated Mesh Directions With this understanding of the side and corner directions, the values for the perpendicular and rotated river networks can be presented. For both the African and South American continents, the flow direction distributions are 72 similarly skewed towards the side directions. Table 4.1 displays the flow direction distribution values for the two continents. Continent Orientation Percentage of Sides Percentage of Corners Africa Perpendicular 65.2 34.8 Africa Rotated 45? 67.9 32.1 South America Perpendicular 64.8 35.2 South America Rotated 45? 62.2 37.8 Table 4.1 Flow Direction Distributions for Two Continents The uneven flow direction distribution is present regardless of the mesh orientation. Other factors that seem not to influence the flow direction distribution are topography and mesh resolution. The continents of Africa and South America represent a great variation of land surface topography from the flat Pampas region of northern Argentina to the headwaters of the Congo River in the Ruwenzori Mountains in eastern Zaire. From a test of three main African watersheds with a 0.5? mesh, the uneven flow distribution was also evident. 4.3 EVALUATION AND COMPARISON TO OTHER RIVER NETWORKS This section examines the DMA?s results with other upscaling method results. A different upscaling algorithm called the flow generation algorithm (O?Donnell et al., 1999) is presented in Section 4.3.1. A ?manual? river network 73 created from the visual inspection of the digital rivers was compared to the double maximum method in Section 4.3.2. Lastly, the observed river network from the Digital Chart of the World is observed with the double maximum river network. 4.3.1 Flow Generation Algorithm The first river network to be compared with the DMA is the result of an upscaling algorithm developed by O?Donnell et. al. This ?flow generation? algorithm can be executed for only one watershed at a time with one input, a flow accumulation grid. Like the double maximum method, the algorithm can also be run with varying coarse resolutions for the output river network. The flow generation algorithm uses a scaling factor instead of a mesh and the scaling factor creates square or rectangular areas which are not projected. Therefore, the river network from the flow generation algorithm does not correspond to the same mesh as the DMA. The river networks can be created from roughly the same lower left hand corner and correspond well enough to be used in comparison. The river networks from the flow generation algorithm and the DMA are seen below for the Niger River in Figure 4.9. 74 Figure 4.9 Niger River Network from the Flow Generation Algorithm (Left) and the DMA (Right) Though the same flow accumulation grid was used for each run, the river networks look different because of their different approaches. The river network created from the flow generation algorithm includes areas from outside of the river basin as delineated from the USGS processed digital elevation model. Since the algorithm only processes one watershed at a time, the regions with any flow accumulation cells with a non-zero value were integrated into the river network. The flow direction distribution is skewed towards the side directions more so than in the double maximum river network with 84 per cent of flow towards the sides and only 16 per cent of the flow to corner boxes. A comparison is seen in Figure 4.10 for the Congo River basin. Clearly, both rivers represent the water the flows in the basin well, but the DMA produces many more diagonal flow segments. 75 Figure 4.10 Congo River Network from the Flow Generation Algorithm (Left) and the DMA (Right) 4.3.2 Manual River Networks The next river network to view with the double maximum method is called the ?manual? river network because there is no program used to create the results. The river network is made from a visual inspection of the flow accumulation grid and the projected mesh. To determine the flow direction manually, the neighboring box whose river or tributary had the highest flow was examined. If the river meandered through a small portion of a box before flowing through the majority of the next neighboring box, then the second box in this description was chosen as the downstream box. The boxes along the continental margin which contain ocean outlets were not included in the manual river network. 76 The manual river network is almost identical to the DMA river network. The network for the African continent is seen in Figure 4.11. Both the manual and the DMA river networks for the Niger River are shown in Figure 4.12. The manual segments, in green, that differ from the DMA network, in blue are displayed together. Figure 4.11 Coarse River Network from Visual Inspection of Flow Accumulation Grid for Africa 77 Figure 4.12 Manual (Green) and Double Maximum (Blue) River Networks with the West African Watersheds 4.3.3 Observed Data River Networks The best way to compare the river network is with the real river or the best representation of the real river. The observed data from the Digital Chart of the World which is available for downloading from the website at http://www.maproom.psu.edu/dcw/. The river network is one of many themes that constitute the Digital Chart of the World. With the benefit of the fine resolution, the river cells appear more like a naturally meandering river than the straight lines from the algorithm. The river networks are shown together in Figure 4.13. For the 78 Niger River especially, the placement of the DMA?s coarse river network to the observed data are very similar. Figure 4.13 Digital Chart of the World Fine River Network (Green) with DMA River Network (Blue) for Niger River Basin 4.4 CONTRIBUTIONS The double maximum approach to resampling fine scale resolution grids to coarse resolution boxes produces the best representation of the flow of water over the land surface accomplished to this date. Compared to other existing techniques, the DMA makes three significant and innovative contributions to the modeling of land surface hydrology. The first contribution is the use of a 79 projected coarse resolution mesh, and the second contribution is the ability to change the orientation of the mesh. The division of the coarse boxes into quarters to aid in determining the flow direction is the third contribution to acknowledge. This section describes the three contributions. 4.4.1 Projection of Coarse Mesh Traditionally, upscaling algorithms have used the coarse resolution template of the general circulation models (GCMs). The GCM formats are either a mesh of square boxes or they are in geographic coordinates. Since geographic coordinates do not preserve land area, land surface hydrologists must work in a projected environment for more accurate predictions of flow length which greatly influence river routing. The main difference with the introduction of a projected mesh is that the ?curved? mesh lines do not correspond with the north-south orientation of the grid cells. As described in Section 3.3, some cells are located partly in two mesh boxes. For these cases, the cell is given the identification number of the box of which it is in the majority. This automatic decision making by ArcInfo works fine for the DMA and requires no adjustments to account for the use of non-perpendicular mesh. For the examples in this thesis, the mesh projections used were the same projections as the grids and were defined per continent. 80 4.4.2 Orientation of Coarse Mesh The flexibility of the DMA to create meshes of varying orientation is the second main contribution. The use of the mesh instead of a scale factor allows for this control since the mesh properties required the angle of the mesh as input. The other variables of the mesh include the resolution, the shape (square or rectangle), and the placement of the mesh. Therefore, the adjustment of the orientation is yet another measure available for the user to exercise their mesh freedom. 4.4.3 Division of Coarse Boxes The third contribution is its division of the coarse boxes into quarters. For methods which did divide upscaling areas, the coarse boxes have been divided into nine smaller and equally sized parts which correspond to the eight bordering boxes of the eight pour-point model. The DMA divides the coarse boxes into four equal sections with the same results as the nine-part division. The implications of this finding show that the division of the boxes from nine to four does not significantly affect the results. 4.5 LIMITATIONS The two main limitations of the DMA have been mentioned in this chapter. The limitations are the flow direction bias and the small watershed integration to larger watersheds. This section includes possible solutions for the two issues. Since the suggested solutions may help either or both problems, they will be discussed simultaneously. 81 4.5.1 Suggested Solution for the Integration of Smaller Watersheds One possible solution involves further tracking of the rivers from the boxes. In the current method, the river is followed outside of the boxes with the secondary mesh boxes. The ?smarter? tracking of the river could eliminate the integration of watersheds and would work as follows. The current method simply finds the maximum flow cells in each box of the original and secondary meshes. The secondary mesh maximum flow cell may be along a different river or tributary than the first maximum flow cell. Therefore the place where the majority of the water in the region of the box is taken into account but the river being tracked may be switched. For example, in one of the boxes in the Congo River basin, the tributary exits Box #2187 as seen in Figure 4.14a and flows into the north neighboring bow before flowing into Box #2124. But the downstream box assigned to Box #2187 was Box #2189, the box directly west of the example box. The explanation for this ?wrong? direction is that the tributary that exited Box #2187 with the highest flow has a smaller maximum flow cell than the rivers in the secondary box for the region as seen in Figure 4.14b. Therefore the flow direction could have been to the northeast while it actually changed to true west from the influence of the higher flow accumulation of the main channel. 82 Figure 4.14 a) Fine River Network with Assigned Flow Direction in Blue b) Fine River Network with Maximum Flow Cells in Green for Tributary 83 4.5.2 Suggested Solution for the Uneven Flow Direction Distribution The geometry of the eight bordering boxes for every box allows for the uneven distribution of the flow directions. The four side boxes have an automatic advantage to being chosen over a diagonal box. The reason is that for each box there are two chances for its secondary maximum flow cell to be placed in a side box and only one for it to be in the diagonal region. This leads to the idea of changing the shape of the mesh to find a more even flow distribution. The polygons of the mesh, which is overlaid on the watershed, could be a different shape. The octagon shaped could be created with a north-south and rotated mesh. Then the length of box for the maximum flow cell to fall would be equal as seen in Figure 4.15. Then the rotated mesh could be used for the secondary mesh and more diagonal directions would be obtained. Figure 4.15 Examples of Octagon Mesh Formations 84 CONCLUSIONS Chapter 5 The land surface component of the hydrologic cycle is an integral part of global-scale hydrological and climate models. With the advancement of satellite technology, the river networks that describe the land surface flow can be created for the world at increasingly finer resolutions, for example the GTOPO30 with 1- kilometer grid cells. However, the global-scale climate models work with coarse resolutions, for example 2.8? boxes. Therefore, a methodology is needed to resample the fine resolution flow direction data into coarse resolution to be applied in climate models. In this thesis, an algorithm that was developed for resampling called the double maximum algorithm (DMA) is described and evaluated. The resulting coarse resolution river network, shown in blue, for a portion of West Africa is illustrated with the input fine resolution river network, shown in red, in Figure 5.1. 85 Figure 5.1 Fine Resolution River Networks (Red) and Coarse River Networks (Blue) for West Africa Evolved from the resampling program by Olivera (1998), the DMA is written in Arc Macro Language for the GIS software, Arc Info, Version 7, and integrates the use of the coarse resolution mesh in its upscaling methodology. First, the fine resolution digital elevation model (DEM) is used to create flow direction and flow accumulation grids. Then the coarse resolution mesh, a polygon coverage, is overlaid onto the grids to divide the land surface into coarser boxes. Though the use of the mesh has advantages, the upscaling process is challenging because the flow direction information is translated between the grid and the coverage formats. By converting the coverages into grids, the algorithm?s translation process is achievable. 86 The three contributions to upscaling that the algorithm introduces are 1) that the coarse resolution mesh can be projected, 2) that the orientation of the mesh can be changed and 3) that the mesh boxes are divided into four equal parts. The contributions are discussed further as their impacts show the strengths and limitations of the algorithm. The coarse resolution mesh is created in geographic coordinates and is projected into the same projection as the input grids. The importance of the projection is the connection that it makes between climate models and land surface hydrology. The climate models work with a mesh in geographic coordinates to communicate with the atmospheric component of the model. In contrast, the projected environment allows for the preservation of land area and is a necessary arena for land surface hydrologists. While the river network is created in a projected environment, it can be projected to geographic coordinates to be applied to climate models. The orientation of the mesh can be changed from the north-south orientation to any desired angle. Changing the orientation of the mesh has important implications in testing the algorithm?s flow direction distribution. The resulting river networks from using both the north-south oriented and the 45? rotated mesh show that the algorithm produces more flow directions from the side of the boxes than from the corners. Considering that the real river?s flow patterns should not alter with the arbitrary orientation of the mesh, the algorithm produces a biased distribution of flow directions. If the resulting river network depends on the orientation of the coarse resolution mesh, then the algorithm has a limitation. 87 One method to decrease the uneven distribution of the flow directions from the sides of the boxes is changing the division of the mesh boxes. The division changed from nine to four equal parts through the development of the DMA. The quarterly division does affect the uneven distribution of flow directions by creating a river network with a better flow direction distribution. However, the uneven distribution continues to exist with the alternate division. Though the desired flow distribution is not necessarily known, the consistently higher number of flow directions to the sides shows biased results. With the DMA?s approach, the flow direction distribution is improved compared to the alternative upscaling methods. Future research in upscaling could include many different approaches. A potential approach to decrease the uneven flow distribution significantly would be to use different shapes for the division of the grids. For instance, the grids could be divided with octagons, and each edge of the octagon would be designated for one of the eight possible flow directions. Therefore, each side would have the same chance of hosting a river exit cell and could have a better distribution of flow directions. A different approach would be to view the watersheds by their natural boundaries instead of the arbitrary boxes of coarse resolution meshes. 88 Appendix A Double Maximum Algorithm /* PROGRAM NAME: Double Maximum Algorithm /* /* PROGRAM FUNCTION: Create coarse scale river network in vector /* format from fine resolution flow direction and flow /* accumulation grids in raster format. /* /* WRITTEN BY: Mary Lear, /* Kwabena Asante, and Francisco Olivera /* The algorithm includes an aml written by Ferdi Hellweger. /* /* WORKSHOP: Center for Research in Water Resources /* University of Texas /* Austin, Texas /* /* DATE: March 22, 2000 - World Water Day /* /* INPUTS: /* 1) Fine Resolution Flow Direction Grid /* 2) Fine Resolution Flow Accumulation Grid, same resolution /* as the Flow Direction Grid /* 3) Project File, *.prj /* /* NOTE: The commands in Section One are numbered for reference only. Read /* the User?s Guide to Section One in Appendix B for more information. /* SECTION ONE: USER INPUT AND COARSE MESH GENERATION 1) &sv fdr = [response 'Fine Resolution Flow Direction Grid: '] 2) &sv fac = [response 'Fine Resolution Flow Accumulation Grid: '] 3) &sv lon = [response 'Fishnet origin longitude: '] 4) &sv lat = [response 'Fishnet origin latitude: '] 5) &sv x = [response 'Y-Axis X-Coordinate: '] 89 6) &sv y = [response 'Y-axis Y coordinate: '] 7) &sv l = [response 'Cell Length: '] 8) &sv h = [response 'Cell Height: '] 9) &sv r = [response 'Number of Rows: '] 10) &sv c = [response 'Number of Columns: '] 11) &sv prj = [response 'Select projection file: '] 12) generate geonet 13) fishnet 14) %lon%, %lat% 15) %x%, %y% 16) %l%, %h% 17) %r%, %c% 18) quit 19) build geonet 20) project cover geonet pronet %prj% 21) clean pronet 22) build pronet 23) &sv long = %lon% - %l% * 0.5 24) &sv lati = %lat% - %h% * 0.5 25) &sv onemorerow = %r% + 1 26) &sv onemorecol = %c% + 1 90 27) generate geonet2 28) fishnet 29) %long%, %lati% 30) %long%, %y% 31) %l%, %h% 32) %onemorerow%, %onemorecol% 33) quit 34) build geonet2 35) project cover geonet2 pronet2 %prj% 36) clean pronet2 37) build pronet2 /* SECTION TWO: UPSCALING PROCESS grid setwindow pronet %fdr% setcell %fdr% border = gridpoly ( con ( %fdr%, 1 ), 0.00000001 ) quit intersect border pronet projectnet poly 0.00001 nojoin intersect border pronet2 projectnet2 poly 0.00001 nojoin grid 91 setwindow projectnet %fdr% setcell %fdr% projectgrid = polygrid(projectnet, projectnet#) maxfac = zonalmax(projectgrid, %fac%, DATA) pourpoints = con(maxfac == %fac%, %fdr%, 0) idgrid = polygrid(projectnet2, projectnet2#) maxfac2 = zonalmax(idgrid, %fac%, DATA) pourpoints2 = con(maxfac2 == %fac%, projectgrid, 0) quadrant = zonalmax(idgrid, pourpoints2, DATA) outgrid = con(pourpoints > 0, quadrant, 0) flowzone = zonalmax(projectgrid, outgrid) flowzone0 = con(isnull(flowzone), 0, flowzone) quit /* SECTION THREE: RASTER TO VECTOR FORMAT /* AML to pick a value from a grid and move to a polygon /* Written by Ferdi Hellweger and adapted by Kwabena Asante /* and Mary Lear /* Replace projectnet with the name of your coverage /* Replace flowzone0 with the name of your grid /* Move polygon labels to centroid but ensure all labels within /* polygon centroidlabels projectnet inside /* Add X and Y coordinates to PAT and create field DOWNSTREAM 92 addxy projectnet additem projectnet.pat projectnet.pat downstream 4 16 f 0 /* Go into Arc Plot to read values from grid to polygon /* Display 1040 does not require a visual display, only an output file /* (distore) /* Useful for remote execution arcplot display 1040 distore mape projectnet &s old$echo [show &echo] /*Start a loop to go through the PAT, find the cell value at each /*point location, and write it to the DOWNSTREAM item in the PAT. &type PICKVALUE: /* Declare and open a cursor to read and write to the PAT cursor cur1 declare projectnet.pat info rw cursor cur1 open &sv eof1 = .FALSE. &do &until %eof1% &sv x = %:cur1.x-coord% &sv y = %:cur1.y-coord% &sv downstream = [show cellvalue flowzone0 %x% %y%] &type PICKVALUE: %x% %y% %downstream% &s :cur1.downstream = %downstream% cursor cur1 next &if %:cur1.AML$NEXT% = .FALSE. &then &sv eof1 = .TRUE. &end cursor cur1 remove 93 &type PICKVALUE: &type PICKVALUE: Normal end. &type PICKVALUE: q /* SECTION FOUR: LINK TO SINKS - CONTINENTAL MARGIN and /* INLAND CATCHMENTS /* Select only the polygons that discharge to sinks arcedit edit projectnet polygon select projectnet# = downstream put edgepoly quit build edgepoly /* Convert edge polygons to a grid and use as analysis mask grid setcell %fdr% setwindow %fdr% %fdr% edgegrid = polygrid ( edgepoly , downstream ) /* Set an analysis mask setmask edgegrid /* Find outlet cells within the analysis area pourptgrd = con ( pourpoints > 0, pourpoints2 ) /* Convert those to points, downstream includes just the nonzero /* cells! edgepoints = gridpoint ( pourptgrd, downstream ) quit addxy edgepoints point /* Perform maintenance kill border all 94 kill pronet all kill pronet2 all kill projectgrid all kill maxfac all kill pourpoints all kill idgrid all kill maxfac2 all kill pourpoints2 all kill quadrant all kill outgrid all kill flowzone all kill flowzone0 all kill edgepoly all kill edgegrid all kill pourptgrd all /* SECTION FIVE: NEW COARSE RESOLUTION RIVER NETWORK copy projectnet second tables select second.pat alter x-coord dsx 12 f 3 c alter y-coord dsy 12 f 3 d q 95 joinitem projectnet.pat second.pat projectnet.pat downstream downstream link /* Change column names in tables so they do not get overwritten tables select edgepoints.pat alter x-coord edgex 18 f 5 w alter y-coord edgey 18 f 5 e quit joinitem projectnet.pat edgepoints.pat projectnet.pat downstream cursor cur1 declare projectnet.pat info rw downstream > 0 and Area > 15000000000 cursor cur1 open cursor cur1 next &sv outfile = [open myfile.txt status -append] &sv eof1 = .FALSE. &do &until %eof1% &IF %:cur1.projectnet#% <> %:cur1.downstream% &THEN &DO &sv upstx = %:cur1.x-coord% &sv upsty = %:cur1.y-coord% &sv downx = %:cur1.dsx% &sv downy = %:cur1.dsy% &sv m = %:cur1.projectnet#% &sv a = [ write %outfile% %m% ] &sv m = %upstx% , %upsty% &sv a = [ write %outfile% [quote %m%] ] &sv m = %downx% , %downy% &sv a = [ write %outfile% [quote %m%] ] &sv a = [ write %outfile% 'END' ] &end 96 &IF %:cur1.projectnet#% = %:cur1.downstream% &THEN &DO &sv upstx = %:cur1.x-coord% &sv upsty = %:cur1.y-coord% &sv downx = %:cur1.edgex% &sv downy = %:cur1.edgey% &sv m = %:cur1.projectnet#% &sv b = [ write %outfile% %m% ] &sv m = %upstx% , %upsty% &sv b = [ write %outfile% [quote %m%] ] &sv m = %downx% , %downy% &sv b = [ write %outfile% [quote %m%] ] &sv b = [ write %outfile% 'END' ] &end cursor cur1 next &if %:cur1.AML$NEXT% = .FALSE. &then &sv eof1 = .TRUE. &end cursor cur1 remove generate rivers line &run myfile.txt end quit build rivers line FOR ROTATED MESHES: /* SECTION ONE: USER INPUT AND COARSE MESH GENERATION &sv fdr = [response 'Fine Resolution Flow Direction Grid: '] &sv fac = [response 'Fine Resolution Flow Accumulation Grid: '] &sv lon = [response 'Fishnet origin longitude: '] 97 &sv lat = [response 'Fishnet origin latitude: '] &sv x = [response 'Y-Axis X-Coordinate: '] &sv y = [response 'Y-axis Y coordinate: '] &sv l = [response 'Cell Length: '] &sv h = [response 'Cell Height: '] &sv r = [response 'Number of Rows: '] &sv c = [response 'Number of Columns: '] &sv prj = [response 'Select projection file: '] generate geonet fishnet %lon%, %lat% %x%, %y% %l%, %h% %r%, %c% quit build geonet project cover geonet pronet %prj% clean pronet build pronet &sv rotatedlat = %lat% - 1.988738 &sv onemorerow = %r% + 1 98 &sv onemorecol = %c% + 1 &sv rotatedy = %y% - 1.988738 generate geonet2 fishnet %lon%, %rotatedlat% %x%, %rotatedy% %l%, %h% %onemorerow%, %onemorecol% quit build geonet2 project cover geonet2 pronet2 %prj% clean pronet2 build pronet2 99 Appendix B The User?s Guide to Section One Program Language: Arc Macro Language User Platform: ArcInfo, Version 7 or 8 SECTION ONE: USER INPUT AND COARSE MESH GENERATION This section requires user input to customize the upscaling algorithm for the coarse resolution desired and the region for which the river network will be created. The algorithm creates a river network for one continent or watershed at a time. Lines 1-2: Input the flow direction and flow accumulation grids. The flow direction and flow accumulation can be of any resolution that is finer than the coarse resolution that is desired for the river network output. Lines 3-10: Input the parameters for the coarse resolution fishnet in geographic coordinates. The generate command for a fishnet requires a number of parameters to define the mesh. All of the inputs for the fishnet called GEONET are prompted with a brief description in ArcInfo while a more detailed explanation is provided here. ?Fishnet Origin X-Coordinate (longitude)? is the X-Coordinate or the longitude of the lower left-hand corner of the fishnet. Two decimal places are recommended. ?Fishnet Origin Y-Coordinate (latitude)? is the Y-Coordinate or the latitude of the lower left-hand corner of the fishnet. ?Y-Axis X-Coordinate? orients the fishnet in space. For a perpendicular fishnet, the same value is used as for the Fishnet Origin X-Coordinate. ?Y-Axis Y-Coordinate? orients the fishnet in space. For a perpendicular fishnet above the fishnet origin, a value of a few units greater than the Fishnet Origin Y- Coordinate can be used. ?Cell Length? refers to the length of the fishnet cells in decimal degrees. 100 ?Cell Height? refers to the height of the fishnet cells in decimal degrees. ?Number of Rows? represents the number of rows in the fishnet. ?Number of Columns? represents the number of columns in the fishnet. The suggested parameters for 2.8125? fishnets for each continent are provided in Appendix C. FOR ROTATED MESHES: The user must calculate a Y-Axis Y-Coordinate according to the rotation that the user wishes to introduce. Line 11: Input the projection file. Each projection and continent has different projection parameters. Use the same projection as the grids. Type the complete name of the projection file, i.e. lm_azafr.prj. Projection files are provided in Appendix D for the Lambert Azimuthal Equal Area projection for each continent. If you create a new prj file, write it in the correct format for the projection command. Line 12-19: Create the coarse resolution fishnet in geographic coordinates. The generate command executes the making of the fishnet. The fishnet, GEONET, is then ?built? to be given topology and be accessible to ArcInfo and ArcView. Lines 20-22: Project the coarse resolution fishnet. The fishnet, GEONET, is projected from geographic coordinates to a projected fishnet called PRONET using the .prj file named by the user. Lines 23-34: Create the second coarse resolution fishnet in geographic coordinates. The second fishnet, GEONET2, is an essential part of this program. GEONET2 is a fishnet of the same size and resolution as the original fishnet but its location is shifted. GEONET2 is offset from GEONET by half of the length and half of the height of the boxes. Figure B.1 below shows the first coarse resolution fishnet as solid black lines and the second fishnet is shown with dashed lines. 101 Figure B.1. Origin Placement of the Original (Solid Black) and Second (Dashed Red) Fishnets The second fishnet is created from the input for the first fishnet with no additional input needed. The second fishnet origin is set to the southeast of the original fishnet with an offset distance of one-half of the box length and box height. To match the original mesh, the same length and height are used for the second fishnet. Since the second fishnet is offset from the original, the second fishnet requires one more row and one more column to extend over the edges of the original. The generate command executes the making of the fishnet. This fishnet, GEONET2, is also ?built? to be given topology and be accessible to ArcInfo and ArcView. FOR ROTATED MESHES: The equations for the ?Fishnet Origin Y-Coordinate (latitude)? and the ?Y-Axis Y-Coordinate? are changed for the second rotated mesh. The position of the second rotated mesh is below the original mesh as seen in Figure B.2. For this research with 2.8125? boxes, the second mesh origin is 1.988378 units less than the user?s input for the original fishnet?s Y-Coordinate. Original fishnet origin (X,Y) Second fishnet origin (X-1/2L,Y-1/2H) 102 The ?Fishnet Origin X-Coordinate? and the Y-Axis X-Coordinate? equations are unaffected. Section One of the algorithm for rotated meshes is seen at the end of Appendix A. Figure B.2 Origin Placement of the Rotated Original (Solid Black) and Second (Dashed Red) Fishnets Lines 35-37: Project the second coarse resolution fishnet. The fishnet, GEONET2, is projected from geographic coordinates to a projected fishnet called PRONET2 with the .prj file named by the user. Original rotated fishnet origin (X,Y) Second rotated fishnet origin (X,Y-1.99) 103 Appendix C Guide to Coarse Resolution Mesh Parameters AFRICA Fishnet Origin Longitude: -20.00 Fishnet Origin Latitude: -38.00 Y-Axis X-Coordinate: -20.00 Y-Axis Y-Coordinate: 32.00 Cell Length: 2.8125 Cell Height: 2.8125 Number of Rows: 28 Number of Columns: 29 ASIA Fishnet Origin X-Coordinate (longitude): 36.00 Fishnet Origin Y-Coordinate (latitude): -15.00 Y-Axis X-Coordinate: 36.00 Y-Axis Y-Coordinate: 32.00 Cell Length: 2.8125 Cell Height: 2.8125 Number of Rows: 37 Number of Columns: 67 104 AUSTRALIA Fishnet Origin X-Coordinate (longitude): 95.00 Fishnet Origin Y-Coordinate (latitude): -51.00 Y-Axis X-Coordinate: 95.00 Y-Axis Y-Coordinate: 32.00 Cell Length: 2.8125 Cell Height: 2.8125 Number of Rows: 25 Number of Columns: 32 EUROPE Fishnet Origin X-Coordinate (longitude): -13.50 Fishnet Origin Y-Coordinate (latitude): 9.00 Y-Axis X-Coordinate: -13.50 Y-Axis Y-Coordinate: 32.00 Cell Length: 2.8125 Cell Height: 2.8125 Number of Rows: 26 Number of Columns: 36 NORTH AMERICA Fishnet Origin X-Coordinate (longitude): -180.00 Fishnet Origin Y-Coordinate (latitude): 3.00 Y-Axis X-Coordinate: -180.00 Y-Axis Y-Coordinate: 32.00 105 Cell Length: 2.8125 Cell Height: 2.8125 Number of Rows: 31 Number of Columns: 55 SOUTH AMERICA Fishnet Origin X-Coordinate (longitude): -95.00 Fishnet Origin Y-Coordinate (latitude): -60.00 Y-Axis X-Coordinate: -95.00 Y-Axis Y-Coordinate: 32.00 Cell Length: 2.8125 Cell Height: 2.8125 Number of Rows: 27 Number of Columns: 23 106 Appendix D Projection Files AFRICA INPUT PROJECTION GEOGRAPHIC UNITS DD PARAMETERS OUTPUT PROJECTION LAMBERT_AZIMUTH UNITS METERS PARAMETERS 6378137.00000 20 0 0 5 0 0 0.0 0.0 END ASIA INPUT PROJECTION GEOGRAPHIC UNITS DD PARAMETERS OUTPUT PROJECTION LAMBERT_AZIMUTH UNITS METERS PARAMETERS 6378137.00000 100 0 0 45 0 0 0.0 0.0 END AUSTRALIA INPUT 107 PROJECTION GEOGRAPHIC UNITS DD PARAMETERS OUTPUT PROJECTION LAMBERT_AZIMUTH UNITS METERS PARAMETERS 6378137.00000 135 0 0 -15 0 0 0.0 0.0 END EUROPE INPUT PROJECTION GEOGRAPHIC UNITS DD PARAMETERS OUTPUT PROJECTION LAMBERT_AZIMUTH UNITS METERS PARAMETERS 6378137.00000 20 0 0 55 0 0 0.0 0.0 END NORTH AMERICA INPUT PROJECTION GEOGRAPHIC UNITS DD PARAMETERS OUTPUT PROJECTION LAMBERT_AZIMUTH UNITS METERS PARAMETERS 6378137.00000 -100 0 0 108 45 0 0 0.0 0.0 END SOUTH AMERICA INPUT PROJECTION GEOGRAPHIC UNITS DD PARAMETERS OUTPUT PROJECTION LAMBERT_AZIMUTH UNITS METERS PARAMETERS 6378137.00000 -60 0 0 -15 0 0 0.0 0.0 END 109 References Asante, K.O. ?Aml for Resampling Flow Direction Grids.? (1998) http://www.ce.utexas.edu/stu/asanteko/home.html Eagleson, P.S. ?The Emergence of Global-Scale Hydrology.? Water Resources Research. 22 (1986): 6S-14S. Fekete, B.M., C.J. V?r?smarty, and R.B. Lammers. ?Scaling Gridded River Networks for Macro-scale Hydrology: Development and Analysis.? Manuscript in preparation. Hellweger, F. 1997. HEC-PREPRO: A GIS Preprocessor for Lumped Parameter Hydrologic Modeling Programs. Master?s Thesis, Department of Civil Engineering, University of Texas at Austin, Austin, Texas. Jenson, S.K. and J.O. Dominique. ?Extracting Topographic Structure from Digital Elevation Data for Geographic Information System Anaylsis.? Photogrammetric Engineering and Remote Sensing. 54 (1988): 1593- 1600. O?Donnell, G., B. Nijssen, D.P. Lettenmaier. ?Simple Algorithm for Generating Streamflow Networks for Grid-Based, Macroscale Hydrological Models.? Hydrological Processes. 13 (1999): 1269-1275. Olivera, F. ?Resampling a Flow Direction Grid ? AML Code.? (1998) http://www.ce.utexas.edu/prof/olivera/CoarseFDr/coarsefdr.htm Quinn, P., K. Beven, P. Chevalier, and O. Planchon. ?The Prediction of Hillslope Flow Paths for Distributed Hydrological Modelling Using Digital Terrain Models.? Hydrological Processes. 5 (1991): 59-79. Wolock, D.M. and C.V. Price. ?Effects of Digital Elevation Model Map Scale and Data Resolution on a Topography-based Watershed Model.? Water Resources Research. 30 (1994): 3041-3052. 110 Vita Mary Stockley Lear was born on Tuesday, June 23, 1970. She completed her Bachelor of Science in Civil Engineering degree at the University of Washington in Seattle, Washington in 1993. Following college, she served as a water resources management engineer with the United States Peace Corps in Mali, West Africa for two years. Mary worked as a storm water management engineer at a consulting firm in downtown Seattle, Washington. In 1998, Mary returned to school at the University of Texas at Austin to study global hydrology and water resources engineering. Permanent address: 428 Herr Avenue Millersville, PA 17551 This thesis was typed by the author.