Linking GIS (CRWR-PrePro) with Water Rights Analysis Package (WRAP)


Table of Contents


Motivation

Senate Bill 1


Introduction.

"WRAP is designed to simulates management and use of the water resources of river basin, or multiple-basin region, under a priority-based water allocation system" (WRAP Model Description and Users Manual). This model was developed by Texas Water Resources Institute Texas A&M University. The WRAP programs (WRAP2, WRAP3, AND TABLES) are coded in standard Fortran 77. The seven system components in the model are listed below: (1) control points, (2) basin hydrology, (3) water rights, (4) reservoirs, (5) return flows, (6) hydroelectric power, (7) reservoir system operating rules. The spatial distribution is an important character of hydrologic data. GIS offers the capability for spatial data management. The purpose of my project is to try to integrate GIS with WRAP, using GIS to process WRAP data.

Center of Research for Water Resources (CRWR, UT at Austin) developed a program-CRWR-PrePro which is a system of Avenue scripts for ArcView GIS. The function of CRWR-PrePro is to summarize data from a GIS system so that they can be used as input for the Hydrologic Engineering Center (HEC)'s Hydrologic Modeling System (HMS). My interest is to develop an interface between CRWR-PrePro (with Arcview) and Wrap, which include transferring data (network features and attributes) from CRWR-PrePro to WRAP, and reading back results from Wrap to GIS for displaying and analysis. This work will strengthen the functions and application range of WRAP.

The term projects by Nabeel Khwaja and Luis Aburto, the other two students in GIS class, involved the topic of using GIS approaches to process data for WRAP, but we focus on different parts.  Looking at  their projects will help you get overall understanding, such as where to get DEM and how and so on. Go to their sites,   <Digital Databases for Water Rights Investigations in Texas > <Use of GIS for Calculating Flows at Ungaged Sites in WRAP>


Outline

Prepro generated a stream network relationship which is required by WRAP input file. In Prepro presented as Hecupid 5 to Hecdownid 12, and in WRAP input file presented as CP5 to CP12, here the numbers just are examples. The first part of my project focuses on running Prepro to get the spatial information ( Network relationship). The second part is to develop the interface between two models by writing scripts with Avenue language. All data ( streamflow and evaporation rate records ,water rights and associated reservoirs information, monthly use factor, storage versus area table for reservoir) required by WRAP input file are imported into tables of GIS Arcview. So there are two kinds of information stored in Arcview tables according to the source, one (network) is from Prepro, another is imported from other database. Three scripts are developed to achieve the goal. The function of script1 is reading information stored in Arcview tables and producing an input file of WRAP. The task of running WRAP program is carried out by script2. Scipt3 takes the responsibility of getting the output file back to Arcview. Whole process is done in the same environment-GIS Arcview. It will be more clear by going over the chart below.


Data Sources

Lavaca Basin is chosen as a case study site. The burn DEM grid and water rights control point (WRCP) coverage are from the previous student-Karen Boles' term project: Water Rights in the Lavaca Basin. The WRAP input information is obtained from Tina Dacus and Kirk Kennedy ,Texas Natural Resource Conservation Commission (TNRCC).


Working with Prepro (1).

Blue start: Water Rights Control Points. We can get sense of DEM grid from theme properties.


Working with Prepro (2).

Because the DEM I got is filled DEM, so I started with Flow Direction to run Prepro and followed by Flow Accumulation. For Stream definition, couples of threshold values were tried, 500, 1000, 10000. Threshold value 10000 was chosen finally in consideration of both accuracy and efficiency. It is not necessary to set very small threshold because what we expect is to delineate the streams where WRCPS locate. Prepro offers us the tools to meet this need. Some water rights locations are far away from streams. This problem is solved by using Prepro "Add Stream" manual. When dialogue box pops out, " Use trace stream" is picked up. As a result, Prepro is going to concentrate on the streams flowing through water rights area. This choice reduces the running time of following parts of Prepro


Working with Prepro (3).

I ran Prepro step by step. The important point we should keep in mind is that water rights shape file and streams defined by Prepro are independent until now. I decided to consider outlets in Prepro as water rights locations. What I did is that overlapping two themes, add outlets into stream as long as there are water rights (blue start or blue dot) sitting there. Some water rights are not exactly sitting on the streams, but not far away from the streams. Assumption of that these water rights are on the streams was made. I found the point on the streams which has the shortest distance to water rights location and used "Add Outlets" manual to add outlets. After doing above, water rights are merged into streams. The new version Prepro provides a new tool of "Adding Reservoirs". I added one reservoir into stream. The total number of water rights merging into the stream is 53.


Working with Prepro (4).

Curve Number grid covering Lavaca Basin was clipped from Texas Curve Number grid and added into project to meet the demand of "Calculate Attributes". After " Run CRWR-PrePro", I got the network relationship of outlets which are in the table named as "Attributes of Syml1.shp". See figure below.


Preparing data for WRAP input file.

The number of outlets produced from Prepro is 71. The water rights number is 53. Prepro generates two types of outlets. One is the intersection of streams, the other is "Add Outlets". There are 18 junctions of streams, so these 18 outlets are not water rights control points. In water rights table (wr.dbf) you can see 18 fake water rights whose annual diversions are zero. I treated Monthly Naturalized Streamflow table ( inflow.dbf) and evaporation rate table (evap.dbf) with the same method. The idea here is that the network relationship is set up based on entire system which includes 71outlets. WRAP program doesn't work if you input the relationship of 71 control points (CPS) but only 53 of those have attributes associated with them. The key points here are that without intersections of streams network relationship can not be set up and without fake water rights WRAP program can not work. Because my task is to develop an interface, I decided to use 1 year-1979 as simulation period. You can check out here to see what WRAP2 input file looks like.


Working with scripts (1).

Script1's function is reading information from tables and writing an input file of WRAP2. It is the most challenging job in my project. The format requirements of WRAP's input file are very rigid, so lots of efforts were made to modify script1 to have it fit WRAP. Take a look at Script1. The friendly interface was created to enable users to input information flexibly and easily. See figure below.

After reservoir output number is input ( here "-1" represents output all reservoir's simulation results), script1 works. The input file of WRAP2 is gerenated in "c:\temp\wrap\w.dat"


Working with scripts (2).

Script2 enables users call WRAP in Arcview environment. Then users can run WRAP.


Working with scripts (3).

Script3 gets the output file of WRAP2 back to Arcview table named (result.dbf). In order to import the output file of WRAP into Arcview tables, Fortran program of WRAP is modified a little bit.


Conclusion

It is feasible to integrate Prepro with Wrap. Spatial and Hydrological data are processed in the same environment--GIS Arcview. Friendly interface helps user achieve their jobs more easily and efficiently. The functions and application range of WRAP are strengthened.


Future work

Analyze the output file of WRAP in Arcview (GIS) by using query and chart tools. It will be another advantage of using Arcview.

Modify Prepro to make it fit WRAP better. 


Acknowledgment

The helps I got  from Ximin Cai, Seann Reed, Tina Dacus and Kirk Kennedy are appreaciated.