Processing Modflow for Windows (PMWIN) Version 4.0

Reviewed by Richard B. Winston.

This page is part of The Modflow Help File.

Go back to Contents. Note: The "Contents" link will not work unless you have installed the Modflow Help file and are accessing this page locally.

Go to MODFLOW Resources page.

Go back to the Program Reviews page.

Last updated on Tue 09 Nov 1999 at 11:18 PM

I have not received any payment for this review other than an unsolicited copy of PMWIN.

Processing Modflow for Windows Version 4.1 is now freeware. (You still have to buy version 5.)

Processing Modflow for Windows was written by Wen-Hsing Chiang and Wolfgang Kinzelbach. Dr. Chiang has had a chance to review this page to help reduce the chance of errors but the opinions expressed are mine alone as are any remaining errors.

A new version of PMWin is expected to be released in early April 1997. I have not seen the new version but according to Wen-Hsing Chiang, The following features have been added.


I had no problems during installation of the program. You must make a few minor changes to your config.sys and autoexec.bat files. These changes are clearly described in the manual. However, the instructions for altering the config.sys states to insert the statement "FILES=80". You should not do this if FILES is already set to a higher value. The installation program added 16 files to Windows and Windows/system directories.

Operating system

Although PMWIN is a Windows program, it does not have many of the functions that you might expect to find in a Windows program. You can not, for example, copy data to the Clipboard or paste data from the Clipboard into PMWIN. You also can not resize the window in which PMWIN operates although you can reduce PMWIN to an icon. The icon looks somewhat like Rubik's cube. That's a good choice. Figuring out the proper formatting of MODFLOW input files for the first time without a preprocessor like PMWIN is at least as difficult as solving the Rubik's cube puzzle. As a Windows program, you can allow it to run in the background while you attend to other things. For example, MODFLOW models often take a long time to run. PEST and MT3D take even longer. PMWIN allows you to run them in the background.

On Line Help

I started off by looking at the Help file that comes with the program. I thought the Help file was very well done. Except when I was actually installing the program, I rarely looked at the manual; everything I needed to know was in the Help file. I did find a few minor typographical and grammatical errors in the manual and Help file. The errors were never so serious that I didn't understand what was meant nor were the errors common. I have reported them to Chiang and expect those that I found to be corrected. I think the online help is one of the best features of the program. (As a sidelight, Chiang found some typographical and grammatical errors in an earlier version of this review. No one is immune.)

Supported programs

PMWIN acts as a pre- and postprocessor for MODFLOW, MT3D, and PEST. PMWIN includes PMPATH which duplicates the functions of MODPATH. A water budget program included in PMWIN duplicates the function of ZONEBUDGET. The public domain version of MT3D and the demonstration version of PEST are included along with PMWIN. This review does not deal with how well PMWIN works with PEST or MT3D because I don't feel familiar enough with those programs to make an adequate review.

In addition to running it's own version of MODFLOW, PMWIN will run those provided by the Scientific Software Group, S.S. Papadopulos, and the International Groundwater Modeling Center. If you have some other version, you can still run it from PMWIN by making a few simple changes to the PMWIN.INI file with a text editor. Appendix 5 of the manual tells what changes you need to make and how to make them. You only need to make those changes if your version of MODFLOW has different IUNIT array assignments than the default.

MODFLOW itself runs in a DOS Window. During execution, the stress period, time step, maximum head change, and (in PCG2) residual, are displayed for each iteration. For small models this information may scroll by too rapidly to be read. If you wish, you can run MODFLOW in DOS outside of PMWIN with the command MODFLOW.BAT.

Supported Packages

In addition to the packages originally included in McDonald and Harbaugh (1988), PMWIN supports the following packages: Unsupported packages included in the MODFLOW executable include: Packages that are not part of on the MODFLOW executable (as of 3/26/97) include: (The direct solver and reservoir package were only released recently. PCG1 may be obsolete. According to Chiang, the DE4 and RES1 packages are supported in PMWIN 4.1.)

Grid Design

It's fairly easy to set up the grid with PMWIN. Unlike Visual Modflow, PMWIN supports the use of quasi- three dimensional models as well as models that are fully three dimensional. On the other hand, Visual MODFLOW has some advantages over PMWIN in the way it handles grid refinement.

When you first start a PMWIN model you have a uniform grid but it is easy to change the size and shape of the grid cells. The first time you edit the grid you can add new rows and columns (but not layers) or delete them. In subsequent sessions, you can add new rows, columns and layers by subdividing existing ones but you can not delete rows, columns or layers. It is easy to subdivide the individual rows or columns. One way is to select a row and column. When you press the right mouse button, you are presented with a dialog box that you can use to divide the row, column or both into multiple rows and columns and/or change their size. Alternatively, you can use the control and arrow keys to subdivide cells. Because the cells are subdivided evenly, grid refinement will often result in too great a difference in size between adjacent grid rows and columns. For example if you have rows that are 100 m wide and you divide one in two, you end up with two 50 m wide rows next to 100 m wide rows. Normally you would want the rows to be at least 70 m wide if they are next to a 100 m wide row. PMWIN never warns you about adjacent rows and columns with large disparities in the size. To fix size disparities, you may wish to adjust the row or column sizes either before or after you subdivide them. However, when you change the width of individual rows or columns the whole mesh is offset. I view this as a problem.

This problem with changing row and column sizes is best explained with an extreme example. In the illustration below, the original grid is shown on the left with the locations of two wells. The center illustration shows the appearance of the grid after refining the grid around the well on the lower right. This was done by changing row and column widths and then adding rows and columns to restore the original dimensions. On the right is the appearance of the grid after refining it around the well in the upper left corner of the grid. Just as before, the refinement was done by changing row and column widths. Note that the grid around the well on the lower right is no longer positioned properly. This problem can be avoided by refining the grid from top to bottom and from left to right. In this example it would be possible to subdivide cells in the middle of the grid and then widen them so that the refined grid was moved back into proper position.

One way to largely avoid the shift in the grid would be to save the original grid and then go back and subdivide cells. Initially, this will leave too large a contrast in cell widths as illustrated in the diagram below. To correct for this, widen one of the narrower cells and narrow one of the wider cells by exactly the same amount. The result will be an acceptable grid. Although it is clearly possible to create an acceptable grid with PMWIN, it would be better if the modeler did not have to worry about grid shifts when refining the grid.

One way to change row and column sizes is to select a row or column, push the "copy" button and then move the cursor over the grid. Any rows or columns the cursor goes over will change so that their size matches that of the originally selected cell. (If you move the cursor too fast, however, some rows or columns may be missed.) If you increase the model dimensions too much you may not be able to see all of the model at one time. If that happens you can change the worksheet size to see the whole model. By default, the worksheet size is about twice the model dimensions. This will generally give you enough space to see the whole model after rotating the grid. You can zoom in to any part of the grid you want.

Theoretically, PMWIN can create grids with up to 2000 rows x 2000 columns in a layer and up to 80 layers. I was able to make a 500x500 grid but when I attempted to create a 1000x1000 grid my computer crashed. That was because I didn't have enough memory to deal with such a large model. (I have 8Mb of memory.) Although I could create a 500x500 grid, I wouldn't actually be able to run such a large model after it was created. The first thing that happened when I created the 1-layer 500x500 model, was that PMWIN warned me that running the model would require approximately 25 Mb of RAM. However if I had MODFLOW on a UNIX workstation with lots of memory, I could use PMWIN on my PC to create the input files for MODFLOW. Then I could transfer the input files to the workstation and run MODFLOW there. This might well be preferable to buying a preprocessor for UNIX because then you could run small models on the PC and reserve the UNIX for large models. (PMWIN would not be able to do any postprocessing under this scenario.) Another option for running large models is to upgrade the memory of you PC. Upgrading a PC would be cheaper than buying a UNIX system and high-end PC's can be comparable to UNIX systems in performance.

If you wish to rotate the grid in PMWIN, that is easy to do. One reason you might wish to rotate the grid is because the natural hydrologic boundaries are not well aligned with the site coordinates. You can import up to five drawings of the site in DXF format to use as a template for the model, and then rotate the grid to better match the natural hydrologic boundaries. Any or all of the templates can be displayed simultaneously and the templates can be scaled or offset to match the model.

PMWIN can not import data from existing MODFLOW input files directly. To edit existing MODFLOW models in PMWIN, you must re-enter all the data in PMWIN. However, you can extract all the matrices from the MODFLOW input files and import the matrices.


Units must be consistent in PMWIN. However, PMWIN does provide some ways to convert time units automatically. For example, you could enter hydraulic conductivity in m/s enter time steps in years or other units and then have PMWIN convert the time steps to seconds for you. Accepted time units are seconds, minutes, hours, days, years, and "undefined". You can not enter pumping rates in gallons per day and hydraulic conductivity in ft/day because PMWIN doesn't convert gallons to cubic feet. An advantage of using consistent units is that it is less confusing. A disadvantage is that your data may not all be in the same units so you may have to convert them.

Editing cell properties

The Data Editor is used to assign properties to cells. All editing is done in map view. You can not view cross sections of the model while editing the data. You can chose cells one by one or create a polygon and assign values to the polygon. If you have assigned values to a polygon and then decide to edit the polygon, any new cells included in the polygon are assigned the value of that polygon. You can assign any MODFLOW property using the Data Editor. In this respect, it has an advantage over Visual MODFLOW in which the tops and bottoms of layers can not be directly edited within the program.

When you assign a property to an individual cell that cell is indicated by a change in color. If you double click on it, it will change color and every cell that has the same properties will change to the same color. When you assign a property with a polygon, there is no change in color. Although, you can double click on a cell to see the change in color, I would have preferred an immediate color change. Once a cell's properties have been assigned with a polygon they remained fixed until you change them. Thus if you assign properties with a polygon and then decide the polygon was too big, you will have to re-edit the cells that were incorrectly included in the polygon. It isn't enough just to make the polygon smaller because those cells that have been excluded from the smaller polygon do not revert to the default conditions.

The data for individual cells can be displayed in a matrix if desired. The data can be exported to an ASCII matrix but can not be copied to the clipboard. The ASCII matrix has a maximum of 20 values per line. If the model has more than 20 columns, the data are continued in succeeding lines until the end of the row is reached. Thus, to import this matrix into a spreadsheet may require you to edit the ASCII matrix first so that all data for a single model row are on one line. You may be able to employ a macro in your word processor to reduce significantly the amount of manual editing required.

The Data Editor will accept some data that is meaningless in terms of the current definition of a layer. For example, it will accept data on the tops of layers for unconfined layers and in the evapotranspiration package it will accept a layer indicator of 10 even if the model only has 1 layer. Of course, you may later modify the model so that the data is meaningful. It doesn't hurt anything to enter data for the top of an unconfined layer; the data is simply ignored. In addition, if you want PMWIN to calculate the vertical coductance, from vertical hydraulic conductivity, it needs to know the thickness of the unconfined layer. The evapotranspiration layer indicator is more problematic. If you start off by telling PMWIN that layer indicators will be used, it will only allow you to enter correct values. If, on the other hand, you start off by telling PMWIN that all evapotranspiration will come from the top layer, you can enter any value for the layer indicator. This value should then be ignored when creating the MODFLOW input files. I could get PMWIN to create incorrect MODFLOW input files by entering layer indicators for nonexistent layers when the program assumed that all evapotranspiration will come from the top layer (the default condition). If I then changed to using the layer indicator, PMWIN would use the previously entered layer indicators for the non existent layers when creating the MODFLOW input files. Of course, I was deliberately trying to put in incorrect data which is not something that most users would do. However, because the program doesn't check for all potential problems with the input data, it is up to the modeler to make sure that the data that is entered is correct. If you want it to, PMWIN will check for geometrical errors such as cells that have zero thickness or cells whose tops are lower than their bottoms. PMWIN 4.1 checks for additional errors as noted at the beginning of this page.

PMWIN can model both steady state and transient models. To create a transient model you first go to the TIME menu item in the PARAMETER menu and set up the stress periods, time steps, and time-step multiplier. Then you edit data for one of the MODFLOW packages such as the Well package. When you attempt to leave the Data Editor, it will present you with a dialog box allowing you to edit data for another stress period. If you wish, you can copy data from any stress period to any other. If you don't copy such data, you are presented with a "clean slate" when you first start editing data for a stress period. It probably is a good idea to copy well data from one stress period to another and then edit it to make sure that you don't accidentally assign a well to one cell during one stress period and another cell during another stress period. If, after assigning properties to a cell, you go back and refine the grid, PMWIN accommodates the changes by attempting to assign appropriate values to all the daughter cells. Thus, for example, if you subdivide a cell containing a well into four parts, each daughter cell will have 1/4 the pumping rate of the original cell. Because PMWIN does not record precise well locations, it is unable to assign all of the pumping to a single cell. In some cases, such as the stream package, there isn't a good way to decide what properties to assign to each cell based on the data that PMWIN records so in those cases you must re-edit the data after refining the grid.

Data for a River and stream packages are entered in the same was as other data. Unlike Visual MODFLOW, PMWIN has no capability for picking two end points of a line segment and interpolating values in between those end points.

Data entry for the Horizontal flow barrier package is on a cell-by-cell basis. No data entry by zones is possible. In the horizontal flow barrier package, flow barriers are treated as properties of individual cells rather than as the property of the boundary between cells. You can only have one flow barrier per cell. This is more restrictive than required by Modflow but should not cause problems for any practical applications that I can imagine.

Special Features

PMWIN comes with a field interpolator that can be used to interpolate between known points to assign values of a parameter to all the cells in a layer. All you need to do is use a text editor or spreadsheet to create and ASCII file containing (1) the number of data points (2) the x,y coordinates of each point and (3) the value of the parameter at that point. Once you have that, you start up the field interpolator, open the model to which you want the data to apply, choose the interpolation method, and run the program.

In addition to the field interpolator, PMWIN comes with a stochastic field generator that can be used to generate (for example) arrays of hydraulic conductivities with a specified mean values, standard deviations, and correlation lengths. Correlation lengths need not be the same in the x and y directions. These data can then be imported into the PMWIN. The grid must be uniform when using the stochastic field generator because it does not compensate for variations in row or column widths. It is important to remember that the field generation is not a completely random process; if you enter all the same input data, the field generator will produce exactly the same result as it did previously. You need to tell the stochastic field generator you have to say how many "realizations" you want to be generated. It will produce that number of arrays and each array will the same mean value, standard deviation, and correlation length but each array will be independent of the others. You can also use the field generator together with the field interpolator to produce fields that are constrained to match known values at specific points.


After running a model you use the Results Extractor to extract heads or other data, save the data to a file and then load the data in "Recycle data" to view a contour map of it (with unlabeled contour lines).The plots can be exported to an external graphics program to be printed. Three formats are supported Drawing Interchange file (DXF), Hewlett-Packard Graphics Language HP-GL and Windows Bitmap (BMP). However, before you save a contour plot in BMP format, you must change your screen resolution to 8-bit 256 colors. I was able to import all three formats into Corel DRAW 3.0. You can also use the Results Extractor to save the data in either an ASCII matrix or a SURFER compatible data file. I don't have SURFER myself but I was able to import the SURFER compatible data file into my technical graphics program (Microcal Origin).

You can also graph head, drawdown, concentration, compaction, preconsolidation head, and subsidence vs. time. The data can be exported in a form suitable for importing into spreadsheets or you can save the graphs themselves as describe previously. To create the graphs, you assign an observation point (a "bore") either before or after running the model. The predicted head at that point is interpolated from the model results.

PMWIN comes with a particle tracking program, PMPATH, derived from MODPATH. It allows you to calculate flowlines and flowpaths in both steady state and transient models. You can also apply a retardation factor to the particles if you wish. You can see both a map view of the particles and cross sections. Both the map views and cross sections showing projections of the particle positions. Thus, if you have added particles to layer 1 you will also see them when you are looking at layer 2. To avoid confusion, you could assign different colors to the particles in different layers.

PMWIN also has a Water budget calculator to determine budgets of individual zones and flows between zones. You can only specify a single time step on each run of the Water budget calculator. If you have many time steps, you this may involve a lot of work. The USGS ZONEBUDGET program allows you to get budgets for all time steps during a single run of the program. This would be more convenient for most transient models. Results from the water budget calculator are stored in an output file which must be read with a text editor rather than being displayed directly in PMWIN.


(I encounter one bug during my initial testing of the program. The bug probably would not have affected model results but would make MODFLOW work a bit harder than it had to. When I reported the problem to Wen-Hsing Chiang, he corrected the bug and emailed me the corrected program within 24 hours.)



PMWIN is a good preprocessor and postprocessor for MODFLOW. It allows you to create the input files for MODFLOW much more easily and with fewer errors than would be the case on a word processor. In addition to the packages in the original version of MODFLOW, it supports many of the newer packages that have been produced by the USGS since then. Unlike Visual MODFLOW, It allows you to make use of all of the functionality of MODFLOW in those packages that it supports including quasi-three-dimensional models. It has a field interpolator that simplifies the process of assigning aquifer properties based on scattered borehole data. It also has a stochastic field generator that can be used in stochastic modeling. Once you've run a model, PMWIN allows you to export the data to other programs fairly easily. The particle tracking program that comes with PMWIN supports both transient and steady state flow. PMWIN also supports PEST and MT3D although I have not attempted to review how well it works with those models. After about 1 day of concentrated usage of the program, I became very comfortable with it.


Although it is a Windows program it does not support many of the features that one would normally associate with a Windows program such as the ability to copy to or paste from the clipboard. Although it has a good method of refining the grid. It is less easy to use in this respect than Visual MODFLOW. It is also has a less sophisticated way of dealing with cell properties when the grid is refined than Visual MODFLOW. I find the water budget program in PMWIN less useful than the USGS's Zonebudget. I frequently run transient models and in those I would like to know the water budget during each time step. This is easy to do with ZONEBUDGET but with the water budget program in PMWIN, I would have to run the program once for every time step to get the same information.


McDonald, M.G. and Harbaugh, A.W., 1988, A modular three-dimensional finite-difference ground-water flow model: U.S. Geological Survey Techniques of Water-Resources Investigations Book 6, Chapter A1, 586 p.


More information about PMWIN is available at Wen-Hsing Chiang's home page and The Scientific Software Group including a fully functional demo of PMWIN. The demo is also available at WinSite where the file name is pmwin41.exe and The Scientific Software Group. WinSite has mirror sites all over the world. There is probably one near you that you can download the file from quickly.

As of Oct. 13, 1996, the following companies had distribution contracts for PMWIN

Go back to Contents. Note: The "Contents" link will not work unless you have installed The Modflow Help File and are accessing this page locally.

©1996, 1997 Richard B. Winston,
2163 Tulip St
Baton Rouge, La 70806