;------------------ INPUT PARAMETERS ----------------------------------
;sat:  'A' for Ahead, 'B' for Behind
;
;          
;
;time:       Start date/time string in tplot format ('yyyy-mm-dd/hh:mm:ss')
;num_days:   Set the time span in days
;
;output_dir:  where to put the output files
;table_location:  where the ESA and efficiency tables are stored
;            
;----------------------------------------------------------------------

sat ='B'


; Enter the day and time for the start of the plot, and then the duration.
time='2013-12-26/00:00:00' ; year, month, day, hour, minute, second 
num_days=7
timespan, time, num_days, /DAYS ; Presently set up to run only in units of days
  
;----------------------------------------------------------------------
; Here is the location of the ESA and efficiency tabls
;----------------------------------------------------------------------
table_location = '/home/lorna/splat/Tables/'

;----------------------------------------------------------------------
; CALCULATE BULK PARAMETERS AND MAKE TPLOT VARIABLES
;----------------------------------------------------------------------
set_com_high_res
set_com_mon
pl_calc_alpha_bulk_from_crib, sat, time, num_days, table_location, /INST_COORD
