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