Ticket #545: test.sh

File test.sh, 4.1 KB (added by Ian Culverwell, 5 years ago)

test.sh

Line 
1#/usr/bin/ksh
2#
3# Script to test the ROPP9.0 version of in ropp_fm_bg2ro_1d.f90
4#
5
6TOOL=ropp_fm_bg2ro_1d
7#EXEC=/data/nwp1/idculv/ROPP/ifort/bin/$TOOL
8EXEC=/data/nwp1/idculv/ROPP/ifort17/bin/$TOOL
9
10
11#IFILE=data/WOP_Study_Cases.nc
12IFILE=data/WOP_Study_Cases_prof3.nc
13#IFILE=data/WOP_Study_Cases_prof3_cntl1.nc
14#IFILE=data/WOP_Study_Cases_prof3_test1.nc
15#IFILE=data/WOP_Study_Cases_prof3_test2.nc
16#IFILE=data/WOP_Study_Cases_prof3_test3.nc
17#IFILE=data/WOP_Study_Cases_prof3_test4.nc
18#IFILE=data/WOP_Study_Cases_prof3_test5.nc
19#IFILE=data/WOP_Study_Cases_prof3_cntl1_cntl1.nc
20#IFILE=data/WOP_Study_Cases_prof4.nc
21#IFILE=data/WOP_Study_Cases_247L_prof4.nc
22#IFILE=data/WOP_Study_Cases_247L_prof5.nc
23#IFILE=data/WOP_Study_Cases_313L_prof5.nc
24#IFILE=data/WOP_Study_Cases_prof10.nc
25#IFILE=data/WOP_Study_Cases_prof12.nc
26#IFILE=data/WOP_Study_Cases_prof17.nc
27#IFILE=data/WOP_Study_Cases_prof18.nc
28#IFILE=data/WOP_Study_Cases_prof22.nc
29#IFILE=data/WOP_Study_Cases_prof37.nc
30#IFILE=data/WOP_Study_Cases_prof49.nc
31
32
33# Cntl1: 300L refrac and bangle
34
35OFILE=`echo $IFILE |sed -es/'.nc'/'_cntl1.nc'/`
36TFILE=`echo $IFILE |sed -es/'.nc'/'_cntl1.out'/`
37
38
39echo "$EXEC $IFILE -o $OFILE -d > $TFILE 2>&1 "
40 $EXEC $IFILE -o $OFILE -d > $TFILE 2>&1
41
42echo "ncdump -h $OFILE > $(echo $OFILE |sed -es/'.nc'/'.nd'/) "
43 ncdump -h $OFILE > $(echo $OFILE |sed -es/'.nc'/'.nd'/)
44
45
46# Cntl2: 300L refrac and bangle defined through default namelist
47
48OFILE=`echo $IFILE |sed -es/'.nc'/'_cntl2.nc'/`
49TFILE=`echo $IFILE |sed -es/'.nc'/'_cntl2.out'/`
50CFILE=default_fm.nml
51
52echo "$EXEC $IFILE -c $CFILE -o $OFILE -d > $TFILE 2>&1 "
53 $EXEC $IFILE -c $CFILE -o $OFILE -d > $TFILE 2>&1
54
55echo "ncdump -h $OFILE > $(echo $OFILE |sed -es/'.nc'/'.nd'/) "
56 ncdump -h $OFILE > $(echo $OFILE |sed -es/'.nc'/'.nd'/)
57
58
59# Test1: 247L
60
61OFILE=`echo $IFILE |sed -es/'.nc'/'_test1.nc'/`
62TFILE=`echo $IFILE |sed -es/'.nc'/'_test1.out'/`
63LFILE=$IFILE
64
65echo "$EXEC $IFILE -247L -o $OFILE -d > $TFILE 2>&1 "
66 $EXEC $IFILE -247L -o $OFILE -d > $TFILE 2>&1
67
68echo "ncdump -h $OFILE > $(echo $OFILE |sed -es/'.nc'/'.nd'/) "
69 ncdump -h $OFILE > $(echo $OFILE |sed -es/'.nc'/'.nd'/)
70
71
72# Test2: refrac only
73
74OFILE=`echo $IFILE |sed -es/'.nc'/'_test2.nc'/`
75TFILE=`echo $IFILE |sed -es/'.nc'/'_test2.out'/`
76
77echo "$EXEC $IFILE -refrac_only -o $OFILE -d > $TFILE 2>&1 "
78 $EXEC $IFILE -refrac_only -o $OFILE -d > $TFILE 2>&1
79
80echo "ncdump -h $OFILE > $(echo $OFILE |sed -es/'.nc'/'.nd'/) "
81 ncdump -h $OFILE > $(echo $OFILE |sed -es/'.nc'/'.nd'/)
82
83
84# Test3: bangle only
85
86OFILE=`echo $IFILE |sed -es/'.nc'/'_test3.nc'/`
87TFILE=`echo $IFILE |sed -es/'.nc'/'_test3.out'/`
88
89echo "$EXEC $IFILE -bangle_only -o $OFILE -d > $TFILE 2>&1 "
90 $EXEC $IFILE -bangle_only -o $OFILE -d > $TFILE 2>&1
91
92echo "ncdump -h $OFILE > $(echo $OFILE |sed -es/'.nc'/'.nd'/) "
93 ncdump -h $OFILE > $(echo $OFILE |sed -es/'.nc'/'.nd'/)
94
95
96# Test4: 'best' config file
97
98OFILE=`echo $IFILE |sed -es/'.nc'/'_test4.nc'/`
99TFILE=`echo $IFILE |sed -es/'.nc'/'_test4.out'/`
100#CFILE=test.nml
101CFILE=best_fm.nml
102
103echo "$EXEC $IFILE -c $CFILE -o $OFILE -d > $TFILE 2>&1 "
104 $EXEC $IFILE -c $CFILE -o $OFILE -d > $TFILE 2>&1
105
106echo "ncdump -h $OFILE > $(echo $OFILE |sed -es/'.nc'/'.nd'/) "
107 ncdump -h $OFILE > $(echo $OFILE |sed -es/'.nc'/'.nd'/)
108
109
110# Test5: 'best' options (should give the same results as Test4)
111
112OFILE=`echo $IFILE |sed -es/'.nc'/'_test5.nc'/`
113TFILE=`echo $IFILE |sed -es/'.nc'/'_test5.out'/`
114
115echo "$EXEC $IFILE -best -o $OFILE -d > $TFILE 2>&1 "
116 $EXEC $IFILE -best -o $OFILE -d > $TFILE 2>&1
117
118echo "ncdump -h $OFILE > $(echo $OFILE |sed -es/'.nc'/'.nd'/) "
119 ncdump -h $OFILE > $(echo $OFILE |sed -es/'.nc'/'.nd'/)
120
121
122# Test6: read levels from a file
123
124OFILE=`echo $IFILE |sed -es/'.nc'/'_test6.nc'/`
125TFILE=`echo $IFILE |sed -es/'.nc'/'_test6.out'/`
126LFILE=`echo $IFILE |sed -es/'.nc'/'_cntl1.nc'/` # i.e. the 300L refrac and bangle
127
128echo "$EXEC $IFILE -l $LFILE -o $OFILE -d > $TFILE 2>&1 "
129 $EXEC $IFILE -l $LFILE -o $OFILE -d > $TFILE 2>&1
130
131echo "ncdump -h $OFILE > $(echo $OFILE |sed -es/'.nc'/'.nd'/) "
132 ncdump -h $OFILE > $(echo $OFILE |sed -es/'.nc'/'.nd'/)
133
134
135exit