GSFLOW - Version: 1.0.00 Coupled Ground-water and Surface-water FLOW model NOTE: Any use of trade, product or firm names is for descriptive purposes only and does not imply endorsement by the U.S. Government. This version of GSFLOW is packaged for personal computers using one of the Microsoft Windows operating systems. An executable file for personal computers is provided as well as the source code. The executable file was generated on a personal computer with the Intel Core2Duo T7700 chipset, running Microsoft Windows XP Professional, using the Microsoft Visual Studio 2005 Version 8.0.50727.762 and Intel Visual Fortran Version 10.1.3948.2005 and Microsoft Visual C++ 2005 compilers. The source code and Linux Makefiles are provided to aid users in compilation on other computers. However, no support is provided for compilation. Instructions for installation, execution, and testing of this version of GSFLOW are provided below. TABLE OF CONTENTS A. DISTRIBUTION FILE B. INSTALLING C. EXECUTING THE SOFTWARE D. TESTING E. COMPILING A. DISTRIBUTION FILE The following self-extracting distribution file is for use on personal computers: gsflowv1_0.exe The distribution file contains: Executable and source code for GSFLOW. GSFLOW documentation. Related documentation for PRMS and MODFLOW. A GSFLOW example problem. An Excel spreadsheet for analysis of GSFLOW results. The distribution file is a self-extracting program. Execution of the distribution file creates numerous individual files. The extraction program allows you to specify the directory in which the files should be restored. The default installation directory is C:\WRDAPP. You have the opportunity to specify an alternate installation directory during extraction of the software. The following directory structure will be created in the installation directory: | |--GSFLOW_1.0 | |--bin ; Compiled GSFLOW executable for personal computers | |--data | |--sagehen ; Input and output files for a GSFLOW sample problem | |--doc ; Written documentation | |--gsflow ; GSFLOW docmentation report and conference paper | |--modflow ; MODFLOW docmentation reports for MODFLOW-2005, SFR, | and UZF and update information | |--prms ; PRMS docmentation | |--src | |--gsflow ; Source code for GSFLOW Modules | |--mms ; Source code for MMS software | |--modflow ; Source code for MODFLOW-2005 Packages | |--prms ; Source code for PRMS Modules | |--utilities ; Utility program for analysis of GSFLOW output ; and .bat file for running sample problem It is recommended that no user files are kept in the GSFLOW_1.0 directory structure. If you do plan to put your own files in the GSFLOW_1.0 directory structure, do so only by creating additional subdirectories of the GSFLOW_1.0\data subdirectory. Included in directory GSFLOW_1.0\doc\gsflow is the GSFLOW documentation report, which is a Portable Document Format (PDF) file. 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 site: http://www.adobe.com/ B. INSTALLING To make the executable version of GSFLOW accessible from any directory, the directory containing the executable (GSFLOW_1.0\bin) should be included in the PATH environment variable (see explanation below). As an alternative, the executable file, gsflow.exe, in the GSFLOW_1.0\bin directory can be copied into a directory already included in the PATH environment variable. HOW TO ADD TO THE PATH ENVIRONMENT VARIABLE WINDOWS9X AND WINDOWS ME SYSTEMS Add the following line to the AUTOEXEC.BAT file: PATH=%PATH%;C:\WRDAPP\GSFLOW_1.0\bin Note, reboot your system after modifying AUTOEXEC.BAT. HOW TO ADD TO THE PATH ENVIRONMENT VARIABLE WINDOWS NT SYSTEMS From the Start menu, select Settings and then Control Panel. Double click System and select the Environment tab. To add a new user variable, enter "PATH" in the Variable field and enter %PATH%;C:\WRDAPP\GSFLOW_1.0\bin in the Value field. Click Set and then click OK. If a PATH user variable already is defined, click on it in the User Variables pane, add ";C:\WRDAPP\GSFLOW_1.0\bin" to its definition in the Value field, and click OK. Initiate and use a new Windows Command Prompt window after making this change. HOW TO ADD TO THE PATH ENVIRONMENT VARIABLE WINDOWS 2000 OR XP SYSTEMS From the Start menu, select Settings and then Control Panel. Double click System and select the Advanced tab. Click on Environment Variables. If a PATH user variable already is defined, click on it in the User Variables pane, then click Edit. In the Edit User Variable window, add ";C:\WRDAPP\GSFLOW_1.0\bin" to the end of the Variable Value (ensure that the current contents of the User Value are not deleted) and click OK. If a PATH user variable is not already defined, in the User variables pane of the Environment Variables window, click New. In the New User Variable window, define a new variable PATH as shown above. Click OK. Click OK in the Environment Variables window and again in the System Properties window. Initiate and use a new Windows Command Prompt window. C. EXECUTING THE SOFTWARE After the executable file in the GSFLOW_1.0\bin directory is installed in a directory that is included in your PATH, GSFLOW is initiated in a Windows Command-Prompt window using the command: gsflow.exe [Fname] The optional Fname argument is the name of the GSFLOW Control File. If no argument is used, then GSFLOW will look for a Control File named "gsflow.control" in the user’s current directory. The data arrays in GSFLOW are dynamically allocated, so models are not limited by hard-coded array limits. However, it is best to have at least 2MB of random-access memory (RAM) available to hold all of the required data. If there is less available RAM than the model requires, which depends on the size of the application, the program will use virtual memory; however, this can slow execution significantly. If there is insufficient random memory to run the model, then GSFLOW will not initiate the beginning of the simulation; however, the Windows Command-Prompt window may continue to indicate that GSFLOW is executing. For this circumstance, the program must be terminated manually using the Windows Task Manager application. Some of the files written by GSFLOW are unformatted files. The structure of these files depends on the compiler and options in the Fortran write statement. GSFLOW is compiled using with the unformatted file type specified as "BINARY". Any program that reads the unformatted files produced by GSFLOW must be compiled with a compiler that produces programs that use the same structure for unformatted files. For example, Zonebudget and Modpath use unformatted budget files produced by the MODFLOW component of GSFLOW. Another example is head files that are generated by one GSFLOW simulation and used in a following simulation as initial heads. Both simulations must be run using an executable version of GSFLOW that uses the same unformatted file structure. D. TESTING An example problem with GSFLOW data sets is provided to verify that GSFLOW is correctly installed and running on the system. The example problem may also be looked at as an example of how to use the program. The directory GSFLOW_1.0\data\sagehen\input contains the input data and GSFLOW_1.0\data\sagehen\output-test contains the output files for the Sagehen Creek Watershed problem described in the GSFLOW documentation report (USGS Techniques and Methods 6-D1). A Windows .bat file (gsflow.bat) is included in the GSFLOW_1.0\utilities directory that can be used to excute the example problem simulation without destroying the original results in the GSFLOW_1.0\data\sagehen\output-test directory. GSFLOW_1.0\data\sagehen contains the GSFLOW Control File (gsflow.control) and MODFLOW Name File (sagehen.nam) for running the example problem. The example problem can be run by going to the GSFLOW_1.0\data\sagehen directory and typing the command ..\..\bin\gsflow in a Windows command-prompt window. E. COMPILING The executable file provided in GSFLOW_1.0\bin was created using the Intel Visual Fortran 10.1 and Microsoft Visual C++ 2005 compilers. Although an executable version of the program is provided, the source code is provided in the GSFLOW_1.0\src directory so that GSFLOW can be recompiled if necessary. However, the USGS cannot provide assistance to those compiling GSFLOW. In general, the requirements are a Fortran compiler, a compatible C compiler, and the knowledge of using the compilers. Makefiles are included in the GSFLOW_1.0\src directories as an example for compiling GSFLOW.