/[MITgcm]/MITgcm_contrib/jmc_script/tst_2+2_cpl
ViewVC logotype

Diff of /MITgcm_contrib/jmc_script/tst_2+2_cpl

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

revision 1.3 by jmc, Wed Nov 7 01:40:47 2007 UTC revision 1.4 by jmc, Mon Nov 26 23:23:51 2007 UTC
# Line 9  rnp_loc() Line 9  rnp_loc()
9  #   rename files with prefix = 'arg_1' to files with prefix = 'arg_2'  #   rename files with prefix = 'arg_1' to files with prefix = 'arg_2'
10      echo 'rnp_loc:' $1 $2      echo 'rnp_loc:' $1 $2
11  #   rnp -s $1 $2  #   rnp -s $1 $2
12      yy=$1 ; zz=$2      listY=`ls -1 $1*`
13      listF=`ls -1 ${yy}*`      for yy in $listY
     for xx in $listF  
14      do      do
15        ff=`echo $xx | sed "s/^$yy/$zz/"`        zz=`echo $yy | sed "s/^$1/$2/"`
16        mv $xx $ff        mv $yy $zz
17      done      done
18  }  }
19    
20  dif_tiles()  dif_tiles()
21  {  {
22  #   dif_data_loc dir1 dir2 file  #   dif_data_loc dd1 dd2 file
23  #   for all tiles  ==> do diff dir1/file dir2/file'  #   for all tiles  ==> do diff dd1/file dd2/file'
24      dir1=$1 ; dir2=$2 ; zz=$3      dd1=$1 ; dd2=$2 ; zz=$3
25      chkmeta='Y'      chkmeta='Y'
26      listX=`(cd $dir1 ; ls $zz.*.data | sed "s/$zz\.//" | sed "s/\.data//")`      listY=`(cd $dd1 ; ls $zz.*.data | sed "s/$zz\.//" | sed "s/\.data//")`
27      echo '--> file=' $zz ', listX=' $listX      echo '--> file='$zz', listY='$listY
28      for xx in $listX      for yy in $listY
29      do      do
30        echo diff $dir1/$zz.$xx.data $dir2        echo diff $dd1/$zz.$yy.data $dd2
31        diff $dir1/$zz.$xx.data $dir2        diff $dd1/$zz.$yy.data $dd2
32        out=$?        out=$?
33        if test $out != 0        if test $out != 0
34        then echo 'Diff outp=' $out ' ==> stop'        then echo 'Diff outp=' $out ' ==> stop'
35         exit ; fi         exit ; fi
36        if test $chkmeta = 'Y'        if test $chkmeta = 'Y'
37        then        then
38         echo diff $dir1/$zz.$xx.meta $dir3         echo diff $dd1/$zz.$yy.meta $dd2
39         diff $dir1/$zz.$xx.meta $dir3         diff $dd1/$zz.$yy.meta $dd2
40         out=$?         out=$?
41         if test $out != 0         if test $out != 0
42         then echo 'Diff outp=' $out ' ==> stop'         then echo 'Diff outp=' $out ' ==> stop'
# Line 324  then Line 323  then
323   done   done
324   exit   exit
325  fi  fi
   

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22