Repository navigation
Expand file tree
/
Copy pathupdate_mdi.csh
More file actions
48 lines (37 loc) · 1.51 KB
/
Copy pathupdate_mdi.csh
File metadata and controls
48 lines (37 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#! /bin/csh -f
if ( ! $?WORKFLOW_DATA ) then
echo WORKFLOW_DATA environment variable is undefined
exit 1
endif
if ( ! $?WORKFLOW_DIR ) then
echo WORKFLOW_DIR environment variable is undefined
exit 1
endif
# Ugh
set CTIMES = /home/wso/bin/_linux4/ctimes
set MAKE_TICKET = $WORKFLOW_DIR/maketicket.csh
set TIME_CONVERT = "${DRMS_BINS_INSTALL_DIR}"/time_convert
set WAIT_TICKET = "${WORKFLOW_DIR}/wait_ticket.csh"
cd $WORKFLOW_DIR
set dsdshigh = `cat $WORKFLOW_DATA/gates/dsds.vwV/high`
set dsdshigh_t = `$TIME_CONVERT time=$dsdshigh`
@ dsdsblock = 6 * 3600
@ dsdshigh_t = $dsdshigh_t + $dsdsblock
set dsdshigh = `$TIME_CONVERT zone=TAI s=$dsdshigh_t`
set update = `$MAKE_TICKET gate=mdi.vwV wantlow=$dsdshigh wanthigh=$dsdshigh action=2`
$WAIT_TICKET $update
set mdihigh = `cat $WORKFLOW_DATA/gates/mdi.vwV/high`
set mdihigh_t = `$TIME_CONVERT time=$mdihigh`
@ mdihigh_t = $mdihigh_t + 60
set mdihigh = `$TIME_CONVERT zone=TAI s=$mdihigh_t`
$MAKE_TICKET gate=mdi.vwV wantlow=$mdihigh wanthigh=$dsdshigh action=5
$MAKE_TICKET gate=mdi.fdV wantlow=$mdihigh wanthigh=$dsdshigh action=5
$MAKE_TICKET gate=mdi.fdM wantlow=$mdihigh wanthigh=$dsdshigh action=5
$MAKE_TICKET gate=mdi.fdM_96m wantlow=$mdihigh wanthigh=$dsdshigh action=5
set synophigh = `cat $WORKFLOW_DATA/gates/mdi.Synop/high`
set fdMhigh = `$CTIMES -c $dsdshigh`
set crhigh = `echo $fdMhigh | sed -e 's/CT//' -e 's/:.*//'`
if ($crhigh > $synophigh) then
@ cr = $synophigh + 1
$MAKE_TICKET gate=mdi.Synop wantlow=$cr wanthigh=$crhigh action=5
endif