README HYSEP Hydrograph Separation Program HYSEP - Version 2.2 1997/06/10 hysep2_2.exe - self-extracting DOS distribution prepared on an IBM-compatible PC This DOS version of HYSEP must be installed and run using the DOS operating system directly or using an MS-DOS Command Prompt window. TABLE OF CONTENTS A. SYSTEM REQUIREMENTS B. DESCRIPTION C. DOCUMENTATION D. INSTALLING o Installing HYSEP o HYSEP directory structure o Making HYSEP easily accessible E. RUNNING THE PROGRAM F. TESTING G. GRAPHICAL OUTPUT o Sending graphical output to a printer o Sending graphical output to a plotter o Important notes o Initialization file INTERACT.INI H. KNOWN BUGS I. CONTACTS A. SYSTEM REQUIREMENTS For installation of HYSEP, 2.7 megabytes of free disk space is needed. To run HYSEP, the following are necessary: - 386 or greater processor - math coprocessor - 5.8 megabytes of combined free extended memory and free disk space on installation drive (the greater proportion available as memory, the better performance will be) - at least 363K free disk space in current working directory For proper appearance of the HYSEP screens, the ANSI.SYS device driver must be loaded. Without it, the screens will be unreadable. CONFIG.SYS (or CONFIG.NT on Windows NT systems) must contain a line such as DEVICE=C:\WINDOWS\COMMAND\ANSI.SYS Determine the location of the ANSI.SYS driver on your system and substitute the pathname of that location if not C:\WINDOWS\COMMAND as shown above. Note that for DOS-only and Windows 3.x systems, the ANSI.SYS driver is normally found in C:\DOS. On Windows NT systems, the ANSI.SYS driver is normally found in %SystemRoot%\system32. Reboot your system if you modify CONFIG.SYS; on Windows NT systems, simply initiate and use a new MS-DOS Command Prompt window after modifying CONFIG.NT. B. DESCRIPTION Performs hydrograph separation, estimating the ground-water, or base flow, component of streamflow. The program provides an automated and consistent method for estimating base flow. Any of the three hydrograph-separation techniques of Pettyjohn and Henning (1979) can be used: fixed interval, sliding interval, or local minimum. C. DOCUMENTATION Sloto, R.A., and Crouse, M.Y., 1996, HYSEP: A computer program for streamflow hydrograph separation and analysis: U.S. Geological Survey Water-Resources Investigations Report 96-4040, 46 p. D. INSTALLING Installing HYSEP ---------------- To install HYSEP from the self-extracting executable, follow the steps below, replacing with the drive letter where you want to install HYSEP and optionally replacing [directory] with the name of a directory on that drive: 1. If you are not in the directory where the distribution file is located, go there. For example: c: cd \wrdapp 2. Extract the files contained in the distribution file using the command: hysep2_2 -d :\[directory] Note: be sure to include the -d option and ":\" in the command. Examples are: hysep2_2 -d c:\ hysep2_2 -d c:\wrdapp 3. Go to the newly-created hysep2.2 directory where the files have been extracted. For example: c: cd \wrdapp\hysep2.2 4. Complete the installation by typing, install :[\directory] using the same drive letter and directory name as for extracting the files; however, if the files are located in the root directory of the installation drive, don't include the backslash. Examples are: install c: install c:\wrdapp The above install command must run successfully in order to create the batch files, hysep2.2\bin\hysep.bat and hysep2.2\test\hysep.bat which are necessary for successful execution of HYSEP. Be sure that no errors occur when executing the above install command. HYSEP directory structure ------------------------ The following directory structure will be created (the contents of each directory are shown to the right): hysep2.2 copy of this README file `-----bin compiled executable, batch file to run program `-----bin_data files required during execution `-----doc documentation files `-----test batch file to run program; used to run verification tests `-----data standard data sets used in verification tests Note: It is recommended that no user files be kept in the hysep2.2 directory structure. If you plan to put files in the hysep2.2 directory structure, do so only by creating subdirectories under hysep2.2. Making HYSEP easily accessible ----------------------------- To make the HYSEP program accessible from any directory, the hysep2.2\bin directory should be included in the PATH environment variable. On Windows 9x systems, add a line similar to the following to AUTOEXEC.BAT: set PATH=%PATH%;C:\hysep2.2\bin Substitute the appropriate drive letter and pathname if not C:\ as shown above. Reboot your system after modifying AUTOEXEC.BAT. On Windows NT systems, select System from the Control Panel, select the Environment tab, and modify the value for Path. Initiate and use a new MS-DOS Command Prompt window after modifying Path. E. RUNNING THE PROGRAM After the hysep executable is properly installed (see INSTALLING, above), the program can be executed with the command "hysep". F. TESTING Test data sets are provided to verify that the program is correctly installed and running on the system. The tests may also be looked at as examples of how to use the program. Tests are run in the hysep2.2\test directory. The directory hysep2.2\data contains the input data and the expected results for each test. After each test is completed, compare the results to the expected results using a file comparison utility such as fc. If all goes well, there should be no differences. To clean up after the tests, type the command: clean Run the tests by following the steps below. Tests 1-4: - Execute HYSEP by typing "hysep" in the hysep2.2\test subdirectory. - On the opening screen, type "@". In the small panel that appears, type "..\data\testN.log" where N is the number of the test, 1-4. - HYSEP will be run using the keystrokes in ..\data\testN.log as if they were typed in. When plots are displayed and remain on the screen for viewing, press the Enter key for the program to continue. - The output files shown in the table below will be produced. Compare these files to their counterparts found in the hysep2.2\data subdirectory. The tests are described in the table below, where 'test' is the test number, 'program' is the program used to run the test, and the 'usage' column indicates how a file is used, with i for input, o for output, and i/o for both input and output. test program description of test and files file name & usage ---- ------- --------------------------------- ----------------- 1 hysep base-flow separation using local minimum method; ASCII input file in WATSTORE daily values format; output of annual and monthly summaries of hydrograph separation and frequency, flow-duration, and seasonal-distribution tables where base flow given in default units of Mgal/d/mi2 hysep command file test1.log i WATSTORE input file french.gsd i print file of summaries and tables test1.prt o 2 hysep base-flow separation, sliding interval method; binary input file in WDM format; output of annual and monthly summaries where base flow given in units of Mgal/d; output of base flow and surface runoff to WDM data sets hysep command file test2.log i WDM input file french.wdm i/o print file of summaries test2.prt o 3 hysep base-flow separation, fixed interval method; ASCII input file in WATSTORE daily values format; output of annual summary where base flow given in units of ft3/s/mi2; output of base flow and surface runoff to ASCII files in WATSTORE daily values format; hydrographs displayed to screen hysep command file test3.log i WATSTORE input file french.gsd i print file of annual summary test3.prt o base flow, WATSTORE format test3.bsf o surface runoff, WATSTORE format test3.sro o 4 hysep base-flow separation, local minimum method; ASCII input file in WATSTORE daily values format; starting month for analysis changed to January; output of annual and monthly summaries; numerical output converted to metric units; frequency- distribution plot, flow-duration plot, and seasonal bar graph generated hysep command file test4.log i WATSTORE input file french.gsd i print file of summaries test4.prt o G. GRAPHICAL OUTPUT Graphical output is generated using the INTERACTER graphics library from Interactive Software Services, which is bundled in with the program executable. Graphical output may be displayed on the screen or output to a printer or pen plotter. When the printer or plotter is the selected graphical output device, output will appear on the screen simultaneously and there may be some delay as the printer or plotter output is generated. Pressing the Enter key to clear the graphic from the screen is not necessary as when the screen is the selected output device. Sending graphical output to a printer ------------------------------------- When the printer is the selected graphical output device, graphical output can be (1) sent directly to the printer, (2) written to a file specifically formatted for the printer, or (3) written to a PostScript file. Graphical output will be sent directly to the printer by default and will be directed to the parallel port PRN (LPT1). This means that, to send graphical output directly to the printer, the printer must be connected to PRN or PRN must be associated with a network printer. Additionally, the specific printer in use with the PC must be defined in the file "INTERACT.INI" (see below). However, if the printer is a PostScript printer, no printer type need be specified in INTERACT.INI; instead, in the directory in which you are running HYSEP, create a file named "TERM.DAT" that contains the line "GKSPRT 4". Alternatively, graphical output can be written to a file that can be sent to the printer at a later time. To have graphical output written to a file specifically formatted for the printer, create a file named "TERM.DAT" that contains the line "GKSPRT 5" in the directory in which you are running HYSEP. The specific printer in use with the PC must be defined in the INTERACT.INI file. Graphical output will be written to a file named "INTERACT.PLT". Note that INTERACT.PLT will be a binary file which may or may not require special procedures for sending to a printer. For example, if INTERACT.PLT were to be sent to a printer by copying the file to the parallel port to which the printer is connected, it would be necessary to use the /B switch to indicate that it is a binary file, e.g., COPY /B INTERACT.PLT PRN. To have graphical output written to a PostScript file, create a file named "TERM.DAT" that contains the line "GKSPRT 6" in the directory in which you are running HYSEP. No printer type need be specified in INTERACT.INI. Graphical output will be written to the file INTERACT.PLT which can be sent to a printer as any plain ASCII (text) file. Sending graphical output to a plotter ------------------------------------- Plotter output, in plain ASCII HP-GL format, cannot be sent directly to a plotter but is always placed in INTERACT.PLT. If a plotter is connected to a serial port on the PC, INTERACT.PLT can be copied to that port, e.g., COPY INTERACT.PLT COM1. Important notes --------------- Note that graphical output written to INTERACT.PLT overwrites any previous contents. To generate multiple graphical output files in a single program session, it is necessary to rename INTERACT.PLT to a unique file name after each plot is generated. In Windows, this could be done in File Manager, Windows Explorer, or in a second, separate MS-DOS Command Prompt window from that in which HYSEP is run. Note also that changes made to the files TERM.DAT and INTERACT.INI must be made prior to initiating a program session in order for those changes to take effect. Initialization file INTERACT.INI -------------------------------- The file INTERACT.INI is used to identify the specific printer and (or) plotter in use with the PC. An example INTERACT.INI (shown below) is included in the hysep2.2\bin_data subdirectory and is copied into the current working directory upon execution of HYSEP unless a file by the same name already exists. Modify the copy of INTERACT.INI in the directory in which you are running HYSEP as described below to identify the specific printer and (or) plotter in use with your PC. The example INTERACT.INI distributed with HYSEP contains the following lines: charset = simplexr.chr printer = 28 plotter = 11 The value assigned to "printer" can be any one of the following values; choose the value appropriate for the printer in use with your PC: 2 - IBM Graphics printer/80 columns 3 - Panasonic KX-P1081 4 - Amstrad DMP 3000 5 - Epson FX type/80 columns 6 - Epson FX type/wide carriage 7 - Epson MX type/80 columns 8 - Epson MX type/wide carriage 9 - Shinwa CP80 10 - HP LaserJet + 11 - HP LaserJet II 12 - IBM Graphics printer/wide carriage 13 - HP PaintJet 14 - HP DeskJet (inc. DeskJet+ and DeskJet 500) 15 - IBM Proprinter/80 columns 16 - IBM Proprinter/wide carriage 17 - Epson LQ type/80 columns 18 - Epson LQ type/wide carriage 19 - IBM Proprinter X24/80 columns 20 - IBM Proprinter X24/wide carriage 21 - HP DeskJet 500C 22 - HP DeskJet 500 23 - Epson JX type/80 columns 24 - Epson JX type/wide carriage 25 - Epson LQ/color 80 columns 26 - Epson LQ/color wide carriage 27 - DEC LN03/LN03+ (ANSI text mode) 28 - HP LaserJet III The value assigned to "plotter" can be any one of the following values; choose the value appropriate for the printer in use with your PC: 1 - Unspecified HP-GL compatible plotter 2 - Hewlett Packard 7475A using A4 paper 3 - Hewlett Packard 7475A using A3 paper 4 - Epson HI-80 with HP emulation ROM 5 - Facit 4550 A4 6 - Hewlett Packard 7440A A4 (HP Colorpro) 7 - Hewlett Packard 7550A using A4 paper 8 - Hewlett Packard 7550A using A3 paper 9 - Facit 4551 A4 paper 10 - Facit 4551 A3 paper 11 - HP LaserJet III in HP-GL/2 mode (the HPGL output produced will contain escape sequences at the start and end of the file to switch the printer into and out of HP-GL/2 mode) H. KNOWN BUGS There are a few known annoyances in producing graphical output which will be addressed in the next release of HYSEP: 1) When displaying graphical output to the screen, plots are held on the screen for viewing until Return (Enter) is pressed. When a subsequent plot is to be displayed, an additional text screen is displayed with the instruction, "Use 'Accept' command to continue when done viewing plot." This provides an additional but unnecessary pause in program execution. (On UNIX systems where plots are displayed in a separate window, the display of the text screen provides a necessary pause between the display of multiple plots that would otherwise be drawn in quick succession.) 2) When graphical output is directed to a printer or plotter, it is simultaneously displayed on the screen and normally disappears automatically from the screen as soon as generation of the graphical output is completed. In HYSEP, the simultaneous screen display does not disappear but remains on the screen with the instruction, "Press Return (Enter) when finished viewing plot." Graphical output will still be successfully directed to the printer or plotter but the "Press Return" instruction will unfortunately be included above the plot. 3) The hatch style used in the seasonal bar chart of monthly mean flows is not optimal. 4) If a PostScript file is created of the seasonal bar chart, the hatch color will be pink instead of black. The latter three problems above can be manually corrected by selecting "PLOTTER" as the output device--HP-GL output will be placed in the file INTERACT.PLT which can then be read into a number of drawing packages for manual modification of plot features. I. CONTACTS Inquiries about this software distribution should be directed to: U.S. Geological Survey Hydrologic Analysis Software Support Program 437 National Center Reston, VA 20192 e-mail: h2osoft@usgs.gov