United States Office of Water EPA-823-R-99-001

Environmental Protection 4305 March 1999

Agency

BASINS Technical Note 2

BASINS Scripts and Extracted Data

Fields
Page 1 of 12

Technical Note 2

BASINS Scripts and Extracted Data Fields

March 1, 1999

An ongoing need of BASINS users, as reflected in list server and technical support questions, is

to understand which data layers and data fields are utilized in performing BASINS' customized

GIS analyses (TARGET, ASSESS, and Data Mining), reports (Point Source Inventory, Water

Quality Summary, Landuse Distribution, TRI Emission, State Soil Characteristic, and Watershed

Topographic), and models (TOXIROUTE, QUAL2E, and NPSM). 

Previously, a table was provided to guide BASINS 2.0 Beta users in appending BASINS data

sets, or in creating their own BASINS data layers from scripts. This technical note more fully

documents BASINS AVENUE scripts and data fields extracted by BASINS and updates the

previous table to include RF3 modeling and other modifications performed during the upgrade

from beta to final versions of BASINS 2.0.

The following is two tables: Table 1. BASINS Avenue Scripts, their Functional Description and Data

Needs; and Table 2. Data Fields Used by BASINS Tools and Models, and their Format. Table 2 lists

all the database fields used by BASINS tools and models. The format for each field is provided to

guide users in appending or editing existing tables.
Page 2 of 12

Table 1. BASINS Avenue Scripts, their Functional Descriptions and Data Needs.

Script Name Description Data Used

Project Builder

basins.projectbuilder Builds ArcView project files (*.apr)

which contain the BASINS

customized environment and all

necessary data to run the BASINS

program.

All BASINS Core Data

extbudup.ave Updates extbud.src file to keep

track of the BASINS system

status.

None

labelnew.ave Creates labels for a theme based

on a selected attribute field.

None

startup.basins Sets BASINS Arcview global and

environmental variables.

None

Assessment Tools

_b.targetpermitteddischarges Performs broad-based analysis on

point source loadings data within

the entire project area extracted.

Display average loadings for each

cataloging units on the map and a

bar chart.

Permit Compliance System,

Permitted Discharges 1991-

96, Permitted Discharges

Parameter Table 1991-96

_b.targetwaterquality Performs broad-based analysis on

water quality data within the entire

project area extracted. Display

average concentrations for each

cataloging units on the map and a

bar chart.

Water Quality Stations, Water

Quality Data 1970-97, Water

Quality Parameter Table

1970-97

_b.assesspermitteddischarges Performs point source discharge

assessment on individual stations

or facilities within a given

watershed (cataloging unit) or

group of watersheds.

Permit Compliance System,

Permitted Discharges 1991-

96, Permitted Discharges

Parameter Table 1991-96

_b.assesswaterquality Performs water quality

assessment on individual stations

or facilities within a given

watershed (cataloging unit) or

group of watersheds.

Water Quality Stations, Water

Quality Data 1970-97, Water

Quality Parameter Table

1970-97
Table 1. BASINS Avenue Scripts, their Functional Descriptions and Data Needs (cont.)

Script Name Description Data Used

Page 3 of 12

view.selectfordatamining Replaces the original ArcView

Selection Tool script to work with

data mining.

Permit Compliance System,

Permitted Discharges 1991-

96, Permitted Discharges

Parameter Table 1991-96;

Water Quality Stations, Water

Quality Data 1970-97, Water

Quality Parameter Table

1970-97; Bacteria Stations,

Bacteria Data 1970-97, 

Bacteria Parameter Table

1970-97.

view.dataminingselect Selects monitoring stations and

link the attribute tables together to

perform data mining on point

sources, water quality, or bacteria

data.

Permit Compliance System,

Permitted Discharges 1991-

96, Permitted Discharges

Parameter Table 1991-96;

Water Quality Stations, Water

Quality Data 1970-97, Water

Quality Parameter Table

1970-97; Bacteria Stations,

Bacteria Data 1970-97, 

Bacteria Parameter Table

1970-97.

view.dataminingcreatedocs Creates data mining views and

tables to display selected data for

point sources, water quality, or

bacteria data.

Permit Compliance System,

Permitted Discharges 1991-

96, Permitted Discharges

Parameter Table 1991-96;

Water Quality Stations, Water

Quality Data 1970-97, Water

Quality Parameter Table

1970-97; Bacteria Stations,

Bacteria Data 1970-97, 

Bacteria Parameter Table

1970-97.

view.dataminingselectupdate Update script for data mining tool. None

table.selectfordatamining Selects monitoring stations from

the table and link the attribute

tables together to perform data

mining on point sources, water

quality, or bacteria data.

Permit Compliance System,

Permitted Discharges 1991-

96, Permitted Discharges

Parameter Table 1991-96;

Water Quality Stations, Water

Quality Data 1970-97, Water

Quality Parameter Table

1970-97; Bacteria Stations,

Bacteria Data 1970-97, 

Bacteria Parameter Table

1970-97.

table.selectfordataminingupdat

e

Update script for data mining tool None
Table 1. BASINS Avenue Scripts, their Functional Descriptions and Data Needs (cont.)

Script Name Description Data Used

Page 4 of 12

Report Generating Tools

report.generator.pointsources Creates a point source summary

table, a pollutant discharge

loading table, and a map to

display the distribution of point

sources, and to evaluate their

proximity to RF1 streams.

Permit Compliance System,

Permitted Discharges 1991-

96, Permitted Discharges

Parameter Table 1991-96,

Reach File, V1,V3.

report.generator.waterquality Creates a water quality inventory

table, a water quality station

summary table, and a map to

display the distribution of water

quality monitoring stations.

Water Quality Stations, Water

Quality Data 1970-97, Water

Quality Parameter Table

1970-97, Reach File, V1, V3.

report.generator.landuse Creates a land use distribution

table by major land use category,

a detailed land use distribution

table, and a map to display the

distribution of land use.

USGS land use data and

Reach file, V1, V3.

report.generator.triair Creates a TRI air emission

inventory table to provide a

complete list of all TRI facilities

within the watershed(s), a detailed

table to report TRI air emission

for the selected pollutant in a

given year, and a map to display

the distribution of TRI facilities.

TRI air release data 1987-95,

TRI parameter table, Reach

File, V1, V3.

report.generator.statsgo Creates a table of aggregated

values of the selected parameter

by STATSGO map unit and by

subwatershed. Also generates

maps showing the spatial

variability of the selected soil

parameter by map unit and by

subwatershed overlaid with the

Reach File network (RF1) and the

boundary of the selected

watershed.

STATSGO state soil data, soil

component, soil layer, and

Reach File, V1, V3.

report.generator.dem Creates a DEM summary table, an

elevation distribution chart, and a

elevation map.

USGS DEM data and Reach

File, V1, V3.

report.createsadir Checks and creates subdirectories

for the generated reports.

NONE

report.createmap Creates the report maps. NONE

report.update Update script for the report menu. NONE
Table 1. BASINS Avenue Scripts, their Functional Descriptions and Data Needs (cont.)

Script Name Description Data Used

Page 5 of 12

Watershed Delineation Tools

watershed.delineatesetup Sets up an editable environment

for users to delineate

subwatersheds.

Cataloging unit boundaries,

Reach File, V1, V3.

watershed.delineate This script is used to delineate the

watershed, users use the mouse

to draw the boundaries of

subwatersheds, the script will

created a subwatershed theme in

the Basins View.

Cataloging unit boundaries,

Reach File, V1, V3.

watershed.delineatefinalize Finishes up the delineation and

assign the subwatershed ID for

each delineation.

Cataloging unit boundaries,

Reach File, V1, V3.

watershed.delineateupdate Update script for the delineation

tool.

NONE

watershed.removelinesetup Sets up an editable environment

for users to clean invalid

delineated subwatersheds.

Cataloging unit boundaries,

Reach File, V1, V3.

watershed.removeline Removes the invalid delineation

lines to clean the subwatersheds.

Cataloging unit boundaries,

Reach File, V1, V3.

watershed.removelineupdate Update script for the Clean tool. NONE

Water Quality Observation Data Tools

wqobs_addstation Adds stations in the Water Quality

Observation Stations theme.

Water Quality Observation

Stations

wqobs_delete Delete the selected station in the

Water Quality Observation

Stations theme.

Water Quality Observation

Stations

wqobs_move Moves the stations in the Water

Quality Observation Stations

theme.

Water Quality Observation

Stations

wqobs_update_station Updates attribute of each selected

stations in the Water Quality

Observation Stations theme.

Water Quality Observation

Stations

wqobs_append Appends user defined dbf table to

the existing table or create one if

does not exist.

Water Quality Observation

Stations

wqobs_report Reports information on the

selected water quality stations.

Water Quality Observation

Stations
Table 1. BASINS Avenue Scripts, their Functional Descriptions and Data Needs (cont.)

Script Name Description Data Used

Page 6 of 12

Models

model.toxiroute Generates input files for running

TOXIROUTE model and

automatically start the model from 

the script and then back the script

once the model finished.

Permit Compliance System,

Permitted Discharges 1991-

96, Permitted Discharges

Parameter Table 1991-96,

Reach File, V1.

model.toxirouteupdate Update script for the model

toxiroute menu.

NONE

model.qual2e Generates three input files for

model QUAL2E, i.e. stream

network from reach file 1, PCS

loads and boundary conditions.

Then starts the model QUAL2E.

Permit Compliance System,

Permitted Discharges 1991-

96, Permitted Discharges

Parameter Table 1991-96,

Reach File, V1.

model.qual2eupdate Update script for the model

QUAL2E menu.

NONE

visualize.modeloutput Displays the model output of

Toxiroute or QUAL2E on the map.

Permit Compliance System,

Permitted Discharges 1991-

96, Permitted Discharges

Parameter Table 1991-96,

Reach File, V1.

visualize.modeloutput.coloring Shades reach segments with

different colors and generates

corresponding legend.

Permit Compliance System,

Permitted Discharges 1991-

96, Permitted Discharges

Parameter Table 1991-96,

Reach File, V1.

visualize.modeloutput.toxroute Generates a view that contains

output from TOXIROUTE model

and some related themes.

Permit Compliance System,

Permitted Discharges 1991-

96, Permitted Discharges

Parameter Table 1991-96,

Reach File, V1.

visualize.modeloutput.qual2e Generates a view that contains

output from QUAL2E model and

some related themes.

Permit Compliance System,

Permitted Discharges 1991-

96, Permitted Discharges

Parameter Table 1991-96,

Reach File, V1.

visualize.modeloutputupdate Update script for the visualize

menu.

NONE

model.npsm.main Main script for NPSM GIS

interface. Call model.npsm.new or

model.npsm.new-RF3 to perform

NPSM modeling.

NONE
Table 1. BASINS Avenue Scripts, their Functional Descriptions and Data Needs (cont.)

Script Name Description Data Used

Page 7 of 12

model.npsm.new Writes WSD file and calls

reaches, slope, ftable, pcstable,

and newview scripts.

Permit Compliance System,

Permitted Discharges 1991-

96, Permitted Discharges

Parameter Table 1991-96,

Reach File, V1, Land Use

model.npsm.new-rf3 Writes WSD file and calls

reaches, slope, ftable, pcstable,

and newview scripts for RF3

subwatershed.

Permit Compliance System,

Permitted Discharges 1991-

96, Permitted Discharges

Parameter Table 1991-96,

Reach File, V1, Reach File,

V3, Land Use.

model.npsm.ftable Creates PTF file (stream cross

section info) for RF1

subwatersheds.

Reach File, V1

model.npsm.ftable-rf3 Creates PTF file (stream cross

section info) for RF3

subwatersheds.

Reach File, V3

model.npsm.reaches Creates RCH file for RF1

subwatersheds.

Reach File, V1

model.npsm.reaches-rf3 Creates RCH file for RF3

subwatersheds.

Reach File, V3

model.npsm.slope Calculates slope values for the

WSD file.

Reach File, V1

model.npsm.slope-rf3 Calculates slope values in the

WSD file for RF3 subwatersheds.

Reach File, V3

model.npsm.newview Creates new views at end of

NSPM execution.

None

model.npsm.pcstable Createsthe PSR file for RF1

subwatersheds.

Permit Compliance System,

Permitted Discharges 1991-

96, Permitted Discharges

Parameter Table 1991-96.

model.npsm.pcstable-rf3 Createsthe PSR file forRF3

subwatersheds.

Permit Compliance System,

Permitted Discharges 1991-

96, Permitted Discharges

Parameter Table 1991-96.

Utilities

model.npsm.addtheme Main script for add theme button. NONE

model.npsm.addlanduse Adds landuse themes to basins

view.

landuse data

model.npsm.addwatershed Add delineated subwatershed

boundary themes to basins view.

subwatershed boundaries

model.npsm.addwatershed-rf1 Finalizes importing RF1

subwatershed boundary themes to

basins view.

subwatershed boundaries,

Reach File, V1
Table 1. BASINS Avenue Scripts, their Functional Descriptions and Data Needs (cont.)

Script Name Description Data Used

Page 8 of 12

model.npsm.addwatershed-rf3 Finalizes importing RF3

subwatershed boundary themes to

basins view.

subwatershed boundaries.

Reach File, V3

basins.re-classifylanduse Selects the landuse to be reclassified and call sub-script

basins.re-classifylanduseentiretheme or basins.reclassifylanduse-selected to

reclassify the land use.

landuse data

basins.re-classifylanduseentirethemeReclassifies the entire land use

theme.

landuse data

basins.re-classifylanduseselectedReclassifies the selected land use

theme.

landuse data

basins.re-classify_dem Reclassifies DEM. User enters top

and bottom percentage values

(spotlights ridges and valleys). 

The standard deviation for current

extent is calculated and divided by

the percentages to yield the

interval for the outer classes. 

Middle classes just use the

standard deviation as is.

DEM (polygon) data

query-waterquality Lookup table for water quality

criteria.

Water Quality Criteria Table

query-storetagency Lookup table for STORET Agency

Codes.

STORET Agency Codes

query.siccode Lookup table for SIC codes Standard Industrial

Classification Codes

query.projection Lookup for projection and datum

parameters.

None
Page 9 of 12

Table 2. Data Fields Used by BASINS Tools and Models, and their Format

Table Name Field Name Field Type Field Width Decimal

Target, Assess and Data Mining

PCS Primary Attribute Table Shape Shapepoint 6 0

Id Char 30 0

Mad_id Decimal 12 0

Fac_id Char 12 0

Facility_n Char 60 0

Madi Char 60 0

Prs1 Decimal 16 6

Prs2 Decimal 16 6

Bcu Char 8 0

Npdes Char 16 0

Cu Char 16 0

PCS Loading Table Npdes Char 9 0

Parameter Char 7 0

Lbye Decimal 17 6

Bcu Char 8 0

PCS Parameter Table Parameter Char 13 0

Pram_name Char 70 0

Chemical_n Char 45 0

Cas_number Char 24 0

WQ Primary Attribute Table Shape Shapepoint 6 0

Id Char 28 0

Agency Char 8 0

Location Char 48 0

Bcu Char 8 0

Wrs1 Decimal 16 6

Wrs2 Decimal 16 6
Table 2. Data Fields Used by BASINS Tools and Models, and their Format (cont.)

Table Name Field Name Field Type Field Width Decimal

Page 10 of 12

WQ Summary Data Table Id Char 28 0

Station Char 15 0

Agency Char 8 0

Bwqid Decimal 12 0

Parameter Char 5 0

No_obs Decimal 8 0

Mean Decimal 16 7

A15th_p Decimal 16 7

A25th_p Decimal 16 7

A50th_p Decimal 16 7

A75th_p Decimal 16 7

A85th_p Decimal 16 7

Std Decimal 16 7

Bcu Char 8 0

WQ Parameter Table Parm_code Char 9 0

Parm_name Char 48 0

Units Char 20 0

Sample_typ Char 40 0

Up_ref_lvl Decimal 10 2

Lw_ref_lvl Decimal 10 2
Table 2. Data Fields Used by BASINS Tools and Models, and their Format (cont.)

Table Name Field Name Field Type Field Width Decimal

Page 11 of 12

Models

Reach File, V1 Primary

Attribute Table

Rivrch Char 11 0

Type Char 1 0

Divergence Code Decimal 1 0

Milept Decimal 13 6

Length Decimal 13 6

Segl Decimal 13 6

Ulcsm Char 11 0

Urcsm Char 11 0

Dscsm Char 11 0

Ccsm Char 11 0

Mnflow Decimal 18 6

Mnvelo Decimal 18 6

Svtnflow Decimal 18 6

Svtnvelo Decimal 18 6

Lev Decimal 2 0

Pname Char 30 0

Pslope Decimal 19 5

Pdepth Decimal 19 5

Pwidth Decimal 19 5

Pmile Decimal 13 6

Ptemp Decimal 19 5

Pph Decimal 19 5

Pk1 Decimal 19 5

Pk2 Decimal 19 5

Pk3 Decimal 19 5

Pmann Decimal 19 5

Psod Decimal 19 5

Pbgdo Decimal 19 5

Pbgnh3 Decimal 19 5

Pbgbod5 Decimal 19 5

Pbgnbod Decimal 19 5

Ptopele Decimal 19 5

Pbotele Decimal 19 5
Table 2. Data Fields Used by BASINS Tools and Models, and their Format (cont.)

Table Name Field Name Field Type Field Width Decimal

Page 12 of 12

Reach File, V3 Primary

Attribute Table

Cu Decimal 8 0

Seg Decimal 4 0

Mi Char 5 0

Length Decimal 12 3

Reachtype Char 1 0

Level Decimal 2 0

Divergence Decimal 1 0

Pname Char 30 0

Segl Decimal 6 2

rf3rchid Char 17 0

Dsrf3rchid Char 17 0

Curf3rchid Char 17 0

Ulrf3rchid Char 17 0

Urrf3rchid Char 17 0

Divrf3rchi Char 17 0

PCS Primary Attribute Table Facility_n Char 60 0

Npdes Char 16 0

Cuseg Char 13 0

Mi Decimal 7 2

PCS Parameter Table

(PCS_PARM)

Parameter Char 5 0

Pram_Name Char 70 0

PCS Loading Table

(PCS_LOAD)

Npdes Char 9 0

Parameter Char 5 0

Load (lbs/hr) Decimal 17 6

IFD Npdes Char 9 0

Flow (cfs) Decimal 20 6

Landuse Area Decimal 18 5

LuCode Char 2 0

Land use name (level2) Level2 Char 25 0