Subversion Repositories lagranto.wrf

Rev

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

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