Downsizer—A Graphical User Interface-Based 

Application for Browsing, Acquiring, and Formatting 

Time-Series Data for Hydrologic Modeling

By Christian Ward-Garrison, Steven L. Markstrom, and Lauren E. Hay

Open-File Report 2009–1166

U.S. Department of the Interior

U.S. Geological Survey
ii

U.S. Department of the Interior

KEN SALAZAR, Secretary

U.S. Geological Survey

Suzette M. Kimball, Acting Director

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

For product and ordering information:

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

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

Suggested citation:

Ward-Garrison, C., Markstrom, S.L., and Hay, L.E., 2009, Downsizer—A graphical user 

interface-based application for browsing, acquiring, and formatting time-series data for 

hydrologic modeling: U.S. Geological Survey Open-File Report 2009-1166, 27 p.

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 material contained within this 

report.
iii

Contents

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

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

Software Design.....................................................................................................................................2

Purpose and Scope................................................................................................................................3

Installation Instructions..............................................................................................................................4

Hardware Requirements ........................................................................................................................4

Software Requirements..........................................................................................................................4

Downsizer Execution..............................................................................................................................4

Description of Graphical User Interface.....................................................................................................5

Period Frame .........................................................................................................................................7

Output File Frame ..................................................................................................................................8

Station Addition Frame...........................................................................................................................9

Station Review Frame..........................................................................................................................10

Units Frame .........................................................................................................................................12

Quality Control Frame..........................................................................................................................12

Run Frame...........................................................................................................................................16

World Wind Frame ...............................................................................................................................17

Output Files.............................................................................................................................................23

XYZ File Format...................................................................................................................................23

Quality Assurance Report ....................................................................................................................24

Troubleshooting ......................................................................................................................................25

References Cited.................................................................................................................................... 26

Figures

1. Conceptual diagram showing the relations between the Downsizer client, server, and external

data sources.........................................................................................................................................3

2. Screen image of the Downsizer Client frame upon startup showing (1) the desktop area,

(2) the toolbar, and (3) the menu bar ....................................................................................................5

3. Screen image of the Downsizer Client frame after the user has (1) moved and restored child

frames and (2) undocked and reoriented the toolbar. The menu bar (3) indicates that a new

version of the client is available ............................................................................................................7

4. Screen image of the Period frame which allows the user to (1) select the Period of Record 

(POR) start date, (2) select the POR end date, and (3) view the overall period for which data

are available .........................................................................................................................................8

5. Screen image of the Output File frame which allows the user to select the (1) format, (2) path,

and (3) description of the file in which the data will be written ...............................................................8

6. Screen image of the Station Addition frame which allows the user to build a set of climate and

stream-gage stations from which to pull data by using one of three options: (1) specifying stations

that lie within a geographical boundary, (2) reading a list of stations from a file, and (3) typing

station identifiers (IDs) manually...........................................................................................................9

7. Screen image of the Station Review frame which allows the user to (1) select climate stations,

(2) remove selected climate stations, (3) remove all climate stations, (4) select stream-gage

stations, (5) remove selected stream-gage stations, and (6) remove all stream-gage stations............11

8. Screen image of the Units frame which allows the user to specify (1) the temperature unit and

(2) the precipitation unit of the retrieved data......................................................................................12
iv

 9. Screen image of the Quality Control frame that allows the user to check and adjust retrieved

data by (1) shifting daily temperatures, (2) processing measurement flags, (3) processing

quality flags, (4) discarding absurd values, and (5) discarding extreme values. Extreme value

ranges can be specified for (6) maximum daily temperature, (7) minimum daily temperature,

and (8) daily precipitation...................................................................................................................13

10. Screen image of the Run frame which allows the user to (1) view the status of the data

retrieval, (2) view the overall progress, (3) run the retrieval, and (4) cancel the retrieval....................17

11. Screen image of the World Wind frame which allows the user to (1) view an animated globe

for visualization of information on the surface of the Earth, (2) reference the view by world map,

(3) reference the view by compass, (4) reference the view by map scale, and (5) reference the

view by geographic coordinates.........................................................................................................18

12. Screen image showing the World Wind globe with the camera repositioned to an altitude of 4 km....20

13. Screen image showing the World Wind globe with the positions of climate and stream-gage

locations represented as smiley-face icons........................................................................................21

14. The XYZ file format ...........................................................................................................................23

15. The quality assurance report .............................................................................................................25

Tables

1. Measurement flags used by Downsizer for data collected by the National Oceanic and

Atmospheric Administration Cooperative Observer Program .............................................................14

2. Quality flags used by Downsizer for data collected by the National Oceanic and Atmospheric 

Administration Cooperative Observer Program..................................................................................15

3. Rules and actions used by Downsizer for absurd climate values........................................................16

4. Description of the mouse and keystroke input controls for the World Wind frame...............................22
1

Downsizer—A Graphical User Interface-Based Application for 

Browsing, Acquiring, and Formatting Time-Series Data for Hydrologic 

Modeling

By Christian Ward-Garrison, Steven L. Markstrom, and Lauren E. Hay

Abstract

The U.S. Geological Survey Downsizer is a computer application that selects, downloads, 

verifies, and formats station-based time-series data for environmental-resource models, 

particularly the Precipitation-Runoff Modeling System. Downsizer implements the client-server 

software architecture. The client presents a map-based, graphical user interface that is intuitive to 

modelers; the server provides streamflow and climate time-series data from over 40,000 

measurement stations across the United States. This report is the Downsizer user's manual and 

provides (1) an overview of the software design, (2) installation instructions, (3) a description of the 

graphical user interface, (4) a description of selected output files, and (5) troubleshooting 

information.

Introduction 

Many environmental-simulation models are not capable of using the best and latest data 

sources, which are available on the internet in near real-time. This is a particular problem for the 

U.S. Geological Survey (USGS), with scientists developing and applying hydrologic-simulation 

models that are used to support decision making and further the understanding of the natural 

world. Techniques that reduce errors, misinterpretation, misuse, and duplication of effort in 

preparation of data for simulation models are a high priority for USGS (U.S. Geological Survey, 

2007).

The USGS Downsizer is a computer application that selects, downloads, verifies, and 

formats station-based time-series data for environmental-resource models, particularly the 

Precipitation-Runoff Modeling System (PRMS) (Leavesley and others, 1983) and the Coupled 

Ground-Water and Surface-Water Flow Model (Markstrom and others, 2008). In addition, 

Downsizer produces time-series data, which are directly compatible with modeling support tools 

such as Luca (Hay and Umemoto, 2006), a tool used for model calibration, and the Object User 

Interface (Markstrom and Koczot, 2008), a generic map-based modeling interface.
2

Initial testing and prototyping done during the development of Downsizer indicate that this 

tool is very effective for building input data sets for environmental-simulation models. Specifically, 

time-series data sets can be built in a fraction of the time that is required to do this job manually. In 

addition, Downsizer-built data files are much more consistent, contain fewer data transcription 

errors, and are formatted specifically for the intended simulation model.

Software Design

Downsizer implements the client-server software architecture (fig. 1). Both the client and 

server are written in the Java programming language (http://java.sun.com, accessed May, 2009). 

The Downsizer client presents a map-based, graphical user interface that is intuitive to modelers. 

The client sends requests for data to the Downsizer server. The server provides access to daily 

streamflow data values from the U.S. Geological Survey National Water Information System 

(USGS NWIS, 1998), and daily minimum and maximum temperature and precipitation data values 

from the National Oceanic and Atmospheric Administration Cooperative Observer Program (NOAA 

COOP, http://www.nws.noaa.gov/om/coop, accessed May, 2009) and the U.S. Department of 

Agriculture, Natural Resources Conversation Service, National Water and Climate Center, Snow 

Survey and Water Supply Forecasting Program (NRCS SNOTEL, 

http://www.wcc.nrcs.usda.gov/snow, accessed May, 2009).

The client collects information from the user about the characteristics of the model input 

files that it will generate (fig. 1). This process is described in detail in the “Description of the 

Graphical User Interface” section of this report. The client then sends the server a Remote Method 

Invocation-based request for the data the user has specified. The server Dispatcher creates a 

Worker for the client that accepts this request and determines what data it needs to read from the 

Data Acquisition Portal. The Data Acquisition Portal retrieves data from the External Data sources 

using specific interfaces. The retrieval is guided by the Worker, which ensures that only the 

appropriate data sources are accessed and that only data within the user-specified time interval 

are read. The retrieved data are then passed on to the Quality Controller and the Formatter. The 

Quality Controller identifies “bad” values and fills missing values, if necessary. The Formatter

prepares the data in precisely the format required by the model (for example, PRMS) and sends it 

on to the user. 
3

Figure 1. Conceptual diagram showing the relations between the Downsizer client, server, and 

external data sources.

Purpose and Scope

This report describes the Downsizer client version 2.3.0 and serves as the user’s manual. 

The report first describes how to install the client, including hardware and software requirements. 

An overview of the various graphical frames is presented in the section “Description of Graphical 

User Interface”. The unique output files produced by Downsizer are described in the section 

“Output Files”. The final section, “Troubleshooting”, shows users how to handle problems that may 

occur. Details of the Downsizer server software are not included as they are beyond the scope of 

this report. 

External Data

Best available external 

sources

Downsizer Server

Remote Method Invocation Service

Input Files for Model

NWIS

Daily streamflow 

data

COOP

Daily climate 

data

SNOTEL

Daily climate 

data

Data 

Acquisition 

Portal 

Interface

Interface

Interface

Quality 

Controller

Worker

Dispatcher

Formatter

Downsizer Client

Data acquisition user

interface

NWIS: U.S. Geological Survey National Water Information System

COOP: National Oceanic and Atmospheric Administration Cooperative Observer Program

SNOTEL: U.S. Department of Agriculture, Natural Resources Conversation Service, National Water and 

Climate Center, Snow Survey and Water Supply Forecasting Program
4

Installation Instructions

The latest version of the Downsizer client is available from the USGS Downsizer web page 

(http://water.usgs.gov/lookup/get?crresearch/downsizer, accessed May, 2009) and is distributed 

as a zip file. About 10 megabytes of disk space are required for installation. This installation 

includes libraries, documentation, and startup scripts.

Hardware Requirements

Minimum hardware requirements include a 1.5 gigahertz Intel Pentium 4 processor (or 

equivalent), 512 megabytes random access memory, a 3D hardware accelerator, a display 

capable of 1024x768 resolution and 16-bit color depth, and 1 gigabyte of hard disk space. 

However, hardware requirements depend on the size of the data sets being retrieved. 

Software Requirements

The Downsizer client is developed for 32- and 64-bit Windows, Linux, and Mac operating 

systems. Running the client on other operating systems can require platform-dependent 

modifications. Operating systems that the client has been tested on include Windows XP, Linux 

2.6, and Mac OS X.

The client also requires that version 1.6 or later of the Java Runtime Environment be 

installed. Java is usually installed as a shared-system resource, which may require system 

administrator privileges. Check with your system administrator before attempting to install Java. 

Java is freely available from the Sun Microsystems web page 

(http://java.sun.com/javase/downloads/index.jsp, accessed May, 2009).

Downsizer Execution

Two startup scripts are included in the Downsizer distribution: client.bat and client.sh. 

Windows users can start Downsizer by either double-clicking the client.bat batch file in Explorer or 

by executing the command client.bat from a command prompt within the installation directory. 

Linux and Mac users can start Downsizer by executing the command ./client.sh from a Unix 

shell within the installation directory. All users should avoid editing the client.properties file, as it 

contains important runtime arguments to the client.
5

Description of Graphical User Interface

The Downsizer Client frame is the parent container from which all Downsizer functionality 

is accessible (fig. 2). A frame is a graphical user interface (GUI) window with a title, a border, and 

three buttons at the upper-right that are used to minimize, restore, and close the frame. This frame 

contains (1) the desktop area, (2) the toolbar, and (3) the menu bar. These parts are described 

below.

Figure 2. Screen image of the Downsizer Client frame upon startup showing (1) the desktop area, 

(2) the toolbar, and (3) the menu bar.
6

The desktop area is where the user can open the child frames and interact with GUI 

elements that control Downsizer. Upon startup, all child frames are minimized at the bottom of the 

desktop area (fig. 2). Any of these frames can be made visible by clicking on the Restore (left) or 

Maximize (middle) buttons on their icons. The frames can be closed by clicking on the Close (right) 

button. No information that was entered into a frame is lost when the frame is closed.

The toolbar provides an alternative way to work with the child frames (fig. 2). Each button 

on the toolbar corresponds to a frame and clicking one of the buttons will change the visual state 

of its associated frame. Clicking on a toolbar button associated with a closed or minimized frame 

will restore the frame and designate it to receive input from the user, making it the “selected” 

frame. If the frame is restored but not selected, clicking on the toolbar button will select it. Finally, if 

the frame is selected, clicking on the toolbar button will minimize it.

The menu bar has three top-level menus, each containing one menu item (fig. 2). The FileExit option causes Downsizer to exit. This option is identical to clicking the red X button at the 

upper-right of the Downsizer Client frame. The View-World Wind option selects the World Wind

frame (described in the “World Wind Frame” section), restoring or reopening it if necessary. 

Finally, the Help-About option displays a dialog that provides information about the Downsizer

application and its developers.

The appearance of the Downsizer Client frame will change as the user begins to work with 

it. For example, figure 3 shows the Downsizer desktop area with (1) open child frames which can 

be moved and resized in any configuration, (2) the toolbar undocked and reoriented (horizontal 

instead of vertical), and (3) the menu bar containing a notice indicating that a new version of the 

client is available. Clicking on the notice will display a dialog giving information about how to 

upgrade to a new version. This notice will not appear if the user is running the latest version.
7

Figure 3. Screen image of the Downsizer Client frame after the user has (1) moved and restored 

child frames and (2) undocked and reoriented the toolbar. The menu bar (3) indicates that a new 

version of the client is available.

Period Frame

The Period frame allows the user to select the interval of time for the data to be retrieved 

(fig. 4). This time interval is known as the Period of Record (POR). The top row of combo boxes is 

used to select the start date (inclusive) of the desired POR. In figure 4, the start date for the 

example query is September 28, 1993. The bottom row of combo boxes is used to select the end 

date (inclusive) of the desired POR. The end date must be later than the start date. In figure 4, the 
8

end date for the example query is April 10, 2000. The label at the bottom indicates the overall 

period for which data are available on the server. In figure 4, no data before 1948/01/01 or after 

2008/05/08 are available. Any attempts to set the start or end dates outside of that period will fail.

Figure 4. Screen image of the Period frame that allows the user to (1) select the Period of Record 

(POR) start date, (2) select the POR end date, and (3) view the overall period for which data are 

available.

Output File Frame

The Output File frame allows the user to select the (1) format, (2) path, and (3) description 

of the file in which the data will be written (fig. 5). The File Format combo box contains the three 

available output formats (1) PRMS-MMS (Leavesley and others, 1996), (2) NetCDF 

(http://www.unidata.ucar.edu/software/netcdf/, accessed May, 2009), and (3) XYZ, described in 

Figure 5. Screen image of the Output File frame which allows the user to select the (1) format, (2) 

path, and (3) description of the file in which the data will be written.
9

the “XYZ File Format” section. The File Path text field determines where the data file will be 

written. The path can be absolute, as shown in figure 5, or relative to the working directory, which 

is most likely the directory in which Downsizer resides. Clicking on the Browse button will pop up a 

dialog that allows the user to navigate the file system graphically and then select the desired file 

from a list. Finally, the File Description text field allows the user to specify a description that is 

written to the header of PRMS-MMS format output files. This field only applies to PRMS-MMS files 

and is disabled for all other formats.

Station Addition Frame

The Station Addition frame allows the user to build a set of climate and streamgage stations from which to pull data by using one of three options: (1) specifying stations 

that lie within a geographical boundary, (2) reading a list of stations from a file, and (3) 

typing station identifiers (IDs) directly (fig. 6). When a station is added, detailed

Figure 6. Screen image of the Station Addition frame which allows the user to build a set of 

climate and stream-gage stations from which to pull data by using one of three options: (1) 

specifying stations that lie within a geographical boundary, (2) reading a list of stations from a file, 

and (3) typing station identifiers (IDs) manually.
10

information about it can be viewed in the Station Review frame (described in the next section). The 

station’s location also can be viewed graphically in the World Wind frame (described in the “World 

Wind Frame” section).

In the Add stations by location option (1), the spinners describe a latitude-longitude 

rectangle on the surface of the Earth (fig. 6). The coordinates specified in the spinners are as 

follows: 

• The coordinate in the top spinner is the northernmost latitude of the selection rectangle.

• The bottom coordinate is the southernmost latitude of the selection rectangle.

• The left coordinate is the westernmost longitude of the selection rectangle.

• The right coordinate is the easternmost longitude of the selection rectangle.

Each spinner can be incremented or decremented by one degree by clicking on the arrow 

buttons. Latitude-longitude values can also be specified by typing new values into the 

corresponding text boxes and then hitting the Enter key. The Add Stations button adds any 

stations that lie within the rectangle specified by the coordinate spinners to the Station Review

frame (described in the next section). The top coordinate must be greater than the bottom 

coordinate and the right coordinate must be greater than the left coordinate, or else an error dialog 

will be displayed.

In the Add stations from file option (2), the Climate IDs file path and Gage IDs file path text 

fields display the paths of files that contain climate and gage IDs (fig. 6). The paths can be 

absolute or relative to the working directory, which is most likely the directory in which Downsizer

resides. Clicking either of the Browse buttons will pop up a dialog that allows the user to navigate 

the file system graphically and then select the desired file from a list. Each file must contain exactly 

one station ID per line. The Add Stations button adds any stations specified in the selected files to 

the Station Review frame (described in the next section). 

In the Add stations manually option (3), the Climate IDs and Gage IDs text fields display 

comma-separated lists of climate and gage IDs (fig. 6). White space between IDs is permitted, as 

shown in the Gage IDs text field. The Add Stations button adds any stations specified in the text 

fields to the Station Review frame (described in the next section). Any item in either list that is not 

a valid station ID will be reported.

Station Review Frame

The Station Review frame shows the complete set of climate and stream-gage stations 

from which data will be retrieved (fig. 7). With this frame, the user can (1) select climate stations, 
11

(2) remove selected climate stations, (3) remove all climate stations, (4) select stream-gage 

stations, (5) remove selected stream-gage stations, and (6) remove all stream-gage stations. In 

addition, the contents of the Climate stations and Gage stations tables are plotted as points on the 

map in the World Wind frame (described in the “World Wind Frame” section). The contents of the 

Station Review frame and World Wind frame are always synchronized.

Figure 7. Screen image of the Station Review frame that allows the user to (1) select climate 

stations, (2) remove selected climate stations, (3) remove all climate stations, (4) select streamgage stations, (5) remove selected stream-gage stations, and (6) remove all stream-gage stations.

The Climate stations table lists IDs and other information of climate stations from which the 

Downsizer client will retrieve data (fig. 7). This table can be customized in several ways:

• Click a column header to sort the stations by the values in the column; one click will 

sort in ascending order and two clicks will sort in descending order.

• Click and drag on the bar between two columns to adjust the widths of the columns.

• Click and drag the header of a column to change the location of the column in the table.
12

Double-clicking on a row in the Climate stations table will center the view of the map in the 

World Wind frame (described in the “World Wind Frame” section) on the corresponding station. A 

single station can be selected in the Climate stations table by clicking on its corresponding row. 

Multiple stations can be selected by holding down the Ctrl- or Shift-key while clicking. The Remove 

selected button directly below the Climate stations table will remove any selected stations from the 

table. Likewise, the Remove all button directly below the Climate stations table will remove all 

stations from the table.

The Gage stations table lists IDs and other information of stream-gage stations from which 

the Downsizer client will retrieve data (fig. 7). Options for editing this table using its associated 

buttons are the same as the options for the Climate stations table.

Units Frame

The Units frame specifies the temperature and precipitation units of the data in the output 

file (fig. 8). With this frame, the user can select (1) a temperature unit of either degrees Celsius or 

degrees Fahrenheit, and (2) a precipitation depth unit of either millimeters or inches.

Figure 8. Screen image of the Units frame that allows the user to specify (1) the temperature unit 

and (2) the precipitation unit of the retrieved data.

Quality Control Frame

The Quality Control frame allows the user to specify quality control checks and adjustments 

that Downsizer will perform on retrieved climate data (fig. 9). These operations include (1) shifting 

daily temperatures, (2) processing measurement flags, (3) processing quality flags, (4) discarding 

absurd values, and (5) discarding extreme values. Extreme value ranges can be specified for (6) 

maximum daily temperature, (7) minimum daily temperature, and (8) daily precipitation. The Shift 

SNOTEL temperatures check box instructs Downsizer to shift measured NRCS SNOTEL

maximum and minimum daily temperature data back one day. The Process COOP measurement 

flags check box instructs Downsizer to apply the rules in table 1 to values measured at NOAA 

COOP stations. The Process COOP quality flags check box instructs Downsizer to apply the rules 
13

in table 2 to values measured at NOAA COOP stations. The Discard absurd climate values check 

box instructs Downsizer to apply the rules in table 3 to determine if values measured at NRCS 

SNOTEL or NOAA COOP stations are unrealistic. The Discard extreme climate values check box 

instructs Downsizer to discard climate values that fall outside the ranges set forth in the 5 text 

boxes at the bottom of Quality Control frame. After the quality control process has run, Downsizer

produces a quality assurance report that describes the quality of retrieved data. This report is 

described in the “Quality Assurance Report” section.

Figure 9. Screen image of the Quality Control frame that allows the user to check and adjust 

retrieved data by (1) shifting daily temperatures, (2) processing measurement flags, (3) processing 

quality flags, (4) discarding absurd values, and (5) discarding extreme values. Extreme value 

ranges can be specified for (6) maximum daily temperature, (7) minimum daily temperature, and 

(8) daily precipitation
14

Table 1. Measurement flags used by Downsizer for data collected by the National Oceanic and 

Atmospheric Administration Cooperative Observer Program.

Measurement 

flag

Definition Downsizer action

A Accumulated amount since last measurement. Disaggregate based on 

nearest stations

B Accumulated amount includes estimated values (since 

last measurement).

Disaggregate based on 

nearest stations

E Estimated (see Table "2" for estimating method). 

J Value has been manually validated.

M For fixed length records only. Flag1 is "M" if the data 

value is missing. In this case, the sign of the 

meteorological value is assigned "-" and the value of 

the meteorological element is assigned "99999". 

S Included in a subsequent value. (data value = "00000" 

OR "99999"). 

Use with “A” and “B”

T Trace (data value = 00000 for a trace). Set = 0.0001

( Expert system edited value, not validated.

) Expert system approved edited value. 
15

Table 2. Quality flags used by Downsizer for data collected by the National Oceanic and 

Atmospheric Administration Cooperative Observer Program.

[TMAX: Daily maximum temperature; TMIN: Daily minimum temperature; TOBS: Temperature at observation time]

Quality 

flag

Definition Downsizer 

action

0 Valid data element

1 Valid data element from unknown source

2 Invalid data element (subsequent value replaces original value)

3 Invalid data element (no replacement value follows)

4 Validity unknown (not checked) Set to missing

5 Original non-numeric data value has been replaced by its deciphered numeric value

A Substituted TOBS for TMAX or TMIN Set to missing

B Time shifted value Set to missing

C Precipitation estimated from snowfall Set to missing

D Transposed digits Set to missing

E Changed units Set to missing

F Adjusted TMAX or TMIN by a multiple of ±10 degrees Set to missing

G Changed algebraic sign Set to missing

H Moved decimal point Set to missing

I Rescaling other than F, G, or H Set to missing

J Subjectively derived value

K Extracted from an accumulated value

L Switched TMAX and (or) TMIN

M Switched TOBS with TMAX or TMIN Set to missing

N Substitution of “3 nearest station mean”

O Switched snow and precipitation data value Set to missing

P Added snowfall to snow depth Set to missing

Q Switched snowfall and snow depth Set to missing

R Precipitation not reported; estimated as “0” Set to missing

S Manually edited value

T Failed internal consistency check Set to missing

U Failed areal consistency check Set to missing
16

Table 3. Rules and actions used by Downsizer for absurd climate values.

[TMAX: Daily maximum temperature; TMIN: Daily minimum temperature; n: Current time step]

Absurd value Action

Precipitation is negative Set to missing

TMAX(n) < TMIN(n) Set both to missing

TMAX(n) < TMIN(n-1) Set both to missing

TMIN(n) > TMAX(n-1) Set both to missing

TMAX(n) < TMIN(n+1) Set both to missing

Temperature records have same value for more than 4 consecutive 

days

Set all to missing

TMAX is missing Set TMIN to missing

TMIN is missing Set TMAX to missing

Run Frame

The Run frame initiates data retrieval and shows the progress of this process (fig. 10). With 

this frame, the user can (1) view the status of the data retrieval, (2) view the overall progress, (3) 

run the retrieval, and (4) cancel the retrieval.

The text area in the Run frame shows messages describing the status of the data retrieval 

(fig. 10). The messages displayed are a subset of the messages that will appear in the log file. The 

progress bar below the text area shows a graphical representation of the retrieval progress. The 

percentage shown by the progress bar is only an estimate and it may, for example, take much 

longer for the first half of the bar to fill up than the second half.

Clicking the Run button in the Run frame initiates a process that collects all the information 

specified in the Period, Output, Station Addition, Station Review, Units, and Quality Control frames 

(fig. 10). This information is transmitted to the Downsizer server, which ultimately executes the 

data retrieval. Finally, the results—an output file, a quality assurance report (described in the 

“Quality Assurance Report” section), and a log file (downsizer.log)—are transmitted from the 

server back to the client.
17

Figure 10. Screen image of the Run frame that allows the user to (1) view the status of the data 

retrieval, (2) view the overall progress, (3) run the retrieval, and (4) cancel the retrieval.

There are two conditions that must be met before the retrieval process can be initiated. If 

either is not met, an error dialog will be displayed and the corresponding frame will pop up. These 

conditions are:

• The tables in Station Review frame must contain at least one climate or one stream-gage 

station.

• A valid file must be specified in the Output File frame.

Also, if the total number of climate and stream-gage stations is more than 100, a popup 

dialog will warn about the massive size of the output file and the lengthy processing time that will 

be required. This dialog is only a warning, and the user may still proceed with the large job.

Clicking the Cancel button in the Run frame cancels any Downsizer client or server 

operation that is currently in progress (fig. 10). There may be a small delay between when the user 

clicks the button and when the job is actually cancelled, depending on the status of the server.

World Wind Frame

The World Wind (http://worldwind.arc.nasa.gov/java/index.html, accessed May, 2009) 

frame gives the user a geographic view of the locations of climate and stream-gage stations listed 
18

in the tables of the Station Review frame (figs. 7, 11). The World Wind frame allows the user to (1) 

view an animated globe for visualization of information on the surface of the Earth, (2) reference 

the view by world map, (3) reference the view by compass, (4) reference the view by map scale, 

and (5) reference the view by geographic coordinates. The frame shows a view of the globe that is 

taken from the perspective of a camera hovering high above the Earth. The camera can be 

panned, zoomed, rotated, and tilted in any direction relative to the planet. Left-clicking a point on 

the globe will cause the camera to reposition directly overhead of that point.

Figure 11. Screen image of the World Wind frame which allows the user to (1) view an animated 

globe for visualization of information on the surface of the Earth, (2) reference the view by world 

map, (3) reference the view by compass, (4) reference the view by map scale, and (5) reference 

the view by geographic coordinates.

The cross hairs on the world map indicate the location of the floating camera on the 

globe—in this case Colorado, USA (fig. 11). The cross hairs also lie within a subsection of the 

world map bounded by a wavy line at the bottom and the map's edges at the left, top, and right. 
19

This subsection corresponds to the region of the globe currently viewable by the camera, which 

includes all of North America plus small parts of South America, Europe, and Russia. The 

viewable subsection will change size and shape as the camera is moved.

The compass indicates the direction north, with the red arrow, regardless of the position 

and direction of the camera (fig. 11). The compass also tracks camera tilt. When the camera is 

perpendicular to the globe surface, the compass will appear circular. As the camera is tilted, the 

compass will begin to look oval. The greater the angle between the camera’s line of sight and the 

surface normal of the globe, the broader the oval becomes.

The scale bar can be used to measure distances on the globe (fig. 11). As the camera's 

distance from the globe is increased or decreased, the scale bar adjusts accordingly.

The status bar displays five pieces of information (fig. 11). From left to right, they are:

• Altitude: The distance above the globe surface where the camera is located. 

• Lat: The latitude of the location on the globe indicated by the mouse arrow. The mouse 

arrow is not visible in figure 11, but it is positioned near Colorado, USA. 

• Lon: The longitude of the location on the globe indicated by the mouse arrow. 

• Elev: The elevation of the location on the globe indicated by the mouse arrow. 

• Heartbeat (not visible): This area displays messages concerning the status of the globe 

view in the World Wind frame. There is not always a message to display, as in figure 11.

An example of repositioning the camera is shown in figure 12. In this case, the camera 

overlooks a mountain in the Colorado Rockies. The camera is at almost the same latitude and 

longitude as in figure 11, but it is at an altitude of 4 km instead of about 18,000 km. In this 

example, the compass indicates that the camera is facing east and has been tilted significantly 

from the surface normal of the globe. The length of the scale bar has also been updated from 2000 

km to 100 m. Additionally, figure 12 shows the Heartbeat area on the status bar displaying the 

message “Downloading”. This indicates that the World Wind frame is retrieving satellite imagery 

from internet map servers at the National Aeronautics and Space Administration. If the internet 

map servers are unavailable, the Heartbeat area will display the message “No Network”.
20

Figure 12. Screen image showing the World Wind globe with the camera repositioned to an 

altitude of 4 km.

The Downsizer client uses the globe in the World Wind frame to show the positions of 

climate and stream-gage locations (fig. 13). In this example, the camera is looking straight down at 

Utah Lake, USA from 100 km above the Earth. The smiley-face icons (hereafter referred to as 

“spots”) represent climate or stream-gage stations, either selected or unselected. Specifically:

• A blue spot indicates an unselected climate station.

• An orange spot indicates a selected climate station.

• A green spot indicates an unselected stream-gage station.

• A magenta spot indicates a selected stream-gage station.

The name of a station (shown in yellow text in fig. 13) is displayed in a tooltip when the 

mouse pointer (not visible in fig. 13) is positioned over its corresponding spot. The spot will visually 

enlarge on the globe view.
21

Figure 13. Screen image showing the World Wind globe with the positions of climate and streamgage locations represented as smiley-face icons.

Figure 13 also shows a selection rectangle. This is the graphical representation of the 

geographic boundary that the four spinners in Station Addition frame denote. Changes made to 

the selection rectangle in World Wind frame are reflected in Station Addition frame, and vice versa. 

Clicking the Controls button displays a popup window containing the mouse and keystroke input 

controls for the World Wind frame (table 4).
22

Table 4. Description of the mouse and keystroke input controls for the World Wind frame.

Action Mouse and (or) keystroke

Globe controls

Pan Left click + drag (all directions)

Zoom Scroll the mouse wheel or hold it down and drag the mouse

Tilt Right click + drag (forward and backward)

Rotate Right click + drag (left and right)

Stop all camera movement Spacebar

Reset heading N

Reset heading and tilt R

World map controls

Fly to location Left click the location

Selection rectangle controls

Delete selection rectangle Right click

Toggle selection of enclosed spots Left click

Spot controls

Display tool tip Hover arrow over spot

Toggle selection Left click

Station review controls

Fly to station Double-click on a row in Station Review frame tables
23

Output Files

Downsizer produces two unique output files that have not been previously documented. 

These are the XYZ file and the quality assurance report. The formats of these files are described 

below.

XYZ File Format

The XYZ file format is a plain-text format for station-based time-series model data (fig. 14). 

Fields must be separated by at least one space. Additional spaces between fields are permitted, 

as shown in figure 14, where extra white space has been used to make the file more readable.

Figure 14. The XYZ file format.

An XYZ file begins with zero or more comment lines, which may contain useful information 

for human readers, but are ignored by computer programs. Each comment line starts with the 

delimiter string “//”. Comment lines may only appear at the top of a file.

Following the comments, there are 9 metadata lines (M1-M9) that describe the stations 

within an XYZ file:

• Line 1 specifies the number of stations for which the file contains data.

// Created by Downsizer C1: First comment line

// on 2009/05/29 13:23:08 C2: Second comment line

Number of stations: 2 M1: Number of stations

Variable: tasmin M2: Variable of file’s data

Unit: Fahrenheit M3: Unit of file’s data

ID: 503163 51k14s M4: Station IDs

Network: COOP SNOTEL M5: Station networks

Name: "FT RICHARDSON W.T.P." "MCNEIL CANYON" M6: Station names

Latitude(degree_N): 61.2275 59.75 M7: Station latitudes

Longitude(degree_E): -149.6503 -151.2667 M8: Station longitudes

Elevation(meter): 149.352 402.336 M9: Station elevations

2000 1 1 -6 -4 D1: First data line

2000 1 2 -6 12.2 

2000 1 3 -8 8.6 

2000 1 4 -999 -5.8 

2000 1 5 4 14 

2000 1 6 -2 17.6 

2000 1 7 8 -0.4 

2000 1 8 8 -2.2 

2000 1 9 5 -7.6 

2000 1 10 5 -4 

2000 1 11 -8 -7.6 

2000 1 12 -9 -11.2 

 Date Station 1 Station 2 D1 to EOF: Data lines 

YYYY MM DD Daily Data Daily Data 
24

• Line 2 specifies the climate or weather variable of the file's data. For XYZ files generated 

by Downsizer, the variable will be "tasmin" (minimum temperature), "tasmax" (maximum 

temperature), "precip" (precipitation rate), or "discharge" (streamflow rate).

• Line 3 specifies the unit in which the data are represented as a UDUNITS unit string 

(http://www.unidata.ucar.edu/software/udunits/udunits-2/udunits2lib.html#Syntax, accessed 

May, 2009). Tasmin and tasmax units will be in either degrees Celsius ("Celsius") or 

degrees Fahrenheit ("Fahrenheit"). Precip units will be in either millimeters per day ("mm 

per day") or inches per day ("in per day"). The discharge unit will be cubic feet per second 

("ft3 per sec").

• Line 4 specifies the IDs of the stations.

• Line 5 specifies the networks that the stations belong to. For Downsizer, the possible 

networks are "COOP", "SNOTEL", and "NWIS".

• Line 6 specifies the names of the stations. Each name is surrounded by double quotation 

marks, which permit names with embedded spaces (for example, "GREERS FERRY 

DAM").

• Line 7 specifies the latitudes of the stations in the UDUNITS unit given in parentheses. For 

Downsizer, the unit will be decimal degrees north of the equator ("degree_N").

• Line 8 specifies the longitudes of the stations in the UDUNITS unit given in parentheses. 

For Downsizer, the unit will be decimal degrees east of the prime meridian ("degree_E").

• Line 9 specifies the elevations of the stations in the UDUNITS unit given in parentheses. 

For stations that have elevation data (typically COOP and SNOTEL), Downsizer will use 

meters as the unit ("meter"). For stations that don't have elevation data (typically NWIS), 

the specification will be "1" (unitless) and the values in each column will be "-999" 

(missing).

Beginning after the 9th metadata line and continuing to the end of file are the data lines. 

The first 3 columns of each data line are the year, month, and day of that line's records. Following 

the 3 date columns are each station's scalar value for that date. A value of "-999" indicates that the 

station does not have a record for that date.

Quality Assurance Report

The quality assurance report is a plain-text file that describes the quality of retrieved data 

(fig. 15). The file is composed of one or more tables of station metadata. The first four to six 

columns of each table describe the stations themselves, including ID, name, data type (if 
25

applicable), latitude, longitude, and elevation (if applicable). The next two columns give the 

number of missing values out of the total number of values requested. Subsequent columns give 

the number of values that are associated with various quality control flags. Definitions of the flags 

are given beneath the tables.

Figure 15. The quality assurance report.

At least one and up to three tables of station metadata will appear in the report, depending 

on the types of stations added to Station Addition frame and the type of file selected in Output File

frame.

• The table "SUMMARY FOR CLIMATE DATA" will appear if at least one climate station was 

added.

• The table "SUMMARY FOR GAGE DAILY VALUES" will appear if at least one streamgage station was added.

• The table "SUMMARY FOR GAGE MEASUREMENTS" will appear if at least one streamgage station was added and the XYZ file format was selected.

Troubleshooting

Several common problems have been encountered during testing and prototyping of 

Downsizer. These problems, along with their remedies, are described below.

The GUI does not start and an error is written to the console instead: This most likely 

means that Java version 1.6 or later is not installed. To find out, open a command prompt and 

execute the command: java -version. The first line of the response should be in the format: 

///////////////////////////////////////////

 SUMMARY FOR GAGE DAILY VALUES

///////////////////////////////////////////

ID Name Latitude Longitude [Missing / Total] Ice e P A

15239070 BRADLEY HOMER 59.801 -150.885 13111 / 22554 0 1937 312 9285

15254000 CRESCENT LANDING 60.496 -149.679 16267 / 22554 0 0 0 6287

15238795 SELDOVIA NR 59.387 -151.677 22006 / 22554 0 0 0 548

15266500 BEAVER KENAI 60.563 -151.12 18536 / 22554 0 0 0 4018

15237020 MAIN BAY PORT 60.518 -148.094 21093 / 22554 0 0 0 1461

----- Gage Data Flag Description -----

Ice Ice affected 

e Value has been estimated. 

P Provisional data subject to revision. 

A Approved for publication -- Processing and review completed. 
26

java version "1.X.0_YY". If X is less than 6, then an old version of Java is installed and must 

be upgraded. If the command is not recognized, Java is not installed on the system at all. In either 

case, see the section "Software Requirements" for instructions on how to install Java.

If neither of the two cases above applies, you may have encountered a bug in Downsizer. 

Please email all error information written to the console to mowshelp@usgs.gov.

The GUI starts but immediately shows an error dialog with the text "A 

communication error occurred while trying to connect to the server": First, confirm that the 

computer is connected to the internet. If it is, the problem is likely that the Downsizer server isn't 

running. If this is the case, please send an email to mowshelp@usgs.gov indicating that the server 

needs to be started.

The GUI starts but immediately shows an error dialog with the text "The client you 

are using is incompatible with the server running on lobo.cr.usgs.gov": Upgrade to the latest 

version of the Downsizer client (http://water.usgs.gov/lookup/get?crresearch/downsizer, accessed 

May, 2009).

Most (or all) of the values in the model input file that the server returned are "-999":

A value of "-999" indicates a missing value. The value may be marked as missing because it fell 

outside of the quality control boundaries. Open up Quality Control frame and ensure that the data 

constraints aren't too tight.

Another reason that a data value may appear as "-999" is that it doesn't exist. Not all of the 

stations have data for the entire Available period displayed in Period frame, so missing values may 

be common. Therefore, adjust the period selected in Period frame to find out if the station has data 

for other dates. Some stations have no data for the entire Available period. These stations should 

be avoided.

References Cited

Hay, L.E., and Umemoto, M., 2006, Multiple-objective stepwise calibration using Luca: U.S. 

Geological Survey Open-File Report 2006–1323, 25 p.

Leavesley, G.H., Lichty, R.W., Troutman, B.M., and Saindon, L.G., 1983, Precipitation-runoff 

modeling system—User's manual: U.S. Geological Survey Water-Resources Investigations 

Report 83-4238, 207 p. 
27

Leavesley, G.H., Restrepo, P.J., Markstrom, S.L., Dixon, M., and Stannard, L.G., 1996, The 

Modular Modeling System (MMS)—User's manual: U.S. Geological Survey Open-File Report 

96-151, 142 p.

Markstrom, S.L., and Koczot, K.M., 2008, User’s manual for the object user interface (OUI)—An 

environmental resource modeling framework: U.S. Geological Survey Open-File Report 2008–

1120, 39 p.

Markstrom, S.L., Niswonger, R.G., Regan, R.S., Prudic, D.E., and Barlow, P.M., 2008, 

GSFLOW—Coupled ground-water and surface-water flow model based on the integration of the 

Precipitation-Runoff Modeling System (PRMS) and the Modular Ground-Water Flow Model 

(MODFLOW-2005): U.S. Geological Survey Techniques and Methods 6-D1, 240 p.

U.S. Geological Survey, 1998, National Water Information System (NWIS): U.S. Geological Survey 

Fact Sheet 027-98, 2 p.

U.S. Geological Survey, 2007, Facing tomorrow’s challenges—U.S. Geological Survey science in 

the decade 2007–2017: U.S. Geological Survey Circular 1309, 67 p.