# JStrack:  copyright 1997/2010 by Jim Graham, N5IAL, all rights reserved.
#

# A *LOT* of information is stored in arrays and lists.  There is probably
# a much better way to do this...but I'm still a relative beginner with
# Tcl, so don't laugh too much!  Suggestions, on the other hand, are more
# than welcome.
#
# This file basically sets up each array as an empty array.  The rest
# is done as storm information is read.

# For the documentation on each array, the following are assumed:
#
#    * The storm's name is LILI
#    * The forecast/advisory is for 16/2100Z

# stinfo() contains storm data for actual storm positions.
#
# INDEX FORMAT:  LILI16/2100Z

array set stinfo {}

# stfile() contains path/filename for storms currently loaded
array set stfile {}

# advisory_list contains the advisory numbers for stinfo.  Same indexes.

array set advisory_list {}

# stradii() contains the wind radii for the storm
#
# INDEX FORMAT:  LILI16/2100Z34
#       (where the added 34 is for the 34 KT wind radii)

array set stradii {}

# fc_stradii() contains the wind radii for the storm---the second
# timestamp is that of the forecast position (17/0600Z in this case)
#
# INDEX FORMAT:  LILI16/2100Z17/0600Z34
#       (where the added 34 is for the 34 KT wind radii)

array set fc_stradii {}

# st_names contains the names of storms in the plot

set st_names [list]


# st_times() contains the advisory times for each storm
#
# INDEX FORMAT:  "LILI"
#
# Example:  puts "$st_times(LILI)"
# 16/0900Z 16/1500Z 16/2100Z 17/0300Z 17/1500Z 17/2100Z ....

array set st_times {}


# fc_tm_idx() contains the timestamps for each forecast position listed
# in advisories
#
# INDEX FORMAT:  LILI16/2100Z
#
# Example:  puts "$fc_tm_idx(LILI16/2100Z)"
# 17/0600Z 17/1800Z 18/0600Z

array set fc_tm_idx {}


# forecasts() contains the forecast storm data for a given forecast
# position from the forecast/advisory (latt, long, winds, gusts)
#
# INDEX FORMAT:  LILI 16/2100Z 18/0600Z
#
# Example:  puts "$forecasts(LILI 16/2100Z 18/0600Z)"
# 22.1 84.4 81 98

array set forecasts {}

# ok_for_full_test is used in the Tk version when testing for a full
# update.  It is used to test whether or not the storm's track file
# has been read up to (and is now beyond) the previous last entry.

set ok_for_full_test 0

# Used by the procs that support the new format for storms/name.trk
#
set newtrk_used 0
set newtrk_list [list]

# are city/location names loaded?  By default, yes.
set cities_loaded 1


