**** NOTE **** This load procedure is outdated at this time ****
It is highly recommended that you do not use this procedure at this time
without thoroughly reading through the code and understanding what it 
does. This process was created and used for database versions 11.1 and
may not work properly for database versions 11.2 and newer. If you are 
going to use this use it at your own risk, minimal support will be provided.

This process will possibly be reviewed in the future as time permits and
updated as needed

The "Load" script will look for weather data files and use them to populate
the mySQL Weather DB from those files using the "LoadWeatherData" Perl 
script. You need to edit that script and add your mySQL Admin password:
$password = "mypasswd";

The history files it looks for are:

BaroPresFile.ArcData      - see below for format - "-B <file-name>" option for "LoadWeatherData"
RainByMinutesData.ArcData - see below for format - "-R <file-name>" option for "LoadWeatherData"
TempHumidFile.ArcData     - see below for format - "-T <file-name>" option for "LoadWeatherData"
LastWindDirFile.ArcData   - see below for format - "-W <file-name>" option for "LoadWeatherData"
rtdata = Standard output from vproweater's -x option "-r <file-name>" option for "LoadWeatherData"
wxdata = Standard output from vproweater's -g option "-w <file-name>" option for "LoadWeatherData"

New option for "LoadWeatherData" "-C <file-name>" comma separated file created 
using "createFromCSV" in the bin/ directory from your CSV file. See the 
"createFromCSV.conf" file for information on how to do the data conversion.

NOTE: if you have the realtime and graph output in one file you
can change the *FN names below to the one, data won't load twice.

Located in the $ArchDir archive location with the format
/Weather/Archives/<year>/<month>/<day>
where:
       <year>  is the 4 digit year
       <month> is the 2 digit month with leading 0 (zero)
       <day>   is the 2 digit day with leading 0 (zero)

$years is the list of years to process, space delimitated
$month is the months to process in wildcard format
$day   is the days to process in wildcard format

$DST is a list of dates when Daylight Savings Time occurs
     and only those dates when an hour is lost should be
     included in the list


Data File Formats

File: "rtdata"

Normal output from the Real Time data -x option. However a timestamp is
needed in the file of the format:

rtCaptureTimestamp = 2011-03-17 12:22:37 (1300382557)
Or:
CaptureTimestamp = Fri Jan 16 23:59:22 CST 2009
Or:
CaptureTimestamp = Saturday January 16 2010 23:59

File: "wxdata"

Normal output from the Graph data -g option. However a timestamp is
needed in the file of the format:

grCaptureTimestamp = 2011-03-17 12:22:37 (1300382557)
Or:
CaptureTimestamp = Saturday January 16 2010 23:59
Or:
CaptureTimestamp = Saturday January 16 2010 23:59

Rain Storms, and other Hourly data is loaded from the wxdata filer
containing the vProWeather Graph Data in its native format.


If you have been capturing the data using the -Z option to a file
you can make the following files (awk) from that file.

NOTE: All lines start with the Date/Time with no white space at the beginning

File: "BaroPresFile.ArcData"

20090519-00:45  30.089  baro_s  Steady  [OK]
20090519-01:00  30.091  baro_s  Steady  [OK]
20090519-01:15  30.086  baro_fs Falling-Slowly  [OK]
20090519-01:30  30.082  baro_fs Falling-Slowly  [OK]

Column 1 = Date/Time stamp
Column 2 = Barometric Pressure
Column 3 = Barometric Trend Abbreviation
Column 4 = Barometric
Column 5 = [OK] (Indicates this row of data is valid will be ignored otherwise)

File: "RainByMinutesData.ArcData"

20090711-05:18    0.09    0.09    0.01    0.32    yes     [OK]
20090711-05:19    0.11    0.11    0.02    1.76    yes     [OK]
20090711-05:20    0.12    0.12    0.01    0.64    yes     [OK]
20090711-05:21    0.13    0.13    0.01    0.60    yes     [OK]

Column 1 = Date/Time stamp
Column 2 = Daily Rain Amount
Column 3 = Rain Storm Total
Column 4 = Current Rain Amount
Column 5 = Rain Rate
Column 6 = Is Raining (yes/no) 
Column 7 = [OK] (Indicates this row of data is valid will be ignored otherwise)

File: "LastWindDirFile.ArcData" 

20090519-00:06  182     1       S       [OK]
20090519-00:07  205     0       SSW     [OK]
20090519-00:08  202     0       SSW     [OK]
20090519-00:09  193     2       SSW     [OK]

Column 1 = Date/Time stamp
Column 2 = Wind Direction in degrees
Column 3 = Wind Speed
Column 4 = Wind Compass Direction
Column 5 = [OK] (Indicates this row of data is valid will be ignored otherwise)

File: "TempHumidFile.ArcData"

20090519-00:04  72.8    26      55.9    48      55.9    55.9    0       0.001   6       44      [OK]
20090519-00:05  72.8    26      55.9    48      55.9    55.9    0       0.001   6       44      [OK]
20090519-00:06  72.8    26      55.7    48      55.7    55.7    0       0.001   6       44      [OK]
20090519-00:07  72.8    26      55.7    48      55.7    55.7    0       0.001   6       44      [OK]

Column  1 = Date/Time stamp
Column  2 = Indoor Temperature
Column  3 = Indoor Humidity
Column  4 = Outdoor Temperature
Column  5 = Outdoor Humidity
Column  6 = Windchill Temperature
Column  7 = Heat Index
Column  8 = Solar Radiation
Column  9 = Evapotranspiration
Column 10 = Forecast Icon Number
Column 11 = Forecast Rule Number
Column 12 = [OK] (Indicates this row of data is valid will be ignored otherwise)


