January 16, 1998 MODEIN - Version 1.4 1998/01/16 MEPDATA - Version 1.3 1998/01/16 Computation of total sediment discharge by the modified Einstein procedure For assistance, enhancement requests, or bug reports contact the Hydrologic Analysis Software Support Team via email at h2osoft@usgs.gov. See the files doc\modein.txt and doc\mepdata.txt for descriptions, references, and additional contacts for this software. Instructions for installation, execution, and testing are provided below. This version of MODEIN is packaged for use on personal computers using the DOS operating system. The installation procedures and the compiled version of MODEIN 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. modn1_4.exe - Compiled using Lahey Fortran 90 with source code modn1_4b.exe - Compiled using Lahey Fortran 90 (binaries only) modn1_4s.exe - Source code only B. EXTRACTING FILES For whichever MODEIN distribution file that you have acquired, modn1_4.exe, modn1_4b.exe, or modn1_4s.exe, the directory modein1.4 is created (or overwritten) when the files are extracted. If the modein1.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 MODEIN 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: modn1_4 -d -o :\[directory] Substitute "modn1_4b" or "modn1_4s" for "modn1_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 -o (overwrite existing files) options and ":\" in the command. Examples are: modn1_4 -d -o c:\ modn1_4 -d -o c:\wrdapp The following directory structure will be created (the contents of each directory are shown to the right): modein1.4 ; 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 modn1_4s.exe distribution file. b) The source code is not included in the modn1_4b.exe distribution file. c) It is recommended that no user files are kept in the modein1.4 directory structure. If you do plan to put files in the modein1.4 directory structure, do so only by creating subdirectories of modein1.4. d) Brackets "[xxx]" are used to indicate optional arguments to commands. C. COMPILING The source code is provided in the modn1_4.exe and modn1_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 a new executable, do the following: 1. Change directory to the source directory: cd modein1.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_executable] See the Installing instructions below for an explanation of BINDIR. The make will: a. create the directory modein1.4\bin if it does not exist, b. compile the source code, c. place the executable (modein.exe) in modein1.4\bin, and d. place a copy of the executable in BINDIR if specified. D: INSTALLING To make the MODEIN 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:\modein1.4\bin Note, substitute the appropriate drive letter and pathname if not C:\ as shown above. As an alternative, the MODEIN 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 modein1.4\src) contains instructions to optionally place a copy of the executable contained in modein1.4\bin in a specified directory. Use the following two commands to do this: cd modein_source_directory make install BINDIR=directory_for_executable For example: cd C:\modein1.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 running DOS. - 2 MB application RAM - 1 MB disk space MODEIN has been compiled using the Lahey Fortran 90 extended memory compiler version 3.00f. The file "LF90.EER" (from the Lahey compiler) located in modein1.4\bin contains error messages. If an error occurs, this file is used to print error messages if the modein1.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 MODEIN is properly installed in a directory that is included in your PATH, the program is initiated using the command: modein. MODEIN prompts for the input file name (default name=MEPDATA.INP) and then for the output file name. The input data file is a direct-access file that must be created using the mopdata program. MEPDATA prompts in a conversational fashion for all required data. 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 modein1.4\test contains batch files to run the tests. The directory modein1.4\data contains the input data and expected results for each test. Run the tests in the modein1.4\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. test program description of test and files file name & usage ---- ------- ------------------------------------- ----------------- 1 modein Rio Grande at San Acacia, NM mepdata MEPDATA input data mepdata1.dat i MEPDATA output file mepdata1.out i/o MODEIN ouptut file modein1.out o 2 modein Feather River near Gridley, CA mepdata MEPDATA input data mepdata2.dat i MEPDATA output file mepdata2.out i/o MODEIN ouptut file modein2.out o 3 modein Niobrara River near Cody, NE - Sect C2 mepdata MEPDATA input data mepdata3.dat i MEPDATA output file mepdata3.out i/o MODEIN ouptut file modein3.out o 4 modein Rio Grande at San Acacia, NM mepdata MEPDATA input data mepdata4.dat i MEPDATA output file mepdata4.out i/o MODEIN ouptut file modein4.out o * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Good Luck! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *