#!/bin/ksh

#SBATCH --workdir=/scratch/ms/ggg/xxx
#SBATCH --qos=normal
#SBATCH --job-name=flex_ecmwf_oper
#SBATCH --output=ms_sms_output_Vv.v/CTBTO_ops.out
#SBATCH --error=ms_sms_output_Vv.v/CTBTO_ops.out
#SBATCH --mail-type=ALL
#SBATCH --time=12:00:00


set -x

alias ecp='set noglob; $ECFS_SYS_PATH/ecp.p'

export OMP_NUM_THREADS=1

export VERSION=v.v
JOBNAME=ecmwf_idc_ops_ecgate_V${VERSION}
CONTROLFILE=${HOME}/flex_extract_ecgate_V${VERSION}/CONTROL_OPS_V${VERSION}

[ -z "$WSHOME" ] && export WSHOME=$HOME

# #
# #testing purposes
# #
MSJ_YEAR=2013
MSJ_MONTH=11
MSJ_DAY=07
MSJ_BASETIME=12

echo 'MSJ_ENVIRONMENT:' $MSJ_YEAR, $MSJ_MONTH, $MSJ_DAY, $MSJ_BASETIME

DATEREF=${MSJ_YEAR}${MSJ_MONTH}${MSJ_DAY}


WDAY=$(date +%A)
[ ! -d $SCRATCH/ms_sms_output_V${VERSION} ] && mkdir $SCRATCH/ms_sms_output_V${VERSION}

LOG_FILE=$SCRATCH/ms_sms_output_V${VERSION}/${JOBNAME}_${WDAY}_${MSJ_BASETIME}
exec 1>${LOG_FILE}
