/[MITgcm]/MITgcm_contrib/heimbach/OpenAD/doDiff.bash
ViewVC logotype

Annotation of /MITgcm_contrib/heimbach/OpenAD/doDiff.bash

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Fri Oct 24 11:43:13 2008 UTC (16 years, 8 months ago) by utke
Branch: MAIN
Changes since 1.1: +10 -1 lines
fix for cron test

1 utke 1.1 function Usage {
2     echo "Usage: $0 <testName>"
3     echo " where <testName> is for instance shallow_openad"
4     echo " executed in code_<testName>/RefTrans"
5     }
6     if [ $# -ne 1 ]
7     then
8     echo "Error: missing argument"
9     Usage $*
10     exit -1
11     fi
12     testName=$1
13     currPath=${PWD%%/code_${testName}/RefTrans}
14     if [ "$currPath/code_${testName}/RefTrans" != "$PWD" ]
15     then
16     echo "Error: not in code_${testName}/RefTrans"
17     Usage $*
18     exit -2
19     fi
20     if [ -n "$BATCHMODE" ]
21     then
22     fileList='m.out'
23     else
24     fileList='ad_input_code_sf.f ad_input_code_sf.w2f.f ad_input_code_sf.w2f.canon.f ad_input_code_sf.w2f.canon.xaif ad_input_code_sf.w2f.canon.xb.xaif ad_input_code_sf.w2f.canon.xb.x2w.w2f.f ad_input_code_sf.w2f.canon.xb.x2w.w2f.rs.f ad_input_code_sf.w2f.canon.xb.x2w.w2f.rs.pp.f ad_input_code.w2f.canon.xb.x2w.w2f.rs.pp.f all_mods.xb.x2w.w2f.pp.f m.out'
25     fi
26     for i in `echo ${fileList}`
27     do
28     gunzip -c ${i}.gz > ${i}
29     echo "$i old reference (<) vs new file (>)"
30     echo "------------------------------------------------------------------------------"
31 utke 1.2 ignoreFlags=""
32     case "$i" in
33     "m.out" )
34     ignoreFlags="-I time: -I TIMING -I date: -I version: -I user:"
35     ;;
36     *)
37     ignoreFlags="-I \"file translated from \""
38     ;;
39     esac
40     diff -i ${ignoreFlags} $i ../../../../../MITgcm/verification/OpenAD/build_${testName}/$i
41 utke 1.1 if [ $? -ne 0 -a -z "$BATCHMODE" ]
42     then
43     echo "update reference for $i? [y]/n "
44     read answer
45     if [ "$answer" == "n" ]
46     then
47     echo "not updated"
48     else
49     echo "copying"
50     cp ../../../../../MITgcm/verification/OpenAD/build_${testName}/$i $i
51     gzip -f ${i}
52     fi
53     fi
54     done

  ViewVC Help
Powered by ViewVC 1.1.22