#!/bin/bash

set -x
ulimit -s unlimited

# usage instructions
if [ $# = 0 ] ; then
   echo " USAGE: $(basename $0) <year> "
   exit
fi

# Set working dir
year=$1 # year is the first argument of the srpt
# path to workdir
WRKDIR=/store/pverezem/NNATL12/NNATL12-I-GV12/

#ln -sf /store/pverezem/NNATL12/NNATL12-I-GV12/${year}/votemper_* ./
#ncrcat votemper_GLORYS12-NNATL12_y${year}* GLORYS12-NNATL12_gridT_y${year}.nc 
#rm votemper_GLORYS12-NNATL12_y${year}* 

ln -sf /store/pverezem/NNATL12/NNATL12-I-GV12/${year}/vosaline_* ./
ncrcat vosaline_GLORYS12-NNATL12_y${year}* GLORYS12-NNATL12_gridS_y${year}.nc 
rm vosaline_GLORYS12-NNATL12_y${year}*


