May 28, 1997 ZONEBDGT - Version: 1.0 1996/12/20 Program for computing subregional water budgets for MODFLOW ground-water flow models For assistance, enhancement requests, or bug reports contact the Hydrologic Analysis Software Support Team via email at h2osoft@usgs.gov. See the file doc/zonedbgt.txt for descriptions, references, and additional contacts for this software. Instructions for installation, execution, and testing are provided below. This version of ZONEBDGT is packaged for use on personal computers using the DOS operating system. The installation procedures and the compiled version of ZONEBDGT 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 for DOS computer systems: znbd1_0.exe - Compiled using Lahey Fortran 90 with source code znbd1_0b.exe - Compiled using Lahey Fortran 90 (binaries only) znbd1_0s.exe - Source code For use on personal computers, the program source code consists of the following files (found in the zonebdgt.1_0\src directory): zonebdgt.for Makefile -- input instructions to the Lahey "make" utility for compiling ZONEBDGT Included in directory zonebdgt.1_0/doc is a Portable Document Format (PDF) version of the ZONEBUDGET documentatoin (ofr90392.pdf). A PostScript version of this report is available from: http://water.usgs.gov/software/zonebdgt.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 For whichever ZONEBDGT distribution file that you have acquired, znbd1_0.exe, znbd1_0b.exe, or znbd1_0s.exe, the directory zonebdgt.1_0 is created (or overwritten) when the files are extracted. If the zonebdgt.1_0 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 ZONEBDGT 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: znbd1_0 -d -o :\[directory] Substitute "znbd1_0b" or "znbd1_0s" for "znbd1_0" if you are installing the executable-code-only or source-code distributions, respectively. Note, be sure to include the -d (restore directory structure) and -o (overwrite existing files) options and ":\" in the command. Examples are: znbd1_0 -d -o c:\ znbd1_0 -d -o c:\wrdapp The following directory structure will be created (the contents of each directory are shown to the right): zonebdgt.1_0 ; copy of this readme file `-----bin ; compiled executable and Lahey error file `-----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 znbd1_0s.exe distribution file. b) The source code is not included in the znbd1_0b.exe distribution file. c) It is recommended that no user files are kept in the zonebdgt.1_0 directory structure. If you do plan to put files in the zonebdgt.1_0 directory structure, do so only by creating subdirectories of zonebdgt.1_0. d) Brackets "[xxx]" are used to indicate optional arguments to commands. C. COMPILING The source code is provided in the znbd1_0.exe and znbd1_0s.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 a new executable, do the following: 1. Change directory to the source directory: cd zonebdgt.1_0\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_executable] See the Installing instructions below for an explanation of BINDIR. The make will: a. create the directory zonebdgt.1_0\bin if it does not exist, b. compile the source code, c. place the executable (zonebdgt.exe) in zonebdgt.1_0\bin, and d. place a copy of the executable in BINDIR if specified. D: INSTALLING To make the ZONEBDGT program accessible from any directory, the directory containing the executable 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:\zonebdgt.1_0\bin Note, substitute the appropriate drive letter and pathname if not C:\ as shown above. As an alternative, the ZONEBDGT executable can be installed in a directory already included in the PATH environment variable. The makefile (input instructions to the Lahey make program--located in zonebdgt.1_0\src) contains instructions to optionally place a copy of the executable contained in zonebdgt.1_0\bin in a specified directory. Use the following two commands to do this: cd zonebdgt_source_directory make install BINDIR=directory_for_executable For example: cd C:\zonebdgt.1_0\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 running DOS. - 5 MB application RAM - 5 MB hard disk space ZONEBDGT has been compiled using the Lahey Fortran 90 extended memory compiler version 3.00f. The file "LF90.EER" (from the Lahey compiler) located in zonebdgt.1_0\bin contains error messages. If an error occurs, this file is used to print error messages if the zonebdgt.1_0\bin directory is included in the PATH environment variable; if LF90.ERR cannot be found, the error will only be identified by number. The program arrays are dimensioned for models having up to 300,000 cells. After ZONEBDGT is properly installed in a directory that is included in your PATH, the program is initiated using the command: zonebdgt. The program prompts for the following information: 1) name of the LISTING FILE for results 2) name of the CELL-BY-CELL BUDGET TERMS 3) TITLE for use in LISTING FILE 4) an option for specifying when budgets are calculated 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 zonebdgt.1_0\test contains batch files to run the tests. The directory zonebdgt.1_0\data contains the input data and expected results for each test. Run the tests in the zonebdgt.1_0\test directory using the command: test After the tests are completed, the results can be compared to the expected results. To clean-up after the tests, type the command: clean 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. IMPORTANT NOTE: use zbtest.nam and associated files to generate the cell- by-cell flow data (zbtest.bud) using MODFLOW. The zbtest.bud is a binary file that must be generated for each platform. The one provided was generated on a Pentium personal computer. The test.bat file does not run MODFLOW to generate the zbtest.bud, you must do this on your own. test program description of test and files file name & usage ---- ------- --------------------------------- ----------------- 1 modflow Runs the example problem in OFR 90-392 Name File to designate files zbtest.nam i BAS5 Package zbtest.bas i BCF5 Package zbtest.bcf i SIP5 Package zbtest.sip i Output Control zbtest.oc i RCH5 Package zbtest.rch i WEL5 Package zbtest.wel i cell-by-cell flow data zbtest.bud o Listing of results zbtest_m.lst o zonebdgt Runs the example problem in OFR 90-392 cell-by-cell flow data zbtest.bud i ZONE input file zbtest.zon i response file for program prompts go i Listing of results zbtest.lst o * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Good Luck! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *