What is needed ?
a) calculate the flow accumulation
xxxfac = flowaccumulation (xxxfdr )
b) find out the multiplication number that is equal to the cell area multiplied by unit conversion factor. For example if the cell size is 500 m and we want area in square kilometers the multiplication factor will be a = 0.5 * 0.5 = 0.25 (If we want area in mi2, a = 0.25 * 0.3861 = 0.096525)
c) calculate area (here in km2)
xxxarea = xxxfac * 0.25
xxxargs = con (xxxgs > 0 , xxxarea )
This step is required to create a value attribute table VAT. The integer grid will not have decimal part, thus if the precision higher than 1 km2 is needed before using INT function, the grid xxxargs must be multiplied by a number large enough to preserve required number of decimal places. For example, to have precision of 1 ha, grid xxxargs must be multiplied by 100. Here, the precision of 1 km2 is high enough.
xxxargsi = int ( xxxargs )
If the VAT has not been created automatically, it must be created by applying buildvat command
buildvat xxxargsi
xxxcom = combine (xxxgs, xxxargsi )
The VAT table should contain the standard items: count and value, as well as the following items:
one that contains USGS estimates of drainage area, and the other that contains drainage area estimated from DEM (grid xxxcom). JOINITEM command requires that the items that contain station id (merge-item) must have identical names, widths, types and other parameters. ArcView does not have such requirements to perform joining two tables.
joinitem xxxcom.vat usgs.pat xxxcom.vat station_id station_id
The percentage error is calculated utilizing the following formula:
error = 100 * (A - B ) / B
Where: A is the estimated drainage area and B is the USGS area.
1) The calculations may be performed within ArcInfo TABLES processor.
The dialog may look like follows (usgsarea is the item that contains the drainage area from USGS record):
additem xxxcom.vat xxxcom.vat error 8 12 f 2 usgsarea
tables select xxxcom.vat
calculate error = 100 * ( usgsarea - xxxargsi ) / usgsarea
2) The error can be calculated using grid algebra.
Two grids are required:
The following line shows exemplary GRID dialog that calculate the percentage error:
error = 100 * ( usgsgrid - xxxarea ) / usgsgrid
where error is the grid that contains error.
There are three possible causes of the error:
I assume that the numbers published by the USGS are good ( but ... you never know) To solve the problem (1) the stations need to be moved into new location. The problem (2) is more serious. It can not be solved just by deleting the station. It requires editing the flow direction grid (or elevation grid) to create "proper" flow path delineation.
How to find out if the watershed boundaries are correct ?
How to correct errors ?
Pawel, May 1996