#!/usr/bin/env tcsh

unsetenv IDL_PATH
setenv IDL_BASE_DIR /home/thmsoc/l2_cronjobs/idl_base_dir
setenv IDL_STARTUP /home/thmsoc/asi_mosaic_cronjob/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':'+$IDL_BASE_DIR/thmsoc

setenv datestr `date -u`

rm -f /home/thmsoc/asi_mosaic_cronjob_spc/thm_asi_mosaic.bm
rm -f /tmp/mosaic.otp

set line="run_create_themis_mosaics_day,2009,2,6"
echo $line > /home/thmsoc/asi_mosaic_cronjob_spc/thm_asi_mosaic.bm
set line="run_create_themis_mosaics_day,2009,2,7"
echo $line >> /home/thmsoc/asi_mosaic_cronjob_spc/thm_asi_mosaic.bm
set line="run_create_themis_mosaics_day,2009,2,8"
echo $line >> /home/thmsoc/asi_mosaic_cronjob_spc/thm_asi_mosaic.bm
echo exit >> /home/thmsoc/asi_mosaic_cronjob_spc/thm_asi_mosaic.bm

idl /home/thmsoc/asi_mosaic_cronjob_spc/thm_asi_mosaic.bm > /tmp/mosaic.otp
