0% found this document useful (0 votes)
12 views328 pages

Modflow6 Readthedocs Io en Develop

The document provides detailed information on MODFLOW 6, including benchmarks, deprecations, and an input guide for simulations. It outlines the structure of input files, including options for simulations, models, exchanges, and solution groups. Additionally, it includes a developer guide and migration guides for transitioning from previous versions.

Uploaded by

berlindownload2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views328 pages

Modflow6 Readthedocs Io en Develop

The document provides detailed information on MODFLOW 6, including benchmarks, deprecations, and an input guide for simulations. It outlines the structure of input files, including options for simulations, models, exchanges, and solution groups. Additionally, it includes a developer guide and migration guides for transitioning from previous versions.

Uploaded by

berlindownload2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MODFLOW 6

MODFLOW Development Team

Jul 29, 2025


CONTENTS

1 Benchmarks 3

2 Deprecations 5

3 Input Guide 7
3.1 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Iterative Model Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3 Groundwater Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.4 Groundwater Transport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
3.5 Groundwater Energy Transport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
3.6 Particle Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
3.7 Model Exchanges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
3.8 Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

4 Developer Guide 259


4.1 Code of Conduct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
4.2 Contributing to MODFLOW 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
4.3 Developing MODFLOW 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
4.4 Developing extended MODFLOW 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
4.5 Distributing MODFLOW 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
4.6 MODFLOW 6 Fortran style guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
4.7 MODFLOW 6 input specification language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
4.8 MODFLOW 6 Input Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317

5 Migration Guides 319


5.1 MODFLOW 6.6.0 Particle Tracking (PRT) Model Migration Guide . . . . . . . . . . . . . . . . . . 319

i
ii
MODFLOW 6

Contents:

CONTENTS 1
MODFLOW 6

2 CONTENTS
CHAPTER

ONE

BENCHMARKS

Comparison of run times of the current version of MODFLOW 6 (6.7.0.dev2) to the previous version (6.6.2). The
current example models available from the MODFLOW 6 Examples GitHub Repository are used to compare run times.
Simulations that fail are indicated by ‘–’. The percent difference, where calculated, is relative to the simulation run
time for the previous version. Percent differences for example problems with short run times (less than 30 seconds)
may not be significant.
MODFLOW 6 compiled Jul 29 2025 15:38:49 with GCC version 12.3.0.

3
MODFLOW 6

4 Chapter 1. Benchmarks
CHAPTER

TWO

DEPRECATIONS

The following table lists deprecated options and the versions in which they were deprecated and (optionally) removed.

5
MODFLOW 6

6 Chapter 2. Deprecations
CHAPTER

THREE

INPUT GUIDE

The latest version of the complete MODFLOW 6 input/output guide can be found here. This section enumerates and
describes MODFLOW 6 input files.

3.1 Simulation
3.1.1 SIM-NAM
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[CONTINUE]
[NOCHECK]
[MEMORY_PRINT_OPTION <memory_print_option>]
[PROFILE_OPTION <profile_option>]
[MAXERRORS <maxerrors>]
[PRINT_INPUT]
[HPC6 FILEIN <hpc6_filename>]
END OPTIONS

BEGIN TIMING
TDIS6 <tdis6>
END TIMING

BEGIN MODELS
<mtype> <mfname> <mname>
<mtype> <mfname> <mname>
...
END MODELS

BEGIN EXCHANGES
<exgtype> <exgfile> <exgmnamea> <exgmnameb>
<exgtype> <exgfile> <exgmnamea> <exgmnameb>
...
END EXCHANGES

BEGIN SOLUTIONGROUP <group_num>


[MXITER <mxiter>]
(continues on next page)

7
MODFLOW 6

(continued from previous page)


<slntype> <slnfname> <slnmnames>
<slntype> <slnfname> <slnmnames>
...
END SOLUTIONGROUP

Explanation of Variables
Block: OPTIONS

• CONTINUE keyword flag to indicate that the simulation should continue even if one or more solutions do not
converge.
• NOCHECK keyword flag to indicate that the model input check routines should not be called prior to each time
step. Checks are performed by default.
• memory_print_option is a flag that controls printing of detailed memory manager usage to the end of the
simulation list file. NONE means do not print detailed information. SUMMARY means print only the total
memory for each simulation component. ALL means print information for each variable stored in the memory
manager. NONE is default if MEMORY_PRINT_OPTION is not specified.
• profile_option is a flag that controls performance profiling and reporting. NONE disables profiling. SUM-
MARY means to measure and print a coarse performance profile. DETAIL means collect and print information
with the highest resolution available. NONE is default if PROFILE_OPTION is not specified.
• maxerrors maximum number of errors that will be stored and printed.
• PRINT_INPUT keyword to activate printing of simulation input summaries to the simulation list file (mfsim.lst).
With this keyword, input summaries will be written for those packages that support newer input data model
routines. Not all packages are supported yet by the newer input data model routines.
• HPC6 keyword to specify that record corresponds to a hpc file.
• FILEIN keyword to specify that an input filename is expected next.
• hpc6_filename name of input file to define HPC file settings for the HPC package. See the “HPC File” section
for instructions for preparing HPC input files.

Block: TIMING

• tdis6 is the name of the Temporal Discretization (TDIS) Input File.

Block: MODELS

• mtype is the type of model to add to simulation.


• mfname is the file name of the model name file.
• mname is the user-assigned name of the model. The model name cannot exceed 16 characters and must not have
blanks within the name. The model name is case insensitive; any lowercase letters are converted and stored as
upper case letters.

Block: EXCHANGES

• exgtype is the exchange type.


• exgfile is the input file for the exchange.
• exgmnamea is the name of the first model that is part of this exchange.

8 Chapter 3. Input Guide


MODFLOW 6

• exgmnameb is the name of the second model that is part of this exchange.

Block: SOLUTIONGROUP

• group_num is the group number of the solution group. Solution groups must be numbered sequentially, starting
with group number one.
• mxiter is the maximum number of outer iterations for this solution group. The default value is 1. If there is
only one solution in the solution group, then MXITER must be 1.
• slntype is the type of solution. The Integrated Model Solution (IMS6) and Explicit Model Solution (EMS6)
are the only supported options in this version.
• slnfname name of file containing solution input.
• slnmnames is the array of model names to add to this solution. The number of model names is determined by
the number of model names the user provides on this line.

Example Input File

# This block is optional


BEGIN OPTIONS
END OPTIONS

# Simulation timing information


BEGIN TIMING
TDIS6 simulation.tdis
END TIMING

# List of models in the simulation


BEGIN MODELS
#modeltype namefile modelname
GWF6 model1.nam GWF_Model_1
GWF6 model2.nam GWF_Model_2
END MODELS

# List of exchanges in the simulation


BEGIN EXCHANGES
GWF6-GWF6 simulation.exg GWF_Model_1 GWF_Model_2
END EXCHANGES

# Models are part of the same numerical solution


BEGIN SOLUTIONGROUP 1
IMS6 simulation.ims GWF_Model_1 GWF_Model_2
END SOLUTIONGROUP

3.1.2 SIM-TDIS
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[TIME_UNITS <time_units>]
[START_DATE_TIME <start_date_time>]
(continues on next page)

3.1. Simulation 9
MODFLOW 6

(continued from previous page)


[ATS6 FILEIN <ats6_filename>]
END OPTIONS

BEGIN DIMENSIONS
NPER <nper>
END DIMENSIONS

FOR ANY STRESS PERIOD

BEGIN PERIODDATA
<perlen> <nstp> <tsmult>
<perlen> <nstp> <tsmult>
...
END PERIODDATA

Explanation of Variables
Block: OPTIONS

• time_units is the time units of the simulation. This is a text string that is used as a label within model output
files. Values for time_units may be “unknown”, “seconds”, “minutes”, “hours”, “days”, or “years”. The default
time unit is “unknown”.
• start_date_time is the starting date and time of the simulation. This is a text string that is used as a label
within the simulation list file. The value has no effect on the simulation. The recommended format for the starting
date and time is described at https://www.w3.org/TR/NOTE-datetime.
• ATS6 keyword to specify that record corresponds to an adaptive time step (ATS) input file. The behavior of ATS
and a description of the input file is provided separately.
• FILEIN keyword to specify that an input filename is expected next.
• ats6_filename defines an adaptive time step (ATS) input file defining ATS controls. Records in the ATS file
can be used to override the time step behavior for selected stress periods.

Block: DIMENSIONS

• nper is the number of stress periods for the simulation.

Block: PERIODDATA

• perlen is the length of a stress period.


• nstp is the number of time steps in a stress period.
• tsmult is the multiplier for the length of successive time steps. The length of a time step is calculated by
multiplying the length of the previous time step by TSMULT. The length of the first time step, Delta t_1, is
related to PERLEN, NSTP, and TSMULT by the relation Delta t_1= perlen frac{tsmult - 1}{tsmultnstp-1}.

Example Input File

# Comment for this TDIS input file

BEGIN OPTIONS
TIME_UNITS DAYS
(continues on next page)

10 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


END OPTIONS

BEGIN DIMENSIONS
NPER 2
END DIMENSIONS

BEGIN PERIODDATA
365.00 1 1.0 Items: PERLEN NSTP TSMULT
365.00 10 1.2 Items: PERLEN NSTP TSMULT
END PERIODDATA

3.2 Iterative Model Solution


3.2.1 SLN-IMS
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[PRINT_OPTION <print_option>]
[COMPLEXITY <complexity>]
[CSV_OUTER_OUTPUT FILEOUT <outer_csvfile>]
[CSV_INNER_OUTPUT FILEOUT <inner_csvfile>]
[NO_PTC [<no_ptc_option>]]
[ATS_OUTER_MAXIMUM_FRACTION <ats_outer_maximum_fraction>]
END OPTIONS

BEGIN NONLINEAR
OUTER_DVCLOSE <outer_dvclose>
OUTER_MAXIMUM <outer_maximum>
[UNDER_RELAXATION <under_relaxation>]
[UNDER_RELAXATION_GAMMA <under_relaxation_gamma>]
[UNDER_RELAXATION_THETA <under_relaxation_theta>]
[UNDER_RELAXATION_KAPPA <under_relaxation_kappa>]
[UNDER_RELAXATION_MOMENTUM <under_relaxation_momentum>]
[BACKTRACKING_NUMBER <backtracking_number>]
[BACKTRACKING_TOLERANCE <backtracking_tolerance>]
[BACKTRACKING_REDUCTION_FACTOR <backtracking_reduction_factor>]
[BACKTRACKING_RESIDUAL_LIMIT <backtracking_residual_limit>]
END NONLINEAR

BEGIN LINEAR
INNER_MAXIMUM <inner_maximum>
INNER_DVCLOSE <inner_dvclose>
INNER_RCLOSE <inner_rclose> [<rclose_option>]
LINEAR_ACCELERATION <linear_acceleration>
[RELAXATION_FACTOR <relaxation_factor>]
[PRECONDITIONER_LEVELS <preconditioner_levels>]
[PRECONDITIONER_DROP_TOLERANCE <preconditioner_drop_tolerance>]
[NUMBER_ORTHOGONALIZATIONS <number_orthogonalizations>]
(continues on next page)

3.2. Iterative Model Solution 11


MODFLOW 6

(continued from previous page)


[SCALING_METHOD <scaling_method>]
[REORDERING_METHOD <reordering_method>]
END LINEAR

Explanation of Variables
Block: OPTIONS

• print_option is a flag that controls printing of convergence information from the solver. NONE means print
nothing. SUMMARY means print only the total number of iterations and nonlinear residual reduction summaries.
ALL means print linear matrix solver convergence information to the solution listing file and model specific linear
matrix solver convergence information to each model listing file in addition to SUMMARY information. NONE
is default if PRINT_OPTION is not specified.
• complexity is an optional keyword that defines default non-linear and linear solver parameters. SIMPLE -
indicates that default solver input values will be defined that work well for nearly linear models. This would be
used for models that do not include nonlinear stress packages and models that are either confined or consist of
a single unconfined layer that is thick enough to contain the water table within a single layer. MODERATE -
indicates that default solver input values will be defined that work well for moderately nonlinear models. This
would be used for models that include nonlinear stress packages and models that consist of one or more uncon-
fined layers. The MODERATE option should be used when the SIMPLE option does not result in successful
convergence. COMPLEX - indicates that default solver input values will be defined that work well for highly
nonlinear models. This would be used for models that include nonlinear stress packages and models that con-
sist of one or more unconfined layers representing complex geology and surface-water/groundwater interaction.
The COMPLEX option should be used when the MODERATE option does not result in successful convergence.
Non-linear and linear solver parameters assigned using a specified complexity can be modified in the NONLIN-
EAR and LINEAR blocks. If the COMPLEXITY option is not specified, NONLINEAR and LINEAR variables
will be assigned the simple complexity values.
• CSV_OUTER_OUTPUT keyword to specify that the record corresponds to the comma separated values outer itera-
tion convergence output.
• FILEOUT keyword to specify that an output filename is expected next.
• outer_csvfile name of the ascii comma separated values output file to write maximum dependent-variable
(for example, head) change convergence information at the end of each outer iteration for each time step.
• CSV_INNER_OUTPUT keyword to specify that the record corresponds to the comma separated values solver con-
vergence output.
• inner_csvfile name of the ascii comma separated values output file to write solver convergence information.
Comma separated values output includes maximum dependent-variable (for example, head) change and maxi-
mum residual convergence information for the solution and each model (if the solution includes more than one
model) and linear acceleration information for each inner iteration.
• NO_PTC is a flag that is used to disable pseudo-transient continuation (PTC). Option only applies to steady-state
stress periods for models using the Newton-Raphson formulation. For many problems, PTC can significantly
improve convergence behavior for steady-state simulations, and for this reason it is active by default. In some
cases, however, PTC can worsen the convergence behavior, especially when the initial conditions are similar to
the solution. When the initial conditions are similar to, or exactly the same as, the solution and convergence is
slow, then the NO_PTC FIRST option should be used to deactivate PTC for the first stress period. The NO_PTC
ALL option should also be used in order to compare convergence behavior with other MODFLOW versions, as
PTC is only available in MODFLOW 6.
• no_ptc_option is an optional keyword that is used to define options for disabling pseudo-transient continuation
(PTC). FIRST is an optional keyword to disable PTC for the first stress period, if steady-state and one or more
model is using the Newton-Raphson formulation. ALL is an optional keyword to disable PTC for all steady-state

12 Chapter 3. Input Guide


MODFLOW 6

stress periods for models using the Newton-Raphson formulation. If NO_PTC_OPTION is not specified, the
NO_PTC ALL option is used.
• ats_outer_maximum_fraction real value defining the fraction of the maximum allowable outer iterations
used with the Adaptive Time Step (ATS) capability if it is active. If this value is set to zero by the user, then this
solution will have no effect on ATS behavior. This value must be greater than or equal to zero and less than or
equal to 0.5 or the program will terminate with an error. If it is not specified by the user, then it is assigned a
default value of one third. When the number of outer iterations for this solution is less than the product of this
value and the maximum allowable outer iterations, then ATS will increase the time step length by a factor of
DTADJ in the ATS input file. When the number of outer iterations for this solution is greater than the maximum
allowable outer iterations minus the product of this value and the maximum allowable outer iterations, then the
ATS (if active) will decrease the time step length by a factor of 1 / DTADJ.

Block: NONLINEAR

• outer_dvclose real value defining the dependent-variable (for example, head) change criterion for conver-
gence of the outer (nonlinear) iterations, in units of the dependent-variable (for example, length for head). When
the maximum absolute value of the dependent-variable change at all nodes during an iteration is less than or
equal to OUTER_DVCLOSE, iteration stops. Commonly, OUTER_DVCLOSE equals 0.01. The keyword,
OUTER_HCLOSE can be still be specified instead of OUTER_DVCLOSE for backward compatibility with
previous versions of MODFLOW 6 but eventually OUTER_HCLOSE will be deprecated and specification of
OUTER_HCLOSE will cause MODFLOW 6 to terminate with an error.
• outer_maximum integer value defining the maximum number of outer (nonlinear) iterations – that is, calls to
the solution routine. For a linear problem OUTER_MAXIMUM should be 1.
• under_relaxation is an optional keyword that defines the nonlinear under-relaxation schemes used. Under-
relaxation is also known as dampening, and is used to reduce the size of the calculated dependent variable before
proceeding to the next outer iteration. Under-relaxation can be an effective tool for highly nonlinear models when
there are large and often counteracting changes in the calculated dependent variable between successive outer
iterations. By default under-relaxation is not used. NONE - under-relaxation is not used (default). SIMPLE
- Simple under-relaxation scheme with a fixed relaxation factor (UNDER_RELAXATION_GAMMA) is used.
COOLEY - Cooley under-relaxation scheme is used. DBD - delta-bar-delta under-relaxation is used. Note
that the under-relaxation schemes are often used in conjunction with problems that use the Newton-Raphson
formulation, however, experience has indicated that they also work well for non-Newton problems, such as those
with the wet/dry options of MODFLOW 6.
• under_relaxation_gamma real value defining either the relaxation factor for the SIMPLE scheme or the his-
tory or memory term factor of the Cooley and delta-bar-delta algorithms. For the SIMPLE scheme, a value of
one indicates that there is no under-relaxation and the full head change is applied. This value can be gradually
reduced from one as a way to improve convergence; for well behaved problems, using a value less than one
can increase the number of outer iterations required for convergence and needlessly increase run times. UN-
DER_RELAXATION_GAMMA must be greater than zero for the SIMPLE scheme or the program will termi-
nate with an error. For the Cooley and delta-bar-delta schemes, UNDER_RELAXATION_GAMMA is a memory
term that can range between zero and one. When UNDER_RELAXATION_GAMMA is zero, only the most re-
cent history (previous iteration value) is maintained. As UNDER_RELAXATION_GAMMA is increased, past
history of iteration changes has greater influence on the memory term. The memory term is maintained as an ex-
ponential average of past changes. Retaining some past history can overcome granular behavior in the calculated
function surface and therefore helps to overcome cyclic patterns of non-convergence. The value usually ranges
from 0.1 to 0.3; a value of 0.2 works well for most problems. UNDER_RELAXATION_GAMMA only needs
to be specified if UNDER_RELAXATION is not NONE.
• under_relaxation_theta real value defining the reduction factor for the learning rate (under-relaxation term)
of the delta-bar-delta algorithm. The value of UNDER_RELAXATION_THETA is between zero and one. If
the change in the dependent-variable (for example, head) is of opposite sign to that of the previous iteration,
the under-relaxation term is reduced by a factor of UNDER_RELAXATION_THETA. The value usually ranges

3.2. Iterative Model Solution 13


MODFLOW 6

from 0.3 to 0.9; a value of 0.7 works well for most problems. UNDER_RELAXATION_THETA only needs to
be specified if UNDER_RELAXATION is DBD.
• under_relaxation_kappa real value defining the increment for the learning rate (under-relaxation term) of the
delta-bar-delta algorithm. The value of UNDER_RELAXATION_kappa is between zero and one. If the change
in the dependent-variable (for example, head) is of the same sign to that of the previous iteration, the under-
relaxation term is increased by an increment of UNDER_RELAXATION_KAPPA. The value usually ranges
from 0.03 to 0.3; a value of 0.1 works well for most problems. UNDER_RELAXATION_KAPPA only needs to
be specified if UNDER_RELAXATION is DBD.
• under_relaxation_momentum real value defining the fraction of past history changes that is added as a mo-
mentum term to the step change for a nonlinear iteration. The value of UNDER_RELAXATION_MOMENTUM
is between zero and one. A large momentum term should only be used when small learning rates are expected.
Small amounts of the momentum term help convergence. The value usually ranges from 0.0001 to 0.1; a value
of 0.001 works well for most problems. UNDER_RELAXATION_MOMENTUM only needs to be specified if
UNDER_RELAXATION is DBD.
• backtracking_number integer value defining the maximum number of backtracking iterations allowed for
residual reduction computations. If BACKTRACKING_NUMBER = 0 then the backtracking iterations are omit-
ted. The value usually ranges from 2 to 20; a value of 10 works well for most problems.
• backtracking_tolerance real value defining the tolerance for residual change that is allowed for residual
reduction computations. BACKTRACKING_TOLERANCE should not be less than one to avoid getting stuck
in local minima. A large value serves to check for extreme residual increases, while a low value serves to control
step size more severely. The value usually ranges from 1.0 to 106; a value of 104 works well for most problems
but lower values like 1.1 may be required for harder problems. BACKTRACKING_TOLERANCE only needs
to be specified if BACKTRACKING_NUMBER is greater than zero.
• backtracking_reduction_factor real value defining the reduction in step size used for residual reduc-
tion computations. The value of BACKTRACKING_REDUCTION_FACTOR is between zero and one.
The value usually ranges from 0.1 to 0.3; a value of 0.2 works well for most problems. BACKTRACK-
ING_REDUCTION_FACTOR only needs to be specified if BACKTRACKING_NUMBER is greater than zero.
• backtracking_residual_limit real value defining the limit to which the residual is reduced with backtrack-
ing. If the residual is smaller than BACKTRACKING_RESIDUAL_LIMIT, then further backtracking is not
performed. A value of 100 is suitable for large problems and residual reduction to smaller values may only
slow down computations. BACKTRACKING_RESIDUAL_LIMIT only needs to be specified if BACKTRACK-
ING_NUMBER is greater than zero.

Block: LINEAR

• inner_maximum integer value defining the maximum number of inner (linear) iterations. The number typi-
cally depends on the characteristics of the matrix solution scheme being used. For nonlinear problems, IN-
NER_MAXIMUM usually ranges from 60 to 600; a value of 100 will be sufficient for most linear problems.
• inner_dvclose real value defining the dependent-variable (for example, head) change criterion for convergence
of the inner (linear) iterations, in units of the dependent-variable (for example, length for head). When the
maximum absolute value of the dependent-variable change at all nodes during an iteration is less than or equal
to INNER_DVCLOSE, the matrix solver assumes convergence. Commonly, INNER_DVCLOSE is set equal to
or an order of magnitude less than the OUTER_DVCLOSE value specified for the NONLINEAR block. The
keyword, INNER_HCLOSE can be still be specified instead of INNER_DVCLOSE for backward compatibility
with previous versions of MODFLOW 6 but eventually INNER_HCLOSE will be deprecated and specification
of INNER_HCLOSE will cause MODFLOW 6 to terminate with an error.
• inner_rclose real value that defines the flow residual tolerance for convergence of the IMS linear solver and
specific flow residual criteria used. This value represents the maximum allowable residual at any single node.
Value is in units of length cubed per time, and must be consistent with MODFLOW 6 length and time units.

14 Chapter 3. Input Guide


MODFLOW 6

Usually a value of 1.0 x 10-1 is sufficient for the flow-residual criteria when meters and seconds are the defined
MODFLOW 6 length and time.
• rclose_option an optional keyword that defines the specific flow residual criterion used. STRICT–an op-
tional keyword that is used to specify that INNER_RCLOSE represents a infinity-Norm (absolute convergence
criteria) and that the dependent-variable (for example, head) and flow convergence criteria must be met on
the first inner iteration (this criteria is equivalent to the criteria used by the MODFLOW-2005 PCG package
). L2NORM_RCLOSE–an optional keyword that is used to specify that INNER_RCLOSE represents a L-2
Norm closure criteria instead of a infinity-Norm (absolute convergence criteria). When L2NORM_RCLOSE
is specified, a reasonable initial INNER_RCLOSE value is 0.1 times the number of active cells when meters
and seconds are the defined MODFLOW 6 length and time. RELATIVE_RCLOSE–an optional keyword that
is used to specify that INNER_RCLOSE represents a relative L-2 Norm reduction closure criteria instead of
a infinity-Norm (absolute convergence criteria). When RELATIVE_RCLOSE is specified, a reasonable initial
INNER_RCLOSE value is 1.0 x 10-4 and convergence is achieved for a given inner (linear) iteration when Delta
h INNER_DVCLOSE and the current L-2 Norm is the product of the RELATIVE_RCLOSE and the initial
L-2 Norm for the current inner (linear) iteration. If RCLOSE_OPTION is not specified, an absolute residual
(infinity-norm) criterion is used.
• linear_acceleration a keyword that defines the linear acceleration method used by the default IMS linear
solvers. CG - preconditioned conjugate gradient method. BICGSTAB - preconditioned bi-conjugate gradient
stabilized method.
• relaxation_factor optional real value that defines the relaxation factor used by the incomplete LU factoriza-
tion preconditioners (MILU(0) and MILUT). RELAXATION_FACTOR is unitless and should be greater than
or equal to 0.0 and less than or equal to 1.0. RELAXATION_FACTOR values of about 1.0 are commonly used,
and experience suggests that convergence can be optimized in some cases with relax values of 0.97. A RELAX-
ATION_FACTOR value of 0.0 will result in either ILU(0) or ILUT preconditioning (depending on the value
specified for PRECONDITIONER_LEVELS and/or PRECONDITIONER_DROP_TOLERANCE). By default,
RELAXATION_FACTOR is zero.
• preconditioner_levels optional integer value defining the level of fill for ILU decomposition used in the
ILUT and MILUT preconditioners. Higher levels of fill provide more robustness but also require more mem-
ory. For optimal performance, it is suggested that a large level of fill be applied (7 or 8) with use of a drop
tolerance. Specification of a PRECONDITIONER_LEVELS value greater than zero results in use of the ILUT
preconditioner. By default, PRECONDITIONER_LEVELS is zero and the zero-fill incomplete LU factorization
preconditioners (ILU(0) and MILU(0)) are used.
• preconditioner_drop_tolerance optional real value that defines the drop tolerance used to drop precondi-
tioner terms based on the magnitude of matrix entries in the ILUT and MILUT preconditioners. A value of 10-4
works well for most problems. By default, PRECONDITIONER_DROP_TOLERANCE is zero and the zero-fill
incomplete LU factorization preconditioners (ILU(0) and MILU(0)) are used.
• number_orthogonalizations optional integer value defining the interval used to explicitly recalculate the
residual of the flow equation using the solver coefficient matrix, the latest dependent-variable (for example,
head) estimates, and the right hand side. For problems that benefit from explicit recalculation of the residual, a
number between 4 and 10 is appropriate. By default, NUMBER_ORTHOGONALIZATIONS is zero.
• scaling_method an optional keyword that defines the matrix scaling approach used. By default, matrix scaling
is not applied. NONE - no matrix scaling applied. DIAGONAL - symmetric matrix scaling using the POLCG
preconditioner scaling method in Hill (1992). L2NORM - symmetric matrix scaling using the L2 norm.
• reordering_method an optional keyword that defines the matrix reordering approach used. By default, matrix
reordering is not applied. NONE - original ordering. RCM - reverse Cuthill McKee ordering. MD - minimum
degree ordering.

3.2. Iterative Model Solution 15


MODFLOW 6

Example Input File

BEGIN OPTIONS
PRINT_OPTION ALL
COMPLEXITY MODERATE
END OPTIONS

BEGIN NONLINEAR
OUTER_DVCLOSE 1.E-4
OUTER_MAXIMUM 2000
UNDER_RELAXATION DBD
UNDER_RELAXATION_THETA 0.70
UNDER_RELAXATION_KAPPA 0.100000E-03
UNDER_RELAXATION_GAMMA 0.
UNDER_RELAXATION_MOMENTUM 0.
BACKTRACKING_NUMBER 20
BACKTRACKING_TOLERANCE 2.
BACKTRACKING_REDUCTION_FACTOR 0.6
BACKTRACKING_RESIDUAL_LIMIT 5.000000E-04
END NONLINEAR

BEGIN LINEAR
INNER_MAXIMUM 100
INNER_DVCLOSE 1.0E-4
INNER_RCLOSE 0.001
LINEAR_ACCELERATION BICGSTAB
RELAXATION_FACTOR 0.97
SCALING_METHOD NONE
REORDERING_METHOD NONE
END LINEAR

IMS variable values for the available complexity options

3.3 Groundwater Flow


3.3.1 GWF-API
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[OBS6 FILEIN <obs6_filename>]
[MOVER]
END OPTIONS

BEGIN DIMENSIONS
MAXBOUND <maxbound>
END DIMENSIONS

16 Chapter 3. Input Guide


MODFLOW 6

Explanation of Variables
Block: OPTIONS

• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of api boundary cells.
• PRINT_INPUT keyword to indicate that the list of api boundary information will be written to the listing file
immediately after it is read.
• PRINT_FLOWS keyword to indicate that the list of api boundary flow rates will be printed to the listing file for
every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output
Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress
period.
• SAVE_FLOWS keyword to indicate that api boundary flow terms will be written to the file specified with “BUDGET
FILEOUT” in Output Control.
• OBS6 keyword to specify that record corresponds to an observations file.
• FILEIN keyword to specify that an input filename is expected next.
• obs6_filename name of input file to define observations for the api boundary package. See the “Observation
utility” section for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and
ref{table:gwt-obstypetable} lists observation type(s) supported by the api boundary package.
• MOVER keyword to indicate that this instance of the api boundary Package can be used with the Water Mover
(MVR) Package. When the MOVER option is specified, additional memory is allocated within the package to
store the available, provided, and received water.

Block: DIMENSIONS

• maxbound integer value specifying the maximum number of api boundary cells that will be specified for use
during any stress period.

3.3.2 GWF-BUY
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[HHFORMULATION_RHS]
[DENSEREF <denseref>]
[DENSITY FILEOUT <densityfile>]
END OPTIONS

BEGIN DIMENSIONS
NRHOSPECIES <nrhospecies>
END DIMENSIONS

BEGIN PACKAGEDATA
<irhospec> <drhodc> <crhoref> <modelname> <auxspeciesname>
<irhospec> <drhodc> <crhoref> <modelname> <auxspeciesname>
...
END PACKAGEDATA

3.3. Groundwater Flow 17


MODFLOW 6

Explanation of Variables
Block: OPTIONS

• HHFORMULATION_RHS use the variable-density hydraulic head formulation and add off-diagonal terms to the
right-hand. This option will prevent the BUY Package from adding asymmetric terms to the flow matrix.
• denseref fluid reference density used in the equation of state. This value is set to 1000. if not specified as an
option.
• DENSITY keyword to specify that record corresponds to density.
• FILEOUT keyword to specify that an output filename is expected next.
• densityfile name of the binary output file to write density information. The density file has the same format
as the head file. Density values will be written to the density file whenever heads are written to the binary head
file. The settings for controlling head output are contained in the Output Control option.

Block: DIMENSIONS

• nrhospecies number of species used in density equation of state. This value must be one or greater if the BUY
package is activated.

Block: PACKAGEDATA

• irhospec integer value that defines the species number associated with the specified PACKAGEDATA data on
the line. IRHOSPECIES must be greater than zero and less than or equal to NRHOSPECIES. Information must
be specified for each of the NRHOSPECIES species or the program will terminate with an error. The program
will also terminate with an error if information for a species is specified more than once.
• drhodc real value that defines the slope of the density-concentration line for this species used in the density
equation of state.
• crhoref real value that defines the reference concentration value used for this species in the density equation of
state.
• modelname name of a GWT or GWE model used to simulate a species that will be used in the density equation
of state. This name will have no effect if the simulation does not include a GWT or GWE model that corresponds
to this GWF model.
• auxspeciesname name of an auxiliary variable in a GWF stress package that will be used for this species to
calculate a density value. If a density value is needed by the Buoyancy Package then it will use the concentra-
tion values in this AUXSPECIESNAME column in the density equation of state. For advanced stress packages
(LAK, SFR, MAW, and UZF) that have an associated advanced transport package (LKT, SFT, MWT, and UZT),
the FLOW_PACKAGE_AUXILIARY_NAME option in the advanced transport package can be used to transfer
simulated concentrations into the flow package auxiliary variable. In this manner, the Buoyancy Package can
calculate density values for lakes, streams, multi-aquifer wells, and unsaturated zone flow cells using simulated
concentrations.

Example Input File

BEGIN OPTIONS
DENSEREF 1000.
END OPTIONS

BEGIN DIMENSIONS
NRHOSPECIES 2
END DIMENSIONS
(continues on next page)

18 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)

BEGIN PACKAGEDATA
#ISPEC DRHODC CRHOREF MODELNAME AUXSPECIESNAME
1 0.7 0. GWT-1 SALINITY
2 -0.375 25. GWT-2 TEMPERATURE
END PACKAGEDATA

3.3.3 GWF-CHD
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[AUXILIARY <auxiliary>]
[AUXMULTNAME <auxmultname>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
END OPTIONS

BEGIN DIMENSIONS
MAXBOUND <maxbound>
END DIMENSIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<cellid> <head> [<aux(naux)>] [<boundname>]
<cellid> <head> [<aux(naux)>] [<boundname>]
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• auxmultname name of auxiliary variable to be used as multiplier of CHD head value.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of constant-head cells.
• PRINT_INPUT keyword to indicate that the list of constant-head information will be written to the listing file
immediately after it is read.

3.3. Groundwater Flow 19


MODFLOW 6

• PRINT_FLOWS keyword to indicate that the list of constant-head flow rates will be printed to the listing file for
every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output
Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress
period.
• SAVE_FLOWS keyword to indicate that constant-head flow terms will be written to the file specified with “BUD-
GET FILEOUT” in Output Control.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the constant-head package. See the “Observation
utility” section for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and
ref{table:gwt-obstypetable} lists observation type(s) supported by the constant-head package.

Block: DIMENSIONS

• maxbound integer value specifying the maximum number of constant-head cells that will be specified for use
during any stress period.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.
• head is the head at the boundary. If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.
• aux represents the values of the auxiliary variables for each constant head. The values of auxiliary variables must
be present for each constant head. The values must be specified in the order of the auxiliary variables specified
in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE
entry (see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-
series name in place of a numeric value.
• boundname name of the constant head boundary cell. BOUNDNAME is an ASCII character variable that can
contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed
within single quotes.

Example Input File

#The OPTIONS block is optional


BEGIN OPTIONS
AUXILIARY temperature
(continues on next page)

20 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


BOUNDNAMES
PRINT_INPUT
PRINT_FLOWS
SAVE_FLOWS
END OPTIONS

#The DIMENSIONS block is required


BEGIN DIMENSIONS
MAXBOUND 2
END DIMENSIONS

#The following block of constant-head cells will be activated


#for stress period 1. This block will remain active throughout
#the simulation.

BEGIN PERIOD 1
#l r c head temperature boundname
1 1 2 100. 20.5 chd_1_2
1 1 3 100. 20.4 chd_1_3
END PERIOD 1

Available Observation Types


Example Observation Input File

BEGIN OPTIONS
DIGITS 8
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.chd01.csv


# obsname obstype ID
chd_2_1 CHD 1 1 2
chd_2_2 CHD 1 2 2
chd_2_3 CHD 1 3 2
chd_2_4 CHD 1 4 2
END CONTINUOUS

BEGIN CONTINUOUS FILEOUT my_model.chd02.csv


# obsname obstype ID
chd_3_flow CHD CHD_1_3
END CONTINUOUS

3.3.4 GWF-CSUB
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[BOUNDNAMES]
[PRINT_INPUT]
(continues on next page)

3.3. Groundwater Flow 21


MODFLOW 6

(continued from previous page)


[SAVE_FLOWS]
[GAMMAW <gammaw>]
[BETA <beta>]
[HEAD_BASED]
[INITIAL_PRECONSOLIDATION_HEAD]
[NDELAYCELLS <ndelaycells>]
[COMPRESSION_INDICES]
[UPDATE_MATERIAL_PROPERTIES]
[CELL_FRACTION]
[SPECIFIED_INITIAL_INTERBED_STATE]
[SPECIFIED_INITIAL_PRECONSOLIDATION_STRESS]
[SPECIFIED_INITIAL_DELAY_HEAD]
[EFFECTIVE_STRESS_LAG]
[STRAIN_CSV_INTERBED FILEOUT <interbedstrain_filename>]
[STRAIN_CSV_COARSE FILEOUT <coarsestrain_filename>]
[COMPACTION FILEOUT <compaction_filename>]
[COMPACTION_ELASTIC FILEOUT <elastic_compaction_filename>]
[COMPACTION_INELASTIC FILEOUT <inelastic_compaction_filename>]
[COMPACTION_INTERBED FILEOUT <interbed_compaction_filename>]
[COMPACTION_COARSE FILEOUT <coarse_compaction_filename>]
[ZDISPLACEMENT FILEOUT <zdisplacement_filename>]
[PACKAGE_CONVERGENCE FILEOUT <package_convergence_filename>]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
END OPTIONS

BEGIN DIMENSIONS
NINTERBEDS <ninterbeds>
[MAXSIG0 <maxsig0>]
END DIMENSIONS

BEGIN GRIDDATA
CG_SKE_CR [LAYERED] [NETCDF]
<cg_ske_cr(nodes)> -- READARRAY
CG_THETA [LAYERED] [NETCDF]
<cg_theta(nodes)> -- READARRAY
[SGM [LAYERED] [NETCDF]
<sgm(nodes)> -- READARRAY]
[SGS [LAYERED] [NETCDF]
<sgs(nodes)> -- READARRAY]
END GRIDDATA

BEGIN PACKAGEDATA
[<icsubno> <cellid> <cdelay> <pcs0> <thick_frac> <rnb> <ssv_cc> <sse_cr> <theta>
˓→<kv> <h0> [<boundname>]

<icsubno> <cellid> <cdelay> <pcs0> <thick_frac> <rnb> <ssv_cc> <sse_cr> <theta>


˓→<kv> <h0> [<boundname>]

...]
END PACKAGEDATA

FOR ANY STRESS PERIOD

22 Chapter 3. Input Guide


MODFLOW 6

BEGIN PERIOD <iper>


<cellid> <sig0>
<cellid> <sig0>
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of CSUB cells.
• PRINT_INPUT keyword to indicate that the list of CSUB information will be written to the listing file immediately
after it is read.
• SAVE_FLOWS keyword to indicate that cell-by-cell flow terms will be written to the file specified with “BUDGET
SAVE FILE” in Output Control.
• gammaw unit weight of water. For freshwater, GAMMAW is 9806.65 Newtons/cubic meters or 62.48 lb/cubic
foot in SI and English units, respectively. By default, GAMMAW is 9806.65 Newtons/cubic meters.
• beta compressibility of water. Typical values of BETA are 4.6512e-10 1/Pa or 2.2270e-8 lb/square foot in SI
and English units, respectively. By default, BETA is 4.6512e-10 1/Pa.
• HEAD_BASED keyword to indicate the head-based formulation will be used to simulate coarse-grained
aquifer materials and no-delay and delay interbeds. Specifying HEAD_BASED also specifies the INI-
TIAL_PRECONSOLIDATION_HEAD option.
• INITIAL_PRECONSOLIDATION_HEAD keyword to indicate that preconsolidation heads will be specified for no-
delay and delay interbeds in the PACKAGEDATA block. If the SPECIFIED_INITIAL_INTERBED_STATE
option is specified in the OPTIONS block, user-specified preconsolidation heads in the PACKAGEDATA block
are absolute values. Otherwise, user-specified preconsolidation heads in the PACKAGEDATA block are relative
to steady-state or initial heads.
• ndelaycells number of nodes used to discretize delay interbeds. If not specified, then a default value of 19 is
assigned.
• COMPRESSION_INDICES keyword to indicate that the recompression (CR) and compression (CC) indices are
specified instead of the elastic specific storage (SSE) and inelastic specific storage (SSV) coefficients. If not
specified, then elastic specific storage (SSE) and inelastic specific storage (SSV) coefficients must be specified.
• UPDATE_MATERIAL_PROPERTIES keyword to indicate that the thickness and void ratio of coarse-grained and
interbed sediments (delay and no-delay) will vary during the simulation. If not specified, the thickness and void
ratio of coarse-grained and interbed sediments will not vary during the simulation.
• CELL_FRACTION keyword to indicate that the thickness of interbeds will be specified in terms of the fraction of
cell thickness. If not specified, interbed thicknness must be specified.
• SPECIFIED_INITIAL_INTERBED_STATE keyword to indicate that absolute preconsolidation stresses
(heads) and delay bed heads will be specified for interbeds defined in the PACKAGEDATA block.
The SPECIFIED_INITIAL_INTERBED_STATE option is equivalent to specifying the SPECI-
FIED_INITIAL_PRECONSOLITATION_STRESS and SPECIFIED_INITIAL_DELAY_HEAD. If SPECI-
FIED_INITIAL_INTERBED_STATE is not specified then preconsolidation stress (head) and delay bed head
values specified in the PACKAGEDATA block are relative to simulated values of the first stress period if
steady-state or initial stresses and GWF heads if the first stress period is transient.
• SPECIFIED_INITIAL_PRECONSOLIDATION_STRESS keyword to indicate that absolute preconsolidation
stresses (heads) will be specified for interbeds defined in the PACKAGEDATA block. If SPECI-
FIED_INITIAL_PRECONSOLITATION_STRESS and SPECIFIED_INITIAL_INTERBED_STATE are not

3.3. Groundwater Flow 23


MODFLOW 6

specified then preconsolidation stress (head) values specified in the PACKAGEDATA block are relative to sim-
ulated values if the first stress period is steady-state or initial stresses (heads) if the first stress period is transient.
• SPECIFIED_INITIAL_DELAY_HEAD keyword to indicate that absolute initial delay bed head will be specified
for interbeds defined in the PACKAGEDATA block. If SPECIFIED_INITIAL_DELAY_HEAD and SPECI-
FIED_INITIAL_INTERBED_STATE are not specified then delay bed head values specified in the PACKAGE-
DATA block are relative to simulated values if the first stress period is steady-state or initial GWF heads if the
first stress period is transient.
• EFFECTIVE_STRESS_LAG keyword to indicate the effective stress from the previous time step will be used to
calculate specific storage values. This option can 1) help with convergence in models with thin cells and water
table elevations close to land surface; 2) is identical to the approach used in the SUBWT package for MODFLOW-
2005; and 3) is only used if the effective-stress formulation is being used. By default, current effective stress
values are used to calculate specific storage values.
• STRAIN_CSV_INTERBED keyword to specify the record that corresponds to final interbed strain output.
• FILEOUT keyword to specify that an output filename is expected next.
• interbedstrain_filename name of the comma-separated-values output file to write final interbed strain in-
formation.
• STRAIN_CSV_COARSE keyword to specify the record that corresponds to final coarse-grained material strain
output.
• coarsestrain_filename name of the comma-separated-values output file to write final coarse-grained mate-
rial strain information.
• COMPACTION keyword to specify that record corresponds to the compaction.
• compaction_filename name of the binary output file to write compaction information.
• COMPACTION_ELASTIC keyword to specify that record corresponds to the elastic interbed compaction binary
file.
• elastic_compaction_filename name of the binary output file to write elastic interbed compaction informa-
tion.
• COMPACTION_INELASTIC keyword to specify that record corresponds to the inelastic interbed compaction binary
file.
• inelastic_compaction_filename name of the binary output file to write inelastic interbed compaction in-
formation.
• COMPACTION_INTERBED keyword to specify that record corresponds to the interbed compaction binary file.
• interbed_compaction_filename name of the binary output file to write interbed compaction information.
• COMPACTION_COARSE keyword to specify that record corresponds to the elastic coarse-grained material com-
paction binary file.
• coarse_compaction_filename name of the binary output file to write elastic coarse-grained material com-
paction information.
• ZDISPLACEMENT keyword to specify that record corresponds to the z-displacement binary file.
• zdisplacement_filename name of the binary output file to write z-displacement information.
• PACKAGE_CONVERGENCE keyword to specify that record corresponds to the package convergence comma spaced
values file. Package convergence data is for delay interbeds. A warning message will be issued if package
convergence data is requested but delay interbeds are not included in the package.
• package_convergence_filename name of the comma spaced values output file to write package convergence
information.

24 Chapter 3. Input Guide


MODFLOW 6

• TS6 keyword to specify that record corresponds to a time-series file.


• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the CSUB package. See the “Observation
utility” section for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and
ref{table:gwt-obstypetable} lists observation type(s) supported by the CSUB package.

Block: DIMENSIONS

• ninterbeds is the number of CSUB interbed systems. More than 1 CSUB interbed systems can be assigned to
a GWF cell; however, only 1 GWF cell can be assigned to a single CSUB interbed system.
• maxsig0 is the maximum number of cells that can have a specified stress offset. More than 1 stress offset can be
assigned to a GWF cell. By default, MAXSIG0 is 0.

Block: GRIDDATA

• cg_ske_cr is the initial elastic coarse-grained material specific storage or recompression index. The recompres-
sion index is specified if COMPRESSION_INDICES is specified in the OPTIONS block. Specified or calculated
elastic coarse-grained material specific storage values are not adjusted from initial values if HEAD_BASED is
specified in the OPTIONS block.
• cg_theta is the initial porosity of coarse-grained materials.
• sgm is the specific gravity of moist or unsaturated sediments. If not specified, then a default value of 1.7 is
assigned.
• sgs is the specific gravity of saturated sediments. If not specified, then a default value of 2.0 is assigned.

Block: PACKAGEDATA

• icsubno integer value that defines the CSUB interbed number associated with the specified PACKAGEDATA
data on the line. CSUBNO must be greater than zero and less than or equal to NINTERBEDS. CSUB information
must be specified for every CSUB cell or the program will terminate with an error. The program will also
terminate with an error if information for a CSUB interbed number is specified more than once.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.
• cdelay character string that defines the subsidence delay type for the interbed. Possible subsidence package
CDELAY strings include: NODELAY–character keyword to indicate that delay will not be simulated in the
interbed. DELAY–character keyword to indicate that delay will be simulated in the interbed.
• pcs0 is the initial offset from the calculated initial effective stress or initial preconsolidation stress in the
interbed, in units of height of a column of water. PCS0 is the initial preconsolidation stress if SPECI-
FIED_INITIAL_INTERBED_STATE or SPECIFIED_INITIAL_PRECONSOLIDATION_STRESS are speci-
fied in the OPTIONS block. If HEAD_BASED is specified in the OPTIONS block, PCS0 is the initial offset from
the calculated initial head or initial preconsolidation head in the CSUB interbed and the initial preconsolidation
stress is calculated from the calculated initial effective stress or calculated initial geostatic stress, respectively.
• thick_frac is the interbed thickness or cell fraction of the interbed. Interbed thickness is specified as a fraction
of the cell thickness if CELL_FRACTION is specified in the OPTIONS block.

3.3. Groundwater Flow 25


MODFLOW 6

• rnb is the interbed material factor equivalent number of interbeds in the interbed system represented by the
interbed. RNB must be greater than or equal to 1 if CDELAY is DELAY. Otherwise, RNB can be any value.
• ssv_cc is the initial inelastic specific storage or compression index of the interbed. The compression index is
specified if COMPRESSION_INDICES is specified in the OPTIONS block. Specified or calculated interbed in-
elastic specific storage values are not adjusted from initial values if HEAD_BASED is specified in the OPTIONS
block.
• sse_cr is the initial elastic coarse-grained material specific storage or recompression index of the interbed. The
recompression index is specified if COMPRESSION_INDICES is specified in the OPTIONS block. Specified
or calculated interbed elastic specific storage values are not adjusted from initial values if HEAD_BASED is
specified in the OPTIONS block.
• theta is the initial porosity of the interbed.
• kv is the vertical hydraulic conductivity of the delay interbed. KV must be greater than 0 if CDELAY is DELAY.
Otherwise, KV can be any value.
• h0 is the initial offset from the head in cell cellid or the initial head in the delay interbed. H0 is the initial head
in the delay bed if SPECIFIED_INITIAL_INTERBED_STATE or SPECIFIED_INITIAL_DELAY_HEAD are
specified in the OPTIONS block. H0 can be any value if CDELAY is NODELAY.
• boundname name of the CSUB cell. BOUNDNAME is an ASCII character variable that can contain as many
as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single
quotes.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.
• sig0 is the stress offset for the cell. SIG0 is added to the calculated geostatic stress for the cell. SIG0 is specified
only if MAXSIG0 is specified to be greater than 0 in the DIMENSIONS block. If the Options block includes a
TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time series by
entering the time-series name in place of a numeric value.

Example Input File

BEGIN OPTIONS
COMPRESSION_INDICES
SPECIFIED_INITIAL_INTERBED_STATE
BOUNDNAMES
SAVE_FLOWS
END OPTIONS

BEGIN DIMENSIONS
NINTERBEDS 4
MAXSIG0 1
END DIMENSIONS
(continues on next page)

26 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)

BEGIN GRIDDATA
# compression indices of coarse grained aquifer materials
cg_ske_cr LAYERED
CONSTANT 0.01
CONSTANT 0.01
CONSTANT 0.01
CONSTANT 0.01
# porosity of coarse grained aquifer materials
cg_theta LAYERED
CONSTANT 0.45
CONSTANT 0.45
CONSTANT 0.45
CONSTANT 0.45
# specific gravity of saturated sediment
SGS LAYERED
CONSTANT 2.0
CONSTANT 2.0
CONSTANT 2.0
CONSTANT 2.0
# specific gravity of moist sediment
SGM LAYERED
CONSTANT 1.7
CONSTANT 1.7
CONSTANT 1.7
CONSTANT 1.7
END GRIDDATA

BEGIN PACKAGEDATA
# icsubsno cellid cdelay pcs0 thick_frac rnb ssv_cc sse_cr theta kv h0␣
˓→boundname

1 1 1 6 delay 15.0 0.450 1.0 0.25 0.01 0.45 0.1 15.␣


˓→nsystm0

2 1 1 7 nodelay 15.0 0.450 1.0 0.25 0.01 0.45 0.0 0.0␣


˓→nsystm1

3 1 1 8 nodelay 15.0 0.450 1.0 0.25 0.01 0.45 0.0 0.0␣


˓→nsystm1

4 1 1 9 delay 15.0 0.450 1.0 0.25 0.01 0.45 0.1 15.␣


˓→nsystm2

END PACKAGEDATA

BEGIN PERIOD 1
# stress offset for stress period 1
1 1 6 1700.00000000
END PERIOD

Available Observation Types


Example Observation Input File

BEGIN CONTINUOUS FILEOUT my_model.csub.csv


tcomp3 compaction-cell 1 1 7
(continues on next page)

3.3. Groundwater Flow 27


MODFLOW 6

(continued from previous page)


ibcensystm0 elastic-compaction 2
ibcinsystm0 inelastic-compaction 2
ibcensystm0 elastic-csub nsystm0
ibcinsystm0 inelastic-csum nsystm0
END CONTINUOUS

3.3.5 GWF-DIS
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[LENGTH_UNITS <length_units>]
[NOGRB]
[GRB6 FILEOUT <grb6_filename>]
[XORIGIN <xorigin>]
[YORIGIN <yorigin>]
[ANGROT <angrot>]
[EXPORT_ARRAY_ASCII]
[EXPORT_ARRAY_NETCDF]
[CRS <crs>]
[NCF6 FILEIN <ncf6_filename>]
END OPTIONS

BEGIN DIMENSIONS
NLAY <nlay>
NROW <nrow>
NCOL <ncol>
END DIMENSIONS

BEGIN GRIDDATA
DELR [NETCDF]
<delr(ncol)> -- READARRAY
DELC [NETCDF]
<delc(nrow)> -- READARRAY
TOP [NETCDF]
<top(ncol, nrow)> -- READARRAY
BOTM [LAYERED] [NETCDF]
<botm(ncol, nrow, nlay)> -- READARRAY
[IDOMAIN [LAYERED] [NETCDF]
<idomain(ncol, nrow, nlay)> -- READARRAY]
END GRIDDATA

Explanation of Variables
Block: OPTIONS

• length_units is the length units used for this model. Values can be “FEET”, “METERS”, or “CENTIME-
TERS”. If not specified, the default is “UNKNOWN”.
• NOGRB keyword to deactivate writing of the binary grid file.

28 Chapter 3. Input Guide


MODFLOW 6

• GRB6 keyword to specify that record corresponds to a binary grid file.


• FILEOUT keyword to specify that an output filename is expected next.
• grb6_filename defines a binary grid output file. If this option is not provided, the output file will have the same
name as the discretization input file, plus extension “.grb”.
• xorigin x-position of the lower-left corner of the model grid. A default value of zero is assigned if not specified.
The value for XORIGIN does not affect the model simulation, but it is written to the binary grid file so that
postprocessors can locate the grid in space.
• yorigin y-position of the lower-left corner of the model grid. If not specified, then a default value equal to zero
is used. The value for YORIGIN does not affect the model simulation, but it is written to the binary grid file so
that postprocessors can locate the grid in space.
• angrot counter-clockwise rotation angle (in degrees) of the lower-left corner of the model grid. If not specified,
then a default value of 0.0 is assigned. The value for ANGROT does not affect the model simulation, but it is
written to the binary grid file so that postprocessors can locate the grid in space.
• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.
• crs is a real-world coordinate reference system (CRS) for the model, for example, an EPSG integer code (e.g.
26915), authority string (i.e. epsg:26915), or Open Geospatial Consortium Well-Known Text (WKT) specifica-
tion. Limited to 5000 characters. The entry for CRS does not affect the model simulation, but it is written to the
binary grid file so that postprocessors can locate the grid in space.
• NCF6 keyword to specify that record corresponds to a netcdf configuration (NCF) file.
• FILEIN keyword to specify that an input filename is expected next.
• ncf6_filename defines a netcdf configuration (NCF) input file.

Block: DIMENSIONS

• nlay is the number of layers in the model grid.


• nrow is the number of rows in the model grid.
• ncol is the number of columns in the model grid.

Block: GRIDDATA

• delr is the column spacing in the row direction.


• delc is the row spacing in the column direction.
• top is the top elevation for each cell in the top model layer.
• botm is the bottom elevation for each cell.
• idomain is an optional array that characterizes the existence status of a cell. If the IDOMAIN array is not
specified, then all model cells exist within the solution. If the IDOMAIN value for a cell is 0, the cell does not
exist in the simulation. Input and output values will be read and written for the cell, but internal to the program,
the cell is excluded from the solution. If the IDOMAIN value for a cell is 1 or greater, the cell exists in the
simulation. If the IDOMAIN value for a cell is -1, the cell does not exist in the simulation. Furthermore, the first
existing cell above will be connected to the first existing cell below. This type of cell is referred to as a “vertical
pass through” cell.

3.3. Groundwater Flow 29


MODFLOW 6

Example Input File


Example 1

#The OPTIONS block is optional


BEGIN OPTIONS
LENGTH_UNITS METERS
END OPTIONS

#The DIMENSIONS block is required


BEGIN DIMENSIONS
NLAY 10
NROW 1
NCOL 21
END DIMENSIONS

#The GRIDDATA block is required


BEGIN GRIDDATA
DELR
INTERNAL FACTOR 1.
.1 .1 .1 .1 .1 .1 .1 .1 .1 .1 .1 .1 .1 .1 .1 .1 .1 .1 .1 .1 0.01
DELC
CONSTANT 1.0
TOP LAYERED
CONSTANT 1.
BOTM LAYERED
CONSTANT 0.9
CONSTANT 0.8
CONSTANT 0.7
CONSTANT 0.6
CONSTANT 0.5
CONSTANT 0.4
CONSTANT 0.3
CONSTANT 0.2
CONSTANT 0.1
CONSTANT 0.0
END GRIDDATA

Example 2

BEGIN OPTIONS
LENGTH_UNITS METERS
END OPTIONS

BEGIN DIMENSIONS
NODES 9
NJA 33
END DIMENSIONS

BEGIN GRIDDATA
TOP
CONSTANT 0.
BOT
CONSTANT -10
(continues on next page)

30 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


AREA
INTERNAL FACTOR 1
10000 10000 10000 10000 10000 10000 10000 10000 10000
END GRIDDATA

BEGIN CONNECTIONDATA
IHC
CONSTANT 1
IAC
INTERNAL FACTOR 1
3 4 3 4 5 4 3 4 3
JA
INTERNAL FACTOR 1
1 2 4
2 1 3 5
3 2 6
4 1 5 7
5 2 4 6 8
6 3 5 9
7 4 8
8 5 7 9
9 6 8
CL12
INTERNAL FACTOR 1
0 50 50
0 50 50 50
0 50 50
0 50 50 50
0 50 50 50 50
0 50 50 50
0 50 50
0 50 50 50
0 50 50
HWVA
INTERNAL FACTOR 1
0 100 100
0 100 100 100
0 100 100
0 100 100 100
0 100 100 100 100
0 100 100 100
0 100 100
0 100 100 100
0 100 100
END CONNECTIONDATA

Example 3

#The OPTIONS block is optional


BEGIN OPTIONS
LENGTH_UNITS METERS
END OPTIONS
(continues on next page)

3.3. Groundwater Flow 31


MODFLOW 6

(continued from previous page)

#The DIMENSIONS block is required


BEGIN DIMENSIONS
NCPL 4
NLAY 3
NVERT 9
END DIMENSIONS

#The GRIDDATA block is required


BEGIN GRIDDATA
TOP
CONSTANT 3.0
BOTM LAYERED
CONSTANT 2.0
CONSTANT 1.0
CONSTANT 0.0
IDOMAIN LAYERED
INTERNAL FACTOR 1
1 1 1 0
CONSTANT 1
CONSTANT 1
END GRIDDATA

#The VERTICES block is required


BEGIN VERTICES
1 0. 1.
2 .5 1.
3 1. 1.
4 0 .5
5 .5 .5
6 1. .5
7 0. 0.
8 .5 0.
9 1. 0.
END VERTICES

BEGIN CELL2D
1 .25 .75 4 1 2 5 4
2 .75 .75 4 2 3 6 5
3 .25 .25 4 4 5 8 7
4 .75 .25 4 5 6 9 8
END CELL2D

3.3.6 GWF-DISU
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[LENGTH_UNITS <length_units>]
[NOGRB]
(continues on next page)

32 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


[GRB6 FILEOUT <grb6_filename>]
[XORIGIN <xorigin>]
[YORIGIN <yorigin>]
[ANGROT <angrot>]
[VERTICAL_OFFSET_TOLERANCE <vertical_offset_tolerance>]
[EXPORT_ARRAY_ASCII]
[CRS <crs>]
END OPTIONS

BEGIN DIMENSIONS
NODES <nodes>
NJA <nja>
[NVERT <nvert>]
END DIMENSIONS

BEGIN GRIDDATA
TOP
<top(nodes)> -- READARRAY
BOT
<bot(nodes)> -- READARRAY
AREA
<area(nodes)> -- READARRAY
[IDOMAIN
<idomain(nodes)> -- READARRAY]
END GRIDDATA

BEGIN CONNECTIONDATA
IAC
<iac(nodes)> -- READARRAY
JA
<ja(nja)> -- READARRAY
IHC
<ihc(nja)> -- READARRAY
CL12
<cl12(nja)> -- READARRAY
HWVA
<hwva(nja)> -- READARRAY
[ANGLDEGX
<angldegx(nja)> -- READARRAY]
END CONNECTIONDATA

BEGIN VERTICES
[<iv> <xv> <yv>
<iv> <xv> <yv>
...]
END VERTICES

BEGIN CELL2D
[<icell2d> <xc> <yc> <ncvert> <icvert>
<icell2d> <xc> <yc> <ncvert> <icvert>
...]
(continues on next page)

3.3. Groundwater Flow 33


MODFLOW 6

(continued from previous page)


END CELL2D

Explanation of Variables
Block: OPTIONS

• length_units is the length units used for this model. Values can be “FEET”, “METERS”, or “CENTIME-
TERS”. If not specified, the default is “UNKNOWN”.
• NOGRB keyword to deactivate writing of the binary grid file.
• GRB6 keyword to specify that record corresponds to a binary grid file.
• FILEOUT keyword to specify that an output filename is expected next.
• grb6_filename defines a binary grid output file. If this option is not provided, the output file will have the same
name as the discretization input file, plus extension “.grb”.
• xorigin x-position of the origin used for model grid vertices. This value should be provided in a real-world
coordinate system. A default value of zero is assigned if not specified. The value for XORIGIN does not affect
the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.
• yorigin y-position of the origin used for model grid vertices. This value should be provided in a real-world
coordinate system. If not specified, then a default value equal to zero is used. The value for YORIGIN does not
affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in
space.
• angrot counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world
coordinate system. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not
affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in
space.
• vertical_offset_tolerance checks are performed to ensure that the top of a cell is not higher than the
bottom of an overlying cell. This option can be used to specify the tolerance that is used for checking. If top
of a cell is above the bottom of an overlying cell by a value less than this tolerance, then the program will not
terminate with an error. The default value is zero. This option should generally not be used.
• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• crs is a real-world coordinate reference system (CRS) for the model, for example, an EPSG integer code (e.g.
26915), authority string (i.e. epsg:26915), or Open Geospatial Consortium Well-Known Text (WKT) specifica-
tion. Limited to 5000 characters. The entry for CRS does not affect the model simulation, but it is written to the
binary grid file so that postprocessors can locate the grid in space.

Block: DIMENSIONS

• nodes is the number of cells in the model grid.


• nja is the sum of the number of connections and NODES. When calculating the total number of connections,
the connection between cell n and cell m is considered to be different from the connection between cell m and
cell n. Thus, NJA is equal to the total number of connections, including n to m and m to n, and the total number
of cells.
• nvert is the total number of (x, y) vertex pairs used to define the plan-view shape of each cell in the model grid.
If NVERT is not specified or is specified as zero, then the VERTICES and CELL2D blocks below are not read.
NVERT and the accompanying VERTICES and CELL2D blocks should be specified for most simulations. If
the XT3D or SAVE_SPECIFIC_DISCHARGE options are specified in the NPF Package, then this information
is required.

34 Chapter 3. Input Guide


MODFLOW 6

Block: GRIDDATA

• top is the top elevation for each cell in the model grid.
• bot is the bottom elevation for each cell.
• area is the cell surface area (in plan view).
• idomain is an optional array that characterizes the existence status of a cell. If the IDOMAIN array is not
specified, then all model cells exist within the solution. If the IDOMAIN value for a cell is 0, the cell does not
exist in the simulation. Input and output values will be read and written for the cell, but internal to the program,
the cell is excluded from the solution. If the IDOMAIN value for a cell is 1 or greater, the cell exists in the
simulation. IDOMAIN values of -1 cannot be specified for the DISU Package.

Block: CONNECTIONDATA

• iac is the number of connections (plus 1) for each cell. The sum of all the entries in IAC must be equal to NJA.
• ja is a list of cell number (n) followed by its connecting cell numbers (m) for each of the m cells connected to
cell n. The number of values to provide for cell n is IAC(n). This list is sequentially provided for the first to the
last cell. The first value in the list must be cell n itself, and the remaining cells must be listed in an increasing
order (sorted from lowest number to highest). Note that the cell and its connections are only supplied for the
GWF cells and their connections to the other GWF cells. Also note that the JA list input may be divided such
that every node and its connectivity list can be on a separate line for ease in readability of the file. To further ease
readability of the file, the node number of the cell whose connectivity is subsequently listed, may be expressed
as a negative number, the sign of which is subsequently converted to positive by the code.
• ihc is an index array indicating the direction between node n and all of its m connections. If IHC = 0 then cell
n and cell m are connected in the vertical direction. Cell n overlies cell m if the cell number for n is less than
m; cell m overlies cell n if the cell number for m is less than n. If IHC = 1 then cell n and cell m are connected
in the horizontal direction. If IHC = 2 then cell n and cell m are connected in the horizontal direction, and
the connection is vertically staggered. A vertically staggered connection is one in which a cell is horizontally
connected to more than one cell in a horizontal connection.
• cl12 is the array containing connection lengths between the center of cell n and the shared face with each adjacent
m cell.
• hwva is a symmetric array of size NJA. For horizontal connections, entries in HWVA are the horizontal width
perpendicular to flow. For vertical connections, entries in HWVA are the vertical area for flow. Thus, values
in the HWVA array contain dimensions of both length and area. Entries in the HWVA array have a one-to-one
correspondence with the connections specified in the JA array. Likewise, there is a one-to-one correspondence
between entries in the HWVA array and entries in the IHC array, which specifies the connection type (horizontal
or vertical). Entries in the HWVA array must be symmetric; the program will terminate with an error if the value
for HWVA for an n to m connection does not equal the value for HWVA for the corresponding n to m connection.
• angldegx is the angle (in degrees) between the horizontal x-axis and the outward normal to the face between
a cell and its connecting cells. The angle varies between zero and 360.0 degrees, where zero degrees points in
the positive x-axis direction, and 90 degrees points in the positive y-axis direction. ANGLDEGX is only needed
if horizontal anisotropy is specified in the NPF Package, if the XT3D option is used in the NPF Package, or if
the SAVE_SPECIFIC_DISCHARGE option is specified in the NPF Package. ANGLDEGX does not need to be
specified if these conditions are not met. ANGLDEGX is of size NJA; values specified for vertical connections
and for the diagonal position are not used. Note that ANGLDEGX is read in degrees, which is different from
MODFLOW-USG, which reads a similar variable (ANGLEX) in radians.

3.3. Groundwater Flow 35


MODFLOW 6

Block: VERTICES

• iv is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.
• xv is the x-coordinate for the vertex.
• yv is the y-coordinate for the vertex.

Block: CELL2D

• icell2d is the cell2d number. Records in the CELL2D block must be listed in consecutive order from 1 to
NODES.
• xc is the x-coordinate for the cell center.
• yc is the y-coordinate for the cell center.
• ncvert is the number of vertices required to define the cell. There may be a different number of vertices for
each cell.
• icvert is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell.
Vertices must be listed in clockwise order.

Example Input File

BEGIN OPTIONS
LENGTH_UNITS METERS
END OPTIONS

BEGIN DIMENSIONS
NODES 9
NJA 33
END DIMENSIONS

BEGIN GRIDDATA
TOP
CONSTANT 0.
BOT
CONSTANT -10
AREA
INTERNAL FACTOR 1
10000 10000 10000 10000 10000 10000 10000 10000 10000
END GRIDDATA

BEGIN CONNECTIONDATA
IHC
CONSTANT 1
IAC
INTERNAL FACTOR 1
3 4 3 4 5 4 3 4 3
JA
INTERNAL FACTOR 1
1 2 4
2 1 3 5
3 2 6
4 1 5 7
(continues on next page)

36 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


5 2 4 6 8
6 3 5 9
7 4 8
8 5 7 9
9 6 8
CL12
INTERNAL FACTOR 1
0 50 50
0 50 50 50
0 50 50
0 50 50 50
0 50 50 50 50
0 50 50 50
0 50 50
0 50 50 50
0 50 50
HWVA
INTERNAL FACTOR 1
0 100 100
0 100 100 100
0 100 100
0 100 100 100
0 100 100 100 100
0 100 100 100
0 100 100
0 100 100 100
0 100 100
END CONNECTIONDATA

3.3.7 GWF-DISV
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[LENGTH_UNITS <length_units>]
[NOGRB]
[GRB6 FILEOUT <grb6_filename>]
[XORIGIN <xorigin>]
[YORIGIN <yorigin>]
[ANGROT <angrot>]
[EXPORT_ARRAY_ASCII]
[EXPORT_ARRAY_NETCDF]
[CRS <crs>]
[NCF6 FILEIN <ncf6_filename>]
END OPTIONS

BEGIN DIMENSIONS
NLAY <nlay>
NCPL <ncpl>
NVERT <nvert>
(continues on next page)

3.3. Groundwater Flow 37


MODFLOW 6

(continued from previous page)


END DIMENSIONS

BEGIN GRIDDATA
TOP [NETCDF]
<top(ncpl)> -- READARRAY
BOTM [LAYERED] [NETCDF]
<botm(ncpl, nlay)> -- READARRAY
[IDOMAIN [LAYERED] [NETCDF]
<idomain(ncpl, nlay)> -- READARRAY]
END GRIDDATA

BEGIN VERTICES
<iv> <xv> <yv>
<iv> <xv> <yv>
...
END VERTICES

BEGIN CELL2D
<icell2d> <xc> <yc> <ncvert> <icvert>
<icell2d> <xc> <yc> <ncvert> <icvert>
...
END CELL2D

Explanation of Variables
Block: OPTIONS

• length_units is the length units used for this model. Values can be “FEET”, “METERS”, or “CENTIME-
TERS”. If not specified, the default is “UNKNOWN”.
• NOGRB keyword to deactivate writing of the binary grid file.
• GRB6 keyword to specify that record corresponds to a binary grid file.
• FILEOUT keyword to specify that an output filename is expected next.
• grb6_filename defines a binary grid output file. If this option is not provided, the output file will have the same
name as the discretization input file, plus extension “.grb”.
• xorigin x-position of the origin used for model grid vertices. This value should be provided in a real-world
coordinate system. A default value of zero is assigned if not specified. The value for XORIGIN does not affect
the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.
• yorigin y-position of the origin used for model grid vertices. This value should be provided in a real-world
coordinate system. If not specified, then a default value equal to zero is used. The value for YORIGIN does not
affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in
space.
• angrot counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world
coordinate system. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not
affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in
space.
• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.

38 Chapter 3. Input Guide


MODFLOW 6

• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.
• crs is a real-world coordinate reference system (CRS) for the model, for example, an EPSG integer code (e.g.
26915), authority string (i.e. epsg:26915), or Open Geospatial Consortium Well-Known Text (WKT) specifica-
tion. Limited to 5000 characters. The entry for CRS does not affect the model simulation, but it is written to the
binary grid file so that postprocessors can locate the grid in space.
• NCF6 keyword to specify that record corresponds to a netcdf configuration (NCF) file.
• FILEIN keyword to specify that an input filename is expected next.
• ncf6_filename defines a netcdf configuration (NCF) input file.

Block: DIMENSIONS

• nlay is the number of layers in the model grid.


• ncpl is the number of cells per layer. This is a constant value for the grid and it applies to all layers.
• nvert is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model
grid.

Block: GRIDDATA

• top is the top elevation for each cell in the top model layer.
• botm is the bottom elevation for each cell.
• idomain is an optional array that characterizes the existence status of a cell. If the IDOMAIN array is not
specified, then all model cells exist within the solution. If the IDOMAIN value for a cell is 0, the cell does not
exist in the simulation. Input and output values will be read and written for the cell, but internal to the program,
the cell is excluded from the solution. If the IDOMAIN value for a cell is 1 or greater, the cell exists in the
simulation. If the IDOMAIN value for a cell is -1, the cell does not exist in the simulation. Furthermore, the first
existing cell above will be connected to the first existing cell below. This type of cell is referred to as a “vertical
pass through” cell.

Block: VERTICES

• iv is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.
• xv is the x-coordinate for the vertex.
• yv is the y-coordinate for the vertex.

Block: CELL2D

• icell2d is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the
first to the last.
• xc is the x-coordinate for the cell center.
• yc is the y-coordinate for the cell center.
• ncvert is the number of vertices required to define the cell. There may be a different number of vertices for
each cell.
• icvert is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell.
Vertices must be listed in clockwise order. Cells that are connected must share vertices.

3.3. Groundwater Flow 39


MODFLOW 6

Example Input File

#The OPTIONS block is optional


BEGIN OPTIONS
LENGTH_UNITS METERS
END OPTIONS

#The DIMENSIONS block is required


BEGIN DIMENSIONS
NCPL 4
NLAY 3
NVERT 9
END DIMENSIONS

#The GRIDDATA block is required


BEGIN GRIDDATA
TOP
CONSTANT 3.0
BOTM LAYERED
CONSTANT 2.0
CONSTANT 1.0
CONSTANT 0.0
IDOMAIN LAYERED
INTERNAL FACTOR 1
1 1 1 0
CONSTANT 1
CONSTANT 1
END GRIDDATA

#The VERTICES block is required


BEGIN VERTICES
1 0. 1.
2 .5 1.
3 1. 1.
4 0 .5
5 .5 .5
6 1. .5
7 0. 0.
8 .5 0.
9 1. 0.
END VERTICES

BEGIN CELL2D
1 .25 .75 4 1 2 5 4
2 .75 .75 4 2 3 6 5
3 .25 .25 4 4 5 8 7
4 .75 .25 4 5 6 9 8
END CELL2D

40 Chapter 3. Input Guide


MODFLOW 6

3.3.8 GWF-DRN
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[AUXILIARY <auxiliary>]
[AUXMULTNAME <auxmultname>]
[AUXDEPTHNAME <auxdepthname>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
[MOVER]
END OPTIONS

BEGIN DIMENSIONS
MAXBOUND <maxbound>
END DIMENSIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<cellid> <elev> <cond> [<aux(naux)>] [<boundname>]
<cellid> <elev> <cond> [<aux(naux)>] [<boundname>]
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• auxmultname name of auxiliary variable to be used as multiplier of drain conductance.
• auxdepthname name of a variable listed in AUXILIARY that defines the depth at which drainage discharge will
be scaled. If a positive value is specified for the AUXDEPTHNAME AUXILIARY variable, then ELEV is the
elevation at which the drain starts to discharge and ELEV + DDRN (assuming DDRN is the AUXDEPTHNAME
variable) is the elevation when the drain conductance (COND) scaling factor is 1. If a negative drainage depth
value is specified for DDRN, then ELEV + DDRN is the elevation at which the drain starts to discharge and
ELEV is the elevation when the conductance (COND) scaling factor is 1. A linear- or cubic-scaling is used to
scale the drain conductance (COND) when the Standard or Newton-Raphson Formulation is used, respectively.
This discharge scaling option is described in more detail in Chapter 3 of the Supplemental Technical Information.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of drain cells.

3.3. Groundwater Flow 41


MODFLOW 6

• PRINT_INPUT keyword to indicate that the list of drain information will be written to the listing file immediately
after it is read.
• PRINT_FLOWS keyword to indicate that the list of drain flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that drain flow terms will be written to the file specified with “BUDGET
FILEOUT” in Output Control.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the Drain package. See the “Observation util-
ity” section for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and
ref{table:gwt-obstypetable} lists observation type(s) supported by the Drain package.
• MOVER keyword to indicate that this instance of the Drain Package can be used with the Water Mover (MVR)
Package. When the MOVER option is specified, additional memory is allocated within the package to store the
available, provided, and received water.

Block: DIMENSIONS

• maxbound integer value specifying the maximum number of drains cells that will be specified for use during any
stress period.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.
• elev is the elevation of the drain. If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.
• cond is the hydraulic conductance of the interface between the aquifer and the drain. If the Options block includes
a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time series
by entering the time-series name in place of a numeric value.
• aux represents the values of the auxiliary variables for each drain. The values of auxiliary variables must be
present for each drain. The values must be specified in the order of the auxiliary variables specified in the
OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry
(see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-series
name in place of a numeric value.

42 Chapter 3. Input Guide


MODFLOW 6

• boundname name of the drain cell. BOUNDNAME is an ASCII character variable that can contain as many
as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single
quotes.

Example Input File

#The OPTIONS block is optional


BEGIN OPTIONS
BOUNDNAMES
PRINT_INPUT
PRINT_FLOWS
SAVE_FLOWS
END OPTIONS

#The DIMENSIONS block is required


BEGIN DIMENSIONS
MAXBOUND 5
END DIMENSIONS

#The following block of drains will be activated for for the entire stress period
BEGIN PERIOD 1
#node elevation conductance boundname
73 10.2 1000. my_drn
76 10.2 1000. my_drn
79 10.2 1000. my_drn
80 10.2 1000. my_drn
81 10.2 1000. my_drn
END PERIOD

Available Observation Types


Example Observation Input File

BEGIN OPTIONS
DIGITS 8
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.drn01.csv


# obsname obstype ID
drn_73 DRN 73
drn_79 DRN 79
END CONTINUOUS

BEGIN CONTINUOUS FILEOUT my_model.drn02.csv


# obsname obstype ID
drn_80 DRN 80
drn_all DRN my_drn
END CONTINUOUS

3.3. Groundwater Flow 43


MODFLOW 6

3.3.9 GWF-DRNG
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
READARRAYGRID
[AUXILIARY <auxiliary>]
[AUXMULTNAME <auxmultname>]
[AUXDEPTHNAME <auxdepthname>]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[OBS6 FILEIN <obs6_filename>]
[MOVER]
[EXPORT_ARRAY_NETCDF]
END OPTIONS

BEGIN DIMENSIONS
[MAXBOUND <maxbound>]
END DIMENSIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


ELEV [LAYERED] [NETCDF]
<elev(nodes)> -- READARRAY
COND [LAYERED] [NETCDF]
<cond(nodes)> -- READARRAY
[AUX [LAYERED] [NETCDF]
<aux(nodes)> -- READARRAY]
END PERIOD

Explanation of Variables
Block: OPTIONS

• READARRAYGRID indicates that array-based grid input will be used for the drain package. This keyword must
be specified to use array-based grid input. When READARRAYGRID is specified, values must be provided for
every cell within a model grid, even those cells that have an IDOMAIN value less than one. Values assigned to
cells with IDOMAIN values less than one are not used and have no effect on simulation results. No data cells
should contain the value DNODATA (3.0E+30).
• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• auxmultname name of auxiliary variable to be used as multiplier of drain conductance.
• auxdepthname name of a variable listed in AUXILIARY that defines the depth at which drainage discharge will
be scaled. If a positive value is specified for the AUXDEPTHNAME AUXILIARY variable, then ELEV is the

44 Chapter 3. Input Guide


MODFLOW 6

elevation at which the drain starts to discharge and ELEV + DDRN (assuming DDRN is the AUXDEPTHNAME
variable) is the elevation when the drain conductance (COND) scaling factor is 1. If a negative drainage depth
value is specified for DDRN, then ELEV + DDRN is the elevation at which the drain starts to discharge and
ELEV is the elevation when the conductance (COND) scaling factor is 1. A linear- or cubic-scaling is used to
scale the drain conductance (COND) when the Standard or Newton-Raphson Formulation is used, respectively.
This discharge scaling option is described in more detail in Chapter 3 of the Supplemental Technical Information.
• PRINT_INPUT keyword to indicate that the list of drain information will be written to the listing file immediately
after it is read.
• PRINT_FLOWS keyword to indicate that the list of drain flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that drain flow terms will be written to the file specified with “BUDGET
FILEOUT” in Output Control.
• OBS6 keyword to specify that record corresponds to an observations file.
• FILEIN keyword to specify that an input filename is expected next.
• obs6_filename name of input file to define observations for the Drain package. See the “Observation util-
ity” section for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and
ref{table:gwt-obstypetable} lists observation type(s) supported by the Drain package.
• MOVER keyword to indicate that this instance of the Drain Package can be used with the Water Mover (MVR)
Package. When the MOVER option is specified, additional memory is allocated within the package to store the
available, provided, and received water.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.

Block: DIMENSIONS

• maxbound integer value specifying the maximum number of drains cells that will be specified for use during any
stress period.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• elev is the elevation of the drain.
• cond is the hydraulic conductance of the interface between the aquifer and the drain.
• aux is an array of values for auxiliary variable aux(iaux), where iaux is a value from 1 to naux, and aux(iaux)
must be listed as part of the auxiliary variables. A separate array can be specified for each auxiliary variable. If
an array is not specified for an auxiliary variable, then a value of zero is assigned. If the value specified here for
the auxiliary variable is the same as auxmultname, then the drain array will be multiplied by this array.

3.3.10 GWF-EVT
Structure of Blocks
FOR EACH SIMULATION

3.3. Groundwater Flow 45


MODFLOW 6

BEGIN OPTIONS
[FIXED_CELL]
[AUXILIARY <auxiliary>]
[AUXMULTNAME <auxmultname>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
[SURF_RATE_SPECIFIED]
END OPTIONS

BEGIN DIMENSIONS
MAXBOUND <maxbound>
NSEG <nseg>
END DIMENSIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<cellid> <surface> <rate> <depth> [<pxdp(nseg-1)>] [<petm(nseg-1)>] [<petm0>] [
˓→<aux(naux)>] [<boundname>]

<cellid> <surface> <rate> <depth> [<pxdp(nseg-1)>] [<petm(nseg-1)>] [<petm0>] [


˓→<aux(naux)>] [<boundname>]

...
END PERIOD

Explanation of Variables
Block: OPTIONS

• FIXED_CELL indicates that evapotranspiration will not be reassigned to a cell underlying the cell specified in the
list if the specified cell is inactive.
• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• auxmultname name of auxiliary variable to be used as multiplier of evapotranspiration rate.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of evapotranspiration cells.
• PRINT_INPUT keyword to indicate that the list of evapotranspiration information will be written to the listing file
immediately after it is read.
• PRINT_FLOWS keyword to indicate that the list of evapotranspiration flow rates will be printed to the listing file
for every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output
Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress
period.

46 Chapter 3. Input Guide


MODFLOW 6

• SAVE_FLOWS keyword to indicate that evapotranspiration flow terms will be written to the file specified with
“BUDGET FILEOUT” in Output Control.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the Evapotranspiration package. See the “Obser-
vation utility” section for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable}
and ref{table:gwt-obstypetable} lists observation type(s) supported by the Evapotranspiration package.
• SURF_RATE_SPECIFIED indicates that the proportion of the evapotranspiration rate at the ET surface will be
specified as PETM0 in list input.

Block: DIMENSIONS

• maxbound integer value specifying the maximum number of evapotranspiration cells cells that will be specified
for use during any stress period.
• nseg number of ET segments. Default is one. When NSEG is greater than 1, the PXDP and PETM arrays must
be of size NSEG - 1 and be listed in order from the uppermost segment down. Values for PXDP must be listed
first followed by the values for PETM. PXDP defines the extinction-depth proportion at the bottom of a segment.
PETM defines the proportion of the maximum ET flux rate at the bottom of a segment.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.
• surface is the elevation of the ET surface (L). If the Options block includes a TIMESERIESFILE entry (see
the “Time-Variable Input” section), values can be obtained from a time series by entering the time-series name
in place of a numeric value.
• rate is the maximum ET flux rate (LT-1). If the Options block includes a TIMESERIESFILE entry (see the
“Time-Variable Input” section), values can be obtained from a time series by entering the time-series name in
place of a numeric value.
• depth is the ET extinction depth (L). If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.
• pxdp is the proportion of the ET extinction depth at the bottom of a segment (dimensionless). pxdp is an array
of size (nseg - 1). Values in pxdp must be greater than 0.0 and less than 1.0. pxdp values for a cell must increase
monotonically. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section),
values can be obtained from a time series by entering the time-series name in place of a numeric value.

3.3. Groundwater Flow 47


MODFLOW 6

• petm is the proportion of the maximum ET flux rate at the bottom of a segment (dimensionless). petm is an
array of size (nseg - 1). If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input”
section), values can be obtained from a time series by entering the time-series name in place of a numeric value.
• petm0 is the proportion of the maximum ET flux rate that will apply when head is at or above the ET surface
(dimensionless). PETM0 is read only when the SURF_RATE_SPECIFIED option is used. If the Options block
includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time
series by entering the time-series name in place of a numeric value.
• aux represents the values of the auxiliary variables for each evapotranspiration. The values of auxiliary vari-
ables must be present for each evapotranspiration. The values must be specified in the order of the auxiliary
variables specified in the OPTIONS block. If the package supports time series and the Options block includes a
TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time series by
entering the time-series name in place of a numeric value.
• boundname name of the evapotranspiration cell. BOUNDNAME is an ASCII character variable that can contain
as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within
single quotes.

Example Input File


Example 1

# Example for structured model with list-based input


BEGIN OPTIONS
AUXNAMES Mult
BOUNDNAMES
TS6 FILEIN EtRate.ts
# Note: Time-series file EtRate.ts defines time series et_rate
AUXMULTNAME Mult
PRINT_INPUT

BEGIN DIMENSIONS
MAXBOUND 10
NSEG 3
END DIMENSIONS

BEGIN PERIOD 1
# Lay Row Col SURFACE RATE DEPTH PXDP1 PXDP2 PETM1 PETM2 Mult Name
1 1 13 110.0 et_rate 10.0 0.2 0.5 0.3 0.1 0.2 ET-1
1 2 13 110.0 et_rate 10.0 0.2 0.5 0.3 0.1 0.4 ET-2
1 3 13 110.0 et_rate 10.0 0.2 0.5 0.3 0.1 0.6 ET-3
1 4 13 110.0 et_rate 10.0 0.2 0.5 0.3 0.1 0.8 ET-4
1 5 13 110.0 2.e-2 10.0 0.2 0.5 0.3 0.1 1.0 ET-5
1 6 13 110.0 2.e-2 10.0 0.2 0.5 0.3 0.1 1.0 ET-6
1 7 13 110.0 2.e-2 10.0 0.2 0.5 0.3 0.1 0.7 ET-7
1 8 13 110.0 2.e-2 10.0 0.2 0.5 0.3 0.1 0.5 ET-8
1 9 13 110.0 2.e-2 10.0 0.2 0.5 0.3 0.1 0.3 ET-9
1 10 13 110.0 et_rate 10.0 0.2 0.5 0.3 0.1 0.1 ET-10
END PERIOD

Example 2

BEGIN OPTIONS
READASARRAYS
(continues on next page)

48 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


AUXILIARY var1 var2
PRINT_INPUT
PRINT_FLOWS
SAVE_FLOWS
END OPTIONS

BEGIN PERIOD 1
#For a structured grid, IEVT defaults to model
# layer 1, so no need to enter IEVT here.

#ET surface elevation


SURFACE
constant 150.0
#Maximum ET rate
RATE
constant 0.007
#ET extinction depth
DEPTH
constant 15.0
#auxiliary variable (var1) array
var1
constant 100.0
#auxiliary variable (var2) array
var2
constant 0.0
END PERIOD

Available Observation Types


Example Observation Input File

BEGIN OPTIONS
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.evt.csv


et1-1 EVT 1 1 1
et1-2 EVT 1 1 2
et2-1 EVT 1 2 1
et2-2 EVT 1 2 2
et2-3 EVT 1 2 3
END CONTINUOUS

3.3.11 GWF-EVTA
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
READASARRAYS
[FIXED_CELL]
(continues on next page)

3.3. Groundwater Flow 49


MODFLOW 6

(continued from previous page)


[AUXILIARY <auxiliary>]
[AUXMULTNAME <auxmultname>]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[TAS6 FILEIN <tas6_filename>]
[OBS6 FILEIN <obs6_filename>]
[EXPORT_ARRAY_NETCDF]
END OPTIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


[IEVT
<ievt(ncol*nrow; ncpl)> -- READARRAY]
SURFACE
<surface(ncol*nrow; ncpl)> -- READARRAY
RATE
<rate(ncol*nrow; ncpl)> -- READARRAY
DEPTH
<depth(ncol*nrow; ncpl)> -- READARRAY
AUX
<aux(ncol*nrow; ncpl)> -- READARRAY
END PERIOD

Explanation of Variables
Block: OPTIONS

• READASARRAYS indicates that array-based input will be used for the Evapotranspiration Package. This keyword
must be specified to use array-based input. When READASARRAYS is specified, values must be provided for
every cell within a model layer, even those cells that have an IDOMAIN value less than one. Values assigned to
cells with IDOMAIN values less than one are not used and have no effect on simulation results.
• FIXED_CELL indicates that evapotranspiration will not be reassigned to a cell underlying the cell specified in the
list if the specified cell is inactive.
• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• auxmultname name of auxiliary variable to be used as multiplier of evapotranspiration rate.
• PRINT_INPUT keyword to indicate that the list of evapotranspiration information will be written to the listing file
immediately after it is read.
• PRINT_FLOWS keyword to indicate that the list of evapotranspiration flow rates will be printed to the listing file
for every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output
Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress
period.

50 Chapter 3. Input Guide


MODFLOW 6

• SAVE_FLOWS keyword to indicate that evapotranspiration flow terms will be written to the file specified with
“BUDGET FILEOUT” in Output Control.
• TAS6 keyword to specify that record corresponds to a time-array-series file.
• FILEIN keyword to specify that an input filename is expected next.
• tas6_filename defines a time-array-series file defining a time-array series that can be used to assign time-
varying values. See the Time-Variable Input section for instructions on using the time-array series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the Evapotranspiration package. See the “Obser-
vation utility” section for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable}
and ref{table:gwt-obstypetable} lists observation type(s) supported by the Evapotranspiration package.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• ievt IEVT is the layer number that defines the layer in each vertical column where evapotranspiration is applied.
If IEVT is omitted, evapotranspiration by default is applied to cells in layer 1. If IEVT is specified, it must be
specified as the first variable in the PERIOD block or MODFLOW will terminate with an error.
• surface is the elevation of the ET surface (L).
• rate is the maximum ET flux rate (LT-1).
• depth is the ET extinction depth (L).
• aux is an array of values for auxiliary variable AUX(IAUX), where iaux is a value from 1 to NAUX, and
AUX(IAUX) must be listed as part of the auxiliary variables. A separate array can be specified for each auxil-
iary variable. If an array is not specified for an auxiliary variable, then a value of zero is assigned. If the value
specified here for the auxiliary variable is the same as auxmultname, then the evapotranspiration rate will be
multiplied by this array.

Example Input File

BEGIN OPTIONS
READASARRAYS
AUXILIARY var1 var2
PRINT_INPUT
PRINT_FLOWS
SAVE_FLOWS
END OPTIONS

BEGIN PERIOD 1
#For a structured grid, IEVT defaults to model
# layer 1, so no need to enter IEVT here.

#ET surface elevation


SURFACE
(continues on next page)

3.3. Groundwater Flow 51


MODFLOW 6

(continued from previous page)


constant 150.0
#Maximum ET rate
RATE
constant 0.007
#ET extinction depth
DEPTH
constant 15.0
#auxiliary variable (var1) array
var1
constant 100.0
#auxiliary variable (var2) array
var2
constant 0.0
END PERIOD

3.3.12 GWF-GHB
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[AUXILIARY <auxiliary>]
[AUXMULTNAME <auxmultname>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
[MOVER]
END OPTIONS

BEGIN DIMENSIONS
MAXBOUND <maxbound>
END DIMENSIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<cellid> <bhead> <cond> [<aux(naux)>] [<boundname>]
<cellid> <bhead> <cond> [<aux(naux)>] [<boundname>]
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be

52 Chapter 3. Input Guide


MODFLOW 6

interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• auxmultname name of auxiliary variable to be used as multiplier of general-head boundary conductance.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of general-head boundary
cells.
• PRINT_INPUT keyword to indicate that the list of general-head boundary information will be written to the listing
file immediately after it is read.
• PRINT_FLOWS keyword to indicate that the list of general-head boundary flow rates will be printed to the listing
file for every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no
Output Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of
each stress period.
• SAVE_FLOWS keyword to indicate that general-head boundary flow terms will be written to the file specified with
“BUDGET FILEOUT” in Output Control.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the General-Head Boundary package. See
the “Observation utility” section for instructions for preparing observation input files. Tables ref{table:gwf-
obstypetable} and ref{table:gwt-obstypetable} lists observation type(s) supported by the General-Head Bound-
ary package.
• MOVER keyword to indicate that this instance of the General-Head Boundary Package can be used with the Wa-
ter Mover (MVR) Package. When the MOVER option is specified, additional memory is allocated within the
package to store the available, provided, and received water.

Block: DIMENSIONS

• maxbound integer value specifying the maximum number of general-head boundary cells that will be specified
for use during any stress period.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.
• bhead is the boundary head. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable
Input” section), values can be obtained from a time series by entering the time-series name in place of a numeric
value.

3.3. Groundwater Flow 53


MODFLOW 6

• cond is the hydraulic conductance of the interface between the aquifer cell and the boundary. If the Options
block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from
a time series by entering the time-series name in place of a numeric value.
• aux represents the values of the auxiliary variables for each general-head boundary. The values of auxiliary
variables must be present for each general-head boundary. The values must be specified in the order of the
auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block
includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time
series by entering the time-series name in place of a numeric value.
• boundname name of the general-head boundary cell. BOUNDNAME is an ASCII character variable that can
contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed
within single quotes.

Example Input File

BEGIN OPTIONS
PRINT_INPUT (echo input to listing file)
PRINT_FLOWS (print the flows to the listing file)
TS6 FILEIN tides.ts
BOUNDNAMES
END OPTIONS

# Dimensions block
BEGIN DIMENSIONS
MAXBOUND 15
END DIMENSIONS

# Stress period block(s)


BEGIN PERIOD 1
#Lay Row Col Bhead Cond boundname
2 1 10 tides 15.0 Estuary-L2
2 2 10 tides 15.0 Estuary-L2
2 3 10 tides 15.0 Estuary-L2
2 4 10 tides 15.0 Estuary-L2
2 5 10 tides 15.0 Estuary-L2
2 6 10 tides 15.0 Estuary-L2
2 7 10 tides 15.0 Estuary-L2
2 8 10 tides 15.0 Estuary-L2
2 9 10 tides 15.0 Estuary-L2
2 10 10 tides 15.0 Estuary-L2
2 11 10 tides 15.0 Estuary-L2
2 12 10 tides 15.0 Estuary-L2
2 13 10 tides 15.0 Estuary-L2
2 14 10 tides 15.0 Estuary-L2
2 15 10 tides 15.0 Estuary-L2
END PERIOD

Available Observation Types


Example Observation Input File

BEGIN OPTIONS
DIGITS 7
(continues on next page)

54 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.ghb.obs.csv


# obsname obstype ID
ghb-2-6-10 GHB 2 6 10
ghb-2-7-10 GHB 2 7 10
END CONTINUOUS

BEGIN CONTINUOUS FILEOUT my_model.ghb.flows.csv


# obsname obstype ID
Estuary2 GHB Estuary-L2
END CONTINUOUS

3.3.13 GWF-GHBG
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
READARRAYGRID
[AUXILIARY <auxiliary>]
[AUXMULTNAME <auxmultname>]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[OBS6 FILEIN <obs6_filename>]
[MOVER]
[EXPORT_ARRAY_NETCDF]
END OPTIONS

BEGIN DIMENSIONS
[MAXBOUND <maxbound>]
END DIMENSIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


BHEAD [LAYERED] [NETCDF]
<bhead(nodes)> -- READARRAY
COND [LAYERED] [NETCDF]
<cond(nodes)> -- READARRAY
[AUX [LAYERED] [NETCDF]
<aux(nodes)> -- READARRAY]
END PERIOD

Explanation of Variables
Block: OPTIONS

• READARRAYGRID indicates that array-based grid input will be used for the general-head boundary package. This
keyword must be specified to use array-based grid input. When READARRAYGRID is specified, values must be

3.3. Groundwater Flow 55


MODFLOW 6

provided for every cell within a model grid, even those cells that have an IDOMAIN value less than one. Values
assigned to cells with IDOMAIN values less than one are not used and have no effect on simulation results. No
data cells should contain the value DNODATA (3.0E+30).
• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• auxmultname name of auxiliary variable to be used as multiplier of general-head boundary conductance.
• PRINT_INPUT keyword to indicate that the list of general-head boundary information will be written to the listing
file immediately after it is read.
• PRINT_FLOWS keyword to indicate that the list of general-head boundary flow rates will be printed to the listing
file for every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no
Output Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of
each stress period.
• SAVE_FLOWS keyword to indicate that general-head boundary flow terms will be written to the file specified with
“BUDGET FILEOUT” in Output Control.
• OBS6 keyword to specify that record corresponds to an observations file.
• FILEIN keyword to specify that an input filename is expected next.
• obs6_filename name of input file to define observations for the General-Head Boundary package. See
the “Observation utility” section for instructions for preparing observation input files. Tables ref{table:gwf-
obstypetable} and ref{table:gwt-obstypetable} lists observation type(s) supported by the General-Head Bound-
ary package.
• MOVER keyword to indicate that this instance of the General-Head Boundary Package can be used with the Wa-
ter Mover (MVR) Package. When the MOVER option is specified, additional memory is allocated within the
package to store the available, provided, and received water.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.

Block: DIMENSIONS

• maxbound integer value specifying the maximum number of general-head boundary cells that will be specified
for use during any stress period.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• bhead is the boundary head.
• cond is the hydraulic conductance of the interface between the aquifer cell and the boundary.
• aux is an array of values for auxiliary variable aux(iaux), where iaux is a value from 1 to naux, and aux(iaux)
must be listed as part of the auxiliary variables. A separate array can be specified for each auxiliary variable. If

56 Chapter 3. Input Guide


MODFLOW 6

an array is not specified for an auxiliary variable, then a value of zero is assigned. If the value specified here for
the auxiliary variable is the same as auxmultname, then the boundary head array will be multiplied by this array.

3.3.14 GWF-GNC
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[PRINT_INPUT]
[PRINT_FLOWS]
[EXPLICIT]
END OPTIONS

BEGIN DIMENSIONS
NUMGNC <numgnc>
NUMALPHAJ <numalphaj>
END DIMENSIONS

BEGIN GNCDATA
<cellidn> <cellidm> <cellidsj> <alphasj>
<cellidn> <cellidm> <cellidsj> <alphasj>
...
END GNCDATA

Explanation of Variables
Block: OPTIONS

• PRINT_INPUT keyword to indicate that the list of GNC information will be written to the listing file immediately
after it is read.
• PRINT_FLOWS keyword to indicate that the list of GNC flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• EXPLICIT keyword to indicate that the ghost node correction is applied in an explicit manner on the right-hand
side of the matrix. The explicit approach will likely require additional outer iterations. If the keyword is not
specified, then the correction will be applied in an implicit manner on the left-hand side. The implicit approach
will likely converge better, but may require additional memory. If the EXPLICIT keyword is not specified, then
the BICGSTAB linear acceleration option should be specified within the LINEAR block of the Sparse Matrix
Solver.

Block: DIMENSIONS

• numgnc is the number of GNC entries.


• numalphaj is the number of contributing factors.

Block: GNCDATA

• cellidn is the cellid of the cell, n, in which the ghost node is located. For a structured grid that uses the DIS
input file, CELLIDN is the layer, row, and column numbers of the cell. For a grid that uses the DISV input
file, CELLIDN is the layer number and CELL2D number for the two cells. If the model uses the unstructured
discretization (DISU) input file, then CELLIDN is the node number for the cell.

3.3. Groundwater Flow 57


MODFLOW 6

• cellidm is the cellid of the connecting cell, m, to which flow occurs from the ghost node. For a structured grid
that uses the DIS input file, CELLIDM is the layer, row, and column numbers of the cell. For a grid that uses
the DISV input file, CELLIDM is the layer number and CELL2D number for the two cells. If the model uses the
unstructured discretization (DISU) input file, then CELLIDM is the node number for the cell.
• cellidsj is the array of CELLIDS for the contributing j cells, which contribute to the interpolated head value
at the ghost node. This item contains one CELLID for each of the contributing cells of the ghost node. Note that
if the number of actual contributing cells needed by the user is less than NUMALPHAJ for any ghost node, then
a dummy CELLID of zero(s) should be inserted with an associated contributing factor of zero. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column numbers of the cell. For a grid that uses
the DISV input file, CELLID is the layer number and cell2d number for the two cells. If the model uses the
unstructured discretization (DISU) input file, then CELLID is the node number for the cell.
• alphasj is the contributing factors for each contributing node in CELLIDSJ. Note that if the number of actual
contributing cells is less than NUMALPHAJ for any ghost node, then dummy CELLIDS should be inserted with
an associated contributing factor of zero. The sum of ALPHASJ should be less than one. This is because one
minus the sum of ALPHASJ is equal to the alpha term (alpha n in equation 4-61 of the GWF Model report) that
is multiplied by the head in cell n.

Example Input File

BEGIN OPTIONS
PRINT_INPUT
PRINT_FLOWS
END OPTIONS

BEGIN DIMENSIONS
NUMGNC 24
NUMALPHAJ 1
END DIMENSIONS

BEGIN GNCDATA
10 41 9 0.333333333333
10 43 11 0.333333333333
11 44 10 0.333333333333
11 46 12 0.333333333333
12 47 11 0.333333333333
12 49 13 0.333333333333
16 41 9 0.333333333333
16 59 20 0.333333333333
17 49 13 0.333333333333
17 67 21 0.333333333333
20 68 16 0.333333333333
20 86 24 0.333333333333
21 76 17 0.333333333333
21 94 25 0.333333333333
24 95 20 0.333333333333
24 113 28 0.333333333333
25 103 21 0.333333333333
25 121 32 0.333333333333
29 113 28 0.333333333333
29 115 30 0.333333333333
30 116 29 0.333333333333
30 118 31 0.333333333333
(continues on next page)

58 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


31 119 30 0.333333333333
31 121 32 0.333333333333
END GNCDATA

3.3.15 GWF-HFB
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[PRINT_INPUT]
END OPTIONS

BEGIN DIMENSIONS
MAXHFB <maxhfb>
END DIMENSIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<cellid1> <cellid2> <hydchr>
<cellid1> <cellid2> <hydchr>
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• PRINT_INPUT keyword to indicate that the list of horizontal flow barriers will be written to the listing file im-
mediately after it is read.

Block: DIMENSIONS

• maxhfb integer value specifying the maximum number of horizontal flow barriers that will be entered in this
input file. The value of MAXHFB is used to allocate memory for the horizontal flow barriers.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• cellid1 identifier for the first cell. For a structured grid that uses the DIS input file, CELLID1 is the layer,
row, and column numbers of the cell. For a grid that uses the DISV input file, CELLID1 is the layer number
and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) input file, then
CELLID1 is the node numbers for the cell. The barrier is located between cells designated as CELLID1 and
CELLID2. For models that use the DIS and DISV grid types, the layer number for CELLID1 and CELLID2
must be the same. For all grid types, cells must be horizontally adjacent or the program will terminate with an
error.

3.3. Groundwater Flow 59


MODFLOW 6

• cellid2 identifier for the second cell. See CELLID1 for description of how to specify.
• hydchr is the hydraulic characteristic of the horizontal-flow barrier. The hydraulic characteristic is the barrier
hydraulic conductivity divided by the width of the horizontal-flow barrier. If the hydraulic characteristic is
negative, then the absolute value of HYDCHR acts as a multiplier to the conductance between the two model
cells specified as containing the barrier. For example, if the value for HYDCHR was specified as -1.5, the
conductance calculated for the two cells would be multiplied by 1.5.

Example Input File

BEGIN OPTIONS
PRINT_INPUT
END OPTIONS

BEGIN DIMENSIONS
MAXHFB 1
END DIMENSIONS

BEGIN PERIOD 1
#L1 R1 C1 L2 R2 C2 HYDCHR
1 1 4 1 1 5 0.1
END PERIOD 1

3.3.16 GWF-IC
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[EXPORT_ARRAY_ASCII]
[EXPORT_ARRAY_NETCDF]
END OPTIONS

BEGIN GRIDDATA
STRT [LAYERED] [NETCDF]
<strt(nodes)> -- READARRAY
END GRIDDATA

Explanation of Variables
Block: OPTIONS

• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.

Block: GRIDDATA

• strt is the initial (starting) head—that is, head at the beginning of the GWF Model simulation. STRT must
be specified for all simulations, including steady-state simulations. One value is read for every model cell. For
simulations in which the first stress period is steady state, the values used for STRT generally do not affect the
simulation (exceptions may occur if cells go dry and (or) rewet). The execution time, however, will be less if

60 Chapter 3. Input Guide


MODFLOW 6

STRT includes hydraulic heads that are close to the steady-state solution. A head value lower than the cell bottom
can be provided if a cell should start as dry.

Example Input File

#The OPTIONS block is optional


BEGIN OPTIONS
END OPTIONS

#The GRIDDATA block is required


BEGIN GRIDDATA
STRT LAYERED
CONSTANT 0.0 Initial Head layer 1
CONSTANT 0.0 Initial Head layer 2
END GRIDDATA

3.3.17 GWF-LAK
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[AUXILIARY <auxiliary>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_STAGE]
[PRINT_FLOWS]
[SAVE_FLOWS]
[STAGE FILEOUT <stagefile>]
[BUDGET FILEOUT <budgetfile>]
[BUDGETCSV FILEOUT <budgetcsvfile>]
[PACKAGE_CONVERGENCE FILEOUT <package_convergence_filename>]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
[MOVER]
[SURFDEP <surfdep>]
[MAXIMUM_ITERATIONS <maximum_iterations>]
[MAXIMUM_STAGE_CHANGE <maximum_stage_change>]
[TIME_CONVERSION <time_conversion>]
[LENGTH_CONVERSION <length_conversion>]
END OPTIONS

BEGIN DIMENSIONS
NLAKES <nlakes>
NOUTLETS <noutlets>
NTABLES <ntables>
END DIMENSIONS

BEGIN PACKAGEDATA
<ifno> <strt> <nlakeconn> [<aux(naux)>] [<boundname>]
<ifno> <strt> <nlakeconn> [<aux(naux)>] [<boundname>]
(continues on next page)

3.3. Groundwater Flow 61


MODFLOW 6

(continued from previous page)


...
END PACKAGEDATA

BEGIN CONNECTIONDATA
<ifno> <iconn> <cellid> <claktype> <bedleak> <belev> <telev> <connlen> <connwidth>
<ifno> <iconn> <cellid> <claktype> <bedleak> <belev> <telev> <connlen> <connwidth>
...
END CONNECTIONDATA

BEGIN TABLES
<ifno> TAB6 FILEIN <tab6_filename>
<ifno> TAB6 FILEIN <tab6_filename>
...
END TABLES

BEGIN OUTLETS
<outletno> <lakein> <lakeout> <couttype> <invert> <width> <rough> <slope>
<outletno> <lakein> <lakeout> <couttype> <invert> <width> <rough> <slope>
...
END OUTLETS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<number> <laksetting>
<number> <laksetting>
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of lake cells.
• PRINT_INPUT keyword to indicate that the list of lake information will be written to the listing file immediately
after it is read.
• PRINT_STAGE keyword to indicate that the list of lake stages will be printed to the listing file for every stress
period in which “HEAD PRINT” is specified in Output Control. If there is no Output Control option and
PRINT_STAGE is specified, then stages are printed for the last time step of each stress period.
• PRINT_FLOWS keyword to indicate that the list of lake flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.

62 Chapter 3. Input Guide


MODFLOW 6

• SAVE_FLOWS keyword to indicate that lake flow terms will be written to the file specified with “BUDGET FILE-
OUT” in Output Control.
• STAGE keyword to specify that record corresponds to stage.
• stagefile name of the binary output file to write stage information.
• BUDGET keyword to specify that record corresponds to the budget.
• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the binary output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.
• PACKAGE_CONVERGENCE keyword to specify that record corresponds to the package convergence comma spaced
values file.
• package_convergence_filename name of the comma spaced values output file to write package convergence
information.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the LAK package. See the “Observation util-
ity” section for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and
ref{table:gwt-obstypetable} lists observation type(s) supported by the LAK package.
• MOVER keyword to indicate that this instance of the LAK Package can be used with the Water Mover (MVR)
Package. When the MOVER option is specified, additional memory is allocated within the package to store the
available, provided, and received water.
• surfdep real value that defines the surface depression depth for VERTICAL lake-GWF connections. If specified,
SURFDEP must be greater than or equal to zero. If SURFDEP is not specified, a default value of zero is used
for all vertical lake-GWF connections.
• maximum_iterations integer value that defines the maximum number of Newton-Raphson iterations allowed
for a lake. By default, MAXIMUM_ITERATIONS is equal to 100. MAXIMUM_ITERATIONS would only
need to be increased from the default value if one or more lakes in a simulation has a large water budget error.
• maximum_stage_change real value that defines the lake stage closure tolerance. By default, MAXI-
MUM_STAGE_CHANGE is equal to 1 x 10-5. The MAXIMUM_STAGE_CHANGE would only need to be
increased or decreased from the default value if the water budget error for one or more lakes is too small or too
large, respectively.
• time_conversion real value that is used to convert user-specified Manning’s roughness coefficients or grav-
itational acceleration used to calculate outlet flows from seconds to model time units. TIME_CONVERSION
should be set to 1.0, 60.0, 3,600.0, 86,400.0, and 31,557,600.0 when using time units (TIME_UNITS) of sec-
onds, minutes, hours, days, or years in the simulation, respectively. CONVTIME does not need to be specified
if no lake outlets are specified or TIME_UNITS are seconds.
• length_conversion real value that is used to convert outlet user-specified Manning’s roughness coef-
ficients or gravitational acceleration used to calculate outlet flows from meters to model length units.
LENGTH_CONVERSION should be set to 3.28081, 1.0, and 100.0 when using length units (LENGTH_UNITS)

3.3. Groundwater Flow 63


MODFLOW 6

of feet, meters, or centimeters in the simulation, respectively. LENGTH_CONVERSION does not need to be
specified if no lake outlets are specified or LENGTH_UNITS are meters.

Block: DIMENSIONS

• nlakes value specifying the number of lakes that will be simulated for all stress periods.
• noutlets value specifying the number of outlets that will be simulated for all stress periods. If NOUTLETS is
not specified, a default value of zero is used.
• ntables value specifying the number of lakes tables that will be used to define the lake stage, volume relation,
and surface area. If NTABLES is not specified, a default value of zero is used.

Block: PACKAGEDATA

• ifno integer value that defines the feature (lake) number associated with the specified PACKAGEDATA data on
the line. IFNO must be greater than zero and less than or equal to NLAKES. Lake information must be specified
for every lake or the program will terminate with an error. The program will also terminate with an error if
information for a lake is specified more than once.
• strt real value that defines the starting stage for the lake.
• nlakeconn integer value that defines the number of GWF cells connected to this (IFNO) lake. There can only
be one vertical lake connection to each GWF cell. NLAKECONN must be greater than zero.
• aux represents the values of the auxiliary variables for each lake. The values of auxiliary variables must be present
for each lake. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block.
If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.
• boundname name of the lake cell. BOUNDNAME is an ASCII character variable that can contain as many as 40
characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.

Block: CONNECTIONDATA

• ifno integer value that defines the feature (lake) number associated with the specified CONNECTIONDATA
data on the line. IFNO must be greater than zero and less than or equal to NLAKES. Lake connection information
must be specified for every lake connection to the GWF model (NLAKECONN) or the program will terminate
with an error. The program will also terminate with an error if connection information for a lake connection to
the GWF model is specified more than once.
• iconn integer value that defines the GWF connection number for this lake connection entry. ICONN must be
greater than zero and less than or equal to NLAKECONN for lake IFNO.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.
• claktype character string that defines the lake-GWF connection type for the lake connection. Possible lake-
GWF connection type strings include: VERTICAL–character keyword to indicate the lake-GWF connection is
vertical and connection conductance calculations use the hydraulic conductivity corresponding to the K_{33}
tensor component defined for CELLID in the NPF package. HORIZONTAL–character keyword to indicate the
lake-GWF connection is horizontal and connection conductance calculations use the hydraulic conductivity cor-
responding to the K_{11} tensor component defined for CELLID in the NPF package. EMBEDDEDH–character
keyword to indicate the lake-GWF connection is embedded in a single cell and connection conductance calcula-
tions use the hydraulic conductivity corresponding to the K_{11} tensor component defined for CELLID in the

64 Chapter 3. Input Guide


MODFLOW 6

NPF package. EMBEDDEDV–character keyword to indicate the lake-GWF connection is embedded in a single
cell and connection conductance calculations use the hydraulic conductivity corresponding to the K_{33} tensor
component defined for CELLID in the NPF package. Embedded lakes can only be connected to a single cell
(NLAKECONN = 1) and there must be a lake table associated with each embedded lake.
• bedleak real value or character string that defines the bed leakance for the lake-GWF connection. BEDLEAK
must be greater than or equal to zero, equal to the DNODATA value (3.0E+30), or specified to be NONE. If
DNODATA or NONE is specified for BEDLEAK, the lake-GWF connection conductance is solely a function
of aquifer properties in the connected GWF cell and lakebed sediments are assumed to be absent. Warning
messages will be issued if NONE is specified. Eventually the ability to specify NONE will be deprecated and
cause MODFLOW 6 to terminate with an error.
• belev real value that defines the bottom elevation for a HORIZONTAL lake-GWF connection. Any value can be
specified if CLAKTYPE is VERTICAL, EMBEDDEDH, or EMBEDDEDV. If CLAKTYPE is HORIZONTAL
and BELEV is not equal to TELEV, BELEV must be greater than or equal to the bottom of the GWF cell CELLID.
If BELEV is equal to TELEV, BELEV is reset to the bottom of the GWF cell CELLID.
• telev real value that defines the top elevation for a HORIZONTAL lake-GWF connection. Any value can be
specified if CLAKTYPE is VERTICAL, EMBEDDEDH, or EMBEDDEDV. If CLAKTYPE is HORIZONTAL
and TELEV is not equal to BELEV, TELEV must be less than or equal to the top of the GWF cell CELLID. If
TELEV is equal to BELEV, TELEV is reset to the top of the GWF cell CELLID.
• connlen real value that defines the distance between the connected GWF CELLID node and the lake for a
HORIZONTAL, EMBEDDEDH, or EMBEDDEDV lake-GWF connection. CONLENN must be greater than
zero for a HORIZONTAL, EMBEDDEDH, or EMBEDDEDV lake-GWF connection. Any value can be specified
if CLAKTYPE is VERTICAL.
• connwidth real value that defines the connection face width for a HORIZONTAL lake-GWF connection. CON-
NWIDTH must be greater than zero for a HORIZONTAL lake-GWF connection. Any value can be specified if
CLAKTYPE is VERTICAL, EMBEDDEDH, or EMBEDDEDV.

Block: TABLES

• ifno integer value that defines the feature (lake) number associated with the specified TABLES data on the line.
IFNO must be greater than zero and less than or equal to NLAKES. The program will terminate with an error if
table information for a lake is specified more than once or the number of specified tables is less than NTABLES.
• TAB6 keyword to specify that record corresponds to a table file.
• FILEIN keyword to specify that an input filename is expected next.
• tab6_filename character string that defines the path and filename for the file containing lake table data for the
lake connection. The TAB6_FILENAME file includes the number of entries in the file and the relation between
stage, volume, and surface area for each entry in the file. Lake table files for EMBEDDEDH and EMBEDDEDV
lake-GWF connections also include lake-GWF exchange area data for each entry in the file. Instructions for
creating the TAB6_FILENAME input file are provided in Lake Table Input File section.

Block: OUTLETS

• outletno integer value that defines the outlet number associated with the specified OUTLETS data on the
line. OUTLETNO must be greater than zero and less than or equal to NOUTLETS. Outlet information must be
specified for every outlet or the program will terminate with an error. The program will also terminate with an
error if information for a outlet is specified more than once.
• lakein integer value that defines the lake number that outlet is connected to. LAKEIN must be greater than
zero and less than or equal to NLAKES.
• lakeout integer value that defines the lake number that outlet discharge from lake outlet OUTLETNO is routed
to. LAKEOUT must be greater than or equal to zero and less than or equal to NLAKES. If LAKEOUT is zero,

3.3. Groundwater Flow 65


MODFLOW 6

outlet discharge from lake outlet OUTLETNO is discharged to an external boundary.


• couttype character string that defines the outlet type for the outlet OUTLETNO. Possible COUTTYPE
strings include: SPECIFIED–character keyword to indicate the outlet is defined as a specified flow. MAN-
NING–character keyword to indicate the outlet is defined using Manning’s equation. WEIR–character keyword
to indicate the outlet is defined using a sharp weir equation.
• invert real value that defines the invert elevation for the lake outlet. Any value can be specified if COUTTYPE
is SPECIFIED. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section),
values can be obtained from a time series by entering the time-series name in place of a numeric value.
• width real value that defines the width of the lake outlet. Any value can be specified if COUTTYPE is SPECI-
FIED. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values
can be obtained from a time series by entering the time-series name in place of a numeric value.
• rough real value that defines the roughness coefficient for the lake outlet. Any value can be specified if COUT-
TYPE is not MANNING. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable
Input” section), values can be obtained from a time series by entering the time-series name in place of a numeric
value.
• slope real value that defines the bed slope for the lake outlet. Any value can be specified if COUTTYPE is not
MANNING. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section),
values can be obtained from a time series by entering the time-series name in place of a numeric value.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• number integer value that defines the lake or outlet number associated with the specified PERIOD data on the
line. NUMBER must be greater than zero and less than or equal to NLAKES for a lake number and less than or
equal to NOUTLETS for an outlet number.
• laksetting line of information that is parsed into a keyword and values. Keyword values that can be used to start
the LAKSETTING string include both keywords for lake settings and keywords for outlet settings. Keywords for
lake settings include: STATUS, STAGE, RAINFALL, EVAPORATION, RUNOFF, INFLOW, WITHDRAWAL,
and AUXILIARY. Keywords for outlet settings include RATE, INVERT, WIDTH, SLOPE, and ROUGH.

STATUS <status>
STAGE <stage>
RAINFALL <rainfall>
EVAPORATION <evaporation>
RUNOFF <runoff>
INFLOW <inflow>
WITHDRAWAL <withdrawal>
RATE <rate>
INVERT <invert>
WIDTH <width>
SLOPE <slope>
ROUGH <rough>
AUXILIARY <auxname> <auxval>

• status keyword option to define lake status. STATUS can be ACTIVE, INACTIVE, or CONSTANT. By default,
STATUS is ACTIVE.

66 Chapter 3. Input Guide


MODFLOW 6

• stage real or character value that defines the stage for the lake. The specified STAGE is only applied if the lake
is a constant stage lake. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input”
section), values can be obtained from a time series by entering the time-series name in place of a numeric value.
• rainfall real or character value that defines the rainfall rate (LT-1) for the lake. Value must be greater than or
equal to zero. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section),
values can be obtained from a time series by entering the time-series name in place of a numeric value.
• evaporation real or character value that defines the maximum evaporation rate (LT-1) for the lake. Value must
be greater than or equal to zero. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable
Input” section), values can be obtained from a time series by entering the time-series name in place of a numeric
value.
• runoff real or character value that defines the runoff rate (L3 T-1) for the lake. Value must be greater than or
equal to zero. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section),
values can be obtained from a time series by entering the time-series name in place of a numeric value.
• inflow real or character value that defines the volumetric inflow rate (L3 T-1) for the lake. Value must be greater
than or equal to zero. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input”
section), values can be obtained from a time series by entering the time-series name in place of a numeric value.
By default, inflow rates are zero for each lake.
• withdrawal real or character value that defines the maximum withdrawal rate (L3 T-1) for the lake. Value must
be greater than or equal to zero. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable
Input” section), values can be obtained from a time series by entering the time-series name in place of a numeric
value.
• rate real or character value that defines the extraction rate for the lake outflow. A positive value indicates inflow
and a negative value indicates outflow from the lake. RATE only applies to outlets associated with active lakes
(STATUS is ACTIVE). A specified RATE is only applied if COUTTYPE for the OUTLETNO is SPECIFIED.
If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be
obtained from a time series by entering the time-series name in place of a numeric value. By default, the RATE
for each SPECIFIED lake outlet is zero.
• invert real or character value that defines the invert elevation for the lake outlet. A specified INVERT value is
only used for active lakes if COUTTYPE for lake outlet OUTLETNO is not SPECIFIED. If the Options block
includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time
series by entering the time-series name in place of a numeric value.
• rough real value that defines the roughness coefficient for the lake outlet. Any value can be specified if COUT-
TYPE is not MANNING. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable
Input” section), values can be obtained from a time series by entering the time-series name in place of a numeric
value.
• width real or character value that defines the width of the lake outlet. A specified WIDTH value is only used
for active lakes if COUTTYPE for lake outlet OUTLETNO is not SPECIFIED. If the Options block includes a
TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time series by
entering the time-series name in place of a numeric value.
• slope real or character value that defines the bed slope for the lake outlet. A specified SLOPE value is only
used for active lakes if COUTTYPE for lake outlet OUTLETNO is MANNING. If the Options block includes a
TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time series by
entering the time-series name in place of a numeric value.
• AUXILIARY keyword for specifying auxiliary variable.
• auxname name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary
variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable
names defined in the OPTIONS block the data are ignored.

3.3. Groundwater Flow 67


MODFLOW 6

• auxval value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.

Example Input File

BEGIN OPTIONS
PRINT_INPUT
BOUNDNAMES
PRINT_STAGE
PRINT_FLOWS
STAGE FILEOUT lak-1.stage.bin
BUDGET FILEOUT lak-1.cbc
END OPTIONS

BEGIN DIMENSIONS
NLAKES 1
NOUTLETS 1
END DIMENSIONS

BEGIN PACKAGEDATA
# ifno strt lakeconn boundname
1 110.00 57 LAKE_1
END PACKAGEDATA

BEGIN CONNECTIONDATA
# ifno iconn layer row column ctype bedleak belev telev dx width
1 1 1 7 6 HORIZONTAL 0.1 0 0 500 500
1 2 1 8 6 HORIZONTAL 0.1 0 0 500 500
1 3 1 9 6 HORIZONTAL 0.1 0 0 500 500
1 4 1 10 6 HORIZONTAL 0.1 0 0 500 500
1 5 1 11 6 HORIZONTAL 0.1 0 0 500 500
1 6 1 6 7 HORIZONTAL 0.1 0 0 500 500
1 7 2 7 7 VERTICAL 0.1 0 0 0 0
1 8 2 8 7 VERTICAL 0.1 0 0 0 0
1 9 2 8 7 HORIZONTAL 0.1 0 0 250 500
1 10 2 9 7 VERTICAL 0.1 0 0 0 0
1 11 2 9 7 HORIZONTAL 0.1 0 0 250 500
1 12 2 10 7 VERTICAL 0.1 0 0 0 0
1 13 2 10 7 HORIZONTAL 0.1 0 0 250 500
1 14 2 11 7 VERTICAL 0.1 0 0 0 0
1 15 1 12 7 HORIZONTAL 0.1 0 0 500 500
1 16 1 6 8 HORIZONTAL 0.1 0 0 500 500
1 17 2 7 8 VERTICAL 0.1 0 0 0 0
1 18 2 7 8 HORIZONTAL 0.1 0 0 250 500
1 19 3 8 8 VERTICAL 0.1 0 0 0 0
1 20 3 9 8 VERTICAL 0.1 0 0 0 0
1 21 3 10 8 VERTICAL 0.1 0 0 0 0
1 22 2 11 8 VERTICAL 0.1 0 0 0 0
1 23 2 11 8 HORIZONTAL 0.1 0 0 250 500
1 24 1 12 8 HORIZONTAL 0.1 0 0 500 500
1 25 1 6 9 HORIZONTAL 0.1 0 0 500 500
1 26 2 7 9 VERTICAL 0.1 0 0 0 0
(continues on next page)

68 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


1 27 2 7 9 HORIZONTAL 0.1 0 0 250 500
1 28 3 8 9 VERTICAL 0.1 0 0 0 0
1 29 3 9 9 VERTICAL 0.1 0 0 0 0
1 30 3 10 9 VERTICAL 0.1 0 0 0 0
1 31 2 11 9 VERTICAL 0.1 0 0 0 0
1 32 2 11 9 HORIZONTAL 0.1 0 0 250 500
1 33 1 12 9 HORIZONTAL 0.1 0 0 500 500
1 34 1 6 10 HORIZONTAL 0.1 0 0 500 500
1 35 2 7 10 VERTICAL 0.1 0 0 0 0
1 36 2 7 10 HORIZONTAL 0.1 0 0 250 500
1 37 3 8 10 VERTICAL 0.1 0 0 0 0
1 38 3 9 10 VERTICAL 0.1 0 0 0 0
1 39 3 10 10 VERTICAL 0.1 0 0 0 0
1 40 2 11 10 VERTICAL 0.1 0 0 0 0
1 41 2 11 10 HORIZONTAL 0.1 0 0 250 500
1 42 1 12 10 HORIZONTAL 0.1 0 0 500 500
1 43 1 6 11 HORIZONTAL 0.1 0 0 500 500
1 44 2 7 11 VERTICAL 0.1 0 0 0 0
1 45 2 8 11 VERTICAL 0.1 0 0 0 0
1 46 2 8 11 HORIZONTAL 0.1 0 0 250 500
1 47 2 9 11 VERTICAL 0.1 0 0 0 0
1 48 2 9 11 HORIZONTAL 0.1 0 0 250 500
1 49 2 10 11 VERTICAL 0.1 0 0 0 0
1 50 2 10 11 HORIZONTAL 0.1 0 0 250 500
1 51 2 11 11 VERTICAL 0.1 0 0 0 0
1 52 1 12 11 HORIZONTAL 0.1 0 0 500 500
1 53 1 7 12 HORIZONTAL 0.1 0 0 500 500
1 54 1 8 12 HORIZONTAL 0.1 0 0 500 500
1 55 1 9 12 HORIZONTAL 0.1 0 0 500 500
1 56 1 10 12 HORIZONTAL 0.1 0 0 500 500
1 57 1 11 12 HORIZONTAL 0.1 0 0 500 500
END CONNECTIONDATA

BEGIN OUTLETS
# outletno lakein lakeout couttype invert width rough slope
1 1 0 SPECIFIED 0 0 0 0
END OUTLETS

BEGIN PERIOD 1
1 RAINFALL 0.0116
1 EVAPORATION 0.0103
END PERIOD

BEGIN PERIOD 100


1 STATUS CONSTANT
1 STAGE 110.
END PERIOD

3.3. Groundwater Flow 69


MODFLOW 6

Available Observation Types


Example Observation Input File

BEGIN OPTIONS
DIGITS 10
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.lak.csv


l1stage stage 1
l1vol volume 1
vflow lak 1 1
hflow1 lak 1 2
hflow2 lak 1 3
hflow3 lak 1 4
hflow4 lak 1 5
lakflow lak lake_1
END CONTINUOUS

3.3.18 GWF-MAW
Structure of Blocks
FOR EACH SIMULATION
BEGIN OPTIONS
[AUXILIARY <auxiliary>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_HEAD]
[PRINT_FLOWS]
[SAVE_FLOWS]
[HEAD FILEOUT <headfile>]
[BUDGET FILEOUT <budgetfile>]
[BUDGETCSV FILEOUT <budgetcsvfile>]
[NO_WELL_STORAGE]
[FLOW_CORRECTION]
[FLOWING_WELLS]
[SHUTDOWN_THETA <shutdown_theta>]
[SHUTDOWN_KAPPA <shutdown_kappa>]
[MAW_FLOW_REDUCE_CSV FILEOUT <mfrcsvfile>]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
[MOVER]
END OPTIONS

BEGIN DIMENSIONS
NMAWWELLS <nmawwells>
END DIMENSIONS

BEGIN PACKAGEDATA
<ifno> <radius> <bottom> <strt> <condeqn> <ngwfnodes> [<aux(naux)>] [<boundname>]
<ifno> <radius> <bottom> <strt> <condeqn> <ngwfnodes> [<aux(naux)>] [<boundname>]
(continues on next page)

70 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


...
END PACKAGEDATA

BEGIN CONNECTIONDATA
<ifno> <icon> <cellid> <scrn_top> <scrn_bot> <hk_skin> <radius_skin>
<ifno> <icon> <cellid> <scrn_top> <scrn_bot> <hk_skin> <radius_skin>
...
END CONNECTIONDATA

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<ifno> <mawsetting>
<ifno> <mawsetting>
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of multi-aquifer well cells.
• PRINT_INPUT keyword to indicate that the list of multi-aquifer well information will be written to the listing file
immediately after it is read.
• PRINT_HEAD keyword to indicate that the list of multi-aquifer well heads will be printed to the listing file for
every stress period in which “HEAD PRINT” is specified in Output Control. If there is no Output Control option
and PRINT_HEAD is specified, then heads are printed for the last time step of each stress period.
• PRINT_FLOWS keyword to indicate that the list of multi-aquifer well flow rates will be printed to the listing file for
every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output
Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress
period.
• SAVE_FLOWS keyword to indicate that multi-aquifer well flow terms will be written to the file specified with
“BUDGET FILEOUT” in Output Control.
• HEAD keyword to specify that record corresponds to head.
• headfile name of the binary output file to write head information.
• BUDGET keyword to specify that record corresponds to the budget.
• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the binary output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.

3.3. Groundwater Flow 71


MODFLOW 6

• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.
• NO_WELL_STORAGE keyword that deactivates inclusion of well storage contributions to the multi-aquifer well
package continuity equation.
• FLOW_CORRECTION keyword that activates flow corrections in cases where the head in a multi-aquifer well is
below the bottom of the screen for a connection or the head in a convertible cell connected to a multi-aquifer
well is below the cell bottom. When flow corrections are activated, unit head gradients are used to calculate the
flow between a multi-aquifer well and a connected GWF cell. By default, flow corrections are not made.
• FLOWING_WELLS keyword that activates the flowing wells option for the multi-aquifer well package.
• shutdown_theta value that defines the weight applied to discharge rate for wells that limit the water level in a
discharging well (defined using the HEAD_LIMIT keyword in the stress period data). SHUTDOWN_THETA is
used to control discharge rate oscillations when the flow rate from the aquifer is less than the specified flow rate
from the aquifer to the well. Values range between 0.0 and 1.0, and larger values increase the weight (decrease
under-relaxation) applied to the well discharge rate. The HEAD_LIMIT option has been included to facilitate
backward compatibility with previous versions of MODFLOW but use of the RATE_SCALING option instead
of the HEAD_LIMIT option is recommended. By default, SHUTDOWN_THETA is 0.7.
• shutdown_kappa value that defines the weight applied to discharge rate for wells that limit the water level in a
discharging well (defined using the HEAD_LIMIT keyword in the stress period data). SHUTDOWN_KAPPA is
used to control discharge rate oscillations when the flow rate from the aquifer is less than the specified flow rate
from the aquifer to the well. Values range between 0.0 and 1.0, and larger values increase the weight applied to
the well discharge rate. The HEAD_LIMIT option has been included to facilitate backward compatibility with
previous versions of MODFLOW but use of the RATE_SCALING option instead of the HEAD_LIMIT option
is recommended. By default, SHUTDOWN_KAPPA is 0.0001.
• MAW_FLOW_REDUCE_CSV keyword to specify that record corresponds to the output option in which a new record
is written for each multi-aquifer well and for each time step in which the user-requested extraction or injection
rate is reduced by the program.
• mfrcsvfile name of the comma-separated value (CSV) output file to write information about multi-aquifer well
extraction or injection rates that have been reduced by the program. Entries are only written if the extraction or
injection rates are reduced.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the MAW package. See the “Observation
utility” section for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and
ref{table:gwt-obstypetable} lists observation type(s) supported by the MAW package.
• MOVER keyword to indicate that this instance of the MAW Package can be used with the Water Mover (MVR)
Package. When the MOVER option is specified, additional memory is allocated within the package to store the
available, provided, and received water.

Block: DIMENSIONS

• nmawwells integer value specifying the number of multi-aquifer wells that will be simulated for all stress periods.

72 Chapter 3. Input Guide


MODFLOW 6

Block: PACKAGEDATA

• ifno integer value that defines the feature (well) number associated with the specified PACKAGEDATA data on
the line. IFNO must be greater than zero and less than or equal to NMAWWELLS. Multi-aquifer well information
must be specified for every multi-aquifer well or the program will terminate with an error. The program will also
terminate with an error if information for a multi-aquifer well is specified more than once.
• radius radius for the multi-aquifer well. The program will terminate with an error if the radius is less than or
equal to zero.
• bottom bottom elevation of the multi-aquifer well. If CONDEQN is SPECIFIED, THIEM, SKIN, or CUMU-
LATIVE, BOTTOM is set to the cell bottom in the lowermost GWF cell connection in cases where the specified
well bottom is above the bottom of this GWF cell. If CONDEQN is MEAN, BOTTOM is set to the lowermost
GWF cell connection screen bottom in cases where the specified well bottom is above this value. The bottom
elevation defines the lowest well head that will be simulated when the NEWTON UNDER_RELAXATION op-
tion is specified in the GWF model name file. The bottom elevation is also used to calculate volumetric storage
in the well.
• strt starting head for the multi-aquifer well. The program will terminate with an error if the starting head is
less than the specified well bottom.
• condeqn character string that defines the conductance equation that is used to calculate the saturated conduc-
tance for the multi-aquifer well. Possible multi-aquifer well CONDEQN strings include: SPECIFIED–character
keyword to indicate the multi-aquifer well saturated conductance will be specified. THIEM–character keyword
to indicate the multi-aquifer well saturated conductance will be calculated using the Thiem equation, which con-
siders the cell top and bottom, aquifer hydraulic conductivity, and effective cell and well radius. SKIN–character
keyword to indicate that the multi-aquifer well saturated conductance will be calculated using the cell top and
bottom, aquifer and screen hydraulic conductivity, and well and skin radius. CUMULATIVE–character keyword
to indicate that the multi-aquifer well saturated conductance will be calculated using a combination of the Thiem
and SKIN equations. MEAN–character keyword to indicate the multi-aquifer well saturated conductance will be
calculated using the aquifer and screen top and bottom, aquifer and screen hydraulic conductivity, and well and
skin radius. The CUMULATIVE conductance equation is identical to the SKIN LOSSTYPE in the Multi-Node
Well (MNW2) package for MODFLOW-2005. The program will terminate with an error condition if COND-
EQN is SKIN or CUMULATIVE and the calculated saturated conductance is less than zero; if an error condition
occurs, it is suggested that the THIEM or MEAN conductance equations be used for these multi-aquifer wells.
• ngwfnodes integer value that defines the number of GWF nodes connected to this (IFNO) multi-aquifer well.
NGWFNODES must be greater than zero.
• aux represents the values of the auxiliary variables for each multi-aquifer well. The values of auxiliary vari-
ables must be present for each multi-aquifer well. The values must be specified in the order of the auxiliary
variables specified in the OPTIONS block. If the package supports time series and the Options block includes a
TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time series by
entering the time-series name in place of a numeric value.
• boundname name of the multi-aquifer well cell. BOUNDNAME is an ASCII character variable that can contain
as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within
single quotes.

Block: CONNECTIONDATA

• ifno integer value that defines the feature (well) number associated with the specified CONNECTIONDATA
data on the line. IFNO must be greater than zero and less than or equal to NMAWWELLS. Multi-aquifer well
connection information must be specified for every multi-aquifer well connection to the GWF model (NGWFN-
ODES) or the program will terminate with an error. The program will also terminate with an error if connection
information for a multi-aquifer well connection to the GWF model is specified more than once.

3.3. Groundwater Flow 73


MODFLOW 6

• icon integer value that defines the GWF connection number for this multi-aquifer well connection entry. ICONN
must be greater than zero and less than or equal to NGWFNODES for multi-aquifer well IFNO.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell. One or more screened intervals can be connected to the same CELLID
if CONDEQN for a well is MEAN. The program will terminate with an error if MAW wells using SPECIFIED,
THIEM, SKIN, or CUMULATIVE conductance equations have more than one connection to the same CELLID.
• scrn_top value that defines the top elevation of the screen for the multi-aquifer well connection. If CONDEQN
is SPECIFIED, THIEM, SKIN, or CUMULATIVE, SCRN_TOP can be any value and is set to the top of the
cell. If CONDEQN is MEAN, SCRN_TOP is set to the multi-aquifer well connection cell top if the specified
value is greater than the cell top. The program will terminate with an error if the screen top is less than the screen
bottom.
• scrn_bot value that defines the bottom elevation of the screen for the multi-aquifer well connection. If COND-
EQN is SPECIFIED, THIEM, SKIN, or CUMULATIVE, SCRN_BOT can be any value and is set to the bottom
of the cell. If CONDEQN is MEAN, SCRN_BOT is set to the multi-aquifer well connection cell bottom if the
specified value is less than the cell bottom. The program will terminate with an error if the screen bottom is
greater than the screen top.
• hk_skin value that defines the skin (filter pack) hydraulic conductivity (if CONDEQN for the multi-aquifer
well is SKIN, CUMULATIVE, or MEAN) or conductance (if CONDEQN for the multi-aquifer well is SPECI-
FIED) for each GWF node connected to the multi-aquifer well (NGWFNODES). If CONDEQN is SPECIFIED,
HK_SKIN must be greater than or equal to zero. HK_SKIN can be any value if CONDEQN is THIEM. Other-
wise, HK_SKIN must be greater than zero. If CONDEQN is SKIN, the contrast between the cell transmissivity
(the product of geometric mean horizontal hydraulic conductivity and the cell thickness) and the well transmis-
sivity (the product of HK_SKIN and the screen thicknesses) must be greater than one in node CELLID or the
program will terminate with an error condition; if an error condition occurs, it is suggested that the HK_SKIN
be reduced to a value less than K11 and K22 in node CELLID or the THIEM or MEAN conductance equations
be used for these multi-aquifer wells.
• radius_skin real value that defines the skin radius (filter pack radius) for the multi-aquifer well. RA-
DIUS_SKIN can be any value if CONDEQN is SPECIFIED or THIEM. If CONDEQN is SKIN, CUMULA-
TIVE, or MEAN, the program will terminate with an error if RADIUS_SKIN is less than or equal to the RADIUS
for the multi-aquifer well.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• ifno integer value that defines the well number associated with the specified PERIOD data on the line. IFNO
must be greater than zero and less than or equal to NMAWWELLS.
• mawsetting line of information that is parsed into a keyword and values. Keyword values that can be used to
start the MAWSETTING string include: STATUS, FLOWING_WELL, RATE, WELL_HEAD, HEAD_LIMIT,
SHUT_OFF, RATE_SCALING, and AUXILIARY.

STATUS <status>
FLOWING_WELL <fwelev> <fwcond> <fwrlen>
RATE <rate>
WELL_HEAD <well_head>
(continues on next page)

74 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


HEAD_LIMIT <head_limit>
SHUT_OFF <minrate> <maxrate>
RATE_SCALING <pump_elevation> <scaling_length>
AUXILIARY <auxname> <auxval>

• status keyword option to define well status. STATUS can be ACTIVE, INACTIVE, or CONSTANT. By default,
STATUS is ACTIVE.
• FLOWING_WELL keyword to indicate the well is a flowing well. The FLOWING_WELL option can be used to
simulate flowing wells when the simulated well head exceeds the specified drainage elevation.
• fwelev elevation used to determine whether or not the well is flowing.
• fwcond conductance used to calculate the discharge of a free flowing well. Flow occurs when the head in the
well is above the well top elevation (FWELEV).
• fwrlen length used to reduce the conductance of the flowing well. When the head in the well drops below the
well top plus the reduction length, then the conductance is reduced. This reduction length can be used to improve
the stability of simulations with flowing wells so that there is not an abrupt change in flowing well rates.
• rate is the volumetric pumping rate for the multi-aquifer well. A positive value indicates recharge and a negative
value indicates discharge (pumping). RATE only applies to active (STATUS is ACTIVE) multi-aquifer wells.
If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be
obtained from a time series by entering the time-series name in place of a numeric value. By default, the RATE
for each multi-aquifer well is zero.
• well_head is the head in the multi-aquifer well. WELL_HEAD is only applied to constant head (STATUS
is CONSTANT) and inactive (STATUS is INACTIVE) multi-aquifer wells. If the Options block includes a
TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time series
by entering the time-series name in place of a numeric value. The program will terminate with an error if
WELL_HEAD is less than the bottom of the well.
• head_limit is the limiting water level (head) in the well, which is the minimum of the well RATE or the well in-
flow rate from the aquifer. HEAD_LIMIT can be applied to extraction wells (RATE < 0) or injection wells (RATE
> 0). HEAD_LIMIT can be deactivated by specifying the text string “OFF”. The HEAD_LIMIT option is based
on the HEAD_LIMIT functionality available in the MNW2 package for MODFLOW-2005. The HEAD_LIMIT
option has been included to facilitate backward compatibility with previous versions of MODFLOW but use of
the RATE_SCALING option instead of the HEAD_LIMIT option is recommended. By default, HEAD_LIMIT
is “OFF”.
• SHUT_OFF keyword for activating well shut off capability. Subsequent values define the minimum and maxi-
mum pumping rate that a well must exceed to shutoff or reactivate a well, respectively, during a stress period.
SHUT_OFF is only applied to injection wells (RATE<0) and if HEAD_LIMIT is specified (not set to “OFF”). If
HEAD_LIMIT is specified, SHUT_OFF can be deactivated by specifying a minimum value equal to zero. The
SHUT_OFF option is based on the SHUT_OFF functionality available in the MNW2 package for MODFLOW-
2005. The SHUT_OFF option has been included to facilitate backward compatibility with previous versions of
MODFLOW but use of the RATE_SCALING option instead of the SHUT_OFF option is recommended. By
default, SHUT_OFF is not used.
• minrate is the minimum rate that a well must exceed to shutoff a well during a stress period. The well will
shut down during a time step if the flow rate to the well from the aquifer is less than MINRATE. If a well is
shut down during a time step, reactivation of the well cannot occur until the next time step to reduce oscillations.
MINRATE must be less than maxrate.
• maxrate is the maximum rate that a well must exceed to reactivate a well during a stress period. The well will
reactivate during a timestep if the well was shutdown during the previous time step and the flow rate to the well
from the aquifer exceeds maxrate. Reactivation of the well cannot occur until the next time step if a well is
shutdown to reduce oscillations. maxrate must be greater than MINRATE.

3.3. Groundwater Flow 75


MODFLOW 6

• RATE_SCALING activate rate scaling. If RATE_SCALING is specified, both PUMP_ELEVATION and SCAL-
ING_LENGTH must be specified. RATE_SCALING cannot be used with HEAD_LIMIT. RATE_SCALING
can be used for extraction or injection wells. For extraction wells, the extraction rate will start to decrease once
the head in the well lowers to a level equal to the pump elevation plus the scaling length. If the head in the
well drops below the pump elevation, then the extraction rate is calculated to be zero. For an injection well, the
injection rate will begin to decrease once the head in the well rises above the specified pump elevation. If the
head in the well rises above the pump elevation plus the scaling length, then the injection rate will be set to zero.
• pump_elevation is the elevation of the multi-aquifer well pump (PUMP_ELEVATION). PUMP_ELEVATION
should not be less than the bottom elevation (BOTTOM) of the multi-aquifer well.
• scaling_length height above the pump elevation (SCALING_LENGTH). If the simulated well head is below
this elevation (pump elevation plus the scaling length), then the pumping rate is reduced.
• AUXILIARY keyword for specifying auxiliary variable.
• auxname name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary
variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable
names defined in the OPTIONS block the data are ignored.
• auxval value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.

Example Input File


Example 1

begin options
print_input
print_head
print_flows
boundnames
head fileout maw-1.head.bin
budget fileout maw-1.cbc
end options

begin dimensions
nmawwells 2
end dimensions

begin packagedata
# ifno radius bottom strt condeqn ngwnodes name
1 0.15 -100.0 9.14 thiem 2 pwell
2 0.25 -100.0 9.14 thiem 1 iwell
end packagedata

begin connectiondata
# ifno conn l r c stop sbot k rskin
1 1 1 51 51 0 0 0 0
1 2 2 51 51 0 0 0 0
2 1 2 2 2 0 0 0 0
end connectiondata

begin period 1
1 rate_scaling -90. 5.
(continues on next page)

76 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


1 rate -1767.
2 status inactive
end period

begin period 100


2 status active
2 rate 529.
1 rate -2767.
end period

Example 2

begin options
print_input
print_head
print_flows
boundnames
end options

begin dimensions
nmawwells 2
end dimensions

begin packagedata
# ifno radius bottom strt condeqn ngwnodes name
1 0.15 -100.0 9.14 mean 2 pwell
2 0.25 -100.0 9.14 mean 1 iwell
end packagedata

begin connectiondata
# ifno conn l r c stop sbot k rskin
1 1 1 51 51 0. -100. 361. .25
1 2 2 51 51 0. -100. 361. .25
2 1 2 2 2 -50. -100. 361 .50
end connectiondata

begin period 1
1 rate_scaling -90. 5.
1 rate -1767.
2 status inactive
end period

begin period 100


2 status active
2 rate 529.
1 rate -2767.
end period

Example 3

begin options
print_input
(continues on next page)

3.3. Groundwater Flow 77


MODFLOW 6

(continued from previous page)


print_head
print_flows
boundnames
flowing_wells
end options

begin dimensions
nmawwells 1
end dimensions

begin packagedata
# ifno radius bottom strt condeqn ngwnodes name
1 0.15 -514.9 9.14 specified 2 ntwell
end packagedata

begin connectiondata
# ifno conn l r c stop sbot k rskin
1 1 1 51 51 -50 -514.9 111.3763 0
1 2 2 51 51 -50 -514.9 445.9849 0
end connectiondata

begin period 1
1 rate 0
1 flowing_well 0. 7500. 0.5
end period

Available Observation Types


Example Observation Input File

BEGIN OPTIONS
DIGITS 10
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.maw.csv


m1head head 1
m1rate01 maw 1 1
m1rate02 maw 1 2
m1rate maw well-1
m2rate01 maw well-2
END CONTINUOUS

3.3.19 GWF-MVR
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[PRINT_INPUT]
[PRINT_FLOWS]
(continues on next page)

78 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


[MODELNAMES]
[BUDGET FILEOUT <budgetfile>]
[BUDGETCSV FILEOUT <budgetcsvfile>]
END OPTIONS

BEGIN DIMENSIONS
MAXMVR <maxmvr>
MAXPACKAGES <maxpackages>
END DIMENSIONS

BEGIN PACKAGES
[<mname>] <pname>
[<mname>] <pname>
...
END PACKAGES

FOR ANY STRESS PERIOD


BEGIN PERIOD <iper>
[<mname1>] <pname1> <id1> [<mname2>] <pname2> <id2> <mvrtype> <value>
[<mname1>] <pname1> <id1> [<mname2>] <pname2> <id2> <mvrtype> <value>
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• PRINT_INPUT keyword to indicate that the list of MVR information will be written to the listing file immediately
after it is read.
• PRINT_FLOWS keyword to indicate that the list of MVR flow rates will be printed to the listing file for every
stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control
option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• MODELNAMES keyword to indicate that all package names will be preceded by the model name for the package.
Model names are required when the Mover Package is used with a GWF-GWF Exchange. The MODELNAME
keyword should not be used for a Mover Package that is for a single GWF Model.
• BUDGET keyword to specify that record corresponds to the budget.
• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.

Block: DIMENSIONS

• maxmvr integer value specifying the maximum number of water mover entries that will specified for any stress
period.
• maxpackages integer value specifying the number of unique packages that are included in this water mover input
file.

3.3. Groundwater Flow 79


MODFLOW 6

Block: PACKAGES

• mname name of model containing the package. Model names are assigned by the user in the simulation name
file.
• pname is the name of a package that may be included in a subsequent stress period block. The package name is
assigned in the name file for the GWF Model. Package names are optionally provided in the name file. If they
are not provided by the user, then packages are assigned a default value, which is the package acronym followed
by a hyphen and the package number. For example, the first Drain Package is named DRN-1. The second Drain
Package is named DRN-2, and so forth.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• mname1 name of model containing the package, PNAME1.
• pname1 is the package name for the provider. The package PNAME1 must be designated to provide water through
the MVR Package by specifying the keyword “MOVER” in its OPTIONS block.
• id1 is the identifier for the provider. For the standard boundary packages, the provider identifier is the number
of the boundary as it is listed in the package input file. (Note that the order of these boundaries may change
by stress period, which must be accounted for in the Mover Package.) So the first well has an identifier of one.
The second is two, and so forth. For the advanced packages, the identifier is the reach number (SFR Package),
well number (MAW Package), or UZF cell number. For the Lake Package, ID1 is the lake outlet number. Thus,
outflows from a single lake can be routed to different streams, for example.
• mname2 name of model containing the package, PNAME2.
• pname2 is the package name for the receiver. The package PNAME2 must be designated to receive water from
the MVR Package by specifying the keyword “MOVER” in its OPTIONS block.
• id2 is the identifier for the receiver. The receiver identifier is the reach number (SFR Package), Lake number
(LAK Package), well number (MAW Package), or UZF cell number.
• mvrtype is the character string signifying the method for determining how much water will be moved. Supported
values are “FACTOR” “EXCESS” “THRESHOLD” and “UPTO”. These four options determine how the receiver
flow rate, Q_R, is calculated. These options mirror the options defined for the cprior variable in the SFR package,
with the term “FACTOR” being functionally equivalent to the “FRACTION” option for cprior.
• value is the value to be used in the equation for calculating the amount of water to move. For the “FACTOR”
option, VALUE is the alpha factor. For the remaining options, VALUE is the specified flow rate, Q_S.

Example Input File

BEGIN OPTIONS
PRINT_INPUT
PRINT_FLOWS
END OPTIONS

BEGIN DIMENSIONS
MAXMVR 16
MAXPACKAGES 5
END DIMENSIONS
(continues on next page)

80 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)

BEGIN PACKAGES
MAW-1
MAW-2
SFR-1
LAK-1
UZF-1
END PACKAGES

BEGIN PERIOD 1
# ***PROVIDER*** ***RECEIVER*** ***FLOW INFO**
# PAK1 PAK1RCH PAK2 PAK2RCH TYPE VALUE
MAW-1 1 MAW-2 21 EXCESS 5.00
MAW-1 11 SFR-1 77 FACTOR 0.25
MAW-1 21 UZF-1 93 FACTOR 0.01
MAW-1 21 LAK-1 3 FACTOR 1.00

SFR-1 1021 MAW-1 21 THRESHOLD 10.0


SFR-1 441 SFR-1 77 FACTOR 0.10
SFR-1 56 UZF-1 93 FACTOR 0.10
SFR-1 4587 LAK-1 3 FACTOR 1.00

UZF-1 4 MAW-1 11 FACTOR 1.00


UZF-1 5 SFR-1 22 FACTOR 1.00
UZF-1 6 UZF-1 45 FACTOR 1.00
UZF-1 7 LAK-1 3 FACTOR 1.00

LAK-1 1 MAW-1 11 EXCESS 1000.


LAK-1 2 SFR-1 22 UPTO 2000.
LAK-1 3 UZF-1 45 UPTO 3000.
LAK-1 4 LAK-1 3 UPTO 3000.
END PERIOD 1

3.3.20 GWF-NAM
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[LIST <list>]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[NEWTON [UNDER_RELAXATION]]
[NETCDF_MESH2D FILEOUT <ncmesh2dfile>]
[NETCDF_STRUCTURED FILEOUT <ncstructfile>]
[NETCDF FILEIN <netcdf_filename>]
END OPTIONS

BEGIN PACKAGES
<ftype> <fname> [<pname>]
(continues on next page)

3.3. Groundwater Flow 81


MODFLOW 6

(continued from previous page)


<ftype> <fname> [<pname>]
...
END PACKAGES

Explanation of Variables
Block: OPTIONS

• list is name of the listing file to create for this GWF model. If not specified, then the name of the list file will be
the basename of the GWF model name file and the ‘.lst’ extension. For example, if the GWF name file is called
“my.model.nam” then the list file will be called “my.model.lst”.
• PRINT_INPUT keyword to indicate that the list of all model stress package information will be written to the
listing file immediately after it is read.
• PRINT_FLOWS keyword to indicate that the list of all model package flow rates will be printed to the listing file for
every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output
Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress
period.
• SAVE_FLOWS keyword to indicate that all model package flow terms will be written to the file specified with
“BUDGET FILEOUT” in Output Control.
• NEWTON keyword that activates the Newton-Raphson formulation for groundwater flow between connected, con-
vertible groundwater cells and stress packages that support calculation of Newton-Raphson terms for groundwa-
ter exchanges. Cells will not dry when this option is used. By default, the Newton-Raphson formulation is not
applied.
• UNDER_RELAXATION keyword that indicates whether the groundwater head in a cell will be under-relaxed when
water levels fall below the bottom of the model below any given cell. By default, Newton-Raphson UN-
DER_RELAXATION is not applied.
• NETCDF_MESH2D keyword to specify that record corresponds to a layered mesh netcdf file.
• NETCDF_STRUCTURED keyword to specify that record corresponds to a structured netcdf file.
• FILEOUT keyword to specify that an output filename is expected next.
• ncmesh2dfile name of the netcdf ugrid layered mesh output file.
• ncstructfile name of the netcdf structured output file.
• NETCDF keyword to specify that record corresponds to a netcdf input file.
• FILEIN keyword to specify that an input filename is expected next.
• netcdf_filename defines a netcdf input file.

Block: PACKAGES

• ftype is the file type, which must be one of the following character values shown in table ref{table:ftype-gwf}.
Ftype may be entered in any combination of uppercase and lowercase.
• fname is the name of the file containing the package input. The path to the file should be included if the file is
not located in the folder where the program was run.
• pname is the user-defined name for the package. PNAME is restricted to 16 characters. No spaces are allowed
in PNAME. PNAME character values are read and stored by the program for stress packages only. These names
may be useful for labeling purposes when multiple stress packages of the same type are located within a single
GWF Model. If PNAME is specified for a stress package, then PNAME will be used in the flow budget table in

82 Chapter 3. Input Guide


MODFLOW 6

the listing file; it will also be used for the text entry in the cell-by-cell budget file. PNAME is case insensitive
and is stored in all upper case letters.

Example Input File

# This block is optional


BEGIN OPTIONS
PRINT_INPUT
PRINT_FLOWS
SAVE_FLOWS
END OPTIONS

# List of packages. List can be listed in any order.


BEGIN PACKAGES
IC6 bcf2ss.ic
NPF6 bcf2ss.npf
WEL6 bcf2ss.wel WEL-COUNTY
RIV6 bcf2ss.riv
RCH6 bcf2ss.rch
OC6 bcf2ss.oc
DIS6 bcf2ss.dis
END PACKAGES

3.3.21 GWF-NPF
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[SAVE_FLOWS]
[PRINT_FLOWS]
[ALTERNATIVE_CELL_AVERAGING <alternative_cell_averaging>]
[THICKSTRT]
[VARIABLECV [DEWATERED]]
[PERCHED]
[REWET WETFCT <wetfct> IWETIT <iwetit> IHDWET <ihdwet>]
[XT3D [RHS]]
[SAVE_SPECIFIC_DISCHARGE]
[SAVE_SATURATION]
[K22OVERK]
[K33OVERK]
[TVK6 FILEIN <tvk6_filename>]
[EXPORT_ARRAY_ASCII]
[EXPORT_ARRAY_NETCDF]
END OPTIONS

BEGIN GRIDDATA
ICELLTYPE [LAYERED] [NETCDF]
<icelltype(nodes)> -- READARRAY
K [LAYERED] [NETCDF]
<k(nodes)> -- READARRAY
[K22 [LAYERED] [NETCDF]
(continues on next page)

3.3. Groundwater Flow 83


MODFLOW 6

(continued from previous page)


<k22(nodes)> -- READARRAY]
[K33 [LAYERED] [NETCDF]
<k33(nodes)> -- READARRAY]
[ANGLE1 [LAYERED] [NETCDF]
<angle1(nodes)> -- READARRAY]
[ANGLE2 [LAYERED] [NETCDF]
<angle2(nodes)> -- READARRAY]
[ANGLE3 [LAYERED] [NETCDF]
<angle3(nodes)> -- READARRAY]
[WETDRY [LAYERED] [NETCDF]
<wetdry(nodes)> -- READARRAY]
END GRIDDATA

Explanation of Variables
Block: OPTIONS

• SAVE_FLOWS keyword to indicate that budget flow terms will be written to the file specified with “BUDGET
SAVE FILE” in Output Control.
• PRINT_FLOWS keyword to indicate that calculated flows between cells will be printed to the listing file for every
stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control
option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
This option can produce extremely large list files because all cell-by-cell flows are printed. It should only be used
with the NPF Package for models that have a small number of cells.
• alternative_cell_averaging is a text keyword to indicate that an alternative method will be used for calcu-
lating the conductance for horizontal cell connections. The text value for ALTERNATIVE_CELL_AVERAGING
can be “LOGARITHMIC”, “AMT-LMK”, or “AMT-HMK”. “AMT-LMK” signifies that the conductance will
be calculated using arithmetic-mean thickness and logarithmic-mean hydraulic conductivity. “AMT-HMK” sig-
nifies that the conductance will be calculated using arithmetic-mean thickness and harmonic-mean hydraulic
conductivity. If the user does not specify a value for ALTERNATIVE_CELL_AVERAGING, then the harmonic-
mean method will be used. This option cannot be used if the XT3D option is invoked.
• THICKSTRT indicates that cells having a negative ICELLTYPE are confined, and their cell thickness for con-
ductance calculations will be computed as STRT-BOT rather than TOP-BOT. This option should be used with
caution as it only affects conductance calculations in the NPF Package.
• VARIABLECV keyword to indicate that the vertical conductance will be calculated using the saturated thickness
and properties of the overlying cell and the thickness and properties of the underlying cell. If the DEWATERED
keyword is also specified, then the vertical conductance is calculated using only the saturated thickness and
properties of the overlying cell if the head in the underlying cell is below its top. If these keywords are not
specified, then the default condition is to calculate the vertical conductance at the start of the simulation using
the initial head and the cell properties. The vertical conductance remains constant for the entire simulation.
• DEWATERED If the DEWATERED keyword is specified, then the vertical conductance is calculated using only
the saturated thickness and properties of the overlying cell if the head in the underlying cell is below its top.
• PERCHED keyword to indicate that when a cell is overlying a dewatered convertible cell, the head difference used
in Darcy’s Law is equal to the head in the overlying cell minus the bottom elevation of the overlying cell. If not
specified, then the default is to use the head difference between the two cells.
• REWET activates model rewetting. Rewetting is off by default.
• wetfct is a keyword and factor that is included in the calculation of the head that is initially established at a cell
when that cell is converted from dry to wet.

84 Chapter 3. Input Guide


MODFLOW 6

• iwetit is a keyword and iteration interval for attempting to wet cells. Wetting is attempted every IWETIT
iteration. This applies to outer iterations and not inner iterations. If IWETIT is specified as zero or less, then the
value is changed to 1.
• ihdwet is a keyword and integer flag that determines which equation is used to define the initial head at cells
that become wet. If IHDWET is 0, h = BOT + WETFCT (hm - BOT). If IHDWET is not 0, h = BOT + WETFCT
(THRESH).
• XT3D keyword indicating that the XT3D formulation will be used. If the RHS keyword is also included, then the
XT3D additional terms will be added to the right-hand side. If the RHS keyword is excluded, then the XT3D
terms will be put into the coefficient matrix. Use of XT3D will substantially increase the computational effort,
but will result in improved accuracy for anisotropic conductivity fields and for unstructured grids in which the
CVFD requirement is violated. XT3D requires additional information about the shapes of grid cells. If XT3D is
active and the DISU Package is used, then the user will need to provide in the DISU Package the angldegx array
in the CONNECTIONDATA block and the VERTICES and CELL2D blocks.
• RHS If the RHS keyword is also included, then the XT3D additional terms will be added to the right-hand side.
If the RHS keyword is excluded, then the XT3D terms will be put into the coefficient matrix.
• SAVE_SPECIFIC_DISCHARGE keyword to indicate that x, y, and z components of specific discharge will be
calculated at cell centers and written to the budget file, which is specified with “BUDGET SAVE FILE” in
Output Control. If this option is activated, then additional information may be required in the discretization
packages and the GWF Exchange package (if GWF models are coupled). Specifically, ANGLDEGX must be
specified in the CONNECTIONDATA block of the DISU Package; ANGLDEGX must also be specified for the
GWF Exchange as an auxiliary variable.
• SAVE_SATURATION keyword to indicate that cell saturation will be written to the budget file, which is specified
with “BUDGET SAVE FILE” in Output Control. Saturation will be saved to the budget file as an auxiliary
variable saved with the DATA-SAT text label. Saturation is a cell variable that ranges from zero to one and can
be used by post processing programs to determine how much of a cell volume is saturated. If ICELLTYPE is 0,
then saturation is always one.
• K22OVERK keyword to indicate that specified K22 is a ratio of K22 divided by K. If this option is specified, then
the K22 array entered in the NPF Package will be multiplied by K after being read.
• K33OVERK keyword to indicate that specified K33 is a ratio of K33 divided by K. If this option is specified, then
the K33 array entered in the NPF Package will be multiplied by K after being read.
• TVK6 keyword to specify that record corresponds to a time-varying hydraulic conductivity (TVK) file. The
behavior of TVK and a description of the input file is provided separately.
• FILEIN keyword to specify that an input filename is expected next.
• tvk6_filename defines a time-varying hydraulic conductivity (TVK) input file. Records in the TVK file can
be used to change hydraulic conductivity properties at specified times or stress periods.
• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.

Block: GRIDDATA

• icelltype flag for each cell that specifies how saturated thickness is treated. 0 means saturated thickness is held
constant; >0 means saturated thickness varies with computed head when head is below the cell top; <0 means
saturated thickness varies with computed head unless the THICKSTRT option is in effect. When THICKSTRT
is in effect, a negative value for ICELLTYPE indicates that the saturated thickness value used in conductance
calculations in the NPF Package will be computed as STRT-BOT and held constant. If the THICKSTRT option

3.3. Groundwater Flow 85


MODFLOW 6

is not in effect, then negative values provided by the user for ICELLTYPE are automatically reassigned by the
program to a value of one.
• k is the hydraulic conductivity. For the common case in which the user would like to specify the horizontal hy-
draulic conductivity and the vertical hydraulic conductivity, then K should be assigned as the horizontal hydraulic
conductivity, K33 should be assigned as the vertical hydraulic conductivity, and K22 and the three rotation an-
gles should not be specified. When more sophisticated anisotropy is required, then K corresponds to the K11
hydraulic conductivity axis. All included cells (IDOMAIN > 0) must have a K value greater than zero.
• k22 is the hydraulic conductivity of the second ellipsoid axis (or the ratio of K22/K if the K22OVERK option
is specified); for an unrotated case this is the hydraulic conductivity in the y direction. If K22 is not included
in the GRIDDATA block, then K22 is set equal to K. For a regular MODFLOW grid (DIS Package is used) in
which no rotation angles are specified, K22 is the hydraulic conductivity along columns in the y direction. For
an unstructured DISU grid, the user must assign principal x and y axes and provide the angle for each cell face
relative to the assigned x direction. All included cells (IDOMAIN > 0) must have a K22 value greater than zero.
• k33 is the hydraulic conductivity of the third ellipsoid axis (or the ratio of K33/K if the K33OVERK option is
specified); for an unrotated case, this is the vertical hydraulic conductivity. When anisotropy is applied, K33
corresponds to the K33 tensor component. All included cells (IDOMAIN > 0) must have a K33 value greater
than zero.
• angle1 is a rotation angle of the hydraulic conductivity tensor in degrees. The angle represents the first of three
sequential rotations of the hydraulic conductivity ellipsoid. With the K11, K22, and K33 axes of the ellipsoid
initially aligned with the x, y, and z coordinate axes, respectively, ANGLE1 rotates the ellipsoid about its K33
axis (within the x - y plane). A positive value represents counter-clockwise rotation when viewed from any point
on the positive K33 axis, looking toward the center of the ellipsoid. A value of zero indicates that the K11 axis
lies within the x - z plane. If ANGLE1 is not specified, default values of zero are assigned to ANGLE1, ANGLE2,
and ANGLE3, in which case the K11, K22, and K33 axes are aligned with the x, y, and z axes, respectively.
• angle2 is a rotation angle of the hydraulic conductivity tensor in degrees. The angle represents the second of
three sequential rotations of the hydraulic conductivity ellipsoid. Following the rotation by ANGLE1 described
above, ANGLE2 rotates the ellipsoid about its K22 axis (out of the x - y plane). An array can be specified
for ANGLE2 only if ANGLE1 is also specified. A positive value of ANGLE2 represents clockwise rotation
when viewed from any point on the positive K22 axis, looking toward the center of the ellipsoid. A value of
zero indicates that the K11 axis lies within the x - y plane. If ANGLE2 is not specified, default values of zero
are assigned to ANGLE2 and ANGLE3; connections that are not user-designated as vertical are assumed to be
strictly horizontal (that is, to have no z component to their orientation); and connection lengths are based on
horizontal distances.
• angle3 is a rotation angle of the hydraulic conductivity tensor in degrees. The angle represents the third of three
sequential rotations of the hydraulic conductivity ellipsoid. Following the rotations by ANGLE1 and ANGLE2
described above, ANGLE3 rotates the ellipsoid about its K11 axis. An array can be specified for ANGLE3 only
if ANGLE1 and ANGLE2 are also specified. An array must be specified for ANGLE3 if ANGLE2 is specified.
A positive value of ANGLE3 represents clockwise rotation when viewed from any point on the positive K11
axis, looking toward the center of the ellipsoid. A value of zero indicates that the K22 axis lies within the x - y
plane.
• wetdry is a combination of the wetting threshold and a flag to indicate which neighboring cells can cause a cell
to become wet. If WETDRY < 0, only a cell below a dry cell can cause the cell to become wet. If WETDRY >
0, the cell below a dry cell and horizontally adjacent cells can cause a cell to become wet. If WETDRY is 0, the
cell cannot be wetted. The absolute value of WETDRY is the wetting threshold. When the sum of BOT and the
absolute value of WETDRY at a dry cell is equaled or exceeded by the head at an adjacent cell, the cell is wetted.
WETDRY must be specified if “REWET” is specified in the OPTIONS block. If “REWET” is not specified in
the options block, then WETDRY can be entered, and memory will be allocated for it, even though it is not used.

86 Chapter 3. Input Guide


MODFLOW 6

Example Input File

BEGIN OPTIONS
SAVE_FLOWS
END OPTIONS

BEGIN GRIDDATA
#
#icelltype(nodes) is 0:confined, 1:convertible
ICELLTYPE
constant 0
#
# horizontal hydraulic conductivity
K
constant 1.0
#
# vertical hydraulic conductivity
K33
constant 0.1
END GRIDDATA

3.3.22 GWF-OC
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[BUDGET FILEOUT <budgetfile>]
[BUDGETCSV FILEOUT <budgetcsvfile>]
[HEAD FILEOUT <headfile>]
[HEAD PRINT_FORMAT COLUMNS <columns> WIDTH <width> DIGITS <digits> <format>]
END OPTIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


[SAVE <rtype> <ocsetting>]
[PRINT <rtype> <ocsetting>]
END PERIOD

Explanation of Variables
Block: OPTIONS

• BUDGET keyword to specify that record corresponds to the budget.


• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.
• HEAD keyword to specify that record corresponds to head.

3.3. Groundwater Flow 87


MODFLOW 6

• headfile name of the output file to write head information.


• PRINT_FORMAT keyword to specify format for printing to the listing file.
• columns number of columns for writing data.
• width width for writing each number.
• digits number of digits to use for writing a number.
• format write format can be EXPONENTIAL, FIXED, GENERAL, or SCIENTIFIC.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• SAVE keyword to indicate that information will be saved this stress period.
• PRINT keyword to indicate that information will be printed this stress period.
• rtype type of information to save or print. Can be BUDGET or HEAD.
• ocsetting specifies the steps for which the data will be saved.

ALL
FIRST
LAST
FREQUENCY <frequency>
STEPS <steps>

• ALL keyword to indicate save for all time steps in period.


• FIRST keyword to indicate save for first step in period. This keyword may be used in conjunction with other
keywords to print or save results for multiple time steps.
• LAST keyword to indicate save for last step in period. This keyword may be used in conjunction with other
keywords to print or save results for multiple time steps.
• frequency save at the specified time step frequency. This keyword may be used in conjunction with other
keywords to print or save results for multiple time steps.
• steps save for each step specified in STEPS. This keyword may be used in conjunction with other keywords to
print or save results for multiple time steps.

Example Input File

BEGIN OPTIONS
HEAD FILEOUT AdvGW_tidal.hds
BUDGET FILEOUT AdvGW_tidal.cbc
HEAD PRINT_FORMAT COLUMNS 100 WIDTH 15 DIGITS 4 GENERAL
END OPTIONS

BEGIN PERIOD 1
PRINT HEAD FIRST
PRINT HEAD LAST
PRINT BUDGET LAST
(continues on next page)

88 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


SAVE HEAD ALL
SAVE BUDGET ALL
END PERIOD

# No output for stress periods 2 through 24


BEGIN PERIOD 2
END PERIOD

BEGIN PERIOD 25
PRINT HEAD STEPS 6 12 23
SAVE BUDGET FIRST
SAVE BUDGET LAST
SAVE BUDGET FREQUENCY 5
END PERIOD

3.3.23 GWF-RCH
Structure of Blocks
FOR EACH SIMULATION
BEGIN OPTIONS
[FIXED_CELL]
[AUXILIARY <auxiliary>]
[AUXMULTNAME <auxmultname>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
END OPTIONS

BEGIN DIMENSIONS
MAXBOUND <maxbound>
END DIMENSIONS

FOR ANY STRESS PERIOD


BEGIN PERIOD <iper>
<cellid> <recharge> [<aux(naux)>] [<boundname>]
<cellid> <recharge> [<aux(naux)>] [<boundname>]
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• FIXED_CELL indicates that recharge will not be reassigned to a cell underlying the cell specified in the list if the
specified cell is inactive.
• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have

3.3. Groundwater Flow 89


MODFLOW 6

a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• auxmultname name of auxiliary variable to be used as multiplier of recharge.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of recharge cells.
• PRINT_INPUT keyword to indicate that the list of recharge information will be written to the listing file immedi-
ately after it is read.
• PRINT_FLOWS keyword to indicate that the list of recharge flow rates will be printed to the listing file for every
stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control
option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that recharge flow terms will be written to the file specified with “BUDGET
FILEOUT” in Output Control.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the Recharge package. See the “Observation
utility” section for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and
ref{table:gwt-obstypetable} lists observation type(s) supported by the Recharge package.

Block: DIMENSIONS

• maxbound integer value specifying the maximum number of recharge cells cells that will be specified for use
during any stress period.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.
• recharge is the recharge flux rate (LT-1). This rate is multiplied inside the program by the surface area of the
cell to calculate the volumetric recharge rate. If the Options block includes a TIMESERIESFILE entry (see the
“Time-Variable Input” section), values can be obtained from a time series by entering the time-series name in
place of a numeric value.
• aux represents the values of the auxiliary variables for each recharge. The values of auxiliary variables must be
present for each recharge. The values must be specified in the order of the auxiliary variables specified in the
OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry
(see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-series
name in place of a numeric value.

90 Chapter 3. Input Guide


MODFLOW 6

• boundname name of the recharge cell. BOUNDNAME is an ASCII character variable that can contain as many
as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single
quotes.

Example Input File


Example 1

BEGIN OPTIONS
AUXILIARY var1 var2 mult
PRINT_INPUT
PRINT_FLOWS
SAVE_FLOWS
BOUNDNAMES
TS6 FILEIN recharge_rates.ts
# Note: Time-series file recharge_rates.ts defines time series rch_1
AUXMULTNAME mult
END OPTIONS

BEGIN DIMENSIONS
MAXBOUND 10
END DIMENSIONS

BEGIN PERIOD 1
# Lay Row Col Rate Var1 Var2 mult BoundName
1 1 1 rch_1 1.0 2.0 1.0 Rch-1-1
1 1 2 rch_1 1.1 2.1 1.0 Rch-1-2
1 1 3 rch_1 1.2 2.2 0.5
1 2 1 rch_1 1.3 2.3 1.0 Rch-2-1
1 2 2 rch_1 1.4 2.4 1.0 Rch-2-2
1 2 3 rch_1 1.5 2.5 1.0
1 2 4 rch_1 1.6 2.6 0.5
1 3 1 rch_1 1.7 2.7 1.0
1 3 2 rch_1 1.8 2.8 1.0
1 3 3 rch_1 1.9 2.9 1.0
END PERIOD

Example 2

BEGIN OPTIONS
AUXILIARY var1 var2 mymult
READASARRAYS
PRINT_INPUT
PRINT_FLOWS
SAVE_FLOWS
AUXMULTNAME mymult
END OPTIONS

BEGIN PERIOD 1

# For this model, the absence of an IRCH array causes


# recharge to apply to model layer 1. To make recharge
# apply to layer 2 instead, the following lines
# (uncommented) could be used:
(continues on next page)

3.3. Groundwater Flow 91


MODFLOW 6

(continued from previous page)


# IRCH
# constant 2

# recharge rate
RECHARGE
constant 0.0040

# auxiliary variable (var1) array


var1
constant 100.

# auxiliary variable (var2) array


var2
constant 0.

# auxiliary variable (mymult) array


# Because ``AUXMULTNAME mymult'' was specified in the
# options block, the MYMULT array will be used to multiply
# the values in the RECHARGE array
MYMULT
INTERNAL FACTOR 1.0
0.5 1.0 1.0 0.5
1.0 1.0 1.0 1.0
0.5 1.0 1.0 0.5

END PERIOD

Available Observation Types


Example Observation Input File

BEGIN OPTIONS
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.rch.csv


rch1-1 RCH Rch-1-1
rch1-2 RCH Rch-1-2
rch2-1 RCH Rch-2-1
rch2-2 RCH Rch-2-2
rch2-3 RCH 1 2 3
END CONTINUOUS

3.3.24 GWF-RCHA
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
READASARRAYS
[FIXED_CELL]
(continues on next page)

92 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


[AUXILIARY <auxiliary>]
[AUXMULTNAME <auxmultname>]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[TAS6 FILEIN <tas6_filename>]
[OBS6 FILEIN <obs6_filename>]
[EXPORT_ARRAY_NETCDF]
END OPTIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


[IRCH
<irch(ncol*nrow; ncpl)> -- READARRAY]
RECHARGE
<recharge(ncol*nrow; ncpl)> -- READARRAY
[AUX
<aux(ncol*nrow; ncpl)> -- READARRAY]
END PERIOD

Explanation of Variables
Block: OPTIONS

• READASARRAYS indicates that array-based input will be used for the Recharge Package. This keyword must be
specified to use array-based input. When READASARRAYS is specified, values must be provided for every cell
within a model layer, even those cells that have an IDOMAIN value less than one. Values assigned to cells with
IDOMAIN values less than one are not used and have no effect on simulation results.
• FIXED_CELL indicates that recharge will not be reassigned to a cell underlying the cell specified in the list if the
specified cell is inactive.
• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• auxmultname name of auxiliary variable to be used as multiplier of recharge.
• PRINT_INPUT keyword to indicate that the list of recharge information will be written to the listing file immedi-
ately after it is read.
• PRINT_FLOWS keyword to indicate that the list of recharge flow rates will be printed to the listing file for every
stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control
option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that recharge flow terms will be written to the file specified with “BUDGET
FILEOUT” in Output Control.
• TAS6 keyword to specify that record corresponds to a time-array-series file.
• FILEIN keyword to specify that an input filename is expected next.

3.3. Groundwater Flow 93


MODFLOW 6

• tas6_filename defines a time-array-series file defining a time-array series that can be used to assign time-
varying values. See the “Time-Variable Input” section for instructions on using the time-array series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the Recharge package. See the “Observation
utility” section for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and
ref{table:gwt-obstypetable} lists observation type(s) supported by the Recharge package.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• irch IRCH is the layer number that defines the layer in each vertical column where recharge is applied. If IRCH
is omitted, recharge by default is applied to cells in layer 1. IRCH can only be used if READASARRAYS is
specified in the OPTIONS block. If IRCH is specified, it must be specified as the first variable in the PERIOD
block or MODFLOW will terminate with an error.
• recharge is the recharge flux rate (LT-1). This rate is multiplied inside the program by the surface area of the
cell to calculate the volumetric recharge rate. The recharge array may be defined by a time-array series (see the
“Using Time-Array Series in a Package” section).
• aux is an array of values for auxiliary variable aux(iaux), where iaux is a value from 1 to naux, and aux(iaux)
must be listed as part of the auxiliary variables. A separate array can be specified for each auxiliary variable. If
an array is not specified for an auxiliary variable, then a value of zero is assigned. If the value specified here for
the auxiliary variable is the same as auxmultname, then the recharge array will be multiplied by this array.

Example Input File

BEGIN OPTIONS
AUXILIARY var1 var2 mymult
READASARRAYS
PRINT_INPUT
PRINT_FLOWS
SAVE_FLOWS
AUXMULTNAME mymult
END OPTIONS

BEGIN PERIOD 1

# For this model, the absence of an IRCH array causes


# recharge to apply to model layer 1. To make recharge
# apply to layer 2 instead, the following lines
# (uncommented) could be used:
# IRCH
# constant 2

# recharge rate
RECHARGE
(continues on next page)

94 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


constant 0.0040

# auxiliary variable (var1) array


var1
constant 100.

# auxiliary variable (var2) array


var2
constant 0.

# auxiliary variable (mymult) array


# Because ``AUXMULTNAME mymult'' was specified in the
# options block, the MYMULT array will be used to multiply
# the values in the RECHARGE array
MYMULT
INTERNAL FACTOR 1.0
0.5 1.0 1.0 0.5
1.0 1.0 1.0 1.0
0.5 1.0 1.0 0.5

END PERIOD

3.3.25 GWF-RIV
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[AUXILIARY <auxiliary>]
[AUXMULTNAME <auxmultname>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
[MOVER]
END OPTIONS

BEGIN DIMENSIONS
MAXBOUND <maxbound>
END DIMENSIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<cellid> <stage> <cond> <rbot> [<aux(naux)>] [<boundname>]
<cellid> <stage> <cond> <rbot> [<aux(naux)>] [<boundname>]
...
END PERIOD

3.3. Groundwater Flow 95


MODFLOW 6

Explanation of Variables
Block: OPTIONS

• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• auxmultname name of auxiliary variable to be used as multiplier of riverbed conductance.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of river cells.
• PRINT_INPUT keyword to indicate that the list of river information will be written to the listing file immediately
after it is read.
• PRINT_FLOWS keyword to indicate that the list of river flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that river flow terms will be written to the file specified with “BUDGET FILE-
OUT” in Output Control.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the River package. See the “Observation util-
ity” section for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and
ref{table:gwt-obstypetable} lists observation type(s) supported by the River package.
• MOVER keyword to indicate that this instance of the River Package can be used with the Water Mover (MVR)
Package. When the MOVER option is specified, additional memory is allocated within the package to store the
available, provided, and received water.

Block: DIMENSIONS

• maxbound integer value specifying the maximum number of rivers cells that will be specified for use during any
stress period.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.

96 Chapter 3. Input Guide


MODFLOW 6

• stage is the head in the river. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable
Input” section), values can be obtained from a time series by entering the time-series name in place of a numeric
value.
• cond is the riverbed hydraulic conductance. If the Options block includes a TIMESERIESFILE entry (see the
“Time-Variable Input” section), values can be obtained from a time series by entering the time-series name in
place of a numeric value.
• rbot is the elevation of the bottom of the riverbed. If the Options block includes a TIMESERIESFILE entry
(see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-series
name in place of a numeric value.
• aux represents the values of the auxiliary variables for each river. The values of auxiliary variables must be
present for each river. The values must be specified in the order of the auxiliary variables specified in the OP-
TIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry
(see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-series
name in place of a numeric value.
• boundname name of the river cell. BOUNDNAME is an ASCII character variable that can contain as many as 40
characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.

Example Input File

BEGIN OPTIONS
PRINT_INPUT
PRINT_FLOWS
SAVE_FLOWS
BOUNDNAMES
TS6 FILEIN river_stages.ts
END OPTIONS

begin dimensions
MAXBOUND 20
end dimensions

BEGIN PERIOD 1
# layer row col stage cond rbot BoundName
1 3 1 river_stage_1 1001. 35.9
1 4 2 river_stage_1 1002. 35.8
1 5 3 river_stage_1 1003. 35.7
1 5 4 river_stage_1 1004. 35.6
1 6 5 river_stage_1 1005. 35.5
1 6 6 river_stage_1 1006. 35.4 riv1_c6
1 6 7 river_stage_1 1007. 35.3 riv1_c7
1 5 8 river_stage_1 1008. 35.2
1 5 9 river_stage_1 1009. 35.1
1 5 10 river_stage_1 1010. 35.0
1 10 1 river_stage_2 1001. 36.9 riv2_upper
1 9 2 river_stage_2 1002. 36.8 riv2_upper
1 8 3 river_stage_2 1003. 36.7 riv2_upper
1 7 4 river_stage_2 1004. 36.6
1 7 5 river_stage_2 1005. 36.5
1 6 6 river_stage_2 1006. 36.4 riv2_c6
1 6 7 river_stage_2 1007. 36.3 riv2_c7
1 7 8 river_stage_2 1008. 36.2
(continues on next page)

3.3. Groundwater Flow 97


MODFLOW 6

(continued from previous page)


1 7 9 river_stage_2 1009. 36.1
1 7 10 river_stage_2 1010. 36.0
END PERIOD

Available Observation Types


Example Observation Input File

BEGIN OPTIONS
DIGITS 7
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.riv.csv


# obsname type ID
rv1-5-4 RIV 1 5 4
rv1-6-5 RIV 1 6 5
rv1-c7 RIV riv1_c7 # flow at boundary "riv1_c7"
rv2-7-4 RIV 1 7 4
rv2-8-5 RIV 1 7 5
rv2-9-6 RIV 1 6 6
END CONTINUOUS

BEGIN CONTINUOUS FILEOUT my_model.riv.flows.csv


# obsname type ID
rv1-3-1 RIV 1 3 1
rv1-4-2 RIV 1 4 2
rv1-5-3 RIV 1 5 3
rv1-c6 RIV riv1_c6
rv2-upper RIV riv2_upper
END CONTINUOUS

3.3.26 GWF-SFR
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[STORAGE]
[AUXILIARY <auxiliary>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_STAGE]
[PRINT_FLOWS]
[SAVE_FLOWS]
[STAGE FILEOUT <stagefile>]
[BUDGET FILEOUT <budgetfile>]
[BUDGETCSV FILEOUT <budgetcsvfile>]
[PACKAGE_CONVERGENCE FILEOUT <package_convergence_filename>]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
(continues on next page)

98 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


[MOVER]
[MAXIMUM_PICARD_ITERATIONS <maximum_picard_iterations>]
[MAXIMUM_ITERATIONS <maximum_iterations>]
[MAXIMUM_DEPTH_CHANGE <maximum_depth_change>]
[LENGTH_CONVERSION <length_conversion>]
[TIME_CONVERSION <time_conversion>]
END OPTIONS

BEGIN DIMENSIONS
NREACHES <nreaches>
END DIMENSIONS

BEGIN PACKAGEDATA
<ifno> <cellid> <rlen> <rwid> <rgrd> <rtp> <rbth> <rhk> <man> <ncon> <ustrf> <ndv>␣
˓→[<aux(naux)>] [<boundname>]

<ifno> <cellid> <rlen> <rwid> <rgrd> <rtp> <rbth> <rhk> <man> <ncon> <ustrf> <ndv>␣
˓→[<aux(naux)>] [<boundname>]

...
END PACKAGEDATA

BEGIN CROSSSECTIONS
<ifno> TAB6 FILEIN <tab6_filename>
<ifno> TAB6 FILEIN <tab6_filename>
...
END CROSSSECTIONS

BEGIN CONNECTIONDATA
<ifno> [<ic>]
<ifno> [<ic>]
...
END CONNECTIONDATA

BEGIN DIVERSIONS
<ifno> <idv> <iconr> <cprior>
<ifno> <idv> <iconr> <cprior>
...
END DIVERSIONS

BEGIN INITIALSTAGES
<ifno> <initialstage>
<ifno> <initialstage>
...
END INITIALSTAGES

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<ifno> <sfrsetting>
<ifno> <sfrsetting>
...
END PERIOD

3.3. Groundwater Flow 99


MODFLOW 6

Explanation of Variables
Block: OPTIONS

• STORAGE keyword that activates storage contributions to the stream-flow routing package continuity equation.
• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of stream reach cells.
• PRINT_INPUT keyword to indicate that the list of stream reach information will be written to the listing file
immediately after it is read.
• PRINT_STAGE keyword to indicate that the list of stream reach stages will be printed to the listing file for every
stress period in which “HEAD PRINT” is specified in Output Control. If there is no Output Control option and
PRINT_STAGE is specified, then stages are printed for the last time step of each stress period.
• PRINT_FLOWS keyword to indicate that the list of stream reach flow rates will be printed to the listing file for
every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output
Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress
period.
• SAVE_FLOWS keyword to indicate that stream reach flow terms will be written to the file specified with “BUDGET
FILEOUT” in Output Control.
• STAGE keyword to specify that record corresponds to stage.
• stagefile name of the binary output file to write stage information.
• BUDGET keyword to specify that record corresponds to the budget.
• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the binary output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.
• PACKAGE_CONVERGENCE keyword to specify that record corresponds to the package convergence comma spaced
values file.
• package_convergence_filename name of the comma spaced values output file to write package convergence
information.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the SFR package. See the “Observation utility” sec-
tion for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and ref{table:gwt-
obstypetable} lists observation type(s) supported by the SFR package.

100 Chapter 3. Input Guide


MODFLOW 6

• MOVER keyword to indicate that this instance of the SFR Package can be used with the Water Mover (MVR)
Package. When the MOVER option is specified, additional memory is allocated within the package to store the
available, provided, and received water.
• maximum_picard_iterations integer value that defines the maximum number of Streamflow Routing picard
iterations allowed when solving for reach stages and flows as part of the GWF formulate step. Picard itera-
tions are used to minimize differences in SFR package results between subsequent GWF picard (non-linear)
iterations as a result of non-optimal reach numbering. If reaches are numbered in order, from upstream to down-
stream, MAXIMUM_PICARD_ITERATIONS can be set to 1 to reduce model run time. By default, MAXI-
MUM_PICARD_ITERATIONS is equal to 100.
• maximum_iterations integer value that defines the maximum number of Streamflow Routing Newton-
Raphson iterations allowed for a reach. By default, MAXIMUM_ITERATIONS is equal to 100. MAXI-
MUM_ITERATIONS would only need to be increased from the default value if one or more reach in a simulation
has a large water budget error.
• maximum_depth_change real value that defines the depth closure tolerance. By default, MAXI-
MUM_DEPTH_CHANGE is equal to 1 x 10-5. The MAXIMUM_STAGE_CHANGE would only need to be
increased or decreased from the default value if the water budget error for one or more reach is too small or too
large, respectively.
• length_conversion real value that is used to convert user-specified Manning’s roughness coefficients
from meters to model length units. LENGTH_CONVERSION should be set to 3.28081, 1.0, and 100.0
when using length units (LENGTH_UNITS) of feet, meters, or centimeters in the simulation, respectively.
LENGTH_CONVERSION does not need to be specified if LENGTH_UNITS are meters.
• time_conversion real value that is used to convert user-specified Manning’s roughness coefficients from sec-
onds to model time units. TIME_CONVERSION should be set to 1.0, 60.0, 3,600.0, 86,400.0, and 31,557,600.0
when using time units (TIME_UNITS) of seconds, minutes, hours, days, or years in the simulation, respectively.
TIME_CONVERSION does not need to be specified if TIME_UNITS are seconds.

Block: DIMENSIONS

• nreaches integer value specifying the number of stream reaches. There must be NREACHES entries in the
PACKAGEDATA block.

Block: PACKAGEDATA

• ifno integer value that defines the feature (reach) number associated with the specified PACKAGEDATA data
on the line. IFNO must be greater than zero and less than or equal to NREACHES. Reach information must be
specified for every reach or the program will terminate with an error. The program will also terminate with an
error if information for a reach is specified more than once.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell. For reaches that are not connected to an underlying GWF cell, a zero
should be specified for each grid dimension. For example, for a DIS grid a CELLID of 0 0 0 should be specified.
Reach-aquifer flow is not calculated for unconnected reaches. The keyword NONE can be still be specified to
identify unconnected reaches for backward compatibility with previous versions of MODFLOW 6 but eventually
NONE will be deprecated and will cause MODFLOW 6 to terminate with an error.
• rlen real value that defines the reach length. RLEN must be greater than zero.
• rwid real value that defines the reach width. RWID must be greater than zero.
• rgrd real value that defines the stream gradient (slope) across the reach. RGRD must be greater than zero.
• rtp real value that defines the bottom elevation of the reach.

3.3. Groundwater Flow 101


MODFLOW 6

• rbth real value that defines the thickness of the reach streambed. RBTH can be any value if the reach is not
connected to an underlying GWF cell. Otherwise, RBTH must be greater than zero.
• rhk real or character value that defines the hydraulic conductivity of the reach streambed. RHK can be any
positive value if the reach is not connected to an underlying GWF cell. Otherwise, RHK must be greater than
zero. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values
can be obtained from a time series by entering the time-series name in place of a numeric value.
• man real or character value that defines the Manning’s roughness coefficient for the reach. MAN must be greater
than zero. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section),
values can be obtained from a time series by entering the time-series name in place of a numeric value.
• ncon integer value that defines the number of reaches connected to the reach. If a value of zero is specified for
NCON an entry for IFNO is still required in the subsequent CONNECTIONDATA block.
• ustrf real value that defines the fraction of upstream flow from each upstream reach that is applied as upstream
inflow to the reach. The sum of all USTRF values for all reaches connected to the same upstream reach must be
equal to one and USTRF must be greater than or equal to zero. If the Options block includes a TIMESERIESFILE
entry (see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-
series name in place of a numeric value.
• ndv integer value that defines the number of downstream diversions for the reach.
• aux represents the values of the auxiliary variables for each stream reach. The values of auxiliary variables must
be present for each stream reach. The values must be specified in the order of the auxiliary variables specified in
the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE
entry (see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-
series name in place of a numeric value.
• boundname name of the stream reach cell. BOUNDNAME is an ASCII character variable that can contain as
many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within
single quotes.

Block: CROSSSECTIONS

• ifno integer value that defines the feature (reach) number associated with the specified cross-section table file on
the line. IFNO must be greater than zero and less than or equal to NREACHES. The program will also terminate
with an error if table information for a reach is specified more than once.
• TAB6 keyword to specify that record corresponds to a cross-section table file.
• FILEIN keyword to specify that an input filename is expected next.
• tab6_filename character string that defines the path and filename for the file containing cross-section table
data for the reach. The TAB6_FILENAME file includes the number of entries in the file and the station elevation
data in terms of the fractional width and the reach depth. Instructions for creating the TAB6_FILENAME input
file are provided in SFR Reach Cross-Section Table Input File section.

Block: CONNECTIONDATA

• ifno integer value that defines the feature (reach) number associated with the specified CONNECTIONDATA
data on the line. IFNO must be greater than zero and less than or equal to NREACHES. Reach connection
information must be specified for every reach or the program will terminate with an error. The program will also
terminate with an error if connection information for a reach is specified more than once.
• ic integer value that defines the reach number of the reach connected to the current reach and whether it is
connected to the upstream or downstream end of the reach. Negative IC numbers indicate connected reaches
are connected to the downstream end of the current reach. Positive IC numbers indicate connected reaches are
connected to the upstream end of the current reach. The absolute value of IC must be greater than zero and less
than or equal to NREACHES. IC should not be specified when NCON is zero but must be specified otherwise.

102 Chapter 3. Input Guide


MODFLOW 6

Block: DIVERSIONS

• ifno integer value that defines the feature (reach) number associated with the specified DIVERSIONS data on
the line. IFNO must be greater than zero and less than or equal to NREACHES. Reach diversion information
must be specified for every reach with a NDV value greater than 0 or the program will terminate with an error.
The program will also terminate with an error if diversion information for a given reach diversion is specified
more than once.
• idv integer value that defines the downstream diversion number for the diversion for reach IFNO. IDV must be
greater than zero and less than or equal to NDV for reach IFNO.
• iconr integer value that defines the downstream reach that will receive the diverted water. IDV must be greater
than zero and less than or equal to NREACHES. Furthermore, reach ICONR must be a downstream connection
for reach IFNO.
• cprior character string value that defines the the prioritization system for the diversion, such as when insuf-
ficient water is available to meet all diversion stipulations, and is used in conjunction with the value of FLOW
value specified in the STRESS_PERIOD_DATA section. Available diversion options include: (1) CPRIOR =
“FRACTION”, then the amount of the diversion is computed as a fraction of the streamflow leaving reach IFNO
(Q_{DS}); in this case, 0.0 DIVFLOW 1.0. (2) CPRIOR = “EXCESS”, a diversion is made only if Q_{DS}
for reach IFNO exceeds the value of DIVFLOW. If this occurs, then the quantity of water diverted is the excess
flow (Q_{DS} - DIVFLOW) and Q_{DS} from reach IFNO is set equal to DIVFLOW. This represents a flood-
control type of diversion, as described by Danskin and Hanson (2002). (3) CPRIOR = “THRESHOLD”, then
if Q_{DS} in reach IFNO is less than the specified diversion flow DIVFLOW, no water is diverted from reach
IFNO. If Q_{DS} in reach IFNO is greater than or equal to DIVFLOW, DIVFLOW is diverted and Q_{DS} is
set to the remainder (Q_{DS} - DIVFLOW)). This approach assumes that once flow in the stream is sufficiently
low, diversions from the stream cease, and is the “priority” algorithm that originally was programmed into the
STR1 Package (Prudic, 1989). (4) CPRIOR = “UPTO” – if Q_{DS} in reach IFNO is greater than or equal to the
specified diversion flow DIVFLOW, Q_{DS} is reduced by DIVFLOW. If Q_{DS} in reach IFNO is less than
DIVFLOW, DIVFLOW is set to Q_{DS} and there will be no flow available for reaches connected to downstream
end of reach IFNO.

Block: INITIALSTAGES

• ifno integer value that defines the feature (reach) number associated with the specified initial stage. Initial
stage data must be specified for every reach or the program will terminate with an error. The program will also
terminate with a error if IFNO is less than one or greater than NREACHES.
• initialstage real value that defines the initial stage for the reach. The program will terminate with an error
if INITIALSTAGE is less than the RTP value for reach IFNO defined in the PACKAGEDATA block. INITIAL-
STAGE data are used only if STORAGE is specified in the Options block and the first stress period is transient
or for reaches defined to use the SIMPLE STATUS in the Period block.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• ifno integer value that defines the feature (reach) number associated with the specified PERIOD data on the
line. IFNO must be greater than zero and less than or equal to NREACHES.
• sfrsetting line of information that is parsed into a keyword and values. Keyword values that can be used to
start the SFRSETTING string include: STATUS, BEDK, MANNING, STAGE, INFLOW, RAINFALL, EVAP-
ORATION, RUNOFF, DIVERSION, UPSTREAM_FRACTION, and AUXILIARY.

3.3. Groundwater Flow 103


MODFLOW 6

STATUS <status>
BEDK <bedk>
MANNING <manning>
STAGE <stage>
INFLOW <inflow>
RAINFALL <rainfall>
EVAPORATION <evaporation>
RUNOFF <runoff>
DIVERSION <idv> <divflow>
UPSTREAM_FRACTION <upstream_fraction>
CROSS_SECTION TAB6 FILEIN <tab6_filename>
AUXILIARY <auxname> <auxval>

• status keyword option to define stream reach status. STATUS can be ACTIVE, INACTIVE, or SIMPLE. The
SIMPLE STATUS option simulates streamflow using a user-specified stage for a reach or a stage set to the top
of the reach (depth = 0). In cases where the simulated leakage calculated using the specified stage exceeds the
sum of inflows to the reach, the stage is set to the top of the reach and leakage is set equal to the sum of inflows.
Upstream fractions should be changed using the UPSTREAM_FRACTION SFRSETTING if the status for one
or more reaches is changed to ACTIVE or INACTIVE. For example, if one of two downstream connections for a
reach is inactivated, the upstream fraction for the active and inactive downstream reach should be changed to 1.0
and 0.0, respectively, to ensure that the active reach receives all of the downstream outflow from the upstream
reach. By default, STATUS is ACTIVE.
• bedk real or character value that defines the hydraulic conductivity of the reach streambed. BEDK can be any
positive value if the reach is not connected to an underlying GWF cell. Otherwise, BEDK must be greater than
zero. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values
can be obtained from a time series by entering the time-series name in place of a numeric value.
• manning real or character value that defines the Manning’s roughness coefficient for the reach. MANNING must
be greater than zero. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input”
section), values can be obtained from a time series by entering the time-series name in place of a numeric value.
• stage real or character value that defines the stage for the reach. The specified STAGE is only applied if the
reach uses the simple routing option. If STAGE is not specified for reaches that use the simple routing option,
the specified stage is set to the top of the reach. If the Options block includes a TIMESERIESFILE entry (see
the “Time-Variable Input” section), values can be obtained from a time series by entering the time-series name
in place of a numeric value.
• inflow real or character value that defines the volumetric inflow rate for the streamflow routing reach. If the
Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be ob-
tained from a time series by entering the time-series name in place of a numeric value. By default, inflow rates
are zero for each reach.
• rainfall real or character value that defines the volumetric rate per unit area of water added by precipitation
directly on the streamflow routing reach. If the Options block includes a TIMESERIESFILE entry (see the
“Time-Variable Input” section), values can be obtained from a time series by entering the time-series name in
place of a numeric value. By default, rainfall rates are zero for each reach.
• evaporation real or character value that defines the volumetric rate per unit area of water subtracted by evap-
oration from the streamflow routing reach. A positive evaporation rate should be provided. If the Options block
includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time
series by entering the time-series name in place of a numeric value. If the volumetric evaporation rate for a
reach exceeds the sources of water to the reach (upstream and specified inflows, rainfall, and runoff but exclud-
ing groundwater leakage into the reach) the volumetric evaporation rate is limited to the sources of water to the
reach. By default, evaporation rates are zero for each reach.
• runoff real or character value that defines the volumetric rate of diffuse overland runoff that enters the streamflow

104 Chapter 3. Input Guide


MODFLOW 6

routing reach. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section),
values can be obtained from a time series by entering the time-series name in place of a numeric value. If the
volumetric runoff rate for a reach is negative and exceeds inflows to the reach (upstream and specified inflows,
and rainfall but excluding groundwater leakage into the reach) the volumetric runoff rate is limited to inflows to
the reach and the volumetric evaporation rate for the reach is set to zero. By default, runoff rates are zero for
each reach.
• DIVERSION keyword to indicate diversion record.
• idv an integer value specifying which diversion of reach IFNO that DIVFLOW is being specified for. Must be
less or equal to ndv for the current reach (IFNO).
• divflow real or character value that defines the volumetric diversion (DIVFLOW) rate for the streamflow routing
reach. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values
can be obtained from a time series by entering the time-series name in place of a numeric value.
• upstream_fraction real value that defines the fraction of upstream flow (USTRF) from each upstream reach
that is applied as upstream inflow to the reach. The sum of all USTRF values for all reaches connected to the
same upstream reach must be equal to one.
• CROSS_SECTION keyword to specify that record corresponds to a reach cross-section.
• TAB6 keyword to specify that record corresponds to a cross-section table file.
• FILEIN keyword to specify that an input filename is expected next.
• tab6_filename character string that defines the path and filename for the file containing cross-section table
data for the reach. The TAB6_FILENAME file includes the number of entries in the file and the station elevation
data in terms of the fractional width and the reach depth. Instructions for creating the TAB6_FILENAME input
file are provided in SFR Reach Cross-Section Table Input File section.
• AUXILIARY keyword for specifying auxiliary variable.
• auxname name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary
variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable
names defined in the OPTIONS block the data are ignored.
• auxval value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.

Example Input File


Example 1

BEGIN OPTIONS
UNIT_CONVERSION 1.486
BOUNDNAMES
PRINT_STAGE
PRINT_FLOWS
STAGE FILEOUT sfr-1.stage.bin
BUDGET FILEOUT sfr-1.cbc
END OPTIONS

#dimension block is required


BEGIN DIMENSIONS
NREACHES 37
END DIMENSIONS

(continues on next page)

3.3. Groundwater Flow 105


MODFLOW 6

(continued from previous page)


BEGIN PACKAGEDATA
#ifno k i j rlen rwid rgrd rtp rbth rhk man ncon ustrf ndv ␣
˓→boundname

1 1 1 1 4500. 12 8.67E-04 1093.048 3.0 0.00003 0.03 1 1.0 0 ␣


˓→ reach1

2 1 2 2 7000. 12 8.67E-04 1088.059 3.0 0.00003 0.03 2 1.0 0 ␣


˓→ reach2

3 1 3 3 6000. 12 8.67E-04 1082.419 3.0 0.00003 0.03 2 1.0 0 ␣


˓→ reach3

4 1 3 4 5550. 12 8.67E-04 1077.408 3.0 0.00003 0.03 3 1.0 1 ␣


˓→ reach4

5 1 4 5 6500. 12 9.43E-04 1071.934 3.0 0.00003 0.03 2 1.0 0


6 1 5 6 5000. 12 9.43E-04 1066.509 3.0 0.00003 0.03 2 1.0 0
7 1 6 6 5000. 12 9.43E-04 1061.792 3.0 0.00003 0.03 2 1.0 0
8 1 7 6 5000. 12 9.43E-04 1057.075 3.0 0.00003 0.03 2 1.0 0
9 1 8 6 5000. 12 9.43E-04 1052.359 3.0 0.00003 0.03 2 1.0 0
10 1 3 5 5000. 10 5.45E-04 1073.636 2.0 0.00003 0.03 2 0.0 0 ␣
˓→ canal

11 1 3 6 5000. 10 5.45E-04 1070.909 2.0 0.00003 0.03 2 1.0 0 ␣


˓→ canal

12 1 3 7 4500. 10 5.45E-04 1068.318 2.0 0.00003 0.03 2 1.0 0 ␣


˓→ canal

13 1 4 8 6000. 10 5.45E-04 1065.455 2.0 0.00003 0.03 2 1.0 0 ␣


˓→ canal

14 1 5 8 5000. 10 5.45E-04 1062.455 2.0 0.00003 0.03 2 1.0 0 ␣


˓→ canal

15 1 6 8 2000. 10 5.45E-04 1060.545 2.0 0.00003 0.03 2 1.0 0 ␣


˓→ canal

16 1 5 10 2500. 10 1.81E-03 1077.727 3.0 0.00003 0.03 1 1.0 0


17 1 5 9 5000. 10 1.81E-03 1070.909 3.0 0.00003 0.03 2 1.0 0
18 1 6 8 3500. 10 1.81E-03 1063.182 3.0 0.00003 0.03 2 1.0 0
19 1 6 8 4000. 15 1.00E-03 1058.000 3.0 0.00003 0.03 3 1.0 0
20 1 7 7 5000. 15 1.00E-03 1053.500 3.0 0.00003 0.03 2 1.0 0
21 1 8 7 3500. 15 1.00E-03 1049.250 3.0 0.00003 0.03 2 1.0 0
22 1 8 6 2500. 15 1.00E-03 1046.250 3.0 0.00003 0.03 2 1.0 0
23 1 9 6 5000. 12 9.09E-04 1042.727 3.0 0.00003 0.03 3 1.0 0
24 1 10 7 5000. 12 9.09E-04 1038.182 3.0 0.00003 0.03 2 1.0 0
25 1 11 7 5000. 12 9.09E-04 1033.636 3.0 0.00003 0.03 2 1.0 0
26 1 12 7 5000. 12 9.09E-04 1029.091 3.0 0.00003 0.03 2 1.0 0
27 1 13 7 2000. 12 9.09E-04 1025.909 3.0 0.00003 0.03 2 1.0 0
28 1 14 9 5000. 55 9.67E-04 1037.581 3.0 0.00006 0.025 1 1.0 0
29 1 13 8 5500. 55 9.67E-04 1032.500 3.0 0.00006 0.025 2 1.0 0
30 1 13 7 5000. 55 9.67E-04 1027.419 3.0 0.00006 0.025 2 1.0 0
31 1 13 6 5000. 40 1.25E-03 1021.875 3.0 0.00006 0.025 3 1.0 0
32 1 13 5 5000. 40 1.25E-03 1015.625 3.0 0.00006 0.025 2 1.0 0
33 1 13 4 5000. 40 1.25E-03 1009.375 3.0 0.00006 0.025 2 1.0 0
34 1 13 3 5000. 40 1.25E-03 1003.125 3.0 0.00006 0.025 2 1.0 0
35 1 13 2 5000. 40 1.25E-03 996.8750 3.0 0.00006 0.025 2 1.0 0
36 1 13 1 3000. 40 1.25E-03 991.8750 3.0 0.00006 0.025 2 1.0 0
37 0 0 0 5000. 40 1.25E-03 985.6250 3.0 0.00006 0.025 1 1.0 0
END PACKAGEDATA

(continues on next page)

106 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


BEGIN CONNECTIONDATA
#ifno ic1 ic2 ic3
1 -2
2 1 -3
3 2 -4
4 3 -5 -10
5 4 -6
6 5 -7
7 6 -8
8 7 -9
9 8 -23
10 4 -11
11 10 -12
12 11 -13
13 12 -14
14 13 -15
15 14 -19
16 -17
17 16 -18
18 17 -19
19 15 18 -20
20 19 -21
21 20 -22
22 21 -23
23 9 22 -24
24 23 -25
25 24 -26
26 25 -27
27 26 -31
28 -29
29 28 -30
30 29 -31
31 27 30 -32
32 31 -33
33 32 -34
34 33 -35
35 34 -36
36 35 -37
37 36
END CONNECTIONDATA

BEGIN DIVERSIONS
# ifno idv iconr cprior
4 1 10 UPTO
END DIVERSIONS

BEGIN PERIOD 1
#ifno sfrsetting
1 inflow 25.
16 inflow 10.
28 inflow 150.
4 diversion 1 10.
(continues on next page)

3.3. Groundwater Flow 107


MODFLOW 6

(continued from previous page)


10 status simple
11 status simple
12 status simple
13 status simple
14 status simple
15 status simple
10 stage 1075.5454
11 stage 1072.6363
12 stage 1069.8727
13 stage 1066.8181
14 stage 1063.6181
15 stage 1061.5818
END PERIOD

Example 2

BEGIN OPTIONS
UNIT_CONVERSION 1.486
BOUNDNAMES
PRINT_STAGE
PRINT_FLOWS
STAGE FILEOUT sfr-1.stage.bin
BUDGET FILEOUT sfr-1.cbc
END OPTIONS

#dimension block is required


BEGIN DIMENSIONS
NREACHES 10
END DIMENSIONS

BEGIN PACKAGEDATA
#ifno k i j rlen rwid rgrd rtp rbth rhk man ncon ustrf ndv ␣
˓→boundname

1 1 1 1 1000. 10 8.67E-04 1093.048 3.0 0.00003 0.03 1 1.0 0 ␣


˓→trapezoidal

2 1 2 2 2000. 11 8.67E-04 1088.059 3.0 0.00003 0.03 2 1.0 0 ␣


˓→trapezoidal

3 1 3 3 3000. 12 8.67E-04 1082.419 3.0 0.00003 0.03 2 1.0 0 ␣


˓→trapezoidal

4 1 3 4 4000. 13 8.67E-04 1077.408 3.0 0.00003 0.03 2 1.0 0 ␣


˓→trapezoidal

5 1 4 5 5000. 14 9.43E-04 1071.934 3.0 0.00003 0.03 2 1.0 0 ␣


˓→rect

6 1 5 6 5000. 15 9.43E-04 1066.509 3.0 0.00003 0.03 2 1.0 0 ␣


˓→rect

7 1 6 6 5000. 16 9.43E-04 1061.792 3.0 0.00003 0.03 2 1.0 0 ␣


˓→rect

8 1 7 6 5000. 17 9.43E-04 1057.075 3.0 0.00003 0.03 2 1.0 0 ␣


˓→rect

9 1 8 6 5000. 18 9.43E-04 1052.359 3.0 0.00003 0.03 2 1.0 0 ␣


˓→rect

10 1 3 5 5000. 19 5.45E-04 1073.636 2.0 0.00003 0.03 1 0.0 0 ␣


(continues on next page)

108 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


˓→rect
END PACKAGEDATA

# CROSSSECTIONS BLOCK is optional


BEGIN CROSSSECTIONS
1 TAB6 FILEIN trapezoidal.tab
2 TAB6 FILEIN trapezoidal.tab
3 TAB6 FILEIN trapezoidal.tab
END CROSSSECTIONS

BEGIN CONNECTIONDATA
# ifno ic1 ic2 ic3
1 -2
2 1 -3
3 2 -4
4 3 -5
5 4 -6
6 5 -7
7 6 -8
8 7 -9
9 8 -10
10 9
END CONNECTIONDATA

BEGIN PERIOD 1
# ifno sfrsetting
1 inflow 25.
4 crosssection TAB6 FILEIN trapezoidal.tab
END PERIOD

Available Observation Types


Example Observation Input File

BEGIN OPTIONS
DIGITS 8
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.sfr.csv


# obsname obstype id
gage1stage STAGE reach4
gage2stage STAGE 7
gage2inflow INFLOW 7
gage2disch DOWNSTREAM-FLOW 7
gage3stage STAGE 14
END CONTINUOUS

BEGIN CONTINUOUS FILEOUT my_model.sfr.leakage.csv


# obsname obstype id
leak1 SFR reach1
leak10 SFR 10
(continues on next page)

3.3. Groundwater Flow 109


MODFLOW 6

(continued from previous page)


leak11 SFR 11
leak12 SFR 12
leak13 SFR 13
leak14 SFR 14
leak15 SFR 15
leakcanal SFR canal #Sum of flows between canal reaches and␣
˓→groundwater

END CONTINUOUS

3.3.27 GWF-STO
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[SAVE_FLOWS]
[STORAGECOEFFICIENT]
[SS_CONFINED_ONLY]
[TVS6 FILEIN <tvs6_filename>]
[EXPORT_ARRAY_ASCII]
[EXPORT_ARRAY_NETCDF]
END OPTIONS

BEGIN GRIDDATA
ICONVERT [LAYERED] [NETCDF]
<iconvert(nodes)> -- READARRAY
SS [LAYERED] [NETCDF]
<ss(nodes)> -- READARRAY
SY [LAYERED] [NETCDF]
<sy(nodes)> -- READARRAY
END GRIDDATA

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


[STEADY-STATE]
[TRANSIENT]
END PERIOD

Explanation of Variables
Block: OPTIONS

• SAVE_FLOWS keyword to indicate that cell-by-cell flow terms will be written to the file specified with “BUDGET
SAVE FILE” in Output Control.
• STORAGECOEFFICIENT keyword to indicate that the SS array is read as storage coefficient rather than specific
storage.
• SS_CONFINED_ONLY keyword to indicate that compressible storage is only calculated for a convertible cell
(ICONVERT>0) when the cell is under confined conditions (head greater than or equal to the top of the cell).
This option has no effect on cells that are marked as being always confined (ICONVERT=0). This option is
identical to the approach used to calculate storage changes under confined conditions in MODFLOW-2005.

110 Chapter 3. Input Guide


MODFLOW 6

• TVS6 keyword to specify that record corresponds to a time-varying storage (TVS) file. The behavior of TVS and
a description of the input file is provided separately.
• FILEIN keyword to specify that an input filename is expected next.
• tvs6_filename defines a time-varying storage (TVS) input file. Records in the TVS file can be used to change
specific storage and specific yield properties at specified times or stress periods.
• EXPORT_ARRAY_ASCII keyword that specifies input grid arrays, which already support the layered keyword,
should be written to layered ascii output files.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.

Block: GRIDDATA

• iconvert is a flag for each cell that specifies whether or not a cell is convertible for the storage calculation. 0
indicates confined storage is used. >0 indicates confined storage is used when head is above cell top and a mixed
formulation of unconfined and confined storage is used when head is below cell top.
• ss is specific storage (or the storage coefficient if STORAGECOEFFICIENT is specified as an option). Specific
storage values must be greater than or equal to 0. If the CSUB Package is included in the GWF model, specific
storage must be zero for every cell.
• sy is specific yield. Specific yield values must be greater than or equal to 0. Specific yield does not have to be
specified if there are no convertible cells (ICONVERT=0 in every cell).

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• STEADY-STATE keyword to indicate that stress period IPER is steady-state. Steady-state conditions will apply
until the TRANSIENT keyword is specified in a subsequent BEGIN PERIOD block. If the CSUB Package is
included in the GWF model, only the first and last stress period can be steady-state.
• TRANSIENT keyword to indicate that stress period IPER is transient. Transient conditions will apply until the
STEADY-STATE keyword is specified in a subsequent BEGIN PERIOD block.

Example Input File

BEGIN OPTIONS
SAVE_FLOWS
END OPTIONS

BEGIN GRIDDATA
#cell storage conversion 0:confined, 1:convertible
ICONVERT
constant 1
#specific storage (for all model cells)
SS
constant 1.e-5
#specific yield (specified by layer because of LAYERED keyword)
SY LAYERED
(continues on next page)

3.3. Groundwater Flow 111


MODFLOW 6

(continued from previous page)


constant 0.2
constant 0.15
constant 0.15
END GRIDDATA

BEGIN PERIOD 1
STEADY-STATE
END PERIOD

BEGIN PERIOD 2
TRANSIENT
END PERIOD

#stress period 3 will be transient because


#a BEGIN PERIOD block is not provided.

BEGIN PERIOD 4
STEADY-STATE
END PERIOD

3.3.28 GWF-UZF
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[AUXILIARY <auxiliary>]
[AUXMULTNAME <auxmultname>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[WATER_CONTENT FILEOUT <wcfile>]
[BUDGET FILEOUT <budgetfile>]
[BUDGETCSV FILEOUT <budgetcsvfile>]
[PACKAGE_CONVERGENCE FILEOUT <package_convergence_filename>]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
[MOVER]
[SIMULATE_ET]
[LINEAR_GWET]
[SQUARE_GWET]
[UNSAT_ETWC]
[UNSAT_ETAE]
END OPTIONS

BEGIN DIMENSIONS
NUZFCELLS <nuzfcells>
NTRAILWAVES <ntrailwaves>
NWAVESETS <nwavesets>
END DIMENSIONS

112 Chapter 3. Input Guide


MODFLOW 6

BEGIN PACKAGEDATA
<ifno> <cellid> <landflag> <ivertcon> <surfdep> <vks> <thtr> <thts> <thti> <eps> [
˓→<boundname>]

<ifno> <cellid> <landflag> <ivertcon> <surfdep> <vks> <thtr> <thts> <thti> <eps> [
˓→<boundname>]

...
END PACKAGEDATA

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<ifno> <finf> <pet> <extdp> <extwc> <ha> <hroot> <rootact> [<aux(naux)>]
<ifno> <finf> <pet> <extdp> <extwc> <ha> <hroot> <rootact> [<aux(naux)>]
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• auxmultname name of auxiliary variable to be used as multiplier of GWF cell area used by UZF cell.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of UZF cells.
• PRINT_INPUT keyword to indicate that the list of UZF information will be written to the listing file immediately
after it is read.
• PRINT_FLOWS keyword to indicate that the list of UZF flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that UZF flow terms will be written to the file specified with “BUDGET FILE-
OUT” in Output Control.
• WATER_CONTENT keyword to specify that record corresponds to unsaturated zone water contents.
• wcfile name of the binary output file to write water content information.
• BUDGET keyword to specify that record corresponds to the budget.
• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the binary output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.
• PACKAGE_CONVERGENCE keyword to specify that record corresponds to the package convergence comma spaced
values file.

3.3. Groundwater Flow 113


MODFLOW 6

• package_convergence_filename name of the comma spaced values output file to write package convergence
information.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the UZF package. See the “Observation utility” sec-
tion for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and ref{table:gwt-
obstypetable} lists observation type(s) supported by the UZF package.
• MOVER keyword to indicate that this instance of the UZF Package can be used with the Water Mover (MVR)
Package. When the MOVER option is specified, additional memory is allocated within the package to store the
available, provided, and received water.
• SIMULATE_ET keyword specifying that ET in the unsaturated (UZF) and saturated zones (GWF) will be simu-
lated. ET can be simulated in the UZF cell and not the GWF cell by omitting keywords LINEAR_GWET and
SQUARE_GWET.
• LINEAR_GWET keyword specifying that groundwater ET will be simulated using the original ET formulation of
MODFLOW-2005.
• SQUARE_GWET keyword specifying that groundwater ET will be simulated by assuming a constant ET rate for
groundwater levels between land surface (TOP) and land surface minus the ET extinction depth (TOP-EXTDP).
Groundwater ET is smoothly reduced from the PET rate to zero over a nominal interval at TOP-EXTDP.
• UNSAT_ETWC keyword specifying that ET in the unsaturated zone will be simulated as a function of the specified
PET rate while the water content (THETA) is greater than the ET extinction water content (EXTWC).
• UNSAT_ETAE keyword specifying that ET in the unsaturated zone will be simulated using a capillary pressure
based formulation. Capillary pressure is calculated using the Brooks-Corey retention function.

Block: DIMENSIONS

• nuzfcells is the number of UZF cells. More than one UZF cell can be assigned to a GWF cell; however, only
one GWF cell can be assigned to a single UZF cell. If more than one UZF cell is assigned to a GWF cell, then an
auxiliary variable should be used to reduce the surface area of the UZF cell with the AUXMULTNAME option.
• ntrailwaves is the number of trailing waves. A recommended value of 7 can be used for NTRAILWAVES.
This value can be increased to lower mass balance error in the unsaturated zone.
• nwavesets is the number of wave sets. A recommended value of 40 can be used for NWAVESETS. This value
can be increased if more waves are required to resolve variations in water content within the unsaturated zone.

Block: PACKAGEDATA

• ifno integer value that defines the feature (UZF object) number associated with the specified PACKAGEDATA
data on the line. IFNO must be greater than zero and less than or equal to NUZFCELLS. UZF information must
be specified for every UZF cell or the program will terminate with an error. The program will also terminate
with an error if information for a UZF cell is specified more than once.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.

114 Chapter 3. Input Guide


MODFLOW 6

• landflag integer value set to one for land surface cells indicating that boundary conditions can be applied and
data can be specified in the PERIOD block. A value of 0 specifies a non-land surface cell.
• ivertcon integer value set to specify underlying UZF cell that receives water flowing to bottom of cell. If
unsaturated zone flow reaches the water table before the cell bottom, then water is added to the GWF cell instead
of flowing to the underlying UZF cell. A value of 0 indicates the UZF cell is not connected to an underlying UZF
cell.
• surfdep is the surface depression depth of the UZF cell.
• vks is the saturated vertical hydraulic conductivity of the UZF cell. This value is used with the Brooks-Corey
function and the simulated water content to calculate the partially saturated hydraulic conductivity.
• thtr is the residual (irreducible) water content of the UZF cell. This residual water is not available to plants and
will not drain into underlying aquifer cells.
• thts is the saturated water content of the UZF cell. The values for saturated and residual water content should
be set in a manner that is consistent with the specific yield value specified in the Storage Package. The saturated
water content must be greater than the residual content.
• thti is the initial water content of the UZF cell. The value must be greater than or equal to the residual water
content and less than or equal to the saturated water content.
• eps is the exponent used in the Brooks-Corey function. The Brooks-Corey function is used by UZF to calculated
hydraulic conductivity under partially saturated conditions as a function of water content and the user-specified
saturated hydraulic conductivity.
• boundname name of the UZF cell cell. BOUNDNAME is an ASCII character variable that can contain as many
as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single
quotes.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• ifno integer value that defines the feature (UZF object) number associated with the specified PERIOD data on
the line.
• finf real or character value that defines the applied infiltration rate of the UZF cell (LT-1). If the Options block
includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time
series by entering the time-series name in place of a numeric value.
• pet real or character value that defines the potential evapotranspiration rate of the UZF cell and specified GWF
cell. Evapotranspiration is first removed from the unsaturated zone and any remaining potential evapotranspira-
tion is applied to the saturated zone. If IVERTCON is greater than zero then residual potential evapotranspiration
not satisfied in the UZF cell is applied to the underlying UZF and GWF cells. PET is always specified, but is
only used if SIMULATE_ET is specified in the OPTIONS block. If the Options block includes a TIMESERIES-
FILE entry (see the “Time-Variable Input” section), values can be obtained from a time series by entering the
time-series name in place of a numeric value.
• extdp real or character value that defines the evapotranspiration extinction depth of the UZF cell. If IVERTCON
is greater than zero and EXTDP extends below the GWF cell bottom then remaining potential evapotranspiration
is applied to the underlying UZF and GWF cells. EXTDP is always specified, but is only used if SIMULATE_ET
is specified in the OPTIONS block. If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.

3.3. Groundwater Flow 115


MODFLOW 6

• extwc real or character value that defines the evapotranspiration extinction water content of the UZF cell. EX-
TWC is always specified, but is only used if SIMULATE_ET and UNSAT_ETWC are specified in the OPTIONS
block. The evapotranspiration rate from the unsaturated zone will be set to zero when the calculated water con-
tent is at or less than this value. The value for EXTWC cannot be less than the residual water content, and if it is
specified as being less than the residual water content it is set to the residual water content. If the Options block
includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time
series by entering the time-series name in place of a numeric value.
• ha real or character value that defines the air entry potential (head) of the UZF cell. HA is always specified, but
is only used if SIMULATE_ET and UNSAT_ETAE are specified in the OPTIONS block. If the Options block
includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time
series by entering the time-series name in place of a numeric value.
• hroot real or character value that defines the root potential (head) of the UZF cell. HROOT is always specified,
but is only used if SIMULATE_ET and UNSAT_ETAE are specified in the OPTIONS block. If the Options
block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from
a time series by entering the time-series name in place of a numeric value.
• rootact real or character value that defines the root activity function of the UZF cell. ROOTACT is the length
of roots in a given volume of soil divided by that volume. Values range from 0 to about 3 cm-2, depending
on the plant community and its stage of development. ROOTACT is always specified, but is only used if SIM-
ULATE_ET and UNSAT_ETAE are specified in the OPTIONS block. If the Options block includes a TIME-
SERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time series by entering
the time-series name in place of a numeric value.
• aux represents the values of the auxiliary variables for each UZF. The values of auxiliary variables must be
present for each UZF. The values must be specified in the order of the auxiliary variables specified in the OP-
TIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry
(see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-series
name in place of a numeric value.

Example Input File

BEGIN OPTIONS
OBS6 UZF.obs
SIMULATE_ET
UNSAT_ETWC
LINEAR_GWET
END OPTIONS

BEGIN DIMENSIONS
NUZFCELLS 10
NTRAILWAVES 7
NWAVESETS 40
END DIMENSIONS

BEGIN PACKAGEDATA
1 1 1 1 1 1.0 1.0 0.05 0.35 0.1 4.0
2 1 1 2 1 1.0 1.0 0.05 0.35 0.1 4.0
3 1 1 3 1 1.0 1.0 0.05 0.35 0.1 4.0
4 1 1 4 1 1.0 1.0 0.05 0.35 0.1 4.0
5 1 1 5 1 1.0 1.0 0.05 0.35 0.1 4.0
6 1 1 6 1 1.0 1.0 0.05 0.35 0.1 4.0
7 1 1 7 1 1.0 1.0 0.05 0.35 0.1 4.0
8 1 1 8 1 1.0 1.0 0.05 0.35 0.1 4.0
(continues on next page)

116 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


9 1 1 9 1 1.0 1.0 0.05 0.35 0.1 4.0
10 1 1 10 1 1.0 1.0 0.05 0.35 0.1 4.0
END PACKAGEDATA

BEGIN PERIOD 1
2 0.00005 0.00002 2.0 0.10
3 0.00008 0.00002 2.0 0.10
4 0.00009 0.00002 2.0 0.10
5 0.0001 0.00002 2.0 0.10
6 0.0001 0.00002 2.0 0.10
7 0.00009 0.00002 2.0 0.10
8 0.00008 0.00002 2.0 0.10
9 0.00005 0.00002 2.0 0.10
END PERIOD

BEGIN PERIOD 2
2 0.00009 0.00003 2.0 0.10
3 0.0001 0.00003 2.0 0.10
4 0.0001 0.00003 2.0 0.10
5 0.00015 0.00003 2.0 0.10
6 0.00015 0.00003 2.0 0.10
7 0.0001 0.00003 2.0 0.10
8 0.0001 0.00003 2.0 0.10
9 0.00009 0.00003 2.0 0.10
END PERIOD

Available Observation Types


Example Observation Input File

BEGIN CONTINUOUS FILEOUT my_model.obs.uzf.csv


id26_infil infiltration 26
id126_infil infiltration 126
id26_dpth=20 water-content 26 20.0
id126_dpth=51 water-content 126 1.0 #depth is below celtop
id126_rch uzf-gwrch 126
END CONTINUOUS

BEGIN CONTINUOUS FILEOUT my_model.uzf.budget.uzf.csv


sinf infiltration uzfcells
frommvr from-mvr uzfcells
rejinf rej-inf uzfcells
rejinftomvr rej-inf-to-mvr uzfcells
uzet uzet uzfcells
storage storage uzfcells
net-inf net-infiltration uzfcells
END CONTINUOUS

BEGIN CONTINUOUS FILEOUT my_model.uzf.budget.gwf.csv


gwrch uzf-gwrch uzfcells
gwd uzf-gwd uzfcells
gwdtomvr uzf-gwd-to-mvr uzfcells
(continues on next page)

3.3. Groundwater Flow 117


MODFLOW 6

(continued from previous page)


gwet uzf-gwet uzfcells
END CONTINUOUS

3.3.29 GWF-VSC
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[VISCREF <viscref>]
[TEMPERATURE_SPECIES_NAME <temperature_species_name>]
[THERMAL_FORMULATION <thermal_formulation>]
[THERMAL_A2 <thermal_a2>]
[THERMAL_A3 <thermal_a3>]
[THERMAL_A4 <thermal_a4>]
[VISCOSITY FILEOUT <viscosityfile>]
END OPTIONS

BEGIN DIMENSIONS
NVISCSPECIES <nviscspecies>
END DIMENSIONS

BEGIN PACKAGEDATA
<iviscspec> <dviscdc> <cviscref> <modelname> <auxspeciesname>
<iviscspec> <dviscdc> <cviscref> <modelname> <auxspeciesname>
...
END PACKAGEDATA

Explanation of Variables
Block: OPTIONS

• viscref fluid reference viscosity used in the equation of state. This value is set to 1.0 if not specified as an
option.
• temperature_species_name string used to identify the auxspeciesname in PACKAGEDATA that corresponds
to the temperature species. There can be only one occurrence of this temperature species name in the PACK-
AGEDATA block or the program will terminate with an error. This value has no effect if viscosity does not
depend on temperature.
• thermal_formulation may be used for specifying which viscosity formulation to use for the temperature
species. Can be either LINEAR or NONLINEAR. The LINEAR viscosity formulation is the default.
• thermal_a2 is an empirical parameter specified by the user for calculating viscosity using a nonlinear formula-
tion. If A2 is not specified, a default value of 10.0 is assigned (Voss, 1984).
• thermal_a3 is an empirical parameter specified by the user for calculating viscosity using a nonlinear formula-
tion. If A3 is not specified, a default value of 248.37 is assigned (Voss, 1984).
• thermal_a4 is an empirical parameter specified by the user for calculating viscosity using a nonlinear formula-
tion. If A4 is not specified, a default value of 133.15 is assigned (Voss, 1984).

118 Chapter 3. Input Guide


MODFLOW 6

• VISCOSITY keyword to specify that record corresponds to viscosity.


• FILEOUT keyword to specify that an output filename is expected next.
• viscosityfile name of the binary output file to write viscosity information. The viscosity file has the same
format as the head file. Viscosity values will be written to the viscosity file whenever heads are written to the
binary head file. The settings for controlling head output are contained in the Output Control option.

Block: DIMENSIONS

• nviscspecies number of species used in the viscosity equation of state. If either concentrations or temperature
(or both) are used to update viscosity then then nviscspecies needs to be at least one.

Block: PACKAGEDATA

• iviscspec integer value that defines the species number associated with the specified PACKAGEDATA data
entered on each line. IVISCSPECIES must be greater than zero and less than or equal to NVISCSPECIES.
Information must be specified for each of the NVISCSPECIES species or the program will terminate with an
error. The program will also terminate with an error if information for a species is specified more than once.
• dviscdc real value that defines the slope of the line defining the linear relationship between viscosity and tem-
perature or between viscosity and concentration, depending on the type of species entered on each line. If the
value of AUXSPECIESNAME entered on a line corresponds to TEMPERATURE_SPECIES_NAME (in the
OPTIONS block), this value will be used when VISCOSITY_FUNC is equal to LINEAR (the default) in the
OPTIONS block. When VISCOSITY_FUNC is set to NONLINEAR, a value for DVISCDC must be specified
though it is not used.
• cviscref real value that defines the reference temperature or reference concentration value used for this species
in the viscosity equation of state. If AUXSPECIESNAME entered on a line corresponds to TEMPERA-
TURE_SPECIES_NAME (in the OPTIONS block), then CVISCREF refers to a reference temperature, otherwise
it refers to a reference concentration.
• modelname name of a GWT or GWE model used to simulate a species that will be used in the viscosity equation
of state. This name will have no effect if the simulation does not include a GWT or GWE model that corresponds
to this GWF model.
• auxspeciesname name of an auxiliary variable in a GWF stress package that will be used for this species to
calculate the viscosity values. If a viscosity value is needed by the Viscosity Package then it will use the tem-
perature or concentration values associated with this AUXSPECIESNAME in the viscosity equation of state.
For advanced stress packages (LAK, SFR, MAW, and UZF) that have an associated advanced transport package
(LKT, SFT, MWT, and UZT), the FLOW_PACKAGE_AUXILIARY_NAME option in the advanced transport
package can be used to transfer simulated temperature or concentration(s) into the flow package auxiliary vari-
able. In this manner, the Viscosity Package can calculate viscosity values for lakes, streams, multi-aquifer wells,
and unsaturated zone flow cells using simulated concentrations.

Example Input File

BEGIN OPTIONS
VISCREF 8.904E-04
THERMAL_FORMULATION NONLINEAR
THERMAL_A2 10.0
THERMAL_A3 248.37
THERMAL_A4 133.15
VISCOSITY FILEOUT GWF-VSC.vsc.bin
END OPTIONS

(continues on next page)

3.3. Groundwater Flow 119


MODFLOW 6

(continued from previous page)


BEGIN DIMENSIONS
NVISCSPECIES 2
END DIMENSIONS

BEGIN PACKAGEDATA
# ISPEC DVISCDC CVISCREF MODELNAME AUXSPECIESNAME
1 1.92e-6 0.0 GWT-SALT SALINITY
2 0.00 25.0 GWT-TEMP TEMPERATURE
END PACKAGEDATA

3.3.30 GWF-WEL
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[AUXILIARY <auxiliary>]
[AUXMULTNAME <auxmultname>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[AUTO_FLOW_REDUCE <auto_flow_reduce>]
[AUTO_FLOW_REDUCE_CSV FILEOUT <afrcsvfile>]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
[MOVER]
END OPTIONS

BEGIN DIMENSIONS
MAXBOUND <maxbound>
END DIMENSIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<cellid> <q> [<aux(naux)>] [<boundname>]
<cellid> <q> [<aux(naux)>] [<boundname>]
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.

120 Chapter 3. Input Guide


MODFLOW 6

• auxmultname name of auxiliary variable to be used as multiplier of well flow rate.


• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of well cells.
• PRINT_INPUT keyword to indicate that the list of well information will be written to the listing file immediately
after it is read.
• PRINT_FLOWS keyword to indicate that the list of well flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that well flow terms will be written to the file specified with “BUDGET FILE-
OUT” in Output Control.
• auto_flow_reduce keyword and real value that defines the fraction of the cell thickness used as an interval for
smoothly adjusting negative pumping rates to 0 in cells with head values less than or equal to the bottom of the
cell. Negative pumping rates are adjusted to 0 or a smaller negative value when the head in the cell is equal to
or less than the calculated interval above the cell bottom. AUTO_FLOW_REDUCE is set to 0.1 if the specified
value is less than or equal to zero. By default, negative pumping rates are not reduced during a simulation.
This AUTO_FLOW_REDUCE option only applies to wells in model cells that are marked as “convertible”
(ICELLTYPE /= 0) in the Node Property Flow (NPF) input file. Reduction in flow will not occur for wells in
cells marked as confined (ICELLTYPE = 0).
• AUTO_FLOW_REDUCE_CSV keyword to specify that record corresponds to the AUTO_FLOW_REDUCE output
option in which a new record is written for each well and for each time step in which the user-requested extraction
rate is reduced by the program.
• FILEOUT keyword to specify that an output filename is expected next.
• afrcsvfile name of the comma-separated value (CSV) output file to write information about well extraction
rates that have been reduced by the program. Entries are only written if the extraction rates are reduced.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the Well package. See the “Observation utility” sec-
tion for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and ref{table:gwt-
obstypetable} lists observation type(s) supported by the Well package.
• MOVER keyword to indicate that this instance of the Well Package can be used with the Water Mover (MVR)
Package. When the MOVER option is specified, additional memory is allocated within the package to store the
available, provided, and received water.

Block: DIMENSIONS

• maxbound integer value specifying the maximum number of wells cells that will be specified for use during any
stress period.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.

3.3. Groundwater Flow 121


MODFLOW 6

• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.
• q is the volumetric well rate. A positive value indicates recharge (injection) and a negative value indicates
discharge (extraction). If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input”
section), values can be obtained from a time series by entering the time-series name in place of a numeric value.
• aux represents the values of the auxiliary variables for each well. The values of auxiliary variables must be
present for each well. The values must be specified in the order of the auxiliary variables specified in the OP-
TIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry
(see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-series
name in place of a numeric value.
• boundname name of the well cell. BOUNDNAME is an ASCII character variable that can contain as many as 40
characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.

Example Input File

#The OPTIONS block is optional


BEGIN OPTIONS
AUXILIARY depth screen_length
BOUNDNAMES
PRINT_INPUT
PRINT_FLOWS
SAVE_FLOWS
END OPTIONS

#The DIMENSIONS block is required


BEGIN DIMENSIONS
MAXBOUND 5
END DIMENSIONS

#The following block of wells will be activated for stress periods


#2 and 3. No wells are present in stress period 1 due to an
#absence of a block for that period.
BEGIN PERIOD 2
#layer row col Q depth screen_length boundname

#wells 1 and 2
7 102 17 -19000 275.9 17.6 CW_1
9 192 44 -13000 280.0 24.0 CW_2

#wells 3 through 5
9 109 67 -24000 295.1 12.1 CW_3
10 43 17 -12000 301.3 9.6 CW_4
11 12 17 -17000 315.0 18.6 CW_5

END PERIOD

#Turn off all wells for stress period 4


BEGIN PERIOD 4
#An empty block indicates that there are no wells.
END PERIOD
(continues on next page)

122 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)

#For stress period 5, turn on wells 1 and 4,


#and add three wells that are grouped in a well field
BEGIN PERIOD 5
#layer row col Q depth screen_length boundname
7 102 17 -19000 275.9 17.6 CW_1
10 43 17 -12000 301.3 9.6 CW_4

#wells in well field


5 27 50 -11000 190.0 20.0 well_field
5 27 51 -10000 185.0 20.0 well_field
5 28 50 -12000 187.3 15.0 well_field
END PERIOD

#Use a list of wells in ASCII file wells_sp6.txt for stress period 6.


#Use these wells until the end of the simulation.
BEGIN PERIOD 6
OPEN/CLOSE wells_sp6.txt
END PERIOD

Available Observation Types


Example Observation Input File

BEGIN OPTIONS
DIGITS 7
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.wel.obs.csv


# obsname obstype ID
wel-7-102-17 WEL 7 102 17
wel-7-102-17 WEL CW_1
well-field WEL well_field
END CONTINUOUS

3.3.31 GWF-WELG
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
READARRAYGRID
[AUXILIARY <auxiliary>]
[AUXMULTNAME <auxmultname>]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[AUTO_FLOW_REDUCE <auto_flow_reduce>]
[AUTO_FLOW_REDUCE_CSV FILEOUT <afrcsvfile>]
[OBS6 FILEIN <obs6_filename>]
(continues on next page)

3.3. Groundwater Flow 123


MODFLOW 6

(continued from previous page)


[MOVER]
[EXPORT_ARRAY_NETCDF]
END OPTIONS

BEGIN DIMENSIONS
[MAXBOUND <maxbound>]
END DIMENSIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


Q [LAYERED] [NETCDF]
<q(nodes)> -- READARRAY
[AUX [LAYERED] [NETCDF]
<aux(nodes)> -- READARRAY]
END PERIOD

Explanation of Variables
Block: OPTIONS

• READARRAYGRID indicates that array-based grid input will be used for the well boundary package. This keyword
must be specified to use array-based grid input. When READARRAYGRID is specified, values must be provided
for every cell within a model grid, even those cells that have an IDOMAIN value less than one. Values assigned
to cells with IDOMAIN values less than one are not used and have no effect on simulation results. No data cells
should contain the value DNODATA (3.0E+30).
• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• auxmultname name of auxiliary variable to be used as multiplier of well flow rate.
• PRINT_INPUT keyword to indicate that the list of well information will be written to the listing file immediately
after it is read.
• PRINT_FLOWS keyword to indicate that the list of well flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that well flow terms will be written to the file specified with “BUDGET FILE-
OUT” in Output Control.
• auto_flow_reduce keyword and real value that defines the fraction of the cell thickness used as an interval for
smoothly adjusting negative pumping rates to 0 in cells with head values less than or equal to the bottom of the
cell. Negative pumping rates are adjusted to 0 or a smaller negative value when the head in the cell is equal to
or less than the calculated interval above the cell bottom. AUTO_FLOW_REDUCE is set to 0.1 if the specified
value is less than or equal to zero. By default, negative pumping rates are not reduced during a simulation.
This AUTO_FLOW_REDUCE option only applies to wells in model cells that are marked as “convertible”
(ICELLTYPE /= 0) in the Node Property Flow (NPF) input file. Reduction in flow will not occur for wells in
cells marked as confined (ICELLTYPE = 0).

124 Chapter 3. Input Guide


MODFLOW 6

• AUTO_FLOW_REDUCE_CSV keyword to specify that record corresponds to the AUTO_FLOW_REDUCE output


option in which a new record is written for each well and for each time step in which the user-requested extraction
rate is reduced by the program.
• FILEOUT keyword to specify that an output filename is expected next.
• afrcsvfile name of the comma-separated value (CSV) output file to write information about well extraction
rates that have been reduced by the program. Entries are only written if the extraction rates are reduced.
• FILEIN keyword to specify that an input filename is expected next.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the Well package. See the “Observation utility” sec-
tion for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and ref{table:gwt-
obstypetable} lists observation type(s) supported by the Well package.
• MOVER keyword to indicate that this instance of the Well Package can be used with the Water Mover (MVR)
Package. When the MOVER option is specified, additional memory is allocated within the package to store the
available, provided, and received water.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.

Block: DIMENSIONS

• maxbound integer value specifying the maximum number of wells cells that will be specified for use during any
stress period.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• q is the volumetric well rate. A positive value indicates recharge (injection) and a negative value indicates
discharge (extraction).
• aux is an array of values for auxiliary variable aux(iaux), where iaux is a value from 1 to naux, and aux(iaux)
must be listed as part of the auxiliary variables. A separate array can be specified for each auxiliary variable. If
an array is not specified for an auxiliary variable, then a value of zero is assigned. If the value specified here for
the auxiliary variable is the same as auxmultname, then the boundary head array will be multiplied by this array.

3.4 Groundwater Transport


3.4.1 GWT-ADV
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[SCHEME <scheme>]
[ATS_PERCEL <ats_percel>]
END OPTIONS

3.4. Groundwater Transport 125


MODFLOW 6

Explanation of Variables
Block: OPTIONS

• scheme scheme used to solve the advection term. Can be upstream, central, or TVD. If not specified, upstream
weighting is the default weighting scheme.
• ats_percel fractional cell distance submitted by the ADV Package to the adaptive time stepping (ATS) package.
If ATS_PERCEL is specified and the ATS Package is active, a time step calculation will be made for each cell
based on flow through the cell and cell properties. The largest time step will be calculated such that the advective
fractional cell distance (ATS_PERCEL) is not exceeded for any active cell in the grid. This time-step constraint
will be submitted to the ATS Package, perhaps with constraints submitted by other packages, in the calculation
of the time step. ATS_PERCEL must be greater than zero. If a value of zero is specified for ATS_PERCEL the
program will automatically reset it to an internal no data value to indicate that time steps should not be subject
to this constraint.

Example Input File

BEGIN OPTIONS
SCHEME UPSTREAM
END OPTIONS

3.4.2 GWT-API
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[OBS6 FILEIN <obs6_filename>]
[MOVER]
END OPTIONS

BEGIN DIMENSIONS
MAXBOUND <maxbound>
END DIMENSIONS

Explanation of Variables
Block: OPTIONS

• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of api boundary cells.
• PRINT_INPUT keyword to indicate that the list of api boundary information will be written to the listing file
immediately after it is read.
• PRINT_FLOWS keyword to indicate that the list of api boundary flow rates will be printed to the listing file for
every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output
Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress
period.
• SAVE_FLOWS keyword to indicate that api boundary flow terms will be written to the file specified with “BUDGET
FILEOUT” in Output Control.

126 Chapter 3. Input Guide


MODFLOW 6

• OBS6 keyword to specify that record corresponds to an observations file.


• FILEIN keyword to specify that an input filename is expected next.
• obs6_filename name of input file to define observations for the api boundary package. See the “Observation
utility” section for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and
ref{table:gwt-obstypetable} lists observation type(s) supported by the api boundary package.
• MOVER keyword to indicate that this instance of the api boundary Package can be used with the Water Mover
(MVR) Package. When the MOVER option is specified, additional memory is allocated within the package to
store the available, provided, and received water.

Block: DIMENSIONS

• maxbound integer value specifying the maximum number of api boundary cells that will be specified for use
during any stress period.

3.4.3 GWT-CNC
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[AUXILIARY <auxiliary>]
[AUXMULTNAME <auxmultname>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
END OPTIONS

BEGIN DIMENSIONS
MAXBOUND <maxbound>
END DIMENSIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<cellid> <conc> [<aux(naux)>] [<boundname>]
<cellid> <conc> [<aux(naux)>] [<boundname>]
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be

3.4. Groundwater Transport 127


MODFLOW 6

available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• auxmultname name of auxiliary variable to be used as multiplier of concentration value.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of constant concentration
cells.
• PRINT_INPUT keyword to indicate that the list of constant concentration information will be written to the listing
file immediately after it is read.
• PRINT_FLOWS keyword to indicate that the list of constant concentration flow rates will be printed to the listing
file for every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no
Output Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of
each stress period.
• SAVE_FLOWS keyword to indicate that constant concentration flow terms will be written to the file specified with
“BUDGET FILEOUT” in Output Control.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the Constant Concentration package. See
the “Observation utility” section for instructions for preparing observation input files. Tables ref{table:gwf-
obstypetable} and ref{table:gwt-obstypetable} lists observation type(s) supported by the Constant Concentration
package.

Block: DIMENSIONS

• maxbound integer value specifying the maximum number of constant concentrations cells that will be specified
for use during any stress period.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.
• conc is the constant concentration value. If the Options block includes a TIMESERIESFILE entry (see the
“Time-Variable Input” section), values can be obtained from a time series by entering the time-series name in
place of a numeric value.
• aux represents the values of the auxiliary variables for each constant concentration. The values of auxiliary
variables must be present for each constant concentration. The values must be specified in the order of the
auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block
includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time
series by entering the time-series name in place of a numeric value.

128 Chapter 3. Input Guide


MODFLOW 6

• boundname name of the constant concentration cell. BOUNDNAME is an ASCII character variable that can
contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed
within single quotes.

Example Input File

BEGIN OPTIONS
PRINT_FLOWS
PRINT_INPUT
SAVE_FLOWS
END OPTIONS

BEGIN DIMENSIONS
MAXBOUND 1
END DIMENSIONS

BEGIN PERIOD 1
1 1 1 1.0
END PERIOD

Available Observation Types


Example Observation Input File

BEGIN OPTIONS
DIGITS 8
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.cnc01.csv


# obsname obstype ID
cnc_2_1 CNC 1 1 2
cnc_2_2 CNC 1 2 2
cnc_2_3 CNC 1 3 2
cnc_2_4 CNC 1 4 2
END CONTINUOUS

BEGIN CONTINUOUS FILEOUT my_model.chd02.csv


# obsname obstype ID
cnc_3_flow CNC CNC_1_3
END CONTINUOUS

3.4.4 GWT-DIS
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[LENGTH_UNITS <length_units>]
[NOGRB]
[GRB6 FILEOUT <grb6_filename>]
[XORIGIN <xorigin>]
(continues on next page)

3.4. Groundwater Transport 129


MODFLOW 6

(continued from previous page)


[YORIGIN <yorigin>]
[ANGROT <angrot>]
[EXPORT_ARRAY_ASCII]
[EXPORT_ARRAY_NETCDF]
[CRS <crs>]
[NCF6 FILEIN <ncf6_filename>]
END OPTIONS

BEGIN DIMENSIONS
NLAY <nlay>
NROW <nrow>
NCOL <ncol>
END DIMENSIONS

BEGIN GRIDDATA
DELR [NETCDF]
<delr(ncol)> -- READARRAY
DELC [NETCDF]
<delc(nrow)> -- READARRAY
TOP [NETCDF]
<top(ncol, nrow)> -- READARRAY
BOTM [LAYERED] [NETCDF]
<botm(ncol, nrow, nlay)> -- READARRAY
[IDOMAIN [LAYERED] [NETCDF]
<idomain(ncol, nrow, nlay)> -- READARRAY]
END GRIDDATA

Explanation of Variables
Block: OPTIONS

• length_units is the length units used for this model. Values can be “FEET”, “METERS”, or “CENTIME-
TERS”. If not specified, the default is “UNKNOWN”.
• NOGRB keyword to deactivate writing of the binary grid file.
• GRB6 keyword to specify that record corresponds to a binary grid file.
• FILEOUT keyword to specify that an output filename is expected next.
• grb6_filename defines a binary grid output file. If this option is not provided, the output file will have the same
name as the discretization input file, plus extension “.grb”.
• xorigin x-position of the lower-left corner of the model grid. A default value of zero is assigned if not specified.
The value for XORIGIN does not affect the model simulation, but it is written to the binary grid file so that
postprocessors can locate the grid in space.
• yorigin y-position of the lower-left corner of the model grid. If not specified, then a default value equal to zero
is used. The value for YORIGIN does not affect the model simulation, but it is written to the binary grid file so
that postprocessors can locate the grid in space.
• angrot counter-clockwise rotation angle (in degrees) of the lower-left corner of the model grid. If not specified,
then a default value of 0.0 is assigned. The value for ANGROT does not affect the model simulation, but it is
written to the binary grid file so that postprocessors can locate the grid in space.

130 Chapter 3. Input Guide


MODFLOW 6

• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.
• crs is a real-world coordinate reference system (CRS) for the model, for example, an EPSG integer code (e.g.
26915), authority string (i.e. epsg:26915), or Open Geospatial Consortium Well-Known Text (WKT) specifica-
tion. Limited to 5000 characters. The entry for CRS does not affect the model simulation, but it is written to the
binary grid file so that postprocessors can locate the grid in space.
• NCF6 keyword to specify that record corresponds to a netcdf configuration (NCF) file.
• FILEIN keyword to specify that an input filename is expected next.
• ncf6_filename defines a netcdf configuration (NCF) input file.

Block: DIMENSIONS

• nlay is the number of layers in the model grid.


• nrow is the number of rows in the model grid.
• ncol is the number of columns in the model grid.

Block: GRIDDATA

• delr is the column spacing in the row direction.


• delc is the row spacing in the column direction.
• top is the top elevation for each cell in the top model layer.
• botm is the bottom elevation for each cell.
• idomain is an optional array that characterizes the existence status of a cell. If the IDOMAIN array is not
specified, then all model cells exist within the solution. If the IDOMAIN value for a cell is 0, the cell does not
exist in the simulation. Input and output values will be read and written for the cell, but internal to the program,
the cell is excluded from the solution. If the IDOMAIN value for a cell is 1, the cell exists in the simulation. If
the IDOMAIN value for a cell is -1, the cell does not exist in the simulation. Furthermore, the first existing cell
above will be connected to the first existing cell below. This type of cell is referred to as a “vertical pass through”
cell.

3.4.5 GWT-DISU
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[LENGTH_UNITS <length_units>]
[NOGRB]
[GRB6 FILEOUT <grb6_filename>]
[XORIGIN <xorigin>]
[YORIGIN <yorigin>]
[ANGROT <angrot>]
[VERTICAL_OFFSET_TOLERANCE <vertical_offset_tolerance>]
[EXPORT_ARRAY_ASCII]
[CRS <crs>]
END OPTIONS

3.4. Groundwater Transport 131


MODFLOW 6

BEGIN DIMENSIONS
NODES <nodes>
NJA <nja>
[NVERT <nvert>]
END DIMENSIONS

BEGIN GRIDDATA
TOP
<top(nodes)> -- READARRAY
BOT
<bot(nodes)> -- READARRAY
AREA
<area(nodes)> -- READARRAY
[IDOMAIN
<idomain(nodes)> -- READARRAY]
END GRIDDATA

BEGIN CONNECTIONDATA
IAC
<iac(nodes)> -- READARRAY
JA
<ja(nja)> -- READARRAY
IHC
<ihc(nja)> -- READARRAY
CL12
<cl12(nja)> -- READARRAY
HWVA
<hwva(nja)> -- READARRAY
[ANGLDEGX
<angldegx(nja)> -- READARRAY]
END CONNECTIONDATA

BEGIN VERTICES
[<iv> <xv> <yv>
<iv> <xv> <yv>
...]
END VERTICES

BEGIN CELL2D
[<icell2d> <xc> <yc> <ncvert> <icvert>
<icell2d> <xc> <yc> <ncvert> <icvert>
...]
END CELL2D

Explanation of Variables
Block: OPTIONS

• length_units is the length units used for this model. Values can be “FEET”, “METERS”, or “CENTIME-
TERS”. If not specified, the default is “UNKNOWN”.
• NOGRB keyword to deactivate writing of the binary grid file.

132 Chapter 3. Input Guide


MODFLOW 6

• GRB6 keyword to specify that record corresponds to a binary grid file.


• FILEOUT keyword to specify that an output filename is expected next.
• grb6_filename defines a binary grid output file. If this option is not provided, the output file will have the same
name as the discretization input file, plus extension “.grb”.
• xorigin x-position of the origin used for model grid vertices. This value should be provided in a real-world
coordinate system. A default value of zero is assigned if not specified. The value for XORIGIN does not affect
the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.
• yorigin y-position of the origin used for model grid vertices. This value should be provided in a real-world
coordinate system. If not specified, then a default value equal to zero is used. The value for YORIGIN does not
affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in
space.
• angrot counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world
coordinate system. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not
affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in
space.
• vertical_offset_tolerance checks are performed to ensure that the top of a cell is not higher than the
bottom of an overlying cell. This option can be used to specify the tolerance that is used for checking. If top
of a cell is above the bottom of an overlying cell by a value less than this tolerance, then the program will not
terminate with an error. The default value is zero. This option should generally not be used.
• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• crs is a real-world coordinate reference system (CRS) for the model, for example, an EPSG integer code (e.g.
26915), authority string (i.e. epsg:26915), or Open Geospatial Consortium Well-Known Text (WKT) specifica-
tion. Limited to 5000 characters. The entry for CRS does not affect the model simulation, but it is written to the
binary grid file so that postprocessors can locate the grid in space.

Block: DIMENSIONS

• nodes is the number of cells in the model grid.


• nja is the sum of the number of connections and NODES. When calculating the total number of connections,
the connection between cell n and cell m is considered to be different from the connection between cell m and
cell n. Thus, NJA is equal to the total number of connections, including n to m and m to n, and the total number
of cells.
• nvert is the total number of (x, y) vertex pairs used to define the plan-view shape of each cell in the model grid.
If NVERT is not specified or is specified as zero, then the VERTICES and CELL2D blocks below are not read.
NVERT and the accompanying VERTICES and CELL2D blocks should be specified for most simulations. If
the XT3D or SAVE_SPECIFIC_DISCHARGE options are specified in the NPF Package, then this information
is required.

Block: GRIDDATA

• top is the top elevation for each cell in the model grid.
• bot is the bottom elevation for each cell.
• area is the cell surface area (in plan view).
• idomain is an optional array that characterizes the existence status of a cell. If the IDOMAIN array is not
specified, then all model cells exist within the solution. If the IDOMAIN value for a cell is 0, the cell does not
exist in the simulation. Input and output values will be read and written for the cell, but internal to the program,

3.4. Groundwater Transport 133


MODFLOW 6

the cell is excluded from the solution. If the IDOMAIN value for a cell is 1 or greater, the cell exists in the
simulation. IDOMAIN values of -1 cannot be specified for the DISU Package.

Block: CONNECTIONDATA

• iac is the number of connections (plus 1) for each cell. The sum of all the entries in IAC must be equal to NJA.
• ja is a list of cell number (n) followed by its connecting cell numbers (m) for each of the m cells connected to
cell n. The number of values to provide for cell n is IAC(n). This list is sequentially provided for the first to the
last cell. The first value in the list must be cell n itself, and the remaining cells must be listed in an increasing
order (sorted from lowest number to highest). Note that the cell and its connections are only supplied for the
GWT cells and their connections to the other GWT cells. Also note that the JA list input may be divided such
that every node and its connectivity list can be on a separate line for ease in readability of the file. To further ease
readability of the file, the node number of the cell whose connectivity is subsequently listed, may be expressed
as a negative number, the sign of which is subsequently converted to positive by the code.
• ihc is an index array indicating the direction between node n and all of its m connections. If IHC = 0 then cell
n and cell m are connected in the vertical direction. Cell n overlies cell m if the cell number for n is less than
m; cell m overlies cell n if the cell number for m is less than n. If IHC = 1 then cell n and cell m are connected
in the horizontal direction. If IHC = 2 then cell n and cell m are connected in the horizontal direction, and
the connection is vertically staggered. A vertically staggered connection is one in which a cell is horizontally
connected to more than one cell in a horizontal connection.
• cl12 is the array containing connection lengths between the center of cell n and the shared face with each adjacent
m cell.
• hwva is a symmetric array of size NJA. For horizontal connections, entries in HWVA are the horizontal width
perpendicular to flow. For vertical connections, entries in HWVA are the vertical area for flow. Thus, values
in the HWVA array contain dimensions of both length and area. Entries in the HWVA array have a one-to-one
correspondence with the connections specified in the JA array. Likewise, there is a one-to-one correspondence
between entries in the HWVA array and entries in the IHC array, which specifies the connection type (horizontal
or vertical). Entries in the HWVA array must be symmetric; the program will terminate with an error if the value
for HWVA for an n to m connection does not equal the value for HWVA for the corresponding n to m connection.
• angldegx is the angle (in degrees) between the horizontal x-axis and the outward normal to the face between
a cell and its connecting cells. The angle varies between zero and 360.0 degrees, where zero degrees points in
the positive x-axis direction, and 90 degrees points in the positive y-axis direction. ANGLDEGX is only needed
if horizontal anisotropy is specified in the NPF Package, if the XT3D option is used in the NPF Package, or if
the SAVE_SPECIFIC_DISCHARGE option is specified in the NPF Package. ANGLDEGX does not need to be
specified if these conditions are not met. ANGLDEGX is of size NJA; values specified for vertical connections
and for the diagonal position are not used. Note that ANGLDEGX is read in degrees, which is different from
MODFLOW-USG, which reads a similar variable (ANGLEX) in radians.

Block: VERTICES

• iv is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.
• xv is the x-coordinate for the vertex.
• yv is the y-coordinate for the vertex.

Block: CELL2D

• icell2d is the cell2d number. Records in the CELL2D block must be listed in consecutive order from 1 to
NODES.
• xc is the x-coordinate for the cell center.

134 Chapter 3. Input Guide


MODFLOW 6

• yc is the y-coordinate for the cell center.


• ncvert is the number of vertices required to define the cell. There may be a different number of vertices for
each cell.
• icvert is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell.
Vertices must be listed in clockwise order.

3.4.6 GWT-DISV
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[LENGTH_UNITS <length_units>]
[NOGRB]
[GRB6 FILEOUT <grb6_filename>]
[XORIGIN <xorigin>]
[YORIGIN <yorigin>]
[ANGROT <angrot>]
[EXPORT_ARRAY_ASCII]
[EXPORT_ARRAY_NETCDF]
[CRS <crs>]
[NCF6 FILEIN <ncf6_filename>]
END OPTIONS

BEGIN DIMENSIONS
NLAY <nlay>
NCPL <ncpl>
NVERT <nvert>
END DIMENSIONS

BEGIN GRIDDATA
TOP [NETCDF]
<top(ncpl)> -- READARRAY
BOTM [LAYERED] [NETCDF]
<botm(ncpl, nlay)> -- READARRAY
[IDOMAIN [LAYERED] [NETCDF]
<idomain(ncpl, nlay)> -- READARRAY]
END GRIDDATA

BEGIN VERTICES
<iv> <xv> <yv>
<iv> <xv> <yv>
...
END VERTICES

BEGIN CELL2D
<icell2d> <xc> <yc> <ncvert> <icvert>
<icell2d> <xc> <yc> <ncvert> <icvert>
...
END CELL2D

3.4. Groundwater Transport 135


MODFLOW 6

Explanation of Variables
Block: OPTIONS

• length_units is the length units used for this model. Values can be “FEET”, “METERS”, or “CENTIME-
TERS”. If not specified, the default is “UNKNOWN”.
• NOGRB keyword to deactivate writing of the binary grid file.
• GRB6 keyword to specify that record corresponds to a binary grid file.
• FILEOUT keyword to specify that an output filename is expected next.
• grb6_filename defines a binary grid output file. If this option is not provided, the output file will have the same
name as the discretization input file, plus extension “.grb”.
• xorigin x-position of the origin used for model grid vertices. This value should be provided in a real-world
coordinate system. A default value of zero is assigned if not specified. The value for XORIGIN does not affect
the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.
• yorigin y-position of the origin used for model grid vertices. This value should be provided in a real-world
coordinate system. If not specified, then a default value equal to zero is used. The value for YORIGIN does not
affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in
space.
• angrot counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world
coordinate system. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not
affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in
space.
• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.
• crs is a real-world coordinate reference system (CRS) for the model, for example, an EPSG integer code (e.g.
26915), authority string (i.e. epsg:26915), or Open Geospatial Consortium Well-Known Text (WKT) specifica-
tion. Limited to 5000 characters. The entry for CRS does not affect the model simulation, but it is written to the
binary grid file so that postprocessors can locate the grid in space.
• NCF6 keyword to specify that record corresponds to a netcdf configuration (NCF) file.
• FILEIN keyword to specify that an input filename is expected next.
• ncf6_filename defines a netcdf configuration (NCF) input file.

Block: DIMENSIONS

• nlay is the number of layers in the model grid.


• ncpl is the number of cells per layer. This is a constant value for the grid and it applies to all layers.
• nvert is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model
grid.

Block: GRIDDATA

• top is the top elevation for each cell in the top model layer.
• botm is the bottom elevation for each cell.

136 Chapter 3. Input Guide


MODFLOW 6

• idomain is an optional array that characterizes the existence status of a cell. If the IDOMAIN array is not
specified, then all model cells exist within the solution. If the IDOMAIN value for a cell is 0, the cell does not
exist in the simulation. Input and output values will be read and written for the cell, but internal to the program,
the cell is excluded from the solution. If the IDOMAIN value for a cell is 1, the cell exists in the simulation. If
the IDOMAIN value for a cell is -1, the cell does not exist in the simulation. Furthermore, the first existing cell
above will be connected to the first existing cell below. This type of cell is referred to as a “vertical pass through”
cell.

Block: VERTICES

• iv is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.
• xv is the x-coordinate for the vertex.
• yv is the y-coordinate for the vertex.

Block: CELL2D

• icell2d is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the
first to the last.
• xc is the x-coordinate for the cell center.
• yc is the y-coordinate for the cell center.
• ncvert is the number of vertices required to define the cell. There may be a different number of vertices for
each cell.
• icvert is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell.
Vertices must be listed in clockwise order. Cells that are connected must share vertices.

3.4.7 GWT-DSP
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[XT3D_OFF]
[XT3D_RHS]
[EXPORT_ARRAY_ASCII]
[EXPORT_ARRAY_NETCDF]
END OPTIONS

BEGIN GRIDDATA
[DIFFC [LAYERED] [NETCDF]
<diffc(nodes)> -- READARRAY]
[ALH [LAYERED] [NETCDF]
<alh(nodes)> -- READARRAY]
[ALV [LAYERED] [NETCDF]
<alv(nodes)> -- READARRAY]
[ATH1 [LAYERED] [NETCDF]
<ath1(nodes)> -- READARRAY]
[ATH2 [LAYERED] [NETCDF]
<ath2(nodes)> -- READARRAY]
[ATV [LAYERED] [NETCDF]
(continues on next page)

3.4. Groundwater Transport 137


MODFLOW 6

(continued from previous page)


<atv(nodes)> -- READARRAY]
END GRIDDATA

Explanation of Variables
Block: OPTIONS

• XT3D_OFF deactivate the xt3d method and use the faster and less accurate approximation. This option may
provide a fast and accurate solution under some circumstances, such as when flow aligns with the model grid,
there is no mechanical dispersion, or when the longitudinal and transverse dispersivities are equal. This option
may also be used to assess the computational demand of the XT3D approach by noting the run time differences
with and without this option on.
• XT3D_RHS add xt3d terms to right-hand side, when possible. This option uses less memory, but may require
more iterations.
• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.

Block: GRIDDATA

• diffc effective molecular diffusion coefficient.


• alh longitudinal dispersivity in horizontal direction. If flow is strictly horizontal, then this is the longitudinal
dispersivity that will be used. If flow is not strictly horizontal or strictly vertical, then the longitudinal dispersivity
is a function of both ALH and ALV. If mechanical dispersion is represented (by specifying any dispersivity
values) then this array is required.
• alv longitudinal dispersivity in vertical direction. If flow is strictly vertical, then this is the longitudinal dispser-
sivity value that will be used. If flow is not strictly horizontal or strictly vertical, then the longitudinal dispersivity
is a function of both ALH and ALV. If this value is not specified and mechanical dispersion is represented, then
this array is set equal to ALH.
• ath1 transverse dispersivity in horizontal direction. This is the transverse dispersivity value for the second
ellipsoid axis. If flow is strictly horizontal and directed in the x direction (along a row for a regular grid),
then this value controls spreading in the y direction. If mechanical dispersion is represented (by specifying any
dispersivity values) then this array is required.
• ath2 transverse dispersivity in horizontal direction. This is the transverse dispersivity value for the third ellipsoid
axis. If flow is strictly horizontal and directed in the x direction (along a row for a regular grid), then this value
controls spreading in the z direction. If this value is not specified and mechanical dispersion is represented, then
this array is set equal to ATH1.
• atv transverse dispersivity when flow is in vertical direction. If flow is strictly vertical and directed in the z
direction, then this value controls spreading in the x and y directions. If this value is not specified and mechanical
dispersion is represented, then this array is set equal to ATH2.

Example Input File

BEGIN OPTIONS
END OPTIONS

BEGIN GRIDDATA
(continues on next page)

138 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


DIFFC
CONSTANT 1.e-9
ALH
CONSTANT 1.
ALV
CONSTANT 1.
ATH1
CONSTANT 0.1
ATH2
CONSTANT 0.1
ATV
CONSTANT 0.1
END GRIDDATA

3.4.8 GWT-FMI
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[SAVE_FLOWS]
[FLOW_IMBALANCE_CORRECTION]
END OPTIONS

BEGIN PACKAGEDATA
<flowtype> FILEIN <fname>
<flowtype> FILEIN <fname>
...
END PACKAGEDATA

Explanation of Variables
Block: OPTIONS

• SAVE_FLOWS keyword to indicate that FMI flow terms will be written to the file specified with “BUDGET FILE-
OUT” in Output Control.
• FLOW_IMBALANCE_CORRECTION correct for an imbalance in flows by assuming that any residual flow error comes
in or leaves at the concentration of the cell. When this option is activated, the GWT Model budget written to the
listing file will contain two additional entries: FLOW-ERROR and FLOW-CORRECTION. These two entries
will be equal but opposite in sign. The FLOW-CORRECTION term is a mass flow that is added to offset the
error caused by an imprecise flow balance. If these terms are not relatively small, the flow model should be rerun
with stricter convergence tolerances.

Block: PACKAGEDATA

• flowtype is the word GWFBUDGET, GWFHEAD, GWFMOVER or the name of an advanced GWF stress
package. If GWFBUDGET is specified, then the corresponding file must be a budget file. If GWFHEAD is
specified, the file must be a head file. If GWFGRID is specified, the file must be a binary grid file. If an
advanced GWF stress package name appears then the corresponding file must be the budget file saved by a LAK,
SFR, MAW or UZF Package.
• FILEIN keyword to specify that an input filename is expected next.

3.4. Groundwater Transport 139


MODFLOW 6

• fname is the name of the file containing flows. The path to the file should be included if the file is not located in
the folder where the program was run.

Example Input File

BEGIN OPTIONS
FLOW_IMBALANCE_CORRECTION
END OPTIONS

BEGIN PACKAGEDATA
GWFBUDGET FILEIN ../flow/mygwfmodel.bud
GWFHEAD FILEIN ../flow/mygwfmodel.hds
GWFMOVER FILEIN ../flow/mygwfmodel.mvr.bud
LAK-1 FILEIN ../flow/mygwfmodel.lak.bud
SFR-1 FILEIN ../flow/mygwfmodel.sfr.bud
MAW-1 FILEIN ../flow/mygwfmodel.maw.bud
UZF-1 FILEIN ../flow/mygwfmodel.uzf.bud
LAK-2 FILEIN ../flow/mygwfmodel-2.lak.bud
END PACKAGEDATA

3.4.9 GWT-IC
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[EXPORT_ARRAY_ASCII]
[EXPORT_ARRAY_NETCDF]
END OPTIONS

BEGIN GRIDDATA
STRT [LAYERED] [NETCDF]
<strt(nodes)> -- READARRAY
END GRIDDATA

Explanation of Variables
Block: OPTIONS

• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.

Block: GRIDDATA

• strt is the initial (starting) concentration—that is, concentration at the beginning of the GWT Model simulation.
STRT must be specified for all GWT Model simulations. One value is read for every model cell.

140 Chapter 3. Input Guide


MODFLOW 6

Example Input File

#The OPTIONS block is optional


BEGIN OPTIONS
END OPTIONS

#The GRIDDATA block is required


BEGIN GRIDDATA
STRT LAYERED
CONSTANT 0.0 Initial Concentration layer 1
CONSTANT 0.0 Initial Concentration layer 2
END GRIDDATA

3.4.10 GWT-IST
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[SAVE_FLOWS]
[BUDGET FILEOUT <budgetfile>]
[BUDGETCSV FILEOUT <budgetcsvfile>]
[SORPTION <sorption>]
[FIRST_ORDER_DECAY]
[ZERO_ORDER_DECAY]
[CIM FILEOUT <cimfile>]
[CIM PRINT_FORMAT COLUMNS <columns> WIDTH <width> DIGITS <digits> <format>]
[SORBATE FILEOUT <sorbatefile>]
[EXPORT_ARRAY_ASCII]
[EXPORT_ARRAY_NETCDF]
END OPTIONS

BEGIN GRIDDATA
POROSITY [LAYERED] [NETCDF]
<porosity(nodes)> -- READARRAY
VOLFRAC [LAYERED] [NETCDF]
<volfrac(nodes)> -- READARRAY
ZETAIM [LAYERED] [NETCDF]
<zetaim(nodes)> -- READARRAY
[CIM [LAYERED] [NETCDF]
<cim(nodes)> -- READARRAY]
[DECAY [LAYERED] [NETCDF]
<decay(nodes)> -- READARRAY]
[DECAY_SORBED [LAYERED] [NETCDF]
<decay_sorbed(nodes)> -- READARRAY]
[BULK_DENSITY [LAYERED] [NETCDF]
<bulk_density(nodes)> -- READARRAY]
[DISTCOEF [LAYERED] [NETCDF]
<distcoef(nodes)> -- READARRAY]
[SP2 [LAYERED] [NETCDF]
<sp2(nodes)> -- READARRAY]
END GRIDDATA

3.4. Groundwater Transport 141


MODFLOW 6

Explanation of Variables
Block: OPTIONS

• SAVE_FLOWS keyword to indicate that IST flow terms will be written to the file specified with “BUDGET FILE-
OUT” in Output Control.
• BUDGET keyword to specify that record corresponds to the budget.
• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the binary output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.
• sorption is a text keyword to indicate that sorption will be activated. Valid sorption options include LINEAR,
FREUNDLICH, and LANGMUIR. Use of this keyword requires that BULK_DENSITY and DISTCOEF are
specified in the GRIDDATA block. If sorption is specified as FREUNDLICH or LANGMUIR then SP2 is also
required in the GRIDDATA block. The sorption option must be consistent with the sorption option specified in
the MST Package or the program will terminate with an error.
• FIRST_ORDER_DECAY is a text keyword to indicate that first-order decay will occur. Use of this keyword requires
that DECAY and DECAY_SORBED (if sorption is active) are specified in the GRIDDATA block.
• ZERO_ORDER_DECAY is a text keyword to indicate that zero-order decay will occur. Use of this keyword requires
that DECAY and DECAY_SORBED (if sorption is active) are specified in the GRIDDATA block.
• CIM keyword to specify that record corresponds to immobile concentration.
• cimfile name of the output file to write immobile concentrations. This file is a binary file that has the same for-
mat and structure as a binary head and concentration file. The value for the text variable written to the file is CIM.
Immobile domain concentrations will be written to this file at the same interval as mobile domain concentrations
are saved, as specified in the GWT Model Output Control file.
• PRINT_FORMAT keyword to specify format for printing to the listing file.
• columns number of columns for writing data.
• width width for writing each number.
• digits number of digits to use for writing a number.
• format write format can be EXPONENTIAL, FIXED, GENERAL, or SCIENTIFIC.
• SORBATE keyword to specify that record corresponds to immobile sorbate concentration.
• sorbatefile name of the output file to write immobile sorbate concentration information. Immobile sorbate
concentrations will be written whenever aqueous immobile concentrations are saved, as determined by settings
in the Output Control option.
• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.

142 Chapter 3. Input Guide


MODFLOW 6

Block: GRIDDATA

• porosity porosity of the immobile domain specified as the immobile domain pore volume per immobile domain
volume.
• volfrac fraction of the cell volume that consists of this immobile domain. The sum of all immobile domain
volume fractions must be less than one.
• zetaim mass transfer rate coefficient between the mobile and immobile domains, in dimensions of per time.
• cim initial concentration of the immobile domain in mass per length cubed. If CIM is not specified, then it is
assumed to be zero.
• decay is the rate coefficient for first or zero-order decay for the aqueous phase of the immobile domain. A
negative value indicates solute production. The dimensions of decay for first-order decay is one over time. The
dimensions of decay for zero-order decay is mass per length cubed per time. Decay will have no effect on
simulation results unless either first- or zero-order decay is specified in the options block.
• decay_sorbed is the rate coefficient for first or zero-order decay for the sorbed phase of the immobile domain.
A negative value indicates solute production. The dimensions of decay_sorbed for first-order decay is one over
time. The dimensions of decay_sorbed for zero-order decay is mass of solute per mass of aquifer per time. If
decay_sorbed is not specified and both decay and sorption are active, then the program will terminate with an
error. decay_sorbed will have no effect on simulation results unless the SORPTION keyword and either first- or
zero-order decay are specified in the options block.
• bulk_density is the bulk density of this immobile domain in mass per length cubed. Bulk density is defined
as the immobile domain solid mass per volume of the immobile domain. bulk_density is not required unless the
SORPTION keyword is specified in the options block. If the SORPTION keyword is not specified in the options
block, bulk_density will have no effect on simulation results.
• distcoef is the distribution coefficient for the equilibrium-controlled linear sorption isotherm in dimensions of
length cubed per mass. distcoef is not required unless the SORPTION keyword is specified in the options block.
If the SORPTION keyword is not specified in the options block, distcoef will have no effect on simulation results.
• sp2 is the exponent for the Freundlich isotherm and the sorption capacity for the Langmuir isotherm. sp2 is
not required unless the SORPTION keyword is specified in the options block and sorption is specified as FRE-
UNDLICH or LANGMUIR. If the SORPTION keyword is not specified in the options block, or if sorption is
specified as LINEAR, sp2 will have no effect on simulation results.

Example Input File

BEGIN OPTIONS
SORPTION
FIRST_ORDER_DECAY
CIM FILEOUT gwtmodel.imd1.ucn
END OPTIONS

BEGIN GRIDDATA
ZETAIM
CONSTANT 0.01
THETAIM
CONSTANT 0.025
BULK_DENSITY
CONSTANT 0.25000000
DISTCOEF
CONSTANT 0.01000000
DECAY
(continues on next page)

3.4. Groundwater Transport 143


MODFLOW 6

(continued from previous page)


CONSTANT 0.01000000
DECAY_SORBED
CONSTANT 0.01000000
END GRIDDATA

3.4.11 GWT-LKT
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[FLOW_PACKAGE_NAME <flow_package_name>]
[AUXILIARY <auxiliary>]
[FLOW_PACKAGE_AUXILIARY_NAME <flow_package_auxiliary_name>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_CONCENTRATION]
[PRINT_FLOWS]
[SAVE_FLOWS]
[CONCENTRATION FILEOUT <concfile>]
[BUDGET FILEOUT <budgetfile>]
[BUDGETCSV FILEOUT <budgetcsvfile>]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
END OPTIONS

BEGIN PACKAGEDATA
<ifno> <strt> [<aux(naux)>] [<boundname>]
<ifno> <strt> [<aux(naux)>] [<boundname>]
...
END PACKAGEDATA

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<ifno> <laksetting>
<ifno> <laksetting>
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• flow_package_name keyword to specify the name of the corresponding flow package. If not specified, then the
corresponding flow package must have the same name as this advanced transport package (the name associated
with this package in the GWT name file).
• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be

144 Chapter 3. Input Guide


MODFLOW 6

interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• flow_package_auxiliary_name keyword to specify the name of an auxiliary variable in the corresponding
flow package. If specified, then the simulated concentrations from this advanced transport package will be copied
into the auxiliary variable specified with this name. Note that the flow package must have an auxiliary variable
with this name or the program will terminate with an error. If the flows for this advanced transport package are
read from a file, then this option will have no effect.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of lake cells.
• PRINT_INPUT keyword to indicate that the list of lake information will be written to the listing file immediately
after it is read.
• PRINT_CONCENTRATION keyword to indicate that the list of lake concentration will be printed to the listing file
for every stress period in which “CONCENTRATION PRINT” is specified in Output Control. If there is no
Output Control option and PRINT_CONCENTRATION is specified, then concentration are printed for the last
time step of each stress period.
• PRINT_FLOWS keyword to indicate that the list of lake flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that lake flow terms will be written to the file specified with “BUDGET FILE-
OUT” in Output Control.
• CONCENTRATION keyword to specify that record corresponds to concentration.
• concfile name of the binary output file to write concentration information.
• BUDGET keyword to specify that record corresponds to the budget.
• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the binary output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the LKT package. See the “Observation utility” sec-
tion for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and ref{table:gwt-
obstypetable} lists observation type(s) supported by the LKT package.

Block: PACKAGEDATA

• ifno integer value that defines the feature (lake) number associated with the specified PACKAGEDATA data on
the line. IFNO must be greater than zero and less than or equal to NLAKES. Lake information must be specified
for every lake or the program will terminate with an error. The program will also terminate with an error if
information for a lake is specified more than once.
• strt real value that defines the starting concentration for the lake.

3.4. Groundwater Transport 145


MODFLOW 6

• aux represents the values of the auxiliary variables for each lake. The values of auxiliary variables must be present
for each lake. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block.
If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.
• boundname name of the lake cell. BOUNDNAME is an ASCII character variable that can contain as many as 40
characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• ifno integer value that defines the feature (lake) number associated with the specified PERIOD data on the line.
IFNO must be greater than zero and less than or equal to NLAKES.
• laksetting line of information that is parsed into a keyword and values. Keyword values that can be used to start
the LAKSETTING string include: STATUS, CONCENTRATION, RAINFALL, EVAPORATION, RUNOFF,
EXT-INFLOW, and AUXILIARY. These settings are used to assign the concentration of associated with the
corresponding flow terms. Concentrations cannot be specified for all flow terms. For example, the Lake Package
supports a “WITHDRAWAL” flow term. If this withdrawal term is active, then water will be withdrawn from
the lake at the calculated concentration of the lake.

STATUS <status>
CONCENTRATION <concentration>
RAINFALL <rainfall>
EVAPORATION <evaporation>
RUNOFF <runoff>
EXT-INFLOW <ext-inflow>
AUXILIARY <auxname> <auxval>

• status keyword option to define lake status. STATUS can be ACTIVE, INACTIVE, or CONSTANT. By default,
STATUS is ACTIVE, which means that concentration will be calculated for the lake. If a lake is inactive, then
there will be no solute mass fluxes into or out of the lake and the inactive value will be written for the lake
concentration. If a lake is constant, then the concentration for the lake will be fixed at the user specified value.
• concentration real or character value that defines the concentration for the lake. The specified CONCENTRA-
TION is only applied if the lake is a constant concentration lake. If the Options block includes a TIMESERIES-
FILE entry (see the “Time-Variable Input” section), values can be obtained from a time series by entering the
time-series name in place of a numeric value.
• rainfall real or character value that defines the rainfall solute concentration (ML-3) for the lake. If the Options
block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from
a time series by entering the time-series name in place of a numeric value.
• evaporation real or character value that defines the concentration of evaporated water (ML-3) for the lake. If
this concentration value is larger than the simulated concentration in the lake, then the evaporated water will be
removed at the same concentration as the lake. If the Options block includes a TIMESERIESFILE entry (see the
“Time-Variable Input” section), values can be obtained from a time series by entering the time-series name in
place of a numeric value.
• runoff real or character value that defines the concentration of runoff (ML-3) for the lake. Value must be greater
than or equal to zero. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input”
section), values can be obtained from a time series by entering the time-series name in place of a numeric value.

146 Chapter 3. Input Guide


MODFLOW 6

• ext-inflow real or character value that defines the concentration of external inflow (ML-3) for the lake. Value
must be greater than or equal to zero. If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.
• AUXILIARY keyword for specifying auxiliary variable.
• auxname name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary
variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable
names defined in the OPTIONS block the data are ignored.
• auxval value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.

Example Input File

BEGIN OPTIONS
AUXILIARY aux1 aux2
BOUNDNAMES
PRINT_INPUT
PRINT_CONCENTRATION
PRINT_FLOWS
SAVE_FLOWS
CONCENTRATION FILEOUT gwt_lkt_02.lkt.bin
BUDGET FILEOUT gwt_lkt_02.lkt.bud
OBS6 FILEIN gwt_lkt_02.lkt.obs
END OPTIONS

BEGIN PACKAGEDATA
# ifno STRT aux1 aux2 bname
1 0.00000000 99.00000000 999.00000000 MYLAKE1
2 0.00000000 99.00000000 999.00000000 MYLAKE2
3 0.00000000 99.00000000 999.00000000 MYLAKE3
END PACKAGEDATA

BEGIN PERIOD 1
1 STATUS ACTIVE
2 STATUS ACTIVE
3 STATUS ACTIVE
END PERIOD 1

Available Observation Types


Example Observation Input File

BEGIN options
DIGITS 7
PRINT_INPUT
END options

BEGIN continuous FILEOUT gwt_lkt02.lkt.obs.csv


# obs_name obs_type ID ID2
lkt-1-conc CONCENTRATION 1
lkt-1-extinflow EXT-INFLOW 1
(continues on next page)

3.4. Groundwater Transport 147


MODFLOW 6

(continued from previous page)


lkt-1-rain RAINFALL 1
lkt-1-roff RUNOFF 1
lkt-1-evap EVAPORATION 1
lkt-1-wdrl WITHDRAWAL 1
lkt-1-stor STORAGE 1
lkt-1-const CONSTANT 1
lkt-1-gwt1 LKT 1 1
lkt-1-gwt2 LKT 1 2
lkt-2-gwt1 LKT 2 1
lkt-1-mylake1 LKT MYLAKE1
lkt-1-fjf FLOW-JA-FACE 1 2
lkt-2-fjf FLOW-JA-FACE 2 1
lkt-3-fjf FLOW-JA-FACE 2 3
lkt-4-fjf FLOW-JA-FACE 3 2
lkt-5-fjf FLOW-JA-FACE MYLAKE1
lkt-6-fjf FLOW-JA-FACE MYLAKE2
lkt-7-fjf FLOW-JA-FACE MYLAKE3
END continuous

3.4.12 GWT-MST
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[SAVE_FLOWS]
[FIRST_ORDER_DECAY]
[ZERO_ORDER_DECAY]
[SORPTION <sorption>]
[SORBATE FILEOUT <sorbatefile>]
[EXPORT_ARRAY_ASCII]
[EXPORT_ARRAY_NETCDF]
END OPTIONS

BEGIN GRIDDATA
POROSITY [LAYERED] [NETCDF]
<porosity(nodes)> -- READARRAY
[DECAY [LAYERED] [NETCDF]
<decay(nodes)> -- READARRAY]
[DECAY_SORBED [LAYERED] [NETCDF]
<decay_sorbed(nodes)> -- READARRAY]
[BULK_DENSITY [LAYERED] [NETCDF]
<bulk_density(nodes)> -- READARRAY]
[DISTCOEF [LAYERED] [NETCDF]
<distcoef(nodes)> -- READARRAY]
[SP2 [LAYERED] [NETCDF]
<sp2(nodes)> -- READARRAY]
END GRIDDATA

148 Chapter 3. Input Guide


MODFLOW 6

Explanation of Variables
Block: OPTIONS

• SAVE_FLOWS keyword to indicate that MST flow terms will be written to the file specified with “BUDGET
FILEOUT” in Output Control.
• FIRST_ORDER_DECAY is a text keyword to indicate that first-order decay will occur. Use of this keyword requires
that DECAY and DECAY_SORBED (if sorption is active) are specified in the GRIDDATA block.
• ZERO_ORDER_DECAY is a text keyword to indicate that zero-order decay will occur. Use of this keyword requires
that DECAY and DECAY_SORBED (if sorption is active) are specified in the GRIDDATA block.
• sorption is a text keyword to indicate that sorption will be activated. Valid sorption options include LINEAR,
FREUNDLICH, and LANGMUIR. Use of this keyword requires that BULK_DENSITY and DISTCOEF are
specified in the GRIDDATA block. If sorption is specified as FREUNDLICH or LANGMUIR then SP2 is also
required in the GRIDDATA block.
• SORBATE keyword to specify that record corresponds to sorbate concentration.
• FILEOUT keyword to specify that an output filename is expected next.
• sorbatefile name of the output file to write sorbate concentration information. Sorbate concentrations will
be written whenever aqueous concentrations are saved, as determined by settings in the Output Control option.
• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.

Block: GRIDDATA

• porosity is the mobile domain porosity, defined as the mobile domain pore volume per mobile domain volume.
Additional information on porosity within the context of mobile and immobile domain transport simulations is
included in the MODFLOW 6 Supplemental Technical Information document.
• decay is the rate coefficient for first or zero-order decay for the aqueous phase of the mobile domain. A negative
value indicates solute production. The dimensions of decay for first-order decay is one over time. The dimensions
of decay for zero-order decay is mass per length cubed per time. decay will have no effect on simulation results
unless either first- or zero-order decay is specified in the options block.
• decay_sorbed is the rate coefficient for first or zero-order decay for the sorbed phase of the mobile domain.
A negative value indicates solute production. The dimensions of decay_sorbed for first-order decay is one over
time. The dimensions of decay_sorbed for zero-order decay is mass of solute per mass of aquifer per time. If
decay_sorbed is not specified and both decay and sorption are active, then the program will terminate with an
error. decay_sorbed will have no effect on simulation results unless the SORPTION keyword and either first- or
zero-order decay are specified in the options block.
• bulk_density is the bulk density of the aquifer in mass per length cubed. bulk_density is not required unless
the SORPTION keyword is specified. Bulk density is defined as the mobile domain solid mass per mobile
domain volume. Additional information on bulk density is included in the MODFLOW 6 Supplemental Technical
Information document.
• distcoef is the distribution coefficient for the equilibrium-controlled linear sorption isotherm in dimensions
of length cubed per mass. If the Freunchlich isotherm is specified, then discoef is the Freundlich constant. If
the Langmuir isotherm is specified, then distcoef is the Langmuir constant. distcoef is not required unless the
SORPTION keyword is specified.

3.4. Groundwater Transport 149


MODFLOW 6

• sp2 is the exponent for the Freundlich isotherm and the sorption capacity for the Langmuir isotherm. sp2 is not
required unless the SORPTION keyword is specified in the options block. If the SORPTION keyword is not
specified in the options block, sp2 will have no effect on simulation results.

Example Input File

BEGIN OPTIONS
SORPTION linear
FIRST_ORDER_DECAY
END OPTIONS

BEGIN GRIDDATA
POROSITY
CONSTANT 0.1
DECAY
CONSTANT 0.001
DECAY_SORBED
CONSTANT 0.001
BULK_DENSITY
CONSTANT 1.
DISTCOEF
CONSTANT 0.01
END GRIDDATA

3.4.13 GWT-MVT
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[BUDGET FILEOUT <budgetfile>]
[BUDGETCSV FILEOUT <budgetcsvfile>]
END OPTIONS

Explanation of Variables
Block: OPTIONS

• PRINT_INPUT keyword to indicate that the list of mover information will be written to the listing file immediately
after it is read.
• PRINT_FLOWS keyword to indicate that the list of lake flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that lake flow terms will be written to the file specified with “BUDGET FILE-
OUT” in Output Control.
• BUDGET keyword to specify that record corresponds to the budget.
• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the binary output file to write budget information.

150 Chapter 3. Input Guide


MODFLOW 6

• BUDGETCSV keyword to specify that record corresponds to the budget CSV.


• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.

Example Input File

BEGIN OPTIONS
PRINT_INPUT
PRINT_FLOWS
SAVE_FLOWS
BUDGET FILEOUT mygwtmodel.mvt.bud
END OPTIONS

3.4.14 GWT-MWT
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[FLOW_PACKAGE_NAME <flow_package_name>]
[AUXILIARY <auxiliary>]
[FLOW_PACKAGE_AUXILIARY_NAME <flow_package_auxiliary_name>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_CONCENTRATION]
[PRINT_FLOWS]
[SAVE_FLOWS]
[CONCENTRATION FILEOUT <concfile>]
[BUDGET FILEOUT <budgetfile>]
[BUDGETCSV FILEOUT <budgetcsvfile>]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
END OPTIONS

BEGIN PACKAGEDATA
<ifno> <strt> [<aux(naux)>] [<boundname>]
<ifno> <strt> [<aux(naux)>] [<boundname>]
...
END PACKAGEDATA

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<ifno> <mwtsetting>
<ifno> <mwtsetting>
...
END PERIOD

3.4. Groundwater Transport 151


MODFLOW 6

Explanation of Variables
Block: OPTIONS

• flow_package_name keyword to specify the name of the corresponding flow package. If not specified, then the
corresponding flow package must have the same name as this advanced transport package (the name associated
with this package in the GWT name file).
• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• flow_package_auxiliary_name keyword to specify the name of an auxiliary variable in the corresponding
flow package. If specified, then the simulated concentrations from this advanced transport package will be copied
into the auxiliary variable specified with this name. Note that the flow package must have an auxiliary variable
with this name or the program will terminate with an error. If the flows for this advanced transport package are
read from a file, then this option will have no effect.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of well cells.
• PRINT_INPUT keyword to indicate that the list of well information will be written to the listing file immediately
after it is read.
• PRINT_CONCENTRATION keyword to indicate that the list of well concentration will be printed to the listing file
for every stress period in which “CONCENTRATION PRINT” is specified in Output Control. If there is no
Output Control option and PRINT_CONCENTRATION is specified, then concentration are printed for the last
time step of each stress period.
• PRINT_FLOWS keyword to indicate that the list of well flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that well flow terms will be written to the file specified with “BUDGET FILE-
OUT” in Output Control.
• CONCENTRATION keyword to specify that record corresponds to concentration.
• concfile name of the binary output file to write concentration information.
• BUDGET keyword to specify that record corresponds to the budget.
• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the binary output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.

152 Chapter 3. Input Guide


MODFLOW 6

• obs6_filename name of input file to define observations for the MWT package. See the “Observation
utility” section for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and
ref{table:gwt-obstypetable} lists observation type(s) supported by the MWT package.

Block: PACKAGEDATA

• ifno integer value that defines the feature (well) number associated with the specified PACKAGEDATA data on
the line. IFNO must be greater than zero and less than or equal to NMAWWELLS. Well information must be
specified for every well or the program will terminate with an error. The program will also terminate with an
error if information for a well is specified more than once.
• strt real value that defines the starting concentration for the well.
• aux represents the values of the auxiliary variables for each well. The values of auxiliary variables must be
present for each well. The values must be specified in the order of the auxiliary variables specified in the OP-
TIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry
(see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-series
name in place of a numeric value.
• boundname name of the well cell. BOUNDNAME is an ASCII character variable that can contain as many as 40
characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• ifno integer value that defines the feature (well) number associated with the specified PERIOD data on the line.
IFNO must be greater than zero and less than or equal to NMAWWELLS.
• mwtsetting line of information that is parsed into a keyword and values. Keyword values that can be used to start
the MWTSETTING string include: STATUS, CONCENTRATION, RATE, and AUXILIARY. These settings
are used to assign the concentration associated with the corresponding flow terms. Concentrations cannot be
specified for all flow terms. For example, the Multi-Aquifer Well Package supports a “WITHDRAWAL” flow
term. If this withdrawal term is active, then water will be withdrawn from the well at the calculated concentration
of the well.

STATUS <status>
CONCENTRATION <concentration>
RATE <rate>
AUXILIARY <auxname> <auxval>

• status keyword option to define well status. STATUS can be ACTIVE, INACTIVE, or CONSTANT. By default,
STATUS is ACTIVE, which means that concentration will be calculated for the well. If a well is inactive, then
there will be no solute mass fluxes into or out of the well and the inactive value will be written for the well
concentration. If a well is constant, then the concentration for the well will be fixed at the user specified value.
• concentration real or character value that defines the concentration for the well. The specified CONCENTRA-
TION is only applied if the well is a constant concentration well. If the Options block includes a TIMESERIES-
FILE entry (see the “Time-Variable Input” section), values can be obtained from a time series by entering the
time-series name in place of a numeric value.
• rate real or character value that defines the injection solute concentration (ML-3) for the well. If the Options
block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from
a time series by entering the time-series name in place of a numeric value.

3.4. Groundwater Transport 153


MODFLOW 6

• AUXILIARY keyword for specifying auxiliary variable.


• auxname name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary
variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable
names defined in the OPTIONS block the data are ignored.
• auxval value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.

Example Input File

BEGIN OPTIONS
AUXILIARY aux1 aux2
BOUNDNAMES
PRINT_INPUT
PRINT_CONCENTRATION
PRINT_FLOWS
SAVE_FLOWS
CONCENTRATION FILEOUT gwt_mwt_02.mwt.bin
BUDGET FILEOUT gwt_mwt_02.mwt.bud
OBS6 FILEIN gwt_mwt_02.mwt.obs
END OPTIONS

BEGIN PACKAGEDATA
# ifno STRT aux1 aux2 bname
1 0.00000000 99.00000000 999.00000000 MYWELL1
2 0.00000000 99.00000000 999.00000000 MYWELL2
3 0.00000000 99.00000000 999.00000000 MYWELL3
END PACKAGEDATA

BEGIN PERIOD 1
1 STATUS ACTIVE
2 STATUS ACTIVE
3 STATUS ACTIVE
END PERIOD 1

Available Observation Types


Example Observation Input File

BEGIN options
DIGITS 12
PRINT_INPUT
END options

BEGIN continuous FILEOUT gwt_mwt_02.mwt.obs.csv


# obs_name obs_type ID ID2
mwt1mwt MWT 1 1
mwt2mwt MWT 2 1
mwt3mwt MWT 3 1
mwt4mwt MWT 4 1
mwt1conc CONCENTRATION 1
mwt2conc CONCENTRATION 2
(continues on next page)

154 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


mwt3conc CONCENTRATION 3
mwt4conc CONCENTRATION 4
mwt1stor STORAGE 1
mwt2stor STORAGE 2
mwt3stor STORAGE 3
mwt4stor STORAGE 4
mwt1cnst CONSTANT 1
mwt2cnst CONSTANT 2
mwt3cnst CONSTANT 3
mwt4cnst CONSTANT 4
mwt1fmvr FROM-MVR 1
mwt2fmvr FROM-MVR 2
mwt3fmvr FROM-MVR 3
mwt4fmvr FROM-MVR 4
mwt1rate RATE 1
mwt2rate RATE 2
mwt3rate RATE 3
mwt4rate RATE 4
mwt1rtmv RATE-TO-MVR 1
mwt2rtmv RATE-TO-MVR 2
mwt3rtmv RATE-TO-MVR 3
mwt4rtmv RATE-TO-MVR 4
mwt1fwrt FW-RATE 1
mwt2fwrt FW-RATE 2
mwt3fwrt FW-RATE 3
mwt4fwrt FW-RATE 4
mwt1frtm FW-RATE-TO-MVR 1
mwt2frtm FW-RATE-TO-MVR 2
mwt3frtm FW-RATE-TO-MVR 3
mwt4frtm FW-RATE-TO-MVR 4
END continuous FILEOUT gwt_mwt_02.mwt.obs.csv

3.4.15 GWT-NAM
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[LIST <list>]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[NETCDF_MESH2D FILEOUT <ncmesh2dfile>]
[NETCDF_STRUCTURED FILEOUT <ncstructfile>]
[NETCDF FILEIN <netcdf_filename>]
END OPTIONS

BEGIN PACKAGES
<ftype> <fname> [<pname>]
<ftype> <fname> [<pname>]
...
(continues on next page)

3.4. Groundwater Transport 155


MODFLOW 6

(continued from previous page)


END PACKAGES

Explanation of Variables
Block: OPTIONS

• list is name of the listing file to create for this GWT model. If not specified, then the name of the list file will
be the basename of the GWT model name file and the ‘.lst’ extension. For example, if the GWT name file is
called “my.model.nam” then the list file will be called “my.model.lst”.
• PRINT_INPUT keyword to indicate that the list of all model stress package information will be written to the
listing file immediately after it is read.
• PRINT_FLOWS keyword to indicate that the list of all model package flow rates will be printed to the listing file for
every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output
Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress
period.
• SAVE_FLOWS keyword to indicate that all model package flow terms will be written to the file specified with
“BUDGET FILEOUT” in Output Control.
• NETCDF_MESH2D keyword to specify that record corresponds to a layered mesh netcdf file.
• NETCDF_STRUCTURED keyword to specify that record corresponds to a structured netcdf file.
• FILEOUT keyword to specify that an output filename is expected next.
• ncmesh2dfile name of the netcdf ugrid layered mesh output file.
• ncstructfile name of the netcdf structured output file.
• NETCDF keyword to specify that record corresponds to a netcdf input file.
• FILEIN keyword to specify that an input filename is expected next.
• netcdf_filename defines a netcdf input file.

Block: PACKAGES

• ftype is the file type, which must be one of the following character values shown in table ref{table:ftype-gwt}.
Ftype may be entered in any combination of uppercase and lowercase.
• fname is the name of the file containing the package input. The path to the file should be included if the file is
not located in the folder where the program was run.
• pname is the user-defined name for the package. PNAME is restricted to 16 characters. No spaces are allowed
in PNAME. PNAME character values are read and stored by the program for stress packages only. These names
may be useful for labeling purposes when multiple stress packages of the same type are located within a single
GWT Model. If PNAME is specified for a stress package, then PNAME will be used in the flow budget table in
the listing file; it will also be used for the text entry in the cell-by-cell budget file. PNAME is case insensitive
and is stored in all upper case letters.

Example Input File

# This block is optional


BEGIN OPTIONS
END OPTIONS

(continues on next page)

156 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


BEGIN PACKAGES
DIS6 transport.dis
IC6 transport.ic
MST6 transport.mst
ADV6 transport.adv
DSP6 transport.dsp
SSM6 transport.ssm
CNC6 transport01.cnc LEFT
CNC6 transport02.cnc RIGHT
SRC6 transport01.src LAY1
SRC6 transport02.src LAY2
SRC6 transport03.src LAY3
IST6 transport01.ist CLAY
IST6 transport02.ist SILT
OC6 transport.oc
END PACKAGES

3.4.16 GWT-OC
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[BUDGET FILEOUT <budgetfile>]
[BUDGETCSV FILEOUT <budgetcsvfile>]
[CONCENTRATION FILEOUT <concentrationfile>]
[CONCENTRATION PRINT_FORMAT COLUMNS <columns> WIDTH <width> DIGITS <digits>
˓→<format>]

END OPTIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


[SAVE <rtype> <ocsetting>]
[PRINT <rtype> <ocsetting>]
END PERIOD

Explanation of Variables
Block: OPTIONS

• BUDGET keyword to specify that record corresponds to the budget.


• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.
• CONCENTRATION keyword to specify that record corresponds to concentration.

3.4. Groundwater Transport 157


MODFLOW 6

• concentrationfile name of the output file to write conc information.


• PRINT_FORMAT keyword to specify format for printing to the listing file.
• columns number of columns for writing data.
• width width for writing each number.
• digits number of digits to use for writing a number.
• format write format can be EXPONENTIAL, FIXED, GENERAL, or SCIENTIFIC.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• SAVE keyword to indicate that information will be saved this stress period.
• PRINT keyword to indicate that information will be printed this stress period.
• rtype type of information to save or print. Can be BUDGET or CONCENTRATION.
• ocsetting specifies the steps for which the data will be saved.

ALL
FIRST
LAST
FREQUENCY <frequency>
STEPS <steps>

• ALL keyword to indicate save for all time steps in period.


• FIRST keyword to indicate save for first step in period. This keyword may be used in conjunction with other
keywords to print or save results for multiple time steps.
• LAST keyword to indicate save for last step in period. This keyword may be used in conjunction with other
keywords to print or save results for multiple time steps.
• frequency save at the specified time step frequency. This keyword may be used in conjunction with other
keywords to print or save results for multiple time steps.
• steps save for each step specified in STEPS. This keyword may be used in conjunction with other keywords to
print or save results for multiple time steps.

Example Input File

BEGIN OPTIONS
CONCENTRATION FILEOUT transport.ucn
CONCENTRATION PRINT_FORMAT COLUMNS 15 WIDTH 7 DIGITS 2 FIXED
END OPTIONS

BEGIN PERIOD 1
PRINT BUDGET ALL
SAVE CONCENTRATION ALL
PRINT CONCENTRATION ALL
END PERIOD

158 Chapter 3. Input Guide


MODFLOW 6

3.4.17 GWT-SFT
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[FLOW_PACKAGE_NAME <flow_package_name>]
[AUXILIARY <auxiliary>]
[FLOW_PACKAGE_AUXILIARY_NAME <flow_package_auxiliary_name>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_CONCENTRATION]
[PRINT_FLOWS]
[SAVE_FLOWS]
[CONCENTRATION FILEOUT <concfile>]
[BUDGET FILEOUT <budgetfile>]
[BUDGETCSV FILEOUT <budgetcsvfile>]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
END OPTIONS

BEGIN PACKAGEDATA
<ifno> <strt> [<aux(naux)>] [<boundname>]
<ifno> <strt> [<aux(naux)>] [<boundname>]
...
END PACKAGEDATA

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<ifno> <reachsetting>
<ifno> <reachsetting>
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• flow_package_name keyword to specify the name of the corresponding flow package. If not specified, then the
corresponding flow package must have the same name as this advanced transport package (the name associated
with this package in the GWT name file).
• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• flow_package_auxiliary_name keyword to specify the name of an auxiliary variable in the corresponding
flow package. If specified, then the simulated concentrations from this advanced transport package will be copied
into the auxiliary variable specified with this name. Note that the flow package must have an auxiliary variable

3.4. Groundwater Transport 159


MODFLOW 6

with this name or the program will terminate with an error. If the flows for this advanced transport package are
read from a file, then this option will have no effect.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of reach cells.
• PRINT_INPUT keyword to indicate that the list of reach information will be written to the listing file immediately
after it is read.
• PRINT_CONCENTRATION keyword to indicate that the list of reach concentration will be printed to the listing
file for every stress period in which “CONCENTRATION PRINT” is specified in Output Control. If there is no
Output Control option and PRINT_CONCENTRATION is specified, then concentration are printed for the last
time step of each stress period.
• PRINT_FLOWS keyword to indicate that the list of reach flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that reach flow terms will be written to the file specified with “BUDGET
FILEOUT” in Output Control.
• CONCENTRATION keyword to specify that record corresponds to concentration.
• concfile name of the binary output file to write concentration information.
• BUDGET keyword to specify that record corresponds to the budget.
• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the binary output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the SFT package. See the “Observation utility” sec-
tion for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and ref{table:gwt-
obstypetable} lists observation type(s) supported by the SFT package.

Block: PACKAGEDATA

• ifno integer value that defines the feature (reach) number associated with the specified PACKAGEDATA data
on the line. IFNO must be greater than zero and less than or equal to NREACHES. Reach information must be
specified for every reach or the program will terminate with an error. The program will also terminate with an
error if information for a reach is specified more than once.
• strt real value that defines the starting concentration for the reach.
• aux represents the values of the auxiliary variables for each reach. The values of auxiliary variables must be
present for each reach. The values must be specified in the order of the auxiliary variables specified in the
OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry
(see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-series
name in place of a numeric value.

160 Chapter 3. Input Guide


MODFLOW 6

• boundname name of the reach cell. BOUNDNAME is an ASCII character variable that can contain as many
as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single
quotes.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• ifno integer value that defines the feature (reach) number associated with the specified PERIOD data on the
line. IFNO must be greater than zero and less than or equal to NREACHES.
• reachsetting line of information that is parsed into a keyword and values. Keyword values that can be used
to start the REACHSETTING string include: STATUS, CONCENTRATION, RAINFALL, EVAPORATION,
RUNOFF, and AUXILIARY. These settings are used to assign the concentration of associated with the corre-
sponding flow terms. Concentrations cannot be specified for all flow terms. For example, the Streamflow Package
supports a “DIVERSION” flow term. Diversion water will be routed using the calculated concentration of the
reach.

STATUS <status>
CONCENTRATION <concentration>
RAINFALL <rainfall>
EVAPORATION <evaporation>
RUNOFF <runoff>
INFLOW <inflow>
AUXILIARY <auxname> <auxval>

• status keyword option to define reach status. STATUS can be ACTIVE, INACTIVE, or CONSTANT. By
default, STATUS is ACTIVE, which means that concentration will be calculated for the reach. If a reach is
inactive, then there will be no solute mass fluxes into or out of the reach and the inactive value will be written
for the reach concentration. If a reach is constant, then the concentration for the reach will be fixed at the user
specified value.
• concentration real or character value that defines the concentration for the reach. The specified CONCEN-
TRATION is only applied if the reach is a constant concentration reach. If the Options block includes a TIME-
SERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time series by entering
the time-series name in place of a numeric value.
• rainfall real or character value that defines the rainfall solute concentration (ML-3) for the reach. If the Options
block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from
a time series by entering the time-series name in place of a numeric value.
• evaporation real or character value that defines the concentration of evaporated water (ML-3) for the reach. If
this concentration value is larger than the simulated concentration in the reach, then the evaporated water will be
removed at the same concentration as the reach. If the Options block includes a TIMESERIESFILE entry (see
the “Time-Variable Input” section), values can be obtained from a time series by entering the time-series name
in place of a numeric value.
• runoff real or character value that defines the concentration of runoff (ML-3) for the reach. Value must be
greater than or equal to zero. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable
Input” section), values can be obtained from a time series by entering the time-series name in place of a numeric
value.
• inflow real or character value that defines the concentration of inflow (ML-3) for the reach. Value must be
greater than or equal to zero. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable

3.4. Groundwater Transport 161


MODFLOW 6

Input” section), values can be obtained from a time series by entering the time-series name in place of a numeric
value.
• AUXILIARY keyword for specifying auxiliary variable.
• auxname name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary
variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable
names defined in the OPTIONS block the data are ignored.
• auxval value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.

Example Input File

BEGIN OPTIONS
AUXILIARY aux1 aux2
BOUNDNAMES
PRINT_INPUT
PRINT_CONCENTRATION
PRINT_FLOWS
SAVE_FLOWS
CONCENTRATION FILEOUT gwt_sft_02.sft.bin
BUDGET FILEOUT gwt_sft_02.sft.bud
OBS6 FILEIN gwt_sft_02.sft.obs
END OPTIONS

BEGIN PACKAGEDATA
# L STRT aux1 aux2 bname
1 0.00000000 99.00000000 999.00000000 REACH1
2 0.00000000 99.00000000 999.00000000 REACH2
3 0.00000000 99.00000000 999.00000000 REACH3
END PACKAGEDATA

BEGIN PERIOD 1
1 STATUS ACTIVE
2 STATUS ACTIVE
3 STATUS ACTIVE
END PERIOD 1

Available Observation Types


Example Observation Input File

BEGIN options
DIGITS 7
PRINT_INPUT
END options

BEGIN continuous FILEOUT gwt_sft02.lkt.obs.csv


sft-1-conc CONCENTRATION 1
sft-1-extinflow EXT-INFLOW 1
sft-1-rain RAINFALL 1
sft-1-roff RUNOFF 1
sft-1-evap EVAPORATION 1
(continues on next page)

162 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


sft-1-stor STORAGE 1
sft-1-const CONSTANT 1
sft-1-gwt1 SFT 1 1
sft-1-gwt2 SFT 1 2
sft-2-gwt1 SFT 2 1
sft-1-mylake1 SFT MYREACHES
sft-1-fjf FLOW-JA-FACE 1 2
sft-2-fjf FLOW-JA-FACE 2 1
sft-3-fjf FLOW-JA-FACE 2 3
sft-4-fjf FLOW-JA-FACE 3 2
sft-5-fjf FLOW-JA-FACE MYREACH1
sft-6-fjf FLOW-JA-FACE MYREACH2
sft-7-fjf FLOW-JA-FACE MYREACH3
END continuous

3.4.18 GWT-SRC
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[AUXILIARY <auxiliary>]
[AUXMULTNAME <auxmultname>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
[HIGHEST_SATURATED]
END OPTIONS

BEGIN DIMENSIONS
MAXBOUND <maxbound>
END DIMENSIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<cellid> <smassrate> [<aux(naux)>] [<boundname>]
<cellid> <smassrate> [<aux(naux)>] [<boundname>]
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be

3.4. Groundwater Transport 163


MODFLOW 6

interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• auxmultname name of auxiliary variable to be used as multiplier of mass loading rate.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of mass source cells.
• PRINT_INPUT keyword to indicate that the list of mass source information will be written to the listing file
immediately after it is read.
• PRINT_FLOWS keyword to indicate that the list of mass source flow rates will be printed to the listing file for
every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output
Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress
period.
• SAVE_FLOWS keyword to indicate that mass source flow terms will be written to the file specified with “BUDGET
FILEOUT” in Output Control.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the Mass Source package. See the “Observation
utility” section for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and
ref{table:gwt-obstypetable} lists observation type(s) supported by the Mass Source package.
• HIGHEST_SATURATED Apply mass source loading rate to specified CELLID or highest underlying cell with a
cell saturation greater than zero. The highest_saturated option has an additional complication for certain types
of grids specified using the DISU Package. When the DISU Package is used, a cell may have more than one cell
underlying it. If the overlying cell were to become inactive, there is no straightforward method for determining
how to apportion the mass source loading rate to the underlying cells. In this case, the approach described by
is used. The mass source loading rate is assigned to the first active cell encountered (determined by searching
through the underlying cell numbers from the lowest number to the highest number). In this manner, the total
mass source loading rate is conserved; however, the spatial distribution of the applied mass source loading rate
may not be maintained as layers become dry or wet during a simulation.

Block: DIMENSIONS

• maxbound integer value specifying the maximum number of sources cells that will be specified for use during
any stress period.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.

164 Chapter 3. Input Guide


MODFLOW 6

• smassrate is the mass source loading rate. A positive value indicates addition of solute mass and a negative
value indicates removal of solute mass. If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.
• aux represents the values of the auxiliary variables for each mass source. The values of auxiliary variables must
be present for each mass source. The values must be specified in the order of the auxiliary variables specified in
the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE
entry (see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-
series name in place of a numeric value.
• boundname name of the mass source cell. BOUNDNAME is an ASCII character variable that can contain as
many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within
single quotes.

Example Input File

BEGIN OPTIONS
PRINT_FLOWS
PRINT_INPUT
SAVE_FLOWS
END OPTIONS

BEGIN DIMENSIONS
MAXBOUND 1
END DIMENSIONS

BEGIN PERIOD 1
1 1 1 1.0
END PERIOD

Available Observation Types


Example Observation Input File

BEGIN OPTIONS
DIGITS 7
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.src.obs.csv


# obsname obstype ID
src-7-102-17 SRC 7 102 17
src-7-102-17 SRC CW_1
sources SRC sources
END CONTINUOUS

3.4.19 GWT-SSM
Structure of Blocks
FOR EACH SIMULATION

3.4. Groundwater Transport 165


MODFLOW 6

BEGIN OPTIONS
[PRINT_FLOWS]
[SAVE_FLOWS]
END OPTIONS

BEGIN SOURCES
<pname> <srctype> <auxname>
<pname> <srctype> <auxname>
...
END SOURCES

BEGIN FILEINPUT
[<pname> SPC6 FILEIN <spc6_filename> [MIXED]
<pname> SPC6 FILEIN <spc6_filename> [MIXED]
...]
END FILEINPUT

Explanation of Variables
Block: OPTIONS

• PRINT_FLOWS keyword to indicate that the list of SSM flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that SSM flow terms will be written to the file specified with “BUDGET
FILEOUT” in Output Control.

Block: SOURCES

• pname name of the flow package for which an auxiliary variable contains a source concentration. If this flow
package is represented using an advanced transport package (SFT, LKT, MWT, or UZT), then the advanced
transport package will override SSM terms specified here.
• srctype keyword indicating how concentration will be assigned for sources and sinks. Keyword must be spec-
ified as either AUX or AUXMIXED. For both options the user must provide an auxiliary variable in the corre-
sponding flow package. The auxiliary variable must have the same name as the AUXNAME value that follows.
If the AUX keyword is specified, then the auxiliary variable specified by the user will be assigned as the concen-
tration value for groundwater sources (flows with a positive sign). For negative flow rates (sinks), groundwater
will be withdrawn from the cell at the simulated concentration of the cell. The AUXMIXED option provides an
alternative method for how to determine the concentration of sinks. If the cell concentration is larger than the
user-specified auxiliary concentration, then the concentration of groundwater withdrawn from the cell will be
assigned as the user-specified concentration. Alternatively, if the user-specified auxiliary concentration is larger
than the cell concentration, then groundwater will be withdrawn at the cell concentration. Thus, the AUXMIXED
option is designed to work with the Evapotranspiration (EVT) and Recharge (RCH) Packages where water may
be withdrawn at a concentration that is less than the cell concentration.
• auxname name of the auxiliary variable in the package PNAME. This auxiliary variable must exist and be spec-
ified by the user in that package. The values in this auxiliary variable will be used to set the concentration
associated with the flows for that boundary package.

166 Chapter 3. Input Guide


MODFLOW 6

Block: FILEINPUT

• pname name of the flow package for which an SPC6 input file contains a source concentration. If this flow
package is represented using an advanced transport package (SFT, LKT, MWT, or UZT), then the advanced
transport package will override SSM terms specified here.
• SPC6 keyword to specify that record corresponds to a source sink mixing input file.
• FILEIN keyword to specify that an input filename is expected next.
• spc6_filename character string that defines the path and filename for the file containing source and sink input
data for the flow package. The SPC6_FILENAME file is a flexible input file that allows concentrations to be
specified by stress period and with time series. Instructions for creating the SPC6_FILENAME input file are
provided in the next section on file input for boundary concentrations.
• MIXED keyword to specify that these stress package boundaries will have the mixed condition. The MIXED
condition is described in the SOURCES block for AUXMIXED. The MIXED condition allows for water to be
withdrawn at a concentration that is less than the cell concentration. It is intended primarily for representing
evapotranspiration.

Example Input File

BEGIN OPTIONS
PRINT_FLOWS
SAVE_FLOWS
END OPTIONS

BEGIN SOURCES
# pname srctype auxname
WEL-1 AUX CONCENTRATION
LAK-1 AUX CONCENTRATION
EVT-1 AUXMIXED ETCONC
END SOURCES

BEGIN FILEINPUT
GHB-1 SPC6 FILEINPUT mymodel.ghb1.spc
EVT-2 SPC6 FILEINPUT mymodel.evt2.spca MIXED
END FILEINPUT

3.4.20 GWT-UZT
Structure of Blocks
FOR EACH SIMULATION
BEGIN OPTIONS
[FLOW_PACKAGE_NAME <flow_package_name>]
[AUXILIARY <auxiliary>]
[FLOW_PACKAGE_AUXILIARY_NAME <flow_package_auxiliary_name>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_CONCENTRATION]
[PRINT_FLOWS]
[SAVE_FLOWS]
[CONCENTRATION FILEOUT <concfile>]
[BUDGET FILEOUT <budgetfile>]
(continues on next page)

3.4. Groundwater Transport 167


MODFLOW 6

(continued from previous page)


[BUDGETCSV FILEOUT <budgetcsvfile>]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
END OPTIONS

BEGIN PACKAGEDATA
<ifno> <strt> [<aux(naux)>] [<boundname>]
<ifno> <strt> [<aux(naux)>] [<boundname>]
...
END PACKAGEDATA

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<ifno> <uztsetting>
<ifno> <uztsetting>
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• flow_package_name keyword to specify the name of the corresponding flow package. If not specified, then the
corresponding flow package must have the same name as this advanced transport package (the name associated
with this package in the GWT name file).
• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• flow_package_auxiliary_name keyword to specify the name of an auxiliary variable in the corresponding
flow package. If specified, then the simulated concentrations from this advanced transport package will be copied
into the auxiliary variable specified with this name. Note that the flow package must have an auxiliary variable
with this name or the program will terminate with an error. If the flows for this advanced transport package are
read from a file, then this option will have no effect.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of unsaturated zone flow
cells.
• PRINT_INPUT keyword to indicate that the list of unsaturated zone flow information will be written to the listing
file immediately after it is read.
• PRINT_CONCENTRATION keyword to indicate that the list of UZF cell concentration will be printed to the listing
file for every stress period in which “CONCENTRATION PRINT” is specified in Output Control. If there is no
Output Control option and PRINT_CONCENTRATION is specified, then concentration are printed for the last
time step of each stress period.
• PRINT_FLOWS keyword to indicate that the list of unsaturated zone flow rates will be printed to the listing file for
every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output
Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress
period.

168 Chapter 3. Input Guide


MODFLOW 6

• SAVE_FLOWS keyword to indicate that unsaturated zone flow terms will be written to the file specified with
“BUDGET FILEOUT” in Output Control.
• CONCENTRATION keyword to specify that record corresponds to concentration.
• concfile name of the binary output file to write concentration information.
• BUDGET keyword to specify that record corresponds to the budget.
• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the binary output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the UZT package. See the “Observation utility” sec-
tion for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and ref{table:gwt-
obstypetable} lists observation type(s) supported by the UZT package.

Block: PACKAGEDATA

• ifno integer value that defines the feature (UZF object) number associated with the specified PACKAGEDATA
data on the line. IFNO must be greater than zero and less than or equal to NUZFCELLS. Unsaturated zone flow
information must be specified for every UZF cell or the program will terminate with an error. The program will
also terminate with an error if information for a UZF cell is specified more than once.
• strt real value that defines the starting concentration for the unsaturated zone flow cell.
• aux represents the values of the auxiliary variables for each unsaturated zone flow. The values of auxiliary
variables must be present for each unsaturated zone flow. The values must be specified in the order of the
auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block
includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time
series by entering the time-series name in place of a numeric value.
• boundname name of the unsaturated zone flow cell. BOUNDNAME is an ASCII character variable that can
contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed
within single quotes.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• ifno integer value that defines the feature (UZF object) number associated with the specified PERIOD data on
the line. IFNO must be greater than zero and less than or equal to NUZFCELLS.

3.4. Groundwater Transport 169


MODFLOW 6

• uztsetting line of information that is parsed into a keyword and values. Keyword values that can be used
to start the UZTSETTING string include: STATUS, CONCENTRATION, INFILTRATION, UZET, and AUX-
ILIARY. These settings are used to assign the concentration of associated with the corresponding flow terms.
Concentrations cannot be specified for all flow terms.

STATUS <status>
CONCENTRATION <concentration>
INFILTRATION <infiltration>
UZET <uzet>
AUXILIARY <auxname> <auxval>

• status keyword option to define UZF cell status. STATUS can be ACTIVE, INACTIVE, or CONSTANT. By
default, STATUS is ACTIVE, which means that concentration will be calculated for the UZF cell. If a UZF cell
is inactive, then there will be no solute mass fluxes into or out of the UZF cell and the inactive value will be
written for the UZF cell concentration. If a UZF cell is constant, then the concentration for the UZF cell will be
fixed at the user specified value.
• concentration real or character value that defines the concentration for the unsaturated zone flow cell. The
specified CONCENTRATION is only applied if the unsaturated zone flow cell is a constant concentration cell.
If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be
obtained from a time series by entering the time-series name in place of a numeric value.
• infiltration real or character value that defines the infiltration solute concentration (ML-3) for the UZF cell.
If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be
obtained from a time series by entering the time-series name in place of a numeric value.
• uzet real or character value that defines the concentration of unsaturated zone evapotranspiration water (ML-3)
for the UZF cell. If this concentration value is larger than the simulated concentration in the UZF cell, then
the unsaturated zone ET water will be removed at the same concentration as the UZF cell. If the Options block
includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time
series by entering the time-series name in place of a numeric value.
• AUXILIARY keyword for specifying auxiliary variable.
• auxname name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary
variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable
names defined in the OPTIONS block the data are ignored.
• auxval value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.

Example Input File

BEGIN OPTIONS
AUXILIARY aux1 aux2
BOUNDNAMES
PRINT_INPUT
PRINT_CONCENTRATION
PRINT_FLOWS
SAVE_FLOWS
CONCENTRATION FILEOUT gwt_02.uzt.bin
BUDGET FILEOUT gwt_02.uzt.bud
OBS6 FILEIN gwt_02.uzt.obs
END OPTIONS

(continues on next page)

170 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


BEGIN PACKAGEDATA
# ifno STRT aux1 aux2 bname
1 0.00000000 99.00000000 999.00000000 MYUZFCELL1
2 0.00000000 99.00000000 999.00000000 MYUZFCELL2
3 0.00000000 99.00000000 999.00000000 MYUZFCELL3
END PACKAGEDATA

BEGIN PERIOD 1
1 STATUS ACTIVE
2 STATUS ACTIVE
3 STATUS ACTIVE
END PERIOD 1

Available Observation Types


Example Observation Input File

BEGIN options
DIGITS 7
PRINT_INPUT
END options

BEGIN continuous FILEOUT gwt_02.uzt.obs.csv


# obs_name obs_type ID
mwt-1-conc CONCENTRATION 1
mwt-1-stor STORAGE 1
mwt-1-gwt1 UZT 1
mwt-1-gwt2 UZT 2
mwt-2-gwt1 UZT 3
END continuous

3.5 Groundwater Energy Transport


3.5.1 GWE-ADV
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[SCHEME <scheme>]
[ATS_PERCEL <ats_percel>]
END OPTIONS

Explanation of Variables
Block: OPTIONS

• scheme scheme used to solve the advection term. Can be upstream, central, or TVD. If not specified, upstream
weighting is the default weighting scheme.
• ats_percel fractional cell distance submitted by the ADV Package to the adaptive time stepping (ATS) package.
If ATS_PERCEL is specified and the ATS Package is active, a time step calculation will be made for each cell

3.5. Groundwater Energy Transport 171


MODFLOW 6

based on flow through the cell and cell properties. The largest time step will be calculated such that the advective
fractional cell distance (ATS_PERCEL) is not exceeded for any active cell in the grid. This time-step constraint
will be submitted to the ATS Package, perhaps with constraints submitted by other packages, in the calculation
of the time step. ATS_PERCEL must be greater than zero. If a value of zero is specified for ATS_PERCEL the
program will automatically reset it to an internal no data value to indicate that time steps should not be subject
to this constraint.

Example Input File

BEGIN OPTIONS
SCHEME UPSTREAM
END OPTIONS

3.5.2 GWE-CND
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[XT3D_OFF]
[XT3D_RHS]
[EXPORT_ARRAY_ASCII]
[EXPORT_ARRAY_NETCDF]
END OPTIONS

BEGIN GRIDDATA
[ALH [LAYERED] [NETCDF]
<alh(nodes)> -- READARRAY]
[ALV [LAYERED] [NETCDF]
<alv(nodes)> -- READARRAY]
[ATH1 [LAYERED] [NETCDF]
<ath1(nodes)> -- READARRAY]
[ATH2 [LAYERED] [NETCDF]
<ath2(nodes)> -- READARRAY]
[ATV [LAYERED] [NETCDF]
<atv(nodes)> -- READARRAY]
[KTW [LAYERED] [NETCDF]
<ktw(nodes)> -- READARRAY]
[KTS [LAYERED] [NETCDF]
<kts(nodes)> -- READARRAY]
END GRIDDATA

Explanation of Variables
Block: OPTIONS

• XT3D_OFF deactivate the xt3d method and use the faster and less accurate approximation. This option may
provide a fast and accurate solution under some circumstances, such as when flow aligns with the model grid,
there is no mechanical dispersion, or when the longitudinal and transverse dispersivities are equal. This option
may also be used to assess the computational demand of the XT3D approach by noting the run time differences
with and without this option on.
• XT3D_RHS add xt3d terms to right-hand side, when possible. This option uses less memory, but may require
more iterations.

172 Chapter 3. Input Guide


MODFLOW 6

• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.

Block: GRIDDATA

• alh longitudinal dispersivity in horizontal direction. If flow is strictly horizontal, then this is the longitudinal
dispersivity that will be used. If flow is not strictly horizontal or strictly vertical, then the longitudinal dispersivity
is a function of both ALH and ALV. If mechanical dispersion is represented (by specifying any dispersivity
values) then this array is required.
• alv longitudinal dispersivity in vertical direction. If flow is strictly vertical, then this is the longitudinal dispser-
sivity value that will be used. If flow is not strictly horizontal or strictly vertical, then the longitudinal dispersivity
is a function of both ALH and ALV. If this value is not specified and mechanical dispersion is represented, then
this array is set equal to ALH.
• ath1 transverse dispersivity in horizontal direction. This is the transverse dispersivity value for the second
ellipsoid axis. If flow is strictly horizontal and directed in the x direction (along a row for a regular grid),
then this value controls spreading in the y direction. If mechanical dispersion is represented (by specifying any
dispersivity values) then this array is required.
• ath2 transverse dispersivity in horizontal direction. This is the transverse dispersivity value for the third ellipsoid
axis. If flow is strictly horizontal and directed in the x direction (along a row for a regular grid), then this value
controls spreading in the z direction. If this value is not specified and mechanical dispersion is represented, then
this array is set equal to ATH1.
• atv transverse dispersivity when flow is in vertical direction. If flow is strictly vertical and directed in the z
direction, then this value controls spreading in the x and y directions. If this value is not specified and mechanical
dispersion is represented, then this array is set equal to ATH2.
• ktw thermal conductivity of the simulated fluid. Note that the CND Package does not account for the tortuosity
of the flow paths when solving for the conductive spread of heat. If tortuosity plays an important role in the
thermal conductivity calculation, its effect should be reflected in the value specified for KTW.
• kts thermal conductivity of the solid aquifer material

Example Input File

BEGIN OPTIONS
END OPTIONS

BEGIN GRIDDATA
ALH
CONSTANT 1.
ALV
CONSTANT 1.
ATH1
CONSTANT 0.1
ATH2
CONSTANT 0.1
ATV
CONSTANT 0.1
KTW
CONSTANT 0.5918
KTS
(continues on next page)

3.5. Groundwater Energy Transport 173


MODFLOW 6

(continued from previous page)


CONSTANT 0.27
END GRIDDATA

3.5.3 GWE-CTP
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[AUXILIARY <auxiliary>]
[AUXMULTNAME <auxmultname>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
END OPTIONS

BEGIN DIMENSIONS
MAXBOUND <maxbound>
END DIMENSIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<cellid> <temp> [<aux(naux)>] [<boundname>]
<cellid> <temp> [<aux(naux)>] [<boundname>]
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• auxmultname name of auxiliary variable to be used as multiplier of temperature value.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of constant temperature
cells.
• PRINT_INPUT keyword to indicate that the list of constant temperature information will be written to the listing
file immediately after it is read.
• PRINT_FLOWS keyword to indicate that the list of constant temperature flow rates will be printed to the listing
file for every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no

174 Chapter 3. Input Guide


MODFLOW 6

Output Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of
each stress period.
• SAVE_FLOWS keyword to indicate that constant temperature flow terms will be written to the file specified with
“BUDGET FILEOUT” in Output Control.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the Constant Temperature package. See the “Obser-
vation utility” section for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable}
and ref{table:gwt-obstypetable} lists observation type(s) supported by the Constant Temperature package.

Block: DIMENSIONS

• maxbound integer value specifying the maximum number of constant temperature cells that will be specified for
use during any stress period.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.
• temp is the constant temperature value. If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.
• aux represents the values of the auxiliary variables for each constant temperature. The values of auxiliary vari-
ables must be present for each constant temperature. The values must be specified in the order of the auxiliary
variables specified in the OPTIONS block. If the package supports time series and the Options block includes a
TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time series by
entering the time-series name in place of a numeric value.
• boundname name of the constant temperature cell. BOUNDNAME is an ASCII character variable that can
contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed
within single quotes.

Example Input File

BEGIN OPTIONS
PRINT_FLOWS
PRINT_INPUT
SAVE_FLOWS
END OPTIONS
(continues on next page)

3.5. Groundwater Energy Transport 175


MODFLOW 6

(continued from previous page)

BEGIN DIMENSIONS
MAXBOUND 1
END DIMENSIONS

BEGIN PERIOD 1
3 1 1 15.0
3 2 1 15.5
3 3 1 16.0
END PERIOD

Available Observation Types


Example Observation Input File

BEGIN OPTIONS
DIGITS 8
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.cnc01.csv


# obsname obstype ID
ctemp_3_1 CTP 3 1 1
ctemp_3_2 CTP 3 2 1
ctemp_3_3 CTP 3 3 1
END CONTINUOUS

BEGIN CONTINUOUS FILEOUT my_model.chd02.csv


# obsname obstype ID
ctemp_3_flow CTP CTEMP_3_1
END CONTINUOUS

3.5.4 GWE-DIS
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[LENGTH_UNITS <length_units>]
[NOGRB]
[GRB6 FILEOUT <grb6_filename>]
[XORIGIN <xorigin>]
[YORIGIN <yorigin>]
[ANGROT <angrot>]
[EXPORT_ARRAY_ASCII]
[EXPORT_ARRAY_NETCDF]
[CRS <crs>]
[NCF6 FILEIN <ncf6_filename>]
END OPTIONS

176 Chapter 3. Input Guide


MODFLOW 6

BEGIN DIMENSIONS
NLAY <nlay>
NROW <nrow>
NCOL <ncol>
END DIMENSIONS

BEGIN GRIDDATA
DELR [NETCDF]
<delr(ncol)> -- READARRAY
DELC [NETCDF]
<delc(nrow)> -- READARRAY
TOP [NETCDF]
<top(ncol, nrow)> -- READARRAY
BOTM [LAYERED] [NETCDF]
<botm(ncol, nrow, nlay)> -- READARRAY
[IDOMAIN [LAYERED] [NETCDF]
<idomain(ncol, nrow, nlay)> -- READARRAY]
END GRIDDATA

Explanation of Variables
Block: OPTIONS

• length_units is the length units used for this model. Values can be “FEET”, “METERS”, or “CENTIME-
TERS”. If not specified, the default is “UNKNOWN”.
• NOGRB keyword to deactivate writing of the binary grid file.
• GRB6 keyword to specify that record corresponds to a binary grid file.
• FILEOUT keyword to specify that an output filename is expected next.
• grb6_filename defines a binary grid output file. If this option is not provided, the output file will have the same
name as the discretization input file, plus extension “.grb”.
• xorigin x-position of the lower-left corner of the model grid. A default value of zero is assigned if not specified.
The value for XORIGIN does not affect the model simulation, but it is written to the binary grid file so that
postprocessors can locate the grid in space.
• yorigin y-position of the lower-left corner of the model grid. If not specified, then a default value equal to zero
is used. The value for YORIGIN does not affect the model simulation, but it is written to the binary grid file so
that postprocessors can locate the grid in space.
• angrot counter-clockwise rotation angle (in degrees) of the lower-left corner of the model grid. If not specified,
then a default value of 0.0 is assigned. The value for ANGROT does not affect the model simulation, but it is
written to the binary grid file so that postprocessors can locate the grid in space.
• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.
• crs is a real-world coordinate reference system (CRS) for the model, for example, an EPSG integer code (e.g.
26915), authority string (i.e. epsg:26915), or Open Geospatial Consortium Well-Known Text (WKT) specifica-
tion. Limited to 5000 characters. The entry for CRS does not affect the model simulation, but it is written to the
binary grid file so that postprocessors can locate the grid in space.
• NCF6 keyword to specify that record corresponds to a netcdf configuration (NCF) file.

3.5. Groundwater Energy Transport 177


MODFLOW 6

• FILEIN keyword to specify that an input filename is expected next.


• ncf6_filename defines a netcdf configuration (NCF) input file.

Block: DIMENSIONS

• nlay is the number of layers in the model grid.


• nrow is the number of rows in the model grid.
• ncol is the number of columns in the model grid.

Block: GRIDDATA

• delr is the column spacing in the row direction.


• delc is the row spacing in the column direction.
• top is the top elevation for each cell in the top model layer.
• botm is the bottom elevation for each cell.
• idomain is an optional array that characterizes the existence status of a cell. If the IDOMAIN array is not
specified, then all model cells exist within the solution. If the IDOMAIN value for a cell is 0, the cell does not
exist in the simulation. Input and output values will be read and written for the cell, but internal to the program,
the cell is excluded from the solution. If the IDOMAIN value for a cell is 1, the cell exists in the simulation. If
the IDOMAIN value for a cell is -1, the cell does not exist in the simulation. Furthermore, the first existing cell
above will be connected to the first existing cell below. This type of cell is referred to as a “vertical pass through”
cell.

3.5.5 GWE-DISU
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[LENGTH_UNITS <length_units>]
[NOGRB]
[GRB6 FILEOUT <grb6_filename>]
[XORIGIN <xorigin>]
[YORIGIN <yorigin>]
[ANGROT <angrot>]
[VERTICAL_OFFSET_TOLERANCE <vertical_offset_tolerance>]
[EXPORT_ARRAY_ASCII]
[CRS <crs>]
END OPTIONS

BEGIN DIMENSIONS
NODES <nodes>
NJA <nja>
[NVERT <nvert>]
END DIMENSIONS

BEGIN GRIDDATA
TOP
<top(nodes)> -- READARRAY
(continues on next page)

178 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


BOT
<bot(nodes)> -- READARRAY
AREA
<area(nodes)> -- READARRAY
[IDOMAIN
<idomain(nodes)> -- READARRAY]
END GRIDDATA

BEGIN CONNECTIONDATA
IAC
<iac(nodes)> -- READARRAY
JA
<ja(nja)> -- READARRAY
IHC
<ihc(nja)> -- READARRAY
CL12
<cl12(nja)> -- READARRAY
HWVA
<hwva(nja)> -- READARRAY
[ANGLDEGX
<angldegx(nja)> -- READARRAY]
END CONNECTIONDATA

BEGIN VERTICES
<iv> <xv> <yv>
<iv> <xv> <yv>
...
END VERTICES

BEGIN CELL2D
<icell2d> <xc> <yc> <ncvert> <icvert>
<icell2d> <xc> <yc> <ncvert> <icvert>
...
END CELL2D

Explanation of Variables
Block: OPTIONS

• length_units is the length units used for this model. Values can be “FEET”, “METERS”, or “CENTIME-
TERS”. If not specified, the default is “UNKNOWN”.
• NOGRB keyword to deactivate writing of the binary grid file.
• GRB6 keyword to specify that record corresponds to a binary grid file.
• FILEOUT keyword to specify that an output filename is expected next.
• grb6_filename defines a binary grid output file. If this option is not provided, the output file will have the same
name as the discretization input file, plus extension “.grb”.
• xorigin x-position of the origin used for model grid vertices. This value should be provided in a real-world
coordinate system. A default value of zero is assigned if not specified. The value for XORIGIN does not affect
the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.

3.5. Groundwater Energy Transport 179


MODFLOW 6

• yorigin y-position of the origin used for model grid vertices. This value should be provided in a real-world
coordinate system. If not specified, then a default value equal to zero is used. The value for YORIGIN does not
affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in
space.
• angrot counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world
coordinate system. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not
affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in
space.
• vertical_offset_tolerance checks are performed to ensure that the top of a cell is not higher than the
bottom of an overlying cell. This option can be used to specify the tolerance that is used for checking. If top
of a cell is above the bottom of an overlying cell by a value less than this tolerance, then the program will not
terminate with an error. The default value is zero. This option should generally not be used.
• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• crs is a real-world coordinate reference system (CRS) for the model, for example, an EPSG integer code (e.g.
26915), authority string (i.e. epsg:26915), or Open Geospatial Consortium Well-Known Text (WKT) specifica-
tion. Limited to 5000 characters. The entry for CRS does not affect the model simulation, but it is written to the
binary grid file so that postprocessors can locate the grid in space.

Block: DIMENSIONS

• nodes is the number of cells in the model grid.


• nja is the sum of the number of connections and NODES. When calculating the total number of connections,
the connection between cell n and cell m is considered to be different from the connection between cell m and
cell n. Thus, NJA is equal to the total number of connections, including n to m and m to n, and the total number
of cells.
• nvert is the total number of (x, y) vertex pairs used to define the plan-view shape of each cell in the model grid.
If NVERT is not specified or is specified as zero, then the VERTICES and CELL2D blocks below are not read.
NVERT and the accompanying VERTICES and CELL2D blocks should be specified for most simulations. If
the XT3D or SAVE_SPECIFIC_DISCHARGE options are specified in the NPF Package, then this information
is required.

Block: GRIDDATA

• top is the top elevation for each cell in the model grid.
• bot is the bottom elevation for each cell.
• area is the cell surface area (in plan view).
• idomain is an optional array that characterizes the existence status of a cell. If the IDOMAIN array is not
specified, then all model cells exist within the solution. If the IDOMAIN value for a cell is 0, the cell does not
exist in the simulation. Input and output values will be read and written for the cell, but internal to the program,
the cell is excluded from the solution. If the IDOMAIN value for a cell is 1 or greater, the cell exists in the
simulation. IDOMAIN values of -1 cannot be specified for the DISU Package.

Block: CONNECTIONDATA

• iac is the number of connections (plus 1) for each cell. The sum of all the entries in IAC must be equal to NJA.
• ja is a list of cell number (n) followed by its connecting cell numbers (m) for each of the m cells connected to
cell n. The number of values to provide for cell n is IAC(n). This list is sequentially provided for the first to the
last cell. The first value in the list must be cell n itself, and the remaining cells must be listed in an increasing

180 Chapter 3. Input Guide


MODFLOW 6

order (sorted from lowest number to highest). Note that the cell and its connections are only supplied for the
GWE cells and their connections to the other GWE cells. Also note that the JA list input may be divided such
that every node and its connectivity list can be on a separate line for ease in readability of the file. To further ease
readability of the file, the node number of the cell whose connectivity is subsequently listed, may be expressed
as a negative number, the sign of which is subsequently converted to positive by the code.
• ihc is an index array indicating the direction between node n and all of its m connections. If IHC = 0 then cell
n and cell m are connected in the vertical direction. Cell n overlies cell m if the cell number for n is less than
m; cell m overlies cell n if the cell number for m is less than n. If IHC = 1 then cell n and cell m are connected
in the horizontal direction. If IHC = 2 then cell n and cell m are connected in the horizontal direction, and
the connection is vertically staggered. A vertically staggered connection is one in which a cell is horizontally
connected to more than one cell in a horizontal connection.
• cl12 is the array containing connection lengths between the center of cell n and the shared face with each adjacent
m cell.
• hwva is a symmetric array of size NJA. For horizontal connections, entries in HWVA are the horizontal width
perpendicular to flow. For vertical connections, entries in HWVA are the vertical area for flow. Thus, values
in the HWVA array contain dimensions of both length and area. Entries in the HWVA array have a one-to-one
correspondence with the connections specified in the JA array. Likewise, there is a one-to-one correspondence
between entries in the HWVA array and entries in the IHC array, which specifies the connection type (horizontal
or vertical). Entries in the HWVA array must be symmetric; the program will terminate with an error if the value
for HWVA for an n to m connection does not equal the value for HWVA for the corresponding n to m connection.
• angldegx is the angle (in degrees) between the horizontal x-axis and the outward normal to the face between
a cell and its connecting cells. The angle varies between zero and 360.0 degrees, where zero degrees points in
the positive x-axis direction, and 90 degrees points in the positive y-axis direction. ANGLDEGX is only needed
if horizontal anisotropy is specified in the NPF Package, if the XT3D option is used in the NPF Package, or if
the SAVE_SPECIFIC_DISCHARGE option is specified in the NPF Package. ANGLDEGX does not need to be
specified if these conditions are not met. ANGLDEGX is of size NJA; values specified for vertical connections
and for the diagonal position are not used. Note that ANGLDEGX is read in degrees, which is different from
MODFLOW-USG, which reads a similar variable (ANGLEX) in radians.

Block: VERTICES

• iv is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.
• xv is the x-coordinate for the vertex.
• yv is the y-coordinate for the vertex.

Block: CELL2D

• icell2d is the cell2d number. Records in the CELL2D block must be listed in consecutive order from 1 to
NODES.
• xc is the x-coordinate for the cell center.
• yc is the y-coordinate for the cell center.
• ncvert is the number of vertices required to define the cell. There may be a different number of vertices for
each cell.
• icvert is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell.
Vertices must be listed in clockwise order.

3.5. Groundwater Energy Transport 181


MODFLOW 6

3.5.6 GWE-DISV
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[LENGTH_UNITS <length_units>]
[NOGRB]
[GRB6 FILEOUT <grb6_filename>]
[XORIGIN <xorigin>]
[YORIGIN <yorigin>]
[ANGROT <angrot>]
[EXPORT_ARRAY_ASCII]
[EXPORT_ARRAY_NETCDF]
[CRS <crs>]
[NCF6 FILEIN <ncf6_filename>]
END OPTIONS

BEGIN DIMENSIONS
NLAY <nlay>
NCPL <ncpl>
NVERT <nvert>
END DIMENSIONS

BEGIN GRIDDATA
TOP [NETCDF]
<top(ncpl)> -- READARRAY
BOTM [LAYERED] [NETCDF]
<botm(ncpl, nlay)> -- READARRAY
[IDOMAIN [LAYERED] [NETCDF]
<idomain(ncpl, nlay)> -- READARRAY]
END GRIDDATA

BEGIN VERTICES
<iv> <xv> <yv>
<iv> <xv> <yv>
...
END VERTICES

BEGIN CELL2D
<icell2d> <xc> <yc> <ncvert> <icvert>
<icell2d> <xc> <yc> <ncvert> <icvert>
...
END CELL2D

Explanation of Variables
Block: OPTIONS

• length_units is the length units used for this model. Values can be “FEET”, “METERS”, or “CENTIME-
TERS”. If not specified, the default is “UNKNOWN”.
• NOGRB keyword to deactivate writing of the binary grid file.

182 Chapter 3. Input Guide


MODFLOW 6

• GRB6 keyword to specify that record corresponds to a binary grid file.


• FILEOUT keyword to specify that an output filename is expected next.
• grb6_filename defines a binary grid output file. If this option is not provided, the output file will have the same
name as the discretization input file, plus extension “.grb”.
• xorigin x-position of the origin used for model grid vertices. This value should be provided in a real-world
coordinate system. A default value of zero is assigned if not specified. The value for XORIGIN does not affect
the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.
• yorigin y-position of the origin used for model grid vertices. This value should be provided in a real-world
coordinate system. If not specified, then a default value equal to zero is used. The value for YORIGIN does not
affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in
space.
• angrot counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world
coordinate system. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not
affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in
space.
• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.
• crs is a real-world coordinate reference system (CRS) for the model, for example, an EPSG integer code (e.g.
26915), authority string (i.e. epsg:26915), or Open Geospatial Consortium Well-Known Text (WKT) specifica-
tion. Limited to 5000 characters. The entry for CRS does not affect the model simulation, but it is written to the
binary grid file so that postprocessors can locate the grid in space.
• NCF6 keyword to specify that record corresponds to a netcdf configuration (NCF) file.
• FILEIN keyword to specify that an input filename is expected next.
• ncf6_filename defines a netcdf configuration (NCF) input file.

Block: DIMENSIONS

• nlay is the number of layers in the model grid.


• ncpl is the number of cells per layer. This is a constant value for the grid and it applies to all layers.
• nvert is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model
grid.

Block: GRIDDATA

• top is the top elevation for each cell in the top model layer.
• botm is the bottom elevation for each cell.
• idomain is an optional array that characterizes the existence status of a cell. If the IDOMAIN array is not
specified, then all model cells exist within the solution. If the IDOMAIN value for a cell is 0, the cell does not
exist in the simulation. Input and output values will be read and written for the cell, but internal to the program,
the cell is excluded from the solution. If the IDOMAIN value for a cell is 1, the cell exists in the simulation. If
the IDOMAIN value for a cell is -1, the cell does not exist in the simulation. Furthermore, the first existing cell
above will be connected to the first existing cell below. This type of cell is referred to as a “vertical pass through”
cell.

3.5. Groundwater Energy Transport 183


MODFLOW 6

Block: VERTICES

• iv is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.
• xv is the x-coordinate for the vertex.
• yv is the y-coordinate for the vertex.

Block: CELL2D

• icell2d is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the
first to the last.
• xc is the x-coordinate for the cell center.
• yc is the y-coordinate for the cell center.
• ncvert is the number of vertices required to define the cell. There may be a different number of vertices for
each cell.
• icvert is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell.
Vertices must be listed in clockwise order. Cells that are connected must share vertices.

3.5.7 GWE-ESL
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[AUXILIARY <auxiliary>]
[AUXMULTNAME <auxmultname>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
END OPTIONS

BEGIN DIMENSIONS
MAXBOUND <maxbound>
END DIMENSIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<cellid> <senerrate> [<aux(naux)>] [<boundname>]
<cellid> <senerrate> [<aux(naux)>] [<boundname>]
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have

184 Chapter 3. Input Guide


MODFLOW 6

a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• auxmultname name of auxiliary variable to be used as multiplier of energy loading rate.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of energy source loading
cells.
• PRINT_INPUT keyword to indicate that the list of energy source loading information will be written to the listing
file immediately after it is read.
• PRINT_FLOWS keyword to indicate that the list of energy source loading flow rates will be printed to the listing
file for every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no
Output Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of
each stress period.
• SAVE_FLOWS keyword to indicate that energy source loading flow terms will be written to the file specified with
“BUDGET FILEOUT” in Output Control.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the Energy Source Loading package. See
the “Observation utility” section for instructions for preparing observation input files. Tables ref{table:gwf-
obstypetable} and ref{table:gwt-obstypetable} lists observation type(s) supported by the Energy Source Loading
package.

Block: DIMENSIONS

• maxbound integer value specifying the maximum number of source cells that will be specified for use during
any stress period.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.
• senerrate is the energy source loading rate. A positive value indicates addition of energy and a negative value
indicates removal of energy. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable
Input” section), values can be obtained from a time series by entering the time-series name in place of a numeric
value.

3.5. Groundwater Energy Transport 185


MODFLOW 6

• aux represents the values of the auxiliary variables for each energy source. The values of auxiliary variables must
be present for each energy source. The values must be specified in the order of the auxiliary variables specified
in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE
entry (see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-
series name in place of a numeric value.
• boundname name of the energy source cell. BOUNDNAME is an ASCII character variable that can contain as
many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within
single quotes.

Example Input File

BEGIN OPTIONS
PRINT_FLOWS
PRINT_INPUT
SAVE_FLOWS
END OPTIONS

BEGIN DIMENSIONS
MAXBOUND 1
END DIMENSIONS

BEGIN PERIOD 1
1 1 1 1500000.0
END PERIOD

Available Observation Types


Example Observation Input File

BEGIN OPTIONS
DIGITS 7
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.esl.obs.csv


# obsname obstype ID
esl_7_102_17 ESL 7 102 17
esl_7_102_17 ESL CW_1
esources ESL esources
END CONTINUOUS

3.5.8 GWE-EST
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[SAVE_FLOWS]
[ZERO_ORDER_DECAY_WATER]
[ZERO_ORDER_DECAY_SOLID]
[DENSITY_WATER <density_water>]
[HEAT_CAPACITY_WATER <heat_capacity_water>]
(continues on next page)

186 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


[LATENT_HEAT_VAPORIZATION <latent_heat_vaporization>]
END OPTIONS

BEGIN GRIDDATA
POROSITY [LAYERED]
<porosity(nodes)> -- READARRAY
[DECAY_WATER [LAYERED]
<decay_water(nodes)> -- READARRAY]
[DECAY_SOLID [LAYERED]
<decay_solid(nodes)> -- READARRAY]
HEAT_CAPACITY_SOLID [LAYERED]
<heat_capacity_solid(nodes)> -- READARRAY
DENSITY_SOLID [LAYERED]
<density_solid(nodes)> -- READARRAY
END GRIDDATA

Explanation of Variables
Block: OPTIONS

• SAVE_FLOWS keyword to indicate that EST flow terms will be written to the file specified with “BUDGET FILE-
OUT” in Output Control.
• ZERO_ORDER_DECAY_WATER is a text keyword to indicate that zero-order decay will occur in the aqueous phase.
That is, decay occurs in the water and is a rate per volume of water only, not per volume of aquifer (i.e., grid
cell). Use of this keyword requires that DECAY_WATER is specified in the GRIDDATA block.
• ZERO_ORDER_DECAY_SOLID is a text keyword to indicate that zero-order decay will occur in the solid phase.
That is, decay occurs in the solid and is a rate per mass (not volume) of solid only. Use of this keyword requires
that DECAY_SOLID is specified in the GRIDDATA block.
• density_water density of water used by calculations related to heat storage and conduction. This value is set
to 1,000 kg/m3 if no overriding value is specified. A user-specified value should be provided for models that use
units other than kilograms and meters or if it is necessary to use a value other than the default.
• heat_capacity_water heat capacity of water used by calculations related to heat storage and conduction.
This value is set to 4,184 J/kg/C if no overriding value is specified. A user-specified value should be provided
for models that use units other than kilograms, joules, and degrees Celsius or it is necessary to use a value other
than the default.
• latent_heat_vaporization latent heat of vaporization is the amount of energy that is required to convert a
given quantity of liquid into a gas and is associated with evaporative cooling. While the EST package does not
simulate evaporation, multiple other packages in a GWE simulation may. To avoid having to specify the latent
heat of vaporization in multiple packages, it is specified in a single location and accessed wherever it is needed.
For example, evaporation may occur from the surface of streams or lakes and the energy consumed by the change
in phase would be needed in both the SFE and LKE packages. This value is set to 2,453,500 J/kg if no overriding
value is specified. A user-specified value should be provided for models that use units other than joules and
kilograms or if it is necessary to use a value other than the default.

Block: GRIDDATA

• porosity is the mobile domain porosity, defined as the mobile domain pore volume per mobile domain volume.
The GWE model does not support the concept of an immobile domain in the context of heat transport.
• decay_water is the rate coefficient for zero-order decay for the aqueous phase of the mobile domain. A negative
value indicates heat (energy) production. The dimensions of zero-order decay in the aqueous phase are energy

3.5. Groundwater Energy Transport 187


MODFLOW 6

per length cubed (volume of water) per time. Zero-order decay in the aqueous phase will have no effect on
simulation results unless ZERO_ORDER_DECAY_WATER is specified in the options block.
• decay_solid is the rate coefficient for zero-order decay for the solid phase. A negative value indicates
heat (energy) production. The dimensions of zero-order decay in the solid phase are energy per mass
of solid per time. Zero-order decay in the solid phase will have no effect on simulation results unless
ZERO_ORDER_DECAY_SOLID is specified in the options block.
• heat_capacity_solid is the mass-based heat capacity of dry solids (aquifer material). For example, units of
J/kg/C may be used (or equivalent).
• density_solid is a user-specified value of the density of aquifer material not considering the voids. Value will
remain fixed for the entire simulation. For example, if working in SI units, values may be entered as kilograms
per cubic meter.

Example Input File

BEGIN OPTIONS
HEAT_CAPACITY_WATER 4180.0
DENSITY_WATER 999.0
LATENT_HEAT_VAPORIZATION 2.454E+06
END OPTIONS

BEGIN GRIDDATA
POROSITY
CONSTANT 0.1
HEAT_CAPACITY_SOLID
CONSTANT 880.0
DENSITY_SOLID
CONSTANT 2650.0
END GRIDDATA

3.5.9 GWE-FMI
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[SAVE_FLOWS]
[FLOW_IMBALANCE_CORRECTION]
END OPTIONS

BEGIN PACKAGEDATA
<flowtype> FILEIN <fname>
<flowtype> FILEIN <fname>
...
END PACKAGEDATA

188 Chapter 3. Input Guide


MODFLOW 6

Explanation of Variables
Block: OPTIONS

• SAVE_FLOWS keyword to indicate that FMI flow terms will be written to the file specified with “BUDGET FILE-
OUT” in Output Control.
• FLOW_IMBALANCE_CORRECTION correct for an imbalance in flows by assuming that any residual flow error comes
in or leaves at the temperature of the cell. When this option is activated, the GWE Model budget written to the
listing file will contain two additional entries: FLOW-ERROR and FLOW-CORRECTION. These two entries
will be equal but opposite in sign. The FLOW-CORRECTION term is a mass flow that is added to offset the
error caused by an imprecise flow balance. If these terms are not relatively small, the flow model should be rerun
with stricter convergence tolerances.

Block: PACKAGEDATA

• flowtype is the word GWFBUDGET, GWFHEAD, GWFGRID, GWFMOVER or the name of an advanced
GWF stress package from a previous model run. If GWFBUDGET is specified, then the corresponding file must
be a budget file. If GWFHEAD is specified, the file must be a head file. If GWFGRID is specified, the file must
be a binary grid file. If GWFMOVER is specified, the file must be a mover file. If an advanced GWF stress
package name appears then the corresponding file must be the budget file saved by a LAK, SFR, MAW or UZF
Package.
• FILEIN keyword to specify that an input filename is expected next.
• fname is the name of the file containing flows. The path to the file should be included if the file is not located in
the folder where the program was run.

Example Input File

BEGIN OPTIONS
FLOW_IMBALANCE_CORRECTION
END OPTIONS

BEGIN PACKAGEDATA
GWFBUDGET FILEIN ../flow/mygwfmodel.bud
GWFHEAD FILEIN ../flow/mygwfmodel.hds
GWFMOVER FILEIN ../flow/mygwfmodel.hds
LAK-1 FILEIN ../flow/mygwfmodel.lak.bud
SFR-1 FILEIN ../flow/mygwfmodel.sfr.bud
MAW-1 FILEIN ../flow/mygwfmodel.maw.bud
UZF-1 FILEIN ../flow/mygwfmodel.uzf.bud
LAK-2 FILEIN ../flow/mygwfmodel-2.lak.bud
END PACKAGEDATA

3.5.10 GWE-IC
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[EXPORT_ARRAY_ASCII]
[EXPORT_ARRAY_NETCDF]
END OPTIONS

3.5. Groundwater Energy Transport 189


MODFLOW 6

BEGIN GRIDDATA
STRT [LAYERED] [NETCDF]
<strt(nodes)> -- READARRAY
END GRIDDATA

Explanation of Variables
Block: OPTIONS

• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.

Block: GRIDDATA

• strt is the initial (starting) temperature—that is, the temperature at the beginning of the GWE Model simulation.
STRT must be specified for all GWE Model simulations. One value is read for every model cell.

Example Input File

#The OPTIONS block is optional


BEGIN OPTIONS
END OPTIONS

#The GRIDDATA block is required


BEGIN GRIDDATA
STRT LAYERED
CONSTANT 10.0 # Initial Temperature (C) layer 1
CONSTANT 10.0 # Initial Temperature (C) layer 2
END GRIDDATA

3.5.11 GWE-LKE
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[FLOW_PACKAGE_NAME <flow_package_name>]
[AUXILIARY <auxiliary>]
[FLOW_PACKAGE_AUXILIARY_NAME <flow_package_auxiliary_name>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_TEMPERATURE]
[PRINT_FLOWS]
[SAVE_FLOWS]
[TEMPERATURE FILEOUT <tempfile>]
[BUDGET FILEOUT <budgetfile>]
[BUDGETCSV FILEOUT <budgetcsvfile>]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
END OPTIONS

190 Chapter 3. Input Guide


MODFLOW 6

BEGIN PACKAGEDATA
<lakeno> <strt> <ktf> <rbthcnd> [<aux(naux)>] [<boundname>]
<lakeno> <strt> <ktf> <rbthcnd> [<aux(naux)>] [<boundname>]
...
END PACKAGEDATA

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<lakeno> <laksetting>
<lakeno> <laksetting>
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• flow_package_name keyword to specify the name of the corresponding flow package. If not specified, then the
corresponding flow package must have the same name as this advanced transport package (the name associated
with this package in the GWE name file).
• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• flow_package_auxiliary_name keyword to specify the name of an auxiliary variable in the corresponding
flow package. If specified, then the simulated temperatures from this advanced transport package will be copied
into the auxiliary variable specified with this name. Note that the flow package must have an auxiliary variable
with this name or the program will terminate with an error. If the flows for this advanced transport package are
read from a file, then this option will have no effect.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of lake cells.
• PRINT_INPUT keyword to indicate that the list of lake information will be written to the listing file immediately
after it is read.
• PRINT_TEMPERATURE keyword to indicate that the list of lake temperature will be printed to the listing file for
every stress period in which “TEMPERATURE PRINT” is specified in Output Control. If there is no Output
Control option and PRINT_TEMPERATURE is specified, then temperature are printed for the last time step of
each stress period.
• PRINT_FLOWS keyword to indicate that the list of lake flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that lake flow terms will be written to the file specified with “BUDGET FILE-
OUT” in Output Control.
• TEMPERATURE keyword to specify that record corresponds to temperature.
• tempfile name of the binary output file to write temperature information.
• BUDGET keyword to specify that record corresponds to the budget.

3.5. Groundwater Energy Transport 191


MODFLOW 6

• FILEOUT keyword to specify that an output filename is expected next.


• budgetfile name of the binary output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the LKE package. See the “Observation utility” sec-
tion for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and ref{table:gwt-
obstypetable} lists observation type(s) supported by the LKE package.

Block: PACKAGEDATA

• lakeno integer value that defines the lake number associated with the specified PACKAGEDATA data on the
line. LAKENO must be greater than zero and less than or equal to NLAKES. Lake information must be specified
for every lake or the program will terminate with an error. The program will also terminate with an error if
information for a lake is specified more than once.
• strt real value that defines the starting temperature for the lake.
• ktf is the thermal conductivity of the material between the aquifer cell and the lake. The thickness of the material
is defined by the variable RBTHCND.
• rbthcnd real value that defines the thickness of the lakebed material through which conduction occurs. Must be
greater than 0.
• aux represents the values of the auxiliary variables for each lake. The values of auxiliary variables must be present
for each lake. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block.
If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.
• boundname name of the lake cell. BOUNDNAME is an ASCII character variable that can contain as many as 40
characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• lakeno integer value that defines the lake number associated with the specified PERIOD data on the line.
LAKENO must be greater than zero and less than or equal to NLAKES.
• laksetting line of information that is parsed into a keyword and values. Keyword values that can be used to
start the LAKSETTING string include: STATUS, TEMPERATURE, RAINFALL, EVAPORATION, RUNOFF,
and AUXILIARY. These settings are used to assign the temperature associated with the corresponding flow

192 Chapter 3. Input Guide


MODFLOW 6

terms. Temperatures cannot be specified for all flow terms. For example, the Lake Package supports a “WITH-
DRAWAL” flow term. If this withdrawal term is active, then water will be withdrawn from the lake at the
calculated temperature of the lake.

STATUS <status>
TEMPERATURE <temperature>
RAINFALL <rainfall>
EVAPORATION <evaporation>
RUNOFF <runoff>
EXT-INFLOW <ext-inflow>
AUXILIARY <auxname> <auxval>

• status keyword option to define lake status. STATUS can be ACTIVE, INACTIVE, or CONSTANT. By default,
STATUS is ACTIVE, which means that temperature will be calculated for the lake. If a lake is inactive, then
there will be no energy fluxes into or out of the lake and the inactive value will be written for the lake temperature.
If a lake is constant, then the temperature for the lake will be fixed at the user specified value.
• temperature real or character value that defines the temperature for the lake. The specified TEMPERATURE is
only applied if the lake is a constant temperature lake. If the Options block includes a TIMESERIESFILE entry
(see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-series
name in place of a numeric value.
• rainfall real or character value that defines the rainfall temperature for the lake. If the Options block includes
a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time series
by entering the time-series name in place of a numeric value.
• evaporation use of the EVAPORATION keyword is allowed in the LKE package; however, the specified value
is not currently used in LKE calculations. Instead, the latent heat of evaporation is multiplied by the simulated
evaporation rate for determining the thermal energy lost from a stream reach.
• runoff real or character value that defines the temperature of runoff for the lake. Users are free to use what-
ever temperature scale they want, which might include negative temperatures. If the Options block includes a
TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time series by
entering the time-series name in place of a numeric value.
• ext-inflow real or character value that defines the temperature of external inflow for the lake. Users are free
to use whatever temperature scale they want, which might include negative temperatures. If the Options block
includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time
series by entering the time-series name in place of a numeric value.
• AUXILIARY keyword for specifying auxiliary variable.
• auxname name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary
variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable
names defined in the OPTIONS block the data are ignored.
• auxval value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.

Example Input File

BEGIN OPTIONS
AUXILIARY aux1 aux2
BOUNDNAMES
PRINT_INPUT
PRINT_TEMPERATURE
(continues on next page)

3.5. Groundwater Energy Transport 193


MODFLOW 6

(continued from previous page)


PRINT_FLOWS
SAVE_FLOWS
TEMPERATURE FILEOUT gwe_lke_02.lke.bin
BUDGET FILEOUT gwe_lke_02.lke.bud
OBS6 FILEIN gwe_lke_02.lke.obs
END OPTIONS

BEGIN PACKAGEDATA
# L STRT aux1 aux2 bname
1 5.0 99.0 999.0 MYLAKE1
2 6.0 99.0 999.0 MYLAKE2
3 7.0 99.0 999.0 MYLAKE3
END PACKAGEDATA

BEGIN PERIOD 1
1 STATUS ACTIVE
2 STATUS ACTIVE
3 STATUS ACTIVE
END PERIOD 1

Available Observation Types


Example Observation Input File

BEGIN options
DIGITS 7
PRINT_INPUT
END options

BEGIN continuous FILEOUT gwe_lke02.lke.obs.csv


# obsname obstype id1 id2
lke-1-temp TEMPERATURE 1
lke-1-extinflow EXT-INFLOW 1
lke-1-rain RAINFALL 1
lke-1-roff RUNOFF 1
lke-1-wdrl WITHDRAWAL 1
lke-1-stor STORAGE 1
lke-1-const CONSTANT 1
lke-1-gwe1 LKE 1 1
lke-1-gwe2 LKE 1 2
lke-2-gwe1 LKE 2 1
lke-1-mylake1 LKE MYLAKE1
lke-1-fjf FLOW-JA-FACE 1 2
lke-2-fjf FLOW-JA-FACE 2 1
lke-3-fjf FLOW-JA-FACE 2 3
lke-4-fjf FLOW-JA-FACE 3 2
lke-5-fjf FLOW-JA-FACE MYLAKE1
lke-6-fjf FLOW-JA-FACE MYLAKE2
lke-7-fjf FLOW-JA-FACE MYLAKE3
END continuous

194 Chapter 3. Input Guide


MODFLOW 6

3.5.12 GWE-MVE
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[BUDGET FILEOUT <budgetfile>]
[BUDGETCSV FILEOUT <budgetcsvfile>]
END OPTIONS

Explanation of Variables
Block: OPTIONS

• PRINT_INPUT keyword to indicate that the list of mover information will be written to the listing file immediately
after it is read.
• PRINT_FLOWS keyword to indicate that the list of lake flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that lake flow terms will be written to the file specified with “BUDGET FILE-
OUT” in Output Control.
• BUDGET keyword to specify that record corresponds to the budget.
• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the binary output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.

Example Input File

BEGIN OPTIONS
PRINT_INPUT
PRINT_FLOWS
SAVE_FLOWS
BUDGET FILEOUT mygwemodel.mve.bud
END OPTIONS

3.5.13 GWE-MWE
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[FLOW_PACKAGE_NAME <flow_package_name>]
[AUXILIARY <auxiliary>]
[FLOW_PACKAGE_AUXILIARY_NAME <flow_package_auxiliary_name>]
(continues on next page)

3.5. Groundwater Energy Transport 195


MODFLOW 6

(continued from previous page)


[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_TEMPERATURE]
[PRINT_FLOWS]
[SAVE_FLOWS]
[TEMPERATURE FILEOUT <tempfile>]
[BUDGET FILEOUT <budgetfile>]
[BUDGETCSV FILEOUT <budgetcsvfile>]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
END OPTIONS

BEGIN PACKAGEDATA
<mawno> <strt> <ktf> <fthk> [<aux(naux)>] [<boundname>]
<mawno> <strt> <ktf> <fthk> [<aux(naux)>] [<boundname>]
...
END PACKAGEDATA

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<mawno> <mwesetting>
<mawno> <mwesetting>
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• flow_package_name keyword to specify the name of the corresponding flow package. If not specified, then the
corresponding flow package must have the same name as this advanced transport package (the name associated
with this package in the GWE name file).
• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• flow_package_auxiliary_name keyword to specify the name of an auxiliary variable in the corresponding
flow package. If specified, then the simulated temperatures from this advanced transport package will be copied
into the auxiliary variable specified with this name. Note that the flow package must have an auxiliary variable
with this name or the program will terminate with an error. If the flows for this advanced transport package are
read from a file, then this option will have no effect.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of well cells.
• PRINT_INPUT keyword to indicate that the list of well information will be written to the listing file immediately
after it is read.
• PRINT_TEMPERATURE keyword to indicate that the list of well temperature will be printed to the listing file for
every stress period in which “TEMPERATURE PRINT” is specified in Output Control. If there is no Output

196 Chapter 3. Input Guide


MODFLOW 6

Control option and PRINT_TEMPERATURE is specified, then temperature are printed for the last time step of
each stress period.
• PRINT_FLOWS keyword to indicate that the list of well flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that well flow terms will be written to the file specified with “BUDGET FILE-
OUT” in Output Control.
• TEMPERATURE keyword to specify that record corresponds to temperature.
• tempfile name of the binary output file to write temperature information.
• BUDGET keyword to specify that record corresponds to the budget.
• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the binary output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the MWE package. See the “Observation
utility” section for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and
ref{table:gwt-obstypetable} lists observation type(s) supported by the MWE package.

Block: PACKAGEDATA

• mawno integer value that defines the well number associated with the specified PACKAGEDATA data on the
line. MAWNO must be greater than zero and less than or equal to NMAWWELLS. Well information must be
specified for every well or the program will terminate with an error. The program will also terminate with an
error if information for a well is specified more than once.
• strt real value that defines the starting temperature for the well.
• ktf is the thermal conductivity of the material between the aquifer cell and the feature. The thickness of the
material is defined by the variable FTHK.
• fthk real value that defines the thickness of the material through which conduction occurs. Must be greater than
0.
• aux represents the values of the auxiliary variables for each well. The values of auxiliary variables must be
present for each well. The values must be specified in the order of the auxiliary variables specified in the OP-
TIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry
(see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-series
name in place of a numeric value.
• boundname name of the well cell. BOUNDNAME is an ASCII character variable that can contain as many as 40
characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.

3.5. Groundwater Energy Transport 197


MODFLOW 6

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• mawno integer value that defines the well number associated with the specified PERIOD data on the line.
MAWNO must be greater than zero and less than or equal to NMAWWELLS.
• mwesetting line of information that is parsed into a keyword and values. Keyword values that can be used to start
the MWESETTING string include: STATUS, TEMPERATURE, RAINFALL, EVAPORATION, RUNOFF, and
AUXILIARY. These settings are used to assign the temperature of associated with the corresponding flow terms.
Temperatures cannot be specified for all flow terms. For example, the Multi-Aquifer Well Package supports a
“WITHDRAWAL” flow term. If this withdrawal term is active, then water will be withdrawn from the well at
the calculated temperature of the well.

STATUS <status>
TEMPERATURE <temperature>
RATE <rate>
AUXILIARY <auxname> <auxval>

• status keyword option to define well status. STATUS can be ACTIVE, INACTIVE, or CONSTANT. By default,
STATUS is ACTIVE, which means that temperature will be calculated for the well. If a well is inactive, then
there will be no solute mass fluxes into or out of the well and the inactive value will be written for the well
temperature. If a well is constant, then the temperature for the well will be fixed at the user specified value.
• temperature real or character value that defines the temperature for the well. The specified TEMPERATURE is
only applied if the well is a constant temperature well. If the Options block includes a TIMESERIESFILE entry
(see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-series
name in place of a numeric value.
• rate real or character value that defines the injection temperature (e.g.,:circC:or:circF) for the well. If the Options
block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from
a time series by entering the time-series name in place of a numeric value.
• AUXILIARY keyword for specifying auxiliary variable.
• auxname name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary
variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable
names defined in the OPTIONS block the data are ignored.
• auxval value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.

Example Input File

BEGIN OPTIONS
AUXILIARY aux1 aux2
BOUNDNAMES
PRINT_INPUT
PRINT_TEMPERATURE
PRINT_FLOWS
SAVE_FLOWS
TEMPERATURE FILEOUT gwe_mwe_02.mwe.bin
(continues on next page)

198 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


BUDGET FILEOUT gwe_mwe_02.mwe.bud
OBS6 FILEIN gwe_mwe_02.mwe.obs
END OPTIONS

BEGIN PACKAGEDATA
# L STRT aux1 aux2 bname
1 10.00 99.00 999.00 MYWELL1
2 10.00 99.00 999.00 MYWELL2
3 10.00 99.00 999.00 MYWELL3
END PACKAGEDATA

BEGIN PERIOD 1
1 STATUS ACTIVE
2 STATUS ACTIVE
3 STATUS ACTIVE
END PERIOD 1

Available Observation Types


Example Observation Input File

BEGIN options
DIGITS 12
PRINT_INPUT
END options

BEGIN continuous FILEOUT gwe_mwe_02.mwe.obs.csv


# obsname obstype id1 id2
mwe1mwe MWE 1 1
mwe2mwe MWE 2 1
mwe3mwe MWE 3 1
mwe4mwe MWE 4 1
mwe1temp TEMPERATURE 1
mwe2temp TEMPERATURE 2
mwe3temp TEMPERATURE 3
mwe4temp TEMPERATURE 4
mwe1stor STORAGE 1
mwe2stor STORAGE 2
mwe3stor STORAGE 3
mwe4stor STORAGE 4
mwe1cnst CONSTANT 1
mwe2cnst CONSTANT 2
mwe3cnst CONSTANT 3
mwe4cnst CONSTANT 4
mwe1fmvr FROM-MVR 1
mwe2fmvr FROM-MVR 2
mwe3fmvr FROM-MVR 3
mwe4fmvr FROM-MVR 4
mwe1rate RATE 1
mwe2rate RATE 2
mwe3rate RATE 3
mwe4rate RATE 4
(continues on next page)

3.5. Groundwater Energy Transport 199


MODFLOW 6

(continued from previous page)


mwe1rtmv RATE-TO-MVR 1
mwe2rtmv RATE-TO-MVR 2
mwe3rtmv RATE-TO-MVR 3
mwe4rtmv RATE-TO-MVR 4
mwe1fwrt FW-RATE 1
mwe2fwrt FW-RATE 2
mwe3fwrt FW-RATE 3
mwe4fwrt FW-RATE 4
mwe1frtm FW-RATE-TO-MVR 1
mwe2frtm FW-RATE-TO-MVR 2
mwe3frtm FW-RATE-TO-MVR 3
mwe4frtm FW-RATE-TO-MVR 4
END continuous FILEOUT gwe_mwe_02.mwe.obs.csv

3.5.14 GWE-NAM
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[LIST <list>]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[NETCDF_MESH2D FILEOUT <ncmesh2dfile>]
[NETCDF_STRUCTURED FILEOUT <ncstructfile>]
[NETCDF FILEIN <netcdf_filename>]
END OPTIONS

BEGIN PACKAGES
<ftype> <fname> [<pname>]
<ftype> <fname> [<pname>]
...
END PACKAGES

Explanation of Variables
Block: OPTIONS

• list is name of the listing file to create for this GWE model. If not specified, then the name of the list file will
be the basename of the GWE model name file and the “.lst” extension. For example, if the GWE name file is
called “my.model.nam” then the list file will be called “my.model.lst”.
• PRINT_INPUT keyword to indicate that the list of all model stress package information will be written to the
listing file immediately after it is read.
• PRINT_FLOWS keyword to indicate that the list of all model package flow rates will be printed to the listing file for
every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output
Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress
period.
• SAVE_FLOWS keyword to indicate that all model package flow terms will be written to the file specified with
“BUDGET FILEOUT” in Output Control.

200 Chapter 3. Input Guide


MODFLOW 6

• NETCDF_MESH2D keyword to specify that record corresponds to a layered mesh netcdf file.
• NETCDF_STRUCTURED keyword to specify that record corresponds to a structured netcdf file.
• FILEOUT keyword to specify that an output filename is expected next.
• ncmesh2dfile name of the netcdf ugrid layered mesh output file.
• ncstructfile name of the netcdf structured output file.
• NETCDF keyword to specify that record corresponds to a netcdf input file.
• FILEIN keyword to specify that an input filename is expected next.
• netcdf_filename defines a netcdf input file.

Block: PACKAGES

• ftype is the file type, which must be one of the following character values shown in table ref{table:ftype-gwe}.
Ftype may be entered in any combination of uppercase and lowercase.
• fname is the name of the file containing the package input. The path to the file should be included if the file is
not located in the folder where the program was run.
• pname is the user-defined name for the package. PNAME is restricted to 16 characters. No spaces are allowed
in PNAME. PNAME character values are read and stored by the program for stress packages only. These names
may be useful for labeling purposes when multiple stress packages of the same type are located within a single
GWE Model. If PNAME is specified for a stress package, then PNAME will be used in the flow budget table in
the listing file; it will also be used for the text entry in the cell-by-cell budget file. PNAME is case insensitive
and is stored in all upper case letters.

Example Input File

# This block is optional


BEGIN OPTIONS
END OPTIONS

BEGIN PACKAGES
DIS6 heat_transport.dis
IC6 heat_transport.ic
EST6 heat_transport.est
ADV6 heat_transport.adv
CND6 heat_transport.cnd
SSM6 heat_transport.ssm
CTP6 heat_transport01.ctp LEFT
CTP6 heat_transport02.ctp RIGHT
OC6 heat_transport.oc
END PACKAGES

3.5.15 GWE-OC
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[BUDGET FILEOUT <budgetfile>]
(continues on next page)

3.5. Groundwater Energy Transport 201


MODFLOW 6

(continued from previous page)


[BUDGETCSV FILEOUT <budgetcsvfile>]
[TEMPERATURE FILEOUT <temperaturefile>]
[TEMPERATURE PRINT_FORMAT COLUMNS <columns> WIDTH <width> DIGITS <digits> <format>]
END OPTIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


[SAVE <rtype> <ocsetting>]
[PRINT <rtype> <ocsetting>]
END PERIOD

Explanation of Variables
Block: OPTIONS

• BUDGET keyword to specify that record corresponds to the budget.


• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.
• TEMPERATURE keyword to specify that record corresponds to temperature.
• temperaturefile name of the output file to write temperature information.
• PRINT_FORMAT keyword to specify format for printing to the listing file.
• columns number of columns for writing data.
• width width for writing each number.
• digits number of digits to use for writing a number.
• format write format can be EXPONENTIAL, FIXED, GENERAL, or SCIENTIFIC.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• SAVE keyword to indicate that information will be saved this stress period.
• PRINT keyword to indicate that information will be printed this stress period.
• rtype type of information to save or print. Can be BUDGET or TEMPERATURE.
• ocsetting specifies the steps for which the data will be saved.

ALL
FIRST
LAST
(continues on next page)

202 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


FREQUENCY <frequency>
STEPS <steps>

• ALL keyword to indicate save for all time steps in period.


• FIRST keyword to indicate save for first step in period. This keyword may be used in conjunction with other
keywords to print or save results for multiple time steps.
• LAST keyword to indicate save for last step in period. This keyword may be used in conjunction with other
keywords to print or save results for multiple time steps.
• frequency save at the specified time step frequency. This keyword may be used in conjunction with other
keywords to print or save results for multiple time steps.
• steps save for each step specified in STEPS. This keyword may be used in conjunction with other keywords to
print or save results for multiple time steps.

Example Input File

BEGIN OPTIONS
TEMPERATURE FILEOUT gw_temperatures.ucn
TEMPERATURE PRINT_FORMAT COLUMNS 15 WIDTH 7 DIGITS 2 FIXED
END OPTIONS

BEGIN PERIOD 1
PRINT BUDGET ALL
SAVE TEMPERATURE ALL
PRINT TEMPERATURE ALL
END PERIOD

3.5.16 GWE-SFE
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[FLOW_PACKAGE_NAME <flow_package_name>]
[AUXILIARY <auxiliary>]
[FLOW_PACKAGE_AUXILIARY_NAME <flow_package_auxiliary_name>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_TEMPERATURE]
[PRINT_FLOWS]
[SAVE_FLOWS]
[TEMPERATURE FILEOUT <tempfile>]
[BUDGET FILEOUT <budgetfile>]
[BUDGETCSV FILEOUT <budgetcsvfile>]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
END OPTIONS

BEGIN PACKAGEDATA
<rno> <strt> <ktf> <rbthcnd> [<aux(naux)>] [<boundname>]
(continues on next page)

3.5. Groundwater Energy Transport 203


MODFLOW 6

(continued from previous page)


<rno> <strt> <ktf> <rbthcnd> [<aux(naux)>] [<boundname>]
...
END PACKAGEDATA

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<rno> <reachsetting>
<rno> <reachsetting>
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• flow_package_name keyword to specify the name of the corresponding flow package. If not specified, then the
corresponding flow package must have the same name as this advanced transport package (the name associated
with this package in the GWE name file).
• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• flow_package_auxiliary_name keyword to specify the name of an auxiliary variable provided in the cor-
responding flow package (i.e., FLOW_PACKAGE_NAME). If specified, then the simulated temperatures from
this advanced energy transport package will be copied into the auxiliary variable specified with this name. Note
that the flow package must have an auxiliary variable with this name or the program will terminate with an error.
If the flows for this advanced energy transport package are read from a file, then this option will have no effect.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of reach cells.
• PRINT_INPUT keyword to indicate that the list of reach information will be written to the listing file immediately
after it is read.
• PRINT_TEMPERATURE keyword to indicate that the list of reach temperatures will be printed to the listing file for
every stress period in which “TEMPERATURE PRINT” is specified in Output Control. If there is no Output
Control option and PRINT_TEMPERATURE is specified, then temperatures are printed for the last time step of
each stress period.
• PRINT_FLOWS keyword to indicate that the list of reach flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that reach flow terms will be written to the file specified with “BUDGET
FILEOUT” in Output Control.
• TEMPERATURE keyword to specify that record corresponds to temperature.
• tempfile name of the binary output file to write temperature information.
• BUDGET keyword to specify that record corresponds to the budget.
• FILEOUT keyword to specify that an output filename is expected next.

204 Chapter 3. Input Guide


MODFLOW 6

• budgetfile name of the binary output file to write budget information.


• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the SFE package. See the “Observation utility” sec-
tion for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and ref{table:gwt-
obstypetable} lists observation type(s) supported by the SFE package.

Block: PACKAGEDATA

• rno integer value that defines the reach number associated with the specified PACKAGEDATA data on the line.
RNO must be greater than zero and less than or equal to NREACHES. Reach information must be specified
for every reach or the program will terminate with an error. The program will also terminate with an error if
information for a reach is specified more than once.
• strt real value that defines the starting temperature for the reach.
• ktf is the thermal conductivity of the material between the aquifer cell and the stream reach. The thickness of
the material is defined by the variable RBTHCND.
• rbthcnd real value that defines the thickness of the streambed material through which conduction occurs. Must
be greater than 0.
• aux represents the values of the auxiliary variables for each reach. The values of auxiliary variables must be
present for each reach. The values must be specified in the order of the auxiliary variables specified in the
OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry
(see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-series
name in place of a numeric value.
• boundname name of the reach cell. BOUNDNAME is an ASCII character variable that can contain as many
as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single
quotes.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• rno integer value that defines the reach number associated with the specified PERIOD data on the line. RNO
must be greater than zero and less than or equal to NREACHES.
• reachsetting line of information that is parsed into a keyword and values. Keyword values that can be
used to start the REACHSETTING string include: STATUS, TEMPERATURE, RAINFALL, EVAPORATION,
RUNOFF, and AUXILIARY. These settings are used to assign the temperature of associated with the corre-
sponding flow terms. Temperatures cannot be specified for all flow terms. For example, the Streamflow Package

3.5. Groundwater Energy Transport 205


MODFLOW 6

supports a “DIVERSION” flow term. Diversion water will be routed using the calculated temperature of the
reach.

STATUS <status>
TEMPERATURE <temperature>
RAINFALL <rainfall>
EVAPORATION <evaporation>
RUNOFF <runoff>
INFLOW <inflow>
AUXILIARY <auxname> <auxval>

• status keyword option to define reach status. STATUS can be ACTIVE, INACTIVE, or CONSTANT. By
default, STATUS is ACTIVE, which means that temperature will be calculated for the reach. If a reach is inactive,
then there will be no energy fluxes into or out of the reach and the inactive value will be written for the reach
temperature. If a reach is constant, then the temperature for the reach will be fixed at the user specified value.
• temperature real or character value that defines the temperature for the reach. The specified TEMPERATURE
is only applied if the reach is a constant temperature reach. If the Options block includes a TIMESERIESFILE
entry (see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-
series name in place of a numeric value.
• rainfall real or character value that defines the rainfall temperature (e.g.,:circC:or:circF) for the reach. If
the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be
obtained from a time series by entering the time-series name in place of a numeric value.
• evaporation use of the EVAPORATION keyword is allowed in the SFE package; however, the specified value
is not currently used in SFE calculations. Instead, the latent heat of evaporation is multiplied by the simulated
evaporation rate for determining the thermal energy lost from a stream reach.
• runoff real or character value that defines the temperature of runoff (e.g.,:circC:or:circF) for the reach. Users
are free to use whatever temperature scale they want, which might include negative temperatures. If the Options
block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from
a time series by entering the time-series name in place of a numeric value.
• inflow real or character value that defines the temperature of inflow (e.g.,:circC:or:circF) for the reach. Users
are free to use whatever temperature scale they want, which might include negative temperatures. If the Options
block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from
a time series by entering the time-series name in place of a numeric value.
• AUXILIARY keyword for specifying auxiliary variable.
• auxname name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary
variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable
names defined in the OPTIONS block the data are ignored.
• auxval value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.

Example Input File

BEGIN OPTIONS
AUXILIARY aux1 aux2
BOUNDNAMES
PRINT_INPUT
PRINT_TEMPERATURE
PRINT_FLOWS
(continues on next page)

206 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


SAVE_FLOWS
TEMPERATURE FILEOUT gwe_sfe_02.sfe.bin
BUDGET FILEOUT gwe_sfe_02.sfe.bud
OBS6 FILEIN gwe_sfe_02.sfe.obs
END OPTIONS

BEGIN PACKAGEDATA
# L STRT aux1 aux2 bname
1 5.000 9.90 99.90 REACH1
2 5.000 9.90 99.90 REACH2
3 5.000 9.90 99.90 REACH3
END PACKAGEDATA

BEGIN PERIOD 1
1 STATUS ACTIVE
2 STATUS ACTIVE
3 STATUS ACTIVE
END PERIOD 1

Available Observation Types


Example Observation Input File

BEGIN options
DIGITS 7
PRINT_INPUT
END options

BEGIN continuous FILEOUT gwe_sfe02.sfe.obs.csv


# obsname obstype id1 id2
sfe-1-temp TEMPERATURE 1
sfe-1-extinflow EXT-INFLOW 1
sfe-1-rain RAINFALL 1
sfe-1-roff RUNOFF 1
sfe-1-stor STORAGE 1
sfe-1-const CONSTANT 1
sfe-1-gwe1 SFE 1 1
sfe-1-gwe2 SFE 1 2
sfe-2-gwe1 SFE 2 1
sfe-1-mylake1 SFE MYREACHES
sfe-1-fjf FLOW-JA-FACE 1 2
sfe-2-fjf FLOW-JA-FACE 2 1
sfe-3-fjf FLOW-JA-FACE 2 3
sfe-4-fjf FLOW-JA-FACE 3 2
sfe-5-fjf FLOW-JA-FACE MYREACH1
sfe-6-fjf FLOW-JA-FACE MYREACH2
sfe-7-fjf FLOW-JA-FACE MYREACH3
END continuous

3.5. Groundwater Energy Transport 207


MODFLOW 6

3.5.17 GWE-SSM
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[PRINT_FLOWS]
[SAVE_FLOWS]
END OPTIONS

BEGIN SOURCES
<pname> <srctype> <auxname>
<pname> <srctype> <auxname>
...
END SOURCES

BEGIN FILEINPUT
[<pname> SPC6 FILEIN <spc6_filename> [MIXED]
<pname> SPC6 FILEIN <spc6_filename> [MIXED]
...]
END FILEINPUT

Explanation of Variables
Block: OPTIONS

• PRINT_FLOWS keyword to indicate that the list of SSM flow rates will be printed to the listing file for every stress
period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option
and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress period.
• SAVE_FLOWS keyword to indicate that SSM flow terms will be written to the file specified with “BUDGET
FILEOUT” in Output Control.

Block: SOURCES

• pname name of the flow package for which an auxiliary variable contains a source temperature. If this flow
package is represented using an advanced transport package (SFE, LKE, MWE, or UZE), then the advanced
transport package will override SSM terms specified here.
• srctype keyword indicating how temperature will be assigned for sources and sinks. Keyword must be specified
as either AUX or AUXMIXED. For both options the user must provide an auxiliary variable in the corresponding
flow package. The auxiliary variable must have the same name as the AUXNAME value that follows. If the AUX
keyword is specified, then the auxiliary variable specified by the user will be assigned as the temperature value for
groundwater sources (flows with a positive sign). For negative flow rates (sinks), groundwater will be withdrawn
from the cell at the simulated temperature of the cell. The AUXMIXED option provides an alternative method
for how to determine the temperature of sinks. If the cell temperature is larger than the user-specified auxiliary
temperature, then the temperature of groundwater withdrawn from the cell will be assigned as the user-specified
temperature. Alternatively, if the user-specified auxiliary temperature is larger than the cell temperature, then
groundwater will be withdrawn at the cell temperature. Thus, the AUXMIXED option is designed to work with
the Evapotranspiration (EVT) and Recharge (RCH) Packages where water may be withdrawn at a temperature
that is less than the cell temperature.
• auxname name of the auxiliary variable in the package PNAME. This auxiliary variable must exist and be speci-
fied by the user in that package. The values in this auxiliary variable will be used to set the temperature associated
with the flows for that boundary package.

208 Chapter 3. Input Guide


MODFLOW 6

Block: FILEINPUT

• pname name of the flow package for which an SPC6 input file contains a source temperature. If this flow package
is represented using an advanced transport package (SFE, LKE, MWE, or UZE), then the advanced transport
package will override SSM terms specified here.
• SPC6 keyword to specify that record corresponds to a source sink mixing input file.
• FILEIN keyword to specify that an input filename is expected next.
• spc6_filename character string that defines the path and filename for the file containing source and sink input
data for the flow package. The SPC6_FILENAME file is a flexible input file that allows temperatures to be
specified by stress period and with time series. Instructions for creating the SPC6_FILENAME input file are
provided in the next section on file input for boundary temperatures.
• MIXED keyword to specify that these stress package boundaries will have the mixed condition. The MIXED
condition is described in the SOURCES block for AUXMIXED. The MIXED condition allows for water to
be withdrawn at a temperature that is less than the cell temperature. It is intended primarily for representing
evapotranspiration.

Example Input File

BEGIN OPTIONS
PRINT_FLOWS
SAVE_FLOWS
END OPTIONS

BEGIN SOURCES
# pname srctype auxname
WEL-1 AUX TEMPERATURE
LAK-1 AUX TEMPERATURE
RCH-1 AUX TEMPERATURE
END SOURCES

BEGIN FILEINPUT
GHB-1 SPC6 FILEINPUT mymodel.ghb1.spc
DRN-1 SPC6 FILEINPUT mymodel.drn1.spc
END FILEINPUT

3.5.18 GWE-UZE
Structure of Blocks
FOR EACH SIMULATION
BEGIN OPTIONS
[FLOW_PACKAGE_NAME <flow_package_name>]
[AUXILIARY <auxiliary>]
[FLOW_PACKAGE_AUXILIARY_NAME <flow_package_auxiliary_name>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_TEMPERATURE]
[PRINT_FLOWS]
[SAVE_FLOWS]
[TEMPERATURE FILEOUT <tempfile>]
[BUDGET FILEOUT <budgetfile>]
(continues on next page)

3.5. Groundwater Energy Transport 209


MODFLOW 6

(continued from previous page)


[BUDGETCSV FILEOUT <budgetcsvfile>]
[TS6 FILEIN <ts6_filename>]
[OBS6 FILEIN <obs6_filename>]
END OPTIONS

BEGIN PACKAGEDATA
<uzfno> <strt> [<aux(naux)>] [<boundname>]
<uzfno> <strt> [<aux(naux)>] [<boundname>]
...
END PACKAGEDATA

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<uzfno> <uzesetting>
<uzfno> <uzesetting>
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• flow_package_name keyword to specify the name of the corresponding flow package. If not specified, then the
corresponding flow package must have the same name as this advanced transport package (the name associated
with this package in the GWE name file).
• auxiliary defines an array of one or more auxiliary variable names. There is no limit on the number of auxiliary
variables that can be provided on this line; however, lists of information provided in subsequent blocks must have
a column of data for each auxiliary variable name defined here. The number of auxiliary variables detected on
this line determines the value for naux. Comments cannot be provided anywhere on this line as they will be
interpreted as auxiliary variable names. Auxiliary variables may not be used by the package, but they will be
available for use by other parts of the program. The program will terminate with an error if auxiliary variables
are specified on more than one line in the options block.
• flow_package_auxiliary_name keyword to specify the name of an auxiliary variable in the corresponding
flow package. If specified, then the simulated temperatures from this advanced transport package will be copied
into the auxiliary variable specified with this name. Note that the flow package must have an auxiliary variable
with this name or the program will terminate with an error. If the flows for this advanced transport package are
read from a file, then this option will have no effect.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of unsaturated zone flow
cells.
• PRINT_INPUT keyword to indicate that the list of unsaturated zone flow information will be written to the listing
file immediately after it is read.
• PRINT_TEMPERATURE keyword to indicate that the list of UZF cell temperatures will be printed to the listing file
for every stress period in which “TEMPERATURE PRINT” is specified in Output Control. If there is no Output
Control option and PRINT_TEMPERATURE is specified, then temperatures are printed for the last time step of
each stress period.
• PRINT_FLOWS keyword to indicate that the list of unsaturated zone flow rates will be printed to the listing file for
every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output
Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress
period.

210 Chapter 3. Input Guide


MODFLOW 6

• SAVE_FLOWS keyword to indicate that unsaturated zone flow terms will be written to the file specified with
“BUDGET FILEOUT” in Output Control.
• TEMPERATURE keyword to specify that record corresponds to temperature.
• tempfile name of the binary output file to write temperature information.
• BUDGET keyword to specify that record corresponds to the budget.
• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the binary output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename name of input file to define observations for the UZE package. See the “Observation utility” sec-
tion for instructions for preparing observation input files. Tables ref{table:gwf-obstypetable} and ref{table:gwt-
obstypetable} lists observation type(s) supported by the UZE package.

Block: PACKAGEDATA

• uzfno integer value that defines the UZF cell number associated with the specified PACKAGEDATA data on
the line. UZFNO must be greater than zero and less than or equal to NUZFCELLS. Unsaturated zone flow
information must be specified for every UZF cell or the program will terminate with an error. The program also
will terminate with an error if information for a UZF cell is specified more than once.
• strt real value that defines the starting temperature for the unsaturated zone flow cell.
• aux represents the values of the auxiliary variables for each unsaturated zone flow. The values of auxiliary
variables must be present for each unsaturated zone flow. The values must be specified in the order of the
auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block
includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from a time
series by entering the time-series name in place of a numeric value.
• boundname name of the unsaturated zone flow cell. BOUNDNAME is an ASCII character variable that can
contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed
within single quotes.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• uzfno integer value that defines the UZF cell number associated with the specified PERIOD data on the line.
UZFNO must be greater than zero and less than or equal to NUZFCELLS.

3.5. Groundwater Energy Transport 211


MODFLOW 6

• uzesetting line of information that is parsed into a keyword and values. Keyword values that can be used to start
the UZESETTING string include: STATUS, TEMPERATURE, INFILTRATION, UZET, and AUXILIARY.
These settings are used to assign the temperature associated with the corresponding flow terms. Temperatures
cannot be specified for all flow terms.

STATUS <status>
TEMPERATURE <temperature>
INFILTRATION <infiltration>
UZET <uzet>
AUXILIARY <auxname> <auxval>

• status keyword option to define UZF cell status. STATUS can be ACTIVE, INACTIVE, or CONSTANT. By
default, STATUS is ACTIVE, which means that temperature will be calculated for the UZF cell. If a UZF cell
is inactive, then there will be no energy fluxes into or out of the UZF cell and the inactive value will be written
for the UZF cell temperature. If a UZF cell is constant, then the temperature for the UZF cell will be fixed at the
user specified value.
• temperature real or character value that defines the temperature for the unsaturated zone flow cell. The specified
TEMPERATURE is only applied if the unsaturated zone flow cell is a constant temperature cell. If the Options
block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section), values can be obtained from
a time series by entering the time-series name in place of a numeric value.
• infiltration real or character value that defines the temperature of the infiltration (e.g.,:circC:or:circF) for
the UZF cell. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable Input” section),
values can be obtained from a time series by entering the time-series name in place of a numeric value.
• uzet real or character value that states what fraction of the simulated unsaturated zone evapotranspiration is
associated with evaporation. The evaporative losses from the unsaturated zone moisture content will have an
evaporative cooling effect on the GWE cell from which the evaporation originated. If this value is larger than
1, then it will be reset to 1. If the Options block includes a TIMESERIESFILE entry (see the “Time-Variable
Input” section), values can be obtained from a time series by entering the time-series name in place of a numeric
value.
• AUXILIARY keyword for specifying auxiliary variable.
• auxname name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary
variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable
names defined in the OPTIONS block the data are ignored.
• auxval value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the “Time-
Variable Input” section), values can be obtained from a time series by entering the time-series name in place of
a numeric value.

Example Input File

BEGIN OPTIONS
AUXILIARY aux1 aux2
BOUNDNAMES
PRINT_INPUT
PRINT_TEMPERATURE
PRINT_FLOWS
SAVE_FLOWS
TEMPERATURE FILEOUT gwe_02.uze.bin
BUDGET FILEOUT gwe_02.uze.bud
OBS6 FILEIN gwe_02.uze.obs
END OPTIONS
(continues on next page)

212 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)

BEGIN PACKAGEDATA
# L STRT aux1 aux2 bname
1 0.0 99.0 999.0 MYUZFCELL1
2 0.0 99.0 999.0 MYUZFCELL2
3 0.0 99.0 999.0 MYUZFCELL3
END PACKAGEDATA

BEGIN PERIOD 1
1 STATUS ACTIVE
2 STATUS ACTIVE
3 STATUS ACTIVE
END PERIOD 1

Available Observation Types


Example Observation Input File

BEGIN options
DIGITS 7
PRINT_INPUT
END options

BEGIN continuous FILEOUT gwe_02.uze.obs.csv


# obsname obstype id1 id2
mwe-1-temp TEMPERATURE 1
mwe-1-stor STORAGE 1
mwe-1-gwe1 UZE 1
mwe-1-gwe2 UZE 2
mwe-2-gwe1 UZE 3
END continuous

3.6 Particle Tracking


3.6.1 PRT-DIS
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[LENGTH_UNITS <length_units>]
[NOGRB]
[GRB6 FILEOUT <grb6_filename>]
[XORIGIN <xorigin>]
[YORIGIN <yorigin>]
[ANGROT <angrot>]
[EXPORT_ARRAY_ASCII]
[EXPORT_ARRAY_NETCDF]
[CRS <crs>]
[NCF6 FILEIN <ncf6_filename>]
END OPTIONS

3.6. Particle Tracking 213


MODFLOW 6

BEGIN DIMENSIONS
NLAY <nlay>
NROW <nrow>
NCOL <ncol>
END DIMENSIONS

BEGIN GRIDDATA
DELR
<delr(ncol)> -- READARRAY
DELC
<delc(nrow)> -- READARRAY
TOP
<top(ncol, nrow)> -- READARRAY
BOTM [LAYERED]
<botm(ncol, nrow, nlay)> -- READARRAY
[IDOMAIN [LAYERED]
<idomain(ncol, nrow, nlay)> -- READARRAY]
END GRIDDATA

Explanation of Variables
Block: OPTIONS

• length_units is the length units used for this model. Values can be “FEET”, “METERS”, or “CENTIME-
TERS”. If not specified, the default is “UNKNOWN”.
• NOGRB keyword to deactivate writing of the binary grid file.
• GRB6 keyword to specify that record corresponds to a binary grid file.
• FILEOUT keyword to specify that an output filename is expected next.
• grb6_filename defines a binary grid output file. If this option is not provided, the output file will have the same
name as the discretization input file, plus extension “.grb”.
• xorigin x-position of the lower-left corner of the model grid. A default value of zero is assigned if not specified.
The value for XORIGIN does not affect the model simulation, but it is written to the binary grid file so that
postprocessors can locate the grid in space.
• yorigin y-position of the lower-left corner of the model grid. If not specified, then a default value equal to zero
is used. The value for YORIGIN does not affect the model simulation, but it is written to the binary grid file so
that postprocessors can locate the grid in space.
• angrot counter-clockwise rotation angle (in degrees) of the lower-left corner of the model grid. If not specified,
then a default value of 0.0 is assigned. The value for ANGROT does not affect the model simulation, but it is
written to the binary grid file so that postprocessors can locate the grid in space.
• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.
• crs is a real-world coordinate reference system (CRS) for the model, for example, an EPSG integer code (e.g.
26915), authority string (i.e. epsg:26915), or Open Geospatial Consortium Well-Known Text (WKT) specifica-
tion. Limited to 5000 characters. The entry for CRS does not affect the model simulation, but it is written to the
binary grid file so that postprocessors can locate the grid in space.
• NCF6 keyword to specify that record corresponds to a netcdf configuration (NCF) file.

214 Chapter 3. Input Guide


MODFLOW 6

• FILEIN keyword to specify that an input filename is expected next.


• ncf6_filename defines a netcdf configuration (NCF) input file.

Block: DIMENSIONS

• nlay is the number of layers in the model grid.


• nrow is the number of rows in the model grid.
• ncol is the number of columns in the model grid.

Block: GRIDDATA

• delr is the column spacing in the row direction.


• delc is the row spacing in the column direction.
• top is the top elevation for each cell in the top model layer.
• botm is the bottom elevation for each cell.
• idomain is an optional array that characterizes the existence status of a cell. If the IDOMAIN array is not
specified, then all model cells exist within the solution. If the IDOMAIN value for a cell is 0, the cell does not
exist in the simulation. Input and output values will be read and written for the cell, but internal to the program,
the cell is excluded from the solution. If the IDOMAIN value for a cell is 1, the cell exists in the simulation. If
the IDOMAIN value for a cell is -1, the cell does not exist in the simulation. Furthermore, the first existing cell
above will be connected to the first existing cell below. This type of cell is referred to as a “vertical pass through”
cell.

3.6.2 PRT-DISV
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[LENGTH_UNITS <length_units>]
[NOGRB]
[GRB6 FILEOUT <grb6_filename>]
[XORIGIN <xorigin>]
[YORIGIN <yorigin>]
[ANGROT <angrot>]
[EXPORT_ARRAY_ASCII]
[EXPORT_ARRAY_NETCDF]
[CRS <crs>]
[NCF6 FILEIN <ncf6_filename>]
END OPTIONS

BEGIN DIMENSIONS
NLAY <nlay>
NCPL <ncpl>
NVERT <nvert>
END DIMENSIONS

BEGIN GRIDDATA
TOP
(continues on next page)

3.6. Particle Tracking 215


MODFLOW 6

(continued from previous page)


<top(ncpl)> -- READARRAY
BOTM [LAYERED]
<botm(ncpl, nlay)> -- READARRAY
[IDOMAIN [LAYERED]
<idomain(ncpl, nlay)> -- READARRAY]
END GRIDDATA

BEGIN VERTICES
<iv> <xv> <yv>
<iv> <xv> <yv>
...
END VERTICES

BEGIN CELL2D
<icell2d> <xc> <yc> <ncvert> <icvert>
<icell2d> <xc> <yc> <ncvert> <icvert>
...
END CELL2D

Explanation of Variables
Block: OPTIONS

• length_units is the length units used for this model. Values can be “FEET”, “METERS”, or “CENTIME-
TERS”. If not specified, the default is “UNKNOWN”.
• NOGRB keyword to deactivate writing of the binary grid file.
• GRB6 keyword to specify that record corresponds to a binary grid file.
• FILEOUT keyword to specify that an output filename is expected next. If this option is not provided, the output
file will have the same name as the discretization input file, plus extension “.grb”.
• grb6_filename defines a binary grid output file.
• xorigin x-position of the origin used for model grid vertices. This value should be provided in a real-world
coordinate system. A default value of zero is assigned if not specified. The value for XORIGIN does not affect
the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.
• yorigin y-position of the origin used for model grid vertices. This value should be provided in a real-world
coordinate system. If not specified, then a default value equal to zero is used. The value for YORIGIN does not
affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in
space.
• angrot counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world
coordinate system. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not
affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in
space.
• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.
• EXPORT_ARRAY_NETCDF keyword that specifies input griddata arrays should be written to the model output netcdf
file.
• crs is a real-world coordinate reference system (CRS) for the model, for example, an EPSG integer code (e.g.
26915), authority string (i.e. epsg:26915), or Open Geospatial Consortium Well-Known Text (WKT) specifica-

216 Chapter 3. Input Guide


MODFLOW 6

tion. Limited to 5000 characters. The entry for CRS does not affect the model simulation, but it is written to the
binary grid file so that postprocessors can locate the grid in space.
• NCF6 keyword to specify that record corresponds to a netcdf configuration (NCF) file.
• FILEIN keyword to specify that an input filename is expected next.
• ncf6_filename defines a netcdf configuration (NCF) input file.

Block: DIMENSIONS

• nlay is the number of layers in the model grid.


• ncpl is the number of cells per layer. This is a constant value for the grid and it applies to all layers.
• nvert is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model
grid.

Block: GRIDDATA

• top is the top elevation for each cell in the top model layer.
• botm is the bottom elevation for each cell.
• idomain is an optional array that characterizes the existence status of a cell. If the IDOMAIN array is not
specified, then all model cells exist within the solution. If the IDOMAIN value for a cell is 0, the cell does not
exist in the simulation. Input and output values will be read and written for the cell, but internal to the program,
the cell is excluded from the solution. If the IDOMAIN value for a cell is 1, the cell exists in the simulation. If
the IDOMAIN value for a cell is -1, the cell does not exist in the simulation. Furthermore, the first existing cell
above will be connected to the first existing cell below. This type of cell is referred to as a “vertical pass through”
cell.

Block: VERTICES

• iv is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.
• xv is the x-coordinate for the vertex.
• yv is the y-coordinate for the vertex.

Block: CELL2D

• icell2d is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the
first to the last.
• xc is the x-coordinate for the cell center.
• yc is the y-coordinate for the cell center.
• ncvert is the number of vertices required to define the cell. There may be a different number of vertices for
each cell.
• icvert is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell.
Vertices must be listed in clockwise order. Cells that are connected must share vertices.

3.6.3 PRT-FMI
Structure of Blocks
FOR EACH SIMULATION

3.6. Particle Tracking 217


MODFLOW 6

BEGIN OPTIONS
[SAVE_FLOWS]
END OPTIONS

BEGIN PACKAGEDATA
<flowtype> FILEIN <fname>
<flowtype> FILEIN <fname>
...
END PACKAGEDATA

Explanation of Variables
Block: OPTIONS

• SAVE_FLOWS keyword to indicate that FMI flow terms will be written to the file specified with “BUDGET FILE-
OUT” in Output Control.

Block: PACKAGEDATA

• flowtype is the word GWFBUDGET, GWFHEAD, or GWFGRID. If GWFBUDGET is specified, then the
corresponding file must be a budget file. If GWFHEAD is specified, the file must be a head file. If GWFGRID
is specified, the file must be a binary grid file.
• FILEIN keyword to specify that an input filename is expected next.
• fname is the name of the file containing flows. The path to the file should be included if the file is not located in
the folder where the program was run.

Example Input File

BEGIN OPTIONS
END OPTIONS

BEGIN PACKAGEDATA
GWFBUDGET FILEIN ../flow/mygwfmodel.bud
GWFHEAD FILEIN ../flow/mygwfmodel.hds
END PACKAGEDATA

3.6.4 PRT-MIP
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[EXPORT_ARRAY_ASCII]
END OPTIONS

BEGIN GRIDDATA
POROSITY [LAYERED]
<porosity(nodes)> -- READARRAY
[RETFACTOR [LAYERED]
<retfactor(nodes)> -- READARRAY]
(continues on next page)

218 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


[IZONE [LAYERED]
<izone(nodes)> -- READARRAY]
END GRIDDATA

Explanation of Variables
Block: OPTIONS

• EXPORT_ARRAY_ASCII keyword that specifies input griddata arrays should be written to layered ascii output
files.

Block: GRIDDATA

• porosity is the aquifer porosity.


• retfactor is a real value by which velocity is divided within a given cell. RETFACTOR can be used to account
for solute retardation, i.e., the apparent effect of linear sorption on the velocity of particles that track solute
advection. RETFACTOR may be assigned any real value. A RETFACTOR value greater than 1 represents
particle retardation (slowing), and a value of 1 represents no retardation. The effect of specifying a RETFACTOR
value for each cell is the same as the effect of directly multiplying the POROSITY in each cell by the proposed
RETFACTOR value for each cell. RETFACTOR allows conceptual isolation of effects such as retardation from
the effect of porosity. The default value is 1.
• izone is an integer zone number assigned to each cell. IZONE may be positive, negative, or zero. The current
cell’s zone number is recorded with each particle track datum. If a PRP package’s ISTOPZONE option is set to
any value other than zero, particles released by that PRP Package terminate if they enter a cell whose IZONE
value matches ISTOPZONE. If ISTOPZONE is not specified or is set to zero in a PRP Package, IZONE has no
effect on the termination of particles released by that PRP Package. Each PRP Package may configure a single
ISTOPZONE value.

Example Input File

#The OPTIONS block is optional


BEGIN OPTIONS
END OPTIONS

#The GRIDDATA block is required


BEGIN GRIDDATA
POROSITY
CONSTANT 1.
END GRIDDATA

3.6.5 PRT-NAM
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[LIST <list>]
[PRINT_INPUT]
[PRINT_FLOWS]
(continues on next page)

3.6. Particle Tracking 219


MODFLOW 6

(continued from previous page)


[SAVE_FLOWS]
END OPTIONS

BEGIN PACKAGES
<ftype> <fname> [<pname>]
<ftype> <fname> [<pname>]
...
END PACKAGES

Explanation of Variables
Block: OPTIONS

• list is name of the listing file to create for this PRT model. If not specified, then the name of the list file will
be the basename of the PRT model name file and the ‘.lst’ extension. For example, if the PRT name file is called
“my.model.nam” then the list file will be called “my.model.lst”.
• PRINT_INPUT keyword to indicate that the list of all model stress package information will be written to the
listing file immediately after it is read.
• PRINT_FLOWS keyword to indicate that the list of all model package flow rates will be printed to the listing file for
every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output
Control option and “PRINT_FLOWS” is specified, then flow rates are printed for the last time step of each stress
period.
• SAVE_FLOWS keyword to indicate that all model package flow terms will be written to the file specified with
“BUDGET FILEOUT” in Output Control.

Block: PACKAGES

• ftype is the file type, which must be one of the following character values shown in table ref{table:ftype-prt}.
Ftype may be entered in any combination of uppercase and lowercase.
• fname is the name of the file containing the package input. The path to the file should be included if the file is
not located in the folder where the program was run.
• pname is the user-defined name for the package. PNAME is restricted to 16 characters. No spaces are allowed
in PNAME. PNAME character values are read and stored by the program for stress packages only. These names
may be useful for labeling purposes when multiple stress packages of the same type are located within a single
PRT Model. If PNAME is specified for a stress package, then PNAME will be used in the flow budget table in
the listing file; it will also be used for the text entry in the cell-by-cell budget file. PNAME is case insensitive
and is stored in all upper case letters.

Example Input File

# This block is optional


BEGIN OPTIONS
END OPTIONS

BEGIN PACKAGES
DIS6 parttrack.dis
MIP6 parttrack.mip
PRP6 parttrack.prp
OC6 parttrack.oc
(continues on next page)

220 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


END PACKAGES

3.6.6 PRT-OC
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[BUDGET FILEOUT <budgetfile>]
[BUDGETCSV FILEOUT <budgetcsvfile>]
[TRACK FILEOUT <trackfile>]
[TRACKCSV FILEOUT <trackcsvfile>]
[TRACK_RELEASE]
[TRACK_EXIT]
[TRACK_TIMESTEP]
[TRACK_TERMINATE]
[TRACK_WEAKSINK]
[TRACK_USERTIME]
END OPTIONS

BEGIN DIMENSIONS
NTRACKTIMES <ntracktimes>
END DIMENSIONS

BEGIN TRACKTIMES
<time>
<time>
...
END TRACKTIMES

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


[SAVE <rtype> <ocsetting>]
[PRINT <rtype> <ocsetting>]
END PERIOD

Explanation of Variables
Block: OPTIONS

• BUDGET keyword to specify that record corresponds to the budget.


• FILEOUT keyword to specify that an output filename is expected next.
• budgetfile name of the output file to write budget information.
• BUDGETCSV keyword to specify that record corresponds to the budget CSV.
• budgetcsvfile name of the comma-separated value (CSV) output file to write budget summary information.
A budget summary record will be written to this file for each time step of the simulation.

3.6. Particle Tracking 221


MODFLOW 6

• TRACK keyword to specify that record corresponds to a binary track file. Each PRT Model’s OC Package may
have only one binary track output file.
• trackfile name of the binary output file to write tracking information.
• TRACKCSV keyword to specify that record corresponds to a CSV track file. Each PRT Model’s OC Package may
have only one CSV track file.
• trackcsvfile name of the comma-separated value (CSV) file to write tracking information.
• TRACK_RELEASE keyword to indicate that particle tracking output is to be written when a particle is released
• TRACK_EXIT keyword to indicate that particle tracking output is to be written when a particle exits a feature (a
model, cell, or subcell)
• TRACK_TIMESTEP keyword to indicate that particle tracking output is to be written at the end of each time step
• TRACK_TERMINATE keyword to indicate that particle tracking output is to be written when a particle terminates
for any reason
• TRACK_WEAKSINK keyword to indicate that particle tracking output is to be written when a particle exits a weak
sink (a cell which removes some but not all inflow from adjacent cells)
• TRACK_USERTIME keyword to indicate that particle tracking output is to be written at user-specified times, pro-
vided as double precision values in the TRACKTIMES block.

Block: DIMENSIONS

• ntracktimes is the number of user-specified particle tracking times in the TRACKTIMES block.

Block: TRACKTIMES

• time real value that defines the tracking time with respect to the simulation start time.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• SAVE keyword to indicate that information will be saved this stress period.
• PRINT keyword to indicate that information will be printed this stress period.
• rtype type of information to save or print. Can only be BUDGET.
• ocsetting specifies the steps for which the data will be saved.

ALL
FIRST
LAST
FREQUENCY <frequency>
STEPS <steps>

• ALL keyword to indicate save for all time steps in period.


• FIRST keyword to indicate save for first step in period. This keyword may be used in conjunction with other
keywords to print or save results for multiple time steps.

222 Chapter 3. Input Guide


MODFLOW 6

• LAST keyword to indicate save for last step in period. This keyword may be used in conjunction with other
keywords to print or save results for multiple time steps.
• frequency save at the specified time step frequency. This keyword may be used in conjunction with other
keywords to print or save results for multiple time steps.
• steps save for each step specified in STEPS. This keyword may be used in conjunction with other keywords to
print or save results for multiple time steps.

Example Input File

BEGIN OPTIONS
END OPTIONS

BEGIN PERIOD 1
PRINT BUDGET ALL
SAVE BUDGET ALL
END PERIOD

3.6.7 PRT-PRP
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[BOUNDNAMES]
[PRINT_INPUT]
[EXIT_SOLVE_TOLERANCE <exit_solve_tolerance>]
[LOCAL_Z]
[EXTEND_TRACKING]
[TRACK FILEOUT <trackfile>]
[TRACKCSV FILEOUT <trackcsvfile>]
[STOPTIME <stoptime>]
[STOPTRAVELTIME <stoptraveltime>]
[STOP_AT_WEAK_SINK]
[ISTOPZONE <istopzone>]
[DRAPE]
[DRY_TRACKING_METHOD <dry_tracking_method>]
[RELEASE_TIME_TOLERANCE <release_time_tolerance>]
[RELEASE_TIME_FREQUENCY <release_time_frequency>]
END OPTIONS

BEGIN DIMENSIONS
NRELEASEPTS <nreleasepts>
NRELEASETIMES <nreleasetimes>
END DIMENSIONS

BEGIN PACKAGEDATA
<irptno> <cellid> <xrpt> <yrpt> <zrpt> [<boundname>]
<irptno> <cellid> <xrpt> <yrpt> <zrpt> [<boundname>]
...
END PACKAGEDATA

3.6. Particle Tracking 223


MODFLOW 6

BEGIN RELEASETIMES
<time>
<time>
...
END RELEASETIMES

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<releasesetting>
<releasesetting>
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of particle release points.
• PRINT_INPUT keyword to indicate that the list of all model stress package information will be written to the
listing file immediately after it is read.
• exit_solve_tolerance the convergence tolerance for iterative solution of particle exit location and time in
the generalized Pollock’s method. A value of 0.00001 works well for many problems, but the value that strikes
the best balance between accuracy and runtime is problem-dependent.
• LOCAL_Z indicates that “zrpt” defines the local z coordinate of the release point within the cell, with value of 0
at the bottom and 1 at the top of the cell. If the cell is partially saturated at release time, the top of the cell is
considered to be the water table elevation (the head in the cell) rather than the top defined by the user.
• EXTEND_TRACKING indicates that particles should be tracked beyond the end of the simulation’s final time step
(using that time step’s flows) until particles terminate or reach a specified stop time. By default, particles are
terminated at the end of the simulation’s final time step.
• TRACK keyword to specify that record corresponds to a binary track output file. Each PRP Package may have a
distinct binary track output file.
• FILEOUT keyword to specify that an output filename is expected next.
• trackfile name of the binary output file to write tracking information.
• TRACKCSV keyword to specify that record corresponds to a CSV track output file. Each PRP Package may have
a distinct CSV track output file.
• trackcsvfile name of the comma-separated value (CSV) file to write tracking information.
• stoptime real value defining the maximum simulation time to which particles in the package can be tracked.
Particles that have not terminated earlier due to another termination condition will terminate when simulation
time STOPTIME is reached. If the last stress period in the simulation consists of more than one time step,
particles will not be tracked past the ending time of the last stress period, regardless of STOPTIME. If the EX-
TEND_TRACKING option is enabled and the last stress period in the simulation is steady-state, the simulation
ending time will not limit the time to which particles can be tracked, but STOPTIME and STOPTRAVELTIME
will continue to apply. If STOPTIME and STOPTRAVELTIME are both provided, particles will be stopped if
either is reached.
• stoptraveltime real value defining the maximum travel time over which particles in the model can be tracked.
Particles that have not terminated earlier due to another termination condition will terminate when their travel
time reaches STOPTRAVELTIME. If the last stress period in the simulation consists of more than one time step,

224 Chapter 3. Input Guide


MODFLOW 6

particles will not be tracked past the ending time of the last stress period, regardless of STOPTRAVELTIME.
If the EXTEND_TRACKING option is enabled and the last stress period in the simulation is steady-state, the
simulation ending time will not limit the time to which particles can be tracked, but STOPTIME and STOP-
TRAVELTIME will continue to apply. If STOPTIME and STOPTRAVELTIME are both provided, particles
will be stopped if either is reached.
• STOP_AT_WEAK_SINK is a text keyword to indicate that a particle is to terminate when it enters a cell that is a
weak sink. By default, particles are allowed to pass though cells that are weak sinks.
• istopzone integer value defining the stop zone number. If cells have been assigned IZONE values in the GRID-
DATA block, a particle terminates if it enters a cell whose IZONE value matches ISTOPZONE. An ISTOPZONE
value of zero indicates that there is no stop zone. The default value is zero.
• DRAPE is a text keyword to indicate that if a particle’s release point is in a cell that happens to be inactive at
release time, the particle is to be moved to the topmost active cell below it, if any. By default, a particle is not
released into the simulation if its release point’s cell is inactive at release time.
• dry_tracking_method is a string indicating how particles should behave in dry-but-active cells (as can occur
with the Newton formulation). The value can be “DROP”, “STOP”, or “STAY”. The default is “DROP”, which
passes particles vertically and instantaneously to the water table. “STOP” causes particles to terminate. “STAY”
causes particles to remain stationary but active.
• release_time_tolerance real number indicating the tolerance within which to consider consecutive release
times coincident. Coincident release times will be merged into a single release time. The default is epsilon x
1011, where epsilon is machine precision.
• release_time_frequency real number indicating the time frequency at which to release particles. This option
can be used to schedule releases at a regular interval for the duration of the simulation, starting at the simulation
start time. The release schedule is the union of this option, the RELEASETIMES block, and PERIOD block
RELEASESETTING selections. If none of these are provided, a single release time is configured at the beginning
of the first time step of the simulation’s first stress period.

Block: DIMENSIONS

• nreleasepts is the number of particle release points.


• nreleasetimes is the number of particle release times specified in the RELEASETIMES block. This is not
necessarily the total number of release times; release times are the union of RELEASE_TIME_FREQUENCY,
RELEASETIMES block, and PERIOD block RELEASESETTING selections.

Block: PACKAGEDATA

• irptno integer value that defines the PRP release point number associated with the specified PACKAGEDATA
data on the line. IRPTNO must be greater than zero and less than or equal to NRELEASEPTS. The program
will terminate with an error if information for a PRP release point number is specified more than once.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.
• xrpt real value that defines the x coordinate of the release point in model coordinates. The (x, y, z) location
specified for the release point must lie within the cell that is identified by the specified cellid.
• yrpt real value that defines the y coordinate of the release point in model coordinates. The (x, y, z) location
specified for the release point must lie within the cell that is identified by the specified cellid.
• zrpt real value that defines the z coordinate of the release point in model coordinates or, if the LOCAL_Z option
is active, in local cell coordinates. The (x, y, z) location specified for the release point must lie within the cell
that is identified by the specified cellid.

3.6. Particle Tracking 225


MODFLOW 6

• boundname name of the particle release point. BOUNDNAME is an ASCII character variable that can contain
as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within
single quotes.

Block: RELEASETIMES

• time real value that defines the release time with respect to the simulation start time.

Block: PERIOD

• iper integer value specifying the stress period number for which the data specified in the PERIOD block apply.
IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value assigned
to a stress period block must be greater than the IPER value assigned for the previous PERIOD block. The
information specified in the PERIOD block applies only to that stress period.
• releasesetting specifies time steps at which to release a particle. A particle is released at the beginning of
each specified time step. For fine control over release timing, specify times explicitly using the RELEASETIMES
block. If the beginning of a specified time step coincides with a release time specified in the RELEASETIMES
block or configured via RELEASE_TIME_FREQUENCY, only one particle is released at that time. Coincidence
is evaluated up to the tolerance specified in RELEASE_TIME_TOLERANCE, or epsilon x 1011 by default,
where epsilon is machine precision. If no release times are configured via this setting, the RELEASETIMES
block, or the RELEASE_TIME_FREQUENCY option, a single release time is configured at the beginning of
the first time step of the simulation’s first stress period.

ALL
FIRST
LAST
FREQUENCY <frequency>
STEPS <steps>
[FRACTION <fraction>]

• ALL keyword to indicate release at the start of all time steps in the period.
• FIRST keyword to indicate release at the start of the first time step in the period. This keyword may be used in
conjunction with other RELEASESETTING options.
• LAST keyword to indicate release at the start of the last time step in the period. This keyword may be used in
conjunction with other RELEASESETTING options.
• frequency release at the specified time step frequency. This keyword may be used in conjunction with other
RELEASESETTING options.
• steps release at the start of each step specified in STEPS. This option may be used in conjunction with other
RELEASESETTING options.

Example Input File

BEGIN OPTIONS
STOPTIME 10000.
BOUNDNAMES
END OPTIONS

BEGIN DIMENSIONS
NRELEASEPTS 3
END DIMENSIONS

(continues on next page)

226 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


BEGIN PACKAGEDATA
1 1 3 1250. 10250. 400. relpt_001
2 1 3 1255. 10250. 390. relpt_002
3 1 23 1250. 9450. 400. relpt_003
END PACKAGEDATA

BEGIN PERIOD 1
FIRST
END PERIOD

3.7 Model Exchanges


3.7.1 EXG-GWEGWE
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
GWFMODELNAME1 <gwfmodelname1>
GWFMODELNAME2 <gwfmodelname2>
[AUXILIARY <auxiliary>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[ADV_SCHEME <adv_scheme>]
[CND_XT3D_OFF]
[CND_XT3D_RHS]
[MVE6 FILEIN <mve6_filename>]
[OBS6 FILEIN <obs6_filename>]
END OPTIONS

BEGIN DIMENSIONS
NEXG <nexg>
END DIMENSIONS

BEGIN EXCHANGEDATA
<cellidm1> <cellidm2> <ihc> <cl1> <cl2> <hwva> [<aux>] [<boundname>]
<cellidm1> <cellidm2> <ihc> <cl1> <cl2> <hwva> [<aux>] [<boundname>]
...
END EXCHANGEDATA

Explanation of Variables
Block: OPTIONS

• gwfmodelname1 keyword to specify name of first corresponding GWF Model. In the simulation name file, the
GWE6-GWE6 entry contains names for GWE Models (exgmnamea and exgmnameb). The GWE Model with
the name exgmnamea must correspond to the GWF Model with the name gwfmodelname1.
• gwfmodelname2 keyword to specify name of second corresponding GWF Model. In the simulation name file,

3.7. Model Exchanges 227


MODFLOW 6

the GWE6-GWE6 entry contains names for GWE Models (exgmnamea and exgmnameb). The GWE Model with
the name exgmnameb must correspond to the GWF Model with the name gwfmodelname2.
• auxiliary an array of auxiliary variable names. There is no limit on the number of auxiliary variables that can
be provided. Most auxiliary variables will not be used by the GWE-GWE Exchange, but they will be available
for use by other parts of the program. If an auxiliary variable with the name “ANGLDEGX” is found, then this
information will be used as the angle (provided in degrees) between the connection face normal and the x axis,
where a value of zero indicates that a normal vector points directly along the positive x axis. The connection face
normal is a normal vector on the cell face shared between the cell in model 1 and the cell in model 2 pointing
away from the model 1 cell. Additional information on “ANGLDEGX” is provided in the description of the
DISU Package. If an auxiliary variable with the name “CDIST” is found, then this information will be used
as the straight-line connection distance, including the vertical component, between the two cell centers. Both
ANGLDEGX and CDIST are required if specific discharge is calculated for either of the groundwater models.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of GWE Exchange cells.
• PRINT_INPUT keyword to indicate that the list of exchange entries will be echoed to the listing file immediately
after it is read.
• PRINT_FLOWS keyword to indicate that the list of exchange flow rates will be printed to the listing file for every
stress period in which “SAVE BUDGET” is specified in Output Control.
• SAVE_FLOWS keyword to indicate that cell-by-cell flow terms will be written to the budget file for each model
provided that the Output Control for the models are set up with the “BUDGET SAVE FILE” option.
• adv_scheme scheme used to solve the advection term. Can be upstream, central, or TVD. If not specified,
upstream weighting is the default weighting scheme.
• CND_XT3D_OFF deactivate the xt3d method for the dispersive flux and use the faster and less accurate approxi-
mation for this exchange.
• CND_XT3D_RHS add xt3d dispersion terms to right-hand side, when possible, for this exchange.
• FILEIN keyword to specify that an input filename is expected next.
• MVE6 keyword to specify that record corresponds to an energy transport mover file.
• mve6_filename is the file name of the transport mover input file to apply to this exchange. Information for the
transport mover are provided in the file provided with these keywords.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename is the file name of the observations input file for this exchange. See the “Observation utility”
section for instructions for preparing observation input files. Table ref{table:gwe-obstypetable} lists observation
type(s) supported by the GWE-GWE Exchange Package.

Block: DIMENSIONS

• nexg keyword and integer value specifying the number of GWE-GWE exchanges.

Block: EXCHANGEDATA

• cellidm1 is the cellid of the cell in model 1 as specified in the simulation name file. For a structured grid that
uses the DIS input file, CELLIDM1 is the layer, row, and column numbers of the cell. For a grid that uses the
DISV input file, CELLIDM1 is the layer number and CELL2D number for the two cells. If the model uses the
unstructured discretization (DISU) input file, then CELLIDM1 is the node number for the cell.
• cellidm2 is the cellid of the cell in model 2 as specified in the simulation name file. For a structured grid that
uses the DIS input file, CELLIDM2 is the layer, row, and column numbers of the cell. For a grid that uses the
DISV input file, CELLIDM2 is the layer number and CELL2D number for the two cells. If the model uses the
unstructured discretization (DISU) input file, then CELLIDM2 is the node number for the cell.

228 Chapter 3. Input Guide


MODFLOW 6

• ihc is an integer flag indicating the direction between node n and all of its m connections. If IHC = 0 then the
connection is vertical. If IHC = 1 then the connection is horizontal. If IHC = 2 then the connection is horizontal
for a vertically staggered grid.
• cl1 is the distance between the center of cell 1 and the its shared face with cell 2.
• cl2 is the distance between the center of cell 2 and the its shared face with cell 1.
• hwva is the horizontal width of the flow connection between cell 1 and cell 2 if IHC > 0, or it is the area perpen-
dicular to flow of the vertical connection between cell 1 and cell 2 if IHC = 0.
• aux represents the values of the auxiliary variables for each GWEGWE Exchange. The values of auxiliary
variables must be present for each exchange. The values must be specified in the order of the auxiliary variables
specified in the OPTIONS block.
• boundname name of the GWE Exchange cell. BOUNDNAME is an ASCII character variable that can contain
as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within
single quotes.

Example Input File

BEGIN OPTIONS
PRINT_INPUT
PRINT_FLOWS
SAVE_FLOWS
AUXILIARY testaux
END OPTIONS

BEGIN DIMENSIONS
NEXG 36
END DIMENSIONS

BEGIN EXCHANGEDATA
# left side
# nodem1 nodem2 ihc cl1 cl2 fahl testaux
16 1 1 50. 16.67 33.33 100.99
16 10 1 50. 16.67 33.33 100.99
16 19 1 50. 16.67 33.33 100.99
23 28 1 50. 16.67 33.33 100.99
23 37 1 50. 16.67 33.33 100.99
23 46 1 50. 16.67 33.33 100.99
30 55 1 50. 16.67 33.33 100.99
30 64 1 50. 16.67 33.33 100.99
30 73 1 50. 16.67 33.33 100.99
#
# right side
20 9 1 50. 16.67 33.33 100.99
20 18 1 50. 16.67 33.33 100.99
20 27 1 50. 16.67 33.33 100.99
27 36 1 50. 16.67 33.33 100.99
27 45 1 50. 16.67 33.33 100.99
27 54 1 50. 16.67 33.33 100.99
34 63 1 50. 16.67 33.33 100.99
34 72 1 50. 16.67 33.33 100.99
34 81 1 50. 16.67 33.33 100.99
#
(continues on next page)

3.7. Model Exchanges 229


MODFLOW 6

(continued from previous page)


# back side
10 1 1 50. 17.67 33.33 100.99
10 2 1 50. 17.67 33.33 100.99
10 3 1 50. 17.67 33.33 100.99
11 4 1 50. 17.67 33.33 100.99
11 5 1 50. 17.67 33.33 100.99
11 6 1 50. 17.67 33.33 100.99
12 7 1 50. 17.67 33.33 100.99
12 8 1 50. 17.67 33.33 100.99
12 9 1 50. 17.67 33.33 100.99
#
# front
38 73 1 50. 17.67 33.33 100.99
38 74 1 50. 17.67 33.33 100.99
38 75 1 50. 17.67 33.33 100.99
39 76 1 50. 17.67 33.33 100.99
39 77 1 50. 17.67 33.33 100.99
39 78 1 50. 17.67 33.33 100.99
40 79 1 50. 17.67 33.33 100.99
40 80 1 50. 17.67 33.33 100.99
40 81 1 50. 17.67 33.33 100.99
END EXCHANGEDATA

Example Observation Input File

BEGIN OPTIONS
DIGITS 10
PRINT_INPUT
END OPTIONS

# Block defining continuous observations


BEGIN CONTINUOUS FILEOUT simulation.obs.csv
# obsname obstype id or boundname
exg1 flow-ja-face 1
left-face flow-ja-face bnameleft
right-face flow-ja-face bnameright
END CONTINUOUS

3.7.2 EXG-GWFGWE
Structure of Blocks
FOR EACH SIMULATION

Explanation of Variables

3.7.3 EXG-GWFGWF
Structure of Blocks
FOR EACH SIMULATION

230 Chapter 3. Input Guide


MODFLOW 6

BEGIN OPTIONS
[AUXILIARY <auxiliary>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[CELL_AVERAGING <cell_averaging>]
[VARIABLECV [DEWATERED]]
[NEWTON]
[XT3D]
[GNC6 FILEIN <gnc6_filename>]
[MVR6 FILEIN <mvr6_filename>]
[OBS6 FILEIN <obs6_filename>]
END OPTIONS

BEGIN DIMENSIONS
NEXG <nexg>
END DIMENSIONS

BEGIN EXCHANGEDATA
<cellidm1> <cellidm2> <ihc> <cl1> <cl2> <hwva> [<aux>] [<boundname>]
<cellidm1> <cellidm2> <ihc> <cl1> <cl2> <hwva> [<aux>] [<boundname>]
...
END EXCHANGEDATA

Explanation of Variables
Block: OPTIONS

• auxiliary an array of auxiliary variable names. There is no limit on the number of auxiliary variables that can
be provided. Most auxiliary variables will not be used by the GWF-GWF Exchange, but they will be available
for use by other parts of the program. If an auxiliary variable with the name “ANGLDEGX” is found, then this
information will be used as the angle (provided in degrees) between the connection face normal and the x axis,
where a value of zero indicates that a normal vector points directly along the positive x axis. The connection face
normal is a normal vector on the cell face shared between the cell in model 1 and the cell in model 2 pointing
away from the model 1 cell. Additional information on “ANGLDEGX” and when it is required is provided
in the description of the DISU Package. If an auxiliary variable with the name “CDIST” is found, then this
information will be used in the calculation of specific discharge within model cells connected by the exchange.
For a horizontal connection, CDIST should be specified as the horizontal distance between the cell centers, and
should not include the vertical component. For vertical connections, CDIST should be specified as the difference
in elevation between the two cell centers. Both ANGLDEGX and CDIST are required if specific discharge is
calculated for either of the groundwater models.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of GWF Exchange cells.
• PRINT_INPUT keyword to indicate that the list of exchange entries will be echoed to the listing file immediately
after it is read.
• PRINT_FLOWS keyword to indicate that the list of exchange flow rates will be printed to the listing file for every
stress period in which “SAVE BUDGET” is specified in Output Control.
• SAVE_FLOWS keyword to indicate that cell-by-cell flow terms will be written to the budget file for each model
provided that the Output Control for the models are set up with the “BUDGET SAVE FILE” option.
• cell_averaging is a keyword and text keyword to indicate the method that will be used for calculating the

3.7. Model Exchanges 231


MODFLOW 6

conductance for horizontal cell connections. The text value for CELL_AVERAGING can be “HARMONIC”,
“LOGARITHMIC”, or “AMT-LMK”, which means “arithmetic-mean thickness and logarithmic-mean hydraulic
conductivity”. If the user does not specify a value for CELL_AVERAGING, then the harmonic-mean method
will be used.
• VARIABLECV keyword to indicate that the vertical conductance will be calculated using the saturated thickness
and properties of the overlying cell and the thickness and properties of the underlying cell. If the DEWATERED
keyword is also specified, then the vertical conductance is calculated using only the saturated thickness and
properties of the overlying cell if the head in the underlying cell is below its top. If these keywords are not
specified, then the default condition is to calculate the vertical conductance at the start of the simulation using
the initial head and the cell properties. The vertical conductance remains constant for the entire simulation.
• DEWATERED If the DEWATERED keyword is specified, then the vertical conductance is calculated using only
the saturated thickness and properties of the overlying cell if the head in the underlying cell is below its top.
• NEWTON keyword that activates the Newton-Raphson formulation for groundwater flow between connected, con-
vertible groundwater cells. Cells will not dry when this option is used.
• XT3D keyword that activates the XT3D formulation between the cells connected with this GWF-GWF Exchange.
• FILEIN keyword to specify that an input filename is expected next.
• GNC6 keyword to specify that record corresponds to a ghost-node correction file.
• gnc6_filename is the file name for ghost node correction input file. Information for the ghost nodes are provided
in the file provided with these keywords. The format for specifying the ghost nodes is the same as described for the
GNC Package of the GWF Model. This includes specifying OPTIONS, DIMENSIONS, and GNCDATA blocks.
The order of the ghost nodes must follow the same order as the order of the cells in the EXCHANGEDATA
block. For the GNCDATA, noden and all of the nodej values are assumed to be located in model 1, and nodem
is assumed to be in model 2.
• MVR6 keyword to specify that record corresponds to a mover file.
• mvr6_filename is the file name of the water mover input file to apply to this exchange. Information for the
water mover are provided in the file provided with these keywords. The format for specifying the water mover
information is the same as described for the Water Mover (MVR) Package of the GWF Model, with two excep-
tions. First, in the PACKAGES block, the model name must be included as a separate string before each package.
Second, the appropriate model name must be included before package name 1 and package name 2 in the BEGIN
PERIOD block. This allows providers and receivers to be located in both models listed as part of this exchange.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename is the file name of the observations input file for this exchange. See the “Observation utility”
section for instructions for preparing observation input files. Table ref{table:gwf-obstypetable} lists observation
type(s) supported by the GWF-GWF package.

Block: DIMENSIONS

• nexg keyword and integer value specifying the number of GWF-GWF exchanges.

Block: EXCHANGEDATA

• cellidm1 is the cellid of the cell in model 1 as specified in the simulation name file. For a structured grid that
uses the DIS input file, CELLIDM1 is the layer, row, and column numbers of the cell. For a grid that uses the
DISV input file, CELLIDM1 is the layer number and CELL2D number for the two cells. If the model uses the
unstructured discretization (DISU) input file, then CELLIDM1 is the node number for the cell.
• cellidm2 is the cellid of the cell in model 2 as specified in the simulation name file. For a structured grid that
uses the DIS input file, CELLIDM2 is the layer, row, and column numbers of the cell. For a grid that uses the

232 Chapter 3. Input Guide


MODFLOW 6

DISV input file, CELLIDM2 is the layer number and CELL2D number for the two cells. If the model uses the
unstructured discretization (DISU) input file, then CELLIDM2 is the node number for the cell.
• ihc is an integer flag indicating the direction between node n and all of its m connections. If IHC = 0 then the
connection is vertical. If IHC = 1 then the connection is horizontal. If IHC = 2 then the connection is horizontal
for a vertically staggered grid.
• cl1 is the distance between the center of cell 1 and the its shared face with cell 2.
• cl2 is the distance between the center of cell 2 and the its shared face with cell 1.
• hwva is the horizontal width of the flow connection between cell 1 and cell 2 if IHC > 0, or it is the area perpen-
dicular to flow of the vertical connection between cell 1 and cell 2 if IHC = 0.
• aux represents the values of the auxiliary variables for each GWFGWF Exchange. The values of auxiliary
variables must be present for each exchange. The values must be specified in the order of the auxiliary variables
specified in the OPTIONS block.
• boundname name of the GWF Exchange cell. BOUNDNAME is an ASCII character variable that can contain
as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within
single quotes.

Example Input File

BEGIN OPTIONS
PRINT_INPUT
PRINT_FLOWS
SAVE_FLOWS
AUXILIARY testaux
GNC6 FILEIN simulation.gnc
MVR6 FILEIN simulation.mvr
END OPTIONS

BEGIN DIMENSIONS
NEXG 36
END DIMENSIONS

# nodem1 nodem2 ihc cl1 cl2 fahl testaux


BEGIN EXCHANGEDATA
#
# left side
16 1 1 50. 16.67 33.33 100.99
16 10 1 50. 16.67 33.33 100.99
16 19 1 50. 16.67 33.33 100.99
23 28 1 50. 16.67 33.33 100.99
23 37 1 50. 16.67 33.33 100.99
23 46 1 50. 16.67 33.33 100.99
30 55 1 50. 16.67 33.33 100.99
30 64 1 50. 16.67 33.33 100.99
30 73 1 50. 16.67 33.33 100.99
#
# right side
20 9 1 50. 16.67 33.33 100.99
20 18 1 50. 16.67 33.33 100.99
20 27 1 50. 16.67 33.33 100.99
27 36 1 50. 16.67 33.33 100.99
(continues on next page)

3.7. Model Exchanges 233


MODFLOW 6

(continued from previous page)


27 45 1 50. 16.67 33.33 100.99
27 54 1 50. 16.67 33.33 100.99
34 63 1 50. 16.67 33.33 100.99
34 72 1 50. 16.67 33.33 100.99
34 81 1 50. 16.67 33.33 100.99
#
# back
10 1 1 50. 17.67 33.33 100.99
10 2 1 50. 17.67 33.33 100.99
10 3 1 50. 17.67 33.33 100.99
11 4 1 50. 17.67 33.33 100.99
11 5 1 50. 17.67 33.33 100.99
11 6 1 50. 17.67 33.33 100.99
12 7 1 50. 17.67 33.33 100.99
12 8 1 50. 17.67 33.33 100.99
12 9 1 50. 17.67 33.33 100.99
#
# front
38 73 1 50. 17.67 33.33 100.99
38 74 1 50. 17.67 33.33 100.99
38 75 1 50. 17.67 33.33 100.99
39 76 1 50. 17.67 33.33 100.99
39 77 1 50. 17.67 33.33 100.99
39 78 1 50. 17.67 33.33 100.99
40 79 1 50. 17.67 33.33 100.99
40 80 1 50. 17.67 33.33 100.99
40 81 1 50. 17.67 33.33 100.99
END EXCHANGEDATA

Example Observation Input File

BEGIN OPTIONS
DIGITS 10
PRINT_INPUT
END OPTIONS

# Block defining continuous observations


BEGIN CONTINUOUS FILEOUT simulation.obs.csv
# obsname obstype id or boundname
exg1 flow-ja-face 1
left-face flow-ja-face bnameleft
right-face flow-ja-face bnameright
END CONTINUOUS

3.7.4 EXG-GWFGWT
Structure of Blocks
FOR EACH SIMULATION

234 Chapter 3. Input Guide


MODFLOW 6

Explanation of Variables

3.7.5 EXG-GWFPRT
Structure of Blocks
FOR EACH SIMULATION

Explanation of Variables

3.7.6 EXG-GWTGWT
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
GWFMODELNAME1 <gwfmodelname1>
GWFMODELNAME2 <gwfmodelname2>
[AUXILIARY <auxiliary>]
[BOUNDNAMES]
[PRINT_INPUT]
[PRINT_FLOWS]
[SAVE_FLOWS]
[ADV_SCHEME <adv_scheme>]
[DSP_XT3D_OFF]
[DSP_XT3D_RHS]
[MVT6 FILEIN <mvt6_filename>]
[OBS6 FILEIN <obs6_filename>]
END OPTIONS

BEGIN DIMENSIONS
NEXG <nexg>
END DIMENSIONS

BEGIN EXCHANGEDATA
<cellidm1> <cellidm2> <ihc> <cl1> <cl2> <hwva> [<aux>] [<boundname>]
<cellidm1> <cellidm2> <ihc> <cl1> <cl2> <hwva> [<aux>] [<boundname>]
...
END EXCHANGEDATA

Explanation of Variables
Block: OPTIONS

• gwfmodelname1 keyword to specify name of first corresponding GWF Model. In the simulation name file, the
GWT6-GWT6 entry contains names for GWT Models (exgmnamea and exgmnameb). The GWT Model with
the name exgmnamea must correspond to the GWF Model with the name gwfmodelname1.
• gwfmodelname2 keyword to specify name of second corresponding GWF Model. In the simulation name file,
the GWT6-GWT6 entry contains names for GWT Models (exgmnamea and exgmnameb). The GWT Model
with the name exgmnameb must correspond to the GWF Model with the name gwfmodelname2.
• auxiliary an array of auxiliary variable names. There is no limit on the number of auxiliary variables that can
be provided. Most auxiliary variables will not be used by the GWT-GWT Exchange, but they will be available
for use by other parts of the program. If an auxiliary variable with the name “ANGLDEGX” is found, then this
information will be used as the angle (provided in degrees) between the connection face normal and the x axis,

3.7. Model Exchanges 235


MODFLOW 6

where a value of zero indicates that a normal vector points directly along the positive x axis. The connection face
normal is a normal vector on the cell face shared between the cell in model 1 and the cell in model 2 pointing
away from the model 1 cell. Additional information on “ANGLDEGX” is provided in the description of the
DISU Package. ANGLDEGX must be specified if dispersion is simulated in the connected GWT models.
• BOUNDNAMES keyword to indicate that boundary names may be provided with the list of GWT Exchange cells.
• PRINT_INPUT keyword to indicate that the list of exchange entries will be echoed to the listing file immediately
after it is read.
• PRINT_FLOWS keyword to indicate that the list of exchange flow rates will be printed to the listing file for every
stress period in which “SAVE BUDGET” is specified in Output Control.
• SAVE_FLOWS keyword to indicate that cell-by-cell flow terms will be written to the budget file for each model
provided that the Output Control for the models are set up with the “BUDGET SAVE FILE” option.
• adv_scheme scheme used to solve the advection term. Can be upstream, central, or TVD. If not specified,
upstream weighting is the default weighting scheme.
• DSP_XT3D_OFF deactivate the xt3d method for the dispersive flux and use the faster and less accurate approxi-
mation for this exchange.
• DSP_XT3D_RHS add xt3d dispersion terms to right-hand side, when possible, for this exchange.
• FILEIN keyword to specify that an input filename is expected next.
• MVT6 keyword to specify that record corresponds to a transport mover file.
• mvt6_filename is the file name of the transport mover input file to apply to this exchange. Information for the
transport mover are provided in the file provided with these keywords.
• OBS6 keyword to specify that record corresponds to an observations file.
• obs6_filename is the file name of the observations input file for this exchange. See the “Observation utility”
section for instructions for preparing observation input files. Table ref{table:gwt-obstypetable} lists observation
type(s) supported by the GWT-GWT package.

Block: DIMENSIONS

• nexg keyword and integer value specifying the number of GWT-GWT exchanges.

Block: EXCHANGEDATA

• cellidm1 is the cellid of the cell in model 1 as specified in the simulation name file. For a structured grid that
uses the DIS input file, CELLIDM1 is the layer, row, and column numbers of the cell. For a grid that uses the
DISV input file, CELLIDM1 is the layer number and CELL2D number for the two cells. If the model uses the
unstructured discretization (DISU) input file, then CELLIDM1 is the node number for the cell.
• cellidm2 is the cellid of the cell in model 2 as specified in the simulation name file. For a structured grid that
uses the DIS input file, CELLIDM2 is the layer, row, and column numbers of the cell. For a grid that uses the
DISV input file, CELLIDM2 is the layer number and CELL2D number for the two cells. If the model uses the
unstructured discretization (DISU) input file, then CELLIDM2 is the node number for the cell.
• ihc is an integer flag indicating the direction between node n and all of its m connections. If IHC = 0 then the
connection is vertical. If IHC = 1 then the connection is horizontal. If IHC = 2 then the connection is horizontal
for a vertically staggered grid.
• cl1 is the distance between the center of cell 1 and the its shared face with cell 2.
• cl2 is the distance between the center of cell 2 and the its shared face with cell 1.

236 Chapter 3. Input Guide


MODFLOW 6

• hwva is the horizontal width of the flow connection between cell 1 and cell 2 if IHC > 0, or it is the area perpen-
dicular to flow of the vertical connection between cell 1 and cell 2 if IHC = 0.
• aux represents the values of the auxiliary variables for each GWTGWT Exchange. The values of auxiliary
variables must be present for each exchange. The values must be specified in the order of the auxiliary variables
specified in the OPTIONS block.
• boundname name of the GWT Exchange cell. BOUNDNAME is an ASCII character variable that can contain
as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within
single quotes.

Example Input File

BEGIN OPTIONS
PRINT_INPUT
PRINT_FLOWS
SAVE_FLOWS
AUXILIARY testaux
END OPTIONS

BEGIN DIMENSIONS
NEXG 36
END DIMENSIONS

# nodem1 nodem2 ihc cl1 cl2 fahl testaux


BEGIN EXCHANGEDATA
#
# left side
16 1 1 50. 16.67 33.33 100.99
16 10 1 50. 16.67 33.33 100.99
16 19 1 50. 16.67 33.33 100.99
23 28 1 50. 16.67 33.33 100.99
23 37 1 50. 16.67 33.33 100.99
23 46 1 50. 16.67 33.33 100.99
30 55 1 50. 16.67 33.33 100.99
30 64 1 50. 16.67 33.33 100.99
30 73 1 50. 16.67 33.33 100.99
#
# right side
20 9 1 50. 16.67 33.33 100.99
20 18 1 50. 16.67 33.33 100.99
20 27 1 50. 16.67 33.33 100.99
27 36 1 50. 16.67 33.33 100.99
27 45 1 50. 16.67 33.33 100.99
27 54 1 50. 16.67 33.33 100.99
34 63 1 50. 16.67 33.33 100.99
34 72 1 50. 16.67 33.33 100.99
34 81 1 50. 16.67 33.33 100.99
#
# back
10 1 1 50. 17.67 33.33 100.99
10 2 1 50. 17.67 33.33 100.99
10 3 1 50. 17.67 33.33 100.99
11 4 1 50. 17.67 33.33 100.99
(continues on next page)

3.7. Model Exchanges 237


MODFLOW 6

(continued from previous page)


11 5 1 50. 17.67 33.33 100.99
11 6 1 50. 17.67 33.33 100.99
12 7 1 50. 17.67 33.33 100.99
12 8 1 50. 17.67 33.33 100.99
12 9 1 50. 17.67 33.33 100.99
#
# front
38 73 1 50. 17.67 33.33 100.99
38 74 1 50. 17.67 33.33 100.99
38 75 1 50. 17.67 33.33 100.99
39 76 1 50. 17.67 33.33 100.99
39 77 1 50. 17.67 33.33 100.99
39 78 1 50. 17.67 33.33 100.99
40 79 1 50. 17.67 33.33 100.99
40 80 1 50. 17.67 33.33 100.99
40 81 1 50. 17.67 33.33 100.99
END EXCHANGEDATA

Example Observation Input File

BEGIN OPTIONS
DIGITS 10
PRINT_INPUT
END OPTIONS

# Block defining continuous observations


BEGIN CONTINUOUS FILEOUT simulation.obs.csv
# obsname obstype id or boundname
exg1 flow-ja-face 1
left-face flow-ja-face bnameleft
right-face flow-ja-face bnameright
END CONTINUOUS

3.8 Utilities
3.8.1 UTL-ATS
Structure of Blocks
FOR EACH SIMULATION

BEGIN DIMENSIONS
MAXATS <maxats>
END DIMENSIONS

FOR ANY STRESS PERIOD

BEGIN PERIODDATA
<iperats> <dt0> <dtmin> <dtmax> <dtadj> <dtfailadj>
<iperats> <dt0> <dtmin> <dtmax> <dtadj> <dtfailadj>
...
END PERIODDATA

238 Chapter 3. Input Guide


MODFLOW 6

Explanation of Variables
Block: DIMENSIONS

• maxats is the number of records in the subsequent perioddata block that will be used for adaptive time stepping.

Block: PERIODDATA

• iperats is the period number to designate for adaptive time stepping. The remaining ATS values on this line
will apply to period iperats. iperats must be greater than zero. A warning is printed if iperats is greater than nper.
• dt0 is the initial time step length for period iperats. If dt0 is zero, then the final step from the previous stress
period will be used as the initial time step. The program will terminate with an error message if dt0 is negative.
• dtmin is the minimum time step length for this period. This value must be greater than zero and less than dtmax.
dtmin must be a small value in order to ensure that simulation times end at the end of stress periods and the end
of the simulation. A small value, such as 1.e-5, is recommended.
• dtmax is the maximum time step length for this period. This value must be greater than dtmin.
• dtadj is the time step multiplier factor for this period. If the number of outer solver iterations
are less than the product of the maximum number of outer iterations (OUTER_MAXIMUM) and
ATS_OUTER_MAXIMUM_FRACTION (an optional variable in the IMS input file with a default value of 1/3),
then the time step length is multiplied by dtadj. If the number of outer solver iterations are greater than the prod-
uct of the maximum number of outer iterations and 1.0 minus ATS_OUTER_MAXIMUM_FRACTION, then
the time step length is divided by dtadj. dtadj must be zero, one, or greater than one. If dtadj is zero or one, then
it has no effect on the simulation. A value between 2.0 and 5.0 can be used as an initial estimate.
• dtfailadj is the divisor of the time step length when a time step fails to converge. If there is solver failure,
then the time step will be tried again with a shorter time step length calculated as the previous time step length
divided by dtfailadj. dtfailadj must be zero, one, or greater than one. If dtfailadj is zero or one, then time steps
will not be retried with shorter lengths. In this case, the program will terminate with an error, or it will continue
of the CONTINUE option is set in the simulation name file. Initial tests with this variable should be set to 5.0
or larger to determine if convergence can be achieved.

Example Input File

# ATS input file

BEGIN dimensions
MAXATS 2
END dimensions

BEGIN perioddata
# per dt0 dtmin dtmax dtadj dtfailadj
2 100.0 1.0E-5 1000.0 2.0 5.0
7 10.0 1.0E-5 100.0 1.7 2.0
END perioddata

3.8.2 UTL-HPC
Structure of Blocks
FOR EACH SIMULATION

3.8. Utilities 239


MODFLOW 6

BEGIN OPTIONS
[PRINT_TABLE]
END OPTIONS

BEGIN PARTITIONS
[<mname> <mrank>
<mname> <mrank>
...]
END PARTITIONS

Explanation of Variables
Block: OPTIONS

• PRINT_TABLE keyword to indicate that the partition table will be printed to the listing file.

Block: PARTITIONS

• mname is the unique model name.


• mrank is the zero-based partition number (also: MPI rank or processor id) to which the model will be assigned.

Example Input File


Example 1

BEGIN options
END options

BEGIN partitions
# mname MPI-rank
model_0 0
model_1 0
model_2 1
model_3 2
model_4 3
model_5 3
END partitions

Example 2

BEGIN options
END options

BEGIN partitions
# mname MPI-rank
left_gwf 0
inset_gwf 1
right_gwf 0
left_gwt 0
inset_gwt 1
right_gwt 0
END partitions

240 Chapter 3. Input Guide


MODFLOW 6

3.8.3 UTL-LAKTAB
Structure of Blocks
FOR EACH SIMULATION

BEGIN DIMENSIONS
NROW <nrow>
NCOL <ncol>
END DIMENSIONS

BEGIN TABLE
<stage> <volume> <sarea> [<barea>]
<stage> <volume> <sarea> [<barea>]
...
END TABLE

Explanation of Variables
Block: DIMENSIONS

• nrow integer value specifying the number of rows in the lake table. There must be NROW rows of data in the
TABLE block.
• ncol integer value specifying the number of columns in the lake table. There must be NCOL columns of data
in the TABLE block. For lakes with HORIZONTAL and/or VERTICAL CTYPE connections, NCOL must be
equal to 3. For lakes with EMBEDDEDH or EMBEDDEDV CTYPE connections, NCOL must be equal to 4.

Block: TABLE

• stage real value that defines the stage corresponding to the remaining data on the line.
• volume real value that defines the lake volume corresponding to the stage specified on the line.
• sarea real value that defines the lake surface area corresponding to the stage specified on the line.
• barea real value that defines the lake-GWF exchange area corresponding to the stage specified on the line.
BAREA is only specified if the CLAKTYPE for the lake is EMBEDDEDH or EMBEDDEDV.

Example Input File

begin dimensions
nrow 11
ncol 3
end dimensions

begin table
# stage volume sarea
0 0. 0.
1 0.5 1.
2 1.0 2.
3 2.0 2.
4 3.0 2.
5 4.0 2.
6 5.0 2.
7 6.0 2.
(continues on next page)

3.8. Utilities 241


MODFLOW 6

(continued from previous page)


8 7.0 2.
9 8.0 2.
10 9.0 2.
end table

3.8.4 UTL-NCF
Structure of Blocks
FOR EACH SIMULATION
BEGIN OPTIONS
[WKT <wkt>]
[DEFLATE <deflate>]
[SHUFFLE]
[CHUNK_TIME <chunk_time>]
[CHUNK_FACE <chunk_face>]
[CHUNK_Z <chunk_z>]
[CHUNK_Y <chunk_y>]
[CHUNK_X <chunk_x>]
[MODFLOW6_ATTR_OFF]
END OPTIONS

BEGIN DIMENSIONS
[NCPL <ncpl>]
END DIMENSIONS

BEGIN GRIDDATA
[LATITUDE
<latitude(ncpl)> -- READARRAY]
[LONGITUDE
<longitude(ncpl)> -- READARRAY]
END GRIDDATA

Explanation of Variables
Block: OPTIONS

• wkt is the coordinate reference system (CRS) well-known text (WKT) string. Ignored if latitude and longitude
griddata arrays have been provided for NETCDF_STRUCTURED export type.
• deflate is the variable deflate level (0=min, 9=max) in the netcdf file. Defining this parameter activates per-
variable compression at the level specified.
• SHUFFLE is the keyword used to turn on the netcdf variable shuffle filter when the deflate option is also set. The
shuffle filter has the effect of storing the first byte of all of a variable’s values in a chunk contiguously, followed
by all the second bytes, etc. This can be an optimization for compression with certain types of data.
• chunk_time is the keyword used to provide a data chunk size for the time dimension in a NETCDF_MESH2D
or NETCDF_STRUCTURED output file. Must be used in combination with the the chunk_face parameter
(NETCDF_MESH2D) or the chunk_z, chunk_y, and chunk_x parameter set (NETCDF_STRUCTURED) to have
an effect.
• chunk_face is the keyword used to provide a data chunk size for the face dimension in a NETCDF_MESH2D
output file. Must be used in combination with the the chunk_time parameter to have an effect.

242 Chapter 3. Input Guide


MODFLOW 6

• chunk_z is the keyword used to provide a data chunk size for the z dimension in a NETCDF_STRUCTURED
output file. Must be used in combination with the the chunk_time, chunk_x and chunk_y parameter set to have
an effect.
• chunk_y is the keyword used to provide a data chunk size for the y dimension in a NETCDF_STRUCTURED
output file. Must be used in combination with the the chunk_time, chunk_x and chunk_z parameter set to have
an effect.
• chunk_x is the keyword used to provide a data chunk size for the x dimension in a NETCDF_STRUCTURED
output file. Must be used in combination with the the chunk_time, chunk_y and chunk_z parameter set to have
an effect.
• MODFLOW6_ATTR_OFF is the keyword used to turn off internal input tagging in the model netcdf file. Tagging
adds internal modflow 6 attribute(s) to variables which facilitate identification. Currently this applies to gridded
arrays.

Block: DIMENSIONS

• ncpl is the number of cells in a projected plane layer.

Block: GRIDDATA

• latitude cell center latitude. Only supported for NETCDF_STRUCTURED export type.
• longitude cell center longitude. Only supported for NETCDF_STRUCTURED export type.

Example Input File

BEGIN OPTIONS
DEFLATE 5
SHUFFLE
CHUNK_TIME 10
CHUNK_FACE 19690
WKT 'PROJCS["NAD_1983_UTM_Zone_14N",GEOGCS["GCS_North_American_1983",DATUM["D_
˓→North_American_1983",SPHEROID["

GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.
˓→0174532925199433]],PROJECTION["Transver

se_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],
˓→PARAMETER["Central_Meridian",-99.

0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",
˓→1.0]]'

END OPTIONS

3.8.5 UTL-OBS
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[DIGITS <digits>]
[PRINT_INPUT]
END OPTIONS

3.8. Utilities 243


MODFLOW 6

BEGIN CONTINUOUS FILEOUT <obs_output_file_name> [BINARY]


<obsname> <obstype> <id> [<id2>]
<obsname> <obstype> <id> [<id2>]
...
END CONTINUOUS

Explanation of Variables
Block: OPTIONS

• digits Keyword and an integer digits specifier used for conversion of simulated values to text on output. If not
specified, the default is the maximum number of digits stored in the program (as written with the G0 Fortran
specifier). When simulated values are written to a comma-separated value text file specified in a CONTINUOUS
block below, the digits specifier controls the number of significant digits with which simulated values are written
to the output file. The digits specifier has no effect on the number of significant digits with which the simulation
time is written for continuous observations. If DIGITS is specified as zero, then observations are written with
the default setting, which is the maximum number of digits.
• PRINT_INPUT keyword to indicate that the list of observation information will be written to the listing file im-
mediately after it is read.

Block: CONTINUOUS

• FILEOUT keyword to specify that an output filename is expected next.


• obs_output_file_name Name of a file to which simulated values corresponding to observations in the block
are to be written. The file name can be an absolute or relative path name. A unique output file must be specified
for each CONTINUOUS block. If the “BINARY” option is used, output is written in binary form. By convention,
text output files have the extension “csv” (for “Comma-Separated Values”) and binary output files have the
extension “bsv” (for “Binary Simulated Values”).
• BINARY an optional keyword used to indicate that the output file should be written in binary (unformatted) form.
• obsname string of 1 to 40 nonblank characters used to identify the observation. The identifier need not be unique;
however, identification and post-processing of observations in the output files are facilitated if each observation
is given a unique name.
• obstype a string of characters used to identify the observation type.
• id Text identifying cell where observation is located. For packages other than NPF, if boundary names are
defined in the corresponding package input file, ID can be a boundary name. Otherwise ID is a cellid. If the
model discretization is type DIS, cellid is three integers (layer, row, column). If the discretization is DISV, cellid
is two integers (layer, cell number). If the discretization is DISU, cellid is one integer (node number).
• id2 Text identifying cell adjacent to cell identified by ID. The form of ID2 is as described for ID. ID2 is used for
intercell-flow observations of a GWF model, for three observation types of the LAK Package, for two observation
types of the MAW Package, and one observation type of the UZF Package.

Example Observation Input File


Example 1

BEGIN OPTIONS
DIGITS 10
PRINT_INPUT
END OPTIONS

(continues on next page)

244 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


BEGIN CONTINUOUS FILEOUT my_model.swf.stage.csv
# obsname obstype ID
S1 STAGE 1
S2 STAGE 2
END CONTINUOUS

BEGIN CONTINUOUS FILEOUT my_model.swf.flow.csv


# obsname obstype ID ID2
c1c2 FLOW-JA-FACE 1 2
END CONTINUOUS

Example Observation Input File


Example 2

BEGIN OPTIONS
DIGITS 10
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.gwf.head.csv


# obsname obstype ID
L1 HEAD 1 51 51 # heads at lay 1 row 51 col 51
L2 HEAD 2 51 51 # heads at lay 2 row 51 col 51
END CONTINUOUS

BEGIN CONTINUOUS FILEOUT my_model.gwf.ddn.csv


# obsname obstype ID
L1ddn DRAWDOWN 1 51 51 # heads at lay 1 row 51 col 51
L2ddn DRAWDOWN 2 51 51 # heads at lay 2 row 51 col 51
END CONTINUOUS

BEGIN CONTINUOUS FILEOUT my_model.gwf.flow.csv


# obsname obstype ID ID1
L1rfflow FLOW-JA-FACE 1 51 51 1 51 52
L2rfflow FLOW-JA-FACE 2 51 51 2 51 52
L1-L2flow FLOW-JA-FACE 1 51 51 2 51 51
END CONTINUOUS

Example Observation Input File


Example 3

BEGIN OPTIONS
DIGITS 10
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.gwe.temperature.csv


# obsname obstype ID
(continues on next page)

3.8. Utilities 245


MODFLOW 6

(continued from previous page)


L1 TEMPERATURE 1 51 51 # temps at lay 1 row 51 col 51
L2 TEMPERATURE 2 51 51 # temps at lay 2 row 51 col 51
END CONTINUOUS

BEGIN CONTINUOUS FILEOUT my_model.gwe.eflow.csv


# obsname obstype ID ID2
L1rfflow FLOW-JA-FACE 1 51 51 1 51 52
L2rfflow FLOW-JA-FACE 2 51 51 2 51 52
L1-L2flow FLOW-JA-FACE 1 51 51 2 51 51
END CONTINUOUS

Example Observation Input File


Example 4

BEGIN OPTIONS
DIGITS 10
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.gwt.conc.csv


# obsname obstype ID
L1 CONCENTRATION 1 51 51 # concs at lay 1 row 51 col 51
L2 CONCENTRATION 2 51 51 # concs at lay 2 row 51 col 51
END CONTINUOUS

BEGIN CONTINUOUS FILEOUT my_model.gwt.mflow.csv


# obsname obstype ID ID1
L1rfflow FLOW-JA-FACE 1 51 51 1 51 52
L2rfflow FLOW-JA-FACE 2 51 51 2 51 52
L1-L2flow FLOW-JA-FACE 1 51 51 2 51 51
END CONTINUOUS

Example Observation Input File


Example 5

BEGIN OPTIONS
DIGITS 10
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.swf.stage.csv


# obsname obstype ID
S1 STAGE 1 2
S2 STAGE 2 2
END CONTINUOUS

BEGIN CONTINUOUS FILEOUT my_model.swf.flow.csv


# obsname obstype ID ID2
(continues on next page)

246 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)


c1c2 FLOW-JA-FACE 1 1 1 2
END CONTINUOUS

Example Observation Input File


Example 6

BEGIN OPTIONS
DIGITS 10
PRINT_INPUT
END OPTIONS

BEGIN CONTINUOUS FILEOUT my_model.gwt.conc.csv


# obsname obstype ID
L1 CONCENTRATION 1 51 51 # concs at lay 1 row 51 col 51
L2 CONCENTRATION 2 51 51 # concs at lay 2 row 51 col 51
END CONTINUOUS

BEGIN CONTINUOUS FILEOUT my_model.gwt.mflow.csv


# obsname obstype ID ID1
L1rfflow FLOW-JA-FACE 1 51 51 1 51 52
L2rfflow FLOW-JA-FACE 2 51 51 2 51 52
L1-L2flow FLOW-JA-FACE 1 51 51 2 51 51
END CONTINUOUS

3.8.6 UTL-SFRTAB
Structure of Blocks
FOR EACH SIMULATION

BEGIN DIMENSIONS
NROW <nrow>
NCOL <ncol>
END DIMENSIONS

BEGIN TABLE
<xfraction> <height> [<manfraction>]
<xfraction> <height> [<manfraction>]
...
END TABLE

Explanation of Variables
Block: DIMENSIONS

• nrow integer value specifying the number of rows in the reach cross-section table. There must be NROW rows
of data in the TABLE block.
• ncol integer value specifying the number of columns in the reach cross-section table. There must be NCOL
columns of data in the TABLE block. NCOL must be equal to 2 if MANFRACTION is not specified or 3

3.8. Utilities 247


MODFLOW 6

otherwise.

Block: TABLE

• xfraction real value that defines the station (x) data for the cross-section as a fraction of the width (RWID) of
the reach. XFRACTION must be greater than or equal to zero but can be greater than one. XFRACTION values
can be used to decrease or increase the width of a reach from the specified reach width (RWID).
• height real value that is the height relative to the top of the lowest elevation of the streambed (RTP) and cor-
responding to the station data on the same line. HEIGHT must be greater than or equal to zero and at least one
cross-section height must be equal to zero.
• manfraction real value that defines the Manning’s roughness coefficient data for the cross-section as a fraction
of the Manning’s roughness coefficient for the reach (MAN) and corresponding to the station data on the same
line. MANFRACTION must be greater than zero. MANFRACTION is applied from the XFRACTION value
on the same line to the XFRACTION value on the next line. Although a MANFRACTION value is specified on
the last line, any value greater than zero can be applied to MANFRACTION(NROW). MANFRACTION is only
specified if NCOL is 3. If MANFRACTION is not specified, the Manning’s roughness coefficient for the reach
(MAN) is applied to the entire cross-section.

Example Input File

begin dimensions
nrow 11
ncol 3
end dimensions

begin table
# xfraction height manfraction
0.0 1.0 10.0
0.1 1.0 10.0
0.2 1.0 1.0
0.3 0.0 1.0
0.4 0.0 1.0
0.5 0.0 1.0
0.6 0.0 1.0
0.7 0.0 1.0
0.8 1.0 10.0
0.9 1.0 10.0
1.0 1.0 999.0 #any value can be used for manfraction
end table

3.8.7 UTL-SPC
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[PRINT_INPUT]
[TS6 FILEIN <ts6_filename>]
END OPTIONS

248 Chapter 3. Input Guide


MODFLOW 6

BEGIN DIMENSIONS
MAXBOUND <maxbound>
END DIMENSIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<bndno> <spcsetting>
<bndno> <spcsetting>
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• PRINT_INPUT keyword to indicate that the list of spc information will be written to the listing file immediately
after it is read.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.

Block: DIMENSIONS

• maxbound integer value specifying the maximum number of spc cells that will be specified for use during any
stress period.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• bndno integer value that defines the boundary package feature number associated with the specified PERIOD
data on the line. BNDNO must be greater than zero and less than or equal to MAXBOUND.
• spcsetting line of information that is parsed into a keyword and values. Keyword values that can be used to
start the SPCSETTING string include: CONCENTRATION and TEMPERATURE.

CONCENTRATION <concentration>
TEMPERATURE <temperature>

• concentration is the boundary concentration. If the Options block includes a TIMESERIESFILE entry (see
the “Time-Variable Input” section), values can be obtained from a time series by entering the time-series name
in place of a numeric value. By default, the CONCENTRATION for each boundary feature is zero.
• temperature is the user-supplied boundary temperature. If the Options block includes a TIMESERIESFILE
entry (see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-
series name in place of a numeric value. By default, the TEMPERATURE for each boundary feature is zero.

3.8. Utilities 249


MODFLOW 6

Example Input File


Example 1

BEGIN options
PRINT_INPUT
TS6 FILEIN transport.wel1.ts
END options

BEGIN DIMENSIONS
MAXBOUND 10
END DIMENSIONS

BEGIN PERIOD 1
1 concentration myconc1ts
2 concentration 100.0
3 concentration 100.0
4 concentration 100.0
5 concentration 100.0
6 concentration 100.0
7 concentration 100.0
8 concentration 100.0
9 concentration 100.0
10 concentration 100.0
END period

# Change boundary 1 and 2 concentrations to zero


# and leave boundaries 3 through 10 at 100.0
BEGIN PERIOD 3
1 concentration 0.0
2 concentration 0.0
END period

Example 2

BEGIN options
READASARRAYS
PRINT_INPUT
END options

BEGIN PERIOD 1
CONCENTRATION
INTERNAL FACTOR 1.0
0.00000000 1.00000000 2.00000000 3.00000000 4.
˓→00000000

5.00000000 6.00000000 7.00000000 8.00000000 9.


˓→00000000

10.00000000 11.00000000 12.00000000 13.00000000 14.


˓→00000000

15.00000000 16.00000000 17.00000000 18.00000000 19.


˓→00000000

20.00000000 21.00000000 22.00000000 23.00000000 24.


˓→00000000

END PERIOD
(continues on next page)

250 Chapter 3. Input Guide


MODFLOW 6

(continued from previous page)

BEGIN PERIOD 3
CONCENTRATION
CONSTANT 0.0
END PERIOD

3.8.8 UTL-SPCA
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
READASARRAYS
[PRINT_INPUT]
[TAS6 FILEIN <tas6_filename>]
END OPTIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


[CONCENTRATION
<concentration(ncol*nrow; ncpl)> -- READARRAY]
[TEMPERATURE
<temperature(ncol*nrow; ncpl)> -- READARRAY]
END PERIOD

Explanation of Variables
Block: OPTIONS

• READASARRAYS indicates that array-based input will be used for the SPC Package. This keyword must be specified
to use array-based input. When READASARRAYS is specified, values must be provided for every cell within a
model layer, even those cells that have an IDOMAIN value less than one. Values assigned to cells with IDOMAIN
values less than one are not used and have no effect on simulation results.
• PRINT_INPUT keyword to indicate that the list of spc information will be written to the listing file immediately
after it is read.
• TAS6 keyword to specify that record corresponds to a time-array-series file.
• FILEIN keyword to specify that an input filename is expected next.
• tas6_filename defines a time-array-series file defining a time-array series that can be used to assign time-
varying values. See the Time-Variable Input section for instructions on using the time-array series capability.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.
The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.

3.8. Utilities 251


MODFLOW 6

• concentration is the concentration of the associated Recharge or Evapotranspiration stress package. The
concentration array may be defined by a time-array series (see the “Using Time-Array Series in a Package”
section).
• temperature is the temperature of the associated Recharge or Evapotranspiration stress package. The temper-
ature array may be defined by a time-array series (see the “Using Time-Array Series in a Package” section).

Example Input File

BEGIN options
READASARRAYS
PRINT_INPUT
END options

BEGIN PERIOD 1
CONCENTRATION
INTERNAL FACTOR 1.0
0.00000000 1.00000000 2.00000000 3.00000000 4.
˓→00000000

5.00000000 6.00000000 7.00000000 8.00000000 9.


˓→00000000

10.00000000 11.00000000 12.00000000 13.00000000 14.


˓→00000000

15.00000000 16.00000000 17.00000000 18.00000000 19.


˓→00000000

20.00000000 21.00000000 22.00000000 23.00000000 24.


˓→00000000

END PERIOD

BEGIN PERIOD 3
CONCENTRATION
CONSTANT 0.0
END PERIOD

3.8.9 UTL-TAS
Structure of Blocks
FOR EACH SIMULATION

BEGIN ATTRIBUTES
NAME <time_series_name>
[METHOD <interpolation_method>]
[SFAC <sfacval>]
END ATTRIBUTES

BEGIN TIME <time_from_model_start>

<tas_array(unknown)> -- READARRAY
END TIME

252 Chapter 3. Input Guide


MODFLOW 6

Explanation of Variables
Block: ATTRIBUTES

• NAME xxx
• time_series_name Name by which a package references a particular time-array series. The name must be
unique among all time-array series used in a package.
• METHOD xxx
• interpolation_method Interpolation method, which is either STEPWISE or LINEAR.
• SFAC xxx
• sfacval Scale factor, which will multiply all array values in time series. SFAC is an optional attribute; if
omitted, SFAC = 1.0.

Block: TIME

• time_from_model_start A numeric time relative to the start of the simulation, in the time unit used in the
simulation. Times must be strictly increasing.
• tas_array An array of numeric, floating-point values, or a constant value, readable by the U2DREL array-
reading utility.

3.8.10 UTL-TS
Structure of Blocks
FOR EACH SIMULATION

BEGIN ATTRIBUTES
NAMES <time_series_names>
[METHODS <interpolation_method>]
[METHOD <interpolation_method_single>]
METHOD
<interpolation_method_single>
[SFACS <sfacval>]
[<sfacval>]

END ATTRIBUTES

BEGIN TIMESERIES
<ts_time> <ts_array>
<ts_time> <ts_array>
...
END TIMESERIES

Explanation of Variables
Block: ATTRIBUTES

• NAMES xxx
• time_series_names Name by which a package references a particular time-array series. The name must be
unique among all time-array series used in a package.
• METHODS xxx

3.8. Utilities 253


MODFLOW 6

• interpolation_method Interpolation method, which is either STEPWISE or LINEAR.


• METHOD xxx
• interpolation_method_single Interpolation method, which is either STEPWISE or LINEAR.
• SFACS xxx
• sfacval Scale factor, which will multiply all array values in time series. SFAC is an optional attribute; if
omitted, SFAC = 1.0.
• SFAC xxx

Block: TIMESERIES

• ts_time A numeric time relative to the start of the simulation, in the time unit used in the simulation. Times
must be strictly increasing.
• ts_array A 2-D array of numeric, floating-point values, or a constant value, readable by the U2DREL array-
reading utility.

3.8.11 UTL-TVK
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[PRINT_INPUT]
[TS6 FILEIN <ts6_filename>]
END OPTIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<cellid> <tvksetting>
<cellid> <tvksetting>
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• PRINT_INPUT keyword to indicate that information for each change to the hydraulic conductivity in a cell will
be written to the model listing file.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.

254 Chapter 3. Input Guide


MODFLOW 6

The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.
• tvksetting line of information that is parsed into a property name keyword and values. Property name key-
words that can be used to start the TVKSETTING string include: K, K22, and K33.

K <k>
K22 <k22>
K33 <k33>

• k is the new value to be assigned as the cell’s hydraulic conductivity from the start of the specified stress period, as
per K in the NPF package. If the OPTIONS block includes a TS6 entry (see the “Time-Variable Input” section),
values can be obtained from a time series by entering the time-series name in place of a numeric value.
• k22 is the new value to be assigned as the cell’s hydraulic conductivity of the second ellipsoid axis (or the ratio
of K22/K if the K22OVERK NPF package option is specified) from the start of the specified stress period, as
per K22 in the NPF package. For an unrotated case this is the hydraulic conductivity in the y direction. If the
OPTIONS block includes a TS6 entry (see the “Time-Variable Input” section), values can be obtained from a
time series by entering the time-series name in place of a numeric value.
• k33 is the new value to be assigned as the cell’s hydraulic conductivity of the third ellipsoid axis (or the ratio
of K33/K if the K33OVERK NPF package option is specified) from the start of the specified stress period, as
per K33 in the NPF package. For an unrotated case, this is the vertical hydraulic conductivity. If the OPTIONS
block includes a TS6 entry (see the “Time-Variable Input” section), values can be obtained from a time series
by entering the time-series name in place of a numeric value.

Example Input File

BEGIN OPTIONS
TS6 FILEIN tvk_cells.ts
# Note: Time-series file tvk_cells.ts defines time series cells_kz
END OPTIONS

# Cell 5 will have its K value changed to 1e-3 in the first time step of
# stress period 2, and changed once more to 1e-4 in the first time step of
# stress period 4.
#
# Cells 101 and 108 will have their respective K33 values changed according
# to the time series cells_kz specified in the file tvk_cells.ts. Note that
# these values may continue to change beyond stress period 2, depending on
# the duration of the time series cells_sy.
#
# No changes are made in stress period 1 due to an absence of a block
# for that period; cells maintain the initial property values specified in
# the NPF package for the entirety of that period.

BEGIN PERIOD 2
5 K 1e-3
101 K33 cells_kz
108 K33 cells_kz
(continues on next page)

3.8. Utilities 255


MODFLOW 6

(continued from previous page)


END PERIOD

BEGIN PERIOD 4
5 K 1e-4
END PERIOD

# After the last specified change (or after the last specified time record,
# when a time series is used), each affected cell will retain its latest
# changed value for the remainder of the simulation.

3.8.12 UTL-TVS
Structure of Blocks
FOR EACH SIMULATION

BEGIN OPTIONS
[DISABLE_STORAGE_CHANGE_INTEGRATION]
[PRINT_INPUT]
[TS6 FILEIN <ts6_filename>]
END OPTIONS

FOR ANY STRESS PERIOD

BEGIN PERIOD <iper>


<cellid> <tvssetting>
<cellid> <tvssetting>
...
END PERIOD

Explanation of Variables
Block: OPTIONS

• DISABLE_STORAGE_CHANGE_INTEGRATION keyword that deactivates inclusion of storage derivative terms in


the STO package matrix formulation. In the absence of this keyword (the default), the groundwater storage
formulation will be modified to correctly adjust heads based on transient variations in stored water volumes
arising from changes to SS and SY properties.
• PRINT_INPUT keyword to indicate that information for each change to a storage property in a cell will be written
to the model listing file.
• TS6 keyword to specify that record corresponds to a time-series file.
• FILEIN keyword to specify that an input filename is expected next.
• ts6_filename defines a time-series file defining time series that can be used to assign time-varying values. See
the “Time-Variable Input” section for instructions on using the time-series capability.

Block: PERIOD

• iper integer value specifying the starting stress period number for which the data specified in the PERIOD block
apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value
assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block.

256 Chapter 3. Input Guide


MODFLOW 6

The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless
the program encounters another PERIOD block.
• cellid is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured
grid that uses the DIS input file, CELLID is the layer, row, and column. For a grid that uses the DISV input file,
CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file,
CELLID is the node number for the cell.
• tvssetting line of information that is parsed into a property name keyword and values. Property name key-
words that can be used to start the TVSSETTING string include: SS and SY.

SS <ss>
SY <sy>

• ss is the new value to be assigned as the cell’s specific storage (or storage coefficient if the STORAGECOEF-
FICIENT STO package option is specified) from the start of the specified stress period, as per SS in the STO
package. Specific storage values must be greater than or equal to 0. If the OPTIONS block includes a TS6 entry
(see the “Time-Variable Input” section), values can be obtained from a time series by entering the time-series
name in place of a numeric value.
• sy is the new value to be assigned as the cell’s specific yield from the start of the specified stress period, as per
SY in the STO package. Specific yield values must be greater than or equal to 0. If the OPTIONS block includes
a TS6 entry (see the “Time-Variable Input” section), values can be obtained from a time series by entering the
time-series name in place of a numeric value.

Example Input File

BEGIN OPTIONS
TS6 FILEIN tvs_cells.ts
# Note: Time-series file tvs_cells.ts defines time series cells_sy
END OPTIONS

# Cell 45 will have its SS value changed to 1e-6 in the first time step of
# stress period 2, and changed once more to 1e-7 in the first time step of
# stress period 4.
#
# Cells 188 and 291 will have their respective SY values changed according
# to the time series cells_sy specified in the file tvs_cells.ts. Note that
# these values may continue to change beyond stress period 2, depending on
# the duration of the time series cells_sy.
#
# No changes are made in stress period 1 due to an absence of a block
# for that period; cells maintain the initial property values specified in
# the STO package for the entirety of that period.

BEGIN PERIOD 2
45 SS 1e-6
188 SY cells_sy
291 SY cells_sy
END PERIOD

BEGIN PERIOD 4
45 SS 1e-7
END PERIOD

(continues on next page)

3.8. Utilities 257


MODFLOW 6

(continued from previous page)


# After the last specified change (or after the last specified time record,
# when a time series is used), each affected cell will retain its latest
# changed value for the remainder of the simulation.

258 Chapter 3. Input Guide


CHAPTER

FOUR

DEVELOPER GUIDE

This section contains developer documentation, including contributor conventions, instructions for common tasks,
internal specifications, and more.

4.1 Code of Conduct


All contributions to — and interactions surrounding — this project will abide by the USGS Code of Scientific Conduct.

4.2 Contributing to MODFLOW 6


Contributions to MODFLOW 6 are welcome. We ask that contributors follow some guidelines.
• Conduct
• Submissions
– Bugs
– Questions
– Requests
• Source code
– Format
– Style guide
• Commit messages
– Template
– Components
∗ Type
∗ Scope
∗ Subject
∗ Body
∗ Footer

259
MODFLOW 6

4.2.1 Conduct
Help us keep MODFLOW 6 open and inclusive. Please read and follow our Code of Conduct.

4.2.2 Submissions
Bugs
If you find a bug, you can help us by submitting an issue. Even better, you can submit a pull request with a fix.
Before submitting an issue, please search the issue tracker. Your issue may already have been reported, and the discus-
sion might inform you of workarounds readily available.
We want to fix all issues as soon as possible, but we first need to reproduce and confirm them. We ask that all bug
reports provide a minimal, complete, and verifiable example of the problem, including the following information:
• Operating system
• Version of MODFLOW 6
• A description of the problem contrasting actual with expected behavior
• A minimal recipe to reproduce the problem — e.g. Python/FloPy script or MF6 input files.
Please provide such an example. This saves maintainers time and ultimately allows us to fix more bugs. While we
understand it might be difficult to isolate the essence of a problem, bugs can only be investigated or fixed if problems
are accurately identified. Issues lacking sufficient information to reproduce may be closed.
File an issue by filling out our issue form.

Questions
Please do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature
requests. Questions can be asked on the discussions page under the Q&A category or on Stack Overflow with tag
modflow6.
We will systematically close all issues that are requests for general support.

Requests
You can request a new feature by submitting an issue to our GitHub Repository.
If you would like to implement a new feature:
• Major features should be discussed first. Please open an issue and outline your proposal. This will also allow
us to coordinate our efforts, prevent duplication of work, and help you craft the change so that it can be accepted
into the project.
• Small features can be submitted directly as a pull request.
To submit a pull request (PR):
1. To avoid duplicating effort, search for an open or closed PR that relates to your submission.
2. Fork the MODFLOW-ORG/modflow6 repo and make your changes in a new branch, following our style and
commit message guidelines and including appropriate test cases.
3. Check the spelling and formatting of any modified or new Fortran source files, python files definition files,
markdown, and LaTeX files.
4. Rebuild makefiles and update MSVS project files if you added, removed, or renamed any source files.
5. Run the full test suite and make sure all tests pass.
6. Push your branch to GitHub and create a pull request to the develop branch.

260 Chapter 4. Developer Guide


MODFLOW 6

7. If we suggest changes: a. make the required updates b. make sure tests still pass c. rebase your branch if needed
d. (force) push to update your PR
That’s it! Thank you for your contribution!
If you have installed the pixi environment you can complete steps 3 and 4 using:

pixi run prepare-pull-request

4.2.3 Source code


Format
MODFLOW 6 source code is formatted automatically with the fprettify formatter. Format rules are specified in the
fprettify configuration file. See the developer docs for instructions on using fprettify.

Style guide
Automated tools like fprettify cannot directly address all style concerns. Please review our style guide before
submitting your code.

4.2.4 Commit messages


Adherence to commit message formatting rules results in consistent messages and a more readable project history.
Each commit message consists of three components: header (required), body (optional) and footer (optional). The
header has three subcomponents: type (required), scope (optional) and subject (required):
See the develop branch history to get a sense for the commit style.

Template
The general structure of a commit message is:

<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>

Components
Type

Must be one of the following:


• ci: CI configuration files or scripts
• docs: Online or PDF documentation
• feat: New features
• fix: Bug fixes
• perf: Performance improvements
• refactor: Neither fixes a bug nor adds a feature, but may e.g. improve maintainability
• style: Non-functional format/style changes only
• test: New tests, corrections to existing tests, test refactors

4.2. Contributing to MODFLOW 6 261


MODFLOW 6

• revert: Revert a previous commit — the commit message should identify the hash of the commit being reverted

Scope

The scope should identify the main target of the change. This might be, for instance:
• a filename
• an MF6 package name
• a Fortran module name
• a section of the documentation, e.g. “releasenotes” or “readme”

Subject

The subject contains a succinct description of the change.


Use the imperative, present tense: “change” not “changed” nor “changes”. Avoid initial capitalization and do not end
the line with a full stop.

Body

The body should include the motivation for the change and contrast previous and modified behavior.
Use standard capitalization and punctuation and break long explanations into suitable paragraphs. Single-backtick
code snippets may be used.
Just as in the subject, use the imperative present tense: “change” not “changed” nor “changes”.

Footer

If the commit closes an issue, the footer should contain a closing reference.
If the commit includes breaking changes, the footer should note this prominently.

4.3 Developing MODFLOW 6


This document describes how to set up a development environment to modify, build and test MODFLOW 6. Details
on how to contribute your code to the repository are found in the separate document CONTRIBUTING.md.
To build and test an extended version of the program, first read the instructions below and then continue in EX-
TENDED.md.
• Prerequisites
– Git
– Python
– Fortran compiler
∗ GNU Fortran
∗ Intel Fortran
· Windows
∗ Compiler compatibility
· Compile
· Test

262 Chapter 4. Developer Guide


MODFLOW 6

– Optional tools
• Get the MODFLOW 6 repository
• Install the python environment
– Python dependencies
∗ meson
∗ codespell
∗ fprettify
∗ ruff
∗ mfpymake
∗ flopy
∗ modflow-devtools
• Building
• Formatting
– Spell checking
– Fortran formatting
– Python formatting
– Python linting
• Testing
– Configuring a test environment
∗ Configuring unit tests
∗ Configuring integration tests
· Rebuilding release binaries
· Updating FloPy packages
· Updating Fortran definitions
· Installing external models
– Running tests
∗ Running unit tests
∗ Running integration tests
· Selecting tests with markers
– Writing tests
∗ Writing unit tests
∗ Writing integration tests
· Test framework
• Generating makefiles
– Updating extra and excluded files
– Testing makefiles

4.3. Developing MODFLOW 6 263


MODFLOW 6

– Installing make on Windows


∗ Using Conda from Git Bash
• Branching model
– Overview
– Managing long-lived branches
∗ Backup
∗ Squash
∗ Rebase
∗ Cleanup
• Deprecation policy
– Finding deprecations

4.3.1 Prerequisites
Before you can build and test MODFLOW 6, you must install and configure the following on your development machine:
• git
• Python3.10+
• a modern Fortran compiler
Some additional, optional tools are also discussed below.

Git
Git and/or the GitHub app (for Mac or Windows). GitHub’s Guide to Installing Git is a good source of information.
Optionally, the git blame tool can be configured to work locally using:

git config blame.ignoreRevsFile .git-blame-ignore-revs

Python
Python 3.10+ is required to run MODFLOW 6 tests and in some cases to build MODFLOW 6. Information on installing
the python environment is given in the Installing Python environment section. The MODFLOW 6 python environment
should be installed after locally cloning the repository.

Fortran compiler
GNU Fortran or Intel Fortran compilers can be used to build MODFLOW 6. It may be possible to build MODFLOW
6 with other compilers, but this cannot be guaranteed.

GNU Fortran

GNU Fortran can be installed on all three major platforms.


Linux
• Fedora-based: dnf install gcc-gfortran
• Debian-based: apt install gfortran
macOS

264 Chapter 4. Developer Guide


MODFLOW 6

• Homebrew: brew install gcc@13


• MacPorts: sudo port install gcc13
Note: Xcode 15 includes a new linker implementation which breaks GNU Fortran compatibility. A workaround is to
set LDFLAGS to use the classic linker, for instance:

export LDFLAGS="$LDFLAGS -Wl,-ld_classic"

See this ticket on the Meson repository for more information.


Windows
Minimalist GNU for Windows is the recommended way to obtain the GCC toolchain on Windows. Several MinGW
distributions are available.
To install with Chocolatey: choco install mingw
To install from SourceForge:
• Download the MinGW installer: https://sourceforge.net/projects/mingw-
w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-
install.exe
• Run the installer. Make sure to change Architecture to x86_64. Leave the other settings on default.
• Find the mingw64/bin directory in the installation and add it to your PATH. Find Edit the system
environment variables in your Windows Start Screen. Click the Environmental Variables button and
double-click the Path variable in the User Variables (the top table). Click the New button and enter the location
of the mingw64/bin directory.
Binaries may also be downloaded and installed from the releases here.
Note: the MinGW distribution available on conda-forge includes an outdated version of GCC and is not compatible
with MODFLOW 6.

Intel Fortran

Intel Fortran can also be used to compile MODFLOW 6 and associated utilities. The ifort and ifx compilers are
available in the Intel oneAPI HPC Toolkit.
A number of environment variables must be set before using Intel Fortran. General information can be found here,
with specific instructions to configure a shell session for ifort here.
While the current development version of MODFLOW 6 is broadly compatible with ifort, ifx compatibility is still
limited on Ubuntu and Windows, and ifx is not supported on macOS.

Windows

On Windows, Visual Studio and a number of libraries must be installed for ifort and ifx to work. The required
libraries can be installed by ticking the “Desktop Development with C++” checkbox in the Visual Studio Installer’s
Workloads tab.
Note: Invoking the setvars.bat scripts from a Powershell session will not put ifort or ifx on the path, since batch
script environments are local to their process. To relaunch PowerShell with oneAPI variables configured:

cmd.exe "/K" '"C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat" && "C:\Program␣


˓→Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat" && powershell'

4.3. Developing MODFLOW 6 265


MODFLOW 6

Compiler compatibility

The following tables are automatically generated by a CI workflow.

Compile

run-gcc gcc gcc gcc gcc gcc gcc intel-intel-intel-intel-intel-intel-intel-intel-intel-intel-in- in- in- in- in- in- in- in- in- in-
ner 10 11 12 13 7 8 9 classic classic
classic
classic
classic
classic
classic
classic
classic
classic
tel tel tel tel tel tel tel tel tel tel
2021.1
2021.10
2021.22021.32021.42021.52021.62021.72021.82021.92021.12021.2
2021.4
2022.0
2022.1
2022.2.1
2022.2
2023.0
2023.1
2023.2
macos-
✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
11
macos-
✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
12
ubuntu-
✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
20.04
ubuntu-
✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
22.04
windows-
✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
2019
windows-
✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
2022

Test

run-gcc gcc gcc gcc gcc gcc gcc intel-intel-intel-intel-intel-intel-intel-intel-intel-intel-in- in- in- in- in- in- in- in- in- in-
ner 10 11 12 13 7 8 9 classic classic
classic
classic
classic
classic
classic
classic
classic
classic
tel tel tel tel tel tel tel tel tel tel
2021.1
2021.10
2021.22021.32021.42021.52021.62021.72021.82021.92021.12021.2
2021.4
2022.0
2022.1
2022.2.1
2022.2
2023.0
2023.1
2023.2
macos-
✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
11
macos-
✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
12
ubuntu-
✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
20.04
ubuntu-
✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
22.04
windows- ✓ ✓ ✓
2019
windows-
✓ ✓ ✓ ✓ ✓ ✓ ✓
2022

Optional tools
Some other tools are useful but not required to develop MODFLOW 6.
GNU Make
This repository provides makefiles, generated by mfpymake, which can be used to build MODFLOW 6 with GNU
Make. For further instructions we refer to the GNU Make Manual.
Visual Studio
Visual Studio installers can be downloaded from the official website. MODFLOW 6 solution files can be found in the
msvs folder.

266 Chapter 4. Developer Guide


MODFLOW 6

Doxygen & LaTeX


Doxygen is used to generate the MODFLOW 6 source code documentation. Graphviz is used by doxygen to produce
source code diagrams. LaTeX is used to generate the MODFLOW 6 release notes and Input/Output documents.
These programs can be installed from various sources, including by conda, macports, or from individual sources such as
https://www.tug.org/. Details about USGS LaTeX libraries can be seen in addition to linux installs in the CI workflow
for the docs (.github/workflows/ci-docs.yml).

4.3.2 Get the MODFLOW 6 repository


Fork and clone the MODFLOW 6 repository:
1. Login to your GitHub account or create one by following the instructions given here.
2. Fork the main MODFLOW 6.
3. Clone your fork of the MODFLOW 6 repository and create an upstream remote pointing back to your fork.
After forking the MODFLOW 6 repository on GitHub.
1. Clone your fork of the GitHub repository to your computer.

git clone [email protected]:<github username>/modflow6.git

2. Go to the MODFLOW 6 directory.

cd modflow6

3. Add the main MODFLOW 6 repository as an upstream remote to your repository.

git remote add upstream https://github.com/MODFLOW-ORG/modflow6.git

4.3.3 Install the python environment


Python 3.10+ is required to run MODFLOW 6 tests and in some cases to build MODFLOW 6. Miniforge is the
recommended python distribution if you do not have an existing Conda or Mamba based python distribution.
The environment file for MODFLOW 6 includes all of the required python dependencies. Install the modflow6 envi-
ronment using the Conda environment.yml file in the repository.
1. Open a terminal (command prompt) in the root directory of the repository.
2. Use either Mamba or Conda to install the modflow6 environment.

mamba env create -f environment.yml

conda env create -f environment.yml

Python can also be installed via Pixi. Pixi is currently being used to install python on GitHub Actions continuous
integration/continuous development (CI/CD) virtual machines. In the future, Pixi may be the preferred approach for
installing python for MODFLOW 6. As a result it is recommended for developers to also install the Pixi python
environment, which can coexist with the Mamba/Conda python installation and modflow6 environment.
Pixi installation docs can be found here. After installing pixi, to set up an environment with all development depen-
dencies, in the root directory of the MODFLOW 6 repository run:

pixi run install

4.3. Developing MODFLOW 6 267


MODFLOW 6

Python dependencies
This project depends critically on a few Python packages for building, linting, spell checking, and testing tasks:
• meson
• codespell
• fprettify
• ruff
• mfpymake
• flopy
• modflow-devtools
These are each described briefly below. These and a number of other dependencies are build-, test-, or release-time
dependencies are included the Pixi environment pixi.toml as well as the Conda environment.yml file in this repos-
itory.

meson

Meson is the recommended build system for MODFLOW 6.

codespell

codespell was designed primarily for checking misspelled words in source code, but can be used with other text files
as well. This tool can be used from the command line or integrated with a VSCode. See Spell check guidelines for
additional information.

fprettify

fprettify can be used to format Fortran source code and in combination with the MODFLOW 6 fprettify configuration
establishes a contribution standard for properly formatted MODFLOW 6 Fortran source. This tool can be used from
the command line or integrated with a VSCode or Visual Studio development environment. See Fortran formatting
guidelines for additional information.

ruff

ruff can be used to format and lint python code and scripts (for example, autotest scripts) and in combination with
the MODFLOW 6 ruff configuration establishes a contribution standard for properly formatted python code and scripts.
This tool can be used from the command line or integrated with a VSCode. See python formatting guidelines and python
linting guidelines for additional information.

mfpymake

The mfpymake package can build MODFLOW 6 and related programs and artifacts (e.g. makefiles), and is used in
particular by the distribution/build_makefiles.py script.

flopy

flopy is used throughout MODFLOW 6 tests to create, run and post-process models.
Like MODFLOW 6, flopy is modular — for each MODFLOW 6 package there is generally a corresponding flopy
package. Packages are generated dynamically from DFN files stored in this repository under doc/mf6io/mf6ivar/
dfn.

268 Chapter 4. Developer Guide


MODFLOW 6

modflow-devtools

The tests use a set of shared fixtures and utilities provided by the modflow-devtools package.

4.3.4 Building
Meson is the recommended build tool for MODFLOW 6. Meson must be installed and on your PATH. Creating and
activating the provided Pixi or Conda environment should be sufficient for this.

MODFLOW 6 and ZONEBUDGET


Meson build configuration files are provided for MODFLOW 6 and the ZONEBUDGET utility program, and for Fortran
unit tests (see Testing section below).
• meson.build
• utils/zonebudget/meson.build
• autotest/meson.build
Building MODFLOW 6 requires two steps:
• configure the build directory
• build the project
To configure the build directory for a debug version:

meson setup --prefix=$(pwd) --libdir=bin builddir -Ddebug=true

Or to configure the build directory for an optimized release version:

meson setup --prefix=$(pwd) --libdir=bin builddir

or using pixi to setup the build directory:

pixi run setup builddir

Debug versions can be built using pixi by adding -Ddebug=true at the end of the pixi command. Other meson
commands (for example, -Dextended=true, --wipe, etc.) added to the pixi command are passed through to Meson.
Substitute %CD% as necessary on Windows.
To build MODFLOW 6 and install binaries to <project root>/bin/:

meson install -C builddir

or using pixi:

pixi run build builddir

MODFLOW 2005 to 6 converter


Meson build configuration files are provided for the MODFLOW 2005 to 6 converter utility program.
• utils/mf5to6/meson.build
• utils/mf5to6/src/meson.build
Building MODFLOW 2005 to 6 converter program requires two steps:
• configure the build directory

4.3. Developing MODFLOW 6 269


MODFLOW 6

• build the project


To configure the build directory for a debug version from the <project root>/utils/mf5to6 directory:

meson setup --prefix=$(pwd)/../../ builddir -Ddebug=true

Or to configure the build directory for an optimized release version from the <project root>/utils/mf5to6 direc-
tory:

meson setup --prefix=$(pwd)/../../ builddir

or using pixi to setup the build directory from the <project root> directory:

pixi run setup-mf5to6 builddir

Debug versions can be built using pixi by adding -Ddebug=true at the end of the pixi command. Other meson
commands (for example, --wipe, etc.) added to the pixi command are passed through to Meson.
Substitute %CD% as necessary on Windows.
To build MODFLOW 6 and install binaries to <project root>/bin/ from the <project root>/utils/mf5to6
directory:

meson install -C builddir

or using pixi from the <project root> directory:

pixi run build-mf5to6 builddir

Note: If using Visual Studio Code, you can use tasks as described here to automate the above.

4.3.5 Formatting
Spell checking
Fortran source files, python files, definition files, markdown, and LaTeX files can be checked with codespell. codespell
was designed primarily for checking misspelled words in source code, but it can be used with other text files as well.
The codespell package is included in the Conda environment.yml and the Pixi pixi.toml files and can be run
directly, via Pixi, or via VSCode tasks.
To check whether the repository’s Fortran source files, python files, definition files, markdown, and LaTeX files have
any spelling errors without making any changes:

pixi run check-spelling

Or, from an environment with codespell installed, simply

codespell

To fix spelling errors in all files, use -w (--write-changes). When run in this way, the tool will modify the file in
place. If unresolvable errors are encountered, these are written to standard output and must be manually fixed before
attempting to rerun the tool.
Note: Spell checking by codespell may make unwanted changes (for example, a variable name in source code). As
a result, you should check the codespell changes. codespell can be forced to leave a particular word unchanged by
adding it to the .codespell.ignore file.

270 Chapter 4. Developer Guide


MODFLOW 6

Fortran formatting
Fortran source code can be formatted with fprettify, specifying the MODFLOW 6 fprettify configuration. The
fprettify package is included in the Conda environment.yml and the Pixi pixi.toml files and can be run di-
rectly, via Pixi, or via VSCode tasks.
For instance, to format a single file:

fprettify -c .fprettify.yaml ./utils/zonebudget/src/zbud6.f90

When run in this way, the tool will modify the file in place and generate no output if successful. If unresolvable
formatting errors are encountered (e.g. for excess line length), these are written to standard output and must be manually
fixed before attempting to rerun the tool.
To check whether the repository’s source files satisfy formatting requirements without making any changes:

python .github/common/check_format.py

or using pixi:

pixi run check-format

To format all files, add the --write-changes flag to the end of the python or pixi commands. These commands will
exclude the proper files from formatting, including vendored library sources in src/Utilities/Libraries.
Note: as fprettify may shift code in unexpected ways, it is a good idea to visually check source files afterwards.

Python formatting
Python code and scripts can be formatted with ruff, specifying the MODFLOW 6 ruff configuration. The ruff package
is included in the Conda environment.yml and Pixi pixi.toml files and can be run directly, via Pixi, or via VSCode
tasks.
For instance, to format a single file:

ruff format autotest/test_gwe_cnd.py

When run in this way, ruff will modify the file in place and generate no output if successful. If unresolvable formatting
errors are encountered, these are written to standard output and must be manually fixed before attempting to rerun the
tool.
To check whether the repository’s python code and scripts satisfy formatting requirements without making any changes:

ruff format --check .

or using pixi:

pixi run check-python-format

To format all files, remove the --check flag from the python command or run the pixi command:

pixi run fix-python-format

Python linting
Linting is the automated checking of source code for programmatic and stylistic errors. python code and scripts can
be linted with ruff, specifying the MODFLOW 6 ruff configuration. The ruff package is included in the Conda
environment.yml and Pixi pixi.toml files and can be run directly, via Pixi, or via VSCode tasks.

4.3. Developing MODFLOW 6 271


MODFLOW 6

For instance, to lint a single file:

ruff check --fix autotest/test_gwe_cnd.py

When run in this way, ruff will modify the file in place and generate no output if successful. If unresolvable formatting
errors are encountered, these are written to standard output and must be manually fixed before attempting to rerun the
tool.
To check whether the repository’s python code and scripts satisfy linting requirements without making any changes:

ruff check .

or using pixi:

pixi run check-python-lint

To format all files, add the --fix flag to the python command or pixi command. Alternatively with pixi run:

pixi run fix-python-lint

4.3.6 Testing
MODFLOW 6 unit tests are written in Fortran with test-drive.
MODFLOW 6 integration tests are written in Python with pytest. Integration testing dependencies are included in
Pixi and Conda environments.
Note: the entire test suite should pass before a pull request is submitted. Tests run in GitHub Actions CI and a PR can
only be merged with passing tests. See CONTRIBUTING.md for more information.

Configuring a test environment


Before running tests, there are a few steps to complete. Most importantly, the local development version of MODFLOW
6 must be built, e.g. with Meson as described above.
The autotest/build_exes.py script is provided as a shortcut to rebuild local binaries. It can be invoked as a
standard Python script or with Pytest. By default, binaries are placed in the bin directory relative to the project root,
as in the Meson commands described above. To change the location of the binaries, use the --path option.

Configuring unit tests

Unit tests are driven with Meson. A small number of Meson-native tests are defined in the top-level meson.build file
to check that MODFLOW 6 has installed successfully. These require no additional configuration.
Additional Fortran unit tests are defined with test-drive in the autotest/ folder, with test files named Test*.f90.
If Meson fails to find the test-drive library via pkg-config, these will be skipped.
Note: the test-drive source code is not yet compatible with recent versions of Intel Fortran, building with gfortran
is recommended.
See the Running unit tests section for instructions on running unit tests.

Configuring integration tests

A few more tasks must be completed before integration testing:


• install MODFLOW-related executables
• ensure FloPy packages are up to date

272 Chapter 4. Developer Guide


MODFLOW 6

• install MODFLOW 6 example/test models


As mentioned above, binaries live in the bin subdirectory of the project root. This directory is organized as follows:
• local development binaries in the top-level bin
• binaries rebuilt in development mode from the latest MODFLOW 6 release in bin/rebuilt/
• related programs installed from the executables distribution in bin/downloaded/

Rebuilding release binaries

Tests require the latest official MODFLOW 6 release to be compiled in develop mode with the same Fortran compiler
as the development version. A number of binaries distributed from the executables repo must also be installed. The
script autotest/get_exes.py does both of these things. It can be run from the project root with:

pixi run get-exes

Alternatively, from the autotest/ directory:

pytest get_exes.py

As above, binaries are placed in the bin subdirectory of the project root, with nested bin/downloaded and bin/
rebuilt subdirectories containing the rebuilt latest release and downloaded binaries, respectively.

Updating FloPy packages

FloPy packages should be regenerated from DFN files before running tests for the first time or after definition files
change. This can be done with the autotest/update_flopy.py script, which wipes and regenerates package classes
for the FloPy installed in the Python environment.
Note: if you’ve installed an editable local version of FloPy from source, running this script can overwrite files in your
repository.
There is a single optional argument, the path to the folder containing definition files. By default DFN files are assumed
to live in doc/mf6io/mf6ivar/dfn, making the following functionally identical:

pixi run update-flopy

which uses the default dfn path. Or the location of the definition files can be explitily defined using:

pixi run update-flopy doc/mf6io/mf6ivar/dfn

Alternatively, run python update_flopy.py directly from autotest/.

Updating Fortran definitions

MODFLOW 6 contains autogenerated Fortran modules, called Fortran definitions here, for input components. Any
time a MODFLOW 6 input definition file (DFN) has been changed, Fortran definitions must be regenerated and the
project rebuilt.
To regenerate Fortran modules, use the pixi task:

pixi run update-fortran-definitions

Or manually run the utils/idmloader/scripts/dfn2f90.py script, e.g. from utils/idmloader:

cat dfns.txt | xargs python scripts/dfn2f90.py

4.3. Developing MODFLOW 6 273


MODFLOW 6

While the Input Data Model (IDM) remains under development, this script must be fed a subset of DFNs corresponding
to the input components supported by the code generation framework.
Note: Fortran definition modules are checked into source control and should accompany any related DFN file changes
when creating a pull request.

Installing external models

Some autotests load models from external repositories:


• MODFLOW-ORG/modflow6-testmodels
• MODFLOW-ORG/modflow6-largetestmodels
• MODFLOW-ORG/modflow6-examples
By default, the test framework will test MODFLOW 6 against these models as accessed via the MODFLOW devtools
models API. It may be necessary to test MODFLOW 6 against models on the local filesystem. See the MODFLOW
devtools documentation for instructions to clone and install external model repositories.

Running tests
MODFLOW 6 has two kinds of tests: Fortran unit tests, driven with Meson, and Python integration tests, driven with
Pytest.

Running unit tests

Unit tests must be run from the project root. To run unit tests in verbose mode:

meson test -C builddir

or using pixi:

pixi run test builddir

Unit tests can be selected by module name (as listed in autotest/tester.f90). For instance, to test the
ArrayHandlersModule:

meson test -C builddir --verbose ArrayHandlers

or using pixi:

pixi run test builddir --verbose ArrayHandlers

To run a test module in the gdb debugger, just add the --gdb flag to the test command.

Running integration tests

Integration tests must be run from the autotest/ folder if invoked with pytest directly — the Pixi autotest task
can be invoked from the project root.
To run tests in parallel:

cd autotest/
pytest -v -n auto # from autotest/

or using pixi:

274 Chapter 4. Developer Guide


MODFLOW 6

pixi run autotest

The Pixi autotest task includes options to run tests in parallel, show test runtimes, and save failed test results in
autotest/.failed/.
Note: The -n option accepts an integer argument for the number of parallel processes. If the value auto is provided,
pytest-xdist will use one worker per available processor.

Selecting tests with markers

Markers can be used to select subsets of tests. Markers provided in pytest.ini include:
• slow: tests that take longer than a few seconds to complete
• external: tests that use models in external repositories
• large: tests that use large models
• regression: tests comparing results from multiple versions
Markers can be used with the -m <marker> option, and can be applied in boolean combinations with and, or and
not. For instance, to run fast tests in parallel, excluding regression tests:

pytest -v -n auto -m "not slow and not regression"

The --smoke (short -S) flag, provided by modflow-devtools is an alias for the above:

pytest -v -n auto -S

or using pixi:

pixi run autotest -S

Smoke testing is a form of integration testing which aims to test a decent fraction of the codebase quickly enough to
run often during development.
Tests using models from external repositories can be selected with the external marker:

pixi run autotest -m "external"

By default, these will run against test models pulled from the GitHub repositories. To run the tests against local
models, use --models-path once or more to specify directories to search for model input files. For instance, to test
MF6 models from the test models repository:

pixi run autotest -m "external" --models-path /path/to/modflow6-testmodels/mf6

By defaultk, only MF6 models are found. To test the mf5to6 converter with mf2005 models in the same repository,
relax the namefile search pattern:

pixi run autotest -m "external" --models-path /path/to/modflow6-testmodels/mf5to6 --


˓→namefile-pattern "*.nam"

Large test models are excluded from commit-triggered CI and only run on GitHub Actions nightly. To run the models
from a local clone of the repository:

pixi run autotest -m "external" --models-path /path/to/modflow6-largetestmodels

4.3. Developing MODFLOW 6 275


MODFLOW 6

Tests load external models from fixtures provided by modflow-devtools. External model tests can be selected by
model or simulation name, or by packages used. See the modflow-devtools documentation for usage examples. Note
that filtering options only apply to tests using external models, and will not filter tests defining models in code — for
that, the pytest built-in -k option may be used.

Writing tests
Writing unit tests

To add a new unit test:


• Add a file containing a test module, e.g. TestArithmetic.f90, to the autotest/ folder.

module TestArithmetic
use testdrive, only : error_type, unittest_type, new_unittest, check, test_failed
implicit none
private
public :: collect_arithmetic
contains

subroutine collect_arithmetic(testsuite)
type(unittest_type), allocatable, intent(out) :: testsuite(:)
testsuite = [new_unittest("add", test_add)]
end subroutine collect_arithmetic

subroutine test_add(error)
type(error_type), allocatable, intent(out) :: error
call check(error, 1 + 1 == 2, "Math works")
if (allocated(error)) then
call test_failed(error, "Math is broken")
return
end if
end subroutine test_add
end module TestArithmetic

• Add the module name to the list of tests in autotest/meson.build, omitting the leading “Test”.

tests = [
'Arithmetic',
]

• Add a use statement for the test module in autotest/tester.f90, and add it to the array of testsuites.

use TestArithmetic, only: collect_arithmetic


...
testsuites = [ &
new_testsuite("Arithmetic", collect_arithmetic), &
new_testsuite("something_else", collect_something_else) &
]

• Rebuild with Meson from the project root, e.g. meson install -C builddir. The test should now be picked
up when meson test... is next invoked.

276 Chapter 4. Developer Guide


MODFLOW 6

Writing integration tests

Integration tests should ideally follow a few conventions for easier maintenance:
• Use temporary directory fixtures. Tests which write to disk should use pytest’s built-in tmp_path fixtures or
one of the keepable temporary directory fixtures from modflow-devtools. This prevents tests from polluting
one another’s state.
• Use markers for convenient (de-)selection:
– @pytest.mark.slow if the test doesn’t complete in a few seconds (this preserves the ability to quickly
--smoke test
– @pytest.mark.external if the test relies on external model repositories
– @pytest.mark.regression if the test compares results from different versions
Note: If all three external model repositories are not installed as described above, some tests will be skipped. The full
test suite includes >750 cases. All must pass before changes can be merged into this repository.

Test framework

A framework has been developed to streamline common testing patterns. The TestFramework class, defined in
autotest/framework.py, is used by most test scripts to configure, run and evaluate one or more MF6 simulations,
optionally in comparison with another simulation or model.
Generally, the recommended pattern for a test script is:

import ...

cases = ["a", "b", ...]


variable = [1., 0., ...]
expected = [-1., -1.1, ...]

def build_models(idx, test):


v = variable[idx]
...

def check_output(idx, test):


e = expected[idx]
...

def plot_output(idx, test):


import matplotlib.pyplot as plt
...

@pytest.mark.parametrize("idx, name", enumerate(cases))


def test_mf6model(idx, name, function_tmpdir, targets, plot):
test = TestFramework(
name=name,
workspace=function_tmpdir,
targets=targets,
build=lambda t: build_models(idx, t),
check=lambda t: check_output(idx, t),
plot=lambda t: plot_output(idx, t) if plot else None,
compare=None,
(continues on next page)

4.3. Developing MODFLOW 6 277


MODFLOW 6

(continued from previous page)


)
test.run()

The framework has three hooks:


• build: construct one or more MF6 simulations and/or non-MF6 models with FloPy
• check: evaluate simulation/model output
• plot: make one or more plots of simulation/model output
A test script conventionally contains one or more test cases, fed to the test function as idx, name pairs. idx can be used
to index parameter values or expected results for a specific test case. The test case name is useful for model/subdirectory
naming, etc.
The framework will not run an unknown program. The path to any program under test (or used for a comparison) must
be registered in the targets dictionary. Keys are strings. See autotest/conftest.py for the contents of targets
— naming follows the executables distribution.
The .run() function
1. builds simulations/models
2. runs simulations/models
3. compares simulation/model outputs
4. checks outputs against expectations
A compare parameter may be provided on initialization, which enables comparison of outputs against another program
or the latest official release of MF6. The following values are supported:
• None: disables comparison — the test simply runs/evaluates any registered simulations/models without compar-
ing results
• auto: attempt to detect the comparison type from contents of test workspace, otherwise skipping comparison
• mf6_regression: compare results against the latest official release rebuilt in develop mode
• mf6, mf2005, mfnwt, or mflgr: compare with results from the selected program — a corresponding model must
be provided in build_models()
After running the reference and comparison models, the framework will try to find correspondingly named output files
to compare — comparison logic may need adjustment when writing tests for new packages or models.

4.3.7 Generating makefiles


Run build_makefiles.py in the distribution/ directory after adding, removing, or renaming source files. This
script uses Pymake to regenerate makefiles. For instance:

cd distribution/
python build_makefiles.py

or using pixi:

pixi run build-makefiles

278 Chapter 4. Developer Guide


MODFLOW 6

Updating extra and excluded files


If the utilities located in the utils directory (e.g., mf5to6 and zbud6) are affected by changes to the modflow6 src/
directory (such as new or refactored source files), then the new module source file should also be added to the utility’s
utils/<util>/pymake/extrafiles.txt file. This file informs Pymake of source files living outside the main
source directory, so they can be included in generated makefiles.
Module dependencies for features still under development should be added to excludefiles.txt. Source files listed
in this file will be excluded from makefiles generated by Pymake. Makefiles should only include the source files needed
to the build officially released/supported features.

Testing makefiles
Makefile generation and usage can be tested from the distribution directory by running the build_makefiles.py
script with Pytest:

pytest -v build_makefiles.py

Note: make is required to test compiling MODFLOW 6 with makefiles. If make is not discovered on the system path,
compile tests will be skipped.
Makefiles may also be tested manually by changing to the appropriate make subdirectory (of the project root for MOD-
FLOW 6, or inside the corresponding utils subdirectory for the zonebudget or converter utilities) and invoking make
(make clean may first be necessary to remove previously created object files).

Installing make on Windows


On Windows, it is recommended to generate and test makefiles from a Unix-like shell rather than PowerShell or Com-
mand Prompt. Make can be installed via Conda or Chocolatey. Alternatively, it is included with mingw, which is also
available from Chocolatey.

Using Conda from Git Bash

To use Conda from Git Bash on Windows, first run the conda.sh script located in your Conda installation’s /etc/
profile.d subdirectory. For instance, with Anaconda3:

. /c/Anaconda3/etc/profile.d/conda.sh

Or Miniconda3:

. /c/ProgramData/miniconda3/etc/profile.d/conda.sh

After this, conda commands should be available.


This command may be added to a .bashrc or .bash_profile file in your home directory to permanently configure
Git Bash for Conda.

4.3.8 Branching model


This section documents MODFLOW 6 branching strategy and other VCS-related procedures.

Overview
This project follows the git flow: development occurs on the develop branch, while master is reserved for the state
of the latest release. Development PRs are typically squashed to develop to avoid merge commits. At release time,
release branches are merged to master, and then master is merged back into develop.

4.3. Developing MODFLOW 6 279


MODFLOW 6

Managing long-lived branches


When a feature branch takes a long time to develop, it is easy to become out of sync with the develop branch. Depending
on the situation, it may be advisable to periodically squash the commits on the feature branch and rebase the change
set with develop. The following approach for updating a long-lived feature branch has proven robust.
In the example below, the feature branch is assumed to be called feat-xyz.

Backup

Begin by creating a backup copy of the feature branch in case anything goes terribly wrong.

git checkout feat-xyz


git checkout -b feat-xyz-backup
git checkout feat-xyz

Squash

Next, consider squashing commits on the feature branch. If there are many commits, it is beneficial to squash them
before trying to rebase with develop. There is a nice article on squashing commits into one using git, which has been
very useful for consolidating commits on a long-lived modflow6 feature branch.
A quick and dirty way to squash without interactive rebase (as an alternative to the approach described in the article
mentioned in the preceding paragraph) is a soft reset followed by an amended commit. First making a backup of the
feature branch is strongly recommended before using this approach, as accidentally typing --hard instead of --soft
will wipe out all your work.

git reset --soft <first new commit on the feature branch>


git commit --amend -m "consolidated commit message"

Once the commits on the feature branch have been consolidated, a force push to origin is recommended. This is not
strictly required, but it can serve as an intermediate backup/checkpoint so the squashed branch state can be retrieved if
rebasing fails. The following command will push feat-xyz to origin.

git push origin feat-xyz --force

The --force flag’s short form is -f.

Rebase

Now that the commits on feat-xyz have been consolidated, it is time to rebase with develop. If there are multiple
commits in feat-xyz that make changes, undo them, rename files, and/or move things around in subsequent commits,
then there may be multiple sets of merge conflicts that will need to be resolved as the rebase works its way through the
commit change sets. This is why it is beneficial to squash the feature commits before rebasing with develop.
To rebase with develop, make sure the feature branch is checked out and then type:

git rebase develop

If anything goes wrong during a rebase, there is the rebase --abort command to unwind it.
If there are merge conflicts, they will need to be resolved before going forward. Once any conflicts are resolved, it may
be worthwhile to rebuild the MODFLOW 6 program and run the smoke tests to ensure nothing is broken.
At this point, you will want to force push the updated feature branch to origin using the same force push command as
before.

280 Chapter 4. Developer Guide


MODFLOW 6

git push origin feat-xyz --force

Cleanup

Lastly, if you are satisfied with the results and confident the procedure went well, then you can delete the backup that
you created at the start.

git branch -d feat-xyz-backup

This process can be repeated periodically to stay in sync with the develop branch and keep a clean commit history.

4.3.9 Deprecation policy


To deprecate a MODFLOW 6 input/output option in a DFN file:
• Add a new deprecated x.y.z attribute to the appropriate variable in the package DFN file, where x.y.z is
the version the deprecation is introduced. Mention the deprecation prominently in the release notes.
• If support for the deprecated option is removed (typically after at least 2 minor or major releases or 1 year), add
a new removed x.y.z attribute to the variable in the DFN file, where x.y.z is the version in which support for
the option was removed. The line containing deprecated x.y.z should not be deleted. Mention the removal
prominently in the release notes.
• Deprecated/removed attributes are not removed from DFN files but remain in perpetuity. The doc/mf6io/
mf6ivar/deprecations.py script generates a markdown deprecation table which is converted to LaTeX by
doc/ReleaseNotes/mk_deprecations.py for inclusion in the MODFLOW 6 release notes. Deprecations
and removals should still be mentioned separately in the release notes, however.

Finding deprecations
To search for deprecations and removals in DFN files on a system with git and standard Unix commands available:

git grep 'deprecated' -- '*.dfn' | awk '/^*.dfn:deprecated/'

4.4 Developing extended MODFLOW 6


This document describes how to set up your build environment for developing and testing the extended version of
MODFLOW. It further builds on the instructions given in DEVELOPER.md so make sure to read those first.

DISCLAIMER
Expectations on platform compatibility
The serial version of the MODFLOW 6 program has had no external dependencies and is traditionally available for a
variety of platforms (Windows, GNU/linux, macOS) and compatible with the mainstream Fortran compilers (gfortran,
ifort). The extended version comes with dependencies on third party components, most notably the MPI, PETSc and
NetCDF libraries. While the goal is a continued support of the above mentioned configurations, this has become more
challenging and can generally not be guaranteed. To assist developers as well as end users who are planning to compile
the code themselves, a list of successfully tested build configurations will be included in this document.

4.4. Developing extended MODFLOW 6 281


MODFLOW 6

4.4.1 Introduction
The design philosophy has been to maintain MODFLOW as a single codebase and have it compile to either a serial or
extended program. The former continues to be a lightweight, highly compatible code which does not require external
dependencies other than those provided by the standard compiler libraries. The latter has three distinct dependencies on
3rd party libraries: MPI, PETSc and NetCDF, as described below. Note that extended capabilities are a true extension
and the executable will in all cases be capable of serial execution with equivalent results.

4.4.2 Prerequisites
The extended version of MODFLOW 6 requires the Message Passing Interface (MPI), the Portable, Extensible Toolkit
for Scientific Computation (PETSc - pronounced PET-see (/pt-si/)) and the NetCDF for array-oriented scientific data
libraries.

MPI
The extended version of MODFLOW 6 uses MPI to synchronize data between processes when configured to run in
parallel mode. There are a couple of implementations of the MPI standard available. Their applicability usually depends
on the platform that is used:
• Open MPI: https://www.open-mpi.org/
• MPICH: https://www.mpich.org/
• Intel MPI: https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library.html
• Microsoft MPI: https://learn.microsoft.com/en-us/message-passing-interface/microsoft-mpi
On Linux and macOS, if you haven’t installed a MPI framework yet, your best bet is to automatically download the MPI
implementation if building PETSc from source using the option flag --download-openmpi or --download-mpich
and the configure approach described below. Alternatively, you can install OpenMPI or MPICH using a package
manager for your OS. Tested configurations are listed in the table below.
In addition to compiling, the MPI toolset is also required to run a parallel simulation. The implementations above all
come with mpiexec (or mpiexec.exe) to start an executable in parallel.

PETSc
The PETSc library is a suite of data structures and routines for the scalable (parallel) solution of scientific applications
modeled by partial differential equations:
https://petsc.org/release/
The PETSc library (version 3.16 or higher) is used by MODFLOW for its parallel linear solver capabilities and the
distributed data formats (vectors and matrices) that go along with it. Parallel PETSc uses MPI internally as well, so
setting up this library should typically be coordinated with the installation of the MPI library. A lot of obscure things can
happen if the binaries are not compatible, so in general it is a good strategy to compile MPI, PETSc, and MODFLOW
with the same compiler toolchain or install MPI and PETSc using a package manager and built with the same compiler
being used to compile MODFLOW.

4.4.3 Compiling MPI and PETSC from source


The PETSc website gives details on a large number of configurations, depending on the target platform/OS, and many
different ways to configure/make/install the library: https://petsc.org/release/install/. Building on Windows is noto-
riously challenging and discouraged by the PETSc development team. On Linux, however, PETSc can be installed
(configure/make/install) by executing the following command

$ ./configure --download-openmpi --download-fblaslapack


$ make all

282 Chapter 4. Developer Guide


MODFLOW 6

in a terminal open in the root directory of your PETSc download

4.4.4 Compiling NetCDF from source


See, for example, https://docs.unidata.ucar.edu/netcdf-c/4.9.2/building_netcdf_fortran.html and
https://docs.unidata.ucar.edu/nug/current/getting_and_building_netcdf.html#building for information related to
building NetCDF-Fortran and prerequisites in a Unix/Linux environment.

4.4.5 Using a package manager to install MPI and PETSc


Use of a package manager can simplify the process of building the extended version of MODFLOW 6.

MacOS
OpenMPI and PETSc are available on Homebrew for Intel and Apple Silicon (M1). Both of these depend on gcc
13.1.0. NetCDF Fortran and related dependencies are also available on Homebrew for Intel and Apple Silicon (M1).
pkg-config should also be installed from Homebrew, if not already installed, so that Meson will be able to resolve the
installation location of MPI and PETSc.

Ubuntu
OpenMPI, PETSc and NetCDF Fortran are available for a variety of Ubuntu versions using the Advanced Packaging
Tool (apt).

Windows
Under evaluation.

4.4.6 Using pkg-config to check your PETSc installation


Eventually, the MODFLOW build process has to resolve the installation location of all external dependencies. The
pkg-config tool (https://en.wikipedia.org/wiki/Pkg-config) can be used to take care of that.

pkg-config --libs petsc

If PETSc was build from source, you can check the contents of the folder

$PETSC_DIR/$PETSC_ARCH/lib/pkgconfig/

and confirm that there are one or more *.pc files in there. A similar pkgconfig/ folder has to present for the MPI
installation that was used. For example, for Open MPI on WSL2 this folder is /lib/x86_64-linux-gnu/pkgconfig/
.
To connect everything, both of these folder paths have to be added to the PKG_CONFIG_PATH variable so that the
pkg-config executable can resolve the installed libraries.

4.4.7 Building the extended version of MODFLOW 6


The primary build system for MODFLOW is Meson (https://mesonbuild.com/). The meson.build script takes an
additional argument to activate an extended build of the software. E.g for building and installing an extended release
version:

meson setup builddir -Ddebug=false -Dextended=true \


--prefix=$(pwd) --libdir=bin
meson install -C builddir
meson test --verbose --no-rebuild -C builddir

4.4. Developing extended MODFLOW 6 283


MODFLOW 6

Note that changing the option flags in the meson setup command requires the flag --reconfigure to reconfigure
the build directory. If the PKG_CONFIG_PATH was set as described above, the linking to PETSc and MPI is done
automatically.
It’s always a good idea to check your extended MODFLOW executable to confirm that it is successfully linked against
the external dependencies. You can use the command line tools ldd (Linux), otool (macOS), or Dependencies.
exe (Windows, https://github.com/lucasg/Dependencies) to do that. In the list of dependencies, you should be able to
identify libpetsc, libmpi, libnetcdff, libnetcdf, and libhdf5 for extended builds.
The other build systems in the MODFLOW project (MS Visual Studio, pymake, Makefile) continue to be supported
for serial builds only. pymake uses the excludefiles.txt to ignore those files that can only be build when MPI and
PETSc are present on the system. In MS Visual Studio these same files are included in the solution but not in the build
process.

IMPORTANT
Don’t use MPI and PETSc directly in your code
Extended MODFLOW was designed to have all third party functionality (MPI, PETSc and the NetCDF Fortran API)
made available through the framework. Developers of models and packages should not directly call these libraries
and change the set of excluded files described above. If you feel you need to include MPI or PETSc functionality in
your code (e.g. you want to use mpi in your source file), contact the MODFLOW development team on how to best
proceed.

4.4.8 Testing the extended version of MODFLOW 6


Extended MODFLOW can be tested using the same test framework as the serial program, with just a few modifications.
To run a test inside the autotest folder in parallel mode, make sure to add a marker @pytest.mark.parallel so
that the test is only executed in the Continuous Integration when running a configuration with an extended build of
MODFLOW. Similarly, adding the marker @pytest.mark.netcdf to a test ensures that the test will only be executed
when intended by specifying NetCDF test mode.
The TestSimulation object that is being run from the framework should be configured for parallel run mode with
the flag parallel=True and the number of processes ncpus=.... As an example, see the test case in autotest/
test_par_gwf01.py, which can be run with

$ pytest -s --parallel test_par_gwf01.py

To run a test in NetCDF test mode, for example autotest/test_netcdf_gwe_cnd.py:

$ pytest --netcdf test_netcdf_gwe_cnd.py

Running without the --parallel and --netcdf flags will simply skip these tests.

4.4.9 Debugging
The most straightforward way to debug a parallel simulation is to start a run and have it pause to attach the debugger(s).
Make sure that the MODFLOW executable was compiled with -Ddebug=true. In parallel mode the program uses the
PETSc solver and a configuration file .petscrc should be present in the same folder as the simulation’s mfsim.nam.
In that PETSc resource file, you should add the following option:

-wait_dbg

telling MODFLOW to pause immediately after startup. This will give you time to attach one or multiple debuggers to
the processes. Then start the parallel program, for example on two cores:

284 Chapter 4. Developer Guide


MODFLOW 6

mpiexec -np 2 mf6 -p

In the process explorer you should now see 2 processes called mf6 or mf6.exe. On the prompt where the command
was executed, MODFLOW waits for input:

$ Hit enter to continue...

In order to truly debug in parallel, i.e. step through the instructions side-by-side, you will need to start two instances
of the debugger and attach them. The following section describes how to do that with VSCode.

Debugging with VSCode


In VSCode parallel debugging is easiest done by duplicating the development environment. First, make sure that you
have set up your environment to build an extended version in debug mode. The VSCode launch.json should contain an
entry to attach to a running process:

{
"name": "Attach to ...",
"type": "cppdbg",
"request": "attach",
"processId": "${command:pickProcess}",
"program": "<path_to>/mf6",
"MIMode": "gdb",
"miDebuggerPath": "<path_to>/gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}

After building extended MODFLOW, press Ctrl+Shift+p to execute Workspaces: Duplicate As Workspace in New
Window. This will open a second VSCode window, identical to the first. Starting the debug process and selecting
“Attach to . . . ” opens a process selection window with the processes started from the mpiexec command described
above. Select both, each from their own instance of the VSCode program. Now you can put breakpoints in the code,
“Hit enter to continue” on the command prompt, and step through the parallel processes side-by-side.

TIP
Make sure that you work with gdb versions >= 10. We have found that earlier versions are only partially compatible
with the VSCode debugging interface and crash when inspecting the data of Fortran derived types

4.4.10 Compatibility
Parallel MODFLOW (a pre-extended build without NetCDF) has been built successfully with the following configura-
tions:
The most up-to-date configurations are available in the GitHub CI script: .github/workflows/ci.yml under the
task extended_test. These are being tested upon every change to the develop branch of MODFLOW.
To improve support, we kindly ask you to share your experience with building and running extended MODFLOW and
report back if you have a successful setup that is not in this table.

4.4. Developing extended MODFLOW 6 285


MODFLOW 6

4.4.11 Known issues


Building PETSc on Ubuntu 22.04 with MPICH and GNU compilers
Versions of PETSc that use MPICH 3.4 (v3.14, v3.15, v3.16)) must be built with gcc-9 or earlier. Versions of PETSc
that use MPICH 4.1 (v3.17 or newer) can be built with newer versions of the gcc compiler (gcc-11, gcc-12, etc.).
Meson does not correctly load the Fortran compiler flags from the mpich.pc package configuration file in the
$PETSC_DIR/$PETSC_ARCH/lib/pkgconfig directory. To overcome this issue, make a copy of mpich.pc and name
it mpichfort.pc. Then determine the appropriate Fortran flags using

$PETSC_DIR/$PETSC_ARCH/bin/mpifort -show

which will return something like

$ linux-real-gcc12.3.0-3.20.0/bin/mpifort -show
gfortran -fPIC -ffree-line-length-none -ffree-line-length-0 -Wno-lto-type-mismatch -O2 -
˓→fallow-argument-mismatch -I/media/psf/Development/petsc/linux-real-gcc12.3.0-3.20.0/

˓→include -I/media/psf/Development/petsc/linux-real-gcc12.3.0-3.20.0/include -L/media/

˓→psf/Development/petsc/linux-real-gcc12.3.0-3.20.0/lib -lmpifort -Wl,-rpath -Wl,/media/

˓→psf/Development/petsc/linux-real-gcc12.3.0-3.20.0/lib -Wl,--enable-new-dtags -lmpi

Copy the returned Fortran flags and replace the Libs: and Cflags: attributes in the mpichfort.pc file. Also modify
the Name: attribute to mpichfort. The modified mpichfort.pc file should look something like

# this gives access to the mpich header files


prefix=/media/psf/Development/petsc/linux-real-gcc9.5.0-3.20.0
exec_prefix=${prefix}
libdir=/media/psf/Development/petsc/linux-real-gcc9.5.0-3.20.0/lib
includedir=${prefix}/include

Name: mpichfort
Description: High Performance and portable MPI
Version: 4.1.2
URL: http://www.mcs.anl.gov/research/projects/mpich
Requires:
Libs: -fPIC -ffree-line-length-none -ffree-line-length-0 -Wno-lto-type-mismatch -O2 -
˓→fallow-argument-mismatch -I/media/psf/Development/petsc/linux-real-gcc12.3.0-3.20.0/

˓→include -I/media/psf/Development/petsc/linux-real-gcc12.3.0-3.20.0/include -L/media/

˓→psf/Development/petsc/linux-real-gcc12.3.0-3.20.0/lib -lmpifort -Wl,-rpath -Wl,/media/

˓→psf/Development/petsc/linux-real-gcc12.3.0-3.20.0/lib -Wl,--enable-new-dtags -lmpi

Cflags: -fPIC -ffree-line-length-none -ffree-line-length-0 -Wno-lto-type-mismatch -O2 -


˓→fallow-argument-mismatch -I/media/psf/Development/petsc/linux-real-gcc12.3.0-3.20.0/

˓→include -I/media/psf/Development/petsc/linux-real-gcc12.3.0-3.20.0/include -L/media/

˓→psf/Development/petsc/linux-real-gcc12.3.0-3.20.0/lib -lmpifort -Wl,-rpath -Wl,/media/

˓→psf/Development/petsc/linux-real-gcc12.3.0-3.20.0/lib -Wl,--enable-new-dtags -lmpi

# pkg-config does not understand Cxxflags, etc. So we allow users to


# query them using the --variable option

cxxflags= -Wno-lto-type-mismatch -Wno-psabi -O2 -std=gnu++17 -fPIC -I${includedir}


fflags=-fPIC -ffree-line-length-none -ffree-line-length-0 -Wno-lto-type-mismatch -O2 -I$
˓→{includedir}

fcflags=-fPIC -ffree-line-length-none -ffree-line-length-0 -Wno-lto-type-mismatch -O2 -I$


˓→{includedir}

286 Chapter 4. Developer Guide


MODFLOW 6

The /media/psf/Development/petsc/linux-real-gcc12.3.0-3.20.0/include and /media/psf/


Development/petsc/linux-real-gcc12.3.0-3.20.0/lib entries in the Libs: and Cflags: attributes
can be replaced with ${includedir} and ${libdir}, respectively, to simplify mpichfort.pc.

4.5 Distributing MODFLOW 6


This document describes release procedures for MODFLOW 6.
• Overview
• Requirements
• Steps
– Update release notes
– Update version info
– Build makefiles
– Build example models
– Benchmark example models
– Build documentation
– Build the distribution archive
– Verify the distribution archive
• Procedure
• Testing
– Testing release scripts
– Testing the release workflow

4.5.1 Overview
MODFLOW 6 releases come in two flavors:
• nightly development builds
• full/approved distributions
Development builds are created nightly from the tip of the develop branch and released from the MODFLOW-ORG/
modflow6-nightly-build repository. Development distributions contain only MODFLOW 6 input/output docu-
mentation, release notes, code.json metadata, and core executables and libraries:
• mf6: MODFLOW 6 executable
• zbud6: Zonebudget executable
• mf5to6: MODFLOW 5 to 6 converter executable
• libmf6: MODFLOW 6 dynamic library
Full distributions contain the items listed above, as well as:
• Meson build files
• Fortran source code
• MODFLOW 6 example models
• MODFLOW 6 makefiles

4.5. Distributing MODFLOW 6 287


MODFLOW 6

• MODFLOW 6 Visual Studio files


• more extensive documentation, including:
– MODFLOW 6 input/output docs
– MODFLOW 6 example model docs
– MODFLOW 6 release notes
– MODFLOW 6 supplementary technical information
– docs for various MODFLOW 6 features and packages
– docs for mf5to6 and zbud6
Official releases can be classified further into two types: patch and minor releases. Patch releases should typically
branch from master and cherry-pick relevant commits, since develop may contain broader changes not yet ready for
release. Minor releases typically branch from develop. MODFLOW 6 does not currently increment the major version
number.
Both nightly builds and official distributions are created automatically with GitHub Actions.

4.5.2 Requirements
This document assumes a MODFLOW 6 development environment has been configured as per the developer docu-
mentation, including a Fortran compiler (either ifort or gfortran) as well as a Pixi environment as specified in
pixi.toml. Official distributions are currently prepared with Intel Fortran (ifort).

4.5.3 Steps
Broadly, steps to prepare an official release for distribution include:
• update release notes for the release (and reset them after)
• update version information with update_version.py
• (re)build makefiles with build_makefiles.py
• benchmark example models with benchmark.py
• build the MF6IO documentation with build_docs.py
• build the distribution archive with build_dist.py
• verify the distribution archive with check_dist.py
These should occur roughly in the order presented above. The procedure is automated in the .github/workflows/
release.yml and release_dispatch.yml workflows.
Note: git- and/or GitHub-related steps are omitted from this section. See the Procedure section below for a step-by-
step recipe for creating and distributing release with the help of GitHub Actions.

Update release notes


The release notes PDF document is constructed from the doc/ReleaseNotes/ReleaseNotes.tex LaTeX file. Dur-
ing development, release notes should be maintained in doc/ReleaseNotes/develop.toml — this file is turned
into a LaTeX file by doc/ReleaseNotes/mk_releasenotes.py. A pixi task is available for this, e.g. pixi run
make-release-notes. The resulting LaTex file is referenced from doc/ReleaseNotes/ReleaseNotes.tex.
Before making a release, add a line to the Release History section of ReleaseNotes.tex providing the version number,
date and DOI of the current release, e.g. 6.4.4 & February 13, 2024 & \url{https://doi.org/10.5066/
P9FL1JCC}.

288 Chapter 4. Developer Guide


MODFLOW 6

Note: Deprecated and removed MF6IO options are included in the release notes. See the developer docs for more
info on deprecation policy, searching for deprecations among DFNs, and generating a deprecations/removals table for
insertion into the release notes.

Update version info


MODFLOW 6 version numbers follow the semantic versioning convention major.minor.patch. Release tags do not
include an initial v, as is common in many other projects.
Version information is stored primarily in version.txt in the project root, as well as in several other files in the
repository.
The update_version.py script updates files containing version information. First a file lock is acquired, then repos-
itory files are updated, then the lock is released.
The version can be specified with the --version (short -v) option. For instance, to set version to 6.4.1, run from
the scripts/ folder:

python update_version.py -v 6.4.1

If no --version is provided, the version is not changed, only the build timestamp.
An optional label may be appended to the release number, e.g.

python update_version.py -v 6.4.2rc

The label must start immediately following the patch version number, with no space in between. The label may contain
numeric characters or symbols, but must not start with a number (otherwise there is no way to distinguish it from the
patch version number).
The update_version.py script has a few other flags:
• --approved (short -a): approve an official release. If the --approved flag is provided, disclaimer language
is altered to reflect approval. If the flag is not provided, the language reflects preliminary/provisional status and
(preliminary) is appended to version numbers.
• --releasemode (short -r): toggle whether binaries are built in development or release mode by editing the
contents of src/Utilities/version.f90. If the --releasemode flag is provided, IDEVELOPMODE is set to
0. If --releasemode is not provided, IDEVELOPMODE is set to 1.
• --get (short -g): print the current version number to stdout without making any updates.
• --citation (short -c): generate a citation from the contents of CITATION.cff and print it to stdout, again
without making any updates.

Build makefiles
The build_makefiles.py script is used to rewrite makefiles after Fortran source files have been added, removed, or
renamed. Up-to-date makefiles must be generated for inclusion in a distribution. A pixi task build-makefiles is
also available.

Build example models


MODFLOW 6 example models are bundled with official releases. Example models must be built and run to generate
plots and tables before documentation can be generated. The release.yml workflow attempts to download the latest
release from the examples repository, only re-building and re-running example models if no such release is available.
See the examples repository for more information on preparing example models.

4.5. Distributing MODFLOW 6 289


MODFLOW 6

Benchmark example models


MODFLOW 6 documentation includes a performance evaluation comparing the current version against the last official
release. Benchmarks must run before a release can be prepared. Benchmarks run as a component of the docs.yml CI
workflow — release.yml attempts to download benchmark results if available, only re-running them if necessary.
The benchmark.py script benchmarks the current development version of MODFLOW 6 against the latest release
rebuilt in development mode, using the models from the MODFLOW-ORG/modflow6-examples repository. Paths to pre-
built binaries for both versions can be provided via the --current-bin-path (short -c) and --previous-bin-path
(short -p) command line options. If bin paths are not provided, executables are rebuilt in the default locations:
<project root>/bin: current development version <project root>/bin/rebuilt: previous version
The examples repository must first be installed and prepared as described above. Its path may be explicitly provided
with the --examples-repo-path (short -e) option. If no path is provided, the repository is assumed to be named
modflow6-examples and live side-by-side with the modflow6 repository on the filesystem.
The directory to write benchmark results can be specified with --output-path (short -o). If no such option is
provided, results are written to the current working directory.

python benchmark.py -e ../modflow6-examples -o .benchmarks

The above will write results to a markdown file .benchmarks/run-time-comparison.md relative to the project root.

Build documentation
Extensive documentation is bundled with official MODFLOW 6 releases. MODFLOW 6 documentation is written in
LaTeX. Some LaTeX files (in particular for MODFLOW 6 input/output documentation) are automatically generated
from DFN files. The release.yml workflow first runs update_version.py to update version strings to be substituted
into the docs, then runs build_docs.py to regenerate LaTeX files where necessary, download benchmark results (and
convert the Markdown results file to LaTeX), download publications hosted on the USGS website, and finally convert
LaTeX to PDFs.
Manually building MODFLOW 6 documentation requires additional Python dependencies specified in
build_rtd_docs/requirements.rtd.txt. Styles defined in the MODFLOW-ORG/usgslatex are also required.
(See that repository’s README for installation instructions or this repo’s `../.github/workflows/docs.yml CI workflow for
an example.)

Build the distribution archive


After each step above is complete, the build_dist.py script can be used to construct the MODFLOW 6 distribution.
The build_dist.py script can be used to create both minimal and full distributions. By default, a minimal distribution
is created. To create a full distribution, run the script with the --full flag.
The build_dist.py script is lazy — benchmarks, example models and documentation artifacts are downloaded via
the GitHub API if available, and only re-created if none exist or the --force (-f) flag is provided. This allows the
release workflow to consume artifacts previously created by other workflow runs, reducing the time needed to create
and publish a release.
The script has several other arguments:
• --build-path: path to the build workspace, defaults to <project root>/builddir
• --output-path (-o): path to create a distribution zipfile, defaults to <project root>/distribution/
• --examples-repo-path (-e): path to the MODFLOW-ORG/modflow6-examples repository, defaults to
modflow6-examples side-by-side with project root
• --force (-f): whether to recreate and overwrite preexisting components of the distribution, if they already
exist

290 Chapter 4. Developer Guide


MODFLOW 6

Default paths are resolved relative to the script’s location on the filesystem, not the current working directory, so the
script can be run from distribution/, from the project root, or from anywhere else. This is true of all scripts in the
distribution/ directory.
See the release.yml workflow for a complete example of how to build a distribution archive.

Verify the distribution archive


The check_dist.py script can be used to check the release distribution folder. The --path argument is the path
to the dist folder. The --approved flag can be used to signal that the release is approved/official. By default the
release is assumed preliminary. The script checks the version string emitted by mf6 -v for the presence or absence of
“preliminary” depending on this flag.

4.5.4 Procedure
The steps above are automated in the .github/workflows/release.yml and release_dispatch.yml workflows.
The .github/workflows/release.yml workflow is used for both nightly builds and official releases. It should not
be necessary to prepare a release manually.
The release.yml workflow has no triggers of its own, and must be dispatched by .github/workflows/
release_dispatch.yml, in one of two ways:
• Push a release branch to the MODFLOW-ORG/modflow6 repository. This method should be used for proper re-
leases.
• Manually trigger the workflow via GitHub CLI or web UI. Useful for testing release candidates or verifying the
release automation before a final release is made — see the Testing section below for more detail.
To release an official version of MODFLOW 6 via the release branch method:
1. Create a release candidate branch from the tip of develop or master. The branch’s name must begin with
v followed by the version number. For an officially approved release, include only the version number. For a
preliminary release candidate, append rc after the version number, e.g. v6.4.0rc. If the branch name does not
end in rc, the release is assumed to be approved.
2. Push the branch to the MODFLOW-ORG/modflow6 repository. This triggers the release workflow. If the release
is still an unapproved candidate (i.e. the branch name ends with rc) binaries are built with IDEVELOPMODE set
to 1, and the workflow ends after uploading binaries and documentation artifacts for inspection. If the release is
approved/official, the workflow drafts a pull request against the master branch.
3. To continue with the release, merge (do not squash) the PR into master. This triggers another job to tag the
new tip of master with the release number, draft a release, and upload binaries and documentation as release
assets.
4. If the release assets pass inspection, publish the release. The following format convention is used for the GitHub
release post:

This is the approved USGS MODFLOW <semver> release.

<authors>, <release year>, MODFLOW 6 Modular Hydrologic Model version <semver>: U.S.
˓→ Geological Survey Software Release, <release date>, <doi link>

Visit the USGS "MODFLOW and Related Programs" site for information on MODFLOW 6 and␣
˓→related software: https://doi.org/10.5066/F76Q1VQV

5. Create a branch from master, naming it something like post-release-x.y.z-reset. Run distribution/
update_version.py -v x.y.z.devN, substituting x, y, z and N as appropriate for the next development
cycle’s version number. This will substitute the version number into all necessary files and will also set
IDEVELOPMODE back to 1. Reset the release notes by

4.5. Distributing MODFLOW 6 291


MODFLOW 6

• copying the develop.tex file generated from develop.toml to doc/ReleaseNotes/previous/vx.y.


z.tex (where x.y.z is the semantic version just released), then
• inserting a new line \input{./previous/vx.y.z.tex} at the top of doc/ReleaseNotes/appendixA.
tex, then
• clearing develop.toml.
Open a pull request into master from the reset branch. Merge (do not squash) the PR.
Note: Squashing the release PR into master or the post-release reset PR into develop causes develop and master
to diverge, leading to conflicts at the next release time. Both pull requests should be merged with a merge commit,
not squashed.

4.5.5 Testing
Each script used in the release procedure can be tested separately. The procedure can also be tested end-to-end by
manually dispatching the release workflow.

Testing release scripts


Each script in distribution/ contains its own tests. To run them, run pytest from the distribution/ folder.
The tests will not be discovered if pytest is run from a different location, as the scripts in this folder are not named
test_*.py and are only discoverable by virtue of the patterns provided in distribution/pytest.ini. The tests
use temporary directories where possible and revert modifications to tracked files on teardown.
Note: the tests clean up by reverting changes to files in the following locations:
• doc/
• make
• utils/**/make/
Make sure you don’t have any uncommitted changes in these locations before running the tests.
Note: to avoid contested file access, the tests will refuse to run in parallel with pytest-xdist.
There is a small additional suite of tests that can be used to validate a release distribution folder after it is built:
check_dist.py. These tests are run as part of the release workflow — see below for more detail.

Testing the release workflow


The workflow_dispatch event is GitHub’s mechanism for manually triggering workflows. This can be accomplished
from the Actions tab in the GitHub UI. This is a convenient way to test the release procedure and evaluate release
candidate distributions.
To dispatch the release workflow, navigate to the Actions tab of this repository. Select the release dispatch workflow.
A Run workflow button should be visible in an alert at the top of the list of workflow runs. Click the Run workflow
button, selecting values for the various inputs:
• approve: whether the release is officially approved, or just a release candidate
• branch: the branch to release from
• development: whether to build a minimal development distribution or a full distribution
• run_tests: whether to run autotests after building binaries
• version: the version number of the release

292 Chapter 4. Developer Guide


MODFLOW 6

4.6 MODFLOW 6 Fortran style guide


The goal of this guide is to provide a standard for MODFLOW 6 contributors to follow, in pursuit of consistent, readable,
well-organized, and unsurprising source code.
MODFLOW 6 is written in Fortran — largely Fortran 2003, with sparse use of a few 2008 language features. This
guide assumes familiarity with the Fortran language.

4.6.1 Amendments
Suggestions to change or extend the style conventions are welcome. Suggestions should be accompanied by a good
case for the change. Bear in mind that a goal of this guide is to minimize time spent thinking about questions of style.

4.6.2 Conventions

Table of Contents

• Modules
– Use implicit none in all modules.
– Make modules private by default. Mark public types and procedures explicitly.
– Prefer explicitly specified imports with use ..., only: ..., rather than merely use ....
• Types
• Procedures
– Don’t end procedures with a return statement; use return only to return early.
– Avoid goto statements.
– Specify precision for logicals, integers and reals with the data types defined in src/Utilities/kind.
f90.
– Name type-bound procedures’ first dummy argument this. A suitable docstring is !< this
instance.
– Avoid deeply nested control structures where possible.
– Prefer verbose names, except where the meaning is obvious from context or precedent. E.g., well-known
index variables (i, j, m, n).
– Use named constants. Avoid magic numbers.
• Naming
– Use CamelCase for source file names.
– Use CamelCase for module and derived type names.
– Use a noun or noun phrase for module and derived type names.
– Use snake_case for procedure names.
– Use a verb or verb phrase for procedure names.
– End module names with ...Module.
– Derived type names may, but need not, end with ...Type.

4.6. MODFLOW 6 Fortran style guide 293


MODFLOW 6

– If a source file exists primarily to host a module, name the source file and module identically, except
for trailing ...Module.
– If a module exists primarily to host a type, name the module and type identically, except for trailing
...Module and ...Type.
– Include the module/subroutine/function name in end module, end subroutine and end function
statements.
• Comments
– Avoid empty comments.
– Avoid comments starting with --.
• Formatting
– Include blank lines between:
– Prefer importing items used throughout a module with a module-scoped use statement, rather than
separately in multiple procedures.
– Use Doxygen format for docstrings. For dummy arguments, use either @param ... above the signature
or !< ... next to the dummy argument.

Modules
Use implicit none in all modules.

In old FORTRAN variables types were implicitly assigned to variables depending on the variable name. It
easy to create a bug using this old way because the developer is responsible of keeping track of what type
each variable is. Using implicit none forces the developer to explicitly assign a type to a variable. This
makes it possible to catch certain mistakes during the compilation step e.g. unintended type conversion

Make modules private by default. Mark public types and procedures explicitly.

Instead of declaring everything public it is better to have it declared private by default and explicitly define
what is public. This makes it clear to whom is using your module which types and procedures they may
use.
Furthermore as the developer of the module it also makes it clear which procedures are internal and you
can change without affecting any external code. On the other hand if its public changes should be made
with care.

Prefer explicitly specified imports with use ..., only: ..., rather than merely use ....

When only using the use ... syntax you pull in everything a module defines. This can cause name
collision. Therefore always use the use ..., only: ... syntax

module SampleModule
! don't
use ConstantsModule

! do
use ConstantsModule, only: DPI
end module SampleModule

294 Chapter 4. Developer Guide


MODFLOW 6

Types

Procedures
Don’t end procedures with a return statement; use return only to return early.

Adding a return statement is superfluous as the procedure will return anyway after the last line

! don't
subroutine run_sample()
! Some code
return
end subroutine

! do
subroutine run_sample()
! Some code
end subroutine

Avoid goto statements.

goto statements are something from the past. They are usually used to reach code based on a condition.
If you want to achieve the same consider using:
• exit/continue in your loops, cases and if statements
• splitting your code in subroutines
• a loop
• putting conditional code in if else statements
• ...

Specify precision for logicals, integers and reals with the data types defined in src/Utilities/kind.
f90.

This ensures that the same types are used throughout the code base

use KindModule, only: DP, I4B, LGP

! don't
logical :: boolean_var
integer :: integer_var
real(8) :: double_var

! do
logical(LGP) :: boolean_var
integer(I4B) :: integer_var
real(DP) :: double_var

4.6. MODFLOW 6 Fortran style guide 295


MODFLOW 6

Name type-bound procedures’ first dummy argument this. A suitable docstring is !< this
instance.

subroutine method(this)
! don't
class(CustomType) :: this
end subroutine

subroutine method(this)
! do
class(CustomType) :: this !< this instance
end subroutine

Avoid deeply nested control structures where possible.

Deeply nested structures makes it difficult for the reader to keep track of what is happening. Try to make
the code as flat as possible.

! don't
subroutine nested()
if (condition1) then
if (condition2) then
if (condition3) then
call procedure
end if
end if
end if
end subroutine nested

! do
subroutine flat()
if (.not. condition1) then return
if (.not. condition2) then return
if (.not. condition3) then return

call procedure
end subroutine flat

Prefer verbose names, except where the meaning is obvious from context or precedent. E.g., well-
known index variables (i, j, m, n).

You’re writing code for humans. Not for machines. Use clear names so it immediately becomes obvious
what a variable means.

! don't
List :: lst
HashTable :: ht
real(DP) :: t

! do
List :: list
HashTable :: hash_table
real(DP) :: time

296 Chapter 4. Developer Guide


MODFLOW 6

Use named constants. Avoid magic numbers.

Related to the rule above. Magic numbers make it difficult to understand code. What does a number mean?

real(DP) constant_velocity
real(DP) delta_time = 5.0
real(DP) distance

! Don't. What does 1.0 mean?


distance = delta_time * 1.0

! Do. It is clear what the number means


constant_velocity = 1.0
distance = delta_time * constant_velocity

Naming
Use CamelCase for source file names.

- modflow
- src
- ExampleSourceFile.f90

Use CamelCase for module and derived type names.

module SampleModule

type :: SampleType
...
end type SampleType

end module SampleModule

Use a noun or noun phrase for module and derived type names.

A (derived) type is an object in object-oriented programming. And objects are described with nouns. The procedures
in the type should be verbs and can be thought of actions that can be performed on/by/to the object

Use snake_case for procedure names.

subroutine display_sample_name()
...
end subroutine

Use a verb or verb phrase for procedure names.

Procedures should be thought of as actions performed on an object or arguments.As actions are described by verbs or
verb phrases so must procedure names be named.

4.6. MODFLOW 6 Fortran style guide 297


MODFLOW 6

End module names with ...Module.

module SampleModule
...
end module SampleModule

Derived type names may, but need not, end with ...Type.

! This is good
type :: FirstSampleType
...
end type

! This as well
type :: SecondSampleType
...
end type SecondSampleType

If a source file exists primarily to host a module, name the source file and module identically, except
for trailing ...Module.

module SampleModule
...
end module SampleModule

- modflow
- src
- Sample.f90

If a module exists primarily to host a type, name the module and type identically, except for trailing
...Module and ...Type.

module SampleModule

type :: SampleType
...
end type SampleType

end module SampleModule

Include the module/subroutine/function name in end module, end subroutine and end function
statements.

module SampleModule

type :: SampleType
...
end type SampleType

contains
(continues on next page)

298 Chapter 4. Developer Guide


MODFLOW 6

(continued from previous page)

subroutine sample_subroutine()
...
end subroutine sample_subroutine

function sample_function(this) result(res)


...
end functions sample_function

end module SampleModule

Comments
Avoid empty comments.

! don't

!
! some comment

! do

! some comment

Avoid comments starting with --.

! don't
! -- some comment

! do
! some comment

Formatting
Include blank lines between:

• module declaration and use... statements


• use... statements and procedure declarations
• derived type declaration and member variables
• member variables and contains statements

module SampleModule

use KindModule, only: DP

type :: SampleType
(continues on next page)

4.6. MODFLOW 6 Fortran style guide 299


MODFLOW 6

(continued from previous page)


real(DP) :: value
contains
procedure :: do_something
end type SampleType

contains

subroutine do_something(this)
...
end subroutine add

end module SampleModule

Prefer importing items used throughout a module with a module-scoped use statement, rather than
separately in multiple procedures.

! don't
module SampleModule

contains

subroutine do_something()
use KindModule, only: DP
...
end subroutine add

subroutine do_something_else()
use KindModule, only: DP
...
end subroutine add

end module SampleModule

! do
module SampleModule

use KindModule, only: DP

contains

subroutine do_something()
...
end subroutine add

subroutine do_something_else()
...
end subroutine add

end module SampleModule

300 Chapter 4. Developer Guide


MODFLOW 6

Use Doxygen format for docstrings. For dummy arguments, use either @param ... above the signa-
ture or !< ... next to the dummy argument.

!> Description of the procedure.


!!
!! @param parameter2 information about parameter2
!! @param parameter3 information about parameter3
!! @todo Handle special case
subroutine intrestbuild(parameter1, parameter2, parameter3)
implicit none
integer(I4B), intent(in) :: parameter1 !< information about parameter1
integer(I4B), intent(in) :: parameter2
integer(I4B), intent(out) :: parameter3

...

end subroutine

4.6.3 Sample Module


Below is a minimal module demonstrating some (but not all) of the conventions.

module SampleModule

use KindModule, only: DP, I4B, LGP


use ConstantsModule, only: DPI

implicit none
private
public :: run_sample

contains

subroutine run_sample(verbose)
logical(LGP), intent(in) :: verbose
integer(I4B) :: answer
real(DP) :: pi

answer = 42
pi = DPI

if (verbose) then
print *, 'pi: ', pi
print *, 'answer to the ultimate question of life,'&
' the universe, and everything: ', answer
end if
end subroutine run_sample

end module SampleModule

4.6. MODFLOW 6 Fortran style guide 301


MODFLOW 6

4.7 MODFLOW 6 input specification language


MODFLOW 6 accepts input via input files which use a custom text-based format. The MODFLOW 6 input file format
is specified by definition (DFN) files. This document specifies the definition file format.
• DFN file overview
• Variable attributes
– Reader Attribute
• Variable types
– Keyword
– String
– Numeric
– Recarray
– Record
∗ Repeating records
– Keystring
• Text substitutions
• Writing definition files
– Subpackages
– Models
– Solvers
• Developer tooling

4.7.1 DFN file overview


A DFN file is a text file enumerating input variables for a MODFLOW 6 component. An input variable is any value
provided by the user to configure a MODFLOW 6 simulation. Each definition file specifies the input file expected for
some MODFLOW 6 component (e.g. a simulation, model, or package) and specifies zero or more variables.
Each variable is described by a set of attributes, some of which are required, some optional.
DFN files must contain only ASCII characters. DFN files may include comment lines, which must begin with “#”.
Variables are organized into blocks. A block is a set of related input parameters. Each block in a DFN file is conven-
tionally preceded by a comment line according to the format:

# --------------------- component subcomponent block ---------------------

A variable is specified by a set of attributes, with one attribute per line, following the general format:

name value

Some attribute values are optional. Variables are delimited by empty lines.
DFN files should be named component-subcomponent.dfn, where the component and subcomponent are abbrevi-
ated acronyms or names. For instance, a groundwater flow (GWF) model’s initial conditions (IC) package DFN file is
named gwf-ic.dfn.
DFN files are parsed to generate both source code and documentation.

302 Chapter 4. Developer Guide


MODFLOW 6

Note: The DFN format is undergoing a migration to TOML. This involves transforming the flat variable representation
into a tree with composite variables as nodes and scalars as leaves.

4.7.2 Variable attributes


A MODFLOW 6 input variable is described by a set of attributes. Some attributes are optional and do not need to be
specified (because they have a default value) and others are required. The following attributes are supported:

Reader Attribute
The reader attribute indicates what reader is used by MODFLOW 6 for the information. There are several reader
types that result in specialized input instructions. For example, the delr array of the DIS package is read using u1ddbl.
Because the MODFLOW 6 array readers often require a control record, when this reader type is specified, information
about the control record is written. For example, the following block identifies how delr is specified:

block griddata
name delr
type double precision
shape (ncol)
reader u1ddbl
longname spacing along a row
description is the is the column spacing in the row direction.

This results in the following block description:

BEGIN GRIDDATA
DELR
delr(ncol) -- U1DDBL
END GRIDDATA

The READARRAY reader is another reader that results in specialized input. It allows for a LAYERED keyword to be
specified. The icelltype variable is read using readarray and is specified as:

block GRIDDATA
name icelltype
type integer
shape (nodes)
valid
reader readarray
layered true
optional
longname confined or convertible indicator
description flag for each cell that specifies how saturated thickness is treated. 0␣
˓→means saturated thickness is held constant; $>$0 means saturated thickness varies␣
˓→with computed head when head is below the cell top; $<$0 means saturated thickness␣

˓→varies with computed head unless the THICKSTRT option is in effect. When THICKSTRT is␣
˓→in effect, a negative value of icelltype indicates that saturated thickness will be␣

˓→computed as STRT-BOT and held constant.

This results in the following block description:

BEGIN GRIDDATA
ICELLTYPE [LAYERED]
icelltype(nodes) -- READARRAY
END GRIDDATA

4.7. MODFLOW 6 input specification language 303


MODFLOW 6

4.7.3 Variable types


The following input parameter types are supported.

Keyword
As shown in the simple example above, a keyword type is simply one that is specified using a text string. The keyword
name is automatically converted into upper case. Upper case is used in the input instructions to indicate a word that is
recognized by the MODFLOW 6 program.
A simple example of a keyword is:

# --------------------- gwf dis options ---------------------

block options
name nogrb
type keyword
reader urword
optional true
longname do not write binary grid file
description keyword to deactivate writing of the binary grid file.

which renders as,

BEGIN OPTIONS
[NOGRB]
END OPTIONS

Note that the optional tag being set to true results in square brackets around NOGRB.

String
As shown in the simple example above, a string type is simply a keyword followed by a text string. This type allows
the user to provide text information to MODFLOW 6.
A simple example of a keyword is:

# --------------------- gwf dis options ---------------------

block options
name length_units
type string
reader urword
optional true
longname model length units
description is the length units used for this model. Values can be ``FEET'', ``METERS'',
˓→ or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''.

which renders as,

BEGIN OPTIONS
[LENGTH_UNITS length_units]
END OPTIONS

Again the optional tag is used here to indicate that the keyword and string value are optional.
Though it wouldn’t make sense in this context, we could also have set tagged to False. By doing so, we would have
ended up with:

304 Chapter 4. Developer Guide


MODFLOW 6

BEGIN OPTIONS
[length_units]
END OPTIONS

In this case, the user would provide length_units directly without a preceding keyword. Eliminating tags is used later
to construct records consisting of multiple data entries.

Numeric
As you might expect, the integer and double precision types allow for specification of integer and double precision
input by the user. A simple example from the Solution Sparse Matrix Solver Nonlinear block is:

# --------------------- sln sms nonlinear ---------------------

block nonlinear
name outer_hclose
type double precision
reader urword
optional false
longname head change criterion
description real value defining the head change criterion for convergence of the outer␣
˓→(nonlinear) iterations, in units of length. When the maximum absolute value of the␣

˓→head change at all nodes during an iteration is less than or equal to \texttt{outer\_

˓→hclose}, iteration stops. Commonly, \texttt{outer\_hclose} equals 0.01.

block nonlinear
name outer_maximum
type integer
reader urword
optional false
longname outer maximum iterations
description integer value defining the maximum number of outer (nonlinear) iterations --␣
˓→that is, calls to the solution routine. For a linear problem \texttt{outer\_maximum}␣

˓→should be 1.

This of course renders as:

BEGIN NONLINEAR
OUTER_HCLOSE outer_hclose
OUTER_MAXIMUM outer_maximum
END NONLINEAR

Note that in this case, both of the variables are required (optional false) and so they are not enclosed in brackets.

Recarray
The recarray type is patterned after the recarray type that is available in the numpy package for Python.
An example of a recarray record is shown below for the drain package. First you’ll note that the recarray has a shape.
This shape is of maxbound, which is the maximum number of records that the user can enter. Also note that following
the ``recarray” identifier is cellid, elev, cond, aux, and boundname. These are all additional variables that are described
after the recarray. Because these are listed next to recarray, the protocol is that they will all be listed on one line. You’ll
also note that the cellid, elev, cond, aux, and boundname variables have the in_record attribute set to true. This is
required so that the variables are not written again after the recarray; they are only written inside the recarray. These
variables all have the tagged attribute set to false so that they are not preceded by a keyword.

4.7. MODFLOW 6 input specification language 305


MODFLOW 6

block period
name periodrecarray
type recarray cellid elev cond aux boundname
shape (maxbound)
reader urword
longname
description

block period
name cellid
type integer
shape (ncelldim)
tagged false
in_record true
reader urword
longname cell identifier
description REPLACE cellid {}

block period
name elev
type double precision
shape
tagged false
in_record true
reader urword
longname drain elevation
description is the elevation of the drain. If the Options block includes a␣
˓→TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained␣

˓→from a time series by entering the time-series name in place of a numeric value.

block period
name cond
type double precision
shape
tagged false
in_record true
reader urword
longname drain conductance
description is the hydraulic conductance of the interface between the aquifer and the␣
˓→drain. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable␣

˓→Input'' section), values can be obtained from a time series by entering the time-

˓→series name in place of a numeric value.

block period
name aux
type double precision
in_record true
tagged false
shape (naux)
reader urword
optional true
longname auxiliary variables
description REPLACE aux {'{#1}': 'drain'}
(continues on next page)

306 Chapter 4. Developer Guide


MODFLOW 6

(continued from previous page)

block period
name boundname
type string
shape
tagged false
in_record true
reader urword
optional true
longname drain name
description REPLACE boundname {'{#1}': 'drain'}

When these lines are rendered, we get the following:

BEGIN PERIOD
cellid(ncelldim) elev cond [aux(naux)] [boundname]
cellid(ncelldim) elev cond [aux(naux)] [boundname]
...
END PERIOD

Record
A record type is similar to the recarray type, except that it doesn’t have a shape. A record can be just a list of values
on one line. A simple example of this is in the SMS Linear block, where we have the rcloserecord consisting of the
inner_rclose and rclose_option variables.

block linear
name rcloserecord
type record inner_rclose rclose_option
reader urword
optional false
longname rclose record
description

block linear
name inner_rclose
type double precision
in_record true
reader urword
optional false
longname flow residual tolerance
description real value that defines the flow residual tolerance for convergence of the␣
˓→SMS linear solver and specific flow residual criteria used. This value represents the␣

˓→maximum allowable residual at any single node. Value is in units of length cubed per␣
˓→time, and must be consistent with \mf length and time units. Usually a value of $1.0 \

˓→times 10^{-1}$ is sufficient for the flow-residual criteria when meters and seconds␣

˓→are the defined \mf length and time.

block linear
name rclose_option
type string
tagged false
(continues on next page)

4.7. MODFLOW 6 input specification language 307


MODFLOW 6

(continued from previous page)


in_record true
reader urword
optional true
longname flow residual tolerance
description an optional keyword that defines the specific flow residual criterion used. ␣
˓→\texttt{L2NORM\_RCLOSE}--an optional keyword that is used to specify that \texttt

˓→{inner\_rclose} represents a L-2 Norm closure criteria instead of a infinity-Norm␣

˓→(absolute convergence criteria). When \texttt{L2NORM\_RCLOSE} is specified, a␣

˓→reasonable initial \texttt{inner\_rclose} value is $\left( 1.0 \times 10^{-1} \times \

˓→text{active nodes} \right)$ when meters and seconds are the defined \mf length and␣

˓→time. \texttt{RELATIVE\_RCLOSE}--an optional keyword that is used to specify that \


˓→texttt{inner\_rclose} represents a relative L-2 Norm reduction closure criteria␣

˓→instead of a infinity-Norm (absolute convergence criteria). When \texttt{RELATIVE\_

˓→RCLOSE} is specified, a reasonable initial \texttt{inner\_rclose} value is $1.0 \times␣

˓→10^{-4}$ and convergence is achieved for a given inner (linear) iteration when $\Delta␣

˓→h \le$ \texttt{inner\_hclose} and the current L-2 Norm is $\le$ the product of the \

˓→texttt{RELATIVE\_RCLOSE} and the initial L-2 Norm for the current inner (linear)␣

˓→iteration. If \texttt{rclose\_option} is not specified, an absolute residual (infinity-

˓→norm) criterion is used.

This renders as the following. The inner_rclose variable is tagged by default and so the INNER_RCLOSE keyword
precedes inner_rclose. The rclose_option variable has tagged set to false, and so there is no keyword preceding it. It
also has optional set to true, and so there are square brackets around it.

BEGIN LINEAR
INNER_RCLOSE inner_rclose [rclose_option]
END LINEAR

Repeating records

The recordrepeating type is the same as the record type. We’ve given it another name to indicate that the user can
specify more than on line. The only place this is used at present is in the Output Control.

Keystring
A keystring is a union type. A keystring identifies that a variable can specified using multiple different types of input.
It is most often used by the advanced packages to adjust individual comments of the package. The following is an
example of the mawsetting variable:

block period
name mawsetting
type keystring status flowing_wellrecord rate well_head head_limit shutoffrecord rate_
˓→scalingrecord auxiliaryrecord

shape
tagged false
in_record true
reader urword
longname
description line of information that is parsed into a keyword and values. Keyword␣
˓→values that can be used to start the \texttt{mawsetting} string include: \texttt

˓→{FLOWING\_WELL}, \texttt{RATE}, \texttt{WELL\_HEAD}, \texttt{HEAD\_LIMIT}, \texttt

˓→{SHUT\_OFF}, \texttt{RATE\_SCALING}, and \texttt{AUXILIARY}.

(continues on next page)

308 Chapter 4. Developer Guide


MODFLOW 6

(continued from previous page)

block period
name status
type string
shape
tagged true
in_record true
reader urword
longname well status
description keyword option to define well status. \texttt{status} can be \texttt{ACTIVE}
˓→, \texttt{INACTIVE}, or \texttt{CONSTANT}. By default, \texttt{status} is \texttt

˓→{ACTIVE}.

block period
name flowing_wellrecord
type record flowing_well fwelev fwcond
shape
tagged
in_record true
reader urword
longname
description

block period
name flowing_well
type keyword
shape
in_record true
reader urword
longname well is a flowing well
description keyword to indicate the well is a flowing well. The \texttt{flowing\_well}␣
˓→option can be used to simulate flowing wells when the simulated well head exceeds the␣

˓→specified drainage elevation.

block period
name fwelev
type double precision
shape
tagged false
in_record true
reader urword
longname flowing well elevation
description elevation used to determine whether or not the well is flowing.

block period
name fwcond
type double precision
shape
tagged false
in_record true
reader urword
longname well flowing well elevation
(continues on next page)

4.7. MODFLOW 6 input specification language 309


MODFLOW 6

(continued from previous page)


description elevation used to determine whether or not the well is flowing.

block period
name rate
type double precision
shape
tagged true
in_record true
reader urword
longname well pumping rate
description is the volumetric pumping rate for the multi-aquifer well. A positive value␣
˓→indicates recharge and a negative value indicates discharge (pumping). \texttt{rate}␣

˓→only applies to active (\texttt{IBOUND}$>0$) multi-aquifer wells. If the Options block␣

˓→includes a \texttt{TIMESERIESFILE} entry (see the ``Time-Variable Input'' section),␣

˓→values can be obtained from a time series by entering the time-series name in place of␣

˓→a numeric value. By default, the \texttt{rate} for each multi-aquifer well is zero.

block period
name well_head
type double precision
shape
tagged true
in_record true
reader urword
longname well head
description is the head in the multi-aquifer well. \texttt{well\_head} is only applied␣
˓→to constant head (\texttt{STATUS} is \texttt{CONSTANT}) and inactive (\texttt{STATUS}␣

˓→is \texttt{INACTIVE}) multi-aquifer wells.

block period
name head_limit
type string
shape
tagged true
in_record true
reader urword
longname head limit
description is the limiting water level (head) in the well, which is the minimum of the␣
˓→well \texttt{rate} or the well inflow rate from the aquifer. \texttt{head\_limit} is␣

˓→only applied to discharging wells (\texttt{rate}$<0$). \texttt{head\_limit} can be␣

˓→deactivated by specifying the text string `\texttt{off}'. By default, \texttt{head\_

˓→limit} is `\texttt{off}'.

block period
name shutoffrecord
type record shut_off minrate maxrate
shape
tagged
in_record true
reader urword
longname
description
(continues on next page)

310 Chapter 4. Developer Guide


MODFLOW 6

(continued from previous page)

block period
name shut_off
type keyword
shape
in_record true
reader urword
longname shut off well
description keyword for activating well shut off capability. Subsequent values define␣
˓→the minimum and maximum pumping rate that a well must exceed to shutoff or reactivate␣

˓→a well, respectively, during a stress period. \texttt{shut\_off} is only applied to␣

˓→discharging wells (\texttt{rate}$<0$) and if \texttt{head\_limit} is specified (not␣

˓→set to `\texttt{off}'). If \texttt{head\_limit} is specified, \texttt{shut\_off} can␣


˓→be deactivated by specifying a minimum value equal to zero. By default, \texttt{shut\_

˓→off} is not used.

block period
name minrate
type double precision
shape
tagged false
in_record true
reader urword
longname minimum shutoff rate
description is the minimum rate that a well must exceed to shutoff a well during a␣
˓→stress period. \texttt{minrate} must be less than \texttt{maxrate}.

block period
name maxrate
type double precision
shape
tagged false
in_record true
reader urword
longname maximum shutoff rate
description is the maximum rate that a well must exceed to reactivate a well during a␣
˓→stress period. \texttt{maxrate} must be less than \texttt{minrate}.

block period
name rate_scalingrecord
type record rate_scaling pump_elevation scaling_length
shape
tagged
in_record true
reader urword
longname
description

block period
name rate_scaling
type keyword
shape
(continues on next page)

4.7. MODFLOW 6 input specification language 311


MODFLOW 6

(continued from previous page)


in_record true
reader urword
longname rate scaling
description activate rate scaling. If \texttt{rate\_scaling} is specified, both \texttt
˓→{pump\_elevation} and \texttt{reduction\_length} must be specified. \texttt{rate\_

˓→scaling} cannot be used with \texttt{head\_limit}.

block period
name pump_elevation
type double precision
shape
tagged false
in_record true
reader urword
longname pump elevation
description is the elevation of the multi-aquifer well pump (\texttt{pump\_elevation}). ␣
˓→\texttt{pump\_elevation} cannot be less than the bottom elevation (\texttt{bottom}) of␣

˓→the multi-aquifer well. By default, \texttt{pump\_elevation} is set equal to the␣

˓→bottom of the largest \texttt{GWF} node number connected to a MAW well.

block period
name scaling_length
type double precision
shape
tagged false
in_record true
reader urword
longname
description height above the pump elevation (\texttt{scaling\_length}) below which the␣
˓→pumping rate is reduced. The default value for \texttt{scaling\_length} is the well␣
˓→radius.

block period
name auxiliaryrecord
type record auxiliary auxname auxval
shape
tagged
in_record true
reader urword
longname
description

block period
name auxiliary
type keyword
shape
in_record true
reader urword
longname
description keyword for specifying auxiliary variable.

block period
(continues on next page)

312 Chapter 4. Developer Guide


MODFLOW 6

(continued from previous page)


name auxname
type string
shape
tagged false
in_record true
reader urword
longname
description name for the auxiliary variable to be assigned \texttt{auxval}. \texttt
˓→{auxname} must match one of the auxiliary variable names defined in the \texttt

˓→{OPTIONS} block. If \texttt{auxname} does not match one of the auxiliary variable␣

˓→names defined in the \texttt{OPTIONS} block the data are ignored.

block period
name auxval
type double precision
shape
tagged false
in_record true
reader urword
longname auxiliary variable value
description value for the auxiliary variable.

The mawsetting variable renders very simply in the block description as

BEGIN PERIOD iper


WELL wellno mawsetting
WELL wellno mawsetting
...
END PERIOD

But, the description for the mawsetting contains the additional information specified for the keystring. For example,
the following is written as the latex description for mawsetting:

\item \texttt{mawsetting}---line of information that is parsed into a keyword and values.


˓→ Keyword values that can be used to start the \texttt{mawsetting} string include: \
˓→texttt{FLOWING\_WELL}, \texttt{RATE}, \texttt{WELL\_HEAD}, \texttt{HEAD\_LIMIT}, \

˓→texttt{SHUT\_OFF}, \texttt{RATE\_SCALING}, and \texttt{AUXILIARY}.

\begin{verbatim}
STATUS status
FLOWING_WELL fwelev fwcond
RATE rate
WELL_HEAD well_head
HEAD_LIMIT head_limit
SHUT_OFF minrate maxrate
RATE_SCALING pump_elevation scaling_length
AUXILIARY auxname auxval
\end{verbatim}

4.7. MODFLOW 6 input specification language 313


MODFLOW 6

4.7.4 Text substitutions


Many of the MODFLOW 6 input variables share common description information. This information can be de-
fined in one place and then referenced as many times as needed throughout the definition files. The definition file
./dfn/common.dfn is where common information is defined. For example, there is a text string defined as:

name auxnames
description defines an array of one or more auxiliary variable names. There is no limit␣
˓→on the number of auxiliary variables that can be provided on this line; however, lists␣

˓→of information provided in subsequent blocks must have a column of data for each␣

˓→auxiliary variable name defined here. The number of auxiliary variables detected on␣
˓→this line determines the value for naux. Comments cannot be provided anywhere on this␣
˓→line as they will be interpreted as auxiliary variable names. Auxiliary variables may␣
˓→not be used by the {#1} model, but they will be available for use by other parts of␣

˓→the program. The ``AUX'' and ``AUXILIARY'' keywords can be used as a substitute for␣
˓→``AUXNAMES''. The program will terminate with an error if auxiliary variables are␣

˓→specified on more than one line in the options block.

This can be used in the description for auxnames throughout in the following manner:

block options
name auxnames
type string
shape (naux)
reader urword
optional true
longname keyword to save GWFGWF flows
description REPLACE auxnames {'{#1}': 'Groundwater Flow'}

In the description attribute, the capital REPLACE instructs the processor to replace auxnames with the text string
defined by auxnames in common.dfn. Also included here is a Python dictionary, which instructs the processor to
replace the text string ‘{#1}’ with ‘Groundwater Flow’.

4.7.5 Writing definition files


This section demonstrates a definition file for a MODFLOW 6 component.
Below is shown DFN file contents specifying an options block with optional keywords:

# --------------------- gwf dis options ---------------------

block options
name length_units
type string
reader urword
optional true
longname model length units
description is the length units used for this model. Values can be ``FEET'', ``METERS'',
˓→ or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''.

block options
name nogrb
type keyword
reader urword
optional true
(continues on next page)

314 Chapter 4. Developer Guide


MODFLOW 6

(continued from previous page)


longname do not write binary grid file
description keyword to deactivate writing of the binary grid file.

This corresponds to the following in a MODFLOW 6 input file:

BEGIN OPTIONS
[LENGTH_UNITS length_units]
[NOGRB]
END OPTIONS

Square brackets indicate that a parameter is optional.


The MODFLOW 6 repository contains scripts to generate the above snippet the DFN file and substitute it into the
MODFLOW 6 input/output documentation. In addition, a LaTeX file will be created, the name of which will be the
prefix of the definition file plus -desc.tex. This LaTeX file describes each parameter in the definition file:

\item \texttt{length\_units}---is the length units used for this model. Values can be␣
˓→``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN'
˓→'.

\item \texttt{NOGRB}---keyword to deactivate writing of the binary grid file.

The parameters will also be listed in a comprehensive Markdown table, which is also inserted into the MF6IO docu-
mentation and hosted on the online documentation site:
Further consideration is needed when writing definition files for certain MODFLOW 6 components.

Subpackages
A subpackage is a package referenced by another package (vs being referenced in the name file). The tas, ts, and obs
packages are examples of subpackages. There are a few additional steps required when creating a subpackage definition
file. First, verify that the parent package’s dfn file has a file record for the subpackage to the option block. For example,
for the time series package the file record definition starts with:

block options
name ts_filerecord
type record ts6 filein ts6_filename

Verify that the same naming convention is followed as the example above, specifically:

name <subpackage-abbr>_filerecord
record <subpackage-abbr>6 filein <subpackage-abbr>6_filename

Next, create the child package definition file (see sections below for more information).
When your child package is ready for release follow the same procedure described in “Creating a Definition File that
will Work with Flopy” above along with a few additional steps required for subpackages. At the top of the child dfn file
add two lines describing how the parent and child packages are related. The first line determines how the subpackage
is linked to the package:

# flopy subpackage \<parent record\> \<abbreviation\> \<child data\> \<data name\>

• Parent record is the MF6 record name of the filerecord in parent package that references the child packages file
name
• Abbreviation is the short abbreviation of the new subclass

4.7. MODFLOW 6 input specification language 315


MODFLOW 6

• Child data is the name of the child class data that can be passed in as parameter to the parent class. Passing in
this parameter to the parent class automatically creates the child class with the data provided.
• Data name is the parent class parameter name that automatically creates the child class with the data provided.
The example below is the first line from the ts subpackage dfn:

# flopy subpackage ts_filerecord ts timeseries timeseries

The second line determines the variable name of the subpackage’s parent and the type of parent (the parent package’s
object oriented parent):

# flopy parent_name_type \<parent package variable name\> \<parent package type\>

An example below is the second line in the ts subpackage dfn:

# flopy parent_name_type parent_package MFPackage

There are three possible types (or combination of them) that can be used for “parent package type”, MFPackage,
MFModel, and MFSimulation. If a package supports multiple types of parents (for example, it can be either in the
model namefile or in a package, like the obs package), include all the types supported, separating each type with a /
(MFPackage/MFModel).

Models
To create a new type of model choose a unique three letter model abbreviation (“gwf”, “gwt”, . . . ). Create a name file
dfn with the naming convention <model abbr>-nam.dfn. The name file must have only an options and packages block
(see gwf-nam.dfn as an example). Create a new dfn file for each of the packages in your new model, following the
naming convention described above.
When your model is ready for release copy the dfn file to the flopy distribution in the flopy/mf6/data/dfn folder, run
createpackages.py, and check in your new dfn files, the package classes, and updated init.py that createpackages.py
created.

Solvers
Create a solver definition file as you would any package definition file. When you are done add a commented line at the
top of the definition file to let FloPy know that this package is a solver (solution package type). The line should look
like this:

# solution_package <solver abbreviation> <list of model abbreviations the solver␣


˓→supports>

For example, the following would tell FloPy the IMS package supports the gwf6 and gwt6 model types:

# flopy solution_package ims gwf6 gwt6

If a “*” is used instead of the list of model abbreviations, the solver is assumed to support all model types. For example,
the following would tell FloPy that the IMS package supports all models:

# flopy solution_package ims *

4.7.6 Developer tooling


As mentioned, the MODFLOW 6 repository contains scripts to generate source code and documentation from DFN
files.

316 Chapter 4. Developer Guide


MODFLOW 6

The Python script mf6ivar.py will process all of the definition files and create a Markdown file, LaTeX files of the
variable descriptions, and text files containing the blocks.
The Python script deprecations.py will search definition files for deprecated or removed options and create a
Markdown file containing a table of deprecations and removals. The Python script mk_deprecations.py will convert
that table to LaTeX for the PDF documentation.
The Python script dfn2f90.py will generate a Fortran interface layer for the IDM-integrated components.

4.8 MODFLOW 6 Input Data Model


MODFLOW 6 reads simulation input from text and binary input files. Traditionally, each model package has been re-
sponsible for reading its own input. Although there are low-level utilities for reading arrays, and parsing input blocks,
these utilities are called from dedicated read routines for each package. To support new types of input, such as from
NetCDF files or through the Application Programming Interface, a new effort is underway to implement a comprehen-
sive Input Data Model (IDM) for MODFLOW 6. Implementation of an Output Data Model may follow this effort.
• Overview
• Framework
• Design
• Integration

4.8.1 Overview
The MODFLOW 6 IDP (Input Data Processor) is a subsystem meant to generically read and store simulation input
data from more than one type of input source. It is built upon existing MODFLOW 6 capabilities, specifically input
parameter descriptions currently stored in *.dfn (definition) files, and the Memory Manager. The parameter descriptions
provide IDP with input block and parameter attributes needed to create memory and store input data. The Memory
Manager provides a globally accessible way to create, update, access and remove input (and other) data. Existing
components that read a traditional ASCII input file can be updated to source their input from the Memory Manager.
This type of update is a significant step towards supporting sources of input data other than the traditional ASCII files.

4.8.2 Framework
MODFLOW 6 *.dfn files are used pre-compile time to generate fortran source files containing a subset of the parameter
and block attribute information necessary to process input for the simulation. A single definition file is converted
into one fortran source file that defines the component parameters and blocks and organizes them into lists. This
conversion from definition file to fortran source file is currently managed by the dfn2f90.py script. This script also
creates framework fortran source files with routines for generically accessing package definitions by component. A
package or other component intended to be updated and integrated with IDM must be added to the utils/idmloader/
dfns.txt file, which the dfn2f90.py script consumes. This process is described below.

4.8.3 Design
Input data stored in the Memory Manager use the special identifier __INPUT__ as a prefix to a memory path. MOD-
FLOW 6 refers to memory path prefixes such as these as a “context” and as such the collection of input data stored in
the Memory Manager is referred to as the “input context”.
IDM defines and implements loaders as objects to read input from some supported source and to allocate and store that
input in a source independent way for the package or component. Variations across sources are managed by the loaders.
Input retrieved by simulation packages is structured such that the source is not apparent or relevant to the package.
IDM distinguishes between static and dynamic loader objects. Static loader objects load all pre-period input before
any simulation objects are created and prepare for dynamic (stress period) data loads by creating the dynamic loader

4.8. MODFLOW 6 Input Data Model 317


MODFLOW 6

when relevant. Static and dynamic loaders are defined per supported source by extending base types defined in Input-
LoadType.f90. Top level IDM context (IdmLoad.f90) maintains pointers to loader base types and invoke the common
deferred interfaces load() (static) and rp() (dynamic) for each component. Each source can introduce as much com-
plexity as needed to support variations in input by introducing source specific loader types. For example, there are
currently distinct loaders for dynamic ASCII list based and array-based inputs. These sub-loaders are allocated and
managed within the context of a given source (e.g. ASCII).

4.8.4 Integration
A simulation component (package, etc) can be integrated with IDM by following these steps:
• Create dfn file
• Add component to dfns.txt and run dfn2f90.py
• Update MODFLOW 6 build scripts (e.g. meson / msvs)
• Use common interfaces to source input from input context
The DFN file is already a requirement for MODFLOW 6 package integration and so is not an IDM specific requirement.
The DFN file should be added to doc/mf6io/mf6ivar/dfn/ and its filename added to dfns.txt. The generated
package files are named \*idm.f90 and located in the src/Idm/ subdirectory by default. To run the script:

python utils/idmloader/scripts/dfn2f90.py

Running this command will generate a new definition file for the package and update the IDM selector framework. If the
package also introduces a new model then a new selector framework file will also be created. Update the MODFLOW
6 build system (meson and msvs) files with any newly generated files.
Once these files have been added to the build the package can be updated to source it’s input from the input con-
text. In general, static input data is copied from the input context to the package (or “model”) context by using the
mem_set_value() interface:

call mem_set_value(this%xorigin, 'XORIGIN', this%input_mempath, found%xorigin)

The found instance is a convenience type generated by dfn2f90.py and should be complete and ready to use from the
*idm.f90 package module. The interface updates the data pointer (this%xorigin in the example) only if the relevant
data was provided as input and will set the logical found%xorigin to TRUE when this is the case.
Dynamic data can also be copied between contexts by using the mem_set_value() interface or it can be accessed
directly by setting a pointer to it. In most cases, dynamic input memory is not reallocated during it’s lifetime and such
a pointer is valid for the duration of the simulation. See CHD package code for an example (e.g. “HEAD”)

318 Chapter 4. Developer Guide


CHAPTER

FIVE

MIGRATION GUIDES

This section includes version-specific migration guides for particular models and/or capabilities.

5.1 MODFLOW 6.6.0 Particle Tracking (PRT) Model Migration Guide


This document describes how to migrate PRT models from MODFLOW 6.5.0 to 6.6.0. The particle tracker has evolved
since the last release — while the basics remain the same, there are a few changes worthy of note and, in some cases,
detailed explanation.
Rather than describing bug fixes and new features separately, this document is structured by topic, and mentions relevant
bug fixes within each topic section. See the release notes for a complete (though less detailed) list of fixes, some of
which are unrelated to any topic described here.
• Exit solve tolerance
• Release time selection
– Explicit selections
– Relative selections
– Periodic releases
• Tracking time selection
• Extended tracking
• Vertical tracking
– Release time
– Tracking time

5.1.1 Exit solve tolerance


The PRT model’s Particle Release Point (PRP) package now provides an option EXIT_SOLVE_TOLERANCE which con-
figures the tolerance to use when solving for a particle’s exit location from a triangular subcell of an unstructured grid
cell. This value is only used for the generalized (ternary) tracking method on vertex grids.
A value of 0.00001 is set by default. This value works well for many problems, but the value that strikes the best balance
between accuracy and speed is problem-dependent.
Note: A tolerance that is too large can result in a particle that is close to a subcell boundary and moving nearly parallel
to that boundary to terminate prematurely. If a particle is suspected to have terminated prematurely in a model based
on a DISV grid, tightening EXIT_SOLVE_TOLERANCE down (say, to 1e-10) may resolve the issue.

319
MODFLOW 6

5.1.2 Release time selection


The PRT model’s Particle Release Point (PRP) package is responsible for configuring when particles should be released.
This can be done with explicitly provided release times, or with reference to stress periods and time steps.

Explicit selections
Previously, explicit times were provided via a RELEASE_TIMES (or RELEASE_TIMES_FILE) variable. This pattern does
not appear elsewhere in MODFLOW 6. To conform more closely to MODFLOW 6 input conventions, times must now
be specified with list input, via a new RELEASETIMES block. The list has a single time column. A DIMENSIONS block
containing an NRELEASETIMES variable must also be provided.
For instance, a sample PRP file in the new format:

BEGIN options
PRINT_INPUT
EXIT_SOLVE_TOLERANCE 1.00000000E-05
EXTEND_TRACKING
END options

BEGIN dimensions
NRELEASEPTS 9
NRELEASETIMES 2
END dimensions

BEGIN packagedata
1 1 1 1 0.10000000 9.10000000 0.50000000
2 1 1 1 0.20000000 9.20000000 0.50000000
3 1 1 1 0.30000001 9.30000001 0.50000000
4 1 1 1 0.40000001 9.40000001 0.50000000
5 1 1 1 0.50000000 9.50000000 0.50000000
6 1 1 1 0.60000002 9.60000002 0.50000000
7 1 1 1 0.69999999 9.69999999 0.50000000
8 1 1 1 0.80000001 9.80000001 0.50000000
9 1 1 1 0.89999998 9.89999998 0.50000000
END packagedata

BEGIN releasetimes
0.50000000
0.60000000
END releasetimes

Note: List-based input leaves open the possibility to provide more information via the time selection mechanism in the
future, by way of additional columns.

Relative selections
MF6.5.0 provided a FRACTION option for period block release settings, which could be used to release particles at an
offset from the beginning of any specified time steps. This option has been removed — particle release times configured
with period block settings now occur at the beginning of the specified time steps, bringing the PRP package period block
settings into conformity with the period block settings in the Output Control (OC) package. For fine-grained control
over release times, specify them explicitly.

320 Chapter 5. Migration Guides


MODFLOW 6

Periodic releases
In MF6.6.0, the PRP package also provides a new option to configure release times at a regular time interval,
RELEASE_TIME_FREQUENCY accepting a double precision value.

5.1.3 Tracking time selection


Similarly, the PRT model’s Output Control (OC) package allows selection of times for status reporting to occur. Pre-
viously, times were provided via a TRACK_TIMES (or TRACK_TIMES_FILE) variable.
Like the PRP package, tracking times for the OC package must now be specified with list input, via a new TRACKTIMES
block. The list has a single time column. A DIMENSIONS block containing an NTRACKTIMES variable must also be
provided.
A sample OC file:

BEGIN options
TRACK FILEOUT prt.trk
TRACKCSV FILEOUT prt.trk.csv
TRACK_USERTIME
END options

BEGIN dimensions
NTRACKTIMES 1000
END dimensions

BEGIN tracktimes
0.00000000
0.05000000
0.10000000
... (truncated)

5.1.4 Extended tracking


To achieve the same behavior as with a MODFLOW 6.5.0 PRT model, the EXTEND_TRACKING keyword must be sup-
plied to the PRP package. In MF6.5.0, PRT followed MODPATH 7 in “extending” particle tracking beyond the end of
the simulation time, until all particles terminate, if the last stress period is steady state. While consistent with MP7,
this means a particle tracking simulation may fail to halt if particles get caught in flow cycles. To guarantee termina-
tion under the default settings, MF6.6.0 introduces the EXTEND_TRACKING keyword to opt into tracking extension —
otherwise particles will terminate at the simulation end time.

5.1.5 Vertical tracking


This section describes the approach PRT takes to vertical particle motion. It is reproduced (sans diagrams) in the
MF6IO guide’s PRT chapter.
The motion of a particle is determined by the groundwater velocity field in which the particle is immersed. In a fully
saturated cell, or the saturated portion of a partially saturated cell, the velocity field is calculated from the flows entering
and exiting the cell. In a completely dry cell, or the dry portion of a partially saturated cell, the fate of a particle depends
on whether the cell is an active part of the flow simulation, whether the particle is in a dry or wet part of the cell, and
user-selected options.
A cell can be inactive either because it has been removed from the active simulation using the IDOMAIN array or
because it is completely dry, i.e., the head in the cell is below the bottom elevation of the cell. Deactivation of completely
dry cells is the default behavior in MODFLOW 6. However, when the Newton-Raphson formulation is used to solve
for groundwater flow, completely dry cells remain active.

5.1. MODFLOW 6.6.0 Particle Tracking (PRT) Model Migration Guide 321
MODFLOW 6

Sometimes it is convenient to avoid “stranding” particles — rather than terminating dry particles, it is often convenient
instead to move them down to the saturated zone and continue tracking. PRT allows particles (and indeed configures
them by default) to move instantaneously down to the water table in dry conditions. This was the only supported behav-
ior in MF6.5.0. With MF6.6.0, PRT continues to support this behavior by default, while providing a few alternatives.
Release-time and tracking-time considerations are implemented (and thus described here) separately.
Legend
Diagrams use the following conventions.
• Stadium-shaped boxes represent steps or processes.
• Square boxes represent outcomes.
• Diamond boxes represent conditions (i.e. runtime state).
• Round-corner boxes represent user options.
• Thin lines represent decisions made by the program on the basis of runtime state, e.g. particle, cell, flows.
• Thick lines represent decisions made by the user by way of options.
• Green outcome boxes indicate the particle remains active.
• Red outcome boxes indicate the particle terminates.

flowchart LR
OPTION[Outcome]
OPTION(OPTION) ==> |Yes| STEP([Step])
STEP --> ACTIVE
OPTION ==> |No| CONDITION{Condition}
CONDITION --> |Yes| TERMINATE
CONDITION --> |No| ACTIVE
ACTIVE[Active]:::active
TERMINATE[Termination]:::terminate

classDef active stroke:#98fb98


classDef terminate stroke:#f08080

Release time
At release time, PRT decides whether to release each particle or terminate it unreleased.
If the cell into which the particle is being released is inactive, behavior is determined by the DRAPE option. If the DRAPE
option is enabled, the particle will be released from the top-most active cell beneath it, if any. If there is no active cell
underneath the particle in any layer, or if DRAPE is not enabled, the particle will terminate unreleased (with status code
8).
If the cell into which the particle is being released is active, the particle will be released at the user-specified location,
even if that location is in the dry portion of the cell or the cell is dry-but-active.
Note that for a dry-but-active cell the DRAPE option has no effect. In that case, the particle is released into the cell, and
its subsequent behavior can be configured using the DRY_TRACKING_METHOD option discussed below.

flowchart LR
ACTIVE --> |No| DRAPE(DRAPE)
ACTIVE{Cell active?} --> |Yes| RELEASE[Release in specified cell]:::release
DRAPE ==> |No| TERMINATE:::terminate
DRAPE ==> |Yes| ACTIVE_UNDER{Active under?}
(continues on next page)

322 Chapter 5. Migration Guides


MODFLOW 6

(continued from previous page)


ACTIVE_UNDER --> |Yes| RELEASE_AT_TABLE[Drape to active cell]:::release
ACTIVE_UNDER --> |No| TERMINATE[Terminate]

classDef release stroke:#98fb98


classDef terminate stroke:#f08080

Tracking time
During tracking, the fate of a particle depends on the status of the cell that contains the particle, whether the particle is
in a wet or dry part of the cell, and the DRY_TRACKING_METHOD option.
A particle immersed in the groundwater flow field during a given time step can end up in an inactive cell, a dry-but-
active cell, or the dry part of a partially saturated cell if the water table drops on the next time step.
A particle that finds itself in an inactive cell will terminate with status code 7. This is consistent with the behavior of
MODPATH 7.
Dry-but-active cells can occur when the Newton-Raphson formulation is used to solve for groundwater flow. As dis-
cussed above, particles can be released into dry-but-active cells.
A particle in a dry-but-active cell, or above the water table in a partially saturated cell, which we call a dry particle,
need not terminate. The PRP package provides a DRY_TRACKING_METHOD option that determines how dry particles
should behave. Supported values are DROP (the default), STOP, and STAY.
If DROP is selected, or if a DRY_TRACKING_METHOD is unspecified, a dry particle is passed vertically and instantaneously
to the water table (if the cell is partially saturated) or to the bottom of the cell (if the cell is dry). This repeats (i.e.,
the particle may drop through multiple cells) until it reaches the water table. Tracking then proceeds as usual. If the
vertical column containing the particle is entirely dry, the particle will terminate upon reaching the bottom of the model
grid.
If STOP is selected, dry particles will be terminated.
If STAY is selected, a dry particle will remain stationary until a) the water table rises and tracking can continue, b) the
particle terminates due to reaching its STOPTIME or STOPTRAVELTIME, or c) the simulation ends.

flowchart LR
ACTIVE{Cell active?} --> |No| TERMINATE{Terminate}
ACTIVE{Cell active?} --> |Yes| PARTICLE_DRY
PARTICLE_DRY{Particle dry?} --> |Yes| DRY_TRACKING_METHOD(DRY_TRACKING_METHOD)
DRY_TRACKING_METHOD ==> |STOP| TERMINATE[Terminate]:::terminate
DRY_TRACKING_METHOD ==> |DROP| CELL_DRY{Cell dry?}
CELL_DRY --> |Yes| DROP_BOTTOM[Pass to cell bottom]:::track
CELL_DRY --> |No| DROP_TABLE([Pass to water table])
DRY_TRACKING_METHOD ==> |STAY| STAY[Stationary]:::track
DROP_TABLE --> TRACK:::track
PARTICLE_DRY --> |No| TRACK[Track normally]

classDef track stroke:#98fb98


classDef terminate stroke:#f08080

Note: In MF6.5, behavior was as described by DROP, with one major exception: lack of an exit face (i.e. any face with
outgoing flow) took precedence over cell saturation; a particle finding itself in a dry cell with no outgoing flow would
previously terminate, where if DROP is selected (or a dry tracking method unspecified) the pass-to-bottom method will
now be applied instead.
With this change, it also becomes necessary to prohibit backtracking between vertically adjacent pairs of cells within
the same time step, in order to avoid the possibility of infinite loops — a particle might otherwise be passed endlessly

5.1. MODFLOW 6.6.0 Particle Tracking (PRT) Model Migration Guide 323
MODFLOW 6

between e.g. the bottom face of a cell containing a pumping well and the top face of the cell below. Note that this
limitation applies only to vertically adjacent cells, and only to the immediately previous cell — a particle may re-enter
a cell after entering a third cell.
A divide-by-zero crash has also been fixed for gfortran, which could occur upon a particle’s entry into a dry cell in
a structured grid. In MF6.5.0, this could prevent the particle from “dropping” properly.

324 Chapter 5. Migration Guides

You might also like