#! /usr/bin/csh -f @ cr = $argv[1] set TWD = /synoptic/new_scripts/Ic_synop/CR$cr if !(-e $TWD) then mkdir $TWD else echo Warning $TWD already exists, overwriting files in 5 seconds if (-e map.$cr) then echo map.$cr already exists, copying to map.$cr.old cp map.$cr map.$cr.old endif sleep 5 endif echo $cr > $TWD/cr$cr ~kehcheng/work/synop/carrot < $TWD/cr$cr > $TWD/cr$cr.Ic set t_first = `grep T_FIRST $TWD/cr$cr.Ic | awk '{print $3}'` set t_last = `grep T_LAST $TWD/cr$cr.Ic | awk '{print $3}'` @ first = `time_index -d in=$t_first` @ last = `time_index -d in=$t_last` @ start = $first - 2 @ end = $last + 2 echo Retrieving data for $cr using days $start to $end snqry -pmdi -llev1.5 -sfd_Ic_6h_01d -b$start -e$end > $TWD/peq.$cr /home/jeneen/campaigns/scripts/tapes $TWD/peq.$cr peq -A -w -f $TWD/peq.$cr awk -F\[ '{print $2}' $TWD/peq.$cr | awk -F\] '{print $1}' > $TWD/peq.list.$cr @ first = `head -1 $TWD/peq.list.$cr` make_list.pl $TWD/peq.list.$cr $first $cr echo DONE > $TWD/GETDATA_COMPLETE