Subversion Repositories lagranto.ecmwf

Rev

Go to most recent revision | 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
  ${LAGRANTO}/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
 
20
while ( $#argv > 0 )
21
 
22
  switch ( $argv[1] )
23
 
24
   case -h
25
     set unit  = "h"
26
     set value = $argv[2]
27
     shift;
28
   breaksw
29
 
30
   case -min
31
     set unit  = "min"
32
     set value = $argv[2]
33
     shift;
34
   breaksw
35
 
36
   case -linear
37
     set mode  = "linear"
38
   breaksw
39
 
40
   case -cubic
41
     set mode  = "cubic"
42
   breaksw
43
 
44
  endsw
45
 
46
  shift;
47
 
48
end
49
 
50
# Get the dimensions of the trajectory file
51
set dim=`${LAGRANTO}/goodies/trainfo.sh ${inpfile} dim` 
52
 
53
# Prepare parameter file and run program
54
\rm -f timeres.param
55
echo \"${inpfile}\"  >! timeres.param
56
echo \"${outfile}\"  >> timeres.param
57
echo ${dim}          >> timeres.param
58
echo ${value}        >> timeres.param
59
echo \"${unit}\"     >> timeres.param
60
echo \"${mode}\"     >> timeres.param
61
 
62
${LAGRANTO}/goodies/timeres
63
 
64
# Make clean
65
#\rm -f timeres.param
66
 
67
exit 0
68