#!/usr/bin/env tcsh

cd /home/thmsoc/asi_cronjobs

unsetenv IDL_PATH
setenv IDL_BASE_DIR /home/thmsoc/l2_cronjobs/idl_base_dir
setenv IDL_STARTUP /home/thmsoc/asi_cronjobs/alt_idl_startup.pro
source /usr/local/setup/setup_idl6.3

setenv IDL_PATH $IDL_PATH':'+$IDL_BASE_DIR/themis
setenv IDL_PATH $IDL_PATH':'+$IDL_BASE_DIR/ssl_general
setenv IDL_PATH $IDL_PATH':'+$IDL_BASE_DIR/external
setenv IDL_PATH $IDL_PATH':'+/disks/sprite/disk1/hfrey/idl/themis-gbo
setenv IDL_PATH $IDL_PATH':'+/disks/socware/thmsoc/my_socware_src

setenv datestr `date -u +%Y-%m-%d`

rm -f thm_asi_shell.bm
rm -f thm_asi_log.txt

set line="thm_asi_shell, /keograms, data_start_date='2007-01-01',search_start_date='2007-04-11'"
echo $line > thm_asi_shell.bm
echo exit >> thm_asi_shell.bm

echo 'Starting' > thm_asi_log.txt
echo $datestr >> thm_asi_log.txt

idl thm_asi_shell.bm >> thm_asi_log.txt

echo 'Ending' >> thm_asi_log.txt

rm -f thm_asi_shell.bm

