Subversion Repositories lagranto.um

Rev

Rev 3 | Details | Compare with Previous | Last modification | View Log | RSS feed

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