ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/JSOC/proj/workflow/scripts/start_hmi_daily.csh
Revision: 1.4
Committed: Mon Jan 10 21:01:43 2011 UTC (12 years, 8 months ago) by phil
Content type: application/x-csh
Branch: MAIN
CVS Tags: Ver_6-0, Ver_6-1, Ver_6-2, Ver_6-3, Ver_6-4, Ver_5-14, Ver_5-13, Ver_8-0, Ver_7-1, Ver_7-0
Changes since 1.3: +2 -1 lines
Log Message:
misc relocation patches, turn off image making in daily hmi

File Contents

# Content
1 #! /bin/csh -f
2
3 # Generate HMI daily products for all days from wantlow to wanthigh,
4 # one day at a time from standard TAI offsets.
5 # make a ticket for the first day after wanthigh to be run next.
6
7 set WFDIR = $WORKFLOW_DATA
8 set WFCODE = $WORKFLOW_ROOT
9
10 # Note that start/stop minute are hour 23 minute 54 for LOS and 24 for vector.
11 @ LOS_offset = 6 * 60
12 @ VEC_offset = 36 * 60
13 @ lev1_offset = 150
14
15 set WANTLOW = `cat wantlow`
16 set WANTHIGH = `cat wanthigh`
17
18 set WANTLOW_t = `time_convert time=$WANTLOW`
19 set WANTHIGH_t = `time_convert time=$WANTHIGH`
20
21 @ WANTLOW_D = $WANTLOW_t / 86400
22 # now WANTLOW_D is TAI of day containing WANTLOW
23
24 @ WANTHIGH_D = $WANTHIGH_t / 86400
25 # now WANTHIGH_D is TAI of day containing WANTHIGH
26
27
28 @ WANTNEXTLOW_D = $WANTHIGH_D + 1
29 @ WANTNEXTLOW_T = $WANTNEXTLOW_D * 86400
30 @ WANTNEXTHIGH_T = $WANTNEXTLOW_T + 86400
31 @ WANTNEXTHIGH_T = $WANTNEXTHIGH_T - $LOS_offset
32 @ WANTNEXTHIGH_T = $WANTNEXTHIGH_T + $lev1_offset
33 set WANTNEXTLOW = `time_convert zone=TAI s=$WANTNEXTLOW_T` # 0 TAI of next day
34 set WANTNEXTHIGH = `time_convert zone=TAI s=$WANTNEXTHIGH_T` # just before end of next day
35
36 # This ticket will wait for this gate precondition of lev1 and cosmic_rays done at least to the bounding times
37 $WFCODE/maketicket.csh gate=repeat_hmi_daily wantlow=$WANTNEXTLOW wanthigh=$WANTNEXTHIGH action=5
38
39 # First get taskid of the current instance, it is the name of the current directory
40 set TASKID = $cwd:t
41
42 set WORKDAY_D = $WANTLOW_D
43 while ($WORKDAY_D <= $WANTHIGH_D)
44 @ WORKDAY_T = $WORKDAY_D * 86400
45 set WORKDAY = `time_convert zone=TAI s=$WORKDAY_T`
46 echo Start day $WORKDAY
47
48 # base high
49 @ LOSLOW_T = $WORKDAY_T - $LOS_offset
50 @ LOSHIGH_T = $LOSLOW_T + 86400
51 @ IMGHIGH_T = $LOSHIGH_T - 45
52 @ VECLOW_T = $WORKDAY_T - $VEC_offset
53 @ VECHIGH_T = $VECLOW_T + 86400
54
55 set LOSLOW = `time_convert zone=TAI s=$LOSLOW_T`
56 set LOSHIGH = `time_convert zone=TAI s=$LOSHIGH_T`
57 set IMGHIGH = `time_convert zone=TAI s=$IMGHIGH_T`
58 set VECLOW = `time_convert zone=TAI s=$VECLOW_T`
59 set VECHIGH = `time_convert zone=TAI s=$VECHIGH_T`
60
61 # now make tickets to compute the desired products for this day
62 set LOSARGS = "gate=hmi.LOS taskid=$TASKID wantlow=$LOSLOW wanthigh=$LOSHIGH action=5"
63 # webImages runs with precondition for nrt data
64 # set IMGARGS = "gate=hmi.webImages taskid=$TASKID wantlow=$LOSLOW wanthigh=$IMGHIGH action=5"
65 set VECARGS = "gate=hmi.Vector taskid=$TASKID wantlow=$VECLOW wanthigh=$VECHIGH action=5"
66
67 set LOS_TICKET = `$WFCODE/maketicket.csh $LOSARGS `
68 set VEC_TICKET = `$WFCODE/maketicket.csh $VECARGS `
69 # set IMG_TICKET = `$WFCODE/maketicket.csh $IMGARGS `
70 set IMG_TICKET = NOTYET
71
72 cd pending_tickets
73 while ((-e $LOS_TICKET || -e $IMG_TICKET || -e $VEC_TICKET))
74 echo -n '.'
75 sleep 3600
76 end
77
78 @ WORKDAY_D = $WORKDAY_D + 1
79 end
80
81 exit 0