Ticket #585: test1.sh

File test1.sh, 2.3 KB (added by Ian Culverwell, 5 years ago)

test1.sh

Line 
1#/usr/bin/ksh
2#
3# Script to test the 'old' and 'new' definitions of impact_height
4# in the ROPP10.0 version of ucar2ropp
5#
6
7ulimit -S -s unlimited
8
9IFILE0=data/atmPrf_C006.2019.213.00.21.G07_0001.0001_nc
10
11#------------------------------------------------------
12#0. Cntl: ROPP9.1
13#------------------------------------------------------
14
15#if false ; then # bypass the control
16
17EXEC_DIR=$ROPP_ROOT/ropp_src/branches/dev/Share/ROPP91_prototype/ropp_io/tools
18
19TOOL=ucar2ropp ; EXEC=$EXEC_DIR/$TOOL
20
21IFILE=$IFILE0
22
23OFILE=$(echo $IFILE0 |sed -es/'.nc'/'_cntl1.nc'/)
24
25TFILE=$(echo $IFILE0 |sed -es/'.nc'/'_cntl1.out'/) ; rm -f $TFILE
26
27echo "$EXEC $IFILE -o $OFILE -d >> $TFILE 2>&1"
28 $EXEC $IFILE -o $OFILE -d >> $TFILE 2>&1
29
30echo "ncks -H -Q -ddim_lev1b,0,4 -vimpact,undulation $OFILE" >> $TFILE
31 ncks -H -Q -ddim_lev1b,0,4 -vimpact,undulation $OFILE >> $TFILE
32
33#fi # bypass the control
34
35#------------------------------------------------------
36#1. Test1: ROPP10.0 using 'old' definition
37#------------------------------------------------------
38
39#if false ; then # bypass the test
40
41EXEC_DIR=$ROPP_ROOT/ropp_src/branches/dev/Share/ROPP100_prototype/ropp_io/tools
42
43TOOL=ucar2ropp ; EXEC=$EXEC_DIR/$TOOL
44
45IFILE=$IFILE0
46
47OFILE=$(echo $IFILE0 |sed -es/'.nc'/'_test1.nc'/)
48
49TFILE=$(echo $IFILE0 |sed -es/'.nc'/'_test1.out'/) ; rm -f $TFILE
50
51echo "$EXEC $IFILE -o $OFILE -x -d >> $TFILE 2>&1"
52 $EXEC $IFILE -o $OFILE -x -d >> $TFILE 2>&1
53
54echo "ncks -H -Q -ddim_lev1b,0,4 -vimpact,undulation $OFILE" >> $TFILE
55 ncks -H -Q -ddim_lev1b,0,4 -vimpact,undulation $OFILE >> $TFILE
56
57#fi # bypass the test
58
59#------------------------------------------------------
60#2. Test2: ROPP10.0 using 'new' definition
61#------------------------------------------------------
62
63#if false ; then # bypass the test
64
65EXEC_DIR=$ROPP_ROOT/ropp_src/branches/dev/Share/ROPP100_prototype/ropp_io/tools
66
67TOOL=ucar2ropp ; EXEC=$EXEC_DIR/$TOOL
68
69IFILE=$IFILE0
70
71OFILE=$(echo $IFILE0 |sed -es/'.nc'/'_test2.nc'/)
72
73TFILE=$(echo $IFILE0 |sed -es/'.nc'/'_test2.out'/) ; rm -f $TFILE
74
75echo "$EXEC $IFILE -o $OFILE -d >> $TFILE 2>&1"
76 $EXEC $IFILE -o $OFILE -d >> $TFILE 2>&1
77
78echo "ncks -H -Q -ddim_lev1b,0,4 -vimpact,undulation $OFILE" >> $TFILE
79 ncks -H -Q -ddim_lev1b,0,4 -vimpact,undulation $OFILE >> $TFILE
80
81#fi # bypass the test