README March 1, 1996 PRMS Precipitation-Runoff Modeling System PRMS - Version 2.1 1996/03/01 prms2.1.DGUX.tar.gz - Distribution prepared on a Data General AViiON under DG/UX 5.4 prms2.1.source.tar.gz - Distribution that includes the source code but no compiled software TABLE OF CONTENTS A. DESCRIPTION B. DOCUMENTATION C. EXTRACTING FILES D COMPILING E. INSTALLING F. RUNNING THE PROGRAM G. TESTING H. CONTACTS A. DESCRIPTION The precipitation-runoff modeling system (PRMS) is a modular-design, deterministic, distributed-parameter modeling system developed to evaluate the impacts of various combinations of precipitation, climate, and land use on streamflow, sediment yields, and general basin hydrology. Basin response to normal and extreme rainfall and snowmelt can be simulated to evaluate changes in water-balance relationships, flow regimes, flood peaks and volumes, soil-water relationships, sediment yields, and ground-water recharge. Parameter optimization and sensitivity analysis capabilities are provided to fit selected model parameters and evaluate their individual and joint effects on model output. The modular design provides a flexible framework for continued model-system enhancement and hydrologic-modeling research and development. B. DOCUMENTATION Leavesley, G.H., Lichty, R.W., Troutman, B.M., and Saindon, L.G., 1983, Precipitation-Runoff Modeling System: User's Manual: U.S. Geological Survey Water-Resources Investigations Report 83-4238, 207 p. C. EXTRACTING FILES Compressed tar files are used to distribute pre-compiled versions of the software and the source code. All of the files needed to install prms2.1 are contained in the files prms2.1.______.tar.gz (where ______ is a string indicating the file contains either the source code or a pre-compiled version of the program for the indicated operating system). The source version of the tar file contains the source code and all other files needed to compile and install the software on a UNIX-based computer. For either type of distribution, the directory prms2.1 will be created (or overwritten) when the files are extracted from the tar tape. If the prms2.1 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. Steps in extracting files explanation ---------------------------------------- ----------------------------------- mv prms2.1.____.tar.gz /usr/opt/wrdapp If the tar file is not already in the directory where you want the distribution installed, move it there. cd /usr/opt/wrdapp If you are not in the directory where the tar file is located, go there. gunzip prms2.1.____.tar.gz Uncompress the distribution file. tar -xof prms2.1.____.tar Extract the distribution files from the tar file. This creates the following directory structure (the contents of each directory are shown to the right): prms2.1 copy of this README file `-----bin compiled executable `-----doc documentation files (see file Contents) `-----src Makefile (and, with source tar, the source code) `-----test scripts to run verification tests `-----data standard data sets used in verification tests Notes: a) The bin subdirectory is not included in the prms2.1.source.tar.gz distribution, it is created during compilation. b) Source code is included only with the prms2.1.source.tar.gz distribution. c) It is recommended that no user files be kept in the prms2.1 directory structure. If you plan to put files in the prms2.1 directory structure, do so only by creating subdirectories under prms2.1. d) The software is configured for installation under the directory /usr/opt/wrdapp. The wrdapp directory may be a separate file system mounted at /usr/opt/wrdapp. If you choose to install the software elsewhere, you will need to retrieve the source version of the tar file and compile the software. e) To compile a new version of the software, you will also need: (1) libraries and other data files from the lib3.0 library (lib3.0.______.tar.gz), and( 2) ANSI-compliant Fortran 77 compiler. D. COMPILING If you have retrieved a pre-compiled distribution of the software, skip to the Installing section below. If a compiled version of the software is not available for your computer, or if you want to build the executable yourself, follow the instructions in this section. The source code is provided in the prms2.1.source.tar.gz distribution so that users can generate the executable themselves. Little or no support can be provided for users generating their own versions of the software. In general, the requirements are ANSI-compliant Fortran 77 and a minimum level of knowledge of the compiler and the UNIX operating system. A Graphical Kernel System (GKS) library is required. Libraries and data files from the lib3.0 distribution are also required. As provided, the make file, source code, and text version of the message file are set up for use on Data General AViiON workstations running the DG/UX operating system. To generate a new executable and message file, do the following: 1. The values for the indicated variables in the following prms2.1 files may need to be modified (see the file prms2.1/doc/versions.doc for more details): may need to be modified ----------------------- version compiler file name variables flags name --------------------- --------- ----------- src/Makefile WrdA FFLAGS F77 xrecl.inc RLNGTH test/test.sh WrdA 2. Run the Makefile program in the src directory to compile the source and build the message file. In the directory prms2.1/src, run the make: cd prms2.1/src make The prms2.1/src/Makefile will: a. Create the directory prms2.1/bin if it does not already exist. b. Compile the source code and place the prms executable in the directory prms2.1/bin. E. INSTALLING To make the prms program easy to use, it should be installed in a directory included in the user's search path. The Makefile in prms2.1/src contains instructions to optionally place a link in a specified directory to the executable contained in prms2.1/bin. Use the following commands to do this: cd prms2.1/src make install [BINDIR=bin_path] where bin_path is the name of a directory in the user's search path. If BINDIR is specified, a link to the executable (prms2.1/bin/prms) is placed in the specified directory. If BINDIR is not specified, no link is set and the full path name of the executable is required to run the program. For example, if the search path is /usr/bin:/usr/opt/bin:/usr/local/bin, you can use the following command to install the program: make install BINDIR=/usr/local/bin Notes: a) Brackets "[xxx]" are used to indicate optional arguments to commands. b) To create and delete links to the prms executable, the installer must have sufficient rights to the BINDIR directory. F. RUNNING THE PROGRAM After the prms executable is properly installed (see Installing, above) in a directory that is included in the user's PATH, the program can be executed with the command "prms". G. 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 prms2.1/test contains the script to run the tests. The directory prms2.1/data contains the input data and the expected results for each test. Tests are usually run in the prms2.1/test directory, but they can be run in any user directory. Type the following commands to test the program installation: [path]/test.sh [start [stop]] where: path = path to the script use "." if running the tests in the prms2.1/test directory use full pathname if not running the test in prms2.1/test start = the number of the first test to perform, default = 1 stop = the number of the last test to perform, default = 9 For example: command what happens -------------------------------------- -------------------------------- ./test.sh runs all of the tests ./test.sh 1 1 runs the first test ./test.sh 2 3 runs tests 2, and 3 /usr/opt/wrdapp/prms2.1/test/test.sh runs all of the tests After the tests are completed, the results are compared to the expected results (found in prms2.1/data). See the file check.out; if all goes well, the only differences will be due to different processing times. To clean up after the tests, type the command: ./clean.sh Notes: a) Some of the tests may require input generated by a previous test, so they should be run in sequential order. 1) test 1 requires that the annie2.2 program be installed on the system. 2) tests 2 and 3 require the wdm file created in test 1. b) 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, 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 annie create the wdm file, import two files in the wdm export format annie command file test1.log i observed data for Cane Branch caneob.exp i attributes for simulated data canepr.exp i data management file cane.wdm o 2 prms Cane Branch daily simulation master file test2.mtr i model control file test2.g1 i data management file cane.wdm i/o output/print file test2.out o 3 prms Cane Branch storm simulation master file test3.mtr i model control file test3.g1 i storm period selection test3.g2 i infiltration/upland erosion test3.g3 i routing specifications test3.g4 i data management file cane.wdm i/o output/print file test3.out o H. CONTACTS Inquiries about this software distribution should be directed to: U.S. Geological Survey Hydrologic Analysis Software Support Team Kathleen M. Flynn e-mail: h2osoft@usgs.gov 437 National Center phone: 703-648-5313 Reston, VA 22092 fax: 703-648-5722