#!/bin/ksh +x
#*************************************#
#                                     #
#     Vertical Modes Calculation      #
#                                     #
#*************************************#
#
if [ "${1}" = "-h" ]
then
  echo " "
  echo " Generate Files with the Basic State, the Equivalent Depth"
  echo " and the Vertical Structure of the Vertical Modes related to"
  echo " the Reference Case"
  echo " "
  echo "   Usage:"
  echo " ./Run_VModes"
  echo " "
  echo " No Arguments"
  echo " "
  exit
fi
#
dircfg='../../Config/'
. ${dircfg}Config_Dir
. ${dircfg}Reference_Case
#
set -x
cat <<eot > ./NameList
 &vmdnml
  csvm=${csvm},
  Kmax=${Kmax},
  isotermica=.FALSE.,
  tiso=288.15
  dirprs='${dirprscfg}',
  dirvmd='${dirvmdcfg}'
 /
eot
#
typeset -Z3 kmx
kmx=${Kmax}
time ../bin/Vertical_Modes.bin > ../output/Vertical_Modes_L${kmx}_${csvm}.out
#
rm -f ./NameList
#
