May 07, 1997 PHREEQE - Version: 2.4 1994/06/27 PHRQINPT - Version: 2.4 1995/08/28 A program for geochemical calculations NOTE: PHREEQE is now obsolete and has been replaced with the program PHREEQC. For assistance, enhancement requests, or bug reports contact the Hydrologic Analysis Software Support Team via email at h2osoft@usgs.gov. See the file doc/phreeqe.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: phreeqe2.4.DGUX.tar.gz - Compiled for Data General AViiON under DG/UX 5.4 phreeqe2.4.Solaris.tar.gz - Compiled for Sun UltraSPARC 2 under Solaris 2.5 phreeqe2.4.source.tar.gz - Source code B. EXTRACTING FILES The compressed tar file, named phreeqe2.4.OS.tar.gz, contains all the files needed to install and test PHREEQE 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 phreeqe2.4.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 phreeqe2.4 is created (or overwritten) when the files are extracted from the tar file. If the phreeqe2.4 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 phreeqe2.4.____.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 phreeqe2.4.____.tar.gz 4. Extract the distribution files from the tar file. For example: tar -xof phreeqe2.4.___.tar This creates the following directory structure (the contents of each directory are shown to the right): phreeqe2.4 ; copy of this README file `-----bin ; compiled executables and scripts `-----bin_data ; data files required during execution `-----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 phreeqe2.4.source.tar.gz distribution (it is created during compilation). b) Source code is included only with the phreeqe2.4.source.tar.gz distribution. c) It is recommended that no user files be kept in the phreeqe2.4 directory structure. If you do plan to put files in the phreeqe2.4 directory structure, do so only by creating subdirectories of phreeqe2.4. C. COMPILING 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. If you have retrieved a pre-compiled distribution of the software, skip to the Installing section below. The source code is provided in the phreeqe2.4.source.tar.gz distribution so that users can generate the executable 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. To generate new executables, do the following: 1. Change directory to the source directory: cd phreeqe2.4/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 phreeqe2.4/bin and BINDIR if they do not already exist, b. compile the source code, c. place the executables (phreeqe.exe and phrqinpt.exe) in phreeqe2.4/bin, d. update the pathname in the scripts (phreeqe and phrqinpt) in phreeqe2.4/bin, and e. place links to the scripts in BINDIR if specified. D. INSTALLING To make the PHREEQE programs easy to use, they should be installed in a directory included in the user's search path. The programs are executed using UNIX scripts phreeqe and phrqinpt located in the phreeqe2.4/bin directory. These scripts each have a hard-coded pathname that must be set to the installation directory before accessing the software. The Makefile (input instructions to the UNIX make program--located in phreeqe2.4/src) contains instructions to automatically update these pathnames and to optionally place links in a specified directory to the scripts. Use the following two commands to do this: cd phreeqe2.4/src make install [BINDIR=directory_for_links] If BINDIR is specified, links to the scripts 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 scripts 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 PHREEQE scripts, the installer must have sufficient rights in the directory that BINDIR is set to. E. RUNNING THE SOFTWARE After PHREEQE is properly installed in a directory that is included in your PATH, it can be executed with the command: phreeqe [input_file [output_file ] [data_base]]] where input_file - The name of the file in phreeqe input format. output_file - The name of the file that will contain PHREEQE results. data_base - The name of the PHREEQE data base. If no arguments are specified, the program prompts for the input, output, and data base file names. If only input_file is specified, then output_file defaults to infile.out and the data_base to phreeqe.dat in the phreeqe2.4/bin_data directory. F. TESTING A test data set is provided to verify that the program is correctly installed and running on the system. The test may also be looked at as an example of how to use the program. The directory "phreeqe2.4/test" contains the scripts to run the test. The directory "phreeqe2.4/data" contains the input data and expected results for each test. The test is usually run in the directory "phreeqe2.4/test", but it can be run in any user directory if the installation procedure was completed (make install performed). To test the installation, change to the phreeqc1.1/test directory and type the command: ./test.sh If running from another directory, specify the full path to the script; for example: /usr/opt/wrdapp/phreeqe2.4/test/test.sh. After the test is 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 test is 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 phreeqe Change data base and speciate seawater PHREEQE input file phreeqe1.dat i response file for program prompts go i summary of processed data phreeqe1.out o log of screen output from program phreeqe1.log o * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Good Luck! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *