1 phil 1.1 #! /bin/csh -f
2 #
3 # make test gates and tasks for mdi.fd_M_96m_lev18 96 minute data at lev1.8
4 # If the tasks and gates directories exist only the test gates and tasks will be rebuilt.
5 # If the gates and tasks diretories are not present, they will be created.
6
7 if ($?WORKFLOW_ROOT) then
8 set WFDIR = $WORKFLOW_DATA
9 set WFCODE = $WORKFLOW_ROOT
10 else
11 echo Need WORKFLOW_ROOT variable to be set.
12 exit 1
13 endif
14
15 # Stop the gatekeeper in case it is running.
16
17 cd $WFDIR
18 rm -f Keep_running
19 while (-e GATEKEEPERBUSY)
20 echo waiting for gatekeeper to quit.
21 sleep 5
22 phil 1.1 end
23
24 cd $WFDIR/gates
25 rm -rf mdi.fdM_96m dsds.fdM_96m
26
27 cd $WFDIR/tasks
28 rm -rf update_mdi.fd_M_96m stage_dsds.fd_M_96m
29
30 # Make any user tasks
31
32 cd $WFDIR
33 $WFCODE/maketask.csh task=stage_dsds.fd_M_96m \
34 manager=taskmanager.csh \
35 target=dsds.fdM_96m \
36 command=scripts/stage-dsds_daily_data.csh \
37 maxrange=864000
38
39 $WFCODE/maketask.csh task=update_mdi.fd_M_96m \
40 manager=taskmanager.csh \
41 target=mdi.fdM_96m \
42 command=scripts/update-mdi.fd_M_96m \
43 phil 1.1 # command=/home/phil/jsoc/proj/myproj/apps/fd_M_96m/update-mdi.fd_M_96m \
44 maxrange=864000 \
45 parallelOK=10
46 mkdir tasks/update_mdi.fd_M_96m/preconditions/dsds.fdM_96m
47 echo "set ACTION = 5" > tasks/update_mdi.fd_M_96m/preconditions/dsds.fdM_96m/prepare_ticket
48
49 # Now make any user gates.
50
51 cd $WFDIR
52 # use type time and let the status and action tasks convert to DSDS seriesnumbers
53 $WFCODE/makegate.csh gate_name=dsds.fdM_96m \
54 product=dsds.mdi__lev1_8__fd_M_96m_01d \
55 type=time \
56 key=snum \
57 project=MDI \
58 actiontask=stage_dsds.fd_M_96m \
59 statustask=scripts/status-dsds_daily.csh
60
61 $WFCODE/makegate.csh gate_name=mdi.fdM_96m \
62 product=mdi.fd_M_96m_lev18 \
63 type=time \
64 phil 1.1 key=T_REC \
65 project=MDI \
66 actiontask=update_mdi.fd_M_96m \
67 statustask=scripts/status-general.csh
68
69 # Now, to get things started, initialize the new gates. this is not strictly necessary if the nextupdate
70 # times are defaulted to now.
71
72 cd $WFDIR
73 $WFCODE/maketicket.csh gate=mdi.fdM_96m action=6 wantlow=NaN wanthigh=NaN
74 $WFCODE/maketicket.csh gate=dsds.fdM_96m action=6 wantlow=NaN wanthigh=NaN
75
|