tssa_testj_fd.sh - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
(HTM) git clone git://src.adamsgaard.dk/pism
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
tssa_testj_fd.sh (1310B)
---
1 #!/bin/bash
2
3 # SSAFD verification test J regression test
4
5 PISM_PATH=$1
6 MPIEXEC=$2
7 MPIEXEC_COMMAND="$MPIEXEC -n 2"
8 PISM_SOURCE_DIR=$3
9 EXT=""
10 if [ $# -ge 4 ] && [ "$4" == "-python" ]
11 then
12 PYTHONEXEC=$5
13 MPIEXEC_COMMAND="$MPIEXEC_COMMAND $PYTHONEXEC"
14 PYTHONPATH=${PISM_PATH}/site-packages:${PYTHONPATH}
15 PISM_PATH=${PISM_SOURCE_DIR}/examples/python/ssa_tests
16 EXT=".py"
17 fi
18
19 # List of files to remove when done:
20 files="foo-fd-j.nc foo-fd-j.nc~ test-J-out-fd.txt"
21
22 rm -f $files
23
24 set -e
25
26 OPTS="-verbose 1 -ssa_method fd -o foo-fd-j.nc"
27
28 # do stuff
29 $MPIEXEC_COMMAND $PISM_PATH/ssa_testj${EXT} -Mx 61 -My 61 $OPTS > test-J-out-fd.txt
30 $MPIEXEC_COMMAND $PISM_PATH/ssa_testj${EXT} -Mx 121 -My 121 $OPTS >> test-J-out-fd.txt
31
32 set +e
33
34 # Check results:
35 diff test-J-out-fd.txt - <<END-OF-OUTPUT
36 NUMERICAL ERRORS in velocity relative to exact solution:
37 velocity : maxvector prcntavvec maxu maxv avu avv
38 0.2888 0.08782 0.2584 0.1457 0.1158 0.0933
39 NUM ERRORS DONE
40 NUMERICAL ERRORS in velocity relative to exact solution:
41 velocity : maxvector prcntavvec maxu maxv avu avv
42 0.1689 0.07538 0.1181 0.1339 0.0719 0.1139
43 NUM ERRORS DONE
44 END-OF-OUTPUT
45
46 if [ $? != 0 ];
47 then
48 exit 1
49 fi
50
51 rm -f $files; exit 0