#! /usr/bin/csh

umask 002

source ~jeneen/campaigns/scripts/env_list.sonar

rm /tmp/peq.redo.jeneen

set today = `/bin/date +%Y.%m.%d`
@ foo = `/home/jeneen/STAGING/bin/_sgi4/time_index -d in=$today`
@ day = $foo - 2
@ hour1 = `/home/jeneen/STAGING/bin/_sgi4/time_index -h day=$day`
@ hour2 = $hour1 + 47
echo "$hour1 $hour2"

foreach dpc ( 48440fc0_01h 46451fc0_01h 46061fc0_01h 48470fc0_01h 49460fc0_01h )
  snqry -pmdi_eof -llev1 -s$dpc -b$hour1 -e$hour2 >> /tmp/peq.redo.jeneen
end
echo ""
cat /tmp/peq.redo.jeneen
echo ""
peq -A -w -t5 -f /tmp/peq.redo.jeneen
 
#/home/jeneen/STAGING/script/mkmaps/fd_M_96m_make_1.5_eof.sh first=$day
#/home/jeneen/STAGING/script/mkmaps/fd_Ic_6h_make_1.5_eof.sh first=$day
/home/soi/CM/script/mkmaps/fd_M_96m_make_1.5_eof.sh first=$day
/home/soi/CM/script/mkmaps/fd_Ic_6h_make_1.5_eof.sh first=$day

@ last = $day - 1
/synoptic/new_scripts/doeofsynop.tmp.pl $day $last
rsh bastet -l jeneen -n "/synoptic/new_scripts/mag_summary_nightly_prev"
