Subversion Repositories lagranto.arpege

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 michaesp 1
#!/bin/csh
2
 
3
 
4
# Write usage information
5
if ( ${#argv} == 0) then
6
  echo 
7
  /home/binderh/prog/programs/lagranto.mf/bin/lagrantohelp timeres short
8
  echo  
9
  exit 0
10
endif
11
 
12
# Get input and output trajectory file
13
set inpfile = $1
14
set outfile = $2
15
 
16
# Handle optional arguments
17
 
18
set mode = "cubic"
19
set shift = 0
20
set value = 0
21
set unit  = "min"
22
 
23
while ( $#argv > 0 )
24
 
25
  switch ( $argv[1] )
26
 
27
   case -h
28
     set unit  = "h"
29
     set value = $argv[2]
30
     shift;
31
   breaksw
32
 
33
   case -min
34
     set unit  = "min"
35
     set value = $argv[2]
36
     shift;
37
   breaksw
38
 
39
   case -linear
40
     set mode  = "linear"
41
   breaksw
42
 
43
   case -cubic
44
     set mode  = "cubic"
45
   breaksw
46
 
47
   case -shifth
48
     set shift = $argv[2]
49
     shift;
50
   breaksw
51
 
52
  endsw
53
 
54
  shift;
55
 
56
end
57
 
58
# Get the dimensions of the trajectory file
59
set dim=`/home/binderh/prog/programs/lagranto.mf/goodies/trainfo.sh ${inpfile} dim` 
60
 
61
# Prepare parameter file and run program
62
\rm -f timeres.param
63
echo \"${inpfile}\"  >! timeres.param
64
echo \"${outfile}\"  >> timeres.param
65
echo ${dim}          >> timeres.param
66
echo ${value}        >> timeres.param
67
echo \"${unit}\"     >> timeres.param
68
echo \"${mode}\"     >> timeres.param
69
echo ${shift}        >> timeres.param
70
 
71
/home/binderh/prog/programs/lagranto.mf/goodies/timeres
72
 
73
# Make clean
74
#\rm -f timeres.param
75
 
76
exit 0
77