(content link) weather.gov    
NOAA link
National Weather Service
  NWS link
National Operational Hydrologic
Remote Sensing Center

NOHRSC Technology > NOHRSC GIS Applications > IHABBS

Integrated Hydrologic Automated Basin Boundary System
Operational Notes

The Batch File Format

IHABBS has the capability to delineate multiple basins at a time using a specified batch file. The following details its layout.

Records are separated by newlines, and within each record, fields are separated by a '|' character (with a '|' at the end of the last field). Therefore no field may contain a '|' as data. The format for each record is as follows:

Fld Format Size Description Examples
001 String 1-5 River Forecast Center acronym ABRFC
002 String 1-5 COMS Handbook 5 ID for outlet point CARC1
003 String 1-8 SHEF ID for the associated basin RIVRUPPR
004 String 0-3 CWA ID for the outlet point AMA
005 String 0-32 Forecast Group for the associated basin ABDA
006 String 1 Point type: 'f'=forecast, or 'd'=datapoint. f
007 Integer 2 Latitude degrees north (without sign) 39
008 Integer 2 Latitude minutes north 45
009 Integer 2 Latitude seconds north 03
010 Integer 2-3 Longitude degrees west (without sign) 106
011 Integer 2 Longitude minutes west 13
012 Integer 2 Longitude seconds west 59
013 String 0-80 Description Carrol River
014 Decimal 0-10 Drainage basin area in square miles
(This field is no longer used)
015 String 0-40 User-defined attributes.
May be used by the user for any purpose.


WGRFC|VJUT2|VJUT2|FTW|LBRA|d|30|48|00|96|36|00|Valley Junction - Brazos R|||
WGRFC|BBZT2|BBZT2|HOU|LBRA|f|30|37|36|96|32|38|Bryan - Brazos River|||
WGRFC|SOMT2|SOMT2|HOU|LBRA|d|30|19|20|96|31|32|Somerville Lake - Yegua Ck|||
WGRFC|SMVT2|SMVT2|HOU|LBRA|d|30|19|18|96|30|26|Somerville - Yegua Ck|||

Making a batchfile from an existing basin layer

It is possible to create a batchfile from an existing basin layer by running one of the following scripts:

  • Download make_batchfile script.

  • Make sure the downloaded script is executable by typing:
         chmod u+x make_batchfile
    and also make sure the "psql" PostgreSQL command line utilitye is also available. (The script will check for this.) The syntax of this shell script is:
          make_batchfile {name of basin layer} {output file}
  • Download makebatch.sql.

  • Edit the last line of the script, changing the word "basintable" to the name of the table that you typed in for the basin layer you'd like to make into a batch file. If you've forgotten this table name, you can find it listed as the "Object attribute table" in the basin's .hdr file, under the basin/vector directory.

  • Make sure you are on a machine that has dbaccess, then run dbaccess from the directory containing the makebatch.sql file. Select Query-Language, and choose the gisrs database. Select Choose -> makebatch and Run it. The result will be a file called "batchfile", in the current directory. You can rename this and put it wherever you like.

When you run IHABBS and choose to do a batch delineation from "Batchfile", the result will be a basin layer identical to the original one, except that no edits, non-contributing area definitions or rain-on-reservoir basins will carry through.

If you have two or more basin layers that you would like to combine into a single layer, this can be done by running the script for each layer, and merging the resulting batch files into one. Then when you do a batch delineation, you will get a single basin layer with all the basins represented.

Delineating tailwater basins in isolation

If you want to delineate a tailwater basin on a clean slate (i.e. no upstream basins have been delineated yet), and you have an idea where you want the delineation to stop (i.e. don't delineate above point x on the channel), here's what you do:

  1. Go to the Edit menu.
  2. Go to Define Non-Contributing Area.
  3. Draw a small polygon on the channel at the point where the basin delineation should stop. The polygon need only encompass that one flow direction cell on the river. You can be sloppy, but make sure the polygon does not encompass flow direction cells that contribute to your target basin.
  4. Go to Define basin using mouse (or keyboard).
  5. Define your target basin discharge point and other parameters.
  6. Press OK, making sure the "Include NCA" button is NOT selected.
  7. The basin should delineate.
  8. If you plan on delineating other basins, go to Undefine Non-Contributing Area and get rid of the non-contributing area that was just defined.

IHABBS and Unit Hydrograph

IHABBS is important to the Unit Hydrograph application in that it creates the basin boundaries that are used by the latter program. Unit Hydrograph takes the geometry created by IHABBS and constructs a unit hydrograph by routing water over the surface of the basin.

However, the resulting hydrograph can be rendered inaccurate if the basin geometry is edited after the hydrograph is generated. Deleting the basin will obviously affect the relevance of the hydrograph as well. If the user makes changes to the basin layer that impacts generated hydrographs, IHABBS will flash a warning screen before the layer can be saved. This dialog will show the altered basins and the hydrographs that will be affected. It is then up to the user to recalculate those hydrographs in the Unit Hydrograph program.

Temporary files

Temporary files are created in order to hold dynamically changing or sensitive data. Vector and raster layers are copied over to temporary files so that they will not be compromised during IHABBS execution. In addition, new basin layers are held in temporary files until they are gven a name. These files are created on either a File->New or File->Open command. They are copied over to permanent files and deleted on File->Exit. Temporary files are as large as the permanent files they represent. There should be enough extra storage space to accomodate them during IHABBS execution.

The working directories where temporary files are created are:

The temporary files are named dynamically as a numerical sequence, for instance:


On exiting IHABBS, a warning may be given regarding the presence of temporary data files. This is meant to inform the user that files may exist that are not needed and are merely taking up disk space. IHABBS normally cleans up all of its temporally files before exiting. But if for any reason IHABBS is terminated in any other way (via a control-C, for instance), temporary files will be left behind. It is upon exiting a properly terminated IHABBS session that such previously generated files are detected.

HOWEVER, care should be taken before manually deleting temporary files that no other user is currently running IHABBS. If temporary files are deleted while IHABBS is running, it will abort abnormally.

If the Temp Data Files Found message is displayed, click OK and exit IHABBS. Then, after checking that no other IHABBS sessions are currently running, rm all files with the .tmp extension from the

If for any reason you exit from IHABBS abnormally, you may check for the presence of temporary files and remove them before starting up a new session.

Mission Statement  |  Contact

National Weather Service
National Operational Hydrologic Remote Sensing Center
Office of Water Prediction
1735 Lake Drive W.
Chanhassen, MN 55317

NOHRSC homepage
Contact NOHRSC
Information Quality
Page last modified: Aug 10, 2011 - cloud
About Us
Privacy Policy
Career Opportunities