#!/bin/csh
#---------------------------------------------------------------------------
# corona: Run corona model.
#
# Usage : corona <Carrington rotation> <resolution>
#---------------------------------------------------------------------------

# Set parameters
set cr = $1
set res = $2

# Set environment variables
setenv CORHEL_DIR "$CORHEL_ROOT"
setenv CORHEL_BIN "$CORHEL_ROOT/bin"
setenv CORHEL_RUN "$CORHEL_ROOT/run/cr$cr-$res"

pushd $CORHEL_DIR/tools/corona > /dev/null
source ./set.sh run
popd > /dev/null

# Run MAS
cd $CORHEL_RUN/corona
if ($res == 'low') then
   $CORONA_BIN/mas_61x71x64 mas
else
   $CORONA_BIN/mas_101x101x128 mas
endif

exit 0
