U.S. Department of the Interior

U.S. Geological Survey

Techniques and Methods 6-A27

User Guide for HUFPrint, A Tabulation and Visualization 

Utility for the Hydrogeologic-Unit Flow (HUF) Package of 

MODFLOW

Chapter 27 of 

Book 6. Modeling Techniques, Section A. Ground Water

User Guide for HUFPrint, A Tabulation and 

Visualization Utility for the HydrogeologicUnit Flow (HUF) Package of MODFLOW

By Edward R. Banta and Alden M. Provost

Techniques and Methods 6-A27

U.S. Geological Survey 

U.S. Department of the Interior
U.S. Department of the Interior

DIRK KEMPTHORNE, Secretary

U.S. Geological Survey

Mark D. Myers, Director

U.S. Geological Survey, Reston, Virginia: 2008

For product and ordering information:

World Wide Web: http://www.usgs.gov/pubprod

Telephone: 1-888-ASK-USGS

For more information on the USGS--the Federal source for science about the Earth, its natural and living resources, 

natural hazards, and the environment:

World Wide Web: http://www.usgs.gov

Telephone: 1-888-ASK-USGS

Any use of trade, product, or firm names is for descriptive purposes only and does not imply endorsement by the 

U.S. Government.

Although this report is in the public domain, permission must be secured from the individual copyright owners to 

reproduce any copyrighted materials contained within this report.

Suggested citation:

Banta, E.R., and Provost, A.M., 2008, User guide for HUFPrint, a tabulation and visualization utility for the 

Hydrogeologic-Unit Flow (HUF) Package of MODFLOW: U.S. Geological Survey Techniques and Methods 6-A27, 13 p.
iii

Contents

Abstract...........................................................................................................................................................1

Introduction.....................................................................................................................................................1

Obtaining and installing the software ...............................................................................................1

Acknowledgments................................................................................................................................2

Program Execution and Input Instructions................................................................................................2

Commands..............................................................................................................................................2

OUTFILE command ......................................................................................................................2

PRINT_HGU command................................................................................................................3

PRINT_LAY command .................................................................................................................4

PRINT_XSECTION command.....................................................................................................5

PRINT_VSECTION command.....................................................................................................6

Print codes..................................................................................................................................10

Print flags ....................................................................................................................................10

Example command file and command line execution ..................................................................11

Example HUFPrint output...................................................................................................................11

References Cited..........................................................................................................................................13

Figures

1. Excerpt from file TEST_HGU3_HK.dat......................................................................................5

2. Excerpt from TEST_L001_HK.dat...............................................................................................6

3. Cross-section example graphic.................................................................................................7

4. Vertical-section example graphic.............................................................................................8

5. Excerpts from vertical-section example data output file......................................................9

6. Example command file for HUFPrint........................................................................................11

7. Command-line execution of HUFPrint ....................................................................................11

8. Example screen output of HUFPrint........................................................................................12

9. Files generated by the HUFPrint example .............................................................................12

Tables

1. PRINT_CODE values and output formats for HUFPrint..........................................................3

2. PRINT_FLAG for commands PRINT_HGU and PRINT_LAY in HUFPrint.............................4
iv

Preface

This report documents HUFPrint, a computer program that extracts and displays information about model structure from the input data for a model using the Hydrogeologic-Unit Flow 

(HUF) Package of MODFLOW, the U.S. Geological Survey’s three-dimensional ground-water 

flow model. The documentation presented herein describes the program, the input requirements, and the output.

The performance of this program has been tested in a variety of applications. Future 

applications, however, might reveal errors that were not detected in the test simulations. Users 

are requested to notify the U.S. Geological Survey of any errors found in this document or the 

computer program. Updates might occasionally be made to this document and to the program. 

Users can download the software and check for updates on the Internet at http://water.usgs.gov/

software/HUFPrint/.
v

Abbreviations

Abbreviation Meaning

CC Hydraulic conductance in the column direction (along columns) between 

adjacent model cells

CR Hydraulic conductance in the row direction (along rows) between adjacent 

model cells

CV Hydraulic conductance in the vertical direction between adjacent model cells

HANI Horizontal anisotropy; the ratio of hydraulic conductivity in the column 

direction to hydraulic conductivity in the row direction

HGU Hydrogeologic unit

HGUVANI A HUF-Package input variable that indicates whether vertical hydraulic 

conductivity is to be input directly or calculated from horizontal hydraulic 

conductivity and vertical anisotropy

HK Hydraulic conductivity in the row direction

HKCC Hydraulic conductivity in the column direction

HUF Hydrogeologic Unit Flow (Package)

KDEP Hydraulic-conductivity depth dependence (Anderman and Hill, 2003)

LVDA Layer variable-direction horizontal anisotropy (Anderman and others, 2002)

SS Specific storage

SY Specific yield

VANI Vertical anisotropy; the ratio of horizontal hydraulic conductivity in the row 

direction to vertical hydraulic conductivity

VK Vertical hydraulic conductivity

Conversion Factors

Inch/Pound to SI

Multiply By To obtain

foot (ft) 0.3048 meter (m)

Abstract

This report documents HUFPrint, a computer program 

that extracts and displays information about model structure 

and hydraulic properties from the input data for a model built 

using the Hydrogeologic-Unit Flow (HUF) Package of the 

U.S. Geological Survey’s MODFLOW program for modeling ground-water flow. HUFPrint reads the HUF Package and 

other MODFLOW input files, processes the data by hydrogeologic unit and by model layer, and generates text and graphics 

files useful for visualizing the data or for further processing. 

For hydrogeologic units, HUFPrint outputs such hydraulic 

properties as horizontal hydraulic conductivity along rows, 

horizontal hydraulic conductivity along columns, horizontal 

anisotropy, vertical hydraulic conductivity or anisotropy, 

specific storage, specific yield, and hydraulic-conductivity 

depth-dependence coefficient. For model layers, HUFPrint 

outputs such effective hydraulic properties as horizontal 

hydraulic conductivity along rows, horizontal hydraulic 

conductivity along columns, horizontal anisotropy, specific 

storage, primary direction of anisotropy, and vertical conductance. Text files tabulating hydraulic properties by hydrogeologic unit, by model layer, or in a specified vertical section 

may be generated. Graphics showing two-dimensional cross 

sections and one-dimensional vertical sections at specified 

locations also may be generated. HUFPrint reads input files 

designed for MODFLOW–2000 or MODFLOW–2005.

Introduction

In the Hydrogeologic-Unit Flow (HUF) Package (Anderman and Hill, 2000; 2003; Anderman and others, 2002) of 

MODFLOW (Harbaugh, 2005; Harbaugh and others, 2000), 

most hydraulic system properties are assigned on the basis of 

hydrogeologic units (HGUs); this information is then used to 

calculate effective model-layer properties. However, the printing capabilities in the HUF Package are limited to printing 

information for HGUs, and using HUF to print this information requires running MODFLOW. Thus, the HUF package 

provides no convenient way to extract and display the HGU 

and effective model-layer properties it computes.

This report describes HUFPrint, a separate program that 

runs independently of MODFLOW. It reads the HUF Package 

input file and selected other MODFLOW input files and writes 

HGU and effective model-layer properties to output files in a 

variety of forms. Hydraulic properties of HGUs can be written 

for all units or for specific individual units. Effective hydraulic 

properties can be written for each layer. All numeric hydraulic-property values and elevations output by HUFPrint are in 

the user-selected units for model input.

Graphics files showing cross sections can be generated, 

allowing visualization of the model layers and HGUs superimposed. A one-dimensional representative vertical section at 

a single cell location through the entire model thickness can 

be generated to illustrate the HGUs and model layers side by 

side; an extensive informational file listing hydraulic information at this location also is generated. HUFPrint supports 

generation of graphics files in the Postscript format (Adobe 

Systems, Inc., 2008). Postscript files may be viewed with the 

program “GSview” (Lang, 2007) or another Postscript viewer. 

If needed, a variety of utility programs are available from 

other sources for converting Postscript files to other graphics 

formats. The program “pstoedit” (Glunz, 2007) is one such 

utility.

All examples and figures in this report are generated from 

the example data set described in the last section of the report. 

All numeric units are in the user-selected units for model 

input.

Obtaining and Installing the Software

HUFPrint and related files may be downloaded from the 

URL listed in the Preface of this report. The download is a 

self-extracting archive file that contains an executable file for 

the Windows operating system, Fortran source-code files, and 

example input and data.

Executable files for operating systems other than 

Windows may be generated by compiling and linking the 

source-code files in the “src” subdirectory using a Fortran–90 

User Guide for HUFPrint, A Tabulation and Visualization 

Utility for the Hydrogeologic-Unit Flow (HUF) Package of 

MODFLOW

By Edward R. Banta and Alden M. Provost
2 User Guide for HUFPrint

compiler that supports the operating system of interest. Once 

extracted or compiled, the executable file may be invoked as 

described in the following sections.

Acknowledgments

Thanks are extended to Evan Anderman, formerly of 

Calibra Consulting LLC, and Mike LeFrancois of Norwest 

Applied Hydrology, who did much of the original programming for HUFPrint. Reviews by Jan Uhlik, Claudia Faunt, 

and Suzanne Paschke resulted in substantial improvements to 

the functionality of the program and to the readability of the 

report.

Program Execution and Input 

Instructions

Users are encouraged to invoke HUFPrint from the 

operating-system command prompt at first, to gain familiarity with the input requirements and to aid in identifying input 

errors. HUFPrint also may be invoked from a user-written 

command script, batch file, or other program. Two arguments 

are required; a third argument, shown in brackets, is optional. 

The command-line syntax is:

HUFPRINT NAME-FILE COMMAND-FILE [LISTFILE]

where:

NAME-FILE is the name of a MODFLOW Name 

file for the model of interest; COMMANDFILE is the name of a text file containing 

HUFPrint commands used to specify the 

desired output; and LIST-FILE is the name of a 

HUFPrint listing file, to which output generated 

by HUFPrint as it processes MODFLOW input 

files is to be written. If LIST-FILE is omitted, 

the default name for the HUFPrint listing file is 

“hufprint-list.txt”.

The first file listed in the Name file must be identified 

with file type “List” or “Global”; this file is not opened or 

modified, but its unit number is used for the HUFPrint listing 

file. All input files listed in the MODFLOW Name file are 

opened for read-only access. Data are read from the HUF, 

Discretization, Basic, and if listed, Multiplier and Zone files. 

Definitions and values for HUF-Package parameters are read 

from the HUF file. However, for a MODFLOW–2000 model, 

if a Sensitivity Process (SEN) input file is listed in the Name 

file, and if the SEN file provides values for parameters defined 

in HUF input, the parameter values in the SEN file override 

the corresponding parameter values in the HUF file. Similarly, 

for a MODFLOW–2005 model, if a Parameter Value (PVAL) 

file is listed in the Name file, and if the PVAL file provides 

values for parameters defined in HUF input, the parameter 

values in the PVAL file override the corresponding parameter 

values in the HUF file. To ensure that output generated by 

HUFPrint is consistent with a particular MODFLOW model, it 

is expected that the Name file and all input files listed therein 

are those used to make an actual MODFLOW run. 

The HUFPrint command file is used to specify the 

desired output of HUFPrint. The format of the command file 

is both free and non-case sensitive. However, the specific 

options for each command must lie on the same line as the 

command to which they refer. Blank lines are ignored. Each 

line of a command file is processed to see if it contains a command or a comment. Comments and blank lines are allowed 

throughout the command file. Any line beginning with a “#” 

symbol is interpreted as a comment. Comment lines read from 

the command file and diagnostic information, if appropriate, 

are written to a file named by appending “.hco” to the file 

name given as COMMAND-FILE. In the event of unexpected 

results, comment lines can be inserted into the command file 

to aid in identifying command lines that may require modification. Input read from MODFLOW input files is echoed to the 

HUFPrint listing file; this file also can be informative in the 

event of unexpected results.

Commands

HUFPrint recognizes five commands (OUTFILE, 

PRINT_HGU, PRINT_LAY, PRINT_XSECTION, and 

PRINT_VSECTION), which are documented in this section. 

All commands are optional.

OUTFILE command

OUTFILE is a command that allows the user to define 

a string to be used as the first part of the name of each file generated by HUFPrint (except the HUFPrint listing and “.hco” 

files). The syntax of the OUTFILE command is:

OUTFILE BASENAME

where:

BASENAME defines a base filename for the 

generated output files. 

Names of specific output files vary by output-file type, 

as documented in the following sections. The output files can 

be written either in the current working directory or in another 

directory provided as part of BASENAME. To produce files in 

a directory other than the current working directory, the directory should be specified as part of BASENAME, using a forward slash (“/”) to separate directory names, and the directory 

must exist prior to executing HUFPrint; when HUFPrint is run 

under the Windows operating system, either a forward slash 

(“/”) or a backslash (“\”) may be used as a directory separator 

and to separate the final directory name from the string to be 

used in forming the file names. If the OUTFILE command is 

not used, the output files will be written in the current working directory by default, and output files will be named as 
Commands 3

described in the following sections. OUTFILE affects the locations and names of all subsequent output files until the next 

OUTFILE command is entered.

Examples

OUTFILE TEST 

All output files will start with the string “TEST” and will 

be written in the current working directory.

OUTFILE PRINT/TEST 

A directory named “PRINT” must be located in the current working directory in which HUFPrint is executed. Subsequent output files will be created in this directory and will start 

with the string “TEST”.

PRINT_HGU command

The PRINT_HGU command generates one or more text 

files in which values of a hydraulic-property array for an HGU 

are tabulated. The syntax of the PRINT_HGU command is:

PRINT_HGU UNIT_NAME PRINT_CODE PRINT_

FLAGS

where:

UNIT_NAME refers to the name of an HGU defined 

in the HUF Package input file. HUFPrint 

will create individual output files containing 

hydraulic-property array values for the 

specified UNIT_NAME. If UNIT_NAME is 

specified as “ALL”, a file will be generated for 

each of the HGUs defined in the HUF Package 

input file for each specified print flag.

PRINT_CODE is one of a set of integer print-code 

values that can be used to specify the output 

format in the generated output file. Refer to 

table 1 for a complete listing of the available 

print codes and corresponding formats. 

PRINT_FLAGS is either “ALL” or a list of one 

or more of the following print flags: “HK”, 

“HANI”, “HKCC”, “VK”, “SS”, “SY”, and 

“KDEP”. PRINT_FLAGS determines the 

hydraulic-property arrays to be printed. The 

print flag will be incorporated in the output file 

name. Specifying “ALL” is equivalent to listing 

all seven print flags. For a complete description 

of the available flags and hydraulic properties, 

refer to table 2 and the “Print flags” section. If 

the user specifies the VK print flag and if HUF 

Package input (variable HGUVANI) specifies 

that vertical anisotropy is used in place of 

vertical hydraulic conductivity, the name of 

the output file will include “VANI” rather 

than “VK,” and the file will contain vertical 

anisotropy values.

Table 1. PRINT_CODE values and 

output formats for HUFPrint

[See “Print_codes” section of report for 

explanation of format]

PRINT_CODE Format

 0 10G11.4

 1 11G10.3

 2 9G13.6

 3 15F7.1

 4 15F7.2

 5 15F7.3

 6 15F7.4

 7 20F5.0

 8 20F5.1

 9 20F5.2

10 20F5.3

11 20F5.4

12 10G11.4

13 10F6.0

14 10F6.1

15 10F6.2

16 10F6.3

17 10F6.4

18 10F6.5

19 5G12.5

20 6G11.4

21 7G9.2
4 User Guide for HUFPrint

Examples

PRINT_HGU HGU3 16 HK

This command will generate one output file with the 

name “BASENAME_HGU3_HK.dat”, containing a table of 

values of horizontal hydraulic conductivity along rows for 

HGU “HGU3” (fig. 1); the HUF input file must include the 

definition of an HGU named “HGU3”. The hydraulic conductivity values will be written using a print code of 16. BASENAME refers to the base filename specified in the OUTFILE 

command; however, if no OUTFILE command applies, the file 

name will be “HGU3_HK.dat”.

PRINT_HGU HGU2 2 HK VK

This command will produce two files containing hydraulic-property arrays for HGU “HGU2”. One file will contain 

horizontal hydraulic-conductivity (HK) values. If BASENAME is defined in an OUTFILE command, the file will be 

named BASENAME_HGU2_HK.dat; if not, the file will be 

named HGU2_HK.dat. A second file will contain vertical 

hydraulic-conductivity values. If BASENAME is defined, this 

file will be named “BASENAME_HGU2_VK.dat”; if not, the 

file will be named “HGU2_VK.dat”. Both files will be written 

using a print code of 2.

PRINT_HGU ALL 3 ALL 

This command will generate a file for each hydraulicproperty array defined for each of the HGUs. All files will be 

written using a print code of 3.

PRINT_LAY command

The PRINT_LAY command generates one or more text 

files in which effective hydraulic-property values for a model 

layer are tabulated. The syntax for the PRINT_LAY command 

is:

PRINT_LAY MODEL_LAYER PRINT_CODE 

PRINT_FLAGS

where:

MODEL_LAYER is the model layer of interest. 

Only one layer can be specified in each 

PRINT_LAY command. However, more than 

one PRINT_LAY command can be used in the 

command file, allowing many layers to have 

hydraulic information written to files in a single 

invocation of HUFPrint. 

PRINT_CODE is one of a set of integer print-code 

values that can be used to specify the output 

format in the generated output file. Refer to 

table 1 for a complete listing of the available 

print codes and corresponding formats.

PRINT_FLAGS is either “ALL” or a list of one 

or more of the following print flags: “HK”, 

Table 2. PRINT_FLAG for commands PRINT_HGU and PRINT_LAY in HUFPrint

PRINT_FLAG PRINT_HGU PRINT_LAY

HK Horizontal hydraulic conductivity of the HGU along rows 

or, if LVDA is active, hydraulic conductivity along the 

primary direction of anisotropy

Effective horizontal hydraulic conductivity of the model layer 

along rows. If LVDA is active, effective hydraulic conductivity along the primary direction of anisotropy

HANI Horizontal-anisotropy ratio of the HGU Effective horizontal anisotropy of the model layer, calculated 

as effective hydraulic conductivity along rows divided by effective hydraulic conductivity along columns, or if LVDA is 

active, the effective horizontal hydraulic conductivity along 

the primary direction of anisotropy divided by the effective 

hydraulic conductivity along the orthogonal direction of 

anisotropy

HKCC Horizontal hydraulic conductivity along columns or, if LVDA is active, perpendicular to the primary direction of anisotropy

VK Vertical hydraulic conductivity or vertical anisotropy ratio 

of the HGU, depending on the value of HGUVANI3

specified in HUF input 

Not applicable

SS Specific storage of the HGU Effective specific storage of the model layer

SY Specific yield Not applicable

KDEP Hydraulic conductivity depth-dependence coefficient1 Not applicable

LVDA Not applicable Primary direction of anisotropy2

CV Not applicable Model calculated branch conductance between a cell and the 

cell below. CV does not apply to the bottom model layer. 

1

. See Anderman and Hill (2003)

2

. See Anderman and others (2002)

3

. HGUVANI is a HUF-Package input variable that indicates whether vertical hydraulic conductivity is to be input directly or calculated from horizontal 

hydraulic conductivity and vertical anisotropy
Commands 5

“HANI”, “HKCC”, “SS”, “LVDA”, and “CV”. 

PRINT_FLAGS determines the hydraulicproperty arrays to be printed. The print flag 

will be incorporated in the output file name. 

Specifying “ALL” is equivalent to listing all six 

print flags. For a complete description of the 

available flags and hydraulic properties, refer to 

table 2.

Examples

PRINT_LAY 1 16 HK 

This command will generate one output file named 

“BASENAME_L001_HK.dat”, which will contain a tabulation of effective horizontal hydraulic conductivity along rows 

for layer 1 using print code 16 for the output (fig. 2). BASENAME refers to the string specified in an OUTFILE command. However, if an OUTFILE command does not apply, the 

name of the file generated by PRINT_LAY will be “L001_

HK.dat”. The string “L001” identifies the model layer number.

PRINT_LAY 2 2 ALL 

This command will generate one file for each effective 

hydraulic-property array for model layer 2, using print code 2.

PRINT_XSECTION command

The PRINT_XSECTION command creates a graphical 

representation of a cross section between two defined modelcell centers in Postscript format. The syntax of the PRINT_

XSECTION command is:

PRINT_XSECTION IROW ICOL FROW FCOL 

NUMSEG RVEXAG

where:

IROW and ICOL are integers identifying the initial 

cell’s row and column location. The left side 

of the cross-section graphic will represent the 

center of this cell through the entire model 

thickness.

FROW and FCOL are integers identifying the final 

cell’s row and column location. The right side 

of the cross-section graphic will represent the 

center of this cell through the entire model 

thickness.

NUMSEG is an integer number of line segments 

to be used to draw the cross section between 

the two chosen cell locations. This value 

can be used to make the final visualization 

coarse (using a relatively small value for 

Figure 1. Excerpt from file TEST_HGU3_HK.dat. Hydraulic-conductivity values for the first two rows of HGU3 are shown. The 

integers in the heading (1–58) indicate the model column numbers, and integers at the left side (1–2), indicate model row numbers.

 

HYDRAULIC CONDUCTIVITY ALONG ROWS FOR HYDROGEOLOGIC UNIT HGU3 

 1 2 3 4 5 6 7 8 9 10

 11 12 13 14 15 16 17 18 19 20

 21 22 23 24 25 26 27 28 29 30

 31 32 33 34 35 36 37 38 39 40

 41 42 43 44 45 46 47 48 49 50

 51 52 53 54 55 56 57 58

 .........................................................................

 1 4.991 4.865 4.747 4.636 4.533 4.435 4.343 4.257 4.175 4.098

 4.024 3.955 3.889 3.826 3.766 3.709 3.655 3.603 3.553 3.506

 3.460 3.416 3.374 3.334 3.295 3.258 3.222 3.187 3.154 3.121

 3.090 3.060 3.031 3.002 2.975 2.948 2.923 2.897 2.873 2.849

 2.826 2.804 2.782 2.760 2.739 2.719 2.699 2.679 2.660 2.641

 2.622 2.604 2.586 2.569 2.551 2.534 2.518 2.501

 2 4.992 4.865 4.747 4.637 4.533 4.436 4.344 4.257 4.175 4.098

 4.025 3.955 3.889 3.826 3.767 3.709 3.655 3.603 3.553 3.506

 3.460 3.416 3.374 3.334 3.295 3.258 3.222 3.187 3.154 3.121

 3.090 3.060 3.031 3.003 2.975 2.948 2.923 2.898 2.873 2.849

 2.826 2.804 2.782 2.760 2.739 2.719 2.699 2.679 2.660 2.641

 2.622 2.604 2.586 2.569 2.552 2.535 2.518 2.501
6 User Guide for HUFPrint

NUMSEG) or fine (using a relatively large 

value). Hydrogeologic-unit and model-layer 

top and bottom elevations are interpolated 

between cell centers as needed at each segment 

endpoint. The interpolation methodology uses 

the basis-function approach documented for 

interpolation of simulated heads for hydraulichead observations in MODFLOW–2000 (Hill 

and others, 2000).

RVEXAG is a real number that defines the vertical 

exaggeration of the cross section. If the 

graphic representation at the specified vertical 

exaggeration would exceed the allowable space 

on a page, the vertical exaggeration is changed 

to allow the representation to fit on the page, 

and the user is notified of the change by a 

message written to the screen.

Note: when choosing a cross-section location, ensure 

that the line of section avoids areas where the IBOUND array 

(Harbaugh and others, 2000) is zero, which designates inactive 

cells. PRINT_XSECTION does not draw HGUs or model layers where interpolation with inactive cells would be required. 

If an inactive cell is encountered in a cross section, a warning 

message is written to the screen.

The output file will be named “BASENAME_XSEC_

IROW_ICOL_FROW_FCOL.ps”, where IROW, ICOL, 

FROW, and FCOL are replaced by their integer values. BASENAME refers to the base filename specified in the OUTFILE 

command. However, if no OUTFILE command applies, the 

file name will be “XSEC_IROW_ICOL_FROW_FCOL.ps”.

Example

PRINT_XSECTION 11 1 29 57 20 10.0

This command will generate one Postscript formatted 

output file representing a cross section from row and column 

location (11, 1) to (29, 57) with 20 line segments and a vertical 

exaggeration of 10 (fig. 3). 

PRINT_VSECTION command

The PRINT_VSECTION command creates two output 

files. The first file is a Postscript-formatted file containing a 

graphical representation of a one-dimensional vertical section 

at a single horizontal cell location for the entire model thickness, showing the model layers and HGUs side by side (fig. 

4). The second file is a text file listing all available hydraulic 

Figure 2. Excerpt from TEST_L001_HK.dat. Effective hydraulic-conductivity values for the first two rows of layer 1 are 

shown. Zeroes are written where the IBOUND array contains zeroes, indicating inactive cells. The integers in the heading

(1-58) indicate the model column numbers, and integers at the left side (1–2), indicate model row numbers.

 HYDRAULIC CONDUCTIVITY ALONG ROWS FOR LAYER 1

 1 2 3 4 5 6 7 8 9 10

 11 12 13 14 15 16 17 18 19 20

 21 22 23 24 25 26 27 28 29 30

 31 32 33 34 35 36 37 38 39 40

 41 42 43 44 45 46 47 48 49 50

 51 52 53 54 55 56 57 58

 ........................................................................

 1 0.000 0.000 0.000 0.000 27.795 27.294 27.113 27.225 27.610 28.224

 29.006 29.889 30.800 31.670 32.380 32.105 0.000 0.000 0.000 0.000

 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000

 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000

 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000

 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000

 2 0.000 0.000 0.000 28.506 27.646 27.424 27.902 28.760 29.776 30.788

 31.823 32.687 32.985 32.547 31.664 31.798 32.341 33.214 0.000 0.000

 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000

 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000

 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000

 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
Commands 7

Figure 3. Cross-section example graphic. HGUs are represented as filled polygons delimited by fine lines. Model layers are 

identified only by their boundaries, which are symbolized by heavier lines; layer numbers increase from top (layer 1) to bottom 

(layer 3).

Model layer boundary
8 User Guide for HUFPrint

Figure 4. Vertical-section example graphic. Model coordinates XPos and YPos, expressed in the model length unit, are measured from 

the grid origin (the upper left corner of the cell in row 1, column 1); XPos is measured parallel to model rows, and YPos is measured 

parallel to model columns. Elevations, shown on the left and right sides of the vertical section, also are expressed in the model length 

unit.
Commands 9

Figure 5. Excerpts from vertical-section example data output file. CR, Hydraulic conductance between specified cell and

adjacent cell in the row direction; CC, Hydraulic conductance between specified cell and adjacent cell in the column direction;

CV, Hydraulic conductance between specified cell and adjacent cell in the vertical direction. Other abbreviations correspond 

to print flags (table 2).

PRINT/TEST_VSEC_020_029.dat

NAME file for this simulation: test.nam

Parameter Information at Location: Row 20 Col 29

This model has 5 HGU Units, and 3 model layers.

HUF Information

---------------

Unit: HGU1 Unit number: 1

----------------------------------------------------------------------------------

Top 762.14366 

Thickness 280.71550 

Bottom 481.42816 

Parameter Type Value Mult. Array Mult. Value Zone Array Zone #

HK1 HK 40.000000 MULT1 1.5840255 ALL 

Unit: HGU2 Unit number: 2

----------------------------------------------------------------------------------

Top 481.42816 

Thickness 200.00000 

Bottom 281.42816 

Parameter Type Value Mult. Array Mult. Value Zone Array Zone #

HK2 HK 10.000000 MULT1 1.5840255 ALL 

...

LAYER Information

------------------

Layer 1

----------------------------------------------------------------------------------

Top 762.14366 

Thickness 600.00000 

Bottom 162.14366 

Start head 1000.0000 

 HK HANI LVDA

 0.59252764E-01 1.0000000 0.36E+02

 Backward Forward

CR: 21273.772 21175.751 

CC: 21458.125 21435.687 

CV: 2793.6020 
10 User Guide for HUFPrint

information for both the model layers and HGUs for the same 

location. For each HGU, the file lists top and bottom elevation and unit thickness. In addition the file lists the following 

hydraulic information for each HGU: the parameter name, 

type, value, multiplier array, multiplier value, zone array 

name, and zone number. For each model layer, the output file 

tabulates top elevation, thickness, bottom elevation, starting 

head, horizontal hydraulic conductivity, horizontal anisotropy, 

layer variable direction anisotropy (if any), specific storage (if 

a transient solution), and row, column, and vertical conductances to the adjacent model cells. The syntax of the PRINT_

VSECTION command is:

PRINT_VSECTION ROW COL

where:

ROW and COL are integers defining the row and 

column indices, respectively, of the cell 

location where the vertical section is to be 

generated.

The Postscript output file will be named “BASENAME_

VSEC_ROW_COL.ps”, where ROW and COL are replaced 

by their integer values and BASENAME is a string defined by 

an applicable OUTFILE command. The text/data output file 

will be named “BASENAME_VSEC_ROW_COL.dat”. If no 

OUTFILE command applies, the file names will not include 

“BASENAME_”.

Example

PRINT_VSECTION 20 29

This PRINT_VSECTION command will generate two 

output files. One file will be a Postscript formatted file named 

“BASENAME_VSEC_020_029.ps” representing a vertical 

section at row and column location (20, 29) (fig. 4). The other 

file will be a data file named “BASENAME_VSEC_020_029.

dat” containing the hydraulic properties at the same row, column location through the entire thickness of the model (fig. 5).

Print codes

Valid values for PRINT_CODE and corresponding output 

formats are listed in table 1. The output formats are Fortran 

specifications of the form NXw.d, where N is the number of 

data values per line and Xw.d is an edit descriptor. Two forms 

for the edit descriptor are supported: Fw.d and Gw.d. For the 

Fw.d edit descriptor, w is field width reserved for each data 

value and d is the number of digits to the right of the decimal 

point; data values are written without exponents. For the Gw.d 

edit descriptor, w is field width, four characters of which are 

reserved for an exponent, and d is the maximum number of 

digits to be used to represent the fractional part of the value; 

the presence or absence of an exponent depends on the magnitude of the data value. 

Print flags

The hydraulic property for which values are tabulated in 

each output file generated by the PRINT_HGU and PRINT_

LAY commands is controlled by PRINT_FLAG specifications. 

Valid print flags and their meanings for the two commands are 

listed in table 2. Several of the print flags apply to only one of 

the two commands.

The VK print flag is not supported by the PRINT_LAY 

command because the vertical conductance (CV) terms computed by the HUF Package generally cannot be converted to 

equivalent layer-averaged vertical hydraulic-conductivity or 

vertical anisotropy values. The CV terms define the branch 

conductances between vertically adjacent cells. In the HUF 

Package, calculation of CV between two vertically adjacent 

cells uses VK properties of the HGUs in the lower half of a 

given cell and the upper half of the underlying cell. When a 

cell (1) has adjacent cells above and below and (2) overlaps 

multiple HGUs, the HGU-based VK values used to compute 

the CV term between that cell and the overlying cell generally 

will differ from the HGU-based VK values used to compute 

the CV term between that cell and the underlying cell. An 

effective VK could be calculated for the cell’s contribution to 

CV for the connection with the overlying cell, and an effective VK could be calculated for the cell’s contribution to CV 

for the connection with the underlying cell. However, these 

two effective VK values generally will differ even though they 

apply to the same cell. This dilemma prevents calculation of 

a single effective VK for any cell that overlaps HGUs having 

differing VK values. It also means that HUFPrint cannot be 

used to generate equivalent input for the Layer-Property Flow 

(LPF) Package of MODFLOW, because the LPF Package 

uses VK values defined for cells to compute the CV terms. 

However, the CV arrays output by HUFPrint could be used in 

combination with cell dimensions to generate Vcont (vertical 

hydraulic conductivity divided by thickness between cell centers) arrays for the Block-Centered Flow (BCF) Package (Harbaugh and others, 2000), because Vcont applies to the vertical 

connection between cells rather than the cells themselves. 

The SY print flag is not applicable to the PRINT_LAY 

command because the specific yield in effect in a given cell 

at any given time step in the simulation is that defined for the 

HGU in which the calculated head for that cell lies.

The KDEP print flag is not applicable to the PRINT_

LAY command because an effective depth-dependence coefficient for a cell in general cannot be computed where the cell 

contains multiple HGUs.

The LVDA print flag is not applicable to the PRINT_

HGU command because the LVDA capability (Anderman and 

others, 2002) allows definition of variable-direction anisotropy 

only by model layer.

The CV print flag is not applicable to the PRINT_HGU 

command because vertical conductance is calculated only 

between vertically adjacent cells. Unlike the properties corresponding to the other print flags, vertical conductance is 

not an intrinsic material property. Its value depends in part on 
Example HUFPrint output 11

the horizontal and vertical dimensions of the two cells that 

contribute to each value in the array.

Example Command File and Command Line 

Execution

An example command file for HUFPrint is shown in 

figure 6. An example of invoking HUFPrint at an MS–DOS 

command prompt is shown in figure 7. Roffey (2005) provides 

a good introduction to the use of the MS–DOS command 

prompt under the Windows operating system.

Example HUFPrint output

An example MODFLOW data set was prepared to 

demonstrate the use of HUFPrint. In the example data set, the 

model domain was discretized into 39 rows, 58 columns, and 

3 model layers. Five HGUs were defined; from top to bottom 

the units were named HGU1 through HGU5. An arbitrarily 

variable surface ranging from about 632 to about 1,021 ft was 

defined for use as the top of HGU1 and of model layer 1. The 

bottom of model layer 1 was defined to give layer 1 a uniform 

thickness of 600 ft, and model layers 2 and 3 were given uniform bottom elevations of –100 ft and –1,000 ft, respectively. 

The top of unit HGU2 was assigned to another arbitrarily variable surface, ranging from about 165 to about 715 ft. The top 

of unit HGU3 was defined to give unit HGU2 a uniform thickness of 200 ft. The tops of units HGU4 and HGU5 and were 

defined to give each of the units HGU3 and HGU4 a uniform 

thickness of 300 ft. The thickness of unit HGU 5 was defined 

such that the bottom of unit HGU5 conformed to the bottom of 

model layer 3 at –1,000 ft. 

The screen output that would result from running HUFPrint command file “test_commands.txt” (fig. 6) with the 

example model is shown in figure 8. Ten files would be generated (fig. 9).

Figure 6. Example command file for HUFPrint. An introductory “#” sign designates a 

comment in the first line; subsequent lines are HUFPrint commands explained in the text.

Figure 7. Command-line execution of HUFPrint at the MS–DOS 

command prompt.

# Hufprint example command file test_commands.txt

OUTFILE Print/test

PRINT_HGU HGU3 16 HK

PRINT_HGU HGU4 4 ALL

PRINT_LAY 1 16 HK

PRINT_VSECTION 20 29

PRINT_XSECTION 11 1 29 57 20 10.0

C:>hufprint test.nam test_commands.txt
12 User Guide for HUFPrint

Figure 8. Screen output of HUFPrint for the example described in the text.

Figure 9. Files generated by the HUFPrint example 

described in the text.

HUFPrint ver. 1.0.0 7/28/2008

 Using NAME file: test.nam

 Using COMMAND file: test_commands.txt

 1 file of hydraulic data for hydrogeologic units created

 5 files of hydraulic data for hydrogeologic units created

 1 file of hydraulic data for model layers created

 1 vertical section in postscript format created

 1 file of hydraulic data for vertical section created

 1 cross section in postscript format created

 HUFPrint output written to file: hufprint-list.txt

 Normal termination of HUFPrint

TEST_HGU3_HK.dat 

TEST_HGU4_HANI.dat 

TEST_HGU4_HK.dat

TEST_HGU4_HKCC.dat 

TEST_HGU4_KDEP.dat

TEST_HGU4_VANI.dat 

TEST_L001_HK.dat

TEST_VSEC_020_029.ps

TEST_VSEC_020_029.dat 

TEST_XSEC_011_001_029_057.ps
References Cited 13

References Cited

Adobe Systems, Inc., 2008, Adobe Postscript 3: Adobe 

Systems, Inc., http://www.adobe.com/products/postscript/, 

accessed January 9, 2008.

Anderman, E.R., and Hill, M.C., 2000, MODFLOW–2000, 

the U.S. Geological Survey modular ground-water model—

Documentation of the Hydrogeologic-Unit Flow (HUF) 

Package: U.S. Geological Survey Open-File Report 00–342, 

104 p. (available at http://water.usgs.gov/nrp/gwsoftware/

modflow2000/modflow2000.html).

Anderman, E.R., and Hill, M.C., 2003, MODFLOW–2000, 

the U.S. Geological Survey modular ground-water model—

Three additions to the Hydrogeologic-Unit Flow (HUF) 

Package: U.S. Geological Survey Open-File Report 03–347, 

36 p. (available at http://water.usgs.gov/nrp/gwsoftware/

modflow2000/modflow2000.html).

Anderman, E.R., Kipp, K.L., Hill, M.C., Valstar, Johan, 

and Neupauer, R.M., 2002, MODFLOW–2000, the U.S. 

Geological Survey modular ground-water model—Documentation of the model-layer variable-direction horizontal 

anisotropy (LVDA) capability of the Hydrogeologic-Unit 

Flow (HUF) Package: U.S. Geological Survey Open-File 

Report 02–409, 61 p. (available at http://water.usgs.gov/nrp/

gwsoftware/modflow2000/modflow2000.html).

Glunz, Wolfgang, 2007, Pstoedit, http://sourceforge.net/projects/pstoedit/ or http://www.pstoedit.net/pstoedit/, 

accessed January 9, 2008.

Harbaugh, A.W., 2005, MODFLOW-2005, the U.S. Geological Survey modular ground-water model—The Groundwater Flow Process: U.S. Geological Survey Techniques 

and Methods 6–A16, variously paginated (available at 

http://pubs.er.usgs.gov/usgspubs/tm/tm6A16).

Harbaugh, A.W., Banta, E.R., Hill, M.C., and McDonald, 

M.G., 2000, MODFLOW–2000, the U.S. Geological Survey 

modular ground-water model—User guide to modularization concepts and the Ground-Water Flow Process: U.S. 

Geological Survey Open-File Report 00–92, 121 p. (available at http://water.usgs.gov/nrp/gwsoftware/modflow2000/

modflow2000.html).

Hill, M.C., Banta, E.R., Harbaugh, A.W., and Anderman, E.R., 

2000, MODFLOW–2000, the U.S. Geological Survey modular ground-water model—User guide to the Observation, 

Sensitivity, and Parameter-Estimation Processes and three 

post-processing programs: U.S. Geological Survey OpenFile Report 00–184, 209 p. (available at http://water.usgs.

gov/nrp/gwsoftware/modflow2000/modflow2000.html).

Lang, Russell, 2007, GSview, http://pages.cs.wisc.edu/~ghost/

gsview/, accessed June 30, 2008.

Roffey, A.C., 2005, The PC primer on the web, http://www.

primerpc.com/dos/dos.htm, accessed July 28, 2008.

Publishing support provided by: 

Denver Publishing Service Center

For more information concerning this publication, contact:

Director, USGS Colorado Water Science Center

Box 25046, Mail Stop 415

Denver, CO 80225

(303) 236-4882

Or visit the Colorado Water Science Center Web site at: 

http://co.water.usgs.gov/
Banta and Provost—User Guide for HUFPrint—U.S. Geological Survey Techniques and Methods 6-A27

Printed on recycled paper