cmsWxCalc6

version 1.0

Quick links:

Introduction

cmsWxCalc6, version 1.0 was completed October 27, 2003, after about seven months of testing previous development versions. It is written in Python and uses Tkinter (the Python interface to Tcl/Tk's "toolkit") and Pmw (Python mega-widgets) for the GUI. A second Python file, "WxCalc6.py" provides the underlying computation and conversion abilities. A third Python file, "getOb.py," provides the ability to look up the current weather conditions for a selected site via the Internet.

How to Use cmsWxCalc6

Overview

The cmsWxCalc6 interface is designed to be very similar to cmsWxCalc4.tcl, the Tcl/Tk predecessor to this program, which was never completed. Enter values (except Heat Index/Wind Chill) in the entry spaces provided. Values affected by your changes will be dimmed until the Calculate or [Get Ob] button is pressed. Values are color-coded according to categories: temperature, relative humidity, wind speed, pressure, elevation, site settings (for Internet retrievals) or responses.

Buttons

USA

This button selects units commonly used in the U.S.A. They are: Fahrenheit, miles per hour, inches of mercury, and feet.

Metric

Metric selects commonly-used metric units: Celsius, kilometers per hour, kilopascals, and meters.

METAR

This button selects units used in U.S. METAR observations: Celsius, knots, inches of mercury, meters (not actually in the observation).

SI

SI units are selected: Kelvin, meters per second, hectopascals*, meters.
* - technically, pascals are the basic SI unit for pressure, but hectopascals are more commonly used, not represented by the other buttons, and still within the realm of SI units.

Find

If you have entered a location name (or part of one) in the Site entry box, you can click [Find] to look up the location in the accompanying list (airportcodesicaocoding.txt). Note that the presence of a site's name in this list does not necessarily mean that Weather.gov stores the corresponding observation. Similarly, the absence of a site's name does not necessarily mean that you can't get the observation from Weather.gov if you know the identifier. If you have difficulty finding a site, try a different spelling or the state or country's name. A few entries are in German, since the list apparently originated in Germany. Always capitalize each name.

If more than one site matching your input is found, cmsWxCalc6 will present a list of the sites found and let you select the one you want. You can either double-click the desired site, or click it, then [OK]. You can also cancel a selection or click [OK] without making a selection (either way, your Site entry will remain unchanged). Once a site's 4-letter ICAO identifier is in the Site entry box, you may click [Get Ob] to retrieve the most recent weather observation for that site from Weather.gov.

Ob

This button is located next to the time-of-observation label (which begins as "(Manual)" before any observations are acquired via the Internet). You can click [Ob] to see the site name and undecoded METAR observation that were last retrieved via [Get Ob].

Cancel

If there is a pending (Internet) update for the selected site, you can cancel it with this button.

Calculate

Whenever there are grayed-out values on the screen, click this button to recalculate them.

Get Ob

Click this button to load the current observation for the selected site from the Internet (this version uses Weather.gov). The currently-selected time interval setting from the "Internet" menu determines the time of the next auto-update (default is 20 minutes). If there is a problem obtaining the requested observation, a warning message will pop up and explain the problem.

Exit

Self-explanatory.

Menu Items

(Not duplicated by buttons)

Decimals

Set the decimals to +0, +1, or +2 to add extra decimals to the displayed numbers. The +0 option selects default settings, +1 adds one more decimal place, and +2 adds two decimal places. Note that many calculations do not warrant more than one decimal place past the default.

Units

This is where you can set the units for the various values on an individual basis (temperatures, pressures, winds, or elevation). The choices are:

Temperature

Wind Speed

Pressure

Elevation Height

Internet

This list includes an option to set the refresh time for the observation (if you're obtaining weather information from the Internet). The options are:

Help

"Help" displays this document.

"About" shows the basic description of the program - its name, author, version, copyright, etc.

Data Entry

You can enter your own numbers in the various entry boxes. When you change a number, those affected by the change are dimmed. You can click [Calculate] to recalculate those numbers. "Error" designates a value the is either not calculatable from the given values or is out of range (below 0 Kelvin temperature, for example).

New values are computed based on the most-recently changed numbers. For example, if you changed Wet Bulb, then Temperature, then Dew Point, and click [Calculate], the Wet Bulb and Relative Humidity values would be computed from Temperature and Dew Point (Temperature is a mandatory entry value).

Although the Wet Bulb temperature requires Station Pressure for its computation, the actual value of Station Pressure does not normally make a lot of difference in the result. An approximation is usually quite sufficient. The standard Station Pressure value in many psychrometric charts is 29 inches of mercury.

Program Information

History

cmsWxCalc6 is the sixth main installation of the WxCalc series. The table shows some of the features of the various versions.

Name Year StartedLanguage GUI Internet Access Current Status
WxCalc1995C++NoNoNot supported
WxCalc2A1995C++YesNoNot supported
cmsWxCalc32000JScriptYesNoActive - on personal Website
cmsWxCalc42001Tcl/TkYesIntendedNot supported
cmsWxCalc52001Java 2YesIntendedUnfinished, not supported
cmsWxCalc62003Python/TkinterYesYesActive

For more details on the history of this project, see the "About cmsWxCalcIII" page on my personal Website.

License

This program was written entirely on personal time, including the complete rewrite of the equations. cmsWxCalc6.py, WxCalc6.py, getOb.py, and wxcalc6Help.html are the property of Cheryl M. Sharpe. The airport listing, "airportcodesicaocoding.txt," was obtained on-line and carries its own user arrangements. None of the programs or text files may be distributed without the consent of the file's author. The National Weather Service is permitted to use any number of copies of this application without further written permission.

This program is supplied without warranty and is not guaranteed to be free of errors. Its use must be restricted to situations where accuracy is not critical. cmsWxCalc6 and all its ancestors were designed for meteorologists. Use by non-meteorologists is encouraged, but with the understanding that misuse of results is the user's responsibility, not mine.


Cheryl M. Sharpe, October 27, 2003