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