U.S. Department of the Interior

U.S. Geological Survey

Open-File Report 2007–1088

A Monthly Water-Balance Model Driven By a Graphical User 

Interface

A Monthly Water-Balance Model Driven By 

a Graphical User Interface

By Gregory J. McCabe and Steven L. Markstrom

Open-File Report 2007–1088

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: 2007

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:

McCabe, G.J., and Markstrom, S.L., 2007, A monthly water-balance model driven by a graphical user interface: U.S. 

Geological Survey Open-File report 2007-1088, 6 p.
iii

Contents

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

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

The Water-Balance Model...........................................................................................................................1

Snow Accumulation .............................................................................................................................1

Direct Runoff..........................................................................................................................................2

Snow Melt..............................................................................................................................................2

Evapotranspiration and Soil-Moisture Storage...............................................................................2

Runoff Generation.................................................................................................................................3

Running the Water-Balance Program........................................................................................................3

Input Parameters ..................................................................................................................................3

Data Files................................................................................................................................................3

Summary..........................................................................................................................................................6

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

Figures

1. Diagram of the water-balance model .......................................................................................2

2. Screen image of the water-balance model graphical user interface .................................4

3. Screen image of example output from the water-balance model........................................5

4. Screen image of example time series plotted by the water-balance model......................5

Conversion Factors

Inches (in) are converted to millimeters (mm) by multiplying by 25.4.

Millimeters (mm) are converted to inches (in) by dividing by 25.4.

Temperature in degrees Celsius (°C) may be converted to degrees Fahrenheit (°F) as follows:

 °F=(1.8×°C)+32

Temperature in degrees Fahrenheit (°F) may be converted to degrees Celsius (°C) as follows:

 °C=(°F–32)/1.8

Abstract

This report describes a monthly water-balance model 

driven by a graphical user interface, referred to as the Thornthwaite monthly water-balance program. Computations of 

monthly water-balance components of the hydrologic cycle 

are made for a specified location. The program can be used as 

a research tool, an assessment tool, and a tool for classroom 

instruction.

Introduction

Monthly water-balance models have been used as a 

means to examine the various components of the hydrologic 

cycle (for example, precipitation, evapotranspiration, and runoff). Such models have been used to estimate the global water 

balance (Mather, 1969; Legates and Mather, 1992; Legates and 

McCabe, 2005); to develop climate classifications (Thornthwaite, 1948); to estimate soil-moisture storage (Alley, 1984; 

Mintz and Serafini, 1992), runoff (Alley, 1984, 1985; Yates, 

1996; Wolock and McCabe, 1999), and irrigation demand 

(McCabe and Wolock, 1992); and to evaluate the hydrologic 

effects of climate change (McCabe and Ayers, 1989; Yates, 

1996; Strzepek and Yates, 1997; Wolock and McCabe, 1999). 

This report provides a description of a monthly water-balance model that is driven by a graphical user interface (GUI) 

developed by the U.S. Geological Survey. The GUI permits 

the user to easily modify water-balance parameters and 

provide useful estimates of water-balance components for a 

specified location. The model, referred to as the Thornthwaite 

water-balance program, can be used as a research tool, an 

assessment tool, and as a tool for classroom instruction. The 

program can be downloaded from the internet at http://water.

usgs.gov/lookup/get?crresearch/mms/thorn and can run on any 

platform.

The Water-Balance Model

The water-balance model (fig. 1) analyses the allocation of water among various components of the hydrologic 

system using a monthly accounting procedure based on the 

A Monthly Water-Balance Model Driven By A Graphical 

User Interface

By Gregory J. McCabe and Steven L. Markstrom

methodology originally presented by Thornthwaite (Thornthwaite, 1948; Mather, 1978, 1979; McCabe and Wolock, 1999; 

Wolock and McCabe, 1999). Inputs to the model are mean 

monthly temperature (T, in degrees Celsius), monthly total 

precipitation (P, in millimeters), and the latitude (in decimal 

degrees) of the location of interest. The latitude of the location 

is used for the computation of day length, which is needed for 

the computation of potential evapotranspiration (PET). The 

model is referred to as the Thornthwaite model. A discussion 

of the individual components of the water balance follows.

Snow Accumulation

The first computation of the water-balance model is the 

estimation of the amount of monthly precipitation (P) that is 

rain (Prain) or snow (Psnow), in millimeters. When mean monthly 

temperature (T) is below a specified threshold (Tsnow), all 

precipitation is considered to be snow. If temperature is greater 

than an additional threshold (Train), then all precipitation is 

considered to be rain. Within the range defined by Tsnow and 

Train, the amount of precipitation that is snow decreases linearly 

from 100 percent to 0 percent of total precipitation. This relation is expressed as: 

 

 (1)

Prain then is computed as:

 (2)

Based on an analysis of water-balance results for a 

number of sites, a useful value for Train is 3.3°C (McCabe 

and Wolock, 1999). Useful values for Tsnow appear to vary by 

elevation. For elevations below 1,000 m, Tsnow = -10°C seems 

to work best, and for locations above 1,000 m Tsnow = -1°C 

is more appropriate. (These values were determined from 

previous model calibrations during testing and evaluation 

for streamflow-gage sites in the conterminous United States. 

(David Wolock, U.S. Geological Survey, Lawrence, Kans., 

personal commun).)

Psnow accumulates as snow storage (snostor).

Psnow = P × 

Train – T

Train – Tsnow .

Prain = P – Psnow .
Direct Runoff

Direct runoff (DRO) is runoff, in millimeters, from 

impervious surfaces or runoff resulting from infiltration-excess 

overflow.

The fraction (drofrac) of Prain that becomes DRO is specified; based on previous water-balance analyses, 5 percent is a 

typical value to use (Wolock and McCabe, 1999). The expression for DRO is:

 (3)

Direct runoff (DRO) is subtracted from Prain to compute 

the amount of remaining precipitation (Premain):

 

 (4)

Snow Melt

The fraction of snostor that melts in a month (snow melt 

fraction, SMF) is computed from mean monthly temperature 

(T) and a maximum melt rate (meltmax); meltmax is often 

set to 0.5 (McCabe and Wolock, 1999; Wolock and McCabe, 

1999). The fraction of snow storage that melts in a month is 

computed as: 

 (5)

If the computed SMF is greater than meltmax, then 

SMF is set to meltmax. The amount of snow that is melted 

in a month (SM), in millimeters of snow water equivalent, is 

computed as:

 (6)

SM is added to Premain to compute the total liquid water input 

(Ptotal) to the soil.

Evapotranspiration and Soil-Moisture Storage

Actual evapotranspiration (AET) is derived from potential 

evapotranspiration (PET), Ptotal, soil-moisture storage (ST), 

Figure 1. Diagram of the water-balance model.

DRO = Prain × drofrac

Premain = Prain – DRO .

SMF = 

T – Tsnow

Train – Tsnow

 meltmax

SM = snostor × SMF .

2 A Monthly Water-Balance Model Driven By a Graphical User Interface
and soil-moisture storage withdrawal (STW). Monthly PET is 

estimated from mean monthly temperature (T) and is defined 

as the water loss from a large, homogeneous, vegetation-covered area that never lacks water (Thornthwaite, 1948; Mather, 

1978). Thus, PET represents the climatic demand for water 

relative to the available energy. In this water balance, PET is 

calculated by using the Hamon equation (Hamon, 1961):

 (7)

where PETHamon is PET in millimeters per month, d is the 

number of days in a month, D is the mean monthly hours of 

daylight in units of 12 hrs, and Wt is a saturated water vapor 

density term, in grams per cubic meter, calculated by:

 

 (8)

where T is the mean monthly temperature in degrees Celsius 

(Hamon, 1961).

When Ptotal for a month is less then PET, then AET is 

equal to Ptotal plus the amount of soil moisture that can be 

withdrawn from storage in the soil. Soil-moisture storage 

withdrawal linearly decreases with decreasing ST such that as 

the soil becomes drier, water becomes more difficult to remove 

from the soil and less is available for AET. 

STW is computed as follows:

 (9)

where STi-1 is the soil-moisture storage for the previous month 

and STC is the soil-moisture storage capacity. An STC of 150 

mm works for most locations (McCabe and Wolock, 1999; 

Wolock and McCabe, 1999).

If the sum of Ptotal and STW is less than PET, then a water 

deficit is calculated as PET–AET. If Ptotal exceeds PET, then 

AET is equal to PET and the water in excess of PET replenishes ST. When ST is greater than STC, the excess water 

becomes surplus (S) and is eventually available for runoff. 

Runoff Generation

Runoff (RO) is generated from the surplus, S, at a specified rate (rfactor). An rfactor value of 0.5 is commonly used 

(Wolock and McCabe, 1999). The rfactor parameter determines the fraction of surplus that becomes runoff in a month. 

The remaining surplus is carried over to the following month 

to compute total S for that month. Direct runoff (DRO), in millimeters, is added directly to the runoff generated from surplus 

(RO) to compute total monthly runoff (ROtotal), in millimeters.

Running the Water-Balance Program

The window for the Thornthwaite monthly water-balance 

program will behave like any other window on the desktop. 

Resize, iconify, or close it like any other application by dragging the borders and clicking on the window controllers in the 

upper corners of the frame. Figure 2 is a screen image of the 

program’s graphical user interface.

Input Parameters

The water-balance model has seven input parameters 

(runoff factor, direct runoff factor, soil-moisture storage capacity, latitude of location, rain temperature threshold, snow temperature threshold, and maximum snow-melt rate of the snow 

storage) that are modified through the graphical user interface 

(fig. 2). The range and default values for these parameters are 

set by the model. These values are changed by clicking on the 

corresponding slider bar and dragging the value. The system 

will not allow invalid values to be entered.

Data Files

The model requires a simple input data file. To select the 

input file, click on the button corresponding to the file (“Input 

file”) and a file browser will appear. The input file must be a 

file on the user’s local file system that contains monthly waterbalance input data. A sample data file (input.file) is provided 

with the model and is located in the USGS_Thornthwaite 

installation folder. The data file must be organized into four 

columns with one or more space characters between the columns. The first column is the year, the second is the numeric 

month of the year, the third is mean monthly temperature in 

degrees Celsius, and the last is monthly total precipitation in 

millimeters. 

When the model runs, tabular output is written to a popup 

window (fig. 3). The columns of the output are date, PET, P, 

P–PET, soil-moisture storage, AET, PET–AET (also known 

as moisture deficit), snow storage, surplus, and ROtotal. The 

contents of this window can be saved to a file by clicking on 

the Save button at the bottom of the window and specifying 

the name (and directory) of an output file in the file browser.

At the bottom of the main program window (fig. 2), the 

user can select the specific variables to be plotted by clicking 

on the corresponding circle. After the model runs, a window 

will open with the plotted time series (fig. 4). The model can 

be run any number of times, each time selecting a different set 

of variables to plot.

PETHamon = 13.97 × d × D2 × Wt ,

Wt = 4.95 × e0.062×T

100

STW = STi-1 – abs(Ptotal – PET) × 

STi-1

STC ( (,

Running the Water-Balance Program 3
Figure 2. Screen image of the water-balance model graphical user interface.

4 A Monthly Water-Balance Model Driven By a Graphical User Interface
Figure 3. Screen image of example output from the water-balance model.

Figure 4. Screen image of example time series plotted by the water-balance model.

Running the Water-Balance Program 5
Summary

Monthly water-balance models have been used to examine the various components of the hydrologic cycle (for example, precipitation, evapotranspiration, and runoff). This report 

presents a description of a monthly water-balance model, the 

Thornthwaite monthly water-balance program, which includes 

computations of monthly water-balance components for a 

specified location driven by a graphical user interface. The 

program can be downloaded from the internet and run on any 

computer platform. The program can be used for research, 

assessment purposes, and classroom instruction.

References Cited

Alley, W.M., 1984, On the treatment of evapotranspiration, 

soil moisture accounting, and aquifer recharge in monthly 

water balance models: Water Resources Research, v. 20, 

p. 1,137–1,149.

Alley, W.M., 1985, Water balance models in one-month-ahead 

streamflow forecasting: Water Resources Research, v. 21, 

p. 597–606.

Hamon, W.R., 1961, Estimating potential evapotranspiration: 

Journal of the Hydraulics Division, Proceedings of the 

American Society of Civil Engineers, v. 87, p. 107–120.

Legates, D.R., and Mather, J.R., 1992, An evaluation of the 

average annual global water balance: Geographical Review, 

v. 82, p. 253–267.

Legates, D.R., and McCabe, G.J., 2005, A re-evaluation of the 

average annual global water balance: Physical Geography, 

v. 26, p. 467–479.

Mather, J.R., 1969, The average annual water balance of the 

world, in Symposium on Water Balance in North America, 

Series No. 7, Proceedings: Banff, Alberta, Canada, American Water Resources Association, p. 29–40.

Mather, J.R., 1978, The climatic water balance in environmental analysis: Lexington, Mass., D.C. Heath and Company, 

239 p.

Mather, J.R., 1979, Use of the climatic water budget to estimate streamflow, in Mather, J.R., ed., Use of the climatic 

water budget in selected environmental water problems: 

Elmer, N.J., C.W. Thornthwaite Associates, Laboratory of 

Climatology, Publications in Climatology, v. 32, no. 1, 

p. 1–52.

McCabe, G.J., and Ayers, M.A., 1989, Hydrologic effects 

of climate change in the Delaware River basin: Water 

Resources Bulletin, v. 25, p. 1,231–1,242.

McCabe, G.J., and Wolock, D.M., 1992, Sensitivity of irrigation demand in a humid-temperate region to hypothetical 

climatic change: Water Resources Bulletin, v. 28, 

p. 535–543.

McCabe, G.J., and Wolock, D.M., 1999, Future snowpack 

conditions in the western United States derived from general circulation model climate simulations: Journal of the 

American Water Resources Association, v. 35, 

p. 1,473–1,484.

Mintz, Y., and Serafini, Y.A., 1992, A global monthly climatology of soil moisture and water balance: Climate Dynamics, v. 8, p. 13–27.

Strzepek, K.M., and Yates, D.N., 1997, Climate change 

impacts on the hydrologic resources of Europe––A simplified continental scale analysis: Climatic Change, v. 36, 

p. 79–92.

Thornthwaite, C.W., 1948, An approach toward a rational classification of climate: Geographical Review, v. 38, p. 55–94.

Wolock, D.M., and McCabe, G.J., 1999, Effects of potential climatic change on annual runoff in the conterminous 

United States: Journal of the American Water Resources 

Association, v. 35, p. 1,341–1,350.

Yates, D.N., 1996, WatBal––An integrated water-balance 

model for climate impact assessment of river basin runoff: 

International Journal of Water Resources Development, 

v. 12, p. 121–140.

6 A Monthly Water-Balance Model Driven By a Graphical User Interface