Revision: | 1.1 |
Committed: | Sun Jan 2 22:13:25 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_9-1, Ver_5-14, Ver_5-13, Ver_LATEST, Ver_9-3, Ver_9-41, Ver_9-2, Ver_8-8, Ver_8-2, Ver_8-3, Ver_8-0, Ver_8-1, Ver_8-6, Ver_8-7, Ver_8-4, Ver_8-5, Ver_7-1, Ver_7-0, Ver_9-5, Ver_9-4, Ver_8-10, Ver_8-11, Ver_8-12, Ver_9-0, HEAD |
Log Message: | Initial commit, copied from ~phil/workflow/scripts |
# | Content |
---|---|
1 | #! /bin/csh -f |
2 | |
3 | set noglob |
4 | |
5 | echo starting $0 $* |
6 | # set echo |
7 | |
8 | if ($?WORKFLOW_ROOT) then |
9 | set WFDIR = $WORKFLOW_DATA |
10 | set WFCODE = $WORKFLOW_ROOT |
11 | else |
12 | echo Need WORKFLOW_ROOT variable to be set. |
13 | exit 1 |
14 | endif |
15 | |
16 | cd $WFDIR/gates |
17 | set gate = $1 |
18 | cd $gate |
19 | |
20 | set product = `cat product` |
21 | set key = `cat key` |
22 | set low = `cat low` |
23 | set high = `cat high` |
24 | set nancount = 0 |
25 | |
26 | if ($low == "NaN") then |
27 | set nancount = 1 |
28 | #show_info -q $product'[^]' key=$key > low |
29 | echo 1996.05.01_00:00:00_TAI > low |
30 | if ($?) then |
31 | echo $0 $* FAILED |
32 | exit 1 |
33 | endif |
34 | set nlow = `wc -c <low` |
35 | if ($nlow == 0) then # There are no records in the series |
36 | echo "NaN" > low |
37 | endif |
38 | endif |
39 | set low = `cat low` |
40 | |
41 | |
42 | if ($high == "NaN") @ nancount = $nancount + 1 |
43 | |
44 | show_info -q $product'[$]' key=$key > high |
45 | if ($?) then |
46 | echo $0 $* FAILED |
47 | exit 1 |
48 | endif |
49 | set nhigh = `wc -c <high` |
50 | if ($nhigh == 0) then # There are no records in the series |
51 | echo "NaN" > high |
52 | endif |
53 | set high = `cat high` |
54 | |
55 | if ($#argv > 1) then # get coverage map |
56 | set minlow = $low |
57 | set maxhigh = $high |
58 | set miscargs |
59 | shift |
60 | while ($#argv > 0) |
61 | if ($1 =~ low=*) then |
62 | set $1 |
63 | else if ($1 =~ high=*) then |
64 | set $1 |
65 | else |
66 | set miscargs = "$miscargs $1" |
67 | endif |
68 | shift |
69 | end |
70 | if ($nancount == 2) then |
71 | show_coverage ds=$product low=$minlow high=$maxhigh -iq $miscargs > coverage |
72 | else |
73 | show_coverage ds=$product low=$low high=$high -iq $miscargs |
74 | endif |
75 | |
76 | endif |
77 | |
78 | set nowtxt = `date -u +%Y.%m.%d_%H:%M:%S` |
79 | echo $nowtxt > lastupdate |
80 | |
81 | rm -f statusbusy |