#!/bin/bash

# this script should be run from a test case directory (test1, test2, test3)
# not from the main directory (PLOTS), where it is stored
# from PLOTS, run "make_all_graphs" to make all graphs

# execute "bash -l" before running this script

module load ncl

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

cd data
EXPS=$(ls)

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