Subversion Repositories lagranto.icon

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
# Set Lagranto 
4
set LAGRANTO = ${LAGRANTOBASE}.${MODEL}/
5
 
6
# Write usage information
7
if ( ${#argv} == 0) then
8
  echo 
9
  ${LAGRANTO}/bin/lagrantohelp difference short
10
  echo  
11
  exit 0
12
endif
13
 
14
# Get input and output trajectory file
15
set inpfile1  = $1
16
set inpfile2  = $2
17
set outfile   = $3
18
set fieldname = $4
19
 
20
# Handle optional arguments
21
 
22
set mode = "single"
23
 
24
while ( $#argv > 0 )
25
 
26
  switch ( $argv[1] )
27
 
28
   case -single
29
     set mode  = "single"
30
   breaksw
31
 
32
   case -max
33
     set mode  = "max"
34
   breaksw
35
 
36
  endsw
37
 
38
  shift;
39
 
40
end
41
 
42
# Get the dimensions of the trajectory files
43
set dim1=`${LAGRANTO}/goodies/trainfo.sh ${inpfile1} dim` 
44
set dim2=`${LAGRANTO}/goodies/trainfo.sh ${inpfile2} dim` 
45
 
46
# Prepare parameter file and run program
47
\rm -f difference.param
48
echo \"${inpfile1}\"  >! difference.param
49
echo \"${inpfile2}\"  >> difference.param
50
echo \"${outfile}\"   >> difference.param
51
echo ${dim1}          >> difference.param
52
echo ${dim2}          >> difference.param
53
echo \"${mode}\"      >> difference.param
54
echo \"${fieldname}\" >> difference.param
55
 
56
${LAGRANTO}/goodies/difference
57
 
58
# Make clean
59
#\rm -f difference.param
60
 
61
exit 0
62