Center for Research in Water Resources
University of Texas at Austin
(edited May 1997)
This procedure requires both ARC/INFO and Arcview (version 2.1 or higher). You will need the project file (.apr) which will be opened in Arcview.
Data that you will need includes:
This exercise is meant to be a precursor to the exercise Atmospheric Water Balance of the 1993 Midwest Flood. The exercise concerns visualizing and calculating data concerning atmospheric moisture flow over the Midwest.
To run the exercise, one requirement is a line theme of the study area boundary. This theme must consist of straight lines of approximately equal length. Another requirement is the atmospheric moisture flux data associated with the center points of those lines. A description of the data used and the computations is found in the introduction to the exercise.
This exercise provides instruction on how to take the coverage of a general area and convert it to the format needed to complete the exercise on the Midwest flood.
The goal of this exercise is to provide instruction so that a study similar to that on the Midwest flood could done over any region. Possible other studies include the transport of constituents other than water over an area.
The example used to demonstrate the steps is an atmospheric water balance over the region of Texas. The names of the themes created throughout this example are in parenthesis in the steps which create or involve them.
1. Downloading the necessary files
Create a directory called awatbal on your computer. If working from the GISHydro97 CD rom, copy the file awatbal.apr from /atmos/awatbal to your working directory. The file is also available via ftp. Download the file atwatbal.apr in binary format from ftp.crwr.utexas.edu. Log in as anonymous.:
Log in as: anonymous
If you haven't used ftp before, you might need to look at Instructions on how to use anonymous ftp.
A coverage of the Texas boundary (as a shape file) is provided so you
can work through this example. To use this coverage, you will need three
These files are available on the GISHydro97 CD rom in /atmos/awatbal, as well as on the FTP site. To download the files, ftp to ftp.crwr.utexas.edu and download the files from /pub/gishydro97/atmos/awatbal.
2. Getting a line coverage of the boundary from ARC/INFO
You should already have a coverage of the area of interest. It should be projected with units of meters. Which projection is appropriate will depend on where on the globe your area of interest is located. The projection which best conserves distance should be chosen. You need to note what this projection is as well as its parameters. To do this, in ARC/INFO describe your coverage. Listed under the heading of Coordinate System Description will be the projection, units, and parameters of your coverage. Make a note of these. They will be needed later.
For more information on projecting and map projections, Exercise 3: Map Projections, prepared for the course CE397, GIS in Water Resources.
For example, for a coverage called txbnd, type:
The coverage of Texas used was in Albers projection.
This coverage can be opened in Arcview. If using Arcview for a PC, the coverage should be converted to a shape file. The shape file can then be ftped to a PC. To convert to a shape file, in ARC/INFO type:
arcshape line txbnd txbnd
This will take the coverage (txbnd) and create 3 files:
Ftp these files in binary mode.
3. Opening the project in Arcview
Open Arcview. Go to File and select Open Project. Go to the directory where you saved the project file from step 1. Select the project file awatbal.apr
Note that all files should be in the same directory. Created files will also be put into that directory.
Now that you've opened the project, you need to bring your boundary theme into the project. Select Views and open the view Atmospheric Water Balance. To bring your boundary into the project, hit . Go to the directory where your boundary is saved and select it (txbnd.shp). Your theme will be added to the view. To view the theme, click on the small gray box next to the theme name.
4. Converting the initial boundary line to selected points
Several steps must be taken to convert your initial boundary to the
points needed to acquire the atmospheric water flux data. Each step runs
a script by hitting a button. These buttons are found in the Tools portion
when you have a view open. They are immediately to the right of the
To see the scripts, select Scripts from the Project window.
The end result of these steps are:
The steps are:
You will be asked to give a name for the point theme created in this step. This new theme will automatically be added to your view. In the example shown, the name chosen was Txpnt.shp.
You will also be asked whether you wish to dismantle the theme in a clockwise or counter clockwise direction. Either option will work.
You will then be asked for a tolerance. This tolerance is a distance in meters. Any points closer together than the tolerance will be deleted. A default value of 500 meters is given and is generally acceptable. Use discretion, however, depending on the magnitude of the boundary being processed. The script associated with this button is rmvpnts.ave
You will be asked to name the new theme created (txpntrmd.shp).
To set corner points, display the theme you created in the previous step. Do this by clicking on the small box next to that theme in the view window. Then, hit the button . This runs setcorner.ave.
When asked to select a theme to set corners on, select the theme created
in the previous step (txpntrmd.shp).
When prompted to confirm your selection, choose yes.
When asked if you want to reset the existing corners, select yes. If
you have previously run the script and are adding new corner points, select
Move the cursor to a point on the theme that you wish to preserve. Click on that point.
The red dots appear when a point is selected. All dots can be removed by going to Edit/Select all graphics, then hitting delete. However, even if the graphics are removed, these points are still designated corner points. They can be reset by running setcorner.ave again and opting to re-initialize the corners. Likewise, if you reset the corner points, the red dots still appear, though the associated points are no longer designated as corner points. Should you wish to reset the corner points, make sure to remove the red dots in the fashion described above.
In this step, another theme is not created. The theme selected is modified. It is the same them which should be used in the following step.
Arcview will prompt you to enter a length. This length will be the length
of the lines created (with the exception of those which would cross corner
points). The default is 10,000 meters..
The length you choose will depend on the size of your boundary. For Texas, a length of 100,000 meters was used, resulting in 73 line segments describing the boundary. If you end up with an irregular boundary, it is likely that the length you chose was too small. Delete the theme you created and run the script again, using a larger length.
An example is shown of Texas with and without corner points set.
The theme created in this step is input to the atmobal exercise.
The theme with the vectors can be used to check that all lines are drawn in the same direction. The vectors should be pointing consistently outward.
5. Projecting the points into Geographic Coordinates
To obtain the moisture flux data, you need the points just created in geographic coordinates. This must be done in ARC/INFO. Copy the theme with the center points (outpoint.shp) to the account where you will use ARC/INFO. Remember, if ftping data from a PC, to transfer the data in the binary mode. Again, three files must be transferred.
For example, for a theme called outpoint, the following files
would be transferred:
Open ARC/INFO. Use the command shapearc.
shapearc outpoint outpoint
This creates an Arc/Info coverage called outpoint from the shape file outpoint. To name the coverage something different from the name of the theme, the last word in the command would be replaced with the name of your choice.
This coverage is in the same projection as your original boundary coverage and must be projected into geographic. This is also done in ARC/INFO. Recall the information on the projection and its parameters you noted in step 1.
After starting ARC/INFO, use the command project.
project cover outpoint latlong
This would result in a coverage called latlong with the points from
outpoint in geographic coordinates. Shown is an example of the steps used
in projecting the points for Texas from an Albers projection to Geographic
Once you have projected your coverage to geographic coordinates, you need to ungenerate your coverage.
ungenerate point latlong latlong.gen
This will generate a comma separated variable text file called latlong.gen. This file will have one line per point. The line will have 3 items.
This text file is what can be used to obtain atmospheric flux data, as obtained for the atmobal exercise. The first item for each point is an identification number. X_coord and y_coord are the longitude and latitude of the points. These are in decimal degrees. A copy of the latlong.gen file generated in processing the boundary of Texas is available on both the GISHydro97 CD and the FTP site.
6. Getting x and y components of length
This step can be done one of two ways.
a. Using the projected theme.
In the theme window, select the theme which is lines of equal length describing your boundary (txcnrln.shp). Click on the button. The table containing the data for that theme will open.
In the theme window, select the theme which contains the center points of the lines. Again, click on the button. This table contains a field called Alpha It describes the direction of a normal to the line in degrees.
You will need to join these two tables. Go to the table for the center point theme. Click on the field Idfld. Go to the table for the lines. Click on the field Line_id. Under Table, select the command Join. Now, the field Alpha is in the attribute table for the line theme.
Now, add two fields to the line theme table. Do this by selecting Add
Field from the Table menu. Name the field lx. Select the type
Number with 2 decimal places.
Repeat this procedure, naming the field ly. Save your project.
Now, select the field lx by clicking at the name at the top of the column.
Hit the button . Double click
on the field Length. Double click on the x at the top of the Requests
list. Double click on Alpha from the Fields list. Double
click on As.Radians from the Requests list. Double click on .Cos from the
Requests list. Hit OK.
Repeat the procedure for the ly field, selecting .Sin instead of .Cos.
b. Using the coverage in geographic coordinates.
This variation must be done on a Unix system or other system where access to coverage files, not just shape files, is available. The coverage should be called geo. The script calclen.ave was written for a specific file name and has not been generalized. It was not worked with when making this procedure, so cannot be further described. The script is included in the project and for those with knowledge of Avenue it may prove a useful tool.
7. Obtaining the Atmospheric Flux Data
For the example exercise on the Midwest flood, data was obtained from Allen Bradley at the University of Iowa. Details on how this data is developed is included in that exercise.
You can mail Allen Bradley for atmospheric flux data. You will need to supply him with the file greated in Step 5, likely through ftp. Other possible sources of data are discussed in Alternative data sources.
8. Analyzing the data in Arcview: Computing the Atmospheric Water Balance
Steps after this point are described in Atmospheric Water Balance of the 1993 Midwest Flood. The scripts run in the Midwest flood exercise are included in the awatbal project file. One change should be noted. The in the atmobal exercise is in this exercise. The in atmobal is in this exercise.
Some other places atmospheric data may be obtained are:
All sites have data available in GRIB code for multiple layers: u-velocity, v-velocity, specific humidity.
This data would have to be transformed into an appropriate format before being used as described in this exercise and in the atmobal exercise. For more information on the data, refer to the given websites.
These materials may be used for study, research, and education, but please credit the authors and the Center for Research in Water Resources, The University of Texas at Austin. All commercial rights reserved. Copyright 1997 Center for Research in Water Resources.