Tha primary goal for this exercise is to demonstrate the application of GIS to analyze river pollution. The capabilities of this model will be presented using a herbicide, atrazine, and a nutrient, nitrate plus nitrite as nitrogen. The steps of the exercise are displayed on the light-blue background. Please, write me if you have any comments: pawel@crwr.utexas.edu

Determine nitrate plus nitrite as nitrogen concentrations in the Iowa-Cedar Rivers; Draw the bar-charts of the agrichemical concentrations in selected sites along the Iowa river; Discuss the results (magnitude, changes along the river, seasonal variations); Assume nitrogen fertilizer use in 1990; Assume flow conditions of 1990.

# Introduction

The ArcView application is divided into four projects (a project is a collection of associated documents: views, tables, layouts, charts, and scripts). Each project is designed to perform a different task. Four buttons that allow user to switch between projects have been placed in the Button Bar. These buttons have the following functions:

Runs the "model" project. This project is designed to prepare entry data for the agrichemical transport model as well as to calculate concentrations and loads.

Runs the "results" project which is designed to display the results as maps of agrichemical concentration and load.

Executes project "flwprc" which provides visualization of the flow record for a selected modeling unit.

Project "tools" contains the fundamental tools for hydrologic modeling.

The project "model" is the main component of the ArcView application. Projects "results", "flwprc", and "tools" are supporting modules.

Create a directory (command mkdir ) Copy all the files from the model7 folder into the directory you have created. Make sure that the following folders: `cruse, crwsd,` and `support`, including all files inside them have the writing permission enabled, i.e. the files can be edited. The following error message is displayed when the program can not write to one of the files: Create additional directory in which you will your results (for example: `d: /xresults`) Open project Model (file `model.prj`)

# Project Model

When opened, the project Model displays the following maps:

- Agrichemical application rate by county (view: Application Rate, theme: Use);
- The Iowa-Cedar River basin divided into modeling units (view: Modeling Units, theme: Units).

Six buttons are designed to select different activities:

Edit Application. This button displays dialog boxes that allow the user to specify the agrichemical application rate. If the view-window Application Rate is active, the application in either all, or selected counties can be specified. If the view-window Modeling units is active, the application rate in each modeling unit can be modified.

Edit Cumulative Flow Rate. This button shows dialog boxes for selecting the flow record (by selecting a year) that will be used for calculations and for adjusting the selected values. For example, all data can be multiplied by a factor that represents extreme conditions. The adjustment may be performed for all months of the specified year or for each individual month.

Select Year. This button allows the user to specify a year for a model that has a trend component. There is no trend in the current model.

Select Month. The dialog box displayed by this button specifies if the calculations will be performed for all months or only for selected months of a year.

Run. Executes the script that performs the calculations.

First Order Reaction. Calculates concentrations and loads assuming exponential decrease of the agricultural constituent along the flow path. The current model does not contain a map of spatially distributed decay rates that allows one to estimate concentrations by this method.

### Core database of the model

The following coverages and data files constitute the core database of the model:

- Coverage `cruse`--a map of 47 counties that are within the Iowa-Cedar River basin. Table 1 presents the items of cruse's PAT. This table contains the agrichemical application rate database. It is edited when the application for model run is specified.
- Coverage crwsd--map of 1032 modeling units. All data required by the model as well as the calculation resells are stored in the attribute table of this coverage. Table 2 lists the items of the attribute table.
- File `Model2a.dbf` -- model specification. This database file contains mathematical model specifications. Table 3 shows the fields of this file.
- File `Linkuse.dbf`--description of the link between counties and modeling units (1517 records). Three items describe the link: [Fips] --county FIPS code, [Unit_id] --ID number of the modeling unit or part of the modeling unit that is located in the county described by the FIPS code, and [Area_km2] --area of the unit or part of the unit that is located in the county specified by the FIPS code [km2]).
- Coverage `Unflow` -- map of 1032 modeling units. The PAT file contains item [Unit_id], and items [Qm196001]...[Qm199209], that store the cumulative flow rate estimated for the period from January 1960 to September 1992.
- Coverage `Unprec` -- map of 1033 modeling units. The PAT file contains item [Unit_id], and items [Pm195001]...[Pm199306], that store the average precipitation depth estimated for the period from January 1950 to June 1993.

Table 1. Polygon Attribute Table of the `cruse` coverage

Field (Item) | Description
Fips | county FIPS code
St | state
Cntyname | county name
N89kgkm2, N90kgkm2, N91kgkm2 | estimated average nitrogen fertilizer application rate for the years 1989, 1990, and 1991, respectively [kg/km2]
A89kgkm2 | estimated average atrazine application rate for 1989 [kg/km2]
Temp | field reserved for storage of results of partial calculations
Use | application rate selected for the estimation of concentrations and loads

Table 2. Polygon Attribute Table of the `crwsd` coverage

Field (Item) | Description
Unit_id | ID of the modeling unit
Gswsh | ID of the USGS gauging station downstream of the modeling unit
Unit_nx | ID of the next unit on the flow path (downstream unit ID)
Order | a number that specifies location of the unit on the flow path
Areakm2 | area of the unit [km2]
Careakm2 | drainage area upstream of the unit outlet [km2]
Alndslp | average land slope of unit drainage area
Alndlgkm | average length on the flow path from the land to the stream network [km]
Chemuse | Agrichemical application rate in the unit [kg/yr/km2]
Cchemuse | average agrichemical application rate over the unit drainage area [kg/yr/km2]
Travtime | travel time across the unit [d] (no data available)
Losscoef | Overall loss coefficient in the unit [1/d] (no data available)
Expofact | Export factor, fraction of the applied agricultural chemical in the unit that enters the surface water (no data available)
Tcavg | Annual average temperature for upstream drainage area [°C]
Pmmavg | Annual precipitation depth, average over upstream drainage area [mm]
Flow01...Flow12 | monthly flow rate that flows through the unit outlet [m3/s]
Conc01...Conc12 | concentration at the unit outlet (atrazine [mg/m3], nitrate plus nitrite as nitrogen [g/m3])
Load01...Load12 | chemical load (flow * concentration, atrazine [mg/s], nitrate plus nitrite as nitrogen [g/s])

Table 3. Fields of the file `model2a.dbf` -- model specification.

Field (Item) | Description
Year | a year that is used to estimate the trend coefficient;
Ftrend | mathematical description of the trend. Current version of the model assumes no trend, i.e. the trend is described by the following equation: 1.00+(0.0000*Year)
Trendcf | trend coefficient which is calculated according to the information stored in items Year and Ftrend
Si01...Si12 | seasonal index, 12 values that represent the monthly variations of the agrichemical concentration around the annual average.
Model | model name, e.g. Nitrate01, Atrazine01, Atrazine02
Sel | contains 1 if the model is selected for calculations, 0 otherwise
Equation | equation for estimation of agrichemical concentrations. Four models are available, atrazine model without the flow rate [mg/L]: (-1.5575+(0.026*U)+(0.7998*LL)+(0.4559*TA)-(0.0048*PA))*TR*SI atrazine model with the flow rate [mg/L]: (-0.8142+(0.0133*U)+(0.3346*LL)+(38.8804*LS)+(0.2732*TA) -(0.0029*PA))*(Q^0.2899)*TR*SI nitrate plus nitrite as nitrogen model without the flow rate [mg/L]: (-7.424541+(0.001062*U)-(1.033063*TA)+(0.019339*PA))*TR*SI nitrate plus nitrite as nitrogen model with the flow rate [mg/L]: (-7.57848+(0.00064886*U)+(0.776683*LL)+(173.6409*LS)-(0.520245*TA) +(0.0088545*PA))*(Q^0.3432)*TR*SI Three multiplicative models are included only for testing purposes: nitrate plus nitrite as nitrogen [g/m3]: 0.000143208*(U^1.3814)*(A^(-0.5556))*(Q^0.4240)*(LL^0.9522)*TR*SI for atrazine [g/m3]: 0.0001265546*(U^0.8323)*(SL^0.3591)*(Q^0.0940)*(LL^0.9208)*TR*SI for atrazine, same as (x2) but different output units [mg/m3] 0.1265546*(U^0.8323)*(SL^0.3591)*(Q^0.0940)*(LL^0.9208)*TR*SI where: U = application rate, A = drainage area, Q = flow rate, LL = average overland flow length, SL = land slope, TA = average temperature, PA = average precipitation, TR = trend coefficient, and SI = seasonal index.
Comments | comments and model description

The ArcView script `equat6` executed from the button calculates concentrations and loads. This script first selects the record that contains the value of item [Sel] equal to 1. Then `equat6` extracts the value from the item [Year], retrieves the equation that describes the trend from the item [Ftrend], calculates the trend coefficient, and stores it in the item [Trendcf]. In the next step, the script extracts the equation from the item [Equation] and replaces the symbolic names U, A, LS, LL, and Q with the corresponding item names [Cchemuse], [Careakm2], [Alndslp], [Alndlgkm], and one of the item [Qm01]...[Qm12]. The symbolic name TR is replaced by the value stored in the item [Trendcf] and the name SI is replaced by the value from one of the items [Si01]...[Si12]. The concentrations are calculated for each month of the year by the Avenue request calculate and the results are stored in the items [Conc01]..[Conc12]. The loads are estimated by multiplication of the flows and concentrations. The products are stored in the items [Load01]...[Load12].

Calculations of the agrichemical concentration in surface waters, according to the first order process, are performed by the script `decay1`. This Avenue program was written for future extensions of the agrichemical transport model, for example, to utilize the results of the PRIZM model or results of the CEEPES (Comprehensive Environmental Economic Policy Evaluation System) modeling program developed by Iowa State University's Center for Agricultural and Rural Development, CARD (Bouzaher and Monale, 1993).

## Specification of the agrichemical application rate

Two spatial resolutions can be used to specify the agrichemical application rate: 1) by county; and 2) by modeling unit. If the view Application Rate is active the application by county may be specified. If the view Modeling Units is active, then the agrichemical application for each unit can be set.

### Seting the agrichemical application rate for counties

The agrichemical application rate in either all, or selected counties can be specified. The following dialog box is opened after the button is clicked and the view Application Rate is active:

The application rate of nitrogen fertilizers estimated for 1989, 1990, and 1991, and application rate of atrazine estimated for 1989 can be selected. A multiplier that increases/decreases application rate by a given percentage also can be used to simulate the different policy scenarios. The third input field allows one to enter the value of the application rate directly.

Advanced: The database of the agrichemical application can be extended by adding an item to the polygon attribute table PAT of the `cruse` coverage (Table 1).

Make sure that the Application Rate view is active (just click the mouse on the title bar) Click button , it is located on the button bar. Enter the name of the databases that you want to use: `n90kgkm2`

The ArcView model checks the data entered by user. For example, if wrong input is detected in the agrichemical application dialog box, the user will be informed what error and in which entry field the error occurred:

Note: Setting the application rate for the counties change values in modeling units regardless some modeling units are selected of not.

### Seting the agrichemical application rate for modeling units

The agrichemical application rate in either all, or selected unit watersheds can be multiplied by a factor or an application value can be specified. The following dialog box is opened after the button is clicked and the view Modeling Units is active:

Note: Since the average upstream application rate is calculates for each unit, the changes made to one modeling unit affect the values of all downstream units.

## Specification of the monthly discharge rate

The historical monthly discharge can be extracted from the flow database (polygon attribute table of the `unflow` coverage) by specifying the year and assigned to either all or selected modeling units. Also, the flow rate values can be multiplied by a factor to represent extreme flow conditions. The multiplication coefficients can be applied to all months of the year or to each individual month. The following dialog box is opened after the button is clicked and the view Modeling Units is active:

Click button ; In the first input field "Assume the flow conditions of:" enter the year 1990. Do not change other fields.

## Specification of the year

The button allows one to specify the year for a model that has a trend component. The specification of the trend equation is stored in the field `Ftrend`, file `model2a.dbf`. Current version of the agrichemical transport models assume no trend, i.e. the trend is described by the following equation: 1.00+(0.0000*[Year]). The following dialog box is opened after the button is clicked:

## Selecting a model

The ArcView model allows to select an equation that describe relation between atrazine concentration or nitrate plus nitrite as nitrogen concentration and the variables such as agrichemical application rate, land slope, flow rate, average temperature and average precipitation. These equations are stored in the field [equation] of the file `model2a.dbf` (Table 3). The following dialog box is opened after the button is clicked:

Click button ; Select the name of model that you want to use: `nitrate nq1 mg/L` (model for nitrate plus nitrite as nitrogen concentration, discharge is not used to make concentration prediction, output is in mg/L units)

## Calculating concentrations and loads

The button starts the script that performs the calculations of chemical concentrations and loads. A YES/NO dialog box which ask for model confirmation is displayed:

Next, a dialog box is displayed in which user can select months of the year for which the calculations will be performed:

If user selects "Cancel" the calculations of the concentrations and loads are stopped. No changes to the attribute tables are made.

Click button ; Accept the model `nitrate nq1 mg/L` ; Perform calculations for all months of the year (type "1" in the entry field "All months" of the Recalculate dialog box; Convert the theme Units into a shapefile: Make sure that the view "Modeling units" and the theme "Units" are active. Select from menu: Theme and Convert to shapefile. Name the shapefile `n1990.shp` and save it in the folder you created earlier (`d:/xresults/`). Do not add shapefile to the view; Start project results.apr (click button ); Do not save changes to model.apr unless you really want to.

## Exponential decay model

The exponential decay model estimates loads in rivers assuming the chemical losses in rivers are governed by a first order reaction, i.e. the agrichemical mass exponentially decays as it travels from one modeling unit to the next downstream unit. After the button is clicked a series of dialog boxes are displayed in which user is asked to select input data and model parameters.

First the user is asked to select a field which contains export factors. The export factors represent all chemical losses after the application on the field and just before the chemical enters a stream.

Next, the user is asked to select a field with the cumulative runoff (river discharge):

The following dialog box asks for a name or the field in which the results (concentrations) will be stored:

If the field exists, the values will be overwritten otherwise the program asks user if she/he wants to create a new field. If the answer is YES the user will be prompted to specify a width and a precision of the new field.

The travel time (or travel distance) and the time loss coefficient (or distance loss coefficient) are stored in items [Travtime] and [Losscoeff] respectively.

# Project Results

The project Results can be opened by clicking the button . This project reserves the space for preparing the maps of estimated agrichemical concentration and load in surface water. Three scripts, executed from the button bar, buttons: , , and , draw the bar charts of the monthly average chemical concentration, chemical load and flow rate, respectively. These scripts are based on ESRI examples.

The legend's title can be entered in the following dialog box:

Four sizes of the charts are available: Small, Medium, Large, and X-Large.

Similar dialog boxes are displayed before the charts of loads and discharges are drawn:

Create a new view; Add the shape file `n1990.shp` to the view; Add the theme RF1 (maps of rivers) to the view, so you can determine which units ale located along the Iowa River; Edit the legend if necessary (i.e. line thicknes, line color, polygon foreground color, and polygon outline color); Select units along the Iowa River (Make sure that the theme N1990.shp is active. To make a multiple selection the `shift` key must be pressed); Click the button; Enter the title of the legend (e.g. Conc. N1990 g/m3); Select the size of bar small; Print the results. Example map of concentrations in the Iowa River is shown below. Use different method(s) to present results. Show discharge and loads. Start project flwprc.apr (click button ).

Example of presentation of temporal and spatial distribution of the nitrate and nitrite as nitrogen concentrations in the Iowa River:

Example of the spatial distribution of nitrate concentrations in the Iowa-Cedar Basin rivers in January 1990. Detection of this characteristic spatial pattern of river pollution (Northwest - Southeast) by the traditional methods is very difficult, ...if possible.

# Project Flprc

Button opens the project Flprc.

The bar charts that represent the monthly flow rate and the average precipitation depth for a selected time period can be drawn at the center of selected modeling units ( draws charts of the flow rate and draws charts of the precipitation depth). The script associated with the button displays all recorded flow rate (monthly values from January 1960 to December 1992) for a specified modeling unit. Since charts of monthly flow rate for multiple year periods can be drawn, the wet or dry years can be easily identified.

After the buttons or are selected the user is prompted to enter the name of the legend, and to specify the time period (months and years):

Than the size of the bars must be selected:

Task: Compare discharge in the selected gaging stations located along the Iowa river in years 1989 to 1991. Click on any chart to make it active; Click the button to minimize all charts; Add a new View; Add the theme `gsflow` (discharge measured in 28 gaging stations in years from 1940 to 1992), make it active and visible Add the map of rivers to the view (coverage `rf1`); Select stations located on the Iowa River; click the button. Enter the beginning month 1/1990 and the ending month 12/1991. Select small size of bars; Below, an example map is presented. The charts chow that the 1989 year was a dry year compared to years 1990 and 1991.

These tools for drawing charts can be used to draw a discharge profiles along selected rivers.

Task: Draw a dischrage profile along the Iowa River Open a new View; Add the theme `unflow` (discharge from 1033 units for the years 1960 to 1992), make it active and visible Select the Iowa River flow path. Click the button and then click an unit in the upper portion of the Iowa River basin. Wait a moment. Avenue script selects all downstream units to the one you clicked on; click the button. To draw a discharge profile in the Iowa River in January 1990 enter from 1990, January and to 1990, January. Select medium or large size of bars; Add a map of rivers to the view (coverage `rf1`) Make rivers blue and unflow polygons of coverage white (both, foreground and outline); Note: the decrease in the flow in the middle of the Iowa river is most likely caused by the Coralville Lake losses or management.

The button must be pressed to display all recorded flow rate (monthly values from January 1960 to December 1992) in a form of a dynamic chart. If this button is pressed, user can click on a selected gauging station, theme `gsflow`, or on a selected modeling unit, theme `unflow`. Two forms of the charts can be selected: Horizontal--bars move from right to left, or Vertical--bars move from up to down.

After chart form is selected the user is prompted to select the time interval for which the data will be displayed.

Before the charts are drawn, the maximum value of the discharge is found to scale the chart. This value is displayed:

The dynamic chart is displayed after user click on the YES button:

The process of displaying series of charts can be stopped in any moment by pressing the stop button displayed in the lower left corner of the ArcView window (left end of the status bar).

After the data over selected time period is displayed, the user is asked if she/he wants to minimize the chart window:

# Project Tools

To use a tool a table has to be opened and active. If the active document is not a table an error message is displayed:

The following tools have been created to support the model of agrichemicals in surface waters:

Determines the unit/stream order in the flow system (Avenue script `order6`);

An item that contains the unit ID and an item that contains the ID of the downstream units must be specified:

Then user has to determine a field in which the order will be stored:

If the field does not exist the program will ask if user wants to create a new field, and display dialog boxes to enter field width and field precision.

Calculates weighted average for each modeling unit total drainage area (script `upavg2`);

The following dialog boxes ask user for information required to calculate weighted average:

If the specified field does not exist:

If YES was selected:

Accumulates values going along the flow path (script `cumul2`);

The following dialog boxes ask user for information required to accumulate values along the flow path (flow-accumulation):

If the entered field can not be found:

IF answer YES is selected (note that program do not ask for the field precision. To save user time and to reduce number of dialog boxes the script assumes precision of the input field):

Calculates the difference between the unit inputs and the unit output (script `decom2`).

The following dialog boxes ask user for information required to unaccumulate values along the flow path (reverse flow-accumulation):

If the field does not exist:

The procedure of reverse flow-accumulation is very useful to determine the difference between the outflow from the modeling units and the sum of inflows, and therefore to asses water gains/losses over large areas. Below an example of "un-cumulated" flow in the Iowa-Cedar River basin for June 1990. The losses along the Cedar River are evident. Also, the dark blue region close to the Iowa City indicates release of water from the Coralville Lake.

If you have any comments, questions, or suggestions please write to:

pawel@crwr.utexas.edu

Go to: Pawel's home page