U.S. Department of the Interior

U.S. Geological Survey

Techniques and Methods 6-A26

NetpathXL—An Excel® Interface to the Program NETPATH
NetpathXL—An Excel® Interface to the 

Program NETPATH

By David L. Parkhurst and Scott R. Charlton

Techniques and Methods 6-A26

U.S. Department of the Interior

U.S. Geological Survey
U.S. Department of the Interior

DIRK KEMPTHORNE, Secretary

U.S. Geological Survey

Mark D. Myers, Director

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

About USGS Products

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:

Parkhurst, D.L., and Charlton, S.R., 2008, NetpathXL—An Excel® interface to the program NETPATH: U.S. Geological 

Survey Techniques and Methods 6-A26, 11 p.

About this Product

For more information concerning this publication, contact:

Chief, Branch of Regional Research, Central Region, WRD

Box 25046

Denver Federal Center

MS 418

Denver, CO 80225-0046

(303) 236-5344

Or visit the Central Region Branch of Regional Research Web site at:

http://wwwbrr.cr.usgs.gov

This publication is available online at:

http://pubs.usgs.gov/tm/tm6a26

Publishing support provided by:

Denver Publishing Service Center, Denver, Colorado

Manuscript approved for publication, January 2008

Edited by Jon W. Raese

Layout by Margo VanAlstine
iii

Contents

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

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

NetpathXL........................................................................................................................................................2

Installing DBXL and NetpathXL ..........................................................................................................3

Using DBXL ...........................................................................................................................................3

Using NetpathXL ..................................................................................................................................3

Summary and Conclusions ..........................................................................................................................6

References Cited............................................................................................................................................6

Appendix 1. NetpathXL Spreadsheet File...............................................................................................8

Appendix 2. Coding methods..................................................................................................................10

Appendix 3. Interfacing with PHREEQC................................................................................................11

Figures

1–5. Screen images showing:

1. Options screen for DBXL....................................................................................................3

2. File browser using DBXL option 3.....................................................................................4

3. Options screen for NetpathXL...........................................................................................4

4. Edit screen for NetpathXL..................................................................................................5

5. Selecting the edit screen from the main screen of NetpathXL ...................................5

Tables

1. Description of cells in a NetpathXL spreadsheet file.............................................................8
Abstract 

NetpathXL is a revised version of NETPATH that runs 

under Windows® operating systems. NETPATH is a computer 

program that uses inverse geochemical modeling techniques 

to calculate net geochemical reactions that can account for 

changes in water composition between initial and final evolutionary waters in hydrologic systems. The inverse models 

also can account for the isotopic composition of waters and 

can be used to estimate radiocarbon ages of dissolved carbon 

in ground water. NETPATH relies on an auxiliary, database 

program, DB, to enter the chemical analyses and to perform 

speciation calculations that define total concentrations of 

elements, charge balance, and redox state of aqueous solutions that are then used in inverse modeling. Instead of DB, 

NetpathXL relies on Microsoft Excel® to enter the chemical analyses. The speciation calculation formerly included 

in DB is implemented within the program NetpathXL. A 

program DBXL can be used to translate files from the old DB 

format (.lon files) to NetpathXL spreadsheets, or to create 

new NetpathXL spreadsheets. Once users have a NetpathXL 

spreadsheet with the proper format, new spreadsheets can 

be generated by copying or saving NetpathXL spreadsheets. 

In addition, DBXL can convert NetpathXL spreadsheets 

to PHREEQC input files. New capabilities in PHREEQC 

(version 2.15) allow solution compositions to be written to 

a .lon file, and inverse models developed in PHREEQC to 

be written as NetpathXL .pat and model files. NetpathXL 

can open NetpathXL spreadsheets, NETPATH-format path 

files (.pat files), and NetpathXL-format path files (.pat files). 

Once the speciation calculations have been performed on a 

spreadsheet file or a .pat file has been opened, the NetpathXL 

calculation engine is identical to the original NETPATH. 

Development of models and viewing results in NetpathXL rely 

on keyboard entry as in NETPATH. 

NetpathXL—An Excel® Interface to the Program NETPATH

By David L. Parkhurst and Scott R. Charlton

Introduction

NETPATH (Plummer and others, 1991, 1994) is an interactive Fortran 77 computer program used to interpret net geochemical mass-balance reactions between initial (or multiple 

initial waters that mix) and final waters along real or hypothetical flow paths in aquifers or other hydrologic systems. 

The program uses inverse geochemical modeling techniques 

(Plummer and others, 1983; Plummer 1985; Parkhurst and 

Plummer, 1993; Glynn and Brown, 1996; Nordstrom, 2007) to 

construct geochemical reaction models by using chemical and 

isotopic data for waters from the hydrochemical system. The 

inverse model is a set of mixing fractions and mole transfers 

that exactly account for the changes in concentration of elements in the waters. Inverse models between selected evolutionary waters are found for every possible combination of 

the plausible phases that can account for the composition of a 

selected set of chemical and isotopic constraints in the system. 

The processes of dissolution, precipitation, ion exchange, 

oxidation/reduction, degradation of organic compounds, 

incongruent reaction, gas exchange, mixing, evaporation, and 

dilution are included. It also is possible to account for changes 

in isotopic compositions of six elements: hydrogen (deuterium 

and tritium) and oxygen isotopic evolution is accounted for by 

mixing of waters (no fractionation or mineral mass transfer); 

carbon (carbon-13 and carbon-14), sulfur, nitrogen, and strontium isotopic evolution is accounted for by mixing, mineral 

mass transfer, isotopic fractionation, and isotopic exchange. 

Finally, the inverse models can be used to adjust radiocarbon 

data for geochemical reaction effects and to refine estimates of 

radiocarbon age. The NETPATH software includes a data-base 

program, DB, for storing and editing chemical and isotopic 

data for use in NETPATH.
2 NetpathXL—An Excel® Interface to the Program NETPATH

NETPATH has been used to investigate geochemical and 

isotopic reactions in a large number of hydrologic systems for 

more than 15 years (see for example: Plummer and others, 

1990; Aravena and others, 1995; Plummer and Sprinkle, 

2001). The modeling concepts in NETPATH can be traced 

to geochemical mass-balance calculations originally demonstrated by Garrels and Mackenzie (1967) and have evolved 

through a series of theoretical (Plummer and Back, 1980; 

Plummer and others, 1983; Plummer, 1992; Glynn and Plummer, 2005; Parkhurst, 1997) and software contributions (Plummer and others, 1975; Parkhurst and others, 1982; Plummer 

and others, 1991, 1992, 1994). 

More recently, inverse geochemical modeling has been 

built into the geochemical model PHREEQC (Parkhurst 

and Appelo, 1999) and its graphical user interface PhreeqcI 

(Charlton and Parkhurst, 2002) and into a spreadsheet 

program, SpreadBal (Bowser and Jones, 2002a, 2002b). 

Advantages and limitations of the NETPATH and PhreeqcI 

inverse modeling capabilities are discussed in Glynn and 

Brown (1996) and Glynn and Plummer (2005). NETPATH, 

PHREEQC (and PhreeqcI), and SpreadBal are all capable 

of performing basic inverse modeling. The strengths of each 

program are as follows: NETPATH allows for isotope fractionation, radiocarbon dating, isotope mole balance, and redox 

processes. PHREEQC considers uncertainties in analytical 

data for elements and isotopes; it considers redox processes 

and isotope mole balance, but not isotope fractionation or 

radiocarbon dating. SpreadBal primarily is designed for aluminosilicate and clay reactions, with special emphasis on the 

variable compositions of these minerals.

The data entry program for NETPATH, DB, requires editing data one piece at a time. DB saves data in two formats: the 

.lon file contains the raw concentration data and the .pat file 

contains selected results from speciation calculations performed by DB (total concentrations of elements, redox state, 

and isotopic compositions). NETPATH reads the .pat file to 

obtain the data needed for inverse modeling. 

Since the original publication of NETPATH, advances in 

computer technology permit replacement of the DB data-entry 

style with the universally familiar spreadsheet. NetpathXL is 

a revised version of NETPATH that can read an Excel spreadsheet that contains the concentration data (Appendix 1). The 

speciation calculation, formerly in the program DB, has been 

moved to the program NetpathXL. Each time NetpathXL 

reads a NetpathXL spreadsheet, speciation calculations are 

performed and a .pat file is written; although the format of a 

.pat file written by NetpathXL differs from one written by DB, 

NetpathXL can read data from a .pat file created by either DB 

or NetpathXL.

DBXL has a feature that allows exporting solution composition data from the NetpathXL spreadsheet to a format that 

can be read by PHREEQC. In addition, capabilities have been 

added to PHREEQC to export solution compositions to DBXL 

(.lon file) and to export inverse models to NetpathXL (.pat and 

model files).

The purpose of this report is to document the programs 

DBXL and NetpathXL. In addition, the report describes new 

features added to PHREEQC that allow solution composition 

data and inverse models to be exported to NetpathXL. The 

report describes how to install and use the DBXL and NetpathXL, the format of the Excel spreadsheet created by DBXL 

and used by NetpathXL, the capability of DBXL to export 

data from a NetpathXL spreadsheet for use in PHREEQC, and 

the capability of PHREEQC to export data and inverse models 

for use in NetpathXL. 

NetpathXL

The NetpathXL spreadsheet has a fixed set of columns and header rows (see Appendix 1, table 1). The program DBXL generates a spreadsheet of the proper format, 

into which concentration and isotopic data can be entered. 

DBXL also can translate a .lon file [written by NETPATH or 

PHREEQC (version 2.15 or later)] to a NetpathXL spreadsheet. Additional NetpathXL spreadsheets can be generated by 

copying old spreadsheets and clearing the concentration data. 

New chemical and isotopic data can be entered cell-by-cell or 

copied and pasted from other spreadsheets or files into NetpathXL spreadsheets. The calculation engine for NetpathXL 

is identical to NETPATH. Although the screen-painting data 

entry for NetpathXL appears identical to NETPATH, new 

routines are used that avoid the need for the ansi.sys device 

required by NETPATH (Appendix 2). 

New capabilities have been added to facilitate the 

interchange of data between PHREEQC and NetpathXL. 

DBXL can read the data from a NetpathXL spreadsheet and 

write a file with all of the solution definitions that is readable 

by PHREEQC (.pqi file). Thus, PHREEQC can be used to 

calculate inverse models or forward models by using data that 

were entered for NetpathXL. In addition, PHREEQC (version 

2.15 and later) can write files that are readable by DBXL and 

NetpathXL. The solution data defined in PHREEQC (SOLUTION, SOLUTION_SPREAD, and SAVE solution) can 

be written to a .lon file by using the -lon_netpath identifier 

in the INVERSE_MODELING data block. This file can be 

read by DBXL and converted into a NetpathXL spreadsheet. 

In addition, PHREEQC inverse models can be saved as .pat

and model files by using the -pat_netpath identifier in the 

INVERSE_MODELING data block. PHREEQC adjusts 

concentrations in the process of finding inverse models. The 

.pat file written by PHREEQC contains these adjusted concentrations for each solution for each model, and each model 

is written to a NetpathXL model file, which can be read by 

NetpathXL. By using these files, NetpathXL can reproduce 

exactly a PHREEQC inverse model. This capability is useful, for example, if inverse model development is done in 

PHREEQC, but radiocarbon-age dating is done with NetpathXL.
NetpathXL 3

Installing DBXL and NetpathXL

DBXL and NetpathXL use Microsoft Excel to store and 

retrieve data. Excel must be accessible on the computer on 

which NetpathXL and DBXL are installed.

The latest versions of the programs can be downloaded 

from the web site http://wwwbrr.cr.usgs.gov/projects/GWC_

coupled/netpath. The file will have the extension .msi, and can 

be installed by using the Windows Installer, which is available 

automatically in Windows XP and higher. As administrator, 

simply double-click on the downloaded .msi file. The programs will be installed in the C:\Program Files directory by 

default. It is possible to install as a nonadministrator if a different directory is selected. Once installed, the programs can 

be run through the Start Menu at the bottom left corner of the 

screen. 

The programs normally are installed in the directory c:\

Program Files\USGS\NetpathXL. Within this directory are 

subdirectories: bin, which contains the executables for NetpathXL and DBXL; database, which contains the database for 

the speciation model, db.dat, and the database of mineral stoichiometries, netpath.dat; doc, which contains PDF versions 

of this report and the documentation for NETPATH (Plummer 

and others, 1994); and examples, which contains the data and 

model files for the examples described in the NETPATH documentation (Plummer and others, 1994). 

Using DBXL 

DBXL can be executed from the Windows start menu at 

the bottom left of the screen or by browsing for the executable file (c:\Program Files\USGS\NetpathXL\bin\dbxl.exe) and 

double-clicking with the mouse. The user may want to add a 

desktop icon by right-clicking on the start-menu item or the 

executable file (Send To->Desktop). When the program starts, 

a screen (fig. 1) appears that has five options: (1) create a NetpathXL spreadsheet from a .lon file that has been written by 

DB, (2) open a NetpathXL spreadsheet (.xls suffix), (3) create 

a new (empty) NetpathXL spreadsheet, (4) create a PHREEQC 

Figure 1. Options screen for DBXL.

input file (.pqi) from a NetpathXL spreadsheet file, or (5) exit 

DBXL. Options are selected by typing 1, 2, 3, 4, or 5 followed 

by enter. Selecting options 1, 2, 3, or 4 will start the standard 

Windows file browser to select the file to be read or to specify 

the name of the new NetpathXL spreadsheet (fig. 2). For 

options 1, 2, and 3, after a file has been selected, an Excel session will be started, and DBXL will close. For option 4, after 

a file has been selected, a PHREEQC .pqi file will be written, 

after which, DBXL will close (Appendix 3). Other functionality of DB, including “Check” charge balance and “Print” data 

reports was not retained in DBXL.

Using NetpathXL 

NetpathXL can be executed from the Windows start 

menu at the bottom left of the screen or by browsing for the 

executable file (c:\Program Files\USGS\NetpathXL\bin\

netpathxl.exe) and double-clicking with the mouse. The user 

may want to add a desktop icon by right-clicking on the 

start-menu item or the executable file (Send To->Desktop). 

When the program starts, a screen (fig. 3) appears that has 

three options: (1) open an existing NetpathXL spreadsheet 

(.xls suffix), (2) open a .pat file created by DB or NetpathXL, 

or (3) quit NetpathXL. Options are selected by typing 1, 2, or 

3 followed by enter. After option 1 or 2 is selected, the standard Windows file browser is used to select a file. After a file 

has been selected, execution will be the same as the program 

NETPATH (except for one additional file-reading option); all 

options and data entry are by keystrokes, and the mouse is not 

functional except to give focus to the NetpathXL window. The 

working directory will be the directory that contains the file 

selected by the file browser.

If a NetpathXL spreadsheet is selected (option 1), a 

speciation calculation will be performed. A database file 

named db.dat is required for this speciation calculation. The 

default database file is found in the database subdirectory of 

the installation directory (c:\Program Files\USGS\NetpathXL\

database\db.dat). 
4 NetpathXL—An Excel® Interface to the Program NETPATH

Figure 3. Options screen for NetpathXL.

Figure 2. File browser using DBXL option 3.
NetpathXL 5

tions by using the same options (charge-balance option and 

database file) that were used when the NetpathXL spreadsheet 

was originally read. (To reread the Excel file, but use different options, select the option “Well file,” which will query for 

each option.) The current inverse model—wells, phases, constraints, and other options—is retained when the NetpathXL 

spreadsheet is reread. By using the reread option, concentration or isotopic data can be revised in the NetpathXL spreadsheet and then quickly imported into NetpathXL. Typically, 

the Excel spreadsheet will be left open and the reread option 

will be used whenever changes are made to the spreadsheet. 

Note that the changes to the spreadsheet must be saved (File-

>Save within Excel) before the spreadsheet is reread. The 

capability to view Excel while running NetpathXL replaces 

the <V>iew option of the main screen of NETPATH.

Figure 4. Edit screen for NetpathXL.

Figure 5. Selecting the edit screen from the main screen of NetpathXL.

Another file, netpath.dat, contains the stoichiometry and 

isotopic composition of minerals, which are needed for inverse 

modeling calculations. NetpathXL will look for this file in 

the working directory (the directory containing the file read 

at startup). If it is not found in the working directory, the file 

will be copied from the database subdirectory of the installation directory (c:\Program Files\USGS\NetpathXL\database\

netpath.dat).

If a NetpathXL spreadsheet is read, one additional option 

is added to the edit screen that was not in the original NETPATH program. The first option of the edit screen is now “1) 

Reread Excel file” (fig. 4), which is not available in NETPATH. (The edit screen is invoked by typing “E” or “e” on the 

main screen of NetpathXL, fig. 5.) This option will reread the 

last NetpathXL spreadsheet and perform speciation calcula-
6 NetpathXL—An Excel® Interface to the Program NETPATH

One additional option (<F>ont) has been added to the 

main screen (fig. 5). Typing “F” at the main-screen prompt 

will result in queries for font height, font brightness, and 

background brightness. The default font size is 16; specifying a smaller or larger number (8 to 24) correspondingly will 

decrease or increase the font size used for painting the screens 

in NetpathXL. The default font brightness is 0.85; decreasing 

or increasing the number (0.3 to 1.0) correspondingly will dim 

or brighten the font. The default background brightness is 0.25 

(midnight blue); a value of 0 will produce a black background, 

and a value of 1.0 will produce a bright blue background.

Summary and Conclusions 

NETPATH is unique in the capabilities it provides for 

geochemical inverse modeling and radiocarbon dating of 

ground waters. NetpathXL is a partial modernization of the 

program NETPATH. NetpathXL simplifies data input by using 

a fixed-format Excel spreadsheet in place of the program 

DB. File browsing, installation, and concentration data input 

have the look and feel of current computer programs. The 

model-development process remains unchanged from that of 

NETPATH and requires keyboard input rather than point and 

click technology. However, keyboard input is efficient and the 

model-development process is simple and straightforward. The 

calculation engine in NetpathXL is identical to NETPATH. 

New capabilities have been added to allow the interchange of data from NetpathXL to PHREEQC and from 

PHREEQC to NetpathXL. DBXL can translate a NetpathXL 

spreadsheet file to PHREEQC format (.pqi). PHREEQC can 

translate solution compositions to a NetpathXL .lon file. In 

addition, each inverse model derived by PHREEQC can be 

written to NetpathXL .pat and model files, which allows the 

PHREEQC inverse model to be reproduced in NetpathXL. 

References Cited

Aravena, R., Wassenaar, L.I., and Plummer, L.N., 1995, Estimating C-14 groundwater ages in a methanogenic aquifer: 

Water Resources Research, v. 31, p. 2307–2317.

Bowser, C.J., and Jones, B.F., 2002a, Mineralogic controls 

on the composition of natural waters dominated by silicate hydro-lysis: American Journal of Science, v. 302, 

p. 582–662.

Bowser, C.J., and Jones, B.F., 2002b, Mineral mass balance documentation for SPREADBAL-2002: accessed 

January 24, 2008, at http://water.usgs.gov/software/

SPREADBAL-2002.

Charlton, S.R., and Parkhurst, D.L., 2002, PhreeqcI—A graphical user interface to the geochemical model PHREEQC: 

U.S. Geological Survey Fact Sheet FS-031-02, 2 p., 

accessed January 24, 2008, at http://pubs.er.usgs.gov/

usgspubs/fs/fs03102.

Garrels, R.M., and Mackenzie, F.T., 1967, Origin of the chemical compositions of some springs and lakes, in Equilibrium 

concepts in natural water systems: American Chemical 

Society, Advances in Chemistry Series, no. 67: Washington, 

D.C., chap. 10, p. 222–242.

Glynn, P.D., and Brown, J.G., 1996, Reactive transport modeling of acidic metal-contaminated ground water at a site with 

sparse spatial information, in Reactive transport in porous 

media—General principles and application to geochemical 

processes, Reviews in Mineralogy, Steefel, C.I., Lichtner, 

P., and Oelkers, E., eds.: Mineralogical Society of America, 

v. 34, chap. 9, p. 377–438.

Glynn, P.D., and Plummer, L.N., 2005, Geochemistry and 

the understanding of ground-water systems: Hydrogeology 

Journal, v. 13, p. 263–287.

Nordstrom, D.K., 2007, Modeling low-temperature geochemical processes, in Drever, J.I., ed., Treatise on Geochemistry,

Volume 5—Surface and ground water, weathering and soils: 

Elsevier, p. 1–38.

Parkhurst, D.L., 1997, Geochemical mole-balance modeling 

with uncertain data: Water Resources Research, v. 33, no. 8, 

p. 1957–1970.

Parkhurst, D. L., and Appelo, C.A.J, 1999, User’s guide to 

PHREEQC (Version 2) —A computer program for speciation, batch-reaction, one-dimensional transport, and inverse 

geochemical calculations: U.S. Geological Survey WaterResources Investigations Report 99-4259, 312 p.

Parkhurst, D.L., and Plummer, L.N., 1993, Geochemical models, in Alley, W.M., ed., Regional Ground-Water Quality: 

Van Nostrand Reinhold, chap. 9, p. 199–225.

Parkhurst, D.L., Plummer, L.N., and Thorstenson, D.C., 

1982, BALANCE, A computer program for calculating 

mass transfer for geochemical reactions in ground water: 

U.S. Geological Survey Water-Resources Investigations 

Report 82-14, 29 p.

Plummer, L.N., 1985, Geochemical modeling—A comparison 

of forward and inverse methods, in Hitchon, B., and Wallick, E.I., eds., Canadian/American Conference on Hydrogeology, 1st, Banff, Alberta, June 1984, Proceedings: National 

Water Well Assocociation, p. 149–177.
References Cited 7

Plummer, L.N., 1992, Geochemical modeling— Past, present, future, in Kharaka, Y., and Maest, A.S., eds., International Symposium on Water-rock Interaction, 7th, Park City, 

Utah, July 9–23, 1992, Proceedings: Rotterdam, Balkema, 

p. 23–33.

Plummer, L.N., and Back, William, 1980, The mass balance 

approach—Application to interpreting the chemical evolution of hydrologic systems: American Journal of Science, 

v. 280, p. 30–142.

Plummer, L.N., Busby, J.F., Lee, R.W., and Hanshaw, B.B., 

1990, Geochemical modeling of the Madison aquifer in 

parts of Montana, Wyoming, and South Dakota: Water 

Resources Research, v. 26, no. 9, p. 1981–2014.

Plummer, L.N., Parkhurst, D.L., and Kosiur, D.R., 1975, MIX2: 

A computer program for modeling chemical reactions in natural waters: U.S. Geological Survey Water-Resources Investigations Report 75-61, 68 p., accessed January 24, 2008, at 

http://pubs.er.usgs.gov/usgspubs/wri/wri7561.

Plummer, L.N., Parkhurst, D.L., and Thorstenson, D.C., 1983, 

Development of reaction models for ground-water systems: 

Geochimica et Cosmochimica Acta, v. 47, p. 665–686.

Plummer, L.N., Prestemon, E.C., and Parkhurst, D.L., 1991, 

An interactive code (NETPATH) for modeling NET 

geochemical reactions along a flow PATH: U.S. Geological Survey Water-Resources Investigations Report 91-4078, 

227 p., accessed January 24, 2008, at http://pubs.er.usgs.

gov/usgspubs/wri/wri914078.

Plummer, L.N., Prestemon, E.C., and Parkhurst, D.L., 1992, 

NETPATH: An interactive code for interpreting NET geochemical reactions from chemical and isotopic data along a 

flow PATH, in Kharaka, Y., and Maest, A.S., eds., International Symposium on Water-rock Interaction, 7th, Park City, 

Utah, July 9–23, 1992, Proceedings: Rotterdam, Balkema, 

p. 239–242.

Plummer, L.N., Prestemon, E.C., and Parkhurst, D.L., 1994, 

An interactive code (NETPATH) for modeling NET 

geochemical reactions along a flow PATH, version 2.0: 

U.S. Geological Survey Water-Resources Investigations 

Report 94-4169, 130 p., accessed January 24, 2008, at 

http://pubs.er.usgs.gov/usgspubs/wri/wri944169.

Plummer, L.N., and Sprinkle, C.L., 2001, Radiocarbon dating 

of dissolved inorganic carbon in groundwater from confined 

parts of the Upper Floridan aquifer, Florida, USA: Hydrogeology Journal, v. 9, p. 127–150.
8 NetpathXL—An Excel® Interface to the Program NETPATH

Cell 

number Required heading

Default gram 

formula 

weight in db.dat

grams per mole

Meaning of data values Footnote

A7 Number Well identification number

B7 Well name (required) Well identifier (character string)

C7 Units Flag Options for concentration units 1

D7 Eh Flag Options for interpretation of Eh 2

E7 Alk/TDIC Flag Flag for interpretation of carbon data 3

F7 Act Coef Flag Flag for activity coefficient selection 4

G7 Temp Temperature, Celsius

H7 pH pH, standard units

I7 Eh Eh, in volts

J7 Ca 40.08 Calcium concentration

K7 Mg 24.312 Magnesium concentration

L7 Na 22.9898 Sodium concentration

M7 K 39.102 Potassium concentration

N7 Cl 35.453 Chloride concentration

O7 SO4 as SO4 96.0616 Sulfate concentration

P7 Alk/TDIC 61.0173 or 50.04289 Alkalinity or total dissolved inorganic carbon concentration 5

Q7 Fe 55.847 Iron concentration

R7 Mn 54.938 Manganese concentration

S7 Al 26.9815 Aluminum concentration

T7 F 18.9984 Fluoride concentration

U7 Si as SiO2 60.0848 Silica concentration

V7 Br 79.904 Bromide concentration

Table 1. Description of cells in a NetpathXL spreadsheet file.

NetpathXL requires an Excel file with a specified format. 

Cell A1 must contain the string “Netpath Spreadsheet 2.14.” 

Cells A7–AU7 must contain the literal headings specified in 

table 1. In files generated by DBXL, the cells A1–AU7 are 

locked so that they cannot be edited. The maximum number of 

analyses is limited to 400, compared to the limit of 50 in DB 

and NETPATH. Only rows 8 through 407 may contain analyses. Rows of analyses need not be contiguous; a nonempty 

well name is required in column 2 for a row to be considered a 

valid chemical analysis.

If data for an analysis are given in milligrams per liter 

(mg/L) or parts per million (ppm), then a gram formula weight 

is used to convert from mass to moles. The default gram 

formula weights for analytes are given in column 3 of table 1, 

and, for the case of alkalinity, in footnote 5 of table 1. These 

gram formula weights are specified in the file db.dat. The 

conversion factor from equivalents of CaCO3 to equivalents of 

HCO3 (1.2193) is hard coded in the source for NetpathXL.

Appendix 1 NetpathXL Spreadsheet File
Appendix 1. NetpathXL Spreadsheet File 9

W7 B 10.81 Boron concentration

X7 Ba 137.34 Barium concentration

Y7 Li 6.939 Lithium concentration

Z7 Sr 87.62 Strontium concentration

AA7 NO3 as N 14.0067 Nitrate concentration

AB 7 NH4 as N 14.0067 Ammonium concentration

AC7 P 30.9738 Phosphorus concentration

AD7 O2(aq) as O2 31.9988 Dissolved oxygen concentration

AE7 H2S(aq) as S 32.06 Dissolved sulfide concentration

AF7 N2(aq) as N 14.0067 Dissolved nitrogen concentration

AG7 CH4(aq) as CH4 16.0428 Dissolved methane concentration

AH7 DOC as C 12.011 Dissolved organic carbon concentration

AI7 RS of DOC Redox state of dissolved organic carbon

AJ7 C-13 TDIC Carbon-13 ratio, permil

AK7 C-14 TDIC Carbon-14 concentration, percent modern carbon

AL7 S-34 SO4 Sulfur-34 ratio of sulfate, permil

AM7 S-34 H2S Sulfur-34 ratio of sulfide, permil

AN7 H-2 Hydrogen-2 ratio, permil

AO7 H-3 Tritium concentration, tritium units

AP7 O-18 Oxygen-18 ratio, permil

AQ7 Sr-87 Strontium-87 ratio

AR7 N-15 N2(aq) Nitrogen-15 ratio of dissolved nitrogen, permil

AS7 N-15 NO3 Nitrogen-15 ratio of nitrate, permil

AT7 N-15 NH4 Nitrogen-15 ratio of ammonium, permil

Au7 Density Density, grams per centimeter cubed

1

Options for concentration units: 0 millimole per liter; 1 milliequivalent per liter; 2 milligrams per liter; 3 parts per million; and 4 millimoles per kilogram 

water.

2

Options for calculating the Eh used to speciate redox elements (Fe and Mn): 0 redox is ignored; 1 specified Eh is used; 2 dissolved oxygen is used to 

calculate Eh; 3 the Sato relation is used to calculate Eh from dissolved oxygen concentration; and 4 sulfate and sulfide concentrations are used to calculate Eh.

3

Optionsfor alkalinity and total dissolved inorganic carbon (Alk/TDIC) data: 0 field alkalinity is entered as HCO3; 1 carbonate alkalinity (exclusive of all 

other alkalinity species) is entered as HCO3; 2 total dissolved inorganic carbon (TDIC) is entered as HCO3; and 3 field alkalinity is entered as CaCO3. Note that 

the gram equivalent weights for the formulas HCO3 and CaCO3 are needed only for converting mass concentration units—mg/L (milligrams per liter) and ppm 

(parts per million)—to moles or equivalents per kilogram water. 

4

Options for activity coefficients: 0 use the extended Debye-Hückel formula; and 1 use the Davies formula.

5 Gram formula or equivalent weights for carbon and alkalinity: for TDIC, the gram formula weight used to convert milligrams per liter and parts per million 

to moles per killogram water is 61.0173; for alkalinity, the gram equivalent weights used to convert milligrams per liter and parts per million to equivalents per 

kilogram of water are 61.0173 for HCO3 and 50.04289 for CaCO3. 

Cell 

number Required heading

Default gram formula 

weight in db.dat 

grams per mole

Meaning of data values Footnote

Table 1. Description of cells in a NetpathXL spreadsheet file.—Continued
10 NetpathXL—An Excel® Interface to the Program NETPATH

NetpathXL is written in FORTRAN 90 and compiled 

with Intel® FORTRAN compiler within the Microsoft Visual 

Studio® 8.0 programming environment. Originally, NetpathXL 

and DBXL were written to eliminate the method of screen 

painting that is used in NETPATH. NETPATH relies on a 

terminal mode described by ansi.sys, which is increasingly 

difficult to implement in recent Windows® operating systems. 

NetpathXL replaces the routines that cleared the screen and 

moved the cursor position (clpart, moverelative, cls, home, 

poscur) with new routines that use subroutines available for 

Intel FORTRAN QuickWin Applications, thereby eliminating 

the use of ansi.sys.

With the use of Intel FORTRAN, it also was possible to 

implement file browsing with standard Windows system calls, 

which gives NetpathXL and DBXL more of the look and feel 

of current (2008) programming and simplifies the application 

of these programs in multiple directories. 

Finally, the Excel Component Object Module (COM) 

interface was accessible through Intel FORTRAN, and it 

was possible to replace the functions of DB with Excel. A 

fixed format spreadsheet was devised for entering the data 

that were formerly entered through DB. Data entry is much 

simpler through a spreadsheet, and spreadsheet manipulations are familiar to most users. The use of Excel obviates 

the need for DB although DBXL is used to generate the fixed 

format spreadsheet and to translate solution data written by 

PHREEQC. 

Appendix 2. Coding methods
Appendix 3. Interfacing with PHREEQC 11

DBXL can be used to translate analytical data from a 

NetpathXL spreadsheet (.xls) into a PHREEQC input file 

(.pqi). Translation is invoked by the fourth option of the 

options screen for DBXL [“(4) Create PHREEQC input file 

(.pqi) from NetpathXL file.”]. The root name of the .xls file 

is the file name, less the .xls extension. The new PHREEQC 

input file will be named with the root name plus a .pqi extension and will be located in the same directory in which the 

.xls file resides. The PHREEQC file will be a single SOLUTION_SPREAD data block with a row for each analysis in 

the NetpathXL spreadsheet. 

PHREEQC and PhreeqcI versions 2.15 have new capabilities to translate data and inverse models from PHREEQC 

formats to NetpathXL formats. The “-lon_netpath root” 

identifier of the INVERSE_MODELING data block will 

write a file named root.lon (DBXL .lon format) that contains 

an entry for each solution composition that has been defined 

previous to the INVERSE_MODELING data block in the 

PHREEQC input file, including solutions defined by SOLUTION, SOLUTION_SPREAD, and SAVE. The units of the 

analyses in the .lon file will be millimoles per kilogram water, 

which may differ from the units by which the solution data 

were originally defined in PHREEQC. The .lon file can be 

converted to a NetpathXL spreadsheet with DBXL. 

The “-pat_netpath root” identifier of the INVERSE_

MODELING data block will write a NetpathXL .pat file 

and multiple NetpathXL model files, one model file for 

each model found by PHREEQC inverse modeling. Because 

PHREEQC adjusts concentrations of solutions as part of the 

inverse-modeling calculation, the adjusted concentrations of a 

solution may be slightly different for each model that includes 

that solution. Model-specific solution compositions are written 

to the .pat file for each inverse model. These adjusted solutions combined with the constraints and reactive phases saved 

in the model file can be used in NetpathXL to reproduce the 

PHREEQC model. The solutions in the .pat file are identified 

by model number at the beginning of the solution description 

(Well name). The model number corresponds with the name 

of the associated model file (root-n.mod, where n is the model 

number).

PHREEQC can produce models with fewer phases than 

constraints, whereas NetpathXL requires an equal number 

of phases and constraints for each model. Be sure to have 

at least as many phases as constraints when running NetpathXL; it may be necessary to include additional phases 

in the NetpathXL model definition to be able to reproduce 

the PHREEQC model. However, the mole transfers of the 

additional phases in the NetpathXL model (compared to the 

PHREEQC model) should be near zero for at least one model 

found by NetpathXL (roundoff errors may lead to slightly 

nonzero mole transfers for the added phases). In addition, the 

definitions of the model file may not be complete for isotope 

calculations. Any definitions missing from the model that is 

read by NetpathXL will have to be added through the NetpathXL data-entry screens.

Appendix 3. Interfacing with PHREEQC
Parkhurst, D.L., and Charlton, S.R.—NetpathXL—An Excel® Interface to the Program NETPATH—Techniques and Methods 6-A26