ttest_23.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
---
ttest_23.sh (823B)
---
1 #!/bin/bash
2
3 PISM_PATH=$1
4 MPIEXEC=$2
5
6 # Test name:
7 echo "Test #23: comparing restart: '-i file.nc' vs '-i file.nc -bootstrap' & '-regrid_file'."
8 # The list of files to delete when done.
9 files="foo-23.nc bar-23.nc"
10
11 bedrock="-Mbz 11 -Lbz 1000"
12 opts="-Mx 21 -My 21 -Mz 31 -Lz 4000 $bedrock -o_size small"
13
14 rm -f $files
15
16 set -e -x
17
18 # create foo-23.nc (at about 6500 years we get some basal melting...)
19 $MPIEXEC -n 2 $PISM_PATH/pisms -energy enthalpy -y 6500 $opts -o foo-23.nc
20
21 # bootstrap from it, re-gridding all the variables we can
22 $PISM_PATH/pismr -i foo-23.nc -bootstrap -regrid_file foo-23.nc -y 0 $opts -o bar-23.nc
23
24 set +e
25
26 # compare results (foo-23.nc and bar-23.nc contain model_state variables only)
27 $PISM_PATH/nccmp.py -x -v timestamp foo-23.nc bar-23.nc
28 if [ $? != 0 ];
29 then
30 exit 1
31 fi
32
33 rm -f $files; exit 0
34