#!/bin/sh
set -e
# add two files then multiply the sum by the molecular
# weight of nitrogen
# MW N = 0.014 kg/mole

if [ $# -ne 4 ] ; then
  echo "Error in $0: invalid number of arguments $#"
  exit 1
fi

pfx=$1
inp1=$2
inp2=$3
out=$4

release inp1 inp2
access  inp1 ${pfx}_${inp1}
access  inp2 ${pfx}_${inp2}

add inp1 inp2 temp1
echo "           1.400E-02" | ccc xlin temp1 ${pfx}_${out}

rm -f temp1
release inp1 inp2
