#!/bin/sh
set -e
# divide  input file by g=9.810616
if [ $# -ne 3 ] ; then
  echo "Error in $0: invalid number of arguments $#"
  exit 1
fi
pfx=$1
inp=$2
out=$3
access inp ${pfx}_${inp}

# Convert from DATA TO GRID
echo "C*RELABL   DATA
C*         GRID" | ccc relabl inp x

echo "             9.80616        0.         1" | ccc xlin x ${pfx}_${out}
release inp x
