/[MITgcm]/MITgcm_contrib/jmc_script/tst1+1
ViewVC logotype

Contents of /MITgcm_contrib/jmc_script/tst1+1

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


Revision 1.2 - (show annotations) (download)
Mon Jan 17 16:05:09 2005 UTC (20 years, 6 months ago) by jmc
Branch: MAIN
Changes since 1.1: +66 -22 lines
updated

1 #!/bin/sh
2
3 # Nit = Nb of iter of 2nd & 3rd run (1rst one is 2 x Nit iter long)
4 Nit=1
5
6 case $# in
7 1) ;;
8 *) echo "Usage: `basename $0` flag"
9 echo " Check restart: compare 1 run of 2 x $Nit it long"
10 echo " with 2 consecutive runs of $Nit it long each"
11 echo " where: flag = 1 -> do the 3 run"
12 echo " flag = 2 -> compare std_outp"
13 echo " flag = 3 -> compare pickup files"
14 exit ;;
15 esac
16 flag=$1
17
18
19 #- input :
20 # 1) data.tst = parameter file "data" for 2.Nit iter run
21 # 2) in dir temp : pickup(_cd).0..0{num0}.001.001.data
22
23 num0="72030"
24
25 gcmExc=mitgcmuv
26 # list of pickup(s) that are needed for a restart :
27 listP='pickup'
28 #listP='pickup pickup_ic'
29
30 #- dir where to put the results :
31 dir1=res_2it
32 dir2=res_1iA
33 dir3=res_1iB
34 #---------------------------
35 Dbl=`expr $Nit + $Nit`
36 num1=`expr $num0 + $Nit`
37 num2=`expr $num0 + $Dbl`
38 num0c=`add0upto10c $num0`
39 num1c=`add0upto10c $num1`
40 num2c=`add0upto10c $num2`
41 echo $num0 $num1 $num2
42 echo $num0c $num1c $num2c
43 echo 'gcmExc='$gcmExc
44 # exit
45 #------------------------
46
47 if test $flag = 1 ; then
48 #------------
49 rm -r $dir1 $dir2 $dir3
50 mkdir $dir1 $dir2 $dir3
51
52 cp -p data.tst data
53 ln -s temp/pickup*.${num0c}* .
54 echo '==> START RUN 2 x' $Nit 'it'
55 ./$gcmExc > std_outp.2it 2>&1
56 if test -f pickup.ckptA.001.001.data
57 then out=`egrep -c 'STOP ABNORMAL END' std_outp.2it`
58 else out=9 ; fi
59 if test $out != 0 ; then echo 'RUN 2it STOP before END => exit' ; exit ; fi
60 echo '==> END RUN 2 x' $Nit 'it'
61 for xx in $listP
62 do
63 rnp $xx.ckptA $xx.$num2c
64 done
65 mv *.00?.00?.* $dir1
66 mv $dir1/pickup*.${num0c}* .
67 #--
68 sed "s/^ nTimeSteps=$Dbl/ nTimeSteps=$Nit/g" data.tst > data
69 echo '==> START RUN 1iA'
70 ./$gcmExc > std_outp.1iA 2>&1
71 if test -f pickup.ckptA.001.001.data
72 then out=`egrep -c 'STOP ABNORMAL END' std_outp.1iA`
73 else out=9 ; fi
74 if test $out != 0 ; then echo 'RUN 1iA STOP before END => exit' ; exit ; fi
75 echo '==> END RUN 1iA'
76 for xx in $listP
77 do
78 rnp $xx.ckptA $xx.$num1c
79 done
80 mv *.00?.00?.* $dir2
81 rm $dir2/pickup*.${num0c}*
82 #--
83 ln -s $dir2/pickup*.$num1c.* .
84 mv data data.tmp
85 sed "s/^ nIter0=$num0/ nIter0=$num1/g" data.tmp > data
86 echo '==> START RUN 1iB'
87 ./$gcmExc > std_outp.1iB 2>&1
88 if test -f pickup.ckptA.001.001.data
89 then out=`egrep -c 'STOP ABNORMAL END' std_outp.1iB`
90 else out=9 ; fi
91 if test $out != 0 ; then echo 'RUN 1iB STOP before END => exit' ; exit ; fi
92 echo '==> END RUN 1iB'
93 for xx in $listP
94 do
95 rnp $xx.ckptA $xx.$num2c
96 done
97 mv *.00?.00?.* $dir3
98 rm $dir3/pickup*.$num1c.*
99 exit
100 #------------
101 fi
102
103 if test $flag = 2 ; then
104 #------------
105 echo ' ' ; echo '-- compare cg2d_init_res :'
106 echo ' run 1iA:'
107 grep "cg2d_init_res" std_outp.1iA \
108 | sed 's/.* cg2d_init_res =//'
109 echo ' run 1iB:'
110 grep "cg2d_init_res" std_outp.1iB \
111 | sed 's/.* cg2d_init_res =//'
112 echo ' run 2it:'
113 grep "cg2d_init_res" std_outp.2it \
114 | sed 's/.* cg2d_init_res =//'
115 exit
116 #------------
117 fi
118
119 if test $flag = 3 ; then
120 #------------
121 difex=`ls ~jmc/bin/dif6data`
122 for xx in $listP
123 do
124 $difex $dir1 $dir3 $xx.$num2c
125 done
126 exit
127 #------------
128 fi

  ViewVC Help
Powered by ViewVC 1.1.22