USGS - science for a changing world

Water Resources of the United States

[Table of Contents] [Previous Section] [Next Section]

A Data Input Program (MFI) for the U.S. Geological Survey Modular Finite-Difference Ground-Water Flow Model
U.S. Geological Survey Water-Resources Investigations Report 94-468

Computer Dependencies


Although MFI is designed for portability among computers, there are a number of computer dependencies that cannot be avoided. These dependencies are isolated so that the code that must be changed in order to adapt MFI for use on another computer can be easily found.

The largest section of code that is computer dependent is the AIDE library. As explained in the Preface, this code is available for three computer systems: Data General Unix workstations, Sun Sparcstations, and IBM compatible personal computers. It may be possible for a knowledgeable programmer to convert this code for use on other computers.

The code for interfacing to the spreadsheet program is contained in file "spread.f". Three subroutines are required. Subroutine SSLST uses the spreadsheet program to edit a list of data. Subroutine SS2DI edits a 2-dimensional integer array, and Subroutine SS2DR edits a 2-dimensional real array. Two versions of spread.f are supplied with the MFI source code. One version is for the Tactician spreadsheet program, and the other is for the Lotus 123 spreadsheet program. It should be possible to adapt these subroutines for other spreadsheet programs; however, this requires a skilled programmer who can figure out how data are stored within MFI and in files that the spreadsheet can read and write.

The file "system.f" contains system dependent subroutines. Subroutine SYSCAL calls the operating system to execute a command. This is how the spreadsheet is activated. Subroutine NAMARG gets a command line argument, which is used for the purpose of getting the dataset name from the command that invokes MFI. The version of this subroutine included with the source code is for use on a Data General workstation. Subroutine GETPNM looks for a file name that may not be in the local directory. This is used to find the AIDE message file that is used to generate screens. This routine looks for a file named "MFI.PTH" in the current directory. If found, the first line of this file is used as the directory in which the message file can be found. If MFI.PTH is not found, then it is assumed that the message file is in the current directory. Some computers provide special routines that scan a set of directories in order to locate a file; GETPNM could be modified to take advantage of such a routine. Subroutine ORGOPN writes a file of commands necessary to connect the files used by MODFLOW to Fortran's numeric file units. As described in the Running MODFLOW and MODPATH Section, this routine creates a shell program for Data General workstations.


[Table of Contents] [Previous Section] [Next Section]

MFI page
The URL for this page is http://water.usgs.gov/software/mfi_manual/ofr94_468_24.html
This page is maintained by <mcrouse@usgs.gov>
Last modified: 02 FEB 96
Generated with CERN WebMaker

USGS Home :: Biology :: Geology :: Geography :: Site Map

Accessibility FOIA Privacy Policies and Notices

Take Pride in America logo USA.gov logo U.S. Department of the Interior | U.S. Geological Survey
URL: http://water.usgs.gov/software/MFI/manual/ofr94_468_24.html
Page Contact Information: Water Webserver Team
Page Last Modified: Thursday, 06-Mar-2014 09:30:53 EST