Prepared in cooperation with the U.S.
Geological Survey Water Availability and Use Science Program
User Guide For Mf5to6
Version mf6.1.1—June 12, 2020
U.S. Department of the Interior
U.S. Geological Survey
Cover. Binary computer code illustration.
Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Using Mf5to6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Output Generated By Mf5to6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Supported Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
References Cited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Tables
1. MODFLOW versions supported by Mf5to6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2. Packages supported by Mf5to6. Packages are identified by file type as used in the MODFLOW
name file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
i
ii
Blank page
Introduction
This document contains instructions for running Mf5to6, a utility for converting input files for selected
models based on MODFLOW-2005 (Harbaugh, 2005) to a new set of files suitable for use with MODFLOW 6.
In many cases output of the resulting MODFLOW 6 model will essentially duplicate the original model. How-
ever, MODFLOW 6 does not exactly reproduce all of the original model capabilities, and some user modifica-
tions to Mf5to6-generated MODFLOW 6 files may be needed to obtain satisfactory results. In addition, some
packages are not yet supported by MODFLOW 6, and some packages supported by MODFLOW 6 are not yet
supported by Mf5to6. The current version of Mf5to6 is designed to work with MODFLOW 6 version mf6.1.1.
MODFLOW 6 does not support parameters as they are used in MODFLOW-2005. However, Mf5to6 sup-
ports MODFLOW-2005-style input files that use parameters. When parameters are defined in model input,
Mf5to6 uses parameter values, which may be defined in a PVAL file, and it uses the multiplication and zone
arrays as defined in MULT and ZONE files, respectively, to appropriately assign values in MODFLOW 6
input.
Mf5to6 will attempt to convert any input file listed in the original name file. Mf5to6 will identify most
files listed in the original name file as either input or output files, based on the file type. However, DATA and
DATA(BINARY) files can be either input or output files. To distinguish between input and output files having
the DATA or DATA(BINARY) file type, ensure that either “OLD” or “REPLACE” is listed in the name file
after the file name of each of these input or output files, respectively. Mf5to6 will report an error if OLD or
REPLACE is omitted where needed.
The versions of MODFLOW that are supported for conversion by Mf5to6 are listed in Table 1.
Table 1. MODFLOW versions supported by Mf5to6.
MODFLOW version Reference
MODFLOW-2005 Harbaugh (2005)
MODFLOW-LGR Mehl and Hill (2007)
MODFLOW-NWT Niswonger and others (2011)
Using Mf5to6
Mf5to6 is designed to be run at a command prompt. The syntax is as follows:
mf5to6 mf2005-name-file basename
where: mf2005-name-file is the name of an existing name file for a supported model (Table 1),
and
basename is a text string to be used as the base for names of MODFLOW 6 input and output files.
Invoke Mf5to6 in the folder where the name file for your original model resides; Mf5to6 creates new MF6
input files in the same folder. The names of all new input and output files will start with the basename you
provide.
In the MODFLOW-2005 DIS input file, ensure that ITMUNI (seconds=1; minutes=2; hours=3; days=4;
years=5) and LENUNI (feet=1; meters=2; centimeters=3) are defined appropriately with non-zero values.
For an LGR model, which uses multiple MODFLOW-2005 name files to define parent and child models,
mf2005-name-file is the name of the main LGR input file. Mf5to6 will convert the parent model and each child
model.
2 User Guide For Mf5to6
Output Generated By Mf5to6
To inform the user of progress as Mf5to6 processes each input file, a message identifying the file type
is displayed in the command-prompt window. In addition to output sent to the command-prompt window,
Mf5to6 writes output to a file named basename conversion messages.txt. This file will contain most of the
input-echoing output normally written by the supported models. Additional information generated by Mf5to6
will be written at the bottom of this file.
After all input files have been processed, messages related to the conversion process are written to the
command-prompt window and to the basename conversion messages.txt file. The messages may be notes,
warnings, or errors, and are identified accordingly. If a MODFLOW-2005 file type not supported by Mf5to6 is
encountered, a warning is issued and processing continues. Errors generally cause the program to halt. Users
are advised to carefully read all notes, warnings, and errors. These messages can help the user track down
problems that may arise in running the resulting set of MODFLOW 6 input files. Most importantly, files of
types that are not supported are identified. Acceptable results are unlikely if the MODFLOW 6 model does not
include input corresponding to all MODFLOW-2005 input files.
The Iterative Model Solution (IMS) is the only solver supported in MODFLOW 6. IMS is not supported
in MODFLOW-2005. As a result, an IMS input file needs to be generated for use with MODFLOW 6. Mf5to6
attempts to generate an IMS file with settings assigned appropriately for the model, based on input provided
for the original solver package. However, it may be necessary to modify the IMS file to obtain solver conver-
gence. If the solver your model uses is not supported by MODFLOW-2005, an error message will be issued.
In this situation, remove (or comment out) the line in the name file that activates the non-supported solver, and
Mf5to6 will generate an IMS input file with default values. Adjust these values as needed to obtain conver-
gence.
Supported Packages
MODFLOW-2005 packages supported by the current version of Mf5to6 and their corresponding pack-
ages in MODFLOW 6 are listed in Table 2. In some cases, input in a MODFLOW-2005 file may contribute to
input for more than one MODFLOW 6 file – for such cases, the MODFLOW-2005 file type appears in more
than one table row. Similarly, MODFLOW 6 may require input from more than one MODFLOW-2005 file,
and these are listed individually. MODFLOW-2005 input files that are not listed are not converted, but the pro-
gram will continue to process input files that are listed. Warnings are issued for unsupported file types. File
types that are not supported by MODFLOW-2005 will result in an error and cause the program to terminate
prematurely.
History
This section describes changes introduced into the MODFLOW 6 converter with each official release.
These changes may substantially affect users.
• Version mf6.1.1—June 12, 2020
– None.
• Version 6.1.0—December 12, 2019
– Fixed an issue in the conversion of MNW2 wells into the MODFLOW 6 format. The converter did
not produce correct results when multiple MNW wells were present and when the wells spanned
multiple model layers.
References Cited 3
References Cited
Harbaugh, A.W., 2005, MODFLOW-2005, the U.S. Geological Survey modular ground-water model—the
Ground-Water Flow Process: U.S. Geological Survey Techniques and Methods, book 6, chap. A16, vari-
ously paged, accessed June 27, 2017, at https://pubs.usgs.gov/tm/2005/tm6A16/.
Mehl, S.W., and Hill, M.C., 2007, MODFLOW-2005, the U.S. Geological Survey modular ground-water
model – Documentation of shared node local grid refinement (LGR) and the boundary flow and head (BFH)
package: U.S. Geological Survey Techniques and Methods, book 6, chap. A21. 13 p., accessed June 27,
2017, at https://pubs.usgs.gov/tm/2007/06A21/.
Niswonger, R.G., Panday, Sorab, and Ibaraki, Motomu, 2011, MODFLOW-NWT, A Newton formulation for
MODFLOW-2005: U.S. Geological Survey Techniques and Methods, book 6, chap. A37, 44 p., accessed
June 27, 2017, at https://pubs.er.usgs.gov/publication/tm6A37.
4 User Guide For Mf5to6
Table 2. Packages supported by Mf5to6. Packages are identified by file type as used in the MODFLOW name file.
MF2005 Package MF6 Package Note
BAS6 CHD6 Constant heads from IBOUND arrays
BAS6 DIS6 Time and length units
BAS6 IC6 Starting heads
BAS6 NPF6 Confined/unconfined units; active cells
BCF6 NPF6 Aquifer properties
BCF6 STO6 Storage properties
CHD CHD6 Time-varying specified heads
CHOB CHD6 Constant-head flow observations
DE4 IMS6 Solver input
DIS DIS6 Spatial discretization
DIS TDIS6 Temporal discretization
DRN DRN6 Drains
DROB DRN6 Drain flow observations
EVT EVT6 Evapotranspiration
ETS EVT6 Evapotranspiration
FHB WEL6 Time-varying specified flows
FHB CHD6 Time-varying specified heads
GBOB GHB6 General-head boundary flow observations
GHB GHB6 General-head boundaries
GMG IMS6 Solver input
HFB6 HFB6 Horizontal-flow boundaries
HOB OBS6 Head observations
LAK LAK6 Lakes
LPF NPF6 Aquifer properties
LPF STO6 Storage properties
MNW2 MAW6 Multi-aquifer wells
MULT various packages Multiplier arrays used in MODFLOW-2005
NWT IMS6 Solver input
OC OC6 Output control
PCG IMS6 Solver input
PCGN IMS6 Solver input
PVAL various packages Parameter values used in MODFLOW-2005
RCH RCH6 Recharge
RIV RIV6 Rivers
RVOB RIV6 River flow observations
SFR2 SFR6 Streamflow routing. Not all SFR2 options are supported in SFR6
SIP IMS6 Solver input
UPW NPF6 Upstream weighting
UZF UZF6 Unsaturated zone flow
WEL WEL6 Wells
ZONE various packages Zone arrays used in MODFLOW-2005
Publishing support provided by the U.S. Geological Survey
MODFLOW 6 Development Team
For information concerning this publication, please contact:
Office of Groundwater
U.S. Geological Survey
Mail Stop 411
12201 Sunrise Valley Drive
Reston, VA 20192
(703) 648–5001
https://water.usgs.gov/ogw/
MODFLOW 6 Development Team— User Guide For Mf5to6
https://doi.org/10.5066/F76Q1VQV