home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Between Heaven & Hell 2
/
BetweenHeavenHell.cdr
/
100
/
31
/
weather.doc
< prev
next >
Wrap
Text File
|
1985-04-19
|
6KB
|
141 lines
*******************************************************************************
* *
* WEATHER RECORDS AND STATISTICS PROGRAM *
* Version 1.1 *
* *
* Public-Domain Software *
* To Display Records Stored in a Weather Database *
* And Statistics Calculated from the Database *
* *
* For the IBM Personal Computer *
* *
*******************************************************************************
The Files
---------
WEATHER consists of three files:
WEATHER.EXE the executable file
WEATHER.DAT a sample weather database
WEATHER.DOC this documentation file
The Menu
--------
WEATHER displays or prints records stored in the database or statistics
calculated from the database. The options menu is as follows:
(1) Display or print weather records
(2) Display or print weather statistics
(3) Exit
If option 1 or 2 is selected, the following information is prompted for:
Input starting date (YY-MM-DD)
Input ending date (YY-MM-DD)
Input city location (10 letters maximum)
Input state location (2-letter state code)
Printout also (yes/NO)
As the date is searched in ASCII order, only YY or YY-MM need be entered, if
a year or year-month combination is desired. However, zeros must be entered
(e.g., 03-04-85). A carriage return at the "Input starting date" prompt
returns to the options menu. The printout default is "no" (display only).
If option 1 has been selected, the following fields are then displayed or
printed from the database for each record between the starting and ending
dates:
Date
Low Temperature
Time of Low Temperature
High Temperature
Time of High Temperature
Atmospheric Pressure
Rainfall
If option 2 has been selected, the following statistics are then calculated and
displayed or printed from the database for the records between the starting and
ending dates:
Extreme Low Temperature (with date and time of day)
Extreme High Temperature (with date and time of day)
Extreme Low Pressure (with date)
Extreme High Pressure (with date)
Extreme Low Rainfall (with date)
Extreme High Rainfall (with date)
Average Low Temperature (with average time of day)
Average High Temperature (with average time of day)
Average Atmospheric Pressure
Average Rainfall
Total Rainfall
The Weather Database
--------------------
WEATHER.DAT, consisting of data for Hayward, California, is supplied as a
sample to demonstrate the format for entering data into the database. This
file is a standard ASCII file that may be listed using the PC DOS "TYPE"
command.
After the file's format is inspected, and the program has been run to observe
its operation, WEATHER.DAT should be renamed (to preserve it), and a new
WEATHER.DAT file should be entered on a daily basis. The program recognizes
only WEATHER.DAT as the filename of the weather database which it reads.
As WEATHER.DAT must a standard ASCII file, it may be entered using EDLINE (the
PC DOS line editor), WordStar's non-document mode, or any other editor that
produces a standard ASCII file. The following requirements for entry should be
particularly noted:
* Records must be entered serially, earliest date first, in exactly the
same format as the sample file with respect to spacing, punctuation,
etc.
* The abbreviation "n/a" stands for "not available" and must be entered
when a datum is unrecorded.
* Extra spaces must not be entered at the end of a line before the
carriage return, nor should any blank lines exist at the end of the file
after the carriage return at the end of the last line of data.
Because of the constraints of the compiler, the database is limited to a
maximum of 1096 records (three years' worth).
The Units Used
--------------
All data are stored, displayed, and printed in the American National Standards
Institute (ANSI)- and International Standards Organization (ISO)-recommended SI
metric system units, which have also been approved by the National Weather
Service. The units are as follows:
Dates: YY-MM-DD format
Times: HH:MM format using a 24-hour clock
Temperatures: degrees Celsius (to one decimal place)
Pressures: kilopascals (to three decimal places)
Rainfall: millimetres (to one decimal place)
In cases where instruments are being used that do not record in SI metric
units, readings must be converted to SI metric units before being entered into
the database. The conversion formulae are as follows:
Degrees Fahrenheit to Degrees Celsius: (X-32)*5/9
Millibars to Kilopascals: X/10
Inches of Mercury to Kilopascals: X*3.386389
Inches to Millimetres: X*25.4
Martin E. Morrison
136 Loma Verde Drive
Hayward, CA 94541-1368
415-278-8458