10
|
1 |
#!/usr/bin/perl
|
|
2 |
#======================================================================
|
|
3 |
# C H E C K I X
|
|
4 |
# doc: Wed Dec 12 15:58:56 2012
|
12
|
5 |
# dlm: Mon Apr 22 15:17:17 2013
|
10
|
6 |
# (c) 2012 A.M. Thurnherr
|
12
|
7 |
# uE-Info: 43 0 NIL 0 0 72 2 2 4 NIL ofnI
|
10
|
8 |
#======================================================================
|
|
9 |
|
|
10 |
# HISTORY:
|
|
11 |
# Dec 12, 2012: - created
|
|
12 |
|
12
|
13 |
die("Usage: $0 <count-spec[ ...]>\n")
|
|
14 |
unless (@ARGV > 0);
|
|
15 |
|
|
16 |
foreach my $id (`count @ARGV`) {
|
10
|
17 |
|
12
|
18 |
$id = sprintf('%03d',$id)
|
|
19 |
unless (-f "$id.log");
|
|
20 |
|
|
21 |
unless (-f "$id.log") {
|
|
22 |
print(STDERR "$id: missing station\n");
|
|
23 |
next;
|
|
24 |
}
|
10
|
25 |
|
12
|
26 |
die("$id: file <$id.lad> missing\n") # ensure required output is here
|
|
27 |
unless (-f "$id.lad");
|
|
28 |
die("$id: file <$id.log> missing\n")
|
|
29 |
unless (-f "$id.log");
|
|
30 |
die("$id: file <$id.mat> missing\n")
|
|
31 |
unless (-f "$id.mat");
|
|
32 |
die("$id: file <$id.txt> missing\n")
|
|
33 |
unless (-f "$id.txt");
|
|
34 |
|
|
35 |
if (-f "${id}_11.ps" && # handle warnings figure
|
|
36 |
length(`grep 'LADCP profile OK' ${id}_11.ps`) == 0) {
|
|
37 |
print("$id: warnings produced\n");
|
|
38 |
system("gv ${id}_11.ps &");
|
|
39 |
}
|
|
40 |
|
|
41 |
print("$id: no valid BT data\n") # check validity of ancillary data
|
|
42 |
unless (-f "$id.bot");
|
|
43 |
print("$id: no valid SADCP data\n")
|
|
44 |
unless (length(`grep 'all SADCP values removed' $id.log`) == 0);
|
10
|
45 |
|
|
46 |
}
|
|
47 |
|
12
|
48 |
exit(0);
|