#! /bin/bash
#
gfortran -c -g -Wall snowfall_plot.f90
if [ $? -ne 0 ]; then
  echo "Compile error."
  exit
fi
#
gfortran snowfall_plot.o
if [ $? -ne 0 ]; then
  echo "Load error."
  exit
fi
rm snowfall_plot.o
#
mv a.out snowfall_plot
./snowfall_plot > snowfall_plot.txt
if [ $? -ne 0 ]; then
  echo "Run error."
  exit
fi
rm snowfall_plot
#
#  Create graphics.
#
gnuplot < snowfall_commands.txt
#
echo "Normal end of execution."
