MODFLOW with Dynamic X-Array

Back to my home page

Last updated on Wed 23 Jun 1999 at 11:06 PM

You may also be interested in my three new packages for MODFLOW

From this site you can download a free version of MODFLOW with an allocatable X-array. The X-array is where MODFLOW stores nearly all it's data. With an allocatable X-array, the program uses only the memory it actually needs during execution. It also means that the only limit on the size of the models you can run is the amount of memory on your machine.

I've also made three other changes

  1. LKMT from the version distributed with MT3D 1.5 has been included so that they can produce the specially formated flow file required by MT3D
  2. Kladias and Ruskauff's revised version of BCF3 has been included as an alternative to BCF5 so that variable anisotropy on a layer can be specified. (BCF5 is also included)
  3. The USGS's PCG1 solver has been included. (PCG2 is also included.)
  4. New (Dec. 9, 1997) The Flow and Head Boundary Package by Leake and Lilly has been included. This package is scheduled for inclusion in a revision of MODFLOW-96 to be released in early 1998.
As an added bonus, it is also significantly faster than the USGS version of MODFLOW for DOS; at least on my machine.

There are actually two versions of the program in the file you will download. In one I used an optimization option during compilation and in the other I didn't. I provide both versions because some people don't trust optimized programs. When I compared the results of the optimized program with the results obtained with the USGS version of MODFLOW, the only difference was a slightly smaller error in the water budget for the optimized code. Differences in rounding errors between the optimized and unoptimized programs could account for the differences.

To run these versions of MODFLOW, you must have a 386 or better computer chip and Windows 95 or Windows NT.

If you download the program, I would appreciate it if you would run the speed test and report the results to me. The results would be useful for making comparisons among processors. I will post the reports in the table below. The first set of results is from a version that did not yet have the link to MT3D, PCG1 or the variable anisotropy package. The second table was for results after those were added.

Who Processor Time (sec)
USGS,
modflw96.exe
unoptimized,
modflw96d.exe
optimized,
modflw96do.exe
Richard B. Winston Dell Dimension XPS, Pentium II, 266 MHz 7.14 6.99 5.35
Bill Hutchison ProStar 166 laptop with 32 MB of RAM 40.87 26.64 24.28
Jessica Walko Gateway 2000, 300 MHz, 8.4 GB harddrive, 64 MB of RAM 14.99 10.11 7.91

Who Processor Time (sec)
USGS,
modflw96.exe
unoptimized,
modflw96d.exe
optimized,
modflw96do.exe
Richard B. Winston Dell Dimension XPS, Pentium II, 266 MHz 7.17 7.07 5.58
Bruce Campbell 450Mz Pentium II Dell Dimension 610 with 128 MB of RAM. 15.86 5.86 4.25
Roberto Anaya 450MHz Pentium II Dell OptiPlex GX1p w/ 128 MB SDRAM 4.64 5.38 3.54

How to run the speed test

How TestDyn.bat works

You can open TestDyn.bat with any text editor to see what it does. It looks like this.
time <return.txt >time.txt
start/wait modflw96do
time <return.txt >>time.txt
start/wait modflw96d
time <return.txt >>time.txt
start/wait modflw96
time <return.txt >>time.txt
It first runs modflw96do, the optimized version of MODFLOW with a dynamic X-array. Modflw96do reads modflow.bf which contains the list of name files for each model and runs those models. "time <return.txt >time.txt" then stores the time in the file time.txt. Each of the 6 name files is repeated 10 times in modflow.bf. That's to slow things down a bit so that the time isn't too short to get an accurate measurement.

For normal operation, you can have modflw96do.exe or modflw96d.exe in whatever directory you want and you can rename them so long as you keep the extension exe. However, you should have the file lf90.eer either in the same directory as MODFLOW If you wish to run one of these versions of MODFLOW with Argus ONE, you should rename modflw96do.exe or modflw96d.exe and put it in the C:\Modflw96.3_1\bin directory.

Back to my home page