ttest_08.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_08.sh (1000B)
       ---
            1 #!/bin/bash
            2 
            3 PISM_PATH=$1
            4 MPIEXEC=$2
            5 
            6 # Test name:
            7 echo "Test # 8: regridding: coarse -> fine -> coarse (vertical direction)."
            8 # The list of files to delete when done.
            9 files="coarse1-08.nc coarse2-08.nc fine1-08.nc fine2-08.nc"
           10 
           11 # -grid.registration corner is needed to match default settings of pisms
           12 OPTS="-y 0 -grid.registration corner"
           13 
           14 set -e -x
           15 
           16 # Create a file to regrid from:
           17 $PISM_PATH/pisms -energy enthalpy -Mx 10 -My 10 -Mz 11 -y 6000 -max_dt 300.0 -o coarse1-08.nc
           18 # Create another file with a finer grid:
           19 $PISM_PATH/pisms -energy enthalpy -Mx 10 -My 10 -Mz 21 -y 6000 -max_dt 300.0 -o fine1-08.nc
           20 
           21 # Coarse -> fine:
           22 $PISM_PATH/pismr -i fine1-08.nc -regrid_file coarse1-08.nc -regrid_vars enthalpy $OPTS -o fine2-08.nc
           23 # Fine -> coarse:
           24 $PISM_PATH/pismr -i coarse1-08.nc -regrid_file fine2-08.nc -regrid_vars enthalpy $OPTS -o coarse2-08.nc
           25 
           26 set +e
           27 
           28 # Compare:
           29 $PISM_PATH/nccmp.py -t 1e-16 -v enthalpy coarse1-08.nc coarse2-08.nc
           30 if [ $? != 0 ];
           31 then
           32     exit 1
           33 fi
           34 
           35 rm -f $files; exit 0