#---------------------------------------------------------- MARS_local
#
# Definition of the local ECMWF MARS data bases
#
#

# prefer the 'system' mars config file selector
MARS_SELECT_CFG_FILE=$MARS_HOME/bin/select_mars_config

if [ ! -f $MARS_SELECT_CFG_FILE ]
then
  # 'remote' file does not exist - try to use our local one
  MARS_SELECT_CFG_FILE=$METVIEW_BIN/select_mars_config
fi


MARS_CFG_FILE=`$MARS_SELECT_CFG_FILE`
export MARS_CFG_FILE

if [ -f $MARS_CFG_FILE ]
then
  cat $MARS_CFG_FILE
else
  echo "+---------+  Local ECMWF MARS access configured but" 3>&2 2>&1 1>&3
  echo "| CFG ERR |  local MARS configuration file not found!" 3>&2 2>&1 1>&3
  echo "+---------+  Check configuration of MARS_local/MARS_remote/MARS_none?" 3>&2 2>&1 1>&3
fi

#---------------------------------------------------------------------

