##########################################################

Wind Speed Probability Scripts - 2008 Tropical Season

##########################################################

Below is a description of the scripts that are called to create the wind speed 
probability graphics for the 2008 tropical season.  These scripts have been
modified to work at HPC in case of the need for a backup.

The script "fourpanel" is the primary driver for the wind speed probabilities.
It calls the script "windprob.pl" and passes to it the date and cycle, 
e.g.  windprob.pl 2008072506

------------------------------------------
windprob.pl

The main perl script from which the graphics are created.  It functions to:
 - copy all of the necessary perl scripts, images, and tables from 
   $opsdir/wndprb_2008 (/export-5/ncosrvnfs/hpcops/wndprb_2008)
 - set up all necessary directories, using the configuration file "windProbs_config.pl"
 - creates a lock file, so that it cannot be run more than once at a time.
 - gets the date/cycle argument passed from "fourpanel" and runs a while loop
   which checks for the appropriate grib file.  If the file isn't available, it'll
   sleep for 5 minutes at a time up to 1 hour.  If nothing is found after an hour
   it'll exit.

 - the grib files are located in /export-3/ncosrvnfs/model/misc/wndprb
 - once it finds a grib file, it runs nagrib to make a grid file.  It must have
   the ncepgrib2.tbl to decode it properly...this is in $opsdir/wndprb_2008.

 - it calls "getStormInfo.pl" and passes the grid file as an argument.

Note: There is code for processing prelim graphics from the ATCF.  HPC does not have
      this capability, but it is not necessary.

----------------------------------------------
windProbs_config.pl

This is a configuration file that sets numerous variables that are referenced from 
all of the perl scripts used to create the probability graphics.  It is a very important
file.

IMPORTANT:  The 'sendToWeb' variable is set to 0.  If sending to the backup server, this
            must be set to 1.  

-----------------------------------------------
getStormInfo.pl

This script gathers all information from the active storm at the specified date/time
and prints the data to a text file.  Once it obtains that information, it will call 
a driver script to begin the graphics production using the text file as input.

Additional information:
- The script initially attempts to gather the information about the storm from an
  "adv.txt" file in the wgraph/adv directory.  However, this directory is not located 
  on the CCS, so it attempts the second level file, this one in the /mar directory.  This will
  be available at all times...the adv.txt file is not a necessity.  
- If for some reason, there is no corners file, it may attempt to generate one using a 
  compiled code...findcorners.exe.  This code has NOT been tested.  It probably won't be 
  necessary, but regardless...it's not been tested.

------------------------------------------------
windProbs_driver.pl

Manages the process of creating the wind speed probability graphics and is called from 
"getStormInfo.pl".  It reads the "plotParams" text file created by the previous perl script.

It does the following:
- sets up the working directory environment, including creating a log of all processes.
  (it also generates a lock file...so there are 2 levels of locks running at one time)
- Reads the data and fills a data structure that GEMPAK can read.
- Checks the data and will not process files with missing information.
- Loops through all of the forecast hours from F000-F120, calling the script "windProbs_plot.pl"
  to do the actual plotting.

--------------------------------------------------
windProbs_plot.pl

This actually does the plotting, using the data structures generated by the driver script.
Essentially, it's a long script, but it's main function is to write out and run a bourne
shell script containing the gempak calls to make the graphic.  HPC slightly modified this
code due to the fact that none of the linux machines the backup is run on have the
latest version of ImageMagick.  Specifically, the "annotate" command in 'convert' is only 
available on RHEL4 boxes.  So...a workaround is coded.



