Ticket #377: test3.sh

File test3.sh, 2.1 KB (added by Ian Culverwell, 7 years ago)

test3.sh

Line 
1#/usr/bin/ksh
2#
3# Script to compare ROPP9.0 and ROPP9.1 versions of GNOS code.
4# Third test: BUFR decoding/encoding.
5#
6
7ulimit -S -s unlimited
8
9IFILE0=data/A_IUTA14BAWX160008_C_BAWX_20170616025049.bin
10
11#------------------------------------------------------
12#0. Cntl: ROPP9.0
13#------------------------------------------------------
14
15#if false ; then # bypass the control
16
17EXEC_DIR=$ROPP_ROOT/ropp_src/branches/dev/Share/ROPP90_prototype/ropp_io/tools
18
19TOOL=bufr2ropp ; EXEC=$EXEC_DIR/$TOOL
20
21IFILE=$IFILE0
22
23OFILE=$(echo $IFILE0 |sed -es/'.bin'/'_cntl1.nc'/)
24
25TFILE=$(echo $IFILE0 |sed -es/'.bin'/'_cntl1.out'/)
26
27echo "$EXEC $IFILE -o $OFILE -d > $TFILE 2>&1"
28 $EXEC $IFILE -o $OFILE -d > $TFILE 2>&1
29
30OFILE2=$(echo $OFILE |sed -es/'.nc'/'.nd'/)
31
32ncdump $OFILE > $OFILE2
33
34TOOL=ropp2bufr ; EXEC=$EXEC_DIR/$TOOL
35
36IFILE=$OFILE
37
38OFILE3=$(echo $IFILE0 |sed -es/'.bin'/'_cntl1.bufr'/)
39
40echo "$EXEC $IFILE -o $OFILE3 -d >> $TFILE 2>&1"
41 $EXEC $IFILE -o $OFILE3 -d >> $TFILE 2>&1
42
43OFILE4=$(echo $OFILE3 |sed -es/'.bufr'/'.decbufr'/)
44
45decbufr -d $OFILE3 > $OFILE4
46
47#fi # bypass the control
48
49#------------------------------------------------------
50#1. Test: ROPP9.1/ic_gnos
51#------------------------------------------------------
52
53#if false ; then # bypass the test
54
55#EXEC_DIR=$ROPP_ROOT/ropp_src/branches/dev/Share/ROPP91_prototype/ropp_pp/tools
56EXEC_DIR=$ROPP_ROOT/ropp_src/branches/dev/Share/ic_gnos/ropp_io/tools
57
58TOOL=bufr2ropp ; EXEC=$EXEC_DIR/$TOOL
59
60IFILE=$IFILE0
61
62OFILE=$(echo $IFILE0 |sed -es/'.bin'/'_test1.nc'/)
63
64TFILE=$(echo $IFILE0 |sed -es/'.bin'/'_test1.out'/)
65
66echo "$EXEC $IFILE -o $OFILE -d > $TFILE 2>&1"
67 $EXEC $IFILE -o $OFILE -d > $TFILE 2>&1
68
69OFILE2=$(echo $OFILE |sed -es/'.nc'/'.nd'/)
70
71ncdump $OFILE > $OFILE2
72
73TOOL=ropp2bufr ; EXEC=$EXEC_DIR/$TOOL
74
75IFILE=$OFILE
76
77OFILE3=$(echo $IFILE0 |sed -es/'.bin'/'_test1.bufr'/)
78
79echo "$EXEC $IFILE -o $OFILE3 -d >> $TFILE 2>&1"
80 $EXEC $IFILE -o $OFILE3 -d >> $TFILE 2>&1
81
82OFILE4=$(echo $OFILE3 |sed -es/'.bufr'/'.decbufr'/)
83
84decbufr -d $OFILE3 > $OFILE4
85
86#fi # bypass the test