Subversion Repositories lagranto.um

Rev

Rev 3 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3 Rev 12
1
#!/bin/csh
1
#!/bin/csh
2
 
2
 
3
 
3
 
4
# Write usage information
4
# Write usage information
5
if ( ${#argv} == 0) then
5
if ( ${#argv} == 0) then
6
  echo 
6
  echo 
7
  echo "--------------------------------------------------------------"
7
  echo "--------------------------------------------------------------"
8
  echo "Usage: reformat.sh trainp traout        "
8
  echo "Usage: reformat.sh trainp traout        "
9
  echo 
9
  echo 
10
  echo "         trainp          : Input trajectory file"
10
  echo "         trainp          : Input trajectory file"
11
  echo "         traout          : Output trajectory file"
11
  echo "         traout          : Output trajectory file"
12
  echo
12
  echo
13
  echo "     mode=1: ascii, sorted by trajectory"
13
  echo "     mode=1: ascii, sorted by trajectory"
14
  echo "     mode=2: ascii, sorted by time"
14
  echo "     mode=2: ascii, sorted by time"
15
  echo "     mode=3: fortran (unformatted)"    
15
  echo "     mode=3: fortran (unformatted)"    
16
  echo "     mode=4: IVE netcdf"  
16
  echo "     mode=4: IVE netcdf"  
17
  echo "--------------------------------------------------------------"
17
  echo "--------------------------------------------------------------"
18
  exit 0
18
  exit 0
19
endif
19
endif
20
 
20
 
21
set inpfile=$1
21
set inpfile=$1
22
set outfile=$2
22
set outfile=$2
23
 
23
 
24
set prog1=${LAGRANTO}/goodies/reformat
24
set prog1=${LAGRANTO}/goodies/reformat
25
set prog2=${LAGRANTO}/goodies/trainfo.sh
25
set prog2=${LAGRANTO}/goodies/trainfo.sh
26
 
26
 
27
set dim=`${prog2} ${inpfile} dim` 
27
set dim=`${prog2} ${inpfile} dim` 
28
 
28
 
29
\rm -f reformat.param
29
\rm -f reformat.param
30
echo \"${inpfile}\"  >! reformat.param
30
echo \"${inpfile}\"  >! reformat.param
31
echo \"${outfile}\"  >> reformat.param
31
echo \"${outfile}\"  >> reformat.param
32
echo ${dim}          >> reformat.param
32
echo ${dim}          >> reformat.param
33
 
33
 
34
${prog1}
34
${prog1}
35
 
35
 
36
\rm -f reformat.param
36
\rm -f reformat.param
37
 
37
 
38
exit 0
38
exit 0
39
 
39