#!/bin/bash
tmpdir=./tmp
mkdir -p $tmpdir
for year in $(seq -w 1961 1964) ; do
  echo $year
  cdo -seltimestep,1/12 pr_Amon_BCC-CSM2-MR_dcppA-hindcast_s${year}.nc $tmpdir/series${year}.nc
done
cd $tmpdir
cdo mergetime '*.nc' series_t1.nc
exit 0
