June 4, 1997 FourPt - Version 95.01 An unsteady, one-dimensional, open-channel flow model For assistance, enhancement requests, or bug reports contact the Hydrologic Analysis Software Support Team via email at h2osoft@usgs.gov. See the file doc/FourPt.txt for descriptions, references, and additional contacts for this software. Instructions for installation, execution, and testing are provided below. TABLE OF CONTENTS A. FILES B. EXTRACTING FILES C. COMPILING D. INSTALLING E. RUNNING THE SOFTWARE F. TESTING A. FILES The following distribution packages (containing the software, test data sets, and information files) are currently available for UNIX systems: FourPt95.01.DGUX.tar.gz - Compiled for Data General AViiON under DG/UX 5.4 FourPt95.01.Solaris.tar.gz - Compiled for Sun UltraSPARC 2 under Solaris 2.5 FourPt95.01.source.tar.gz - Source code The following versions of FourPt are available: fourpt.rec Simple rectangular cross sections, standard solver. fourpt.trp Simple trapezoidal cross sections, standard solver. fourpt.tbl General or irregular cross sections, standard solver. fourpti.rec Simple rectangular cross sections, indexed solver. fourpti.trp Simple trapezoidal cross sections, indexed solver. fourpti.tbl General or irregular cross sections, indexed solver. Included in directory FourPt95.01/doc is a Portable Document Format (PDF) version of the FOURPT documentation (FourPt.pdf). A PostScript version of this report is available from: http://water.usgs.gov/software/FourPt.html The PDF file is readable and printable on various computer platforms using Acrobat Reader from Adobe. The Acrobat Reader is freely available from the following World Wide Web sites: http://www.adobe.com/ http://www.shareware.com/ and by File Transfer Protocol (FTP) from the following site: ftp.adobe.com (path: /pub/adobe/acrobat) B. EXTRACTING FILES The compressed tar file, named FourPt95.01.OS.tar.gz contains all the files needed to install and test FourPt on a computer with a particular operating system, where OS is a string indicating the operating system the distribution is intended for. If a version is not available for your operating system, the file FourPt95.01.source.tar.gz contains the source code and all other files needed to compile, install, and test the software on a UNIX-based computer. For either type of distribution, the directory FourPt95.01 is created (or overwritten) when the files are extracted from the tar file. If the FourPt95.01 directory already exists, you may want to delete or rename it before extracting the files. The following are the steps to extract the files from a distribution tar file. 1. If the tar file is not already in the directory under which you want the distribution installed, move it there. For example: mv FourPt95.01.____.tar.gz /usr/opt/wrdapp 2. If you are not in the directory where the tar file is located, go there. For example: cd /usr/opt/wrdapp 3. Uncompress the distribution file. For example: gunzip FourPt95.01.____.tar.gz 4. Extract the distribution files from the tar file. For example: tar -xpof FourPt95.01.___.tar This creates the following directory structure (the contents of each directory are shown to the right): FourPt95.01 ; copy of this README file `-----bin ; compiled executables `-----doc ; documentation files `-----src ; Makefile and source code `-----test ; scripts to run verification tests `-----data ; standard data sets used in verification tests Notes: a) The bin directory is not included in the FourPt95.01.source.tar.gz distribution (it is created during compilation). b) Source code is included only with the FourPt95.01.source.tar.gz distribution. c) It is recommended that no user files be kept in the FourPt95.01 directory structure. If you do plan to put files in the FourPt95.01 directory structure, do so only by creating subdirectories of FourPt95.01. C. COMPILING If a compiled version of the software is not available for your computer, or if you want to build the executables yourself, follow the instructions in this section. If you have retrieved a pre-compiled distribution of the software, skip to the Installing section below. The source code is provided in the FourPt95.01.source.tar.gz distribution so that users can generate the executables themselves. No support can be provided for users generating their own versions of the software. In general, the requirements are a Fortran compiler and a minimal level of knowledge of the compiler and the UNIX operating system. As provided, the Makefile and source code are set up for use on Data General AViiON workstations running the DG/UX operating system. WARNING: FOURPT is coded such that local variables are expected to be static (that is, local variables need to retain their values upon exit of a routine). Thus, the appropriate compiler option(s) must be specified to produce reliable results. To generate new executables, do the following: 1. Change directory to the source directory: cd FourPt95.01/src 2. Modify the beginning of the file named Makefile to correctly specify system-dependent variables: F77 Fortran compiler name FFLAGS Fortran compiler flags 3. Use the make program to initiate compilation of the source code and installation of the software: make [BINDIR=directory_for_links] See the Installing instructions below for an explanation of BINDIR. The make will: a. create the directories FourPt95.01/bin and BINDIR if they do not already exist, b. compile the source code, c. place the executables (fourpti.trp, fourpti.rec, fourpti.tbl, fourpt.trp, fourpt.rec, and fourpt.tbl) in FourPt95.01/bin, and d. place links to the executables in BINDIR if specified. D. INSTALLING To make the executables (fourpti.trp, fourpti.rec, fourpti.tbl, fourpt.trp, fourpt.rec, and fourpt.tbl) easy to use, they should be installed in a directory included in the user's search path. The Makefile (input instructions to the UNIX make program--located in FourPt95.01/src) contains instructions to optionally place links in a specified directory to the executables contained in FourPt95.01/bin. Use the following two commands to do this: cd FourPt95.01/src make install [BINDIR=directory_for_links] If BINDIR is specified, links to the executables are placed in the specified directory. For example, if your search path consists of: /usr/bin:/usr/opt/bin:/usr/local/bin use the command: make install BINDIR=/usr/local/bin to make the executables accessible from any directory without requiring the full pathname of the software's location. Notes: a) Brackets "[xxx]" are used to indicate optional arguments to commands. b) To create and delete links to the FourPt executable files, the installer must have sufficient rights in the directory that BINDIR is set to. E. RUNNING THE SOFTWARE After FourPt is properly installed in a directory that is included in your PATH, the program is initiated using one of the following commands: fourpt.rec, fourpt.trp, fourpt.tbl, fourpti.rec, forupti.trp, or fourpti.tbl. FourPt expects the file "master.fil" to be in the current directory. This file is a look-up table of internal and user file names with corresponding Fortran unit numbers. Each field in the look-up table is limited to 12 characters. An example master file follows: netspc1.out netspc1.out 22 control.dat control.dat 27 schemat.dat schemat.dat 28 cxgeom.dat cx_tbl.dat 30 netspcz.dat netspcz.dat 31 netbnd.dat null.dat 32 netts.dat netts.dat 33 tables30.dat tables30.dat 34 temp.txt temp.txt 36 perturb.dat null.dat 37 neterror.dat neterror.dat 39 netspcq.dat netspcq.dat 40 netprint.dat netprint.dat 41 nettsq.dat nettsq.dat 42 nettsz.dat nettsz.dat 43 density.dat null.dat 44 Definitions of selected files follow: Input files: control.dat Model control input data. cx_tbl.dat Channel properties input data. schmat.dat Schematic input data. Output files: netprint.dat Log file. netspcq.dat Space series of computed discharges. netspcz.dat Space series of computed depths of flow. nettsq.dat Time series of discharge at selected sites. nettsz.dat Time series of water-surface elevations at selected sites. 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. The directory "FourPt95.01/test" contains the scripts to run the tests. The directory "FourPt95.01/data" contains the input data and expected results for each test. Tests are run in the directory FourPt95.01/test. Run the tests using any of the commands in the table below. To test the installation, change to the FourPt95.01/test directory and type the command: ./test.sh [m [n]] where: m = the number of the first test to perform, default=1 n = the number of the last test to perform, default=9 For example: command what happens ------------------ ------------------------------------ ./test.sh runs all of the tests ./test.sh n runs test 'n' through the last test ./test.sh n m runs test 'n' through 'm' After the tests are completed, the results are compared to the expected results. If all goes well, the only differences will be due to different processing times or pathnames. To clean up after the tests, type the command: ./clean.sh NOTE: the standard data sets were created on a Data General AViiON workstation. You may notice slight numeric differences in the results on other computers. These are generally due to different round-off algorithms and the different architecture of the central processing unit chip. The tests are described in the table below. 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 fourpt.rec Hypothetical example, rapid expansion Table of file names and unit numbers fourpt1.fil i Model control input data fourpt1.ctr i Channel properties input data fourpt1.geo i Schematic input data fourpt1.sch i Printed results fourpt1.prt o Space series of computed discharges fourpt1.spq o Space series of computed depths of flow fourpt1.spz o Time series of discharge at selected sites fourpt1.tsq o Time series of water-surface elevations fourpt1.tsz o Screen capture of test fourpt1.log o 2 fourpt.rec Hypothetical example, Swamprat Creek, Near Pete's Bayou Table of file names and unit numbers fourpt2.fil i Model control input data fourpt2.ctr i Channel properties input data fourpt2.geo i Schematic input data fourpt2.sch i Printed results fourpt2.prt o Space series of computed discharges fourpt2.spq o Space series of computed depths of flow fourpt2.spz o Time series of discharge at selected sites fourpt2.tsq o Time series of water-surface elevations fourpt2.tsz o Screen capture of test fourpt2.log o 3 fourpt.rec Hypothetical dam break, Swamprat Creek, Near Pete's Bayou Table of file names and unit numbers fourpt3.fil i Model control input data fourpt3.ctr i Channel properties input data fourpt3.geo i Schematic input data fourpt3.sch i Constraint input data fourpt3.cns i Printed results fourpt3.prt o Space series of computed discharges fourpt3.spq o Space series of computed depths of flow fourpt3.spz o Time series of discharge at selected sites fourpt3.tsq o Time series of water-surface elevations fourpt3.tsz o Screen capture of test fourpt3.log o 4 fourpt.rec Hypothetical example, flat-sloped 6-channel looped network; taken from Jobson and Schoellhamer, WRI 87-4163 Table of file names and unit numbers fourpt4.fil i Model control input data fourpt4.ctr i Channel properties input data fourpt4.geo i Schematic input data fourpt4.sch i Printed results fourpt4.prt o Time series of discharge at selected sites fourpt4.tsq o Time series of water-surface elevations fourpt4.tsz o Screen capture of test fourpt4.log o 5 fourpt.rec Hypothetical example, rapid expansion Table of file names and unit numbers fourpt5.fil i Model control input data fourpt5.ctr i Channel properties input data fourpt5.geo i Schematic input data fourpt5.sch i Printed results fourpt5.prt o Time series of discharge at selected sites fourpt5.tsq o Time series of water-surface elevations fourpt5.tsz o Screen capture of test fourpt5.log o 6 fourpt.rec Hypothetical example, Swamprat Creek, Near Pete's Bayou Table of file names and unit numbers fourpt6.fil i Model control input data fourpt6.ctr i Channel properties input data fourpt6.geo i Schematic input data fourpt6.sch i Printed results fourpt6.prt o Time series of discharge at selected sites fourpt6.tsq o Time series of water-surface elevations fourpt6.tsz o Screen capture of test fourpt6.log o 7 fourpt.rec Hypothetical example, flat-slope stream, known upstream and downstream Table of file names and unit numbers fourpt7.fil i Model control input data fourpt7.ctr i Channel properties input data fourpt7.geo i Schematic input data fourpt7.sch i Printed results fourpt7.prt o Time series of discharge at selected sites fourpt7.tsq o Time series of water-surface elevations fourpt7.tsz o Screen capture of test fourpt7.log o 8 fourpt.rec Hypothetical example, rapid expansion Table of file names and unit numbers fourpt8.fil i Model control input data fourpt8.ctr i Channel properties input data fourpt8.geo i Schematic input data fourpt8.sch i Printed results fourpt8.prt o Space series of computed discharges fourpt8.spq o Space series of computed depths of flow fourpt8.spz o Time series of discharge at selected sites fourpt8.tsq o Time series of water-surface elevations fourpt8.tsz o Screen capture of test fourpt8.log o 9 fourpt.rec Hypothetical dam break, Swamprat Creek, Near Pete's Bayou Table of file names and unit numbers fourpt9.fil i Model control input data fourpt9.ctr i Channel properties input data fourpt9.geo i Schematic input data fourpt9.sch i Constraint input data fourpt9.cns i Printed results fourpt9.prt o Space series of computed discharges fourpt9.spq o Space series of computed depths of flow fourpt9.spz o Time series of discharge at selected sites fourpt9.tsq o Time series of water-surface elevations fourpt9.tsz o Screen capture of test fourpt9.log o * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Good Luck! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *