Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed
#!/bin/csh
# Set Lagranto
set LAGRANTO = ${LAGRANTOBASE}.${MODEL}/
# Write usage information
if ( ${#argv} == 0) then
echo
${LAGRANTO}/bin/lagrantohelp timeres short
echo
exit 0
endif
# Get input and output trajectory file
set inpfile = $1
set outfile = $2
# Handle optional arguments
set mode = "cubic"
set ok = 0
while ( $#argv > 0 )
switch ( $argv[1] )
case -h
set unit = "h"
set value = $argv[2]
set ok = 1
shift;
breaksw
case -min
set unit = "min"
set value = $argv[2]
set ok = 1
shift;
breaksw
case -linear
set mode = "linear"
breaksw
case -cubic
set mode = "cubic"
breaksw
case -shift0
set mode = "shift0"
set value = 0
set unit = "nil"
set ok = 1
breaksw
endsw
shift;
end
if ( "${ok}" == "0" ) then
echo
${LAGRANTO}/bin/lagrantohelp timeres short
echo
exit 0
endif
# Get the dimensions of the trajectory file
set dim=`${LAGRANTO}/goodies/trainfo.sh ${inpfile} dim`
# Prepare parameter file and run program
\rm -f timeres.param
echo \"${inpfile}\" >! timeres.param
echo \"${outfile}\" >> timeres.param
echo ${dim} >> timeres.param
echo ${value} >> timeres.param
echo \"${unit}\" >> timeres.param
echo \"${mode}\" >> timeres.param
${LAGRANTO}/goodies/timeres
# Make clean
#\rm -f timeres.param
exit 0