#! /bin/csh

# Usage: krakenz ENVFIL

# get the root for the file

set root = `basename $1`

rm -f MODFIL

if ( -e $1.brc ) ln -s $1.brc BRCFIL    # Bottom Refl. Coef. (input)
if ( -e $1.trc ) ln -s $1.trc TRCFIL    # Top    Refl. Coef. (input)
if ( -e $1.irc ) ln -s $1.irc IRCFIL	# Intern.Refl. coef. (input)
 
# Run Krakenc

$krakzn/krakenz.out < $1.env >!  $root.prtz  # PRinT         file (output)

rm -f BRCFIL TRCFIL IRCFIL
mv MODFIL		$root.mod  # MODe          file (output)
