#!/bin/bash

# this script should be run from a test case directory PLOTS/testcase/CASE
# and not from the main directory (PLOTS), where it is stored

# execute "bash -l" before running this script

module load ncl

ROOT=$(pwd)
CASE=$(basename $ROOT)

cd variant
EXPS=$(ls)

for EXP in $EXPS ; do
    echo $EXP
    cd $ROOT/variant/$EXP
    rm -f *.png *.gif
    ln -s ../../include/* .
    for NCL in ../../*.ncl ; do
	echo $NCL
	ncl $NCL &
    done
    wait
done
