May 13, 1997 PHREEQE - Version: 2.4 1994/06/27 PHRQINPT - Version: 2.4 1995/08/28 A program for geochemical calculations 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. This version of PHREEQE is packaged for use on personal computers using the DOS operating system. The installation procedures and the PHREEQE batch files must be run using either DOS directly or a DOS window within Microsoft Windows, Windows 95, or Windows NT. TABLE OF CONTENTS A. FILES B. EXTRACTING FILES C. COMPILING D. INSTALLING E. RUNNING THE SOFTWARE F. TESTING A. FILES The following self-extracting DOS distribution files (containing the software, test data sets, and information files) are currently available: phrq2_4.exe - Compiled using Lahey Fortran 90 with source code phrq2_4b.exe - Compiled using Lahey Fortran 90 (binaries only) phrq2_4s.exe - Source code only For use on personal computers, the program source code consists of the following files (found in the phreeqe2.4\src directory): phreeqe.for phrqinpt.for phreeqe.cmn phrqinpt.cm Makefile -- input instructions to the Lahey "make" utility for compiling PHREEQE and PHRQINPT B. EXTRACTING FILES For whichever PHREEQE distribution file that you have acquired, phrq2_4.exe, phrq2_4b.exe, or phrq2_4s.exe, the directory phreeqe2.4 is created (or overwritten) when the files are extracted. 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 file. Note, replace with the drive letter where you want to install PHREEQE and optionally replace [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 (if already on the C disk drive): cd c:\wrdapp 2. Extract the files using the command: phrq2_4 -d -f :\[directory] Substitute "phrq2_4b" or "phrq2_4s" for "phrq2_4" if you are installing the executable-code-only or source-code distributions, respectively. Note, be sure to include the -d (restore directory structure) and -f (overwrite existing files) options and ":\" in the command. Examples are: phrq2_4 -d -f c:\ phrq2_4 -d -f c:\wrdapp The following directory structure will be created (the contents of each directory are shown to the right): phreeqe2.4 ; copy of this readme file and install program `-----bin ; compiled executables, batch programs, and Lahey error file `-----bin_data ; data files required during execution `-----doc ; documentation files `-----src ; makefile and source code `-----test ; batch files to run verification tests `-----data ; standard data sets used in verification tests Notes: a) The executable is not included in the phrq2_4s.exe distribution file. b) The source code is not included in the phrq2_4b.exe distribution file. c) It is recommended that no user files are 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. d) Brackets "[xxx]" are used to indicate optional arguments to commands. C. COMPILING The source code is provided in the phrq2_4.exe and phrq2_4s.exe distribution files 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 DOS operating system. As provided, the makefile and source code are optimized for use on a Pentium personal computer using the Lahey Fortran 90 compiler and supplied make program. 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: FFLAGS Fortran compiler flags FC Fortran compiler name LINKER Fortran linker name LNKFLGS Fortran linker flags 3. Use the make program to initiate compilation of the source code and installation of the software: make [BINDIR=directory_for_executables] See the Installing instructions below for an explanation of BINDIR. The make will: a. create the directory phreeqe2.4\bin if it does not exist, b. compile the source code, c. place the executables (phreeqe.exe and phrqinpt.exe) in phreeqe2.4\bin, and d. place a copy of the batch programs in BINDIR if specified. D: INSTALLING PHREEQE and PHRQINPT are executed using the batch programs phreeqe.bat and phrqinpt.bat. These programs include a hard-coded path which must be set to the path where PHREEQE is installed. A program install.exe, found in the phreeqe2.4 directory, can be used to update these batch programs based on a user response or you may edit the batch programs with a text editor. To make the PHREEQE programs accessible from any directory, the directory containing the batch programs should be included in the PATH environment variable. For example, you could add a line similar to the following to the AUTOEXEC.BAT file: PATH=%PATH%;C:\phreeqe2.4\bin Note, substitute the appropriate drive letter and pathname if not C:\ as shown above. As an alternative, the PHREEQE batch programs can be installed in a directory already included in the PATH environment variable. The makefile (input instructions to the Lahey make program--located in phreeqe2.4\src) contains instructions to optionally place a copy of the batch programs contained in phreeqe2.4\bin in a specified directory. Use the following two commands to do this: cd phreeqe_source_directory make install BINDIR=directory_for_executable For example: cd C:\phreeqe2.4\src make install BINDIR=C:\wrdapp\bin Note, the makefile may need to be modified to be used with make programs other than the Lahey make program. E. RUNNING THE SOFTWARE **System Requirements** - 386-based or higher personal computer with math co-processor - 2 MB application RAM - 2 MB hard disk space PHREEQE has been compiled using the Lahey Fortran 90 extended memory compiler version 2.01h. The file "LF90.EER" (from the Lahey compiler) located in phreeqe2.4\bin contains error messages. If an error occurs, this file is used to print error messages if the phreeqe2.4\bin directory is included in the PATH environment variable; if LF90.ERR cannot be found, the error will only be identified by number. 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 batch files to run the test. The directory phreeqe2.4\data contains the input data and expected results for the test. Run the test in the phreeqe2.4\test directory using the command: test After the test is completed, the results can be compared to the expected results. To clean-up after the test, type the command: clean 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. tests 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! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *